dootask/public/js/build/openpgp_hi.15f91b1d.js
2023-12-28 21:09:30 +08:00

46 lines
526 KiB
JavaScript
Vendored

const Jh="modulepreload",ic={},td="/",ri=function(e,r){return!r||r.length===0?e():Promise.all(r.map(i=>{if(i=`${td}${i}`,i in ic)return;ic[i]=!0;const n=i.endsWith(".css"),a=n?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${a}`))return;const s=document.createElement("link");if(s.rel=n?"stylesheet":Jh,n||(s.as="script",s.crossOrigin=""),s.href=i,document.head.appendChild(s),n)return new Promise((o,u)=>{s.addEventListener("load",o),s.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},Ye=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Mn=Symbol("doneWritingPromise"),_u=Symbol("doneWritingResolve"),ku=Symbol("doneWritingReject"),ta=Symbol("readingIndex");class Rr extends Array{constructor(){super(),this[Mn]=new Promise((e,r)=>{this[_u]=e,this[ku]=r}),this[Mn].catch(()=>{})}}function ce(t){return t&&t.getReader&&Array.isArray(t)}function oa(t){if(!ce(t)){const e=t.getWriter(),r=e.releaseLock;return e.releaseLock=()=>{e.closed.catch(function(){}),r.call(e)},e}this.stream=t}Rr.prototype.getReader=function(){return this[ta]===void 0&&(this[ta]=0),{read:async()=>(await this[Mn],this[ta]===this.length?{value:void 0,done:!0}:{value:this[this[ta]++],done:!1})}},Rr.prototype.readToEnd=async function(t){await this[Mn];const e=t(this.slice(this[ta]));return this.length=0,e},Rr.prototype.clone=function(){const t=new Rr;return t[Mn]=this[Mn].then(()=>{t.push(...this)}),t},oa.prototype.write=async function(t){this.stream.push(t)},oa.prototype.close=async function(){this.stream[_u]()},oa.prototype.abort=async function(t){return this.stream[ku](t),t},oa.prototype.releaseLock=function(){};const Mo=typeof Ye.process=="object"&&typeof Ye.process.versions=="object",nc=Mo&&void 0;function je(t){return ce(t)?"array":Ye.ReadableStream&&Ye.ReadableStream.prototype.isPrototypeOf(t)?"web":oi&&oi.prototype.isPrototypeOf(t)?"ponyfill":nc&&nc.prototype.isPrototypeOf(t)?"node":!(!t||!t.getReader)&&"web-like"}function Co(t){return Uint8Array.prototype.isPrototypeOf(t)}function Au(t){if(t.length===1)return t[0];let e=0;for(let n=0;n<t.length;n++){if(!Co(t[n]))throw Error("concatUint8Array: Data must be in the form of a Uint8Array");e+=t[n].length}const r=new Uint8Array(e);let i=0;return t.forEach(function(n){r.set(n,i),i+=n.length}),r}const ed=Mo&&void 0,ac=Mo&&void 0;let Do,b1;if(ac){Do=function(e){let r=!1;return new oi({start(i){e.pause(),e.on("data",n=>{r||(ed.isBuffer(n)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),i.enqueue(n),e.pause())}),e.on("end",()=>{r||i.close()}),e.on("error",n=>i.error(n))},pull(){e.resume()},cancel(i){r=!0,e.destroy(i)}})};class t extends ac{constructor(r,i){super(i),this._reader=Nr(r)}async _read(r){try{for(;;){const{done:i,value:n}=await this._reader.read();if(i){this.push(null);break}if(!this.push(n)||this._cancelling){this._reading=!1;break}}}catch(i){this.emit("error",i)}}_destroy(r){this._reader.cancel(r)}}b1=function(e,r){return new t(e,r)}}const sc=new WeakSet,ee=Symbol("externalBuffer");function kr(t){if(this.stream=t,t[ee]&&(this[ee]=t[ee].slice()),ce(t)){const i=t.getReader();return this._read=i.read.bind(i),this._releaseLock=()=>{},void(this._cancel=()=>{})}let e=je(t);if(e==="node"&&(t=Do(t)),e){const i=t.getReader();return this._read=i.read.bind(i),this._releaseLock=()=>{i.closed.catch(function(){}),i.releaseLock()},void(this._cancel=i.cancel.bind(i))}let r=!1;this._read=async()=>r||sc.has(t)?{value:void 0,done:!0}:(r=!0,{value:t,done:!1}),this._releaseLock=()=>{if(r)try{sc.add(t)}catch{}}}kr.prototype.read=async function(){return this[ee]&&this[ee].length?{done:!1,value:this[ee].shift()}:this._read()},kr.prototype.releaseLock=function(){this[ee]&&(this.stream[ee]=this[ee]),this._releaseLock()},kr.prototype.cancel=function(t){return this._cancel(t)},kr.prototype.readLine=async function(){let t,e=[];for(;!t;){let{done:r,value:i}=await this.read();if(i+="",r)return e.length?Ne(e):void 0;const n=i.indexOf(`
`)+1;n&&(t=Ne(e.concat(i.substr(0,n))),e=[]),n!==i.length&&e.push(i.substr(n))}return this.unshift(...e),t},kr.prototype.readByte=async function(){const{done:t,value:e}=await this.read();if(t)return;const r=e[0];return this.unshift(Se(e,1)),r},kr.prototype.readBytes=async function(t){const e=[];let r=0;for(;;){const{done:i,value:n}=await this.read();if(i)return e.length?Ne(e):void 0;if(e.push(n),r+=n.length,r>=t){const a=Ne(e);return this.unshift(Se(a,t)),Se(a,0,t)}}},kr.prototype.peekBytes=async function(t){const e=await this.readBytes(t);return this.unshift(e),e},kr.prototype.unshift=function(...t){this[ee]||(this[ee]=[]),t.length===1&&Co(t[0])&&this[ee].length&&t[0].length&&this[ee][0].byteOffset>=t[0].length?this[ee][0]=new Uint8Array(this[ee][0].buffer,this[ee][0].byteOffset-t[0].length,this[ee][0].byteLength+t[0].length):this[ee].unshift(...t.filter(e=>e&&e.length))},kr.prototype.readToEnd=async function(t=Ne){const e=[];for(;;){const{done:r,value:i}=await this.read();if(r)break;e.push(i)}return t(e)};let U0,Su,{ReadableStream:oi,WritableStream:Eu,TransformStream:$n}=Ye;async function Pu(){if($n)return;const[t,e]=await Promise.all([ri(()=>Promise.resolve().then(function(){return l6}),void 0),ri(()=>Promise.resolve().then(function(){return _6}),void 0)]);({ReadableStream:oi,WritableStream:Eu,TransformStream:$n}=t);const{createReadableStreamWrapper:r}=e;Ye.ReadableStream&&oi!==Ye.ReadableStream&&(U0=r(oi),Su=r(Ye.ReadableStream))}const ka=Mo&&void 0;function Ga(t){let e=je(t);return e==="node"?Do(t):e==="web"&&U0?U0(t):e?t:new oi({start(r){r.enqueue(t),r.close()}})}function xu(t){if(je(t))return t;const e=new Rr;return(async()=>{const r=We(e);await r.write(t),await r.close()})(),e}function Ne(t){return t.some(e=>je(e)&&!ce(e))?function(e){e=e.map(Ga);const r=Cu(async function(a){await Promise.all(n.map(s=>B0(s,a)))});let i=Promise.resolve();const n=e.map((a,s)=>ci(a,(o,u)=>(i=i.then(()=>Fi(o,r.writable,{preventClose:s!==e.length-1})),i)));return r.readable}(t):t.some(e=>ce(e))?function(e){const r=new Rr;let i=Promise.resolve();return e.forEach((n,a)=>(i=i.then(()=>Fi(n,r,{preventClose:a!==e.length-1})),i)),r}(t):typeof t[0]=="string"?t.join(""):ka&&ka.isBuffer(t[0])?ka.concat(t):Au(t)}function Nr(t){return new kr(t)}function We(t){return new oa(t)}async function Fi(t,e,{preventClose:r=!1,preventAbort:i=!1,preventCancel:n=!1}={}){if(je(t)&&!ce(t)){t=Ga(t);try{if(t[ee]){const o=We(e);for(let u=0;u<t[ee].length;u++)await o.ready,await o.write(t[ee][u]);o.releaseLock()}await t.pipeTo(e,{preventClose:r,preventAbort:i,preventCancel:n})}catch{}return}const a=Nr(t=xu(t)),s=We(e);try{for(;;){await s.ready;const{done:o,value:u}=await a.read();if(o){r||await s.close();break}await s.write(u)}}catch(o){i||await s.abort(o)}finally{a.releaseLock(),s.releaseLock()}}function Mu(t,e){const r=new $n(e);return Fi(t,r.writable),r.readable}function Cu(t){let e,r,i=!1;return{readable:new oi({start(n){r=n},pull(){e?e():i=!0},cancel:t},{highWaterMark:0}),writable:new Eu({write:async function(n){r.enqueue(n),i?i=!1:(await new Promise(a=>{e=a}),e=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function oe(t,e=()=>{},r=()=>{}){if(ce(t)){const a=new Rr;return(async()=>{const s=We(a);try{const o=await he(t),u=e(o),c=r();let h;h=u!==void 0&&c!==void 0?Ne([u,c]):u!==void 0?u:c,await s.write(h),await s.close()}catch(o){await s.abort(o)}})(),a}if(je(t))return Mu(t,{async transform(a,s){try{const o=await e(a);o!==void 0&&s.enqueue(o)}catch(o){s.error(o)}},async flush(a){try{const s=await r();s!==void 0&&a.enqueue(s)}catch(s){a.error(s)}}});const i=e(t),n=r();return i!==void 0&&n!==void 0?Ne([i,n]):i!==void 0?i:n}function ci(t,e){if(je(t)&&!ce(t)){let i;const n=new $n({start(o){i=o}}),a=Fi(t,n.writable),s=Cu(async function(o){i.error(o),await a,await new Promise(setTimeout)});return e(n.readable,s.writable),s.readable}t=xu(t);const r=new Rr;return e(t,r),r}function Ko(t,e){let r;const i=ci(t,(n,a)=>{const s=Nr(n);s.remainder=()=>(s.releaseLock(),Fi(n,a),i),r=e(s)});return r}function pn(t){if(ce(t))return t.clone();if(je(t)){const e=function(r){if(ce(r))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(je(r)){const i=Ga(r).tee();return i[0][ee]=i[1][ee]=r[ee],i}return[Se(r),Se(r)]}(t);return Du(t,e[0]),e[1]}return Se(t)}function Un(t){return ce(t)?pn(t):je(t)?new oi({start(e){const r=ci(t,async(i,n)=>{const a=Nr(i),s=We(n);try{for(;;){await s.ready;const{done:o,value:u}=await a.read();if(o){try{e.close()}catch{}return void await s.close()}try{e.enqueue(u)}catch{}await s.write(u)}}catch(o){e.error(o),await s.abort(o)}});Du(t,r)}}):Se(t)}function Du(t,e){Object.entries(Object.getOwnPropertyDescriptors(t.constructor.prototype)).forEach(([r,i])=>{r!=="constructor"&&(i.value?i.value=i.value.bind(e):i.get=i.get.bind(e),Object.defineProperty(t,r,i))})}function Se(t,e=0,r=1/0){if(ce(t))throw Error("Not implemented");if(je(t)){if(e>=0&&r>=0){let i=0;return Mu(t,{transform(n,a){i<r?(i+n.length>=e&&a.enqueue(Se(n,Math.max(e-i,0),r-i)),i+=n.length):a.terminate()}})}if(e<0&&(r<0||r===1/0)){let i=[];return oe(t,n=>{n.length>=-e?i=[n]:i.push(n)},()=>Se(Ne(i),e,r))}if(e===0&&r<0){let i;return oe(t,n=>{const a=i?Ne([i,n]):n;if(a.length>=-r)return i=Se(a,r),Se(a,e,r);i=a})}return console.warn(`stream.slice(input, ${e}, ${r}) not implemented efficiently.`),Ni(async()=>Se(await he(t),e,r))}return t[ee]&&(t=Ne(t[ee].concat([t]))),!Co(t)||ka&&ka.isBuffer(t)?t.slice(e,r):(r===1/0&&(r=t.length),t.subarray(e,r))}async function he(t,e=Ne){return ce(t)?t.readToEnd(e):je(t)?Nr(t).readToEnd(e):t}async function B0(t,e){if(je(t)){if(t.cancel)return t.cancel(e);if(t.destroy)return t.destroy(e),await new Promise(setTimeout),e}}function Ni(t){const e=new Rr;return(async()=>{const r=We(e);try{await r.write(await t()),await r.close()}catch(i){await r.abort(i)}})(),e}const Ku="3.7.5",rd=Ku,id=typeof atob=="function",nd=typeof btoa=="function",Zn=typeof Buffer=="function",oc=typeof TextDecoder=="function"?new TextDecoder:void 0,cc=typeof TextEncoder=="function"?new TextEncoder:void 0,ca=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),cs=(t=>{let e={};return ca.forEach((r,i)=>e[r]=i),e})(),ad=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ke=String.fromCharCode.bind(String),uc=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),Ru=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Iu=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Uu=t=>{let e,r,i,n,a="";const s=t.length%3;for(let o=0;o<t.length;){if((r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255||(n=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=r<<16|i<<8|n,a+=ca[e>>18&63]+ca[e>>12&63]+ca[e>>6&63]+ca[63&e]}return s?a.slice(0,s-3)+"===".substring(s):a},m1=nd?t=>btoa(t):Zn?t=>Buffer.from(t,"binary").toString("base64"):Uu,T0=Zn?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let r=0,i=t.length;r<i;r+=4096)e.push(ke.apply(null,t.subarray(r,r+4096)));return m1(e.join(""))},Rs=(t,e=!1)=>e?Ru(T0(t)):T0(t),sd=t=>{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?ke(192|e>>>6)+ke(128|63&e):ke(224|e>>>12&15)+ke(128|e>>>6&63)+ke(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return ke(240|e>>>18&7)+ke(128|e>>>12&63)+ke(128|e>>>6&63)+ke(128|63&e)},od=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Bu=t=>t.replace(od,sd),hc=Zn?t=>Buffer.from(t,"utf8").toString("base64"):cc?t=>T0(cc.encode(t)):t=>m1(Bu(t)),Bn=(t,e=!1)=>e?Ru(hc(t)):hc(t),dc=t=>Bn(t,!0),cd=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ud=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return ke(55296+(e>>>10))+ke(56320+(1023&e));case 3:return ke((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return ke((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},Tu=t=>t.replace(cd,ud),zu=t=>{if(t=t.replace(/\s+/g,""),!ad.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let e,r,i,n="";for(let a=0;a<t.length;)e=cs[t.charAt(a++)]<<18|cs[t.charAt(a++)]<<12|(r=cs[t.charAt(a++)])<<6|(i=cs[t.charAt(a++)]),n+=r===64?ke(e>>16&255):i===64?ke(e>>16&255,e>>8&255):ke(e>>16&255,e>>8&255,255&e);return n},g1=id?t=>atob(Iu(t)):Zn?t=>Buffer.from(t,"base64").toString("binary"):zu,qu=Zn?t=>uc(Buffer.from(t,"base64")):t=>uc(g1(t).split("").map(e=>e.charCodeAt(0))),Fu=t=>qu(Ou(t)),hd=Zn?t=>Buffer.from(t,"base64").toString("utf8"):oc?t=>oc.decode(qu(t)):t=>Tu(g1(t)),Ou=t=>Iu(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),z0=t=>hd(Ou(t)),$u=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),fc=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,$u(r));t("fromBase64",function(){return z0(this)}),t("toBase64",function(e){return Bn(this,e)}),t("toBase64URI",function(){return Bn(this,!0)}),t("toBase64URL",function(){return Bn(this,!0)}),t("toUint8Array",function(){return Fu(this)})},lc=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,$u(r));t("toBase64",function(e){return Rs(this,e)}),t("toBase64URI",function(){return Rs(this,!0)}),t("toBase64URL",function(){return Rs(this,!0)})},pc={version:Ku,VERSION:rd,atob:g1,atobPolyfill:zu,btoa:m1,btoaPolyfill:Uu,fromBase64:z0,toBase64:Bn,encode:Bn,encodeURI:dc,encodeURL:dc,utob:Bu,btou:Tu,decode:z0,isValid:t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:Rs,toUint8Array:Fu,extendString:fc,extendUint8Array:lc,extendBuiltins:()=>{fc(),lc()}};class Be{constructor(e){if(e===void 0)throw Error("Invalid BigInteger input");if(e instanceof Uint8Array){const r=e,i=Array(r.length);for(let n=0;n<r.length;n++){const a=r[n].toString(16);i[n]=r[n]<=15?"0"+a:a}this.value=BigInt("0x0"+i.join(""))}else this.value=BigInt(e)}clone(){return new Be(this.value)}iinc(){return this.value++,this}inc(){return this.clone().iinc()}idec(){return this.value--,this}dec(){return this.clone().idec()}iadd(e){return this.value+=e.value,this}add(e){return this.clone().iadd(e)}isub(e){return this.value-=e.value,this}sub(e){return this.clone().isub(e)}imul(e){return this.value*=e.value,this}mul(e){return this.clone().imul(e)}imod(e){return this.value%=e.value,this.isNegative()&&this.iadd(e),this}mod(e){return this.clone().imod(e)}modExp(e,r){if(r.isZero())throw Error("Modulo cannot be zero");if(r.isOne())return new Be(0);if(e.isNegative())throw Error("Unsopported negative exponent");let i=e.value,n=this.value;n%=r.value;let a=BigInt(1);for(;i>BigInt(0);){const s=i&BigInt(1);i>>=BigInt(1);const o=a*n%r.value;a=s?o:a,n=n*n%r.value}return new Be(a)}modInv(e){const{gcd:r,x:i}=this._egcd(e);if(!r.isOne())throw Error("Inverse does not exist");return i.add(e).mod(e)}_egcd(e){let r=BigInt(0),i=BigInt(1),n=BigInt(1),a=BigInt(0),s=this.value;for(e=e.value;e!==BigInt(0);){const o=s/e;let u=r;r=n-o*r,n=u,u=i,i=a-o*i,a=u,u=e,e=s%e,s=u}return{x:new Be(n),y:new Be(a),gcd:new Be(s)}}gcd(e){let r=this.value;for(e=e.value;e!==BigInt(0);){const i=e;e=r%e,r=i}return new Be(r)}ileftShift(e){return this.value<<=e.value,this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value>>=e.value,this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value===e.value}lt(e){return this.value<e.value}lte(e){return this.value<=e.value}gt(e){return this.value>e.value}gte(e){return this.value>=e.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.value<BigInt(0)}isEven(){return!(this.value&BigInt(1))}abs(){const e=this.clone();return this.isNegative()&&(e.value=-e.value),e}toString(){return this.value.toString()}toNumber(){const e=Number(this.value);if(e>Number.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return e}getBit(e){return(this.value>>BigInt(e)&BigInt(1))===BigInt(0)?0:1}bitLength(){const e=new Be(0),r=new Be(1),i=new Be(-1),n=this.isNegative()?i:e;let a=1;const s=this.clone();for(;!s.irightShift(r).equal(n);)a++;return a}byteLength(){const e=new Be(0),r=new Be(-1),i=this.isNegative()?r:e,n=new Be(8);let a=1;const s=this.clone();for(;!s.irightShift(n).equal(i);)a++;return a}toUint8Array(e="be",r){let i=this.value.toString(16);i.length%2==1&&(i="0"+i);const n=i.length/2,a=new Uint8Array(r||n),s=r?r-n:0;let o=0;for(;o<n;)a[o+s]=parseInt(i.slice(2*o,2*o+2),16),o++;return e!=="be"&&a.reverse(),a}}const dd=()=>typeof BigInt!="undefined",yc=(()=>{try{return!1}catch{}return!1})(),M={isString:function(t){return typeof t=="string"||t instanceof String},isArray:function(t){return t instanceof Array},isUint8Array:Co,isStream:je,readNumber:function(t){let e=0;for(let r=0;r<t.length;r++)e+=256**r*t[t.length-1-r];return e},writeNumber:function(t,e){const r=new Uint8Array(e);for(let i=0;i<e;i++)r[i]=t>>8*(e-i-1)&255;return r},readDate:function(t){const e=M.readNumber(t);return new Date(1e3*e)},writeDate:function(t){const e=Math.floor(t.getTime()/1e3);return M.writeNumber(e,4)},normalizeDate:function(t=Date.now()){return t===null||t===1/0?t:new Date(1e3*Math.floor(+t/1e3))},readMPI:function(t){const e=(t[0]<<8|t[1])+7>>>3;return t.subarray(2,2+e)},leftPad(t,e){const r=new Uint8Array(e),i=e-t.length;return r.set(t,i),r},uint8ArrayToMPI:function(t){const e=M.uint8ArrayBitLength(t);if(e===0)throw Error("Zero MPI");const r=t.subarray(t.length-Math.ceil(e/8)),i=new Uint8Array([(65280&e)>>8,255&e]);return M.concatUint8Array([i,r])},uint8ArrayBitLength:function(t){let e;for(e=0;e<t.length&&t[e]===0;e++);if(e===t.length)return 0;const r=t.subarray(e);return 8*(r.length-1)+M.nbits(r[0])},hexToUint8Array:function(t){const e=new Uint8Array(t.length>>1);for(let r=0;r<t.length>>1;r++)e[r]=parseInt(t.substr(r<<1,2),16);return e},uint8ArrayToHex:function(t){const e=[],r=t.length;let i,n=0;for(;n<r;){for(i=t[n++].toString(16);i.length<2;)i="0"+i;e.push(""+i)}return e.join("")},stringToUint8Array:function(t){return oe(t,e=>{if(!M.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r})},uint8ArrayToString:function(t){const e=[],i=(t=new Uint8Array(t)).length;for(let n=0;n<i;n+=16384)e.push(String.fromCharCode.apply(String,t.subarray(n,n+16384<i?n+16384:i)));return e.join("")},encodeUTF8:function(t){const e=new TextEncoder("utf-8");function r(i,n=!1){return e.encode(i,{stream:!n})}return oe(t,r,()=>r("",!0))},decodeUTF8:function(t){const e=new TextDecoder("utf-8");function r(i,n=!1){return e.decode(i,{stream:!n})}return oe(t,r,()=>r(new Uint8Array,!0))},concat:Ne,concatUint8Array:Au,equalsUint8Array:function(t,e){if(!M.isUint8Array(t)||!M.isUint8Array(e))throw Error("Data must be in the form of a Uint8Array");if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},writeChecksum:function(t){let e=0;for(let r=0;r<t.length;r++)e=e+t[r]&65535;return M.writeNumber(e,2)},printDebug:function(t){yc&&console.log("[OpenPGP.js debug]",t)},printDebugError:function(t){yc&&console.error("[OpenPGP.js debug]",t)},nbits:function(t){let e=1,r=t>>>16;return r!==0&&(t=r,e+=16),r=t>>8,r!==0&&(t=r,e+=8),r=t>>4,r!==0&&(t=r,e+=4),r=t>>2,r!==0&&(t=r,e+=2),r=t>>1,r!==0&&(t=r,e+=1),e},double:function(t){const e=new Uint8Array(t.length),r=t.length-1;for(let i=0;i<r;i++)e[i]=t[i]<<1^t[i+1]>>7;return e[r]=t[r]<<1^135*(t[0]>>7),e},shiftRight:function(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]>>=e,r>0&&(t[r]|=t[r-1]<<8-e);return t},getWebCrypto:function(){return Ye!==void 0&&Ye.crypto&&Ye.crypto.subtle},getBigInteger:async function(){if(dd())return Be;{const{default:t}=await ri(()=>Promise.resolve().then(function(){return k6}),void 0);return t}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return typeof navigator!="undefined"?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(t){return M.isString(t)?/^(([^<>()[\]\\.,;:\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(t):!1},canonicalizeEOL:function(t){let e=!1;return oe(t,r=>{let i;e&&(r=M.concatUint8Array([new Uint8Array([13]),r])),r[r.length-1]===13?(e=!0,r=r.subarray(0,-1)):e=!1;const n=[];for(let o=0;i=r.indexOf(10,o)+1,i;o=i)r[i-2]!==13&&n.push(i);if(!n.length)return r;const a=new Uint8Array(r.length+n.length);let s=0;for(let o=0;o<n.length;o++){const u=r.subarray(n[o-1]||0,n[o]);a.set(u,s),s+=u.length,a[s-1]=13,a[s]=10,s++}return a.set(r.subarray(n[n.length-1]||0),s),a},()=>e?new Uint8Array([13]):void 0)},nativeEOL:function(t){let e=!1;return oe(t,r=>{let i;(r=e&&r[0]!==10?M.concatUint8Array([new Uint8Array([13]),r]):new Uint8Array(r))[r.length-1]===13?(e=!0,r=r.subarray(0,-1)):e=!1;let n=0;for(let a=0;a!==r.length;a=i){i=r.indexOf(13,a)+1,i||(i=r.length);const s=i-(r[i]===10?1:0);a&&r.copyWithin(n,a,s),n+=s-a}return r.subarray(0,n)},()=>e?new Uint8Array([13]):void 0)},removeTrailingSpaces:function(t){return t.split(`
`).map(e=>{let r=e.length-1;for(;r>=0&&(e[r]===" "||e[r]===" "||e[r]==="\r");r--);return e.substr(0,r+1)}).join(`
`)},wrapError:function(t,e){if(!e)return Error(t);try{e.message=t+": "+e.message}catch{}return e},constructAllowedPackets:function(t){const e={};return t.forEach(r=>{if(!r.tag)throw Error("Invalid input: expected a packet class");e[r.tag]=r}),e},anyPromise:function(t){return new Promise(async(e,r)=>{let i;await Promise.all(t.map(async n=>{try{e(await n)}catch(a){i=a}})),r(i)})},selectUint8Array:function(t,e,r){const i=Math.max(e.length,r.length),n=new Uint8Array(i);let a=0;for(let s=0;s<n.length;s++)n[s]=e[s]&256-t|r[s]&255+t,a+=t&s<e.length|1-t&s<r.length;return n.subarray(0,a)},selectUint8:function(t,e,r){return e&256-t|r&255+t}},t0=M.getNodeBuffer();let js,Ws;function Yr(t){let e=new Uint8Array;return oe(t,r=>{e=M.concatUint8Array([e,r]);const i=[],n=Math.floor(e.length/45),a=45*n,s=js(e.subarray(0,a));for(let o=0;o<n;o++)i.push(s.substr(60*o,60)),i.push(`
`);return e=e.subarray(a),i.join("")},()=>e.length?js(e)+`
`:"")}function Lu(t){let e="";return oe(t,r=>{e+=r;let i=0;const n=[" "," ","\r",`
`];for(let o=0;o<n.length;o++){const u=n[o];for(let c=e.indexOf(u);c!==-1;c=e.indexOf(u,c+1))i++}let a=e.length;for(;a>0&&(a-i)%4!=0;a--)n.includes(e[a])&&i--;const s=Ws(e.substr(0,a));return e=e.substr(a),s},()=>Ws(e))}function Jr(t){return Lu(t.replace(/-/g,"+").replace(/_/g,"/"))}function Ve(t,e){let r=Yr(t).replace(/[\r\n]/g,"");return e&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r}t0?(js=t=>t0.from(t).toString("base64"),Ws=t=>{const e=t0.from(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}):(js=t=>pc.btoa(M.uint8ArrayToString(t)),Ws=t=>M.stringToUint8Array(pc.atob(t)));const ea=Symbol("byValue");var v={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:{rsaEncryptSign:1,rsaEncrypt:2,rsaSign:3,elgamal:16,dsa:17,ecdh:18,ecdsa:19,eddsa:22,aedh:23,aedsa:24},symmetric:{plaintext:0,idea:1,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,experimentalGCM:100},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressedData:8,symmetricallyEncryptedData:9,marker:10,literalData:11,trust:12,userID:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtectedData:18,modificationDetectionCode:19,aeadEncryptedData:20},literal:{binary:98,text:116,utf8:117,mime:109},signature:{binary:0,text:1,standalone:2,certGeneric:16,certPersona:17,certCasual:18,certPositive:19,certRevocation:48,subkeyBinding:24,keyBinding:25,key:31,keyRevocation:32,subkeyRevocation:40,timestamp:64,thirdParty:80},signatureSubpacket:{signatureCreationTime:2,signatureExpirationTime:3,exportableCertification:4,trustSignature:5,regularExpression:6,revocable:7,keyExpirationTime:9,placeholderBackwardsCompatibility:10,preferredSymmetricAlgorithms:11,revocationKey:12,issuer:16,notationData:20,preferredHashAlgorithms:21,preferredCompressionAlgorithms:22,keyServerPreferences:23,preferredKeyServer:24,primaryUserID:25,policyURI:26,keyFlags:27,signersUserID:28,reasonForRevocation:29,features:30,signatureTarget:31,embeddedSignature:32,issuerFingerprint:33,preferredAEADAlgorithms:34},keyFlags:{certifyKeys:1,signData:2,encryptCommunication:4,encryptStorage:8,splitPrivateKey:16,authentication:32,sharedPrivateKey:128},armor:{multipartSection:0,multipartLast:1,signed:2,message:3,publicKey:4,privateKey:5,signature:6},reasonForRevocation:{noReason:0,keySuperseded:1,keyCompromised:2,keyRetired:3,userIDInvalid:32},features:{modificationDetection:1,aead:2,v5Keys:4},write:function(t,e){if(typeof e=="number"&&(e=this.read(t,e)),t[e]!==void 0)return t[e];throw Error("Invalid enum value.")},read:function(t,e){if(t[ea]||(t[ea]=[],Object.entries(t).forEach(([r,i])=>{t[ea][i]=r})),t[ea][e]!==void 0)return t[ea][e];throw Error("Invalid enum value.")}},vt={preferredHashAlgorithm:v.hash.sha256,preferredSymmetricAlgorithm:v.symmetric.aes256,preferredCompressionAlgorithm:v.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:v.aead.eax,aeadChunkSizeByte:12,v5Keys:!1,s2kIterationCountByte:224,allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,checksumRequired:!1,minRSABits:2047,passwordCollisionCheck:!1,revocationsExpire:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([v.symmetric.aes128,v.symmetric.aes192,v.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.7.0-1",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([v.hash.md5,v.hash.ripemd]),rejectMessageHashAlgorithms:new Set([v.hash.md5,v.hash.ripemd,v.hash.sha1]),rejectPublicKeyAlgorithms:new Set([v.publicKey.elgamal,v.publicKey.dsa]),rejectCurves:new Set([v.curve.secp256k1])};function fd(t){const e=t.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!e)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(e[1])?v.armor.multipartSection:/MESSAGE, PART \d+/.test(e[1])?v.armor.multipartLast:/SIGNED MESSAGE/.test(e[1])?v.armor.signed:/MESSAGE/.test(e[1])?v.armor.message:/PUBLIC KEY BLOCK/.test(e[1])?v.armor.publicKey:/PRIVATE KEY BLOCK/.test(e[1])?v.armor.privateKey:/SIGNATURE/.test(e[1])?v.armor.signature:void 0}function Gi(t,e){let r="";return e.showVersion&&(r+="Version: "+e.versionString+`
`),e.showComment&&(r+="Comment: "+e.commentString+`
`),t&&(r+="Comment: "+t+`
`),r+=`
`,r}function _i(t){return Yr(function(e){let r=13501623;return oe(e,i=>{const n=ld?Math.floor(i.length/4):0,a=new Uint32Array(i.buffer,i.byteOffset,n);for(let s=0;s<n;s++)r^=a[s],r=ge[0][r>>24&255]^ge[1][r>>16&255]^ge[2][r>>8&255]^ge[3][r>>0&255];for(let s=4*n;s<i.length;s++)r=r>>8^ge[0][255&r^i[s]]},()=>new Uint8Array([r,r>>8,r>>16]))}(t))}const ge=[Array(255),Array(255),Array(255),Array(255)];for(let t=0;t<=255;t++){let e=t<<16;for(let r=0;r<8;r++)e=e<<1^((8388608&e)!=0?8801531:0);ge[0][t]=(16711680&e)>>16|65280&e|(255&e)<<16}for(let t=0;t<=255;t++)ge[1][t]=ge[0][t]>>8^ge[0][255&ge[0][t]];for(let t=0;t<=255;t++)ge[2][t]=ge[1][t]>>8^ge[0][255&ge[1][t]];for(let t=0;t<=255;t++)ge[3][t]=ge[2][t]>>8^ge[0][255&ge[2][t]];const ld=function(){const t=new ArrayBuffer(2);return new DataView(t).setInt16(0,255,!0),new Int16Array(t)[0]===255}();function bc(t){for(let e=0;e<t.length;e++)/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(t[e])||M.printDebugError(Error("Improperly formatted armor header: "+t[e])),/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(t[e])||M.printDebugError(Error("Unknown header: "+t[e]))}function pd(t){let e=t,r="";const i=t.lastIndexOf("=");return i>=0&&i!==t.length-1&&(e=t.slice(0,i),r=t.slice(i+1).substr(0,4)),{body:e,checksum:r}}function Va(t,e=vt){return new Promise(async(r,i)=>{try{const n=/^-----[^-]+-----$/m,a=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let s;const o=[];let u,c,h,f=o,m=[],b=Lu(ci(t,async(K,I)=>{const U=Nr(K);try{for(;;){let Q=await U.readLine();if(Q===void 0)throw Error("Misformed armored text");if(Q=M.removeTrailingSpaces(Q.replace(/[\r\n]/g,"")),s)if(u)c||s!==2||(n.test(Q)?(m=m.join(`\r
`),c=!0,bc(f),f=[],u=!1):m.push(Q.replace(/^- /,"")));else if(n.test(Q)&&i(Error("Mandatory blank line missing between armor headers and armor data")),a.test(Q)){if(bc(f),u=!0,c||s!==2){r({text:m,data:b,headers:o,type:s});break}}else f.push(Q);else n.test(Q)&&(s=fd(Q))}}catch(Q){return void i(Q)}const G=We(I);try{for(;;){await G.ready;const{done:Q,value:Y}=await U.read();if(Q)throw Error("Misformed armored text");const R=Y+"";if(R.indexOf("=")!==-1||R.indexOf("-")!==-1){let J=await U.readToEnd();J.length||(J=""),J=R+J,J=M.removeTrailingSpaces(J.replace(/\r/g,""));const V=J.split(n);if(V.length===1)throw Error("Misformed armored text");const X=pd(V[0].slice(0,-1));h=X.checksum,await G.write(X.body);break}await G.write(R)}await G.ready,await G.close()}catch(Q){await G.abort(Q)}}));b=ci(b,async(K,I)=>{const U=he(_i(Un(K)));U.catch(()=>{}),await Fi(K,I,{preventClose:!0});const G=We(I);try{const Q=(await U).replace(`
`,"");if(h!==Q&&(h||e.checksumRequired))throw Error("Ascii armor integrity check failed");await G.ready,await G.close()}catch(Q){await G.abort(Q)}})}catch(n){i(n)}}).then(async r=>(ce(r.data)&&(r.data=await he(r.data)),r))}function Za(t,e,r,i,n,a=vt){let s,o;t===v.armor.signed&&(s=e.text,o=e.hash,e=e.data);const u=Un(e),c=[];switch(t){case v.armor.multipartSection:c.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+i+`-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push("-----END PGP MESSAGE, PART "+r+"/"+i+`-----
`);break;case v.armor.multipartLast:c.push("-----BEGIN PGP MESSAGE, PART "+r+`-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push("-----END PGP MESSAGE, PART "+r+`-----
`);break;case v.armor.signed:c.push(`-----BEGIN PGP SIGNED MESSAGE-----
`),c.push("Hash: "+o+`
`),c.push(s.replace(/^-/gm,"- -")),c.push(`
-----BEGIN PGP SIGNATURE-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push(`-----END PGP SIGNATURE-----
`);break;case v.armor.message:c.push(`-----BEGIN PGP MESSAGE-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push(`-----END PGP MESSAGE-----
`);break;case v.armor.publicKey:c.push(`-----BEGIN PGP PUBLIC KEY BLOCK-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push(`-----END PGP PUBLIC KEY BLOCK-----
`);break;case v.armor.privateKey:c.push(`-----BEGIN PGP PRIVATE KEY BLOCK-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push(`-----END PGP PRIVATE KEY BLOCK-----
`);break;case v.armor.signature:c.push(`-----BEGIN PGP SIGNATURE-----
`),c.push(Gi(n,a)),c.push(Yr(e)),c.push("=",_i(u)),c.push(`-----END PGP SIGNATURE-----
`)}return M.concat(c)}class Oi{constructor(){this.bytes=""}read(e){this.bytes=M.uint8ArrayToString(e.subarray(0,8))}write(){return M.stringToUint8Array(this.bytes)}toHex(){return M.uint8ArrayToHex(M.stringToUint8Array(this.bytes))}equals(e,r=!1){return r&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes}isNull(){return this.bytes===""}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(e){return e.toHex()}static fromID(e){const r=new Oi;return r.read(M.hexToUint8Array(e)),r}static wildcard(){const e=new Oi;return e.read(new Uint8Array(8)),e}}var $t=function(){var t,e,r=!1;function i(f,m){var b=t[(e[f]+e[m])%255];return f!==0&&m!==0||(b=0),b}var n,a,s,o,u=!1;function c(){function f(I){var U,G,Q;for(G=Q=function(Y){var R=t[255-e[Y]];return Y===0&&(R=0),R}(I),U=0;U<4;U++)Q^=G=255&(G<<1|G>>>7);return Q^=99}r||function(){t=[],e=[];var I,U,G=1;for(I=0;I<255;I++)t[I]=G,U=128&G,G<<=1,G&=255,U===128&&(G^=27),G^=t[I],e[t[I]]=I;t[255]=t[0],e[0]=0,r=!0}(),n=[],a=[],s=[[],[],[],[]],o=[[],[],[],[]];for(var m=0;m<256;m++){var b=f(m);n[m]=b,a[b]=m,s[0][m]=i(2,b)<<24|b<<16|b<<8|i(3,b),o[0][b]=i(14,m)<<24|i(9,m)<<16|i(13,m)<<8|i(11,m);for(var K=1;K<4;K++)s[K][m]=s[K-1][m]>>>8|s[K-1][m]<<24,o[K][b]=o[K-1][b]>>>8|o[K-1][b]<<24}u=!0}var h=function(f,m){u||c();var b=new Uint32Array(m);b.set(n,512),b.set(a,768);for(var K=0;K<4;K++)b.set(s[K],4096+1024*K>>2),b.set(o[K],8192+1024*K>>2);var I=function(U,G,Q){var Y=0,R=0,J=0,V=0,X=0,d=0,y=0,_=0,g=0,p=0,E=0,D=0,nt=0,st=0,q=0,rt=0,ct=0,lt=0,ut=0,dt=0,wt=0,mt=new U.Uint32Array(Q),B=new U.Uint8Array(Q);function Z(P,S,bt,ht,Pt,Lt,Dt,Ct){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Pt=Pt|0,Lt=Lt|0,Dt=Dt|0,Ct=Ct|0;var Xt=0,zt=0,Ot=0,ue=0,Mt=0,Rt=0,Nt=0,Et=0;for(Xt=bt|1024,zt=bt|2048,Ot=bt|3072,Pt=Pt^mt[(P|0)>>2],Lt=Lt^mt[(P|4)>>2],Dt=Dt^mt[(P|8)>>2],Ct=Ct^mt[(P|12)>>2],Et=16;(Et|0)<=ht<<4;Et=Et+16|0)ue=mt[(bt|Pt>>22&1020)>>2]^mt[(Xt|Lt>>14&1020)>>2]^mt[(zt|Dt>>6&1020)>>2]^mt[(Ot|Ct<<2&1020)>>2]^mt[(P|Et|0)>>2],Mt=mt[(bt|Lt>>22&1020)>>2]^mt[(Xt|Dt>>14&1020)>>2]^mt[(zt|Ct>>6&1020)>>2]^mt[(Ot|Pt<<2&1020)>>2]^mt[(P|Et|4)>>2],Rt=mt[(bt|Dt>>22&1020)>>2]^mt[(Xt|Ct>>14&1020)>>2]^mt[(zt|Pt>>6&1020)>>2]^mt[(Ot|Lt<<2&1020)>>2]^mt[(P|Et|8)>>2],Nt=mt[(bt|Ct>>22&1020)>>2]^mt[(Xt|Pt>>14&1020)>>2]^mt[(zt|Lt>>6&1020)>>2]^mt[(Ot|Dt<<2&1020)>>2]^mt[(P|Et|12)>>2],Pt=ue,Lt=Mt,Dt=Rt,Ct=Nt;Y=mt[(S|Pt>>22&1020)>>2]<<24^mt[(S|Lt>>14&1020)>>2]<<16^mt[(S|Dt>>6&1020)>>2]<<8^mt[(S|Ct<<2&1020)>>2]^mt[(P|Et|0)>>2],R=mt[(S|Lt>>22&1020)>>2]<<24^mt[(S|Dt>>14&1020)>>2]<<16^mt[(S|Ct>>6&1020)>>2]<<8^mt[(S|Pt<<2&1020)>>2]^mt[(P|Et|4)>>2],J=mt[(S|Dt>>22&1020)>>2]<<24^mt[(S|Ct>>14&1020)>>2]<<16^mt[(S|Pt>>6&1020)>>2]<<8^mt[(S|Lt<<2&1020)>>2]^mt[(P|Et|8)>>2],V=mt[(S|Ct>>22&1020)>>2]<<24^mt[(S|Pt>>14&1020)>>2]<<16^mt[(S|Lt>>6&1020)>>2]<<8^mt[(S|Dt<<2&1020)>>2]^mt[(P|Et|12)>>2]}function x(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Z(0,2048,4096,wt,P,S,bt,ht)}function l(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0;var Pt=0;Z(1024,3072,8192,wt,P,ht,bt,S),Pt=R,R=V,V=Pt}function z(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Z(0,2048,4096,wt,X^P,d^S,y^bt,_^ht),X=Y,d=R,y=J,_=V}function et(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0;var Pt=0;Z(1024,3072,8192,wt,P,ht,bt,S),Pt=R,R=V,V=Pt,Y=Y^X,R=R^d,J=J^y,V=V^_,X=P,d=S,y=bt,_=ht}function tt(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Z(0,2048,4096,wt,X,d,y,_),X=Y=Y^P,d=R=R^S,y=J=J^bt,_=V=V^ht}function it(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Z(0,2048,4096,wt,X,d,y,_),Y=Y^P,R=R^S,J=J^bt,V=V^ht,X=P,d=S,y=bt,_=ht}function k(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Z(0,2048,4096,wt,X,d,y,_),X=Y,d=R,y=J,_=V,Y=Y^P,R=R^S,J=J^bt,V=V^ht}function w(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Z(0,2048,4096,wt,g,p,E,D),D=~rt&D|rt&D+1,E=~q&E|q&E+((D|0)==0),p=~st&p|st&p+((E|0)==0),g=~nt&g|nt&g+((p|0)==0),Y=Y^P,R=R^S,J=J^bt,V=V^ht}function A(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0;var Pt=0,Lt=0,Dt=0,Ct=0,Xt=0,zt=0,Ot=0,ue=0,Mt=0,Rt=0;for(P=P^X,S=S^d,bt=bt^y,ht=ht^_,Pt=ct|0,Lt=lt|0,Dt=ut|0,Ct=dt|0;(Mt|0)<128;Mt=Mt+1|0)Pt>>>31&&(Xt=Xt^P,zt=zt^S,Ot=Ot^bt,ue=ue^ht),Pt=Pt<<1|Lt>>>31,Lt=Lt<<1|Dt>>>31,Dt=Dt<<1|Ct>>>31,Ct=Ct<<1,Rt=ht&1,ht=ht>>>1|bt<<31,bt=bt>>>1|S<<31,S=S>>>1|P<<31,P=P>>>1,Rt&&(P=P^3774873600);X=Xt,d=zt,y=Ot,_=ue}function C(P){P=P|0,wt=P}function $(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,Y=P,R=S,J=bt,V=ht}function T(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,X=P,d=S,y=bt,_=ht}function W(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,g=P,p=S,E=bt,D=ht}function yt(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,nt=P,st=S,q=bt,rt=ht}function ft(P,S,bt,ht){P=P|0,S=S|0,bt=bt|0,ht=ht|0,D=~rt&D|rt&ht,E=~q&E|q&bt,p=~st&p|st&S,g=~nt&g|nt&P}function gt(P){return P=P|0,P&15?-1:(B[P|0]=Y>>>24,B[P|1]=Y>>>16&255,B[P|2]=Y>>>8&255,B[P|3]=Y&255,B[P|4]=R>>>24,B[P|5]=R>>>16&255,B[P|6]=R>>>8&255,B[P|7]=R&255,B[P|8]=J>>>24,B[P|9]=J>>>16&255,B[P|10]=J>>>8&255,B[P|11]=J&255,B[P|12]=V>>>24,B[P|13]=V>>>16&255,B[P|14]=V>>>8&255,B[P|15]=V&255,16)}function O(P){return P=P|0,P&15?-1:(B[P|0]=X>>>24,B[P|1]=X>>>16&255,B[P|2]=X>>>8&255,B[P|3]=X&255,B[P|4]=d>>>24,B[P|5]=d>>>16&255,B[P|6]=d>>>8&255,B[P|7]=d&255,B[P|8]=y>>>24,B[P|9]=y>>>16&255,B[P|10]=y>>>8&255,B[P|11]=y&255,B[P|12]=_>>>24,B[P|13]=_>>>16&255,B[P|14]=_>>>8&255,B[P|15]=_&255,16)}function F(){x(0,0,0,0),ct=Y,lt=R,ut=J,dt=V}function j(P,S,bt){P=P|0,S=S|0,bt=bt|0;var ht=0;if(S&15)return-1;for(;(bt|0)>=16;)N[P&7](B[S|0]<<24|B[S|1]<<16|B[S|2]<<8|B[S|3],B[S|4]<<24|B[S|5]<<16|B[S|6]<<8|B[S|7],B[S|8]<<24|B[S|9]<<16|B[S|10]<<8|B[S|11],B[S|12]<<24|B[S|13]<<16|B[S|14]<<8|B[S|15]),B[S|0]=Y>>>24,B[S|1]=Y>>>16&255,B[S|2]=Y>>>8&255,B[S|3]=Y&255,B[S|4]=R>>>24,B[S|5]=R>>>16&255,B[S|6]=R>>>8&255,B[S|7]=R&255,B[S|8]=J>>>24,B[S|9]=J>>>16&255,B[S|10]=J>>>8&255,B[S|11]=J&255,B[S|12]=V>>>24,B[S|13]=V>>>16&255,B[S|14]=V>>>8&255,B[S|15]=V&255,ht=ht+16|0,S=S+16|0,bt=bt-16|0;return ht|0}function L(P,S,bt){P=P|0,S=S|0,bt=bt|0;var ht=0;if(S&15)return-1;for(;(bt|0)>=16;)H[P&1](B[S|0]<<24|B[S|1]<<16|B[S|2]<<8|B[S|3],B[S|4]<<24|B[S|5]<<16|B[S|6]<<8|B[S|7],B[S|8]<<24|B[S|9]<<16|B[S|10]<<8|B[S|11],B[S|12]<<24|B[S|13]<<16|B[S|14]<<8|B[S|15]),ht=ht+16|0,S=S+16|0,bt=bt-16|0;return ht|0}var N=[x,l,z,et,tt,it,k,w],H=[z,A];return{set_rounds:C,set_state:$,set_iv:T,set_nonce:W,set_mask:yt,set_counter:ft,get_state:gt,get_iv:O,gcm_init:F,cipher:j,mac:L}}({Uint8Array,Uint32Array},f,m);return I.set_key=function(U,G,Q,Y,R,J,V,X,d){var y=b.subarray(0,60),_=b.subarray(256,316);y.set([G,Q,Y,R,J,V,X,d]);for(var g=U,p=1;g<4*U+28;g++){var E=y[g-1];(g%U==0||U===8&&g%U==4)&&(E=n[E>>>24]<<24^n[E>>>16&255]<<16^n[E>>>8&255]<<8^n[255&E]),g%U==0&&(E=E<<8^E>>>24^p<<24,p=p<<1^(128&p?27:0)),y[g]=y[g-U]^E}for(var D=0;D<g;D+=4)for(var nt=0;nt<4;nt++)E=y[g-(4+D)+(4-nt)%4],_[D+nt]=D<4||D>=g-4?E:o[0][n[E>>>24]]^o[1][n[E>>>16&255]]^o[2][n[E>>>8&255]]^o[3][n[255&E]];I.set_rounds(U+5)},I};return h.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},h.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},h.MAC={CBC:0,GCM:1},h.HEAP_DATA=16384,h}();function mc(t){return t instanceof Uint8Array}function w1(t,e){const r=t?t.byteLength:e||65536;if(4095&r||r<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return t=t||new Uint8Array(new ArrayBuffer(r))}function rn(t,e,r,i,n){const a=t.length-e,s=a<n?a:n;return t.set(r.subarray(i,i+s),e),s}function $i(...t){const e=t.reduce((n,a)=>n+a.length,0),r=new Uint8Array(e);let i=0;for(let n=0;n<t.length;n++)r.set(t[n],i),i+=t[n].length;return r}class q0 extends Error{constructor(...e){super(...e)}}class ii extends Error{constructor(...e){super(...e)}}class F0 extends Error{constructor(...e){super(...e)}}const gc=[],wc=[];class Ya{constructor(e,r,i=!0,n,a,s){this.pos=0,this.len=0,this.mode=n,this.pos=0,this.len=0,this.key=e,this.iv=r,this.padding=i,this.acquire_asm(a,s)}acquire_asm(e,r){return this.heap!==void 0&&this.asm!==void 0||(this.heap=e||gc.pop()||w1().subarray($t.HEAP_DATA),this.asm=r||wc.pop()||new $t(null,this.heap.buffer),this.reset(this.key,this.iv)),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(gc.push(this.heap),wc.push(this.asm)),this.heap=void 0,this.asm=void 0}reset(e,r){const{asm:i}=this.acquire_asm(),n=e.length;if(n!==16&&n!==24&&n!==32)throw new ii("illegal key size");const a=new DataView(e.buffer,e.byteOffset,e.byteLength);if(i.set_key(n>>2,a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12),n>16?a.getUint32(16):0,n>16?a.getUint32(20):0,n>24?a.getUint32(24):0,n>24?a.getUint32(28):0),r!==void 0){if(r.length!==16)throw new ii("illegal iv size");let s=new DataView(r.buffer,r.byteOffset,r.byteLength);i.set_iv(s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12))}else i.set_iv(0,0,0,0)}AES_Encrypt_process(e){if(!mc(e))throw new TypeError("data isn't of expected type");let{heap:r,asm:i}=this.acquire_asm(),n=$t.ENC[this.mode],a=$t.HEAP_DATA,s=this.pos,o=this.len,u=0,c=e.length||0,h=0,f=0,m=new Uint8Array(o+c&-16);for(;c>0;)f=rn(r,s+o,e,u,c),o+=f,u+=f,c-=f,f=i.cipher(n,a+s,o),f&&m.set(r.subarray(s,s+f),h),h+=f,f<o?(s+=f,o-=f):(s=0,o=0);return this.pos=s,this.len=o,m}AES_Encrypt_finish(){let{heap:e,asm:r}=this.acquire_asm(),i=$t.ENC[this.mode],n=$t.HEAP_DATA,a=this.pos,s=this.len,o=16-s%16,u=s;if(this.hasOwnProperty("padding")){if(this.padding){for(let h=0;h<o;++h)e[a+s+h]=o;s+=o,u=s}else if(s%16)throw new ii("data length must be a multiple of the block size")}else s+=o;const c=new Uint8Array(u);return s&&r.cipher(i,n+a,s),u&&c.set(e.subarray(a,a+u)),this.pos=0,this.len=0,this.release_asm(),c}AES_Decrypt_process(e){if(!mc(e))throw new TypeError("data isn't of expected type");let{heap:r,asm:i}=this.acquire_asm(),n=$t.DEC[this.mode],a=$t.HEAP_DATA,s=this.pos,o=this.len,u=0,c=e.length||0,h=0,f=o+c&-16,m=0,b=0;this.padding&&(m=o+c-f||16,f-=m);const K=new Uint8Array(f);for(;c>0;)b=rn(r,s+o,e,u,c),o+=b,u+=b,c-=b,b=i.cipher(n,a+s,o-(c?0:m)),b&&K.set(r.subarray(s,s+b),h),h+=b,b<o?(s+=b,o-=b):(s=0,o=0);return this.pos=s,this.len=o,K}AES_Decrypt_finish(){let{heap:e,asm:r}=this.acquire_asm(),i=$t.DEC[this.mode],n=$t.HEAP_DATA,a=this.pos,s=this.len,o=s;if(s>0){if(s%16){if(this.hasOwnProperty("padding"))throw new ii("data length must be a multiple of the block size");s+=16-s%16}if(r.cipher(i,n+a,s),this.hasOwnProperty("padding")&&this.padding){let c=e[a+o-1];if(c<1||c>16||c>o)throw new F0("bad padding");let h=0;for(let f=c;f>1;f--)h|=c^e[a+o-f];if(h)throw new F0("bad padding");o-=c}}const u=new Uint8Array(o);return o>0&&u.set(e.subarray(a,a+o)),this.pos=0,this.len=0,this.release_asm(),u}}class Hs{static encrypt(e,r,i=!1){return new Hs(r,i).encrypt(e)}static decrypt(e,r,i=!1){return new Hs(r,i).decrypt(e)}constructor(e,r=!1,i){this.aes=i||new Ya(e,void 0,r,"ECB")}encrypt(e){return $i(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return $i(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function v1(t){const e=function(r){const i=new Hs(r);this.encrypt=function(n){return i.encrypt(n)},this.decrypt=function(n){return i.decrypt(n)}};return e.blockSize=e.prototype.blockSize=16,e.keySize=e.prototype.keySize=t/8,e}function Aa(t,e,r,i,n,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],c=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[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],m=[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],b=[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 K,I,U,G,Q,Y,R,J,V,X,d,y,_,g,p=0,E=e.length;const D=t.length===32?3:9;J=D===3?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&&(e=function(q,rt){const ct=8-q.length%8;let lt;if(rt===2&&ct<8)lt=32;else if(rt===1)lt=ct;else{if(rt||!(ct<8)){if(ct===8)return q;throw Error("des: invalid padding")}lt=0}const ut=new Uint8Array(q.length+ct);for(let dt=0;dt<q.length;dt++)ut[dt]=q[dt];for(let dt=0;dt<ct;dt++)ut[q.length+dt]=lt;return ut}(e,a),E=e.length);let nt=new Uint8Array(E),st=0;for(i===1&&(V=n[p++]<<24|n[p++]<<16|n[p++]<<8|n[p++],d=n[p++]<<24|n[p++]<<16|n[p++]<<8|n[p++],p=0);p<E;){for(Y=e[p++]<<24|e[p++]<<16|e[p++]<<8|e[p++],R=e[p++]<<24|e[p++]<<16|e[p++]<<8|e[p++],i===1&&(r?(Y^=V,R^=d):(X=V,y=d,V=Y,d=R)),U=252645135&(Y>>>4^R),R^=U,Y^=U<<4,U=65535&(Y>>>16^R),R^=U,Y^=U<<16,U=858993459&(R>>>2^Y),Y^=U,R^=U<<2,U=16711935&(R>>>8^Y),Y^=U,R^=U<<8,U=1431655765&(Y>>>1^R),R^=U,Y^=U<<1,Y=Y<<1|Y>>>31,R=R<<1|R>>>31,I=0;I<D;I+=3){for(_=J[I+1],g=J[I+2],K=J[I];K!==_;K+=g)G=R^t[K],Q=(R>>>4|R<<28)^t[K+1],U=Y,Y=R,R=U^(o[G>>>24&63]|c[G>>>16&63]|f[G>>>8&63]|b[63&G]|s[Q>>>24&63]|u[Q>>>16&63]|h[Q>>>8&63]|m[63&Q]);U=Y,Y=R,R=U}Y=Y>>>1|Y<<31,R=R>>>1|R<<31,U=1431655765&(Y>>>1^R),R^=U,Y^=U<<1,U=16711935&(R>>>8^Y),Y^=U,R^=U<<8,U=858993459&(R>>>2^Y),Y^=U,R^=U<<2,U=65535&(Y>>>16^R),R^=U,Y^=U<<16,U=252645135&(Y>>>4^R),R^=U,Y^=U<<4,i===1&&(r?(V=Y,d=R):(Y^=X,R^=y)),nt[st++]=Y>>>24,nt[st++]=Y>>>16&255,nt[st++]=Y>>>8&255,nt[st++]=255&Y,nt[st++]=R>>>24,nt[st++]=R>>>16&255,nt[st++]=R>>>8&255,nt[st++]=255&R}return r||(nt=function(q,rt){let ct,lt=null;if(rt===2)ct=32;else if(rt===1)lt=q[q.length-1];else{if(rt)throw Error("des: invalid padding");ct=0}if(!lt){for(lt=1;q[q.length-lt]===ct;)lt++;lt--}return q.subarray(0,q.length-lt)}(nt,a)),nt}function Sa(t){const e=[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],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],n=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],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],c=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],m=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],b=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],I=t.length>8?3:1,U=Array(32*I),G=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let Q,Y,R,J=0,V=0;for(let X=0;X<I;X++){let d=t[J++]<<24|t[J++]<<16|t[J++]<<8|t[J++],y=t[J++]<<24|t[J++]<<16|t[J++]<<8|t[J++];R=252645135&(d>>>4^y),y^=R,d^=R<<4,R=65535&(y>>>-16^d),d^=R,y^=R<<-16,R=858993459&(d>>>2^y),y^=R,d^=R<<2,R=65535&(y>>>-16^d),d^=R,y^=R<<-16,R=1431655765&(d>>>1^y),y^=R,d^=R<<1,R=16711935&(y>>>8^d),d^=R,y^=R<<8,R=1431655765&(d>>>1^y),y^=R,d^=R<<1,R=d<<8|y>>>20&240,d=y<<24|y<<8&16711680|y>>>8&65280|y>>>24&240,y=R;for(let _=0;_<16;_++)G[_]?(d=d<<2|d>>>26,y=y<<2|y>>>26):(d=d<<1|d>>>27,y=y<<1|y>>>27),d&=-15,y&=-15,Q=e[d>>>28]|r[d>>>24&15]|i[d>>>20&15]|n[d>>>16&15]|a[d>>>12&15]|s[d>>>8&15]|o[d>>>4&15],Y=u[y>>>28]|c[y>>>24&15]|h[y>>>20&15]|f[y>>>16&15]|m[y>>>12&15]|b[y>>>8&15]|K[y>>>4&15],R=65535&(Y>>>16^Q),U[V++]=Q^R,U[V++]=Y^R<<16}return U}function ua(t){this.key=[];for(let e=0;e<3;e++)this.key.push(new Uint8Array(t.subarray(8*e,8*e+8)));this.encrypt=function(e){return Aa(Sa(this.key[2]),Aa(Sa(this.key[1]),Aa(Sa(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function yd(){this.BlockSize=8,this.KeySize=16,this.setKey=function(s){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),s.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(s),!0},this.reset=function(){for(let s=0;s<16;s++)this.masking[s]=0,this.rotate[s]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(s){const o=Array(s.length);for(let u=0;u<s.length;u+=8){let c,h=s[u]<<24|s[u+1]<<16|s[u+2]<<8|s[u+3],f=s[u+4]<<24|s[u+5]<<16|s[u+6]<<8|s[u+7];c=f,f=h^r(f,this.masking[0],this.rotate[0]),h=c,c=f,f=h^i(f,this.masking[1],this.rotate[1]),h=c,c=f,f=h^n(f,this.masking[2],this.rotate[2]),h=c,c=f,f=h^r(f,this.masking[3],this.rotate[3]),h=c,c=f,f=h^i(f,this.masking[4],this.rotate[4]),h=c,c=f,f=h^n(f,this.masking[5],this.rotate[5]),h=c,c=f,f=h^r(f,this.masking[6],this.rotate[6]),h=c,c=f,f=h^i(f,this.masking[7],this.rotate[7]),h=c,c=f,f=h^n(f,this.masking[8],this.rotate[8]),h=c,c=f,f=h^r(f,this.masking[9],this.rotate[9]),h=c,c=f,f=h^i(f,this.masking[10],this.rotate[10]),h=c,c=f,f=h^n(f,this.masking[11],this.rotate[11]),h=c,c=f,f=h^r(f,this.masking[12],this.rotate[12]),h=c,c=f,f=h^i(f,this.masking[13],this.rotate[13]),h=c,c=f,f=h^n(f,this.masking[14],this.rotate[14]),h=c,c=f,f=h^r(f,this.masking[15],this.rotate[15]),h=c,o[u]=f>>>24&255,o[u+1]=f>>>16&255,o[u+2]=f>>>8&255,o[u+3]=255&f,o[u+4]=h>>>24&255,o[u+5]=h>>>16&255,o[u+6]=h>>>8&255,o[u+7]=255&h}return o},this.decrypt=function(s){const o=Array(s.length);for(let u=0;u<s.length;u+=8){let c,h=s[u]<<24|s[u+1]<<16|s[u+2]<<8|s[u+3],f=s[u+4]<<24|s[u+5]<<16|s[u+6]<<8|s[u+7];c=f,f=h^r(f,this.masking[15],this.rotate[15]),h=c,c=f,f=h^n(f,this.masking[14],this.rotate[14]),h=c,c=f,f=h^i(f,this.masking[13],this.rotate[13]),h=c,c=f,f=h^r(f,this.masking[12],this.rotate[12]),h=c,c=f,f=h^n(f,this.masking[11],this.rotate[11]),h=c,c=f,f=h^i(f,this.masking[10],this.rotate[10]),h=c,c=f,f=h^r(f,this.masking[9],this.rotate[9]),h=c,c=f,f=h^n(f,this.masking[8],this.rotate[8]),h=c,c=f,f=h^i(f,this.masking[7],this.rotate[7]),h=c,c=f,f=h^r(f,this.masking[6],this.rotate[6]),h=c,c=f,f=h^n(f,this.masking[5],this.rotate[5]),h=c,c=f,f=h^i(f,this.masking[4],this.rotate[4]),h=c,c=f,f=h^r(f,this.masking[3],this.rotate[3]),h=c,c=f,f=h^n(f,this.masking[2],this.rotate[2]),h=c,c=f,f=h^i(f,this.masking[1],this.rotate[1]),h=c,c=f,f=h^r(f,this.masking[0],this.rotate[0]),h=c,o[u]=f>>>24&255,o[u+1]=f>>>16&255,o[u+2]=f>>>8&255,o[u+3]=255&f,o[u+4]=h>>>24&255,o[u+5]=h>>16&255,o[u+6]=h>>8&255,o[u+7]=255&h}return o};const t=[,,,,];t[0]=[,,,,],t[0][0]=[4,0,13,15,12,14,8],t[0][1]=[5,2,16,18,17,19,10],t[0][2]=[6,3,23,22,21,20,9],t[0][3]=[7,1,26,25,27,24,11],t[1]=[,,,,],t[1][0]=[0,6,21,23,20,22,16],t[1][1]=[1,4,0,2,1,3,18],t[1][2]=[2,5,7,6,5,4,17],t[1][3]=[3,7,10,9,11,8,19],t[2]=[,,,,],t[2][0]=[4,0,13,15,12,14,8],t[2][1]=[5,2,16,18,17,19,10],t[2][2]=[6,3,23,22,21,20,9],t[2][3]=[7,1,26,25,27,24,11],t[3]=[,,,,],t[3][0]=[0,6,21,23,20,22,16],t[3][1]=[1,4,0,2,1,3,18],t[3][2]=[2,5,7,6,5,4,17],t[3][3]=[3,7,10,9,11,8,19];const e=[,,,,];function r(s,o,u){const c=o+s,h=c<<u|c>>>32-u;return(a[0][h>>>24]^a[1][h>>>16&255])-a[2][h>>>8&255]+a[3][255&h]}function i(s,o,u){const c=o^s,h=c<<u|c>>>32-u;return a[0][h>>>24]-a[1][h>>>16&255]+a[2][h>>>8&255]^a[3][255&h]}function n(s,o,u){const c=o-s,h=c<<u|c>>>32-u;return(a[0][h>>>24]+a[1][h>>>16&255]^a[2][h>>>8&255])-a[3][255&h]}e[0]=[,,,,],e[0][0]=[24,25,23,22,18],e[0][1]=[26,27,21,20,22],e[0][2]=[28,29,19,18,25],e[0][3]=[30,31,17,16,28],e[1]=[,,,,],e[1][0]=[3,2,12,13,8],e[1][1]=[1,0,14,15,13],e[1][2]=[7,6,8,9,3],e[1][3]=[5,4,10,11,7],e[2]=[,,,,],e[2][0]=[19,18,28,29,25],e[2][1]=[17,16,30,31,28],e[2][2]=[23,22,24,25,18],e[2][3]=[21,20,26,27,22],e[3]=[,,,,],e[3][0]=[8,9,7,6,3],e[3][1]=[10,11,5,4,7],e[3][2]=[12,13,3,2,8],e[3][3]=[14,15,1,0,13],this.keySchedule=function(s){const o=[,,,,,,,,],u=Array(32);let c;for(let b=0;b<4;b++)c=4*b,o[b]=s[c]<<24|s[c+1]<<16|s[c+2]<<8|s[c+3];const h=[6,7,4,5];let f,m=0;for(let b=0;b<2;b++)for(let K=0;K<4;K++){for(c=0;c<4;c++){const I=t[K][c];f=o[I[1]],f^=a[4][o[I[2]>>>2]>>>24-8*(3&I[2])&255],f^=a[5][o[I[3]>>>2]>>>24-8*(3&I[3])&255],f^=a[6][o[I[4]>>>2]>>>24-8*(3&I[4])&255],f^=a[7][o[I[5]>>>2]>>>24-8*(3&I[5])&255],f^=a[h[c]][o[I[6]>>>2]>>>24-8*(3&I[6])&255],o[I[0]]=f}for(c=0;c<4;c++){const I=e[K][c];f=a[4][o[I[0]>>>2]>>>24-8*(3&I[0])&255],f^=a[5][o[I[1]>>>2]>>>24-8*(3&I[1])&255],f^=a[6][o[I[2]>>>2]>>>24-8*(3&I[2])&255],f^=a[7][o[I[3]>>>2]>>>24-8*(3&I[3])&255],f^=a[4+c][o[I[4]>>>2]>>>24-8*(3&I[4])&255],u[m]=f,m++}}for(let b=0;b<16;b++)this.masking[b]=u[b],this.rotate[b]=31&u[16+b]};const a=[,,,,,,,,];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 ha(t){this.cast5=new yd,this.cast5.setKey(t),this.encrypt=function(e){return this.cast5.encrypt(e)}}ua.keySize=ua.prototype.keySize=24,ua.blockSize=ua.prototype.blockSize=8,ha.blockSize=ha.prototype.blockSize=8,ha.keySize=ha.prototype.keySize=16;const Je=4294967295;function wr(t,e){return(t<<e|t>>>32-e)&Je}function Gr(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function wi(t,e,r){t.splice(e,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function qt(t,e){return t>>>8*e&255}function da(t){this.tf=function(){let e=null,r=null,i=-1,n=[],a=[[],[],[],[]];function s(h){return a[0][qt(h,0)]^a[1][qt(h,1)]^a[2][qt(h,2)]^a[3][qt(h,3)]}function o(h){return a[0][qt(h,3)]^a[1][qt(h,0)]^a[2][qt(h,1)]^a[3][qt(h,2)]}function u(h,f){let m=s(f[0]),b=o(f[1]);f[2]=wr(f[2]^m+b+n[4*h+8]&Je,31),f[3]=wr(f[3],1)^m+2*b+n[4*h+9]&Je,m=s(f[2]),b=o(f[3]),f[0]=wr(f[0]^m+b+n[4*h+10]&Je,31),f[1]=wr(f[1],1)^m+2*b+n[4*h+11]&Je}function c(h,f){let m=s(f[0]),b=o(f[1]);f[2]=wr(f[2],1)^m+b+n[4*h+10]&Je,f[3]=wr(f[3]^m+2*b+n[4*h+11]&Je,31),m=s(f[2]),b=o(f[3]),f[0]=wr(f[0],1)^m+b+n[4*h+8]&Je,f[1]=wr(f[1]^m+2*b+n[4*h+9]&Je,31)}return{name:"twofish",blocksize:16,open:function(h){let f,m,b,K,I;e=h;const U=[],G=[],Q=[];let Y;const R=[];let J,V,X;const d=[[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]],y=[[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]],_=[[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]],g=[[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],D=[[],[]],nt=[[],[],[],[]];function st(ut){return ut^ut>>2^[0,90,180,238][3&ut]}function q(ut){return ut^ut>>1^ut>>2^[0,238,180,90][3&ut]}function rt(ut,dt){let wt,mt,B;for(wt=0;wt<8;wt++)mt=dt>>>24,dt=dt<<8&Je|ut>>>24,ut=ut<<8&Je,B=mt<<1,128&mt&&(B^=333),dt^=mt^B<<16,B^=mt>>>1,1&mt&&(B^=166),dt^=B<<24|B<<8;return dt}function ct(ut,dt){const wt=dt>>4,mt=15&dt,B=d[ut][wt^mt],Z=y[ut][p[mt]^E[wt]];return g[ut][p[Z]^E[B]]<<4|_[ut][B^Z]}function lt(ut,dt){let wt=qt(ut,0),mt=qt(ut,1),B=qt(ut,2),Z=qt(ut,3);switch(Y){case 4:wt=D[1][wt]^qt(dt[3],0),mt=D[0][mt]^qt(dt[3],1),B=D[0][B]^qt(dt[3],2),Z=D[1][Z]^qt(dt[3],3);case 3:wt=D[1][wt]^qt(dt[2],0),mt=D[1][mt]^qt(dt[2],1),B=D[0][B]^qt(dt[2],2),Z=D[0][Z]^qt(dt[2],3);case 2:wt=D[0][D[0][wt]^qt(dt[1],0)]^qt(dt[0],0),mt=D[0][D[1][mt]^qt(dt[1],1)]^qt(dt[0],1),B=D[1][D[0][B]^qt(dt[1],2)]^qt(dt[0],2),Z=D[1][D[1][Z]^qt(dt[1],3)]^qt(dt[0],3)}return nt[0][wt]^nt[1][mt]^nt[2][B]^nt[3][Z]}for(e=e.slice(0,32),f=e.length;f!==16&&f!==24&&f!==32;)e[f++]=0;for(f=0;f<e.length;f+=4)Q[f>>2]=Gr(e,f);for(f=0;f<256;f++)D[0][f]=ct(0,f),D[1][f]=ct(1,f);for(f=0;f<256;f++)J=D[1][f],V=st(J),X=q(J),nt[0][f]=J+(V<<8)+(X<<16)+(X<<24),nt[2][f]=V+(X<<8)+(J<<16)+(X<<24),J=D[0][f],V=st(J),X=q(J),nt[1][f]=X+(X<<8)+(V<<16)+(J<<24),nt[3][f]=V+(J<<8)+(X<<16)+(V<<24);for(Y=Q.length/2,f=0;f<Y;f++)m=Q[f+f],U[f]=m,b=Q[f+f+1],G[f]=b,R[Y-f-1]=rt(m,b);for(f=0;f<40;f+=2)m=16843009*f,b=m+16843009,m=lt(m,U),b=wr(lt(b,G),8),n[f]=m+b&Je,n[f+1]=wr(m+2*b,9);for(f=0;f<256;f++)switch(m=b=K=I=f,Y){case 4:m=D[1][m]^qt(R[3],0),b=D[0][b]^qt(R[3],1),K=D[0][K]^qt(R[3],2),I=D[1][I]^qt(R[3],3);case 3:m=D[1][m]^qt(R[2],0),b=D[1][b]^qt(R[2],1),K=D[0][K]^qt(R[2],2),I=D[0][I]^qt(R[2],3);case 2:a[0][f]=nt[0][D[0][D[0][m]^qt(R[1],0)]^qt(R[0],0)],a[1][f]=nt[1][D[0][D[1][b]^qt(R[1],1)]^qt(R[0],1)],a[2][f]=nt[2][D[1][D[0][K]^qt(R[1],2)]^qt(R[0],2)],a[3][f]=nt[3][D[1][D[1][I]^qt(R[1],3)]^qt(R[0],3)]}},close:function(){n=[],a=[[],[],[],[]]},encrypt:function(h,f){r=h,i=f;const m=[Gr(r,i)^n[0],Gr(r,i+4)^n[1],Gr(r,i+8)^n[2],Gr(r,i+12)^n[3]];for(let b=0;b<8;b++)u(b,m);return wi(r,i,m[2]^n[4]),wi(r,i+4,m[3]^n[5]),wi(r,i+8,m[0]^n[6]),wi(r,i+12,m[1]^n[7]),i+=16,r},decrypt:function(h,f){r=h,i=f;const m=[Gr(r,i)^n[4],Gr(r,i+4)^n[5],Gr(r,i+8)^n[6],Gr(r,i+12)^n[7]];for(let b=7;b>=0;b--)c(b,m);wi(r,i,m[2]^n[0]),wi(r,i+4,m[3]^n[1]),wi(r,i+8,m[0]^n[2]),wi(r,i+12,m[1]^n[3]),i+=16},finalize:function(){return r}}}(),this.tf.open(Array.from(t),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}function nr(){}function fa(t){this.bf=new nr,this.bf.init(t),this.encrypt=function(e){return this.bf.encryptBlock(e)}}da.keySize=da.prototype.keySize=32,da.blockSize=da.prototype.blockSize=16,nr.prototype.BLOCKSIZE=8,nr.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]],nr.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],nr.prototype.NN=16,nr.prototype._clean=function(t){return t<0&&(t=(2147483647&t)+2147483648),t},nr.prototype._F=function(t){let e;const r=255&t,i=255&(t>>>=8),n=255&(t>>>=8),a=255&(t>>>=8);return e=this.sboxes[0][a]+this.sboxes[1][n],e^=this.sboxes[2][i],e+=this.sboxes[3][r],e},nr.prototype._encryptBlock=function(t){let e,r=t[0],i=t[1];for(e=0;e<this.NN;++e){r^=this.parray[e],i=this._F(r)^i;const n=r;r=i,i=n}r^=this.parray[this.NN+0],i^=this.parray[this.NN+1],t[0]=this._clean(i),t[1]=this._clean(r)},nr.prototype.encryptBlock=function(t){let e;const r=[0,0],i=this.BLOCKSIZE/2;for(e=0;e<this.BLOCKSIZE/2;++e)r[0]=r[0]<<8|255&t[e+0],r[1]=r[1]<<8|255&t[e+i];this._encryptBlock(r);const n=[];for(e=0;e<this.BLOCKSIZE/2;++e)n[e+0]=r[0]>>>24-8*e&255,n[e+i]=r[1]>>>24-8*e&255;return n},nr.prototype._decryptBlock=function(t){let e,r=t[0],i=t[1];for(e=this.NN+1;e>1;--e){r^=this.parray[e],i=this._F(r)^i;const n=r;r=i,i=n}r^=this.parray[1],i^=this.parray[0],t[0]=this._clean(i),t[1]=this._clean(r)},nr.prototype.init=function(t){let e,r=0;for(this.parray=[],e=0;e<this.NN+2;++e){let n=0;for(let a=0;a<4;++a)n=n<<8|255&t[r],++r>=t.length&&(r=0);this.parray[e]=this.PARRAY[e]^n}for(this.sboxes=[],e=0;e<4;++e)for(this.sboxes[e]=[],r=0;r<256;++r)this.sboxes[e][r]=this.SBOXES[e][r];const i=[0,0];for(e=0;e<this.NN+2;e+=2)this._encryptBlock(i),this.parray[e+0]=i[0],this.parray[e+1]=i[1];for(e=0;e<4;++e)for(r=0;r<256;r+=2)this._encryptBlock(i),this.sboxes[e][r+0]=i[0],this.sboxes[e][r+1]=i[1]},fa.keySize=fa.prototype.keySize=16,fa.blockSize=fa.prototype.blockSize=8;const bd=v1(128),md=v1(192),gd=v1(256);var Qa=Object.freeze({__proto__:null,aes128:bd,aes192:md,aes256:gd,des:function(t){this.key=t,this.encrypt=function(e,r){return Aa(Sa(this.key),e,!0,0,null,r)},this.decrypt=function(e,r){return Aa(Sa(this.key),e,!1,0,null,r)}},tripledes:ua,cast5:ha,twofish:da,blowfish:fa,idea:function(){throw Error("IDEA symmetric-key algorithm not implemented")}}),Nu=function(t,e,r){var i=0,n=0,a=0,s=0,o=0,u=0,c=0,h=0,f=0,m=0,b=0,K=0,I=0,U=0,G=0,Q=0,Y=0,R=new t.Uint8Array(r);function J(q,rt,ct,lt,ut,dt,wt,mt,B,Z,x,l,z,et,tt,it){q=q|0,rt=rt|0,ct=ct|0,lt=lt|0,ut=ut|0,dt=dt|0,wt=wt|0,mt=mt|0,B=B|0,Z=Z|0,x=x|0,l=l|0,z=z|0,et=et|0,tt=tt|0,it=it|0;var k=0,w=0,A=0,C=0,$=0,T=0,W=0,yt=0,ft=0,gt=0,O=0,F=0,j=0,L=0,N=0,H=0,P=0,S=0,bt=0,ht=0,Pt=0,Lt=0,Dt=0,Ct=0,Xt=0,zt=0,Ot=0,ue=0,Mt=0,Rt=0,Nt=0,Et=0,Bt=0,Zt=0,It=0,at=0,ot=0,pt=0,_t=0,Kt=0,xt=0,St=0,Ht=0,Tt=0,Gt=0,Ie=0,Ue=0,Fe=0,fr=0,lr=0,pr=0,yr=0,br=0,mr=0,gr=0,Wr=0,Hr=0,li=0,pi=0,yi=0,bi=0,mi=0,gi=0,Hi=0,Yo=0,Qo=0,Xo=0,Jo=0,tc=0,ec=0,rc=0;k=i,w=n,A=a,C=s,$=o,W=q+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=rt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=ct+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=lt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=ut+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=dt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=wt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=mt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=B+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=Z+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=x+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=l+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=z+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=et+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=tt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,W=it+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=et^B^ct^q,yt=T<<1|T>>>31,W=yt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=tt^Z^lt^rt,ft=T<<1|T>>>31,W=ft+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=it^x^ut^ct,gt=T<<1|T>>>31,W=gt+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=yt^l^dt^lt,O=T<<1|T>>>31,W=O+(k<<5|k>>>27)+$+(w&A|~w&C)+1518500249|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=ft^z^wt^ut,F=T<<1|T>>>31,W=F+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=gt^et^mt^dt,j=T<<1|T>>>31,W=j+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=O^tt^B^wt,L=T<<1|T>>>31,W=L+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=F^it^Z^mt,N=T<<1|T>>>31,W=N+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=j^yt^x^B,H=T<<1|T>>>31,W=H+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=L^ft^l^Z,P=T<<1|T>>>31,W=P+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=N^gt^z^x,S=T<<1|T>>>31,W=S+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=H^O^et^l,bt=T<<1|T>>>31,W=bt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=P^F^tt^z,ht=T<<1|T>>>31,W=ht+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=S^j^it^et,Pt=T<<1|T>>>31,W=Pt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=bt^L^yt^tt,Lt=T<<1|T>>>31,W=Lt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=ht^N^ft^it,Dt=T<<1|T>>>31,W=Dt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Pt^H^gt^yt,Ct=T<<1|T>>>31,W=Ct+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Lt^P^O^ft,Xt=T<<1|T>>>31,W=Xt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Dt^S^F^gt,zt=T<<1|T>>>31,W=zt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Ct^bt^j^O,Ot=T<<1|T>>>31,W=Ot+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Xt^ht^L^F,ue=T<<1|T>>>31,W=ue+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=zt^Pt^N^j,Mt=T<<1|T>>>31,W=Mt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Ot^Lt^H^L,Rt=T<<1|T>>>31,W=Rt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=ue^Dt^P^N,Nt=T<<1|T>>>31,W=Nt+(k<<5|k>>>27)+$+(w^A^C)+1859775393|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Mt^Ct^S^H,Et=T<<1|T>>>31,W=Et+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Rt^Xt^bt^P,Bt=T<<1|T>>>31,W=Bt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Nt^zt^ht^S,Zt=T<<1|T>>>31,W=Zt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Et^Ot^Pt^bt,It=T<<1|T>>>31,W=It+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Bt^ue^Lt^ht,at=T<<1|T>>>31,W=at+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Zt^Mt^Dt^Pt,ot=T<<1|T>>>31,W=ot+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=It^Rt^Ct^Lt,pt=T<<1|T>>>31,W=pt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=at^Nt^Xt^Dt,_t=T<<1|T>>>31,W=_t+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=ot^Et^zt^Ct,Kt=T<<1|T>>>31,W=Kt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=pt^Bt^Ot^Xt,xt=T<<1|T>>>31,W=xt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=_t^Zt^ue^zt,St=T<<1|T>>>31,W=St+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Kt^It^Mt^Ot,Ht=T<<1|T>>>31,W=Ht+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=xt^at^Rt^ue,Tt=T<<1|T>>>31,W=Tt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=St^ot^Nt^Mt,Gt=T<<1|T>>>31,W=Gt+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Ht^pt^Et^Rt,Ie=T<<1|T>>>31,W=Ie+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Tt^_t^Bt^Nt,Ue=T<<1|T>>>31,W=Ue+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Gt^Kt^Zt^Et,Fe=T<<1|T>>>31,W=Fe+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Ie^xt^It^Bt,fr=T<<1|T>>>31,W=fr+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Ue^St^at^Zt,lr=T<<1|T>>>31,W=lr+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Fe^Ht^ot^It,pr=T<<1|T>>>31,W=pr+(k<<5|k>>>27)+$+(w&A|w&C|A&C)-1894007588|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=fr^Tt^pt^at,yr=T<<1|T>>>31,W=yr+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=lr^Gt^_t^ot,br=T<<1|T>>>31,W=br+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=pr^Ie^Kt^pt,mr=T<<1|T>>>31,W=mr+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=yr^Ue^xt^_t,gr=T<<1|T>>>31,W=gr+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=br^Fe^St^Kt,Wr=T<<1|T>>>31,W=Wr+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=mr^fr^Ht^xt,Hr=T<<1|T>>>31,W=Hr+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=gr^lr^Tt^St,li=T<<1|T>>>31,W=li+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Wr^pr^Gt^Ht,pi=T<<1|T>>>31,W=pi+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Hr^yr^Ie^Tt,yi=T<<1|T>>>31,W=yi+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=li^br^Ue^Gt,bi=T<<1|T>>>31,W=bi+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=pi^mr^Fe^Ie,mi=T<<1|T>>>31,W=mi+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=yi^gr^fr^Ue,gi=T<<1|T>>>31,W=gi+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=bi^Wr^lr^Fe,Hi=T<<1|T>>>31,W=Hi+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=mi^Hr^pr^fr,Yo=T<<1|T>>>31,W=Yo+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=gi^li^yr^lr,Qo=T<<1|T>>>31,W=Qo+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Hi^pi^br^pr,Xo=T<<1|T>>>31,W=Xo+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Yo^yi^mr^yr,Jo=T<<1|T>>>31,W=Jo+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Qo^bi^gr^br,tc=T<<1|T>>>31,W=tc+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Xo^mi^Wr^mr,ec=T<<1|T>>>31,W=ec+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,T=Jo^gi^Hr^gr,rc=T<<1|T>>>31,W=rc+(k<<5|k>>>27)+$+(w^A^C)-899497514|0,$=C,C=A,A=w<<30|w>>>2,w=k,k=W,i=i+k|0,n=n+w|0,a=a+A|0,s=s+C|0,o=o+$|0}function V(q){q=q|0,J(R[q|0]<<24|R[q|1]<<16|R[q|2]<<8|R[q|3],R[q|4]<<24|R[q|5]<<16|R[q|6]<<8|R[q|7],R[q|8]<<24|R[q|9]<<16|R[q|10]<<8|R[q|11],R[q|12]<<24|R[q|13]<<16|R[q|14]<<8|R[q|15],R[q|16]<<24|R[q|17]<<16|R[q|18]<<8|R[q|19],R[q|20]<<24|R[q|21]<<16|R[q|22]<<8|R[q|23],R[q|24]<<24|R[q|25]<<16|R[q|26]<<8|R[q|27],R[q|28]<<24|R[q|29]<<16|R[q|30]<<8|R[q|31],R[q|32]<<24|R[q|33]<<16|R[q|34]<<8|R[q|35],R[q|36]<<24|R[q|37]<<16|R[q|38]<<8|R[q|39],R[q|40]<<24|R[q|41]<<16|R[q|42]<<8|R[q|43],R[q|44]<<24|R[q|45]<<16|R[q|46]<<8|R[q|47],R[q|48]<<24|R[q|49]<<16|R[q|50]<<8|R[q|51],R[q|52]<<24|R[q|53]<<16|R[q|54]<<8|R[q|55],R[q|56]<<24|R[q|57]<<16|R[q|58]<<8|R[q|59],R[q|60]<<24|R[q|61]<<16|R[q|62]<<8|R[q|63])}function X(q){q=q|0,R[q|0]=i>>>24,R[q|1]=i>>>16&255,R[q|2]=i>>>8&255,R[q|3]=i&255,R[q|4]=n>>>24,R[q|5]=n>>>16&255,R[q|6]=n>>>8&255,R[q|7]=n&255,R[q|8]=a>>>24,R[q|9]=a>>>16&255,R[q|10]=a>>>8&255,R[q|11]=a&255,R[q|12]=s>>>24,R[q|13]=s>>>16&255,R[q|14]=s>>>8&255,R[q|15]=s&255,R[q|16]=o>>>24,R[q|17]=o>>>16&255,R[q|18]=o>>>8&255,R[q|19]=o&255}function d(){i=1732584193,n=4023233417,a=2562383102,s=271733878,o=3285377520,u=c=0}function y(q,rt,ct,lt,ut,dt,wt){q=q|0,rt=rt|0,ct=ct|0,lt=lt|0,ut=ut|0,dt=dt|0,wt=wt|0,i=q,n=rt,a=ct,s=lt,o=ut,u=dt,c=wt}function _(q,rt){q=q|0,rt=rt|0;var ct=0;if(q&63)return-1;for(;(rt|0)>=64;)V(q),q=q+64|0,rt=rt-64|0,ct=ct+64|0;return u=u+ct|0,u>>>0<ct>>>0&&(c=c+1|0),ct|0}function g(q,rt,ct){q=q|0,rt=rt|0,ct=ct|0;var lt=0,ut=0;if(q&63||~ct&&ct&31)return-1;if((rt|0)>=64){if(lt=_(q,rt)|0,(lt|0)==-1)return-1;q=q+lt|0,rt=rt-lt|0}if(lt=lt+rt|0,u=u+rt|0,u>>>0<rt>>>0&&(c=c+1|0),R[q|rt]=128,(rt|0)>=56){for(ut=rt+1|0;(ut|0)<64;ut=ut+1|0)R[q|ut]=0;V(q),rt=0,R[q|0]=0}for(ut=rt+1|0;(ut|0)<59;ut=ut+1|0)R[q|ut]=0;return R[q|56]=c>>>21&255,R[q|57]=c>>>13&255,R[q|58]=c>>>5&255,R[q|59]=c<<3&255|u>>>29,R[q|60]=u>>>21&255,R[q|61]=u>>>13&255,R[q|62]=u>>>5&255,R[q|63]=u<<3&255,V(q),~ct&&X(ct),lt|0}function p(){i=h,n=f,a=m,s=b,o=K,u=64,c=0}function E(){i=I,n=U,a=G,s=Q,o=Y,u=64,c=0}function D(q,rt,ct,lt,ut,dt,wt,mt,B,Z,x,l,z,et,tt,it){q=q|0,rt=rt|0,ct=ct|0,lt=lt|0,ut=ut|0,dt=dt|0,wt=wt|0,mt=mt|0,B=B|0,Z=Z|0,x=x|0,l=l|0,z=z|0,et=et|0,tt=tt|0,it=it|0,d(),J(q^1549556828,rt^1549556828,ct^1549556828,lt^1549556828,ut^1549556828,dt^1549556828,wt^1549556828,mt^1549556828,B^1549556828,Z^1549556828,x^1549556828,l^1549556828,z^1549556828,et^1549556828,tt^1549556828,it^1549556828),I=i,U=n,G=a,Q=s,Y=o,d(),J(q^909522486,rt^909522486,ct^909522486,lt^909522486,ut^909522486,dt^909522486,wt^909522486,mt^909522486,B^909522486,Z^909522486,x^909522486,l^909522486,z^909522486,et^909522486,tt^909522486,it^909522486),h=i,f=n,m=a,b=s,K=o,u=64,c=0}function nt(q,rt,ct){q=q|0,rt=rt|0,ct=ct|0;var lt=0,ut=0,dt=0,wt=0,mt=0,B=0;return q&63||~ct&&ct&31?-1:(B=g(q,rt,-1)|0,lt=i,ut=n,dt=a,wt=s,mt=o,E(),J(lt,ut,dt,wt,mt,2147483648,0,0,0,0,0,0,0,0,0,672),~ct&&X(ct),B|0)}function st(q,rt,ct,lt,ut){q=q|0,rt=rt|0,ct=ct|0,lt=lt|0,ut=ut|0;var dt=0,wt=0,mt=0,B=0,Z=0,x=0,l=0,z=0,et=0,tt=0;if(q&63||~ut&&ut&31)return-1;for(R[q+rt|0]=ct>>>24,R[q+rt+1|0]=ct>>>16&255,R[q+rt+2|0]=ct>>>8&255,R[q+rt+3|0]=ct&255,nt(q,rt+4|0,-1)|0,dt=x=i,wt=l=n,mt=z=a,B=et=s,Z=tt=o,lt=lt-1|0;(lt|0)>0;)p(),J(x,l,z,et,tt,2147483648,0,0,0,0,0,0,0,0,0,672),x=i,l=n,z=a,et=s,tt=o,E(),J(x,l,z,et,tt,2147483648,0,0,0,0,0,0,0,0,0,672),x=i,l=n,z=a,et=s,tt=o,dt=dt^i,wt=wt^n,mt=mt^a,B=B^s,Z=Z^o,lt=lt-1|0;return i=dt,n=wt,a=mt,s=B,o=Z,~ut&&X(ut),0}return{reset:d,init:y,process:_,finish:g,hmac_reset:p,hmac_init:D,hmac_finish:nt,pbkdf2_generate_block:st}};class ju{constructor(){this.pos=0,this.len=0}reset(){const{asm:e}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,e.reset(),this}process(e){if(this.result!==null)throw new q0("state must be reset before processing new data");const{asm:r,heap:i}=this.acquire_asm();let n=this.pos,a=this.len,s=0,o=e.length,u=0;for(;o>0;)u=rn(i,n+a,e,s,o),a+=u,s+=u,o-=u,u=r.process(n,a),n+=u,a-=u,a||(n=0);return this.pos=n,this.len=a,this}finish(){if(this.result!==null)throw new q0("state must be reset before processing new data");const{asm:e,heap:r}=this.acquire_asm();return e.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(r.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const vc=[],_c=[];class nn extends ju{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=vc.pop()||w1(),this.asm=_c.pop()||Nu({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(vc.push(this.heap),_c.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return new nn().process(e).finish().result}}nn.NAME="sha1",nn.heap_pool=[],nn.asm_pool=[],nn.asm_function=Nu;const kc=[],Ac=[];class Ro extends ju{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=kc.pop()||w1(),this.asm=Ac.pop()||function(e,r,i){var n=0,a=0,s=0,o=0,u=0,c=0,h=0,f=0,m=0,b=0,K=0,I=0,U=0,G=0,Q=0,Y=0,R=0,J=0,V=0,X=0,d=0,y=0,_=0,g=0,p=0,E=0,D=new e.Uint8Array(i);function nt(x,l,z,et,tt,it,k,w,A,C,$,T,W,yt,ft,gt){x=x|0,l=l|0,z=z|0,et=et|0,tt=tt|0,it=it|0,k=k|0,w=w|0,A=A|0,C=C|0,$=$|0,T=T|0,W=W|0,yt=yt|0,ft=ft|0,gt=gt|0;var O=0,F=0,j=0,L=0,N=0,H=0,P=0,S=0;O=n,F=a,j=s,L=o,N=u,H=c,P=h,S=f,S=x+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+1116352408|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,P=l+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+1899447441|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,H=z+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+3049323471|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,N=et+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+3921009573|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,L=tt+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+961987163|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,j=it+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+1508970993|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,F=k+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+2453635748|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,O=w+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+2870763221|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,S=A+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+3624381080|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,P=C+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+310598401|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,H=$+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+607225278|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,N=T+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+1426881987|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,L=W+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+1925078388|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,j=yt+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+2162078206|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,F=ft+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+2614888103|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,O=gt+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+3248222580|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,x=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+x+C|0,S=x+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+3835390401|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,l=(z>>>7^z>>>18^z>>>3^z<<25^z<<14)+(gt>>>17^gt>>>19^gt>>>10^gt<<15^gt<<13)+l+$|0,P=l+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+4022224774|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,z=(et>>>7^et>>>18^et>>>3^et<<25^et<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+z+T|0,H=z+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+264347078|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,et=(tt>>>7^tt>>>18^tt>>>3^tt<<25^tt<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+et+W|0,N=et+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+604807628|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,tt=(it>>>7^it>>>18^it>>>3^it<<25^it<<14)+(z>>>17^z>>>19^z>>>10^z<<15^z<<13)+tt+yt|0,L=tt+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+770255983|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,it=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(et>>>17^et>>>19^et>>>10^et<<15^et<<13)+it+ft|0,j=it+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+1249150122|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,k=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(tt>>>17^tt>>>19^tt>>>10^tt<<15^tt<<13)+k+gt|0,F=k+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+1555081692|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,w=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(it>>>17^it>>>19^it>>>10^it<<15^it<<13)+w+x|0,O=w+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+1996064986|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,A=(C>>>7^C>>>18^C>>>3^C<<25^C<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+A+l|0,S=A+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+2554220882|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,C=($>>>7^$>>>18^$>>>3^$<<25^$<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+C+z|0,P=C+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+2821834349|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,$=(T>>>7^T>>>18^T>>>3^T<<25^T<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+$+et|0,H=$+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+2952996808|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,T=(W>>>7^W>>>18^W>>>3^W<<25^W<<14)+(C>>>17^C>>>19^C>>>10^C<<15^C<<13)+T+tt|0,N=T+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+3210313671|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,W=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+($>>>17^$>>>19^$>>>10^$<<15^$<<13)+W+it|0,L=W+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+3336571891|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,yt=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(T>>>17^T>>>19^T>>>10^T<<15^T<<13)+yt+k|0,j=yt+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+3584528711|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,ft=(gt>>>7^gt>>>18^gt>>>3^gt<<25^gt<<14)+(W>>>17^W>>>19^W>>>10^W<<15^W<<13)+ft+w|0,F=ft+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+113926993|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,gt=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+gt+A|0,O=gt+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+338241895|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,x=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+x+C|0,S=x+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+666307205|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,l=(z>>>7^z>>>18^z>>>3^z<<25^z<<14)+(gt>>>17^gt>>>19^gt>>>10^gt<<15^gt<<13)+l+$|0,P=l+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+773529912|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,z=(et>>>7^et>>>18^et>>>3^et<<25^et<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+z+T|0,H=z+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+1294757372|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,et=(tt>>>7^tt>>>18^tt>>>3^tt<<25^tt<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+et+W|0,N=et+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+1396182291|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,tt=(it>>>7^it>>>18^it>>>3^it<<25^it<<14)+(z>>>17^z>>>19^z>>>10^z<<15^z<<13)+tt+yt|0,L=tt+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+1695183700|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,it=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(et>>>17^et>>>19^et>>>10^et<<15^et<<13)+it+ft|0,j=it+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+1986661051|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,k=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(tt>>>17^tt>>>19^tt>>>10^tt<<15^tt<<13)+k+gt|0,F=k+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+2177026350|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,w=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(it>>>17^it>>>19^it>>>10^it<<15^it<<13)+w+x|0,O=w+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+2456956037|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,A=(C>>>7^C>>>18^C>>>3^C<<25^C<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+A+l|0,S=A+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+2730485921|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,C=($>>>7^$>>>18^$>>>3^$<<25^$<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+C+z|0,P=C+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+2820302411|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,$=(T>>>7^T>>>18^T>>>3^T<<25^T<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+$+et|0,H=$+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+3259730800|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,T=(W>>>7^W>>>18^W>>>3^W<<25^W<<14)+(C>>>17^C>>>19^C>>>10^C<<15^C<<13)+T+tt|0,N=T+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+3345764771|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,W=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+($>>>17^$>>>19^$>>>10^$<<15^$<<13)+W+it|0,L=W+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+3516065817|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,yt=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(T>>>17^T>>>19^T>>>10^T<<15^T<<13)+yt+k|0,j=yt+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+3600352804|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,ft=(gt>>>7^gt>>>18^gt>>>3^gt<<25^gt<<14)+(W>>>17^W>>>19^W>>>10^W<<15^W<<13)+ft+w|0,F=ft+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+4094571909|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,gt=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+gt+A|0,O=gt+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+275423344|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,x=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+x+C|0,S=x+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+430227734|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,l=(z>>>7^z>>>18^z>>>3^z<<25^z<<14)+(gt>>>17^gt>>>19^gt>>>10^gt<<15^gt<<13)+l+$|0,P=l+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+506948616|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,z=(et>>>7^et>>>18^et>>>3^et<<25^et<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+z+T|0,H=z+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+659060556|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,et=(tt>>>7^tt>>>18^tt>>>3^tt<<25^tt<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+et+W|0,N=et+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+883997877|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,tt=(it>>>7^it>>>18^it>>>3^it<<25^it<<14)+(z>>>17^z>>>19^z>>>10^z<<15^z<<13)+tt+yt|0,L=tt+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+958139571|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,it=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(et>>>17^et>>>19^et>>>10^et<<15^et<<13)+it+ft|0,j=it+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+1322822218|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,k=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(tt>>>17^tt>>>19^tt>>>10^tt<<15^tt<<13)+k+gt|0,F=k+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+1537002063|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,w=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(it>>>17^it>>>19^it>>>10^it<<15^it<<13)+w+x|0,O=w+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+1747873779|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,A=(C>>>7^C>>>18^C>>>3^C<<25^C<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+A+l|0,S=A+S+(N>>>6^N>>>11^N>>>25^N<<26^N<<21^N<<7)+(P^N&(H^P))+1955562222|0,L=L+S|0,S=S+(O&F^j&(O^F))+(O>>>2^O>>>13^O>>>22^O<<30^O<<19^O<<10)|0,C=($>>>7^$>>>18^$>>>3^$<<25^$<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+C+z|0,P=C+P+(L>>>6^L>>>11^L>>>25^L<<26^L<<21^L<<7)+(H^L&(N^H))+2024104815|0,j=j+P|0,P=P+(S&O^F&(S^O))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0,$=(T>>>7^T>>>18^T>>>3^T<<25^T<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+$+et|0,H=$+H+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(N^j&(L^N))+2227730452|0,F=F+H|0,H=H+(P&S^O&(P^S))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0,T=(W>>>7^W>>>18^W>>>3^W<<25^W<<14)+(C>>>17^C>>>19^C>>>10^C<<15^C<<13)+T+tt|0,N=T+N+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(L^F&(j^L))+2361852424|0,O=O+N|0,N=N+(H&P^S&(H^P))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,W=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+($>>>17^$>>>19^$>>>10^$<<15^$<<13)+W+it|0,L=W+L+(O>>>6^O>>>11^O>>>25^O<<26^O<<21^O<<7)+(j^O&(F^j))+2428436474|0,S=S+L|0,L=L+(N&H^P&(N^H))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0,yt=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(T>>>17^T>>>19^T>>>10^T<<15^T<<13)+yt+k|0,j=yt+j+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(F^S&(O^F))+2756734187|0,P=P+j|0,j=j+(L&N^H&(L^N))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0,ft=(gt>>>7^gt>>>18^gt>>>3^gt<<25^gt<<14)+(W>>>17^W>>>19^W>>>10^W<<15^W<<13)+ft+w|0,F=ft+F+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(O^P&(S^O))+3204031479|0,H=H+F|0,F=F+(j&L^N&(j^L))+(j>>>2^j>>>13^j>>>22^j<<30^j<<19^j<<10)|0,gt=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+gt+A|0,O=gt+O+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(S^H&(P^S))+3329325298|0,N=N+O|0,O=O+(F&j^L&(F^j))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,n=n+O|0,a=a+F|0,s=s+j|0,o=o+L|0,u=u+N|0,c=c+H|0,h=h+P|0,f=f+S|0}function st(x){x=x|0,nt(D[x|0]<<24|D[x|1]<<16|D[x|2]<<8|D[x|3],D[x|4]<<24|D[x|5]<<16|D[x|6]<<8|D[x|7],D[x|8]<<24|D[x|9]<<16|D[x|10]<<8|D[x|11],D[x|12]<<24|D[x|13]<<16|D[x|14]<<8|D[x|15],D[x|16]<<24|D[x|17]<<16|D[x|18]<<8|D[x|19],D[x|20]<<24|D[x|21]<<16|D[x|22]<<8|D[x|23],D[x|24]<<24|D[x|25]<<16|D[x|26]<<8|D[x|27],D[x|28]<<24|D[x|29]<<16|D[x|30]<<8|D[x|31],D[x|32]<<24|D[x|33]<<16|D[x|34]<<8|D[x|35],D[x|36]<<24|D[x|37]<<16|D[x|38]<<8|D[x|39],D[x|40]<<24|D[x|41]<<16|D[x|42]<<8|D[x|43],D[x|44]<<24|D[x|45]<<16|D[x|46]<<8|D[x|47],D[x|48]<<24|D[x|49]<<16|D[x|50]<<8|D[x|51],D[x|52]<<24|D[x|53]<<16|D[x|54]<<8|D[x|55],D[x|56]<<24|D[x|57]<<16|D[x|58]<<8|D[x|59],D[x|60]<<24|D[x|61]<<16|D[x|62]<<8|D[x|63])}function q(x){x=x|0,D[x|0]=n>>>24,D[x|1]=n>>>16&255,D[x|2]=n>>>8&255,D[x|3]=n&255,D[x|4]=a>>>24,D[x|5]=a>>>16&255,D[x|6]=a>>>8&255,D[x|7]=a&255,D[x|8]=s>>>24,D[x|9]=s>>>16&255,D[x|10]=s>>>8&255,D[x|11]=s&255,D[x|12]=o>>>24,D[x|13]=o>>>16&255,D[x|14]=o>>>8&255,D[x|15]=o&255,D[x|16]=u>>>24,D[x|17]=u>>>16&255,D[x|18]=u>>>8&255,D[x|19]=u&255,D[x|20]=c>>>24,D[x|21]=c>>>16&255,D[x|22]=c>>>8&255,D[x|23]=c&255,D[x|24]=h>>>24,D[x|25]=h>>>16&255,D[x|26]=h>>>8&255,D[x|27]=h&255,D[x|28]=f>>>24,D[x|29]=f>>>16&255,D[x|30]=f>>>8&255,D[x|31]=f&255}function rt(){n=1779033703,a=3144134277,s=1013904242,o=2773480762,u=1359893119,c=2600822924,h=528734635,f=1541459225,m=b=0}function ct(x,l,z,et,tt,it,k,w,A,C){x=x|0,l=l|0,z=z|0,et=et|0,tt=tt|0,it=it|0,k=k|0,w=w|0,A=A|0,C=C|0,n=x,a=l,s=z,o=et,u=tt,c=it,h=k,f=w,m=A,b=C}function lt(x,l){x=x|0,l=l|0;var z=0;if(x&63)return-1;for(;(l|0)>=64;)st(x),x=x+64|0,l=l-64|0,z=z+64|0;return m=m+z|0,m>>>0<z>>>0&&(b=b+1|0),z|0}function ut(x,l,z){x=x|0,l=l|0,z=z|0;var et=0,tt=0;if(x&63||~z&&z&31)return-1;if((l|0)>=64){if(et=lt(x,l)|0,(et|0)==-1)return-1;x=x+et|0,l=l-et|0}if(et=et+l|0,m=m+l|0,m>>>0<l>>>0&&(b=b+1|0),D[x|l]=128,(l|0)>=56){for(tt=l+1|0;(tt|0)<64;tt=tt+1|0)D[x|tt]=0;st(x),l=0,D[x|0]=0}for(tt=l+1|0;(tt|0)<59;tt=tt+1|0)D[x|tt]=0;return D[x|56]=b>>>21&255,D[x|57]=b>>>13&255,D[x|58]=b>>>5&255,D[x|59]=b<<3&255|m>>>29,D[x|60]=m>>>21&255,D[x|61]=m>>>13&255,D[x|62]=m>>>5&255,D[x|63]=m<<3&255,st(x),~z&&q(z),et|0}function dt(){n=K,a=I,s=U,o=G,u=Q,c=Y,h=R,f=J,m=64,b=0}function wt(){n=V,a=X,s=d,o=y,u=_,c=g,h=p,f=E,m=64,b=0}function mt(x,l,z,et,tt,it,k,w,A,C,$,T,W,yt,ft,gt){x=x|0,l=l|0,z=z|0,et=et|0,tt=tt|0,it=it|0,k=k|0,w=w|0,A=A|0,C=C|0,$=$|0,T=T|0,W=W|0,yt=yt|0,ft=ft|0,gt=gt|0,rt(),nt(x^1549556828,l^1549556828,z^1549556828,et^1549556828,tt^1549556828,it^1549556828,k^1549556828,w^1549556828,A^1549556828,C^1549556828,$^1549556828,T^1549556828,W^1549556828,yt^1549556828,ft^1549556828,gt^1549556828),V=n,X=a,d=s,y=o,_=u,g=c,p=h,E=f,rt(),nt(x^909522486,l^909522486,z^909522486,et^909522486,tt^909522486,it^909522486,k^909522486,w^909522486,A^909522486,C^909522486,$^909522486,T^909522486,W^909522486,yt^909522486,ft^909522486,gt^909522486),K=n,I=a,U=s,G=o,Q=u,Y=c,R=h,J=f,m=64,b=0}function B(x,l,z){x=x|0,l=l|0,z=z|0;var et=0,tt=0,it=0,k=0,w=0,A=0,C=0,$=0,T=0;return x&63||~z&&z&31?-1:(T=ut(x,l,-1)|0,et=n,tt=a,it=s,k=o,w=u,A=c,C=h,$=f,wt(),nt(et,tt,it,k,w,A,C,$,2147483648,0,0,0,0,0,0,768),~z&&q(z),T|0)}function Z(x,l,z,et,tt){x=x|0,l=l|0,z=z|0,et=et|0,tt=tt|0;var it=0,k=0,w=0,A=0,C=0,$=0,T=0,W=0,yt=0,ft=0,gt=0,O=0,F=0,j=0,L=0,N=0;if(x&63||~tt&&tt&31)return-1;for(D[x+l|0]=z>>>24,D[x+l+1|0]=z>>>16&255,D[x+l+2|0]=z>>>8&255,D[x+l+3|0]=z&255,B(x,l+4|0,-1)|0,it=yt=n,k=ft=a,w=gt=s,A=O=o,C=F=u,$=j=c,T=L=h,W=N=f,et=et-1|0;(et|0)>0;)dt(),nt(yt,ft,gt,O,F,j,L,N,2147483648,0,0,0,0,0,0,768),yt=n,ft=a,gt=s,O=o,F=u,j=c,L=h,N=f,wt(),nt(yt,ft,gt,O,F,j,L,N,2147483648,0,0,0,0,0,0,768),yt=n,ft=a,gt=s,O=o,F=u,j=c,L=h,N=f,it=it^n,k=k^a,w=w^s,A=A^o,C=C^u,$=$^c,T=T^h,W=W^f,et=et-1|0;return n=it,a=k,s=w,o=A,u=C,c=$,h=T,f=W,~tt&&q(tt),0}return{reset:rt,init:ct,process:lt,finish:ut,hmac_reset:dt,hmac_init:mt,hmac_finish:B,pbkdf2_generate_block:Z}}({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(kc.push(this.heap),Ac.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(e){return new Ro().process(e).finish().result}}Ro.NAME="sha256";var ji=Wu;function Wu(t,e){if(!t)throw Error(e||"Assertion failed")}Wu.equal=function(t,e,r){if(t!=e)throw Error(r||"Assertion failed: "+t+" != "+e)};var wd=Ye!==void 0?Ye:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jr(t,e){return t(e={exports:{}},e.exports),e.exports}function vd(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ti=jr(function(t){t.exports=typeof Object.create=="function"?function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}),_d=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var i=0;i<t.length;i++){var n=t.charCodeAt(i),a=n>>8,s=255&n;a?r.push(a,s):r.push(s)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},kd=function(t){for(var e="",r=0;r<t.length;r++)e+=Gu(t[r].toString(16));return e};function Hu(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}var Ad=function(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];e==="little"&&(n=Hu(n)),r+=Vu(n.toString(16))}return r};function Gu(t){return t.length===1?"0"+t:t}function Vu(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}var Sd=function(t,e,r,i){var n=r-e;ji(n%4==0);for(var a=Array(n/4),s=0,o=e;s<a.length;s++,o+=4){var u;u=i==="big"?t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3]:t[o+3]<<24|t[o+2]<<16|t[o+1]<<8|t[o],a[s]=u>>>0}return a},Ed=function(t,e){for(var r=Array(4*t.length),i=0,n=0;i<t.length;i++,n+=4){var a=t[i];e==="big"?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r},Ft={inherits:Ti,toArray:_d,toHex:kd,htonl:Hu,toHex32:Ad,zero2:Gu,zero8:Vu,join32:Sd,split32:Ed,rotr32:function(t,e){return t>>>e|t<<32-e},rotl32:function(t,e){return t<<e|t>>>32-e},sum32:function(t,e){return t+e>>>0},sum32_3:function(t,e,r){return t+e+r>>>0},sum32_4:function(t,e,r,i){return t+e+r+i>>>0},sum32_5:function(t,e,r,i,n){return t+e+r+i+n>>>0},sum64:function(t,e,r,i){var n=t[e],a=i+t[e+1]>>>0,s=(a<i?1:0)+r+n;t[e]=s>>>0,t[e+1]=a},sum64_hi:function(t,e,r,i){return(e+i>>>0<e?1:0)+t+r>>>0},sum64_lo:function(t,e,r,i){return e+i>>>0},sum64_4_hi:function(t,e,r,i,n,a,s,o){var u=0,c=e;return u+=(c=c+i>>>0)<e?1:0,u+=(c=c+a>>>0)<a?1:0,t+r+n+s+(u+=(c=c+o>>>0)<o?1:0)>>>0},sum64_4_lo:function(t,e,r,i,n,a,s,o){return e+i+a+o>>>0},sum64_5_hi:function(t,e,r,i,n,a,s,o,u,c){var h=0,f=e;return h+=(f=f+i>>>0)<e?1:0,h+=(f=f+a>>>0)<a?1:0,h+=(f=f+o>>>0)<o?1:0,t+r+n+s+u+(h+=(f=f+c>>>0)<c?1:0)>>>0},sum64_5_lo:function(t,e,r,i,n,a,s,o,u,c){return e+i+a+o+c>>>0},rotr64_hi:function(t,e,r){return(e<<32-r|t>>>r)>>>0},rotr64_lo:function(t,e,r){return(t<<32-r|e>>>r)>>>0},shr64_hi:function(t,e,r){return t>>>r},shr64_lo:function(t,e,r){return(t<<32-r|e>>>r)>>>0}};function Is(){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}var Pd=Is;Is.prototype.update=function(t,e){if(t=Ft.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),this.pending.length===0&&(this.pending=null),t=Ft.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},Is.prototype.digest=function(t){return this.update(this._pad()),ji(this.pending===null),this._digest(t)},Is.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,i=Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(t<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=t>>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,a=8;a<this.padLength;a++)i[n++]=0;return i};var Xa={BlockHash:Pd},vr=Ft.rotr32,xd=function(t,e,r,i){return t===0?Zu(e,r,i):t===1||t===3?Qu(e,r,i):t===2?Yu(e,r,i):void 0};function Zu(t,e,r){return t&e^~t&r}function Yu(t,e,r){return t&e^t&r^e&r}function Qu(t,e,r){return t^e^r}var gn={ft_1:xd,ch32:Zu,maj32:Yu,p32:Qu,s0_256:function(t){return vr(t,2)^vr(t,13)^vr(t,22)},s1_256:function(t){return vr(t,6)^vr(t,11)^vr(t,25)},g0_256:function(t){return vr(t,7)^vr(t,18)^t>>>3},g1_256:function(t){return vr(t,17)^vr(t,19)^t>>>10}},ir=Ft.sum32,Md=Ft.sum32_4,Cd=Ft.sum32_5,Dd=gn.ch32,Kd=gn.maj32,Rd=gn.s0_256,Id=gn.s1_256,Ud=gn.g0_256,Bd=gn.g1_256,Xu=Xa.BlockHash,Td=[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 Pr(){if(!(this instanceof Pr))return new Pr;Xu.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Td,this.W=Array(64)}Ft.inherits(Pr,Xu);var _1=Pr;function ti(){if(!(this instanceof ti))return new ti;_1.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Pr.blockSize=512,Pr.outSize=256,Pr.hmacStrength=192,Pr.padLength=64,Pr.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=Md(Bd(r[i-2]),r[i-7],Ud(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],c=this.h[5],h=this.h[6],f=this.h[7];for(ji(this.k.length===r.length),i=0;i<r.length;i++){var m=Cd(f,Id(u),Dd(u,c,h),this.k[i],r[i]),b=ir(Rd(n),Kd(n,a,s));f=h,h=c,c=u,u=ir(o,m),o=s,s=a,a=n,n=ir(m,b)}this.h[0]=ir(this.h[0],n),this.h[1]=ir(this.h[1],a),this.h[2]=ir(this.h[2],s),this.h[3]=ir(this.h[3],o),this.h[4]=ir(this.h[4],u),this.h[5]=ir(this.h[5],c),this.h[6]=ir(this.h[6],h),this.h[7]=ir(this.h[7],f)},Pr.prototype._digest=function(t){return t==="hex"?Ft.toHex32(this.h,"big"):Ft.split32(this.h,"big")},Ft.inherits(ti,_1);var Ju=ti;ti.blockSize=512,ti.outSize=224,ti.hmacStrength=192,ti.padLength=64,ti.prototype._digest=function(t){return t==="hex"?Ft.toHex32(this.h.slice(0,7),"big"):Ft.split32(this.h.slice(0,7),"big")};var Br=Ft.rotr64_hi,Tr=Ft.rotr64_lo,t3=Ft.shr64_hi,e3=Ft.shr64_lo,vi=Ft.sum64,e0=Ft.sum64_hi,r0=Ft.sum64_lo,zd=Ft.sum64_4_hi,qd=Ft.sum64_4_lo,Fd=Ft.sum64_5_hi,Od=Ft.sum64_5_lo,r3=Xa.BlockHash,$d=[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 ar(){if(!(this instanceof ar))return new ar;r3.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=$d,this.W=Array(160)}Ft.inherits(ar,r3);var Ja=ar;function Ld(t,e,r,i,n){var a=t&r^~t&n;return a<0&&(a+=4294967296),a}function Nd(t,e,r,i,n,a){var s=e&i^~e&a;return s<0&&(s+=4294967296),s}function jd(t,e,r,i,n){var a=t&r^t&n^r&n;return a<0&&(a+=4294967296),a}function Wd(t,e,r,i,n,a){var s=e&i^e&a^i&a;return s<0&&(s+=4294967296),s}function Hd(t,e){var r=Br(t,e,28)^Br(e,t,2)^Br(e,t,7);return r<0&&(r+=4294967296),r}function Gd(t,e){var r=Tr(t,e,28)^Tr(e,t,2)^Tr(e,t,7);return r<0&&(r+=4294967296),r}function Vd(t,e){var r=Br(t,e,14)^Br(t,e,18)^Br(e,t,9);return r<0&&(r+=4294967296),r}function Zd(t,e){var r=Tr(t,e,14)^Tr(t,e,18)^Tr(e,t,9);return r<0&&(r+=4294967296),r}function Yd(t,e){var r=Br(t,e,1)^Br(t,e,8)^t3(t,e,7);return r<0&&(r+=4294967296),r}function Qd(t,e){var r=Tr(t,e,1)^Tr(t,e,8)^e3(t,e,7);return r<0&&(r+=4294967296),r}function Xd(t,e){var r=Br(t,e,19)^Br(e,t,29)^t3(t,e,6);return r<0&&(r+=4294967296),r}function Jd(t,e){var r=Tr(t,e,19)^Tr(e,t,29)^e3(t,e,6);return r<0&&(r+=4294967296),r}function ei(){if(!(this instanceof ei))return new ei;Ja.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}ar.blockSize=1024,ar.outSize=512,ar.hmacStrength=192,ar.padLength=128,ar.prototype._prepareBlock=function(t,e){for(var r=this.W,i=0;i<32;i++)r[i]=t[e+i];for(;i<r.length;i+=2){var n=Xd(r[i-4],r[i-3]),a=Jd(r[i-4],r[i-3]),s=r[i-14],o=r[i-13],u=Yd(r[i-30],r[i-29]),c=Qd(r[i-30],r[i-29]),h=r[i-32],f=r[i-31];r[i]=zd(n,a,s,o,u,c,h,f),r[i+1]=qd(n,a,s,o,u,c,h,f)}},ar.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,i=this.h[0],n=this.h[1],a=this.h[2],s=this.h[3],o=this.h[4],u=this.h[5],c=this.h[6],h=this.h[7],f=this.h[8],m=this.h[9],b=this.h[10],K=this.h[11],I=this.h[12],U=this.h[13],G=this.h[14],Q=this.h[15];ji(this.k.length===r.length);for(var Y=0;Y<r.length;Y+=2){var R=G,J=Q,V=Vd(f,m),X=Zd(f,m),d=Ld(f,m,b,K,I),y=Nd(f,m,b,K,I,U),_=this.k[Y],g=this.k[Y+1],p=r[Y],E=r[Y+1],D=Fd(R,J,V,X,d,y,_,g,p,E),nt=Od(R,J,V,X,d,y,_,g,p,E);R=Hd(i,n),J=Gd(i,n),V=jd(i,n,a,s,o),X=Wd(i,n,a,s,o,u);var st=e0(R,J,V,X),q=r0(R,J,V,X);G=I,Q=U,I=b,U=K,b=f,K=m,f=e0(c,h,D,nt),m=r0(h,h,D,nt),c=o,h=u,o=a,u=s,a=i,s=n,i=e0(D,nt,st,q),n=r0(D,nt,st,q)}vi(this.h,0,i,n),vi(this.h,2,a,s),vi(this.h,4,o,u),vi(this.h,6,c,h),vi(this.h,8,f,m),vi(this.h,10,b,K),vi(this.h,12,I,U),vi(this.h,14,G,Q)},ar.prototype._digest=function(t){return t==="hex"?Ft.toHex32(this.h,"big"):Ft.split32(this.h,"big")},Ft.inherits(ei,Ja);var i3=ei;ei.blockSize=1024,ei.outSize=384,ei.hmacStrength=192,ei.padLength=128,ei.prototype._digest=function(t){return t==="hex"?Ft.toHex32(this.h.slice(0,12),"big"):Ft.split32(this.h.slice(0,12),"big")};var us=Ft.rotl32,Sc=Ft.sum32,ra=Ft.sum32_3,Ec=Ft.sum32_4,n3=Xa.BlockHash;function xr(){if(!(this instanceof xr))return new xr;n3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ft.inherits(xr,n3);var a3=xr;function Pc(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function t5(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function e5(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}xr.blockSize=512,xr.outSize=160,xr.hmacStrength=192,xr.padLength=64,xr.prototype._update=function(t,e){for(var r=this.h[0],i=this.h[1],n=this.h[2],a=this.h[3],s=this.h[4],o=r,u=i,c=n,h=a,f=s,m=0;m<80;m++){var b=Sc(us(Ec(r,Pc(m,i,n,a),t[r5[m]+e],t5(m)),n5[m]),s);r=s,s=a,a=us(n,10),n=i,i=b,b=Sc(us(Ec(o,Pc(79-m,u,c,h),t[i5[m]+e],e5(m)),a5[m]),f),o=f,f=h,h=us(c,10),c=u,u=b}b=ra(this.h[1],n,h),this.h[1]=ra(this.h[2],a,f),this.h[2]=ra(this.h[3],s,o),this.h[3]=ra(this.h[4],r,u),this.h[4]=ra(this.h[0],i,c),this.h[0]=b},xr.prototype._digest=function(t){return t==="hex"?Ft.toHex32(this.h,"little"):Ft.split32(this.h,"little")};var r5=[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],i5=[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],n5=[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],a5=[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],s5={ripemd160:a3};function i0(t,e){let r=t[0],i=t[1],n=t[2],a=t[3];r=Pe(r,i,n,a,e[0],7,-680876936),a=Pe(a,r,i,n,e[1],12,-389564586),n=Pe(n,a,r,i,e[2],17,606105819),i=Pe(i,n,a,r,e[3],22,-1044525330),r=Pe(r,i,n,a,e[4],7,-176418897),a=Pe(a,r,i,n,e[5],12,1200080426),n=Pe(n,a,r,i,e[6],17,-1473231341),i=Pe(i,n,a,r,e[7],22,-45705983),r=Pe(r,i,n,a,e[8],7,1770035416),a=Pe(a,r,i,n,e[9],12,-1958414417),n=Pe(n,a,r,i,e[10],17,-42063),i=Pe(i,n,a,r,e[11],22,-1990404162),r=Pe(r,i,n,a,e[12],7,1804603682),a=Pe(a,r,i,n,e[13],12,-40341101),n=Pe(n,a,r,i,e[14],17,-1502002290),i=Pe(i,n,a,r,e[15],22,1236535329),r=xe(r,i,n,a,e[1],5,-165796510),a=xe(a,r,i,n,e[6],9,-1069501632),n=xe(n,a,r,i,e[11],14,643717713),i=xe(i,n,a,r,e[0],20,-373897302),r=xe(r,i,n,a,e[5],5,-701558691),a=xe(a,r,i,n,e[10],9,38016083),n=xe(n,a,r,i,e[15],14,-660478335),i=xe(i,n,a,r,e[4],20,-405537848),r=xe(r,i,n,a,e[9],5,568446438),a=xe(a,r,i,n,e[14],9,-1019803690),n=xe(n,a,r,i,e[3],14,-187363961),i=xe(i,n,a,r,e[8],20,1163531501),r=xe(r,i,n,a,e[13],5,-1444681467),a=xe(a,r,i,n,e[2],9,-51403784),n=xe(n,a,r,i,e[7],14,1735328473),i=xe(i,n,a,r,e[12],20,-1926607734),r=Me(r,i,n,a,e[5],4,-378558),a=Me(a,r,i,n,e[8],11,-2022574463),n=Me(n,a,r,i,e[11],16,1839030562),i=Me(i,n,a,r,e[14],23,-35309556),r=Me(r,i,n,a,e[1],4,-1530992060),a=Me(a,r,i,n,e[4],11,1272893353),n=Me(n,a,r,i,e[7],16,-155497632),i=Me(i,n,a,r,e[10],23,-1094730640),r=Me(r,i,n,a,e[13],4,681279174),a=Me(a,r,i,n,e[0],11,-358537222),n=Me(n,a,r,i,e[3],16,-722521979),i=Me(i,n,a,r,e[6],23,76029189),r=Me(r,i,n,a,e[9],4,-640364487),a=Me(a,r,i,n,e[12],11,-421815835),n=Me(n,a,r,i,e[15],16,530742520),i=Me(i,n,a,r,e[2],23,-995338651),r=Ce(r,i,n,a,e[0],6,-198630844),a=Ce(a,r,i,n,e[7],10,1126891415),n=Ce(n,a,r,i,e[14],15,-1416354905),i=Ce(i,n,a,r,e[5],21,-57434055),r=Ce(r,i,n,a,e[12],6,1700485571),a=Ce(a,r,i,n,e[3],10,-1894986606),n=Ce(n,a,r,i,e[10],15,-1051523),i=Ce(i,n,a,r,e[1],21,-2054922799),r=Ce(r,i,n,a,e[8],6,1873313359),a=Ce(a,r,i,n,e[15],10,-30611744),n=Ce(n,a,r,i,e[6],15,-1560198380),i=Ce(i,n,a,r,e[13],21,1309151649),r=Ce(r,i,n,a,e[4],6,-145523070),a=Ce(a,r,i,n,e[11],10,-1120210379),n=Ce(n,a,r,i,e[2],15,718787259),i=Ce(i,n,a,r,e[9],21,-343485551),t[0]=Ki(r,t[0]),t[1]=Ki(i,t[1]),t[2]=Ki(n,t[2]),t[3]=Ki(a,t[3])}function Io(t,e,r,i,n,a){return e=Ki(Ki(e,t),Ki(i,a)),Ki(e<<n|e>>>32-n,r)}function Pe(t,e,r,i,n,a,s){return Io(e&r|~e&i,t,e,n,a,s)}function xe(t,e,r,i,n,a,s){return Io(e&i|r&~i,t,e,n,a,s)}function Me(t,e,r,i,n,a,s){return Io(e^r^i,t,e,n,a,s)}function Ce(t,e,r,i,n,a,s){return Io(r^(e|~i),t,e,n,a,s)}function o5(t){const e=[];let r;for(r=0;r<64;r+=4)e[r>>2]=t.charCodeAt(r)+(t.charCodeAt(r+1)<<8)+(t.charCodeAt(r+2)<<16)+(t.charCodeAt(r+3)<<24);return e}const xc="0123456789abcdef".split("");function c5(t){let e="",r=0;for(;r<4;r++)e+=xc[t>>8*r+4&15]+xc[t>>8*r&15];return e}function Ki(t,e){return t+e&4294967295}const Gs=M.getWebCrypto(),Vs=M.getNodeCrypto(),u5=Vs&&Vs.getHashes();function Vi(t){if(Vs&&u5.includes(t))return async function(e){const r=Vs.createHash(t);return oe(e,i=>{r.update(i)},()=>new Uint8Array(r.digest()))}}function hs(t,e){return async function(r,i=vt){if(ce(r)&&(r=await he(r)),!M.isStream(r)&&Gs&&e&&r.length>=i.minBytesForWebCrypto)return new Uint8Array(await Gs.digest(e,r));const n=t();return oe(r,a=>{n.update(a)},()=>new Uint8Array(n.digest()))}}function Mc(t,e){return async function(r,i=vt){if(ce(r)&&(r=await he(r)),M.isStream(r)){const n=new t;return oe(r,a=>{n.process(a)},()=>n.finish().result)}return Gs&&e&&r.length>=i.minBytesForWebCrypto?new Uint8Array(await Gs.digest(e,r)):t.bytes(r)}}const Zi={md5:Vi("md5")||async function(t){const e=function(r){const i=r.length,n=[1732584193,-271733879,-1732584194,271733878];let a;for(a=64;a<=r.length;a+=64)i0(n,o5(r.substring(a-64,a)));r=r.substring(a-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(a=0;a<r.length;a++)s[a>>2]|=r.charCodeAt(a)<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(i0(n,s),a=0;a<16;a++)s[a]=0;return s[14]=8*i,i0(n,s),n}(M.uint8ArrayToString(t));return M.hexToUint8Array(function(r){for(let i=0;i<r.length;i++)r[i]=c5(r[i]);return r.join("")}(e))},sha1:Vi("sha1")||Mc(nn,"SHA-1"),sha224:Vi("sha224")||hs(Ju),sha256:Vi("sha256")||Mc(Ro,"SHA-256"),sha384:Vi("sha384")||hs(i3,"SHA-384"),sha512:Vi("sha512")||hs(Ja,"SHA-512"),ripemd:Vi("ripemd160")||hs(a3)};var Ln={md5:Zi.md5,sha1:Zi.sha1,sha224:Zi.sha224,sha256:Zi.sha256,sha384:Zi.sha384,sha512:Zi.sha512,ripemd:Zi.ripemd,digest:function(t,e){switch(t){case v.hash.md5:return this.md5(e);case v.hash.sha1:return this.sha1(e);case v.hash.ripemd:return this.ripemd(e);case v.hash.sha256:return this.sha256(e);case v.hash.sha384:return this.sha384(e);case v.hash.sha512:return this.sha512(e);case v.hash.sha224:return this.sha224(e);default:throw Error("Invalid hash function.")}},getHashByteLength:function(t){switch(t){case v.hash.md5:return 16;case v.hash.sha1:case v.hash.ripemd:return 20;case v.hash.sha256:return 32;case v.hash.sha384:return 48;case v.hash.sha512:return 64;case v.hash.sha224:return 28;default:throw Error("Invalid hash algorithm.")}}};class Tn{static encrypt(e,r,i){return new Tn(r,i).encrypt(e)}static decrypt(e,r,i){return new Tn(r,i).decrypt(e)}constructor(e,r,i){this.aes=i||new Ya(e,r,!0,"CFB"),delete this.aes.padding}encrypt(e){return $i(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return $i(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}function zi(t){const e=v.read(v.symmetric,t);return Qa[e]}const Cc=M.getWebCrypto(),Zs=M.getNodeCrypto(),Yi=Zs?Zs.getCiphers():[],ds={idea:Yi.includes("idea-cfb")?"idea-cfb":void 0,tripledes:Yi.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,cast5:Yi.includes("cast5-cfb")?"cast5-cfb":void 0,blowfish:Yi.includes("bf-cfb")?"bf-cfb":void 0,aes128:Yi.includes("aes-128-cfb")?"aes-128-cfb":void 0,aes192:Yi.includes("aes-192-cfb")?"aes-192-cfb":void 0,aes256:Yi.includes("aes-256-cfb")?"aes-256-cfb":void 0};var h5=Object.freeze({__proto__:null,encrypt:async function(t,e,r,i,n){const a=v.read(v.symmetric,t);if(M.getNodeCrypto()&&ds[a])return function(f,m,b,K){const I=v.read(v.symmetric,f),U=new Zs.createCipheriv(ds[I],m,K);return oe(b,G=>new Uint8Array(U.update(G)))}(t,e,r,i);if(a.substr(0,3)==="aes")return function(f,m,b,K,I){if(M.getWebCrypto()&&m.length!==24&&!M.isStream(b)&&b.length>=3e3*I.minBytesForWebCrypto)return async function(G,Q,Y,R){const J="AES-CBC",V=await Cc.importKey("raw",Q,{name:J},!1,["encrypt"]),{blockSize:X}=zi(G),d=M.concatUint8Array([new Uint8Array(X),Y]),y=new Uint8Array(await Cc.encrypt({name:J,iv:R},V,d)).subarray(0,Y.length);return function(_,g){for(let p=0;p<_.length;p++)_[p]=_[p]^g[p]}(y,Y),y}(f,m,b,K);const U=new Tn(m,K);return oe(b,G=>U.aes.AES_Encrypt_process(G),()=>U.aes.AES_Encrypt_finish())}(t,e,r,i,n);const s=new(zi(t))(e),o=s.blockSize,u=i.slice();let c=new Uint8Array;const h=f=>{f&&(c=M.concatUint8Array([c,f]));const m=new Uint8Array(c.length);let b,K=0;for(;f?c.length>=o:c.length;){const I=s.encrypt(u);for(b=0;b<o;b++)u[b]=c[b]^I[b],m[K++]=u[b];c=c.subarray(o)}return m.subarray(0,K)};return oe(r,h,h)},decrypt:async function(t,e,r,i){const n=v.read(v.symmetric,t);if(M.getNodeCrypto()&&ds[n])return function(h,f,m,b){const K=v.read(v.symmetric,h),I=new Zs.createDecipheriv(ds[K],f,b);return oe(m,U=>new Uint8Array(I.update(U)))}(t,e,r,i);if(n.substr(0,3)==="aes")return function(h,f,m,b){if(M.isStream(m)){const K=new Tn(f,b);return oe(m,I=>K.aes.AES_Decrypt_process(I),()=>K.aes.AES_Decrypt_finish())}return Tn.decrypt(m,f,b)}(0,e,r,i);const a=new(zi(t))(e),s=a.blockSize;let o=i,u=new Uint8Array;const c=h=>{h&&(u=M.concatUint8Array([u,h]));const f=new Uint8Array(u.length);let m,b=0;for(;h?u.length>=s:u.length;){const K=a.encrypt(o);for(o=u,m=0;m<s;m++)f[b++]=o[m]^K[m];u=u.subarray(s)}return f.subarray(0,b)};return oe(r,c,c)}});class Ys{static encrypt(e,r,i){return new Ys(r,i).encrypt(e)}static decrypt(e,r,i){return new Ys(r,i).encrypt(e)}constructor(e,r,i){this.aes=i||new Ya(e,void 0,!1,"CTR"),delete this.aes.padding,this.AES_CTR_set_options(r)}encrypt(e){return $i(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return $i(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}AES_CTR_set_options(e,r,i){let{asm:n}=this.aes.acquire_asm();if(i!==void 0){if(i<8||i>48)throw new ii("illegal counter size");let a=Math.pow(2,i)-1;n.set_mask(0,0,a/4294967296|0,0|a)}else i=48,n.set_mask(0,0,65535,4294967295);if(e===void 0)throw Error("nonce is required");{let a=e.length;if(!a||a>16)throw new ii("illegal nonce size");let s=new DataView(new ArrayBuffer(16));new Uint8Array(s.buffer).set(e),n.set_nonce(s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12))}if(r!==void 0){if(r<0||r>=Math.pow(2,i))throw new ii("illegal counter value");n.set_counter(0,0,r/4294967296|0,0|r)}}}class Qs{static encrypt(e,r,i=!0,n){return new Qs(r,n,i).encrypt(e)}static decrypt(e,r,i=!0,n){return new Qs(r,n,i).decrypt(e)}constructor(e,r,i=!0,n){this.aes=n||new Ya(e,r,i,"CBC")}encrypt(e){return $i(this.aes.AES_Encrypt_process(e),this.aes.AES_Encrypt_finish())}decrypt(e){return $i(this.aes.AES_Decrypt_process(e),this.aes.AES_Decrypt_finish())}}const Dc=M.getWebCrypto(),d5=M.getNodeCrypto(),Qr=16;function Kc(t,e){const r=t.length-Qr;for(let i=0;i<Qr;i++)t[i+r]^=e[i];return t}const fs=new Uint8Array(Qr);async function f5(t){const e=await async function(n){return M.getWebCrypto()&&n.length!==24?(n=await Dc.importKey("raw",n,{name:"AES-CBC",length:8*n.length},!1,["encrypt"]),async function(a){const s=await Dc.encrypt({name:"AES-CBC",iv:fs,length:8*Qr},n,a);return new Uint8Array(s).subarray(0,s.byteLength-Qr)}):M.getNodeCrypto()?async function(a){const s=new d5.createCipheriv("aes-"+8*n.length+"-cbc",n,fs).update(a);return new Uint8Array(s)}:async function(a){return Qs.encrypt(a,n,!1,fs)}}(t),r=M.double(await e(fs)),i=M.double(r);return async function(n){return(await e(function(a,s,o){if(a.length&&a.length%Qr==0)return Kc(a,s);const u=new Uint8Array(a.length+(Qr-a.length%Qr));return u.set(a),u[a.length]=128,Kc(u,o)}(n,r,i))).subarray(-Qr)}}const Rc=M.getWebCrypto(),l5=M.getNodeCrypto(),p5=M.getNodeBuffer(),ui=16,y5=ui,En=ui,Ic=new Uint8Array(ui),O0=new Uint8Array(ui);O0[ui-1]=1;const $0=new Uint8Array(ui);async function b5(t){const e=await f5(t);return function(r,i){return e(M.concatUint8Array([r,i]))}}async function m5(t){return M.getWebCrypto()&&t.length!==24?(t=await Rc.importKey("raw",t,{name:"AES-CTR",length:8*t.length},!1,["encrypt"]),async function(e,r){const i=await Rc.encrypt({name:"AES-CTR",counter:r,length:8*ui},t,e);return new Uint8Array(i)}):M.getNodeCrypto()?async function(e,r){const i=new l5.createCipheriv("aes-"+8*t.length+"-ctr",t,r),n=p5.concat([i.update(e),i.final()]);return new Uint8Array(n)}:async function(e,r){return Ys.encrypt(e,t,r)}}async function la(t,e){if(t!==v.symmetric.aes128&&t!==v.symmetric.aes192&&t!==v.symmetric.aes256)throw Error("EAX mode supports only AES cipher");const[r,i]=await Promise.all([b5(e),m5(e)]);return{encrypt:async function(n,a,s){const[o,u]=await Promise.all([r(Ic,a),r(O0,s)]),c=await i(n,o),h=await r($0,c);for(let f=0;f<En;f++)h[f]^=u[f]^o[f];return M.concatUint8Array([c,h])},decrypt:async function(n,a,s){if(n.length<En)throw Error("Invalid EAX ciphertext");const o=n.subarray(0,-En),u=n.subarray(-En),[c,h,f]=await Promise.all([r(Ic,a),r(O0,s),r($0,o)]),m=f;for(let b=0;b<En;b++)m[b]^=h[b]^c[b];if(!M.equalsUint8Array(u,m))throw Error("Authentication tag mismatch");return await i(o,c)}}}$0[ui-1]=2,la.getNonce=function(t,e){const r=t.slice();for(let i=0;i<e.length;i++)r[8+i]^=e[i];return r},la.blockLength=ui,la.ivLength=y5,la.tagLength=En;const Te=16,s3=15,ki=16;function Uc(t){let e=0;for(let r=1;(t&r)==0;r<<=1)e++;return e}function Oe(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r];return t}function ls(t,e){return Oe(t.slice(),e)}const n0=new Uint8Array(Te),g5=new Uint8Array([1]);async function pa(t,e){let r,i,n,a=0;function s(o,u,c,h){const f=u.length/Te|0;(function(V,X){const d=M.nbits(Math.max(V.length,X.length)/Te|0)-1;for(let y=a+1;y<=d;y++)n[y]=M.double(n[y-1]);a=d})(u,h);const m=M.concatUint8Array([n0.subarray(0,s3-c.length),g5,c]),b=63&m[Te-1];m[Te-1]&=192;const K=r(m),I=M.concatUint8Array([K,ls(K.subarray(0,8),K.subarray(1,9))]),U=M.shiftRight(I.subarray(0+(b>>3),17+(b>>3)),8-(7&b)).subarray(1),G=new Uint8Array(Te),Q=new Uint8Array(u.length+ki);let Y,R=0;for(Y=0;Y<f;Y++)Oe(U,n[Uc(Y+1)]),Q.set(Oe(o(ls(U,u)),U),R),Oe(G,o===r?u:Q.subarray(R)),u=u.subarray(Te),R+=Te;if(u.length){Oe(U,n.x);const V=r(U);Q.set(ls(u,V),R);const X=new Uint8Array(Te);X.set(o===r?u:Q.subarray(R,-ki),0),X[u.length]=128,Oe(G,X),R+=u.length}const J=Oe(r(Oe(Oe(G,U),n.$)),function(V){if(!V.length)return n0;const X=V.length/Te|0,d=new Uint8Array(Te),y=new Uint8Array(Te);for(let _=0;_<X;_++)Oe(d,n[Uc(_+1)]),Oe(y,r(ls(d,V))),V=V.subarray(Te);if(V.length){Oe(d,n.x);const _=new Uint8Array(Te);_.set(V,0),_[V.length]=128,Oe(_,d),Oe(y,r(_))}return y}(h));return Q.set(J,R),Q}return function(o,u){const c=v.read(v.symmetric,o),h=new Qa[c](u);r=h.encrypt.bind(h),i=h.decrypt.bind(h);const f=r(n0),m=M.double(f);n=[],n[0]=M.double(m),n.x=f,n.$=m}(t,e),{encrypt:async function(o,u,c){return s(r,o,u,c)},decrypt:async function(o,u,c){if(o.length<ki)throw Error("Invalid OCB ciphertext");const h=o.subarray(-ki);o=o.subarray(0,-ki);const f=s(i,o,u,c);if(M.equalsUint8Array(h,f.subarray(-ki)))return f.subarray(0,-ki);throw Error("Authentication tag mismatch")}}}pa.getNonce=function(t,e){const r=t.slice();for(let i=0;i<e.length;i++)r[7+i]^=e[i];return r},pa.blockLength=Te,pa.ivLength=s3,pa.tagLength=ki;const a0=68719476704;class an{constructor(e,r,i,n=16,a){this.tagSize=n,this.gamma0=0,this.counter=1,this.aes=a||new Ya(e,void 0,!1,"CTR");let{asm:s,heap:o}=this.aes.acquire_asm();if(s.gcm_init(),this.tagSize<4||this.tagSize>16)throw new ii("illegal tagSize value");const u=r.length||0,c=new Uint8Array(16);u!==12?(this._gcm_mac_process(r),o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=u>>>29,o[12]=u>>>21&255,o[13]=u>>>13&255,o[14]=u>>>5&255,o[15]=u<<3&255,s.mac($t.MAC.GCM,$t.HEAP_DATA,16),s.get_iv($t.HEAP_DATA),s.set_iv(0,0,0,0),c.set(o.subarray(0,16))):(c.set(r),c[15]=1);const h=new DataView(c.buffer);if(this.gamma0=h.getUint32(12),s.set_nonce(h.getUint32(0),h.getUint32(4),h.getUint32(8),0),s.set_mask(0,0,0,4294967295),i!==void 0){if(i.length>a0)throw new ii("illegal adata length");i.length?(this.adata=i,this._gcm_mac_process(i)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");s.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(e,r,i,n,a){return new an(r,i,n,a).encrypt(e)}static decrypt(e,r,i,n,a){return new an(r,i,n,a).decrypt(e)}encrypt(e){return this.AES_GCM_encrypt(e)}decrypt(e){return this.AES_GCM_decrypt(e)}AES_GCM_Encrypt_process(e){let r=0,i=e.length||0,{asm:n,heap:a}=this.aes.acquire_asm(),s=this.counter,o=this.aes.pos,u=this.aes.len,c=0,h=u+i&-16,f=0;if((s-1<<4)+u+i>a0)throw new RangeError("counter overflow");const m=new Uint8Array(h);for(;i>0;)f=rn(a,o+u,e,r,i),u+=f,r+=f,i-=f,f=n.cipher($t.ENC.CTR,$t.HEAP_DATA+o,u),f=n.mac($t.MAC.GCM,$t.HEAP_DATA+o,f),f&&m.set(a.subarray(o,o+f),c),s+=f>>>4,c+=f,f<u?(o+=f,u-=f):(o=0,u=0);return this.counter=s,this.aes.pos=o,this.aes.len=u,m}AES_GCM_Encrypt_finish(){let{asm:e,heap:r}=this.aes.acquire_asm(),i=this.counter,n=this.tagSize,a=this.adata,s=this.aes.pos,o=this.aes.len;const u=new Uint8Array(o+n);e.cipher($t.ENC.CTR,$t.HEAP_DATA+s,o+15&-16),o&&u.set(r.subarray(s,s+o));let c=o;for(;15&c;c++)r[s+c]=0;e.mac($t.MAC.GCM,$t.HEAP_DATA+s,c);const h=a!==void 0?a.length:0,f=(i-1<<4)+o;return r[0]=0,r[1]=0,r[2]=0,r[3]=h>>>29,r[4]=h>>>21,r[5]=h>>>13&255,r[6]=h>>>5&255,r[7]=h<<3&255,r[8]=r[9]=r[10]=0,r[11]=f>>>29,r[12]=f>>>21&255,r[13]=f>>>13&255,r[14]=f>>>5&255,r[15]=f<<3&255,e.mac($t.MAC.GCM,$t.HEAP_DATA,16),e.get_iv($t.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher($t.ENC.CTR,$t.HEAP_DATA,16),u.set(r.subarray(0,n),o),this.counter=1,this.aes.pos=0,this.aes.len=0,u}AES_GCM_Decrypt_process(e){let r=0,i=e.length||0,{asm:n,heap:a}=this.aes.acquire_asm(),s=this.counter,o=this.tagSize,u=this.aes.pos,c=this.aes.len,h=0,f=c+i>o?c+i-o&-16:0,m=c+i-f,b=0;if((s-1<<4)+c+i>a0)throw new RangeError("counter overflow");const K=new Uint8Array(f);for(;i>m;)b=rn(a,u+c,e,r,i-m),c+=b,r+=b,i-=b,b=n.mac($t.MAC.GCM,$t.HEAP_DATA+u,b),b=n.cipher($t.DEC.CTR,$t.HEAP_DATA+u,b),b&&K.set(a.subarray(u,u+b),h),s+=b>>>4,h+=b,u=0,c=0;return i>0&&(c+=rn(a,0,e,r,i)),this.counter=s,this.aes.pos=u,this.aes.len=c,K}AES_GCM_Decrypt_finish(){let{asm:e,heap:r}=this.aes.acquire_asm(),i=this.tagSize,n=this.adata,a=this.counter,s=this.aes.pos,o=this.aes.len,u=o-i;if(o<i)throw new q0("authentication tag not found");const c=new Uint8Array(u),h=new Uint8Array(r.subarray(s+u,s+o));let f=u;for(;15&f;f++)r[s+f]=0;e.mac($t.MAC.GCM,$t.HEAP_DATA+s,f),e.cipher($t.DEC.CTR,$t.HEAP_DATA+s,f),u&&c.set(r.subarray(s,s+u));const m=n!==void 0?n.length:0,b=(a-1<<4)+o-i;r[0]=0,r[1]=0,r[2]=0,r[3]=m>>>29,r[4]=m>>>21,r[5]=m>>>13&255,r[6]=m>>>5&255,r[7]=m<<3&255,r[8]=r[9]=r[10]=0,r[11]=b>>>29,r[12]=b>>>21&255,r[13]=b>>>13&255,r[14]=b>>>5&255,r[15]=b<<3&255,e.mac($t.MAC.GCM,$t.HEAP_DATA,16),e.get_iv($t.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher($t.ENC.CTR,$t.HEAP_DATA,16);let K=0;for(let I=0;I<i;++I)K|=h[I]^r[I];if(K)throw new F0("data integrity check failed");return this.counter=1,this.aes.pos=0,this.aes.len=0,c}AES_GCM_decrypt(e){const r=this.AES_GCM_Decrypt_process(e),i=this.AES_GCM_Decrypt_finish(),n=new Uint8Array(r.length+i.length);return r.length&&n.set(r),i.length&&n.set(i,r.length),n}AES_GCM_encrypt(e){const r=this.AES_GCM_Encrypt_process(e),i=this.AES_GCM_Encrypt_finish(),n=new Uint8Array(r.length+i.length);return r.length&&n.set(r),i.length&&n.set(i,r.length),n}_gcm_mac_process(e){let{asm:r,heap:i}=this.aes.acquire_asm(),n=0,a=e.length||0,s=0;for(;a>0;){for(s=rn(i,0,e,n,a),n+=s,a-=s;15&s;)i[s++]=0;r.mac($t.MAC.GCM,$t.HEAP_DATA,s)}}}const s0=M.getWebCrypto(),Bc=M.getNodeCrypto(),Tc=M.getNodeBuffer(),Pn=16,o0="AES-GCM";async function Cn(t,e){if(t!==v.symmetric.aes128&&t!==v.symmetric.aes192&&t!==v.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(M.getWebCrypto()&&e.length!==24){const r=await s0.importKey("raw",e,{name:o0},!1,["encrypt","decrypt"]);return{encrypt:async function(i,n,a=new Uint8Array){if(!i.length)return an.encrypt(i,e,n,a);const s=await s0.encrypt({name:o0,iv:n,additionalData:a,tagLength:8*Pn},r,i);return new Uint8Array(s)},decrypt:async function(i,n,a=new Uint8Array){if(i.length===Pn)return an.decrypt(i,e,n,a);const s=await s0.decrypt({name:o0,iv:n,additionalData:a,tagLength:8*Pn},r,i);return new Uint8Array(s)}}}return M.getNodeCrypto()?{encrypt:async function(r,i,n=new Uint8Array){const a=new Bc.createCipheriv("aes-"+8*e.length+"-gcm",e,i);a.setAAD(n);const s=Tc.concat([a.update(r),a.final(),a.getAuthTag()]);return new Uint8Array(s)},decrypt:async function(r,i,n=new Uint8Array){const a=new Bc.createDecipheriv("aes-"+8*e.length+"-gcm",e,i);a.setAAD(n),a.setAuthTag(r.slice(r.length-Pn,r.length));const s=Tc.concat([a.update(r.slice(0,r.length-Pn)),a.final()]);return new Uint8Array(s)}}:{encrypt:async function(r,i,n){return an.encrypt(r,e,i,n)},decrypt:async function(r,i,n){return an.decrypt(r,e,i,n)}}}Cn.getNonce=function(t,e){const r=t.slice();for(let i=0;i<e.length;i++)r[4+i]^=e[i];return r},Cn.blockLength=16,Cn.ivLength=12,Cn.tagLength=Pn;var o3={cfb:h5,gcm:Cn,experimentalGCM:Cn,eax:la,ocb:pa},zr=jr(function(t){(function(e){var r=function(B){var Z,x=new Float64Array(16);if(B)for(Z=0;Z<B.length;Z++)x[Z]=B[Z];return x},i=function(){throw Error("no PRNG")},n=new Uint8Array(32);n[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]),c=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=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]),m=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(B,Z,x,l){return function(z,et,tt,it,k){var w,A=0;for(w=0;w<k;w++)A|=z[et+w]^tt[it+w];return(1&A-1>>>8)-1}(B,Z,x,l,32)}function K(B,Z){var x;for(x=0;x<16;x++)B[x]=0|Z[x]}function I(B){var Z,x,l=1;for(Z=0;Z<16;Z++)x=B[Z]+l+65535,l=Math.floor(x/65536),B[Z]=x-65536*l;B[0]+=l-1+37*(l-1)}function U(B,Z,x){for(var l,z=~(x-1),et=0;et<16;et++)l=z&(B[et]^Z[et]),B[et]^=l,Z[et]^=l}function G(B,Z){var x,l,z,et=r(),tt=r();for(x=0;x<16;x++)tt[x]=Z[x];for(I(tt),I(tt),I(tt),l=0;l<2;l++){for(et[0]=tt[0]-65517,x=1;x<15;x++)et[x]=tt[x]-65535-(et[x-1]>>16&1),et[x-1]&=65535;et[15]=tt[15]-32767-(et[14]>>16&1),z=et[15]>>16&1,et[14]&=65535,U(tt,et,1-z)}for(x=0;x<16;x++)B[2*x]=255&tt[x],B[2*x+1]=tt[x]>>8}function Q(B,Z){var x=new Uint8Array(32),l=new Uint8Array(32);return G(x,B),G(l,Z),b(x,0,l,0)}function Y(B){var Z=new Uint8Array(32);return G(Z,B),1&Z[0]}function R(B,Z){var x;for(x=0;x<16;x++)B[x]=Z[2*x]+(Z[2*x+1]<<8);B[15]&=32767}function J(B,Z,x){for(var l=0;l<16;l++)B[l]=Z[l]+x[l]}function V(B,Z,x){for(var l=0;l<16;l++)B[l]=Z[l]-x[l]}function X(B,Z,x){var l,z,et=0,tt=0,it=0,k=0,w=0,A=0,C=0,$=0,T=0,W=0,yt=0,ft=0,gt=0,O=0,F=0,j=0,L=0,N=0,H=0,P=0,S=0,bt=0,ht=0,Pt=0,Lt=0,Dt=0,Ct=0,Xt=0,zt=0,Ot=0,ue=0,Mt=x[0],Rt=x[1],Nt=x[2],Et=x[3],Bt=x[4],Zt=x[5],It=x[6],at=x[7],ot=x[8],pt=x[9],_t=x[10],Kt=x[11],xt=x[12],St=x[13],Ht=x[14],Tt=x[15];et+=(l=Z[0])*Mt,tt+=l*Rt,it+=l*Nt,k+=l*Et,w+=l*Bt,A+=l*Zt,C+=l*It,$+=l*at,T+=l*ot,W+=l*pt,yt+=l*_t,ft+=l*Kt,gt+=l*xt,O+=l*St,F+=l*Ht,j+=l*Tt,tt+=(l=Z[1])*Mt,it+=l*Rt,k+=l*Nt,w+=l*Et,A+=l*Bt,C+=l*Zt,$+=l*It,T+=l*at,W+=l*ot,yt+=l*pt,ft+=l*_t,gt+=l*Kt,O+=l*xt,F+=l*St,j+=l*Ht,L+=l*Tt,it+=(l=Z[2])*Mt,k+=l*Rt,w+=l*Nt,A+=l*Et,C+=l*Bt,$+=l*Zt,T+=l*It,W+=l*at,yt+=l*ot,ft+=l*pt,gt+=l*_t,O+=l*Kt,F+=l*xt,j+=l*St,L+=l*Ht,N+=l*Tt,k+=(l=Z[3])*Mt,w+=l*Rt,A+=l*Nt,C+=l*Et,$+=l*Bt,T+=l*Zt,W+=l*It,yt+=l*at,ft+=l*ot,gt+=l*pt,O+=l*_t,F+=l*Kt,j+=l*xt,L+=l*St,N+=l*Ht,H+=l*Tt,w+=(l=Z[4])*Mt,A+=l*Rt,C+=l*Nt,$+=l*Et,T+=l*Bt,W+=l*Zt,yt+=l*It,ft+=l*at,gt+=l*ot,O+=l*pt,F+=l*_t,j+=l*Kt,L+=l*xt,N+=l*St,H+=l*Ht,P+=l*Tt,A+=(l=Z[5])*Mt,C+=l*Rt,$+=l*Nt,T+=l*Et,W+=l*Bt,yt+=l*Zt,ft+=l*It,gt+=l*at,O+=l*ot,F+=l*pt,j+=l*_t,L+=l*Kt,N+=l*xt,H+=l*St,P+=l*Ht,S+=l*Tt,C+=(l=Z[6])*Mt,$+=l*Rt,T+=l*Nt,W+=l*Et,yt+=l*Bt,ft+=l*Zt,gt+=l*It,O+=l*at,F+=l*ot,j+=l*pt,L+=l*_t,N+=l*Kt,H+=l*xt,P+=l*St,S+=l*Ht,bt+=l*Tt,$+=(l=Z[7])*Mt,T+=l*Rt,W+=l*Nt,yt+=l*Et,ft+=l*Bt,gt+=l*Zt,O+=l*It,F+=l*at,j+=l*ot,L+=l*pt,N+=l*_t,H+=l*Kt,P+=l*xt,S+=l*St,bt+=l*Ht,ht+=l*Tt,T+=(l=Z[8])*Mt,W+=l*Rt,yt+=l*Nt,ft+=l*Et,gt+=l*Bt,O+=l*Zt,F+=l*It,j+=l*at,L+=l*ot,N+=l*pt,H+=l*_t,P+=l*Kt,S+=l*xt,bt+=l*St,ht+=l*Ht,Pt+=l*Tt,W+=(l=Z[9])*Mt,yt+=l*Rt,ft+=l*Nt,gt+=l*Et,O+=l*Bt,F+=l*Zt,j+=l*It,L+=l*at,N+=l*ot,H+=l*pt,P+=l*_t,S+=l*Kt,bt+=l*xt,ht+=l*St,Pt+=l*Ht,Lt+=l*Tt,yt+=(l=Z[10])*Mt,ft+=l*Rt,gt+=l*Nt,O+=l*Et,F+=l*Bt,j+=l*Zt,L+=l*It,N+=l*at,H+=l*ot,P+=l*pt,S+=l*_t,bt+=l*Kt,ht+=l*xt,Pt+=l*St,Lt+=l*Ht,Dt+=l*Tt,ft+=(l=Z[11])*Mt,gt+=l*Rt,O+=l*Nt,F+=l*Et,j+=l*Bt,L+=l*Zt,N+=l*It,H+=l*at,P+=l*ot,S+=l*pt,bt+=l*_t,ht+=l*Kt,Pt+=l*xt,Lt+=l*St,Dt+=l*Ht,Ct+=l*Tt,gt+=(l=Z[12])*Mt,O+=l*Rt,F+=l*Nt,j+=l*Et,L+=l*Bt,N+=l*Zt,H+=l*It,P+=l*at,S+=l*ot,bt+=l*pt,ht+=l*_t,Pt+=l*Kt,Lt+=l*xt,Dt+=l*St,Ct+=l*Ht,Xt+=l*Tt,O+=(l=Z[13])*Mt,F+=l*Rt,j+=l*Nt,L+=l*Et,N+=l*Bt,H+=l*Zt,P+=l*It,S+=l*at,bt+=l*ot,ht+=l*pt,Pt+=l*_t,Lt+=l*Kt,Dt+=l*xt,Ct+=l*St,Xt+=l*Ht,zt+=l*Tt,F+=(l=Z[14])*Mt,j+=l*Rt,L+=l*Nt,N+=l*Et,H+=l*Bt,P+=l*Zt,S+=l*It,bt+=l*at,ht+=l*ot,Pt+=l*pt,Lt+=l*_t,Dt+=l*Kt,Ct+=l*xt,Xt+=l*St,zt+=l*Ht,Ot+=l*Tt,j+=(l=Z[15])*Mt,tt+=38*(N+=l*Nt),it+=38*(H+=l*Et),k+=38*(P+=l*Bt),w+=38*(S+=l*Zt),A+=38*(bt+=l*It),C+=38*(ht+=l*at),$+=38*(Pt+=l*ot),T+=38*(Lt+=l*pt),W+=38*(Dt+=l*_t),yt+=38*(Ct+=l*Kt),ft+=38*(Xt+=l*xt),gt+=38*(zt+=l*St),O+=38*(Ot+=l*Ht),F+=38*(ue+=l*Tt),et=(l=(et+=38*(L+=l*Rt))+(z=1)+65535)-65536*(z=Math.floor(l/65536)),tt=(l=tt+z+65535)-65536*(z=Math.floor(l/65536)),it=(l=it+z+65535)-65536*(z=Math.floor(l/65536)),k=(l=k+z+65535)-65536*(z=Math.floor(l/65536)),w=(l=w+z+65535)-65536*(z=Math.floor(l/65536)),A=(l=A+z+65535)-65536*(z=Math.floor(l/65536)),C=(l=C+z+65535)-65536*(z=Math.floor(l/65536)),$=(l=$+z+65535)-65536*(z=Math.floor(l/65536)),T=(l=T+z+65535)-65536*(z=Math.floor(l/65536)),W=(l=W+z+65535)-65536*(z=Math.floor(l/65536)),yt=(l=yt+z+65535)-65536*(z=Math.floor(l/65536)),ft=(l=ft+z+65535)-65536*(z=Math.floor(l/65536)),gt=(l=gt+z+65535)-65536*(z=Math.floor(l/65536)),O=(l=O+z+65535)-65536*(z=Math.floor(l/65536)),F=(l=F+z+65535)-65536*(z=Math.floor(l/65536)),j=(l=j+z+65535)-65536*(z=Math.floor(l/65536)),et=(l=(et+=z-1+37*(z-1))+(z=1)+65535)-65536*(z=Math.floor(l/65536)),tt=(l=tt+z+65535)-65536*(z=Math.floor(l/65536)),it=(l=it+z+65535)-65536*(z=Math.floor(l/65536)),k=(l=k+z+65535)-65536*(z=Math.floor(l/65536)),w=(l=w+z+65535)-65536*(z=Math.floor(l/65536)),A=(l=A+z+65535)-65536*(z=Math.floor(l/65536)),C=(l=C+z+65535)-65536*(z=Math.floor(l/65536)),$=(l=$+z+65535)-65536*(z=Math.floor(l/65536)),T=(l=T+z+65535)-65536*(z=Math.floor(l/65536)),W=(l=W+z+65535)-65536*(z=Math.floor(l/65536)),yt=(l=yt+z+65535)-65536*(z=Math.floor(l/65536)),ft=(l=ft+z+65535)-65536*(z=Math.floor(l/65536)),gt=(l=gt+z+65535)-65536*(z=Math.floor(l/65536)),O=(l=O+z+65535)-65536*(z=Math.floor(l/65536)),F=(l=F+z+65535)-65536*(z=Math.floor(l/65536)),j=(l=j+z+65535)-65536*(z=Math.floor(l/65536)),et+=z-1+37*(z-1),B[0]=et,B[1]=tt,B[2]=it,B[3]=k,B[4]=w,B[5]=A,B[6]=C,B[7]=$,B[8]=T,B[9]=W,B[10]=yt,B[11]=ft,B[12]=gt,B[13]=O,B[14]=F,B[15]=j}function d(B,Z){X(B,Z,Z)}function y(B,Z){var x,l=r();for(x=0;x<16;x++)l[x]=Z[x];for(x=253;x>=0;x--)d(l,l),x!==2&&x!==4&&X(l,l,Z);for(x=0;x<16;x++)B[x]=l[x]}function _(B,Z,x){var l,z,et=new Uint8Array(32),tt=new Float64Array(80),it=r(),k=r(),w=r(),A=r(),C=r(),$=r();for(z=0;z<31;z++)et[z]=Z[z];for(et[31]=127&Z[31]|64,et[0]&=248,R(tt,x),z=0;z<16;z++)k[z]=tt[z],A[z]=it[z]=w[z]=0;for(it[0]=A[0]=1,z=254;z>=0;--z)U(it,k,l=et[z>>>3]>>>(7&z)&1),U(w,A,l),J(C,it,w),V(it,it,w),J(w,k,A),V(k,k,A),d(A,C),d($,it),X(it,w,it),X(w,k,C),J(C,it,w),V(it,it,w),d(k,it),V(w,A,$),X(it,w,o),J(it,it,A),X(w,w,it),X(it,A,$),X(A,k,tt),d(k,C),U(it,k,l),U(w,A,l);for(z=0;z<16;z++)tt[z+16]=it[z],tt[z+32]=w[z],tt[z+48]=k[z],tt[z+64]=A[z];var T=tt.subarray(32),W=tt.subarray(16);return y(T,T),X(W,W,T),G(B,W),0}function g(B,Z){return _(B,Z,n)}function p(B,Z){var x=r(),l=r(),z=r(),et=r(),tt=r(),it=r(),k=r(),w=r(),A=r();V(x,B[1],B[0]),V(A,Z[1],Z[0]),X(x,x,A),J(l,B[0],B[1]),J(A,Z[0],Z[1]),X(l,l,A),X(z,B[3],Z[3]),X(z,z,c),X(et,B[2],Z[2]),J(et,et,et),V(tt,l,x),V(it,et,z),J(k,et,z),J(w,l,x),X(B[0],tt,it),X(B[1],w,k),X(B[2],k,it),X(B[3],tt,w)}function E(B,Z,x){var l;for(l=0;l<4;l++)U(B[l],Z[l],x)}function D(B,Z){var x=r(),l=r(),z=r();y(z,Z[2]),X(x,Z[0],z),X(l,Z[1],z),G(B,l),B[31]^=Y(x)<<7}function nt(B,Z,x){var l,z;for(K(B[0],a),K(B[1],s),K(B[2],s),K(B[3],a),z=255;z>=0;--z)E(B,Z,l=x[z/8|0]>>(7&z)&1),p(Z,B),p(B,B),E(B,Z,l)}function st(B,Z){var x=[r(),r(),r(),r()];K(x[0],h),K(x[1],f),K(x[2],s),X(x[3],h,f),nt(B,x,Z)}function q(B,Z,x){var l,z,et=[r(),r(),r(),r()];for(x||i(Z,32),(l=e.hash(Z.subarray(0,32)))[0]&=248,l[31]&=127,l[31]|=64,st(et,l),D(B,et),z=0;z<32;z++)Z[z+32]=B[z];return 0}var rt=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 ct(B,Z){var x,l,z,et;for(l=63;l>=32;--l){for(x=0,z=l-32,et=l-12;z<et;++z)Z[z]+=x-16*Z[l]*rt[z-(l-32)],x=Math.floor((Z[z]+128)/256),Z[z]-=256*x;Z[z]+=x,Z[l]=0}for(x=0,z=0;z<32;z++)Z[z]+=x-(Z[31]>>4)*rt[z],x=Z[z]>>8,Z[z]&=255;for(z=0;z<32;z++)Z[z]-=x*rt[z];for(l=0;l<32;l++)Z[l+1]+=Z[l]>>8,B[l]=255&Z[l]}function lt(B){var Z,x=new Float64Array(64);for(Z=0;Z<64;Z++)x[Z]=B[Z];for(Z=0;Z<64;Z++)B[Z]=0;ct(B,x)}function ut(B,Z){var x=r(),l=r(),z=r(),et=r(),tt=r(),it=r(),k=r();return K(B[2],s),R(B[1],Z),d(z,B[1]),X(et,z,u),V(z,z,B[2]),J(et,B[2],et),d(tt,et),d(it,tt),X(k,it,tt),X(x,k,z),X(x,x,et),function(w,A){var C,$=r();for(C=0;C<16;C++)$[C]=A[C];for(C=250;C>=0;C--)d($,$),C!==1&&X($,$,A);for(C=0;C<16;C++)w[C]=$[C]}(x,x),X(x,x,z),X(x,x,et),X(x,x,et),X(B[0],x,et),d(l,B[0]),X(l,l,et),Q(l,z)&&X(B[0],B[0],m),d(l,B[0]),X(l,l,et),Q(l,z)?-1:(Y(B[0])===Z[31]>>7&&V(B[0],a,B[0]),X(B[3],B[0],B[1]),0)}var dt=64;function wt(){for(var B=0;B<arguments.length;B++)if(!(arguments[B]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function mt(B){for(var Z=0;Z<B.length;Z++)B[Z]=0}e.scalarMult=function(B,Z){if(wt(B,Z),B.length!==32)throw Error("bad n size");if(Z.length!==32)throw Error("bad p size");var x=new Uint8Array(32);return _(x,B,Z),x},e.box={},e.box.keyPair=function(){var B,Z,x=new Uint8Array(32),l=new Uint8Array(32);return B=x,i(Z=l,32),g(B,Z),{publicKey:x,secretKey:l}},e.box.keyPair.fromSecretKey=function(B){if(wt(B),B.length!==32)throw Error("bad secret key size");var Z=new Uint8Array(32);return g(Z,B),{publicKey:Z,secretKey:new Uint8Array(B)}},e.sign=function(B,Z){if(wt(B,Z),Z.length!==64)throw Error("bad secret key size");var x=new Uint8Array(dt+B.length);return function(l,z,et,tt){var it,k,w,A,C,$=new Float64Array(64),T=[r(),r(),r(),r()];(it=e.hash(tt.subarray(0,32)))[0]&=248,it[31]&=127,it[31]|=64;var W=et+64;for(A=0;A<et;A++)l[64+A]=z[A];for(A=0;A<32;A++)l[32+A]=it[32+A];for(lt(w=e.hash(l.subarray(32,W))),st(T,w),D(l,T),A=32;A<64;A++)l[A]=tt[A];for(lt(k=e.hash(l.subarray(0,W))),A=0;A<64;A++)$[A]=0;for(A=0;A<32;A++)$[A]=w[A];for(A=0;A<32;A++)for(C=0;C<32;C++)$[A+C]+=k[A]*it[C];ct(l.subarray(32),$)}(x,B,B.length,Z),x},e.sign.detached=function(B,Z){for(var x=e.sign(B,Z),l=new Uint8Array(dt),z=0;z<l.length;z++)l[z]=x[z];return l},e.sign.detached.verify=function(B,Z,x){if(wt(B,Z,x),Z.length!==dt)throw Error("bad signature size");if(x.length!==32)throw Error("bad public key size");var l,z=new Uint8Array(dt+B.length),et=new Uint8Array(dt+B.length);for(l=0;l<dt;l++)z[l]=Z[l];for(l=0;l<B.length;l++)z[l+dt]=B[l];return function(tt,it,k,w){var A,C,$=new Uint8Array(32),T=[r(),r(),r(),r()],W=[r(),r(),r(),r()];if(k<64||ut(W,w))return-1;for(A=0;A<k;A++)tt[A]=it[A];for(A=0;A<32;A++)tt[A+32]=w[A];if(lt(C=e.hash(tt.subarray(0,k))),nt(T,W,C),st(W,it.subarray(32)),p(T,W),D($,T),k-=64,b(it,0,$,0)){for(A=0;A<k;A++)tt[A]=0;return-1}for(A=0;A<k;A++)tt[A]=it[A+64];return k}(et,z,z.length,x)>=0},e.sign.keyPair=function(){var B=new Uint8Array(32),Z=new Uint8Array(64);return q(B,Z),{publicKey:B,secretKey:Z}},e.sign.keyPair.fromSecretKey=function(B){if(wt(B),B.length!==64)throw Error("bad secret key size");for(var Z=new Uint8Array(32),x=0;x<Z.length;x++)Z[x]=B[32+x];return{publicKey:Z,secretKey:new Uint8Array(B)}},e.sign.keyPair.fromSeed=function(B){if(wt(B),B.length!==32)throw Error("bad seed size");for(var Z=new Uint8Array(32),x=new Uint8Array(64),l=0;l<32;l++)x[l]=B[l];return q(Z,x,!0),{publicKey:Z,secretKey:x}},e.setPRNG=function(B){i=B},function(){var B=typeof self!="undefined"?self.crypto||self.msCrypto:null;B&&B.getRandomValues?e.setPRNG(function(Z,x){var l,z=new Uint8Array(x);for(l=0;l<x;l+=65536)B.getRandomValues(z.subarray(l,l+Math.min(x-l,65536)));for(l=0;l<x;l++)Z[l]=z[l];mt(z)}):vd!==void 0&&(B=void 0)&&B.randomBytes&&e.setPRNG(function(Z,x){var l,z=B.randomBytes(x);for(l=0;l<x;l++)Z[l]=z[l];mt(z)})}()})(t.exports?t.exports:self.nacl=self.nacl||{})});const zc=M.getNodeCrypto();function qr(t){const e=new Uint8Array(t);if(typeof crypto!="undefined"&&crypto.getRandomValues)crypto.getRandomValues(e);else{if(!zc)throw Error("No secure random number generator available.");{const r=zc.randomBytes(e.length);e.set(r)}}return e}async function hi(t,e){const r=await M.getBigInteger();if(e.lt(t))throw Error("Illegal parameter value: max <= min");const i=e.sub(t),n=i.byteLength();return new r(await qr(n+8)).mod(i).add(t)}var w5=Object.freeze({__proto__:null,getRandomBytes:qr,getRandomBigInteger:hi});async function qc(t,e,r){const i=await M.getBigInteger(),n=new i(1),a=n.leftShift(new i(t-1)),s=new i(30),o=[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],u=await hi(a,a.leftShift(n));let c=u.mod(s).toNumber();do u.iadd(new i(o[c])),c=(c+o[c])%o.length,u.bitLength()>t&&(u.imod(a.leftShift(n)).iadd(a),c=u.mod(s).toNumber());while(!await c3(u,e,r));return u}async function c3(t,e,r){return!(e&&!t.dec().gcd(e).isOne())&&!!await async function(i){const n=await M.getBigInteger();return v5.every(a=>i.mod(new n(a))!==0)}(t)&&!!await async function(i,n){const a=await M.getBigInteger();return n=n||new a(2),n.modExp(i.dec(),i).isOne()}(t)&&!!await async function(i,n,a){const s=await M.getBigInteger(),o=i.bitLength();n||(n=Math.max(1,o/48|0));const u=i.dec();let c=0;for(;!u.getBit(c);)c++;const h=i.rightShift(new s(c));for(;n>0;n--){let f,m=(a?a():await hi(new s(2),u)).modExp(h,i);if(!m.isOne()&&!m.equal(u)){for(f=1;f<c;f++){if(m=m.mul(m).mod(i),m.isOne())return!1;if(m.equal(u))break}if(f===c)return!1}}return!0}(t,r)}const v5=[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],Sr=[];function k1(t,e){const r=t.length;if(r>e-11)throw Error("Message too long");const i=function(a){const s=new Uint8Array(a);let o=0;for(;o<a;){const u=qr(a-o);for(let c=0;c<u.length;c++)u[c]!==0&&(s[o++]=u[c])}return s}(e-r-3),n=new Uint8Array(e);return n[1]=2,n.set(i,2),n.set(t,e-r),n}function A1(t,e){let r=2,i=1;for(let o=r;o<t.length;o++)i&=t[o]!==0,r+=i;const n=r-2,a=t.subarray(r+1),s=t[0]===0&t[1]===2&n>=8&!i;if(e)return M.selectUint8Array(s,a,e);if(s)return a;throw Error("Decryption error")}async function L0(t,e,r){let i;if(e.length!==Ln.getHashByteLength(t))throw Error("Invalid hash length");const n=new Uint8Array(Sr[t].length);for(i=0;i<Sr[t].length;i++)n[i]=Sr[t][i];const a=n.length+e.length;if(r<a+11)throw Error("Intended encoded message length too short");const s=new Uint8Array(r-a-3).fill(255),o=new Uint8Array(r);return o[1]=1,o.set(s,2),o.set(n,r-a),o.set(e,r-e.length),o}Sr[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],Sr[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],Sr[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],Sr[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],Sr[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],Sr[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],Sr[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];var _5=Object.freeze({__proto__:null,emeEncode:k1,emeDecode:A1,emsaEncode:L0});const vn=M.getWebCrypto(),Ke=M.getNodeCrypto(),u3=void 0,_n=Ke?u3.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,ps=Ke?u3.define("RSAPubliceKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}):void 0;var k5=Object.freeze({__proto__:null,sign:async function(t,e,r,i,n,a,s,o,u){if(e&&!M.isStream(e)){if(M.getWebCrypto())try{return await async function(c,h,f,m,b,K,I,U){const G=await async function(R,J,V,X,d,y){const _=await M.getBigInteger(),g=new _(X),p=new _(d),E=new _(V);let D=E.mod(p.dec()),nt=E.mod(g.dec());return nt=nt.toUint8Array(),D=D.toUint8Array(),{kty:"RSA",n:Ve(R,!0),e:Ve(J,!0),d:Ve(V,!0),p:Ve(d,!0),q:Ve(X,!0),dp:Ve(D,!0),dq:Ve(nt,!0),qi:Ve(y,!0),ext:!0}}(f,m,b,K,I,U),Q={name:"RSASSA-PKCS1-v1_5",hash:{name:c}},Y=await vn.importKey("jwk",G,Q,!1,["sign"]);return new Uint8Array(await vn.sign("RSASSA-PKCS1-v1_5",Y,h))}(v.read(v.webHash,t),e,r,i,n,a,s,o)}catch(c){M.printDebugError(c)}else if(M.getNodeCrypto())return async function(c,h,f,m,b,K,I,U){const{default:G}=await ri(()=>Promise.resolve().then(function(){return _a}),void 0),Q=new G(K),Y=new G(I),R=new G(b),J=R.mod(Y.subn(1)),V=R.mod(Q.subn(1)),X=Ke.createSign(v.read(v.hash,c));X.write(h),X.end();const d={version:0,modulus:new G(f),publicExponent:new G(m),privateExponent:new G(b),prime1:new G(I),prime2:new G(K),exponent1:J,exponent2:V,coefficient:new G(U)};if(Ke.createPrivateKey!==void 0){const _=_n.encode(d,"der");return new Uint8Array(X.sign({key:_,format:"der",type:"pkcs1"}))}const y=_n.encode(d,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(X.sign(y))}(t,e,r,i,n,a,s,o)}return async function(c,h,f,m){const b=await M.getBigInteger();h=new b(h);const K=new b(await L0(c,m,h.byteLength()));if(f=new b(f),K.gte(h))throw Error("Message size cannot exceed modulus size");return K.modExp(f,h).toUint8Array("be",h.byteLength())}(t,r,n,u)},verify:async function(t,e,r,i,n,a){if(e&&!M.isStream(e)){if(M.getWebCrypto())try{return await async function(s,o,u,c,h){const f=function(b,K){return{kty:"RSA",n:Ve(b,!0),e:Ve(K,!0),ext:!0}}(c,h),m=await vn.importKey("jwk",f,{name:"RSASSA-PKCS1-v1_5",hash:{name:s}},!1,["verify"]);return vn.verify("RSASSA-PKCS1-v1_5",m,u,o)}(v.read(v.webHash,t),e,r,i,n)}catch(s){M.printDebugError(s)}else if(M.getNodeCrypto())return async function(s,o,u,c,h){const{default:f}=await ri(()=>Promise.resolve().then(function(){return _a}),void 0),m=Ke.createVerify(v.read(v.hash,s));m.write(o),m.end();const b={modulus:new f(c),publicExponent:new f(h)};let K;Ke.createPrivateKey!==void 0?K={key:ps.encode(b,"der"),format:"der",type:"pkcs1"}:K=ps.encode(b,"pem",{label:"RSA PUBLIC KEY"});try{return await m.verify(K,u)}catch{return!1}}(t,e,r,i,n)}return async function(s,o,u,c,h){const f=await M.getBigInteger();if(u=new f(u),o=new f(o),c=new f(c),o.gte(u))throw Error("Signature size cannot exceed modulus size");const m=o.modExp(c,u).toUint8Array("be",u.byteLength()),b=await L0(s,h,u.byteLength());return M.equalsUint8Array(m,b)}(t,r,i,n,a)},encrypt:async function(t,e,r){return M.getNodeCrypto()?async function(i,n,a){const{default:s}=await ri(()=>Promise.resolve().then(function(){return _a}),void 0),o={modulus:new s(n),publicExponent:new s(a)};let u;return Ke.createPrivateKey!==void 0?u={key:ps.encode(o,"der"),format:"der",type:"pkcs1",padding:Ke.constants.RSA_PKCS1_PADDING}:u={key:ps.encode(o,"pem",{label:"RSA PUBLIC KEY"}),padding:Ke.constants.RSA_PKCS1_PADDING},new Uint8Array(Ke.publicEncrypt(u,i))}(t,e,r):async function(i,n,a){const s=await M.getBigInteger();if(n=new s(n),i=new s(k1(i,n.byteLength())),a=new s(a),i.gte(n))throw Error("Message size cannot exceed modulus size");return i.modExp(a,n).toUint8Array("be",n.byteLength())}(t,e,r)},decrypt:async function(t,e,r,i,n,a,s,o){return M.getNodeCrypto()?async function(u,c,h,f,m,b,K,I){const{default:U}=await ri(()=>Promise.resolve().then(function(){return _a}),void 0),G=new U(m),Q=new U(b),Y=new U(f),R=Y.mod(Q.subn(1)),J=Y.mod(G.subn(1)),V={version:0,modulus:new U(c),publicExponent:new U(h),privateExponent:new U(f),prime1:new U(b),prime2:new U(m),exponent1:R,exponent2:J,coefficient:new U(K)};let X;Ke.createPrivateKey!==void 0?X={key:_n.encode(V,"der"),format:"der",type:"pkcs1",padding:Ke.constants.RSA_PKCS1_PADDING}:X={key:_n.encode(V,"pem",{label:"RSA PRIVATE KEY"}),padding:Ke.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(Ke.privateDecrypt(X,u))}catch{if(I)return I;throw Error("Decryption error")}}(t,e,r,i,n,a,s,o):async function(u,c,h,f,m,b,K,I){const U=await M.getBigInteger();if(u=new U(u),c=new U(c),h=new U(h),f=new U(f),m=new U(m),b=new U(b),K=new U(K),u.gte(c))throw Error("Data too large.");const G=f.mod(b.dec()),Q=f.mod(m.dec()),Y=(await hi(new U(2),c)).mod(c),R=Y.modInv(c).modExp(h,c);u=u.mul(R).mod(c);const J=u.modExp(Q,m),V=u.modExp(G,b);let d=K.mul(V.sub(J)).mod(b).mul(m).add(J);return d=d.mul(Y).mod(c),A1(d.toUint8Array("be",c.byteLength()),I)}(t,e,r,i,n,a,s,o)},generate:async function(t,e){if(e=new(await M.getBigInteger())(e),M.getWebCrypto()){const s={name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:e.toUint8Array(),hash:{name:"SHA-1"}},o=await vn.generateKey(s,!0,["sign","verify"]),u=await vn.exportKey("jwk",o.privateKey);return{n:Jr(u.n),e:e.toUint8Array(),d:Jr(u.d),p:Jr(u.q),q:Jr(u.p),u:Jr(u.qi)}}if(M.getNodeCrypto()&&Ke.generateKeyPair&&_n){const s={modulusLength:t,publicExponent:e.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},o=await new Promise((u,c)=>{Ke.generateKeyPair("rsa",s,(h,f,m)=>{h?c(h):u(_n.decode(m,"der"))})});return{n:o.modulus.toArrayLike(Uint8Array),e:o.publicExponent.toArrayLike(Uint8Array),d:o.privateExponent.toArrayLike(Uint8Array),p:o.prime2.toArrayLike(Uint8Array),q:o.prime1.toArrayLike(Uint8Array),u:o.coefficient.toArrayLike(Uint8Array)}}let r,i,n;do i=await qc(t-(t>>1),e,40),r=await qc(t>>1,e,40),n=r.mul(i);while(n.bitLength()!==t);const a=r.dec().imul(i.dec());return i.lt(r)&&([r,i]=[i,r]),{n:n.toUint8Array(),e:e.toUint8Array(),d:e.modInv(a).toUint8Array(),p:r.toUint8Array(),q:i.toUint8Array(),u:r.modInv(i).toUint8Array()}},validateParams:async function(t,e,r,i,n,a){const s=await M.getBigInteger();if(t=new s(t),i=new s(i),n=new s(n),!i.mul(n).equal(t))return!1;const o=new s(2);if(a=new s(a),!i.mul(a).mod(n).isOne())return!1;e=new s(e),r=new s(r);const u=new s(Math.floor(t.bitLength()/3)),c=await hi(o,o.leftShift(u)),h=c.mul(r).mul(e);return!(!h.mod(i.dec()).equal(c)||!h.mod(n.dec()).equal(c))}}),A5=Object.freeze({__proto__:null,encrypt:async function(t,e,r,i){const n=await M.getBigInteger();e=new n(e),r=new n(r),i=new n(i);const a=new n(k1(t,e.byteLength())),s=await hi(new n(1),e.dec());return{c1:r.modExp(s,e).toUint8Array(),c2:i.modExp(s,e).imul(a).imod(e).toUint8Array()}},decrypt:async function(t,e,r,i,n){const a=await M.getBigInteger();return t=new a(t),e=new a(e),r=new a(r),i=new a(i),A1(t.modExp(i,r).modInv(r).imul(e).imod(r).toUint8Array("be",r.byteLength()),n)},validateParams:async function(t,e,r,i){const n=await M.getBigInteger();t=new n(t),e=new n(e),r=new n(r);const a=new n(1);if(e.lte(a)||e.gte(t))return!1;const s=new n(t.bitLength()),o=new n(1023);if(s.lt(o)||!e.modExp(t.dec(),t).isOne())return!1;let u=e;const c=new n(1),h=new n(2).leftShift(new n(17));for(;c.lt(h);){if(u=u.mul(e).imod(t),u.isOne())return!1;c.iinc()}i=new n(i);const f=new n(2),m=await hi(f.leftShift(s.dec()),f.leftShift(s)),b=t.dec().imul(m).iadd(i);return!!r.equal(e.modExp(b,t))}});class Mr{constructor(e){if(e instanceof Mr)this.oid=e.oid;else if(M.isArray(e)||M.isUint8Array(e)){if((e=new Uint8Array(e))[0]===6){if(e[1]!==e.length-2)throw Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}read(e){if(e.length>=1){const r=e[0];if(e.length>=1+r)return this.oid=e.subarray(1,1+r),1+this.oid.length}throw Error("Invalid oid")}write(){return M.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return M.uint8ArrayToHex(this.oid)}getName(){const e=this.toHex();if(v.curve[e])return v.write(v.curve,e);throw Error("Unknown curve object identifier.")}}function Uo(t,e){return t.keyPair({priv:e})}function Bo(t,e){const r=t.keyPair({pub:e});if(r.validate().result!==!0)throw Error("Invalid elliptic public key");return r}async function Yn(t){if(!vt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:e}=await ri(()=>Promise.resolve().then(function(){return j6}),void 0);return new e.ec(t)}function h3(t){let e,r=0;const i=t[0];return i<192?([r]=t,e=1):i<255?(r=(t[0]-192<<8)+t[1]+192,e=2):i===255&&(r=M.readNumber(t.subarray(1,5)),e=5),{len:r,offset:e}}function ts(t){return t<192?new Uint8Array([t]):t>191&&t<8384?new Uint8Array([192+(t-192>>8),t-192&255]):M.concatUint8Array([new Uint8Array([255]),M.writeNumber(t,4)])}function S5(t){if(t<0||t>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+t])}function d3(t){return new Uint8Array([192|t])}function Fc(t,e){return M.concatUint8Array([d3(t),ts(e)])}function Us(t){return[v.packet.literalData,v.packet.compressedData,v.packet.symmetricallyEncryptedData,v.packet.symEncryptedIntegrityProtectedData,v.packet.aeadEncryptedData].includes(t)}async function E5(t,e){const r=Nr(t);let i,n;try{const a=await r.peekBytes(2);if(!a||a.length<2||(128&a[0])==0)throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const s=await r.readByte();let o,u,c=-1,h=-1;h=0,(64&s)!=0&&(h=1),h?c=63&s:(c=(63&s)>>2,u=3&s);const f=Us(c);let m,b=null;if(f){if(M.isStream(t)==="array"){const I=new Rr;i=We(I),b=I}else{const I=new $n;i=We(I.writable),b=I.readable}n=e({tag:c,packet:b})}else b=[];do{if(h){const I=await r.readByte();if(m=!1,I<192)o=I;else if(I>=192&&I<224)o=(I-192<<8)+await r.readByte()+192;else if(I>223&&I<255){if(o=1<<(31&I),m=!0,!f)throw new TypeError("This packet type does not support partial lengths.")}else o=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte()}else switch(u){case 0:o=await r.readByte();break;case 1:o=await r.readByte()<<8|await r.readByte();break;case 2:o=await r.readByte()<<24|await r.readByte()<<16|await r.readByte()<<8|await r.readByte();break;default:o=1/0}if(o>0){let I=0;for(;;){i&&await i.ready;const{done:U,value:G}=await r.read();if(U){if(o===1/0)break;throw Error("Unexpected end of packet")}const Q=o===1/0?G:G.subarray(0,o-I);if(i?await i.write(Q):b.push(Q),I+=G.length,I>=o){r.unshift(G.subarray(o-I+G.length));break}}}}while(m);const K=await r.peekBytes(f?1/0:2);return i?(await i.ready,await i.close()):(b=M.concatUint8Array(b),await e({tag:c,packet:b})),!K||!K.length}catch(a){if(i)return await i.abort(a),!0;throw a}finally{i&&await n,r.releaseLock()}}class fe extends Error{constructor(...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,fe),this.name="UnsupportedError"}}class N0{constructor(e,r){this.tag=e,this.rawContent=r}write(){return this.rawContent}}const c0=M.getWebCrypto(),Xs=M.getNodeCrypto(),Fr={p256:"P-256",p384:"P-384",p521:"P-521"},Vr=Xs?Xs.getCurves():[],Ai=Xs?{secp256k1:Vr.includes("secp256k1")?"secp256k1":void 0,p256:Vr.includes("prime256v1")?"prime256v1":void 0,p384:Vr.includes("secp384r1")?"secp384r1":void 0,p521:Vr.includes("secp521r1")?"secp521r1":void 0,ed25519:Vr.includes("ED25519")?"ED25519":void 0,curve25519:Vr.includes("X25519")?"X25519":void 0,brainpoolP256r1:Vr.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:Vr.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:Vr.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Bs={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:v.publicKey.ecdsa,hash:v.hash.sha256,cipher:v.symmetric.aes128,node:Ai.p256,web:Fr.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:v.publicKey.ecdsa,hash:v.hash.sha384,cipher:v.symmetric.aes192,node:Ai.p384,web:Fr.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:v.publicKey.ecdsa,hash:v.hash.sha512,cipher:v.symmetric.aes256,node:Ai.p521,web:Fr.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:v.publicKey.ecdsa,hash:v.hash.sha256,cipher:v.symmetric.aes128,node:Ai.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:v.publicKey.eddsa,hash:v.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:v.publicKey.ecdh,hash:v.hash.sha256,cipher:v.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:v.publicKey.ecdsa,hash:v.hash.sha256,cipher:v.symmetric.aes128,node:Ai.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:v.publicKey.ecdsa,hash:v.hash.sha384,cipher:v.symmetric.aes192,node:Ai.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:v.publicKey.ecdsa,hash:v.hash.sha512,cipher:v.symmetric.aes256,node:Ai.brainpoolP512r1,payloadSize:64}};class di{constructor(e,r){try{(M.isArray(e)||M.isUint8Array(e))&&(e=new Mr(e)),e instanceof Mr&&(e=e.getName()),this.name=v.write(v.curve,e)}catch{throw new fe("Unknown curve")}r=r||Bs[this.name],this.keyType=r.keyType,this.oid=r.oid,this.hash=r.hash,this.cipher=r.cipher,this.node=r.node&&Bs[this.name],this.web=r.web&&Bs[this.name],this.payloadSize=r.payloadSize,this.web&&M.getWebCrypto()?this.type="web":this.node&&M.getNodeCrypto()?this.type="node":this.name==="curve25519"?this.type="curve25519":this.name==="ed25519"&&(this.type="ed25519")}async genKeyPair(){let e;switch(this.type){case"web":try{return await async function(i){const n=await c0.generateKey({name:"ECDSA",namedCurve:Fr[i]},!0,["sign","verify"]),a=await c0.exportKey("jwk",n.privateKey),s=await c0.exportKey("jwk",n.publicKey);return{publicKey:l3(s),privateKey:Jr(a.d)}}(this.name)}catch(i){M.printDebugError("Browser did not support generating ec key "+i.message);break}case"node":return async function(i){const n=Xs.createECDH(Ai[i]);return await n.generateKeys(),{publicKey:new Uint8Array(n.getPublicKey()),privateKey:new Uint8Array(n.getPrivateKey())}}(this.name);case"curve25519":{const i=qr(32);i[0]=127&i[0]|64,i[31]&=248;const n=i.slice().reverse();return e=zr.box.keyPair.fromSecretKey(n),{publicKey:M.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:i}}case"ed25519":{const i=qr(32),n=zr.sign.keyPair.fromSeed(i);return{publicKey:M.concatUint8Array([new Uint8Array([64]),n.publicKey]),privateKey:i}}}return e=await(await Yn(this.name)).genKeyPair({entropy:M.uint8ArrayToString(qr(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}}}async function f3(t,e,r,i){const n={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:t===v.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=e.getName();if(!n[a])return!1;if(a==="curve25519"){i=i.slice().reverse();const{publicKey:o}=zr.box.keyPair.fromSecretKey(i);r=new Uint8Array(r);const u=new Uint8Array([64,...o]);return!!M.equalsUint8Array(u,r)}const s=await Yn(a);try{r=Bo(s,r).getPublic()}catch{return!1}return!!Uo(s,i).getPublic().eq(r)}function l3(t){const e=Jr(t.x),r=Jr(t.y),i=new Uint8Array(e.length+r.length+1);return i[0]=4,i.set(e,1),i.set(r,e.length+1),i}function To(t,e,r){const i=t,n=r.slice(1,i+1),a=r.slice(i+1,2*i+1);return{kty:"EC",crv:e,x:Ve(n,!0),y:Ve(a,!0),ext:!0}}function p3(t,e,r,i){const n=To(t,e,r);return n.d=Ve(i,!0),n}const Js=M.getWebCrypto(),Qn=M.getNodeCrypto();async function Oc(t,e,r,i,n,a){const s=new di(t);if(r&&!M.isStream(r)){const o={publicKey:i,privateKey:n};switch(s.type){case"web":try{return await async function(u,c,h,f){const m=u.payloadSize,b=p3(u.payloadSize,Fr[u.name],f.publicKey,f.privateKey),K=await Js.importKey("jwk",b,{name:"ECDSA",namedCurve:Fr[u.name],hash:{name:v.read(v.webHash,u.hash)}},!1,["sign"]),I=new Uint8Array(await Js.sign({name:"ECDSA",namedCurve:Fr[u.name],hash:{name:v.read(v.webHash,c)}},K,h));return{r:I.slice(0,m),s:I.slice(m,m<<1)}}(s,e,r,o)}catch(u){if(s.name!=="p521"&&(u.name==="DataError"||u.name==="OperationError"))throw u;M.printDebugError("Browser did not support signing: "+u.message)}break;case"node":{const u=await async function(c,h,f,m){const b=Qn.createSign(v.read(v.hash,h));b.write(f),b.end();const K=P5.encode({version:1,parameters:c.oid,privateKey:Array.from(m.privateKey),publicKey:{unused:0,data:Array.from(m.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return y3.decode(b.sign(K),"der")}(s,e,r,o);return{r:u.r.toArrayLike(Uint8Array),s:u.s.toArrayLike(Uint8Array)}}}}return async function(o,u,c){const h=await Yn(o.name),f=Uo(h,c),m=f.sign(u);return{r:m.r.toArrayLike(Uint8Array),s:m.s.toArrayLike(Uint8Array)}}(s,a,n)}async function $c(t,e,r,i,n,a){const s=new di(t);if(i&&!M.isStream(i))switch(s.type){case"web":try{return await async function(o,u,{r:c,s:h},f,m){const b=To(o.payloadSize,Fr[o.name],m),K=await Js.importKey("jwk",b,{name:"ECDSA",namedCurve:Fr[o.name],hash:{name:v.read(v.webHash,o.hash)}},!1,["verify"]),I=M.concatUint8Array([c,h]).buffer;return Js.verify({name:"ECDSA",namedCurve:Fr[o.name],hash:{name:v.read(v.webHash,u)}},K,I,f)}(s,e,r,i,n)}catch(o){if(s.name!=="p521"&&(o.name==="DataError"||o.name==="OperationError"))throw o;M.printDebugError("Browser did not support verifying: "+o.message)}break;case"node":return async function(o,u,{r:c,s:h},f,m){const{default:b}=await ri(()=>Promise.resolve().then(function(){return _a}),void 0),K=Qn.createVerify(v.read(v.hash,u));K.write(f),K.end();const I=M5.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:o.oid},subjectPublicKey:{unused:0,data:Array.from(m)}},"pem",{label:"PUBLIC KEY"}),U=y3.encode({r:new b(c),s:new b(h)},"der");try{return K.verify(I,U)}catch{return!1}}(s,e,r,i,n)}return async function(o,u,c,h){const f=await Yn(o.name);return Bo(f,h).verify(c,u)}(s,r,e===void 0?i:a,n)}const zo=void 0,y3=Qn?zo.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,P5=Qn?zo.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,x5=Qn?zo.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,M5=Qn?zo.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(x5),this.key("subjectPublicKey").bitstr())}):void 0;var C5=Object.freeze({__proto__:null,sign:Oc,verify:$c,validateParams:async function(t,e,r){const i=new di(t);if(i.keyType!==v.publicKey.ecdsa)return!1;switch(i.type){case"web":case"node":{const n=qr(8),a=v.hash.sha256,s=await Ln.digest(a,n);try{const o=await Oc(t,a,n,e,r,s);return await $c(t,a,o,n,e,s)}catch{return!1}}default:return f3(v.publicKey.ecdsa,t,e,r)}}});zr.hash=t=>new Uint8Array(Ja().update(t).digest());var D5=Object.freeze({__proto__:null,sign:async function(t,e,r,i,n,a){if(Ln.getHashByteLength(e)<Ln.getHashByteLength(v.hash.sha256))throw Error("Hash algorithm too weak: sha256 or stronger is required for EdDSA.");const s=M.concatUint8Array([n,i.subarray(1)]),o=zr.sign.detached(a,s);return{r:o.subarray(0,32),s:o.subarray(32)}},verify:async function(t,e,{r,s:i},n,a,s){const o=M.concatUint8Array([r,i]);return zr.sign.detached.verify(s,o,a.subarray(1))},validateParams:async function(t,e,r){if(t.getName()!=="ed25519")return!1;const{publicKey:i}=zr.sign.keyPair.fromSeed(r),n=new Uint8Array([64,...i]);return M.equalsUint8Array(e,n)}});function b3(t,e){const r=new Qa["aes"+8*t.length](t),i=new Uint32Array([2795939494,2795939494]),n=to(e);let a=i;const s=n,o=n.length/2,u=new Uint32Array([0,0]);let c=new Uint32Array(4);for(let h=0;h<=5;++h)for(let f=0;f<o;++f)u[1]=o*h+(1+f),c[0]=a[0],c[1]=a[1],c[2]=s[2*f],c[3]=s[2*f+1],c=to(r.encrypt(eo(c))),a=c.subarray(0,2),a[0]^=u[0],a[1]^=u[1],s[2*f]=c[2],s[2*f+1]=c[3];return eo(a,s)}function m3(t,e){const r=new Qa["aes"+8*t.length](t),i=new Uint32Array([2795939494,2795939494]),n=to(e);let a=n.subarray(0,2);const s=n.subarray(2),o=n.length/2-1,u=new Uint32Array([0,0]);let c=new Uint32Array(4);for(let h=5;h>=0;--h)for(let f=o-1;f>=0;--f)u[1]=o*h+(f+1),c[0]=a[0]^u[0],c[1]=a[1]^u[1],c[2]=s[2*f],c[3]=s[2*f+1],c=to(r.decrypt(eo(c))),a=c.subarray(0,2),s[2*f]=c[2],s[2*f+1]=c[3];if(a[0]===i[0]&&a[1]===i[1])return eo(s);throw Error("Key Data Integrity failed")}function to(t){const{length:e}=t,r=function(a){if(M.isString(a)){const{length:s}=a,o=new ArrayBuffer(s),u=new Uint8Array(o);for(let c=0;c<s;++c)u[c]=a.charCodeAt(c);return o}return new Uint8Array(a).buffer}(t),i=new DataView(r),n=new Uint32Array(e/4);for(let a=0;a<e/4;++a)n[a]=i.getUint32(4*a);return n}function eo(){let t=0;for(let n=0;n<arguments.length;++n)t+=4*arguments[n].length;const e=new ArrayBuffer(t),r=new DataView(e);let i=0;for(let n=0;n<arguments.length;++n){for(let a=0;a<arguments[n].length;++a)r.setUint32(i+4*a,arguments[n][a]);i+=4*arguments[n].length}return new Uint8Array(e)}var K5=Object.freeze({__proto__:null,wrap:b3,unwrap:m3});function g3(t){const e=8-t.length%8,r=new Uint8Array(t.length+e).fill(e);return r.set(t),r}function w3(t){const e=t.length;if(e>0){const r=t[e-1];if(r>=1){const i=t.subarray(e-r),n=new Uint8Array(r).fill(r);if(M.equalsUint8Array(i,n))return t.subarray(0,e-r)}}throw Error("Invalid padding")}var R5=Object.freeze({__proto__:null,encode:g3,decode:w3});const Ri=M.getWebCrypto(),v3=M.getNodeCrypto();function Lc(t,e,r,i){return M.concatUint8Array([e.write(),new Uint8Array([t]),r.write(),M.stringToUint8Array("Anonymous Sender "),i.subarray(0,20)])}async function Nc(t,e,r,i,n=!1,a=!1){let s;if(n){for(s=0;s<e.length&&e[s]===0;s++);e=e.subarray(s)}if(a){for(s=e.length-1;s>=0&&e[s]===0;s--);e=e.subarray(0,s+1)}return(await Ln.digest(t,M.concatUint8Array([new Uint8Array([0,0,0,1]),e,i]))).subarray(0,r)}async function I5(t,e){switch(t.type){case"curve25519":{const r=qr(32),{secretKey:i,sharedKey:n}=await _3(t,e,null,r);let{publicKey:a}=zr.box.keyPair.fromSecretKey(i);return a=M.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:n}}case"web":if(t.web&&M.getWebCrypto())try{return await async function(r,i){const n=To(r.payloadSize,r.web.web,i);let a=Ri.generateKey({name:"ECDH",namedCurve:r.web.web},!0,["deriveKey","deriveBits"]),s=Ri.importKey("jwk",n,{name:"ECDH",namedCurve:r.web.web},!1,[]);[a,s]=await Promise.all([a,s]);let o=Ri.deriveBits({name:"ECDH",namedCurve:r.web.web,public:s},a.privateKey,r.web.sharedSize),u=Ri.exportKey("jwk",a.publicKey);[o,u]=await Promise.all([o,u]);const c=new Uint8Array(o);return{publicKey:new Uint8Array(l3(u)),sharedKey:c}}(t,e)}catch(r){M.printDebugError(r)}break;case"node":return async function(r,i){const n=v3.createECDH(r.node.node);n.generateKeys();const a=new Uint8Array(n.computeSecret(i));return{publicKey:new Uint8Array(n.getPublicKey()),sharedKey:a}}(t,e)}return async function(r,i){const n=await Yn(r.name),a=await r.genKeyPair();i=Bo(n,i);const s=Uo(n,a.privateKey),o=a.publicKey,u=s.derive(i.getPublic()),c=n.curve.p.byteLength(),h=u.toArrayLike(Uint8Array,"be",c);return{publicKey:o,sharedKey:h}}(t,e)}async function _3(t,e,r,i){if(i.length!==t.payloadSize){const n=new Uint8Array(t.payloadSize);n.set(i,t.payloadSize-i.length),i=n}switch(t.type){case"curve25519":{const n=i.slice().reverse();return{secretKey:n,sharedKey:zr.scalarMult(n,e.subarray(1))}}case"web":if(t.web&&M.getWebCrypto())try{return await async function(n,a,s,o){const u=p3(n.payloadSize,n.web.web,s,o);let c=Ri.importKey("jwk",u,{name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]);const h=To(n.payloadSize,n.web.web,a);let f=Ri.importKey("jwk",h,{name:"ECDH",namedCurve:n.web.web},!0,[]);[c,f]=await Promise.all([c,f]);let m=Ri.deriveBits({name:"ECDH",namedCurve:n.web.web,public:f},c,n.web.sharedSize),b=Ri.exportKey("jwk",c);[m,b]=await Promise.all([m,b]);const K=new Uint8Array(m);return{secretKey:Jr(b.d),sharedKey:K}}(t,e,r,i)}catch(n){M.printDebugError(n)}break;case"node":return async function(n,a,s){const o=v3.createECDH(n.node.node);o.setPrivateKey(s);const u=new Uint8Array(o.computeSecret(a));return{secretKey:new Uint8Array(o.getPrivateKey()),sharedKey:u}}(t,e,i)}return async function(n,a,s){const o=await Yn(n.name);a=Bo(o,a),s=Uo(o,s);const u=new Uint8Array(s.getPrivate()),c=s.derive(a.getPublic()),h=o.curve.p.byteLength(),f=c.toArrayLike(Uint8Array,"be",h);return{secretKey:u,sharedKey:f}}(t,e,i)}var U5=Object.freeze({__proto__:null,validateParams:async function(t,e,r){return f3(v.publicKey.ecdh,t,e,r)},encrypt:async function(t,e,r,i,n){const a=g3(r),s=new di(t),{publicKey:o,sharedKey:u}=await I5(s,i),c=Lc(v.publicKey.ecdh,t,e,n),{keySize:h}=zi(e.cipher);return{publicKey:o,wrappedKey:b3(await Nc(e.hash,u,h,c),a)}},decrypt:async function(t,e,r,i,n,a,s){const o=new di(t),{sharedKey:u}=await _3(o,r,n,a),c=Lc(v.publicKey.ecdh,t,e,s),{keySize:h}=zi(e.cipher);let f;for(let m=0;m<3;m++)try{return w3(m3(await Nc(e.hash,u,h,c,m===1,m===2),i))}catch(b){f=b}throw f}}),B5=Object.freeze({__proto__:null,Curve:di,ecdh:U5,ecdsa:C5,eddsa:D5,generate:async function(t){const e=await M.getBigInteger();t=new di(t);const r=await t.genKeyPair(),i=new e(r.publicKey).toUint8Array(),n=new e(r.privateKey).toUint8Array("be",t.payloadSize);return{oid:t.oid,Q:i,secret:n,hash:t.hash,cipher:t.cipher}},getPreferredHashAlgo:function(t){return Bs[v.write(v.curve,t.toHex())].hash}}),T5=Object.freeze({__proto__:null,sign:async function(t,e,r,i,n,a){const s=await M.getBigInteger(),o=new s(1);let u,c,h,f;i=new s(i),n=new s(n),r=new s(r),a=new s(a),r=r.mod(i),a=a.mod(n);const m=new s(e.subarray(0,n.byteLength())).mod(n);for(;;){if(u=await hi(o,n),c=r.modExp(u,i).imod(n),c.isZero())continue;const b=a.mul(c).imod(n);if(f=m.add(b).imod(n),h=u.modInv(n).imul(f).imod(n),!h.isZero())break}return{r:c.toUint8Array("be",n.byteLength()),s:h.toUint8Array("be",n.byteLength())}},verify:async function(t,e,r,i,n,a,s,o){const u=await M.getBigInteger(),c=new u(0);if(e=new u(e),r=new u(r),a=new u(a),s=new u(s),n=new u(n),o=new u(o),e.lte(c)||e.gte(s)||r.lte(c)||r.gte(s))return M.printDebug("invalid DSA Signature"),!1;const h=new u(i.subarray(0,s.byteLength())).imod(s),f=r.modInv(s);if(f.isZero())return M.printDebug("invalid DSA Signature"),!1;n=n.mod(a),o=o.mod(a);const m=h.mul(f).imod(s),b=e.mul(f).imod(s),K=n.modExp(m,a),I=o.modExp(b,a);return K.mul(I).imod(a).imod(s).equal(e)},validateParams:async function(t,e,r,i,n){const a=await M.getBigInteger();t=new a(t),e=new a(e),r=new a(r),i=new a(i);const s=new a(1);if(r.lte(s)||r.gte(t)||!t.dec().mod(e).isZero()||!r.modExp(e,t).isOne())return!1;const o=new a(e.bitLength()),u=new a(150);if(o.lt(u)||!await c3(e,null,32))return!1;n=new a(n);const c=new a(2),h=await hi(c.leftShift(o.dec()),c.leftShift(o)),f=e.mul(h).add(n);return!!i.equal(r.modExp(f,t))}}),ie={rsa:k5,elgamal:A5,elliptic:B5,dsa:T5,nacl:zr},z5=Object.freeze({__proto__:null,parseSignatureParams:function(t,e){let r=0;switch(t){case v.publicKey.rsaEncryptSign:case v.publicKey.rsaEncrypt:case v.publicKey.rsaSign:return{s:M.readMPI(e.subarray(r))};case v.publicKey.dsa:case v.publicKey.ecdsa:{const i=M.readMPI(e.subarray(r));return r+=i.length+2,{r:i,s:M.readMPI(e.subarray(r))}}case v.publicKey.eddsa:{let i=M.readMPI(e.subarray(r));r+=i.length+2,i=M.leftPad(i,32);let n=M.readMPI(e.subarray(r));return n=M.leftPad(n,32),{r:i,s:n}}default:throw new fe("Unknown signature algorithm.")}},verify:async function(t,e,r,i,n,a){switch(t){case v.publicKey.rsaEncryptSign:case v.publicKey.rsaEncrypt:case v.publicKey.rsaSign:{const{n:s,e:o}=i,u=M.leftPad(r.s,s.length);return ie.rsa.verify(e,n,u,s,o,a)}case v.publicKey.dsa:{const{g:s,p:o,q:u,y:c}=i,{r:h,s:f}=r;return ie.dsa.verify(e,h,f,a,s,o,u,c)}case v.publicKey.ecdsa:{const{oid:s,Q:o}=i,u=new ie.elliptic.Curve(s).payloadSize,c=M.leftPad(r.r,u),h=M.leftPad(r.s,u);return ie.elliptic.ecdsa.verify(s,e,{r:c,s:h},n,o,a)}case v.publicKey.eddsa:{const{oid:s,Q:o}=i;return ie.elliptic.eddsa.verify(s,e,r,n,o,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(t,e,r,i,n,a){if(!r||!i)throw Error("Missing key parameters");switch(t){case v.publicKey.rsaEncryptSign:case v.publicKey.rsaEncrypt:case v.publicKey.rsaSign:{const{n:s,e:o}=r,{d:u,p:c,q:h,u:f}=i;return{s:await ie.rsa.sign(e,n,s,o,u,c,h,f,a)}}case v.publicKey.dsa:{const{g:s,p:o,q:u}=r,{x:c}=i;return ie.dsa.sign(e,a,s,o,u,c)}case v.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case v.publicKey.ecdsa:{const{oid:s,Q:o}=r,{d:u}=i;return ie.elliptic.ecdsa.sign(s,e,n,o,u,a)}case v.publicKey.eddsa:{const{oid:s,Q:o}=r,{seed:u}=i;return ie.elliptic.eddsa.sign(s,e,n,o,u,a)}default:throw Error("Unknown signature algorithm.")}}});class jc{constructor(e){e=e===void 0?new Uint8Array([]):M.isString(e)?M.stringToUint8Array(e):new Uint8Array(e),this.data=e}read(e){if(e.length>=1){const r=e[0];if(e.length>=1+r)return this.data=e.subarray(1,1+r),1+this.data.length}throw Error("Invalid symmetric key")}write(){return M.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class Wc{constructor(e){if(e){const{hash:r,cipher:i}=e;this.hash=r,this.cipher=i}else this.hash=null,this.cipher=null}read(e){if(e.length<4||e[0]!==3||e[1]!==1)throw Error("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function u0(t){try{t.getName()}catch{throw new fe("Unknown curve OID")}}var q5=Object.freeze({__proto__:null,publicKeyEncrypt:async function(t,e,r,i){switch(t){case v.publicKey.rsaEncrypt:case v.publicKey.rsaEncryptSign:{const{n,e:a}=e;return{c:await ie.rsa.encrypt(r,n,a)}}case v.publicKey.elgamal:{const{p:n,g:a,y:s}=e;return ie.elgamal.encrypt(r,n,a,s)}case v.publicKey.ecdh:{const{oid:n,Q:a,kdfParams:s}=e,{publicKey:o,wrappedKey:u}=await ie.elliptic.ecdh.encrypt(n,s,r,a,i);return{V:o,C:new jc(u)}}default:return[]}},publicKeyDecrypt:async function(t,e,r,i,n,a){switch(t){case v.publicKey.rsaEncryptSign:case v.publicKey.rsaEncrypt:{const{c:s}=i,{n:o,e:u}=e,{d:c,p:h,q:f,u:m}=r;return ie.rsa.decrypt(s,o,u,c,h,f,m,a)}case v.publicKey.elgamal:{const{c1:s,c2:o}=i,u=e.p,c=r.x;return ie.elgamal.decrypt(s,o,u,c,a)}case v.publicKey.ecdh:{const{oid:s,Q:o,kdfParams:u}=e,{d:c}=r,{V:h,C:f}=i;return ie.elliptic.ecdh.decrypt(s,u,h,f.data,o,c,n)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(t,e){let r=0;switch(t){case v.publicKey.rsaEncrypt:case v.publicKey.rsaEncryptSign:case v.publicKey.rsaSign:{const i=M.readMPI(e.subarray(r));r+=i.length+2;const n=M.readMPI(e.subarray(r));return r+=n.length+2,{read:r,publicParams:{n:i,e:n}}}case v.publicKey.dsa:{const i=M.readMPI(e.subarray(r));r+=i.length+2;const n=M.readMPI(e.subarray(r));r+=n.length+2;const a=M.readMPI(e.subarray(r));r+=a.length+2;const s=M.readMPI(e.subarray(r));return r+=s.length+2,{read:r,publicParams:{p:i,q:n,g:a,y:s}}}case v.publicKey.elgamal:{const i=M.readMPI(e.subarray(r));r+=i.length+2;const n=M.readMPI(e.subarray(r));r+=n.length+2;const a=M.readMPI(e.subarray(r));return r+=a.length+2,{read:r,publicParams:{p:i,g:n,y:a}}}case v.publicKey.ecdsa:{const i=new Mr;r+=i.read(e),u0(i);const n=M.readMPI(e.subarray(r));return r+=n.length+2,{read:r,publicParams:{oid:i,Q:n}}}case v.publicKey.eddsa:{const i=new Mr;r+=i.read(e),u0(i);let n=M.readMPI(e.subarray(r));return r+=n.length+2,n=M.leftPad(n,33),{read:r,publicParams:{oid:i,Q:n}}}case v.publicKey.ecdh:{const i=new Mr;r+=i.read(e),u0(i);const n=M.readMPI(e.subarray(r));r+=n.length+2;const a=new Wc;return r+=a.read(e.subarray(r)),{read:r,publicParams:{oid:i,Q:n,kdfParams:a}}}default:throw new fe("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(t,e,r){let i=0;switch(t){case v.publicKey.rsaEncrypt:case v.publicKey.rsaEncryptSign:case v.publicKey.rsaSign:{const n=M.readMPI(e.subarray(i));i+=n.length+2;const a=M.readMPI(e.subarray(i));i+=a.length+2;const s=M.readMPI(e.subarray(i));i+=s.length+2;const o=M.readMPI(e.subarray(i));return i+=o.length+2,{read:i,privateParams:{d:n,p:a,q:s,u:o}}}case v.publicKey.dsa:case v.publicKey.elgamal:{const n=M.readMPI(e.subarray(i));return i+=n.length+2,{read:i,privateParams:{x:n}}}case v.publicKey.ecdsa:case v.publicKey.ecdh:{const n=new di(r.oid);let a=M.readMPI(e.subarray(i));return i+=a.length+2,a=M.leftPad(a,n.payloadSize),{read:i,privateParams:{d:a}}}case v.publicKey.eddsa:{const n=new di(r.oid);let a=M.readMPI(e.subarray(i));return i+=a.length+2,a=M.leftPad(a,n.payloadSize),{read:i,privateParams:{seed:a}}}default:throw new fe("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(t,e){let r=0;switch(t){case v.publicKey.rsaEncrypt:case v.publicKey.rsaEncryptSign:return{c:M.readMPI(e.subarray(r))};case v.publicKey.elgamal:{const i=M.readMPI(e.subarray(r));return r+=i.length+2,{c1:i,c2:M.readMPI(e.subarray(r))}}case v.publicKey.ecdh:{const i=M.readMPI(e.subarray(r));r+=i.length+2;const n=new jc;return n.read(e.subarray(r)),{V:i,C:n}}default:throw new fe("Unknown public key encryption algorithm.")}},serializeParams:function(t,e){const r=Object.keys(e).map(i=>{const n=e[i];return M.isUint8Array(n)?M.uint8ArrayToMPI(n):n.write()});return M.concatUint8Array(r)},generateParams:function(t,e,r){switch(t){case v.publicKey.rsaEncrypt:case v.publicKey.rsaEncryptSign:case v.publicKey.rsaSign:return ie.rsa.generate(e,65537).then(({n:i,e:n,d:a,p:s,q:o,u})=>({privateParams:{d:a,p:s,q:o,u},publicParams:{n:i,e:n}}));case v.publicKey.ecdsa:return ie.elliptic.generate(r).then(({oid:i,Q:n,secret:a})=>({privateParams:{d:a},publicParams:{oid:new Mr(i),Q:n}}));case v.publicKey.eddsa:return ie.elliptic.generate(r).then(({oid:i,Q:n,secret:a})=>({privateParams:{seed:a},publicParams:{oid:new Mr(i),Q:n}}));case v.publicKey.ecdh:return ie.elliptic.generate(r).then(({oid:i,Q:n,secret:a,hash:s,cipher:o})=>({privateParams:{d:a},publicParams:{oid:new Mr(i),Q:n,kdfParams:new Wc({hash:s,cipher:o})}}));case v.publicKey.dsa:case v.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(t,e,r){if(!e||!r)throw Error("Missing key parameters");switch(t){case v.publicKey.rsaEncrypt:case v.publicKey.rsaEncryptSign:case v.publicKey.rsaSign:{const{n:i,e:n}=e,{d:a,p:s,q:o,u}=r;return ie.rsa.validateParams(i,n,a,s,o,u)}case v.publicKey.dsa:{const{p:i,q:n,g:a,y:s}=e,{x:o}=r;return ie.dsa.validateParams(i,n,a,s,o)}case v.publicKey.elgamal:{const{p:i,g:n,y:a}=e,{x:s}=r;return ie.elgamal.validateParams(i,n,a,s)}case v.publicKey.ecdsa:case v.publicKey.ecdh:{const i=ie.elliptic[v.read(v.publicKey,t)],{oid:n,Q:a}=e,{d:s}=r;return i.validateParams(n,a,s)}case v.publicKey.eddsa:{const{oid:i,Q:n}=e,{seed:a}=r;return ie.elliptic.eddsa.validateParams(i,n,a)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(t){const{blockSize:e}=zi(t),r=await qr(e),i=new Uint8Array([r[r.length-2],r[r.length-1]]);return M.concat([r,i])},generateSessionKey:function(t){const{keySize:e}=zi(t);return qr(e)},getAEADMode:function(t){const e=v.read(v.aead,t);return o3[e]},getCipher:zi});const At={cipher:Qa,hash:Ln,mode:o3,publicKey:ie,signature:z5,random:w5,pkcs1:_5,pkcs5:R5,aesKW:K5};Object.assign(At,q5);var es=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function k3(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}const A3={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(let a=0;a<i;a++)t[n+a]=e[r+a]},flattenChunks:function(t){let e,r,i,n,a;for(i=0,e=0,r=t.length;e<r;e++)i+=t[e].length;const s=new Uint8Array(i);for(n=0,e=0,r=t.length;e<r;e++)a=t[e],s.set(a,n),n+=a.length;return s}},S3={arraySet:function(t,e,r,i,n){for(let a=0;a<i;a++)t[n+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};let Ir=es?Uint8Array:Array,rr=es?Uint16Array:Array,ro=es?Int32Array:Array,E3=es?A3.flattenChunks:S3.flattenChunks,Or=es?A3.arraySet:S3.arraySet;const $r=0,F5=1,Ua=2,O5=3,we=4,j0=5,ys=6,Jt=0,ni=1,P3=2,de=-2,S1=-3,Ea=-5,Hc=-1,$5=1,bs=2,L5=3,x3=4,Gc=0,Vc=1,M3=2,Nn=8;function Xn(t){let e=t.length;for(;--e>=0;)t[e]=0}const N5=0,C3=1,j5=2,E1=29,rs=256,Ba=rs+1+E1,zn=30,P1=19,Zc=2*Ba+1,sn=15,h0=16,W5=7,x1=256,D3=16,K3=17,R3=18,W0=[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],Ts=[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],H5=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Yc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xr=Array(2*(Ba+2));Xn(Xr);const Pa=Array(2*zn);Xn(Pa);const Ta=Array(512);Xn(Ta);const za=Array(256);Xn(za);const M1=Array(E1);Xn(M1);const io=Array(zn);function d0(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let Qc,Xc,Jc;function f0(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function I3(t){return t<256?Ta[t]:Ta[256+(t>>>7)]}function qa(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Le(t,e,r){t.bi_valid>h0-r?(t.bi_buf|=e<<t.bi_valid&65535,qa(t,t.bi_buf),t.bi_buf=e>>h0-t.bi_valid,t.bi_valid+=r-h0):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function Dr(t,e,r){Le(t,r[2*e],r[2*e+1])}function U3(t,e){let r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function B3(t,e,r){const i=Array(sn+1);let n,a,s=0;for(n=1;n<=sn;n++)i[n]=s=s+r[n-1]<<1;for(a=0;a<=e;a++){const o=t[2*a+1];o!==0&&(t[2*a]=U3(i[o]++,o))}}function T3(t){let e;for(e=0;e<Ba;e++)t.dyn_ltree[2*e]=0;for(e=0;e<zn;e++)t.dyn_dtree[2*e]=0;for(e=0;e<P1;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*x1]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function z3(t){t.bi_valid>8?qa(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function t2(t,e,r,i){const n=2*e,a=2*r;return t[n]<t[a]||t[n]===t[a]&&i[e]<=i[r]}function l0(t,e,r){const i=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&t2(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!t2(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function e2(t,e,r){let i,n,a,s,o=0;if(t.last_lit!==0)do i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,i===0?Dr(t,n,e):(a=za[n],Dr(t,a+rs+1,e),s=W0[a],s!==0&&(n-=M1[a],Le(t,n,s)),i--,a=I3(i),Dr(t,a,r),s=Ts[a],s!==0&&(i-=io[a],Le(t,i,s)));while(o<t.last_lit);Dr(t,x1,e)}function p0(t,e){const r=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,a=e.stat_desc.elems;let s,o,u,c=-1;for(t.heap_len=0,t.heap_max=Zc,s=0;s<a;s++)r[2*s]!==0?(t.heap[++t.heap_len]=c=s,t.depth[s]=0):r[2*s+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,n&&(t.static_len-=i[2*u+1]);for(e.max_code=c,s=t.heap_len>>1;s>=1;s--)l0(t,r,s);u=a;do s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],l0(t,r,1),o=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=o,r[2*u]=r[2*s]+r[2*o],t.depth[u]=(t.depth[s]>=t.depth[o]?t.depth[s]:t.depth[o])+1,r[2*s+1]=r[2*o+1]=u,t.heap[1]=u++,l0(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(h,f){const m=f.dyn_tree,b=f.max_code,K=f.stat_desc.static_tree,I=f.stat_desc.has_stree,U=f.stat_desc.extra_bits,G=f.stat_desc.extra_base,Q=f.stat_desc.max_length;let Y,R,J,V,X,d,y=0;for(V=0;V<=sn;V++)h.bl_count[V]=0;for(m[2*h.heap[h.heap_max]+1]=0,Y=h.heap_max+1;Y<Zc;Y++)R=h.heap[Y],V=m[2*m[2*R+1]+1]+1,V>Q&&(V=Q,y++),m[2*R+1]=V,R>b||(h.bl_count[V]++,X=0,R>=G&&(X=U[R-G]),d=m[2*R],h.opt_len+=d*(V+X),I&&(h.static_len+=d*(K[2*R+1]+X)));if(y!==0){do{for(V=Q-1;h.bl_count[V]===0;)V--;h.bl_count[V]--,h.bl_count[V+1]+=2,h.bl_count[Q]--,y-=2}while(y>0);for(V=Q;V!==0;V--)for(R=h.bl_count[V];R!==0;)J=h.heap[--Y],J>b||(m[2*J+1]!==V&&(h.opt_len+=(V-m[2*J+1])*m[2*J],m[2*J+1]=V),R--)}}(t,e),B3(r,c,t.bl_count)}function r2(t,e,r){let i,n,a=-1,s=e[1],o=0,u=7,c=4;for(s===0&&(u=138,c=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=s,s=e[2*(i+1)+1],++o<u&&n===s||(o<c?t.bl_tree[2*n]+=o:n!==0?(n!==a&&t.bl_tree[2*n]++,t.bl_tree[2*D3]++):o<=10?t.bl_tree[2*K3]++:t.bl_tree[2*R3]++,o=0,a=n,s===0?(u=138,c=3):n===s?(u=6,c=3):(u=7,c=4))}function i2(t,e,r){let i,n,a=-1,s=e[1],o=0,u=7,c=4;for(s===0&&(u=138,c=3),i=0;i<=r;i++)if(n=s,s=e[2*(i+1)+1],!(++o<u&&n===s)){if(o<c)do Dr(t,n,t.bl_tree);while(--o!=0);else n!==0?(n!==a&&(Dr(t,n,t.bl_tree),o--),Dr(t,D3,t.bl_tree),Le(t,o-3,2)):o<=10?(Dr(t,K3,t.bl_tree),Le(t,o-3,3)):(Dr(t,R3,t.bl_tree),Le(t,o-11,7));o=0,a=n,s===0?(u=138,c=3):n===s?(u=6,c=3):(u=7,c=4)}}Xn(io);let n2=!1;function G5(t){n2||(function(){let e,r,i,n,a;const s=Array(sn+1);for(i=0,n=0;n<E1-1;n++)for(M1[n]=i,e=0;e<1<<W0[n];e++)za[i++]=n;for(za[i-1]=n,a=0,n=0;n<16;n++)for(io[n]=a,e=0;e<1<<Ts[n];e++)Ta[a++]=n;for(a>>=7;n<zn;n++)for(io[n]=a<<7,e=0;e<1<<Ts[n]-7;e++)Ta[256+a++]=n;for(r=0;r<=sn;r++)s[r]=0;for(e=0;e<=143;)Xr[2*e+1]=8,e++,s[8]++;for(;e<=255;)Xr[2*e+1]=9,e++,s[9]++;for(;e<=279;)Xr[2*e+1]=7,e++,s[7]++;for(;e<=287;)Xr[2*e+1]=8,e++,s[8]++;for(B3(Xr,Ba+1,s),e=0;e<zn;e++)Pa[2*e+1]=5,Pa[2*e]=U3(e,5);Qc=new d0(Xr,W0,rs+1,Ba,sn),Xc=new d0(Pa,Ts,0,zn,sn),Jc=new d0([],H5,0,P1,W5)}(),n2=!0),t.l_desc=new f0(t.dyn_ltree,Qc),t.d_desc=new f0(t.dyn_dtree,Xc),t.bl_desc=new f0(t.bl_tree,Jc),t.bi_buf=0,t.bi_valid=0,T3(t)}function q3(t,e,r,i){Le(t,(N5<<1)+(i?1:0),3),function(n,a,s,o){z3(n),o&&(qa(n,s),qa(n,~s)),Or(n.pending_buf,n.window,a,s,n.pending),n.pending+=s}(t,e,r,!0)}function V5(t){Le(t,C3<<1,3),Dr(t,x1,Xr),function(e){e.bi_valid===16?(qa(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)}(t)}function Z5(t,e,r,i){let n,a,s=0;t.level>0?(t.strm.data_type===M3&&(t.strm.data_type=function(o){let u,c=4093624447;for(u=0;u<=31;u++,c>>>=1)if(1&c&&o.dyn_ltree[2*u]!==0)return Gc;if(o.dyn_ltree[18]!==0||o.dyn_ltree[20]!==0||o.dyn_ltree[26]!==0)return Vc;for(u=32;u<rs;u++)if(o.dyn_ltree[2*u]!==0)return Vc;return Gc}(t)),p0(t,t.l_desc),p0(t,t.d_desc),s=function(o){let u;for(r2(o,o.dyn_ltree,o.l_desc.max_code),r2(o,o.dyn_dtree,o.d_desc.max_code),p0(o,o.bl_desc),u=P1-1;u>=3&&o.bl_tree[2*Yc[u]+1]===0;u--);return o.opt_len+=3*(u+1)+5+5+4,u}(t),n=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&e!==-1?q3(t,e,r,i):t.strategy===x3||a===n?(Le(t,(C3<<1)+(i?1:0),3),e2(t,Xr,Pa)):(Le(t,(j5<<1)+(i?1:0),3),function(o,u,c,h){let f;for(Le(o,u-257,5),Le(o,c-1,5),Le(o,h-4,4),f=0;f<h;f++)Le(o,o.bl_tree[2*Yc[f]+1],3);i2(o,o.dyn_ltree,u-1),i2(o,o.dyn_dtree,c-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),e2(t,t.dyn_ltree,t.dyn_dtree)),T3(t),i&&z3(t)}function qi(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,e===0?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(za[r]+rs+1)]++,t.dyn_dtree[2*I3(e)]++),t.last_lit===t.lit_bufsize-1}function Fa(t,e,r,i){let n=65535&t|0,a=t>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do n=n+e[i++]|0,a=a+n|0;while(--s);n%=65521,a%=65521}return n|a<<16|0}const Y5=function(){let t;const e=[];for(let r=0;r<256;r++){t=r;for(let i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();function be(t,e,r,i){const n=Y5,a=i+r;t^=-1;for(let s=i;s<a;s++)t=t>>>8^n[255&(t^e[s])];return-1^t}var Oa={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"};const Q5=9,jt=3,Ii=258,cr=Ii+jt+1,X5=32,no=42,H0=69,zs=73,qs=91,Fs=103,on=113,ya=666,me=1,xa=2,cn=3,qn=4,J5=3;function Ui(t,e){return t.msg=Oa[e],e}function a2(t){return(t<<1)-(t>4?9:0)}function Ci(t){let e=t.length;for(;--e>=0;)t[e]=0}function Si(t){const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(Or(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function Ae(t,e){Z5(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Si(t.strm)}function Vt(t,e){t.pending_buf[t.pending++]=e}function ia(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function tf(t,e,r,i){let n=t.avail_in;return n>i&&(n=i),n===0?0:(t.avail_in-=n,Or(e,t.input,t.next_in,n,r),t.state.wrap===1?t.adler=Fa(t.adler,e,n,r):t.state.wrap===2&&(t.adler=be(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)}function F3(t,e){let r,i,n=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match;const u=t.strstart>t.w_size-cr?t.strstart-(t.w_size-cr):0,c=t.window,h=t.w_mask,f=t.prev,m=t.strstart+Ii;let b=c[a+s-1],K=c[a+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do if(r=e,c[r+s]===K&&c[r+s-1]===b&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do;while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&a<m);if(i=Ii-(m-a),a=m-Ii,i>s){if(t.match_start=e,s=i,i>=o)break;b=c[a+s-1],K=c[a+s]}}while((e=f[e&h])>u&&--n!=0);return s<=t.lookahead?s:t.lookahead}function yn(t){const e=t.w_size;let r,i,n,a,s;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-cr)){Or(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,r=i;do n=t.head[--r],t.head[r]=n>=e?n-e:0;while(--i);i=e,r=i;do n=t.prev[--r],t.prev[r]=n>=e?n-e:0;while(--i);a+=e}if(t.strm.avail_in===0)break;if(i=tf(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=i,t.lookahead+t.insert>=jt)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+jt-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<jt)););}while(t.lookahead<cr&&t.strm.avail_in!==0)}function y0(t,e){let r,i;for(;;){if(t.lookahead<cr){if(yn(t),t.lookahead<cr&&e===$r)return me;if(t.lookahead===0)break}if(r=0,t.lookahead>=jt&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+jt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),r!==0&&t.strstart-r<=t.w_size-cr&&(t.match_length=F3(t,r)),t.match_length>=jt)if(i=qi(t,t.strstart-t.match_start,t.match_length-jt),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=jt){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+jt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!=0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=qi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(Ae(t,!1),t.strm.avail_out===0))return me}return t.insert=t.strstart<jt-1?t.strstart:jt-1,e===we?(Ae(t,!0),t.strm.avail_out===0?cn:qn):t.last_lit&&(Ae(t,!1),t.strm.avail_out===0)?me:xa}function kn(t,e){let r,i,n;for(;;){if(t.lookahead<cr){if(yn(t),t.lookahead<cr&&e===$r)return me;if(t.lookahead===0)break}if(r=0,t.lookahead>=jt&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+jt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=jt-1,r!==0&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-cr&&(t.match_length=F3(t,r),t.match_length<=5&&(t.strategy===$5||t.match_length===jt&&t.strstart-t.match_start>4096)&&(t.match_length=jt-1)),t.prev_length>=jt&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-jt,i=qi(t,t.strstart-1-t.prev_match,t.prev_length-jt),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+jt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!=0);if(t.match_available=0,t.match_length=jt-1,t.strstart++,i&&(Ae(t,!1),t.strm.avail_out===0))return me}else if(t.match_available){if(i=qi(t,0,t.window[t.strstart-1]),i&&Ae(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return me}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=qi(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<jt-1?t.strstart:jt-1,e===we?(Ae(t,!0),t.strm.avail_out===0?cn:qn):t.last_lit&&(Ae(t,!1),t.strm.avail_out===0)?me:xa}class _r{constructor(e,r,i,n,a){this.good_length=e,this.max_lazy=r,this.nice_length=i,this.max_chain=n,this.func=a}}const ba=[new _r(0,0,0,0,function(t,e){let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(yn(t),t.lookahead===0&&e===$r)return me;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+r;if((t.strstart===0||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Ae(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-cr&&(Ae(t,!1),t.strm.avail_out===0))return me}return t.insert=0,e===we?(Ae(t,!0),t.strm.avail_out===0?cn:qn):(t.strstart>t.block_start&&(Ae(t,!1),t.strm.avail_out),me)}),new _r(4,4,8,4,y0),new _r(4,5,16,8,y0),new _r(4,6,32,32,y0),new _r(4,4,16,16,kn),new _r(8,16,32,32,kn),new _r(8,16,128,128,kn),new _r(8,32,128,256,kn),new _r(32,128,258,1024,kn),new _r(32,258,258,4096,kn)];class ef{constructor(){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=Nn,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 rr(1146),this.dyn_dtree=new rr(122),this.bl_tree=new rr(78),Ci(this.dyn_ltree),Ci(this.dyn_dtree),Ci(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new rr(16),this.heap=new rr(573),Ci(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new rr(573),Ci(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 rf(t){const e=function(r){let i;return r&&r.state?(r.total_in=r.total_out=0,r.data_type=M3,i=r.state,i.pending=0,i.pending_out=0,i.wrap<0&&(i.wrap=-i.wrap),i.status=i.wrap?no:on,r.adler=i.wrap===2?0:1,i.last_flush=$r,G5(i),Jt):Ui(r,de)}(t);return e===Jt&&function(r){r.window_size=2*r.w_size,Ci(r.head),r.max_lazy_match=ba[r.level].max_lazy,r.good_match=ba[r.level].good_length,r.nice_match=ba[r.level].nice_length,r.max_chain_length=ba[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=jt-1,r.match_available=0,r.ins_h=0}(t.state),e}function nf(t,e){let r,i,n,a;if(!t||!t.state||e>j0||e<0)return t?Ui(t,de):de;if(i=t.state,!t.output||!t.input&&t.avail_in!==0||i.status===ya&&e!==we)return Ui(t,t.avail_out===0?Ea:de);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===no)if(i.wrap===2)t.adler=0,Vt(i,31),Vt(i,139),Vt(i,8),i.gzhead?(Vt(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)),Vt(i,255&i.gzhead.time),Vt(i,i.gzhead.time>>8&255),Vt(i,i.gzhead.time>>16&255),Vt(i,i.gzhead.time>>24&255),Vt(i,i.level===9?2:i.strategy>=bs||i.level<2?4:0),Vt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(Vt(i,255&i.gzhead.extra.length),Vt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=be(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=H0):(Vt(i,0),Vt(i,0),Vt(i,0),Vt(i,0),Vt(i,0),Vt(i,i.level===9?2:i.strategy>=bs||i.level<2?4:0),Vt(i,J5),i.status=on);else{let o=Nn+(i.w_bits-8<<4)<<8,u=-1;u=i.strategy>=bs||i.level<2?0:i.level<6?1:i.level===6?2:3,o|=u<<6,i.strstart!==0&&(o|=X5),o+=31-o%31,i.status=on,ia(i,o),i.strstart!==0&&(ia(i,t.adler>>>16),ia(i,65535&t.adler)),t.adler=1}if(i.status===H0)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=be(t.adler,i.pending_buf,i.pending-n,n)),Si(t),n=i.pending,i.pending!==i.pending_buf_size));)Vt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=be(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=zs)}else i.status=zs;if(i.status===zs)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=be(t.adler,i.pending_buf,i.pending-n,n)),Si(t),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,Vt(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(t.adler=be(t.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=qs)}else i.status=qs;if(i.status===qs)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=be(t.adler,i.pending_buf,i.pending-n,n)),Si(t),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,Vt(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(t.adler=be(t.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Fs)}else i.status=Fs;if(i.status===Fs&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Si(t),i.pending+2<=i.pending_buf_size&&(Vt(i,255&t.adler),Vt(i,t.adler>>8&255),t.adler=0,i.status=on)):i.status=on),i.pending!==0){if(Si(t),t.avail_out===0)return i.last_flush=-1,Jt}else if(t.avail_in===0&&a2(e)<=a2(r)&&e!==we)return Ui(t,Ea);if(i.status===ya&&t.avail_in!==0)return Ui(t,Ea);if(t.avail_in!==0||i.lookahead!==0||e!==$r&&i.status!==ya){var s=i.strategy===bs?function(o,u){let c;for(;;){if(o.lookahead===0&&(yn(o),o.lookahead===0)){if(u===$r)return me;break}if(o.match_length=0,c=qi(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++,c&&(Ae(o,!1),o.strm.avail_out===0))return me}return o.insert=0,u===we?(Ae(o,!0),o.strm.avail_out===0?cn:qn):o.last_lit&&(Ae(o,!1),o.strm.avail_out===0)?me:xa}(i,e):i.strategy===L5?function(o,u){let c,h,f,m;const b=o.window;for(;;){if(o.lookahead<=Ii){if(yn(o),o.lookahead<=Ii&&u===$r)return me;if(o.lookahead===0)break}if(o.match_length=0,o.lookahead>=jt&&o.strstart>0&&(f=o.strstart-1,h=b[f],h===b[++f]&&h===b[++f]&&h===b[++f])){m=o.strstart+Ii;do;while(h===b[++f]&&h===b[++f]&&h===b[++f]&&h===b[++f]&&h===b[++f]&&h===b[++f]&&h===b[++f]&&h===b[++f]&&f<m);o.match_length=Ii-(m-f),o.match_length>o.lookahead&&(o.match_length=o.lookahead)}if(o.match_length>=jt?(c=qi(o,1,o.match_length-jt),o.lookahead-=o.match_length,o.strstart+=o.match_length,o.match_length=0):(c=qi(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++),c&&(Ae(o,!1),o.strm.avail_out===0))return me}return o.insert=0,u===we?(Ae(o,!0),o.strm.avail_out===0?cn:qn):o.last_lit&&(Ae(o,!1),o.strm.avail_out===0)?me:xa}(i,e):ba[i.level].func(i,e);if(s!==cn&&s!==qn||(i.status=ya),s===me||s===cn)return t.avail_out===0&&(i.last_flush=-1),Jt;if(s===xa&&(e===F5?V5(i):e!==j0&&(q3(i,0,0,!1),e===O5&&(Ci(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Si(t),t.avail_out===0))return i.last_flush=-1,Jt}return e!==we?Jt:i.wrap<=0?ni:(i.wrap===2?(Vt(i,255&t.adler),Vt(i,t.adler>>8&255),Vt(i,t.adler>>16&255),Vt(i,t.adler>>24&255),Vt(i,255&t.total_in),Vt(i,t.total_in>>8&255),Vt(i,t.total_in>>16&255),Vt(i,t.total_in>>24&255)):(ia(i,t.adler>>>16),ia(i,65535&t.adler)),Si(t),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Jt:ni)}try{String.fromCharCode.call(null,0)}catch{}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const G0=new Ir(256);for(let t=0;t<256;t++)G0[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;function V0(t){let e,r,i,n,a=0;const s=t.length;for(i=0;i<s;i++)e=t.charCodeAt(i),(64512&e)==55296&&i+1<s&&(r=t.charCodeAt(i+1),(64512&r)==56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),a+=e<128?1:e<2048?2:e<65536?3:4;const o=new Ir(a);for(n=0,i=0;n<a;i++)e=t.charCodeAt(i),(64512&e)==55296&&i+1<s&&(r=t.charCodeAt(i+1),(64512&r)==56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?o[n++]=e:e<2048?(o[n++]=192|e>>>6,o[n++]=128|63&e):e<65536?(o[n++]=224|e>>>12,o[n++]=128|e>>>6&63,o[n++]=128|63&e):(o[n++]=240|e>>>18,o[n++]=128|e>>>12&63,o[n++]=128|e>>>6&63,o[n++]=128|63&e);return o}G0[254]=G0[254]=1;class O3{constructor(){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}}class Z0{constructor(e){this.options={level:Hc,method:Nn,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...e||{}};const r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new O3,this.strm.avail_out=0;var i,n,a=function(s,o,u,c,h,f){if(!s)return de;let m=1;if(o===Hc&&(o=6),c<0?(m=0,c=-c):c>15&&(m=2,c-=16),h<1||h>Q5||u!==Nn||c<8||c>15||o<0||o>9||f<0||f>x3)return Ui(s,de);c===8&&(c=9);const b=new ef;return s.state=b,b.strm=s,b.wrap=m,b.gzhead=null,b.w_bits=c,b.w_size=1<<b.w_bits,b.w_mask=b.w_size-1,b.hash_bits=h+7,b.hash_size=1<<b.hash_bits,b.hash_mask=b.hash_size-1,b.hash_shift=~~((b.hash_bits+jt-1)/jt),b.window=new Ir(2*b.w_size),b.head=new rr(b.hash_size),b.prev=new rr(b.w_size),b.lit_bufsize=1<<h+6,b.pending_buf_size=4*b.lit_bufsize,b.pending_buf=new Ir(b.pending_buf_size),b.d_buf=1*b.lit_bufsize,b.l_buf=3*b.lit_bufsize,b.level=o,b.strategy=f,b.method=u,rf(s)}(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==Jt)throw Error(Oa[a]);if(r.header&&(i=this.strm,n=r.header,i&&i.state&&(i.state.wrap!==2||(i.state.gzhead=n))),r.dictionary){let s;if(s=typeof r.dictionary=="string"?V0(r.dictionary):r.dictionary instanceof ArrayBuffer?new Uint8Array(r.dictionary):r.dictionary,a=function(o,u){let c,h,f,m,b,K,I,U,G=u.length;if(!o||!o.state||(c=o.state,m=c.wrap,m===2||m===1&&c.status!==no||c.lookahead))return de;for(m===1&&(o.adler=Fa(o.adler,u,G,0)),c.wrap=0,G>=c.w_size&&(m===0&&(Ci(c.head),c.strstart=0,c.block_start=0,c.insert=0),U=new Ir(c.w_size),Or(U,u,G-c.w_size,c.w_size,0),u=U,G=c.w_size),b=o.avail_in,K=o.next_in,I=o.input,o.avail_in=G,o.next_in=0,o.input=u,yn(c);c.lookahead>=jt;){h=c.strstart,f=c.lookahead-(jt-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[h+jt-1])&c.hash_mask,c.prev[h&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=h,h++;while(--f);c.strstart=h,c.lookahead=jt-1,yn(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=jt-1,c.match_available=0,o.next_in=K,o.input=I,o.avail_in=b,c.wrap=m,Jt}(this.strm,s),a!==Jt)throw Error(Oa[a]);this._dict_set=!0}}push(e,r){const{strm:i,options:{chunkSize:n}}=this;var a,s;if(this.ended)return!1;s=r===~~r?r:r===!0?we:$r,typeof e=="string"?i.input=V0(e):e instanceof ArrayBuffer?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new Ir(n),i.next_out=0,i.avail_out=n),(a=nf(i,s))!==ni&&a!==Jt)return this.onEnd(a),this.ended=!0,!1;i.avail_out!==0&&(i.avail_in!==0||s!==we&&s!==Ua)||this.onData(k3(i.output,i.next_out))}while((i.avail_in>0||i.avail_out===0)&&a!==ni);return s===we?(a=function(o){let u;return o&&o.state?(u=o.state.status,u!==no&&u!==H0&&u!==zs&&u!==qs&&u!==Fs&&u!==on&&u!==ya?Ui(o,de):(o.state=null,u===on?Ui(o,S1):Jt)):de}(this.strm),this.onEnd(a),this.ended=!0,a===Jt):s!==Ua||(this.onEnd(Jt),i.avail_out=0,!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Jt&&(this.result=E3(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}const ms=30,af=12;function sf(t,e){let r,i,n,a,s,o,u,c,h,f;const m=t.state;r=t.next_in;const b=t.input,K=r+(t.avail_in-5);i=t.next_out;const I=t.output,U=i-(e-t.avail_out),G=i+(t.avail_out-257),Q=m.dmax,Y=m.wsize,R=m.whave,J=m.wnext,V=m.window;n=m.hold,a=m.bits;const X=m.lencode,d=m.distcode,y=(1<<m.lenbits)-1,_=(1<<m.distbits)-1;t:do{a<15&&(n+=b[r++]<<a,a+=8,n+=b[r++]<<a,a+=8),s=X[n&y];e:for(;;){if(o=s>>>24,n>>>=o,a-=o,o=s>>>16&255,o===0)I[i++]=65535&s;else{if(!(16&o)){if((64&o)==0){s=X[(65535&s)+(n&(1<<o)-1)];continue e}if(32&o){m.mode=af;break t}t.msg="invalid literal/length code",m.mode=ms;break t}u=65535&s,o&=15,o&&(a<o&&(n+=b[r++]<<a,a+=8),u+=n&(1<<o)-1,n>>>=o,a-=o),a<15&&(n+=b[r++]<<a,a+=8,n+=b[r++]<<a,a+=8),s=d[n&_];r:for(;;){if(o=s>>>24,n>>>=o,a-=o,o=s>>>16&255,!(16&o)){if((64&o)==0){s=d[(65535&s)+(n&(1<<o)-1)];continue r}t.msg="invalid distance code",m.mode=ms;break t}if(c=65535&s,o&=15,a<o&&(n+=b[r++]<<a,a+=8,a<o&&(n+=b[r++]<<a,a+=8)),c+=n&(1<<o)-1,c>Q){t.msg="invalid distance too far back",m.mode=ms;break t}if(n>>>=o,a-=o,o=i-U,c>o){if(o=c-o,o>R&&m.sane){t.msg="invalid distance too far back",m.mode=ms;break t}if(h=0,f=V,J===0){if(h+=Y-o,o<u){u-=o;do I[i++]=V[h++];while(--o);h=i-c,f=I}}else if(J<o){if(h+=Y+J-o,o-=J,o<u){u-=o;do I[i++]=V[h++];while(--o);if(h=0,J<u){o=J,u-=o;do I[i++]=V[h++];while(--o);h=i-c,f=I}}}else if(h+=J-o,o<u){u-=o;do I[i++]=V[h++];while(--o);h=i-c,f=I}for(;u>2;)I[i++]=f[h++],I[i++]=f[h++],I[i++]=f[h++],u-=3;u&&(I[i++]=f[h++],u>1&&(I[i++]=f[h++]))}else{h=i-c;do I[i++]=I[h++],I[i++]=I[h++],I[i++]=I[h++],u-=3;while(u>2);u&&(I[i++]=I[h++],u>1&&(I[i++]=I[h++]))}break}}break}}while(r<K&&i<G);u=a>>3,r-=u,a-=u<<3,n&=(1<<a)-1,t.next_in=r,t.next_out=i,t.avail_in=r<K?K-r+5:5-(r-K),t.avail_out=i<G?G-i+257:257-(i-G),m.hold=n,m.bits=a}const An=15,s2=852,o2=592,c2=0,b0=1,u2=2,of=[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],cf=[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],uf=[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],hf=[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];function Ma(t,e,r,i,n,a,s,o){const u=o.bits;let c,h,f,m,b,K=0,I=0,U=0,G=0,Q=0,Y=0,R=0,J=0,V=0,X=0,d=null,y=0;const _=new rr(An+1),g=new rr(An+1);let p,E,D,nt=null,st=0;for(K=0;K<=An;K++)_[K]=0;for(I=0;I<i;I++)_[e[r+I]]++;for(Q=u,G=An;G>=1&&_[G]===0;G--);if(Q>G&&(Q=G),G===0)return n[a++]=20971520,n[a++]=20971520,o.bits=1,0;for(U=1;U<G&&_[U]===0;U++);for(Q<U&&(Q=U),J=1,K=1;K<=An;K++)if(J<<=1,J-=_[K],J<0)return-1;if(J>0&&(t===c2||G!==1))return-1;for(g[1]=0,K=1;K<An;K++)g[K+1]=g[K]+_[K];for(I=0;I<i;I++)e[r+I]!==0&&(s[g[e[r+I]]++]=I);t===c2?(d=nt=s,b=19):t===b0?(d=of,y-=257,nt=cf,st-=257,b=256):(d=uf,nt=hf,b=-1),X=0,I=0,K=U,m=a,Y=Q,R=0,f=-1,V=1<<Q;const q=V-1;if(t===b0&&V>s2||t===u2&&V>o2)return 1;for(;;){p=K-R,s[I]<b?(E=0,D=s[I]):s[I]>b?(E=nt[st+s[I]],D=d[y+s[I]]):(E=96,D=0),c=1<<K-R,h=1<<Y,U=h;do h-=c,n[m+(X>>R)+h]=p<<24|E<<16|D|0;while(h!==0);for(c=1<<K-1;X&c;)c>>=1;if(c!==0?(X&=c-1,X+=c):X=0,I++,--_[K]==0){if(K===G)break;K=e[r+s[I]]}if(K>Q&&(X&q)!==f){for(R===0&&(R=Q),m+=U,Y=K-R,J=1<<Y;Y+R<G&&(J-=_[Y+R],!(J<=0));)Y++,J<<=1;if(V+=1<<Y,t===b0&&V>s2||t===u2&&V>o2)return 1;f=X&q,n[f]=Q<<24|Y<<16|m-a|0}}return X!==0&&(n[m+X]=K-R<<24|64<<16|0),o.bits=Q,0}const df=0,$3=1,L3=2,N3=1,h2=2,d2=3,f2=4,l2=5,p2=6,y2=7,b2=8,m2=9,g2=10,ao=11,Zr=12,m0=13,w2=14,g0=15,v2=16,_2=17,k2=18,A2=19,gs=20,ws=21,S2=22,E2=23,P2=24,x2=25,M2=26,w0=27,C2=28,D2=29,ae=30,ff=852,lf=592;function K2(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}class pf{constructor(){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 rr(320),this.work=new rr(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function yf(t){let e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,function(r){let i;return r&&r.state?(i=r.state,r.total_in=r.total_out=i.total=0,r.msg="",i.wrap&&(r.adler=1&i.wrap),i.mode=N3,i.last=0,i.havedict=0,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new ro(ff),i.distcode=i.distdyn=new ro(lf),i.sane=1,i.back=-1,Jt):de}(t)):de}function bf(t,e){let r,i;return t?(i=new pf,t.state=i,i.window=null,r=function(n,a){let s,o;return n&&n.state?(o=n.state,a<0?(s=0,a=-a):(s=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?de:(o.window!==null&&o.wbits!==a&&(o.window=null),o.wrap=s,o.wbits=a,yf(n))):de}(t,e),r!==Jt&&(t.state=null),r):de}let v0,_0,R2=!0;function mf(t){if(R2){let e;for(v0=new ro(512),_0=new ro(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Ma($3,t.lens,0,288,v0,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ma(L3,t.lens,0,32,_0,0,t.work,{bits:5}),R2=!1}t.lencode=v0,t.lenbits=9,t.distcode=_0,t.distbits=5}function j3(t,e,r,i){let n;const a=t.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Ir(a.wsize)),i>=a.wsize?(Or(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),Or(a.window,e,r-i,n,a.wnext),(i-=n)?(Or(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function gf(t,e){let r,i,n,a,s,o,u,c,h,f,m,b,K,I,U,G,Q,Y,R,J,V,X,d,y,_=0,g=new Ir(4);const p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return de;r=t.state,r.mode===Zr&&(r.mode=m0),s=t.next_out,n=t.output,u=t.avail_out,a=t.next_in,i=t.input,o=t.avail_in,c=r.hold,h=r.bits,f=o,m=u,X=Jt;t:for(;;)switch(r.mode){case N3:if(r.wrap===0){r.mode=m0;break}for(;h<16;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(2&r.wrap&&c===35615){r.check=0,g[0]=255&c,g[1]=c>>>8&255,r.check=be(r.check,g,2,0),c=0,h=0,r.mode=h2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=ae;break}if((15&c)!==Nn){t.msg="unknown compression method",r.mode=ae;break}if(c>>>=4,h-=4,V=8+(15&c),r.wbits===0)r.wbits=V;else if(V>r.wbits){t.msg="invalid window size",r.mode=ae;break}r.dmax=1<<V,t.adler=r.check=1,r.mode=512&c?g2:Zr,c=0,h=0;break;case h2:for(;h<16;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(r.flags=c,(255&r.flags)!==Nn){t.msg="unknown compression method",r.mode=ae;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=ae;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(g[0]=255&c,g[1]=c>>>8&255,r.check=be(r.check,g,2,0)),c=0,h=0,r.mode=d2;case d2:for(;h<32;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}r.head&&(r.head.time=c),512&r.flags&&(g[0]=255&c,g[1]=c>>>8&255,g[2]=c>>>16&255,g[3]=c>>>24&255,r.check=be(r.check,g,4,0)),c=0,h=0,r.mode=f2;case f2:for(;h<16;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(g[0]=255&c,g[1]=c>>>8&255,r.check=be(r.check,g,2,0)),c=0,h=0,r.mode=l2;case l2:if(1024&r.flags){for(;h<16;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(g[0]=255&c,g[1]=c>>>8&255,r.check=be(r.check,g,2,0)),c=0,h=0}else r.head&&(r.head.extra=null);r.mode=p2;case p2:if(1024&r.flags&&(b=r.length,b>o&&(b=o),b&&(r.head&&(V=r.head.extra_len-r.length,r.head.extra||(r.head.extra=Array(r.head.extra_len)),Or(r.head.extra,i,a,b,V)),512&r.flags&&(r.check=be(r.check,i,b,a)),o-=b,a+=b,r.length-=b),r.length))break t;r.length=0,r.mode=y2;case y2:if(2048&r.flags){if(o===0)break t;b=0;do V=i[a+b++],r.head&&V&&r.length<65536&&(r.head.name+=String.fromCharCode(V));while(V&&b<o);if(512&r.flags&&(r.check=be(r.check,i,b,a)),o-=b,a+=b,V)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=b2;case b2:if(4096&r.flags){if(o===0)break t;b=0;do V=i[a+b++],r.head&&V&&r.length<65536&&(r.head.comment+=String.fromCharCode(V));while(V&&b<o);if(512&r.flags&&(r.check=be(r.check,i,b,a)),o-=b,a+=b,V)break t}else r.head&&(r.head.comment=null);r.mode=m2;case m2:if(512&r.flags){for(;h<16;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=ae;break}c=0,h=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Zr;break;case g2:for(;h<32;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}t.adler=r.check=K2(c),c=0,h=0,r.mode=ao;case ao:if(r.havedict===0)return t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=o,r.hold=c,r.bits=h,P3;t.adler=r.check=1,r.mode=Zr;case Zr:if(e===j0||e===ys)break t;case m0:if(r.last){c>>>=7&h,h-=7&h,r.mode=w0;break}for(;h<3;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}switch(r.last=1&c,c>>>=1,h-=1,3&c){case 0:r.mode=w2;break;case 1:if(mf(r),r.mode=gs,e===ys){c>>>=2,h-=2;break t}break;case 2:r.mode=_2;break;case 3:t.msg="invalid block type",r.mode=ae}c>>>=2,h-=2;break;case w2:for(c>>>=7&h,h-=7&h;h<32;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=ae;break}if(r.length=65535&c,c=0,h=0,r.mode=g0,e===ys)break t;case g0:r.mode=v2;case v2:if(b=r.length,b){if(b>o&&(b=o),b>u&&(b=u),b===0)break t;Or(n,i,a,b,s),o-=b,a+=b,u-=b,s+=b,r.length-=b;break}r.mode=Zr;break;case _2:for(;h<14;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(r.nlen=257+(31&c),c>>>=5,h-=5,r.ndist=1+(31&c),c>>>=5,h-=5,r.ncode=4+(15&c),c>>>=4,h-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ae;break}r.have=0,r.mode=k2;case k2:for(;r.have<r.ncode;){for(;h<3;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}r.lens[p[r.have++]]=7&c,c>>>=3,h-=3}for(;r.have<19;)r.lens[p[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,d={bits:r.lenbits},X=Ma(df,r.lens,0,19,r.lencode,0,r.work,d),r.lenbits=d.bits,X){t.msg="invalid code lengths set",r.mode=ae;break}r.have=0,r.mode=A2;case A2:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[c&(1<<r.lenbits)-1],U=_>>>24,G=_>>>16&255,Q=65535&_,!(U<=h);){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(Q<16)c>>>=U,h-=U,r.lens[r.have++]=Q;else{if(Q===16){for(y=U+2;h<y;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(c>>>=U,h-=U,r.have===0){t.msg="invalid bit length repeat",r.mode=ae;break}V=r.lens[r.have-1],b=3+(3&c),c>>>=2,h-=2}else if(Q===17){for(y=U+3;h<y;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}c>>>=U,h-=U,V=0,b=3+(7&c),c>>>=3,h-=3}else{for(y=U+7;h<y;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}c>>>=U,h-=U,V=0,b=11+(127&c),c>>>=7,h-=7}if(r.have+b>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ae;break}for(;b--;)r.lens[r.have++]=V}}if(r.mode===ae)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=ae;break}if(r.lenbits=9,d={bits:r.lenbits},X=Ma($3,r.lens,0,r.nlen,r.lencode,0,r.work,d),r.lenbits=d.bits,X){t.msg="invalid literal/lengths set",r.mode=ae;break}if(r.distbits=6,r.distcode=r.distdyn,d={bits:r.distbits},X=Ma(L3,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,d),r.distbits=d.bits,X){t.msg="invalid distances set",r.mode=ae;break}if(r.mode=gs,e===ys)break t;case gs:r.mode=ws;case ws:if(o>=6&&u>=258){t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=o,r.hold=c,r.bits=h,sf(t,m),s=t.next_out,n=t.output,u=t.avail_out,a=t.next_in,i=t.input,o=t.avail_in,c=r.hold,h=r.bits,r.mode===Zr&&(r.back=-1);break}for(r.back=0;_=r.lencode[c&(1<<r.lenbits)-1],U=_>>>24,G=_>>>16&255,Q=65535&_,!(U<=h);){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(G&&(240&G)==0){for(Y=U,R=G,J=Q;_=r.lencode[J+((c&(1<<Y+R)-1)>>Y)],U=_>>>24,G=_>>>16&255,Q=65535&_,!(Y+U<=h);){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}c>>>=Y,h-=Y,r.back+=Y}if(c>>>=U,h-=U,r.back+=U,r.length=Q,G===0){r.mode=M2;break}if(32&G){r.back=-1,r.mode=Zr;break}if(64&G){t.msg="invalid literal/length code",r.mode=ae;break}r.extra=15&G,r.mode=S2;case S2:if(r.extra){for(y=r.extra;h<y;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=E2;case E2:for(;_=r.distcode[c&(1<<r.distbits)-1],U=_>>>24,G=_>>>16&255,Q=65535&_,!(U<=h);){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if((240&G)==0){for(Y=U,R=G,J=Q;_=r.distcode[J+((c&(1<<Y+R)-1)>>Y)],U=_>>>24,G=_>>>16&255,Q=65535&_,!(Y+U<=h);){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}c>>>=Y,h-=Y,r.back+=Y}if(c>>>=U,h-=U,r.back+=U,64&G){t.msg="invalid distance code",r.mode=ae;break}r.offset=Q,r.extra=15&G,r.mode=P2;case P2:if(r.extra){for(y=r.extra;h<y;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ae;break}r.mode=x2;case x2:if(u===0)break t;if(b=m-u,r.offset>b){if(b=r.offset-b,b>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ae;break}b>r.wnext?(b-=r.wnext,K=r.wsize-b):K=r.wnext-b,b>r.length&&(b=r.length),I=r.window}else I=n,K=s-r.offset,b=r.length;b>u&&(b=u),u-=b,r.length-=b;do n[s++]=I[K++];while(--b);r.length===0&&(r.mode=ws);break;case M2:if(u===0)break t;n[s++]=r.length,u--,r.mode=ws;break;case w0:if(r.wrap){for(;h<32;){if(o===0)break t;o--,c|=i[a++]<<h,h+=8}if(m-=u,t.total_out+=m,r.total+=m,m&&(t.adler=r.check=r.flags?be(r.check,n,m,s-m):Fa(r.check,n,m,s-m)),m=u,(r.flags?c:K2(c))!==r.check){t.msg="incorrect data check",r.mode=ae;break}c=0,h=0}r.mode=C2;case C2:if(r.wrap&&r.flags){for(;h<32;){if(o===0)break t;o--,c+=i[a++]<<h,h+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=ae;break}c=0,h=0}r.mode=D2;case D2:X=ni;break t;case ae:X=S1;break t;default:return de}return t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=o,r.hold=c,r.bits=h,(r.wsize||m!==t.avail_out&&r.mode<ae&&(r.mode<w0||e!==we))&&j3(t,t.output,t.next_out,m-t.avail_out),f-=t.avail_in,m-=t.avail_out,t.total_in+=f,t.total_out+=m,r.total+=m,r.wrap&&m&&(t.adler=r.check=r.flags?be(r.check,n,m,t.next_out-m):Fa(r.check,n,m,t.next_out-m)),t.data_type=r.bits+(r.last?64:0)+(r.mode===Zr?128:0)+(r.mode===gs||r.mode===g0?256:0),(f===0&&m===0||e===we)&&X===Jt&&(X=Ea),X}function I2(t,e){const r=e.length;let i,n;return t&&t.state?(i=t.state,i.wrap!==0&&i.mode!==ao?de:i.mode===ao&&(n=1,n=Fa(n,e,r,0),n!==i.check)?S1:(j3(t,e,r,r),i.havedict=1,Jt)):de}class wf{constructor(){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}}class U2{constructor(e){this.options={chunkSize:16384,windowBits:0,...e||{}};const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),!(r.windowBits>=0&&r.windowBits<16)||e&&e.windowBits||(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(15&r.windowBits)==0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new O3,this.strm.avail_out=0;let i=bf(this.strm,r.windowBits);if(i!==Jt||(this.header=new wf,function(n,a){let s;n&&n.state&&(s=n.state,(2&s.wrap)==0||(s.head=a,a.done=!1))}(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=V0(r.dictionary):r.dictionary instanceof ArrayBuffer&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(i=I2(this.strm,r.dictionary),i!==Jt))))throw Error(Oa[i])}push(e,r){const{strm:i,options:{chunkSize:n,dictionary:a}}=this;let s,o,u=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?we:$r,typeof e=="string"?i.input=function(c){const h=new Ir(c.length);for(let f=0,m=h.length;f<m;f++)h[f]=c.charCodeAt(f);return h}(e):e instanceof ArrayBuffer?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new Ir(n),i.next_out=0,i.avail_out=n),s=gf(i,$r),s===P3&&a&&(s=I2(this.strm,a)),s===Ea&&u===!0&&(s=Jt,u=!1),s!==ni&&s!==Jt)return this.onEnd(s),this.ended=!0,!1;i.next_out&&(i.avail_out!==0&&s!==ni&&(i.avail_in!==0||o!==we&&o!==Ua)||this.onData(k3(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(u=!0)}while((i.avail_in>0||i.avail_out===0)&&s!==ni);return s===ni&&(o=we),o===we?(s=function(c){if(!c||!c.state)return de;const h=c.state;return h.window&&(h.window=null),c.state=null,Jt}(this.strm),this.onEnd(s),this.ended=!0,s===Jt):o!==Ua||(this.onEnd(Jt),i.avail_out=0,!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Jt&&(this.result=E3(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}var B2=[0,1,3,7,15,31,63,127,255],ma=function(t){this.stream=t,this.bitOffset=0,this.curByte=0,this.hasByte=!1};ma.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},ma.prototype.read=function(t){for(var e=0;t>0;){this._ensureByte();var r=8-this.bitOffset;if(t>=r)e<<=r,e|=B2[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,t-=r;else{e<<=t;var i=r-t;e|=(this.curByte&B2[t]<<i)>>i,this.bitOffset+=t,t=0}}return e},ma.prototype.seek=function(t){var e=t%8,r=(t-e)/8;this.bitOffset=e,this.stream.seek(r),this.hasByte=!1},ma.prototype.pi=function(){var t,e=new Uint8Array(6);for(t=0;t<e.length;t++)e[t]=this.read(8);return function(r){return Array.prototype.map.call(r,i=>("00"+i.toString(16)).slice(-2)).join("")}(e)};var vf=ma,tn=function(){};tn.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},tn.prototype.read=function(t,e,r){for(var i=0;i<r;){var n=this.readByte();if(n<0)return i===0?-1:i;t[e++]=n,i++}return i},tn.prototype.seek=function(t){throw Error("abstract method seek() not implemented")},tn.prototype.writeByte=function(t){throw Error("abstract method readByte() not implemented")},tn.prototype.write=function(t,e,r){var i;for(i=0;i<r;i++)this.writeByte(t[e++]);return r},tn.prototype.flush=function(){};var k0,W3=tn,_f=(k0=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 t=4294967295;this.getCRC=function(){return~t>>>0},this.updateCRC=function(e){t=t<<8^k0[255&(t>>>24^e)]},this.updateCRCRun=function(e,r){for(;r-- >0;)t=t<<8^k0[255&(t>>>24^e)]}}),T2=function(t,e){var r,i=t[e];for(r=e;r>0;r--)t[r]=t[r-1];return t[0]=i,i},se={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},Ei={};Ei[se.LAST_BLOCK]="Bad file checksum",Ei[se.NOT_BZIP_DATA]="Not bzip data",Ei[se.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Ei[se.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Ei[se.DATA_ERROR]="Data error",Ei[se.OUT_OF_MEMORY]="Out of memory",Ei[se.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var _e=function(t,e){var r=Ei[t]||"unknown error";e&&(r+=": "+e);var i=new TypeError(r);throw i.errorCode=t,i},ga=function(t,e){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(t,e)};ga.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new _f,!0):(this.writeCount=-1,!1)},ga.prototype._start_bunzip=function(t,e){var r=new Uint8Array(4);t.read(r,0,4)===4&&String.fromCharCode(r[0],r[1],r[2])==="BZh"||_e(se.NOT_BZIP_DATA,"bad magic");var i=r[3]-48;(i<1||i>9)&&_e(se.NOT_BZIP_DATA,"level out of range"),this.reader=new vf(t),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=e,this.streamCRC=0},ga.prototype._get_next_block=function(){var t,e,r,i=this.reader,n=i.pi();if(n==="177245385090")return!1;n!=="314159265359"&&_e(se.NOT_BZIP_DATA),this.targetBlockCRC=i.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,i.read(1)&&_e(se.OBSOLETE_INPUT);var a=i.read(24);a>this.dbufSize&&_e(se.DATA_ERROR,"initial position out of bounds");var s=i.read(16),o=new Uint8Array(256),u=0;for(t=0;t<16;t++)if(s&1<<15-t){var c=16*t;for(r=i.read(16),e=0;e<16;e++)r&1<<15-e&&(o[u++]=c+e)}var h=i.read(3);(h<2||h>6)&&_e(se.DATA_ERROR);var f=i.read(15);f===0&&_e(se.DATA_ERROR);var m=new Uint8Array(256);for(t=0;t<h;t++)m[t]=t;var b=new Uint8Array(f);for(t=0;t<f;t++){for(e=0;i.read(1);e++)e>=h&&_e(se.DATA_ERROR);b[t]=T2(m,e)}var K,I=u+2,U=[];for(e=0;e<h;e++){var G,Q,Y=new Uint8Array(I),R=new Uint16Array(21);for(s=i.read(5),t=0;t<I;t++){for(;(s<1||s>20)&&_e(se.DATA_ERROR),i.read(1);)i.read(1)?s--:s++;Y[t]=s}for(G=Q=Y[0],t=1;t<I;t++)Y[t]>Q?Q=Y[t]:Y[t]<G&&(G=Y[t]);K={},U.push(K),K.permute=new Uint16Array(258),K.limit=new Uint32Array(22),K.base=new Uint32Array(21),K.minLen=G,K.maxLen=Q;var J=0;for(t=G;t<=Q;t++)for(R[t]=K.limit[t]=0,s=0;s<I;s++)Y[s]===t&&(K.permute[J++]=s);for(t=0;t<I;t++)R[Y[t]]++;for(J=s=0,t=G;t<Q;t++)J+=R[t],K.limit[t]=J-1,J<<=1,s+=R[t],K.base[t+1]=J-s;K.limit[Q+1]=Number.MAX_VALUE,K.limit[Q]=J+R[Q]-1,K.base[G]=0}var V=new Uint32Array(256);for(t=0;t<256;t++)m[t]=t;var X,d=0,y=0,_=0,g=this.dbuf=new Uint32Array(this.dbufSize);for(I=0;;){for(I--||(I=49,_>=f&&_e(se.DATA_ERROR),K=U[b[_++]]),t=K.minLen,e=i.read(t);t>K.maxLen&&_e(se.DATA_ERROR),!(e<=K.limit[t]);t++)e=e<<1|i.read(1);((e-=K.base[t])<0||e>=258)&&_e(se.DATA_ERROR);var p=K.permute[e];if(p!==0&&p!==1){if(d)for(d=0,y+s>this.dbufSize&&_e(se.DATA_ERROR),V[X=o[m[0]]]+=s;s--;)g[y++]=X;if(p>u)break;y>=this.dbufSize&&_e(se.DATA_ERROR),V[X=o[X=T2(m,t=p-1)]]++,g[y++]=X}else d||(d=1,s=0),s+=p===0?d:2*d,d<<=1}for((a<0||a>=y)&&_e(se.DATA_ERROR),e=0,t=0;t<256;t++)r=e+V[t],V[t]=e,e=r;for(t=0;t<y;t++)g[V[X=255&g[t]]]|=t<<8,V[X]++;var E=0,D=0,nt=0;return y&&(D=255&(E=g[a]),E>>=8,nt=-1),this.writePos=E,this.writeCurrent=D,this.writeCount=y,this.writeRun=nt,!0},ga.prototype._read_bunzip=function(t,e){var r,i,n;if(this.writeCount<0)return 0;var a=this.dbuf,s=this.writePos,o=this.writeCurrent,u=this.writeCount;this.outputsize;for(var c=this.writeRun;u;){for(u--,i=o,o=255&(s=a[s]),s>>=8,c++==3?(r=o,n=i,o=-1):(r=1,n=o),this.blockCRC.updateCRCRun(n,r);r--;)this.outputStream.writeByte(n),this.nextoutput++;o!=i&&(c=0)}return this.writeCount=u,this.blockCRC.getCRC()!==this.targetBlockCRC&&_e(se.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var kf=function(t){if("readByte"in t)return t;var e=new W3;return e.pos=0,e.readByte=function(){return t[this.pos++]},e.seek=function(r){this.pos=r},e.eof=function(){return this.pos>=t.length},e},Af=function(t){var e=new W3,r=!0;if(t)if(typeof t=="number")e.buffer=new Uint8Array(t),r=!1;else{if("writeByte"in t)return t;e.buffer=t,r=!1}else e.buffer=new Uint8Array(16384);return e.pos=0,e.writeByte=function(i){if(r&&this.pos>=this.buffer.length){var n=new Uint8Array(2*this.buffer.length);n.set(this.buffer),this.buffer=n}this.buffer[this.pos++]=i},e.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var i=new Uint8Array(this.pos);i.set(this.buffer.subarray(0,this.pos)),this.buffer=i}return this.buffer},e._coerced=!0,e},z2=function(t,e,r){for(var i=kf(t),n=Af(e),a=new ga(i,n);!("eof"in i)||!i.eof();)if(a._init_block())a._read_bunzip();else{var s=a.reader.read(32)>>>0;if(s!==a.streamCRC&&_e(se.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+s.toString(16)+")"),!r||!("eof"in i)||i.eof())break;a._start_bunzip(i,n)}if("getBuffer"in n)return n.getBuffer()};class Jn{static get tag(){return v.packet.literalData}constructor(e=new Date){this.format=v.literal.utf8,this.date=M.normalizeDate(e),this.text=null,this.data=null,this.filename=""}setText(e,r=v.literal.utf8){this.format=r,this.text=e,this.data=null}getText(e=!1){return(this.text===null||M.isStream(this.text))&&(this.text=M.decodeUTF8(M.nativeEOL(this.getBytes(e)))),this.text}setBytes(e,r){this.format=r,this.data=e,this.text=null}getBytes(e=!1){return this.data===null&&(this.data=M.canonicalizeEOL(M.encodeUTF8(this.text))),e?Un(this.data):this.data}setFilename(e){this.filename=e}getFilename(){return this.filename}async read(e){await Ko(e,async r=>{const i=await r.readByte(),n=await r.readByte();this.filename=M.decodeUTF8(await r.readBytes(n)),this.date=M.readDate(await r.readBytes(4));let a=r.remainder();ce(a)&&(a=await he(a)),this.setBytes(a,i)})}writeHeader(){const e=M.encodeUTF8(this.filename),r=new Uint8Array([e.length]),i=new Uint8Array([this.format]),n=M.writeDate(this.date);return M.concatUint8Array([i,r,e,n])}write(){const e=this.writeHeader(),r=this.getBytes();return M.concat([e,r])}}const na=Symbol("verified"),Sf=new Set([v.signatureSubpacket.issuer,v.signatureSubpacket.issuerFingerprint,v.signatureSubpacket.embeddedSignature]);class Ee{static get tag(){return v.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,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 Oi,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.revoked=null,this[na]=null}read(e){let r=0;if(this.version=e[r++],this.version!==4&&this.version!==5)throw new fe(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=e[r++],this.publicKeyAlgorithm=e[r++],this.hashAlgorithm=e[r++],r+=this.readSubPackets(e.subarray(r,e.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=e.subarray(0,r),r+=this.readSubPackets(e.subarray(r,e.length),!1),this.signedHashValue=e.subarray(r,r+2),r+=2,this.params=At.signature.parseSignatureParams(this.publicKeyAlgorithm,e.subarray(r,e.length))}writeParams(){return this.params instanceof Promise?Ni(async()=>At.serializeParams(this.publicKeyAlgorithm,await this.params)):At.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const e=[];return e.push(this.signatureData),e.push(this.writeUnhashedSubPackets()),e.push(this.signedHashValue),e.push(this.writeParams()),M.concat(e)}async sign(e,r,i=new Date,n=!1){e.version===5?this.version=5:this.version=4;const a=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=M.normalizeDate(i),this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyID=e.getKeyID(),a.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=M.concat(a);const s=this.toHash(this.signatureType,r,n),o=await this.hash(this.signatureType,r,s,n);this.signedHashValue=Se(pn(o),0,2);const u=async()=>At.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,e.publicParams,e.privateParams,s,await he(o));M.isStream(o)?this.params=u():(this.params=await u(),this[na]=!0)}writeHashedSubPackets(){const e=v.signatureSubpacket,r=[];let i;if(this.created===null)throw Error("Missing signature creation time");r.push(re(e.signatureCreationTime,!0,M.writeDate(this.created))),this.signatureExpirationTime!==null&&r.push(re(e.signatureExpirationTime,!0,M.writeNumber(this.signatureExpirationTime,4))),this.exportable!==null&&r.push(re(e.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),this.trustLevel!==null&&(i=new Uint8Array([this.trustLevel,this.trustAmount]),r.push(re(e.trustSignature,!0,i))),this.regularExpression!==null&&r.push(re(e.regularExpression,!0,this.regularExpression)),this.revocable!==null&&r.push(re(e.revocable,!0,new Uint8Array([this.revocable?1:0]))),this.keyExpirationTime!==null&&r.push(re(e.keyExpirationTime,!0,M.writeNumber(this.keyExpirationTime,4))),this.preferredSymmetricAlgorithms!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.preferredSymmetricAlgorithms)),r.push(re(e.preferredSymmetricAlgorithms,!1,i))),this.revocationKeyClass!==null&&(i=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),i=M.concat([i,this.revocationKeyFingerprint]),r.push(re(e.revocationKey,!1,i))),this.issuerKeyID.isNull()||this.issuerKeyVersion===5||r.push(re(e.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach(({name:s,value:o,humanReadable:u,critical:c})=>{i=[new Uint8Array([u?128:0,0,0,0])];const h=M.encodeUTF8(s);i.push(M.writeNumber(h.length,2)),i.push(M.writeNumber(o.length,2)),i.push(h),i.push(o),i=M.concat(i),r.push(re(e.notationData,c,i))}),this.preferredHashAlgorithms!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.preferredHashAlgorithms)),r.push(re(e.preferredHashAlgorithms,!1,i))),this.preferredCompressionAlgorithms!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.preferredCompressionAlgorithms)),r.push(re(e.preferredCompressionAlgorithms,!1,i))),this.keyServerPreferences!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.keyServerPreferences)),r.push(re(e.keyServerPreferences,!1,i))),this.preferredKeyServer!==null&&r.push(re(e.preferredKeyServer,!1,M.encodeUTF8(this.preferredKeyServer))),this.isPrimaryUserID!==null&&r.push(re(e.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),this.policyURI!==null&&r.push(re(e.policyURI,!1,M.encodeUTF8(this.policyURI))),this.keyFlags!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.keyFlags)),r.push(re(e.keyFlags,!0,i))),this.signersUserID!==null&&r.push(re(e.signersUserID,!1,M.encodeUTF8(this.signersUserID))),this.reasonForRevocationFlag!==null&&(i=M.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),r.push(re(e.reasonForRevocation,!0,i))),this.features!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.features)),r.push(re(e.features,!1,i))),this.signatureTargetPublicKeyAlgorithm!==null&&(i=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],i.push(M.stringToUint8Array(this.signatureTargetHash)),i=M.concat(i),r.push(re(e.signatureTarget,!0,i))),this.embeddedSignature!==null&&r.push(re(e.embeddedSignature,!0,this.embeddedSignature.write())),this.issuerFingerprint!==null&&(i=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],i=M.concat(i),r.push(re(e.issuerFingerprint,this.version===5,i))),this.preferredAEADAlgorithms!==null&&(i=M.stringToUint8Array(M.uint8ArrayToString(this.preferredAEADAlgorithms)),r.push(re(e.preferredAEADAlgorithms,!1,i)));const n=M.concat(r),a=M.writeNumber(n.length,2);return M.concat([a,n])}writeUnhashedSubPackets(){const e=[];this.unhashedSubpackets.forEach(n=>{e.push(ts(n.length)),e.push(n)});const r=M.concat(e),i=M.writeNumber(r.length,2);return M.concat([i,r])}readSubPacket(e,r=!0){let i=0;const n=!!(128&e[i]),a=127&e[i];if(r||(this.unhashedSubpackets.push(e.subarray(i,e.length)),Sf.has(a)))switch(i++,a){case v.signatureSubpacket.signatureCreationTime:this.created=M.readDate(e.subarray(i,e.length));break;case v.signatureSubpacket.signatureExpirationTime:{const s=M.readNumber(e.subarray(i,e.length));this.signatureNeverExpires=s===0,this.signatureExpirationTime=s;break}case v.signatureSubpacket.exportableCertification:this.exportable=e[i++]===1;break;case v.signatureSubpacket.trustSignature:this.trustLevel=e[i++],this.trustAmount=e[i++];break;case v.signatureSubpacket.regularExpression:this.regularExpression=e[i];break;case v.signatureSubpacket.revocable:this.revocable=e[i++]===1;break;case v.signatureSubpacket.keyExpirationTime:{const s=M.readNumber(e.subarray(i,e.length));this.keyExpirationTime=s,this.keyNeverExpires=s===0;break}case v.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...e.subarray(i,e.length)];break;case v.signatureSubpacket.revocationKey:this.revocationKeyClass=e[i++],this.revocationKeyAlgorithm=e[i++],this.revocationKeyFingerprint=e.subarray(i,i+20);break;case v.signatureSubpacket.issuer:this.issuerKeyID.read(e.subarray(i,e.length));break;case v.signatureSubpacket.notationData:{const s=!!(128&e[i]);i+=4;const o=M.readNumber(e.subarray(i,i+2));i+=2;const u=M.readNumber(e.subarray(i,i+2));i+=2;const c=M.decodeUTF8(e.subarray(i,i+o)),h=e.subarray(i+o,i+o+u);this.rawNotations.push({name:c,humanReadable:s,value:h,critical:n}),s&&(this.notations[c]=M.decodeUTF8(h));break}case v.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...e.subarray(i,e.length)];break;case v.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...e.subarray(i,e.length)];break;case v.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...e.subarray(i,e.length)];break;case v.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=M.decodeUTF8(e.subarray(i,e.length));break;case v.signatureSubpacket.primaryUserID:this.isPrimaryUserID=e[i++]!==0;break;case v.signatureSubpacket.policyURI:this.policyURI=M.decodeUTF8(e.subarray(i,e.length));break;case v.signatureSubpacket.keyFlags:this.keyFlags=[...e.subarray(i,e.length)];break;case v.signatureSubpacket.signersUserID:this.signersUserID=M.decodeUTF8(e.subarray(i,e.length));break;case v.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=e[i++],this.reasonForRevocationString=M.decodeUTF8(e.subarray(i,e.length));break;case v.signatureSubpacket.features:this.features=[...e.subarray(i,e.length)];break;case v.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=e[i++],this.signatureTargetHashAlgorithm=e[i++];const s=At.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=M.uint8ArrayToString(e.subarray(i,i+s));break}case v.signatureSubpacket.embeddedSignature:this.embeddedSignature=new Ee,this.embeddedSignature.read(e.subarray(i,e.length));break;case v.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=e[i++],this.issuerFingerprint=e.subarray(i,e.length),this.issuerKeyVersion===5?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case v.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...e.subarray(i,e.length)];break;default:{const s=Error("Unknown signature subpacket type "+a);if(n)throw s;M.printDebug(s)}}}readSubPackets(e,r=!0,i){const n=M.readNumber(e.subarray(0,2));let a=2;for(;a<2+n;){const s=h3(e.subarray(a,e.length));a+=s.offset,this.readSubPacket(e.subarray(a,a+s.len),r,i),a+=s.len}return a}toSign(e,r){const i=v.signature;switch(e){case i.binary:return r.text!==null?M.encodeUTF8(r.getText(!0)):r.getBytes(!0);case i.text:{const n=r.getBytes(!0);return M.canonicalizeEOL(n)}case i.standalone:return new Uint8Array(0);case i.certGeneric:case i.certPersona:case i.certCasual:case i.certPositive:case i.certRevocation:{let n,a;if(r.userID)a=180,n=r.userID;else{if(!r.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");a=209,n=r.userAttribute}const s=n.write();return M.concat([this.toSign(i.key,r),new Uint8Array([a]),M.writeNumber(s.length,4),s])}case i.subkeyBinding:case i.subkeyRevocation:case i.keyBinding:return M.concat([this.toSign(i.key,r),this.toSign(i.key,{key:r.bind})]);case i.key:if(r.key===void 0)throw Error("Key packet is required for this signature.");return r.key.writeForHash(this.version);case i.keyRevocation:return this.toSign(i.key,r);case i.timestamp:return new Uint8Array(0);case i.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(e,r){let i=0;return oe(pn(this.signatureData),n=>{i+=n.length},()=>{const n=[];return this.version!==5||this.signatureType!==v.signature.binary&&this.signatureType!==v.signature.text||(r?n.push(new Uint8Array(6)):n.push(e.writeHeader())),n.push(new Uint8Array([this.version,255])),this.version===5&&n.push(new Uint8Array(4)),n.push(M.writeNumber(i,4)),M.concat(n)})}toHash(e,r,i=!1){const n=this.toSign(e,r);return M.concat([n,this.signatureData,this.calculateTrailer(r,i)])}async hash(e,r,i,n=!1){return i||(i=this.toHash(e,r,n)),At.hash.digest(this.hashAlgorithm,i)}async verify(e,r,i,n=new Date,a=!1,s=vt){if(!this.issuerKeyID.equals(e.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const o=r===v.signature.binary||r===v.signature.text;if(!(this[na]&&!o)){let c,h;if(this.hashed?h=await this.hashed:(c=this.toHash(r,i,a),h=await this.hash(r,i,c)),h=await he(h),this.signedHashValue[0]!==h[0]||this.signedHashValue[1]!==h[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[na]=await At.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,e.publicParams,c,h),!this[na])throw Error("Signature verification failed")}const u=M.normalizeDate(n);if(u&&this.created>u)throw Error("Signature creation time is in the future");if(u&&u>=this.getExpirationTime())throw Error("Signature is expired");if(s.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+v.read(v.hash,this.hashAlgorithm).toUpperCase());if(s.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[v.signature.binary,v.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+v.read(v.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach(({name:c,critical:h})=>{if(h&&s.knownNotations.indexOf(c)<0)throw Error("Unknown critical notation: "+c)}),this.revocationKeyClass!==null)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(e=new Date){const r=M.normalizeDate(e);return r!==null&&!(this.created<=r&&r<this.getExpirationTime())}getExpirationTime(){return this.signatureNeverExpires?1/0:new Date(this.created.getTime()+1e3*this.signatureExpirationTime)}}function re(t,e,r){const i=[];return i.push(ts(r.length+1)),i.push(new Uint8Array([(e?128:0)|t])),i.push(r),M.concat(i)}class ur{static get tag(){return v.packet.onePassSignature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.issuerKeyID=null,this.flags=null}read(e){let r=0;if(this.version=e[r++],this.version!==3)throw new fe(`Version ${this.version} of the one-pass signature packet is unsupported.`);return this.signatureType=e[r++],this.hashAlgorithm=e[r++],this.publicKeyAlgorithm=e[r++],this.issuerKeyID=new Oi,this.issuerKeyID.read(e.subarray(r,r+8)),r+=8,this.flags=e[r++],this}write(){const e=new Uint8Array([3,this.signatureType,this.hashAlgorithm,this.publicKeyAlgorithm]),r=new Uint8Array([this.flags]);return M.concatUint8Array([e,this.issuerKeyID.write(),r])}calculateTrailer(...e){return Ni(async()=>Ee.prototype.calculateTrailer.apply(await this.correspondingSig,e))}async verify(){const e=await this.correspondingSig;if(!e||e.constructor.tag!==v.packet.signature)throw Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)}}function Ef(t,e){if(!e[t]){let r;try{r=v.read(v.packet,t)}catch{throw new fe("Unknown packet type with tag: "+t)}throw Error("Packet not allowed in this context: "+r)}return new e[t]}ur.prototype.hash=Ee.prototype.hash,ur.prototype.toHash=Ee.prototype.toHash,ur.prototype.toSign=Ee.prototype.toSign;class Qt extends Array{static async fromBinary(e,r,i=vt){const n=new Qt;return await n.read(e,r,i),n}async read(e,r,i=vt){this.stream=ci(e,async(a,s)=>{const o=We(s);try{for(;;)if(await o.ready,await E5(a,async u=>{try{if(u.tag===v.packet.marker||u.tag===v.packet.trust)return;const c=Ef(u.tag,r);c.packets=new Qt,c.fromStream=M.isStream(u.packet),await c.read(u.packet,i),await o.write(c)}catch(c){const h=!i.ignoreUnsupportedPackets&&c instanceof fe,f=!(i.ignoreMalformedPackets||c instanceof fe);if(h||f||Us(u.tag))await o.abort(c);else{const m=new N0(u.tag,u.packet);await o.write(m)}M.printDebugError(c)}}))return await o.ready,void await o.close()}catch(u){await o.abort(u)}});const n=Nr(this.stream);for(;;){const{done:a,value:s}=await n.read();if(a?this.stream=null:this.push(s),a||Us(s.constructor.tag))break}n.releaseLock()}write(){const e=[];for(let r=0;r<this.length;r++){const i=this[r]instanceof N0?this[r].tag:this[r].constructor.tag,n=this[r].write();if(M.isStream(n)&&Us(this[r].constructor.tag)){let a=[],s=0;const o=512;e.push(d3(i)),e.push(oe(n,u=>{if(a.push(u),s+=u.length,s>=o){const c=Math.min(Math.log(s)/Math.LN2|0,30),h=2**c,f=M.concat([S5(c)].concat(a));return a=[f.subarray(1+h)],s=a[0].length,f.subarray(0,1+h)}},()=>M.concat([ts(s)].concat(a))))}else{if(M.isStream(n)){let a=0;e.push(oe(pn(n),s=>{a+=s.length},()=>Fc(i,a)))}else e.push(Fc(i,n.length));e.push(n)}}return M.concat(e)}filterByTag(...e){const r=new Qt,i=n=>a=>n===a;for(let n=0;n<this.length;n++)e.some(i(this[n].constructor.tag))&&r.push(this[n]);return r}findPacket(e){return this.find(r=>r.constructor.tag===e)}indexOfTag(...e){const r=[],i=this,n=a=>s=>a===s;for(let a=0;a<this.length;a++)e.some(n(i[a].constructor.tag))&&r.push(a);return r}}const Pf=M.constructAllowedPackets([Jn,ur,Ee]);class is{static get tag(){return v.packet.compressedData}constructor(e=vt){this.packets=null,this.algorithm=e.preferredCompressionAlgorithm,this.compressed=null,this.deflateLevel=e.deflateLevel}async read(e,r=vt){await Ko(e,async i=>{this.algorithm=await i.readByte(),this.compressed=i.remainder(),await this.decompress(r)})}write(){return this.compressed===null&&this.compress(),M.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(e=vt){const r=v.read(v.compression,this.algorithm),i=Mf[r];if(!i)throw Error(r+" decompression not supported");this.packets=await Qt.fromBinary(i(this.compressed),Pf,e)}compress(){const e=v.read(v.compression,this.algorithm),r=xf[e];if(!r)throw Error(e+" compression not supported");this.compressed=r(this.packets.write(),this.deflateLevel)}}const Kr=M.getNodeZlib();function q2(t){return t}function so(t,e,r={}){return function(i){return!M.isStream(i)||ce(i)?Ni(()=>he(i).then(n=>new Promise((a,s)=>{t(n,r,(o,u)=>{if(o)return s(o);a(u)})}))):Do(b1(i).pipe(e(r)))}}function oo(t,e={}){return function(r){const i=new t(e);return oe(r,n=>{if(n.length)return i.push(n,Ua),i.result},()=>{if(t===Z0)return i.push([],we),i.result})}}function F2(t){return function(e){return Ni(async()=>t(await he(e)))}}const xf=Kr?{zip:(t,e)=>so(Kr.deflateRaw,Kr.createDeflateRaw,{level:e})(t),zlib:(t,e)=>so(Kr.deflate,Kr.createDeflate,{level:e})(t)}:{zip:(t,e)=>oo(Z0,{raw:!0,level:e})(t),zlib:(t,e)=>oo(Z0,{level:e})(t)},Mf=Kr?{uncompressed:q2,zip:so(Kr.inflateRaw,Kr.createInflateRaw),zlib:so(Kr.inflate,Kr.createInflate),bzip2:F2(z2)}:{uncompressed:q2,zip:oo(U2,{raw:!0}),zlib:oo(U2),bzip2:F2(z2)},Cf=M.constructAllowedPackets([Jn,is,ur,Ee]);class H3{static get tag(){return v.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(e){await Ko(e,async r=>{const i=await r.readByte();if(i!==1)throw new fe(`Version ${i} of the SEIP packet is unsupported.`);this.encrypted=r.remainder()})}write(){return M.concat([new Uint8Array([1]),this.encrypted])}async encrypt(e,r,i=vt){const{blockSize:n}=At.getCipher(e);let a=this.packets.write();ce(a)&&(a=await he(a));const s=await At.getPrefixRandom(e),o=new Uint8Array([211,20]),u=M.concat([s,a,o]),c=await At.hash.sha1(Un(u)),h=M.concat([u,c]);return this.encrypted=await At.mode.cfb.encrypt(e,r,h,new Uint8Array(n),i),!0}async decrypt(e,r,i=vt){const{blockSize:n}=At.getCipher(e);let a=pn(this.encrypted);ce(a)&&(a=await he(a));const s=await At.mode.cfb.decrypt(e,r,a,new Uint8Array(n)),o=Se(Un(s),-20),u=Se(s,0,-20),c=Promise.all([he(await At.hash.sha1(Un(u))),he(o)]).then(([m,b])=>{if(!M.equalsUint8Array(m,b))throw Error("Modification detected.");return new Uint8Array}),h=Se(u,n+2);let f=Se(h,0,-2);return f=Ne([f,Ni(()=>c)]),M.isStream(a)&&i.allowUnauthenticatedStream||(f=await he(f)),this.packets=await Qt.fromBinary(f,Cf,i),!0}}const Df=M.constructAllowedPackets([Jn,is,ur,Ee]);class qo{static get tag(){return v.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=v.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(e){await Ko(e,async r=>{const i=await r.readByte();if(i!==1)throw new fe(`Version ${i} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await r.readByte(),this.aeadAlgorithm=await r.readByte(),this.chunkSizeByte=await r.readByte();const n=At.getAEADMode(this.aeadAlgorithm);this.iv=await r.readBytes(n.ivLength),this.encrypted=r.remainder()})}write(){return M.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(e,r,i=vt){this.packets=await Qt.fromBinary(await this.crypt("decrypt",r,pn(this.encrypted)),Df,i)}async encrypt(e,r,i=vt){this.cipherAlgorithm=e;const{ivLength:n}=At.getAEADMode(this.aeadAlgorithm);this.iv=At.random.getRandomBytes(n),this.chunkSizeByte=i.aeadChunkSizeByte;const a=this.packets.write();this.encrypted=await this.crypt("encrypt",r,a)}async crypt(e,r,i){const n=At.getAEADMode(this.aeadAlgorithm),a=await n(this.cipherAlgorithm,r),s=e==="decrypt"?n.tagLength:0,o=e==="encrypt"?n.tagLength:0,u=2**(this.chunkSizeByte+6)+s,c=new ArrayBuffer(21),h=new Uint8Array(c,0,13),f=new Uint8Array(c),m=new DataView(c),b=new Uint8Array(c,5,8);h.set([192|qo.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let K=0,I=Promise.resolve(),U=0,G=0;const Q=this.iv;return ci(i,async(Y,R)=>{if(M.isStream(Y)!=="array"){const X=new $n({},{highWaterMark:M.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:d=>d.length});Fi(X.readable,R),R=X.writable}const J=Nr(Y),V=We(R);try{for(;;){let X=await J.readBytes(u+s)||new Uint8Array;const d=X.subarray(X.length-s);let y,_;if(X=X.subarray(0,X.length-s),!K||X.length?(J.unshift(d),y=a[e](X,n.getNonce(Q,b),h),G+=X.length-s+o):(m.setInt32(17,U),y=a[e](d,n.getNonce(Q,b),f),G+=o,_=!0),U+=X.length-s,I=I.then(()=>y).then(async g=>{await V.ready,await V.write(g),G-=g.length}).catch(g=>V.abort(g)),(_||G>V.desiredSize)&&await I,_){await V.close();break}m.setInt32(9,++K)}}catch(X){await V.abort(X)}})}}class Y0{static get tag(){return v.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new Oi,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(e){if(this.version=e[0],this.version!==3)throw new fe(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(e.subarray(1,e.length)),this.publicKeyAlgorithm=e[9],this.encrypted=At.parseEncSessionKeyParams(this.publicKeyAlgorithm,e.subarray(10))}write(){const e=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),At.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return M.concatUint8Array(e)}async encrypt(e){const r=M.concatUint8Array([new Uint8Array([v.write(v.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,M.writeChecksum(this.sessionKey)]),i=v.write(v.publicKey,this.publicKeyAlgorithm);this.encrypted=await At.publicKeyEncrypt(i,e.publicParams,r,e.getFingerprintBytes())}async decrypt(e,r){if(this.publicKeyAlgorithm!==e.algorithm)throw Error("Decryption error");const i=r?M.concatUint8Array([new Uint8Array([r.sessionKeyAlgorithm]),r.sessionKey,M.writeChecksum(r.sessionKey)]):null,n=await At.publicKeyDecrypt(this.publicKeyAlgorithm,e.publicParams,e.privateParams,this.encrypted,e.getFingerprintBytes(),i),a=n[0],s=n.subarray(1,n.length-2),o=n.subarray(n.length-2),u=M.writeChecksum(s),c=u[0]===o[0]&u[1]===o[1];if(r){const h=c&a===r.sessionKeyAlgorithm&s.length===r.sessionKey.length;this.sessionKeyAlgorithm=M.selectUint8(h,a,r.sessionKeyAlgorithm),this.sessionKey=M.selectUint8Array(h,s,r.sessionKey)}else{if(!(c&&v.read(v.symmetric,a)))throw Error("Decryption error");this.sessionKey=s,this.sessionKeyAlgorithm=a}}}class Ca{constructor(e=vt){this.algorithm=v.hash.sha256,this.type="iterated",this.c=e.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(e){let r=0;switch(this.type=v.read(v.s2k,e[r++]),this.algorithm=e[r++],this.type){case"simple":break;case"salted":this.salt=e.subarray(r,r+8),r+=8;break;case"iterated":this.salt=e.subarray(r,r+8),r+=8,this.c=e[r++];break;case"gnu":if(M.uint8ArrayToString(e.subarray(r,r+3))!=="GNU")throw Error("Unknown s2k type.");if(r+=3,1e3+e[r++]!==1001)throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return r}write(){if(this.type==="gnu-dummy")return new Uint8Array([101,0,...M.stringToUint8Array("GNU"),1]);const e=[new Uint8Array([v.write(v.s2k,this.type),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 Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return M.concatUint8Array(e)}async produceKey(e,r){e=M.encodeUTF8(e);const i=[];let n=0,a=0;for(;n<r;){let s;switch(this.type){case"simple":s=M.concatUint8Array([new Uint8Array(a),e]);break;case"salted":s=M.concatUint8Array([new Uint8Array(a),this.salt,e]);break;case"iterated":{const u=M.concatUint8Array([this.salt,e]);let c=u.length;const h=Math.max(this.getCount(),c);s=new Uint8Array(a+h),s.set(u,a);for(let f=a+c;f<h;f+=c,c*=2)s.copyWithin(f,a,f);break}case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}const o=await At.hash.digest(this.algorithm,s);i.push(o),n+=o.length,a++}return M.concatUint8Array(i).subarray(0,r)}}class jn{static get tag(){return v.packet.symEncryptedSessionKey}constructor(e=vt){this.version=e.aeadProtect?5:4,this.sessionKey=null,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm=v.symmetric.aes256,this.aeadAlgorithm=v.write(v.aead,e.preferredAEADAlgorithm),this.encrypted=null,this.s2k=null,this.iv=null}read(e){let r=0;if(this.version=e[r++],this.version!==4&&this.version!==5)throw new fe(`Version ${this.version} of the SKESK packet is unsupported.`);const i=e[r++];if(this.version===5&&(this.aeadAlgorithm=e[r++]),this.s2k=new Ca,r+=this.s2k.read(e.subarray(r,e.length)),this.version===5){const n=At.getAEADMode(this.aeadAlgorithm);this.iv=e.subarray(r,r+=n.ivLength)}this.version===5||r<e.length?(this.encrypted=e.subarray(r,e.length),this.sessionKeyEncryptionAlgorithm=i):this.sessionKeyAlgorithm=i}write(){const e=this.encrypted===null?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm;let r;return this.version===5?r=M.concatUint8Array([new Uint8Array([this.version,e,this.aeadAlgorithm]),this.s2k.write(),this.iv,this.encrypted]):(r=M.concatUint8Array([new Uint8Array([this.version,e]),this.s2k.write()]),this.encrypted!==null&&(r=M.concatUint8Array([r,this.encrypted]))),r}async decrypt(e){const r=this.sessionKeyEncryptionAlgorithm!==null?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,{blockSize:i,keySize:n}=At.getCipher(r),a=await this.s2k.produceKey(e,n);if(this.version===5){const s=At.getAEADMode(this.aeadAlgorithm),o=new Uint8Array([192|jn.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),u=await s(r,a);this.sessionKey=await u.decrypt(this.encrypted,this.iv,o)}else if(this.encrypted!==null){const s=await At.mode.cfb.decrypt(r,a,this.encrypted,new Uint8Array(i));this.sessionKeyAlgorithm=v.write(v.symmetric,s[0]),this.sessionKey=s.subarray(1,s.length)}else this.sessionKey=a}async encrypt(e,r=vt){const i=this.sessionKeyEncryptionAlgorithm!==null?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=i,this.s2k=new Ca(r),this.s2k.salt=At.random.getRandomBytes(8);const{blockSize:n,keySize:a}=At.getCipher(i),s=await this.s2k.produceKey(e,a);if(this.sessionKey===null&&(this.sessionKey=At.generateSessionKey(this.sessionKeyAlgorithm)),this.version===5){const o=At.getAEADMode(this.aeadAlgorithm);this.iv=At.random.getRandomBytes(o.ivLength);const u=new Uint8Array([192|jn.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),c=await o(i,s);this.encrypted=await c.encrypt(this.sessionKey,this.iv,u)}else{const o=M.concatUint8Array([new Uint8Array([this.sessionKeyAlgorithm]),this.sessionKey]);this.encrypted=await At.mode.cfb.encrypt(i,s,o,new Uint8Array(n),r)}}}class sr{static get tag(){return v.packet.publicKey}constructor(e=new Date,r=vt){this.version=r.v5Keys?5:4,this.created=M.normalizeDate(e),this.algorithm=null,this.publicParams=null,this.expirationTimeV3=0,this.fingerprint=null,this.keyID=null}static fromSecretKeyPacket(e){const r=new sr,{version:i,created:n,algorithm:a,publicParams:s,keyID:o,fingerprint:u}=e;return r.version=i,r.created=n,r.algorithm=a,r.publicParams=s,r.keyID=o,r.fingerprint=u,r}async read(e){let r=0;if(this.version=e[r++],this.version===4||this.version===5){this.created=M.readDate(e.subarray(r,r+4)),r+=4,this.algorithm=e[r++],this.version===5&&(r+=4);const{read:i,publicParams:n}=At.parsePublicKeyParams(this.algorithm,e.subarray(r));return this.publicParams=n,r+=i,await this.computeFingerprintAndKeyID(),r}throw new fe(`Version ${this.version} of the key packet is unsupported.`)}write(){const e=[];e.push(new Uint8Array([this.version])),e.push(M.writeDate(this.created)),e.push(new Uint8Array([this.algorithm]));const r=At.serializeParams(this.algorithm,this.publicParams);return this.version===5&&e.push(M.writeNumber(r.length,4)),e.push(r),M.concatUint8Array(e)}writeForHash(e){const r=this.writePublicKey();return e===5?M.concatUint8Array([new Uint8Array([154]),M.writeNumber(r.length,4),r]):M.concatUint8Array([new Uint8Array([153]),M.writeNumber(r.length,2),r])}isDecrypted(){return null}getCreationTime(){return this.created}getKeyID(){return this.keyID}async computeFingerprintAndKeyID(){if(await this.computeFingerprint(),this.keyID=new Oi,this.version===5)this.keyID.read(this.fingerprint.subarray(0,8));else{if(this.version!==4)throw Error("Unsupported key version");this.keyID.read(this.fingerprint.subarray(12,20))}}async computeFingerprint(){const e=this.writeForHash(this.version);if(this.version===5)this.fingerprint=await At.hash.sha256(e);else{if(this.version!==4)throw Error("Unsupported key version");this.fingerprint=await At.hash.sha1(e)}}getFingerprintBytes(){return this.fingerprint}getFingerprint(){return M.uint8ArrayToHex(this.getFingerprintBytes())}hasSameFingerprintAs(e){return this.version===e.version&&M.equalsUint8Array(this.writePublicKey(),e.writePublicKey())}getAlgorithmInfo(){const e={};e.algorithm=v.read(v.publicKey,this.algorithm);const r=this.publicParams.n||this.publicParams.p;return r?e.bits=M.uint8ArrayBitLength(r):e.curve=this.publicParams.oid.getName(),e}}sr.prototype.readPublicKey=sr.prototype.read,sr.prototype.writePublicKey=sr.prototype.write;const Kf=M.constructAllowedPackets([Jn,is,ur,Ee]);class Rf{static get tag(){return v.packet.symmetricallyEncryptedData}constructor(){this.encrypted=null,this.packets=null}read(e){this.encrypted=e}write(){return this.encrypted}async decrypt(e,r,i=vt){if(!i.allowUnauthenticatedMessages)throw Error("Message is not authenticated.");const{blockSize:n}=At.getCipher(e),a=await he(pn(this.encrypted)),s=await At.mode.cfb.decrypt(e,r,a.subarray(n+2),a.subarray(2,n+2));this.packets=await Qt.fromBinary(s,Kf,i)}async encrypt(e,r,i=vt){const n=this.packets.write(),{blockSize:a}=At.getCipher(e),s=await At.getPrefixRandom(e),o=await At.mode.cfb.encrypt(e,r,s,new Uint8Array(a),i),u=await At.mode.cfb.encrypt(e,r,n,o.subarray(2),i);this.encrypted=M.concat([o,u])}}class ns extends sr{static get tag(){return v.packet.publicSubkey}constructor(e,r){super(e,r)}static fromSecretSubkeyPacket(e){const r=new ns,{version:i,created:n,algorithm:a,publicParams:s,keyID:o,fingerprint:u}=e;return r.version=i,r.created=n,r.algorithm=a,r.publicParams=s,r.keyID=o,r.fingerprint=u,r}}class C1{static get tag(){return v.packet.userAttribute}constructor(){this.attributes=[]}read(e){let r=0;for(;r<e.length;){const i=h3(e.subarray(r,e.length));r+=i.offset,this.attributes.push(M.uint8ArrayToString(e.subarray(r,r+i.len))),r+=i.len}}write(){const e=[];for(let r=0;r<this.attributes.length;r++)e.push(ts(this.attributes[r].length)),e.push(M.stringToUint8Array(this.attributes[r]));return M.concatUint8Array(e)}equals(e){return!!(e&&e instanceof C1)&&this.attributes.every(function(r,i){return r===e.attributes[i]})}}class Fo extends sr{static get tag(){return v.packet.secretKey}constructor(e=new Date,r=vt){super(e,r),this.keyMaterial=null,this.isEncrypted=null,this.s2kUsage=0,this.s2k=null,this.symmetric=null,this.aead=null,this.privateParams=null}async read(e){let r=await this.readPublicKey(e);if(this.s2kUsage=e[r++],this.version===5&&r++,this.s2kUsage===255||this.s2kUsage===254||this.s2kUsage===253){if(this.symmetric=e[r++],this.s2kUsage===253&&(this.aead=e[r++]),this.s2k=new Ca,r+=this.s2k.read(e.subarray(r,e.length)),this.s2k.type==="gnu-dummy")return}else this.s2kUsage&&(this.symmetric=this.s2kUsage);if(this.s2kUsage&&(this.iv=e.subarray(r,r+At.getCipher(this.symmetric).blockSize),r+=this.iv.length),this.version===5&&(r+=4),this.keyMaterial=e.subarray(r),this.isEncrypted=!!this.s2kUsage,!this.isEncrypted){const i=this.keyMaterial.subarray(0,-2);if(!M.equalsUint8Array(M.writeChecksum(i),this.keyMaterial.subarray(-2)))throw Error("Key checksum mismatch");try{const{privateParams:n}=At.parsePrivateKeyParams(this.algorithm,i,this.publicParams);this.privateParams=n}catch(n){throw n instanceof fe?n:Error("Error reading MPIs")}}}write(){const e=[this.writePublicKey()];e.push(new Uint8Array([this.s2kUsage]));const r=[];return this.s2kUsage!==255&&this.s2kUsage!==254&&this.s2kUsage!==253||(r.push(this.symmetric),this.s2kUsage===253&&r.push(this.aead),r.push(...this.s2k.write())),this.s2kUsage&&this.s2k.type!=="gnu-dummy"&&r.push(...this.iv),this.version===5&&e.push(new Uint8Array([r.length])),e.push(new Uint8Array(r)),this.isDummy()||(this.s2kUsage||(this.keyMaterial=At.serializeParams(this.algorithm,this.privateParams)),this.version===5&&e.push(M.writeNumber(this.keyMaterial.length,4)),e.push(this.keyMaterial),this.s2kUsage||e.push(M.writeChecksum(this.keyMaterial))),M.concatUint8Array(e)}isDecrypted(){return this.isEncrypted===!1}isDummy(){return!(!this.s2k||this.s2k.type!=="gnu-dummy")}makeDummy(e=vt){this.isDummy()||(this.isDecrypted()&&this.clearPrivateParams(),this.isEncrypted=null,this.keyMaterial=null,this.s2k=new Ca(e),this.s2k.algorithm=0,this.s2k.c=0,this.s2k.type="gnu-dummy",this.s2kUsage=254,this.symmetric=v.symmetric.aes256)}async encrypt(e,r=vt){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key packet is already encrypted");if(!e)throw Error("A non-empty passphrase is required for key encryption.");this.s2k=new Ca(r),this.s2k.salt=At.random.getRandomBytes(8);const i=At.serializeParams(this.algorithm,this.privateParams);this.symmetric=v.symmetric.aes256;const n=await O2(this.s2k,e,this.symmetric),{blockSize:a}=At.getCipher(this.symmetric);if(this.iv=At.random.getRandomBytes(a),r.aeadProtect){this.s2kUsage=253,this.aead=v.aead.eax;const s=At.getAEADMode(this.aead),o=await s(this.symmetric,n);this.keyMaterial=await o.encrypt(i,this.iv.subarray(0,s.ivLength),new Uint8Array)}else this.s2kUsage=254,this.keyMaterial=await At.mode.cfb.encrypt(this.symmetric,n,M.concatUint8Array([i,await At.hash.sha1(i,r)]),this.iv,r)}async decrypt(e){if(this.isDummy())return!1;if(this.isDecrypted())throw Error("Key packet is already decrypted.");let r,i;if(this.s2kUsage!==254&&this.s2kUsage!==253)throw this.s2kUsage===255?Error("Encrypted private key is authenticated using an insecure two-byte hash"):Error("Private key is encrypted using an insecure S2K function: unsalted MD5");if(r=await O2(this.s2k,e,this.symmetric),this.s2kUsage===253){const n=At.getAEADMode(this.aead),a=await n(this.symmetric,r);try{i=await a.decrypt(this.keyMaterial,this.iv.subarray(0,n.ivLength),new Uint8Array)}catch(s){throw s.message==="Authentication tag mismatch"?Error("Incorrect key passphrase: "+s.message):s}}else{const n=await At.mode.cfb.decrypt(this.symmetric,r,this.keyMaterial,this.iv);i=n.subarray(0,-20);const a=await At.hash.sha1(i);if(!M.equalsUint8Array(a,n.subarray(-20)))throw Error("Incorrect key passphrase")}try{const{privateParams:n}=At.parsePrivateKeyParams(this.algorithm,i,this.publicParams);this.privateParams=n}catch{throw Error("Error reading MPIs")}this.isEncrypted=!1,this.keyMaterial=null,this.s2kUsage=0}async validate(){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key is not decrypted");let e;try{e=await At.validateParams(this.algorithm,this.publicParams,this.privateParams)}catch{e=!1}if(!e)throw Error("Key is invalid")}async generate(e,r){const{privateParams:i,publicParams:n}=await At.generateParams(this.algorithm,e,r);this.privateParams=i,this.publicParams=n,this.isEncrypted=!1}clearPrivateParams(){this.isDummy()||(Object.keys(this.privateParams).forEach(e=>{this.privateParams[e].fill(0),delete this.privateParams[e]}),this.privateParams=null,this.isEncrypted=!0)}}async function O2(t,e,r){const{keySize:i}=At.getCipher(r);return t.produceKey(e,i)}var If=jr(function(t){(function(e){function r(n){function a(){return Et<Bt}function s(){return Et}function o(at){Et=at}function u(){Et=0,Bt=Nt.length}function c(at,ot){return{name:at,tokens:ot||"",semantic:ot||"",children:[]}}function h(at,ot){var pt;return ot===null?null:((pt=c(at)).tokens=ot.tokens,pt.semantic=ot.semantic,pt.children.push(ot),pt)}function f(at,ot){return ot!==null&&(at.tokens+=ot.tokens,at.semantic+=ot.semantic),at.children.push(ot),at}function m(at){var ot;return a()&&at(ot=Nt[Et])?(Et+=1,c("token",ot)):null}function b(at){return function(){return h("literal",m(function(ot){return ot===at}))}}function K(){var at=arguments;return function(){var ot,pt,_t,Kt;for(Kt=s(),pt=c("and"),ot=0;ot<at.length;ot+=1){if((_t=at[ot]())===null)return o(Kt),null;f(pt,_t)}return pt}}function I(){var at=arguments;return function(){var ot,pt,_t;for(_t=s(),ot=0;ot<at.length;ot+=1){if((pt=at[ot]())!==null)return pt;o(_t)}return null}}function U(at){return function(){var ot,pt;return pt=s(),(ot=at())!==null?ot:(o(pt),c("opt"))}}function G(at){return function(){var ot=at();return ot!==null&&(ot.semantic=""),ot}}function Q(at){return function(){var ot=at();return ot!==null&&ot.semantic.length>0&&(ot.semantic=" "),ot}}function Y(at,ot){return function(){var pt,_t,Kt,xt,St;for(xt=s(),pt=c("star"),Kt=0,St=ot===void 0?0:ot;(_t=at())!==null;)Kt+=1,f(pt,_t);return Kt>=St?pt:(o(xt),null)}}function R(at){return at.charCodeAt(0)>=128}function J(){return h("cr",b("\r")())}function V(){return h("crlf",K(J,y)())}function X(){return h("dquote",b('"')())}function d(){return h("htab",b(" ")())}function y(){return h("lf",b(`
`)())}function _(){return h("sp",b(" ")())}function g(){return h("vchar",m(function(at){var ot=at.charCodeAt(0),pt=33<=ot&&ot<=126;return n.rfc6532&&(pt=pt||R(at)),pt}))}function p(){return h("wsp",I(_,d)())}function E(){var at=h("quoted-pair",I(K(b("\\"),I(g,p)),F)());return at===null?null:(at.semantic=at.semantic[1],at)}function D(){return h("fws",I(L,K(U(K(Y(p),G(V))),Y(p,1)))())}function nt(){return h("ctext",I(function(){return m(function(at){var ot=at.charCodeAt(0),pt=33<=ot&&ot<=39||42<=ot&&ot<=91||93<=ot&&ot<=126;return n.rfc6532&&(pt=pt||R(at)),pt})},gt)())}function st(){return h("ccontent",I(nt,E,q)())}function q(){return h("comment",K(b("("),Y(K(U(D),st)),U(D),b(")"))())}function rt(){return h("cfws",I(K(Y(K(U(D),q),1),U(D)),D)())}function ct(){return h("atext",m(function(at){var ot="a"<=at&&at<="z"||"A"<=at&&at<="Z"||"0"<=at&&at<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(at)>=0;return n.rfc6532&&(ot=ot||R(at)),ot}))}function lt(){return h("atom",K(Q(U(rt)),Y(ct,1),Q(U(rt)))())}function ut(){var at,ot;return(at=h("dot-atom-text",Y(ct,1)()))===null||(ot=Y(K(b("."),Y(ct,1)))())!==null&&f(at,ot),at}function dt(){return h("dot-atom",K(G(U(rt)),ut,G(U(rt)))())}function wt(){return h("qtext",I(function(){return m(function(at){var ot=at.charCodeAt(0),pt=ot===33||35<=ot&&ot<=91||93<=ot&&ot<=126;return n.rfc6532&&(pt=pt||R(at)),pt})},O)())}function mt(){return h("qcontent",I(wt,E)())}function B(){return h("quoted-string",K(G(U(rt)),G(X),Y(K(U(Q(D)),mt)),U(G(D)),G(X),G(U(rt)))())}function Z(){return h("word",I(lt,B)())}function x(){return h("address",I(l,tt)())}function l(){return h("mailbox",I(z,yt)())}function z(){return h("name-addr",K(U(it),et)())}function et(){return h("angle-addr",I(K(G(U(rt)),b("<"),yt,b(">"),G(U(rt))),N)())}function tt(){return h("group",K(it,b(":"),U(A),b(";"),G(U(rt)))())}function it(){return h("display-name",((at=h("phrase",I(j,Y(Z,1))()))!==null&&(at.semantic=function(ot){return ot.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(at.semantic)),at));var at}function k(){return h("mailbox-list",I(K(l,Y(K(b(","),l))),S)())}function w(){return h("address-list",I(K(x,Y(K(b(","),x))),bt)())}function A(){return h("group-list",I(k,G(rt),ht)())}function C(){return h("local-part",I(Pt,dt,B)())}function $(){return h("dtext",I(function(){return m(function(at){var ot=at.charCodeAt(0),pt=33<=ot&&ot<=90||94<=ot&&ot<=126;return n.rfc6532&&(pt=pt||R(at)),pt})},Dt)())}function T(){return h("domain-literal",K(G(U(rt)),b("["),Y(K(U(D),$)),U(D),b("]"),G(U(rt)))())}function W(){return h("domain",(at=I(Lt,dt,T)(),n.rejectTLD&&at&&at.semantic&&at.semantic.indexOf(".")<0?null:(at&&(at.semantic=at.semantic.replace(/\s+/g,"")),at)));var at}function yt(){return h("addr-spec",K(C,b("@"),W)())}function ft(){return n.strict?null:h("obs-NO-WS-CTL",m(function(at){var ot=at.charCodeAt(0);return 1<=ot&&ot<=8||ot===11||ot===12||14<=ot&&ot<=31||ot===127}))}function gt(){return n.strict?null:h("obs-ctext",ft())}function O(){return n.strict?null:h("obs-qtext",ft())}function F(){return n.strict?null:h("obs-qp",K(b("\\"),I(b("\0"),ft,y,J))())}function j(){return n.strict?null:n.atInDisplayName?h("obs-phrase",K(Z,Y(I(Z,b("."),b("@"),Q(rt))))()):h("obs-phrase",K(Z,Y(I(Z,b("."),Q(rt))))())}function L(){return n.strict?null:h("obs-FWS",Y(K(G(U(V)),p),1)())}function N(){return n.strict?null:h("obs-angle-addr",K(G(U(rt)),b("<"),H,yt,b(">"),G(U(rt)))())}function H(){return n.strict?null:h("obs-route",K(P,b(":"))())}function P(){return n.strict?null:h("obs-domain-list",K(Y(I(G(rt),b(","))),b("@"),W,Y(K(b(","),G(U(rt)),U(K(b("@"),W)))))())}function S(){return n.strict?null:h("obs-mbox-list",K(Y(K(G(U(rt)),b(","))),l,Y(K(b(","),U(K(l,G(rt))))))())}function bt(){return n.strict?null:h("obs-addr-list",K(Y(K(G(U(rt)),b(","))),x,Y(K(b(","),U(K(x,G(rt))))))())}function ht(){return n.strict?null:h("obs-group-list",K(Y(K(G(U(rt)),b(",")),1),G(U(rt)))())}function Pt(){return n.strict?null:h("obs-local-part",K(Z,Y(K(b("."),Z)))())}function Lt(){return n.strict?null:h("obs-domain",K(lt,Y(K(b("."),lt)))())}function Dt(){return n.strict?null:h("obs-dtext",I(ft,E)())}function Ct(at,ot){var pt,_t,Kt;if(ot==null)return null;for(_t=[ot];_t.length>0;){if((Kt=_t.pop()).name===at)return Kt;for(pt=Kt.children.length-1;pt>=0;pt-=1)_t.push(Kt.children[pt])}return null}function Xt(at,ot){var pt,_t,Kt,xt,St;if(ot==null)return null;for(_t=[ot],xt=[],St={},pt=0;pt<at.length;pt+=1)St[at[pt]]=!0;for(;_t.length>0;)if((Kt=_t.pop()).name in St)xt.push(Kt);else for(pt=Kt.children.length-1;pt>=0;pt-=1)_t.push(Kt.children[pt]);return xt}function zt(at){var ot,pt,_t,Kt,xt;if(at===null)return null;for(ot=[],pt=Xt(["group","mailbox"],at),_t=0;_t<pt.length;_t+=1)(Kt=pt[_t]).name==="group"?ot.push(Ot(Kt)):Kt.name==="mailbox"&&ot.push(ue(Kt));return xt={ast:at,addresses:ot},n.simple&&(xt=function(St){var Ht;if(St&&St.addresses)for(Ht=0;Ht<St.addresses.length;Ht+=1)delete St.addresses[Ht].node;return St}(xt)),n.oneResult?function(St){return!St||!n.partial&&St.addresses.length>1?null:St.addresses&&St.addresses[0]}(xt):n.simple?xt&&xt.addresses:xt}function Ot(at){var ot,pt=Ct("display-name",at),_t=[],Kt=Xt(["mailbox"],at);for(ot=0;ot<Kt.length;ot+=1)_t.push(ue(Kt[ot]));return{node:at,parts:{name:pt},type:at.name,name:Mt(pt),addresses:_t}}function ue(at){var ot=Ct("display-name",at),pt=Ct("addr-spec",at),_t=function(Ht,Tt){var Gt,Ie,Ue,Fe;if(Tt==null)return null;for(Ie=[Tt],Fe=[];Ie.length>0;)for((Ue=Ie.pop()).name===Ht&&Fe.push(Ue),Gt=Ue.children.length-1;Gt>=0;Gt-=1)Ie.push(Ue.children[Gt]);return Fe}("cfws",at),Kt=Xt(["comment"],at),xt=Ct("local-part",pt),St=Ct("domain",pt);return{node:at,parts:{name:ot,address:pt,local:xt,domain:St,comments:_t},type:at.name,name:Mt(ot),address:Mt(pt),local:Mt(xt),domain:Mt(St),comments:Rt(Kt),groupName:Mt(at.groupName)}}function Mt(at){return at!=null?at.semantic:null}function Rt(at){var ot="";if(at)for(var pt=0;pt<at.length;pt+=1)ot+=Mt(at[pt]);return ot}var Nt,Et,Bt,Zt,It;if((n=i(n,{}))===null)return null;if(Nt=n.input,It={address:x,"address-list":w,"angle-addr":et,from:function(){return h("from",I(k,w)())},group:tt,mailbox:l,"mailbox-list":k,"reply-to":function(){return h("reply-to",w())},sender:function(){return h("sender",I(l,x)())}}[n.startAt]||w,!n.strict){if(u(),n.strict=!0,Zt=It(Nt),n.partial||!a())return zt(Zt);n.strict=!1}return u(),Zt=It(Nt),!n.partial&&a()?null:zt(Zt)}function i(n,a){function s(h){return Object.prototype.toString.call(h)==="[object String]"}function o(h){return h==null}var u,c;if(s(n))n={input:n};else if(!function(h){return h===Object(h)}(n))return null;if(!s(n.input)||!a)return null;for(c in u={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1})o(n[c])&&(n[c]=o(a[c])?u[c]:a[c]);return n}r.parseOneAddress=function(n){return r(i(n,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseAddressList=function(n){return r(i(n,{rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseFrom=function(n){return r(i(n,{rfc6532:!0,simple:!0,startAt:"from"}))},r.parseSender=function(n){return r(i(n,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},r.parseReplyTo=function(n){return r(i(n,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},t.exports=r})()});class Oo{static get tag(){return v.packet.userID}constructor(){this.userID="",this.name="",this.email="",this.comment=""}static fromObject(e){if(M.isString(e)||e.name&&!M.isString(e.name)||e.email&&!M.isEmailAddress(e.email)||e.comment&&!M.isString(e.comment))throw Error("Invalid user ID format");const r=new Oo;Object.assign(r,e);const i=[];return r.name&&i.push(r.name),r.comment&&i.push(`(${r.comment})`),r.email&&i.push(`<${r.email}>`),r.userID=i.join(" "),r}read(e,r=vt){const i=M.decodeUTF8(e);if(i.length>r.maxUserIDLength)throw Error("User ID string is too long");try{const{name:n,address:a,comments:s}=If.parseOneAddress({input:i,atInDisplayName:!0});this.comment=s.replace(/^\(|\)$/g,""),this.name=n,this.email=a}catch{}this.userID=i}write(){return M.encodeUTF8(this.userID)}equals(e){return e&&e.userID===this.userID}}class D1 extends Fo{static get tag(){return v.packet.secretSubkey}constructor(e=new Date,r=vt){super(e,r)}}class G3{constructor(e){this.packets=e||new Qt}write(){return this.packets.write()}armor(e=vt){return Za(v.armor.signature,this.write(),void 0,void 0,void 0,e)}getSigningKeyIDs(){return this.packets.map(e=>e.issuerKeyID)}}async function V3(t,e){const r=new D1(t.date,e);return r.packets=null,r.algorithm=v.write(v.publicKey,t.algorithm),await r.generate(t.rsaBits,t.curve),await r.computeFingerprintAndKeyID(),r}async function Uf(t,e){const r=new Fo(t.date,e);return r.packets=null,r.algorithm=v.write(v.publicKey,t.algorithm),await r.generate(t.rsaBits,t.curve,t.config),await r.computeFingerprintAndKeyID(),r}async function Er(t,e,r,i,n=new Date,a){let s,o;for(let u=t.length-1;u>=0;u--)try{(!s||t[u].created>=s.created)&&(await t[u].verify(e,r,i,n,void 0,a),s=t[u])}catch(c){o=c}if(!s)throw M.wrapError(`Could not find valid ${v.read(v.signature,r)} signature in key ${e.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,(u,c,h)=>c+" "+h.toLowerCase()),o);return s}function Q0(t,e,r=new Date){const i=M.normalizeDate(r);if(i!==null){const n=co(t,e);return!(t.created<=i&&i<n)}return!1}async function Z3(t,e,r,i){const n={};n.key=e,n.bind=t;const a=new Ee;return a.signatureType=v.signature.subkeyBinding,a.publicKeyAlgorithm=e.algorithm,a.hashAlgorithm=await $o(null,t,void 0,void 0,i),r.sign?(a.keyFlags=[v.keyFlags.signData],a.embeddedSignature=await bn(n,null,t,{signatureType:v.signature.keyBinding},r.date,void 0,void 0,void 0,i)):a.keyFlags=[v.keyFlags.encryptCommunication|v.keyFlags.encryptStorage],r.keyExpirationTime>0&&(a.keyExpirationTime=r.keyExpirationTime,a.keyNeverExpires=!1),await a.sign(e,n,r.date),a}async function $o(t,e,r=new Date,i={},n){let a=n.preferredHashAlgorithm,s=a;if(t){const o=await t.getPrimaryUser(r,i,n);o.selfCertification.preferredHashAlgorithms&&([s]=o.selfCertification.preferredHashAlgorithms,a=At.hash.getHashByteLength(a)<=At.hash.getHashByteLength(s)?s:a)}switch(Object.getPrototypeOf(e)){case Fo.prototype:case sr.prototype:case D1.prototype:case ns.prototype:switch(e.algorithm){case v.publicKey.ecdh:case v.publicKey.ecdsa:case v.publicKey.eddsa:s=At.publicKey.elliptic.getPreferredHashAlgo(e.publicParams.oid)}}return At.hash.getHashByteLength(a)<=At.hash.getHashByteLength(s)?s:a}async function X0(t,e=[],r=new Date,i=[],n=vt){const a={symmetric:v.symmetric.aes128,aead:v.aead.eax,compression:v.compression.uncompressed}[t],s={symmetric:n.preferredSymmetricAlgorithm,aead:n.preferredAEADAlgorithm,compression:n.preferredCompressionAlgorithm}[t],o={symmetric:"preferredSymmetricAlgorithms",aead:"preferredAEADAlgorithms",compression:"preferredCompressionAlgorithms"}[t];return(await Promise.all(e.map(async function(u,c){const h=(await u.getPrimaryUser(r,i[c],n)).selfCertification[o];return!!h&&h.indexOf(s)>=0}))).every(Boolean)?s:a}async function bn(t,e,r,i,n,a,s=[],o=!1,u){if(r.isDummy())throw Error("Cannot sign with a gnu-dummy key.");if(!r.isDecrypted())throw Error("Signing key is not decrypted.");const c=new Ee;return Object.assign(c,i),c.publicKeyAlgorithm=r.algorithm,c.hashAlgorithm=await $o(e,r,n,a,u),c.rawNotations=s,await c.sign(r,t,n,o),c}async function dn(t,e,r,i=new Date,n){(t=t[r])&&(e[r].length?await Promise.all(t.map(async function(a){a.isExpired(i)||n&&!await n(a)||e[r].some(function(s){return M.equalsUint8Array(s.writeParams(),a.writeParams())})||e[r].push(a)})):e[r]=t)}async function Wn(t,e,r,i,n,a,s=new Date,o){a=a||t;const u=[];return await Promise.all(i.map(async function(c){try{n&&!c.issuerKeyID.equals(n.issuerKeyID)||(await c.verify(a,e,r,o.revocationsExpire?s:null,!1,o),u.push(c.issuerKeyID))}catch{}})),n?(n.revoked=!!u.some(c=>c.equals(n.issuerKeyID))||n.revoked||!1,n.revoked):u.length>0}function co(t,e){let r;return e.keyNeverExpires===!1&&(r=t.created.getTime()+1e3*e.keyExpirationTime),r?new Date(r):1/0}function J0(t,e={}){switch(t.type=t.type||e.type,t.curve=t.curve||e.curve,t.rsaBits=t.rsaBits||e.rsaBits,t.keyExpirationTime=t.keyExpirationTime!==void 0?t.keyExpirationTime:e.keyExpirationTime,t.passphrase=M.isString(t.passphrase)?t.passphrase:e.passphrase,t.date=t.date||e.date,t.sign=t.sign||!1,t.type){case"ecc":try{t.curve=v.write(v.curve,t.curve)}catch{throw Error("Unknown curve")}t.curve!==v.curve.ed25519&&t.curve!==v.curve.curve25519||(t.curve=t.sign?v.curve.ed25519:v.curve.curve25519),t.sign?t.algorithm=t.curve===v.curve.ed25519?v.publicKey.eddsa:v.publicKey.ecdsa:t.algorithm=v.publicKey.ecdh;break;case"rsa":t.algorithm=v.publicKey.rsaEncryptSign;break;default:throw Error("Unsupported key type "+t.type)}return t}function $2(t,e){const r=t.algorithm;return r!==v.publicKey.rsaEncrypt&&r!==v.publicKey.elgamal&&r!==v.publicKey.ecdh&&(!e.keyFlags||(e.keyFlags[0]&v.keyFlags.signData)!=0)}function L2(t,e){const r=t.algorithm;return r!==v.publicKey.dsa&&r!==v.publicKey.rsaSign&&r!==v.publicKey.ecdsa&&r!==v.publicKey.eddsa&&(!e.keyFlags||(e.keyFlags[0]&v.keyFlags.encryptCommunication)!=0||(e.keyFlags[0]&v.keyFlags.encryptStorage)!=0)}function N2(t,e){return!!e.allowInsecureDecryptionWithSigningKeys||!t.keyFlags||(t.keyFlags[0]&v.keyFlags.encryptCommunication)!=0||(t.keyFlags[0]&v.keyFlags.encryptStorage)!=0}function Dn(t,e){const r=v.write(v.publicKey,t.algorithm),i=t.getAlgorithmInfo();if(e.rejectPublicKeyAlgorithms.has(r))throw Error(i.algorithm+" keys are considered too weak.");switch(r){case v.publicKey.rsaEncryptSign:case v.publicKey.rsaSign:case v.publicKey.rsaEncrypt:if(i.bits<e.minRSABits)throw Error(`RSA keys shorter than ${e.minRSABits} bits are considered too weak.`);break;case v.publicKey.ecdsa:case v.publicKey.eddsa:case v.publicKey.ecdh:if(e.rejectCurves.has(i.curve))throw Error(`Support for ${i.algorithm} keys using curve ${i.curve} is disabled.`)}}class Da{constructor(e,r){this.userID=e.constructor.tag===v.packet.userID?e:null,this.userAttribute=e.constructor.tag===v.packet.userAttribute?e:null,this.selfCertifications=[],this.otherCertifications=[],this.revocationSignatures=[],this.mainKey=r}toPacketList(){const e=new Qt;return e.push(this.userID||this.userAttribute),e.push(...this.revocationSignatures),e.push(...this.selfCertifications),e.push(...this.otherCertifications),e}clone(){const e=new Da(this.userID||this.userAttribute,this.mainKey);return e.selfCertifications=[...this.selfCertifications],e.otherCertifications=[...this.otherCertifications],e.revocationSignatures=[...this.revocationSignatures],e}async certify(e,r,i){const n=this.mainKey.keyPacket,a={userID:this.userID,userAttribute:this.userAttribute,key:n},s=new Da(a.userID||a.userAttribute,this.mainKey);return s.otherCertifications=await Promise.all(e.map(async function(o){if(!o.isPrivate())throw Error("Need private key for signing");if(o.hasSameFingerprintAs(n))throw Error("The user's own key can only be used for self-certifications");const u=await o.getSigningKey(void 0,r,void 0,i);return bn(a,o,u.keyPacket,{signatureType:v.signature.certGeneric,keyFlags:[v.keyFlags.certifyKeys|v.keyFlags.signData]},r,void 0,void 0,void 0,i)})),await s.update(this,r,i),s}async isRevoked(e,r,i=new Date,n=vt){const a=this.mainKey.keyPacket;return Wn(a,v.signature.certRevocation,{key:a,userID:this.userID,userAttribute:this.userAttribute},this.revocationSignatures,e,r,i,n)}async verifyCertificate(e,r,i=new Date,n){const a=this,s=this.mainKey.keyPacket,o={userID:this.userID,userAttribute:this.userAttribute,key:s},{issuerKeyID:u}=e,c=r.filter(h=>h.getKeys(u).length>0);return c.length===0?null:(await Promise.all(c.map(async h=>{const f=await h.getSigningKey(u,e.created,void 0,n);if(e.revoked||await a.isRevoked(e,f.keyPacket,i,n))throw Error("User certificate is revoked");try{await e.verify(f.keyPacket,v.signature.certGeneric,o,i,void 0,n)}catch(m){throw M.wrapError("User certificate is invalid",m)}})),!0)}async verifyAllCertifications(e,r=new Date,i){const n=this,a=this.selfCertifications.concat(this.otherCertifications);return Promise.all(a.map(async s=>({keyID:s.issuerKeyID,valid:await n.verifyCertificate(s,e,r,i).catch(()=>!1)})))}async verify(e=new Date,r){if(!this.selfCertifications.length)throw Error("No self-certifications found");const i=this,n=this.mainKey.keyPacket,a={userID:this.userID,userAttribute:this.userAttribute,key:n};let s;for(let o=this.selfCertifications.length-1;o>=0;o--)try{const u=this.selfCertifications[o];if(u.revoked||await i.isRevoked(u,void 0,e,r))throw Error("Self-certification is revoked");try{await u.verify(n,v.signature.certGeneric,a,e,void 0,r)}catch(c){throw M.wrapError("Self-certification is invalid",c)}return!0}catch(u){s=u}throw s}async update(e,r,i){const n=this.mainKey.keyPacket,a={userID:this.userID,userAttribute:this.userAttribute,key:n};await dn(e,this,"selfCertifications",r,async function(s){try{return await s.verify(n,v.signature.certGeneric,a,r,!1,i),!0}catch{return!1}}),await dn(e,this,"otherCertifications",r),await dn(e,this,"revocationSignatures",r,function(s){return Wn(n,v.signature.certRevocation,a,[s],void 0,void 0,r,i)})}async revoke(e,{flag:r=v.reasonForRevocation.noReason,string:i=""}={},n=new Date,a=vt){const s={userID:this.userID,userAttribute:this.userAttribute,key:e},o=new Da(s.userID||s.userAttribute,this.mainKey);return o.revocationSignatures.push(await bn(s,null,e,{signatureType:v.signature.certRevocation,reasonForRevocationFlag:v.write(v.reasonForRevocation,r),reasonForRevocationString:i},n,void 0,void 0,!1,a)),await o.update(this),o}}class Hn{constructor(e,r){this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=r}toPacketList(){const e=new Qt;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.bindingSignatures),e}clone(){const e=new Hn(this.keyPacket,this.mainKey);return e.bindingSignatures=[...this.bindingSignatures],e.revocationSignatures=[...this.revocationSignatures],e}async isRevoked(e,r,i=new Date,n=vt){const a=this.mainKey.keyPacket;return Wn(a,v.signature.subkeyRevocation,{key:a,bind:this.keyPacket},this.revocationSignatures,e,r,i,n)}async verify(e=new Date,r=vt){const i=this.mainKey.keyPacket,n={key:i,bind:this.keyPacket},a=await Er(this.bindingSignatures,i,v.signature.subkeyBinding,n,e,r);if(a.revoked||await this.isRevoked(a,null,e,r))throw Error("Subkey is revoked");if(Q0(this.keyPacket,a,e))throw Error("Subkey is expired");return a}async getExpirationTime(e=new Date,r=vt){const i=this.mainKey.keyPacket,n={key:i,bind:this.keyPacket};let a;try{a=await Er(this.bindingSignatures,i,v.signature.subkeyBinding,n,e,r)}catch{return null}const s=co(this.keyPacket,a),o=a.getExpirationTime();return s<o?s:o}async update(e,r=new Date,i=vt){const n=this.mainKey.keyPacket;if(!this.hasSameFingerprintAs(e))throw Error("Subkey update method: fingerprints of subkeys not equal");this.keyPacket.constructor.tag===v.packet.publicSubkey&&e.keyPacket.constructor.tag===v.packet.secretSubkey&&(this.keyPacket=e.keyPacket);const a=this,s={key:n,bind:a.keyPacket};await dn(e,this,"bindingSignatures",r,async function(o){for(let u=0;u<a.bindingSignatures.length;u++)if(a.bindingSignatures[u].issuerKeyID.equals(o.issuerKeyID))return o.created>a.bindingSignatures[u].created&&(a.bindingSignatures[u]=o),!1;try{return await o.verify(n,v.signature.subkeyBinding,s,r,void 0,i),!0}catch{return!1}}),await dn(e,this,"revocationSignatures",r,function(o){return Wn(n,v.signature.subkeyRevocation,s,[o],void 0,void 0,r,i)})}async revoke(e,{flag:r=v.reasonForRevocation.noReason,string:i=""}={},n=new Date,a=vt){const s={key:e,bind:this.keyPacket},o=new Hn(this.keyPacket,this.mainKey);return o.revocationSignatures.push(await bn(s,null,e,{signatureType:v.signature.subkeyRevocation,reasonForRevocationFlag:v.write(v.reasonForRevocation,r),reasonForRevocationString:i},n,void 0,void 0,!1,a)),await o.update(this),o}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach(t=>{Hn.prototype[t]=function(){return this.keyPacket[t]()}});const Bf=M.constructAllowedPackets([Ee]),j2=new Set([v.packet.publicKey,v.packet.privateKey]),W2=new Set([v.packet.publicKey,v.packet.privateKey,v.packet.publicSubkey,v.packet.privateSubkey]);class Y3{packetListToStructure(e,r=new Set){let i,n,a,s;for(const o of e){if(o instanceof N0){W2.has(o.tag)&&!s&&(s=j2.has(o.tag)?j2:W2);continue}const u=o.constructor.tag;if(s){if(!s.has(u))continue;s=null}if(r.has(u))throw Error("Unexpected packet type: "+u);switch(u){case v.packet.publicKey:case v.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=o,n=this.getKeyID(),!n)throw Error("Missing Key ID");break;case v.packet.userID:case v.packet.userAttribute:i=new Da(o,this),this.users.push(i);break;case v.packet.publicSubkey:case v.packet.secretSubkey:i=null,a=new Hn(o,this),this.subkeys.push(a);break;case v.packet.signature:switch(o.signatureType){case v.signature.certGeneric:case v.signature.certPersona:case v.signature.certCasual:case v.signature.certPositive:if(!i){M.printDebug("Dropping certification signatures without preceding user packet");continue}o.issuerKeyID.equals(n)?i.selfCertifications.push(o):i.otherCertifications.push(o);break;case v.signature.certRevocation:i?i.revocationSignatures.push(o):this.directSignatures.push(o);break;case v.signature.key:this.directSignatures.push(o);break;case v.signature.subkeyBinding:if(!a){M.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}a.bindingSignatures.push(o);break;case v.signature.keyRevocation:this.revocationSignatures.push(o);break;case v.signature.subkeyRevocation:if(!a){M.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}a.revocationSignatures.push(o)}}}}toPacketList(){const e=new Qt;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map(r=>e.push(...r.toPacketList())),this.subkeys.map(r=>e.push(...r.toPacketList())),e}clone(e=!1){const r=new this.constructor(this.toPacketList());return e&&r.getKeys().forEach(i=>{if(i.keyPacket=Object.create(Object.getPrototypeOf(i.keyPacket),Object.getOwnPropertyDescriptors(i.keyPacket)),!i.keyPacket.isDecrypted())return;const n={};Object.keys(i.keyPacket.privateParams).forEach(a=>{n[a]=new Uint8Array(i.keyPacket.privateParams[a])}),i.keyPacket.privateParams=n}),r}getSubkeys(e=null){return this.subkeys.filter(r=>!e||r.getKeyID().equals(e,!0))}getKeys(e=null){const r=[];return e&&!this.getKeyID().equals(e,!0)||r.push(this),r.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map(e=>e.getKeyID())}getUserIDs(){return this.users.map(e=>e.userID?e.userID.userID:null).filter(e=>e!==null)}write(){return this.toPacketList().write()}async getSigningKey(e=null,r=new Date,i={},n=vt){await this.verifyPrimaryKey(r,i,n);const a=this.keyPacket,s=this.subkeys.slice().sort((u,c)=>c.keyPacket.created-u.keyPacket.created);let o;for(const u of s)if(!e||u.getKeyID().equals(e))try{await u.verify(r,n);const c={key:a,bind:u.keyPacket},h=await Er(u.bindingSignatures,a,v.signature.subkeyBinding,c,r,n);if(!$2(u.keyPacket,h))continue;if(!h.embeddedSignature)throw Error("Missing embedded signature");return await Er([h.embeddedSignature],u.keyPacket,v.signature.keyBinding,c,r,n),Dn(u.keyPacket,n),u}catch(c){o=c}try{const u=await this.getPrimaryUser(r,i,n);if((!e||a.getKeyID().equals(e))&&$2(a,u.selfCertification))return Dn(a,n),this}catch(u){o=u}throw M.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),o)}async getEncryptionKey(e,r=new Date,i={},n=vt){await this.verifyPrimaryKey(r,i,n);const a=this.keyPacket,s=this.subkeys.slice().sort((u,c)=>c.keyPacket.created-u.keyPacket.created);let o;for(const u of s)if(!e||u.getKeyID().equals(e))try{await u.verify(r,n);const c={key:a,bind:u.keyPacket},h=await Er(u.bindingSignatures,a,v.signature.subkeyBinding,c,r,n);if(L2(u.keyPacket,h))return Dn(u.keyPacket,n),u}catch(c){o=c}try{const u=await this.getPrimaryUser(r,i,n);if((!e||a.getKeyID().equals(e))&&L2(a,u.selfCertification))return Dn(a,n),this}catch(u){o=u}throw M.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),o)}async isRevoked(e,r,i=new Date,n=vt){return Wn(this.keyPacket,v.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,r,i,n)}async verifyPrimaryKey(e=new Date,r={},i=vt){const n=this.keyPacket;if(await this.isRevoked(null,null,e,i))throw Error("Primary key is revoked");const{selfCertification:a}=await this.getPrimaryUser(e,r,i);if(Q0(n,a,e))throw Error("Primary key is expired");const s=await Er(this.directSignatures,n,v.signature.key,{key:n},e,i).catch(()=>{});if(s&&Q0(n,s,e))throw Error("Primary key is expired")}async getExpirationTime(e,r=vt){let i;try{const{selfCertification:n}=await this.getPrimaryUser(null,e,r),a=co(this.keyPacket,n),s=n.getExpirationTime(),o=await Er(this.directSignatures,this.keyPacket,v.signature.key,{key:this.keyPacket},null,r).catch(()=>{});if(o){const u=co(this.keyPacket,o);i=Math.min(a,s,u)}else i=a<s?a:s}catch{i=null}return M.normalizeDate(i)}async getPrimaryUser(e=new Date,r={},i=vt){const n=this.keyPacket,a=[];let s;for(let h=0;h<this.users.length;h++)try{const f=this.users[h];if(!f.userID)continue;if(r.name!==void 0&&f.userID.name!==r.name||r.email!==void 0&&f.userID.email!==r.email||r.comment!==void 0&&f.userID.comment!==r.comment)throw Error("Could not find user that matches that user ID");const m={userID:f.userID,key:n},b=await Er(f.selfCertifications,n,v.signature.certGeneric,m,e,i);a.push({index:h,user:f,selfCertification:b})}catch(f){s=f}if(!a.length)throw s||Error("Could not find primary user");await Promise.all(a.map(async function(h){return h.user.revoked||h.user.isRevoked(h.selfCertification,null,e,i)}));const o=a.sort(function(h,f){const m=h.selfCertification,b=f.selfCertification;return b.revoked-m.revoked||m.isPrimaryUserID-b.isPrimaryUserID||m.created-b.created}).pop(),{user:u,selfCertification:c}=o;if(c.revoked||await u.isRevoked(c,null,e,i))throw Error("Primary user is revoked");return o}async update(e,r=new Date,i=vt){if(!this.hasSameFingerprintAs(e))throw Error("Primary key fingerprints must be equal to update the key");if(!this.isPrivate()&&e.isPrivate()){if(!(this.subkeys.length===e.subkeys.length&&this.subkeys.every(a=>e.subkeys.some(s=>a.hasSameFingerprintAs(s)))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,i)}const n=this.clone();return await dn(e,n,"revocationSignatures",r,a=>Wn(n.keyPacket,v.signature.keyRevocation,n,[a],null,e.keyPacket,r,i)),await dn(e,n,"directSignatures",r),await Promise.all(e.users.map(async a=>{const s=n.users.filter(o=>a.userID&&a.userID.equals(o.userID)||a.userAttribute&&a.userAttribute.equals(o.userAttribute));if(s.length>0)await Promise.all(s.map(o=>o.update(a,r,i)));else{const o=a.clone();o.mainKey=n,n.users.push(o)}})),await Promise.all(e.subkeys.map(async a=>{const s=n.subkeys.filter(o=>o.hasSameFingerprintAs(a));if(s.length>0)await Promise.all(s.map(o=>o.update(a,r,i)));else{const o=a.clone();o.mainKey=n,n.subkeys.push(o)}})),n}async getRevocationCertificate(e=new Date,r=vt){const i={key:this.keyPacket},n=await Er(this.revocationSignatures,this.keyPacket,v.signature.keyRevocation,i,e,r),a=new Qt;return a.push(n),Za(v.armor.publicKey,a.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,r=new Date,i=vt){const n=await Va(e,i),a=(await Qt.fromBinary(n.data,Bf,i)).findPacket(v.packet.signature);if(!a||a.signatureType!==v.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!a.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await a.verify(this.keyPacket,v.signature.keyRevocation,{key:this.keyPacket},r,void 0,i)}catch(o){throw M.wrapError("Could not verify revocation signature",o)}const s=this.clone();return s.revocationSignatures.push(a),s}async signPrimaryUser(e,r,i,n=vt){const{index:a,user:s}=await this.getPrimaryUser(r,i,n),o=await s.certify(e,r,n),u=this.clone();return u.users[a]=o,u}async signAllUsers(e,r=new Date,i=vt){const n=this.clone();return n.users=await Promise.all(this.users.map(function(a){return a.certify(e,r,i)})),n}async verifyPrimaryUser(e,r=new Date,i,n=vt){const a=this.keyPacket,{user:s}=await this.getPrimaryUser(r,i,n);return e?await s.verifyAllCertifications(e,r,n):[{keyID:a.getKeyID(),valid:await s.verify(r,n).catch(()=>!1)}]}async verifyAllUsers(e,r=new Date,i=vt){const n=this.keyPacket,a=[];return await Promise.all(this.users.map(async s=>{const o=e?await s.verifyAllCertifications(e,r,i):[{keyID:n.getKeyID(),valid:await s.verify(r,i).catch(()=>!1)}];a.push(...o.map(u=>({userID:s.userID.userID,keyID:u.keyID,valid:u.valid})))})),a}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach(t=>{Y3.prototype[t]=Hn.prototype[t]});class t1 extends Y3{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([v.packet.secretKey,v.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=vt){return Za(v.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class as extends t1{constructor(e){if(super(),this.packetListToStructure(e,new Set([v.packet.publicKey,v.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new Qt,r=this.toPacketList();for(const i of r)switch(i.constructor.tag){case v.packet.secretKey:{const n=sr.fromSecretKeyPacket(i);e.push(n);break}case v.packet.secretSubkey:{const n=ns.fromSecretSubkeyPacket(i);e.push(n);break}default:e.push(i)}return new t1(e)}armor(e=vt){return Za(v.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,r=new Date,i={},n=vt){const a=this.keyPacket,s=[];for(let u=0;u<this.subkeys.length;u++)if(!e||this.subkeys[u].getKeyID().equals(e,!0))try{const c={key:a,bind:this.subkeys[u].keyPacket};N2(await Er(this.subkeys[u].bindingSignatures,a,v.signature.subkeyBinding,c,r,n),n)&&s.push(this.subkeys[u])}catch{}const o=await this.getPrimaryUser(r,i,n);return e&&!a.getKeyID().equals(e,!0)||!N2(o.selfCertification,n)||s.push(this),s}isDecrypted(){return this.getKeys().some(({keyPacket:e})=>e.isDecrypted())}async validate(e=vt){if(!this.isPrivate())throw Error("Cannot validate a public key");let r;if(this.keyPacket.isDummy()){const i=await this.getSigningKey(null,null,void 0,{...e,rejectPublicKeyAlgorithms:new Set,minRSABits:0});i&&!i.keyPacket.isDummy()&&(r=i.keyPacket)}else r=this.keyPacket;if(r)return r.validate();{const i=this.getKeys();if(i.map(n=>n.keyPacket.isDummy()).every(Boolean))throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(i.map(async n=>n.keyPacket.validate()))}}clearPrivateParams(){this.getKeys().forEach(({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()})}async revoke({flag:e=v.reasonForRevocation.noReason,string:r=""}={},i=new Date,n=vt){if(!this.isPrivate())throw Error("Need private key for revoking");const a={key:this.keyPacket},s=this.clone();return s.revocationSignatures.push(await bn(a,null,this.keyPacket,{signatureType:v.signature.keyRevocation,reasonForRevocationFlag:v.write(v.reasonForRevocation,e),reasonForRevocationString:r},i,void 0,void 0,void 0,n)),s}async addSubkey(e={}){const r={...vt,...e.config};if(e.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(e.rsaBits<r.minRSABits)throw Error(`rsaBits should be at least ${r.minRSABits}, got: ${e.rsaBits}`);const i=this.keyPacket;if(i.isDummy())throw Error("Cannot add subkey to gnu-dummy primary key");if(!i.isDecrypted())throw Error("Key is not decrypted");const n=i.getAlgorithmInfo();n.type=n.curve?"ecc":"rsa",n.rsaBits=n.bits||4096,n.curve=n.curve||"curve25519",e=J0(e,n);const a=await V3(e);Dn(a,r);const s=await Z3(a,i,e,r),o=this.toPacketList();return o.push(a,s),new as(o)}}const Q3=M.constructAllowedPackets([sr,ns,Fo,D1,Oo,C1,Ee]);function Tf(t){for(const e of t)switch(e.constructor.tag){case v.packet.secretKey:return new as(t);case v.packet.publicKey:return new t1(t)}throw Error("No key packet found")}async function zf(t,e,r,i){r.passphrase&&await t.encrypt(r.passphrase,i),await Promise.all(e.map(async function(s,o){const u=r.subkeys[o].passphrase;u&&await s.encrypt(u,i)}));const n=new Qt;n.push(t),await Promise.all(r.userIDs.map(async function(s,o){function u(m,b){return[b,...m.filter(K=>K!==b)]}const c=Oo.fromObject(s),h={};h.userID=c,h.key=t;const f=new Ee;return f.signatureType=v.signature.certGeneric,f.publicKeyAlgorithm=t.algorithm,f.hashAlgorithm=await $o(null,t,void 0,void 0,i),f.keyFlags=[v.keyFlags.certifyKeys|v.keyFlags.signData],f.preferredSymmetricAlgorithms=u([v.symmetric.aes256,v.symmetric.aes128,v.symmetric.aes192],i.preferredSymmetricAlgorithm),i.aeadProtect&&(f.preferredAEADAlgorithms=u([v.aead.eax,v.aead.ocb],i.preferredAEADAlgorithm)),f.preferredHashAlgorithms=u([v.hash.sha256,v.hash.sha512],i.preferredHashAlgorithm),f.preferredCompressionAlgorithms=u([v.compression.zlib,v.compression.zip,v.compression.uncompressed],i.preferredCompressionAlgorithm),o===0&&(f.isPrimaryUserID=!0),f.features=[0],f.features[0]|=v.features.modificationDetection,i.aeadProtect&&(f.features[0]|=v.features.aead),i.v5Keys&&(f.features[0]|=v.features.v5Keys),r.keyExpirationTime>0&&(f.keyExpirationTime=r.keyExpirationTime,f.keyNeverExpires=!1),await f.sign(t,h,r.date),{userIDPacket:c,signaturePacket:f}})).then(s=>{s.forEach(({userIDPacket:o,signaturePacket:u})=>{n.push(o),n.push(u)})}),await Promise.all(e.map(async function(s,o){const u=r.subkeys[o];return{secretSubkeyPacket:s,subkeySignaturePacket:await Z3(s,t,u,i)}})).then(s=>{s.forEach(({secretSubkeyPacket:o,subkeySignaturePacket:u})=>{n.push(o),n.push(u)})});const a={key:t};return n.push(await bn(a,null,t,{signatureType:v.signature.keyRevocation,reasonForRevocationFlag:v.reasonForRevocation.noReason,reasonForRevocationString:""},r.date,void 0,void 0,void 0,i)),r.passphrase&&t.clearPrivateParams(),await Promise.all(e.map(async function(s,o){r.subkeys[o].passphrase&&s.clearPrivateParams()})),new as(n)}async function W6({armoredKey:t,binaryKey:e,config:r,...i}){if(r={...vt,...r},!t&&!e)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(t&&!M.isString(t))throw Error("readKey: options.armoredKey must be a string");if(e&&!M.isUint8Array(e))throw Error("readKey: options.binaryKey must be a Uint8Array");const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));let a;if(t){const{type:s,data:o}=await Va(t,r);if(s!==v.armor.publicKey&&s!==v.armor.privateKey)throw Error("Armored text not of type key");a=o}else a=e;return Tf(await Qt.fromBinary(a,Q3,r))}async function H6({armoredKey:t,binaryKey:e,config:r,...i}){if(r={...vt,...r},!t&&!e)throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`");if(t&&!M.isString(t))throw Error("readPrivateKey: options.armoredKey must be a string");if(e&&!M.isUint8Array(e))throw Error("readPrivateKey: options.binaryKey must be a Uint8Array");const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));let a;if(t){const{type:o,data:u}=await Va(t,r);if(o!==v.armor.privateKey)throw Error("Armored text not of type private key");a=u}else a=e;const s=await Qt.fromBinary(a,Q3,r);return new as(s)}const qf=M.constructAllowedPackets([Jn,is,qo,H3,Rf,Y0,jn,ur,Ee]),Ff=M.constructAllowedPackets([jn]),Of=M.constructAllowedPackets([Ee]);class er{constructor(e){this.packets=e||new Qt}getEncryptionKeyIDs(){const e=[];return this.packets.filterByTag(v.packet.publicKeyEncryptedSessionKey).forEach(function(r){e.push(r.publicKeyID)}),e}getSigningKeyIDs(){const e=this.unwrapCompressed(),r=e.packets.filterByTag(v.packet.onePassSignature);return r.length>0?r.map(i=>i.issuerKeyID):e.packets.filterByTag(v.packet.signature).map(i=>i.issuerKeyID)}async decrypt(e,r,i,n=new Date,a=vt){const s=i||await this.decryptSessionKeys(e,r,n,a),o=this.packets.filterByTag(v.packet.symmetricallyEncryptedData,v.packet.symEncryptedIntegrityProtectedData,v.packet.aeadEncryptedData);if(o.length===0)throw Error("No encrypted data found");const u=o[0];let c=null;const h=Promise.all(s.map(async({algorithm:m,data:b})=>{if(!M.isUint8Array(b)||!M.isString(m))throw Error("Invalid session key for decryption.");try{const K=v.write(v.symmetric,m);await u.decrypt(K,b,a)}catch(K){M.printDebugError(K),c=K}}));if(B0(u.encrypted),u.encrypted=null,await h,!u.packets||!u.packets.length)throw c||Error("Decryption failed.");const f=new er(u.packets);return u.packets=new Qt,f}async decryptSessionKeys(e,r,i=new Date,n=vt){let a,s=[];if(r){const o=this.packets.filterByTag(v.packet.symEncryptedSessionKey);if(o.length===0)throw Error("No symmetrically encrypted session key packet found.");await Promise.all(r.map(async function(u,c){let h;h=c?await Qt.fromBinary(o.write(),Ff,n):o,await Promise.all(h.map(async function(f){try{await f.decrypt(u),s.push(f)}catch(m){M.printDebugError(m)}}))}))}else{if(!e)throw Error("No key or password specified.");{const o=this.packets.filterByTag(v.packet.publicKeyEncryptedSessionKey);if(o.length===0)throw Error("No public key encrypted session key packet found.");await Promise.all(o.map(async function(u){await Promise.all(e.map(async function(c){let h=[v.symmetric.aes256,v.symmetric.aes128,v.symmetric.tripledes,v.symmetric.cast5];try{const m=await c.getPrimaryUser(i,void 0,n);m.selfCertification.preferredSymmetricAlgorithms&&(h=h.concat(m.selfCertification.preferredSymmetricAlgorithms))}catch{}const f=(await c.getDecryptionKeys(u.publicKeyID,null,void 0,n)).map(m=>m.keyPacket);await Promise.all(f.map(async function(m){if(!(!m||m.isDummy())){if(!m.isDecrypted())throw Error("Decryption key is not decrypted.");if(n.constantTimePKCS1Decryption&&(u.publicKeyAlgorithm===v.publicKey.rsaEncrypt||u.publicKeyAlgorithm===v.publicKey.rsaEncryptSign||u.publicKeyAlgorithm===v.publicKey.rsaSign||u.publicKeyAlgorithm===v.publicKey.elgamal)){const b=u.write();await Promise.all(Array.from(n.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map(async K=>{const I=new Y0;I.read(b);const U={sessionKeyAlgorithm:K,sessionKey:At.generateSessionKey(K)};try{await I.decrypt(m,U),s.push(I)}catch(G){M.printDebugError(G),a=G}}))}else try{if(await u.decrypt(m),!h.includes(v.write(v.symmetric,u.sessionKeyAlgorithm)))throw Error("A non-preferred symmetric algorithm was used.");s.push(u)}catch(b){M.printDebugError(b),a=b}}}))})),B0(u.encrypted),u.encrypted=null}))}}if(s.length>0){if(s.length>1){const o=new Set;s=s.filter(u=>{const c=u.sessionKeyAlgorithm+M.uint8ArrayToString(u.sessionKey);return!o.has(c)&&(o.add(c),!0)})}return s.map(o=>({data:o.sessionKey,algorithm:v.read(v.symmetric,o.sessionKeyAlgorithm)}))}throw a||Error("Session key decryption failed.")}getLiteralData(){const e=this.unwrapCompressed().packets.findPacket(v.packet.literalData);return e&&e.getBytes()||null}getFilename(){const e=this.unwrapCompressed().packets.findPacket(v.packet.literalData);return e&&e.getFilename()||null}getText(){const e=this.unwrapCompressed().packets.findPacket(v.packet.literalData);return e?e.getText():null}static async generateSessionKey(e=[],r=new Date,i=[],n=vt){const a=await X0("symmetric",e,r,i,n),s=v.read(v.symmetric,a),o=n.aeadProtect&&await async function(u,c=new Date,h=[],f=vt){let m=!0;return await Promise.all(u.map(async function(b,K){const I=await b.getPrimaryUser(c,h[K],f);I.selfCertification.features&&I.selfCertification.features[0]&v.features.aead||(m=!1)})),m}(e,r,i,n)?v.read(v.aead,await X0("aead",e,r,i,n)):void 0;return{data:At.generateSessionKey(a),algorithm:s,aeadAlgorithm:o}}async encrypt(e,r,i,n=!1,a=[],s=new Date,o=[],u=vt){if(i){if(!M.isUint8Array(i.data)||!M.isString(i.algorithm))throw Error("Invalid session key for encryption.")}else if(e&&e.length)i=await er.generateSessionKey(e,s,o,u);else{if(!r||!r.length)throw Error("No keys, passwords, or session key provided.");i=await er.generateSessionKey(void 0,void 0,void 0,u)}const{data:c,algorithm:h,aeadAlgorithm:f}=i,m=await er.encryptSessionKey(c,h,f,e,r,n,a,s,o,u);let b;f?(b=new qo,b.aeadAlgorithm=v.write(v.aead,f)):b=new H3,b.packets=this.packets;const K=v.write(v.symmetric,h);return await b.encrypt(K,c,u),m.packets.push(b),b.packets=new Qt,m}static async encryptSessionKey(e,r,i,n,a,s=!1,o=[],u=new Date,c=[],h=vt){const f=new Qt,m=v.write(v.symmetric,r),b=i&&v.write(v.aead,i);if(n){const K=await Promise.all(n.map(async function(I,U){const G=await I.getEncryptionKey(o[U],u,c,h),Q=new Y0;return Q.publicKeyID=s?Oi.wildcard():G.getKeyID(),Q.publicKeyAlgorithm=G.keyPacket.algorithm,Q.sessionKey=e,Q.sessionKeyAlgorithm=m,await Q.encrypt(G.keyPacket),delete Q.sessionKey,Q}));f.push(...K)}if(a){const K=async function(Q,Y){try{return await Q.decrypt(Y),1}catch{return 0}},I=(Q,Y)=>Q+Y,U=async function(Q,Y,R,J){const V=new jn(h);return V.sessionKey=Q,V.sessionKeyAlgorithm=Y,R&&(V.aeadAlgorithm=R),await V.encrypt(J,h),h.passwordCollisionCheck&&(await Promise.all(a.map(X=>K(V,X)))).reduce(I)!==1?U(Q,Y,J):(delete V.sessionKey,V)},G=await Promise.all(a.map(Q=>U(e,m,b,Q)));f.push(...G)}return new er(f)}async sign(e=[],r=null,i=[],n=new Date,a=[],s=[],o=vt){const u=new Qt,c=this.packets.findPacket(v.packet.literalData);if(!c)throw Error("No literal data packet to sign.");let h,f;const m=c.text===null?v.signature.binary:v.signature.text;if(r)for(f=r.packets.filterByTag(v.packet.signature),h=f.length-1;h>=0;h--){const b=f[h],K=new ur;K.signatureType=b.signatureType,K.hashAlgorithm=b.hashAlgorithm,K.publicKeyAlgorithm=b.publicKeyAlgorithm,K.issuerKeyID=b.issuerKeyID,e.length||h!==0||(K.flags=1),u.push(K)}return await Promise.all(Array.from(e).reverse().map(async function(b,K){if(!b.isPrivate())throw Error("Need private key for signing");const I=i[e.length-1-K],U=await b.getSigningKey(I,n,a,o),G=new ur;return G.signatureType=m,G.hashAlgorithm=await $o(b,U.keyPacket,n,a,o),G.publicKeyAlgorithm=U.keyPacket.algorithm,G.issuerKeyID=U.getKeyID(),K===e.length-1&&(G.flags=1),G})).then(b=>{b.forEach(K=>u.push(K))}),u.push(c),u.push(...await H2(c,e,r,i,n,a,s,!1,o)),new er(u)}compress(e,r=vt){if(e===v.compression.uncompressed)return this;const i=new is(r);i.algorithm=e,i.packets=this.packets;const n=new Qt;return n.push(i),new er(n)}async signDetached(e=[],r=null,i=[],n=new Date,a=[],s=[],o=vt){const u=this.packets.findPacket(v.packet.literalData);if(!u)throw Error("No literal data packet to sign.");return new G3(await H2(u,e,r,i,n,a,s,!0,o))}async verify(e,r=new Date,i=vt){const n=this.unwrapCompressed(),a=n.packets.filterByTag(v.packet.literalData);if(a.length!==1)throw Error("Can only verify message with one literal data packet.");ce(n.packets.stream)&&n.packets.push(...await he(n.packets.stream,u=>u||[]));const s=n.packets.filterByTag(v.packet.onePassSignature).reverse(),o=n.packets.filterByTag(v.packet.signature);return s.length&&!o.length&&M.isStream(n.packets.stream)&&!ce(n.packets.stream)?(await Promise.all(s.map(async u=>{u.correspondingSig=new Promise((c,h)=>{u.correspondingSigResolve=c,u.correspondingSigReject=h}),u.signatureData=Ni(async()=>(await u.correspondingSig).signatureData),u.hashed=he(await u.hash(u.signatureType,a[0],void 0,!1)),u.hashed.catch(()=>{})})),n.packets.stream=ci(n.packets.stream,async(u,c)=>{const h=Nr(u),f=We(c);try{for(let m=0;m<s.length;m++){const{value:b}=await h.read();s[m].correspondingSigResolve(b)}await h.readToEnd(),await f.ready,await f.close()}catch(m){s.forEach(b=>{b.correspondingSigReject(m)}),await f.abort(m)}}),A0(s,a,e,r,!1,i)):A0(o,a,e,r,!1,i)}verifyDetached(e,r,i=new Date,n=vt){const a=this.unwrapCompressed().packets.filterByTag(v.packet.literalData);if(a.length!==1)throw Error("Can only verify message with one literal data packet.");return A0(e.packets,a,r,i,!0,n)}unwrapCompressed(){const e=this.packets.filterByTag(v.packet.compressedData);return e.length?new er(e[0].packets):this}async appendSignature(e,r=vt){await this.packets.read(M.isUint8Array(e)?e:(await Va(e)).data,Of,r)}write(){return this.packets.write()}armor(e=vt){return Za(v.armor.message,this.write(),null,null,null,e)}}async function H2(t,e,r=null,i=[],n=new Date,a=[],s=[],o=!1,u=vt){const c=new Qt,h=t.text===null?v.signature.binary:v.signature.text;if(await Promise.all(e.map(async(f,m)=>{const b=a[m];if(!f.isPrivate())throw Error("Need private key for signing");const K=await f.getSigningKey(i[m],n,b,u);return bn(t,f,K.keyPacket,{signatureType:h},n,b,s,o,u)})).then(f=>{c.push(...f)}),r){const f=r.packets.filterByTag(v.packet.signature);c.push(...f)}return c}async function A0(t,e,r,i=new Date,n=!1,a=vt){return Promise.all(t.filter(function(s){return["text","binary"].includes(v.read(v.signature,s.signatureType))}).map(async function(s){return async function(o,u,c,h=new Date,f=!1,m=vt){let b,K;for(const G of c){const Q=G.getKeys(o.issuerKeyID);if(Q.length>0){b=G,K=Q[0];break}}const I=o instanceof ur?o.correspondingSig:o,U={keyID:o.issuerKeyID,verified:(async()=>{if(!K)throw Error("Could not find signing key with key ID "+o.issuerKeyID.toHex());await o.verify(K.keyPacket,o.signatureType,u[0],h,f,m);const G=await I;if(K.getCreationTime()>G.created)throw Error("Key is newer than the signature");try{await b.getSigningKey(K.getKeyID(),G.created,void 0,m)}catch(Q){if(!m.allowInsecureVerificationWithReformattedKeys||!Q.message.match(/Signature creation time is in the future/))throw Q;await b.getSigningKey(K.getKeyID(),h,void 0,m)}return!0})(),signature:(async()=>{const G=await I,Q=new Qt;return G&&Q.push(G),new G3(Q)})()};return U.signature.catch(()=>{}),U.verified.catch(()=>{}),U}(s,e,r,i,n,a)}))}async function G6({armoredMessage:t,binaryMessage:e,config:r,...i}){r={...vt,...r};let n=t||e;if(!n)throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`");if(t&&!M.isString(t)&&!M.isStream(t))throw Error("readMessage: options.armoredMessage must be a string or stream");if(e&&!M.isUint8Array(e)&&!M.isStream(e))throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream");const a=Object.keys(i);if(a.length>0)throw Error("Unknown option: "+a.join(", "));const s=M.isStream(n);if(s&&(await Pu(),n=Ga(n)),t){const{type:c,data:h}=await Va(n,r);if(c!==v.armor.message)throw Error("Armored text not of type message");n=h}const o=await Qt.fromBinary(n,qf,r),u=new er(o);return u.fromStream=s,u}async function V6({text:t,binary:e,filename:r,date:i=new Date,format:n=t!==void 0?"utf8":"binary",...a}){let s=t!==void 0?t:e;if(s===void 0)throw Error("createMessage: must pass options object containing `text` or `binary`");if(t&&!M.isString(t)&&!M.isStream(t))throw Error("createMessage: options.text must be a string or stream");if(e&&!M.isUint8Array(e)&&!M.isStream(e))throw Error("createMessage: options.binary must be a Uint8Array or stream");const o=Object.keys(a);if(o.length>0)throw Error("Unknown option: "+o.join(", "));const u=M.isStream(s);u&&(await Pu(),s=Ga(s));const c=new Jn(i);t!==void 0?c.setText(s,v.write(v.literal,n)):c.setBytes(s,v.write(v.literal,n)),r!==void 0&&c.setFilename(r);const h=new Qt;h.push(c);const f=new er(h);return f.fromStream=u,f}async function Z6({userIDs:t=[],passphrase:e,type:r="ecc",rsaBits:i=4096,curve:n="curve25519",keyExpirationTime:a=0,date:s=new Date,subkeys:o=[{}],format:u="armored",config:c,...h}){Lo(c={...vt,...c}),t=Ze(t);const f=Object.keys(h);if(f.length>0)throw Error("Unknown option: "+f.join(", "));if(t.length===0)throw Error("UserIDs are required for key generation");if(r==="rsa"&&i<c.minRSABits)throw Error(`rsaBits should be at least ${c.minRSABits}, got: ${i}`);const m={userIDs:t,passphrase:e,type:r,rsaBits:i,curve:n,keyExpirationTime:a,date:s,subkeys:o};try{const{key:b,revocationCertificate:K}=await async function(I,U){I.sign=!0,(I=J0(I)).subkeys=I.subkeys.map((J,V)=>J0(I.subkeys[V],I));let G=[Uf(I,U)];G=G.concat(I.subkeys.map(J=>V3(J,U)));const Q=await Promise.all(G),Y=await zf(Q[0],Q.slice(1),I,U),R=await Y.getRevocationCertificate(I.date,U);return Y.revocationSignatures=[],{key:Y,revocationCertificate:R}}(m,c);return b.getKeys().forEach(({keyPacket:I})=>Dn(I,c)),{privateKey:G2(b,u,c),publicKey:G2(b.toPublic(),u,c),revocationCertificate:K}}catch(b){throw M.wrapError("Error generating keypair",b)}}async function Y6({privateKey:t,passphrase:e,config:r,...i}){Lo(r={...vt,...r});const n=Object.keys(i);if(n.length>0)throw Error("Unknown option: "+n.join(", "));if(!t.isPrivate())throw Error("Cannot decrypt a public key");const a=t.clone(!0),s=M.isArray(e)?e:[e];try{return await Promise.all(a.getKeys().map(o=>M.anyPromise(s.map(u=>o.keyPacket.decrypt(u))))),await a.validate(r),a}catch(o){throw a.clearPrivateParams(),M.wrapError("Error decrypting private key",o)}}async function Q6({message:t,encryptionKeys:e,signingKeys:r,passwords:i,sessionKey:n,format:a="armored",signature:s=null,wildcard:o=!1,signingKeyIDs:u=[],encryptionKeyIDs:c=[],date:h=new Date,signingUserIDs:f=[],encryptionUserIDs:m=[],signatureNotations:b=[],config:K,...I}){if(Lo(K={...vt,...K}),X3(t),$f(a),e=Ze(e),r=Ze(r),i=Ze(i),u=Ze(u),c=Ze(c),f=Ze(f),m=Ze(m),b=Ze(b),I.detached)throw Error("The `detached` option has been removed from openpgp.encrypt, separately call openpgp.sign instead. Don't forget to remove the `privateKeys` option as well.");if(I.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encrypt, pass `encryptionKeys` instead");if(I.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.encrypt, pass `signingKeys` instead");if(I.armor!==void 0)throw Error("The `armor` option has been removed from openpgp.encrypt, pass `format` instead.");const U=Object.keys(I);if(U.length>0)throw Error("Unknown option: "+U.join(", "));r||(r=[]);const G=t.fromStream;try{if((r.length||s)&&(t=await t.sign(r,s,u,h,f,b,K)),t=t.compress(await X0("compression",e,h,m,K),K),t=await t.encrypt(e,i,n,o,c,h,m,K),a==="object")return t;const Q=a==="armored";return J3(Q?t.armor(K):t.write(),G,Q?"utf8":"binary")}catch(Q){throw M.wrapError("Error encrypting message",Q)}}async function X6({message:t,decryptionKeys:e,passwords:r,sessionKeys:i,verificationKeys:n,expectSigned:a=!1,format:s="utf8",signature:o=null,date:u=new Date,config:c,...h}){if(Lo(c={...vt,...c}),X3(t),n=Ze(n),e=Ze(e),r=Ze(r),i=Ze(i),h.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decrypt, pass `decryptionKeys` instead");if(h.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.decrypt, pass `verificationKeys` instead");const f=Object.keys(h);if(f.length>0)throw Error("Unknown option: "+f.join(", "));try{const m=await t.decrypt(e,r,i,u,c);n||(n=[]);const b={};if(b.signatures=o?await m.verifyDetached(o,n,u,c):await m.verify(n,u,c),b.data=s==="binary"?m.getLiteralData():m.getText(),b.filename=m.getFilename(),Nf(b,t),a){if(n.length===0)throw Error("Verification keys are required to verify message signatures");if(b.signatures.length===0)throw Error("Message is not signed");b.data=Ne([b.data,Ni(async()=>{await M.anyPromise(b.signatures.map(K=>K.verified))})])}return b.data=await J3(b.data,t.fromStream,s),b}catch(m){throw M.wrapError("Error decrypting message",m)}}function X3(t){if(!(t instanceof er))throw Error("Parameter [message] needs to be of type Message")}function $f(t){if(t!=="armored"&&t!=="binary"&&t!=="object")throw Error("Unsupported format "+t)}const Lf=Object.keys(vt).length;function Lo(t){const e=Object.keys(t);if(e.length!==Lf){for(const r of e)if(vt[r]===void 0)throw Error("Unknown config property: "+r)}}function Ze(t){return t&&!M.isArray(t)&&(t=[t]),t}async function J3(t,e,r="utf8"){const i=M.isStream(t);return i==="array"?he(t):e==="node"?(t=b1(t),r!=="binary"&&t.setEncoding(r),t):e==="web"&&i==="ponyfill"?Su(t):t}function Nf(t,e){t.data=ci(e.packets.stream,async(r,i)=>{await Fi(t.data,i,{preventClose:!0});const n=We(i);try{await he(r,a=>a),await n.close()}catch(a){await n.abort(a)}})}function G2(t,e,r){switch(e){case"object":return t;case"armored":return t.armor(r);case"binary":return t.write();default:throw Error("Unsupported format "+e)}}/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */const Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:t=>`Symbol(${t})`;function K1(){}const V2=typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:void 0;function He(t){return typeof t=="object"&&t!==null||typeof t=="function"}const th=K1,R1=Promise,jf=Promise.prototype.then,Wf=Promise.resolve.bind(R1),Hf=Promise.reject.bind(R1);function ze(t){return new R1(t)}function ne(t){return Wf(t)}function Ut(t){return Hf(t)}function ai(t,e,r){return jf.call(t,e,r)}function hr(t,e,r){ai(ai(t,e,r),void 0,th)}function S0(t,e){hr(t,e)}function eh(t,e){hr(t,void 0,e)}function fn(t,e,r){return ai(t,e,r)}function ss(t){ai(t,void 0,th)}const rh=(()=>{const t=V2&&V2.queueMicrotask;if(typeof t=="function")return t;const e=ne(void 0);return r=>ai(e,r)})();function No(t,e,r){if(typeof t!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(t,e,r)}function wn(t,e,r){try{return ne(No(t,e,r))}catch(i){return Ut(i)}}class Lr{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const r=this._back;let i=r;r._elements.length===16383&&(i={_elements:[],_next:void 0}),r._elements.push(e),i!==r&&(this._back=i,r._next=i),++this._size}shift(){const e=this._front;let r=e;const i=this._cursor;let n=i+1;const a=e._elements,s=a[i];return n===16384&&(r=e._next,n=0),--this._size,this._cursor=n,e!==r&&(this._front=r),a[i]=void 0,s}forEach(e){let r=this._cursor,i=this._front,n=i._elements;for(;!(r===n.length&&i._next===void 0||r===n.length&&(i=i._next,n=i._elements,r=0,n.length===0));)e(n[r]),++r}peek(){const e=this._front,r=this._cursor;return e._elements[r]}}function ih(t,e){t._ownerReadableStream=e,e._reader=t,e._state==="readable"?e1(t):e._state==="closed"?function(r){e1(r),ah(r)}(t):nh(t,e._storedError)}function I1(t,e){return ln(t._ownerReadableStream,e)}function un(t){t._ownerReadableStream._state==="readable"?U1(t,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,r){nh(e,r)}(t,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._ownerReadableStream._reader=void 0,t._ownerReadableStream=void 0}function Gn(t){return new TypeError("Cannot "+t+" a stream using a released reader")}function e1(t){t._closedPromise=ze((e,r)=>{t._closedPromise_resolve=e,t._closedPromise_reject=r})}function nh(t,e){e1(t),U1(t,e)}function U1(t,e){t._closedPromise_reject!==void 0&&(ss(t._closedPromise),t._closedPromise_reject(e),t._closedPromise_resolve=void 0,t._closedPromise_reject=void 0)}function ah(t){t._closedPromise_resolve!==void 0&&(t._closedPromise_resolve(void 0),t._closedPromise_resolve=void 0,t._closedPromise_reject=void 0)}const sh=Wt("[[AbortSteps]]"),oh=Wt("[[ErrorSteps]]"),B1=Wt("[[CancelSteps]]"),T1=Wt("[[PullSteps]]"),Z2=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)},Gf=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};function si(t,e){if(t!==void 0&&typeof(r=t)!="object"&&typeof r!="function")throw new TypeError(e+" is not an object.");var r}function dr(t,e){if(typeof t!="function")throw new TypeError(e+" is not a function.")}function ch(t,e){if(!function(r){return typeof r=="object"&&r!==null||typeof r=="function"}(t))throw new TypeError(e+" is not an object.")}function fi(t,e,r){if(t===void 0)throw new TypeError(`Parameter ${e} is required in '${r}'.`)}function r1(t,e,r){if(t===void 0)throw new TypeError(`${e} is required in '${r}'.`)}function z1(t){return Number(t)}function Y2(t){return t===0?0:t}function uh(t,e){const r=Number.MAX_SAFE_INTEGER;let i=Number(t);if(i=Y2(i),!Z2(i))throw new TypeError(e+" is not a finite number");if(i=function(n){return Y2(Gf(n))}(i),i<0||i>r)throw new TypeError(`${e} is outside the accepted range of 0 to ${r}, inclusive`);return Z2(i)&&i!==0?i:0}function q1(t,e){if(!Pi(t))throw new TypeError(e+" is not a ReadableStream.")}function Os(t){return new uo(t)}function hh(t,e){t._reader._readRequests.push(e)}function F1(t,e,r){const i=t._reader._readRequests.shift();r?i._closeSteps():i._chunkSteps(e)}function jo(t){return t._reader._readRequests.length}function dh(t){const e=t._reader;return e!==void 0&&!!hn(e)}class uo{constructor(e){if(fi(e,1,"ReadableStreamDefaultReader"),q1(e,"First parameter"),Bi(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ih(this,e),this._readRequests=new Lr}get closed(){return hn(this)?this._closedPromise:Ut(vs("closed"))}cancel(e=void 0){return hn(this)?this._ownerReadableStream===void 0?Ut(Gn("cancel")):I1(this,e):Ut(vs("cancel"))}read(){if(!hn(this))return Ut(vs("read"));if(this._ownerReadableStream===void 0)return Ut(Gn("read from"));let e,r;const i=ze((n,a)=>{e=n,r=a});return Wo(this,{_chunkSteps:n=>e({value:n,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:n=>r(n)}),i}releaseLock(){if(!hn(this))throw vs("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");un(this)}}}function hn(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_readRequests")}function Wo(t,e){const r=t._ownerReadableStream;r._disturbed=!0,r._state==="closed"?e._closeSteps():r._state==="errored"?e._errorSteps(r._storedError):r._readableStreamController[T1](e)}function vs(t){return new TypeError(`ReadableStreamDefaultReader.prototype.${t} can only be used on a ReadableStreamDefaultReader`)}let ho;Object.defineProperties(uo.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(uo.prototype,Wt.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),typeof Wt.asyncIterator=="symbol"&&(ho={[Wt.asyncIterator](){return this}},Object.defineProperty(ho,Wt.asyncIterator,{enumerable:!1}));class Vf{constructor(e,r){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=r}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?fn(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const r=()=>this._returnSteps(e);return this._ongoingPromise?fn(this._ongoingPromise,r,r):r()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(e._ownerReadableStream===void 0)return Ut(Gn("iterate"));let r,i;const n=ze((a,s)=>{r=a,i=s});return Wo(e,{_chunkSteps:a=>{this._ongoingPromise=void 0,rh(()=>r({value:a,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,un(e),r({value:void 0,done:!0})},_errorSteps:a=>{this._ongoingPromise=void 0,this._isFinished=!0,un(e),i(a)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const r=this._reader;if(r._ownerReadableStream===void 0)return Ut(Gn("finish iterating"));if(!this._preventCancel){const i=I1(r,e);return un(r),fn(i,()=>({value:e,done:!0}))}return un(r),ne({value:e,done:!0})}}const fh={next(){return Q2(this)?this._asyncIteratorImpl.next():Ut(X2("next"))},return(t){return Q2(this)?this._asyncIteratorImpl.return(t):Ut(X2("return"))}};function Q2(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_asyncIteratorImpl")}function X2(t){return new TypeError(`ReadableStreamAsyncIterator.${t} can only be used on a ReadableSteamAsyncIterator`)}ho!==void 0&&Object.setPrototypeOf(fh,ho);const lh=Number.isNaN||function(t){return t!=t};function ph(t){return!!function(e){return!(typeof e!="number"||lh(e)||e<0)}(t)&&t!==1/0}function i1(t){const e=t._queue.shift();return t._queueTotalSize-=e.size,t._queueTotalSize<0&&(t._queueTotalSize=0),e.value}function O1(t,e,r){if(!ph(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t._queue.push({value:e,size:r}),t._queueTotalSize+=r}function Wi(t){t._queue=new Lr,t._queueTotalSize=0}function E0(t){return t.slice()}class fo{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!P0(this))throw x0("view");return this._view}respond(e){if(!P0(this))throw x0("respond");if(fi(e,1,"respond"),e=uh(e,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(r,i){if(i=Number(i),!ph(i))throw new RangeError("bytesWritten must be a finite");J2(r,i)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!P0(this))throw x0("respondWithNewView");if(fi(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(e.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(e.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");(function(r,i){const n=r._pendingPullIntos.peek();if(n.byteOffset+n.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(n.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");n.buffer=i.buffer,J2(r,i.byteLength)})(this._associatedReadableByteStreamController,e)}}Object.defineProperties(fo.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(fo.prototype,Wt.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class lo{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!xn(this))throw aa("byobRequest");if(this._byobRequest===null&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek(),r=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),i=Object.create(fo.prototype);(function(n,a,s){n._associatedReadableByteStreamController=a,n._view=s})(i,this,r),this._byobRequest=i}return this._byobRequest}get desiredSize(){if(!xn(this))throw aa("desiredSize");return vh(this)}close(){if(!xn(this))throw aa("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if(e!=="readable")throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);(function(r){const i=r._controlledReadableByteStream;if(!(r._closeRequested||i._state!=="readable")){if(r._queueTotalSize>0)return void(r._closeRequested=!0);if(r._pendingPullIntos.length>0&&r._pendingPullIntos.peek().bytesFilled>0){const n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $a(r,n),n}po(r),os(i)}})(this)}enqueue(e){if(!xn(this))throw aa("enqueue");if(fi(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(e.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(e.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const r=this._controlledReadableByteStream._state;if(r!=="readable")throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`);(function(i,n){const a=i._controlledReadableByteStream;if(i._closeRequested||a._state!=="readable")return;const s=n.buffer,o=n.byteOffset,u=n.byteLength,c=s;dh(a)?jo(a)===0?$s(i,c,o,u):F1(a,new Uint8Array(c,o,u),!1):L1(a)?($s(i,c,o,u),wh(i)):$s(i,c,o,u),mn(i)})(this,e)}error(e=void 0){if(!xn(this))throw aa("error");$a(this,e)}[B1](e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),Wi(this);const r=this._cancelAlgorithm(e);return po(this),r}[T1](e){const r=this._controlledReadableByteStream;if(this._queueTotalSize>0){const n=this._queue.shift();this._queueTotalSize-=n.byteLength,gh(this);const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);return void e._chunkSteps(a)}const i=this._autoAllocateChunkSize;if(i!==void 0){let n;try{n=new ArrayBuffer(i)}catch(s){return void e._errorSteps(s)}const a={buffer:n,byteOffset:0,byteLength:i,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}hh(r,e),mn(this)}}function xn(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledReadableByteStream")}function P0(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_associatedReadableByteStreamController")}function mn(t){if(!!function(r){const i=r._controlledReadableByteStream;return i._state!=="readable"||r._closeRequested||!r._started?!1:!!(dh(i)&&jo(i)>0||L1(i)&&_h(i)>0||vh(r)>0)}(t)){if(t._pulling)return void(t._pullAgain=!0);t._pulling=!0,hr(t._pullAlgorithm(),()=>{t._pulling=!1,t._pullAgain&&(t._pullAgain=!1,mn(t))},r=>{$a(t,r)})}}function n1(t,e){let r=!1;t._state==="closed"&&(r=!0);const i=yh(e);e.readerType==="default"?F1(t,i,r):function(n,a,s){const o=n._reader,u=o._readIntoRequests.shift();s?u._closeSteps(a):u._chunkSteps(a)}(t,i,r)}function yh(t){const e=t.bytesFilled,r=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,e/r)}function $s(t,e,r,i){t._queue.push({buffer:e,byteOffset:r,byteLength:i}),t._queueTotalSize+=i}function bh(t,e){const r=e.elementSize,i=e.bytesFilled-e.bytesFilled%r,n=Math.min(t._queueTotalSize,e.byteLength-e.bytesFilled),a=e.bytesFilled+n,s=a-a%r;let o=n,u=!1;s>i&&(o=s-e.bytesFilled,u=!0);const c=t._queue;for(;o>0;){const I=c.peek(),U=Math.min(o,I.byteLength),G=e.byteOffset+e.bytesFilled;h=e.buffer,f=G,m=I.buffer,b=I.byteOffset,K=U,new Uint8Array(h).set(new Uint8Array(m,b,K),f),I.byteLength===U?c.shift():(I.byteOffset+=U,I.byteLength-=U),t._queueTotalSize-=U,mh(t,U,e),o-=U}var h,f,m,b,K;return u}function mh(t,e,r){$1(t),r.bytesFilled+=e}function gh(t){t._queueTotalSize===0&&t._closeRequested?(po(t),os(t._controlledReadableByteStream)):mn(t)}function $1(t){t._byobRequest!==null&&(t._byobRequest._associatedReadableByteStreamController=void 0,t._byobRequest._view=null,t._byobRequest=null)}function wh(t){for(;t._pendingPullIntos.length>0;){if(t._queueTotalSize===0)return;const e=t._pendingPullIntos.peek();bh(t,e)&&(a1(t),n1(t._controlledReadableByteStream,e))}}function J2(t,e){const r=t._pendingPullIntos.peek();if(t._controlledReadableByteStream._state==="closed"){if(e!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");(function(i,n){n.buffer=n.buffer;const a=i._controlledReadableByteStream;if(L1(a))for(;_h(a)>0;)n1(a,a1(i))})(t,r)}else(function(i,n,a){if(a.bytesFilled+n>a.byteLength)throw new RangeError("bytesWritten out of range");if(mh(i,n,a),a.bytesFilled<a.elementSize)return;a1(i);const s=a.bytesFilled%a.elementSize;if(s>0){const o=a.byteOffset+a.bytesFilled,u=a.buffer.slice(o-s,o);$s(i,u,0,u.byteLength)}a.buffer=a.buffer,a.bytesFilled-=s,n1(i._controlledReadableByteStream,a),wh(i)})(t,e,r);mn(t)}function a1(t){const e=t._pendingPullIntos.shift();return $1(t),e}function po(t){t._pullAlgorithm=void 0,t._cancelAlgorithm=void 0}function $a(t,e){const r=t._controlledReadableByteStream;r._state==="readable"&&(function(i){$1(i),i._pendingPullIntos=new Lr}(t),Wi(t),po(t),Oh(r,e))}function vh(t){const e=t._controlledReadableByteStream._state;return e==="errored"?null:e==="closed"?0:t._strategyHWM-t._queueTotalSize}function Zf(t,e,r){const i=Object.create(lo.prototype);let n=()=>{},a=()=>ne(void 0),s=()=>ne(void 0);e.start!==void 0&&(n=()=>e.start(i)),e.pull!==void 0&&(a=()=>e.pull(i)),e.cancel!==void 0&&(s=u=>e.cancel(u));const o=e.autoAllocateChunkSize;if(o===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");(function(u,c,h,f,m,b,K){c._controlledReadableByteStream=u,c._pullAgain=!1,c._pulling=!1,c._byobRequest=null,c._queue=c._queueTotalSize=void 0,Wi(c),c._closeRequested=!1,c._started=!1,c._strategyHWM=b,c._pullAlgorithm=f,c._cancelAlgorithm=m,c._autoAllocateChunkSize=K,c._pendingPullIntos=new Lr,u._readableStreamController=c,hr(ne(h()),()=>{c._started=!0,mn(c)},I=>{$a(c,I)})})(t,i,n,a,s,r,o)}function x0(t){return new TypeError(`ReadableStreamBYOBRequest.prototype.${t} can only be used on a ReadableStreamBYOBRequest`)}function aa(t){return new TypeError(`ReadableByteStreamController.prototype.${t} can only be used on a ReadableByteStreamController`)}function tu(t,e){t._reader._readIntoRequests.push(e)}function _h(t){return t._reader._readIntoRequests.length}function L1(t){const e=t._reader;return e!==void 0&&!!wa(e)}Object.defineProperties(lo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(lo.prototype,Wt.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class yo{constructor(e){if(fi(e,1,"ReadableStreamBYOBReader"),q1(e,"First parameter"),Bi(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!xn(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");ih(this,e),this._readIntoRequests=new Lr}get closed(){return wa(this)?this._closedPromise:Ut(_s("closed"))}cancel(e=void 0){return wa(this)?this._ownerReadableStream===void 0?Ut(Gn("cancel")):I1(this,e):Ut(_s("cancel"))}read(e){if(!wa(this))return Ut(_s("read"));if(!ArrayBuffer.isView(e))return Ut(new TypeError("view must be an array buffer view"));if(e.byteLength===0)return Ut(new TypeError("view must have non-zero byteLength"));if(e.buffer.byteLength===0)return Ut(new TypeError("view's buffer must have non-zero byteLength"));if(this._ownerReadableStream===void 0)return Ut(Gn("read from"));let r,i;const n=ze((a,s)=>{r=a,i=s});return function(a,s,o){const u=a._ownerReadableStream;u._disturbed=!0,u._state==="errored"?o._errorSteps(u._storedError):function(c,h,f){const m=c._controlledReadableByteStream;let b=1;h.constructor!==DataView&&(b=h.constructor.BYTES_PER_ELEMENT);const K=h.constructor,I={buffer:h.buffer,byteOffset:h.byteOffset,byteLength:h.byteLength,bytesFilled:0,elementSize:b,viewConstructor:K,readerType:"byob"};if(c._pendingPullIntos.length>0)return c._pendingPullIntos.push(I),void tu(m,f);if(m._state!=="closed"){if(c._queueTotalSize>0){if(bh(c,I)){const U=yh(I);return gh(c),void f._chunkSteps(U)}if(c._closeRequested){const U=new TypeError("Insufficient bytes to fill elements in the given buffer");return $a(c,U),void f._errorSteps(U)}}c._pendingPullIntos.push(I),tu(m,f),mn(c)}else{const U=new K(I.buffer,I.byteOffset,0);f._closeSteps(U)}}(u._readableStreamController,s,o)}(this,e,{_chunkSteps:a=>r({value:a,done:!1}),_closeSteps:a=>r({value:a,done:!0}),_errorSteps:a=>i(a)}),n}releaseLock(){if(!wa(this))throw _s("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");un(this)}}}function wa(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_readIntoRequests")}function _s(t){return new TypeError(`ReadableStreamBYOBReader.prototype.${t} can only be used on a ReadableStreamBYOBReader`)}function La(t,e){const{highWaterMark:r}=t;if(r===void 0)return e;if(lh(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function bo(t){const{size:e}=t;return e||(()=>1)}function mo(t,e){si(t,e);const r=t==null?void 0:t.highWaterMark,i=t==null?void 0:t.size;return{highWaterMark:r===void 0?void 0:z1(r),size:i===void 0?void 0:Yf(i,e+" has member 'size' that")}}function Yf(t,e){return dr(t,e),r=>z1(t(r))}function Qf(t,e,r){return dr(t,r),i=>wn(t,e,[i])}function Xf(t,e,r){return dr(t,r),()=>wn(t,e,[])}function Jf(t,e,r){return dr(t,r),i=>No(t,e,[i])}function t6(t,e,r){return dr(t,r),(i,n)=>wn(t,e,[i,n])}function kh(t,e){if(!Kn(t))throw new TypeError(e+" is not a WritableStream.")}Object.defineProperties(yo.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(yo.prototype,Wt.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class go{constructor(e={},r={}){e===void 0?e=null:ch(e,"First parameter");const i=mo(r,"Second parameter"),n=function(s,o){si(s,o);const u=s==null?void 0:s.abort,c=s==null?void 0:s.close,h=s==null?void 0:s.start,f=s==null?void 0:s.type,m=s==null?void 0:s.write;return{abort:u===void 0?void 0:Qf(u,s,o+" has member 'abort' that"),close:c===void 0?void 0:Xf(c,s,o+" has member 'close' that"),start:h===void 0?void 0:Jf(h,s,o+" has member 'start' that"),write:m===void 0?void 0:t6(m,s,o+" has member 'write' that"),type:f}}(e,"First parameter");if(Sh(this),n.type!==void 0)throw new RangeError("Invalid type is specified");const a=bo(i);(function(s,o,u,c){const h=Object.create(Na.prototype);let f=()=>{},m=()=>ne(void 0),b=()=>ne(void 0),K=()=>ne(void 0);o.start!==void 0&&(f=()=>o.start(h)),o.write!==void 0&&(m=I=>o.write(I,h)),o.close!==void 0&&(b=()=>o.close()),o.abort!==void 0&&(K=I=>o.abort(I)),Kh(s,h,f,m,b,K,u,c)})(this,n,La(i,1),a)}get locked(){if(!Kn(this))throw As("locked");return Fn(this)}abort(e=void 0){return Kn(this)?Fn(this)?Ut(new TypeError("Cannot abort a stream that already has a writer")):wo(this,e):Ut(As("abort"))}close(){return Kn(this)?Fn(this)?Ut(new TypeError("Cannot close a stream that already has a writer")):Ur(this)?Ut(new TypeError("Cannot close an already-closing stream")):Eh(this):Ut(As("close"))}getWriter(){if(!Kn(this))throw As("getWriter");return Ah(this)}}function Ah(t){return new vo(t)}function Sh(t){t._state="writable",t._storedError=void 0,t._writer=void 0,t._writableStreamController=void 0,t._writeRequests=new Lr,t._inFlightWriteRequest=void 0,t._closeRequest=void 0,t._inFlightCloseRequest=void 0,t._pendingAbortRequest=void 0,t._backpressure=!1}function Kn(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_writableStreamController")}function Fn(t){return t._writer!==void 0}function wo(t,e){const r=t._state;if(r==="closed"||r==="errored")return ne(void 0);if(t._pendingAbortRequest!==void 0)return t._pendingAbortRequest._promise;let i=!1;r==="erroring"&&(i=!0,e=void 0);const n=ze((a,s)=>{t._pendingAbortRequest={_promise:void 0,_resolve:a,_reject:s,_reason:e,_wasAlreadyErroring:i}});return t._pendingAbortRequest._promise=n,i||N1(t,e),n}function Eh(t){const e=t._state;if(e==="closed"||e==="errored")return Ut(new TypeError(`The stream (in ${e} state) is not in the writable state and cannot be closed`));const r=ze((a,s)=>{const o={_resolve:a,_reject:s};t._closeRequest=o}),i=t._writer;var n;return i!==void 0&&t._backpressure&&e==="writable"&&V1(i),O1(n=t._writableStreamController,Dh,0),Ho(n),r}function s1(t,e){t._state!=="writable"?j1(t):N1(t,e)}function N1(t,e){const r=t._writableStreamController;t._state="erroring",t._storedError=e;const i=t._writer;i!==void 0&&xh(i,e),!function(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}(t)&&r._started&&j1(t)}function j1(t){t._state="errored",t._writableStreamController[oh]();const e=t._storedError;if(t._writeRequests.forEach(i=>{i._reject(e)}),t._writeRequests=new Lr,t._pendingAbortRequest===void 0)return void ks(t);const r=t._pendingAbortRequest;if(t._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(e),void ks(t);hr(t._writableStreamController[sh](r._reason),()=>{r._resolve(),ks(t)},i=>{r._reject(i),ks(t)})}function Ur(t){return t._closeRequest!==void 0||t._inFlightCloseRequest!==void 0}function ks(t){t._closeRequest!==void 0&&(t._closeRequest._reject(t._storedError),t._closeRequest=void 0);const e=t._writer;e!==void 0&&G1(e,t._storedError)}function W1(t,e){const r=t._writer;r!==void 0&&e!==t._backpressure&&(e?function(i){Go(i)}(r):V1(r)),t._backpressure=e}Object.defineProperties(go.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(go.prototype,Wt.toStringTag,{value:"WritableStream",configurable:!0});class vo{constructor(e){if(fi(e,1,"WritableStreamDefaultWriter"),kh(e,"First parameter"),Fn(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const r=e._state;if(r==="writable")!Ur(e)&&e._backpressure?Go(this):eu(this),Ls(this);else if(r==="erroring")c1(this,e._storedError),Ls(this);else if(r==="closed")eu(this),Ls(i=this),Bh(i);else{const n=e._storedError;c1(this,n),Uh(this,n)}var i}get closed(){return Qi(this)?this._closedPromise:Ut(Xi("closed"))}get desiredSize(){if(!Qi(this))throw Xi("desiredSize");if(this._ownerWritableStream===void 0)throw va("desiredSize");return function(e){const r=e._ownerWritableStream,i=r._state;return i==="errored"||i==="erroring"?null:i==="closed"?0:Rh(r._writableStreamController)}(this)}get ready(){return Qi(this)?this._readyPromise:Ut(Xi("ready"))}abort(e=void 0){return Qi(this)?this._ownerWritableStream===void 0?Ut(va("abort")):function(r,i){return wo(r._ownerWritableStream,i)}(this,e):Ut(Xi("abort"))}close(){if(!Qi(this))return Ut(Xi("close"));const e=this._ownerWritableStream;return e===void 0?Ut(va("close")):Ur(e)?Ut(new TypeError("Cannot close an already-closing stream")):Ph(this)}releaseLock(){if(!Qi(this))throw Xi("releaseLock");this._ownerWritableStream!==void 0&&Mh(this)}write(e=void 0){return Qi(this)?this._ownerWritableStream===void 0?Ut(va("write to")):Ch(this,e):Ut(Xi("write"))}}function Qi(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_ownerWritableStream")}function Ph(t){return Eh(t._ownerWritableStream)}function e6(t,e){t._closedPromiseState==="pending"?G1(t,e):function(r,i){Uh(r,i)}(t,e)}function xh(t,e){t._readyPromiseState==="pending"?Th(t,e):function(r,i){c1(r,i)}(t,e)}function Mh(t){const e=t._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");xh(t,r),e6(t,r),e._writer=void 0,t._ownerWritableStream=void 0}function Ch(t,e){const r=t._ownerWritableStream,i=r._writableStreamController,n=function(o,u){try{return o._strategySizeAlgorithm(u)}catch(c){return o1(o,c),1}}(i,e);if(r!==t._ownerWritableStream)return Ut(va("write to"));const a=r._state;if(a==="errored")return Ut(r._storedError);if(Ur(r)||a==="closed")return Ut(new TypeError("The stream is closing or closed and cannot be written to"));if(a==="erroring")return Ut(r._storedError);const s=function(o){return ze((u,c)=>{const h={_resolve:u,_reject:c};o._writeRequests.push(h)})}(r);return function(o,u,c){try{O1(o,u,c)}catch(f){return void o1(o,f)}const h=o._controlledWritableStream;!Ur(h)&&h._state==="writable"&&W1(h,H1(o)),Ho(o)}(i,e,n),s}Object.defineProperties(vo.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(vo.prototype,Wt.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Dh={};class Na{constructor(){throw new TypeError("Illegal constructor")}error(e=void 0){if(!function(r){return!(!He(r)||!Object.prototype.hasOwnProperty.call(r,"_controlledWritableStream"))}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");this._controlledWritableStream._state==="writable"&&Ih(this,e)}[sh](e){const r=this._abortAlgorithm(e);return _o(this),r}[oh](){Wi(this)}}function Kh(t,e,r,i,n,a,s,o){e._controlledWritableStream=t,t._writableStreamController=e,e._queue=void 0,e._queueTotalSize=void 0,Wi(e),e._started=!1,e._strategySizeAlgorithm=o,e._strategyHWM=s,e._writeAlgorithm=i,e._closeAlgorithm=n,e._abortAlgorithm=a;const u=H1(e);W1(t,u),hr(ne(r()),()=>{e._started=!0,Ho(e)},c=>{e._started=!0,s1(t,c)})}function _o(t){t._writeAlgorithm=void 0,t._closeAlgorithm=void 0,t._abortAlgorithm=void 0,t._strategySizeAlgorithm=void 0}function Rh(t){return t._strategyHWM-t._queueTotalSize}function Ho(t){const e=t._controlledWritableStream;if(!t._started||e._inFlightWriteRequest!==void 0)return;if(e._state==="erroring")return void j1(e);if(t._queue.length===0)return;const r=t._queue.peek().value;r===Dh?function(i){const n=i._controlledWritableStream;(function(s){s._inFlightCloseRequest=s._closeRequest,s._closeRequest=void 0})(n),i1(i);const a=i._closeAlgorithm();_o(i),hr(a,()=>{(function(s){s._inFlightCloseRequest._resolve(void 0),s._inFlightCloseRequest=void 0,s._state==="erroring"&&(s._storedError=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._resolve(),s._pendingAbortRequest=void 0)),s._state="closed";const o=s._writer;o!==void 0&&Bh(o)})(n)},s=>{(function(o,u){o._inFlightCloseRequest._reject(u),o._inFlightCloseRequest=void 0,o._pendingAbortRequest!==void 0&&(o._pendingAbortRequest._reject(u),o._pendingAbortRequest=void 0),s1(o,u)})(n,s)})}(t):function(i,n){const a=i._controlledWritableStream;(function(o){o._inFlightWriteRequest=o._writeRequests.shift()})(a);const s=i._writeAlgorithm(n);hr(s,()=>{(function(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0})(a);const o=a._state;if(i1(i),!Ur(a)&&o==="writable"){const u=H1(i);W1(a,u)}Ho(i)},o=>{a._state==="writable"&&_o(i),function(u,c){u._inFlightWriteRequest._reject(c),u._inFlightWriteRequest=void 0,s1(u,c)}(a,o)})}(t,r)}function o1(t,e){t._controlledWritableStream._state==="writable"&&Ih(t,e)}function H1(t){return Rh(t)<=0}function Ih(t,e){const r=t._controlledWritableStream;_o(t),N1(r,e)}function As(t){return new TypeError(`WritableStream.prototype.${t} can only be used on a WritableStream`)}function Xi(t){return new TypeError(`WritableStreamDefaultWriter.prototype.${t} can only be used on a WritableStreamDefaultWriter`)}function va(t){return new TypeError("Cannot "+t+" a stream using a released writer")}function Ls(t){t._closedPromise=ze((e,r)=>{t._closedPromise_resolve=e,t._closedPromise_reject=r,t._closedPromiseState="pending"})}function Uh(t,e){Ls(t),G1(t,e)}function G1(t,e){t._closedPromise_reject!==void 0&&(ss(t._closedPromise),t._closedPromise_reject(e),t._closedPromise_resolve=void 0,t._closedPromise_reject=void 0,t._closedPromiseState="rejected")}function Bh(t){t._closedPromise_resolve!==void 0&&(t._closedPromise_resolve(void 0),t._closedPromise_resolve=void 0,t._closedPromise_reject=void 0,t._closedPromiseState="resolved")}function Go(t){t._readyPromise=ze((e,r)=>{t._readyPromise_resolve=e,t._readyPromise_reject=r}),t._readyPromiseState="pending"}function c1(t,e){Go(t),Th(t,e)}function eu(t){Go(t),V1(t)}function Th(t,e){t._readyPromise_reject!==void 0&&(ss(t._readyPromise),t._readyPromise_reject(e),t._readyPromise_resolve=void 0,t._readyPromise_reject=void 0,t._readyPromiseState="rejected")}function V1(t){t._readyPromise_resolve!==void 0&&(t._readyPromise_resolve(void 0),t._readyPromise_resolve=void 0,t._readyPromise_reject=void 0,t._readyPromiseState="fulfilled")}Object.defineProperties(Na.prototype,{error:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(Na.prototype,Wt.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const ru=typeof DOMException!="undefined"?DOMException:void 0,r6=function(t){if(typeof t!="function"&&typeof t!="object")return!1;try{return new t,!0}catch{return!1}}(ru)?ru:function(){const t=function(e,r){this.message=e||"",this.name=r||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(t.prototype=Object.create(Error.prototype),"constructor",{value:t,writable:!0,configurable:!0}),t}();function iu(t,e,r,i,n,a){const s=Os(t),o=Ah(e);t._disturbed=!0;let u=!1,c=ne(void 0);return ze((h,f)=>{let m;if(a!==void 0){if(m=()=>{const J=new r6("Aborted","AbortError"),V=[];i||V.push(()=>e._state==="writable"?wo(e,J):ne(void 0)),n||V.push(()=>t._state==="readable"?ln(t,J):ne(void 0)),Q(()=>Promise.all(V.map(X=>X())),!0,J)},a.aborted)return void m();a.addEventListener("abort",m)}var b,K,I;if(G(t,s._closedPromise,J=>{i?Y(!0,J):Q(()=>wo(e,J),!0,J)}),G(e,o._closedPromise,J=>{n?Y(!0,J):Q(()=>ln(t,J),!0,J)}),b=t,K=s._closedPromise,I=()=>{r?Y():Q(()=>function(J){const V=J._ownerWritableStream,X=V._state;return Ur(V)||X==="closed"?ne(void 0):X==="errored"?Ut(V._storedError):Ph(J)}(o))},b._state==="closed"?I():S0(K,I),Ur(e)||e._state==="closed"){const J=new TypeError("the destination writable stream closed before all data could be piped to it");n?Y(!0,J):Q(()=>ln(t,J),!0,J)}function U(){const J=c;return ai(c,()=>J!==c?U():void 0)}function G(J,V,X){J._state==="errored"?X(J._storedError):eh(V,X)}function Q(J,V,X){function d(){hr(J(),()=>R(V,X),y=>R(!0,y))}u||(u=!0,e._state!=="writable"||Ur(e)?d():S0(U(),d))}function Y(J,V){u||(u=!0,e._state!=="writable"||Ur(e)?R(J,V):S0(U(),()=>R(J,V)))}function R(J,V){Mh(o),un(s),a!==void 0&&a.removeEventListener("abort",m),J?f(V):h(void 0)}ss(ze((J,V)=>{(function X(d){d?J():ai(u?ne(!0):ai(o._readyPromise,()=>ze((y,_)=>{Wo(s,{_chunkSteps:g=>{c=ai(Ch(o,g),void 0,K1),y(!1)},_closeSteps:()=>y(!0),_errorSteps:_})})),X,V)})(!1)}))})}class ja{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ss(this))throw Es("desiredSize");return Z1(this)}close(){if(!Ss(this))throw Es("close");if(!Vn(this))throw new TypeError("The stream is not in a state that permits close");Ha(this)}enqueue(e=void 0){if(!Ss(this))throw Es("enqueue");if(!Vn(this))throw new TypeError("The stream is not in a state that permits enqueue");return Ao(this,e)}error(e=void 0){if(!Ss(this))throw Es("error");Li(this,e)}[B1](e){Wi(this);const r=this._cancelAlgorithm(e);return ko(this),r}[T1](e){const r=this._controlledReadableStream;if(this._queue.length>0){const i=i1(this);this._closeRequested&&this._queue.length===0?(ko(this),os(r)):Wa(this),e._chunkSteps(i)}else hh(r,e),Wa(this)}}function Ss(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledReadableStream")}function Wa(t){if(!!zh(t)){if(t._pulling)return void(t._pullAgain=!0);t._pulling=!0,hr(t._pullAlgorithm(),()=>{t._pulling=!1,t._pullAgain&&(t._pullAgain=!1,Wa(t))},e=>{Li(t,e)})}}function zh(t){const e=t._controlledReadableStream;return!Vn(t)||!t._started?!1:Bi(e)&&jo(e)>0?!0:Z1(t)>0}function ko(t){t._pullAlgorithm=void 0,t._cancelAlgorithm=void 0,t._strategySizeAlgorithm=void 0}function Ha(t){if(!Vn(t))return;const e=t._controlledReadableStream;t._closeRequested=!0,t._queue.length===0&&(ko(t),os(e))}function Ao(t,e){if(!Vn(t))return;const r=t._controlledReadableStream;if(Bi(r)&&jo(r)>0)F1(r,e,!1);else{let i;try{i=t._strategySizeAlgorithm(e)}catch(n){throw Li(t,n),n}try{O1(t,e,i)}catch(n){throw Li(t,n),n}}Wa(t)}function Li(t,e){const r=t._controlledReadableStream;r._state==="readable"&&(Wi(t),ko(t),Oh(r,e))}function Z1(t){const e=t._controlledReadableStream._state;return e==="errored"?null:e==="closed"?0:t._strategyHWM-t._queueTotalSize}function Vn(t){const e=t._controlledReadableStream._state;return!t._closeRequested&&e==="readable"}function qh(t,e,r,i,n,a,s){e._controlledReadableStream=t,e._queue=void 0,e._queueTotalSize=void 0,Wi(e),e._started=!1,e._closeRequested=!1,e._pullAgain=!1,e._pulling=!1,e._strategySizeAlgorithm=s,e._strategyHWM=a,e._pullAlgorithm=i,e._cancelAlgorithm=n,t._readableStreamController=e,hr(ne(r()),()=>{e._started=!0,Wa(e)},o=>{Li(e,o)})}function Es(t){return new TypeError(`ReadableStreamDefaultController.prototype.${t} can only be used on a ReadableStreamDefaultController`)}function i6(t,e,r){return dr(t,r),i=>wn(t,e,[i])}function n6(t,e,r){return dr(t,r),i=>wn(t,e,[i])}function a6(t,e,r){return dr(t,r),i=>No(t,e,[i])}function s6(t,e){if((t=""+t)!="bytes")throw new TypeError(`${e} '${t}' is not a valid enumeration value for ReadableStreamType`);return t}function o6(t,e){if((t=""+t)!="byob")throw new TypeError(`${e} '${t}' is not a valid enumeration value for ReadableStreamReaderMode`);return t}function nu(t,e){si(t,e);const r=t==null?void 0:t.preventAbort,i=t==null?void 0:t.preventCancel,n=t==null?void 0:t.preventClose,a=t==null?void 0:t.signal;return a!==void 0&&function(s,o){if(!function(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}(s))throw new TypeError(o+" is not an AbortSignal.")}(a,e+" has member 'signal' that"),{preventAbort:!!r,preventCancel:!!i,preventClose:!!n,signal:a}}Object.defineProperties(ja.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(ja.prototype,Wt.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Rn{constructor(e={},r={}){e===void 0?e=null:ch(e,"First parameter");const i=mo(r,"Second parameter"),n=function(a,s){si(a,s);const o=a,u=o==null?void 0:o.autoAllocateChunkSize,c=o==null?void 0:o.cancel,h=o==null?void 0:o.pull,f=o==null?void 0:o.start,m=o==null?void 0:o.type;return{autoAllocateChunkSize:u===void 0?void 0:uh(u,s+" has member 'autoAllocateChunkSize' that"),cancel:c===void 0?void 0:i6(c,o,s+" has member 'cancel' that"),pull:h===void 0?void 0:n6(h,o,s+" has member 'pull' that"),start:f===void 0?void 0:a6(f,o,s+" has member 'start' that"),type:m===void 0?void 0:s6(m,s+" has member 'type' that")}}(e,"First parameter");if(Fh(this),n.type==="bytes"){if(i.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");Zf(this,n,La(i,0))}else{const a=bo(i);(function(s,o,u,c){const h=Object.create(ja.prototype);let f=()=>{},m=()=>ne(void 0),b=()=>ne(void 0);o.start!==void 0&&(f=()=>o.start(h)),o.pull!==void 0&&(m=()=>o.pull(h)),o.cancel!==void 0&&(b=K=>o.cancel(K)),qh(s,h,f,m,b,u,c)})(this,n,La(i,1),a)}}get locked(){if(!Pi(this))throw Ji("locked");return Bi(this)}cancel(e=void 0){return Pi(this)?Bi(this)?Ut(new TypeError("Cannot cancel a stream that already has a reader")):ln(this,e):Ut(Ji("cancel"))}getReader(e=void 0){if(!Pi(this))throw Ji("getReader");return function(r,i){si(r,i);const n=r==null?void 0:r.mode;return{mode:n===void 0?void 0:o6(n,i+" has member 'mode' that")}}(e,"First parameter").mode===void 0?Os(this):new yo(this)}pipeThrough(e,r={}){if(!Pi(this))throw Ji("pipeThrough");fi(e,1,"pipeThrough");const i=function(a,s){si(a,s);const o=a==null?void 0:a.readable;r1(o,"readable","ReadableWritablePair"),q1(o,s+" has member 'readable' that");const u=a==null?void 0:a.writable;return r1(u,"writable","ReadableWritablePair"),kh(u,s+" has member 'writable' that"),{readable:o,writable:u}}(e,"First parameter"),n=nu(r,"Second parameter");if(Bi(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Fn(i.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return ss(iu(this,i.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),i.readable}pipeTo(e,r={}){if(!Pi(this))return Ut(Ji("pipeTo"));if(e===void 0)return Ut("Parameter 1 is required in 'pipeTo'.");if(!Kn(e))return Ut(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let i;try{i=nu(r,"Second parameter")}catch(n){return Ut(n)}return Bi(this)?Ut(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Fn(e)?Ut(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):iu(this,e,i.preventClose,i.preventAbort,i.preventCancel,i.signal)}tee(){if(!Pi(this))throw Ji("tee");const e=function(r,i){const n=Os(r);let a,s,o,u,c,h=!1,f=!1,m=!1;const b=ze(U=>{c=U});function K(){return h||(h=!0,Wo(n,{_chunkSteps:U=>{rh(()=>{h=!1;const G=U,Q=U;f||Ao(o._readableStreamController,G),m||Ao(u._readableStreamController,Q)})},_closeSteps:()=>{h=!1,f||Ha(o._readableStreamController),m||Ha(u._readableStreamController),f&&m||c(void 0)},_errorSteps:()=>{h=!1}})),ne(void 0)}function I(){}return o=u1(I,K,function(U){if(f=!0,a=U,m){const G=E0([a,s]),Q=ln(r,G);c(Q)}return b}),u=u1(I,K,function(U){if(m=!0,s=U,f){const G=E0([a,s]),Q=ln(r,G);c(Q)}return b}),eh(n._closedPromise,U=>{Li(o._readableStreamController,U),Li(u._readableStreamController,U),f&&m||c(void 0)}),[o,u]}(this);return E0(e)}values(e=void 0){if(!Pi(this))throw Ji("values");return function(r,i){const n=Os(r),a=new Vf(n,i),s=Object.create(fh);return s._asyncIteratorImpl=a,s}(this,function(r,i){return si(r,i),{preventCancel:!!(r!=null&&r.preventCancel)}}(e,"First parameter").preventCancel)}}function u1(t,e,r,i=1,n=()=>1){const a=Object.create(Rn.prototype);return Fh(a),qh(a,Object.create(ja.prototype),t,e,r,i,n),a}function Fh(t){t._state="readable",t._reader=void 0,t._storedError=void 0,t._disturbed=!1}function Pi(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_readableStreamController")}function Bi(t){return t._reader!==void 0}function ln(t,e){return t._disturbed=!0,t._state==="closed"?ne(void 0):t._state==="errored"?Ut(t._storedError):(os(t),fn(t._readableStreamController[B1](e),K1))}function os(t){t._state="closed";const e=t._reader;e!==void 0&&(ah(e),hn(e)&&(e._readRequests.forEach(r=>{r._closeSteps()}),e._readRequests=new Lr))}function Oh(t,e){t._state="errored",t._storedError=e;const r=t._reader;r!==void 0&&(U1(r,e),hn(r)?(r._readRequests.forEach(i=>{i._errorSteps(e)}),r._readRequests=new Lr):(r._readIntoRequests.forEach(i=>{i._errorSteps(e)}),r._readIntoRequests=new Lr))}function Ji(t){return new TypeError(`ReadableStream.prototype.${t} can only be used on a ReadableStream`)}function $h(t,e){si(t,e);const r=t==null?void 0:t.highWaterMark;return r1(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:z1(r)}}Object.defineProperties(Rn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(Rn.prototype,Wt.toStringTag,{value:"ReadableStream",configurable:!0}),typeof Wt.asyncIterator=="symbol"&&Object.defineProperty(Rn.prototype,Wt.asyncIterator,{value:Rn.prototype.values,writable:!0,configurable:!0});const c6=function(t){return t.byteLength};class h1{constructor(e){fi(e,1,"ByteLengthQueuingStrategy"),e=$h(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!su(this))throw au("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!su(this))throw au("size");return c6}}function au(t){return new TypeError(`ByteLengthQueuingStrategy.prototype.${t} can only be used on a ByteLengthQueuingStrategy`)}function su(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(h1.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(h1.prototype,Wt.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const u6=function(){return 1};class d1{constructor(e){fi(e,1,"CountQueuingStrategy"),e=$h(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!cu(this))throw ou("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!cu(this))throw ou("size");return u6}}function ou(t){return new TypeError(`CountQueuingStrategy.prototype.${t} can only be used on a CountQueuingStrategy`)}function cu(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_countQueuingStrategyHighWaterMark")}function h6(t,e,r){return dr(t,r),i=>wn(t,e,[i])}function d6(t,e,r){return dr(t,r),i=>No(t,e,[i])}function f6(t,e,r){return dr(t,r),(i,n)=>wn(t,e,[i,n])}Object.defineProperties(d1.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(d1.prototype,Wt.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class f1{constructor(e={},r={},i={}){e===void 0&&(e=null);const n=mo(r,"Second parameter"),a=mo(i,"Third parameter"),s=function(m,b){si(m,b);const K=m==null?void 0:m.flush,I=m==null?void 0:m.readableType,U=m==null?void 0:m.start,G=m==null?void 0:m.transform,Q=m==null?void 0:m.writableType;return{flush:K===void 0?void 0:h6(K,m,b+" has member 'flush' that"),readableType:I,start:U===void 0?void 0:d6(U,m,b+" has member 'start' that"),transform:G===void 0?void 0:f6(G,m,b+" has member 'transform' that"),writableType:Q}}(e,"First parameter");if(s.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(s.writableType!==void 0)throw new RangeError("Invalid writableType specified");const o=La(a,0),u=bo(a),c=La(n,1),h=bo(n);let f;(function(m,b,K,I,U,G){function Q(){return b}function Y(d){return function(y,_){const g=y._transformStreamController;return y._backpressure?fn(y._backpressureChangePromise,()=>{const p=y._writable;if(p._state==="erroring")throw p._storedError;return hu(g,_)}):hu(g,_)}(m,d)}function R(d){return function(y,_){return So(y,_),ne(void 0)}(m,d)}function J(){return function(d){const y=d._readable,_=d._transformStreamController,g=_._flushAlgorithm();return Lh(_),fn(g,()=>{if(y._state==="errored")throw y._storedError;Ha(y._readableStreamController)},p=>{throw So(d,p),y._storedError})}(m)}function V(){return function(d){return Eo(d,!1),d._backpressureChangePromise}(m)}function X(d){return Vo(m,d),ne(void 0)}m._writable=function(d,y,_,g,p=1,E=()=>1){const D=Object.create(go.prototype);return Sh(D),Kh(D,Object.create(Na.prototype),d,y,_,g,p,E),D}(Q,Y,J,R,K,I),m._readable=u1(Q,V,X,U,G),m._backpressure=void 0,m._backpressureChangePromise=void 0,m._backpressureChangePromise_resolve=void 0,Eo(m,!0),m._transformStreamController=void 0})(this,ze(m=>{f=m}),c,h,o,u),function(m,b){const K=Object.create(Po.prototype);let I=G=>{try{return Nh(K,G),ne(void 0)}catch(Q){return Ut(Q)}},U=()=>ne(void 0);b.transform!==void 0&&(I=G=>b.transform(G,K)),b.flush!==void 0&&(U=()=>b.flush(K)),function(G,Q,Y,R){Q._controlledTransformStream=G,G._transformStreamController=Q,Q._transformAlgorithm=Y,Q._flushAlgorithm=R}(m,K,I,U)}(this,s),s.start!==void 0?f(s.start(this._transformStreamController)):f(void 0)}get readable(){if(!uu(this))throw du("readable");return this._readable}get writable(){if(!uu(this))throw du("writable");return this._writable}}function uu(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_transformStreamController")}function So(t,e){Li(t._readable._readableStreamController,e),Vo(t,e)}function Vo(t,e){Lh(t._transformStreamController),o1(t._writable._writableStreamController,e),t._backpressure&&Eo(t,!1)}function Eo(t,e){t._backpressureChangePromise!==void 0&&t._backpressureChangePromise_resolve(),t._backpressureChangePromise=ze(r=>{t._backpressureChangePromise_resolve=r}),t._backpressure=e}Object.defineProperties(f1.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(f1.prototype,Wt.toStringTag,{value:"TransformStream",configurable:!0});class Po{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ps(this))throw xs("desiredSize");return Z1(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!Ps(this))throw xs("enqueue");Nh(this,e)}error(e=void 0){if(!Ps(this))throw xs("error");var r;r=e,So(this._controlledTransformStream,r)}terminate(){if(!Ps(this))throw xs("terminate");(function(e){const r=e._controlledTransformStream;Ha(r._readable._readableStreamController),Vo(r,new TypeError("TransformStream terminated"))})(this)}}function Ps(t){return!!He(t)&&!!Object.prototype.hasOwnProperty.call(t,"_controlledTransformStream")}function Lh(t){t._transformAlgorithm=void 0,t._flushAlgorithm=void 0}function Nh(t,e){const r=t._controlledTransformStream,i=r._readable._readableStreamController;if(!Vn(i))throw new TypeError("Readable side is not in a state that permits enqueue");try{Ao(i,e)}catch(a){throw Vo(r,a),r._readable._storedError}(function(a){return!zh(a)})(i)!==r._backpressure&&Eo(r,!0)}function hu(t,e){return fn(t._transformAlgorithm(e),void 0,r=>{throw So(t._controlledTransformStream,r),r})}function xs(t){return new TypeError(`TransformStreamDefaultController.prototype.${t} can only be used on a TransformStreamDefaultController`)}function du(t){return new TypeError(`TransformStream.prototype.${t} can only be used on a TransformStream`)}Object.defineProperties(Po.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof Wt.toStringTag=="symbol"&&Object.defineProperty(Po.prototype,Wt.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var l6=Object.freeze(Object.defineProperty({__proto__:null,ByteLengthQueuingStrategy:h1,CountQueuingStrategy:d1,ReadableByteStreamController:lo,ReadableStream:Rn,ReadableStreamBYOBReader:yo,ReadableStreamBYOBRequest:fo,ReadableStreamDefaultController:ja,ReadableStreamDefaultReader:uo,TransformStream:f1,TransformStreamDefaultController:Po,WritableStream:go,WritableStreamDefaultController:Na,WritableStreamDefaultWriter:vo},Symbol.toStringTag,{value:"Module"}));/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var l1=function(t,e){return l1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},l1(t,e)};function jh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+e+" is not a constructor or null");function r(){this.constructor=t}l1(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Qe(t){if(!t)throw new TypeError("Assertion failed")}function Ka(){}function Y1(t){return typeof t=="object"&&t!==null||typeof t=="function"}function Q1(t){if(typeof t!="function")return!1;var e=!1;try{new t({start:function(){e=!0}})}catch{}return e}function X1(t){return!!Y1(t)&&typeof t.getReader=="function"}function J1(t){return!!Y1(t)&&typeof t.getWriter=="function"}function Wh(t){return!!Y1(t)&&!!X1(t.readable)&&!!J1(t.writable)}function Hh(t){try{return t.getReader({mode:"byob"}).releaseLock(),!0}catch{return!1}}function p6(t){Qe(function(r){return!!Q1(r)&&!!X1(new r)}(t));var e=function(r){try{return new r({type:"bytes"}),!0}catch{return!1}}(t);return function(r,i){var n=(i===void 0?{}:i).type;if((n=Gh(n))!=="bytes"||e||(n=void 0),r.constructor===t&&(n!=="bytes"||Hh(r)))return r;if(n==="bytes"){var a=p1(r,{type:n});return new t(a)}return a=p1(r),new t(a)}}function p1(t,e){var r=(e===void 0?{}:e).type;return Qe(X1(t)),Qe(t.locked===!1),(r=Gh(r))==="bytes"?new b6(t):new y6(t)}function Gh(t){var e=t+"";if(e==="bytes")return e;if(t===void 0)return t;throw new RangeError("Invalid type is specified")}var Vh=function(){function t(e){this._underlyingReader=void 0,this._readerMode=void 0,this._readableStreamController=void 0,this._pendingRead=void 0,this._underlyingStream=e,this._attachDefaultReader()}return t.prototype.start=function(e){this._readableStreamController=e},t.prototype.cancel=function(e){return Qe(this._underlyingReader!==void 0),this._underlyingReader.cancel(e)},t.prototype._attachDefaultReader=function(){if(this._readerMode!=="default"){this._detachReader();var e=this._underlyingStream.getReader();this._readerMode="default",this._attachReader(e)}},t.prototype._attachReader=function(e){var r=this;Qe(this._underlyingReader===void 0),this._underlyingReader=e;var i=this._underlyingReader.closed;i&&i.then(function(){return r._finishPendingRead()}).then(function(){e===r._underlyingReader&&r._readableStreamController.close()},function(n){e===r._underlyingReader&&r._readableStreamController.error(n)}).catch(Ka)},t.prototype._detachReader=function(){this._underlyingReader!==void 0&&(this._underlyingReader.releaseLock(),this._underlyingReader=void 0,this._readerMode=void 0)},t.prototype._pullWithDefaultReader=function(){var e=this;this._attachDefaultReader();var r=this._underlyingReader.read().then(function(i){var n=e._readableStreamController;i.done?e._tryClose():n.enqueue(i.value)});return this._setPendingRead(r),r},t.prototype._tryClose=function(){try{this._readableStreamController.close()}catch{}},t.prototype._setPendingRead=function(e){var r,i=this,n=function(){i._pendingRead===r&&(i._pendingRead=void 0)};this._pendingRead=r=e.then(n,n)},t.prototype._finishPendingRead=function(){var e=this;if(this._pendingRead){var r=function(){return e._finishPendingRead()};return this._pendingRead.then(r,r)}},t}(),y6=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return jh(e,t),e.prototype.pull=function(){return this._pullWithDefaultReader()},e}(Vh);function fu(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var b6=function(t){function e(r){var i=this,n=Hh(r);return(i=t.call(this,r)||this)._supportsByob=n,i}return jh(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return"bytes"},enumerable:!1,configurable:!0}),e.prototype._attachByobReader=function(){if(this._readerMode!=="byob"){Qe(this._supportsByob),this._detachReader();var r=this._underlyingStream.getReader({mode:"byob"});this._readerMode="byob",this._attachReader(r)}},e.prototype.pull=function(){if(this._supportsByob){var r=this._readableStreamController.byobRequest;if(r)return this._pullWithByobRequest(r)}return this._pullWithDefaultReader()},e.prototype._pullWithByobRequest=function(r){var i=this;this._attachByobReader();var n=new Uint8Array(r.view.byteLength),a=this._underlyingReader.read(n).then(function(s){var o,u,c;i._readableStreamController,s.done?(i._tryClose(),r.respond(0)):(o=s.value,u=r.view,c=fu(o),fu(u).set(c,0),r.respond(s.value.byteLength))});return this._setPendingRead(a),a},e}(Vh);function m6(t){return Qe(function(e){return!!Q1(e)&&!!J1(new e)}(t)),function(e){if(e.constructor===t)return e;var r=Zh(e);return new t(r)}}function Zh(t){Qe(J1(t)),Qe(t.locked===!1);var e=t.getWriter();return new g6(e)}var g6=function(){function t(e){var r=this;this._writableStreamController=void 0,this._pendingWrite=void 0,this._state="writable",this._storedError=void 0,this._underlyingWriter=e,this._errorPromise=new Promise(function(i,n){r._errorPromiseReject=n}),this._errorPromise.catch(Ka)}return t.prototype.start=function(e){var r=this;this._writableStreamController=e,this._underlyingWriter.closed.then(function(){r._state="closed"}).catch(function(i){return r._finishErroring(i)})},t.prototype.write=function(e){var r=this,i=this._underlyingWriter;if(i.desiredSize===null)return i.ready;var n=i.write(e);n.catch(function(s){return r._finishErroring(s)}),i.ready.catch(function(s){return r._startErroring(s)});var a=Promise.race([n,this._errorPromise]);return this._setPendingWrite(a),a},t.prototype.close=function(){var e=this;return this._pendingWrite===void 0?this._underlyingWriter.close():this._finishPendingWrite().then(function(){return e.close()})},t.prototype.abort=function(e){if(this._state!=="errored")return this._underlyingWriter.abort(e)},t.prototype._setPendingWrite=function(e){var r,i=this,n=function(){i._pendingWrite===r&&(i._pendingWrite=void 0)};this._pendingWrite=r=e.then(n,n)},t.prototype._finishPendingWrite=function(){var e=this;if(this._pendingWrite===void 0)return Promise.resolve();var r=function(){return e._finishPendingWrite()};return this._pendingWrite.then(r,r)},t.prototype._startErroring=function(e){var r=this;if(this._state==="writable"){this._state="erroring",this._storedError=e;var i=function(){return r._finishErroring(e)};this._pendingWrite===void 0?i():this._finishPendingWrite().then(i,i),this._writableStreamController.error(e)}},t.prototype._finishErroring=function(e){this._state==="writable"&&this._startErroring(e),this._state==="erroring"&&(this._state="errored",this._errorPromiseReject(this._storedError))},t}();function w6(t){return Qe(function(e){return!!Q1(e)&&!!Wh(new e)}(t)),function(e){if(e.constructor===t)return e;var r=Yh(e);return new t(r)}}function Yh(t){Qe(Wh(t));var e=t.readable,r=t.writable;Qe(e.locked===!1),Qe(r.locked===!1);var i,n=e.getReader();try{i=r.getWriter()}catch(a){throw n.releaseLock(),a}return new v6(n,i)}var v6=function(){function t(e,r){var i=this;this._transformStreamController=void 0,this._onRead=function(n){if(!n.done)return i._transformStreamController.enqueue(n.value),i._reader.read().then(i._onRead)},this._onError=function(n){i._flushReject(n),i._transformStreamController.error(n),i._reader.cancel(n).catch(Ka),i._writer.abort(n).catch(Ka)},this._onTerminate=function(){i._flushResolve(),i._transformStreamController.terminate();var n=new TypeError("TransformStream terminated");i._writer.abort(n).catch(Ka)},this._reader=e,this._writer=r,this._flushPromise=new Promise(function(n,a){i._flushResolve=n,i._flushReject=a})}return t.prototype.start=function(e){this._transformStreamController=e,this._reader.read().then(this._onRead).then(this._onTerminate,this._onError);var r=this._reader.closed;r&&r.then(this._onTerminate,this._onError)},t.prototype.transform=function(e){return this._writer.write(e)},t.prototype.flush=function(){var e=this;return this._writer.close().then(function(){return e._flushPromise})},t}(),_6=Object.freeze(Object.defineProperty({__proto__:null,createReadableStreamWrapper:p6,createTransformStreamWrapper:w6,createWrappingReadableSource:p1,createWrappingTransformer:Yh,createWrappingWritableSink:Zh,createWritableStreamWrapper:m6},Symbol.toStringTag,{value:"Module"}));/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */var kt=jr(function(t){(function(e,r){function i(d,y){if(!d)throw Error(y||"Assertion failed")}function n(d,y){d.super_=y;var _=function(){};_.prototype=y.prototype,d.prototype=new _,d.prototype.constructor=d}function a(d,y,_){if(a.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,d!==null&&(y!=="le"&&y!=="be"||(_=y,y=10),this._init(d||0,y||10,_||"be"))}var s;typeof e=="object"?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{s=void 0}catch{}function o(d,y,_){for(var g=0,p=Math.min(d.length,_),E=y;E<p;E++){var D=d.charCodeAt(E)-48;g<<=4,g|=D>=49&&D<=54?D-49+10:D>=17&&D<=22?D-17+10:15&D}return g}function u(d,y,_,g){for(var p=0,E=Math.min(d.length,_),D=y;D<E;D++){var nt=d.charCodeAt(D)-48;p*=g,p+=nt>=49?nt-49+10:nt>=17?nt-17+10:nt}return p}a.isBN=function(d){return d instanceof a||d!==null&&typeof d=="object"&&d.constructor.wordSize===a.wordSize&&Array.isArray(d.words)},a.max=function(d,y){return d.cmp(y)>0?d:y},a.min=function(d,y){return d.cmp(y)<0?d:y},a.prototype._init=function(d,y,_){if(typeof d=="number")return this._initNumber(d,y,_);if(typeof d=="object")return this._initArray(d,y,_);y==="hex"&&(y=16),i(y===(0|y)&&y>=2&&y<=36);var g=0;(d=d.toString().replace(/\s+/g,""))[0]==="-"&&g++,y===16?this._parseHex(d,g):this._parseBase(d,y,g),d[0]==="-"&&(this.negative=1),this.strip(),_==="le"&&this._initArray(this.toArray(),y,_)},a.prototype._initNumber=function(d,y,_){d<0&&(this.negative=1,d=-d),d<67108864?(this.words=[67108863&d],this.length=1):d<4503599627370496?(this.words=[67108863&d,d/67108864&67108863],this.length=2):(i(d<9007199254740992),this.words=[67108863&d,d/67108864&67108863,1],this.length=3),_==="le"&&this._initArray(this.toArray(),y,_)},a.prototype._initArray=function(d,y,_){if(i(typeof d.length=="number"),d.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(d.length/3),this.words=Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,E,D=0;if(_==="be")for(g=d.length-1,p=0;g>=0;g-=3)E=d[g]|d[g-1]<<8|d[g-2]<<16,this.words[p]|=E<<D&67108863,this.words[p+1]=E>>>26-D&67108863,(D+=24)>=26&&(D-=26,p++);else if(_==="le")for(g=0,p=0;g<d.length;g+=3)E=d[g]|d[g+1]<<8|d[g+2]<<16,this.words[p]|=E<<D&67108863,this.words[p+1]=E>>>26-D&67108863,(D+=24)>=26&&(D-=26,p++);return this.strip()},a.prototype._parseHex=function(d,y){this.length=Math.ceil((d.length-y)/6),this.words=Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var g,p,E=0;for(_=d.length-6,g=0;_>=y;_-=6)p=o(d,_,_+6),this.words[g]|=p<<E&67108863,this.words[g+1]|=p>>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);_+6!==y&&(p=o(d,y,_+6),this.words[g]|=p<<E&67108863,this.words[g+1]|=p>>>26-E&4194303),this.strip()},a.prototype._parseBase=function(d,y,_){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=y)g++;g--,p=p/y|0;for(var E=d.length-_,D=E%g,nt=Math.min(E,E-D)+_,st=0,q=_;q<nt;q+=g)st=u(d,q,q+g,y),this.imuln(p),this.words[0]+st<67108864?this.words[0]+=st:this._iaddn(st);if(D!==0){var rt=1;for(st=u(d,q,d.length,y),q=0;q<D;q++)rt*=y;this.imuln(rt),this.words[0]+st<67108864?this.words[0]+=st:this._iaddn(st)}},a.prototype.copy=function(d){d.words=Array(this.length);for(var y=0;y<this.length;y++)d.words[y]=this.words[y];d.length=this.length,d.negative=this.negative,d.red=this.red},a.prototype.clone=function(){var d=new a(null);return this.copy(d),d},a.prototype._expand=function(d){for(;this.length<d;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],h=[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 m(d,y,_){_.negative=y.negative^d.negative;var g=d.length+y.length|0;_.length=g,g=g-1|0;var p=0|d.words[0],E=0|y.words[0],D=p*E,nt=67108863&D,st=D/67108864|0;_.words[0]=nt;for(var q=1;q<g;q++){for(var rt=st>>>26,ct=67108863&st,lt=Math.min(q,y.length-1),ut=Math.max(0,q-d.length+1);ut<=lt;ut++){var dt=q-ut|0;rt+=(D=(p=0|d.words[dt])*(E=0|y.words[ut])+ct)/67108864|0,ct=67108863&D}_.words[q]=0|ct,st=0|rt}return st!==0?_.words[q]=0|st:_.length--,_.strip()}a.prototype.toString=function(d,y){var _;if(y=0|y||1,(d=d||10)===16||d==="hex"){_="";for(var g=0,p=0,E=0;E<this.length;E++){var D=this.words[E],nt=(16777215&(D<<g|p)).toString(16);_=(p=D>>>24-g&16777215)!==0||E!==this.length-1?c[6-nt.length]+nt+_:nt+_,(g+=2)>=26&&(g-=26,E--)}for(p!==0&&(_=p.toString(16)+_);_.length%y!=0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(d===(0|d)&&d>=2&&d<=36){var st=h[d],q=f[d];_="";var rt=this.clone();for(rt.negative=0;!rt.isZero();){var ct=rt.modn(q).toString(d);_=(rt=rt.idivn(q)).isZero()?ct+_:c[st-ct.length]+ct+_}for(this.isZero()&&(_="0"+_);_.length%y!=0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=67108864*this.words[1]:this.length===3&&this.words[2]===1?d+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(d,y){return i(s!==void 0),this.toArrayLike(s,d,y)},a.prototype.toArray=function(d,y){return this.toArrayLike(Array,d,y)},a.prototype.toArrayLike=function(d,y,_){var g=this.byteLength(),p=_||Math.max(1,g);i(g<=p,"byte array longer than desired length"),i(p>0,"Requested array length <= 0"),this.strip();var E,D,nt=y==="le",st=new d(p),q=this.clone();if(nt){for(D=0;!q.isZero();D++)E=q.andln(255),q.iushrn(8),st[D]=E;for(;D<p;D++)st[D]=0}else{for(D=0;D<p-g;D++)st[D]=0;for(D=0;!q.isZero();D++)E=q.andln(255),q.iushrn(8),st[p-D-1]=E}return st},a.prototype._countBits=Math.clz32?function(d){return 32-Math.clz32(d)}:function(d){var y=d,_=0;return y>=4096&&(_+=13,y>>>=13),y>=64&&(_+=7,y>>>=7),y>=8&&(_+=4,y>>>=4),y>=2&&(_+=2,y>>>=2),_+y},a.prototype._zeroBits=function(d){if(d===0)return 26;var y=d,_=0;return(8191&y)==0&&(_+=13,y>>>=13),(127&y)==0&&(_+=7,y>>>=7),(15&y)==0&&(_+=4,y>>>=4),(3&y)==0&&(_+=2,y>>>=2),(1&y)==0&&_++,_},a.prototype.bitLength=function(){var d=this.words[this.length-1],y=this._countBits(d);return 26*(this.length-1)+y},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,y=0;y<this.length;y++){var _=this._zeroBits(this.words[y]);if(d+=_,_!==26)break}return d},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},a.prototype.fromTwos=function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var y=0;y<d.length;y++)this.words[y]=this.words[y]|d.words[y];return this.strip()},a.prototype.ior=function(d){return i((this.negative|d.negative)==0),this.iuor(d)},a.prototype.or=function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},a.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},a.prototype.iuand=function(d){var y;y=this.length>d.length?d:this;for(var _=0;_<y.length;_++)this.words[_]=this.words[_]&d.words[_];return this.length=y.length,this.strip()},a.prototype.iand=function(d){return i((this.negative|d.negative)==0),this.iuand(d)},a.prototype.and=function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},a.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},a.prototype.iuxor=function(d){var y,_;this.length>d.length?(y=this,_=d):(y=d,_=this);for(var g=0;g<_.length;g++)this.words[g]=y.words[g]^_.words[g];if(this!==y)for(;g<y.length;g++)this.words[g]=y.words[g];return this.length=y.length,this.strip()},a.prototype.ixor=function(d){return i((this.negative|d.negative)==0),this.iuxor(d)},a.prototype.xor=function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},a.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},a.prototype.inotn=function(d){i(typeof d=="number"&&d>=0);var y=0|Math.ceil(d/26),_=d%26;this._expand(y),_>0&&y--;for(var g=0;g<y;g++)this.words[g]=67108863&~this.words[g];return _>0&&(this.words[g]=~this.words[g]&67108863>>26-_),this.strip()},a.prototype.notn=function(d){return this.clone().inotn(d)},a.prototype.setn=function(d,y){i(typeof d=="number"&&d>=0);var _=d/26|0,g=d%26;return this._expand(_+1),this.words[_]=y?this.words[_]|1<<g:this.words[_]&~(1<<g),this.strip()},a.prototype.iadd=function(d){var y,_,g;if(this.negative!==0&&d.negative===0)return this.negative=0,y=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,y=this.isub(d),d.negative=1,y._normSign();this.length>d.length?(_=this,g=d):(_=d,g=this);for(var p=0,E=0;E<g.length;E++)y=(0|_.words[E])+(0|g.words[E])+p,this.words[E]=67108863&y,p=y>>>26;for(;p!==0&&E<_.length;E++)y=(0|_.words[E])+p,this.words[E]=67108863&y,p=y>>>26;if(this.length=_.length,p!==0)this.words[this.length]=p,this.length++;else if(_!==this)for(;E<_.length;E++)this.words[E]=_.words[E];return this},a.prototype.add=function(d){var y;return d.negative!==0&&this.negative===0?(d.negative=0,y=this.sub(d),d.negative^=1,y):d.negative===0&&this.negative!==0?(this.negative=0,y=d.sub(this),this.negative=1,y):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},a.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var y=this.iadd(d);return d.negative=1,y._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var _,g,p=this.cmp(d);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;p>0?(_=this,g=d):(_=d,g=this);for(var E=0,D=0;D<g.length;D++)E=(y=(0|_.words[D])-(0|g.words[D])+E)>>26,this.words[D]=67108863&y;for(;E!==0&&D<_.length;D++)E=(y=(0|_.words[D])+E)>>26,this.words[D]=67108863&y;if(E===0&&D<_.length&&_!==this)for(;D<_.length;D++)this.words[D]=_.words[D];return this.length=Math.max(this.length,D),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(d){return this.clone().isub(d)};var b=function(d,y,_){var g,p,E,D=d.words,nt=y.words,st=_.words,q=0,rt=0|D[0],ct=8191&rt,lt=rt>>>13,ut=0|D[1],dt=8191&ut,wt=ut>>>13,mt=0|D[2],B=8191&mt,Z=mt>>>13,x=0|D[3],l=8191&x,z=x>>>13,et=0|D[4],tt=8191&et,it=et>>>13,k=0|D[5],w=8191&k,A=k>>>13,C=0|D[6],$=8191&C,T=C>>>13,W=0|D[7],yt=8191&W,ft=W>>>13,gt=0|D[8],O=8191&gt,F=gt>>>13,j=0|D[9],L=8191&j,N=j>>>13,H=0|nt[0],P=8191&H,S=H>>>13,bt=0|nt[1],ht=8191&bt,Pt=bt>>>13,Lt=0|nt[2],Dt=8191&Lt,Ct=Lt>>>13,Xt=0|nt[3],zt=8191&Xt,Ot=Xt>>>13,ue=0|nt[4],Mt=8191&ue,Rt=ue>>>13,Nt=0|nt[5],Et=8191&Nt,Bt=Nt>>>13,Zt=0|nt[6],It=8191&Zt,at=Zt>>>13,ot=0|nt[7],pt=8191&ot,_t=ot>>>13,Kt=0|nt[8],xt=8191&Kt,St=Kt>>>13,Ht=0|nt[9],Tt=8191&Ht,Gt=Ht>>>13;_.negative=d.negative^y.negative,_.length=19;var Ie=(q+(g=Math.imul(ct,P))|0)+((8191&(p=(p=Math.imul(ct,S))+Math.imul(lt,P)|0))<<13)|0;q=((E=Math.imul(lt,S))+(p>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,g=Math.imul(dt,P),p=(p=Math.imul(dt,S))+Math.imul(wt,P)|0,E=Math.imul(wt,S);var Ue=(q+(g=g+Math.imul(ct,ht)|0)|0)+((8191&(p=(p=p+Math.imul(ct,Pt)|0)+Math.imul(lt,ht)|0))<<13)|0;q=((E=E+Math.imul(lt,Pt)|0)+(p>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,g=Math.imul(B,P),p=(p=Math.imul(B,S))+Math.imul(Z,P)|0,E=Math.imul(Z,S),g=g+Math.imul(dt,ht)|0,p=(p=p+Math.imul(dt,Pt)|0)+Math.imul(wt,ht)|0,E=E+Math.imul(wt,Pt)|0;var Fe=(q+(g=g+Math.imul(ct,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(ct,Ct)|0)+Math.imul(lt,Dt)|0))<<13)|0;q=((E=E+Math.imul(lt,Ct)|0)+(p>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,g=Math.imul(l,P),p=(p=Math.imul(l,S))+Math.imul(z,P)|0,E=Math.imul(z,S),g=g+Math.imul(B,ht)|0,p=(p=p+Math.imul(B,Pt)|0)+Math.imul(Z,ht)|0,E=E+Math.imul(Z,Pt)|0,g=g+Math.imul(dt,Dt)|0,p=(p=p+Math.imul(dt,Ct)|0)+Math.imul(wt,Dt)|0,E=E+Math.imul(wt,Ct)|0;var fr=(q+(g=g+Math.imul(ct,zt)|0)|0)+((8191&(p=(p=p+Math.imul(ct,Ot)|0)+Math.imul(lt,zt)|0))<<13)|0;q=((E=E+Math.imul(lt,Ot)|0)+(p>>>13)|0)+(fr>>>26)|0,fr&=67108863,g=Math.imul(tt,P),p=(p=Math.imul(tt,S))+Math.imul(it,P)|0,E=Math.imul(it,S),g=g+Math.imul(l,ht)|0,p=(p=p+Math.imul(l,Pt)|0)+Math.imul(z,ht)|0,E=E+Math.imul(z,Pt)|0,g=g+Math.imul(B,Dt)|0,p=(p=p+Math.imul(B,Ct)|0)+Math.imul(Z,Dt)|0,E=E+Math.imul(Z,Ct)|0,g=g+Math.imul(dt,zt)|0,p=(p=p+Math.imul(dt,Ot)|0)+Math.imul(wt,zt)|0,E=E+Math.imul(wt,Ot)|0;var lr=(q+(g=g+Math.imul(ct,Mt)|0)|0)+((8191&(p=(p=p+Math.imul(ct,Rt)|0)+Math.imul(lt,Mt)|0))<<13)|0;q=((E=E+Math.imul(lt,Rt)|0)+(p>>>13)|0)+(lr>>>26)|0,lr&=67108863,g=Math.imul(w,P),p=(p=Math.imul(w,S))+Math.imul(A,P)|0,E=Math.imul(A,S),g=g+Math.imul(tt,ht)|0,p=(p=p+Math.imul(tt,Pt)|0)+Math.imul(it,ht)|0,E=E+Math.imul(it,Pt)|0,g=g+Math.imul(l,Dt)|0,p=(p=p+Math.imul(l,Ct)|0)+Math.imul(z,Dt)|0,E=E+Math.imul(z,Ct)|0,g=g+Math.imul(B,zt)|0,p=(p=p+Math.imul(B,Ot)|0)+Math.imul(Z,zt)|0,E=E+Math.imul(Z,Ot)|0,g=g+Math.imul(dt,Mt)|0,p=(p=p+Math.imul(dt,Rt)|0)+Math.imul(wt,Mt)|0,E=E+Math.imul(wt,Rt)|0;var pr=(q+(g=g+Math.imul(ct,Et)|0)|0)+((8191&(p=(p=p+Math.imul(ct,Bt)|0)+Math.imul(lt,Et)|0))<<13)|0;q=((E=E+Math.imul(lt,Bt)|0)+(p>>>13)|0)+(pr>>>26)|0,pr&=67108863,g=Math.imul($,P),p=(p=Math.imul($,S))+Math.imul(T,P)|0,E=Math.imul(T,S),g=g+Math.imul(w,ht)|0,p=(p=p+Math.imul(w,Pt)|0)+Math.imul(A,ht)|0,E=E+Math.imul(A,Pt)|0,g=g+Math.imul(tt,Dt)|0,p=(p=p+Math.imul(tt,Ct)|0)+Math.imul(it,Dt)|0,E=E+Math.imul(it,Ct)|0,g=g+Math.imul(l,zt)|0,p=(p=p+Math.imul(l,Ot)|0)+Math.imul(z,zt)|0,E=E+Math.imul(z,Ot)|0,g=g+Math.imul(B,Mt)|0,p=(p=p+Math.imul(B,Rt)|0)+Math.imul(Z,Mt)|0,E=E+Math.imul(Z,Rt)|0,g=g+Math.imul(dt,Et)|0,p=(p=p+Math.imul(dt,Bt)|0)+Math.imul(wt,Et)|0,E=E+Math.imul(wt,Bt)|0;var yr=(q+(g=g+Math.imul(ct,It)|0)|0)+((8191&(p=(p=p+Math.imul(ct,at)|0)+Math.imul(lt,It)|0))<<13)|0;q=((E=E+Math.imul(lt,at)|0)+(p>>>13)|0)+(yr>>>26)|0,yr&=67108863,g=Math.imul(yt,P),p=(p=Math.imul(yt,S))+Math.imul(ft,P)|0,E=Math.imul(ft,S),g=g+Math.imul($,ht)|0,p=(p=p+Math.imul($,Pt)|0)+Math.imul(T,ht)|0,E=E+Math.imul(T,Pt)|0,g=g+Math.imul(w,Dt)|0,p=(p=p+Math.imul(w,Ct)|0)+Math.imul(A,Dt)|0,E=E+Math.imul(A,Ct)|0,g=g+Math.imul(tt,zt)|0,p=(p=p+Math.imul(tt,Ot)|0)+Math.imul(it,zt)|0,E=E+Math.imul(it,Ot)|0,g=g+Math.imul(l,Mt)|0,p=(p=p+Math.imul(l,Rt)|0)+Math.imul(z,Mt)|0,E=E+Math.imul(z,Rt)|0,g=g+Math.imul(B,Et)|0,p=(p=p+Math.imul(B,Bt)|0)+Math.imul(Z,Et)|0,E=E+Math.imul(Z,Bt)|0,g=g+Math.imul(dt,It)|0,p=(p=p+Math.imul(dt,at)|0)+Math.imul(wt,It)|0,E=E+Math.imul(wt,at)|0;var br=(q+(g=g+Math.imul(ct,pt)|0)|0)+((8191&(p=(p=p+Math.imul(ct,_t)|0)+Math.imul(lt,pt)|0))<<13)|0;q=((E=E+Math.imul(lt,_t)|0)+(p>>>13)|0)+(br>>>26)|0,br&=67108863,g=Math.imul(O,P),p=(p=Math.imul(O,S))+Math.imul(F,P)|0,E=Math.imul(F,S),g=g+Math.imul(yt,ht)|0,p=(p=p+Math.imul(yt,Pt)|0)+Math.imul(ft,ht)|0,E=E+Math.imul(ft,Pt)|0,g=g+Math.imul($,Dt)|0,p=(p=p+Math.imul($,Ct)|0)+Math.imul(T,Dt)|0,E=E+Math.imul(T,Ct)|0,g=g+Math.imul(w,zt)|0,p=(p=p+Math.imul(w,Ot)|0)+Math.imul(A,zt)|0,E=E+Math.imul(A,Ot)|0,g=g+Math.imul(tt,Mt)|0,p=(p=p+Math.imul(tt,Rt)|0)+Math.imul(it,Mt)|0,E=E+Math.imul(it,Rt)|0,g=g+Math.imul(l,Et)|0,p=(p=p+Math.imul(l,Bt)|0)+Math.imul(z,Et)|0,E=E+Math.imul(z,Bt)|0,g=g+Math.imul(B,It)|0,p=(p=p+Math.imul(B,at)|0)+Math.imul(Z,It)|0,E=E+Math.imul(Z,at)|0,g=g+Math.imul(dt,pt)|0,p=(p=p+Math.imul(dt,_t)|0)+Math.imul(wt,pt)|0,E=E+Math.imul(wt,_t)|0;var mr=(q+(g=g+Math.imul(ct,xt)|0)|0)+((8191&(p=(p=p+Math.imul(ct,St)|0)+Math.imul(lt,xt)|0))<<13)|0;q=((E=E+Math.imul(lt,St)|0)+(p>>>13)|0)+(mr>>>26)|0,mr&=67108863,g=Math.imul(L,P),p=(p=Math.imul(L,S))+Math.imul(N,P)|0,E=Math.imul(N,S),g=g+Math.imul(O,ht)|0,p=(p=p+Math.imul(O,Pt)|0)+Math.imul(F,ht)|0,E=E+Math.imul(F,Pt)|0,g=g+Math.imul(yt,Dt)|0,p=(p=p+Math.imul(yt,Ct)|0)+Math.imul(ft,Dt)|0,E=E+Math.imul(ft,Ct)|0,g=g+Math.imul($,zt)|0,p=(p=p+Math.imul($,Ot)|0)+Math.imul(T,zt)|0,E=E+Math.imul(T,Ot)|0,g=g+Math.imul(w,Mt)|0,p=(p=p+Math.imul(w,Rt)|0)+Math.imul(A,Mt)|0,E=E+Math.imul(A,Rt)|0,g=g+Math.imul(tt,Et)|0,p=(p=p+Math.imul(tt,Bt)|0)+Math.imul(it,Et)|0,E=E+Math.imul(it,Bt)|0,g=g+Math.imul(l,It)|0,p=(p=p+Math.imul(l,at)|0)+Math.imul(z,It)|0,E=E+Math.imul(z,at)|0,g=g+Math.imul(B,pt)|0,p=(p=p+Math.imul(B,_t)|0)+Math.imul(Z,pt)|0,E=E+Math.imul(Z,_t)|0,g=g+Math.imul(dt,xt)|0,p=(p=p+Math.imul(dt,St)|0)+Math.imul(wt,xt)|0,E=E+Math.imul(wt,St)|0;var gr=(q+(g=g+Math.imul(ct,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(ct,Gt)|0)+Math.imul(lt,Tt)|0))<<13)|0;q=((E=E+Math.imul(lt,Gt)|0)+(p>>>13)|0)+(gr>>>26)|0,gr&=67108863,g=Math.imul(L,ht),p=(p=Math.imul(L,Pt))+Math.imul(N,ht)|0,E=Math.imul(N,Pt),g=g+Math.imul(O,Dt)|0,p=(p=p+Math.imul(O,Ct)|0)+Math.imul(F,Dt)|0,E=E+Math.imul(F,Ct)|0,g=g+Math.imul(yt,zt)|0,p=(p=p+Math.imul(yt,Ot)|0)+Math.imul(ft,zt)|0,E=E+Math.imul(ft,Ot)|0,g=g+Math.imul($,Mt)|0,p=(p=p+Math.imul($,Rt)|0)+Math.imul(T,Mt)|0,E=E+Math.imul(T,Rt)|0,g=g+Math.imul(w,Et)|0,p=(p=p+Math.imul(w,Bt)|0)+Math.imul(A,Et)|0,E=E+Math.imul(A,Bt)|0,g=g+Math.imul(tt,It)|0,p=(p=p+Math.imul(tt,at)|0)+Math.imul(it,It)|0,E=E+Math.imul(it,at)|0,g=g+Math.imul(l,pt)|0,p=(p=p+Math.imul(l,_t)|0)+Math.imul(z,pt)|0,E=E+Math.imul(z,_t)|0,g=g+Math.imul(B,xt)|0,p=(p=p+Math.imul(B,St)|0)+Math.imul(Z,xt)|0,E=E+Math.imul(Z,St)|0;var Wr=(q+(g=g+Math.imul(dt,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(dt,Gt)|0)+Math.imul(wt,Tt)|0))<<13)|0;q=((E=E+Math.imul(wt,Gt)|0)+(p>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,g=Math.imul(L,Dt),p=(p=Math.imul(L,Ct))+Math.imul(N,Dt)|0,E=Math.imul(N,Ct),g=g+Math.imul(O,zt)|0,p=(p=p+Math.imul(O,Ot)|0)+Math.imul(F,zt)|0,E=E+Math.imul(F,Ot)|0,g=g+Math.imul(yt,Mt)|0,p=(p=p+Math.imul(yt,Rt)|0)+Math.imul(ft,Mt)|0,E=E+Math.imul(ft,Rt)|0,g=g+Math.imul($,Et)|0,p=(p=p+Math.imul($,Bt)|0)+Math.imul(T,Et)|0,E=E+Math.imul(T,Bt)|0,g=g+Math.imul(w,It)|0,p=(p=p+Math.imul(w,at)|0)+Math.imul(A,It)|0,E=E+Math.imul(A,at)|0,g=g+Math.imul(tt,pt)|0,p=(p=p+Math.imul(tt,_t)|0)+Math.imul(it,pt)|0,E=E+Math.imul(it,_t)|0,g=g+Math.imul(l,xt)|0,p=(p=p+Math.imul(l,St)|0)+Math.imul(z,xt)|0,E=E+Math.imul(z,St)|0;var Hr=(q+(g=g+Math.imul(B,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(B,Gt)|0)+Math.imul(Z,Tt)|0))<<13)|0;q=((E=E+Math.imul(Z,Gt)|0)+(p>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,g=Math.imul(L,zt),p=(p=Math.imul(L,Ot))+Math.imul(N,zt)|0,E=Math.imul(N,Ot),g=g+Math.imul(O,Mt)|0,p=(p=p+Math.imul(O,Rt)|0)+Math.imul(F,Mt)|0,E=E+Math.imul(F,Rt)|0,g=g+Math.imul(yt,Et)|0,p=(p=p+Math.imul(yt,Bt)|0)+Math.imul(ft,Et)|0,E=E+Math.imul(ft,Bt)|0,g=g+Math.imul($,It)|0,p=(p=p+Math.imul($,at)|0)+Math.imul(T,It)|0,E=E+Math.imul(T,at)|0,g=g+Math.imul(w,pt)|0,p=(p=p+Math.imul(w,_t)|0)+Math.imul(A,pt)|0,E=E+Math.imul(A,_t)|0,g=g+Math.imul(tt,xt)|0,p=(p=p+Math.imul(tt,St)|0)+Math.imul(it,xt)|0,E=E+Math.imul(it,St)|0;var li=(q+(g=g+Math.imul(l,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(l,Gt)|0)+Math.imul(z,Tt)|0))<<13)|0;q=((E=E+Math.imul(z,Gt)|0)+(p>>>13)|0)+(li>>>26)|0,li&=67108863,g=Math.imul(L,Mt),p=(p=Math.imul(L,Rt))+Math.imul(N,Mt)|0,E=Math.imul(N,Rt),g=g+Math.imul(O,Et)|0,p=(p=p+Math.imul(O,Bt)|0)+Math.imul(F,Et)|0,E=E+Math.imul(F,Bt)|0,g=g+Math.imul(yt,It)|0,p=(p=p+Math.imul(yt,at)|0)+Math.imul(ft,It)|0,E=E+Math.imul(ft,at)|0,g=g+Math.imul($,pt)|0,p=(p=p+Math.imul($,_t)|0)+Math.imul(T,pt)|0,E=E+Math.imul(T,_t)|0,g=g+Math.imul(w,xt)|0,p=(p=p+Math.imul(w,St)|0)+Math.imul(A,xt)|0,E=E+Math.imul(A,St)|0;var pi=(q+(g=g+Math.imul(tt,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(tt,Gt)|0)+Math.imul(it,Tt)|0))<<13)|0;q=((E=E+Math.imul(it,Gt)|0)+(p>>>13)|0)+(pi>>>26)|0,pi&=67108863,g=Math.imul(L,Et),p=(p=Math.imul(L,Bt))+Math.imul(N,Et)|0,E=Math.imul(N,Bt),g=g+Math.imul(O,It)|0,p=(p=p+Math.imul(O,at)|0)+Math.imul(F,It)|0,E=E+Math.imul(F,at)|0,g=g+Math.imul(yt,pt)|0,p=(p=p+Math.imul(yt,_t)|0)+Math.imul(ft,pt)|0,E=E+Math.imul(ft,_t)|0,g=g+Math.imul($,xt)|0,p=(p=p+Math.imul($,St)|0)+Math.imul(T,xt)|0,E=E+Math.imul(T,St)|0;var yi=(q+(g=g+Math.imul(w,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(w,Gt)|0)+Math.imul(A,Tt)|0))<<13)|0;q=((E=E+Math.imul(A,Gt)|0)+(p>>>13)|0)+(yi>>>26)|0,yi&=67108863,g=Math.imul(L,It),p=(p=Math.imul(L,at))+Math.imul(N,It)|0,E=Math.imul(N,at),g=g+Math.imul(O,pt)|0,p=(p=p+Math.imul(O,_t)|0)+Math.imul(F,pt)|0,E=E+Math.imul(F,_t)|0,g=g+Math.imul(yt,xt)|0,p=(p=p+Math.imul(yt,St)|0)+Math.imul(ft,xt)|0,E=E+Math.imul(ft,St)|0;var bi=(q+(g=g+Math.imul($,Tt)|0)|0)+((8191&(p=(p=p+Math.imul($,Gt)|0)+Math.imul(T,Tt)|0))<<13)|0;q=((E=E+Math.imul(T,Gt)|0)+(p>>>13)|0)+(bi>>>26)|0,bi&=67108863,g=Math.imul(L,pt),p=(p=Math.imul(L,_t))+Math.imul(N,pt)|0,E=Math.imul(N,_t),g=g+Math.imul(O,xt)|0,p=(p=p+Math.imul(O,St)|0)+Math.imul(F,xt)|0,E=E+Math.imul(F,St)|0;var mi=(q+(g=g+Math.imul(yt,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(yt,Gt)|0)+Math.imul(ft,Tt)|0))<<13)|0;q=((E=E+Math.imul(ft,Gt)|0)+(p>>>13)|0)+(mi>>>26)|0,mi&=67108863,g=Math.imul(L,xt),p=(p=Math.imul(L,St))+Math.imul(N,xt)|0,E=Math.imul(N,St);var gi=(q+(g=g+Math.imul(O,Tt)|0)|0)+((8191&(p=(p=p+Math.imul(O,Gt)|0)+Math.imul(F,Tt)|0))<<13)|0;q=((E=E+Math.imul(F,Gt)|0)+(p>>>13)|0)+(gi>>>26)|0,gi&=67108863;var Hi=(q+(g=Math.imul(L,Tt))|0)+((8191&(p=(p=Math.imul(L,Gt))+Math.imul(N,Tt)|0))<<13)|0;return q=((E=Math.imul(N,Gt))+(p>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,st[0]=Ie,st[1]=Ue,st[2]=Fe,st[3]=fr,st[4]=lr,st[5]=pr,st[6]=yr,st[7]=br,st[8]=mr,st[9]=gr,st[10]=Wr,st[11]=Hr,st[12]=li,st[13]=pi,st[14]=yi,st[15]=bi,st[16]=mi,st[17]=gi,st[18]=Hi,q!==0&&(st[19]=q,_.length++),_};function K(d,y,_){return new I().mulp(d,y,_)}function I(d,y){this.x=d,this.y=y}Math.imul||(b=m),a.prototype.mulTo=function(d,y){var _,g=this.length+d.length;return _=this.length===10&&d.length===10?b(this,d,y):g<63?m(this,d,y):g<1024?function(p,E,D){D.negative=E.negative^p.negative,D.length=p.length+E.length;for(var nt=0,st=0,q=0;q<D.length-1;q++){var rt=st;st=0;for(var ct=67108863&nt,lt=Math.min(q,E.length-1),ut=Math.max(0,q-p.length+1);ut<=lt;ut++){var dt=q-ut,wt=(0|p.words[dt])*(0|E.words[ut]),mt=67108863&wt;ct=67108863&(mt=mt+ct|0),st+=(rt=(rt=rt+(wt/67108864|0)|0)+(mt>>>26)|0)>>>26,rt&=67108863}D.words[q]=ct,nt=rt,rt=st}return nt!==0?D.words[q]=nt:D.length--,D.strip()}(this,d,y):K(this,d,y),_},I.prototype.makeRBT=function(d){for(var y=Array(d),_=a.prototype._countBits(d)-1,g=0;g<d;g++)y[g]=this.revBin(g,_,d);return y},I.prototype.revBin=function(d,y,_){if(d===0||d===_-1)return d;for(var g=0,p=0;p<y;p++)g|=(1&d)<<y-p-1,d>>=1;return g},I.prototype.permute=function(d,y,_,g,p,E){for(var D=0;D<E;D++)g[D]=y[d[D]],p[D]=_[d[D]]},I.prototype.transform=function(d,y,_,g,p,E){this.permute(E,d,y,_,g,p);for(var D=1;D<p;D<<=1)for(var nt=D<<1,st=Math.cos(2*Math.PI/nt),q=Math.sin(2*Math.PI/nt),rt=0;rt<p;rt+=nt)for(var ct=st,lt=q,ut=0;ut<D;ut++){var dt=_[rt+ut],wt=g[rt+ut],mt=_[rt+ut+D],B=g[rt+ut+D],Z=ct*mt-lt*B;B=ct*B+lt*mt,mt=Z,_[rt+ut]=dt+mt,g[rt+ut]=wt+B,_[rt+ut+D]=dt-mt,g[rt+ut+D]=wt-B,ut!==nt&&(Z=st*ct-q*lt,lt=st*lt+q*ct,ct=Z)}},I.prototype.guessLen13b=function(d,y){var _=1|Math.max(y,d),g=1&_,p=0;for(_=_/2|0;_;_>>>=1)p++;return 1<<p+1+g},I.prototype.conjugate=function(d,y,_){if(!(_<=1))for(var g=0;g<_/2;g++){var p=d[g];d[g]=d[_-g-1],d[_-g-1]=p,p=y[g],y[g]=-y[_-g-1],y[_-g-1]=-p}},I.prototype.normalize13b=function(d,y){for(var _=0,g=0;g<y/2;g++){var p=8192*Math.round(d[2*g+1]/y)+Math.round(d[2*g]/y)+_;d[g]=67108863&p,_=p<67108864?0:p/67108864|0}return d},I.prototype.convert13b=function(d,y,_,g){for(var p=0,E=0;E<y;E++)p+=0|d[E],_[2*E]=8191&p,p>>>=13,_[2*E+1]=8191&p,p>>>=13;for(E=2*y;E<g;++E)_[E]=0;i(p===0),i((-8192&p)==0)},I.prototype.stub=function(d){for(var y=Array(d),_=0;_<d;_++)y[_]=0;return y},I.prototype.mulp=function(d,y,_){var g=2*this.guessLen13b(d.length,y.length),p=this.makeRBT(g),E=this.stub(g),D=Array(g),nt=Array(g),st=Array(g),q=Array(g),rt=Array(g),ct=Array(g),lt=_.words;lt.length=g,this.convert13b(d.words,d.length,D,g),this.convert13b(y.words,y.length,q,g),this.transform(D,E,nt,st,g,p),this.transform(q,E,rt,ct,g,p);for(var ut=0;ut<g;ut++){var dt=nt[ut]*rt[ut]-st[ut]*ct[ut];st[ut]=nt[ut]*ct[ut]+st[ut]*rt[ut],nt[ut]=dt}return this.conjugate(nt,st,g),this.transform(nt,st,lt,E,g,p),this.conjugate(lt,E,g),this.normalize13b(lt,g),_.negative=d.negative^y.negative,_.length=d.length+y.length,_.strip()},a.prototype.mul=function(d){var y=new a(null);return y.words=Array(this.length+d.length),this.mulTo(d,y)},a.prototype.mulf=function(d){var y=new a(null);return y.words=Array(this.length+d.length),K(this,d,y)},a.prototype.imul=function(d){return this.clone().mulTo(d,this)},a.prototype.imuln=function(d){i(typeof d=="number"),i(d<67108864);for(var y=0,_=0;_<this.length;_++){var g=(0|this.words[_])*d,p=(67108863&g)+(67108863&y);y>>=26,y+=g/67108864|0,y+=p>>>26,this.words[_]=67108863&p}return y!==0&&(this.words[_]=y,this.length++),this},a.prototype.muln=function(d){return this.clone().imuln(d)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(d){var y=function(E){for(var D=Array(E.bitLength()),nt=0;nt<D.length;nt++){var st=nt/26|0,q=nt%26;D[nt]=(E.words[st]&1<<q)>>>q}return D}(d);if(y.length===0)return new a(1);for(var _=this,g=0;g<y.length&&y[g]===0;g++,_=_.sqr());if(++g<y.length)for(var p=_.sqr();g<y.length;g++,p=p.sqr())y[g]!==0&&(_=_.mul(p));return _},a.prototype.iushln=function(d){i(typeof d=="number"&&d>=0);var y,_=d%26,g=(d-_)/26,p=67108863>>>26-_<<26-_;if(_!==0){var E=0;for(y=0;y<this.length;y++){var D=this.words[y]&p,nt=(0|this.words[y])-D<<_;this.words[y]=nt|E,E=D>>>26-_}E&&(this.words[y]=E,this.length++)}if(g!==0){for(y=this.length-1;y>=0;y--)this.words[y+g]=this.words[y];for(y=0;y<g;y++)this.words[y]=0;this.length+=g}return this.strip()},a.prototype.ishln=function(d){return i(this.negative===0),this.iushln(d)},a.prototype.iushrn=function(d,y,_){var g;i(typeof d=="number"&&d>=0),g=y?(y-y%26)/26:0;var p=d%26,E=Math.min((d-p)/26,this.length),D=67108863^67108863>>>p<<p,nt=_;if(g=Math.max(0,g-=E),nt){for(var st=0;st<E;st++)nt.words[st]=this.words[st];nt.length=E}if(E!==0)if(this.length>E)for(this.length-=E,st=0;st<this.length;st++)this.words[st]=this.words[st+E];else this.words[0]=0,this.length=1;var q=0;for(st=this.length-1;st>=0&&(q!==0||st>=g);st--){var rt=0|this.words[st];this.words[st]=q<<26-p|rt>>>p,q=rt&D}return nt&&q!==0&&(nt.words[nt.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(d,y,_){return i(this.negative===0),this.iushrn(d,y,_)},a.prototype.shln=function(d){return this.clone().ishln(d)},a.prototype.ushln=function(d){return this.clone().iushln(d)},a.prototype.shrn=function(d){return this.clone().ishrn(d)},a.prototype.ushrn=function(d){return this.clone().iushrn(d)},a.prototype.testn=function(d){i(typeof d=="number"&&d>=0);var y=d%26,_=(d-y)/26,g=1<<y;return!(this.length<=_)&&!!(this.words[_]&g)},a.prototype.imaskn=function(d){i(typeof d=="number"&&d>=0);var y=d%26,_=(d-y)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(y!==0&&_++,this.length=Math.min(_,this.length),y!==0){var g=67108863^67108863>>>y<<y;this.words[this.length-1]&=g}return this.strip()},a.prototype.maskn=function(d){return this.clone().imaskn(d)},a.prototype.iaddn=function(d){return i(typeof d=="number"),i(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(0|this.words[0])<d?(this.words[0]=d-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},a.prototype._iaddn=function(d){this.words[0]+=d;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},a.prototype.isubn=function(d){if(i(typeof d=="number"),i(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this.strip()},a.prototype.addn=function(d){return this.clone().iaddn(d)},a.prototype.subn=function(d){return this.clone().isubn(d)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(d,y,_){var g,p,E=d.length+_;this._expand(E);var D=0;for(g=0;g<d.length;g++){p=(0|this.words[g+_])+D;var nt=(0|d.words[g])*y;D=((p-=67108863&nt)>>26)-(nt/67108864|0),this.words[g+_]=67108863&p}for(;g<this.length-_;g++)D=(p=(0|this.words[g+_])+D)>>26,this.words[g+_]=67108863&p;if(D===0)return this.strip();for(i(D===-1),D=0,g=0;g<this.length;g++)D=(p=-(0|this.words[g])+D)>>26,this.words[g]=67108863&p;return this.negative=1,this.strip()},a.prototype._wordDiv=function(d,y){var _=(this.length,d.length),g=this.clone(),p=d,E=0|p.words[p.length-1];(_=26-this._countBits(E))!==0&&(p=p.ushln(_),g.iushln(_),E=0|p.words[p.length-1]);var D,nt=g.length-p.length;if(y!=="mod"){(D=new a(null)).length=nt+1,D.words=Array(D.length);for(var st=0;st<D.length;st++)D.words[st]=0}var q=g.clone()._ishlnsubmul(p,1,nt);q.negative===0&&(g=q,D&&(D.words[nt]=1));for(var rt=nt-1;rt>=0;rt--){var ct=67108864*(0|g.words[p.length+rt])+(0|g.words[p.length+rt-1]);for(ct=Math.min(ct/E|0,67108863),g._ishlnsubmul(p,ct,rt);g.negative!==0;)ct--,g.negative=0,g._ishlnsubmul(p,1,rt),g.isZero()||(g.negative^=1);D&&(D.words[rt]=ct)}return D&&D.strip(),g.strip(),y!=="div"&&_!==0&&g.iushrn(_),{div:D||null,mod:g}},a.prototype.divmod=function(d,y,_){return i(!d.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:this.negative!==0&&d.negative===0?(E=this.neg().divmod(d,y),y!=="mod"&&(g=E.div.neg()),y!=="div"&&(p=E.mod.neg(),_&&p.negative!==0&&p.iadd(d)),{div:g,mod:p}):this.negative===0&&d.negative!==0?(E=this.divmod(d.neg(),y),y!=="mod"&&(g=E.div.neg()),{div:g,mod:E.mod}):(this.negative&d.negative)!=0?(E=this.neg().divmod(d.neg(),y),y!=="div"&&(p=E.mod.neg(),_&&p.negative!==0&&p.isub(d)),{div:E.div,mod:p}):d.length>this.length||this.cmp(d)<0?{div:new a(0),mod:this}:d.length===1?y==="div"?{div:this.divn(d.words[0]),mod:null}:y==="mod"?{div:null,mod:new a(this.modn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new a(this.modn(d.words[0]))}:this._wordDiv(d,y);var g,p,E},a.prototype.div=function(d){return this.divmod(d,"div",!1).div},a.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},a.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},a.prototype.divRound=function(d){var y=this.divmod(d);if(y.mod.isZero())return y.div;var _=y.div.negative!==0?y.mod.isub(d):y.mod,g=d.ushrn(1),p=d.andln(1),E=_.cmp(g);return E<0||p===1&&E===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},a.prototype.modn=function(d){i(d<=67108863);for(var y=(1<<26)%d,_=0,g=this.length-1;g>=0;g--)_=(y*_+(0|this.words[g]))%d;return _},a.prototype.idivn=function(d){i(d<=67108863);for(var y=0,_=this.length-1;_>=0;_--){var g=(0|this.words[_])+67108864*y;this.words[_]=g/d|0,y=g%d}return this.strip()},a.prototype.divn=function(d){return this.clone().idivn(d)},a.prototype.egcd=function(d){i(d.negative===0),i(!d.isZero());var y=this,_=d.clone();y=y.negative!==0?y.umod(d):y.clone();for(var g=new a(1),p=new a(0),E=new a(0),D=new a(1),nt=0;y.isEven()&&_.isEven();)y.iushrn(1),_.iushrn(1),++nt;for(var st=_.clone(),q=y.clone();!y.isZero();){for(var rt=0,ct=1;(y.words[0]&ct)==0&&rt<26;++rt,ct<<=1);if(rt>0)for(y.iushrn(rt);rt-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(st),p.isub(q)),g.iushrn(1),p.iushrn(1);for(var lt=0,ut=1;(_.words[0]&ut)==0&&lt<26;++lt,ut<<=1);if(lt>0)for(_.iushrn(lt);lt-- >0;)(E.isOdd()||D.isOdd())&&(E.iadd(st),D.isub(q)),E.iushrn(1),D.iushrn(1);y.cmp(_)>=0?(y.isub(_),g.isub(E),p.isub(D)):(_.isub(y),E.isub(g),D.isub(p))}return{a:E,b:D,gcd:_.iushln(nt)}},a.prototype._invmp=function(d){i(d.negative===0),i(!d.isZero());var y=this,_=d.clone();y=y.negative!==0?y.umod(d):y.clone();for(var g,p=new a(1),E=new a(0),D=_.clone();y.cmpn(1)>0&&_.cmpn(1)>0;){for(var nt=0,st=1;(y.words[0]&st)==0&&nt<26;++nt,st<<=1);if(nt>0)for(y.iushrn(nt);nt-- >0;)p.isOdd()&&p.iadd(D),p.iushrn(1);for(var q=0,rt=1;(_.words[0]&rt)==0&&q<26;++q,rt<<=1);if(q>0)for(_.iushrn(q);q-- >0;)E.isOdd()&&E.iadd(D),E.iushrn(1);y.cmp(_)>=0?(y.isub(_),p.isub(E)):(_.isub(y),E.isub(p))}return(g=y.cmpn(1)===0?p:E).cmpn(0)<0&&g.iadd(d),g},a.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var y=this.clone(),_=d.clone();y.negative=0,_.negative=0;for(var g=0;y.isEven()&&_.isEven();g++)y.iushrn(1),_.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;_.isEven();)_.iushrn(1);var p=y.cmp(_);if(p<0){var E=y;y=_,_=E}else if(p===0||_.cmpn(1)===0)break;y.isub(_)}return _.iushln(g)},a.prototype.invm=function(d){return this.egcd(d).a.umod(d)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(d){return this.words[0]&d},a.prototype.bincn=function(d){i(typeof d=="number");var y=d%26,_=(d-y)/26,g=1<<y;if(this.length<=_)return this._expand(_+1),this.words[_]|=g,this;for(var p=g,E=_;p!==0&&E<this.length;E++){var D=0|this.words[E];p=(D+=p)>>>26,D&=67108863,this.words[E]=D}return p!==0&&(this.words[E]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(d){var y,_=d<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;if(this.strip(),this.length>1)y=1;else{_&&(d=-d),i(d<=67108863,"Number is too big");var g=0|this.words[0];y=g===d?0:g<d?-1:1}return this.negative!==0?0|-y:y},a.prototype.cmp=function(d){if(this.negative!==0&&d.negative===0)return-1;if(this.negative===0&&d.negative!==0)return 1;var y=this.ucmp(d);return this.negative!==0?0|-y:y},a.prototype.ucmp=function(d){if(this.length>d.length)return 1;if(this.length<d.length)return-1;for(var y=0,_=this.length-1;_>=0;_--){var g=0|this.words[_],p=0|d.words[_];if(g!==p){g<p?y=-1:g>p&&(y=1);break}}return y},a.prototype.gtn=function(d){return this.cmpn(d)===1},a.prototype.gt=function(d){return this.cmp(d)===1},a.prototype.gten=function(d){return this.cmpn(d)>=0},a.prototype.gte=function(d){return this.cmp(d)>=0},a.prototype.ltn=function(d){return this.cmpn(d)===-1},a.prototype.lt=function(d){return this.cmp(d)===-1},a.prototype.lten=function(d){return this.cmpn(d)<=0},a.prototype.lte=function(d){return this.cmp(d)<=0},a.prototype.eqn=function(d){return this.cmpn(d)===0},a.prototype.eq=function(d){return this.cmp(d)===0},a.red=function(d){return new V(d)},a.prototype.toRed=function(d){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(d){return this.red=d,this},a.prototype.forceRed=function(d){return i(!this.red,"Already a number in reduction context"),this._forceRed(d)},a.prototype.redAdd=function(d){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},a.prototype.redIAdd=function(d){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},a.prototype.redSub=function(d){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},a.prototype.redISub=function(d){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},a.prototype.redShl=function(d){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},a.prototype.redMul=function(d){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},a.prototype.redIMul=function(d){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(d){return i(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var U={k256:null,p224:null,p192:null,p25519:null};function G(d,y){this.name=d,this.p=new a(y,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function Q(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function R(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function V(d){if(typeof d=="string"){var y=a._prime(d);this.m=y.p,this.prime=y}else i(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}function X(d){V.call(this,d),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 d=new a(null);return d.words=Array(Math.ceil(this.n/13)),d},G.prototype.ireduce=function(d){var y,_=d;do this.split(_,this.tmp),y=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength();while(y>this.n);var g=y<this.n?-1:_.ucmp(this.p);return g===0?(_.words[0]=0,_.length=1):g>0?_.isub(this.p):_.strip(),_},G.prototype.split=function(d,y){d.iushrn(this.n,0,y)},G.prototype.imulK=function(d){return d.imul(this.k)},n(Q,G),Q.prototype.split=function(d,y){for(var _=4194303,g=Math.min(d.length,9),p=0;p<g;p++)y.words[p]=d.words[p];if(y.length=g,d.length<=9)return d.words[0]=0,void(d.length=1);var E=d.words[9];for(y.words[y.length++]=E&_,p=10;p<d.length;p++){var D=0|d.words[p];d.words[p-10]=(D&_)<<4|E>>>22,E=D}E>>>=22,d.words[p-10]=E,E===0&&d.length>10?d.length-=10:d.length-=9},Q.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var y=0,_=0;_<d.length;_++){var g=0|d.words[_];y+=977*g,d.words[_]=67108863&y,y=64*g+(y/67108864|0)}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d},n(Y,G),n(R,G),n(J,G),J.prototype.imulK=function(d){for(var y=0,_=0;_<d.length;_++){var g=19*(0|d.words[_])+y,p=67108863&g;g>>>=26,d.words[_]=p,y=g}return y!==0&&(d.words[d.length++]=y),d},a._prime=function(d){if(U[d])return U[d];var y;if(d==="k256")y=new Q;else if(d==="p224")y=new Y;else if(d==="p192")y=new R;else{if(d!=="p25519")throw Error("Unknown prime "+d);y=new J}return U[d]=y,y},V.prototype._verify1=function(d){i(d.negative===0,"red works only with positives"),i(d.red,"red works only with red numbers")},V.prototype._verify2=function(d,y){i((d.negative|y.negative)==0,"red works only with positives"),i(d.red&&d.red===y.red,"red works only with red numbers")},V.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):d.umod(this.m)._forceRed(this)},V.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},V.prototype.add=function(d,y){this._verify2(d,y);var _=d.add(y);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},V.prototype.iadd=function(d,y){this._verify2(d,y);var _=d.iadd(y);return _.cmp(this.m)>=0&&_.isub(this.m),_},V.prototype.sub=function(d,y){this._verify2(d,y);var _=d.sub(y);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},V.prototype.isub=function(d,y){this._verify2(d,y);var _=d.isub(y);return _.cmpn(0)<0&&_.iadd(this.m),_},V.prototype.shl=function(d,y){return this._verify1(d),this.imod(d.ushln(y))},V.prototype.imul=function(d,y){return this._verify2(d,y),this.imod(d.imul(y))},V.prototype.mul=function(d,y){return this._verify2(d,y),this.imod(d.mul(y))},V.prototype.isqr=function(d){return this.imul(d,d.clone())},V.prototype.sqr=function(d){return this.mul(d,d)},V.prototype.sqrt=function(d){if(d.isZero())return d.clone();var y=this.m.andln(3);if(i(y%2==1),y===3){var _=this.m.add(new a(1)).iushrn(2);return this.pow(d,_)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);i(!g.isZero());var E=new a(1).toRed(this),D=E.redNeg(),nt=this.m.subn(1).iushrn(1),st=this.m.bitLength();for(st=new a(2*st*st).toRed(this);this.pow(st,nt).cmp(D)!==0;)st.redIAdd(D);for(var q=this.pow(st,g),rt=this.pow(d,g.addn(1).iushrn(1)),ct=this.pow(d,g),lt=p;ct.cmp(E)!==0;){for(var ut=ct,dt=0;ut.cmp(E)!==0;dt++)ut=ut.redSqr();i(dt<lt);var wt=this.pow(q,new a(1).iushln(lt-dt-1));rt=rt.redMul(wt),q=wt.redSqr(),ct=ct.redMul(q),lt=dt}return rt},V.prototype.invm=function(d){var y=d._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},V.prototype.pow=function(d,y){if(y.isZero())return new a(1).toRed(this);if(y.cmpn(1)===0)return d.clone();var _=Array(16);_[0]=new a(1).toRed(this),_[1]=d;for(var g=2;g<_.length;g++)_[g]=this.mul(_[g-1],d);var p=_[0],E=0,D=0,nt=y.bitLength()%26;for(nt===0&&(nt=26),g=y.length-1;g>=0;g--){for(var st=y.words[g],q=nt-1;q>=0;q--){var rt=st>>q&1;p!==_[0]&&(p=this.sqr(p)),rt!==0||E!==0?(E<<=1,E|=rt,(++D===4||g===0&&q===0)&&(p=this.mul(p,_[E]),D=0,E=0)):D=0}nt=26}return p},V.prototype.convertTo=function(d){var y=d.umod(this.m);return y===d?y.clone():y},V.prototype.convertFrom=function(d){var y=d.clone();return y.red=null,y},a.mont=function(d){return new X(d)},n(X,V),X.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},X.prototype.convertFrom=function(d){var y=this.imod(d.mul(this.rinv));return y.red=null,y},X.prototype.imul=function(d,y){if(d.isZero()||y.isZero())return d.words[0]=0,d.length=1,d;var _=d.imul(y),g=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=_.isub(g).iushrn(this.shift),E=p;return p.cmp(this.m)>=0?E=p.isub(this.m):p.cmpn(0)<0&&(E=p.iadd(this.m)),E._forceRed(this)},X.prototype.mul=function(d,y){if(d.isZero()||y.isZero())return new a(0)._forceRed(this);var _=d.mul(y),g=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=_.isub(g).iushrn(this.shift),E=p;return p.cmp(this.m)>=0?E=p.isub(this.m):p.cmpn(0)<0&&(E=p.iadd(this.m)),E._forceRed(this)},X.prototype.invm=function(d){return this.imod(d._invmp(this.m).mul(this.r2))._forceRed(this)}})(t,wd)}),_a=Object.freeze(Object.defineProperty({__proto__:null,default:kt,__moduleExports:kt},Symbol.toStringTag,{value:"Module"}));/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */class Ra{constructor(e){if(e===void 0)throw Error("Invalid BigInteger input");this.value=new kt(e)}clone(){const e=new Ra(null);return this.value.copy(e.value),e}iinc(){return this.value.iadd(new kt(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new kt(1)),this}dec(){return this.clone().idec()}iadd(e){return this.value.iadd(e.value),this}add(e){return this.clone().iadd(e)}isub(e){return this.value.isub(e.value),this}sub(e){return this.clone().isub(e)}imul(e){return this.value.imul(e.value),this}mul(e){return this.clone().imul(e)}imod(e){return this.value=this.value.umod(e.value),this}mod(e){return this.clone().imod(e)}modExp(e,r){const i=r.isEven()?kt.red(r.value):kt.mont(r.value),n=this.clone();return n.value=n.value.toRed(i).redPow(e.value).fromRed(),n}modInv(e){if(!this.gcd(e).isOne())throw Error("Inverse does not exist");return new Ra(this.value.invm(e.value))}gcd(e){return new Ra(this.value.gcd(e.value))}ileftShift(e){return this.value.ishln(e.value.toNumber()),this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value.ishrn(e.value.toNumber()),this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value.eq(e.value)}lt(e){return this.value.lt(e.value)}lte(e){return this.value.lte(e.value)}gt(e){return this.value.gt(e.value)}gte(e){return this.value.gte(e.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new kt(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const e=this.clone();return e.value=e.value.abs(),e}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(e){return this.value.testn(e)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(e="be",r){return this.value.toArrayLike(Uint8Array,e,r)}}var k6=Object.freeze(Object.defineProperty({__proto__:null,default:Ra},Symbol.toStringTag,{value:"Module"}));/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */var M0,or=jr(function(t,e){var r=e;function i(a){return a.length===1?"0"+a:a}function n(a){for(var s="",o=0;o<a.length;o++)s+=i(a[o].toString(16));return s}r.toArray=function(a,s){if(Array.isArray(a))return a.slice();if(!a)return[];var o=[];if(typeof a!="string"){for(var u=0;u<a.length;u++)o[u]=0|a[u];return o}if(s==="hex")for((a=a.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(a="0"+a),u=0;u<a.length;u+=2)o.push(parseInt(a[u]+a[u+1],16));else for(u=0;u<a.length;u++){var c=a.charCodeAt(u),h=c>>8,f=255&c;h?o.push(h,f):o.push(f)}return o},r.zero2=i,r.toHex=n,r.encode=function(a,s){return s==="hex"?n(a):a}}),Yt=jr(function(t,e){var r=e;r.assert=ji,r.toArray=or.toArray,r.zero2=or.zero2,r.toHex=or.toHex,r.encode=or.encode,r.getNAF=function(i,n){for(var a=[],s=1<<n+1,o=i.clone();o.cmpn(1)>=0;){var u;if(o.isOdd()){var c=o.andln(s-1);u=c>(s>>1)-1?(s>>1)-c:c,o.isubn(u)}else u=0;a.push(u);for(var h=o.cmpn(0)!==0&&o.andln(s-1)===0?n+1:1,f=1;f<h;f++)a.push(0);o.iushrn(h)}return a},r.getJSF=function(i,n){var a=[[],[]];i=i.clone(),n=n.clone();for(var s=0,o=0;i.cmpn(-s)>0||n.cmpn(-o)>0;){var u,c,h,f=i.andln(3)+s&3,m=n.andln(3)+o&3;f===3&&(f=-1),m===3&&(m=-1),(1&f)==0?u=0:u=(h=i.andln(7)+s&7)!==3&&h!==5||m!==2?f:-f,a[0].push(u),(1&m)==0?c=0:c=(h=n.andln(7)+o&7)!==3&&h!==5||f!==2?m:-m,a[1].push(c),2*s===u+1&&(s=1-s),2*o===c+1&&(o=1-o),i.iushrn(1),n.iushrn(1)}return a},r.cachedProperty=function(i,n,a){var s="_"+n;i.prototype[n]=function(){return this[s]!==void 0?this[s]:this[s]=a.call(this)}},r.parseBytes=function(i){return typeof i=="string"?r.toArray(i,"hex"):i},r.intFromLE=function(i){return new kt(i,"hex","le")}}),Zo=function(t){return M0||(M0=new Mi(null)),M0.generate(t)};function Mi(t){this.rand=t}var A6=Mi;if(Mi.prototype.generate=function(t){return this._rand(t)},Mi.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},typeof self=="object")self.crypto&&self.crypto.getRandomValues?Mi.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?Mi.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:typeof window=="object"&&(Mi.prototype._rand=function(){throw Error("Not implemented yet")});else try{var lu=void 0;if(typeof lu.randomBytes!="function")throw Error("Not supported");Mi.prototype._rand=function(t){return lu.randomBytes(t)}}catch{}Zo.Rand=A6;var Ms=Yt.getNAF,S6=Yt.getJSF,Cs=Yt.assert;function xi(t,e){this.type=t,this.p=new kt(e.p,16),this.red=e.prime?kt.red(e.prime):kt.mont(this.p),this.zero=new kt(0).toRed(this.red),this.one=new kt(1).toRed(this.red),this.two=new kt(2).toRed(this.red),this.n=e.n&&new kt(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var qe=xi;function Xe(t,e){this.curve=t,this.type=e,this.precomputed=null}xi.prototype.point=function(){throw Error("Not implemented")},xi.prototype.validate=function(){throw Error("Not implemented")},xi.prototype._fixedNafMul=function(t,e){Cs(t.precomputed);var r=t._getDoubles(),i=Ms(e,1),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var a=[],s=0;s<i.length;s+=r.step){var o=0;for(e=s+r.step-1;e>=s;e--)o=(o<<1)+i[e];a.push(o)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=n;h>0;h--){for(s=0;s<a.length;s++)(o=a[s])===h?c=c.mixedAdd(r.points[s]):o===-h&&(c=c.mixedAdd(r.points[s].neg()));u=u.add(c)}return u.toP()},xi.prototype._wnafMul=function(t,e){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=Ms(e,r),s=this.jpoint(null,null,null),o=a.length-1;o>=0;o--){for(e=0;o>=0&&a[o]===0;o--)e++;if(o>=0&&e++,s=s.dblp(e),o<0)break;var u=a[o];Cs(u!==0),s=t.type==="affine"?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return t.type==="affine"?s.toP():s},xi.prototype._wnafMulAdd=function(t,e,r,i,n){for(var a=this._wnafT1,s=this._wnafT2,o=this._wnafT3,u=0,c=0;c<i;c++){var h=(X=e[c])._getNAFPoints(t);a[c]=h.wnd,s[c]=h.points}for(c=i-1;c>=1;c-=2){var f=c-1,m=c;if(a[f]===1&&a[m]===1){var b=[e[f],null,null,e[m]];e[f].y.cmp(e[m].y)===0?(b[1]=e[f].add(e[m]),b[2]=e[f].toJ().mixedAdd(e[m].neg())):e[f].y.cmp(e[m].y.redNeg())===0?(b[1]=e[f].toJ().mixedAdd(e[m]),b[2]=e[f].add(e[m].neg())):(b[1]=e[f].toJ().mixedAdd(e[m]),b[2]=e[f].toJ().mixedAdd(e[m].neg()));var K=[-3,-1,-5,-7,0,7,5,1,3],I=S6(r[f],r[m]);u=Math.max(I[0].length,u),o[f]=Array(u),o[m]=Array(u);for(var U=0;U<u;U++){var G=0|I[0][U],Q=0|I[1][U];o[f][U]=K[3*(G+1)+(Q+1)],o[m][U]=0,s[f]=b}}else o[f]=Ms(r[f],a[f]),o[m]=Ms(r[m],a[m]),u=Math.max(o[f].length,u),u=Math.max(o[m].length,u)}var Y=this.jpoint(null,null,null),R=this._wnafT4;for(c=u;c>=0;c--){for(var J=0;c>=0;){var V=!0;for(U=0;U<i;U++)R[U]=0|o[U][c],R[U]!==0&&(V=!1);if(!V)break;J++,c--}if(c>=0&&J++,Y=Y.dblp(J),c<0)break;for(U=0;U<i;U++){var X,d=R[U];d!==0&&(d>0?X=s[U][d-1>>1]:d<0&&(X=s[U][-d-1>>1].neg()),Y=X.type==="affine"?Y.mixedAdd(X):Y.add(X))}}for(c=0;c<i;c++)s[c]=null;return n?Y:Y.toP()},xi.BasePoint=Xe,Xe.prototype.eq=function(){throw Error("Not implemented")},Xe.prototype.validate=function(){return this.curve.validate(this)},xi.prototype.decodePoint=function(t,e){t=Yt.toArray(t,e);var r=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1==2*r)return t[0]===6?Cs(t[t.length-1]%2==0):t[0]===7&&Cs(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((t[0]===2||t[0]===3)&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),t[0]===3);throw Error("Unknown point format")},Xe.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Xe.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},Xe.prototype.encode=function(t,e){return Yt.encode(this._encode(e),t)},Xe.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Xe.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Xe.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<e;n+=t){for(var a=0;a<t;a++)i=i.dbl();r.push(i)}return{step:t,points:r}},Xe.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,i=r===1?null:this.dbl(),n=1;n<r;n++)e[n]=e[n-1].add(i);return{wnd:t,points:e}},Xe.prototype._getBeta=function(){return null},Xe.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var E6=Yt.assert;function tr(t){qe.call(this,"short",t),this.a=new kt(t.a,16).toRed(this.red),this.b=new kt(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}Ti(tr,qe);var P6=tr;function le(t,e,r,i){qe.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new kt(e,16),this.y=new kt(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function ve(t,e,r,i){qe.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new kt(0)):(this.x=new kt(e,16),this.y=new kt(r,16),this.z=new kt(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}function In(t){qe.call(this,"mont",t),this.a=new kt(t.a,16).toRed(this.red),this.b=new kt(t.b,16).toRed(this.red),this.i4=new kt(4).toRed(this.red).redInvm(),this.two=new kt(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}tr.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var e,r;if(t.beta)e=new kt(t.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);e=(e=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(t.lambda)r=new kt(t.lambda,16);else{var n=this._getEndoRoots(this.n);this.g.mul(n[0]).x.cmp(this.g.x.redMul(e))===0?r=n[0]:(r=n[1],E6(this.g.mul(r).x.cmp(this.g.x.redMul(e))===0))}return{beta:e,lambda:r,basis:t.basis?t.basis.map(function(a){return{a:new kt(a.a,16),b:new kt(a.b,16)}}):this._getEndoBasis(r)}}},tr.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:kt.mont(t),r=new kt(2).toRed(e).redInvm(),i=r.redNeg(),n=new kt(3).toRed(e).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},tr.prototype._getEndoBasis=function(t){for(var e,r,i,n,a,s,o,u,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,m=this.n.clone(),b=new kt(1),K=new kt(0),I=new kt(0),U=new kt(1),G=0;f.cmpn(0)!==0;){var Q=m.div(f);u=m.sub(Q.mul(f)),c=I.sub(Q.mul(b));var Y=U.sub(Q.mul(K));if(!i&&u.cmp(h)<0)e=o.neg(),r=b,i=u.neg(),n=c;else if(i&&++G==2)break;o=u,m=f,f=u,I=b,b=c,U=K,K=Y}a=u.neg(),s=c;var R=i.sqr().add(n.sqr());return a.sqr().add(s.sqr()).cmp(R)>=0&&(a=e,s=r),i.negative&&(i=i.neg(),n=n.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:n},{a,b:s}]},tr.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),a=r.b.neg().mul(t).divRound(this.n),s=n.mul(r.a),o=a.mul(i.a),u=n.mul(r.b),c=a.mul(i.b);return{k1:t.sub(s).sub(o),k2:u.add(c).neg()}},tr.prototype.pointFromX=function(t,e){(t=new kt(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(i.redSqr().redSub(r).cmp(this.zero)!==0)throw Error("invalid point");var n=i.fromRed().isOdd();return(e&&!n||!e&&n)&&(i=i.redNeg()),this.point(t,i)},tr.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return r.redSqr().redISub(n).cmpn(0)===0},tr.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<t.length;a++){var s=this._endoSplit(e[a]),o=t[a],u=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),i[2*a]=o,i[2*a+1]=u,n[2*a]=s.k1,n[2*a+1]=s.k2}for(var c=this._wnafMulAdd(1,i,n,2*a,r),h=0;h<2*a;h++)i[h]=null,n[h]=null;return c},Ti(le,qe.BasePoint),tr.prototype.point=function(t,e,r){return new le(this,t,e,r)},tr.prototype.pointFromJSON=function(t,e){return le.fromJSON(this,t,e)},le.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(n){return r.point(n.x.redMul(r.endo.beta),n.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e}},le.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},le.fromJSON=function(t,e,r){typeof e=="string"&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;function n(s){return t.point(s[0],s[1],r)}var a=e[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(n))}},i},le.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},le.prototype.isInfinity=function(){return this.inf},le.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var e=this.y.redSub(t.y);e.cmpn(0)!==0&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},le.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},le.prototype.getX=function(){return this.x.fromRed()},le.prototype.getY=function(){return this.y.fromRed()},le.prototype.mul=function(t){return t=new kt(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},le.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},le.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},le.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)},le.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(n){return n.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},le.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Ti(ve,qe.BasePoint),tr.prototype.jpoint=function(t,e,r){return new ve(this,t,e,r)},ve.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},ve.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ve.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),a=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),o=i.redSub(n),u=a.redSub(s);if(o.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),h=c.redMul(o),f=i.redMul(c),m=u.redSqr().redIAdd(h).redISub(f).redISub(f),b=u.redMul(f.redISub(m)).redISub(a.redMul(h)),K=this.z.redMul(t.z).redMul(o);return this.curve.jpoint(m,b,K)},ve.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,a=t.y.redMul(e).redMul(this.z),s=r.redSub(i),o=n.redSub(a);if(s.cmpn(0)===0)return o.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),h=r.redMul(u),f=o.redSqr().redIAdd(c).redISub(h).redISub(h),m=o.redMul(h.redISub(f)).redISub(n.redMul(c)),b=this.z.redMul(s);return this.curve.jpoint(f,m,b)},ve.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}var i=this.curve.a,n=this.curve.tinv,a=this.x,s=this.y,o=this.z,u=o.redSqr().redSqr(),c=s.redAdd(s);for(r=0;r<t;r++){var h=a.redSqr(),f=c.redSqr(),m=f.redSqr(),b=h.redAdd(h).redIAdd(h).redIAdd(i.redMul(u)),K=a.redMul(f),I=b.redSqr().redISub(K.redAdd(K)),U=K.redISub(I),G=b.redMul(U);G=G.redIAdd(G).redISub(m);var Q=c.redMul(o);r+1<t&&(u=u.redMul(m)),a=I,o=Q,c=G}return this.curve.jpoint(a,c.redMul(n),o)},ve.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},ve.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i),u=o.redSqr().redISub(s).redISub(s),c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=o.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),f=this.y.redSqr(),m=f.redSqr(),b=this.x.redAdd(f).redSqr().redISub(h).redISub(m);b=b.redIAdd(b);var K=h.redAdd(h).redIAdd(h),I=K.redSqr(),U=m.redIAdd(m);U=(U=U.redIAdd(U)).redIAdd(U),t=I.redISub(b).redISub(b),e=K.redMul(b.redISub(t)).redISub(U),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},ve.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),u=o.redSqr().redISub(s).redISub(s);t=u;var c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),e=o.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),f=this.y.redSqr(),m=this.x.redMul(f),b=this.x.redSub(h).redMul(this.x.redAdd(h));b=b.redAdd(b).redIAdd(b);var K=m.redIAdd(m),I=(K=K.redIAdd(K)).redAdd(K);t=b.redSqr().redISub(I),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(h);var U=f.redSqr();U=(U=(U=U.redIAdd(U)).redIAdd(U)).redIAdd(U),e=b.redMul(K.redISub(t)).redISub(U)}return this.curve.jpoint(t,e,r)},ve.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=e.redSqr(),s=r.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(n)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(s),h=o.redSqr().redISub(c.redAdd(c)),f=c.redISub(h),m=s.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m);var b=o.redMul(f).redISub(m),K=r.redAdd(r).redMul(i);return this.curve.jpoint(h,b,K)},ve.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),i=e.redSqr(),n=t.redAdd(t).redIAdd(t),a=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(i),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),u=i.redIAdd(i);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=n.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(u),h=e.redMul(c);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.x.redMul(o).redISub(h);f=(f=f.redIAdd(f)).redIAdd(f);var m=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(o)));m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m);var b=this.z.redAdd(s).redSqr().redISub(r).redISub(o);return this.curve.jpoint(f,m,b)},ve.prototype.mul=function(t,e){return t=new kt(t,e),this.curve._wnafMul(this,t)},ve.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0)!==0)return!1;var i=e.redMul(this.z),n=r.redMul(t.z);return this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0)===0},ve.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(this.x.cmp(r)===0)return!0;for(var i=t.clone(),n=this.curve.redN.redMul(e);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}},ve.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},ve.prototype.isInfinity=function(){return this.z.cmpn(0)===0},Ti(In,qe);var x6=In;function pe(t,e,r){qe.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new kt(e,16),this.z=new kt(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}In.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return i.redSqrt().redSqr().cmp(i)===0},Ti(pe,qe.BasePoint),In.prototype.decodePoint=function(t,e){if((t=Yt.toArray(t,e)).length===33&&t[0]===64&&(t=t.slice(1,33).reverse()),t.length!==32)throw Error("Unknown point compression format");return this.point(t,1)},In.prototype.point=function(t,e){return new pe(this,t,e)},In.prototype.pointFromJSON=function(t){return pe.fromJSON(this,t)},pe.prototype.precompute=function(){},pe.prototype._encode=function(t){var e=this.curve.p.byteLength();return t?[64].concat(this.getX().toArray("le",e)):this.getX().toArray("be",e)},pe.fromJSON=function(t,e){return new pe(t,e[0],e[1]||t.one)},pe.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},pe.prototype.isInfinity=function(){return this.z.cmpn(0)===0},pe.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},pe.prototype.add=function(){throw Error("Not supported on Montgomery curve")},pe.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(r),s=n.redMul(i),o=e.z.redMul(a.redAdd(s).redSqr()),u=e.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,u)},pe.prototype.mul=function(t){for(var e=(t=new kt(t,16)).clone(),r=this,i=this.curve.point(null,null),n=[];e.cmpn(0)!==0;e.iushrn(1))n.push(e.andln(1));for(var a=n.length-1;a>=0;a--)n[a]===0?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},pe.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},pe.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},pe.prototype.eq=function(t){return this.getX().cmp(t.getX())===0},pe.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},pe.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var M6=Yt.assert;function Ar(t){this.twisted=(0|t.a)!=1,this.mOneA=this.twisted&&(0|t.a)==-1,this.extended=this.mOneA,qe.call(this,"edwards",t),this.a=new kt(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new kt(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new kt(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),M6(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|t.c)==1}Ti(Ar,qe);var C6=Ar;function te(t,e,r,i,n){qe.BasePoint.call(this,t,"projective"),e===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new kt(e,16),this.y=new kt(r,16),this.z=i?new kt(i,16):this.curve.one,this.t=n&&new kt(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Ar.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},Ar.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},Ar.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},Ar.prototype.pointFromX=function(t,e){(t=new kt(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(n.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw Error("invalid point");var o=s.fromRed().isOdd();return(e&&!o||!e&&o)&&(s=s.redNeg()),this.point(t,s)},Ar.prototype.pointFromY=function(t,e){(t=new kt(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),n=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(n.redInvm());if(a.cmp(this.zero)===0){if(e)throw Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},Ar.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return i.cmp(n)===0},Ti(te,qe.BasePoint),Ar.prototype.pointFromJSON=function(t){return te.fromJSON(this,t)},Ar.prototype.point=function(t,e,r,i){return new te(this,t,e,r,i)},te.fromJSON=function(t,e){return new te(t,e[0],e[1],e[2])},te.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},te.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},te.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=i.redAdd(e),s=a.redSub(r),o=i.redSub(e),u=n.redMul(s),c=a.redMul(o),h=n.redMul(o),f=s.redMul(a);return this.curve.point(u,c,f,h)},te.prototype._projDbl=function(){var t,e,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(c=this.curve._mulA(n)).redAdd(a);if(this.zOne)t=i.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),e=s.redMul(c.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),u=s.redSub(o).redISub(o);t=i.redSub(n).redISub(a).redMul(u),e=s.redMul(c.redSub(a)),r=s.redMul(u)}}else{var c=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),u=c.redSub(o).redSub(o),t=this.curve._mulC(i.redISub(c)).redMul(u),e=this.curve._mulC(c).redMul(n.redISub(a)),r=c.redMul(u)}return this.curve.point(t,e,r)},te.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},te.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),a=r.redSub(e),s=n.redSub(i),o=n.redAdd(i),u=r.redAdd(e),c=a.redMul(s),h=o.redMul(u),f=a.redMul(u),m=s.redMul(o);return this.curve.point(c,h,m,f)},te.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),a=this.x.redMul(t.x),s=this.y.redMul(t.y),o=this.curve.d.redMul(a).redMul(s),u=n.redSub(o),c=n.redAdd(o),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(s),f=i.redMul(u).redMul(h);return this.curve.twisted?(e=i.redMul(c).redMul(s.redSub(this.curve._mulA(a))),r=u.redMul(c)):(e=i.redMul(c).redMul(s.redSub(a)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,e,r)},te.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},te.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},te.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},te.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},te.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},te.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},te.prototype.getX=function(){return this.normalize(),this.x.fromRed()},te.prototype.getY=function(){return this.normalize(),this.y.fromRed()},te.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0},te.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(e)===0)return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),this.x.cmp(e)===0)return!0}},te.prototype.toP=te.prototype.normalize,te.prototype.mixedAdd=te.prototype.add;var Ns=jr(function(t,e){var r=e;r.base=qe,r.short=P6,r.mont=x6,r.edwards=C6}),C0=Ft.rotl32,sa=Ft.sum32,D6=Ft.sum32_5,K6=gn.ft_1,Qh=Xa.BlockHash,R6=[1518500249,1859775393,2400959708,3395469782];function Cr(){if(!(this instanceof Cr))return new Cr;Qh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}Ft.inherits(Cr,Qh);var I6=Cr;Cr.blockSize=512,Cr.outSize=160,Cr.hmacStrength=80,Cr.padLength=64,Cr.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=C0(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],a=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4];for(i=0;i<r.length;i++){var c=~~(i/20),h=D6(C0(n,5),K6(c,a,s,o),u,r[i],R6[c]);u=o,o=s,s=C0(a,30),a=n,n=h}this.h[0]=sa(this.h[0],n),this.h[1]=sa(this.h[1],a),this.h[2]=sa(this.h[2],s),this.h[3]=sa(this.h[3],o),this.h[4]=sa(this.h[4],u)},Cr.prototype._digest=function(t){return t==="hex"?Ft.toHex32(this.h,"big"):Ft.split32(this.h,"big")};var U6={sha1:I6,sha224:Ju,sha256:_1,sha384:i3,sha512:Ja};function On(t,e,r){if(!(this instanceof On))return new On(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(Ft.toArray(e,r))}var B6=On;On.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),ji(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=new this.Hash().update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=new this.Hash().update(t)},On.prototype.update=function(t,e){return this.inner.update(t,e),this},On.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)};var Ge=jr(function(t,e){var r=e;r.utils=Ft,r.common=Xa,r.sha=U6,r.ripemd=s5,r.hmac=B6,r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160}),T6={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}},Ia=jr(function(t,e){var r,i=e,n=Yt.assert;function a(o){if(o.type==="short")this.curve=new Ns.short(o);else if(o.type==="edwards")this.curve=new Ns.edwards(o);else{if(o.type!=="mont")throw Error("Unknown curve type.");this.curve=new Ns.mont(o)}this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, n*G != O")}function s(o,u){Object.defineProperty(i,o,{configurable:!0,enumerable:!0,get:function(){var c=new a(u);return Object.defineProperty(i,o,{configurable:!0,enumerable:!0,value:c}),c}})}i.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ge.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ge.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ge.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ge.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ge.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",cofactor:"8",hash:Ge.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",cofactor:"8",hash:Ge.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]}),s("brainpoolP256r1",{type:"short",prime:null,p:"A9FB57DB A1EEA9BC 3E660A90 9D838D72 6E3BF623 D5262028 2013481D 1F6E5377",a:"7D5A0975 FC2C3057 EEF67530 417AFFE7 FB8055C1 26DC5C6C E94A4B44 F330B5D9",b:"26DC5C6C E94A4B44 F330B5D9 BBD77CBF 95841629 5CF7E1CE 6BCCDC18 FF8C07B6",n:"A9FB57DB A1EEA9BC 3E660A90 9D838D71 8C397AA3 B561A6F7 901E0E82 974856A7",hash:Ge.sha256,gRed:!1,g:["8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262","547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997"]}),s("brainpoolP384r1",{type:"short",prime:null,p:"8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B4 12B1DA19 7FB71123ACD3A729 901D1A71 87470013 3107EC53",a:"7BC382C6 3D8C150C 3C72080A CE05AFA0 C2BEA28E 4FB22787 139165EF BA91F90F8AA5814A 503AD4EB 04A8C7DD 22CE2826",b:"04A8C7DD 22CE2826 8B39B554 16F0447C 2FB77DE1 07DCD2A6 2E880EA5 3EEB62D57CB43902 95DBC994 3AB78696 FA504C11",n:"8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B3 1F166E6C AC0425A7CF3AB6AF 6B7FC310 3B883202 E9046565",hash:Ge.sha384,gRed:!1,g:["1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E","8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315"]}),s("brainpoolP512r1",{type:"short",prime:null,p:"AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 703308717D4D9B00 9BC66842 AECDA12A E6A380E6 2881FF2F 2D82C685 28AA6056 583A48F3",a:"7830A331 8B603B89 E2327145 AC234CC5 94CBDD8D 3DF91610 A83441CA EA9863BC2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A7 2BF2C7B9 E7C1AC4D 77FC94CA",b:"3DF91610 A83441CA EA9863BC 2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A72BF2C7B9 E7C1AC4D 77FC94CA DC083E67 984050B7 5EBAE5DD 2809BD63 8016F723",n:"AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 70330870553E5C41 4CA92619 41866119 7FAC1047 1DB1D381 085DDADD B5879682 9CA90069",hash:Ge.sha512,gRed:!1,g:["81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822","7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892"]});try{r=T6}catch{r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ge.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function Di(t){if(!(this instanceof Di))return new Di(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=or.toArray(t.entropy,t.entropyEnc||"hex"),r=or.toArray(t.nonce,t.nonceEnc||"hex"),i=or.toArray(t.pers,t.persEnc||"hex");ji(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var y1=Di;Di.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},Di.prototype._hmac=function(){return new Ge.hmac(this.hash,this.K)},Di.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Di.prototype.reseed=function(t,e,r,i){typeof e!="string"&&(i=r,r=e,e=null),t=or.toArray(t,e),r=or.toArray(r,i),ji(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},Di.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");typeof e!="string"&&(i=r,r=e,e=null),r&&(r=or.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var a=n.slice(0,t);return this._update(r),this._reseed++,or.encode(a,e)};var pu=Yt.assert;function De(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var D0=De;De.fromPublic=function(t,e,r){return e instanceof De?e:new De(t,{pub:e,pubEnc:r})},De.fromPrivate=function(t,e,r){return e instanceof De?e:new De(t,{priv:e,privEnc:r})},De.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},De.prototype.getPublic=function(t,e){return this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},De.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv},De.prototype._importPrivate=function(t,e){if(this.priv=new kt(t,e||16),this.ec.curve.type==="mont"){var r=this.ec.curve.one,i=r.ushln(252).sub(r).ushln(3);this.priv=this.priv.or(r.ushln(254)),this.priv=this.priv.and(i)}else this.priv=this.priv.umod(this.ec.curve.n)},De.prototype._importPublic=function(t,e){if(t.x||t.y)return this.ec.curve.type==="mont"?pu(t.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||pu(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},De.prototype.derive=function(t){return t.mul(this.priv).getX()},De.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},De.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},De.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var z6=Yt.assert;function xo(t,e){if(t instanceof xo)return t;this._importDER(t,e)||(z6(t.r&&t.s,"Signature without r or s"),this.r=new kt(t.r,16),this.s=new kt(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Ds=xo;function q6(){this.place=0}function K0(t,e){var r=t[e.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,s=e.place;a<i;a++,s++)n<<=8,n|=t[s];return e.place=s,n}function yu(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return e===0?t:t.slice(e)}function R0(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}xo.prototype._importDER=function(t,e){t=Yt.toArray(t,e);var r=new q6;if(t[r.place++]!==48||K0(t,r)+r.place!==t.length||t[r.place++]!==2)return!1;var i=K0(t,r),n=t.slice(r.place,i+r.place);if(r.place+=i,t[r.place++]!==2)return!1;var a=K0(t,r);if(t.length!==a+r.place)return!1;var s=t.slice(r.place,a+r.place);return n[0]===0&&128&n[1]&&(n=n.slice(1)),s[0]===0&&128&s[1]&&(s=s.slice(1)),this.r=new kt(n),this.s=new kt(s),this.recoveryParam=null,!0},xo.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=yu(e),r=yu(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];R0(i,e.length),(i=i.concat(e)).push(2),R0(i,r.length);var n=i.concat(r),a=[48];return R0(a,n.length),a=a.concat(n),Yt.encode(a,t)};var Xh=Yt.assert;function $e(t){if(!(this instanceof $e))return new $e(t);typeof t=="string"&&(Xh(Ia.hasOwnProperty(t),"Unknown curve "+t),t=Ia[t]),t instanceof Ia.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var F6=$e;$e.prototype.keyPair=function(t){return new D0(this,t)},$e.prototype.keyFromPrivate=function(t,e){return D0.fromPrivate(this,t,e)},$e.prototype.keyFromPublic=function(t,e){return D0.fromPublic(this,t,e)},$e.prototype.genKeyPair=function(t){t||(t={});var e=new y1({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||Zo(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()});if(this.curve.type==="mont"){var r=new kt(e.generate(32));return this.keyFromPrivate(r)}for(var i=this.n.byteLength(),n=this.n.sub(new kt(2));;)if(!((r=new kt(e.generate(i))).cmp(n)>0))return r.iaddn(1),this.keyFromPrivate(r)},$e.prototype._truncateToN=function(t,e,r){var i=(r=r||8*t.byteLength())-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},$e.prototype.truncateMsg=function(t){var e;return t instanceof Uint8Array?(e=8*t.byteLength,t=this._truncateToN(new kt(t,16),!1,e)):typeof t=="string"?(e=4*t.length,t=this._truncateToN(new kt(t,16),!1,e)):t=this._truncateToN(new kt(t,16)),t},$e.prototype.sign=function(t,e,r,i){typeof r=="object"&&(i=r,r=null),i||(i={}),e=this.keyFromPrivate(e,r),t=this.truncateMsg(t);for(var n=this.n.byteLength(),a=e.getPrivate().toArray("be",n),s=t.toArray("be",n),o=new y1({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new kt(1)),c=0;;c++){var h=i.k?i.k(c):new kt(o.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(u)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var m=f.getX(),b=m.umod(this.n);if(b.cmpn(0)!==0){var K=h.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t));if((K=K.umod(this.n)).cmpn(0)!==0){var I=(f.getY().isOdd()?1:0)|(m.cmp(b)!==0?2:0);return i.canonical&&K.cmp(this.nh)>0&&(K=this.n.sub(K),I^=1),new Ds({r:b,s:K,recoveryParam:I})}}}}}},$e.prototype.verify=function(t,e,r,i){return r=this.keyFromPublic(r,i),e=new Ds(e,"hex"),this._verify(this.truncateMsg(t),e,r)||this._verify(this._truncateToN(new kt(t,16)),e,r)},$e.prototype._verify=function(t,e,r){var i=e.r,n=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||n.cmpn(1)<0||n.cmp(this.n)>=0)return!1;var a,s=n.invm(this.n),o=s.mul(t).umod(this.n),u=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(o,r.getPublic(),u)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(o,r.getPublic(),u)).isInfinity()&&a.getX().umod(this.n).cmp(i)===0},$e.prototype.recoverPubKey=function(t,e,r,i){Xh((3&r)===r,"The recovery param is more than two bits"),e=new Ds(e,i);var n=this.n,a=new kt(t),s=e.r,o=e.s,u=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var h=e.r.invm(n),f=n.sub(a).mul(h).umod(n),m=o.mul(h).umod(n);return this.g.mulAdd(f,s,m)},$e.prototype.getKeyRecoveryParam=function(t,e,r,i){if((e=new Ds(e,i)).recoveryParam!==null)return e.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(t,e,n)}catch{continue}if(a.eq(r))return n}throw Error("Unable to find valid recovery factor")};var bu=Yt.assert,mu=Yt.parseBytes,Sn=Yt.cachedProperty;function ye(t,e){if(this.eddsa=t,e.hasOwnProperty("secret")&&(this._secret=mu(e.secret)),t.isPoint(e.pub))this._pub=e.pub;else if(this._pubBytes=mu(e.pub),this._pubBytes&&this._pubBytes.length===33&&this._pubBytes[0]===64&&(this._pubBytes=this._pubBytes.slice(1,33)),this._pubBytes&&this._pubBytes.length!==32)throw Error("Unknown point compression format")}ye.fromPublic=function(t,e){return e instanceof ye?e:new ye(t,{pub:e})},ye.fromSecret=function(t,e){return e instanceof ye?e:new ye(t,{secret:e})},ye.prototype.secret=function(){return this._secret},Sn(ye,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),Sn(ye,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),Sn(ye,"privBytes",function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i}),Sn(ye,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),Sn(ye,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),Sn(ye,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),ye.prototype.sign=function(t){return bu(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},ye.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},ye.prototype.getSecret=function(t){return bu(this._secret,"KeyPair is public only"),Yt.encode(this.secret(),t)},ye.prototype.getPublic=function(t,e){return Yt.encode((e?[64]:[]).concat(this.pubBytes()),t)};var I0=ye,O6=Yt.assert,Ks=Yt.cachedProperty,$6=Yt.parseBytes;function en(t,e){this.eddsa=t,typeof e!="object"&&(e=$6(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),O6(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof kt&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Ks(en,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),Ks(en,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),Ks(en,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),Ks(en,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),en.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},en.prototype.toHex=function(){return Yt.encode(this.toBytes(),"hex").toUpperCase()};var gu=en,L6=Yt.assert,wu=Yt.parseBytes;function Re(t){if(L6(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Re))return new Re(t);t=Ia[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Ge.sha512}var N6=Re;Re.prototype.sign=function(t,e){t=wu(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),a=this.encodePoint(n),s=this.hashInt(a,r.pubBytes(),t).mul(r.priv()),o=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:o,Rencoded:a})},Re.prototype.verify=function(t,e,r){t=wu(t),e=this.makeSignature(e);var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(a)},Re.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return Yt.intFromLE(t.digest()).umod(this.curve.n)},Re.prototype.keyPair=function(t){return new I0(this,t)},Re.prototype.keyFromPublic=function(t){return I0.fromPublic(this,t)},Re.prototype.keyFromSecret=function(t){return I0.fromSecret(this,t)},Re.prototype.genKeyPair=function(t){t||(t={});var e=new y1({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||Zo(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.curve.n.toArray()});return this.keyFromSecret(e.generate(32))},Re.prototype.makeSignature=function(t){return t instanceof gu?t:new gu(this,t)},Re.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},Re.prototype.decodePoint=function(t){var e=(t=Yt.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),i=(128&t[e])!=0,n=Yt.intFromLE(r);return this.curve.pointFromY(n,i)},Re.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},Re.prototype.decodeInt=function(t){return Yt.intFromLE(t)},Re.prototype.isPoint=function(t){return t instanceof this.pointClass};var vu=jr(function(t,e){var r=e;r.utils=Yt,r.rand=Zo,r.curve=Ns,r.curves=Ia,r.ec=F6,r.eddsa=N6}),j6=Object.freeze(Object.defineProperty({__proto__:null,default:vu,__moduleExports:vu},Symbol.toStringTag,{value:"Module"}));export{W6 as V,H6 as W,ri as _,Z6 as c,Q6 as d,Y6 as l,V6 as n,X6 as p,G6 as r};