mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-22 04:50:56 -05:00
17 lines
No EOL
736 KiB
JavaScript
Generated
17 lines
No EOL
736 KiB
JavaScript
Generated
require('./sourcemap-register.js');(()=>{var ke={7351:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};Object.defineProperty(Ae,"__esModule",{value:true});Ae.issue=Ae.issueCommand=void 0;const tt=Ve(Ce(2037));const rt=Ce(5278);function issueCommand(ke,Ae,Ce){const qe=new Command(ke,Ae,Ce);process.stdout.write(qe.toString()+tt.EOL)}Ae.issueCommand=issueCommand;function issue(ke,Ae=""){issueCommand(ke,{},Ae)}Ae.issue=issue;const it="::";class Command{constructor(ke,Ae,Ce){if(!ke){ke="missing.command"}this.command=ke;this.properties=Ae;this.message=Ce}toString(){let ke=it+this.command;if(this.properties&&Object.keys(this.properties).length>0){ke+=" ";let Ae=true;for(const Ce in this.properties){if(this.properties.hasOwnProperty(Ce)){const qe=this.properties[Ce];if(qe){if(Ae){Ae=false}else{ke+=","}ke+=`${Ce}=${escapeProperty(qe)}`}}}}ke+=`${it}${escapeData(this.message)}`;return ke}}function escapeData(ke){return rt.toCommandValue(ke).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(ke){return rt.toCommandValue(ke).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.getIDToken=Ae.getState=Ae.saveState=Ae.group=Ae.endGroup=Ae.startGroup=Ae.info=Ae.notice=Ae.warning=Ae.error=Ae.debug=Ae.isDebug=Ae.setFailed=Ae.setCommandEcho=Ae.setOutput=Ae.getBooleanInput=Ae.getMultilineInput=Ae.getInput=Ae.addPath=Ae.setSecret=Ae.exportVariable=Ae.ExitCode=void 0;const rt=Ce(7351);const it=Ce(717);const nt=Ce(5278);const ot=Ve(Ce(2037));const ct=Ve(Ce(1017));const ht=Ce(8041);var ft;(function(ke){ke[ke["Success"]=0]="Success";ke[ke["Failure"]=1]="Failure"})(ft=Ae.ExitCode||(Ae.ExitCode={}));function exportVariable(ke,Ae){const Ce=nt.toCommandValue(Ae);process.env[ke]=Ce;const qe=process.env["GITHUB_ENV"]||"";if(qe){return it.issueFileCommand("ENV",it.prepareKeyValueMessage(ke,Ae))}rt.issueCommand("set-env",{name:ke},Ce)}Ae.exportVariable=exportVariable;function setSecret(ke){rt.issueCommand("add-mask",{},ke)}Ae.setSecret=setSecret;function addPath(ke){const Ae=process.env["GITHUB_PATH"]||"";if(Ae){it.issueFileCommand("PATH",ke)}else{rt.issueCommand("add-path",{},ke)}process.env["PATH"]=`${ke}${ct.delimiter}${process.env["PATH"]}`}Ae.addPath=addPath;function getInput(ke,Ae){const Ce=process.env[`INPUT_${ke.replace(/ /g,"_").toUpperCase()}`]||"";if(Ae&&Ae.required&&!Ce){throw new Error(`Input required and not supplied: ${ke}`)}if(Ae&&Ae.trimWhitespace===false){return Ce}return Ce.trim()}Ae.getInput=getInput;function getMultilineInput(ke,Ae){const Ce=getInput(ke,Ae).split("\n").filter((ke=>ke!==""));if(Ae&&Ae.trimWhitespace===false){return Ce}return Ce.map((ke=>ke.trim()))}Ae.getMultilineInput=getMultilineInput;function getBooleanInput(ke,Ae){const Ce=["true","True","TRUE"];const qe=["false","False","FALSE"];const ze=getInput(ke,Ae);if(Ce.includes(ze))return true;if(qe.includes(ze))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${ke}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}Ae.getBooleanInput=getBooleanInput;function setOutput(ke,Ae){const Ce=process.env["GITHUB_OUTPUT"]||"";if(Ce){return it.issueFileCommand("OUTPUT",it.prepareKeyValueMessage(ke,Ae))}process.stdout.write(ot.EOL);rt.issueCommand("set-output",{name:ke},nt.toCommandValue(Ae))}Ae.setOutput=setOutput;function setCommandEcho(ke){rt.issue("echo",ke?"on":"off")}Ae.setCommandEcho=setCommandEcho;function setFailed(ke){process.exitCode=ft.Failure;error(ke)}Ae.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}Ae.isDebug=isDebug;function debug(ke){rt.issueCommand("debug",{},ke)}Ae.debug=debug;function error(ke,Ae={}){rt.issueCommand("error",nt.toCommandProperties(Ae),ke instanceof Error?ke.toString():ke)}Ae.error=error;function warning(ke,Ae={}){rt.issueCommand("warning",nt.toCommandProperties(Ae),ke instanceof Error?ke.toString():ke)}Ae.warning=warning;function notice(ke,Ae={}){rt.issueCommand("notice",nt.toCommandProperties(Ae),ke instanceof Error?ke.toString():ke)}Ae.notice=notice;function info(ke){process.stdout.write(ke+ot.EOL)}Ae.info=info;function startGroup(ke){rt.issue("group",ke)}Ae.startGroup=startGroup;function endGroup(){rt.issue("endgroup")}Ae.endGroup=endGroup;function group(ke,Ae){return tt(this,void 0,void 0,(function*(){startGroup(ke);let Ce;try{Ce=yield Ae()}finally{endGroup()}return Ce}))}Ae.group=group;function saveState(ke,Ae){const Ce=process.env["GITHUB_STATE"]||"";if(Ce){return it.issueFileCommand("STATE",it.prepareKeyValueMessage(ke,Ae))}rt.issueCommand("save-state",{name:ke},nt.toCommandValue(Ae))}Ae.saveState=saveState;function getState(ke){return process.env[`STATE_${ke}`]||""}Ae.getState=getState;function getIDToken(ke){return tt(this,void 0,void 0,(function*(){return yield ht.OidcClient.getIDToken(ke)}))}Ae.getIDToken=getIDToken;var yt=Ce(1327);Object.defineProperty(Ae,"summary",{enumerable:true,get:function(){return yt.summary}});var mt=Ce(1327);Object.defineProperty(Ae,"markdownSummary",{enumerable:true,get:function(){return mt.markdownSummary}});var kt=Ce(2981);Object.defineProperty(Ae,"toPosixPath",{enumerable:true,get:function(){return kt.toPosixPath}});Object.defineProperty(Ae,"toWin32Path",{enumerable:true,get:function(){return kt.toWin32Path}});Object.defineProperty(Ae,"toPlatformPath",{enumerable:true,get:function(){return kt.toPlatformPath}})},717:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};Object.defineProperty(Ae,"__esModule",{value:true});Ae.prepareKeyValueMessage=Ae.issueFileCommand=void 0;const tt=Ve(Ce(7147));const rt=Ve(Ce(2037));const it=Ce(5840);const nt=Ce(5278);function issueFileCommand(ke,Ae){const Ce=process.env[`GITHUB_${ke}`];if(!Ce){throw new Error(`Unable to find environment variable for file command ${ke}`)}if(!tt.existsSync(Ce)){throw new Error(`Missing file at path: ${Ce}`)}tt.appendFileSync(Ce,`${nt.toCommandValue(Ae)}${rt.EOL}`,{encoding:"utf8"})}Ae.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(ke,Ae){const Ce=`ghadelimiter_${it.v4()}`;const qe=nt.toCommandValue(Ae);if(ke.includes(Ce)){throw new Error(`Unexpected input: name should not contain the delimiter "${Ce}"`)}if(qe.includes(Ce)){throw new Error(`Unexpected input: value should not contain the delimiter "${Ce}"`)}return`${ke}<<${Ce}${rt.EOL}${qe}${rt.EOL}${Ce}`}Ae.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(ke,Ae,Ce){"use strict";var qe=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.OidcClient=void 0;const ze=Ce(6255);const Ve=Ce(5526);const tt=Ce(2186);class OidcClient{static createHttpClient(ke=true,Ae=10){const Ce={allowRetries:ke,maxRetries:Ae};return new ze.HttpClient("actions/oidc-client",[new Ve.BearerCredentialHandler(OidcClient.getRequestToken())],Ce)}static getRequestToken(){const ke=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!ke){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return ke}static getIDTokenUrl(){const ke=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!ke){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return ke}static getCall(ke){var Ae;return qe(this,void 0,void 0,(function*(){const Ce=OidcClient.createHttpClient();const qe=yield Ce.getJson(ke).catch((ke=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${ke.statusCode}\n \n Error Message: ${ke.result.message}`)}));const ze=(Ae=qe.result)===null||Ae===void 0?void 0:Ae.value;if(!ze){throw new Error("Response json body do not have ID Token field")}return ze}))}static getIDToken(ke){return qe(this,void 0,void 0,(function*(){try{let Ae=OidcClient.getIDTokenUrl();if(ke){const Ce=encodeURIComponent(ke);Ae=`${Ae}&audience=${Ce}`}tt.debug(`ID token url is ${Ae}`);const Ce=yield OidcClient.getCall(Ae);tt.setSecret(Ce);return Ce}catch(ke){throw new Error(`Error message: ${ke.message}`)}}))}}Ae.OidcClient=OidcClient},2981:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};Object.defineProperty(Ae,"__esModule",{value:true});Ae.toPlatformPath=Ae.toWin32Path=Ae.toPosixPath=void 0;const tt=Ve(Ce(1017));function toPosixPath(ke){return ke.replace(/[\\]/g,"/")}Ae.toPosixPath=toPosixPath;function toWin32Path(ke){return ke.replace(/[/]/g,"\\")}Ae.toWin32Path=toWin32Path;function toPlatformPath(ke){return ke.replace(/[/\\]/g,tt.sep)}Ae.toPlatformPath=toPlatformPath},1327:function(ke,Ae,Ce){"use strict";var qe=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.summary=Ae.markdownSummary=Ae.SUMMARY_DOCS_URL=Ae.SUMMARY_ENV_VAR=void 0;const ze=Ce(2037);const Ve=Ce(7147);const{access:tt,appendFile:rt,writeFile:it}=Ve.promises;Ae.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Ae.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return qe(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const ke=process.env[Ae.SUMMARY_ENV_VAR];if(!ke){throw new Error(`Unable to find environment variable for $${Ae.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield tt(ke,Ve.constants.R_OK|Ve.constants.W_OK)}catch(Ae){throw new Error(`Unable to access summary file: '${ke}'. Check if the file has correct read/write permissions.`)}this._filePath=ke;return this._filePath}))}wrap(ke,Ae,Ce={}){const qe=Object.entries(Ce).map((([ke,Ae])=>` ${ke}="${Ae}"`)).join("");if(!Ae){return`<${ke}${qe}>`}return`<${ke}${qe}>${Ae}</${ke}>`}write(ke){return qe(this,void 0,void 0,(function*(){const Ae=!!(ke===null||ke===void 0?void 0:ke.overwrite);const Ce=yield this.filePath();const qe=Ae?it:rt;yield qe(Ce,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return qe(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(ke,Ae=false){this._buffer+=ke;return Ae?this.addEOL():this}addEOL(){return this.addRaw(ze.EOL)}addCodeBlock(ke,Ae){const Ce=Object.assign({},Ae&&{lang:Ae});const qe=this.wrap("pre",this.wrap("code",ke),Ce);return this.addRaw(qe).addEOL()}addList(ke,Ae=false){const Ce=Ae?"ol":"ul";const qe=ke.map((ke=>this.wrap("li",ke))).join("");const ze=this.wrap(Ce,qe);return this.addRaw(ze).addEOL()}addTable(ke){const Ae=ke.map((ke=>{const Ae=ke.map((ke=>{if(typeof ke==="string"){return this.wrap("td",ke)}const{header:Ae,data:Ce,colspan:qe,rowspan:ze}=ke;const Ve=Ae?"th":"td";const tt=Object.assign(Object.assign({},qe&&{colspan:qe}),ze&&{rowspan:ze});return this.wrap(Ve,Ce,tt)})).join("");return this.wrap("tr",Ae)})).join("");const Ce=this.wrap("table",Ae);return this.addRaw(Ce).addEOL()}addDetails(ke,Ae){const Ce=this.wrap("details",this.wrap("summary",ke)+Ae);return this.addRaw(Ce).addEOL()}addImage(ke,Ae,Ce){const{width:qe,height:ze}=Ce||{};const Ve=Object.assign(Object.assign({},qe&&{width:qe}),ze&&{height:ze});const tt=this.wrap("img",null,Object.assign({src:ke,alt:Ae},Ve));return this.addRaw(tt).addEOL()}addHeading(ke,Ae){const Ce=`h${Ae}`;const qe=["h1","h2","h3","h4","h5","h6"].includes(Ce)?Ce:"h1";const ze=this.wrap(qe,ke);return this.addRaw(ze).addEOL()}addSeparator(){const ke=this.wrap("hr",null);return this.addRaw(ke).addEOL()}addBreak(){const ke=this.wrap("br",null);return this.addRaw(ke).addEOL()}addQuote(ke,Ae){const Ce=Object.assign({},Ae&&{cite:Ae});const qe=this.wrap("blockquote",ke,Ce);return this.addRaw(qe).addEOL()}addLink(ke,Ae){const Ce=this.wrap("a",ke,{href:Ae});return this.addRaw(Ce).addEOL()}}const nt=new Summary;Ae.markdownSummary=nt;Ae.summary=nt},5278:(ke,Ae)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae.toCommandProperties=Ae.toCommandValue=void 0;function toCommandValue(ke){if(ke===null||ke===undefined){return""}else if(typeof ke==="string"||ke instanceof String){return ke}return JSON.stringify(ke)}Ae.toCommandValue=toCommandValue;function toCommandProperties(ke){if(!Object.keys(ke).length){return{}}return{title:ke.title,file:ke.file,line:ke.startLine,endLine:ke.endLine,col:ke.startColumn,endColumn:ke.endColumn}}Ae.toCommandProperties=toCommandProperties},1514:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.getExecOutput=Ae.exec=void 0;const rt=Ce(1576);const it=Ve(Ce(8159));function exec(ke,Ae,Ce){return tt(this,void 0,void 0,(function*(){const qe=it.argStringToArray(ke);if(qe.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const ze=qe[0];Ae=qe.slice(1).concat(Ae||[]);const Ve=new it.ToolRunner(ze,Ae,Ce);return Ve.exec()}))}Ae.exec=exec;function getExecOutput(ke,Ae,Ce){var qe,ze;return tt(this,void 0,void 0,(function*(){let Ve="";let tt="";const it=new rt.StringDecoder("utf8");const nt=new rt.StringDecoder("utf8");const ot=(qe=Ce===null||Ce===void 0?void 0:Ce.listeners)===null||qe===void 0?void 0:qe.stdout;const ct=(ze=Ce===null||Ce===void 0?void 0:Ce.listeners)===null||ze===void 0?void 0:ze.stderr;const stdErrListener=ke=>{tt+=nt.write(ke);if(ct){ct(ke)}};const stdOutListener=ke=>{Ve+=it.write(ke);if(ot){ot(ke)}};const ht=Object.assign(Object.assign({},Ce===null||Ce===void 0?void 0:Ce.listeners),{stdout:stdOutListener,stderr:stdErrListener});const ft=yield exec(ke,Ae,Object.assign(Object.assign({},Ce),{listeners:ht}));Ve+=it.end();tt+=nt.end();return{exitCode:ft,stdout:Ve,stderr:tt}}))}Ae.getExecOutput=getExecOutput},8159:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.argStringToArray=Ae.ToolRunner=void 0;const rt=Ve(Ce(2037));const it=Ve(Ce(2361));const nt=Ve(Ce(2081));const ot=Ve(Ce(1017));const ct=Ve(Ce(7436));const ht=Ve(Ce(1962));const ft=Ce(9512);const yt=process.platform==="win32";class ToolRunner extends it.EventEmitter{constructor(ke,Ae,Ce){super();if(!ke){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=ke;this.args=Ae||[];this.options=Ce||{}}_debug(ke){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(ke)}}_getCommandString(ke,Ae){const Ce=this._getSpawnFileName();const qe=this._getSpawnArgs(ke);let ze=Ae?"":"[command]";if(yt){if(this._isCmdFile()){ze+=Ce;for(const ke of qe){ze+=` ${ke}`}}else if(ke.windowsVerbatimArguments){ze+=`"${Ce}"`;for(const ke of qe){ze+=` ${ke}`}}else{ze+=this._windowsQuoteCmdArg(Ce);for(const ke of qe){ze+=` ${this._windowsQuoteCmdArg(ke)}`}}}else{ze+=Ce;for(const ke of qe){ze+=` ${ke}`}}return ze}_processLineBuffer(ke,Ae,Ce){try{let qe=Ae+ke.toString();let ze=qe.indexOf(rt.EOL);while(ze>-1){const ke=qe.substring(0,ze);Ce(ke);qe=qe.substring(ze+rt.EOL.length);ze=qe.indexOf(rt.EOL)}return qe}catch(ke){this._debug(`error processing line. Failed with error ${ke}`);return""}}_getSpawnFileName(){if(yt){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(ke){if(yt){if(this._isCmdFile()){let Ae=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const Ce of this.args){Ae+=" ";Ae+=ke.windowsVerbatimArguments?Ce:this._windowsQuoteCmdArg(Ce)}Ae+='"';return[Ae]}}return this.args}_endsWith(ke,Ae){return ke.endsWith(Ae)}_isCmdFile(){const ke=this.toolPath.toUpperCase();return this._endsWith(ke,".CMD")||this._endsWith(ke,".BAT")}_windowsQuoteCmdArg(ke){if(!this._isCmdFile()){return this._uvQuoteCmdArg(ke)}if(!ke){return'""'}const Ae=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let Ce=false;for(const qe of ke){if(Ae.some((ke=>ke===qe))){Ce=true;break}}if(!Ce){return ke}let qe='"';let ze=true;for(let Ae=ke.length;Ae>0;Ae--){qe+=ke[Ae-1];if(ze&&ke[Ae-1]==="\\"){qe+="\\"}else if(ke[Ae-1]==='"'){ze=true;qe+='"'}else{ze=false}}qe+='"';return qe.split("").reverse().join("")}_uvQuoteCmdArg(ke){if(!ke){return'""'}if(!ke.includes(" ")&&!ke.includes("\t")&&!ke.includes('"')){return ke}if(!ke.includes('"')&&!ke.includes("\\")){return`"${ke}"`}let Ae='"';let Ce=true;for(let qe=ke.length;qe>0;qe--){Ae+=ke[qe-1];if(Ce&&ke[qe-1]==="\\"){Ae+="\\"}else if(ke[qe-1]==='"'){Ce=true;Ae+="\\"}else{Ce=false}}Ae+='"';return Ae.split("").reverse().join("")}_cloneExecOptions(ke){ke=ke||{};const Ae={cwd:ke.cwd||process.cwd(),env:ke.env||process.env,silent:ke.silent||false,windowsVerbatimArguments:ke.windowsVerbatimArguments||false,failOnStdErr:ke.failOnStdErr||false,ignoreReturnCode:ke.ignoreReturnCode||false,delay:ke.delay||1e4};Ae.outStream=ke.outStream||process.stdout;Ae.errStream=ke.errStream||process.stderr;return Ae}_getSpawnOptions(ke,Ae){ke=ke||{};const Ce={};Ce.cwd=ke.cwd;Ce.env=ke.env;Ce["windowsVerbatimArguments"]=ke.windowsVerbatimArguments||this._isCmdFile();if(ke.windowsVerbatimArguments){Ce.argv0=`"${Ae}"`}return Ce}exec(){return tt(this,void 0,void 0,(function*(){if(!ht.isRooted(this.toolPath)&&(this.toolPath.includes("/")||yt&&this.toolPath.includes("\\"))){this.toolPath=ot.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield ct.which(this.toolPath,true);return new Promise(((ke,Ae)=>tt(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const ke of this.args){this._debug(` ${ke}`)}const Ce=this._cloneExecOptions(this.options);if(!Ce.silent&&Ce.outStream){Ce.outStream.write(this._getCommandString(Ce)+rt.EOL)}const qe=new ExecState(Ce,this.toolPath);qe.on("debug",(ke=>{this._debug(ke)}));if(this.options.cwd&&!(yield ht.exists(this.options.cwd))){return Ae(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const ze=this._getSpawnFileName();const Ve=nt.spawn(ze,this._getSpawnArgs(Ce),this._getSpawnOptions(this.options,ze));let tt="";if(Ve.stdout){Ve.stdout.on("data",(ke=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(ke)}if(!Ce.silent&&Ce.outStream){Ce.outStream.write(ke)}tt=this._processLineBuffer(ke,tt,(ke=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(ke)}}))}))}let it="";if(Ve.stderr){Ve.stderr.on("data",(ke=>{qe.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(ke)}if(!Ce.silent&&Ce.errStream&&Ce.outStream){const Ae=Ce.failOnStdErr?Ce.errStream:Ce.outStream;Ae.write(ke)}it=this._processLineBuffer(ke,it,(ke=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(ke)}}))}))}Ve.on("error",(ke=>{qe.processError=ke.message;qe.processExited=true;qe.processClosed=true;qe.CheckComplete()}));Ve.on("exit",(ke=>{qe.processExitCode=ke;qe.processExited=true;this._debug(`Exit code ${ke} received from tool '${this.toolPath}'`);qe.CheckComplete()}));Ve.on("close",(ke=>{qe.processExitCode=ke;qe.processExited=true;qe.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);qe.CheckComplete()}));qe.on("done",((Ce,qe)=>{if(tt.length>0){this.emit("stdline",tt)}if(it.length>0){this.emit("errline",it)}Ve.removeAllListeners();if(Ce){Ae(Ce)}else{ke(qe)}}));if(this.options.input){if(!Ve.stdin){throw new Error("child process missing stdin")}Ve.stdin.end(this.options.input)}}))))}))}}Ae.ToolRunner=ToolRunner;function argStringToArray(ke){const Ae=[];let Ce=false;let qe=false;let ze="";function append(ke){if(qe&&ke!=='"'){ze+="\\"}ze+=ke;qe=false}for(let Ve=0;Ve<ke.length;Ve++){const tt=ke.charAt(Ve);if(tt==='"'){if(!qe){Ce=!Ce}else{append(tt)}continue}if(tt==="\\"&&qe){append(tt);continue}if(tt==="\\"&&Ce){qe=true;continue}if(tt===" "&&!Ce){if(ze.length>0){Ae.push(ze);ze=""}continue}append(tt)}if(ze.length>0){Ae.push(ze.trim())}return Ae}Ae.argStringToArray=argStringToArray;class ExecState extends it.EventEmitter{constructor(ke,Ae){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!Ae){throw new Error("toolPath must not be empty")}this.options=ke;this.toolPath=Ae;if(ke.delay){this.delay=ke.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=ft.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(ke){this.emit("debug",ke)}_setResult(){let ke;if(this.processExited){if(this.processError){ke=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){ke=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){ke=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",ke,this.processExitCode)}static HandleTimeout(ke){if(ke.done){return}if(!ke.processClosed&&ke.processExited){const Ae=`The STDIO streams did not close within ${ke.delay/1e3} seconds of the exit event from process '${ke.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;ke._debug(Ae)}ke._setResult()}}},5526:function(ke,Ae){"use strict";var Ce=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.PersonalAccessTokenCredentialHandler=Ae.BearerCredentialHandler=Ae.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(ke,Ae){this.username=ke;this.password=Ae}prepareRequest(ke){if(!ke.headers){throw Error("The request has no headers")}ke.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return Ce(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}Ae.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(ke){this.token=ke}prepareRequest(ke){if(!ke.headers){throw Error("The request has no headers")}ke.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return Ce(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}Ae.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(ke){this.token=ke}prepareRequest(ke){if(!ke.headers){throw Error("The request has no headers")}ke.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return Ce(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}Ae.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;Object.defineProperty(ke,qe,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.HttpClient=Ae.isHttps=Ae.HttpClientResponse=Ae.HttpClientError=Ae.getProxyUrl=Ae.MediaTypes=Ae.Headers=Ae.HttpCodes=void 0;const rt=Ve(Ce(3685));const it=Ve(Ce(5687));const nt=Ve(Ce(9835));const ot=Ve(Ce(4294));var ct;(function(ke){ke[ke["OK"]=200]="OK";ke[ke["MultipleChoices"]=300]="MultipleChoices";ke[ke["MovedPermanently"]=301]="MovedPermanently";ke[ke["ResourceMoved"]=302]="ResourceMoved";ke[ke["SeeOther"]=303]="SeeOther";ke[ke["NotModified"]=304]="NotModified";ke[ke["UseProxy"]=305]="UseProxy";ke[ke["SwitchProxy"]=306]="SwitchProxy";ke[ke["TemporaryRedirect"]=307]="TemporaryRedirect";ke[ke["PermanentRedirect"]=308]="PermanentRedirect";ke[ke["BadRequest"]=400]="BadRequest";ke[ke["Unauthorized"]=401]="Unauthorized";ke[ke["PaymentRequired"]=402]="PaymentRequired";ke[ke["Forbidden"]=403]="Forbidden";ke[ke["NotFound"]=404]="NotFound";ke[ke["MethodNotAllowed"]=405]="MethodNotAllowed";ke[ke["NotAcceptable"]=406]="NotAcceptable";ke[ke["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";ke[ke["RequestTimeout"]=408]="RequestTimeout";ke[ke["Conflict"]=409]="Conflict";ke[ke["Gone"]=410]="Gone";ke[ke["TooManyRequests"]=429]="TooManyRequests";ke[ke["InternalServerError"]=500]="InternalServerError";ke[ke["NotImplemented"]=501]="NotImplemented";ke[ke["BadGateway"]=502]="BadGateway";ke[ke["ServiceUnavailable"]=503]="ServiceUnavailable";ke[ke["GatewayTimeout"]=504]="GatewayTimeout"})(ct=Ae.HttpCodes||(Ae.HttpCodes={}));var ht;(function(ke){ke["Accept"]="accept";ke["ContentType"]="content-type"})(ht=Ae.Headers||(Ae.Headers={}));var ft;(function(ke){ke["ApplicationJson"]="application/json"})(ft=Ae.MediaTypes||(Ae.MediaTypes={}));function getProxyUrl(ke){const Ae=nt.getProxyUrl(new URL(ke));return Ae?Ae.href:""}Ae.getProxyUrl=getProxyUrl;const yt=[ct.MovedPermanently,ct.ResourceMoved,ct.SeeOther,ct.TemporaryRedirect,ct.PermanentRedirect];const mt=[ct.BadGateway,ct.ServiceUnavailable,ct.GatewayTimeout];const kt=["OPTIONS","GET","DELETE","HEAD"];const St=10;const Et=5;class HttpClientError extends Error{constructor(ke,Ae){super(ke);this.name="HttpClientError";this.statusCode=Ae;Object.setPrototypeOf(this,HttpClientError.prototype)}}Ae.HttpClientError=HttpClientError;class HttpClientResponse{constructor(ke){this.message=ke}readBody(){return tt(this,void 0,void 0,(function*(){return new Promise((ke=>tt(this,void 0,void 0,(function*(){let Ae=Buffer.alloc(0);this.message.on("data",(ke=>{Ae=Buffer.concat([Ae,ke])}));this.message.on("end",(()=>{ke(Ae.toString())}))}))))}))}}Ae.HttpClientResponse=HttpClientResponse;function isHttps(ke){const Ae=new URL(ke);return Ae.protocol==="https:"}Ae.isHttps=isHttps;class HttpClient{constructor(ke,Ae,Ce){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=ke;this.handlers=Ae||[];this.requestOptions=Ce;if(Ce){if(Ce.ignoreSslError!=null){this._ignoreSslError=Ce.ignoreSslError}this._socketTimeout=Ce.socketTimeout;if(Ce.allowRedirects!=null){this._allowRedirects=Ce.allowRedirects}if(Ce.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=Ce.allowRedirectDowngrade}if(Ce.maxRedirects!=null){this._maxRedirects=Math.max(Ce.maxRedirects,0)}if(Ce.keepAlive!=null){this._keepAlive=Ce.keepAlive}if(Ce.allowRetries!=null){this._allowRetries=Ce.allowRetries}if(Ce.maxRetries!=null){this._maxRetries=Ce.maxRetries}}}options(ke,Ae){return tt(this,void 0,void 0,(function*(){return this.request("OPTIONS",ke,null,Ae||{})}))}get(ke,Ae){return tt(this,void 0,void 0,(function*(){return this.request("GET",ke,null,Ae||{})}))}del(ke,Ae){return tt(this,void 0,void 0,(function*(){return this.request("DELETE",ke,null,Ae||{})}))}post(ke,Ae,Ce){return tt(this,void 0,void 0,(function*(){return this.request("POST",ke,Ae,Ce||{})}))}patch(ke,Ae,Ce){return tt(this,void 0,void 0,(function*(){return this.request("PATCH",ke,Ae,Ce||{})}))}put(ke,Ae,Ce){return tt(this,void 0,void 0,(function*(){return this.request("PUT",ke,Ae,Ce||{})}))}head(ke,Ae){return tt(this,void 0,void 0,(function*(){return this.request("HEAD",ke,null,Ae||{})}))}sendStream(ke,Ae,Ce,qe){return tt(this,void 0,void 0,(function*(){return this.request(ke,Ae,Ce,qe)}))}getJson(ke,Ae={}){return tt(this,void 0,void 0,(function*(){Ae[ht.Accept]=this._getExistingOrDefaultHeader(Ae,ht.Accept,ft.ApplicationJson);const Ce=yield this.get(ke,Ae);return this._processResponse(Ce,this.requestOptions)}))}postJson(ke,Ae,Ce={}){return tt(this,void 0,void 0,(function*(){const qe=JSON.stringify(Ae,null,2);Ce[ht.Accept]=this._getExistingOrDefaultHeader(Ce,ht.Accept,ft.ApplicationJson);Ce[ht.ContentType]=this._getExistingOrDefaultHeader(Ce,ht.ContentType,ft.ApplicationJson);const ze=yield this.post(ke,qe,Ce);return this._processResponse(ze,this.requestOptions)}))}putJson(ke,Ae,Ce={}){return tt(this,void 0,void 0,(function*(){const qe=JSON.stringify(Ae,null,2);Ce[ht.Accept]=this._getExistingOrDefaultHeader(Ce,ht.Accept,ft.ApplicationJson);Ce[ht.ContentType]=this._getExistingOrDefaultHeader(Ce,ht.ContentType,ft.ApplicationJson);const ze=yield this.put(ke,qe,Ce);return this._processResponse(ze,this.requestOptions)}))}patchJson(ke,Ae,Ce={}){return tt(this,void 0,void 0,(function*(){const qe=JSON.stringify(Ae,null,2);Ce[ht.Accept]=this._getExistingOrDefaultHeader(Ce,ht.Accept,ft.ApplicationJson);Ce[ht.ContentType]=this._getExistingOrDefaultHeader(Ce,ht.ContentType,ft.ApplicationJson);const ze=yield this.patch(ke,qe,Ce);return this._processResponse(ze,this.requestOptions)}))}request(ke,Ae,Ce,qe){return tt(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const ze=new URL(Ae);let Ve=this._prepareRequest(ke,ze,qe);const tt=this._allowRetries&&kt.includes(ke)?this._maxRetries+1:1;let rt=0;let it;do{it=yield this.requestRaw(Ve,Ce);if(it&&it.message&&it.message.statusCode===ct.Unauthorized){let ke;for(const Ae of this.handlers){if(Ae.canHandleAuthentication(it)){ke=Ae;break}}if(ke){return ke.handleAuthentication(this,Ve,Ce)}else{return it}}let Ae=this._maxRedirects;while(it.message.statusCode&&yt.includes(it.message.statusCode)&&this._allowRedirects&&Ae>0){const tt=it.message.headers["location"];if(!tt){break}const rt=new URL(tt);if(ze.protocol==="https:"&&ze.protocol!==rt.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield it.readBody();if(rt.hostname!==ze.hostname){for(const ke in qe){if(ke.toLowerCase()==="authorization"){delete qe[ke]}}}Ve=this._prepareRequest(ke,rt,qe);it=yield this.requestRaw(Ve,Ce);Ae--}if(!it.message.statusCode||!mt.includes(it.message.statusCode)){return it}rt+=1;if(rt<tt){yield it.readBody();yield this._performExponentialBackoff(rt)}}while(rt<tt);return it}))}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(ke,Ae){return tt(this,void 0,void 0,(function*(){return new Promise(((Ce,qe)=>{function callbackForResult(ke,Ae){if(ke){qe(ke)}else if(!Ae){qe(new Error("Unknown error"))}else{Ce(Ae)}}this.requestRawWithCallback(ke,Ae,callbackForResult)}))}))}requestRawWithCallback(ke,Ae,Ce){if(typeof Ae==="string"){if(!ke.options.headers){ke.options.headers={}}ke.options.headers["Content-Length"]=Buffer.byteLength(Ae,"utf8")}let qe=false;function handleResult(ke,Ae){if(!qe){qe=true;Ce(ke,Ae)}}const ze=ke.httpModule.request(ke.options,(ke=>{const Ae=new HttpClientResponse(ke);handleResult(undefined,Ae)}));let Ve;ze.on("socket",(ke=>{Ve=ke}));ze.setTimeout(this._socketTimeout||3*6e4,(()=>{if(Ve){Ve.end()}handleResult(new Error(`Request timeout: ${ke.options.path}`))}));ze.on("error",(function(ke){handleResult(ke)}));if(Ae&&typeof Ae==="string"){ze.write(Ae,"utf8")}if(Ae&&typeof Ae!=="string"){Ae.on("close",(function(){ze.end()}));Ae.pipe(ze)}else{ze.end()}}getAgent(ke){const Ae=new URL(ke);return this._getAgent(Ae)}_prepareRequest(ke,Ae,Ce){const qe={};qe.parsedUrl=Ae;const ze=qe.parsedUrl.protocol==="https:";qe.httpModule=ze?it:rt;const Ve=ze?443:80;qe.options={};qe.options.host=qe.parsedUrl.hostname;qe.options.port=qe.parsedUrl.port?parseInt(qe.parsedUrl.port):Ve;qe.options.path=(qe.parsedUrl.pathname||"")+(qe.parsedUrl.search||"");qe.options.method=ke;qe.options.headers=this._mergeHeaders(Ce);if(this.userAgent!=null){qe.options.headers["user-agent"]=this.userAgent}qe.options.agent=this._getAgent(qe.parsedUrl);if(this.handlers){for(const ke of this.handlers){ke.prepareRequest(qe.options)}}return qe}_mergeHeaders(ke){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(ke||{}))}return lowercaseKeys(ke||{})}_getExistingOrDefaultHeader(ke,Ae,Ce){let qe;if(this.requestOptions&&this.requestOptions.headers){qe=lowercaseKeys(this.requestOptions.headers)[Ae]}return ke[Ae]||qe||Ce}_getAgent(ke){let Ae;const Ce=nt.getProxyUrl(ke);const qe=Ce&&Ce.hostname;if(this._keepAlive&&qe){Ae=this._proxyAgent}if(this._keepAlive&&!qe){Ae=this._agent}if(Ae){return Ae}const ze=ke.protocol==="https:";let Ve=100;if(this.requestOptions){Ve=this.requestOptions.maxSockets||rt.globalAgent.maxSockets}if(Ce&&Ce.hostname){const ke={maxSockets:Ve,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(Ce.username||Ce.password)&&{proxyAuth:`${Ce.username}:${Ce.password}`}),{host:Ce.hostname,port:Ce.port})};let qe;const tt=Ce.protocol==="https:";if(ze){qe=tt?ot.httpsOverHttps:ot.httpsOverHttp}else{qe=tt?ot.httpOverHttps:ot.httpOverHttp}Ae=qe(ke);this._proxyAgent=Ae}if(this._keepAlive&&!Ae){const ke={keepAlive:this._keepAlive,maxSockets:Ve};Ae=ze?new it.Agent(ke):new rt.Agent(ke);this._agent=Ae}if(!Ae){Ae=ze?it.globalAgent:rt.globalAgent}if(ze&&this._ignoreSslError){Ae.options=Object.assign(Ae.options||{},{rejectUnauthorized:false})}return Ae}_performExponentialBackoff(ke){return tt(this,void 0,void 0,(function*(){ke=Math.min(St,ke);const Ae=Et*Math.pow(2,ke);return new Promise((ke=>setTimeout((()=>ke()),Ae)))}))}_processResponse(ke,Ae){return tt(this,void 0,void 0,(function*(){return new Promise(((Ce,qe)=>tt(this,void 0,void 0,(function*(){const ze=ke.message.statusCode||0;const Ve={statusCode:ze,result:null,headers:{}};if(ze===ct.NotFound){Ce(Ve)}function dateTimeDeserializer(ke,Ae){if(typeof Ae==="string"){const ke=new Date(Ae);if(!isNaN(ke.valueOf())){return ke}}return Ae}let tt;let rt;try{rt=yield ke.readBody();if(rt&&rt.length>0){if(Ae&&Ae.deserializeDates){tt=JSON.parse(rt,dateTimeDeserializer)}else{tt=JSON.parse(rt)}Ve.result=tt}Ve.headers=ke.message.headers}catch(ke){}if(ze>299){let ke;if(tt&&tt.message){ke=tt.message}else if(rt&&rt.length>0){ke=rt}else{ke=`Failed request: (${ze})`}const Ae=new HttpClientError(ke,ze);Ae.result=Ve.result;qe(Ae)}else{Ce(Ve)}}))))}))}}Ae.HttpClient=HttpClient;const lowercaseKeys=ke=>Object.keys(ke).reduce(((Ae,Ce)=>(Ae[Ce.toLowerCase()]=ke[Ce],Ae)),{})},9835:(ke,Ae)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae.checkBypass=Ae.getProxyUrl=void 0;function getProxyUrl(ke){const Ae=ke.protocol==="https:";if(checkBypass(ke)){return undefined}const Ce=(()=>{if(Ae){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(Ce){return new URL(Ce)}else{return undefined}}Ae.getProxyUrl=getProxyUrl;function checkBypass(ke){if(!ke.hostname){return false}const Ae=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!Ae){return false}let Ce;if(ke.port){Ce=Number(ke.port)}else if(ke.protocol==="http:"){Ce=80}else if(ke.protocol==="https:"){Ce=443}const qe=[ke.hostname.toUpperCase()];if(typeof Ce==="number"){qe.push(`${qe[0]}:${Ce}`)}for(const ke of Ae.split(",").map((ke=>ke.trim().toUpperCase())).filter((ke=>ke))){if(qe.some((Ae=>Ae===ke))){return true}}return false}Ae.checkBypass=checkBypass},1962:function(ke,Ae,Ce){"use strict";var qe=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};var ze;Object.defineProperty(Ae,"__esModule",{value:true});const Ve=Ce(9491);const tt=Ce(7147);const rt=Ce(1017);ze=tt.promises,Ae.chmod=ze.chmod,Ae.copyFile=ze.copyFile,Ae.lstat=ze.lstat,Ae.mkdir=ze.mkdir,Ae.readdir=ze.readdir,Ae.readlink=ze.readlink,Ae.rename=ze.rename,Ae.rmdir=ze.rmdir,Ae.stat=ze.stat,Ae.symlink=ze.symlink,Ae.unlink=ze.unlink;Ae.IS_WINDOWS=process.platform==="win32";function exists(ke){return qe(this,void 0,void 0,(function*(){try{yield Ae.stat(ke)}catch(ke){if(ke.code==="ENOENT"){return false}throw ke}return true}))}Ae.exists=exists;function isDirectory(ke,Ce=false){return qe(this,void 0,void 0,(function*(){const qe=Ce?yield Ae.stat(ke):yield Ae.lstat(ke);return qe.isDirectory()}))}Ae.isDirectory=isDirectory;function isRooted(ke){ke=normalizeSeparators(ke);if(!ke){throw new Error('isRooted() parameter "p" cannot be empty')}if(Ae.IS_WINDOWS){return ke.startsWith("\\")||/^[A-Z]:/i.test(ke)}return ke.startsWith("/")}Ae.isRooted=isRooted;function mkdirP(ke,Ce=1e3,ze=1){return qe(this,void 0,void 0,(function*(){Ve.ok(ke,"a path argument must be provided");ke=rt.resolve(ke);if(ze>=Ce)return Ae.mkdir(ke);try{yield Ae.mkdir(ke);return}catch(qe){switch(qe.code){case"ENOENT":{yield mkdirP(rt.dirname(ke),Ce,ze+1);yield Ae.mkdir(ke);return}default:{let Ce;try{Ce=yield Ae.stat(ke)}catch(ke){throw qe}if(!Ce.isDirectory())throw qe}}}}))}Ae.mkdirP=mkdirP;function tryGetExecutablePath(ke,Ce){return qe(this,void 0,void 0,(function*(){let qe=undefined;try{qe=yield Ae.stat(ke)}catch(Ae){if(Ae.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${ke}': ${Ae}`)}}if(qe&&qe.isFile()){if(Ae.IS_WINDOWS){const Ae=rt.extname(ke).toUpperCase();if(Ce.some((ke=>ke.toUpperCase()===Ae))){return ke}}else{if(isUnixExecutable(qe)){return ke}}}const ze=ke;for(const Ve of Ce){ke=ze+Ve;qe=undefined;try{qe=yield Ae.stat(ke)}catch(Ae){if(Ae.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${ke}': ${Ae}`)}}if(qe&&qe.isFile()){if(Ae.IS_WINDOWS){try{const Ce=rt.dirname(ke);const qe=rt.basename(ke).toUpperCase();for(const ze of yield Ae.readdir(Ce)){if(qe===ze.toUpperCase()){ke=rt.join(Ce,ze);break}}}catch(Ae){console.log(`Unexpected error attempting to determine the actual case of the file '${ke}': ${Ae}`)}return ke}else{if(isUnixExecutable(qe)){return ke}}}}return""}))}Ae.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(ke){ke=ke||"";if(Ae.IS_WINDOWS){ke=ke.replace(/\//g,"\\");return ke.replace(/\\\\+/g,"\\")}return ke.replace(/\/\/+/g,"/")}function isUnixExecutable(ke){return(ke.mode&1)>0||(ke.mode&8)>0&&ke.gid===process.getgid()||(ke.mode&64)>0&&ke.uid===process.getuid()}},7436:function(ke,Ae,Ce){"use strict";var qe=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});const ze=Ce(2081);const Ve=Ce(1017);const tt=Ce(3837);const rt=Ce(1962);const it=tt.promisify(ze.exec);function cp(ke,Ae,Ce={}){return qe(this,void 0,void 0,(function*(){const{force:qe,recursive:ze}=readCopyOptions(Ce);const tt=(yield rt.exists(Ae))?yield rt.stat(Ae):null;if(tt&&tt.isFile()&&!qe){return}const it=tt&&tt.isDirectory()?Ve.join(Ae,Ve.basename(ke)):Ae;if(!(yield rt.exists(ke))){throw new Error(`no such file or directory: ${ke}`)}const nt=yield rt.stat(ke);if(nt.isDirectory()){if(!ze){throw new Error(`Failed to copy. ${ke} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(ke,it,0,qe)}}else{if(Ve.relative(ke,it)===""){throw new Error(`'${it}' and '${ke}' are the same file`)}yield copyFile(ke,it,qe)}}))}Ae.cp=cp;function mv(ke,Ae,Ce={}){return qe(this,void 0,void 0,(function*(){if(yield rt.exists(Ae)){let qe=true;if(yield rt.isDirectory(Ae)){Ae=Ve.join(Ae,Ve.basename(ke));qe=yield rt.exists(Ae)}if(qe){if(Ce.force==null||Ce.force){yield rmRF(Ae)}else{throw new Error("Destination already exists")}}}yield mkdirP(Ve.dirname(Ae));yield rt.rename(ke,Ae)}))}Ae.mv=mv;function rmRF(ke){return qe(this,void 0,void 0,(function*(){if(rt.IS_WINDOWS){try{if(yield rt.isDirectory(ke,true)){yield it(`rd /s /q "${ke}"`)}else{yield it(`del /f /a "${ke}"`)}}catch(ke){if(ke.code!=="ENOENT")throw ke}try{yield rt.unlink(ke)}catch(ke){if(ke.code!=="ENOENT")throw ke}}else{let Ae=false;try{Ae=yield rt.isDirectory(ke)}catch(ke){if(ke.code!=="ENOENT")throw ke;return}if(Ae){yield it(`rm -rf "${ke}"`)}else{yield rt.unlink(ke)}}}))}Ae.rmRF=rmRF;function mkdirP(ke){return qe(this,void 0,void 0,(function*(){yield rt.mkdirP(ke)}))}Ae.mkdirP=mkdirP;function which(ke,Ae){return qe(this,void 0,void 0,(function*(){if(!ke){throw new Error("parameter 'tool' is required")}if(Ae){const Ae=yield which(ke,false);if(!Ae){if(rt.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${ke}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${ke}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const Ae=[];if(rt.IS_WINDOWS&&process.env.PATHEXT){for(const ke of process.env.PATHEXT.split(Ve.delimiter)){if(ke){Ae.push(ke)}}}if(rt.isRooted(ke)){const Ce=yield rt.tryGetExecutablePath(ke,Ae);if(Ce){return Ce}return""}if(ke.includes("/")||rt.IS_WINDOWS&&ke.includes("\\")){return""}const Ce=[];if(process.env.PATH){for(const ke of process.env.PATH.split(Ve.delimiter)){if(ke){Ce.push(ke)}}}for(const qe of Ce){const Ce=yield rt.tryGetExecutablePath(qe+Ve.sep+ke,Ae);if(Ce){return Ce}}return""}catch(ke){throw new Error(`which failed with message ${ke.message}`)}}))}Ae.which=which;function readCopyOptions(ke){const Ae=ke.force==null?true:ke.force;const Ce=Boolean(ke.recursive);return{force:Ae,recursive:Ce}}function cpDirRecursive(ke,Ae,Ce,ze){return qe(this,void 0,void 0,(function*(){if(Ce>=255)return;Ce++;yield mkdirP(Ae);const qe=yield rt.readdir(ke);for(const Ve of qe){const qe=`${ke}/${Ve}`;const tt=`${Ae}/${Ve}`;const it=yield rt.lstat(qe);if(it.isDirectory()){yield cpDirRecursive(qe,tt,Ce,ze)}else{yield copyFile(qe,tt,ze)}}yield rt.chmod(Ae,(yield rt.stat(ke)).mode)}))}function copyFile(ke,Ae,Ce){return qe(this,void 0,void 0,(function*(){if((yield rt.lstat(ke)).isSymbolicLink()){try{yield rt.lstat(Ae);yield rt.unlink(Ae)}catch(ke){if(ke.code==="EPERM"){yield rt.chmod(Ae,"0666");yield rt.unlink(Ae)}}const Ce=yield rt.readlink(ke);yield rt.symlink(Ce,Ae,rt.IS_WINDOWS?"junction":null)}else if(!(yield rt.exists(Ae))||Ce){yield rt.copyFile(ke,Ae)}}))}},2764:ke=>{"use strict";ke.exports=addressparser;function addressparser(ke){var Ae=new Tokenizer(ke);var Ce=Ae.tokenize();var qe=[];var ze=[];var Ve=[];Ce.forEach((function(ke){if(ke.type==="operator"&&(ke.value===","||ke.value===";")){if(ze.length){qe.push(ze)}ze=[]}else{ze.push(ke)}}));if(ze.length){qe.push(ze)}qe.forEach((function(ke){ke=_handleAddress(ke);if(ke.length){Ve=Ve.concat(ke)}}));return Ve}function _handleAddress(ke){var Ae;var Ce=false;var qe="text";var ze;var Ve=[];var tt={address:[],comment:[],group:[],text:[]};var rt;var it;for(rt=0,it=ke.length;rt<it;rt++){Ae=ke[rt];if(Ae.type==="operator"){switch(Ae.value){case"<":qe="address";break;case"(":qe="comment";break;case":":qe="group";Ce=true;break;default:qe="text"}}else if(Ae.value){if(qe==="address"){Ae.value=Ae.value.replace(/^[^<]*<\s*/,"")}tt[qe].push(Ae.value)}}if(!tt.text.length&&tt.comment.length){tt.text=tt.comment;tt.comment=[]}if(Ce){tt.text=tt.text.join(" ");Ve.push({name:tt.text||ze&&ze.name,group:tt.group.length?addressparser(tt.group.join(",")):[]})}else{if(!tt.address.length&&tt.text.length){for(rt=tt.text.length-1;rt>=0;rt--){if(tt.text[rt].match(/^[^@\s]+@[^@\s]+$/)){tt.address=tt.text.splice(rt,1);break}}var _regexHandler=function(ke){if(!tt.address.length){tt.address=[ke.trim()];return" "}else{return ke}};if(!tt.address.length){for(rt=tt.text.length-1;rt>=0;rt--){tt.text[rt]=tt.text[rt].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,_regexHandler).trim();if(tt.address.length){break}}}}if(!tt.text.length&&tt.comment.length){tt.text=tt.comment;tt.comment=[]}if(tt.address.length>1){tt.text=tt.text.concat(tt.address.splice(1))}tt.text=tt.text.join(" ");tt.address=tt.address.join(" ");if(!tt.address&&Ce){return[]}else{ze={address:tt.address||tt.text||"",name:tt.text||tt.address||""};if(ze.address===ze.name){if((ze.address||"").match(/@/)){ze.name=""}else{ze.address=""}}Ve.push(ze)}}return Ve}function Tokenizer(ke){this.str=(ke||"").toString();this.operatorCurrent="";this.operatorExpecting="";this.node=null;this.escaped=false;this.list=[]}Tokenizer.prototype.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""};Tokenizer.prototype.tokenize=function(){var ke,Ae=[];for(var Ce=0,qe=this.str.length;Ce<qe;Ce++){ke=this.str.charAt(Ce);this.checkChar(ke)}this.list.forEach((function(ke){ke.value=(ke.value||"").toString().trim();if(ke.value){Ae.push(ke)}}));return Ae};Tokenizer.prototype.checkChar=function(ke){if((ke in this.operators||ke==="\\")&&this.escaped){this.escaped=false}else if(this.operatorExpecting&&ke===this.operatorExpecting){this.node={type:"operator",value:ke};this.list.push(this.node);this.node=null;this.operatorExpecting="";this.escaped=false;return}else if(!this.operatorExpecting&&ke in this.operators){this.node={type:"operator",value:ke};this.list.push(this.node);this.node=null;this.operatorExpecting=this.operators[ke];this.escaped=false;return}if(!this.escaped&&ke==="\\"){this.escaped=true;return}if(!this.node){this.node={type:"text",value:""};this.list.push(this.node)}if(this.escaped&&ke!=="\\"){this.node.value+="\\"}this.node.value+=ke;this.escaped=false}},4293:(ke,Ae,Ce)=>{"use strict";const qe=Ae;qe.bignum=Ce(6641);qe.define=Ce(5245).define;qe.base=Ce(8096);qe.constants=Ce(3371);qe.decoders=Ce(4952);qe.encoders=Ce(9083)},5245:(ke,Ae,Ce)=>{"use strict";const qe=Ce(9083);const ze=Ce(4952);const Ve=Ce(4124);const tt=Ae;tt.define=function define(ke,Ae){return new Entity(ke,Ae)};function Entity(ke,Ae){this.name=ke;this.body=Ae;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(ke){const Ae=this.name;function Generated(ke){this._initNamed(ke,Ae)}Ve(Generated,ke);Generated.prototype._initNamed=function _initNamed(Ae,Ce){ke.call(this,Ae,Ce)};return new Generated(this)};Entity.prototype._getDecoder=function _getDecoder(ke){ke=ke||"der";if(!this.decoders.hasOwnProperty(ke))this.decoders[ke]=this._createNamed(ze[ke]);return this.decoders[ke]};Entity.prototype.decode=function decode(ke,Ae,Ce){return this._getDecoder(Ae).decode(ke,Ce)};Entity.prototype._getEncoder=function _getEncoder(ke){ke=ke||"der";if(!this.encoders.hasOwnProperty(ke))this.encoders[ke]=this._createNamed(qe[ke]);return this.encoders[ke]};Entity.prototype.encode=function encode(ke,Ae,Ce){return this._getEncoder(Ae).encode(ke,Ce)}},5298:(ke,Ae,Ce)=>{"use strict";const qe=Ce(4124);const ze=Ce(3744).b;const Ve=Ce(5118).Buffer;function DecoderBuffer(ke,Ae){ze.call(this,Ae);if(!Ve.isBuffer(ke)){this.error("Input not Buffer");return}this.base=ke;this.offset=0;this.length=ke.length}qe(DecoderBuffer,ze);Ae.C=DecoderBuffer;DecoderBuffer.isDecoderBuffer=function isDecoderBuffer(ke){if(ke instanceof DecoderBuffer){return true}const Ae=typeof ke==="object"&&Ve.isBuffer(ke.base)&&ke.constructor.name==="DecoderBuffer"&&typeof ke.offset==="number"&&typeof ke.length==="number"&&typeof ke.save==="function"&&typeof ke.restore==="function"&&typeof ke.isEmpty==="function"&&typeof ke.readUInt8==="function"&&typeof ke.skip==="function"&&typeof ke.raw==="function";return Ae};DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:ze.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(ke){const Ae=new DecoderBuffer(this.base);Ae.offset=ke.offset;Ae.length=this.offset;this.offset=ke.offset;ze.prototype.restore.call(this,ke.reporter);return Ae};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(ke){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(ke||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(ke,Ae){if(!(this.offset+ke<=this.length))return this.error(Ae||"DecoderBuffer overrun");const Ce=new DecoderBuffer(this.base);Ce._reporterState=this._reporterState;Ce.offset=this.offset;Ce.length=this.offset+ke;this.offset+=ke;return Ce};DecoderBuffer.prototype.raw=function raw(ke){return this.base.slice(ke?ke.offset:this.offset,this.length)};function EncoderBuffer(ke,Ae){if(Array.isArray(ke)){this.length=0;this.value=ke.map((function(ke){if(!EncoderBuffer.isEncoderBuffer(ke))ke=new EncoderBuffer(ke,Ae);this.length+=ke.length;return ke}),this)}else if(typeof ke==="number"){if(!(0<=ke&&ke<=255))return Ae.error("non-byte EncoderBuffer value");this.value=ke;this.length=1}else if(typeof ke==="string"){this.value=ke;this.length=Ve.byteLength(ke)}else if(Ve.isBuffer(ke)){this.value=ke;this.length=ke.length}else{return Ae.error("Unsupported type: "+typeof ke)}}Ae.R=EncoderBuffer;EncoderBuffer.isEncoderBuffer=function isEncoderBuffer(ke){if(ke instanceof EncoderBuffer){return true}const Ae=typeof ke==="object"&&ke.constructor.name==="EncoderBuffer"&&typeof ke.length==="number"&&typeof ke.join==="function";return Ae};EncoderBuffer.prototype.join=function join(ke,Ae){if(!ke)ke=Ve.alloc(this.length);if(!Ae)Ae=0;if(this.length===0)return ke;if(Array.isArray(this.value)){this.value.forEach((function(Ce){Ce.join(ke,Ae);Ae+=Ce.length}))}else{if(typeof this.value==="number")ke[Ae]=this.value;else if(typeof this.value==="string")ke.write(this.value,Ae);else if(Ve.isBuffer(this.value))this.value.copy(ke,Ae);Ae+=this.length}return ke}},8096:(ke,Ae,Ce)=>{"use strict";const qe=Ae;qe.Reporter=Ce(3744).b;qe.DecoderBuffer=Ce(5298).C;qe.EncoderBuffer=Ce(5298).R;qe.Node=Ce(842)},842:(ke,Ae,Ce)=>{"use strict";const qe=Ce(3744).b;const ze=Ce(5298).R;const Ve=Ce(5298).C;const tt=Ce(910);const rt=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"];const it=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(rt);const nt=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(ke,Ae,Ce){const qe={};this._baseState=qe;qe.name=Ce;qe.enc=ke;qe.parent=Ae||null;qe.children=null;qe.tag=null;qe.args=null;qe.reverseArgs=null;qe.choice=null;qe.optional=false;qe.any=false;qe.obj=false;qe.use=null;qe.useDecoder=null;qe.key=null;qe["default"]=null;qe.explicit=null;qe.implicit=null;qe.contains=null;if(!qe.parent){qe.children=[];this._wrap()}}ke.exports=Node;const ot=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){const ke=this._baseState;const Ae={};ot.forEach((function(Ce){Ae[Ce]=ke[Ce]}));const Ce=new this.constructor(Ae.parent);Ce._baseState=Ae;return Ce};Node.prototype._wrap=function wrap(){const ke=this._baseState;it.forEach((function(Ae){this[Ae]=function _wrappedMethod(){const Ce=new this.constructor(this);ke.children.push(Ce);return Ce[Ae].apply(Ce,arguments)}}),this)};Node.prototype._init=function init(ke){const Ae=this._baseState;tt(Ae.parent===null);ke.call(this);Ae.children=Ae.children.filter((function(ke){return ke._baseState.parent===this}),this);tt.equal(Ae.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(ke){const Ae=this._baseState;const Ce=ke.filter((function(ke){return ke instanceof this.constructor}),this);ke=ke.filter((function(ke){return!(ke instanceof this.constructor)}),this);if(Ce.length!==0){tt(Ae.children===null);Ae.children=Ce;Ce.forEach((function(ke){ke._baseState.parent=this}),this)}if(ke.length!==0){tt(Ae.args===null);Ae.args=ke;Ae.reverseArgs=ke.map((function(ke){if(typeof ke!=="object"||ke.constructor!==Object)return ke;const Ae={};Object.keys(ke).forEach((function(Ce){if(Ce==(Ce|0))Ce|=0;const qe=ke[Ce];Ae[qe]=Ce}));return Ae}))}};nt.forEach((function(ke){Node.prototype[ke]=function _overrided(){const Ae=this._baseState;throw new Error(ke+" not implemented for encoding: "+Ae.enc)}}));rt.forEach((function(ke){Node.prototype[ke]=function _tagMethod(){const Ae=this._baseState;const Ce=Array.prototype.slice.call(arguments);tt(Ae.tag===null);Ae.tag=ke;this._useArgs(Ce);return this}}));Node.prototype.use=function use(ke){tt(ke);const Ae=this._baseState;tt(Ae.use===null);Ae.use=ke;return this};Node.prototype.optional=function optional(){const ke=this._baseState;ke.optional=true;return this};Node.prototype.def=function def(ke){const Ae=this._baseState;tt(Ae["default"]===null);Ae["default"]=ke;Ae.optional=true;return this};Node.prototype.explicit=function explicit(ke){const Ae=this._baseState;tt(Ae.explicit===null&&Ae.implicit===null);Ae.explicit=ke;return this};Node.prototype.implicit=function implicit(ke){const Ae=this._baseState;tt(Ae.explicit===null&&Ae.implicit===null);Ae.implicit=ke;return this};Node.prototype.obj=function obj(){const ke=this._baseState;const Ae=Array.prototype.slice.call(arguments);ke.obj=true;if(Ae.length!==0)this._useArgs(Ae);return this};Node.prototype.key=function key(ke){const Ae=this._baseState;tt(Ae.key===null);Ae.key=ke;return this};Node.prototype.any=function any(){const ke=this._baseState;ke.any=true;return this};Node.prototype.choice=function choice(ke){const Ae=this._baseState;tt(Ae.choice===null);Ae.choice=ke;this._useArgs(Object.keys(ke).map((function(Ae){return ke[Ae]})));return this};Node.prototype.contains=function contains(ke){const Ae=this._baseState;tt(Ae.use===null);Ae.contains=ke;return this};Node.prototype._decode=function decode(ke,Ae){const Ce=this._baseState;if(Ce.parent===null)return ke.wrapResult(Ce.children[0]._decode(ke,Ae));let qe=Ce["default"];let ze=true;let tt=null;if(Ce.key!==null)tt=ke.enterKey(Ce.key);if(Ce.optional){let qe=null;if(Ce.explicit!==null)qe=Ce.explicit;else if(Ce.implicit!==null)qe=Ce.implicit;else if(Ce.tag!==null)qe=Ce.tag;if(qe===null&&!Ce.any){const qe=ke.save();try{if(Ce.choice===null)this._decodeGeneric(Ce.tag,ke,Ae);else this._decodeChoice(ke,Ae);ze=true}catch(ke){ze=false}ke.restore(qe)}else{ze=this._peekTag(ke,qe,Ce.any);if(ke.isError(ze))return ze}}let rt;if(Ce.obj&&ze)rt=ke.enterObject();if(ze){if(Ce.explicit!==null){const Ae=this._decodeTag(ke,Ce.explicit);if(ke.isError(Ae))return Ae;ke=Ae}const ze=ke.offset;if(Ce.use===null&&Ce.choice===null){let Ae;if(Ce.any)Ae=ke.save();const ze=this._decodeTag(ke,Ce.implicit!==null?Ce.implicit:Ce.tag,Ce.any);if(ke.isError(ze))return ze;if(Ce.any)qe=ke.raw(Ae);else ke=ze}if(Ae&&Ae.track&&Ce.tag!==null)Ae.track(ke.path(),ze,ke.length,"tagged");if(Ae&&Ae.track&&Ce.tag!==null)Ae.track(ke.path(),ke.offset,ke.length,"content");if(Ce.any){}else if(Ce.choice===null){qe=this._decodeGeneric(Ce.tag,ke,Ae)}else{qe=this._decodeChoice(ke,Ae)}if(ke.isError(qe))return qe;if(!Ce.any&&Ce.choice===null&&Ce.children!==null){Ce.children.forEach((function decodeChildren(Ce){Ce._decode(ke,Ae)}))}if(Ce.contains&&(Ce.tag==="octstr"||Ce.tag==="bitstr")){const ze=new Ve(qe);qe=this._getUse(Ce.contains,ke._reporterState.obj)._decode(ze,Ae)}}if(Ce.obj&&ze)qe=ke.leaveObject(rt);if(Ce.key!==null&&(qe!==null||ze===true))ke.leaveKey(tt,Ce.key,qe);else if(tt!==null)ke.exitKey(tt);return qe};Node.prototype._decodeGeneric=function decodeGeneric(ke,Ae,Ce){const qe=this._baseState;if(ke==="seq"||ke==="set")return null;if(ke==="seqof"||ke==="setof")return this._decodeList(Ae,ke,qe.args[0],Ce);else if(/str$/.test(ke))return this._decodeStr(Ae,ke,Ce);else if(ke==="objid"&&qe.args)return this._decodeObjid(Ae,qe.args[0],qe.args[1],Ce);else if(ke==="objid")return this._decodeObjid(Ae,null,null,Ce);else if(ke==="gentime"||ke==="utctime")return this._decodeTime(Ae,ke,Ce);else if(ke==="null_")return this._decodeNull(Ae,Ce);else if(ke==="bool")return this._decodeBool(Ae,Ce);else if(ke==="objDesc")return this._decodeStr(Ae,ke,Ce);else if(ke==="int"||ke==="enum")return this._decodeInt(Ae,qe.args&&qe.args[0],Ce);if(qe.use!==null){return this._getUse(qe.use,Ae._reporterState.obj)._decode(Ae,Ce)}else{return Ae.error("unknown tag: "+ke)}};Node.prototype._getUse=function _getUse(ke,Ae){const Ce=this._baseState;Ce.useDecoder=this._use(ke,Ae);tt(Ce.useDecoder._baseState.parent===null);Ce.useDecoder=Ce.useDecoder._baseState.children[0];if(Ce.implicit!==Ce.useDecoder._baseState.implicit){Ce.useDecoder=Ce.useDecoder.clone();Ce.useDecoder._baseState.implicit=Ce.implicit}return Ce.useDecoder};Node.prototype._decodeChoice=function decodeChoice(ke,Ae){const Ce=this._baseState;let qe=null;let ze=false;Object.keys(Ce.choice).some((function(Ve){const tt=ke.save();const rt=Ce.choice[Ve];try{const Ce=rt._decode(ke,Ae);if(ke.isError(Ce))return false;qe={type:Ve,value:Ce};ze=true}catch(Ae){ke.restore(tt);return false}return true}),this);if(!ze)return ke.error("Choice not matched");return qe};Node.prototype._createEncoderBuffer=function createEncoderBuffer(ke){return new ze(ke,this.reporter)};Node.prototype._encode=function encode(ke,Ae,Ce){const qe=this._baseState;if(qe["default"]!==null&&qe["default"]===ke)return;const ze=this._encodeValue(ke,Ae,Ce);if(ze===undefined)return;if(this._skipDefault(ze,Ae,Ce))return;return ze};Node.prototype._encodeValue=function encode(ke,Ae,Ce){const ze=this._baseState;if(ze.parent===null)return ze.children[0]._encode(ke,Ae||new qe);let Ve=null;this.reporter=Ae;if(ze.optional&&ke===undefined){if(ze["default"]!==null)ke=ze["default"];else return}let tt=null;let rt=false;if(ze.any){Ve=this._createEncoderBuffer(ke)}else if(ze.choice){Ve=this._encodeChoice(ke,Ae)}else if(ze.contains){tt=this._getUse(ze.contains,Ce)._encode(ke,Ae);rt=true}else if(ze.children){tt=ze.children.map((function(Ce){if(Ce._baseState.tag==="null_")return Ce._encode(null,Ae,ke);if(Ce._baseState.key===null)return Ae.error("Child should have a key");const qe=Ae.enterKey(Ce._baseState.key);if(typeof ke!=="object")return Ae.error("Child expected, but input is not object");const ze=Ce._encode(ke[Ce._baseState.key],Ae,ke);Ae.leaveKey(qe);return ze}),this).filter((function(ke){return ke}));tt=this._createEncoderBuffer(tt)}else{if(ze.tag==="seqof"||ze.tag==="setof"){if(!(ze.args&&ze.args.length===1))return Ae.error("Too many args for : "+ze.tag);if(!Array.isArray(ke))return Ae.error("seqof/setof, but data is not Array");const Ce=this.clone();Ce._baseState.implicit=null;tt=this._createEncoderBuffer(ke.map((function(Ce){const qe=this._baseState;return this._getUse(qe.args[0],ke)._encode(Ce,Ae)}),Ce))}else if(ze.use!==null){Ve=this._getUse(ze.use,Ce)._encode(ke,Ae)}else{tt=this._encodePrimitive(ze.tag,ke);rt=true}}if(!ze.any&&ze.choice===null){const ke=ze.implicit!==null?ze.implicit:ze.tag;const Ce=ze.implicit===null?"universal":"context";if(ke===null){if(ze.use===null)Ae.error("Tag could be omitted only for .use()")}else{if(ze.use===null)Ve=this._encodeComposite(ke,rt,Ce,tt)}}if(ze.explicit!==null)Ve=this._encodeComposite(ze.explicit,false,"context",Ve);return Ve};Node.prototype._encodeChoice=function encodeChoice(ke,Ae){const Ce=this._baseState;const qe=Ce.choice[ke.type];if(!qe){tt(false,ke.type+" not found in "+JSON.stringify(Object.keys(Ce.choice)))}return qe._encode(ke.value,Ae)};Node.prototype._encodePrimitive=function encodePrimitive(ke,Ae){const Ce=this._baseState;if(/str$/.test(ke))return this._encodeStr(Ae,ke);else if(ke==="objid"&&Ce.args)return this._encodeObjid(Ae,Ce.reverseArgs[0],Ce.args[1]);else if(ke==="objid")return this._encodeObjid(Ae,null,null);else if(ke==="gentime"||ke==="utctime")return this._encodeTime(Ae,ke);else if(ke==="null_")return this._encodeNull();else if(ke==="int"||ke==="enum")return this._encodeInt(Ae,Ce.args&&Ce.reverseArgs[0]);else if(ke==="bool")return this._encodeBool(Ae);else if(ke==="objDesc")return this._encodeStr(Ae,ke);else throw new Error("Unsupported tag: "+ke)};Node.prototype._isNumstr=function isNumstr(ke){return/^[0-9 ]*$/.test(ke)};Node.prototype._isPrintstr=function isPrintstr(ke){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(ke)}},3744:(ke,Ae,Ce)=>{"use strict";const qe=Ce(4124);function Reporter(ke){this._reporterState={obj:null,path:[],options:ke||{},errors:[]}}Ae.b=Reporter;Reporter.prototype.isError=function isError(ke){return ke instanceof ReporterError};Reporter.prototype.save=function save(){const ke=this._reporterState;return{obj:ke.obj,pathLen:ke.path.length}};Reporter.prototype.restore=function restore(ke){const Ae=this._reporterState;Ae.obj=ke.obj;Ae.path=Ae.path.slice(0,ke.pathLen)};Reporter.prototype.enterKey=function enterKey(ke){return this._reporterState.path.push(ke)};Reporter.prototype.exitKey=function exitKey(ke){const Ae=this._reporterState;Ae.path=Ae.path.slice(0,ke-1)};Reporter.prototype.leaveKey=function leaveKey(ke,Ae,Ce){const qe=this._reporterState;this.exitKey(ke);if(qe.obj!==null)qe.obj[Ae]=Ce};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){const ke=this._reporterState;const Ae=ke.obj;ke.obj={};return Ae};Reporter.prototype.leaveObject=function leaveObject(ke){const Ae=this._reporterState;const Ce=Ae.obj;Ae.obj=ke;return Ce};Reporter.prototype.error=function error(ke){let Ae;const Ce=this._reporterState;const qe=ke instanceof ReporterError;if(qe){Ae=ke}else{Ae=new ReporterError(Ce.path.map((function(ke){return"["+JSON.stringify(ke)+"]"})).join(""),ke.message||ke,ke.stack)}if(!Ce.options.partial)throw Ae;if(!qe)Ce.errors.push(Ae);return Ae};Reporter.prototype.wrapResult=function wrapResult(ke){const Ae=this._reporterState;if(!Ae.options.partial)return ke;return{result:this.isError(ke)?null:ke,errors:Ae.errors}};function ReporterError(ke,Ae){this.path=ke;this.rethrow(Ae)}qe(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(ke){this.message=ke+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(ke){this.stack=ke.stack}}return this}},1188:(ke,Ae)=>{"use strict";function reverse(ke){const Ae={};Object.keys(ke).forEach((function(Ce){if((Ce|0)==Ce)Ce=Ce|0;const qe=ke[Ce];Ae[qe]=Ce}));return Ae}Ae.tagClass={0:"universal",1:"application",2:"context",3:"private"};Ae.tagClassByName=reverse(Ae.tagClass);Ae.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};Ae.tagByName=reverse(Ae.tag)},3371:(ke,Ae,Ce)=>{"use strict";const qe=Ae;qe._reverse=function reverse(ke){const Ae={};Object.keys(ke).forEach((function(Ce){if((Ce|0)==Ce)Ce=Ce|0;const qe=ke[Ce];Ae[qe]=Ce}));return Ae};qe.der=Ce(1188)},3332:(ke,Ae,Ce)=>{"use strict";const qe=Ce(4124);const ze=Ce(6641);const Ve=Ce(5298).C;const tt=Ce(842);const rt=Ce(1188);function DERDecoder(ke){this.enc="der";this.name=ke.name;this.entity=ke;this.tree=new DERNode;this.tree._init(ke.body)}ke.exports=DERDecoder;DERDecoder.prototype.decode=function decode(ke,Ae){if(!Ve.isDecoderBuffer(ke)){ke=new Ve(ke,Ae)}return this.tree._decode(ke,Ae)};function DERNode(ke){tt.call(this,"der",ke)}qe(DERNode,tt);DERNode.prototype._peekTag=function peekTag(ke,Ae,Ce){if(ke.isEmpty())return false;const qe=ke.save();const ze=derDecodeTag(ke,'Failed to peek tag: "'+Ae+'"');if(ke.isError(ze))return ze;ke.restore(qe);return ze.tag===Ae||ze.tagStr===Ae||ze.tagStr+"of"===Ae||Ce};DERNode.prototype._decodeTag=function decodeTag(ke,Ae,Ce){const qe=derDecodeTag(ke,'Failed to decode tag of "'+Ae+'"');if(ke.isError(qe))return qe;let ze=derDecodeLen(ke,qe.primitive,'Failed to get length of "'+Ae+'"');if(ke.isError(ze))return ze;if(!Ce&&qe.tag!==Ae&&qe.tagStr!==Ae&&qe.tagStr+"of"!==Ae){return ke.error('Failed to match tag: "'+Ae+'"')}if(qe.primitive||ze!==null)return ke.skip(ze,'Failed to match body of: "'+Ae+'"');const Ve=ke.save();const tt=this._skipUntilEnd(ke,'Failed to skip indefinite length body: "'+this.tag+'"');if(ke.isError(tt))return tt;ze=ke.offset-Ve.offset;ke.restore(Ve);return ke.skip(ze,'Failed to match body of: "'+Ae+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(ke,Ae){for(;;){const Ce=derDecodeTag(ke,Ae);if(ke.isError(Ce))return Ce;const qe=derDecodeLen(ke,Ce.primitive,Ae);if(ke.isError(qe))return qe;let ze;if(Ce.primitive||qe!==null)ze=ke.skip(qe);else ze=this._skipUntilEnd(ke,Ae);if(ke.isError(ze))return ze;if(Ce.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(ke,Ae,Ce,qe){const ze=[];while(!ke.isEmpty()){const Ae=this._peekTag(ke,"end");if(ke.isError(Ae))return Ae;const Ve=Ce.decode(ke,"der",qe);if(ke.isError(Ve)&&Ae)break;ze.push(Ve)}return ze};DERNode.prototype._decodeStr=function decodeStr(ke,Ae){if(Ae==="bitstr"){const Ae=ke.readUInt8();if(ke.isError(Ae))return Ae;return{unused:Ae,data:ke.raw()}}else if(Ae==="bmpstr"){const Ae=ke.raw();if(Ae.length%2===1)return ke.error("Decoding of string type: bmpstr length mismatch");let Ce="";for(let ke=0;ke<Ae.length/2;ke++){Ce+=String.fromCharCode(Ae.readUInt16BE(ke*2))}return Ce}else if(Ae==="numstr"){const Ae=ke.raw().toString("ascii");if(!this._isNumstr(Ae)){return ke.error("Decoding of string type: "+"numstr unsupported characters")}return Ae}else if(Ae==="octstr"){return ke.raw()}else if(Ae==="objDesc"){return ke.raw()}else if(Ae==="printstr"){const Ae=ke.raw().toString("ascii");if(!this._isPrintstr(Ae)){return ke.error("Decoding of string type: "+"printstr unsupported characters")}return Ae}else if(/str$/.test(Ae)){return ke.raw().toString()}else{return ke.error("Decoding of string type: "+Ae+" unsupported")}};DERNode.prototype._decodeObjid=function decodeObjid(ke,Ae,Ce){let qe;const ze=[];let Ve=0;let tt=0;while(!ke.isEmpty()){tt=ke.readUInt8();Ve<<=7;Ve|=tt&127;if((tt&128)===0){ze.push(Ve);Ve=0}}if(tt&128)ze.push(Ve);const rt=ze[0]/40|0;const it=ze[0]%40;if(Ce)qe=ze;else qe=[rt,it].concat(ze.slice(1));if(Ae){let ke=Ae[qe.join(" ")];if(ke===undefined)ke=Ae[qe.join(".")];if(ke!==undefined)qe=ke}return qe};DERNode.prototype._decodeTime=function decodeTime(ke,Ae){const Ce=ke.raw().toString();let qe;let ze;let Ve;let tt;let rt;let it;if(Ae==="gentime"){qe=Ce.slice(0,4)|0;ze=Ce.slice(4,6)|0;Ve=Ce.slice(6,8)|0;tt=Ce.slice(8,10)|0;rt=Ce.slice(10,12)|0;it=Ce.slice(12,14)|0}else if(Ae==="utctime"){qe=Ce.slice(0,2)|0;ze=Ce.slice(2,4)|0;Ve=Ce.slice(4,6)|0;tt=Ce.slice(6,8)|0;rt=Ce.slice(8,10)|0;it=Ce.slice(10,12)|0;if(qe<70)qe=2e3+qe;else qe=1900+qe}else{return ke.error("Decoding "+Ae+" time is not supported yet")}return Date.UTC(qe,ze-1,Ve,tt,rt,it,0)};DERNode.prototype._decodeNull=function decodeNull(){return null};DERNode.prototype._decodeBool=function decodeBool(ke){const Ae=ke.readUInt8();if(ke.isError(Ae))return Ae;else return Ae!==0};DERNode.prototype._decodeInt=function decodeInt(ke,Ae){const Ce=ke.raw();let qe=new ze(Ce);if(Ae)qe=Ae[qe.toString(10)]||qe;return qe};DERNode.prototype._use=function use(ke,Ae){if(typeof ke==="function")ke=ke(Ae);return ke._getDecoder("der").tree};function derDecodeTag(ke,Ae){let Ce=ke.readUInt8(Ae);if(ke.isError(Ce))return Ce;const qe=rt.tagClass[Ce>>6];const ze=(Ce&32)===0;if((Ce&31)===31){let qe=Ce;Ce=0;while((qe&128)===128){qe=ke.readUInt8(Ae);if(ke.isError(qe))return qe;Ce<<=7;Ce|=qe&127}}else{Ce&=31}const Ve=rt.tag[Ce];return{cls:qe,primitive:ze,tag:Ce,tagStr:Ve}}function derDecodeLen(ke,Ae,Ce){let qe=ke.readUInt8(Ce);if(ke.isError(qe))return qe;if(!Ae&&qe===128)return null;if((qe&128)===0){return qe}const ze=qe&127;if(ze>4)return ke.error("length octect is too long");qe=0;for(let Ae=0;Ae<ze;Ae++){qe<<=8;const Ae=ke.readUInt8(Ce);if(ke.isError(Ae))return Ae;qe|=Ae}return qe}},4952:(ke,Ae,Ce)=>{"use strict";const qe=Ae;qe.der=Ce(3332);qe.pem=Ce(8361)},8361:(ke,Ae,Ce)=>{"use strict";const qe=Ce(4124);const ze=Ce(5118).Buffer;const Ve=Ce(3332);function PEMDecoder(ke){Ve.call(this,ke);this.enc="pem"}qe(PEMDecoder,Ve);ke.exports=PEMDecoder;PEMDecoder.prototype.decode=function decode(ke,Ae){const Ce=ke.toString().split(/[\r\n]+/g);const qe=Ae.label.toUpperCase();const tt=/^-----(BEGIN|END) ([^-]+)-----$/;let rt=-1;let it=-1;for(let ke=0;ke<Ce.length;ke++){const Ae=Ce[ke].match(tt);if(Ae===null)continue;if(Ae[2]!==qe)continue;if(rt===-1){if(Ae[1]!=="BEGIN")break;rt=ke}else{if(Ae[1]!=="END")break;it=ke;break}}if(rt===-1||it===-1)throw new Error("PEM section not found for: "+qe);const nt=Ce.slice(rt+1,it).join("");nt.replace(/[^a-z0-9+/=]+/gi,"");const ot=ze.from(nt,"base64");return Ve.prototype.decode.call(this,ot,Ae)}},5769:(ke,Ae,Ce)=>{"use strict";const qe=Ce(4124);const ze=Ce(5118).Buffer;const Ve=Ce(842);const tt=Ce(1188);function DEREncoder(ke){this.enc="der";this.name=ke.name;this.entity=ke;this.tree=new DERNode;this.tree._init(ke.body)}ke.exports=DEREncoder;DEREncoder.prototype.encode=function encode(ke,Ae){return this.tree._encode(ke,Ae).join()};function DERNode(ke){Ve.call(this,"der",ke)}qe(DERNode,Ve);DERNode.prototype._encodeComposite=function encodeComposite(ke,Ae,Ce,qe){const Ve=encodeTag(ke,Ae,Ce,this.reporter);if(qe.length<128){const ke=ze.alloc(2);ke[0]=Ve;ke[1]=qe.length;return this._createEncoderBuffer([ke,qe])}let tt=1;for(let ke=qe.length;ke>=256;ke>>=8)tt++;const rt=ze.alloc(1+1+tt);rt[0]=Ve;rt[1]=128|tt;for(let ke=1+tt,Ae=qe.length;Ae>0;ke--,Ae>>=8)rt[ke]=Ae&255;return this._createEncoderBuffer([rt,qe])};DERNode.prototype._encodeStr=function encodeStr(ke,Ae){if(Ae==="bitstr"){return this._createEncoderBuffer([ke.unused|0,ke.data])}else if(Ae==="bmpstr"){const Ae=ze.alloc(ke.length*2);for(let Ce=0;Ce<ke.length;Ce++){Ae.writeUInt16BE(ke.charCodeAt(Ce),Ce*2)}return this._createEncoderBuffer(Ae)}else if(Ae==="numstr"){if(!this._isNumstr(ke)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(ke)}else if(Ae==="printstr"){if(!this._isPrintstr(ke)){return this.reporter.error("Encoding of string type: printstr supports "+"only latin upper and lower case letters, "+"digits, space, apostrophe, left and rigth "+"parenthesis, plus sign, comma, hyphen, "+"dot, slash, colon, equal sign, "+"question mark")}return this._createEncoderBuffer(ke)}else if(/str$/.test(Ae)){return this._createEncoderBuffer(ke)}else if(Ae==="objDesc"){return this._createEncoderBuffer(ke)}else{return this.reporter.error("Encoding of string type: "+Ae+" unsupported")}};DERNode.prototype._encodeObjid=function encodeObjid(ke,Ae,Ce){if(typeof ke==="string"){if(!Ae)return this.reporter.error("string objid given, but no values map found");if(!Ae.hasOwnProperty(ke))return this.reporter.error("objid not found in values map");ke=Ae[ke].split(/[\s.]+/g);for(let Ae=0;Ae<ke.length;Ae++)ke[Ae]|=0}else if(Array.isArray(ke)){ke=ke.slice();for(let Ae=0;Ae<ke.length;Ae++)ke[Ae]|=0}if(!Array.isArray(ke)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(ke))}if(!Ce){if(ke[1]>=40)return this.reporter.error("Second objid identifier OOB");ke.splice(0,2,ke[0]*40+ke[1])}let qe=0;for(let Ae=0;Ae<ke.length;Ae++){let Ce=ke[Ae];for(qe++;Ce>=128;Ce>>=7)qe++}const Ve=ze.alloc(qe);let tt=Ve.length-1;for(let Ae=ke.length-1;Ae>=0;Ae--){let Ce=ke[Ae];Ve[tt--]=Ce&127;while((Ce>>=7)>0)Ve[tt--]=128|Ce&127}return this._createEncoderBuffer(Ve)};function two(ke){if(ke<10)return"0"+ke;else return ke}DERNode.prototype._encodeTime=function encodeTime(ke,Ae){let Ce;const qe=new Date(ke);if(Ae==="gentime"){Ce=[two(qe.getUTCFullYear()),two(qe.getUTCMonth()+1),two(qe.getUTCDate()),two(qe.getUTCHours()),two(qe.getUTCMinutes()),two(qe.getUTCSeconds()),"Z"].join("")}else if(Ae==="utctime"){Ce=[two(qe.getUTCFullYear()%100),two(qe.getUTCMonth()+1),two(qe.getUTCDate()),two(qe.getUTCHours()),two(qe.getUTCMinutes()),two(qe.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+Ae+" time is not supported yet")}return this._encodeStr(Ce,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(ke,Ae){if(typeof ke==="string"){if(!Ae)return this.reporter.error("String int or enum given, but no values map");if(!Ae.hasOwnProperty(ke)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(ke))}ke=Ae[ke]}if(typeof ke!=="number"&&!ze.isBuffer(ke)){const Ae=ke.toArray();if(!ke.sign&&Ae[0]&128){Ae.unshift(0)}ke=ze.from(Ae)}if(ze.isBuffer(ke)){let Ae=ke.length;if(ke.length===0)Ae++;const Ce=ze.alloc(Ae);ke.copy(Ce);if(ke.length===0)Ce[0]=0;return this._createEncoderBuffer(Ce)}if(ke<128)return this._createEncoderBuffer(ke);if(ke<256)return this._createEncoderBuffer([0,ke]);let Ce=1;for(let Ae=ke;Ae>=256;Ae>>=8)Ce++;const qe=new Array(Ce);for(let Ae=qe.length-1;Ae>=0;Ae--){qe[Ae]=ke&255;ke>>=8}if(qe[0]&128){qe.unshift(0)}return this._createEncoderBuffer(ze.from(qe))};DERNode.prototype._encodeBool=function encodeBool(ke){return this._createEncoderBuffer(ke?255:0)};DERNode.prototype._use=function use(ke,Ae){if(typeof ke==="function")ke=ke(Ae);return ke._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(ke,Ae,Ce){const qe=this._baseState;let ze;if(qe["default"]===null)return false;const Ve=ke.join();if(qe.defaultBuffer===undefined)qe.defaultBuffer=this._encodeValue(qe["default"],Ae,Ce).join();if(Ve.length!==qe.defaultBuffer.length)return false;for(ze=0;ze<Ve.length;ze++)if(Ve[ze]!==qe.defaultBuffer[ze])return false;return true};function encodeTag(ke,Ae,Ce,qe){let ze;if(ke==="seqof")ke="seq";else if(ke==="setof")ke="set";if(tt.tagByName.hasOwnProperty(ke))ze=tt.tagByName[ke];else if(typeof ke==="number"&&(ke|0)===ke)ze=ke;else return qe.error("Unknown tag: "+ke);if(ze>=31)return qe.error("Multi-octet tag encoding unsupported");if(!Ae)ze|=32;ze|=tt.tagClassByName[Ce||"universal"]<<6;return ze}},9083:(ke,Ae,Ce)=>{"use strict";const qe=Ae;qe.der=Ce(5769);qe.pem=Ce(279)},279:(ke,Ae,Ce)=>{"use strict";const qe=Ce(4124);const ze=Ce(5769);function PEMEncoder(ke){ze.call(this,ke);this.enc="pem"}qe(PEMEncoder,ze);ke.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(ke,Ae){const Ce=ze.prototype.encode.call(this,ke);const qe=Ce.toString("base64");const Ve=["-----BEGIN "+Ae.label+"-----"];for(let ke=0;ke<qe.length;ke+=64)Ve.push(qe.slice(ke,ke+64));Ve.push("-----END "+Ae.label+"-----");return Ve.join("\n")}},6641:function(ke,Ae,Ce){ke=Ce.nmd(ke);(function(ke,Ae){"use strict";function assert(ke,Ae){if(!ke)throw new Error(Ae||"Assertion failed")}function inherits(ke,Ae){ke.super_=Ae;var TempCtor=function(){};TempCtor.prototype=Ae.prototype;ke.prototype=new TempCtor;ke.prototype.constructor=ke}function BN(ke,Ae,Ce){if(BN.isBN(ke)){return ke}this.negative=0;this.words=null;this.length=0;this.red=null;if(ke!==null){if(Ae==="le"||Ae==="be"){Ce=Ae;Ae=10}this._init(ke||0,Ae||10,Ce||"be")}}if(typeof ke==="object"){ke.exports=BN}else{Ae.BN=BN}BN.BN=BN;BN.wordSize=26;var qe;try{qe=Ce(4300).Buffer}catch(ke){}BN.isBN=function isBN(ke){if(ke instanceof BN){return true}return ke!==null&&typeof ke==="object"&&ke.constructor.wordSize===BN.wordSize&&Array.isArray(ke.words)};BN.max=function max(ke,Ae){if(ke.cmp(Ae)>0)return ke;return Ae};BN.min=function min(ke,Ae){if(ke.cmp(Ae)<0)return ke;return Ae};BN.prototype._init=function init(ke,Ae,Ce){if(typeof ke==="number"){return this._initNumber(ke,Ae,Ce)}if(typeof ke==="object"){return this._initArray(ke,Ae,Ce)}if(Ae==="hex"){Ae=16}assert(Ae===(Ae|0)&&Ae>=2&&Ae<=36);ke=ke.toString().replace(/\s+/g,"");var qe=0;if(ke[0]==="-"){qe++}if(Ae===16){this._parseHex(ke,qe)}else{this._parseBase(ke,Ae,qe)}if(ke[0]==="-"){this.negative=1}this.strip();if(Ce!=="le")return;this._initArray(this.toArray(),Ae,Ce)};BN.prototype._initNumber=function _initNumber(ke,Ae,Ce){if(ke<0){this.negative=1;ke=-ke}if(ke<67108864){this.words=[ke&67108863];this.length=1}else if(ke<4503599627370496){this.words=[ke&67108863,ke/67108864&67108863];this.length=2}else{assert(ke<9007199254740992);this.words=[ke&67108863,ke/67108864&67108863,1];this.length=3}if(Ce!=="le")return;this._initArray(this.toArray(),Ae,Ce)};BN.prototype._initArray=function _initArray(ke,Ae,Ce){assert(typeof ke.length==="number");if(ke.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(ke.length/3);this.words=new Array(this.length);for(var qe=0;qe<this.length;qe++){this.words[qe]=0}var ze,Ve;var tt=0;if(Ce==="be"){for(qe=ke.length-1,ze=0;qe>=0;qe-=3){Ve=ke[qe]|ke[qe-1]<<8|ke[qe-2]<<16;this.words[ze]|=Ve<<tt&67108863;this.words[ze+1]=Ve>>>26-tt&67108863;tt+=24;if(tt>=26){tt-=26;ze++}}}else if(Ce==="le"){for(qe=0,ze=0;qe<ke.length;qe+=3){Ve=ke[qe]|ke[qe+1]<<8|ke[qe+2]<<16;this.words[ze]|=Ve<<tt&67108863;this.words[ze+1]=Ve>>>26-tt&67108863;tt+=24;if(tt>=26){tt-=26;ze++}}}return this.strip()};function parseHex(ke,Ae,Ce){var qe=0;var ze=Math.min(ke.length,Ce);for(var Ve=Ae;Ve<ze;Ve++){var tt=ke.charCodeAt(Ve)-48;qe<<=4;if(tt>=49&&tt<=54){qe|=tt-49+10}else if(tt>=17&&tt<=22){qe|=tt-17+10}else{qe|=tt&15}}return qe}BN.prototype._parseHex=function _parseHex(ke,Ae){this.length=Math.ceil((ke.length-Ae)/6);this.words=new Array(this.length);for(var Ce=0;Ce<this.length;Ce++){this.words[Ce]=0}var qe,ze;var Ve=0;for(Ce=ke.length-6,qe=0;Ce>=Ae;Ce-=6){ze=parseHex(ke,Ce,Ce+6);this.words[qe]|=ze<<Ve&67108863;this.words[qe+1]|=ze>>>26-Ve&4194303;Ve+=24;if(Ve>=26){Ve-=26;qe++}}if(Ce+6!==Ae){ze=parseHex(ke,Ae,Ce+6);this.words[qe]|=ze<<Ve&67108863;this.words[qe+1]|=ze>>>26-Ve&4194303}this.strip()};function parseBase(ke,Ae,Ce,qe){var ze=0;var Ve=Math.min(ke.length,Ce);for(var tt=Ae;tt<Ve;tt++){var rt=ke.charCodeAt(tt)-48;ze*=qe;if(rt>=49){ze+=rt-49+10}else if(rt>=17){ze+=rt-17+10}else{ze+=rt}}return ze}BN.prototype._parseBase=function _parseBase(ke,Ae,Ce){this.words=[0];this.length=1;for(var qe=0,ze=1;ze<=67108863;ze*=Ae){qe++}qe--;ze=ze/Ae|0;var Ve=ke.length-Ce;var tt=Ve%qe;var rt=Math.min(Ve,Ve-tt)+Ce;var it=0;for(var nt=Ce;nt<rt;nt+=qe){it=parseBase(ke,nt,nt+qe,Ae);this.imuln(ze);if(this.words[0]+it<67108864){this.words[0]+=it}else{this._iaddn(it)}}if(tt!==0){var ot=1;it=parseBase(ke,nt,ke.length,Ae);for(nt=0;nt<tt;nt++){ot*=Ae}this.imuln(ot);if(this.words[0]+it<67108864){this.words[0]+=it}else{this._iaddn(it)}}};BN.prototype.copy=function copy(ke){ke.words=new Array(this.length);for(var Ae=0;Ae<this.length;Ae++){ke.words[Ae]=this.words[Ae]}ke.length=this.length;ke.negative=this.negative;ke.red=this.red};BN.prototype.clone=function clone(){var ke=new BN(null);this.copy(ke);return ke};BN.prototype._expand=function _expand(ke){while(this.length<ke){this.words[this.length++]=0}return this};BN.prototype.strip=function strip(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var ze=["","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"];var Ve=[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];var tt=[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];BN.prototype.toString=function toString(ke,Ae){ke=ke||10;Ae=Ae|0||1;var Ce;if(ke===16||ke==="hex"){Ce="";var qe=0;var rt=0;for(var it=0;it<this.length;it++){var nt=this.words[it];var ot=((nt<<qe|rt)&16777215).toString(16);rt=nt>>>24-qe&16777215;if(rt!==0||it!==this.length-1){Ce=ze[6-ot.length]+ot+Ce}else{Ce=ot+Ce}qe+=2;if(qe>=26){qe-=26;it--}}if(rt!==0){Ce=rt.toString(16)+Ce}while(Ce.length%Ae!==0){Ce="0"+Ce}if(this.negative!==0){Ce="-"+Ce}return Ce}if(ke===(ke|0)&&ke>=2&&ke<=36){var ct=Ve[ke];var ht=tt[ke];Ce="";var ft=this.clone();ft.negative=0;while(!ft.isZero()){var yt=ft.modn(ht).toString(ke);ft=ft.idivn(ht);if(!ft.isZero()){Ce=ze[ct-yt.length]+yt+Ce}else{Ce=yt+Ce}}if(this.isZero()){Ce="0"+Ce}while(Ce.length%Ae!==0){Ce="0"+Ce}if(this.negative!==0){Ce="-"+Ce}return Ce}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ke=this.words[0];if(this.length===2){ke+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ke+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ke:ke};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(ke,Ae){assert(typeof qe!=="undefined");return this.toArrayLike(qe,ke,Ae)};BN.prototype.toArray=function toArray(ke,Ae){return this.toArrayLike(Array,ke,Ae)};BN.prototype.toArrayLike=function toArrayLike(ke,Ae,Ce){var qe=this.byteLength();var ze=Ce||Math.max(1,qe);assert(qe<=ze,"byte array longer than desired length");assert(ze>0,"Requested array length <= 0");this.strip();var Ve=Ae==="le";var tt=new ke(ze);var rt,it;var nt=this.clone();if(!Ve){for(it=0;it<ze-qe;it++){tt[it]=0}for(it=0;!nt.isZero();it++){rt=nt.andln(255);nt.iushrn(8);tt[ze-it-1]=rt}}else{for(it=0;!nt.isZero();it++){rt=nt.andln(255);nt.iushrn(8);tt[it]=rt}for(;it<ze;it++){tt[it]=0}}return tt};if(Math.clz32){BN.prototype._countBits=function _countBits(ke){return 32-Math.clz32(ke)}}else{BN.prototype._countBits=function _countBits(ke){var Ae=ke;var Ce=0;if(Ae>=4096){Ce+=13;Ae>>>=13}if(Ae>=64){Ce+=7;Ae>>>=7}if(Ae>=8){Ce+=4;Ae>>>=4}if(Ae>=2){Ce+=2;Ae>>>=2}return Ce+Ae}}BN.prototype._zeroBits=function _zeroBits(ke){if(ke===0)return 26;var Ae=ke;var Ce=0;if((Ae&8191)===0){Ce+=13;Ae>>>=13}if((Ae&127)===0){Ce+=7;Ae>>>=7}if((Ae&15)===0){Ce+=4;Ae>>>=4}if((Ae&3)===0){Ce+=2;Ae>>>=2}if((Ae&1)===0){Ce++}return Ce};BN.prototype.bitLength=function bitLength(){var ke=this.words[this.length-1];var Ae=this._countBits(ke);return(this.length-1)*26+Ae};function toBitArray(ke){var Ae=new Array(ke.bitLength());for(var Ce=0;Ce<Ae.length;Ce++){var qe=Ce/26|0;var ze=Ce%26;Ae[Ce]=(ke.words[qe]&1<<ze)>>>ze}return Ae}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var ke=0;for(var Ae=0;Ae<this.length;Ae++){var Ce=this._zeroBits(this.words[Ae]);ke+=Ce;if(Ce!==26)break}return ke};BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)};BN.prototype.toTwos=function toTwos(ke){if(this.negative!==0){return this.abs().inotn(ke).iaddn(1)}return this.clone()};BN.prototype.fromTwos=function fromTwos(ke){if(this.testn(ke-1)){return this.notn(ke).iaddn(1).ineg()}return this.clone()};BN.prototype.isNeg=function isNeg(){return this.negative!==0};BN.prototype.neg=function neg(){return this.clone().ineg()};BN.prototype.ineg=function ineg(){if(!this.isZero()){this.negative^=1}return this};BN.prototype.iuor=function iuor(ke){while(this.length<ke.length){this.words[this.length++]=0}for(var Ae=0;Ae<ke.length;Ae++){this.words[Ae]=this.words[Ae]|ke.words[Ae]}return this.strip()};BN.prototype.ior=function ior(ke){assert((this.negative|ke.negative)===0);return this.iuor(ke)};BN.prototype.or=function or(ke){if(this.length>ke.length)return this.clone().ior(ke);return ke.clone().ior(this)};BN.prototype.uor=function uor(ke){if(this.length>ke.length)return this.clone().iuor(ke);return ke.clone().iuor(this)};BN.prototype.iuand=function iuand(ke){var Ae;if(this.length>ke.length){Ae=ke}else{Ae=this}for(var Ce=0;Ce<Ae.length;Ce++){this.words[Ce]=this.words[Ce]&ke.words[Ce]}this.length=Ae.length;return this.strip()};BN.prototype.iand=function iand(ke){assert((this.negative|ke.negative)===0);return this.iuand(ke)};BN.prototype.and=function and(ke){if(this.length>ke.length)return this.clone().iand(ke);return ke.clone().iand(this)};BN.prototype.uand=function uand(ke){if(this.length>ke.length)return this.clone().iuand(ke);return ke.clone().iuand(this)};BN.prototype.iuxor=function iuxor(ke){var Ae;var Ce;if(this.length>ke.length){Ae=this;Ce=ke}else{Ae=ke;Ce=this}for(var qe=0;qe<Ce.length;qe++){this.words[qe]=Ae.words[qe]^Ce.words[qe]}if(this!==Ae){for(;qe<Ae.length;qe++){this.words[qe]=Ae.words[qe]}}this.length=Ae.length;return this.strip()};BN.prototype.ixor=function ixor(ke){assert((this.negative|ke.negative)===0);return this.iuxor(ke)};BN.prototype.xor=function xor(ke){if(this.length>ke.length)return this.clone().ixor(ke);return ke.clone().ixor(this)};BN.prototype.uxor=function uxor(ke){if(this.length>ke.length)return this.clone().iuxor(ke);return ke.clone().iuxor(this)};BN.prototype.inotn=function inotn(ke){assert(typeof ke==="number"&&ke>=0);var Ae=Math.ceil(ke/26)|0;var Ce=ke%26;this._expand(Ae);if(Ce>0){Ae--}for(var qe=0;qe<Ae;qe++){this.words[qe]=~this.words[qe]&67108863}if(Ce>0){this.words[qe]=~this.words[qe]&67108863>>26-Ce}return this.strip()};BN.prototype.notn=function notn(ke){return this.clone().inotn(ke)};BN.prototype.setn=function setn(ke,Ae){assert(typeof ke==="number"&&ke>=0);var Ce=ke/26|0;var qe=ke%26;this._expand(Ce+1);if(Ae){this.words[Ce]=this.words[Ce]|1<<qe}else{this.words[Ce]=this.words[Ce]&~(1<<qe)}return this.strip()};BN.prototype.iadd=function iadd(ke){var Ae;if(this.negative!==0&&ke.negative===0){this.negative=0;Ae=this.isub(ke);this.negative^=1;return this._normSign()}else if(this.negative===0&&ke.negative!==0){ke.negative=0;Ae=this.isub(ke);ke.negative=1;return Ae._normSign()}var Ce,qe;if(this.length>ke.length){Ce=this;qe=ke}else{Ce=ke;qe=this}var ze=0;for(var Ve=0;Ve<qe.length;Ve++){Ae=(Ce.words[Ve]|0)+(qe.words[Ve]|0)+ze;this.words[Ve]=Ae&67108863;ze=Ae>>>26}for(;ze!==0&&Ve<Ce.length;Ve++){Ae=(Ce.words[Ve]|0)+ze;this.words[Ve]=Ae&67108863;ze=Ae>>>26}this.length=Ce.length;if(ze!==0){this.words[this.length]=ze;this.length++}else if(Ce!==this){for(;Ve<Ce.length;Ve++){this.words[Ve]=Ce.words[Ve]}}return this};BN.prototype.add=function add(ke){var Ae;if(ke.negative!==0&&this.negative===0){ke.negative=0;Ae=this.sub(ke);ke.negative^=1;return Ae}else if(ke.negative===0&&this.negative!==0){this.negative=0;Ae=ke.sub(this);this.negative=1;return Ae}if(this.length>ke.length)return this.clone().iadd(ke);return ke.clone().iadd(this)};BN.prototype.isub=function isub(ke){if(ke.negative!==0){ke.negative=0;var Ae=this.iadd(ke);ke.negative=1;return Ae._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(ke);this.negative=1;return this._normSign()}var Ce=this.cmp(ke);if(Ce===0){this.negative=0;this.length=1;this.words[0]=0;return this}var qe,ze;if(Ce>0){qe=this;ze=ke}else{qe=ke;ze=this}var Ve=0;for(var tt=0;tt<ze.length;tt++){Ae=(qe.words[tt]|0)-(ze.words[tt]|0)+Ve;Ve=Ae>>26;this.words[tt]=Ae&67108863}for(;Ve!==0&&tt<qe.length;tt++){Ae=(qe.words[tt]|0)+Ve;Ve=Ae>>26;this.words[tt]=Ae&67108863}if(Ve===0&&tt<qe.length&&qe!==this){for(;tt<qe.length;tt++){this.words[tt]=qe.words[tt]}}this.length=Math.max(this.length,tt);if(qe!==this){this.negative=1}return this.strip()};BN.prototype.sub=function sub(ke){return this.clone().isub(ke)};function smallMulTo(ke,Ae,Ce){Ce.negative=Ae.negative^ke.negative;var qe=ke.length+Ae.length|0;Ce.length=qe;qe=qe-1|0;var ze=ke.words[0]|0;var Ve=Ae.words[0]|0;var tt=ze*Ve;var rt=tt&67108863;var it=tt/67108864|0;Ce.words[0]=rt;for(var nt=1;nt<qe;nt++){var ot=it>>>26;var ct=it&67108863;var ht=Math.min(nt,Ae.length-1);for(var ft=Math.max(0,nt-ke.length+1);ft<=ht;ft++){var yt=nt-ft|0;ze=ke.words[yt]|0;Ve=Ae.words[ft]|0;tt=ze*Ve+ct;ot+=tt/67108864|0;ct=tt&67108863}Ce.words[nt]=ct|0;it=ot|0}if(it!==0){Ce.words[nt]=it|0}else{Ce.length--}return Ce.strip()}var rt=function comb10MulTo(ke,Ae,Ce){var qe=ke.words;var ze=Ae.words;var Ve=Ce.words;var tt=0;var rt;var it;var nt;var ot=qe[0]|0;var ct=ot&8191;var ht=ot>>>13;var ft=qe[1]|0;var yt=ft&8191;var mt=ft>>>13;var kt=qe[2]|0;var St=kt&8191;var Et=kt>>>13;var Pt=qe[3]|0;var Dt=Pt&8191;var Rt=Pt>>>13;var Bt=qe[4]|0;var Tt=Bt&8191;var Ut=Bt>>>13;var Kt=qe[5]|0;var It=Kt&8191;var Ot=Kt>>>13;var Nt=qe[6]|0;var qt=Nt&8191;var zt=Nt>>>13;var Ft=qe[7]|0;var Lt=Ft&8191;var Ht=Ft>>>13;var Gt=qe[8]|0;var $t=Gt&8191;var Vt=Gt>>>13;var Zt=qe[9]|0;var Yt=Zt&8191;var Jt=Zt>>>13;var Xt=ze[0]|0;var Qt=Xt&8191;var er=Xt>>>13;var tr=ze[1]|0;var rr=tr&8191;var ir=tr>>>13;var nr=ze[2]|0;var sr=nr&8191;var vr=nr>>>13;var _r=ze[3]|0;var kr=_r&8191;var Ar=_r>>>13;var Sr=ze[4]|0;var Er=Sr&8191;var xr=Sr>>>13;var Dr=ze[5]|0;var Rr=Dr&8191;var Br=Dr>>>13;var Ur=ze[6]|0;var Ir=Ur&8191;var Lr=Ur>>>13;var Gr=ze[7]|0;var $r=Gr&8191;var Vr=Gr>>>13;var Jr=ze[8]|0;var Qr=Jr&8191;var ti=Jr>>>13;var ri=ze[9]|0;var si=ri&8191;var ai=ri>>>13;Ce.negative=ke.negative^Ae.negative;Ce.length=19;rt=Math.imul(ct,Qt);it=Math.imul(ct,er);it=it+Math.imul(ht,Qt)|0;nt=Math.imul(ht,er);var ui=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(ui>>>26)|0;ui&=67108863;rt=Math.imul(yt,Qt);it=Math.imul(yt,er);it=it+Math.imul(mt,Qt)|0;nt=Math.imul(mt,er);rt=rt+Math.imul(ct,rr)|0;it=it+Math.imul(ct,ir)|0;it=it+Math.imul(ht,rr)|0;nt=nt+Math.imul(ht,ir)|0;var hi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(hi>>>26)|0;hi&=67108863;rt=Math.imul(St,Qt);it=Math.imul(St,er);it=it+Math.imul(Et,Qt)|0;nt=Math.imul(Et,er);rt=rt+Math.imul(yt,rr)|0;it=it+Math.imul(yt,ir)|0;it=it+Math.imul(mt,rr)|0;nt=nt+Math.imul(mt,ir)|0;rt=rt+Math.imul(ct,sr)|0;it=it+Math.imul(ct,vr)|0;it=it+Math.imul(ht,sr)|0;nt=nt+Math.imul(ht,vr)|0;var pi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(pi>>>26)|0;pi&=67108863;rt=Math.imul(Dt,Qt);it=Math.imul(Dt,er);it=it+Math.imul(Rt,Qt)|0;nt=Math.imul(Rt,er);rt=rt+Math.imul(St,rr)|0;it=it+Math.imul(St,ir)|0;it=it+Math.imul(Et,rr)|0;nt=nt+Math.imul(Et,ir)|0;rt=rt+Math.imul(yt,sr)|0;it=it+Math.imul(yt,vr)|0;it=it+Math.imul(mt,sr)|0;nt=nt+Math.imul(mt,vr)|0;rt=rt+Math.imul(ct,kr)|0;it=it+Math.imul(ct,Ar)|0;it=it+Math.imul(ht,kr)|0;nt=nt+Math.imul(ht,Ar)|0;var yi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(yi>>>26)|0;yi&=67108863;rt=Math.imul(Tt,Qt);it=Math.imul(Tt,er);it=it+Math.imul(Ut,Qt)|0;nt=Math.imul(Ut,er);rt=rt+Math.imul(Dt,rr)|0;it=it+Math.imul(Dt,ir)|0;it=it+Math.imul(Rt,rr)|0;nt=nt+Math.imul(Rt,ir)|0;rt=rt+Math.imul(St,sr)|0;it=it+Math.imul(St,vr)|0;it=it+Math.imul(Et,sr)|0;nt=nt+Math.imul(Et,vr)|0;rt=rt+Math.imul(yt,kr)|0;it=it+Math.imul(yt,Ar)|0;it=it+Math.imul(mt,kr)|0;nt=nt+Math.imul(mt,Ar)|0;rt=rt+Math.imul(ct,Er)|0;it=it+Math.imul(ct,xr)|0;it=it+Math.imul(ht,Er)|0;nt=nt+Math.imul(ht,xr)|0;var mi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(mi>>>26)|0;mi&=67108863;rt=Math.imul(It,Qt);it=Math.imul(It,er);it=it+Math.imul(Ot,Qt)|0;nt=Math.imul(Ot,er);rt=rt+Math.imul(Tt,rr)|0;it=it+Math.imul(Tt,ir)|0;it=it+Math.imul(Ut,rr)|0;nt=nt+Math.imul(Ut,ir)|0;rt=rt+Math.imul(Dt,sr)|0;it=it+Math.imul(Dt,vr)|0;it=it+Math.imul(Rt,sr)|0;nt=nt+Math.imul(Rt,vr)|0;rt=rt+Math.imul(St,kr)|0;it=it+Math.imul(St,Ar)|0;it=it+Math.imul(Et,kr)|0;nt=nt+Math.imul(Et,Ar)|0;rt=rt+Math.imul(yt,Er)|0;it=it+Math.imul(yt,xr)|0;it=it+Math.imul(mt,Er)|0;nt=nt+Math.imul(mt,xr)|0;rt=rt+Math.imul(ct,Rr)|0;it=it+Math.imul(ct,Br)|0;it=it+Math.imul(ht,Rr)|0;nt=nt+Math.imul(ht,Br)|0;var gi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(gi>>>26)|0;gi&=67108863;rt=Math.imul(qt,Qt);it=Math.imul(qt,er);it=it+Math.imul(zt,Qt)|0;nt=Math.imul(zt,er);rt=rt+Math.imul(It,rr)|0;it=it+Math.imul(It,ir)|0;it=it+Math.imul(Ot,rr)|0;nt=nt+Math.imul(Ot,ir)|0;rt=rt+Math.imul(Tt,sr)|0;it=it+Math.imul(Tt,vr)|0;it=it+Math.imul(Ut,sr)|0;nt=nt+Math.imul(Ut,vr)|0;rt=rt+Math.imul(Dt,kr)|0;it=it+Math.imul(Dt,Ar)|0;it=it+Math.imul(Rt,kr)|0;nt=nt+Math.imul(Rt,Ar)|0;rt=rt+Math.imul(St,Er)|0;it=it+Math.imul(St,xr)|0;it=it+Math.imul(Et,Er)|0;nt=nt+Math.imul(Et,xr)|0;rt=rt+Math.imul(yt,Rr)|0;it=it+Math.imul(yt,Br)|0;it=it+Math.imul(mt,Rr)|0;nt=nt+Math.imul(mt,Br)|0;rt=rt+Math.imul(ct,Ir)|0;it=it+Math.imul(ct,Lr)|0;it=it+Math.imul(ht,Ir)|0;nt=nt+Math.imul(ht,Lr)|0;var bi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(bi>>>26)|0;bi&=67108863;rt=Math.imul(Lt,Qt);it=Math.imul(Lt,er);it=it+Math.imul(Ht,Qt)|0;nt=Math.imul(Ht,er);rt=rt+Math.imul(qt,rr)|0;it=it+Math.imul(qt,ir)|0;it=it+Math.imul(zt,rr)|0;nt=nt+Math.imul(zt,ir)|0;rt=rt+Math.imul(It,sr)|0;it=it+Math.imul(It,vr)|0;it=it+Math.imul(Ot,sr)|0;nt=nt+Math.imul(Ot,vr)|0;rt=rt+Math.imul(Tt,kr)|0;it=it+Math.imul(Tt,Ar)|0;it=it+Math.imul(Ut,kr)|0;nt=nt+Math.imul(Ut,Ar)|0;rt=rt+Math.imul(Dt,Er)|0;it=it+Math.imul(Dt,xr)|0;it=it+Math.imul(Rt,Er)|0;nt=nt+Math.imul(Rt,xr)|0;rt=rt+Math.imul(St,Rr)|0;it=it+Math.imul(St,Br)|0;it=it+Math.imul(Et,Rr)|0;nt=nt+Math.imul(Et,Br)|0;rt=rt+Math.imul(yt,Ir)|0;it=it+Math.imul(yt,Lr)|0;it=it+Math.imul(mt,Ir)|0;nt=nt+Math.imul(mt,Lr)|0;rt=rt+Math.imul(ct,$r)|0;it=it+Math.imul(ct,Vr)|0;it=it+Math.imul(ht,$r)|0;nt=nt+Math.imul(ht,Vr)|0;var vi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(vi>>>26)|0;vi&=67108863;rt=Math.imul($t,Qt);it=Math.imul($t,er);it=it+Math.imul(Vt,Qt)|0;nt=Math.imul(Vt,er);rt=rt+Math.imul(Lt,rr)|0;it=it+Math.imul(Lt,ir)|0;it=it+Math.imul(Ht,rr)|0;nt=nt+Math.imul(Ht,ir)|0;rt=rt+Math.imul(qt,sr)|0;it=it+Math.imul(qt,vr)|0;it=it+Math.imul(zt,sr)|0;nt=nt+Math.imul(zt,vr)|0;rt=rt+Math.imul(It,kr)|0;it=it+Math.imul(It,Ar)|0;it=it+Math.imul(Ot,kr)|0;nt=nt+Math.imul(Ot,Ar)|0;rt=rt+Math.imul(Tt,Er)|0;it=it+Math.imul(Tt,xr)|0;it=it+Math.imul(Ut,Er)|0;nt=nt+Math.imul(Ut,xr)|0;rt=rt+Math.imul(Dt,Rr)|0;it=it+Math.imul(Dt,Br)|0;it=it+Math.imul(Rt,Rr)|0;nt=nt+Math.imul(Rt,Br)|0;rt=rt+Math.imul(St,Ir)|0;it=it+Math.imul(St,Lr)|0;it=it+Math.imul(Et,Ir)|0;nt=nt+Math.imul(Et,Lr)|0;rt=rt+Math.imul(yt,$r)|0;it=it+Math.imul(yt,Vr)|0;it=it+Math.imul(mt,$r)|0;nt=nt+Math.imul(mt,Vr)|0;rt=rt+Math.imul(ct,Qr)|0;it=it+Math.imul(ct,ti)|0;it=it+Math.imul(ht,Qr)|0;nt=nt+Math.imul(ht,ti)|0;var wi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(wi>>>26)|0;wi&=67108863;rt=Math.imul(Yt,Qt);it=Math.imul(Yt,er);it=it+Math.imul(Jt,Qt)|0;nt=Math.imul(Jt,er);rt=rt+Math.imul($t,rr)|0;it=it+Math.imul($t,ir)|0;it=it+Math.imul(Vt,rr)|0;nt=nt+Math.imul(Vt,ir)|0;rt=rt+Math.imul(Lt,sr)|0;it=it+Math.imul(Lt,vr)|0;it=it+Math.imul(Ht,sr)|0;nt=nt+Math.imul(Ht,vr)|0;rt=rt+Math.imul(qt,kr)|0;it=it+Math.imul(qt,Ar)|0;it=it+Math.imul(zt,kr)|0;nt=nt+Math.imul(zt,Ar)|0;rt=rt+Math.imul(It,Er)|0;it=it+Math.imul(It,xr)|0;it=it+Math.imul(Ot,Er)|0;nt=nt+Math.imul(Ot,xr)|0;rt=rt+Math.imul(Tt,Rr)|0;it=it+Math.imul(Tt,Br)|0;it=it+Math.imul(Ut,Rr)|0;nt=nt+Math.imul(Ut,Br)|0;rt=rt+Math.imul(Dt,Ir)|0;it=it+Math.imul(Dt,Lr)|0;it=it+Math.imul(Rt,Ir)|0;nt=nt+Math.imul(Rt,Lr)|0;rt=rt+Math.imul(St,$r)|0;it=it+Math.imul(St,Vr)|0;it=it+Math.imul(Et,$r)|0;nt=nt+Math.imul(Et,Vr)|0;rt=rt+Math.imul(yt,Qr)|0;it=it+Math.imul(yt,ti)|0;it=it+Math.imul(mt,Qr)|0;nt=nt+Math.imul(mt,ti)|0;rt=rt+Math.imul(ct,si)|0;it=it+Math.imul(ct,ai)|0;it=it+Math.imul(ht,si)|0;nt=nt+Math.imul(ht,ai)|0;var _i=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(_i>>>26)|0;_i&=67108863;rt=Math.imul(Yt,rr);it=Math.imul(Yt,ir);it=it+Math.imul(Jt,rr)|0;nt=Math.imul(Jt,ir);rt=rt+Math.imul($t,sr)|0;it=it+Math.imul($t,vr)|0;it=it+Math.imul(Vt,sr)|0;nt=nt+Math.imul(Vt,vr)|0;rt=rt+Math.imul(Lt,kr)|0;it=it+Math.imul(Lt,Ar)|0;it=it+Math.imul(Ht,kr)|0;nt=nt+Math.imul(Ht,Ar)|0;rt=rt+Math.imul(qt,Er)|0;it=it+Math.imul(qt,xr)|0;it=it+Math.imul(zt,Er)|0;nt=nt+Math.imul(zt,xr)|0;rt=rt+Math.imul(It,Rr)|0;it=it+Math.imul(It,Br)|0;it=it+Math.imul(Ot,Rr)|0;nt=nt+Math.imul(Ot,Br)|0;rt=rt+Math.imul(Tt,Ir)|0;it=it+Math.imul(Tt,Lr)|0;it=it+Math.imul(Ut,Ir)|0;nt=nt+Math.imul(Ut,Lr)|0;rt=rt+Math.imul(Dt,$r)|0;it=it+Math.imul(Dt,Vr)|0;it=it+Math.imul(Rt,$r)|0;nt=nt+Math.imul(Rt,Vr)|0;rt=rt+Math.imul(St,Qr)|0;it=it+Math.imul(St,ti)|0;it=it+Math.imul(Et,Qr)|0;nt=nt+Math.imul(Et,ti)|0;rt=rt+Math.imul(yt,si)|0;it=it+Math.imul(yt,ai)|0;it=it+Math.imul(mt,si)|0;nt=nt+Math.imul(mt,ai)|0;var Bi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Bi>>>26)|0;Bi&=67108863;rt=Math.imul(Yt,sr);it=Math.imul(Yt,vr);it=it+Math.imul(Jt,sr)|0;nt=Math.imul(Jt,vr);rt=rt+Math.imul($t,kr)|0;it=it+Math.imul($t,Ar)|0;it=it+Math.imul(Vt,kr)|0;nt=nt+Math.imul(Vt,Ar)|0;rt=rt+Math.imul(Lt,Er)|0;it=it+Math.imul(Lt,xr)|0;it=it+Math.imul(Ht,Er)|0;nt=nt+Math.imul(Ht,xr)|0;rt=rt+Math.imul(qt,Rr)|0;it=it+Math.imul(qt,Br)|0;it=it+Math.imul(zt,Rr)|0;nt=nt+Math.imul(zt,Br)|0;rt=rt+Math.imul(It,Ir)|0;it=it+Math.imul(It,Lr)|0;it=it+Math.imul(Ot,Ir)|0;nt=nt+Math.imul(Ot,Lr)|0;rt=rt+Math.imul(Tt,$r)|0;it=it+Math.imul(Tt,Vr)|0;it=it+Math.imul(Ut,$r)|0;nt=nt+Math.imul(Ut,Vr)|0;rt=rt+Math.imul(Dt,Qr)|0;it=it+Math.imul(Dt,ti)|0;it=it+Math.imul(Rt,Qr)|0;nt=nt+Math.imul(Rt,ti)|0;rt=rt+Math.imul(St,si)|0;it=it+Math.imul(St,ai)|0;it=it+Math.imul(Et,si)|0;nt=nt+Math.imul(Et,ai)|0;var Ti=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ti>>>26)|0;Ti&=67108863;rt=Math.imul(Yt,kr);it=Math.imul(Yt,Ar);it=it+Math.imul(Jt,kr)|0;nt=Math.imul(Jt,Ar);rt=rt+Math.imul($t,Er)|0;it=it+Math.imul($t,xr)|0;it=it+Math.imul(Vt,Er)|0;nt=nt+Math.imul(Vt,xr)|0;rt=rt+Math.imul(Lt,Rr)|0;it=it+Math.imul(Lt,Br)|0;it=it+Math.imul(Ht,Rr)|0;nt=nt+Math.imul(Ht,Br)|0;rt=rt+Math.imul(qt,Ir)|0;it=it+Math.imul(qt,Lr)|0;it=it+Math.imul(zt,Ir)|0;nt=nt+Math.imul(zt,Lr)|0;rt=rt+Math.imul(It,$r)|0;it=it+Math.imul(It,Vr)|0;it=it+Math.imul(Ot,$r)|0;nt=nt+Math.imul(Ot,Vr)|0;rt=rt+Math.imul(Tt,Qr)|0;it=it+Math.imul(Tt,ti)|0;it=it+Math.imul(Ut,Qr)|0;nt=nt+Math.imul(Ut,ti)|0;rt=rt+Math.imul(Dt,si)|0;it=it+Math.imul(Dt,ai)|0;it=it+Math.imul(Rt,si)|0;nt=nt+Math.imul(Rt,ai)|0;var Oi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Oi>>>26)|0;Oi&=67108863;rt=Math.imul(Yt,Er);it=Math.imul(Yt,xr);it=it+Math.imul(Jt,Er)|0;nt=Math.imul(Jt,xr);rt=rt+Math.imul($t,Rr)|0;it=it+Math.imul($t,Br)|0;it=it+Math.imul(Vt,Rr)|0;nt=nt+Math.imul(Vt,Br)|0;rt=rt+Math.imul(Lt,Ir)|0;it=it+Math.imul(Lt,Lr)|0;it=it+Math.imul(Ht,Ir)|0;nt=nt+Math.imul(Ht,Lr)|0;rt=rt+Math.imul(qt,$r)|0;it=it+Math.imul(qt,Vr)|0;it=it+Math.imul(zt,$r)|0;nt=nt+Math.imul(zt,Vr)|0;rt=rt+Math.imul(It,Qr)|0;it=it+Math.imul(It,ti)|0;it=it+Math.imul(Ot,Qr)|0;nt=nt+Math.imul(Ot,ti)|0;rt=rt+Math.imul(Tt,si)|0;it=it+Math.imul(Tt,ai)|0;it=it+Math.imul(Ut,si)|0;nt=nt+Math.imul(Ut,ai)|0;var qi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(qi>>>26)|0;qi&=67108863;rt=Math.imul(Yt,Rr);it=Math.imul(Yt,Br);it=it+Math.imul(Jt,Rr)|0;nt=Math.imul(Jt,Br);rt=rt+Math.imul($t,Ir)|0;it=it+Math.imul($t,Lr)|0;it=it+Math.imul(Vt,Ir)|0;nt=nt+Math.imul(Vt,Lr)|0;rt=rt+Math.imul(Lt,$r)|0;it=it+Math.imul(Lt,Vr)|0;it=it+Math.imul(Ht,$r)|0;nt=nt+Math.imul(Ht,Vr)|0;rt=rt+Math.imul(qt,Qr)|0;it=it+Math.imul(qt,ti)|0;it=it+Math.imul(zt,Qr)|0;nt=nt+Math.imul(zt,ti)|0;rt=rt+Math.imul(It,si)|0;it=it+Math.imul(It,ai)|0;it=it+Math.imul(Ot,si)|0;nt=nt+Math.imul(Ot,ai)|0;var zi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(zi>>>26)|0;zi&=67108863;rt=Math.imul(Yt,Ir);it=Math.imul(Yt,Lr);it=it+Math.imul(Jt,Ir)|0;nt=Math.imul(Jt,Lr);rt=rt+Math.imul($t,$r)|0;it=it+Math.imul($t,Vr)|0;it=it+Math.imul(Vt,$r)|0;nt=nt+Math.imul(Vt,Vr)|0;rt=rt+Math.imul(Lt,Qr)|0;it=it+Math.imul(Lt,ti)|0;it=it+Math.imul(Ht,Qr)|0;nt=nt+Math.imul(Ht,ti)|0;rt=rt+Math.imul(qt,si)|0;it=it+Math.imul(qt,ai)|0;it=it+Math.imul(zt,si)|0;nt=nt+Math.imul(zt,ai)|0;var Fi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Fi>>>26)|0;Fi&=67108863;rt=Math.imul(Yt,$r);it=Math.imul(Yt,Vr);it=it+Math.imul(Jt,$r)|0;nt=Math.imul(Jt,Vr);rt=rt+Math.imul($t,Qr)|0;it=it+Math.imul($t,ti)|0;it=it+Math.imul(Vt,Qr)|0;nt=nt+Math.imul(Vt,ti)|0;rt=rt+Math.imul(Lt,si)|0;it=it+Math.imul(Lt,ai)|0;it=it+Math.imul(Ht,si)|0;nt=nt+Math.imul(Ht,ai)|0;var Gi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Gi>>>26)|0;Gi&=67108863;rt=Math.imul(Yt,Qr);it=Math.imul(Yt,ti);it=it+Math.imul(Jt,Qr)|0;nt=Math.imul(Jt,ti);rt=rt+Math.imul($t,si)|0;it=it+Math.imul($t,ai)|0;it=it+Math.imul(Vt,si)|0;nt=nt+Math.imul(Vt,ai)|0;var Vi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Vi>>>26)|0;Vi&=67108863;rt=Math.imul(Yt,si);it=Math.imul(Yt,ai);it=it+Math.imul(Jt,si)|0;nt=Math.imul(Jt,ai);var Yi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Yi>>>26)|0;Yi&=67108863;Ve[0]=ui;Ve[1]=hi;Ve[2]=pi;Ve[3]=yi;Ve[4]=mi;Ve[5]=gi;Ve[6]=bi;Ve[7]=vi;Ve[8]=wi;Ve[9]=_i;Ve[10]=Bi;Ve[11]=Ti;Ve[12]=Oi;Ve[13]=qi;Ve[14]=zi;Ve[15]=Fi;Ve[16]=Gi;Ve[17]=Vi;Ve[18]=Yi;if(tt!==0){Ve[19]=tt;Ce.length++}return Ce};if(!Math.imul){rt=smallMulTo}function bigMulTo(ke,Ae,Ce){Ce.negative=Ae.negative^ke.negative;Ce.length=ke.length+Ae.length;var qe=0;var ze=0;for(var Ve=0;Ve<Ce.length-1;Ve++){var tt=ze;ze=0;var rt=qe&67108863;var it=Math.min(Ve,Ae.length-1);for(var nt=Math.max(0,Ve-ke.length+1);nt<=it;nt++){var ot=Ve-nt;var ct=ke.words[ot]|0;var ht=Ae.words[nt]|0;var ft=ct*ht;var yt=ft&67108863;tt=tt+(ft/67108864|0)|0;yt=yt+rt|0;rt=yt&67108863;tt=tt+(yt>>>26)|0;ze+=tt>>>26;tt&=67108863}Ce.words[Ve]=rt;qe=tt;tt=ze}if(qe!==0){Ce.words[Ve]=qe}else{Ce.length--}return Ce.strip()}function jumboMulTo(ke,Ae,Ce){var qe=new FFTM;return qe.mulp(ke,Ae,Ce)}BN.prototype.mulTo=function mulTo(ke,Ae){var Ce;var qe=this.length+ke.length;if(this.length===10&&ke.length===10){Ce=rt(this,ke,Ae)}else if(qe<63){Ce=smallMulTo(this,ke,Ae)}else if(qe<1024){Ce=bigMulTo(this,ke,Ae)}else{Ce=jumboMulTo(this,ke,Ae)}return Ce};function FFTM(ke,Ae){this.x=ke;this.y=Ae}FFTM.prototype.makeRBT=function makeRBT(ke){var Ae=new Array(ke);var Ce=BN.prototype._countBits(ke)-1;for(var qe=0;qe<ke;qe++){Ae[qe]=this.revBin(qe,Ce,ke)}return Ae};FFTM.prototype.revBin=function revBin(ke,Ae,Ce){if(ke===0||ke===Ce-1)return ke;var qe=0;for(var ze=0;ze<Ae;ze++){qe|=(ke&1)<<Ae-ze-1;ke>>=1}return qe};FFTM.prototype.permute=function permute(ke,Ae,Ce,qe,ze,Ve){for(var tt=0;tt<Ve;tt++){qe[tt]=Ae[ke[tt]];ze[tt]=Ce[ke[tt]]}};FFTM.prototype.transform=function transform(ke,Ae,Ce,qe,ze,Ve){this.permute(Ve,ke,Ae,Ce,qe,ze);for(var tt=1;tt<ze;tt<<=1){var rt=tt<<1;var it=Math.cos(2*Math.PI/rt);var nt=Math.sin(2*Math.PI/rt);for(var ot=0;ot<ze;ot+=rt){var ct=it;var ht=nt;for(var ft=0;ft<tt;ft++){var yt=Ce[ot+ft];var mt=qe[ot+ft];var kt=Ce[ot+ft+tt];var St=qe[ot+ft+tt];var Et=ct*kt-ht*St;St=ct*St+ht*kt;kt=Et;Ce[ot+ft]=yt+kt;qe[ot+ft]=mt+St;Ce[ot+ft+tt]=yt-kt;qe[ot+ft+tt]=mt-St;if(ft!==rt){Et=it*ct-nt*ht;ht=it*ht+nt*ct;ct=Et}}}}};FFTM.prototype.guessLen13b=function guessLen13b(ke,Ae){var Ce=Math.max(Ae,ke)|1;var qe=Ce&1;var ze=0;for(Ce=Ce/2|0;Ce;Ce=Ce>>>1){ze++}return 1<<ze+1+qe};FFTM.prototype.conjugate=function conjugate(ke,Ae,Ce){if(Ce<=1)return;for(var qe=0;qe<Ce/2;qe++){var ze=ke[qe];ke[qe]=ke[Ce-qe-1];ke[Ce-qe-1]=ze;ze=Ae[qe];Ae[qe]=-Ae[Ce-qe-1];Ae[Ce-qe-1]=-ze}};FFTM.prototype.normalize13b=function normalize13b(ke,Ae){var Ce=0;for(var qe=0;qe<Ae/2;qe++){var ze=Math.round(ke[2*qe+1]/Ae)*8192+Math.round(ke[2*qe]/Ae)+Ce;ke[qe]=ze&67108863;if(ze<67108864){Ce=0}else{Ce=ze/67108864|0}}return ke};FFTM.prototype.convert13b=function convert13b(ke,Ae,Ce,qe){var ze=0;for(var Ve=0;Ve<Ae;Ve++){ze=ze+(ke[Ve]|0);Ce[2*Ve]=ze&8191;ze=ze>>>13;Ce[2*Ve+1]=ze&8191;ze=ze>>>13}for(Ve=2*Ae;Ve<qe;++Ve){Ce[Ve]=0}assert(ze===0);assert((ze&~8191)===0)};FFTM.prototype.stub=function stub(ke){var Ae=new Array(ke);for(var Ce=0;Ce<ke;Ce++){Ae[Ce]=0}return Ae};FFTM.prototype.mulp=function mulp(ke,Ae,Ce){var qe=2*this.guessLen13b(ke.length,Ae.length);var ze=this.makeRBT(qe);var Ve=this.stub(qe);var tt=new Array(qe);var rt=new Array(qe);var it=new Array(qe);var nt=new Array(qe);var ot=new Array(qe);var ct=new Array(qe);var ht=Ce.words;ht.length=qe;this.convert13b(ke.words,ke.length,tt,qe);this.convert13b(Ae.words,Ae.length,nt,qe);this.transform(tt,Ve,rt,it,qe,ze);this.transform(nt,Ve,ot,ct,qe,ze);for(var ft=0;ft<qe;ft++){var yt=rt[ft]*ot[ft]-it[ft]*ct[ft];it[ft]=rt[ft]*ct[ft]+it[ft]*ot[ft];rt[ft]=yt}this.conjugate(rt,it,qe);this.transform(rt,it,ht,Ve,qe,ze);this.conjugate(ht,Ve,qe);this.normalize13b(ht,qe);Ce.negative=ke.negative^Ae.negative;Ce.length=ke.length+Ae.length;return Ce.strip()};BN.prototype.mul=function mul(ke){var Ae=new BN(null);Ae.words=new Array(this.length+ke.length);return this.mulTo(ke,Ae)};BN.prototype.mulf=function mulf(ke){var Ae=new BN(null);Ae.words=new Array(this.length+ke.length);return jumboMulTo(this,ke,Ae)};BN.prototype.imul=function imul(ke){return this.clone().mulTo(ke,this)};BN.prototype.imuln=function imuln(ke){assert(typeof ke==="number");assert(ke<67108864);var Ae=0;for(var Ce=0;Ce<this.length;Ce++){var qe=(this.words[Ce]|0)*ke;var ze=(qe&67108863)+(Ae&67108863);Ae>>=26;Ae+=qe/67108864|0;Ae+=ze>>>26;this.words[Ce]=ze&67108863}if(Ae!==0){this.words[Ce]=Ae;this.length++}return this};BN.prototype.muln=function muln(ke){return this.clone().imuln(ke)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(ke){var Ae=toBitArray(ke);if(Ae.length===0)return new BN(1);var Ce=this;for(var qe=0;qe<Ae.length;qe++,Ce=Ce.sqr()){if(Ae[qe]!==0)break}if(++qe<Ae.length){for(var ze=Ce.sqr();qe<Ae.length;qe++,ze=ze.sqr()){if(Ae[qe]===0)continue;Ce=Ce.mul(ze)}}return Ce};BN.prototype.iushln=function iushln(ke){assert(typeof ke==="number"&&ke>=0);var Ae=ke%26;var Ce=(ke-Ae)/26;var qe=67108863>>>26-Ae<<26-Ae;var ze;if(Ae!==0){var Ve=0;for(ze=0;ze<this.length;ze++){var tt=this.words[ze]&qe;var rt=(this.words[ze]|0)-tt<<Ae;this.words[ze]=rt|Ve;Ve=tt>>>26-Ae}if(Ve){this.words[ze]=Ve;this.length++}}if(Ce!==0){for(ze=this.length-1;ze>=0;ze--){this.words[ze+Ce]=this.words[ze]}for(ze=0;ze<Ce;ze++){this.words[ze]=0}this.length+=Ce}return this.strip()};BN.prototype.ishln=function ishln(ke){assert(this.negative===0);return this.iushln(ke)};BN.prototype.iushrn=function iushrn(ke,Ae,Ce){assert(typeof ke==="number"&&ke>=0);var qe;if(Ae){qe=(Ae-Ae%26)/26}else{qe=0}var ze=ke%26;var Ve=Math.min((ke-ze)/26,this.length);var tt=67108863^67108863>>>ze<<ze;var rt=Ce;qe-=Ve;qe=Math.max(0,qe);if(rt){for(var it=0;it<Ve;it++){rt.words[it]=this.words[it]}rt.length=Ve}if(Ve===0){}else if(this.length>Ve){this.length-=Ve;for(it=0;it<this.length;it++){this.words[it]=this.words[it+Ve]}}else{this.words[0]=0;this.length=1}var nt=0;for(it=this.length-1;it>=0&&(nt!==0||it>=qe);it--){var ot=this.words[it]|0;this.words[it]=nt<<26-ze|ot>>>ze;nt=ot&tt}if(rt&&nt!==0){rt.words[rt.length++]=nt}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(ke,Ae,Ce){assert(this.negative===0);return this.iushrn(ke,Ae,Ce)};BN.prototype.shln=function shln(ke){return this.clone().ishln(ke)};BN.prototype.ushln=function ushln(ke){return this.clone().iushln(ke)};BN.prototype.shrn=function shrn(ke){return this.clone().ishrn(ke)};BN.prototype.ushrn=function ushrn(ke){return this.clone().iushrn(ke)};BN.prototype.testn=function testn(ke){assert(typeof ke==="number"&&ke>=0);var Ae=ke%26;var Ce=(ke-Ae)/26;var qe=1<<Ae;if(this.length<=Ce)return false;var ze=this.words[Ce];return!!(ze&qe)};BN.prototype.imaskn=function imaskn(ke){assert(typeof ke==="number"&&ke>=0);var Ae=ke%26;var Ce=(ke-Ae)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=Ce){return this}if(Ae!==0){Ce++}this.length=Math.min(Ce,this.length);if(Ae!==0){var qe=67108863^67108863>>>Ae<<Ae;this.words[this.length-1]&=qe}return this.strip()};BN.prototype.maskn=function maskn(ke){return this.clone().imaskn(ke)};BN.prototype.iaddn=function iaddn(ke){assert(typeof ke==="number");assert(ke<67108864);if(ke<0)return this.isubn(-ke);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<ke){this.words[0]=ke-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(ke);this.negative=1;return this}return this._iaddn(ke)};BN.prototype._iaddn=function _iaddn(ke){this.words[0]+=ke;for(var Ae=0;Ae<this.length&&this.words[Ae]>=67108864;Ae++){this.words[Ae]-=67108864;if(Ae===this.length-1){this.words[Ae+1]=1}else{this.words[Ae+1]++}}this.length=Math.max(this.length,Ae+1);return this};BN.prototype.isubn=function isubn(ke){assert(typeof ke==="number");assert(ke<67108864);if(ke<0)return this.iaddn(-ke);if(this.negative!==0){this.negative=0;this.iaddn(ke);this.negative=1;return this}this.words[0]-=ke;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var Ae=0;Ae<this.length&&this.words[Ae]<0;Ae++){this.words[Ae]+=67108864;this.words[Ae+1]-=1}}return this.strip()};BN.prototype.addn=function addn(ke){return this.clone().iaddn(ke)};BN.prototype.subn=function subn(ke){return this.clone().isubn(ke)};BN.prototype.iabs=function iabs(){this.negative=0;return this};BN.prototype.abs=function abs(){return this.clone().iabs()};BN.prototype._ishlnsubmul=function _ishlnsubmul(ke,Ae,Ce){var qe=ke.length+Ce;var ze;this._expand(qe);var Ve;var tt=0;for(ze=0;ze<ke.length;ze++){Ve=(this.words[ze+Ce]|0)+tt;var rt=(ke.words[ze]|0)*Ae;Ve-=rt&67108863;tt=(Ve>>26)-(rt/67108864|0);this.words[ze+Ce]=Ve&67108863}for(;ze<this.length-Ce;ze++){Ve=(this.words[ze+Ce]|0)+tt;tt=Ve>>26;this.words[ze+Ce]=Ve&67108863}if(tt===0)return this.strip();assert(tt===-1);tt=0;for(ze=0;ze<this.length;ze++){Ve=-(this.words[ze]|0)+tt;tt=Ve>>26;this.words[ze]=Ve&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(ke,Ae){var Ce=this.length-ke.length;var qe=this.clone();var ze=ke;var Ve=ze.words[ze.length-1]|0;var tt=this._countBits(Ve);Ce=26-tt;if(Ce!==0){ze=ze.ushln(Ce);qe.iushln(Ce);Ve=ze.words[ze.length-1]|0}var rt=qe.length-ze.length;var it;if(Ae!=="mod"){it=new BN(null);it.length=rt+1;it.words=new Array(it.length);for(var nt=0;nt<it.length;nt++){it.words[nt]=0}}var ot=qe.clone()._ishlnsubmul(ze,1,rt);if(ot.negative===0){qe=ot;if(it){it.words[rt]=1}}for(var ct=rt-1;ct>=0;ct--){var ht=(qe.words[ze.length+ct]|0)*67108864+(qe.words[ze.length+ct-1]|0);ht=Math.min(ht/Ve|0,67108863);qe._ishlnsubmul(ze,ht,ct);while(qe.negative!==0){ht--;qe.negative=0;qe._ishlnsubmul(ze,1,ct);if(!qe.isZero()){qe.negative^=1}}if(it){it.words[ct]=ht}}if(it){it.strip()}qe.strip();if(Ae!=="div"&&Ce!==0){qe.iushrn(Ce)}return{div:it||null,mod:qe}};BN.prototype.divmod=function divmod(ke,Ae,Ce){assert(!ke.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var qe,ze,Ve;if(this.negative!==0&&ke.negative===0){Ve=this.neg().divmod(ke,Ae);if(Ae!=="mod"){qe=Ve.div.neg()}if(Ae!=="div"){ze=Ve.mod.neg();if(Ce&&ze.negative!==0){ze.iadd(ke)}}return{div:qe,mod:ze}}if(this.negative===0&&ke.negative!==0){Ve=this.divmod(ke.neg(),Ae);if(Ae!=="mod"){qe=Ve.div.neg()}return{div:qe,mod:Ve.mod}}if((this.negative&ke.negative)!==0){Ve=this.neg().divmod(ke.neg(),Ae);if(Ae!=="div"){ze=Ve.mod.neg();if(Ce&&ze.negative!==0){ze.isub(ke)}}return{div:Ve.div,mod:ze}}if(ke.length>this.length||this.cmp(ke)<0){return{div:new BN(0),mod:this}}if(ke.length===1){if(Ae==="div"){return{div:this.divn(ke.words[0]),mod:null}}if(Ae==="mod"){return{div:null,mod:new BN(this.modn(ke.words[0]))}}return{div:this.divn(ke.words[0]),mod:new BN(this.modn(ke.words[0]))}}return this._wordDiv(ke,Ae)};BN.prototype.div=function div(ke){return this.divmod(ke,"div",false).div};BN.prototype.mod=function mod(ke){return this.divmod(ke,"mod",false).mod};BN.prototype.umod=function umod(ke){return this.divmod(ke,"mod",true).mod};BN.prototype.divRound=function divRound(ke){var Ae=this.divmod(ke);if(Ae.mod.isZero())return Ae.div;var Ce=Ae.div.negative!==0?Ae.mod.isub(ke):Ae.mod;var qe=ke.ushrn(1);var ze=ke.andln(1);var Ve=Ce.cmp(qe);if(Ve<0||ze===1&&Ve===0)return Ae.div;return Ae.div.negative!==0?Ae.div.isubn(1):Ae.div.iaddn(1)};BN.prototype.modn=function modn(ke){assert(ke<=67108863);var Ae=(1<<26)%ke;var Ce=0;for(var qe=this.length-1;qe>=0;qe--){Ce=(Ae*Ce+(this.words[qe]|0))%ke}return Ce};BN.prototype.idivn=function idivn(ke){assert(ke<=67108863);var Ae=0;for(var Ce=this.length-1;Ce>=0;Ce--){var qe=(this.words[Ce]|0)+Ae*67108864;this.words[Ce]=qe/ke|0;Ae=qe%ke}return this.strip()};BN.prototype.divn=function divn(ke){return this.clone().idivn(ke)};BN.prototype.egcd=function egcd(ke){assert(ke.negative===0);assert(!ke.isZero());var Ae=this;var Ce=ke.clone();if(Ae.negative!==0){Ae=Ae.umod(ke)}else{Ae=Ae.clone()}var qe=new BN(1);var ze=new BN(0);var Ve=new BN(0);var tt=new BN(1);var rt=0;while(Ae.isEven()&&Ce.isEven()){Ae.iushrn(1);Ce.iushrn(1);++rt}var it=Ce.clone();var nt=Ae.clone();while(!Ae.isZero()){for(var ot=0,ct=1;(Ae.words[0]&ct)===0&&ot<26;++ot,ct<<=1);if(ot>0){Ae.iushrn(ot);while(ot-- >0){if(qe.isOdd()||ze.isOdd()){qe.iadd(it);ze.isub(nt)}qe.iushrn(1);ze.iushrn(1)}}for(var ht=0,ft=1;(Ce.words[0]&ft)===0&&ht<26;++ht,ft<<=1);if(ht>0){Ce.iushrn(ht);while(ht-- >0){if(Ve.isOdd()||tt.isOdd()){Ve.iadd(it);tt.isub(nt)}Ve.iushrn(1);tt.iushrn(1)}}if(Ae.cmp(Ce)>=0){Ae.isub(Ce);qe.isub(Ve);ze.isub(tt)}else{Ce.isub(Ae);Ve.isub(qe);tt.isub(ze)}}return{a:Ve,b:tt,gcd:Ce.iushln(rt)}};BN.prototype._invmp=function _invmp(ke){assert(ke.negative===0);assert(!ke.isZero());var Ae=this;var Ce=ke.clone();if(Ae.negative!==0){Ae=Ae.umod(ke)}else{Ae=Ae.clone()}var qe=new BN(1);var ze=new BN(0);var Ve=Ce.clone();while(Ae.cmpn(1)>0&&Ce.cmpn(1)>0){for(var tt=0,rt=1;(Ae.words[0]&rt)===0&&tt<26;++tt,rt<<=1);if(tt>0){Ae.iushrn(tt);while(tt-- >0){if(qe.isOdd()){qe.iadd(Ve)}qe.iushrn(1)}}for(var it=0,nt=1;(Ce.words[0]&nt)===0&&it<26;++it,nt<<=1);if(it>0){Ce.iushrn(it);while(it-- >0){if(ze.isOdd()){ze.iadd(Ve)}ze.iushrn(1)}}if(Ae.cmp(Ce)>=0){Ae.isub(Ce);qe.isub(ze)}else{Ce.isub(Ae);ze.isub(qe)}}var ot;if(Ae.cmpn(1)===0){ot=qe}else{ot=ze}if(ot.cmpn(0)<0){ot.iadd(ke)}return ot};BN.prototype.gcd=function gcd(ke){if(this.isZero())return ke.abs();if(ke.isZero())return this.abs();var Ae=this.clone();var Ce=ke.clone();Ae.negative=0;Ce.negative=0;for(var qe=0;Ae.isEven()&&Ce.isEven();qe++){Ae.iushrn(1);Ce.iushrn(1)}do{while(Ae.isEven()){Ae.iushrn(1)}while(Ce.isEven()){Ce.iushrn(1)}var ze=Ae.cmp(Ce);if(ze<0){var Ve=Ae;Ae=Ce;Ce=Ve}else if(ze===0||Ce.cmpn(1)===0){break}Ae.isub(Ce)}while(true);return Ce.iushln(qe)};BN.prototype.invm=function invm(ke){return this.egcd(ke).a.umod(ke)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(ke){return this.words[0]&ke};BN.prototype.bincn=function bincn(ke){assert(typeof ke==="number");var Ae=ke%26;var Ce=(ke-Ae)/26;var qe=1<<Ae;if(this.length<=Ce){this._expand(Ce+1);this.words[Ce]|=qe;return this}var ze=qe;for(var Ve=Ce;ze!==0&&Ve<this.length;Ve++){var tt=this.words[Ve]|0;tt+=ze;ze=tt>>>26;tt&=67108863;this.words[Ve]=tt}if(ze!==0){this.words[Ve]=ze;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(ke){var Ae=ke<0;if(this.negative!==0&&!Ae)return-1;if(this.negative===0&&Ae)return 1;this.strip();var Ce;if(this.length>1){Ce=1}else{if(Ae){ke=-ke}assert(ke<=67108863,"Number is too big");var qe=this.words[0]|0;Ce=qe===ke?0:qe<ke?-1:1}if(this.negative!==0)return-Ce|0;return Ce};BN.prototype.cmp=function cmp(ke){if(this.negative!==0&&ke.negative===0)return-1;if(this.negative===0&&ke.negative!==0)return 1;var Ae=this.ucmp(ke);if(this.negative!==0)return-Ae|0;return Ae};BN.prototype.ucmp=function ucmp(ke){if(this.length>ke.length)return 1;if(this.length<ke.length)return-1;var Ae=0;for(var Ce=this.length-1;Ce>=0;Ce--){var qe=this.words[Ce]|0;var ze=ke.words[Ce]|0;if(qe===ze)continue;if(qe<ze){Ae=-1}else if(qe>ze){Ae=1}break}return Ae};BN.prototype.gtn=function gtn(ke){return this.cmpn(ke)===1};BN.prototype.gt=function gt(ke){return this.cmp(ke)===1};BN.prototype.gten=function gten(ke){return this.cmpn(ke)>=0};BN.prototype.gte=function gte(ke){return this.cmp(ke)>=0};BN.prototype.ltn=function ltn(ke){return this.cmpn(ke)===-1};BN.prototype.lt=function lt(ke){return this.cmp(ke)===-1};BN.prototype.lten=function lten(ke){return this.cmpn(ke)<=0};BN.prototype.lte=function lte(ke){return this.cmp(ke)<=0};BN.prototype.eqn=function eqn(ke){return this.cmpn(ke)===0};BN.prototype.eq=function eq(ke){return this.cmp(ke)===0};BN.red=function red(ke){return new Red(ke)};BN.prototype.toRed=function toRed(ke){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ke.convertTo(this)._forceRed(ke)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ke){this.red=ke;return this};BN.prototype.forceRed=function forceRed(ke){assert(!this.red,"Already a number in reduction context");return this._forceRed(ke)};BN.prototype.redAdd=function redAdd(ke){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,ke)};BN.prototype.redIAdd=function redIAdd(ke){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,ke)};BN.prototype.redSub=function redSub(ke){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,ke)};BN.prototype.redISub=function redISub(ke){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,ke)};BN.prototype.redShl=function redShl(ke){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,ke)};BN.prototype.redMul=function redMul(ke){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,ke);return this.red.mul(this,ke)};BN.prototype.redIMul=function redIMul(ke){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,ke);return this.red.imul(this,ke)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(ke){assert(this.red&&!ke.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,ke)};var it={k256:null,p224:null,p192:null,p25519:null};function MPrime(ke,Ae){this.name=ke;this.p=new BN(Ae,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var ke=new BN(null);ke.words=new Array(Math.ceil(this.n/13));return ke};MPrime.prototype.ireduce=function ireduce(ke){var Ae=ke;var Ce;do{this.split(Ae,this.tmp);Ae=this.imulK(Ae);Ae=Ae.iadd(this.tmp);Ce=Ae.bitLength()}while(Ce>this.n);var qe=Ce<this.n?-1:Ae.ucmp(this.p);if(qe===0){Ae.words[0]=0;Ae.length=1}else if(qe>0){Ae.isub(this.p)}else{if(Ae.strip!==undefined){Ae.strip()}else{Ae._strip()}}return Ae};MPrime.prototype.split=function split(ke,Ae){ke.iushrn(this.n,0,Ae)};MPrime.prototype.imulK=function imulK(ke){return ke.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(ke,Ae){var Ce=4194303;var qe=Math.min(ke.length,9);for(var ze=0;ze<qe;ze++){Ae.words[ze]=ke.words[ze]}Ae.length=qe;if(ke.length<=9){ke.words[0]=0;ke.length=1;return}var Ve=ke.words[9];Ae.words[Ae.length++]=Ve&Ce;for(ze=10;ze<ke.length;ze++){var tt=ke.words[ze]|0;ke.words[ze-10]=(tt&Ce)<<4|Ve>>>22;Ve=tt}Ve>>>=22;ke.words[ze-10]=Ve;if(Ve===0&&ke.length>10){ke.length-=10}else{ke.length-=9}};K256.prototype.imulK=function imulK(ke){ke.words[ke.length]=0;ke.words[ke.length+1]=0;ke.length+=2;var Ae=0;for(var Ce=0;Ce<ke.length;Ce++){var qe=ke.words[Ce]|0;Ae+=qe*977;ke.words[Ce]=Ae&67108863;Ae=qe*64+(Ae/67108864|0)}if(ke.words[ke.length-1]===0){ke.length--;if(ke.words[ke.length-1]===0){ke.length--}}return ke};function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}inherits(P224,MPrime);function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}inherits(P192,MPrime);function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}inherits(P25519,MPrime);P25519.prototype.imulK=function imulK(ke){var Ae=0;for(var Ce=0;Ce<ke.length;Ce++){var qe=(ke.words[Ce]|0)*19+Ae;var ze=qe&67108863;qe>>>=26;ke.words[Ce]=ze;Ae=qe}if(Ae!==0){ke.words[ke.length++]=Ae}return ke};BN._prime=function prime(ke){if(it[ke])return it[ke];var prime;if(ke==="k256"){prime=new K256}else if(ke==="p224"){prime=new P224}else if(ke==="p192"){prime=new P192}else if(ke==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+ke)}it[ke]=prime;return prime};function Red(ke){if(typeof ke==="string"){var Ae=BN._prime(ke);this.m=Ae.p;this.prime=Ae}else{assert(ke.gtn(1),"modulus must be greater than 1");this.m=ke;this.prime=null}}Red.prototype._verify1=function _verify1(ke){assert(ke.negative===0,"red works only with positives");assert(ke.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(ke,Ae){assert((ke.negative|Ae.negative)===0,"red works only with positives");assert(ke.red&&ke.red===Ae.red,"red works only with red numbers")};Red.prototype.imod=function imod(ke){if(this.prime)return this.prime.ireduce(ke)._forceRed(this);return ke.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(ke){if(ke.isZero()){return ke.clone()}return this.m.sub(ke)._forceRed(this)};Red.prototype.add=function add(ke,Ae){this._verify2(ke,Ae);var Ce=ke.add(Ae);if(Ce.cmp(this.m)>=0){Ce.isub(this.m)}return Ce._forceRed(this)};Red.prototype.iadd=function iadd(ke,Ae){this._verify2(ke,Ae);var Ce=ke.iadd(Ae);if(Ce.cmp(this.m)>=0){Ce.isub(this.m)}return Ce};Red.prototype.sub=function sub(ke,Ae){this._verify2(ke,Ae);var Ce=ke.sub(Ae);if(Ce.cmpn(0)<0){Ce.iadd(this.m)}return Ce._forceRed(this)};Red.prototype.isub=function isub(ke,Ae){this._verify2(ke,Ae);var Ce=ke.isub(Ae);if(Ce.cmpn(0)<0){Ce.iadd(this.m)}return Ce};Red.prototype.shl=function shl(ke,Ae){this._verify1(ke);return this.imod(ke.ushln(Ae))};Red.prototype.imul=function imul(ke,Ae){this._verify2(ke,Ae);return this.imod(ke.imul(Ae))};Red.prototype.mul=function mul(ke,Ae){this._verify2(ke,Ae);return this.imod(ke.mul(Ae))};Red.prototype.isqr=function isqr(ke){return this.imul(ke,ke.clone())};Red.prototype.sqr=function sqr(ke){return this.mul(ke,ke)};Red.prototype.sqrt=function sqrt(ke){if(ke.isZero())return ke.clone();var Ae=this.m.andln(3);assert(Ae%2===1);if(Ae===3){var Ce=this.m.add(new BN(1)).iushrn(2);return this.pow(ke,Ce)}var qe=this.m.subn(1);var ze=0;while(!qe.isZero()&&qe.andln(1)===0){ze++;qe.iushrn(1)}assert(!qe.isZero());var Ve=new BN(1).toRed(this);var tt=Ve.redNeg();var rt=this.m.subn(1).iushrn(1);var it=this.m.bitLength();it=new BN(2*it*it).toRed(this);while(this.pow(it,rt).cmp(tt)!==0){it.redIAdd(tt)}var nt=this.pow(it,qe);var ot=this.pow(ke,qe.addn(1).iushrn(1));var ct=this.pow(ke,qe);var ht=ze;while(ct.cmp(Ve)!==0){var ft=ct;for(var yt=0;ft.cmp(Ve)!==0;yt++){ft=ft.redSqr()}assert(yt<ht);var mt=this.pow(nt,new BN(1).iushln(ht-yt-1));ot=ot.redMul(mt);nt=mt.redSqr();ct=ct.redMul(nt);ht=yt}return ot};Red.prototype.invm=function invm(ke){var Ae=ke._invmp(this.m);if(Ae.negative!==0){Ae.negative=0;return this.imod(Ae).redNeg()}else{return this.imod(Ae)}};Red.prototype.pow=function pow(ke,Ae){if(Ae.isZero())return new BN(1).toRed(this);if(Ae.cmpn(1)===0)return ke.clone();var Ce=4;var qe=new Array(1<<Ce);qe[0]=new BN(1).toRed(this);qe[1]=ke;for(var ze=2;ze<qe.length;ze++){qe[ze]=this.mul(qe[ze-1],ke)}var Ve=qe[0];var tt=0;var rt=0;var it=Ae.bitLength()%26;if(it===0){it=26}for(ze=Ae.length-1;ze>=0;ze--){var nt=Ae.words[ze];for(var ot=it-1;ot>=0;ot--){var ct=nt>>ot&1;if(Ve!==qe[0]){Ve=this.sqr(Ve)}if(ct===0&&tt===0){rt=0;continue}tt<<=1;tt|=ct;rt++;if(rt!==Ce&&(ze!==0||ot!==0))continue;Ve=this.mul(Ve,qe[tt]);rt=0;tt=0}it=26}return Ve};Red.prototype.convertTo=function convertTo(ke){var Ae=ke.umod(this.m);return Ae===ke?Ae.clone():Ae};Red.prototype.convertFrom=function convertFrom(ke){var Ae=ke.clone();Ae.red=null;return Ae};BN.mont=function mont(ke){return new Mont(ke)};function Mont(ke){Red.call(this,ke);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(ke){return this.imod(ke.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(ke){var Ae=this.imod(ke.mul(this.rinv));Ae.red=null;return Ae};Mont.prototype.imul=function imul(ke,Ae){if(ke.isZero()||Ae.isZero()){ke.words[0]=0;ke.length=1;return ke}var Ce=ke.imul(Ae);var qe=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var ze=Ce.isub(qe).iushrn(this.shift);var Ve=ze;if(ze.cmp(this.m)>=0){Ve=ze.isub(this.m)}else if(ze.cmpn(0)<0){Ve=ze.iadd(this.m)}return Ve._forceRed(this)};Mont.prototype.mul=function mul(ke,Ae){if(ke.isZero()||Ae.isZero())return new BN(0)._forceRed(this);var Ce=ke.mul(Ae);var qe=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var ze=Ce.isub(qe).iushrn(this.shift);var Ve=ze;if(ze.cmp(this.m)>=0){Ve=ze.isub(this.m)}else if(ze.cmpn(0)<0){Ve=ze.iadd(this.m)}return Ve._forceRed(this)};Mont.prototype.invm=function invm(ke){var Ae=this.imod(ke._invmp(this.m).mul(this.r2));return Ae._forceRed(this)}})(false||ke,this)},4124:(ke,Ae,Ce)=>{try{var qe=Ce(3837);if(typeof qe.inherits!=="function")throw"";ke.exports=qe.inherits}catch(Ae){ke.exports=Ce(8544)}},8544:ke=>{if(typeof Object.create==="function"){ke.exports=function inherits(ke,Ae){if(Ae){ke.super_=Ae;ke.prototype=Object.create(Ae.prototype,{constructor:{value:ke,enumerable:false,writable:true,configurable:true}})}}}else{ke.exports=function inherits(ke,Ae){if(Ae){ke.super_=Ae;var TempCtor=function(){};TempCtor.prototype=Ae.prototype;ke.prototype=new TempCtor;ke.prototype.constructor=ke}}}},910:ke=>{ke.exports=assert;function assert(ke,Ae){if(!ke)throw new Error(Ae||"Assertion failed")}assert.equal=function assertEqual(ke,Ae,Ce){if(ke!=Ae)throw new Error(Ce||"Assertion failed: "+ke+" != "+Ae)}},7946:(ke,Ae,Ce)=>{"use strict";
|
|
/*! OpenPGP.js v5.5.0 - 2022-08-31 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */const qe="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Object.defineProperty(Ae,"__esModule",{value:!0});var ze=Ce(4300),Ve=Ce(2781),tt=Ce(6113),rt=Ce(9796),it=Ce(2037),nt=Ce(3837),ot=Ce(4293);function c(ke){return ke&&"object"==typeof ke&&"default"in ke?ke:{default:ke}}var ct=c(ze),ht=c(Ve),ft=c(tt),yt=c(rt),mt=c(it),kt=c(nt),St=c(ot);const Et=Symbol("doneWritingPromise"),Pt=Symbol("doneWritingResolve"),Dt=Symbol("doneWritingReject"),Rt=Symbol("readingIndex");class v extends Array{constructor(){super(),this[Et]=new Promise(((ke,Ae)=>{this[Pt]=ke,this[Dt]=Ae})),this[Et].catch((()=>{}))}}function _(ke){return ke&&ke.getReader&&Array.isArray(ke)}function k(ke){if(!_(ke)){const Ae=ke.getWriter(),Ce=Ae.releaseLock;return Ae.releaseLock=()=>{Ae.closed.catch((function(){})),Ce.call(Ae)},Ae}this.stream=ke}v.prototype.getReader=function(){return void 0===this[Rt]&&(this[Rt]=0),{read:async()=>(await this[Et],this[Rt]===this.length?{value:void 0,done:!0}:{value:this[this[Rt]++],done:!1})}},v.prototype.readToEnd=async function(ke){await this[Et];const Ae=ke(this.slice(this[Rt]));return this.length=0,Ae},v.prototype.clone=function(){const ke=new v;return ke[Et]=this[Et].then((()=>{ke.push(...this)})),ke},k.prototype.write=async function(ke){this.stream.push(ke)},k.prototype.close=async function(){this.stream[Pt]()},k.prototype.abort=async function(ke){return this.stream[Dt](ke),ke},k.prototype.releaseLock=function(){};const Bt="object"==typeof qe.process&&"object"==typeof qe.process.versions,Tt=Bt&&ht.default.Readable;function E(ke){return _(ke)?"array":qe.ReadableStream&&qe.ReadableStream.prototype.isPrototypeOf(ke)?"web":Lt&&Lt.prototype.isPrototypeOf(ke)?"ponyfill":Tt&&Tt.prototype.isPrototypeOf(ke)?"node":!(!ke||!ke.getReader)&&"web-like"}function P(ke){return Uint8Array.prototype.isPrototypeOf(ke)}function x(ke){if(1===ke.length)return ke[0];let Ae=0;for(let Ce=0;Ce<ke.length;Ce++){if(!P(ke[Ce]))throw Error("concatUint8Array: Data must be in the form of a Uint8Array");Ae+=ke[Ce].length}const Ce=new Uint8Array(Ae);let qe=0;return ke.forEach((function(ke){Ce.set(ke,qe),qe+=ke.length})),Ce}const Ut=Bt&&ct.default.Buffer,Kt=Bt&&ht.default.Readable;let It,Ot;if(Kt){It=function(ke){let Ae=!1;return new Lt({start(Ce){ke.pause(),ke.on("data",(qe=>{Ae||(Ut.isBuffer(qe)&&(qe=new Uint8Array(qe.buffer,qe.byteOffset,qe.byteLength)),Ce.enqueue(qe),ke.pause())})),ke.on("end",(()=>{Ae||Ce.close()})),ke.on("error",(ke=>Ce.error(ke)))},pull(){ke.resume()},cancel(Ce){Ae=!0,ke.destroy(Ce)}})};class e extends Kt{constructor(ke,Ae){super(Ae),this._reader=H(ke)}async _read(ke){try{for(;;){const{done:ke,value:Ae}=await this._reader.read();if(ke){this.push(null);break}if(!this.push(Ae)||this._cancelling){this._reading=!1;break}}}catch(ke){this.emit("error",ke)}}_destroy(ke){this._reader.cancel(ke)}}Ot=function(ke,Ae){return new e(ke,Ae)}}const Nt=new WeakSet,qt=Symbol("externalBuffer");function I(ke){if(this.stream=ke,ke[qt]&&(this[qt]=ke[qt].slice()),_(ke)){const Ae=ke.getReader();return this._read=Ae.read.bind(Ae),this._releaseLock=()=>{},void(this._cancel=()=>{})}let Ae=E(ke);if("node"===Ae&&(ke=It(ke)),Ae){const Ae=ke.getReader();return this._read=Ae.read.bind(Ae),this._releaseLock=()=>{Ae.closed.catch((function(){})),Ae.releaseLock()},void(this._cancel=Ae.cancel.bind(Ae))}let Ce=!1;this._read=async()=>Ce||Nt.has(ke)?{value:void 0,done:!0}:(Ce=!0,{value:ke,done:!1}),this._releaseLock=()=>{if(Ce)try{Nt.add(ke)}catch(ke){}}}I.prototype.read=async function(){if(this[qt]&&this[qt].length){return{done:!1,value:this[qt].shift()}}return this._read()},I.prototype.releaseLock=function(){this[qt]&&(this.stream[qt]=this[qt]),this._releaseLock()},I.prototype.cancel=function(ke){return this._cancel(ke)},I.prototype.readLine=async function(){let ke,Ae=[];for(;!ke;){let{done:Ce,value:qe}=await this.read();if(qe+="",Ce)return Ae.length?W(Ae):void 0;const ze=qe.indexOf("\n")+1;ze&&(ke=W(Ae.concat(qe.substr(0,ze))),Ae=[]),ze!==qe.length&&Ae.push(qe.substr(ze))}return this.unshift(...Ae),ke},I.prototype.readByte=async function(){const{done:ke,value:Ae}=await this.read();if(ke)return;const Ce=Ae[0];return this.unshift(re(Ae,1)),Ce},I.prototype.readBytes=async function(ke){const Ae=[];let Ce=0;for(;;){const{done:qe,value:ze}=await this.read();if(qe)return Ae.length?W(Ae):void 0;if(Ae.push(ze),Ce+=ze.length,Ce>=ke){const Ce=W(Ae);return this.unshift(re(Ce,ke)),re(Ce,0,ke)}}},I.prototype.peekBytes=async function(ke){const Ae=await this.readBytes(ke);return this.unshift(Ae),Ae},I.prototype.unshift=function(...ke){this[qt]||(this[qt]=[]),1===ke.length&&P(ke[0])&&this[qt].length&&ke[0].length&&this[qt][0].byteOffset>=ke[0].length?this[qt][0]=new Uint8Array(this[qt][0].buffer,this[qt][0].byteOffset-ke[0].length,this[qt][0].byteLength+ke[0].length):this[qt].unshift(...ke.filter((ke=>ke&&ke.length)))},I.prototype.readToEnd=async function(ke=W){const Ae=[];for(;;){const{done:ke,value:Ce}=await this.read();if(ke)break;Ae.push(Ce)}return ke(Ae)};let zt,Ft,{ReadableStream:Lt,WritableStream:Ht,TransformStream:Gt}=qe;async function F(){if(Gt)return;const[ke,Ae]=await Promise.all([Promise.resolve().then((function(){return Ud})),Promise.resolve().then((function(){return Ld}))]);({ReadableStream:Lt,WritableStream:Ht,TransformStream:Gt}=ke);const{createReadableStreamWrapper:Ce}=Ae;qe.ReadableStream&&Lt!==qe.ReadableStream&&(zt=Ce(Lt),Ft=Ce(qe.ReadableStream))}const $t=Bt&&ct.default.Buffer;function j(ke){let Ae=E(ke);return"node"===Ae?It(ke):"web"===Ae&&zt?zt(ke):Ae?ke:new Lt({start(Ae){Ae.enqueue(ke),Ae.close()}})}function L(ke){if(E(ke))return ke;const Ae=new v;return(async()=>{const Ce=G(Ae);await Ce.write(ke),await Ce.close()})(),Ae}function W(ke){return ke.some((ke=>E(ke)&&!_(ke)))?function(ke){ke=ke.map(j);const Ae=Z((async function(ke){await Promise.all(qe.map((Ae=>ne(Ae,ke))))}));let Ce=Promise.resolve();const qe=ke.map(((qe,ze)=>X(qe,((qe,Ve)=>(Ce=Ce.then((()=>V(qe,Ae.writable,{preventClose:ze!==ke.length-1}))),Ce)))));return Ae.readable}(ke):ke.some((ke=>_(ke)))?function(ke){const Ae=new v;let Ce=Promise.resolve();return ke.forEach(((qe,ze)=>(Ce=Ce.then((()=>V(qe,Ae,{preventClose:ze!==ke.length-1}))),Ce))),Ae}(ke):"string"==typeof ke[0]?ke.join(""):$t&&$t.isBuffer(ke[0])?$t.concat(ke):x(ke)}function H(ke){return new I(ke)}function G(ke){return new k(ke)}async function V(ke,Ae,{preventClose:Ce=!1,preventAbort:qe=!1,preventCancel:ze=!1}={}){if(E(ke)&&!_(ke)){ke=j(ke);try{if(ke[qt]){const Ce=G(Ae);for(let Ae=0;Ae<ke[qt].length;Ae++)await Ce.ready,await Ce.write(ke[qt][Ae]);Ce.releaseLock()}await ke.pipeTo(Ae,{preventClose:Ce,preventAbort:qe,preventCancel:ze})}catch(ke){}return}const Ve=H(ke=L(ke)),tt=G(Ae);try{for(;;){await tt.ready;const{done:ke,value:Ae}=await Ve.read();if(ke){Ce||await tt.close();break}await tt.write(Ae)}}catch(ke){qe||await tt.abort(ke)}finally{Ve.releaseLock(),tt.releaseLock()}}function $(ke,Ae){const Ce=new Gt(Ae);return V(ke,Ce.writable),Ce.readable}function Z(ke){let Ae,Ce,qe=!1;return{readable:new Lt({start(ke){Ce=ke},pull(){Ae?Ae():qe=!0},cancel:ke},{highWaterMark:0}),writable:new Ht({write:async function(ke){Ce.enqueue(ke),qe?qe=!1:(await new Promise((ke=>{Ae=ke})),Ae=null)},close:Ce.close.bind(Ce),abort:Ce.error.bind(Ce)})}}function Y(ke,Ae=(()=>{}),Ce=(()=>{})){if(_(ke)){const qe=new v;return(async()=>{const ze=G(qe);try{const qe=await ie(ke),Ve=Ae(qe),tt=Ce();let rt;rt=void 0!==Ve&&void 0!==tt?W([Ve,tt]):void 0!==Ve?Ve:tt,await ze.write(rt),await ze.close()}catch(ke){await ze.abort(ke)}})(),qe}if(E(ke))return $(ke,{async transform(ke,Ce){try{const qe=await Ae(ke);void 0!==qe&&Ce.enqueue(qe)}catch(ke){Ce.error(ke)}},async flush(ke){try{const Ae=await Ce();void 0!==Ae&&ke.enqueue(Ae)}catch(Ae){ke.error(Ae)}}});const qe=Ae(ke),ze=Ce();return void 0!==qe&&void 0!==ze?W([qe,ze]):void 0!==qe?qe:ze}function X(ke,Ae){if(E(ke)&&!_(ke)){let Ce;const qe=new Gt({start(ke){Ce=ke}}),ze=V(ke,qe.writable),Ve=Z((async function(ke){Ce.error(ke),await ze,await new Promise(setTimeout)}));return Ae(qe.readable,Ve.writable),Ve.readable}ke=L(ke);const Ce=new v;return Ae(ke,Ce),Ce}function Q(ke,Ae){let Ce;const qe=X(ke,((ke,ze)=>{const Ve=H(ke);Ve.remainder=()=>(Ve.releaseLock(),V(ke,ze),qe),Ce=Ae(Ve)}));return Ce}function J(ke){if(_(ke))return ke.clone();if(E(ke)){const Ae=function(ke){if(_(ke))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(E(ke)){const Ae=j(ke).tee();return Ae[0][qt]=Ae[1][qt]=ke[qt],Ae}return[re(ke),re(ke)]}(ke);return te(ke,Ae[0]),Ae[1]}return re(ke)}function ee(ke){return _(ke)?J(ke):E(ke)?new Lt({start(Ae){const Ce=X(ke,(async(ke,Ce)=>{const qe=H(ke),ze=G(Ce);try{for(;;){await ze.ready;const{done:Ce,value:Ve}=await qe.read();if(Ce){try{Ae.close()}catch(ke){}return void await ze.close()}try{Ae.enqueue(Ve)}catch(ke){}await ze.write(Ve)}}catch(ke){Ae.error(ke),await ze.abort(ke)}}));te(ke,Ce)}}):re(ke)}function te(ke,Ae){Object.entries(Object.getOwnPropertyDescriptors(ke.constructor.prototype)).forEach((([Ce,qe])=>{"constructor"!==Ce&&(qe.value?qe.value=qe.value.bind(Ae):qe.get=qe.get.bind(Ae),Object.defineProperty(ke,Ce,qe))}))}function re(ke,Ae=0,Ce=1/0){if(_(ke))throw Error("Not implemented");if(E(ke)){if(Ae>=0&&Ce>=0){let qe=0;return $(ke,{transform(ke,ze){qe<Ce?(qe+ke.length>=Ae&&ze.enqueue(re(ke,Math.max(Ae-qe,0),Ce-qe)),qe+=ke.length):ze.terminate()}})}if(Ae<0&&(Ce<0||Ce===1/0)){let qe=[];return Y(ke,(ke=>{ke.length>=-Ae?qe=[ke]:qe.push(ke)}),(()=>re(W(qe),Ae,Ce)))}if(0===Ae&&Ce<0){let qe;return Y(ke,(ke=>{const ze=qe?W([qe,ke]):ke;if(ze.length>=-Ce)return qe=re(ze,Ce),re(ze,Ae,Ce);qe=ze}))}return console.warn(`stream.slice(input, ${Ae}, ${Ce}) not implemented efficiently.`),ae((async()=>re(await ie(ke),Ae,Ce)))}return ke[qt]&&(ke=W(ke[qt].concat([ke]))),!P(ke)||$t&&$t.isBuffer(ke)?ke.slice(Ae,Ce):(Ce===1/0&&(Ce=ke.length),ke.subarray(Ae,Ce))}async function ie(ke,Ae=W){return _(ke)?ke.readToEnd(Ae):E(ke)?H(ke).readToEnd(Ae):ke}async function ne(ke,Ae){if(E(ke)){if(ke.cancel)return ke.cancel(Ae);if(ke.destroy)return ke.destroy(Ae),await new Promise(setTimeout),Ae}}function ae(ke){const Ae=new v;return(async()=>{const Ce=G(Ae);try{await Ce.write(await ke()),await Ce.close()}catch(ke){await Ce.abort(ke)}})(),Ae}class se{constructor(ke){if(void 0===ke)throw Error("Invalid BigInteger input");if(ke instanceof Uint8Array){const Ae=ke,Ce=Array(Ae.length);for(let ke=0;ke<Ae.length;ke++){const qe=Ae[ke].toString(16);Ce[ke]=Ae[ke]<=15?"0"+qe:qe}this.value=BigInt("0x0"+Ce.join(""))}else this.value=BigInt(ke)}clone(){return new se(this.value)}iinc(){return this.value++,this}inc(){return this.clone().iinc()}idec(){return this.value--,this}dec(){return this.clone().idec()}iadd(ke){return this.value+=ke.value,this}add(ke){return this.clone().iadd(ke)}isub(ke){return this.value-=ke.value,this}sub(ke){return this.clone().isub(ke)}imul(ke){return this.value*=ke.value,this}mul(ke){return this.clone().imul(ke)}imod(ke){return this.value%=ke.value,this.isNegative()&&this.iadd(ke),this}mod(ke){return this.clone().imod(ke)}modExp(ke,Ae){if(Ae.isZero())throw Error("Modulo cannot be zero");if(Ae.isOne())return new se(0);if(ke.isNegative())throw Error("Unsopported negative exponent");let Ce=ke.value,qe=this.value;qe%=Ae.value;let ze=BigInt(1);for(;Ce>BigInt(0);){const ke=Ce&BigInt(1);Ce>>=BigInt(1);const Ve=ze*qe%Ae.value;ze=ke?Ve:ze,qe=qe*qe%Ae.value}return new se(ze)}modInv(ke){const{gcd:Ae,x:Ce}=this._egcd(ke);if(!Ae.isOne())throw Error("Inverse does not exist");return Ce.add(ke).mod(ke)}_egcd(ke){let Ae=BigInt(0),Ce=BigInt(1),qe=BigInt(1),ze=BigInt(0),Ve=this.value;for(ke=ke.value;ke!==BigInt(0);){const tt=Ve/ke;let rt=Ae;Ae=qe-tt*Ae,qe=rt,rt=Ce,Ce=ze-tt*Ce,ze=rt,rt=ke,ke=Ve%ke,Ve=rt}return{x:new se(qe),y:new se(ze),gcd:new se(Ve)}}gcd(ke){let Ae=this.value;for(ke=ke.value;ke!==BigInt(0);){const Ce=ke;ke=Ae%ke,Ae=Ce}return new se(Ae)}ileftShift(ke){return this.value<<=ke.value,this}leftShift(ke){return this.clone().ileftShift(ke)}irightShift(ke){return this.value>>=ke.value,this}rightShift(ke){return this.clone().irightShift(ke)}equal(ke){return this.value===ke.value}lt(ke){return this.value<ke.value}lte(ke){return this.value<=ke.value}gt(ke){return this.value>ke.value}gte(ke){return this.value>=ke.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 ke=this.clone();return this.isNegative()&&(ke.value=-ke.value),ke}toString(){return this.value.toString()}toNumber(){const ke=Number(this.value);if(ke>Number.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return ke}getBit(ke){return(this.value>>BigInt(ke)&BigInt(1))===BigInt(0)?0:1}bitLength(){const ke=new se(0),Ae=new se(1),Ce=new se(-1),qe=this.isNegative()?Ce:ke;let ze=1;const Ve=this.clone();for(;!Ve.irightShift(Ae).equal(qe);)ze++;return ze}byteLength(){const ke=new se(0),Ae=new se(-1),Ce=this.isNegative()?Ae:ke,qe=new se(8);let ze=1;const Ve=this.clone();for(;!Ve.irightShift(qe).equal(Ce);)ze++;return ze}toUint8Array(ke="be",Ae){let Ce=this.value.toString(16);Ce.length%2==1&&(Ce="0"+Ce);const qe=Ce.length/2,ze=new Uint8Array(Ae||qe),Ve=Ae?Ae-qe:0;let tt=0;for(;tt<qe;)ze[tt+Ve]=parseInt(Ce.slice(2*tt,2*tt+2),16),tt++;return"be"!==ke&&ze.reverse(),ze}}const Vt=(()=>{try{return"development"===process.env.NODE_ENV}catch(ke){}return!1})(),Zt={isString:function(ke){return"string"==typeof ke||String.prototype.isPrototypeOf(ke)},isArray:function(ke){return Array.prototype.isPrototypeOf(ke)},isUint8Array:P,isStream:E,readNumber:function(ke){let Ae=0;for(let Ce=0;Ce<ke.length;Ce++)Ae+=256**Ce*ke[ke.length-1-Ce];return Ae},writeNumber:function(ke,Ae){const Ce=new Uint8Array(Ae);for(let qe=0;qe<Ae;qe++)Ce[qe]=ke>>8*(Ae-qe-1)&255;return Ce},readDate:function(ke){const Ae=Zt.readNumber(ke);return new Date(1e3*Ae)},writeDate:function(ke){const Ae=Math.floor(ke.getTime()/1e3);return Zt.writeNumber(Ae,4)},normalizeDate:function(ke=Date.now()){return null===ke||ke===1/0?ke:new Date(1e3*Math.floor(+ke/1e3))},readMPI:function(ke){const Ae=(ke[0]<<8|ke[1])+7>>>3;return ke.subarray(2,2+Ae)},leftPad(ke,Ae){const Ce=new Uint8Array(Ae),qe=Ae-ke.length;return Ce.set(ke,qe),Ce},uint8ArrayToMPI:function(ke){const Ae=Zt.uint8ArrayBitLength(ke);if(0===Ae)throw Error("Zero MPI");const Ce=ke.subarray(ke.length-Math.ceil(Ae/8)),qe=new Uint8Array([(65280&Ae)>>8,255&Ae]);return Zt.concatUint8Array([qe,Ce])},uint8ArrayBitLength:function(ke){let Ae;for(Ae=0;Ae<ke.length&&0===ke[Ae];Ae++);if(Ae===ke.length)return 0;const Ce=ke.subarray(Ae);return 8*(Ce.length-1)+Zt.nbits(Ce[0])},hexToUint8Array:function(ke){const Ae=new Uint8Array(ke.length>>1);for(let Ce=0;Ce<ke.length>>1;Ce++)Ae[Ce]=parseInt(ke.substr(Ce<<1,2),16);return Ae},uint8ArrayToHex:function(ke){const Ae=[],Ce=ke.length;let qe,ze=0;for(;ze<Ce;){for(qe=ke[ze++].toString(16);qe.length<2;)qe="0"+qe;Ae.push(""+qe)}return Ae.join("")},stringToUint8Array:function(ke){return Y(ke,(ke=>{if(!Zt.isString(ke))throw Error("stringToUint8Array: Data must be in the form of a string");const Ae=new Uint8Array(ke.length);for(let Ce=0;Ce<ke.length;Ce++)Ae[Ce]=ke.charCodeAt(Ce);return Ae}))},uint8ArrayToString:function(ke){const Ae=[],Ce=16384,qe=(ke=new Uint8Array(ke)).length;for(let ze=0;ze<qe;ze+=Ce)Ae.push(String.fromCharCode.apply(String,ke.subarray(ze,ze+Ce<qe?ze+Ce:qe)));return Ae.join("")},encodeUTF8:function(ke){const Ae=new TextEncoder("utf-8");function r(ke,Ce=!1){return Ae.encode(ke,{stream:!Ce})}return Y(ke,r,(()=>r("",!0)))},decodeUTF8:function(ke){const Ae=new TextDecoder("utf-8");function r(ke,Ce=!1){return Ae.decode(ke,{stream:!Ce})}return Y(ke,r,(()=>r(new Uint8Array,!0)))},concat:W,concatUint8Array:x,equalsUint8Array:function(ke,Ae){if(!Zt.isUint8Array(ke)||!Zt.isUint8Array(Ae))throw Error("Data must be in the form of a Uint8Array");if(ke.length!==Ae.length)return!1;for(let Ce=0;Ce<ke.length;Ce++)if(ke[Ce]!==Ae[Ce])return!1;return!0},writeChecksum:function(ke){let Ae=0;for(let Ce=0;Ce<ke.length;Ce++)Ae=Ae+ke[Ce]&65535;return Zt.writeNumber(Ae,2)},printDebug:function(ke){Vt&&console.log("[OpenPGP.js debug]",ke)},printDebugError:function(ke){Vt&&console.error("[OpenPGP.js debug]",ke)},nbits:function(ke){let Ae=1,Ce=ke>>>16;return 0!==Ce&&(ke=Ce,Ae+=16),Ce=ke>>8,0!==Ce&&(ke=Ce,Ae+=8),Ce=ke>>4,0!==Ce&&(ke=Ce,Ae+=4),Ce=ke>>2,0!==Ce&&(ke=Ce,Ae+=2),Ce=ke>>1,0!==Ce&&(ke=Ce,Ae+=1),Ae},double:function(ke){const Ae=new Uint8Array(ke.length),Ce=ke.length-1;for(let qe=0;qe<Ce;qe++)Ae[qe]=ke[qe]<<1^ke[qe+1]>>7;return Ae[Ce]=ke[Ce]<<1^135*(ke[0]>>7),Ae},shiftRight:function(ke,Ae){if(Ae)for(let Ce=ke.length-1;Ce>=0;Ce--)ke[Ce]>>=Ae,Ce>0&&(ke[Ce]|=ke[Ce-1]<<8-Ae);return ke},getWebCrypto:function(){return void 0!==qe&&qe.crypto&&qe.crypto.subtle},detectBigInt:()=>"undefined"!=typeof BigInt,getBigInteger:async function(){if(Zt.detectBigInt())return se;{const{default:ke}=await Promise.resolve().then((function(){return Zd}));return ke}},getNodeCrypto:function(){return ft.default},getNodeZlib:function(){return yt.default},getNodeBuffer:function(){return(ct.default||{}).Buffer},getHardwareConcurrency:function(){if("undefined"!=typeof navigator)return navigator.hardwareConcurrency||1;return mt.default.cpus().length},isEmailAddress:function(ke){if(!Zt.isString(ke))return!1;return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/.test(ke)},canonicalizeEOL:function(ke){let Ae=!1;return Y(ke,(ke=>{let Ce;Ae&&(ke=Zt.concatUint8Array([new Uint8Array([13]),ke])),13===ke[ke.length-1]?(Ae=!0,ke=ke.subarray(0,-1)):Ae=!1;const qe=[];for(let Ae=0;Ce=ke.indexOf(10,Ae)+1,Ce;Ae=Ce)13!==ke[Ce-2]&&qe.push(Ce);if(!qe.length)return ke;const ze=new Uint8Array(ke.length+qe.length);let Ve=0;for(let Ae=0;Ae<qe.length;Ae++){const Ce=ke.subarray(qe[Ae-1]||0,qe[Ae]);ze.set(Ce,Ve),Ve+=Ce.length,ze[Ve-1]=13,ze[Ve]=10,Ve++}return ze.set(ke.subarray(qe[qe.length-1]||0),Ve),ze}),(()=>Ae?new Uint8Array([13]):void 0))},nativeEOL:function(ke){let Ae=!1;return Y(ke,(ke=>{let Ce;13===(ke=Ae&&10!==ke[0]?Zt.concatUint8Array([new Uint8Array([13]),ke]):new Uint8Array(ke))[ke.length-1]?(Ae=!0,ke=ke.subarray(0,-1)):Ae=!1;let qe=0;for(let Ae=0;Ae!==ke.length;Ae=Ce){Ce=ke.indexOf(13,Ae)+1,Ce||(Ce=ke.length);const ze=Ce-(10===ke[Ce]?1:0);Ae&&ke.copyWithin(qe,Ae,ze),qe+=ze-Ae}return ke.subarray(0,qe)}),(()=>Ae?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(ke){return ke.split("\n").map((ke=>{let Ae=ke.length-1;for(;Ae>=0&&(" "===ke[Ae]||"\t"===ke[Ae]||"\r"===ke[Ae]);Ae--);return ke.substr(0,Ae+1)})).join("\n")},wrapError:function(ke,Ae){if(!Ae)return Error(ke);try{Ae.message=ke+": "+Ae.message}catch(ke){}return Ae},constructAllowedPackets:function(ke){const Ae={};return ke.forEach((ke=>{if(!ke.tag)throw Error("Invalid input: expected a packet class");Ae[ke.tag]=ke})),Ae},anyPromise:function(ke){return new Promise((async(Ae,Ce)=>{let qe;await Promise.all(ke.map((async ke=>{try{Ae(await ke)}catch(ke){qe=ke}}))),Ce(qe)}))},selectUint8Array:function(ke,Ae,Ce){const qe=Math.max(Ae.length,Ce.length),ze=new Uint8Array(qe);let Ve=0;for(let qe=0;qe<ze.length;qe++)ze[qe]=Ae[qe]&256-ke|Ce[qe]&255+ke,Ve+=ke&qe<Ae.length|1-ke&qe<Ce.length;return ze.subarray(0,Ve)},selectUint8:function(ke,Ae,Ce){return Ae&256-ke|Ce&255+ke}},Yt=Zt.getNodeBuffer();let Jt,Xt;function de(ke){let Ae=new Uint8Array;return Y(ke,(ke=>{Ae=Zt.concatUint8Array([Ae,ke]);const Ce=[],qe=Math.floor(Ae.length/45),ze=45*qe,Ve=Jt(Ae.subarray(0,ze));for(let ke=0;ke<qe;ke++)Ce.push(Ve.substr(60*ke,60)),Ce.push("\n");return Ae=Ae.subarray(ze),Ce.join("")}),(()=>Ae.length?Jt(Ae)+"\n":""))}function le(ke){let Ae="";return Y(ke,(ke=>{Ae+=ke;let Ce=0;const qe=[" ","\t","\r","\n"];for(let ke=0;ke<qe.length;ke++){const ze=qe[ke];for(let ke=Ae.indexOf(ze);-1!==ke;ke=Ae.indexOf(ze,ke+1))Ce++}let ze=Ae.length;for(;ze>0&&(ze-Ce)%4!=0;ze--)qe.includes(Ae[ze])&&Ce--;const Ve=Xt(Ae.substr(0,ze));return Ae=Ae.substr(ze),Ve}),(()=>Xt(Ae)))}function pe(ke){return le(ke.replace(/-/g,"+").replace(/_/g,"/"))}function ye(ke,Ae){let Ce=de(ke).replace(/[\r\n]/g,"");return Ae&&(Ce=Ce.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),Ce}Yt?(Jt=ke=>Yt.from(ke).toString("base64"),Xt=ke=>{const Ae=Yt.from(ke,"base64");return new Uint8Array(Ae.buffer,Ae.byteOffset,Ae.byteLength)}):(Jt=ke=>btoa(Zt.uint8ArrayToString(ke)),Xt=ke=>Zt.stringToUint8Array(atob(ke)));const Qt=Symbol("byValue");var er={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(ke,Ae){if("number"==typeof Ae&&(Ae=this.read(ke,Ae)),void 0!==ke[Ae])return ke[Ae];throw Error("Invalid enum value.")},read:function(ke,Ae){if(ke[Qt]||(ke[Qt]=[],Object.entries(ke).forEach((([Ae,Ce])=>{ke[Qt][Ce]=Ae}))),void 0!==ke[Qt][Ae])return ke[Qt][Ae];throw Error("Invalid enum value.")}},tr={preferredHashAlgorithm:er.hash.sha256,preferredSymmetricAlgorithm:er.symmetric.aes256,preferredCompressionAlgorithm:er.compression.uncompressed,deflateLevel:6,aeadProtect:!1,preferredAEADAlgorithm:er.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([er.symmetric.aes128,er.symmetric.aes192,er.symmetric.aes256]),minBytesForWebCrypto:1e3,ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,showVersion:!1,showComment:!1,versionString:"OpenPGP.js 5.5.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:["preferred-email-encoding@pgp.com","pka-address@gnupg.org"],useIndutnyElliptic:!0,rejectHashAlgorithms:new Set([er.hash.md5,er.hash.ripemd]),rejectMessageHashAlgorithms:new Set([er.hash.md5,er.hash.ripemd,er.hash.sha1]),rejectPublicKeyAlgorithms:new Set([er.publicKey.elgamal,er.publicKey.dsa]),rejectCurves:new Set([er.curve.brainpoolP256r1,er.curve.brainpoolP384r1,er.curve.brainpoolP512r1,er.curve.secp256k1])};function we(ke){const Ae=ke.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!Ae)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(Ae[1])?er.armor.multipartSection:/MESSAGE, PART \d+/.test(Ae[1])?er.armor.multipartLast:/SIGNED MESSAGE/.test(Ae[1])?er.armor.signed:/MESSAGE/.test(Ae[1])?er.armor.message:/PUBLIC KEY BLOCK/.test(Ae[1])?er.armor.publicKey:/PRIVATE KEY BLOCK/.test(Ae[1])?er.armor.privateKey:/SIGNATURE/.test(Ae[1])?er.armor.signature:void 0}function ve(ke,Ae){let Ce="";return Ae.showVersion&&(Ce+="Version: "+Ae.versionString+"\n"),Ae.showComment&&(Ce+="Comment: "+Ae.commentString+"\n"),ke&&(Ce+="Comment: "+ke+"\n"),Ce+="\n",Ce}function _e(ke){return de(function(ke){let Ae=13501623;return Y(ke,(ke=>{const Ce=ir?Math.floor(ke.length/4):0,qe=new Uint32Array(ke.buffer,ke.byteOffset,Ce);for(let ke=0;ke<Ce;ke++)Ae^=qe[ke],Ae=rr[0][Ae>>24&255]^rr[1][Ae>>16&255]^rr[2][Ae>>8&255]^rr[3][Ae>>0&255];for(let qe=4*Ce;qe<ke.length;qe++)Ae=Ae>>8^rr[0][255&Ae^ke[qe]]}),(()=>new Uint8Array([Ae,Ae>>8,Ae>>16])))}(ke))}const rr=[Array(255),Array(255),Array(255),Array(255)];for(let ke=0;ke<=255;ke++){let Ae=ke<<16;for(let ke=0;ke<8;ke++)Ae=Ae<<1^(0!=(8388608&Ae)?8801531:0);rr[0][ke]=(16711680&Ae)>>16|65280&Ae|(255&Ae)<<16}for(let ke=0;ke<=255;ke++)rr[1][ke]=rr[0][ke]>>8^rr[0][255&rr[0][ke]];for(let ke=0;ke<=255;ke++)rr[2][ke]=rr[1][ke]>>8^rr[0][255&rr[1][ke]];for(let ke=0;ke<=255;ke++)rr[3][ke]=rr[2][ke]>>8^rr[0][255&rr[2][ke]];const ir=function(){const ke=new ArrayBuffer(2);return new DataView(ke).setInt16(0,255,!0),255===new Int16Array(ke)[0]}();function Se(ke){for(let Ae=0;Ae<ke.length;Ae++)/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(ke[Ae])||Zt.printDebugError(Error("Improperly formatted armor header: "+ke[Ae])),/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(ke[Ae])||Zt.printDebugError(Error("Unknown header: "+ke[Ae]))}function Ee(ke){let Ae=ke,Ce="";const qe=ke.lastIndexOf("=");return qe>=0&&qe!==ke.length-1&&(Ae=ke.slice(0,qe),Ce=ke.slice(qe+1).substr(0,4)),{body:Ae,checksum:Ce}}function Pe(ke,Ae=tr){return new Promise((async(Ce,qe)=>{try{const ze=/^-----[^-]+-----$/m,Ve=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let tt;const rt=[];let it,nt,ot,ct=rt,ht=[],ft=le(X(ke,(async(ke,Ae)=>{const yt=H(ke);try{for(;;){let ke=await yt.readLine();if(void 0===ke)throw Error("Misformed armored text");if(ke=Zt.removeTrailingSpaces(ke.replace(/[\r\n]/g,"")),tt)if(it)nt||2!==tt||(ze.test(ke)?(ht=ht.join("\r\n"),nt=!0,Se(ct),ct=[],it=!1):ht.push(ke.replace(/^- /,"")));else if(ze.test(ke)&&qe(Error("Mandatory blank line missing between armor headers and armor data")),Ve.test(ke)){if(Se(ct),it=!0,nt||2!==tt){Ce({text:ht,data:ft,headers:rt,type:tt});break}}else ct.push(ke);else ze.test(ke)&&(tt=we(ke))}}catch(ke){return void qe(ke)}const mt=G(Ae);try{for(;;){await mt.ready;const{done:ke,value:Ae}=await yt.read();if(ke)throw Error("Misformed armored text");const Ce=Ae+"";if(-1!==Ce.indexOf("=")||-1!==Ce.indexOf("-")){let ke=await yt.readToEnd();ke.length||(ke=""),ke=Ce+ke,ke=Zt.removeTrailingSpaces(ke.replace(/\r/g,""));const Ae=ke.split(ze);if(1===Ae.length)throw Error("Misformed armored text");const qe=Ee(Ae[0].slice(0,-1));ot=qe.checksum,await mt.write(qe.body);break}await mt.write(Ce)}await mt.ready,await mt.close()}catch(ke){await mt.abort(ke)}})));ft=X(ft,(async(ke,Ce)=>{const qe=ie(_e(ee(ke)));qe.catch((()=>{})),await V(ke,Ce,{preventClose:!0});const ze=G(Ce);try{const ke=(await qe).replace("\n","");if(ot!==ke&&(ot||Ae.checksumRequired))throw Error("Ascii armor integrity check failed");await ze.ready,await ze.close()}catch(ke){await ze.abort(ke)}}))}catch(ke){qe(ke)}})).then((async ke=>(_(ke.data)&&(ke.data=await ie(ke.data)),ke)))}function xe(ke,Ae,Ce,qe,ze,Ve=tr){let tt,rt;ke===er.armor.signed&&(tt=Ae.text,rt=Ae.hash,Ae=Ae.data);const it=ee(Ae),nt=[];switch(ke){case er.armor.multipartSection:nt.push("-----BEGIN PGP MESSAGE, PART "+Ce+"/"+qe+"-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP MESSAGE, PART "+Ce+"/"+qe+"-----\n");break;case er.armor.multipartLast:nt.push("-----BEGIN PGP MESSAGE, PART "+Ce+"-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP MESSAGE, PART "+Ce+"-----\n");break;case er.armor.signed:nt.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),nt.push("Hash: "+rt+"\n\n"),nt.push(tt.replace(/^-/gm,"- -")),nt.push("\n-----BEGIN PGP SIGNATURE-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP SIGNATURE-----\n");break;case er.armor.message:nt.push("-----BEGIN PGP MESSAGE-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP MESSAGE-----\n");break;case er.armor.publicKey:nt.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case er.armor.privateKey:nt.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case er.armor.signature:nt.push("-----BEGIN PGP SIGNATURE-----\n"),nt.push(ve(ze,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP SIGNATURE-----\n")}return Zt.concat(nt)}class Me{constructor(){this.bytes=""}read(ke){this.bytes=Zt.uint8ArrayToString(ke.subarray(0,8))}write(){return Zt.stringToUint8Array(this.bytes)}toHex(){return Zt.uint8ArrayToHex(Zt.stringToUint8Array(this.bytes))}equals(ke,Ae=!1){return Ae&&(ke.isWildcard()||this.isWildcard())||this.bytes===ke.bytes}isNull(){return""===this.bytes}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(ke){return ke.toHex()}static fromID(ke){const Ae=new Me;return Ae.read(Zt.hexToUint8Array(ke)),Ae}static wildcard(){const ke=new Me;return ke.read(new Uint8Array(8)),ke}}var nr=function(){var ke,Ae,Ce=!1;function i(Ce,qe){var ze=ke[(Ae[Ce]+Ae[qe])%255];return 0!==Ce&&0!==qe||(ze=0),ze}var qe,ze,Ve,tt,rt=!1;function u(){function u(Ce){var qe,ze,Ve;for(ze=Ve=function(Ce){var qe=ke[255-Ae[Ce]];return 0===Ce&&(qe=0),qe}(Ce),qe=0;qe<4;qe++)Ve^=ze=255&(ze<<1|ze>>>7);return Ve^=99}Ce||function(){ke=[],Ae=[];var qe,ze,Ve=1;for(qe=0;qe<255;qe++)ke[qe]=Ve,ze=128&Ve,Ve<<=1,Ve&=255,128===ze&&(Ve^=27),Ve^=ke[qe],Ae[ke[qe]]=qe;ke[255]=ke[0],Ae[0]=0,Ce=!0}(),qe=[],ze=[],Ve=[[],[],[],[]],tt=[[],[],[],[]];for(var it=0;it<256;it++){var nt=u(it);qe[it]=nt,ze[nt]=it,Ve[0][it]=i(2,nt)<<24|nt<<16|nt<<8|i(3,nt),tt[0][nt]=i(14,it)<<24|i(9,it)<<16|i(13,it)<<8|i(11,it);for(var ot=1;ot<4;ot++)Ve[ot][it]=Ve[ot-1][it]>>>8|Ve[ot-1][it]<<24,tt[ot][nt]=tt[ot-1][nt]>>>8|tt[ot-1][nt]<<24}rt=!0}var h=function(ke,Ae){rt||u();var Ce=new Uint32Array(Ae);Ce.set(qe,512),Ce.set(ze,768);for(var it=0;it<4;it++)Ce.set(Ve[it],4096+1024*it>>2),Ce.set(tt[it],8192+1024*it>>2);var nt=function(ke,Ae,Ce){"use asm";var qe=0,ze=0,Ve=0,tt=0,rt=0,it=0,nt=0,ot=0,ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0,Dt=0,Rt=0,Bt=0,Tt=0;var Ut=new ke.Uint32Array(Ce),Kt=new ke.Uint8Array(Ce);function P(ke,Ae,Ce,rt,it,nt,ot,ct){ke=ke|0;Ae=Ae|0;Ce=Ce|0;rt=rt|0;it=it|0;nt=nt|0;ot=ot|0;ct=ct|0;var ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0;ht=Ce|0x400,ft=Ce|0x800,yt=Ce|0xc00;it=it^Ut[(ke|0)>>2],nt=nt^Ut[(ke|4)>>2],ot=ot^Ut[(ke|8)>>2],ct=ct^Ut[(ke|12)>>2];for(Pt=16;(Pt|0)<=rt<<4;Pt=Pt+16|0){mt=Ut[(Ce|it>>22&1020)>>2]^Ut[(ht|nt>>14&1020)>>2]^Ut[(ft|ot>>6&1020)>>2]^Ut[(yt|ct<<2&1020)>>2]^Ut[(ke|Pt|0)>>2],kt=Ut[(Ce|nt>>22&1020)>>2]^Ut[(ht|ot>>14&1020)>>2]^Ut[(ft|ct>>6&1020)>>2]^Ut[(yt|it<<2&1020)>>2]^Ut[(ke|Pt|4)>>2],St=Ut[(Ce|ot>>22&1020)>>2]^Ut[(ht|ct>>14&1020)>>2]^Ut[(ft|it>>6&1020)>>2]^Ut[(yt|nt<<2&1020)>>2]^Ut[(ke|Pt|8)>>2],Et=Ut[(Ce|ct>>22&1020)>>2]^Ut[(ht|it>>14&1020)>>2]^Ut[(ft|nt>>6&1020)>>2]^Ut[(yt|ot<<2&1020)>>2]^Ut[(ke|Pt|12)>>2];it=mt,nt=kt,ot=St,ct=Et}qe=Ut[(Ae|it>>22&1020)>>2]<<24^Ut[(Ae|nt>>14&1020)>>2]<<16^Ut[(Ae|ot>>6&1020)>>2]<<8^Ut[(Ae|ct<<2&1020)>>2]^Ut[(ke|Pt|0)>>2],ze=Ut[(Ae|nt>>22&1020)>>2]<<24^Ut[(Ae|ot>>14&1020)>>2]<<16^Ut[(Ae|ct>>6&1020)>>2]<<8^Ut[(Ae|it<<2&1020)>>2]^Ut[(ke|Pt|4)>>2],Ve=Ut[(Ae|ot>>22&1020)>>2]<<24^Ut[(Ae|ct>>14&1020)>>2]<<16^Ut[(Ae|it>>6&1020)>>2]<<8^Ut[(Ae|nt<<2&1020)>>2]^Ut[(ke|Pt|8)>>2],tt=Ut[(Ae|ct>>22&1020)>>2]<<24^Ut[(Ae|it>>14&1020)>>2]<<16^Ut[(Ae|nt>>6&1020)>>2]<<8^Ut[(Ae|ot<<2&1020)>>2]^Ut[(ke|Pt|12)>>2]}function x(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;P(0x0000,0x0800,0x1000,Tt,ke,Ae,Ce,qe)}function M(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;var Ve=0;P(0x0400,0x0c00,0x2000,Tt,ke,qe,Ce,Ae);Ve=ze,ze=tt,tt=Ve}function C(ke,Ae,Ce,ct){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;P(0x0000,0x0800,0x1000,Tt,rt^ke,it^Ae,nt^Ce,ot^ct);rt=qe,it=ze,nt=Ve,ot=tt}function K(ke,Ae,Ce,ct){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;var ht=0;P(0x0400,0x0c00,0x2000,Tt,ke,ct,Ce,Ae);ht=ze,ze=tt,tt=ht;qe=qe^rt,ze=ze^it,Ve=Ve^nt,tt=tt^ot;rt=ke,it=Ae,nt=Ce,ot=ct}function D(ke,Ae,Ce,ct){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;P(0x0000,0x0800,0x1000,Tt,rt,it,nt,ot);rt=qe=qe^ke,it=ze=ze^Ae,nt=Ve=Ve^Ce,ot=tt=tt^ct}function R(ke,Ae,Ce,ct){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;P(0x0000,0x0800,0x1000,Tt,rt,it,nt,ot);qe=qe^ke,ze=ze^Ae,Ve=Ve^Ce,tt=tt^ct;rt=ke,it=Ae,nt=Ce,ot=ct}function U(ke,Ae,Ce,ct){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;P(0x0000,0x0800,0x1000,Tt,rt,it,nt,ot);rt=qe,it=ze,nt=Ve,ot=tt;qe=qe^ke,ze=ze^Ae,Ve=Ve^Ce,tt=tt^ct}function I(ke,Ae,Ce,rt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;rt=rt|0;P(0x0000,0x0800,0x1000,Tt,ct,ht,ft,yt);yt=~Et&yt|Et&yt+1;ft=~St&ft|St&ft+((yt|0)==0);ht=~kt&ht|kt&ht+((ft|0)==0);ct=~mt&ct|mt&ct+((ht|0)==0);qe=qe^ke;ze=ze^Ae;Ve=Ve^Ce;tt=tt^rt}function B(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;var ze=0,Ve=0,tt=0,ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0;ke=ke^rt,Ae=Ae^it,Ce=Ce^nt,qe=qe^ot;ze=Pt|0,Ve=Dt|0,tt=Rt|0,ct=Bt|0;for(;(kt|0)<128;kt=kt+1|0){if(ze>>>31){ht=ht^ke,ft=ft^Ae,yt=yt^Ce,mt=mt^qe}ze=ze<<1|Ve>>>31,Ve=Ve<<1|tt>>>31,tt=tt<<1|ct>>>31,ct=ct<<1;St=qe&1;qe=qe>>>1|Ce<<31,Ce=Ce>>>1|Ae<<31,Ae=Ae>>>1|ke<<31,ke=ke>>>1;if(St)ke=ke^0xe1000000}rt=ht,it=ft,nt=yt,ot=mt}function T(ke){ke=ke|0;Tt=ke}function z(ke,Ae,Ce,rt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;rt=rt|0;qe=ke,ze=Ae,Ve=Ce,tt=rt}function q(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;rt=ke,it=Ae,nt=Ce,ot=qe}function O(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;ct=ke,ht=Ae,ft=Ce,yt=qe}function F(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;mt=ke,kt=Ae,St=Ce,Et=qe}function N(ke,Ae,Ce,qe){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qe=qe|0;yt=~Et&yt|Et&qe,ft=~St&ft|St&Ce,ht=~kt&ht|kt&Ae,ct=~mt&ct|mt&ke}function j(ke){ke=ke|0;if(ke&15)return-1;Kt[ke|0]=qe>>>24,Kt[ke|1]=qe>>>16&255,Kt[ke|2]=qe>>>8&255,Kt[ke|3]=qe&255,Kt[ke|4]=ze>>>24,Kt[ke|5]=ze>>>16&255,Kt[ke|6]=ze>>>8&255,Kt[ke|7]=ze&255,Kt[ke|8]=Ve>>>24,Kt[ke|9]=Ve>>>16&255,Kt[ke|10]=Ve>>>8&255,Kt[ke|11]=Ve&255,Kt[ke|12]=tt>>>24,Kt[ke|13]=tt>>>16&255,Kt[ke|14]=tt>>>8&255,Kt[ke|15]=tt&255;return 16}function L(ke){ke=ke|0;if(ke&15)return-1;Kt[ke|0]=rt>>>24,Kt[ke|1]=rt>>>16&255,Kt[ke|2]=rt>>>8&255,Kt[ke|3]=rt&255,Kt[ke|4]=it>>>24,Kt[ke|5]=it>>>16&255,Kt[ke|6]=it>>>8&255,Kt[ke|7]=it&255,Kt[ke|8]=nt>>>24,Kt[ke|9]=nt>>>16&255,Kt[ke|10]=nt>>>8&255,Kt[ke|11]=nt&255,Kt[ke|12]=ot>>>24,Kt[ke|13]=ot>>>16&255,Kt[ke|14]=ot>>>8&255,Kt[ke|15]=ot&255;return 16}function W(){x(0,0,0,0);Pt=qe,Dt=ze,Rt=Ve,Bt=tt}function H(ke,Ae,Ce){ke=ke|0;Ae=Ae|0;Ce=Ce|0;var rt=0;if(Ae&15)return-1;while((Ce|0)>=16){It[ke&7](Kt[Ae|0]<<24|Kt[Ae|1]<<16|Kt[Ae|2]<<8|Kt[Ae|3],Kt[Ae|4]<<24|Kt[Ae|5]<<16|Kt[Ae|6]<<8|Kt[Ae|7],Kt[Ae|8]<<24|Kt[Ae|9]<<16|Kt[Ae|10]<<8|Kt[Ae|11],Kt[Ae|12]<<24|Kt[Ae|13]<<16|Kt[Ae|14]<<8|Kt[Ae|15]);Kt[Ae|0]=qe>>>24,Kt[Ae|1]=qe>>>16&255,Kt[Ae|2]=qe>>>8&255,Kt[Ae|3]=qe&255,Kt[Ae|4]=ze>>>24,Kt[Ae|5]=ze>>>16&255,Kt[Ae|6]=ze>>>8&255,Kt[Ae|7]=ze&255,Kt[Ae|8]=Ve>>>24,Kt[Ae|9]=Ve>>>16&255,Kt[Ae|10]=Ve>>>8&255,Kt[Ae|11]=Ve&255,Kt[Ae|12]=tt>>>24,Kt[Ae|13]=tt>>>16&255,Kt[Ae|14]=tt>>>8&255,Kt[Ae|15]=tt&255;rt=rt+16|0,Ae=Ae+16|0,Ce=Ce-16|0}return rt|0}function G(ke,Ae,Ce){ke=ke|0;Ae=Ae|0;Ce=Ce|0;var qe=0;if(Ae&15)return-1;while((Ce|0)>=16){Ot[ke&1](Kt[Ae|0]<<24|Kt[Ae|1]<<16|Kt[Ae|2]<<8|Kt[Ae|3],Kt[Ae|4]<<24|Kt[Ae|5]<<16|Kt[Ae|6]<<8|Kt[Ae|7],Kt[Ae|8]<<24|Kt[Ae|9]<<16|Kt[Ae|10]<<8|Kt[Ae|11],Kt[Ae|12]<<24|Kt[Ae|13]<<16|Kt[Ae|14]<<8|Kt[Ae|15]);qe=qe+16|0,Ae=Ae+16|0,Ce=Ce-16|0}return qe|0}var It=[x,M,C,K,D,R,U,I];var Ot=[C,B];return{set_rounds:T,set_state:z,set_iv:q,set_nonce:O,set_mask:F,set_counter:N,get_state:j,get_iv:L,gcm_init:W,cipher:H,mac:G}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},ke,Ae);return nt.set_key=function(ke,Ae,ze,Ve,rt,it,ot,ct,ht){var ft=Ce.subarray(0,60),yt=Ce.subarray(256,316);ft.set([Ae,ze,Ve,rt,it,ot,ct,ht]);for(var mt=ke,kt=1;mt<4*ke+28;mt++){var St=ft[mt-1];(mt%ke==0||8===ke&&mt%ke==4)&&(St=qe[St>>>24]<<24^qe[St>>>16&255]<<16^qe[St>>>8&255]<<8^qe[255&St]),mt%ke==0&&(St=St<<8^St>>>24^kt<<24,kt=kt<<1^(128&kt?27:0)),ft[mt]=ft[mt-ke]^St}for(var Et=0;Et<mt;Et+=4)for(var Pt=0;Pt<4;Pt++){St=ft[mt-(4+Et)+(4-Pt)%4];yt[Et+Pt]=Et<4||Et>=mt-4?St:tt[0][qe[St>>>24]]^tt[1][qe[St>>>16&255]]^tt[2][qe[St>>>8&255]]^tt[3][qe[255&St]]}nt.set_rounds(ke+5)},nt};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 Ke(ke){return ke instanceof Uint8Array}function De(ke,Ae){const Ce=ke?ke.byteLength:Ae||65536;if(4095&Ce||Ce<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return ke=ke||new Uint8Array(new ArrayBuffer(Ce))}function Re(ke,Ae,Ce,qe,ze){const Ve=ke.length-Ae,tt=Ve<ze?Ve:ze;return ke.set(Ce.subarray(qe,qe+tt),Ae),tt}function Ue(...ke){const Ae=ke.reduce(((ke,Ae)=>ke+Ae.length),0),Ce=new Uint8Array(Ae);let qe=0;for(let Ae=0;Ae<ke.length;Ae++)Ce.set(ke[Ae],qe),qe+=ke[Ae].length;return Ce}class Ie extends Error{constructor(...ke){super(...ke)}}class Be extends Error{constructor(...ke){super(...ke)}}class Te extends Error{constructor(...ke){super(...ke)}}const sr=[],vr=[];class Oe{constructor(ke,Ae,Ce=!0,qe,ze,Ve){this.pos=0,this.len=0,this.mode=qe,this.pos=0,this.len=0,this.key=ke,this.iv=Ae,this.padding=Ce,this.acquire_asm(ze,Ve)}acquire_asm(ke,Ae){return void 0!==this.heap&&void 0!==this.asm||(this.heap=ke||sr.pop()||De().subarray(nr.HEAP_DATA),this.asm=Ae||vr.pop()||new nr(null,this.heap.buffer),this.reset(this.key,this.iv)),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(sr.push(this.heap),vr.push(this.asm)),this.heap=void 0,this.asm=void 0}reset(ke,Ae){const{asm:Ce}=this.acquire_asm(),qe=ke.length;if(16!==qe&&24!==qe&&32!==qe)throw new Be("illegal key size");const ze=new DataView(ke.buffer,ke.byteOffset,ke.byteLength);if(Ce.set_key(qe>>2,ze.getUint32(0),ze.getUint32(4),ze.getUint32(8),ze.getUint32(12),qe>16?ze.getUint32(16):0,qe>16?ze.getUint32(20):0,qe>24?ze.getUint32(24):0,qe>24?ze.getUint32(28):0),void 0!==Ae){if(16!==Ae.length)throw new Be("illegal iv size");let ke=new DataView(Ae.buffer,Ae.byteOffset,Ae.byteLength);Ce.set_iv(ke.getUint32(0),ke.getUint32(4),ke.getUint32(8),ke.getUint32(12))}else Ce.set_iv(0,0,0,0)}AES_Encrypt_process(ke){if(!Ke(ke))throw new TypeError("data isn't of expected type");let{heap:Ae,asm:Ce}=this.acquire_asm(),qe=nr.ENC[this.mode],ze=nr.HEAP_DATA,Ve=this.pos,tt=this.len,rt=0,it=ke.length||0,nt=0,ot=0,ct=new Uint8Array(tt+it&-16);for(;it>0;)ot=Re(Ae,Ve+tt,ke,rt,it),tt+=ot,rt+=ot,it-=ot,ot=Ce.cipher(qe,ze+Ve,tt),ot&&ct.set(Ae.subarray(Ve,Ve+ot),nt),nt+=ot,ot<tt?(Ve+=ot,tt-=ot):(Ve=0,tt=0);return this.pos=Ve,this.len=tt,ct}AES_Encrypt_finish(){let{heap:ke,asm:Ae}=this.acquire_asm(),Ce=nr.ENC[this.mode],qe=nr.HEAP_DATA,ze=this.pos,Ve=this.len,tt=16-Ve%16,rt=Ve;if(this.hasOwnProperty("padding")){if(this.padding){for(let Ae=0;Ae<tt;++Ae)ke[ze+Ve+Ae]=tt;Ve+=tt,rt=Ve}else if(Ve%16)throw new Be("data length must be a multiple of the block size")}else Ve+=tt;const it=new Uint8Array(rt);return Ve&&Ae.cipher(Ce,qe+ze,Ve),rt&&it.set(ke.subarray(ze,ze+rt)),this.pos=0,this.len=0,this.release_asm(),it}AES_Decrypt_process(ke){if(!Ke(ke))throw new TypeError("data isn't of expected type");let{heap:Ae,asm:Ce}=this.acquire_asm(),qe=nr.DEC[this.mode],ze=nr.HEAP_DATA,Ve=this.pos,tt=this.len,rt=0,it=ke.length||0,nt=0,ot=tt+it&-16,ct=0,ht=0;this.padding&&(ct=tt+it-ot||16,ot-=ct);const ft=new Uint8Array(ot);for(;it>0;)ht=Re(Ae,Ve+tt,ke,rt,it),tt+=ht,rt+=ht,it-=ht,ht=Ce.cipher(qe,ze+Ve,tt-(it?0:ct)),ht&&ft.set(Ae.subarray(Ve,Ve+ht),nt),nt+=ht,ht<tt?(Ve+=ht,tt-=ht):(Ve=0,tt=0);return this.pos=Ve,this.len=tt,ft}AES_Decrypt_finish(){let{heap:ke,asm:Ae}=this.acquire_asm(),Ce=nr.DEC[this.mode],qe=nr.HEAP_DATA,ze=this.pos,Ve=this.len,tt=Ve;if(Ve>0){if(Ve%16){if(this.hasOwnProperty("padding"))throw new Be("data length must be a multiple of the block size");Ve+=16-Ve%16}if(Ae.cipher(Ce,qe+ze,Ve),this.hasOwnProperty("padding")&&this.padding){let Ae=ke[ze+tt-1];if(Ae<1||Ae>16||Ae>tt)throw new Te("bad padding");let Ce=0;for(let qe=Ae;qe>1;qe--)Ce|=Ae^ke[ze+tt-qe];if(Ce)throw new Te("bad padding");tt-=Ae}}const rt=new Uint8Array(tt);return tt>0&&rt.set(ke.subarray(ze,ze+tt)),this.pos=0,this.len=0,this.release_asm(),rt}}class Fe{static encrypt(ke,Ae,Ce=!1){return new Fe(Ae,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce=!1){return new Fe(Ae,Ce).decrypt(ke)}constructor(ke,Ae=!1,Ce){this.aes=Ce||new Oe(ke,void 0,Ae,"ECB")}encrypt(ke){return Ue(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ue(this.aes.AES_Decrypt_process(ke),this.aes.AES_Decrypt_finish())}}function Ne(ke){const t=function(ke){const Ae=new Fe(ke);this.encrypt=function(ke){return Ae.encrypt(ke)},this.decrypt=function(ke){return Ae.decrypt(ke)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=ke/8,t}function je(ke,Ae,Ce,qe,ze,Ve){const tt=[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],rt=[-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],it=[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],nt=[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],ot=[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],ct=[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],ht=[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],ft=[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 yt,mt,kt,St,Et,Pt,Dt,Rt,Bt,Tt,Ut,Kt,It,Ot,Nt=0,qt=Ae.length;const zt=32===ke.length?3:9;Rt=3===zt?Ce?[0,32,2]:[30,-2,-2]:Ce?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],Ce&&(qt=(Ae=function(ke,Ae){const Ce=8-ke.length%8;let qe;if(2===Ae&&Ce<8)qe=32;else if(1===Ae)qe=Ce;else{if(Ae||!(Ce<8)){if(8===Ce)return ke;throw Error("des: invalid padding")}qe=0}const ze=new Uint8Array(ke.length+Ce);for(let Ae=0;Ae<ke.length;Ae++)ze[Ae]=ke[Ae];for(let Ae=0;Ae<Ce;Ae++)ze[ke.length+Ae]=qe;return ze}(Ae,Ve)).length);let Ft=new Uint8Array(qt),Lt=0;for(1===qe&&(Bt=ze[Nt++]<<24|ze[Nt++]<<16|ze[Nt++]<<8|ze[Nt++],Ut=ze[Nt++]<<24|ze[Nt++]<<16|ze[Nt++]<<8|ze[Nt++],Nt=0);Nt<qt;){for(Pt=Ae[Nt++]<<24|Ae[Nt++]<<16|Ae[Nt++]<<8|Ae[Nt++],Dt=Ae[Nt++]<<24|Ae[Nt++]<<16|Ae[Nt++]<<8|Ae[Nt++],1===qe&&(Ce?(Pt^=Bt,Dt^=Ut):(Tt=Bt,Kt=Ut,Bt=Pt,Ut=Dt)),kt=252645135&(Pt>>>4^Dt),Dt^=kt,Pt^=kt<<4,kt=65535&(Pt>>>16^Dt),Dt^=kt,Pt^=kt<<16,kt=858993459&(Dt>>>2^Pt),Pt^=kt,Dt^=kt<<2,kt=16711935&(Dt>>>8^Pt),Pt^=kt,Dt^=kt<<8,kt=1431655765&(Pt>>>1^Dt),Dt^=kt,Pt^=kt<<1,Pt=Pt<<1|Pt>>>31,Dt=Dt<<1|Dt>>>31,mt=0;mt<zt;mt+=3){for(It=Rt[mt+1],Ot=Rt[mt+2],yt=Rt[mt];yt!==It;yt+=Ot)St=Dt^ke[yt],Et=(Dt>>>4|Dt<<28)^ke[yt+1],kt=Pt,Pt=Dt,Dt=kt^(rt[St>>>24&63]|nt[St>>>16&63]|ct[St>>>8&63]|ft[63&St]|tt[Et>>>24&63]|it[Et>>>16&63]|ot[Et>>>8&63]|ht[63&Et]);kt=Pt,Pt=Dt,Dt=kt}Pt=Pt>>>1|Pt<<31,Dt=Dt>>>1|Dt<<31,kt=1431655765&(Pt>>>1^Dt),Dt^=kt,Pt^=kt<<1,kt=16711935&(Dt>>>8^Pt),Pt^=kt,Dt^=kt<<8,kt=858993459&(Dt>>>2^Pt),Pt^=kt,Dt^=kt<<2,kt=65535&(Pt>>>16^Dt),Dt^=kt,Pt^=kt<<16,kt=252645135&(Pt>>>4^Dt),Dt^=kt,Pt^=kt<<4,1===qe&&(Ce?(Bt=Pt,Ut=Dt):(Pt^=Tt,Dt^=Kt)),Ft[Lt++]=Pt>>>24,Ft[Lt++]=Pt>>>16&255,Ft[Lt++]=Pt>>>8&255,Ft[Lt++]=255&Pt,Ft[Lt++]=Dt>>>24,Ft[Lt++]=Dt>>>16&255,Ft[Lt++]=Dt>>>8&255,Ft[Lt++]=255&Dt}return Ce||(Ft=function(ke,Ae){let Ce,qe=null;if(2===Ae)Ce=32;else if(1===Ae)qe=ke[ke.length-1];else{if(Ae)throw Error("des: invalid padding");Ce=0}if(!qe){for(qe=1;ke[ke.length-qe]===Ce;)qe++;qe--}return ke.subarray(0,ke.length-qe)}(Ft,Ve)),Ft}function Le(ke){const Ae=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],Ce=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],qe=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],ze=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],Ve=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],tt=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],rt=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],it=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],nt=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],ot=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],ct=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],ht=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],ft=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],yt=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],mt=ke.length>8?3:1,kt=Array(32*mt),St=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let Et,Pt,Dt,Rt=0,Bt=0;for(let Tt=0;Tt<mt;Tt++){let mt=ke[Rt++]<<24|ke[Rt++]<<16|ke[Rt++]<<8|ke[Rt++],Tt=ke[Rt++]<<24|ke[Rt++]<<16|ke[Rt++]<<8|ke[Rt++];Dt=252645135&(mt>>>4^Tt),Tt^=Dt,mt^=Dt<<4,Dt=65535&(Tt>>>-16^mt),mt^=Dt,Tt^=Dt<<-16,Dt=858993459&(mt>>>2^Tt),Tt^=Dt,mt^=Dt<<2,Dt=65535&(Tt>>>-16^mt),mt^=Dt,Tt^=Dt<<-16,Dt=1431655765&(mt>>>1^Tt),Tt^=Dt,mt^=Dt<<1,Dt=16711935&(Tt>>>8^mt),mt^=Dt,Tt^=Dt<<8,Dt=1431655765&(mt>>>1^Tt),Tt^=Dt,mt^=Dt<<1,Dt=mt<<8|Tt>>>20&240,mt=Tt<<24|Tt<<8&16711680|Tt>>>8&65280|Tt>>>24&240,Tt=Dt;for(let ke=0;ke<16;ke++)St[ke]?(mt=mt<<2|mt>>>26,Tt=Tt<<2|Tt>>>26):(mt=mt<<1|mt>>>27,Tt=Tt<<1|Tt>>>27),mt&=-15,Tt&=-15,Et=Ae[mt>>>28]|Ce[mt>>>24&15]|qe[mt>>>20&15]|ze[mt>>>16&15]|Ve[mt>>>12&15]|tt[mt>>>8&15]|rt[mt>>>4&15],Pt=it[Tt>>>28]|nt[Tt>>>24&15]|ot[Tt>>>20&15]|ct[Tt>>>16&15]|ht[Tt>>>12&15]|ft[Tt>>>8&15]|yt[Tt>>>4&15],Dt=65535&(Pt>>>16^Et),kt[Bt++]=Et^Dt,kt[Bt++]=Pt^Dt<<16}return kt}function We(ke){this.key=[];for(let Ae=0;Ae<3;Ae++)this.key.push(new Uint8Array(ke.subarray(8*Ae,8*Ae+8)));this.encrypt=function(ke){return je(Le(this.key[2]),je(Le(this.key[1]),je(Le(this.key[0]),ke,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function He(){this.BlockSize=8,this.KeySize=16,this.setKey=function(ke){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),ke.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(ke),!0},this.reset=function(){for(let ke=0;ke<16;ke++)this.masking[ke]=0,this.rotate[ke]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(ke){const Ae=Array(ke.length);for(let Ce=0;Ce<ke.length;Ce+=8){let qe,ze=ke[Ce]<<24|ke[Ce+1]<<16|ke[Ce+2]<<8|ke[Ce+3],Ve=ke[Ce+4]<<24|ke[Ce+5]<<16|ke[Ce+6]<<8|ke[Ce+7];qe=Ve,Ve=ze^r(Ve,this.masking[0],this.rotate[0]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[1],this.rotate[1]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[2],this.rotate[2]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[3],this.rotate[3]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[4],this.rotate[4]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[5],this.rotate[5]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[6],this.rotate[6]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[7],this.rotate[7]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[8],this.rotate[8]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[9],this.rotate[9]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[10],this.rotate[10]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[11],this.rotate[11]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[12],this.rotate[12]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[13],this.rotate[13]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[14],this.rotate[14]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[15],this.rotate[15]),ze=qe,Ae[Ce]=Ve>>>24&255,Ae[Ce+1]=Ve>>>16&255,Ae[Ce+2]=Ve>>>8&255,Ae[Ce+3]=255&Ve,Ae[Ce+4]=ze>>>24&255,Ae[Ce+5]=ze>>>16&255,Ae[Ce+6]=ze>>>8&255,Ae[Ce+7]=255&ze}return Ae},this.decrypt=function(ke){const Ae=Array(ke.length);for(let Ce=0;Ce<ke.length;Ce+=8){let qe,ze=ke[Ce]<<24|ke[Ce+1]<<16|ke[Ce+2]<<8|ke[Ce+3],Ve=ke[Ce+4]<<24|ke[Ce+5]<<16|ke[Ce+6]<<8|ke[Ce+7];qe=Ve,Ve=ze^r(Ve,this.masking[15],this.rotate[15]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[14],this.rotate[14]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[13],this.rotate[13]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[12],this.rotate[12]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[11],this.rotate[11]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[10],this.rotate[10]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[9],this.rotate[9]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[8],this.rotate[8]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[7],this.rotate[7]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[6],this.rotate[6]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[5],this.rotate[5]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[4],this.rotate[4]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[3],this.rotate[3]),ze=qe,qe=Ve,Ve=ze^n(Ve,this.masking[2],this.rotate[2]),ze=qe,qe=Ve,Ve=ze^i(Ve,this.masking[1],this.rotate[1]),ze=qe,qe=Ve,Ve=ze^r(Ve,this.masking[0],this.rotate[0]),ze=qe,Ae[Ce]=Ve>>>24&255,Ae[Ce+1]=Ve>>>16&255,Ae[Ce+2]=Ve>>>8&255,Ae[Ce+3]=255&Ve,Ae[Ce+4]=ze>>>24&255,Ae[Ce+5]=ze>>16&255,Ae[Ce+6]=ze>>8&255,Ae[Ce+7]=255&ze}return Ae};const ke=[,,,,];ke[0]=[,,,,],ke[0][0]=[4,0,13,15,12,14,8],ke[0][1]=[5,2,16,18,17,19,10],ke[0][2]=[6,3,23,22,21,20,9],ke[0][3]=[7,1,26,25,27,24,11],ke[1]=[,,,,],ke[1][0]=[0,6,21,23,20,22,16],ke[1][1]=[1,4,0,2,1,3,18],ke[1][2]=[2,5,7,6,5,4,17],ke[1][3]=[3,7,10,9,11,8,19],ke[2]=[,,,,],ke[2][0]=[4,0,13,15,12,14,8],ke[2][1]=[5,2,16,18,17,19,10],ke[2][2]=[6,3,23,22,21,20,9],ke[2][3]=[7,1,26,25,27,24,11],ke[3]=[,,,,],ke[3][0]=[0,6,21,23,20,22,16],ke[3][1]=[1,4,0,2,1,3,18],ke[3][2]=[2,5,7,6,5,4,17],ke[3][3]=[3,7,10,9,11,8,19];const Ae=[,,,,];function r(ke,Ae,qe){const ze=Ae+ke,Ve=ze<<qe|ze>>>32-qe;return(Ce[0][Ve>>>24]^Ce[1][Ve>>>16&255])-Ce[2][Ve>>>8&255]+Ce[3][255&Ve]}function i(ke,Ae,qe){const ze=Ae^ke,Ve=ze<<qe|ze>>>32-qe;return Ce[0][Ve>>>24]-Ce[1][Ve>>>16&255]+Ce[2][Ve>>>8&255]^Ce[3][255&Ve]}function n(ke,Ae,qe){const ze=Ae-ke,Ve=ze<<qe|ze>>>32-qe;return(Ce[0][Ve>>>24]+Ce[1][Ve>>>16&255]^Ce[2][Ve>>>8&255])-Ce[3][255&Ve]}Ae[0]=[,,,,],Ae[0][0]=[24,25,23,22,18],Ae[0][1]=[26,27,21,20,22],Ae[0][2]=[28,29,19,18,25],Ae[0][3]=[30,31,17,16,28],Ae[1]=[,,,,],Ae[1][0]=[3,2,12,13,8],Ae[1][1]=[1,0,14,15,13],Ae[1][2]=[7,6,8,9,3],Ae[1][3]=[5,4,10,11,7],Ae[2]=[,,,,],Ae[2][0]=[19,18,28,29,25],Ae[2][1]=[17,16,30,31,28],Ae[2][2]=[23,22,24,25,18],Ae[2][3]=[21,20,26,27,22],Ae[3]=[,,,,],Ae[3][0]=[8,9,7,6,3],Ae[3][1]=[10,11,5,4,7],Ae[3][2]=[12,13,3,2,8],Ae[3][3]=[14,15,1,0,13],this.keySchedule=function(qe){const ze=[,,,,,,,,],Ve=Array(32);let tt;for(let ke=0;ke<4;ke++)tt=4*ke,ze[ke]=qe[tt]<<24|qe[tt+1]<<16|qe[tt+2]<<8|qe[tt+3];const rt=[6,7,4,5];let it,nt=0;for(let qe=0;qe<2;qe++)for(let qe=0;qe<4;qe++){for(tt=0;tt<4;tt++){const Ae=ke[qe][tt];it=ze[Ae[1]],it^=Ce[4][ze[Ae[2]>>>2]>>>24-8*(3&Ae[2])&255],it^=Ce[5][ze[Ae[3]>>>2]>>>24-8*(3&Ae[3])&255],it^=Ce[6][ze[Ae[4]>>>2]>>>24-8*(3&Ae[4])&255],it^=Ce[7][ze[Ae[5]>>>2]>>>24-8*(3&Ae[5])&255],it^=Ce[rt[tt]][ze[Ae[6]>>>2]>>>24-8*(3&Ae[6])&255],ze[Ae[0]]=it}for(tt=0;tt<4;tt++){const ke=Ae[qe][tt];it=Ce[4][ze[ke[0]>>>2]>>>24-8*(3&ke[0])&255],it^=Ce[5][ze[ke[1]>>>2]>>>24-8*(3&ke[1])&255],it^=Ce[6][ze[ke[2]>>>2]>>>24-8*(3&ke[2])&255],it^=Ce[7][ze[ke[3]>>>2]>>>24-8*(3&ke[3])&255],it^=Ce[4+tt][ze[ke[4]>>>2]>>>24-8*(3&ke[4])&255],Ve[nt]=it,nt++}}for(let ke=0;ke<16;ke++)this.masking[ke]=Ve[ke],this.rotate[ke]=31&Ve[16+ke]};const Ce=[,,,,,,,,];Ce[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],Ce[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],Ce[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],Ce[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],Ce[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],Ce[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],Ce[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],Ce[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 Ge(ke){this.cast5=new He,this.cast5.setKey(ke),this.encrypt=function(ke){return this.cast5.encrypt(ke)}}We.keySize=We.prototype.keySize=24,We.blockSize=We.prototype.blockSize=8,Ge.blockSize=Ge.prototype.blockSize=8,Ge.keySize=Ge.prototype.keySize=16;const _r=4294967295;function $e(ke,Ae){return(ke<<Ae|ke>>>32-Ae)&_r}function Ze(ke,Ae){return ke[Ae]|ke[Ae+1]<<8|ke[Ae+2]<<16|ke[Ae+3]<<24}function Ye(ke,Ae,Ce){ke.splice(Ae,4,255&Ce,Ce>>>8&255,Ce>>>16&255,Ce>>>24&255)}function Xe(ke,Ae){return ke>>>8*Ae&255}function Qe(ke){this.tf=function(){let ke=null,Ae=null,Ce=-1,qe=[],ze=[[],[],[],[]];function a(ke){return ze[0][Xe(ke,0)]^ze[1][Xe(ke,1)]^ze[2][Xe(ke,2)]^ze[3][Xe(ke,3)]}function s(ke){return ze[0][Xe(ke,3)]^ze[1][Xe(ke,0)]^ze[2][Xe(ke,1)]^ze[3][Xe(ke,2)]}function o(ke,Ae){let Ce=a(Ae[0]),ze=s(Ae[1]);Ae[2]=$e(Ae[2]^Ce+ze+qe[4*ke+8]&_r,31),Ae[3]=$e(Ae[3],1)^Ce+2*ze+qe[4*ke+9]&_r,Ce=a(Ae[2]),ze=s(Ae[3]),Ae[0]=$e(Ae[0]^Ce+ze+qe[4*ke+10]&_r,31),Ae[1]=$e(Ae[1],1)^Ce+2*ze+qe[4*ke+11]&_r}function c(ke,Ae){let Ce=a(Ae[0]),ze=s(Ae[1]);Ae[2]=$e(Ae[2],1)^Ce+ze+qe[4*ke+10]&_r,Ae[3]=$e(Ae[3]^Ce+2*ze+qe[4*ke+11]&_r,31),Ce=a(Ae[2]),ze=s(Ae[3]),Ae[0]=$e(Ae[0],1)^Ce+ze+qe[4*ke+8]&_r,Ae[1]=$e(Ae[1]^Ce+2*ze+qe[4*ke+9]&_r,31)}return{name:"twofish",blocksize:16,open:function(Ae){let Ce,Ve,tt,rt,it;ke=Ae;const nt=[],ot=[],ct=[];let ht;const ft=[];let yt,mt,kt;const St=[[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]],Et=[[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]],Pt=[[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]],Dt=[[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]],Rt=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],Bt=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],Tt=[[],[]],Ut=[[],[],[],[]];function E(ke){return ke^ke>>2^[0,90,180,238][3&ke]}function P(ke){return ke^ke>>1^ke>>2^[0,238,180,90][3&ke]}function x(ke,Ae){let Ce,qe,ze;for(Ce=0;Ce<8;Ce++)qe=Ae>>>24,Ae=Ae<<8&_r|ke>>>24,ke=ke<<8&_r,ze=qe<<1,128&qe&&(ze^=333),Ae^=qe^ze<<16,ze^=qe>>>1,1&qe&&(ze^=166),Ae^=ze<<24|ze<<8;return Ae}function M(ke,Ae){const Ce=Ae>>4,qe=15&Ae,ze=St[ke][Ce^qe],Ve=Et[ke][Rt[qe]^Bt[Ce]];return Dt[ke][Rt[Ve]^Bt[ze]]<<4|Pt[ke][ze^Ve]}function C(ke,Ae){let Ce=Xe(ke,0),qe=Xe(ke,1),ze=Xe(ke,2),Ve=Xe(ke,3);switch(ht){case 4:Ce=Tt[1][Ce]^Xe(Ae[3],0),qe=Tt[0][qe]^Xe(Ae[3],1),ze=Tt[0][ze]^Xe(Ae[3],2),Ve=Tt[1][Ve]^Xe(Ae[3],3);case 3:Ce=Tt[1][Ce]^Xe(Ae[2],0),qe=Tt[1][qe]^Xe(Ae[2],1),ze=Tt[0][ze]^Xe(Ae[2],2),Ve=Tt[0][Ve]^Xe(Ae[2],3);case 2:Ce=Tt[0][Tt[0][Ce]^Xe(Ae[1],0)]^Xe(Ae[0],0),qe=Tt[0][Tt[1][qe]^Xe(Ae[1],1)]^Xe(Ae[0],1),ze=Tt[1][Tt[0][ze]^Xe(Ae[1],2)]^Xe(Ae[0],2),Ve=Tt[1][Tt[1][Ve]^Xe(Ae[1],3)]^Xe(Ae[0],3)}return Ut[0][Ce]^Ut[1][qe]^Ut[2][ze]^Ut[3][Ve]}for(ke=ke.slice(0,32),Ce=ke.length;16!==Ce&&24!==Ce&&32!==Ce;)ke[Ce++]=0;for(Ce=0;Ce<ke.length;Ce+=4)ct[Ce>>2]=Ze(ke,Ce);for(Ce=0;Ce<256;Ce++)Tt[0][Ce]=M(0,Ce),Tt[1][Ce]=M(1,Ce);for(Ce=0;Ce<256;Ce++)yt=Tt[1][Ce],mt=E(yt),kt=P(yt),Ut[0][Ce]=yt+(mt<<8)+(kt<<16)+(kt<<24),Ut[2][Ce]=mt+(kt<<8)+(yt<<16)+(kt<<24),yt=Tt[0][Ce],mt=E(yt),kt=P(yt),Ut[1][Ce]=kt+(kt<<8)+(mt<<16)+(yt<<24),Ut[3][Ce]=mt+(yt<<8)+(kt<<16)+(mt<<24);for(ht=ct.length/2,Ce=0;Ce<ht;Ce++)Ve=ct[Ce+Ce],nt[Ce]=Ve,tt=ct[Ce+Ce+1],ot[Ce]=tt,ft[ht-Ce-1]=x(Ve,tt);for(Ce=0;Ce<40;Ce+=2)Ve=16843009*Ce,tt=Ve+16843009,Ve=C(Ve,nt),tt=$e(C(tt,ot),8),qe[Ce]=Ve+tt&_r,qe[Ce+1]=$e(Ve+2*tt,9);for(Ce=0;Ce<256;Ce++)switch(Ve=tt=rt=it=Ce,ht){case 4:Ve=Tt[1][Ve]^Xe(ft[3],0),tt=Tt[0][tt]^Xe(ft[3],1),rt=Tt[0][rt]^Xe(ft[3],2),it=Tt[1][it]^Xe(ft[3],3);case 3:Ve=Tt[1][Ve]^Xe(ft[2],0),tt=Tt[1][tt]^Xe(ft[2],1),rt=Tt[0][rt]^Xe(ft[2],2),it=Tt[0][it]^Xe(ft[2],3);case 2:ze[0][Ce]=Ut[0][Tt[0][Tt[0][Ve]^Xe(ft[1],0)]^Xe(ft[0],0)],ze[1][Ce]=Ut[1][Tt[0][Tt[1][tt]^Xe(ft[1],1)]^Xe(ft[0],1)],ze[2][Ce]=Ut[2][Tt[1][Tt[0][rt]^Xe(ft[1],2)]^Xe(ft[0],2)],ze[3][Ce]=Ut[3][Tt[1][Tt[1][it]^Xe(ft[1],3)]^Xe(ft[0],3)]}},close:function(){qe=[],ze=[[],[],[],[]]},encrypt:function(ke,ze){Ae=ke,Ce=ze;const Ve=[Ze(Ae,Ce)^qe[0],Ze(Ae,Ce+4)^qe[1],Ze(Ae,Ce+8)^qe[2],Ze(Ae,Ce+12)^qe[3]];for(let ke=0;ke<8;ke++)o(ke,Ve);return Ye(Ae,Ce,Ve[2]^qe[4]),Ye(Ae,Ce+4,Ve[3]^qe[5]),Ye(Ae,Ce+8,Ve[0]^qe[6]),Ye(Ae,Ce+12,Ve[1]^qe[7]),Ce+=16,Ae},decrypt:function(ke,ze){Ae=ke,Ce=ze;const Ve=[Ze(Ae,Ce)^qe[4],Ze(Ae,Ce+4)^qe[5],Ze(Ae,Ce+8)^qe[6],Ze(Ae,Ce+12)^qe[7]];for(let ke=7;ke>=0;ke--)c(ke,Ve);Ye(Ae,Ce,Ve[2]^qe[0]),Ye(Ae,Ce+4,Ve[3]^qe[1]),Ye(Ae,Ce+8,Ve[0]^qe[2]),Ye(Ae,Ce+12,Ve[1]^qe[3]),Ce+=16},finalize:function(){return Ae}}}(),this.tf.open(Array.from(ke),0),this.encrypt=function(ke){return this.tf.encrypt(Array.from(ke),0)}}function Je(){}function et(ke){this.bf=new Je,this.bf.init(ke),this.encrypt=function(ke){return this.bf.encryptBlock(ke)}}Qe.keySize=Qe.prototype.keySize=32,Qe.blockSize=Qe.prototype.blockSize=16,Je.prototype.BLOCKSIZE=8,Je.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]],Je.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Je.prototype.NN=16,Je.prototype._clean=function(ke){if(ke<0){ke=(2147483647&ke)+2147483648}return ke},Je.prototype._F=function(ke){let Ae;const Ce=255&ke,qe=255&(ke>>>=8),ze=255&(ke>>>=8),Ve=255&(ke>>>=8);return Ae=this.sboxes[0][Ve]+this.sboxes[1][ze],Ae^=this.sboxes[2][qe],Ae+=this.sboxes[3][Ce],Ae},Je.prototype._encryptBlock=function(ke){let Ae,Ce=ke[0],qe=ke[1];for(Ae=0;Ae<this.NN;++Ae){Ce^=this.parray[Ae],qe=this._F(Ce)^qe;const ke=Ce;Ce=qe,qe=ke}Ce^=this.parray[this.NN+0],qe^=this.parray[this.NN+1],ke[0]=this._clean(qe),ke[1]=this._clean(Ce)},Je.prototype.encryptBlock=function(ke){let Ae;const Ce=[0,0],qe=this.BLOCKSIZE/2;for(Ae=0;Ae<this.BLOCKSIZE/2;++Ae)Ce[0]=Ce[0]<<8|255&ke[Ae+0],Ce[1]=Ce[1]<<8|255&ke[Ae+qe];this._encryptBlock(Ce);const ze=[];for(Ae=0;Ae<this.BLOCKSIZE/2;++Ae)ze[Ae+0]=Ce[0]>>>24-8*Ae&255,ze[Ae+qe]=Ce[1]>>>24-8*Ae&255;return ze},Je.prototype._decryptBlock=function(ke){let Ae,Ce=ke[0],qe=ke[1];for(Ae=this.NN+1;Ae>1;--Ae){Ce^=this.parray[Ae],qe=this._F(Ce)^qe;const ke=Ce;Ce=qe,qe=ke}Ce^=this.parray[1],qe^=this.parray[0],ke[0]=this._clean(qe),ke[1]=this._clean(Ce)},Je.prototype.init=function(ke){let Ae,Ce=0;for(this.parray=[],Ae=0;Ae<this.NN+2;++Ae){let qe=0;for(let Ae=0;Ae<4;++Ae)qe=qe<<8|255&ke[Ce],++Ce>=ke.length&&(Ce=0);this.parray[Ae]=this.PARRAY[Ae]^qe}for(this.sboxes=[],Ae=0;Ae<4;++Ae)for(this.sboxes[Ae]=[],Ce=0;Ce<256;++Ce)this.sboxes[Ae][Ce]=this.SBOXES[Ae][Ce];const qe=[0,0];for(Ae=0;Ae<this.NN+2;Ae+=2)this._encryptBlock(qe),this.parray[Ae+0]=qe[0],this.parray[Ae+1]=qe[1];for(Ae=0;Ae<4;++Ae)for(Ce=0;Ce<256;Ce+=2)this._encryptBlock(qe),this.sboxes[Ae][Ce+0]=qe[0],this.sboxes[Ae][Ce+1]=qe[1]},et.keySize=et.prototype.keySize=16,et.blockSize=et.prototype.blockSize=8;const kr=Ne(128),Ar=Ne(192),Sr=Ne(256);var Er=Object.freeze({__proto__:null,aes128:kr,aes192:Ar,aes256:Sr,des:function(ke){this.key=ke,this.encrypt=function(ke,Ae){return je(Le(this.key),ke,!0,0,null,Ae)},this.decrypt=function(ke,Ae){return je(Le(this.key),ke,!1,0,null,Ae)}},tripledes:We,cast5:Ge,twofish:Qe,blowfish:et,idea:function(){throw Error("IDEA symmetric-key algorithm not implemented")}}),at=function(ke,Ae,Ce){"use asm";var qe=0,ze=0,Ve=0,tt=0,rt=0,it=0,nt=0;var ot=0,ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0;var Dt=new ke.Uint8Array(Ce);function _(ke,Ae,Ce,it,nt,ot,ct,ht,ft,yt,mt,kt,St,Et,Pt,Dt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;it=it|0;nt=nt|0;ot=ot|0;ct=ct|0;ht=ht|0;ft=ft|0;yt=yt|0;mt=mt|0;kt=kt|0;St=St|0;Et=Et|0;Pt=Pt|0;Dt=Dt|0;var Rt=0,Bt=0,Tt=0,Ut=0,Kt=0,It=0,Ot=0,Nt=0,qt=0,zt=0,Ft=0,Lt=0,Ht=0,Gt=0,$t=0,Vt=0,Zt=0,Yt=0,Jt=0,Xt=0,Qt=0,er=0,tr=0,rr=0,ir=0,nr=0,sr=0,vr=0,_r=0,kr=0,Ar=0,Sr=0,Er=0,xr=0,Dr=0,Rr=0,Br=0,Ur=0,Ir=0,Lr=0,Gr=0,$r=0,Vr=0,Jr=0,Qr=0,ti=0,ri=0,si=0,ai=0,ui=0,hi=0,pi=0,yi=0,mi=0,gi=0,bi=0,vi=0,wi=0,_i=0,Bi=0,Ti=0,Oi=0,qi=0,zi=0,Fi=0,Gi=0,Vi=0,Yi=0,Ji=0,Xi=0,Qi=0;Rt=qe;Bt=ze;Tt=Ve;Ut=tt;Kt=rt;Ot=ke+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=Ae+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=Ce+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=it+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=nt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=ot+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=ct+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=ht+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=ft+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=yt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=mt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=kt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=St+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=Et+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=Pt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;Ot=Dt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Et^ft^Ce^ke;Nt=It<<1|It>>>31;Ot=Nt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Pt^yt^it^Ae;qt=It<<1|It>>>31;Ot=qt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Dt^mt^nt^Ce;zt=It<<1|It>>>31;Ot=zt+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Nt^kt^ot^it;Ft=It<<1|It>>>31;Ot=Ft+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|~Bt&Ut)+0x5a827999|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=qt^St^ct^nt;Lt=It<<1|It>>>31;Ot=Lt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=zt^Et^ht^ot;Ht=It<<1|It>>>31;Ot=Ht+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Ft^Pt^ft^ct;Gt=It<<1|It>>>31;Ot=Gt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Lt^Dt^yt^ht;$t=It<<1|It>>>31;Ot=$t+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Ht^Nt^mt^ft;Vt=It<<1|It>>>31;Ot=Vt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Gt^qt^kt^yt;Zt=It<<1|It>>>31;Ot=Zt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=$t^zt^St^mt;Yt=It<<1|It>>>31;Ot=Yt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Vt^Ft^Et^kt;Jt=It<<1|It>>>31;Ot=Jt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Zt^Lt^Pt^St;Xt=It<<1|It>>>31;Ot=Xt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Yt^Ht^Dt^Et;Qt=It<<1|It>>>31;Ot=Qt+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Jt^Gt^Nt^Pt;er=It<<1|It>>>31;Ot=er+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Xt^$t^qt^Dt;tr=It<<1|It>>>31;Ot=tr+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Qt^Vt^zt^Nt;rr=It<<1|It>>>31;Ot=rr+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=er^Zt^Ft^qt;ir=It<<1|It>>>31;Ot=ir+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=tr^Yt^Lt^zt;nr=It<<1|It>>>31;Ot=nr+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=rr^Jt^Ht^Ft;sr=It<<1|It>>>31;Ot=sr+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=ir^Xt^Gt^Lt;vr=It<<1|It>>>31;Ot=vr+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=nr^Qt^$t^Ht;_r=It<<1|It>>>31;Ot=_r+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=sr^er^Vt^Gt;kr=It<<1|It>>>31;Ot=kr+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=vr^tr^Zt^$t;Ar=It<<1|It>>>31;Ot=Ar+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)+0x6ed9eba1|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=_r^rr^Yt^Vt;Sr=It<<1|It>>>31;Ot=Sr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=kr^ir^Jt^Zt;Er=It<<1|It>>>31;Ot=Er+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Ar^nr^Xt^Yt;xr=It<<1|It>>>31;Ot=xr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Sr^sr^Qt^Jt;Dr=It<<1|It>>>31;Ot=Dr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Er^vr^er^Xt;Rr=It<<1|It>>>31;Ot=Rr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=xr^_r^tr^Qt;Br=It<<1|It>>>31;Ot=Br+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Dr^kr^rr^er;Ur=It<<1|It>>>31;Ot=Ur+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Rr^Ar^ir^tr;Ir=It<<1|It>>>31;Ot=Ir+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Br^Sr^nr^rr;Lr=It<<1|It>>>31;Ot=Lr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Ur^Er^sr^ir;Gr=It<<1|It>>>31;Ot=Gr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Ir^xr^vr^nr;$r=It<<1|It>>>31;Ot=$r+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Lr^Dr^_r^sr;Vr=It<<1|It>>>31;Ot=Vr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Gr^Rr^kr^vr;Jr=It<<1|It>>>31;Ot=Jr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=$r^Br^Ar^_r;Qr=It<<1|It>>>31;Ot=Qr+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Vr^Ur^Sr^kr;ti=It<<1|It>>>31;Ot=ti+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Jr^Ir^Er^Ar;ri=It<<1|It>>>31;Ot=ri+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Qr^Lr^xr^Sr;si=It<<1|It>>>31;Ot=si+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=ti^Gr^Dr^Er;ai=It<<1|It>>>31;Ot=ai+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=ri^$r^Rr^xr;ui=It<<1|It>>>31;Ot=ui+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=si^Vr^Br^Dr;hi=It<<1|It>>>31;Ot=hi+(Rt<<5|Rt>>>27)+Kt+(Bt&Tt|Bt&Ut|Tt&Ut)-0x70e44324|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=ai^Jr^Ur^Rr;pi=It<<1|It>>>31;Ot=pi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=ui^Qr^Ir^Br;yi=It<<1|It>>>31;Ot=yi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=hi^ti^Lr^Ur;mi=It<<1|It>>>31;Ot=mi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=pi^ri^Gr^Ir;gi=It<<1|It>>>31;Ot=gi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=yi^si^$r^Lr;bi=It<<1|It>>>31;Ot=bi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=mi^ai^Vr^Gr;vi=It<<1|It>>>31;Ot=vi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=gi^ui^Jr^$r;wi=It<<1|It>>>31;Ot=wi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=bi^hi^Qr^Vr;_i=It<<1|It>>>31;Ot=_i+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=vi^pi^ti^Jr;Bi=It<<1|It>>>31;Ot=Bi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=wi^yi^ri^Qr;Ti=It<<1|It>>>31;Ot=Ti+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=_i^mi^si^ti;Oi=It<<1|It>>>31;Ot=Oi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Bi^gi^ai^ri;qi=It<<1|It>>>31;Ot=qi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Ti^bi^ui^si;zi=It<<1|It>>>31;Ot=zi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Oi^vi^hi^ai;Fi=It<<1|It>>>31;Ot=Fi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=qi^wi^pi^ui;Gi=It<<1|It>>>31;Ot=Gi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=zi^_i^yi^hi;Vi=It<<1|It>>>31;Ot=Vi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Fi^Bi^mi^pi;Yi=It<<1|It>>>31;Ot=Yi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Gi^Ti^gi^yi;Ji=It<<1|It>>>31;Ot=Ji+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Vi^Oi^bi^mi;Xi=It<<1|It>>>31;Ot=Xi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;It=Yi^qi^vi^gi;Qi=It<<1|It>>>31;Ot=Qi+(Rt<<5|Rt>>>27)+Kt+(Bt^Tt^Ut)-0x359d3e2a|0;Kt=Ut;Ut=Tt;Tt=Bt<<30|Bt>>>2;Bt=Rt;Rt=Ot;qe=qe+Rt|0;ze=ze+Bt|0;Ve=Ve+Tt|0;tt=tt+Ut|0;rt=rt+Kt|0}function k(ke){ke=ke|0;_(Dt[ke|0]<<24|Dt[ke|1]<<16|Dt[ke|2]<<8|Dt[ke|3],Dt[ke|4]<<24|Dt[ke|5]<<16|Dt[ke|6]<<8|Dt[ke|7],Dt[ke|8]<<24|Dt[ke|9]<<16|Dt[ke|10]<<8|Dt[ke|11],Dt[ke|12]<<24|Dt[ke|13]<<16|Dt[ke|14]<<8|Dt[ke|15],Dt[ke|16]<<24|Dt[ke|17]<<16|Dt[ke|18]<<8|Dt[ke|19],Dt[ke|20]<<24|Dt[ke|21]<<16|Dt[ke|22]<<8|Dt[ke|23],Dt[ke|24]<<24|Dt[ke|25]<<16|Dt[ke|26]<<8|Dt[ke|27],Dt[ke|28]<<24|Dt[ke|29]<<16|Dt[ke|30]<<8|Dt[ke|31],Dt[ke|32]<<24|Dt[ke|33]<<16|Dt[ke|34]<<8|Dt[ke|35],Dt[ke|36]<<24|Dt[ke|37]<<16|Dt[ke|38]<<8|Dt[ke|39],Dt[ke|40]<<24|Dt[ke|41]<<16|Dt[ke|42]<<8|Dt[ke|43],Dt[ke|44]<<24|Dt[ke|45]<<16|Dt[ke|46]<<8|Dt[ke|47],Dt[ke|48]<<24|Dt[ke|49]<<16|Dt[ke|50]<<8|Dt[ke|51],Dt[ke|52]<<24|Dt[ke|53]<<16|Dt[ke|54]<<8|Dt[ke|55],Dt[ke|56]<<24|Dt[ke|57]<<16|Dt[ke|58]<<8|Dt[ke|59],Dt[ke|60]<<24|Dt[ke|61]<<16|Dt[ke|62]<<8|Dt[ke|63])}function A(ke){ke=ke|0;Dt[ke|0]=qe>>>24;Dt[ke|1]=qe>>>16&255;Dt[ke|2]=qe>>>8&255;Dt[ke|3]=qe&255;Dt[ke|4]=ze>>>24;Dt[ke|5]=ze>>>16&255;Dt[ke|6]=ze>>>8&255;Dt[ke|7]=ze&255;Dt[ke|8]=Ve>>>24;Dt[ke|9]=Ve>>>16&255;Dt[ke|10]=Ve>>>8&255;Dt[ke|11]=Ve&255;Dt[ke|12]=tt>>>24;Dt[ke|13]=tt>>>16&255;Dt[ke|14]=tt>>>8&255;Dt[ke|15]=tt&255;Dt[ke|16]=rt>>>24;Dt[ke|17]=rt>>>16&255;Dt[ke|18]=rt>>>8&255;Dt[ke|19]=rt&255}function S(){qe=0x67452301;ze=0xefcdab89;Ve=0x98badcfe;tt=0x10325476;rt=0xc3d2e1f0;it=nt=0}function E(ke,Ae,Ce,ot,ct,ht,ft){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ot=ot|0;ct=ct|0;ht=ht|0;ft=ft|0;qe=ke;ze=Ae;Ve=Ce;tt=ot;rt=ct;it=ht;nt=ft}function P(ke,Ae){ke=ke|0;Ae=Ae|0;var Ce=0;if(ke&63)return-1;while((Ae|0)>=64){k(ke);ke=ke+64|0;Ae=Ae-64|0;Ce=Ce+64|0}it=it+Ce|0;if(it>>>0<Ce>>>0)nt=nt+1|0;return Ce|0}function x(ke,Ae,Ce){ke=ke|0;Ae=Ae|0;Ce=Ce|0;var qe=0,ze=0;if(ke&63)return-1;if(~Ce)if(Ce&31)return-1;if((Ae|0)>=64){qe=P(ke,Ae)|0;if((qe|0)==-1)return-1;ke=ke+qe|0;Ae=Ae-qe|0}qe=qe+Ae|0;it=it+Ae|0;if(it>>>0<Ae>>>0)nt=nt+1|0;Dt[ke|Ae]=0x80;if((Ae|0)>=56){for(ze=Ae+1|0;(ze|0)<64;ze=ze+1|0)Dt[ke|ze]=0x00;k(ke);Ae=0;Dt[ke|0]=0}for(ze=Ae+1|0;(ze|0)<59;ze=ze+1|0)Dt[ke|ze]=0;Dt[ke|56]=nt>>>21&255;Dt[ke|57]=nt>>>13&255;Dt[ke|58]=nt>>>5&255;Dt[ke|59]=nt<<3&255|it>>>29;Dt[ke|60]=it>>>21&255;Dt[ke|61]=it>>>13&255;Dt[ke|62]=it>>>5&255;Dt[ke|63]=it<<3&255;k(ke);if(~Ce)A(Ce);return qe|0}function M(){qe=ot;ze=ct;Ve=ht;tt=ft;rt=yt;it=64;nt=0}function C(){qe=mt;ze=kt;Ve=St;tt=Et;rt=Pt;it=64;nt=0}function K(ke,Ae,Ce,Dt,Rt,Bt,Tt,Ut,Kt,It,Ot,Nt,qt,zt,Ft,Lt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;Dt=Dt|0;Rt=Rt|0;Bt=Bt|0;Tt=Tt|0;Ut=Ut|0;Kt=Kt|0;It=It|0;Ot=Ot|0;Nt=Nt|0;qt=qt|0;zt=zt|0;Ft=Ft|0;Lt=Lt|0;S();_(ke^0x5c5c5c5c,Ae^0x5c5c5c5c,Ce^0x5c5c5c5c,Dt^0x5c5c5c5c,Rt^0x5c5c5c5c,Bt^0x5c5c5c5c,Tt^0x5c5c5c5c,Ut^0x5c5c5c5c,Kt^0x5c5c5c5c,It^0x5c5c5c5c,Ot^0x5c5c5c5c,Nt^0x5c5c5c5c,qt^0x5c5c5c5c,zt^0x5c5c5c5c,Ft^0x5c5c5c5c,Lt^0x5c5c5c5c);mt=qe;kt=ze;St=Ve;Et=tt;Pt=rt;S();_(ke^0x36363636,Ae^0x36363636,Ce^0x36363636,Dt^0x36363636,Rt^0x36363636,Bt^0x36363636,Tt^0x36363636,Ut^0x36363636,Kt^0x36363636,It^0x36363636,Ot^0x36363636,Nt^0x36363636,qt^0x36363636,zt^0x36363636,Ft^0x36363636,Lt^0x36363636);ot=qe;ct=ze;ht=Ve;ft=tt;yt=rt;it=64;nt=0}function D(ke,Ae,Ce){ke=ke|0;Ae=Ae|0;Ce=Ce|0;var it=0,nt=0,ot=0,ct=0,ht=0,ft=0;if(ke&63)return-1;if(~Ce)if(Ce&31)return-1;ft=x(ke,Ae,-1)|0;it=qe,nt=ze,ot=Ve,ct=tt,ht=rt;C();_(it,nt,ot,ct,ht,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~Ce)A(Ce);return ft|0}function R(ke,Ae,Ce,it,nt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;it=it|0;nt=nt|0;var ot=0,ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0;if(ke&63)return-1;if(~nt)if(nt&31)return-1;Dt[ke+Ae|0]=Ce>>>24;Dt[ke+Ae+1|0]=Ce>>>16&255;Dt[ke+Ae+2|0]=Ce>>>8&255;Dt[ke+Ae+3|0]=Ce&255;D(ke,Ae+4|0,-1)|0;ot=mt=qe,ct=kt=ze,ht=St=Ve,ft=Et=tt,yt=Pt=rt;it=it-1|0;while((it|0)>0){M();_(mt,kt,St,Et,Pt,0x80000000,0,0,0,0,0,0,0,0,0,672);mt=qe,kt=ze,St=Ve,Et=tt,Pt=rt;C();_(mt,kt,St,Et,Pt,0x80000000,0,0,0,0,0,0,0,0,0,672);mt=qe,kt=ze,St=Ve,Et=tt,Pt=rt;ot=ot^qe;ct=ct^ze;ht=ht^Ve;ft=ft^tt;yt=yt^rt;it=it-1|0}qe=ot;ze=ct;Ve=ht;tt=ft;rt=yt;if(~nt)A(nt);return 0}return{reset:S,init:E,process:P,finish:x,hmac_reset:M,hmac_init:K,hmac_finish:D,pbkdf2_generate_block:R}};class st{constructor(){this.pos=0,this.len=0}reset(){const{asm:ke}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,ke.reset(),this}process(ke){if(null!==this.result)throw new Ie("state must be reset before processing new data");const{asm:Ae,heap:Ce}=this.acquire_asm();let qe=this.pos,ze=this.len,Ve=0,tt=ke.length,rt=0;for(;tt>0;)rt=Re(Ce,qe+ze,ke,Ve,tt),ze+=rt,Ve+=rt,tt-=rt,rt=Ae.process(qe,ze),qe+=rt,ze-=rt,ze||(qe=0);return this.pos=qe,this.len=ze,this}finish(){if(null!==this.result)throw new Ie("state must be reset before processing new data");const{asm:ke,heap:Ae}=this.acquire_asm();return ke.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(Ae.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const xr=[],Dr=[];class ut extends st{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=xr.pop()||De(),this.asm=Dr.pop()||at({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(xr.push(this.heap),Dr.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(ke){return(new ut).process(ke).finish().result}}ut.NAME="sha1",ut.heap_pool=[],ut.asm_pool=[],ut.asm_function=at;const Rr=[],Br=[];class dt extends st{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return void 0!==this.heap&&void 0!==this.asm||(this.heap=Rr.pop()||De(),this.asm=Br.pop()||function(ke,Ae,Ce){"use asm";var qe=0,ze=0,Ve=0,tt=0,rt=0,it=0,nt=0,ot=0,ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0,Dt=0,Rt=0,Bt=0,Tt=0,Ut=0,Kt=0,It=0,Ot=0,Nt=0,qt=new ke.Uint8Array(Ce);function K(ke,Ae,Ce,ct,ht,ft,yt,mt,kt,St,Et,Pt,Dt,Rt,Bt,Tt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;ht=ht|0;ft=ft|0;yt=yt|0;mt=mt|0;kt=kt|0;St=St|0;Et=Et|0;Pt=Pt|0;Dt=Dt|0;Rt=Rt|0;Bt=Bt|0;Tt=Tt|0;var Ut=0,Kt=0,It=0,Ot=0,Nt=0,qt=0,zt=0,Ft=0;Ut=qe;Kt=ze;It=Ve;Ot=tt;Nt=rt;qt=it;zt=nt;Ft=ot;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0x428a2f98|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;zt=Ae+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0x71374491|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;qt=Ce+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0xb5c0fbcf|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Nt=ct+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0xe9b5dba5|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Ot=ht+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0x3956c25b|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;It=ft+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0x59f111f1|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Kt=yt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0x923f82a4|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;Ut=mt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0xab1c5ed5|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;Ft=kt+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0xd807aa98|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;zt=St+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0x12835b01|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;qt=Et+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0x243185be|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Nt=Pt+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0x550c7dc3|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Ot=Dt+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0x72be5d74|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;It=Rt+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0x80deb1fe|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Kt=Bt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0x9bdc06a7|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;Ut=Tt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0xc19bf174|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;ke=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Bt>>>17^Bt>>>19^Bt>>>10^Bt<<15^Bt<<13)+ke+St|0;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0xe49b69c1|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Ae=(Ce>>>7^Ce>>>18^Ce>>>3^Ce<<25^Ce<<14)+(Tt>>>17^Tt>>>19^Tt>>>10^Tt<<15^Tt<<13)+Ae+Et|0;zt=Ae+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0xefbe4786|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Ce=(ct>>>7^ct>>>18^ct>>>3^ct<<25^ct<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+Ce+Pt|0;qt=Ce+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0x0fc19dc6|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;ct=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+ct+Dt|0;Nt=ct+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0x240ca1cc|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Ce>>>17^Ce>>>19^Ce>>>10^Ce<<15^Ce<<13)+ht+Rt|0;Ot=ht+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0x2de92c6f|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;ft=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+(ct>>>17^ct>>>19^ct>>>10^ct<<15^ct<<13)+ft+Bt|0;It=ft+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0x4a7484aa|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;yt=(mt>>>7^mt>>>18^mt>>>3^mt<<25^mt<<14)+(ht>>>17^ht>>>19^ht>>>10^ht<<15^ht<<13)+yt+Tt|0;Kt=yt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0x5cb0a9dc|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;mt=(kt>>>7^kt>>>18^kt>>>3^kt<<25^kt<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+mt+ke|0;Ut=mt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0x76f988da|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;kt=(St>>>7^St>>>18^St>>>3^St<<25^St<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+kt+Ae|0;Ft=kt+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0x983e5152|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;St=(Et>>>7^Et>>>18^Et>>>3^Et<<25^Et<<14)+(mt>>>17^mt>>>19^mt>>>10^mt<<15^mt<<13)+St+Ce|0;zt=St+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0xa831c66d|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Et=(Pt>>>7^Pt>>>18^Pt>>>3^Pt<<25^Pt<<14)+(kt>>>17^kt>>>19^kt>>>10^kt<<15^kt<<13)+Et+ct|0;qt=Et+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0xb00327c8|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Pt=(Dt>>>7^Dt>>>18^Dt>>>3^Dt<<25^Dt<<14)+(St>>>17^St>>>19^St>>>10^St<<15^St<<13)+Pt+ht|0;Nt=Pt+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0xbf597fc7|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Dt=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(Et>>>17^Et>>>19^Et>>>10^Et<<15^Et<<13)+Dt+ft|0;Ot=Dt+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0xc6e00bf3|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Rt=(Bt>>>7^Bt>>>18^Bt>>>3^Bt<<25^Bt<<14)+(Pt>>>17^Pt>>>19^Pt>>>10^Pt<<15^Pt<<13)+Rt+yt|0;It=Rt+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0xd5a79147|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Bt=(Tt>>>7^Tt>>>18^Tt>>>3^Tt<<25^Tt<<14)+(Dt>>>17^Dt>>>19^Dt>>>10^Dt<<15^Dt<<13)+Bt+mt|0;Kt=Bt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0x06ca6351|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;Tt=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+Tt+kt|0;Ut=Tt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0x14292967|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;ke=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Bt>>>17^Bt>>>19^Bt>>>10^Bt<<15^Bt<<13)+ke+St|0;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0x27b70a85|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Ae=(Ce>>>7^Ce>>>18^Ce>>>3^Ce<<25^Ce<<14)+(Tt>>>17^Tt>>>19^Tt>>>10^Tt<<15^Tt<<13)+Ae+Et|0;zt=Ae+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0x2e1b2138|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Ce=(ct>>>7^ct>>>18^ct>>>3^ct<<25^ct<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+Ce+Pt|0;qt=Ce+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0x4d2c6dfc|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;ct=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+ct+Dt|0;Nt=ct+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0x53380d13|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Ce>>>17^Ce>>>19^Ce>>>10^Ce<<15^Ce<<13)+ht+Rt|0;Ot=ht+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0x650a7354|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;ft=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+(ct>>>17^ct>>>19^ct>>>10^ct<<15^ct<<13)+ft+Bt|0;It=ft+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0x766a0abb|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;yt=(mt>>>7^mt>>>18^mt>>>3^mt<<25^mt<<14)+(ht>>>17^ht>>>19^ht>>>10^ht<<15^ht<<13)+yt+Tt|0;Kt=yt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0x81c2c92e|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;mt=(kt>>>7^kt>>>18^kt>>>3^kt<<25^kt<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+mt+ke|0;Ut=mt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0x92722c85|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;kt=(St>>>7^St>>>18^St>>>3^St<<25^St<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+kt+Ae|0;Ft=kt+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0xa2bfe8a1|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;St=(Et>>>7^Et>>>18^Et>>>3^Et<<25^Et<<14)+(mt>>>17^mt>>>19^mt>>>10^mt<<15^mt<<13)+St+Ce|0;zt=St+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0xa81a664b|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Et=(Pt>>>7^Pt>>>18^Pt>>>3^Pt<<25^Pt<<14)+(kt>>>17^kt>>>19^kt>>>10^kt<<15^kt<<13)+Et+ct|0;qt=Et+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0xc24b8b70|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Pt=(Dt>>>7^Dt>>>18^Dt>>>3^Dt<<25^Dt<<14)+(St>>>17^St>>>19^St>>>10^St<<15^St<<13)+Pt+ht|0;Nt=Pt+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0xc76c51a3|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Dt=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(Et>>>17^Et>>>19^Et>>>10^Et<<15^Et<<13)+Dt+ft|0;Ot=Dt+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0xd192e819|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Rt=(Bt>>>7^Bt>>>18^Bt>>>3^Bt<<25^Bt<<14)+(Pt>>>17^Pt>>>19^Pt>>>10^Pt<<15^Pt<<13)+Rt+yt|0;It=Rt+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0xd6990624|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Bt=(Tt>>>7^Tt>>>18^Tt>>>3^Tt<<25^Tt<<14)+(Dt>>>17^Dt>>>19^Dt>>>10^Dt<<15^Dt<<13)+Bt+mt|0;Kt=Bt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0xf40e3585|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;Tt=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+Tt+kt|0;Ut=Tt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0x106aa070|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;ke=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Bt>>>17^Bt>>>19^Bt>>>10^Bt<<15^Bt<<13)+ke+St|0;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0x19a4c116|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Ae=(Ce>>>7^Ce>>>18^Ce>>>3^Ce<<25^Ce<<14)+(Tt>>>17^Tt>>>19^Tt>>>10^Tt<<15^Tt<<13)+Ae+Et|0;zt=Ae+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0x1e376c08|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Ce=(ct>>>7^ct>>>18^ct>>>3^ct<<25^ct<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+Ce+Pt|0;qt=Ce+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0x2748774c|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;ct=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+ct+Dt|0;Nt=ct+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0x34b0bcb5|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Ce>>>17^Ce>>>19^Ce>>>10^Ce<<15^Ce<<13)+ht+Rt|0;Ot=ht+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0x391c0cb3|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;ft=(yt>>>7^yt>>>18^yt>>>3^yt<<25^yt<<14)+(ct>>>17^ct>>>19^ct>>>10^ct<<15^ct<<13)+ft+Bt|0;It=ft+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0x4ed8aa4a|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;yt=(mt>>>7^mt>>>18^mt>>>3^mt<<25^mt<<14)+(ht>>>17^ht>>>19^ht>>>10^ht<<15^ht<<13)+yt+Tt|0;Kt=yt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0x5b9cca4f|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;mt=(kt>>>7^kt>>>18^kt>>>3^kt<<25^kt<<14)+(ft>>>17^ft>>>19^ft>>>10^ft<<15^ft<<13)+mt+ke|0;Ut=mt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0x682e6ff3|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;kt=(St>>>7^St>>>18^St>>>3^St<<25^St<<14)+(yt>>>17^yt>>>19^yt>>>10^yt<<15^yt<<13)+kt+Ae|0;Ft=kt+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(zt^Nt&(qt^zt))+0x748f82ee|0;Ot=Ot+Ft|0;Ft=Ft+(Ut&Kt^It&(Ut^Kt))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;St=(Et>>>7^Et>>>18^Et>>>3^Et<<25^Et<<14)+(mt>>>17^mt>>>19^mt>>>10^mt<<15^mt<<13)+St+Ce|0;zt=St+zt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(qt^Ot&(Nt^qt))+0x78a5636f|0;It=It+zt|0;zt=zt+(Ft&Ut^Kt&(Ft^Ut))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;Et=(Pt>>>7^Pt>>>18^Pt>>>3^Pt<<25^Pt<<14)+(kt>>>17^kt>>>19^kt>>>10^kt<<15^kt<<13)+Et+ct|0;qt=Et+qt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Nt^It&(Ot^Nt))+0x84c87814|0;Kt=Kt+qt|0;qt=qt+(zt&Ft^Ut&(zt^Ft))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Pt=(Dt>>>7^Dt>>>18^Dt>>>3^Dt<<25^Dt<<14)+(St>>>17^St>>>19^St>>>10^St<<15^St<<13)+Pt+ht|0;Nt=Pt+Nt+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ot^Kt&(It^Ot))+0x8cc70208|0;Ut=Ut+Nt|0;Nt=Nt+(qt&zt^Ft&(qt^zt))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Dt=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(Et>>>17^Et>>>19^Et>>>10^Et<<15^Et<<13)+Dt+ft|0;Ot=Dt+Ot+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(It^Ut&(Kt^It))+0x90befffa|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&qt^zt&(Nt^qt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Rt=(Bt>>>7^Bt>>>18^Bt>>>3^Bt<<25^Bt<<14)+(Pt>>>17^Pt>>>19^Pt>>>10^Pt<<15^Pt<<13)+Rt+yt|0;It=Rt+It+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(Kt^Ft&(Ut^Kt))+0xa4506ceb|0;zt=zt+It|0;It=It+(Ot&Nt^qt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Bt=(Tt>>>7^Tt>>>18^Tt>>>3^Tt<<25^Tt<<14)+(Dt>>>17^Dt>>>19^Dt>>>10^Dt<<15^Dt<<13)+Bt+mt|0;Kt=Bt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ut^zt&(Ft^Ut))+0xbef9a3f7|0;qt=qt+Kt|0;Kt=Kt+(It&Ot^Nt&(It^Ot))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;Tt=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+Tt+kt|0;Ut=Tt+Ut+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Ft^qt&(zt^Ft))+0xc67178f2|0;Nt=Nt+Ut|0;Ut=Ut+(Kt&It^Ot&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;qe=qe+Ut|0;ze=ze+Kt|0;Ve=Ve+It|0;tt=tt+Ot|0;rt=rt+Nt|0;it=it+qt|0;nt=nt+zt|0;ot=ot+Ft|0}function D(ke){ke=ke|0;K(qt[ke|0]<<24|qt[ke|1]<<16|qt[ke|2]<<8|qt[ke|3],qt[ke|4]<<24|qt[ke|5]<<16|qt[ke|6]<<8|qt[ke|7],qt[ke|8]<<24|qt[ke|9]<<16|qt[ke|10]<<8|qt[ke|11],qt[ke|12]<<24|qt[ke|13]<<16|qt[ke|14]<<8|qt[ke|15],qt[ke|16]<<24|qt[ke|17]<<16|qt[ke|18]<<8|qt[ke|19],qt[ke|20]<<24|qt[ke|21]<<16|qt[ke|22]<<8|qt[ke|23],qt[ke|24]<<24|qt[ke|25]<<16|qt[ke|26]<<8|qt[ke|27],qt[ke|28]<<24|qt[ke|29]<<16|qt[ke|30]<<8|qt[ke|31],qt[ke|32]<<24|qt[ke|33]<<16|qt[ke|34]<<8|qt[ke|35],qt[ke|36]<<24|qt[ke|37]<<16|qt[ke|38]<<8|qt[ke|39],qt[ke|40]<<24|qt[ke|41]<<16|qt[ke|42]<<8|qt[ke|43],qt[ke|44]<<24|qt[ke|45]<<16|qt[ke|46]<<8|qt[ke|47],qt[ke|48]<<24|qt[ke|49]<<16|qt[ke|50]<<8|qt[ke|51],qt[ke|52]<<24|qt[ke|53]<<16|qt[ke|54]<<8|qt[ke|55],qt[ke|56]<<24|qt[ke|57]<<16|qt[ke|58]<<8|qt[ke|59],qt[ke|60]<<24|qt[ke|61]<<16|qt[ke|62]<<8|qt[ke|63])}function R(ke){ke=ke|0;qt[ke|0]=qe>>>24;qt[ke|1]=qe>>>16&255;qt[ke|2]=qe>>>8&255;qt[ke|3]=qe&255;qt[ke|4]=ze>>>24;qt[ke|5]=ze>>>16&255;qt[ke|6]=ze>>>8&255;qt[ke|7]=ze&255;qt[ke|8]=Ve>>>24;qt[ke|9]=Ve>>>16&255;qt[ke|10]=Ve>>>8&255;qt[ke|11]=Ve&255;qt[ke|12]=tt>>>24;qt[ke|13]=tt>>>16&255;qt[ke|14]=tt>>>8&255;qt[ke|15]=tt&255;qt[ke|16]=rt>>>24;qt[ke|17]=rt>>>16&255;qt[ke|18]=rt>>>8&255;qt[ke|19]=rt&255;qt[ke|20]=it>>>24;qt[ke|21]=it>>>16&255;qt[ke|22]=it>>>8&255;qt[ke|23]=it&255;qt[ke|24]=nt>>>24;qt[ke|25]=nt>>>16&255;qt[ke|26]=nt>>>8&255;qt[ke|27]=nt&255;qt[ke|28]=ot>>>24;qt[ke|29]=ot>>>16&255;qt[ke|30]=ot>>>8&255;qt[ke|31]=ot&255}function U(){qe=0x6a09e667;ze=0xbb67ae85;Ve=0x3c6ef372;tt=0xa54ff53a;rt=0x510e527f;it=0x9b05688c;nt=0x1f83d9ab;ot=0x5be0cd19;ct=ht=0}function I(ke,Ae,Ce,ft,yt,mt,kt,St,Et,Pt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ft=ft|0;yt=yt|0;mt=mt|0;kt=kt|0;St=St|0;Et=Et|0;Pt=Pt|0;qe=ke;ze=Ae;Ve=Ce;tt=ft;rt=yt;it=mt;nt=kt;ot=St;ct=Et;ht=Pt}function B(ke,Ae){ke=ke|0;Ae=Ae|0;var Ce=0;if(ke&63)return-1;while((Ae|0)>=64){D(ke);ke=ke+64|0;Ae=Ae-64|0;Ce=Ce+64|0}ct=ct+Ce|0;if(ct>>>0<Ce>>>0)ht=ht+1|0;return Ce|0}function T(ke,Ae,Ce){ke=ke|0;Ae=Ae|0;Ce=Ce|0;var qe=0,ze=0;if(ke&63)return-1;if(~Ce)if(Ce&31)return-1;if((Ae|0)>=64){qe=B(ke,Ae)|0;if((qe|0)==-1)return-1;ke=ke+qe|0;Ae=Ae-qe|0}qe=qe+Ae|0;ct=ct+Ae|0;if(ct>>>0<Ae>>>0)ht=ht+1|0;qt[ke|Ae]=0x80;if((Ae|0)>=56){for(ze=Ae+1|0;(ze|0)<64;ze=ze+1|0)qt[ke|ze]=0x00;D(ke);Ae=0;qt[ke|0]=0}for(ze=Ae+1|0;(ze|0)<59;ze=ze+1|0)qt[ke|ze]=0;qt[ke|56]=ht>>>21&255;qt[ke|57]=ht>>>13&255;qt[ke|58]=ht>>>5&255;qt[ke|59]=ht<<3&255|ct>>>29;qt[ke|60]=ct>>>21&255;qt[ke|61]=ct>>>13&255;qt[ke|62]=ct>>>5&255;qt[ke|63]=ct<<3&255;D(ke);if(~Ce)R(Ce);return qe|0}function z(){qe=ft;ze=yt;Ve=mt;tt=kt;rt=St;it=Et;nt=Pt;ot=Dt;ct=64;ht=0}function q(){qe=Rt;ze=Bt;Ve=Tt;tt=Ut;rt=Kt;it=It;nt=Ot;ot=Nt;ct=64;ht=0}function O(ke,Ae,Ce,qt,zt,Ft,Lt,Ht,Gt,$t,Vt,Zt,Yt,Jt,Xt,Qt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;qt=qt|0;zt=zt|0;Ft=Ft|0;Lt=Lt|0;Ht=Ht|0;Gt=Gt|0;$t=$t|0;Vt=Vt|0;Zt=Zt|0;Yt=Yt|0;Jt=Jt|0;Xt=Xt|0;Qt=Qt|0;U();K(ke^0x5c5c5c5c,Ae^0x5c5c5c5c,Ce^0x5c5c5c5c,qt^0x5c5c5c5c,zt^0x5c5c5c5c,Ft^0x5c5c5c5c,Lt^0x5c5c5c5c,Ht^0x5c5c5c5c,Gt^0x5c5c5c5c,$t^0x5c5c5c5c,Vt^0x5c5c5c5c,Zt^0x5c5c5c5c,Yt^0x5c5c5c5c,Jt^0x5c5c5c5c,Xt^0x5c5c5c5c,Qt^0x5c5c5c5c);Rt=qe;Bt=ze;Tt=Ve;Ut=tt;Kt=rt;It=it;Ot=nt;Nt=ot;U();K(ke^0x36363636,Ae^0x36363636,Ce^0x36363636,qt^0x36363636,zt^0x36363636,Ft^0x36363636,Lt^0x36363636,Ht^0x36363636,Gt^0x36363636,$t^0x36363636,Vt^0x36363636,Zt^0x36363636,Yt^0x36363636,Jt^0x36363636,Xt^0x36363636,Qt^0x36363636);ft=qe;yt=ze;mt=Ve;kt=tt;St=rt;Et=it;Pt=nt;Dt=ot;ct=64;ht=0}function F(ke,Ae,Ce){ke=ke|0;Ae=Ae|0;Ce=Ce|0;var ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0;if(ke&63)return-1;if(~Ce)if(Ce&31)return-1;Pt=T(ke,Ae,-1)|0;ct=qe,ht=ze,ft=Ve,yt=tt,mt=rt,kt=it,St=nt,Et=ot;q();K(ct,ht,ft,yt,mt,kt,St,Et,0x80000000,0,0,0,0,0,0,768);if(~Ce)R(Ce);return Pt|0}function N(ke,Ae,Ce,ct,ht){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ct=ct|0;ht=ht|0;var ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0,Dt=0,Rt=0,Bt=0,Tt=0,Ut=0,Kt=0,It=0,Ot=0,Nt=0;if(ke&63)return-1;if(~ht)if(ht&31)return-1;qt[ke+Ae|0]=Ce>>>24;qt[ke+Ae+1|0]=Ce>>>16&255;qt[ke+Ae+2|0]=Ce>>>8&255;qt[ke+Ae+3|0]=Ce&255;F(ke,Ae+4|0,-1)|0;ft=Rt=qe,yt=Bt=ze,mt=Tt=Ve,kt=Ut=tt,St=Kt=rt,Et=It=it,Pt=Ot=nt,Dt=Nt=ot;ct=ct-1|0;while((ct|0)>0){z();K(Rt,Bt,Tt,Ut,Kt,It,Ot,Nt,0x80000000,0,0,0,0,0,0,768);Rt=qe,Bt=ze,Tt=Ve,Ut=tt,Kt=rt,It=it,Ot=nt,Nt=ot;q();K(Rt,Bt,Tt,Ut,Kt,It,Ot,Nt,0x80000000,0,0,0,0,0,0,768);Rt=qe,Bt=ze,Tt=Ve,Ut=tt,Kt=rt,It=it,Ot=nt,Nt=ot;ft=ft^qe;yt=yt^ze;mt=mt^Ve;kt=kt^tt;St=St^rt;Et=Et^it;Pt=Pt^nt;Dt=Dt^ot;ct=ct-1|0}qe=ft;ze=yt;Ve=mt;tt=kt;rt=St;it=Et;nt=Pt;ot=Dt;if(~ht)R(ht);return 0}return{reset:U,init:I,process:B,finish:T,hmac_reset:z,hmac_init:O,hmac_finish:F,pbkdf2_generate_block:N}}({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){void 0!==this.heap&&void 0!==this.asm&&(Rr.push(this.heap),Br.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(ke){return(new dt).process(ke).finish().result}}dt.NAME="sha256";var Ur=pt;function pt(ke,Ae){if(!ke)throw Error(Ae||"Assertion failed")}pt.equal=function(ke,Ae,Ce){if(ke!=Ae)throw Error(Ce||"Assertion failed: "+ke+" != "+Ae)};var Ir=void 0!==qe?qe:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bt(ke,Ae){return ke(Ae={exports:{}},Ae.exports),Ae.exports}var Lr=bt((function(ke){ke.exports="function"==typeof Object.create?function(ke,Ae){ke.super_=Ae,ke.prototype=Object.create(Ae.prototype,{constructor:{value:ke,enumerable:!1,writable:!0,configurable:!0}})}:function(ke,Ae){ke.super_=Ae;var r=function(){};r.prototype=Ae.prototype,ke.prototype=new r,ke.prototype.constructor=ke}})),Gr=bt((function(ke){try{var Ae=kt.default;if("function"!=typeof Ae.inherits)throw"";ke.exports=Ae.inherits}catch(Ae){ke.exports=Lr}}));function wt(ke){return(ke>>>24|ke>>>8&65280|ke<<8&16711680|(255&ke)<<24)>>>0}function vt(ke){return 1===ke.length?"0"+ke:ke}function _t(ke){return 7===ke.length?"0"+ke:6===ke.length?"00"+ke:5===ke.length?"000"+ke:4===ke.length?"0000"+ke:3===ke.length?"00000"+ke:2===ke.length?"000000"+ke:1===ke.length?"0000000"+ke:ke}var $r={inherits:Gr,toArray:function(ke,Ae){if(Array.isArray(ke))return ke.slice();if(!ke)return[];var Ce=[];if("string"==typeof ke)if(Ae){if("hex"===Ae)for((ke=ke.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(ke="0"+ke),qe=0;qe<ke.length;qe+=2)Ce.push(parseInt(ke[qe]+ke[qe+1],16))}else for(var qe=0;qe<ke.length;qe++){var ze=ke.charCodeAt(qe),Ve=ze>>8,tt=255&ze;Ve?Ce.push(Ve,tt):Ce.push(tt)}else for(qe=0;qe<ke.length;qe++)Ce[qe]=0|ke[qe];return Ce},toHex:function(ke){for(var Ae="",Ce=0;Ce<ke.length;Ce++)Ae+=vt(ke[Ce].toString(16));return Ae},htonl:wt,toHex32:function(ke,Ae){for(var Ce="",qe=0;qe<ke.length;qe++){var ze=ke[qe];"little"===Ae&&(ze=wt(ze)),Ce+=_t(ze.toString(16))}return Ce},zero2:vt,zero8:_t,join32:function(ke,Ae,Ce,qe){var ze=Ce-Ae;Ur(ze%4==0);for(var Ve=Array(ze/4),tt=0,rt=Ae;tt<Ve.length;tt++,rt+=4){var it;it="big"===qe?ke[rt]<<24|ke[rt+1]<<16|ke[rt+2]<<8|ke[rt+3]:ke[rt+3]<<24|ke[rt+2]<<16|ke[rt+1]<<8|ke[rt],Ve[tt]=it>>>0}return Ve},split32:function(ke,Ae){for(var Ce=Array(4*ke.length),qe=0,ze=0;qe<ke.length;qe++,ze+=4){var Ve=ke[qe];"big"===Ae?(Ce[ze]=Ve>>>24,Ce[ze+1]=Ve>>>16&255,Ce[ze+2]=Ve>>>8&255,Ce[ze+3]=255&Ve):(Ce[ze+3]=Ve>>>24,Ce[ze+2]=Ve>>>16&255,Ce[ze+1]=Ve>>>8&255,Ce[ze]=255&Ve)}return Ce},rotr32:function(ke,Ae){return ke>>>Ae|ke<<32-Ae},rotl32:function(ke,Ae){return ke<<Ae|ke>>>32-Ae},sum32:function(ke,Ae){return ke+Ae>>>0},sum32_3:function(ke,Ae,Ce){return ke+Ae+Ce>>>0},sum32_4:function(ke,Ae,Ce,qe){return ke+Ae+Ce+qe>>>0},sum32_5:function(ke,Ae,Ce,qe,ze){return ke+Ae+Ce+qe+ze>>>0},sum64:function(ke,Ae,Ce,qe){var ze=ke[Ae],Ve=qe+ke[Ae+1]>>>0,tt=(Ve<qe?1:0)+Ce+ze;ke[Ae]=tt>>>0,ke[Ae+1]=Ve},sum64_hi:function(ke,Ae,Ce,qe){return(Ae+qe>>>0<Ae?1:0)+ke+Ce>>>0},sum64_lo:function(ke,Ae,Ce,qe){return Ae+qe>>>0},sum64_4_hi:function(ke,Ae,Ce,qe,ze,Ve,tt,rt){var it=0,nt=Ae;return it+=(nt=nt+qe>>>0)<Ae?1:0,it+=(nt=nt+Ve>>>0)<Ve?1:0,ke+Ce+ze+tt+(it+=(nt=nt+rt>>>0)<rt?1:0)>>>0},sum64_4_lo:function(ke,Ae,Ce,qe,ze,Ve,tt,rt){return Ae+qe+Ve+rt>>>0},sum64_5_hi:function(ke,Ae,Ce,qe,ze,Ve,tt,rt,it,nt){var ot=0,ct=Ae;return ot+=(ct=ct+qe>>>0)<Ae?1:0,ot+=(ct=ct+Ve>>>0)<Ve?1:0,ot+=(ct=ct+rt>>>0)<rt?1:0,ke+Ce+ze+tt+it+(ot+=(ct=ct+nt>>>0)<nt?1:0)>>>0},sum64_5_lo:function(ke,Ae,Ce,qe,ze,Ve,tt,rt,it,nt){return Ae+qe+Ve+rt+nt>>>0},rotr64_hi:function(ke,Ae,Ce){return(Ae<<32-Ce|ke>>>Ce)>>>0},rotr64_lo:function(ke,Ae,Ce){return(ke<<32-Ce|Ae>>>Ce)>>>0},shr64_hi:function(ke,Ae,Ce){return ke>>>Ce},shr64_lo:function(ke,Ae,Ce){return(ke<<32-Ce|Ae>>>Ce)>>>0}};function At(){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 Vr=At;At.prototype.update=function(ke,Ae){if(ke=$r.toArray(ke,Ae),this.pending?this.pending=this.pending.concat(ke):this.pending=ke,this.pendingTotal+=ke.length,this.pending.length>=this._delta8){var Ce=(ke=this.pending).length%this._delta8;this.pending=ke.slice(ke.length-Ce,ke.length),0===this.pending.length&&(this.pending=null),ke=$r.join32(ke,0,ke.length-Ce,this.endian);for(var qe=0;qe<ke.length;qe+=this._delta32)this._update(ke,qe,qe+this._delta32)}return this},At.prototype.digest=function(ke){return this.update(this._pad()),Ur(null===this.pending),this._digest(ke)},At.prototype._pad=function(){var ke=this.pendingTotal,Ae=this._delta8,Ce=Ae-(ke+this.padLength)%Ae,qe=Array(Ce+this.padLength);qe[0]=128;for(var ze=1;ze<Ce;ze++)qe[ze]=0;if(ke<<=3,"big"===this.endian){for(var Ve=8;Ve<this.padLength;Ve++)qe[ze++]=0;qe[ze++]=0,qe[ze++]=0,qe[ze++]=0,qe[ze++]=0,qe[ze++]=ke>>>24&255,qe[ze++]=ke>>>16&255,qe[ze++]=ke>>>8&255,qe[ze++]=255&ke}else for(qe[ze++]=255&ke,qe[ze++]=ke>>>8&255,qe[ze++]=ke>>>16&255,qe[ze++]=ke>>>24&255,qe[ze++]=0,qe[ze++]=0,qe[ze++]=0,qe[ze++]=0,Ve=8;Ve<this.padLength;Ve++)qe[ze++]=0;return qe};var Jr={BlockHash:Vr},Qr=$r.rotr32;function xt(ke,Ae,Ce){return ke&Ae^~ke&Ce}function Mt(ke,Ae,Ce){return ke&Ae^ke&Ce^Ae&Ce}function Ct(ke,Ae,Ce){return ke^Ae^Ce}var ti={ft_1:function(ke,Ae,Ce,qe){return 0===ke?xt(Ae,Ce,qe):1===ke||3===ke?Ct(Ae,Ce,qe):2===ke?Mt(Ae,Ce,qe):void 0},ch32:xt,maj32:Mt,p32:Ct,s0_256:function(ke){return Qr(ke,2)^Qr(ke,13)^Qr(ke,22)},s1_256:function(ke){return Qr(ke,6)^Qr(ke,11)^Qr(ke,25)},g0_256:function(ke){return Qr(ke,7)^Qr(ke,18)^ke>>>3},g1_256:function(ke){return Qr(ke,17)^Qr(ke,19)^ke>>>10}},ri=$r.sum32,si=$r.sum32_4,ai=$r.sum32_5,ui=ti.ch32,hi=ti.maj32,pi=ti.s0_256,yi=ti.s1_256,mi=ti.g0_256,gi=ti.g1_256,bi=Jr.BlockHash,vi=[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 jt(){if(!(this instanceof jt))return new jt;bi.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=vi,this.W=Array(64)}$r.inherits(jt,bi);var wi=jt;function Wt(){if(!(this instanceof Wt))return new Wt;wi.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}jt.blockSize=512,jt.outSize=256,jt.hmacStrength=192,jt.padLength=64,jt.prototype._update=function(ke,Ae){for(var Ce=this.W,qe=0;qe<16;qe++)Ce[qe]=ke[Ae+qe];for(;qe<Ce.length;qe++)Ce[qe]=si(gi(Ce[qe-2]),Ce[qe-7],mi(Ce[qe-15]),Ce[qe-16]);var ze=this.h[0],Ve=this.h[1],tt=this.h[2],rt=this.h[3],it=this.h[4],nt=this.h[5],ot=this.h[6],ct=this.h[7];for(Ur(this.k.length===Ce.length),qe=0;qe<Ce.length;qe++){var ht=ai(ct,yi(it),ui(it,nt,ot),this.k[qe],Ce[qe]),ft=ri(pi(ze),hi(ze,Ve,tt));ct=ot,ot=nt,nt=it,it=ri(rt,ht),rt=tt,tt=Ve,Ve=ze,ze=ri(ht,ft)}this.h[0]=ri(this.h[0],ze),this.h[1]=ri(this.h[1],Ve),this.h[2]=ri(this.h[2],tt),this.h[3]=ri(this.h[3],rt),this.h[4]=ri(this.h[4],it),this.h[5]=ri(this.h[5],nt),this.h[6]=ri(this.h[6],ot),this.h[7]=ri(this.h[7],ct)},jt.prototype._digest=function(ke){return"hex"===ke?$r.toHex32(this.h,"big"):$r.split32(this.h,"big")},$r.inherits(Wt,wi);var _i=Wt;Wt.blockSize=512,Wt.outSize=224,Wt.hmacStrength=192,Wt.padLength=64,Wt.prototype._digest=function(ke){return"hex"===ke?$r.toHex32(this.h.slice(0,7),"big"):$r.split32(this.h.slice(0,7),"big")};var Bi=$r.rotr64_hi,Ti=$r.rotr64_lo,Oi=$r.shr64_hi,qi=$r.shr64_lo,zi=$r.sum64,Fi=$r.sum64_hi,Gi=$r.sum64_lo,Vi=$r.sum64_4_hi,Yi=$r.sum64_4_lo,Ji=$r.sum64_5_hi,Xi=$r.sum64_5_lo,Qi=Jr.BlockHash,en=[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;Qi.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=en,this.W=Array(160)}$r.inherits(ar,Qi);var tn=ar;function or(ke,Ae,Ce,qe,ze){var Ve=ke&Ce^~ke&ze;return Ve<0&&(Ve+=4294967296),Ve}function cr(ke,Ae,Ce,qe,ze,Ve){var tt=Ae&qe^~Ae&Ve;return tt<0&&(tt+=4294967296),tt}function ur(ke,Ae,Ce,qe,ze){var Ve=ke&Ce^ke&ze^Ce&ze;return Ve<0&&(Ve+=4294967296),Ve}function hr(ke,Ae,Ce,qe,ze,Ve){var tt=Ae&qe^Ae&Ve^qe&Ve;return tt<0&&(tt+=4294967296),tt}function fr(ke,Ae){var Ce=Bi(ke,Ae,28)^Bi(Ae,ke,2)^Bi(Ae,ke,7);return Ce<0&&(Ce+=4294967296),Ce}function dr(ke,Ae){var Ce=Ti(ke,Ae,28)^Ti(Ae,ke,2)^Ti(Ae,ke,7);return Ce<0&&(Ce+=4294967296),Ce}function lr(ke,Ae){var Ce=Bi(ke,Ae,14)^Bi(ke,Ae,18)^Bi(Ae,ke,9);return Ce<0&&(Ce+=4294967296),Ce}function pr(ke,Ae){var Ce=Ti(ke,Ae,14)^Ti(ke,Ae,18)^Ti(Ae,ke,9);return Ce<0&&(Ce+=4294967296),Ce}function yr(ke,Ae){var Ce=Bi(ke,Ae,1)^Bi(ke,Ae,8)^Oi(ke,Ae,7);return Ce<0&&(Ce+=4294967296),Ce}function br(ke,Ae){var Ce=Ti(ke,Ae,1)^Ti(ke,Ae,8)^qi(ke,Ae,7);return Ce<0&&(Ce+=4294967296),Ce}function mr(ke,Ae){var Ce=Bi(ke,Ae,19)^Bi(Ae,ke,29)^Oi(ke,Ae,6);return Ce<0&&(Ce+=4294967296),Ce}function gr(ke,Ae){var Ce=Ti(ke,Ae,19)^Ti(Ae,ke,29)^qi(ke,Ae,6);return Ce<0&&(Ce+=4294967296),Ce}function wr(){if(!(this instanceof wr))return new wr;tn.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(ke,Ae){for(var Ce=this.W,qe=0;qe<32;qe++)Ce[qe]=ke[Ae+qe];for(;qe<Ce.length;qe+=2){var ze=mr(Ce[qe-4],Ce[qe-3]),Ve=gr(Ce[qe-4],Ce[qe-3]),tt=Ce[qe-14],rt=Ce[qe-13],it=yr(Ce[qe-30],Ce[qe-29]),nt=br(Ce[qe-30],Ce[qe-29]),ot=Ce[qe-32],ct=Ce[qe-31];Ce[qe]=Vi(ze,Ve,tt,rt,it,nt,ot,ct),Ce[qe+1]=Yi(ze,Ve,tt,rt,it,nt,ot,ct)}},ar.prototype._update=function(ke,Ae){this._prepareBlock(ke,Ae);var Ce=this.W,qe=this.h[0],ze=this.h[1],Ve=this.h[2],tt=this.h[3],rt=this.h[4],it=this.h[5],nt=this.h[6],ot=this.h[7],ct=this.h[8],ht=this.h[9],ft=this.h[10],yt=this.h[11],mt=this.h[12],kt=this.h[13],St=this.h[14],Et=this.h[15];Ur(this.k.length===Ce.length);for(var Pt=0;Pt<Ce.length;Pt+=2){var Dt=St,Rt=Et,Bt=lr(ct,ht),Tt=pr(ct,ht),Ut=or(ct,ht,ft,yt,mt),Kt=cr(ct,ht,ft,yt,mt,kt),It=this.k[Pt],Ot=this.k[Pt+1],Nt=Ce[Pt],qt=Ce[Pt+1],zt=Ji(Dt,Rt,Bt,Tt,Ut,Kt,It,Ot,Nt,qt),Ft=Xi(Dt,Rt,Bt,Tt,Ut,Kt,It,Ot,Nt,qt);Dt=fr(qe,ze),Rt=dr(qe,ze),Bt=ur(qe,ze,Ve,tt,rt),Tt=hr(qe,ze,Ve,tt,rt,it);var Lt=Fi(Dt,Rt,Bt,Tt),Ht=Gi(Dt,Rt,Bt,Tt);St=mt,Et=kt,mt=ft,kt=yt,ft=ct,yt=ht,ct=Fi(nt,ot,zt,Ft),ht=Gi(ot,ot,zt,Ft),nt=rt,ot=it,rt=Ve,it=tt,Ve=qe,tt=ze,qe=Fi(zt,Ft,Lt,Ht),ze=Gi(zt,Ft,Lt,Ht)}zi(this.h,0,qe,ze),zi(this.h,2,Ve,tt),zi(this.h,4,rt,it),zi(this.h,6,nt,ot),zi(this.h,8,ct,ht),zi(this.h,10,ft,yt),zi(this.h,12,mt,kt),zi(this.h,14,St,Et)},ar.prototype._digest=function(ke){return"hex"===ke?$r.toHex32(this.h,"big"):$r.split32(this.h,"big")},$r.inherits(wr,tn);var rn=wr;wr.blockSize=1024,wr.outSize=384,wr.hmacStrength=192,wr.padLength=128,wr.prototype._digest=function(ke){return"hex"===ke?$r.toHex32(this.h.slice(0,12),"big"):$r.split32(this.h.slice(0,12),"big")};var cn=$r.rotl32,fn=$r.sum32,ln=$r.sum32_3,dn=$r.sum32_4,gn=Jr.BlockHash;function Pr(){if(!(this instanceof Pr))return new Pr;gn.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}$r.inherits(Pr,gn);var wn=Pr;function Mr(ke,Ae,Ce,qe){return ke<=15?Ae^Ce^qe:ke<=31?Ae&Ce|~Ae&qe:ke<=47?(Ae|~Ce)^qe:ke<=63?Ae&qe|Ce&~qe:Ae^(Ce|~qe)}function Cr(ke){return ke<=15?0:ke<=31?1518500249:ke<=47?1859775393:ke<=63?2400959708:2840853838}function Kr(ke){return ke<=15?1352829926:ke<=31?1548603684:ke<=47?1836072691:ke<=63?2053994217:0}Pr.blockSize=512,Pr.outSize=160,Pr.hmacStrength=192,Pr.padLength=64,Pr.prototype._update=function(ke,Ae){for(var Ce=this.h[0],qe=this.h[1],ze=this.h[2],Ve=this.h[3],tt=this.h[4],rt=Ce,it=qe,nt=ze,ot=Ve,ct=tt,ht=0;ht<80;ht++){var ft=fn(cn(dn(Ce,Mr(ht,qe,ze,Ve),ke[Sn[ht]+Ae],Cr(ht)),Mn[ht]),tt);Ce=tt,tt=Ve,Ve=cn(ze,10),ze=qe,qe=ft,ft=fn(cn(dn(rt,Mr(79-ht,it,nt,ot),ke[En[ht]+Ae],Kr(ht)),Pn[ht]),ct),rt=ct,ct=ot,ot=cn(nt,10),nt=it,it=ft}ft=ln(this.h[1],ze,ot),this.h[1]=ln(this.h[2],Ve,ct),this.h[2]=ln(this.h[3],tt,rt),this.h[3]=ln(this.h[4],Ce,it),this.h[4]=ln(this.h[0],qe,nt),this.h[0]=ft},Pr.prototype._digest=function(ke){return"hex"===ke?$r.toHex32(this.h,"little"):$r.split32(this.h,"little")};var Sn=[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],En=[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],Mn=[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],Pn=[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],xn={ripemd160:wn};function Tr(ke,Ae){let Ce=ke[0],qe=ke[1],ze=ke[2],Ve=ke[3];Ce=qr(Ce,qe,ze,Ve,Ae[0],7,-680876936),Ve=qr(Ve,Ce,qe,ze,Ae[1],12,-389564586),ze=qr(ze,Ve,Ce,qe,Ae[2],17,606105819),qe=qr(qe,ze,Ve,Ce,Ae[3],22,-1044525330),Ce=qr(Ce,qe,ze,Ve,Ae[4],7,-176418897),Ve=qr(Ve,Ce,qe,ze,Ae[5],12,1200080426),ze=qr(ze,Ve,Ce,qe,Ae[6],17,-1473231341),qe=qr(qe,ze,Ve,Ce,Ae[7],22,-45705983),Ce=qr(Ce,qe,ze,Ve,Ae[8],7,1770035416),Ve=qr(Ve,Ce,qe,ze,Ae[9],12,-1958414417),ze=qr(ze,Ve,Ce,qe,Ae[10],17,-42063),qe=qr(qe,ze,Ve,Ce,Ae[11],22,-1990404162),Ce=qr(Ce,qe,ze,Ve,Ae[12],7,1804603682),Ve=qr(Ve,Ce,qe,ze,Ae[13],12,-40341101),ze=qr(ze,Ve,Ce,qe,Ae[14],17,-1502002290),qe=qr(qe,ze,Ve,Ce,Ae[15],22,1236535329),Ce=Or(Ce,qe,ze,Ve,Ae[1],5,-165796510),Ve=Or(Ve,Ce,qe,ze,Ae[6],9,-1069501632),ze=Or(ze,Ve,Ce,qe,Ae[11],14,643717713),qe=Or(qe,ze,Ve,Ce,Ae[0],20,-373897302),Ce=Or(Ce,qe,ze,Ve,Ae[5],5,-701558691),Ve=Or(Ve,Ce,qe,ze,Ae[10],9,38016083),ze=Or(ze,Ve,Ce,qe,Ae[15],14,-660478335),qe=Or(qe,ze,Ve,Ce,Ae[4],20,-405537848),Ce=Or(Ce,qe,ze,Ve,Ae[9],5,568446438),Ve=Or(Ve,Ce,qe,ze,Ae[14],9,-1019803690),ze=Or(ze,Ve,Ce,qe,Ae[3],14,-187363961),qe=Or(qe,ze,Ve,Ce,Ae[8],20,1163531501),Ce=Or(Ce,qe,ze,Ve,Ae[13],5,-1444681467),Ve=Or(Ve,Ce,qe,ze,Ae[2],9,-51403784),ze=Or(ze,Ve,Ce,qe,Ae[7],14,1735328473),qe=Or(qe,ze,Ve,Ce,Ae[12],20,-1926607734),Ce=Fr(Ce,qe,ze,Ve,Ae[5],4,-378558),Ve=Fr(Ve,Ce,qe,ze,Ae[8],11,-2022574463),ze=Fr(ze,Ve,Ce,qe,Ae[11],16,1839030562),qe=Fr(qe,ze,Ve,Ce,Ae[14],23,-35309556),Ce=Fr(Ce,qe,ze,Ve,Ae[1],4,-1530992060),Ve=Fr(Ve,Ce,qe,ze,Ae[4],11,1272893353),ze=Fr(ze,Ve,Ce,qe,Ae[7],16,-155497632),qe=Fr(qe,ze,Ve,Ce,Ae[10],23,-1094730640),Ce=Fr(Ce,qe,ze,Ve,Ae[13],4,681279174),Ve=Fr(Ve,Ce,qe,ze,Ae[0],11,-358537222),ze=Fr(ze,Ve,Ce,qe,Ae[3],16,-722521979),qe=Fr(qe,ze,Ve,Ce,Ae[6],23,76029189),Ce=Fr(Ce,qe,ze,Ve,Ae[9],4,-640364487),Ve=Fr(Ve,Ce,qe,ze,Ae[12],11,-421815835),ze=Fr(ze,Ve,Ce,qe,Ae[15],16,530742520),qe=Fr(qe,ze,Ve,Ce,Ae[2],23,-995338651),Ce=Nr(Ce,qe,ze,Ve,Ae[0],6,-198630844),Ve=Nr(Ve,Ce,qe,ze,Ae[7],10,1126891415),ze=Nr(ze,Ve,Ce,qe,Ae[14],15,-1416354905),qe=Nr(qe,ze,Ve,Ce,Ae[5],21,-57434055),Ce=Nr(Ce,qe,ze,Ve,Ae[12],6,1700485571),Ve=Nr(Ve,Ce,qe,ze,Ae[3],10,-1894986606),ze=Nr(ze,Ve,Ce,qe,Ae[10],15,-1051523),qe=Nr(qe,ze,Ve,Ce,Ae[1],21,-2054922799),Ce=Nr(Ce,qe,ze,Ve,Ae[8],6,1873313359),Ve=Nr(Ve,Ce,qe,ze,Ae[15],10,-30611744),ze=Nr(ze,Ve,Ce,qe,Ae[6],15,-1560198380),qe=Nr(qe,ze,Ve,Ce,Ae[13],21,1309151649),Ce=Nr(Ce,qe,ze,Ve,Ae[4],6,-145523070),Ve=Nr(Ve,Ce,qe,ze,Ae[11],10,-1120210379),ze=Nr(ze,Ve,Ce,qe,Ae[2],15,718787259),qe=Nr(qe,ze,Ve,Ce,Ae[9],21,-343485551),ke[0]=Hr(Ce,ke[0]),ke[1]=Hr(qe,ke[1]),ke[2]=Hr(ze,ke[2]),ke[3]=Hr(Ve,ke[3])}function zr(ke,Ae,Ce,qe,ze,Ve){return Ae=Hr(Hr(Ae,ke),Hr(qe,Ve)),Hr(Ae<<ze|Ae>>>32-ze,Ce)}function qr(ke,Ae,Ce,qe,ze,Ve,tt){return zr(Ae&Ce|~Ae&qe,ke,Ae,ze,Ve,tt)}function Or(ke,Ae,Ce,qe,ze,Ve,tt){return zr(Ae&qe|Ce&~qe,ke,Ae,ze,Ve,tt)}function Fr(ke,Ae,Ce,qe,ze,Ve,tt){return zr(Ae^Ce^qe,ke,Ae,ze,Ve,tt)}function Nr(ke,Ae,Ce,qe,ze,Ve,tt){return zr(Ce^(Ae|~qe),ke,Ae,ze,Ve,tt)}function jr(ke){const Ae=[];let Ce;for(Ce=0;Ce<64;Ce+=4)Ae[Ce>>2]=ke.charCodeAt(Ce)+(ke.charCodeAt(Ce+1)<<8)+(ke.charCodeAt(Ce+2)<<16)+(ke.charCodeAt(Ce+3)<<24);return Ae}const Cn="0123456789abcdef".split("");function Wr(ke){let Ae="",Ce=0;for(;Ce<4;Ce++)Ae+=Cn[ke>>8*Ce+4&15]+Cn[ke>>8*Ce&15];return Ae}function Hr(ke,Ae){return ke+Ae&4294967295}const Rn=Zt.getWebCrypto(),Bn=Zt.getNodeCrypto(),Un=Bn&&Bn.getHashes();function Zr(ke){if(Bn&&Un.includes(ke))return async function(Ae){const Ce=Bn.createHash(ke);return Y(Ae,(ke=>{Ce.update(ke)}),(()=>new Uint8Array(Ce.digest())))}}function Yr(ke,Ae){return async function(Ce,qe=tr){if(_(Ce)&&(Ce=await ie(Ce)),!Zt.isStream(Ce)&&Rn&&Ae&&Ce.length>=qe.minBytesForWebCrypto)return new Uint8Array(await Rn.digest(Ae,Ce));const ze=ke();return Y(Ce,(ke=>{ze.update(ke)}),(()=>new Uint8Array(ze.digest())))}}function Xr(ke,Ae){return async function(Ce,qe=tr){if(_(Ce)&&(Ce=await ie(Ce)),Zt.isStream(Ce)){const Ae=new ke;return Y(Ce,(ke=>{Ae.process(ke)}),(()=>Ae.finish().result))}return Rn&&Ae&&Ce.length>=qe.minBytesForWebCrypto?new Uint8Array(await Rn.digest(Ae,Ce)):ke.bytes(Ce)}}const On={md5:Zr("md5")||async function(ke){const Ae=function(ke){const Ae=ke.length,Ce=[1732584193,-271733879,-1732584194,271733878];let qe;for(qe=64;qe<=ke.length;qe+=64)Tr(Ce,jr(ke.substring(qe-64,qe)));ke=ke.substring(qe-64);const ze=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(qe=0;qe<ke.length;qe++)ze[qe>>2]|=ke.charCodeAt(qe)<<(qe%4<<3);if(ze[qe>>2]|=128<<(qe%4<<3),qe>55)for(Tr(Ce,ze),qe=0;qe<16;qe++)ze[qe]=0;return ze[14]=8*Ae,Tr(Ce,ze),Ce}(Zt.uint8ArrayToString(ke));return Zt.hexToUint8Array(function(ke){for(let Ae=0;Ae<ke.length;Ae++)ke[Ae]=Wr(ke[Ae]);return ke.join("")}(Ae))},sha1:Zr("sha1")||Xr(ut,"SHA-1"),sha224:Zr("sha224")||Yr(_i),sha256:Zr("sha256")||Xr(dt,"SHA-256"),sha384:Zr("sha384")||Yr(rn,"SHA-384"),sha512:Zr("sha512")||Yr(tn,"SHA-512"),ripemd:Zr("ripemd160")||Yr(wn)};var Nn={md5:On.md5,sha1:On.sha1,sha224:On.sha224,sha256:On.sha256,sha384:On.sha384,sha512:On.sha512,ripemd:On.ripemd,digest:function(ke,Ae){switch(ke){case er.hash.md5:return this.md5(Ae);case er.hash.sha1:return this.sha1(Ae);case er.hash.ripemd:return this.ripemd(Ae);case er.hash.sha256:return this.sha256(Ae);case er.hash.sha384:return this.sha384(Ae);case er.hash.sha512:return this.sha512(Ae);case er.hash.sha224:return this.sha224(Ae);default:throw Error("Invalid hash function.")}},getHashByteLength:function(ke){switch(ke){case er.hash.md5:return 16;case er.hash.sha1:case er.hash.ripemd:return 20;case er.hash.sha256:return 32;case er.hash.sha384:return 48;case er.hash.sha512:return 64;case er.hash.sha224:return 28;default:throw Error("Invalid hash algorithm.")}}};class ei{static encrypt(ke,Ae,Ce){return new ei(Ae,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce){return new ei(Ae,Ce).decrypt(ke)}constructor(ke,Ae,Ce){this.aes=Ce||new Oe(ke,Ae,!0,"CFB"),delete this.aes.padding}encrypt(ke){return Ue(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ue(this.aes.AES_Decrypt_process(ke),this.aes.AES_Decrypt_finish())}}var qn=bt((function(ke){!function(ke){var t=function(ke){var Ae,Ce=new Float64Array(16);if(ke)for(Ae=0;Ae<ke.length;Ae++)Ce[Ae]=ke[Ae];return Ce},r=function(){throw Error("no PRNG")},Ae=new Uint8Array(32);Ae[0]=9;var Ce=t(),qe=t([1]),ze=t([56129,1]),Ve=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),tt=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),rt=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),it=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),nt=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function l(ke,Ae,Ce,qe){return function(ke,Ae,Ce,qe,ze){var Ve,tt=0;for(Ve=0;Ve<ze;Ve++)tt|=ke[Ae+Ve]^Ce[qe+Ve];return(1&tt-1>>>8)-1}(ke,Ae,Ce,qe,32)}function p(ke,Ae){var Ce;for(Ce=0;Ce<16;Ce++)ke[Ce]=0|Ae[Ce]}function y(ke){var Ae,Ce,qe=1;for(Ae=0;Ae<16;Ae++)Ce=ke[Ae]+qe+65535,qe=Math.floor(Ce/65536),ke[Ae]=Ce-65536*qe;ke[0]+=qe-1+37*(qe-1)}function b(ke,Ae,Ce){for(var qe,ze=~(Ce-1),Ve=0;Ve<16;Ve++)qe=ze&(ke[Ve]^Ae[Ve]),ke[Ve]^=qe,Ae[Ve]^=qe}function m(ke,Ae){var Ce,qe,ze,Ve=t(),tt=t();for(Ce=0;Ce<16;Ce++)tt[Ce]=Ae[Ce];for(y(tt),y(tt),y(tt),qe=0;qe<2;qe++){for(Ve[0]=tt[0]-65517,Ce=1;Ce<15;Ce++)Ve[Ce]=tt[Ce]-65535-(Ve[Ce-1]>>16&1),Ve[Ce-1]&=65535;Ve[15]=tt[15]-32767-(Ve[14]>>16&1),ze=Ve[15]>>16&1,Ve[14]&=65535,b(tt,Ve,1-ze)}for(Ce=0;Ce<16;Ce++)ke[2*Ce]=255&tt[Ce],ke[2*Ce+1]=tt[Ce]>>8}function g(ke,Ae){var Ce=new Uint8Array(32),qe=new Uint8Array(32);return m(Ce,ke),m(qe,Ae),l(Ce,0,qe,0)}function w(ke){var Ae=new Uint8Array(32);return m(Ae,ke),1&Ae[0]}function v(ke,Ae){var Ce;for(Ce=0;Ce<16;Ce++)ke[Ce]=Ae[2*Ce]+(Ae[2*Ce+1]<<8);ke[15]&=32767}function _(ke,Ae,Ce){for(var qe=0;qe<16;qe++)ke[qe]=Ae[qe]+Ce[qe]}function k(ke,Ae,Ce){for(var qe=0;qe<16;qe++)ke[qe]=Ae[qe]-Ce[qe]}function A(ke,Ae,Ce){var qe,ze,Ve=0,tt=0,rt=0,it=0,nt=0,ot=0,ct=0,ht=0,ft=0,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0,Dt=0,Rt=0,Bt=0,Tt=0,Ut=0,Kt=0,It=0,Ot=0,Nt=0,qt=0,zt=0,Ft=0,Lt=0,Ht=0,Gt=0,$t=0,Vt=Ce[0],Zt=Ce[1],Yt=Ce[2],Jt=Ce[3],Xt=Ce[4],Qt=Ce[5],er=Ce[6],tr=Ce[7],rr=Ce[8],ir=Ce[9],nr=Ce[10],sr=Ce[11],vr=Ce[12],_r=Ce[13],kr=Ce[14],Ar=Ce[15];Ve+=(qe=Ae[0])*Vt,tt+=qe*Zt,rt+=qe*Yt,it+=qe*Jt,nt+=qe*Xt,ot+=qe*Qt,ct+=qe*er,ht+=qe*tr,ft+=qe*rr,yt+=qe*ir,mt+=qe*nr,kt+=qe*sr,St+=qe*vr,Et+=qe*_r,Pt+=qe*kr,Dt+=qe*Ar,tt+=(qe=Ae[1])*Vt,rt+=qe*Zt,it+=qe*Yt,nt+=qe*Jt,ot+=qe*Xt,ct+=qe*Qt,ht+=qe*er,ft+=qe*tr,yt+=qe*rr,mt+=qe*ir,kt+=qe*nr,St+=qe*sr,Et+=qe*vr,Pt+=qe*_r,Dt+=qe*kr,Rt+=qe*Ar,rt+=(qe=Ae[2])*Vt,it+=qe*Zt,nt+=qe*Yt,ot+=qe*Jt,ct+=qe*Xt,ht+=qe*Qt,ft+=qe*er,yt+=qe*tr,mt+=qe*rr,kt+=qe*ir,St+=qe*nr,Et+=qe*sr,Pt+=qe*vr,Dt+=qe*_r,Rt+=qe*kr,Bt+=qe*Ar,it+=(qe=Ae[3])*Vt,nt+=qe*Zt,ot+=qe*Yt,ct+=qe*Jt,ht+=qe*Xt,ft+=qe*Qt,yt+=qe*er,mt+=qe*tr,kt+=qe*rr,St+=qe*ir,Et+=qe*nr,Pt+=qe*sr,Dt+=qe*vr,Rt+=qe*_r,Bt+=qe*kr,Tt+=qe*Ar,nt+=(qe=Ae[4])*Vt,ot+=qe*Zt,ct+=qe*Yt,ht+=qe*Jt,ft+=qe*Xt,yt+=qe*Qt,mt+=qe*er,kt+=qe*tr,St+=qe*rr,Et+=qe*ir,Pt+=qe*nr,Dt+=qe*sr,Rt+=qe*vr,Bt+=qe*_r,Tt+=qe*kr,Ut+=qe*Ar,ot+=(qe=Ae[5])*Vt,ct+=qe*Zt,ht+=qe*Yt,ft+=qe*Jt,yt+=qe*Xt,mt+=qe*Qt,kt+=qe*er,St+=qe*tr,Et+=qe*rr,Pt+=qe*ir,Dt+=qe*nr,Rt+=qe*sr,Bt+=qe*vr,Tt+=qe*_r,Ut+=qe*kr,Kt+=qe*Ar,ct+=(qe=Ae[6])*Vt,ht+=qe*Zt,ft+=qe*Yt,yt+=qe*Jt,mt+=qe*Xt,kt+=qe*Qt,St+=qe*er,Et+=qe*tr,Pt+=qe*rr,Dt+=qe*ir,Rt+=qe*nr,Bt+=qe*sr,Tt+=qe*vr,Ut+=qe*_r,Kt+=qe*kr,It+=qe*Ar,ht+=(qe=Ae[7])*Vt,ft+=qe*Zt,yt+=qe*Yt,mt+=qe*Jt,kt+=qe*Xt,St+=qe*Qt,Et+=qe*er,Pt+=qe*tr,Dt+=qe*rr,Rt+=qe*ir,Bt+=qe*nr,Tt+=qe*sr,Ut+=qe*vr,Kt+=qe*_r,It+=qe*kr,Ot+=qe*Ar,ft+=(qe=Ae[8])*Vt,yt+=qe*Zt,mt+=qe*Yt,kt+=qe*Jt,St+=qe*Xt,Et+=qe*Qt,Pt+=qe*er,Dt+=qe*tr,Rt+=qe*rr,Bt+=qe*ir,Tt+=qe*nr,Ut+=qe*sr,Kt+=qe*vr,It+=qe*_r,Ot+=qe*kr,Nt+=qe*Ar,yt+=(qe=Ae[9])*Vt,mt+=qe*Zt,kt+=qe*Yt,St+=qe*Jt,Et+=qe*Xt,Pt+=qe*Qt,Dt+=qe*er,Rt+=qe*tr,Bt+=qe*rr,Tt+=qe*ir,Ut+=qe*nr,Kt+=qe*sr,It+=qe*vr,Ot+=qe*_r,Nt+=qe*kr,qt+=qe*Ar,mt+=(qe=Ae[10])*Vt,kt+=qe*Zt,St+=qe*Yt,Et+=qe*Jt,Pt+=qe*Xt,Dt+=qe*Qt,Rt+=qe*er,Bt+=qe*tr,Tt+=qe*rr,Ut+=qe*ir,Kt+=qe*nr,It+=qe*sr,Ot+=qe*vr,Nt+=qe*_r,qt+=qe*kr,zt+=qe*Ar,kt+=(qe=Ae[11])*Vt,St+=qe*Zt,Et+=qe*Yt,Pt+=qe*Jt,Dt+=qe*Xt,Rt+=qe*Qt,Bt+=qe*er,Tt+=qe*tr,Ut+=qe*rr,Kt+=qe*ir,It+=qe*nr,Ot+=qe*sr,Nt+=qe*vr,qt+=qe*_r,zt+=qe*kr,Ft+=qe*Ar,St+=(qe=Ae[12])*Vt,Et+=qe*Zt,Pt+=qe*Yt,Dt+=qe*Jt,Rt+=qe*Xt,Bt+=qe*Qt,Tt+=qe*er,Ut+=qe*tr,Kt+=qe*rr,It+=qe*ir,Ot+=qe*nr,Nt+=qe*sr,qt+=qe*vr,zt+=qe*_r,Ft+=qe*kr,Lt+=qe*Ar,Et+=(qe=Ae[13])*Vt,Pt+=qe*Zt,Dt+=qe*Yt,Rt+=qe*Jt,Bt+=qe*Xt,Tt+=qe*Qt,Ut+=qe*er,Kt+=qe*tr,It+=qe*rr,Ot+=qe*ir,Nt+=qe*nr,qt+=qe*sr,zt+=qe*vr,Ft+=qe*_r,Lt+=qe*kr,Ht+=qe*Ar,Pt+=(qe=Ae[14])*Vt,Dt+=qe*Zt,Rt+=qe*Yt,Bt+=qe*Jt,Tt+=qe*Xt,Ut+=qe*Qt,Kt+=qe*er,It+=qe*tr,Ot+=qe*rr,Nt+=qe*ir,qt+=qe*nr,zt+=qe*sr,Ft+=qe*vr,Lt+=qe*_r,Ht+=qe*kr,Gt+=qe*Ar,Dt+=(qe=Ae[15])*Vt,tt+=38*(Bt+=qe*Yt),rt+=38*(Tt+=qe*Jt),it+=38*(Ut+=qe*Xt),nt+=38*(Kt+=qe*Qt),ot+=38*(It+=qe*er),ct+=38*(Ot+=qe*tr),ht+=38*(Nt+=qe*rr),ft+=38*(qt+=qe*ir),yt+=38*(zt+=qe*nr),mt+=38*(Ft+=qe*sr),kt+=38*(Lt+=qe*vr),St+=38*(Ht+=qe*_r),Et+=38*(Gt+=qe*kr),Pt+=38*($t+=qe*Ar),Ve=(qe=(Ve+=38*(Rt+=qe*Zt))+(ze=1)+65535)-65536*(ze=Math.floor(qe/65536)),tt=(qe=tt+ze+65535)-65536*(ze=Math.floor(qe/65536)),rt=(qe=rt+ze+65535)-65536*(ze=Math.floor(qe/65536)),it=(qe=it+ze+65535)-65536*(ze=Math.floor(qe/65536)),nt=(qe=nt+ze+65535)-65536*(ze=Math.floor(qe/65536)),ot=(qe=ot+ze+65535)-65536*(ze=Math.floor(qe/65536)),ct=(qe=ct+ze+65535)-65536*(ze=Math.floor(qe/65536)),ht=(qe=ht+ze+65535)-65536*(ze=Math.floor(qe/65536)),ft=(qe=ft+ze+65535)-65536*(ze=Math.floor(qe/65536)),yt=(qe=yt+ze+65535)-65536*(ze=Math.floor(qe/65536)),mt=(qe=mt+ze+65535)-65536*(ze=Math.floor(qe/65536)),kt=(qe=kt+ze+65535)-65536*(ze=Math.floor(qe/65536)),St=(qe=St+ze+65535)-65536*(ze=Math.floor(qe/65536)),Et=(qe=Et+ze+65535)-65536*(ze=Math.floor(qe/65536)),Pt=(qe=Pt+ze+65535)-65536*(ze=Math.floor(qe/65536)),Dt=(qe=Dt+ze+65535)-65536*(ze=Math.floor(qe/65536)),Ve=(qe=(Ve+=ze-1+37*(ze-1))+(ze=1)+65535)-65536*(ze=Math.floor(qe/65536)),tt=(qe=tt+ze+65535)-65536*(ze=Math.floor(qe/65536)),rt=(qe=rt+ze+65535)-65536*(ze=Math.floor(qe/65536)),it=(qe=it+ze+65535)-65536*(ze=Math.floor(qe/65536)),nt=(qe=nt+ze+65535)-65536*(ze=Math.floor(qe/65536)),ot=(qe=ot+ze+65535)-65536*(ze=Math.floor(qe/65536)),ct=(qe=ct+ze+65535)-65536*(ze=Math.floor(qe/65536)),ht=(qe=ht+ze+65535)-65536*(ze=Math.floor(qe/65536)),ft=(qe=ft+ze+65535)-65536*(ze=Math.floor(qe/65536)),yt=(qe=yt+ze+65535)-65536*(ze=Math.floor(qe/65536)),mt=(qe=mt+ze+65535)-65536*(ze=Math.floor(qe/65536)),kt=(qe=kt+ze+65535)-65536*(ze=Math.floor(qe/65536)),St=(qe=St+ze+65535)-65536*(ze=Math.floor(qe/65536)),Et=(qe=Et+ze+65535)-65536*(ze=Math.floor(qe/65536)),Pt=(qe=Pt+ze+65535)-65536*(ze=Math.floor(qe/65536)),Dt=(qe=Dt+ze+65535)-65536*(ze=Math.floor(qe/65536)),Ve+=ze-1+37*(ze-1),ke[0]=Ve,ke[1]=tt,ke[2]=rt,ke[3]=it,ke[4]=nt,ke[5]=ot,ke[6]=ct,ke[7]=ht,ke[8]=ft,ke[9]=yt,ke[10]=mt,ke[11]=kt,ke[12]=St,ke[13]=Et,ke[14]=Pt,ke[15]=Dt}function S(ke,Ae){A(ke,Ae,Ae)}function E(ke,Ae){var Ce,qe=t();for(Ce=0;Ce<16;Ce++)qe[Ce]=Ae[Ce];for(Ce=253;Ce>=0;Ce--)S(qe,qe),2!==Ce&&4!==Ce&&A(qe,qe,Ae);for(Ce=0;Ce<16;Ce++)ke[Ce]=qe[Ce]}function P(ke,Ae,Ce){var qe,Ve,tt=new Uint8Array(32),rt=new Float64Array(80),it=t(),nt=t(),ot=t(),ct=t(),ht=t(),ft=t();for(Ve=0;Ve<31;Ve++)tt[Ve]=Ae[Ve];for(tt[31]=127&Ae[31]|64,tt[0]&=248,v(rt,Ce),Ve=0;Ve<16;Ve++)nt[Ve]=rt[Ve],ct[Ve]=it[Ve]=ot[Ve]=0;for(it[0]=ct[0]=1,Ve=254;Ve>=0;--Ve)b(it,nt,qe=tt[Ve>>>3]>>>(7&Ve)&1),b(ot,ct,qe),_(ht,it,ot),k(it,it,ot),_(ot,nt,ct),k(nt,nt,ct),S(ct,ht),S(ft,it),A(it,ot,it),A(ot,nt,ht),_(ht,it,ot),k(it,it,ot),S(nt,it),k(ot,ct,ft),A(it,ot,ze),_(it,it,ct),A(ot,ot,it),A(it,ct,ft),A(ct,nt,rt),S(nt,ht),b(it,nt,qe),b(ot,ct,qe);for(Ve=0;Ve<16;Ve++)rt[Ve+16]=it[Ve],rt[Ve+32]=ot[Ve],rt[Ve+48]=nt[Ve],rt[Ve+64]=ct[Ve];var yt=rt.subarray(32),mt=rt.subarray(16);return E(yt,yt),A(mt,mt,yt),m(ke,mt),0}function x(ke,Ce){return P(ke,Ce,Ae)}function M(ke,Ae){var Ce=t(),qe=t(),ze=t(),Ve=t(),rt=t(),it=t(),nt=t(),ot=t(),ct=t();k(Ce,ke[1],ke[0]),k(ct,Ae[1],Ae[0]),A(Ce,Ce,ct),_(qe,ke[0],ke[1]),_(ct,Ae[0],Ae[1]),A(qe,qe,ct),A(ze,ke[3],Ae[3]),A(ze,ze,tt),A(Ve,ke[2],Ae[2]),_(Ve,Ve,Ve),k(rt,qe,Ce),k(it,Ve,ze),_(nt,Ve,ze),_(ot,qe,Ce),A(ke[0],rt,it),A(ke[1],ot,nt),A(ke[2],nt,it),A(ke[3],rt,ot)}function C(ke,Ae,Ce){var qe;for(qe=0;qe<4;qe++)b(ke[qe],Ae[qe],Ce)}function K(ke,Ae){var Ce=t(),qe=t(),ze=t();E(ze,Ae[2]),A(Ce,Ae[0],ze),A(qe,Ae[1],ze),m(ke,qe),ke[31]^=w(Ce)<<7}function D(ke,Ae,ze){var Ve,tt;for(p(ke[0],Ce),p(ke[1],qe),p(ke[2],qe),p(ke[3],Ce),tt=255;tt>=0;--tt)C(ke,Ae,Ve=ze[tt/8|0]>>(7&tt)&1),M(Ae,ke),M(ke,ke),C(ke,Ae,Ve)}function R(ke,Ae){var Ce=[t(),t(),t(),t()];p(Ce[0],rt),p(Ce[1],it),p(Ce[2],qe),A(Ce[3],rt,it),D(ke,Ce,Ae)}function U(Ae,Ce,qe){var ze,Ve,tt=[t(),t(),t(),t()];for(qe||r(Ce,32),(ze=ke.hash(Ce.subarray(0,32)))[0]&=248,ze[31]&=127,ze[31]|=64,R(tt,ze),K(Ae,tt),Ve=0;Ve<32;Ve++)Ce[Ve+32]=Ae[Ve];return 0}var ot=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 B(ke,Ae){var Ce,qe,ze,Ve;for(qe=63;qe>=32;--qe){for(Ce=0,ze=qe-32,Ve=qe-12;ze<Ve;++ze)Ae[ze]+=Ce-16*Ae[qe]*ot[ze-(qe-32)],Ce=Math.floor((Ae[ze]+128)/256),Ae[ze]-=256*Ce;Ae[ze]+=Ce,Ae[qe]=0}for(Ce=0,ze=0;ze<32;ze++)Ae[ze]+=Ce-(Ae[31]>>4)*ot[ze],Ce=Ae[ze]>>8,Ae[ze]&=255;for(ze=0;ze<32;ze++)Ae[ze]-=Ce*ot[ze];for(qe=0;qe<32;qe++)Ae[qe+1]+=Ae[qe]>>8,ke[qe]=255&Ae[qe]}function T(ke){var Ae,Ce=new Float64Array(64);for(Ae=0;Ae<64;Ae++)Ce[Ae]=ke[Ae];for(Ae=0;Ae<64;Ae++)ke[Ae]=0;B(ke,Ce)}function z(ke,Ae){var ze=t(),tt=t(),rt=t(),it=t(),ot=t(),ct=t(),ht=t();return p(ke[2],qe),v(ke[1],Ae),S(rt,ke[1]),A(it,rt,Ve),k(rt,rt,ke[2]),_(it,ke[2],it),S(ot,it),S(ct,ot),A(ht,ct,ot),A(ze,ht,rt),A(ze,ze,it),function(ke,Ae){var Ce,qe=t();for(Ce=0;Ce<16;Ce++)qe[Ce]=Ae[Ce];for(Ce=250;Ce>=0;Ce--)S(qe,qe),1!==Ce&&A(qe,qe,Ae);for(Ce=0;Ce<16;Ce++)ke[Ce]=qe[Ce]}(ze,ze),A(ze,ze,rt),A(ze,ze,it),A(ze,ze,it),A(ke[0],ze,it),S(tt,ke[0]),A(tt,tt,it),g(tt,rt)&&A(ke[0],ke[0],nt),S(tt,ke[0]),A(tt,tt,it),g(tt,rt)?-1:(w(ke[0])===Ae[31]>>7&&k(ke[0],Ce,ke[0]),A(ke[3],ke[0],ke[1]),0)}var ct=64;function O(){for(var ke=0;ke<arguments.length;ke++)if(!(arguments[ke]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function F(ke){for(var Ae=0;Ae<ke.length;Ae++)ke[Ae]=0}ke.scalarMult=function(ke,Ae){if(O(ke,Ae),32!==ke.length)throw Error("bad n size");if(32!==Ae.length)throw Error("bad p size");var Ce=new Uint8Array(32);return P(Ce,ke,Ae),Ce},ke.box={},ke.box.keyPair=function(){var ke,Ae,Ce=new Uint8Array(32),qe=new Uint8Array(32);return ke=Ce,r(Ae=qe,32),x(ke,Ae),{publicKey:Ce,secretKey:qe}},ke.box.keyPair.fromSecretKey=function(ke){if(O(ke),32!==ke.length)throw Error("bad secret key size");var Ae=new Uint8Array(32);return x(Ae,ke),{publicKey:Ae,secretKey:new Uint8Array(ke)}},ke.sign=function(Ae,Ce){if(O(Ae,Ce),64!==Ce.length)throw Error("bad secret key size");var qe=new Uint8Array(ct+Ae.length);return function(Ae,Ce,qe,ze){var Ve,tt,rt,it,nt,ot=new Float64Array(64),ct=[t(),t(),t(),t()];(Ve=ke.hash(ze.subarray(0,32)))[0]&=248,Ve[31]&=127,Ve[31]|=64;var ht=qe+64;for(it=0;it<qe;it++)Ae[64+it]=Ce[it];for(it=0;it<32;it++)Ae[32+it]=Ve[32+it];for(T(rt=ke.hash(Ae.subarray(32,ht))),R(ct,rt),K(Ae,ct),it=32;it<64;it++)Ae[it]=ze[it];for(T(tt=ke.hash(Ae.subarray(0,ht))),it=0;it<64;it++)ot[it]=0;for(it=0;it<32;it++)ot[it]=rt[it];for(it=0;it<32;it++)for(nt=0;nt<32;nt++)ot[it+nt]+=tt[it]*Ve[nt];B(Ae.subarray(32),ot)}(qe,Ae,Ae.length,Ce),qe},ke.sign.detached=function(Ae,Ce){for(var qe=ke.sign(Ae,Ce),ze=new Uint8Array(ct),Ve=0;Ve<ze.length;Ve++)ze[Ve]=qe[Ve];return ze},ke.sign.detached.verify=function(Ae,Ce,qe){if(O(Ae,Ce,qe),Ce.length!==ct)throw Error("bad signature size");if(32!==qe.length)throw Error("bad public key size");var ze,Ve=new Uint8Array(ct+Ae.length),tt=new Uint8Array(ct+Ae.length);for(ze=0;ze<ct;ze++)Ve[ze]=Ce[ze];for(ze=0;ze<Ae.length;ze++)Ve[ze+ct]=Ae[ze];return function(Ae,Ce,qe,ze){var Ve,tt,rt=new Uint8Array(32),it=[t(),t(),t(),t()],nt=[t(),t(),t(),t()];if(qe<64)return-1;if(z(nt,ze))return-1;for(Ve=0;Ve<qe;Ve++)Ae[Ve]=Ce[Ve];for(Ve=0;Ve<32;Ve++)Ae[Ve+32]=ze[Ve];if(T(tt=ke.hash(Ae.subarray(0,qe))),D(it,nt,tt),R(nt,Ce.subarray(32)),M(it,nt),K(rt,it),qe-=64,l(Ce,0,rt,0)){for(Ve=0;Ve<qe;Ve++)Ae[Ve]=0;return-1}for(Ve=0;Ve<qe;Ve++)Ae[Ve]=Ce[Ve+64];return qe}(tt,Ve,Ve.length,qe)>=0},ke.sign.keyPair=function(){var ke=new Uint8Array(32),Ae=new Uint8Array(64);return U(ke,Ae),{publicKey:ke,secretKey:Ae}},ke.sign.keyPair.fromSecretKey=function(ke){if(O(ke),64!==ke.length)throw Error("bad secret key size");for(var Ae=new Uint8Array(32),Ce=0;Ce<Ae.length;Ce++)Ae[Ce]=ke[32+Ce];return{publicKey:Ae,secretKey:new Uint8Array(ke)}},ke.sign.keyPair.fromSeed=function(ke){if(O(ke),32!==ke.length)throw Error("bad seed size");for(var Ae=new Uint8Array(32),Ce=new Uint8Array(64),qe=0;qe<32;qe++)Ce[qe]=ke[qe];return U(Ae,Ce,!0),{publicKey:Ae,secretKey:Ce}},ke.setPRNG=function(ke){r=ke},function(){var Ae="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(Ae&&Ae.getRandomValues){ke.setPRNG((function(ke,Ce){var qe,ze=new Uint8Array(Ce);for(qe=0;qe<Ce;qe+=65536)Ae.getRandomValues(ze.subarray(qe,qe+Math.min(Ce-qe,65536)));for(qe=0;qe<Ce;qe++)ke[qe]=ze[qe];F(ze)}))}else(Ae=ft.default)&&Ae.randomBytes&&ke.setPRNG((function(ke,Ce){var qe,ze=Ae.randomBytes(Ce);for(qe=0;qe<Ce;qe++)ke[qe]=ze[qe];F(ze)}))}()}(ke.exports?ke.exports:self.nacl=self.nacl||{})}));const jn=Zt.getNodeCrypto();async function ii(ke){const Ae=new Uint8Array(ke);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(Ae);else if(jn){const ke=jn.randomBytes(Ae.length);Ae.set(ke)}else{if(!zn.buffer)throw Error("No secure random number generator available.");await zn.get(Ae)}return Ae}async function ni(ke,Ae){const Ce=await Zt.getBigInteger();if(Ae.lt(ke))throw Error("Illegal parameter value: max <= min");const qe=Ae.sub(ke),ze=qe.byteLength();return new Ce(await ii(ze+8)).mod(qe).add(ke)}const zn=new class{constructor(){this.buffer=null,this.size=null,this.callback=null}init(ke,Ae){this.buffer=new Uint8Array(ke),this.size=0,this.callback=Ae}set(ke){if(!this.buffer)throw Error("RandomBuffer is not initialized");if(!(ke instanceof Uint8Array))throw Error("Invalid type: buf not an Uint8Array");const Ae=this.buffer.length-this.size;ke.length>Ae&&(ke=ke.subarray(0,Ae)),this.buffer.set(ke,this.size),this.size+=ke.length}async get(ke){if(!this.buffer)throw Error("RandomBuffer is not initialized");if(!(ke instanceof Uint8Array))throw Error("Invalid type: buf not an Uint8Array");if(this.size<ke.length){if(!this.callback)throw Error("Random number buffer depleted");return await this.callback(),this.get(ke)}for(let Ae=0;Ae<ke.length;Ae++)ke[Ae]=this.buffer[--this.size],this.buffer[this.size]=0}};var Fn=Object.freeze({__proto__:null,getRandomBytes:ii,getRandomBigInteger:ni,randomBuffer:zn});async function oi(ke,Ae,Ce){const qe=await Zt.getBigInteger(),ze=new qe(1),Ve=ze.leftShift(new qe(ke-1)),tt=new qe(30),rt=[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],it=await ni(Ve,Ve.leftShift(ze));let nt=it.mod(tt).toNumber();do{it.iadd(new qe(rt[nt])),nt=(nt+rt[nt])%rt.length,it.bitLength()>ke&&(it.imod(Ve.leftShift(ze)).iadd(Ve),nt=it.mod(tt).toNumber())}while(!await ci(it,Ae,Ce));return it}async function ci(ke,Ae,Ce){return!(Ae&&!ke.dec().gcd(Ae).isOne())&&(!!await async function(ke){const Ae=await Zt.getBigInteger();return Zn.every((Ce=>0!==ke.mod(new Ae(Ce))))}(ke)&&(!!await async function(ke,Ae){const Ce=await Zt.getBigInteger();return(Ae=Ae||new Ce(2)).modExp(ke.dec(),ke).isOne()}(ke)&&!!await async function(ke,Ae,Ce){const qe=await Zt.getBigInteger(),ze=ke.bitLength();Ae||(Ae=Math.max(1,ze/48|0));const Ve=ke.dec();let tt=0;for(;!Ve.getBit(tt);)tt++;const rt=ke.rightShift(new qe(tt));for(;Ae>0;Ae--){let Ae,ze=(Ce?Ce():await ni(new qe(2),Ve)).modExp(rt,ke);if(!ze.isOne()&&!ze.equal(Ve)){for(Ae=1;Ae<tt;Ae++){if(ze=ze.mul(ze).mod(ke),ze.isOne())return!1;if(ze.equal(Ve))break}if(Ae===tt)return!1}}return!0}(ke,Ce)))}const Zn=[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];const Yn=[];async function fi(ke,Ae){const Ce=ke.length;if(Ce>Ae-11)throw Error("Message too long");const qe=await async function(ke){const Ae=new Uint8Array(ke);let Ce=0;for(;Ce<ke;){const qe=await ii(ke-Ce);for(let ke=0;ke<qe.length;ke++)0!==qe[ke]&&(Ae[Ce++]=qe[ke])}return Ae}(Ae-Ce-3),ze=new Uint8Array(Ae);return ze[1]=2,ze.set(qe,2),ze.set(ke,Ae-Ce),ze}function di(ke,Ae){let Ce=2,qe=1;for(let Ae=Ce;Ae<ke.length;Ae++)qe&=0!==ke[Ae],Ce+=qe;const ze=Ce-2,Ve=ke.subarray(Ce+1),tt=0===ke[0]&2===ke[1]&ze>=8&!qe;if(Ae)return Zt.selectUint8Array(tt,Ve,Ae);if(tt)return Ve;throw Error("Decryption error")}async function li(ke,Ae,Ce){let qe;if(Ae.length!==Nn.getHashByteLength(ke))throw Error("Invalid hash length");const ze=new Uint8Array(Yn[ke].length);for(qe=0;qe<Yn[ke].length;qe++)ze[qe]=Yn[ke][qe];const Ve=ze.length+Ae.length;if(Ce<Ve+11)throw Error("Intended encoded message length too short");const tt=new Uint8Array(Ce-Ve-3).fill(255),rt=new Uint8Array(Ce);return rt[1]=1,rt.set(tt,2),rt.set(ze,Ce-Ve),rt.set(Ae,Ce-Ae.length),rt}Yn[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],Yn[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],Yn[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],Yn[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],Yn[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],Yn[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],Yn[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];var Jn=Object.freeze({__proto__:null,emeEncode:fi,emeDecode:di,emsaEncode:li});const es=Zt.getWebCrypto(),ps=Zt.getNodeCrypto(),gs=ps?St.default:void 0,As=ps?gs.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,Ss=ps?gs.define("RSAPubliceKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})):void 0;var Es=Object.freeze({__proto__:null,sign:async function(ke,Ae,Ce,qe,ze,Ve,tt,rt,it){if(Ae&&!Zt.isStream(Ae))if(Zt.getWebCrypto())try{return await async function(ke,Ae,Ce,qe,ze,Ve,tt,rt){const it=await async function(ke,Ae,Ce,qe,ze,Ve){const tt=await Zt.getBigInteger(),rt=new tt(qe),it=new tt(ze),nt=new tt(Ce);let ot=nt.mod(it.dec()),ct=nt.mod(rt.dec());return ct=ct.toUint8Array(),ot=ot.toUint8Array(),{kty:"RSA",n:ye(ke,!0),e:ye(Ae,!0),d:ye(Ce,!0),p:ye(ze,!0),q:ye(qe,!0),dp:ye(ot,!0),dq:ye(ct,!0),qi:ye(Ve,!0),ext:!0}}(Ce,qe,ze,Ve,tt,rt),nt={name:"RSASSA-PKCS1-v1_5",hash:{name:ke}},ot=await es.importKey("jwk",it,nt,!1,["sign"]);return new Uint8Array(await es.sign("RSASSA-PKCS1-v1_5",ot,Ae))}(er.read(er.webHash,ke),Ae,Ce,qe,ze,Ve,tt,rt)}catch(ke){Zt.printDebugError(ke)}else if(Zt.getNodeCrypto())return async function(ke,Ae,Ce,qe,ze,Ve,tt,rt){const{default:it}=await Promise.resolve().then((function(){return Wd})),nt=new it(Ve),ot=new it(tt),ct=new it(ze),ht=ct.mod(ot.subn(1)),ft=ct.mod(nt.subn(1)),yt=ps.createSign(er.read(er.hash,ke));yt.write(Ae),yt.end();const mt={version:0,modulus:new it(Ce),publicExponent:new it(qe),privateExponent:new it(ze),prime1:new it(tt),prime2:new it(Ve),exponent1:ht,exponent2:ft,coefficient:new it(rt)};if(void 0!==ps.createPrivateKey){const ke=As.encode(mt,"der");return new Uint8Array(yt.sign({key:ke,format:"der",type:"pkcs1"}))}const kt=As.encode(mt,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(yt.sign(kt))}(ke,Ae,Ce,qe,ze,Ve,tt,rt);return async function(ke,Ae,Ce,qe){const ze=await Zt.getBigInteger();Ae=new ze(Ae);const Ve=new ze(await li(ke,qe,Ae.byteLength()));if(Ce=new ze(Ce),Ve.gte(Ae))throw Error("Message size cannot exceed modulus size");return Ve.modExp(Ce,Ae).toUint8Array("be",Ae.byteLength())}(ke,Ce,ze,it)},verify:async function(ke,Ae,Ce,qe,ze,Ve){if(Ae&&!Zt.isStream(Ae))if(Zt.getWebCrypto())try{return await async function(ke,Ae,Ce,qe,ze){const Ve=function(ke,Ae){return{kty:"RSA",n:ye(ke,!0),e:ye(Ae,!0),ext:!0}}(qe,ze),tt=await es.importKey("jwk",Ve,{name:"RSASSA-PKCS1-v1_5",hash:{name:ke}},!1,["verify"]);return es.verify("RSASSA-PKCS1-v1_5",tt,Ce,Ae)}(er.read(er.webHash,ke),Ae,Ce,qe,ze)}catch(ke){Zt.printDebugError(ke)}else if(Zt.getNodeCrypto())return async function(ke,Ae,Ce,qe,ze){const{default:Ve}=await Promise.resolve().then((function(){return Wd})),tt=ps.createVerify(er.read(er.hash,ke));tt.write(Ae),tt.end();const rt={modulus:new Ve(qe),publicExponent:new Ve(ze)};let it;if(void 0!==ps.createPrivateKey){it={key:Ss.encode(rt,"der"),format:"der",type:"pkcs1"}}else it=Ss.encode(rt,"pem",{label:"RSA PUBLIC KEY"});try{return await tt.verify(it,Ce)}catch(ke){return!1}}(ke,Ae,Ce,qe,ze);return async function(ke,Ae,Ce,qe,ze){const Ve=await Zt.getBigInteger();if(Ce=new Ve(Ce),Ae=new Ve(Ae),qe=new Ve(qe),Ae.gte(Ce))throw Error("Signature size cannot exceed modulus size");const tt=Ae.modExp(qe,Ce).toUint8Array("be",Ce.byteLength()),rt=await li(ke,ze,Ce.byteLength());return Zt.equalsUint8Array(tt,rt)}(ke,Ce,qe,ze,Ve)},encrypt:async function(ke,Ae,Ce){return Zt.getNodeCrypto()?async function(ke,Ae,Ce){const{default:qe}=await Promise.resolve().then((function(){return Wd})),ze={modulus:new qe(Ae),publicExponent:new qe(Ce)};let Ve;if(void 0!==ps.createPrivateKey){Ve={key:Ss.encode(ze,"der"),format:"der",type:"pkcs1",padding:ps.constants.RSA_PKCS1_PADDING}}else{Ve={key:Ss.encode(ze,"pem",{label:"RSA PUBLIC KEY"}),padding:ps.constants.RSA_PKCS1_PADDING}}return new Uint8Array(ps.publicEncrypt(Ve,ke))}(ke,Ae,Ce):async function(ke,Ae,Ce){const qe=await Zt.getBigInteger();if(Ae=new qe(Ae),ke=new qe(await fi(ke,Ae.byteLength())),Ce=new qe(Ce),ke.gte(Ae))throw Error("Message size cannot exceed modulus size");return ke.modExp(Ce,Ae).toUint8Array("be",Ae.byteLength())}(ke,Ae,Ce)},decrypt:async function(ke,Ae,Ce,qe,ze,Ve,tt,rt){return Zt.getNodeCrypto()?async function(ke,Ae,Ce,qe,ze,Ve,tt,rt){const{default:it}=await Promise.resolve().then((function(){return Wd})),nt=new it(ze),ot=new it(Ve),ct=new it(qe),ht=ct.mod(ot.subn(1)),ft=ct.mod(nt.subn(1)),yt={version:0,modulus:new it(Ae),publicExponent:new it(Ce),privateExponent:new it(qe),prime1:new it(Ve),prime2:new it(ze),exponent1:ht,exponent2:ft,coefficient:new it(tt)};let mt;if(void 0!==ps.createPrivateKey){mt={key:As.encode(yt,"der"),format:"der",type:"pkcs1",padding:ps.constants.RSA_PKCS1_PADDING}}else{mt={key:As.encode(yt,"pem",{label:"RSA PRIVATE KEY"}),padding:ps.constants.RSA_PKCS1_PADDING}}try{return new Uint8Array(ps.privateDecrypt(mt,ke))}catch(ke){if(rt)return rt;throw Error("Decryption error")}}(ke,Ae,Ce,qe,ze,Ve,tt,rt):async function(ke,Ae,Ce,qe,ze,Ve,tt,rt){const it=await Zt.getBigInteger();if(ke=new it(ke),Ae=new it(Ae),Ce=new it(Ce),qe=new it(qe),ze=new it(ze),Ve=new it(Ve),tt=new it(tt),ke.gte(Ae))throw Error("Data too large.");const nt=qe.mod(Ve.dec()),ot=qe.mod(ze.dec()),ct=(await ni(new it(2),Ae)).mod(Ae),ht=ct.modInv(Ae).modExp(Ce,Ae),ft=(ke=ke.mul(ht).mod(Ae)).modExp(ot,ze),yt=ke.modExp(nt,Ve);let mt=tt.mul(yt.sub(ft)).mod(Ve).mul(ze).add(ft);return mt=mt.mul(ct).mod(Ae),di(mt.toUint8Array("be",Ae.byteLength()),rt)}(ke,Ae,Ce,qe,ze,Ve,tt,rt)},generate:async function(ke,Ae){if(Ae=new(await Zt.getBigInteger())(Ae),Zt.getWebCrypto()){const Ce={name:"RSASSA-PKCS1-v1_5",modulusLength:ke,publicExponent:Ae.toUint8Array(),hash:{name:"SHA-1"}},qe=await es.generateKey(Ce,!0,["sign","verify"]),ze=await es.exportKey("jwk",qe.privateKey);return{n:pe(ze.n),e:Ae.toUint8Array(),d:pe(ze.d),p:pe(ze.q),q:pe(ze.p),u:pe(ze.qi)}}if(Zt.getNodeCrypto()&&ps.generateKeyPair&&As){const Ce={modulusLength:ke,publicExponent:Ae.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},qe=await new Promise(((ke,Ae)=>ps.generateKeyPair("rsa",Ce,((Ce,qe,ze)=>{Ce?Ae(Ce):ke(As.decode(ze,"der"))}))));return{n:qe.modulus.toArrayLike(Uint8Array),e:qe.publicExponent.toArrayLike(Uint8Array),d:qe.privateExponent.toArrayLike(Uint8Array),p:qe.prime2.toArrayLike(Uint8Array),q:qe.prime1.toArrayLike(Uint8Array),u:qe.coefficient.toArrayLike(Uint8Array)}}let Ce,qe,ze;do{qe=await oi(ke-(ke>>1),Ae,40),Ce=await oi(ke>>1,Ae,40),ze=Ce.mul(qe)}while(ze.bitLength()!==ke);const Ve=Ce.dec().imul(qe.dec());return qe.lt(Ce)&&([Ce,qe]=[qe,Ce]),{n:ze.toUint8Array(),e:Ae.toUint8Array(),d:Ae.modInv(Ve).toUint8Array(),p:Ce.toUint8Array(),q:qe.toUint8Array(),u:Ce.modInv(qe).toUint8Array()}},validateParams:async function(ke,Ae,Ce,qe,ze,Ve){const tt=await Zt.getBigInteger();if(ke=new tt(ke),qe=new tt(qe),ze=new tt(ze),!qe.mul(ze).equal(ke))return!1;const rt=new tt(2);if(Ve=new tt(Ve),!qe.mul(Ve).mod(ze).isOne())return!1;Ae=new tt(Ae),Ce=new tt(Ce);const it=new tt(Math.floor(ke.bitLength()/3)),nt=await ni(rt,rt.leftShift(it)),ot=nt.mul(Ce).mul(Ae);return!(!ot.mod(qe.dec()).equal(nt)||!ot.mod(ze.dec()).equal(nt))}});var Ps=Object.freeze({__proto__:null,encrypt:async function(ke,Ae,Ce,qe){const ze=await Zt.getBigInteger();Ae=new ze(Ae),Ce=new ze(Ce),qe=new ze(qe);const Ve=new ze(await fi(ke,Ae.byteLength())),tt=await ni(new ze(1),Ae.dec());return{c1:Ce.modExp(tt,Ae).toUint8Array(),c2:qe.modExp(tt,Ae).imul(Ve).imod(Ae).toUint8Array()}},decrypt:async function(ke,Ae,Ce,qe,ze){const Ve=await Zt.getBigInteger();return ke=new Ve(ke),Ae=new Ve(Ae),Ce=new Ve(Ce),qe=new Ve(qe),di(ke.modExp(qe,Ce).modInv(Ce).imul(Ae).imod(Ce).toUint8Array("be",Ce.byteLength()),ze)},validateParams:async function(ke,Ae,Ce,qe){const ze=await Zt.getBigInteger();ke=new ze(ke),Ae=new ze(Ae),Ce=new ze(Ce);const Ve=new ze(1);if(Ae.lte(Ve)||Ae.gte(ke))return!1;const tt=new ze(ke.bitLength()),rt=new ze(1023);if(tt.lt(rt))return!1;if(!Ae.modExp(ke.dec(),ke).isOne())return!1;let it=Ae;const nt=new ze(1),ot=new ze(2).leftShift(new ze(17));for(;nt.lt(ot);){if(it=it.mul(Ae).imod(ke),it.isOne())return!1;nt.iinc()}qe=new ze(qe);const ct=new ze(2),ht=await ni(ct.leftShift(tt.dec()),ct.leftShift(tt)),ft=ke.dec().imul(ht).iadd(qe);return!!Ce.equal(Ae.modExp(ft,ke))}});class ki{constructor(ke){if(ke instanceof ki)this.oid=ke.oid;else if(Zt.isArray(ke)||Zt.isUint8Array(ke)){if(6===(ke=new Uint8Array(ke))[0]){if(ke[1]!==ke.length-2)throw Error("Length mismatch in DER encoded oid");ke=ke.subarray(2)}this.oid=ke}else this.oid=""}read(ke){if(ke.length>=1){const Ae=ke[0];if(ke.length>=1+Ae)return this.oid=ke.subarray(1,1+Ae),1+this.oid.length}throw Error("Invalid oid")}write(){return Zt.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Zt.uint8ArrayToHex(this.oid)}getName(){const ke=this.toHex();if(er.curve[ke])return er.write(er.curve,ke);throw Error("Unknown curve object identifier.")}}function Ai(ke,Ae){return ke.keyPair({priv:Ae})}function Si(ke,Ae){const Ce=ke.keyPair({pub:Ae});if(!0!==Ce.validate().result)throw Error("Invalid elliptic public key");return Ce}async function Ei(ke){if(!tr.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:Ae}=await Promise.resolve().then((function(){return Wp}));return new Ae.ec(ke)}function Pi(ke){let Ae,Ce=0;const qe=ke[0];return qe<192?([Ce]=ke,Ae=1):qe<255?(Ce=(ke[0]-192<<8)+ke[1]+192,Ae=2):255===qe&&(Ce=Zt.readNumber(ke.subarray(1,5)),Ae=5),{len:Ce,offset:Ae}}function xi(ke){return ke<192?new Uint8Array([ke]):ke>191&&ke<8384?new Uint8Array([192+(ke-192>>8),ke-192&255]):Zt.concatUint8Array([new Uint8Array([255]),Zt.writeNumber(ke,4)])}function Mi(ke){if(ke<0||ke>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+ke])}function Ci(ke){return new Uint8Array([192|ke])}function Ki(ke,Ae){return Zt.concatUint8Array([Ci(ke),xi(Ae)])}function Di(ke){return[er.packet.literalData,er.packet.compressedData,er.packet.symmetricallyEncryptedData,er.packet.symEncryptedIntegrityProtectedData,er.packet.aeadEncryptedData].includes(ke)}async function Ri(ke,Ae){const Ce=H(ke);let qe,ze;try{const Ve=await Ce.peekBytes(2);if(!Ve||Ve.length<2||0==(128&Ve[0]))throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const tt=await Ce.readByte();let rt,it,nt=-1,ot=-1;ot=0,0!=(64&tt)&&(ot=1),ot?nt=63&tt:(nt=(63&tt)>>2,it=3&tt);const ct=Di(nt);let ht,ft=null;if(ct){if("array"===Zt.isStream(ke)){const ke=new v;qe=G(ke),ft=ke}else{const ke=new Gt;qe=G(ke.writable),ft=ke.readable}ze=Ae({tag:nt,packet:ft})}else ft=[];do{if(ot){const ke=await Ce.readByte();if(ht=!1,ke<192)rt=ke;else if(ke>=192&&ke<224)rt=(ke-192<<8)+await Ce.readByte()+192;else if(ke>223&&ke<255){if(rt=1<<(31&ke),ht=!0,!ct)throw new TypeError("This packet type does not support partial lengths.")}else rt=await Ce.readByte()<<24|await Ce.readByte()<<16|await Ce.readByte()<<8|await Ce.readByte()}else switch(it){case 0:rt=await Ce.readByte();break;case 1:rt=await Ce.readByte()<<8|await Ce.readByte();break;case 2:rt=await Ce.readByte()<<24|await Ce.readByte()<<16|await Ce.readByte()<<8|await Ce.readByte();break;default:rt=1/0}if(rt>0){let ke=0;for(;;){qe&&await qe.ready;const{done:Ae,value:ze}=await Ce.read();if(Ae){if(rt===1/0)break;throw Error("Unexpected end of packet")}const Ve=rt===1/0?ze:ze.subarray(0,rt-ke);if(qe?await qe.write(Ve):ft.push(Ve),ke+=ze.length,ke>=rt){Ce.unshift(ze.subarray(rt-ke+ze.length));break}}}}while(ht);const yt=await Ce.peekBytes(ct?1/0:2);return qe?(await qe.ready,await qe.close()):(ft=Zt.concatUint8Array(ft),await Ae({tag:nt,packet:ft})),!yt||!yt.length}catch(ke){if(qe)return await qe.abort(ke),!0;throw ke}finally{qe&&await ze,Ce.releaseLock()}}class Ui extends Error{constructor(...ke){super(...ke),Error.captureStackTrace&&Error.captureStackTrace(this,Ui),this.name="UnsupportedError"}}class Ii{constructor(ke,Ae){this.tag=ke,this.rawContent=Ae}write(){return this.rawContent}}const Rs=Zt.getWebCrypto(),Us=Zt.getNodeCrypto(),Is={p256:"P-256",p384:"P-384",p521:"P-521"},Ns=Us?Us.getCurves():[],Ls=Us?{secp256k1:Ns.includes("secp256k1")?"secp256k1":void 0,p256:Ns.includes("prime256v1")?"prime256v1":void 0,p384:Ns.includes("secp384r1")?"secp384r1":void 0,p521:Ns.includes("secp521r1")?"secp521r1":void 0,ed25519:Ns.includes("ED25519")?"ED25519":void 0,curve25519:Ns.includes("X25519")?"X25519":void 0,brainpoolP256r1:Ns.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:Ns.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:Ns.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Hs={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:er.publicKey.ecdsa,hash:er.hash.sha256,cipher:er.symmetric.aes128,node:Ls.p256,web:Is.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:er.publicKey.ecdsa,hash:er.hash.sha384,cipher:er.symmetric.aes192,node:Ls.p384,web:Is.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:er.publicKey.ecdsa,hash:er.hash.sha512,cipher:er.symmetric.aes256,node:Ls.p521,web:Is.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:er.publicKey.ecdsa,hash:er.hash.sha256,cipher:er.symmetric.aes128,node:Ls.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:er.publicKey.eddsa,hash:er.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:er.publicKey.ecdh,hash:er.hash.sha256,cipher:er.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:er.publicKey.ecdsa,hash:er.hash.sha256,cipher:er.symmetric.aes128,node:Ls.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:er.publicKey.ecdsa,hash:er.hash.sha384,cipher:er.symmetric.aes192,node:Ls.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:er.publicKey.ecdsa,hash:er.hash.sha512,cipher:er.symmetric.aes256,node:Ls.brainpoolP512r1,payloadSize:64}};class Ni{constructor(ke,Ae){try{(Zt.isArray(ke)||Zt.isUint8Array(ke))&&(ke=new ki(ke)),ke instanceof ki&&(ke=ke.getName()),this.name=er.write(er.curve,ke)}catch(ke){throw new Ui("Unknown curve")}Ae=Ae||Hs[this.name],this.keyType=Ae.keyType,this.oid=Ae.oid,this.hash=Ae.hash,this.cipher=Ae.cipher,this.node=Ae.node&&Hs[this.name],this.web=Ae.web&&Hs[this.name],this.payloadSize=Ae.payloadSize,this.web&&Zt.getWebCrypto()?this.type="web":this.node&&Zt.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}async genKeyPair(){let ke;switch(this.type){case"web":try{return await async function(ke){const Ae=await Rs.generateKey({name:"ECDSA",namedCurve:Is[ke]},!0,["sign","verify"]),Ce=await Rs.exportKey("jwk",Ae.privateKey);return{publicKey:Li(await Rs.exportKey("jwk",Ae.publicKey)),privateKey:pe(Ce.d)}}(this.name)}catch(ke){Zt.printDebugError("Browser did not support generating ec key "+ke.message);break}case"node":return async function(ke){const Ae=Us.createECDH(Ls[ke]);return await Ae.generateKeys(),{publicKey:new Uint8Array(Ae.getPublicKey()),privateKey:new Uint8Array(Ae.getPrivateKey())}}(this.name);case"curve25519":{const Ae=await ii(32);Ae[0]=127&Ae[0]|64,Ae[31]&=248;const Ce=Ae.slice().reverse();ke=qn.box.keyPair.fromSecretKey(Ce);return{publicKey:Zt.concatUint8Array([new Uint8Array([64]),ke.publicKey]),privateKey:Ae}}case"ed25519":{const ke=await ii(32),Ae=qn.sign.keyPair.fromSeed(ke);return{publicKey:Zt.concatUint8Array([new Uint8Array([64]),Ae.publicKey]),privateKey:ke}}}const Ae=await Ei(this.name);return ke=await Ae.genKeyPair({entropy:Zt.uint8ArrayToString(await ii(32))}),{publicKey:new Uint8Array(ke.getPublic("array",!1)),privateKey:ke.getPrivate().toArrayLike(Uint8Array)}}}async function ji(ke,Ae,Ce,qe){const ze={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:ke===er.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},Ve=Ae.getName();if(!ze[Ve])return!1;if("curve25519"===Ve){qe=qe.slice().reverse();const{publicKey:ke}=qn.box.keyPair.fromSecretKey(qe);Ce=new Uint8Array(Ce);const Ae=new Uint8Array([64,...ke]);return!!Zt.equalsUint8Array(Ae,Ce)}const tt=await Ei(Ve);try{Ce=Si(tt,Ce).getPublic()}catch(ke){return!1}return!!Ai(tt,qe).getPublic().eq(Ce)}function Li(ke){const Ae=pe(ke.x),Ce=pe(ke.y),qe=new Uint8Array(Ae.length+Ce.length+1);return qe[0]=4,qe.set(Ae,1),qe.set(Ce,Ae.length+1),qe}function Wi(ke,Ae,Ce){const qe=ke,ze=Ce.slice(1,qe+1),Ve=Ce.slice(qe+1,2*qe+1);return{kty:"EC",crv:Ae,x:ye(ze,!0),y:ye(Ve,!0),ext:!0}}function Hi(ke,Ae,Ce,qe){const ze=Wi(ke,Ae,Ce);return ze.d=ye(qe,!0),ze}const Gs=Zt.getWebCrypto(),Vs=Zt.getNodeCrypto();async function $i(ke,Ae,Ce,qe,ze,Ve){const tt=new Ni(ke);if(Ce&&!Zt.isStream(Ce)){const Ve={publicKey:qe,privateKey:ze};switch(tt.type){case"web":try{return await async function(ke,Ae,Ce,qe){const ze=ke.payloadSize,Ve=Hi(ke.payloadSize,Is[ke.name],qe.publicKey,qe.privateKey),tt=await Gs.importKey("jwk",Ve,{name:"ECDSA",namedCurve:Is[ke.name],hash:{name:er.read(er.webHash,ke.hash)}},!1,["sign"]),rt=new Uint8Array(await Gs.sign({name:"ECDSA",namedCurve:Is[ke.name],hash:{name:er.read(er.webHash,Ae)}},tt,Ce));return{r:rt.slice(0,ze),s:rt.slice(ze,ze<<1)}}(tt,Ae,Ce,Ve)}catch(ke){if("p521"!==tt.name&&("DataError"===ke.name||"OperationError"===ke.name))throw ke;Zt.printDebugError("Browser did not support signing: "+ke.message)}break;case"node":{const ke=await async function(ke,Ae,Ce,qe){const ze=Vs.createSign(er.read(er.hash,Ae));ze.write(Ce),ze.end();const Ve=ea.encode({version:1,parameters:ke.oid,privateKey:Array.from(qe.privateKey),publicKey:{unused:0,data:Array.from(qe.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return Ys.decode(ze.sign(Ve),"der")}(tt,Ae,Ce,Ve);return{r:ke.r.toArrayLike(Uint8Array),s:ke.s.toArrayLike(Uint8Array)}}}}return async function(ke,Ae,Ce){const qe=await Ei(ke.name),ze=Ai(qe,Ce).sign(Ae);return{r:ze.r.toArrayLike(Uint8Array),s:ze.s.toArrayLike(Uint8Array)}}(tt,Ve,ze)}async function Zi(ke,Ae,Ce,qe,ze,Ve){const tt=new Ni(ke);if(qe&&!Zt.isStream(qe))switch(tt.type){case"web":try{return await async function(ke,Ae,{r:Ce,s:qe},ze,Ve){const tt=Wi(ke.payloadSize,Is[ke.name],Ve),rt=await Gs.importKey("jwk",tt,{name:"ECDSA",namedCurve:Is[ke.name],hash:{name:er.read(er.webHash,ke.hash)}},!1,["verify"]),it=Zt.concatUint8Array([Ce,qe]).buffer;return Gs.verify({name:"ECDSA",namedCurve:Is[ke.name],hash:{name:er.read(er.webHash,Ae)}},rt,it,ze)}(tt,Ae,Ce,qe,ze)}catch(ke){if("p521"!==tt.name&&("DataError"===ke.name||"OperationError"===ke.name))throw ke;Zt.printDebugError("Browser did not support verifying: "+ke.message)}break;case"node":return async function(ke,Ae,{r:Ce,s:qe},ze,Ve){const{default:tt}=await Promise.resolve().then((function(){return Wd})),rt=Vs.createVerify(er.read(er.hash,Ae));rt.write(ze),rt.end();const it=ia.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:ke.oid},subjectPublicKey:{unused:0,data:Array.from(Ve)}},"pem",{label:"PUBLIC KEY"}),nt=Ys.encode({r:new tt(Ce),s:new tt(qe)},"der");try{return rt.verify(it,nt)}catch(ke){return!1}}(tt,Ae,Ce,qe,ze)}return async function(ke,Ae,Ce,qe){const ze=await Ei(ke.name);return Si(ze,qe).verify(Ce,Ae)}(tt,Ce,void 0===Ae?qe:Ve,ze)}const Zs=Vs?St.default:void 0,Ys=Vs?Zs.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,ea=Vs?Zs.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,ta=Vs?Zs.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,ia=Vs?Zs.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(ta),this.key("subjectPublicKey").bitstr())})):void 0;var na=Object.freeze({__proto__:null,sign:$i,verify:Zi,validateParams:async function(ke,Ae,Ce){const qe=new Ni(ke);if(qe.keyType!==er.publicKey.ecdsa)return!1;switch(qe.type){case"web":case"node":{const qe=await ii(8),ze=er.hash.sha256,Ve=await Nn.digest(ze,qe);try{const tt=await $i(ke,ze,qe,Ae,Ce,Ve);return await Zi(ke,ze,tt,qe,Ae,Ve)}catch(ke){return!1}}default:return ji(er.publicKey.ecdsa,ke,Ae,Ce)}}});qn.hash=ke=>new Uint8Array(tn().update(ke).digest());var sa=Object.freeze({__proto__:null,sign:async function(ke,Ae,Ce,qe,ze,Ve){if(Nn.getHashByteLength(Ae)<Nn.getHashByteLength(er.hash.sha256))throw Error("Hash algorithm too weak: sha256 or stronger is required for EdDSA.");const tt=Zt.concatUint8Array([ze,qe.subarray(1)]),rt=qn.sign.detached(Ve,tt);return{r:rt.subarray(0,32),s:rt.subarray(32)}},verify:async function(ke,Ae,{r:Ce,s:qe},ze,Ve,tt){const rt=Zt.concatUint8Array([Ce,qe]);return qn.sign.detached.verify(tt,rt,Ve.subarray(1))},validateParams:async function(ke,Ae,Ce){if("ed25519"!==ke.getName())return!1;const{publicKey:qe}=qn.sign.keyPair.fromSeed(Ce),ze=new Uint8Array([64,...qe]);return Zt.equalsUint8Array(Ae,ze)}});function nn(ke,Ae){const Ce=new Er["aes"+8*ke.length](ke),qe=new Uint32Array([2795939494,2795939494]),ze=sn(Ae);let Ve=qe;const tt=ze,rt=ze.length/2,it=new Uint32Array([0,0]);let nt=new Uint32Array(4);for(let ke=0;ke<=5;++ke)for(let Ae=0;Ae<rt;++Ae)it[1]=rt*ke+(1+Ae),nt[0]=Ve[0],nt[1]=Ve[1],nt[2]=tt[2*Ae],nt[3]=tt[2*Ae+1],nt=sn(Ce.encrypt(on(nt))),Ve=nt.subarray(0,2),Ve[0]^=it[0],Ve[1]^=it[1],tt[2*Ae]=nt[2],tt[2*Ae+1]=nt[3];return on(Ve,tt)}function an(ke,Ae){const Ce=new Er["aes"+8*ke.length](ke),qe=new Uint32Array([2795939494,2795939494]),ze=sn(Ae);let Ve=ze.subarray(0,2);const tt=ze.subarray(2),rt=ze.length/2-1,it=new Uint32Array([0,0]);let nt=new Uint32Array(4);for(let ke=5;ke>=0;--ke)for(let Ae=rt-1;Ae>=0;--Ae)it[1]=rt*ke+(Ae+1),nt[0]=Ve[0]^it[0],nt[1]=Ve[1]^it[1],nt[2]=tt[2*Ae],nt[3]=tt[2*Ae+1],nt=sn(Ce.decrypt(on(nt))),Ve=nt.subarray(0,2),tt[2*Ae]=nt[2],tt[2*Ae+1]=nt[3];if(Ve[0]===qe[0]&&Ve[1]===qe[1])return on(tt);throw Error("Key Data Integrity failed")}function sn(ke){const{length:Ae}=ke,Ce=function(ke){if(Zt.isString(ke)){const{length:Ae}=ke,Ce=new ArrayBuffer(Ae),qe=new Uint8Array(Ce);for(let Ce=0;Ce<Ae;++Ce)qe[Ce]=ke.charCodeAt(Ce);return Ce}return new Uint8Array(ke).buffer}(ke),qe=new DataView(Ce),ze=new Uint32Array(Ae/4);for(let ke=0;ke<Ae/4;++ke)ze[ke]=qe.getUint32(4*ke);return ze}function on(){let ke=0;for(let Ae=0;Ae<arguments.length;++Ae)ke+=4*arguments[Ae].length;const Ae=new ArrayBuffer(ke),Ce=new DataView(Ae);let qe=0;for(let ke=0;ke<arguments.length;++ke){for(let Ae=0;Ae<arguments[ke].length;++Ae)Ce.setUint32(qe+4*Ae,arguments[ke][Ae]);qe+=4*arguments[ke].length}return new Uint8Array(Ae)}var aa=Object.freeze({__proto__:null,wrap:nn,unwrap:an});function un(ke){const Ae=8-ke.length%8,Ce=new Uint8Array(ke.length+Ae).fill(Ae);return Ce.set(ke),Ce}function hn(ke){const Ae=ke.length;if(Ae>0){const Ce=ke[Ae-1];if(Ce>=1){const qe=ke.subarray(Ae-Ce),ze=new Uint8Array(Ce).fill(Ce);if(Zt.equalsUint8Array(qe,ze))return ke.subarray(0,Ae-Ce)}}throw Error("Invalid padding")}var ca=Object.freeze({__proto__:null,encode:un,decode:hn});const ua=Zt.getWebCrypto(),ha=Zt.getNodeCrypto();function pn(ke,Ae,Ce,qe){return Zt.concatUint8Array([Ae.write(),new Uint8Array([ke]),Ce.write(),Zt.stringToUint8Array("Anonymous Sender "),qe.subarray(0,20)])}async function yn(ke,Ae,Ce,qe,ze=!1,Ve=!1){let tt;if(ze){for(tt=0;tt<Ae.length&&0===Ae[tt];tt++);Ae=Ae.subarray(tt)}if(Ve){for(tt=Ae.length-1;tt>=0&&0===Ae[tt];tt--);Ae=Ae.subarray(0,tt+1)}return(await Nn.digest(ke,Zt.concatUint8Array([new Uint8Array([0,0,0,1]),Ae,qe]))).subarray(0,Ce)}async function bn(ke,Ae){switch(ke.type){case"curve25519":{const Ce=await ii(32),{secretKey:qe,sharedKey:ze}=await mn(ke,Ae,null,Ce);let{publicKey:Ve}=qn.box.keyPair.fromSecretKey(qe);return Ve=Zt.concatUint8Array([new Uint8Array([64]),Ve]),{publicKey:Ve,sharedKey:ze}}case"web":if(ke.web&&Zt.getWebCrypto())try{return await async function(ke,Ae){const Ce=Wi(ke.payloadSize,ke.web.web,Ae);let qe=ua.generateKey({name:"ECDH",namedCurve:ke.web.web},!0,["deriveKey","deriveBits"]),ze=ua.importKey("jwk",Ce,{name:"ECDH",namedCurve:ke.web.web},!1,[]);[qe,ze]=await Promise.all([qe,ze]);let Ve=ua.deriveBits({name:"ECDH",namedCurve:ke.web.web,public:ze},qe.privateKey,ke.web.sharedSize),tt=ua.exportKey("jwk",qe.publicKey);[Ve,tt]=await Promise.all([Ve,tt]);const rt=new Uint8Array(Ve);return{publicKey:new Uint8Array(Li(tt)),sharedKey:rt}}(ke,Ae)}catch(ke){Zt.printDebugError(ke)}break;case"node":return async function(ke,Ae){const Ce=ha.createECDH(ke.node.node);Ce.generateKeys();const qe=new Uint8Array(Ce.computeSecret(Ae));return{publicKey:new Uint8Array(Ce.getPublicKey()),sharedKey:qe}}(ke,Ae)}return async function(ke,Ae){const Ce=await Ei(ke.name),qe=await ke.genKeyPair();Ae=Si(Ce,Ae);const ze=Ai(Ce,qe.privateKey),Ve=qe.publicKey,tt=ze.derive(Ae.getPublic()),rt=Ce.curve.p.byteLength(),it=tt.toArrayLike(Uint8Array,"be",rt);return{publicKey:Ve,sharedKey:it}}(ke,Ae)}async function mn(ke,Ae,Ce,qe){if(qe.length!==ke.payloadSize){const Ae=new Uint8Array(ke.payloadSize);Ae.set(qe,ke.payloadSize-qe.length),qe=Ae}switch(ke.type){case"curve25519":{const ke=qe.slice().reverse();return{secretKey:ke,sharedKey:qn.scalarMult(ke,Ae.subarray(1))}}case"web":if(ke.web&&Zt.getWebCrypto())try{return await async function(ke,Ae,Ce,qe){const ze=Hi(ke.payloadSize,ke.web.web,Ce,qe);let Ve=ua.importKey("jwk",ze,{name:"ECDH",namedCurve:ke.web.web},!0,["deriveKey","deriveBits"]);const tt=Wi(ke.payloadSize,ke.web.web,Ae);let rt=ua.importKey("jwk",tt,{name:"ECDH",namedCurve:ke.web.web},!0,[]);[Ve,rt]=await Promise.all([Ve,rt]);let it=ua.deriveBits({name:"ECDH",namedCurve:ke.web.web,public:rt},Ve,ke.web.sharedSize),nt=ua.exportKey("jwk",Ve);[it,nt]=await Promise.all([it,nt]);const ot=new Uint8Array(it);return{secretKey:pe(nt.d),sharedKey:ot}}(ke,Ae,Ce,qe)}catch(ke){Zt.printDebugError(ke)}break;case"node":return async function(ke,Ae,Ce){const qe=ha.createECDH(ke.node.node);qe.setPrivateKey(Ce);const ze=new Uint8Array(qe.computeSecret(Ae));return{secretKey:new Uint8Array(qe.getPrivateKey()),sharedKey:ze}}(ke,Ae,qe)}return async function(ke,Ae,Ce){const qe=await Ei(ke.name);Ae=Si(qe,Ae),Ce=Ai(qe,Ce);const ze=new Uint8Array(Ce.getPrivate()),Ve=Ce.derive(Ae.getPublic()),tt=qe.curve.p.byteLength(),rt=Ve.toArrayLike(Uint8Array,"be",tt);return{secretKey:ze,sharedKey:rt}}(ke,Ae,qe)}var fa=Object.freeze({__proto__:null,validateParams:async function(ke,Ae,Ce){return ji(er.publicKey.ecdh,ke,Ae,Ce)},encrypt:async function(ke,Ae,Ce,qe,ze){const Ve=un(Ce),tt=new Ni(ke),{publicKey:rt,sharedKey:it}=await bn(tt,qe),nt=pn(er.publicKey.ecdh,ke,Ae,ze),{keySize:ot}=kn(Ae.cipher);return{publicKey:rt,wrappedKey:nn(await yn(Ae.hash,it,ot,nt),Ve)}},decrypt:async function(ke,Ae,Ce,qe,ze,Ve,tt){const rt=new Ni(ke),{sharedKey:it}=await mn(rt,Ce,ze,Ve),nt=pn(er.publicKey.ecdh,ke,Ae,tt),{keySize:ot}=kn(Ae.cipher);let ct;for(let Ce=0;Ce<3;Ce++)try{return hn(an(await yn(Ae.hash,it,ot,nt,1===Ce,2===Ce),qe))}catch(ke){ct=ke}throw ct}});var la={rsa:Es,elgamal:Ps,elliptic:Object.freeze({__proto__:null,Curve:Ni,ecdh:fa,ecdsa:na,eddsa:sa,generate:async function(ke){const Ae=await Zt.getBigInteger();ke=new Ni(ke);const Ce=await ke.genKeyPair(),qe=new Ae(Ce.publicKey).toUint8Array(),ze=new Ae(Ce.privateKey).toUint8Array("be",ke.payloadSize);return{oid:ke.oid,Q:qe,secret:ze,hash:ke.hash,cipher:ke.cipher}},getPreferredHashAlgo:function(ke){return Hs[er.write(er.curve,ke.toHex())].hash}}),dsa:Object.freeze({__proto__:null,sign:async function(ke,Ae,Ce,qe,ze,Ve){const tt=await Zt.getBigInteger(),rt=new tt(1);let it,nt,ot,ct;qe=new tt(qe),ze=new tt(ze),Ce=new tt(Ce),Ve=new tt(Ve),Ce=Ce.mod(qe),Ve=Ve.mod(ze);const ht=new tt(Ae.subarray(0,ze.byteLength())).mod(ze);for(;;){if(it=await ni(rt,ze),nt=Ce.modExp(it,qe).imod(ze),nt.isZero())continue;const ke=Ve.mul(nt).imod(ze);if(ct=ht.add(ke).imod(ze),ot=it.modInv(ze).imul(ct).imod(ze),!ot.isZero())break}return{r:nt.toUint8Array("be",ze.byteLength()),s:ot.toUint8Array("be",ze.byteLength())}},verify:async function(ke,Ae,Ce,qe,ze,Ve,tt,rt){const it=await Zt.getBigInteger(),nt=new it(0);if(Ae=new it(Ae),Ce=new it(Ce),Ve=new it(Ve),tt=new it(tt),ze=new it(ze),rt=new it(rt),Ae.lte(nt)||Ae.gte(tt)||Ce.lte(nt)||Ce.gte(tt))return Zt.printDebug("invalid DSA Signature"),!1;const ot=new it(qe.subarray(0,tt.byteLength())).imod(tt),ct=Ce.modInv(tt);if(ct.isZero())return Zt.printDebug("invalid DSA Signature"),!1;ze=ze.mod(Ve),rt=rt.mod(Ve);const ht=ot.mul(ct).imod(tt),ft=Ae.mul(ct).imod(tt),yt=ze.modExp(ht,Ve),mt=rt.modExp(ft,Ve);return yt.mul(mt).imod(Ve).imod(tt).equal(Ae)},validateParams:async function(ke,Ae,Ce,qe,ze){const Ve=await Zt.getBigInteger();ke=new Ve(ke),Ae=new Ve(Ae),Ce=new Ve(Ce),qe=new Ve(qe);const tt=new Ve(1);if(Ce.lte(tt)||Ce.gte(ke))return!1;if(!ke.dec().mod(Ae).isZero())return!1;if(!Ce.modExp(Ae,ke).isOne())return!1;const rt=new Ve(Ae.bitLength()),it=new Ve(150);if(rt.lt(it)||!await ci(Ae,null,32))return!1;ze=new Ve(ze);const nt=new Ve(2),ot=await ni(nt.leftShift(rt.dec()),nt.leftShift(rt)),ct=Ae.mul(ot).add(ze);return!!qe.equal(Ce.modExp(ct,ke))}}),nacl:qn};class vn{constructor(ke){ke=void 0===ke?new Uint8Array([]):Zt.isString(ke)?Zt.stringToUint8Array(ke):new Uint8Array(ke),this.data=ke}read(ke){if(ke.length>=1){const Ae=ke[0];if(ke.length>=1+Ae)return this.data=ke.subarray(1,1+Ae),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Zt.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class _n{constructor(ke){if(ke){const{hash:Ae,cipher:Ce}=ke;this.hash=Ae,this.cipher=Ce}else this.hash=null,this.cipher=null}read(ke){if(ke.length<4||3!==ke[0]||1!==ke[1])throw Error("Cannot read KDFParams");return this.hash=ke[2],this.cipher=ke[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function kn(ke){const Ae=er.read(er.symmetric,ke);return Er[Ae]}function An(ke){try{ke.getName()}catch(ke){throw new Ui("Unknown curve OID")}}var da=Object.freeze({__proto__:null,publicKeyEncrypt:async function(ke,Ae,Ce,qe){switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:{const{n:ke,e:qe}=Ae;return{c:await la.rsa.encrypt(Ce,ke,qe)}}case er.publicKey.elgamal:{const{p:ke,g:qe,y:ze}=Ae;return la.elgamal.encrypt(Ce,ke,qe,ze)}case er.publicKey.ecdh:{const{oid:ke,Q:ze,kdfParams:Ve}=Ae,{publicKey:tt,wrappedKey:rt}=await la.elliptic.ecdh.encrypt(ke,Ve,Ce,ze,qe);return{V:tt,C:new vn(rt)}}default:return[]}},publicKeyDecrypt:async function(ke,Ae,Ce,qe,ze,Ve){switch(ke){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaEncrypt:{const{c:ke}=qe,{n:ze,e:tt}=Ae,{d:rt,p:it,q:nt,u:ot}=Ce;return la.rsa.decrypt(ke,ze,tt,rt,it,nt,ot,Ve)}case er.publicKey.elgamal:{const{c1:ke,c2:ze}=qe,tt=Ae.p,rt=Ce.x;return la.elgamal.decrypt(ke,ze,tt,rt,Ve)}case er.publicKey.ecdh:{const{oid:ke,Q:Ve,kdfParams:tt}=Ae,{d:rt}=Ce,{V:it,C:nt}=qe;return la.elliptic.ecdh.decrypt(ke,tt,it,nt.data,Ve,rt,ze)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(ke,Ae){let Ce=0;switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;const qe=Zt.readMPI(Ae.subarray(Ce));return Ce+=qe.length+2,{read:Ce,publicParams:{n:ke,e:qe}}}case er.publicKey.dsa:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;const qe=Zt.readMPI(Ae.subarray(Ce));Ce+=qe.length+2;const ze=Zt.readMPI(Ae.subarray(Ce));Ce+=ze.length+2;const Ve=Zt.readMPI(Ae.subarray(Ce));return Ce+=Ve.length+2,{read:Ce,publicParams:{p:ke,q:qe,g:ze,y:Ve}}}case er.publicKey.elgamal:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;const qe=Zt.readMPI(Ae.subarray(Ce));Ce+=qe.length+2;const ze=Zt.readMPI(Ae.subarray(Ce));return Ce+=ze.length+2,{read:Ce,publicParams:{p:ke,g:qe,y:ze}}}case er.publicKey.ecdsa:{const ke=new ki;Ce+=ke.read(Ae),An(ke);const qe=Zt.readMPI(Ae.subarray(Ce));return Ce+=qe.length+2,{read:Ce,publicParams:{oid:ke,Q:qe}}}case er.publicKey.eddsa:{const ke=new ki;Ce+=ke.read(Ae),An(ke);let qe=Zt.readMPI(Ae.subarray(Ce));return Ce+=qe.length+2,qe=Zt.leftPad(qe,33),{read:Ce,publicParams:{oid:ke,Q:qe}}}case er.publicKey.ecdh:{const ke=new ki;Ce+=ke.read(Ae),An(ke);const qe=Zt.readMPI(Ae.subarray(Ce));Ce+=qe.length+2;const ze=new _n;return Ce+=ze.read(Ae.subarray(Ce)),{read:Ce,publicParams:{oid:ke,Q:qe,kdfParams:ze}}}default:throw new Ui("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(ke,Ae,Ce){let qe=0;switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:{const ke=Zt.readMPI(Ae.subarray(qe));qe+=ke.length+2;const Ce=Zt.readMPI(Ae.subarray(qe));qe+=Ce.length+2;const ze=Zt.readMPI(Ae.subarray(qe));qe+=ze.length+2;const Ve=Zt.readMPI(Ae.subarray(qe));return qe+=Ve.length+2,{read:qe,privateParams:{d:ke,p:Ce,q:ze,u:Ve}}}case er.publicKey.dsa:case er.publicKey.elgamal:{const ke=Zt.readMPI(Ae.subarray(qe));return qe+=ke.length+2,{read:qe,privateParams:{x:ke}}}case er.publicKey.ecdsa:case er.publicKey.ecdh:{const ke=new Ni(Ce.oid);let ze=Zt.readMPI(Ae.subarray(qe));return qe+=ze.length+2,ze=Zt.leftPad(ze,ke.payloadSize),{read:qe,privateParams:{d:ze}}}case er.publicKey.eddsa:{const ke=new Ni(Ce.oid);let ze=Zt.readMPI(Ae.subarray(qe));return qe+=ze.length+2,ze=Zt.leftPad(ze,ke.payloadSize),{read:qe,privateParams:{seed:ze}}}default:throw new Ui("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(ke,Ae){let Ce=0;switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:return{c:Zt.readMPI(Ae.subarray(Ce))};case er.publicKey.elgamal:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;return{c1:ke,c2:Zt.readMPI(Ae.subarray(Ce))}}case er.publicKey.ecdh:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;const qe=new vn;return qe.read(Ae.subarray(Ce)),{V:ke,C:qe}}default:throw new Ui("Unknown public key encryption algorithm.")}},serializeParams:function(ke,Ae){const Ce=Object.keys(Ae).map((ke=>{const Ce=Ae[ke];return Zt.isUint8Array(Ce)?Zt.uint8ArrayToMPI(Ce):Ce.write()}));return Zt.concatUint8Array(Ce)},generateParams:function(ke,Ae,Ce){switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:return la.rsa.generate(Ae,65537).then((({n:ke,e:Ae,d:Ce,p:qe,q:ze,u:Ve})=>({privateParams:{d:Ce,p:qe,q:ze,u:Ve},publicParams:{n:ke,e:Ae}})));case er.publicKey.ecdsa:return la.elliptic.generate(Ce).then((({oid:ke,Q:Ae,secret:Ce})=>({privateParams:{d:Ce},publicParams:{oid:new ki(ke),Q:Ae}})));case er.publicKey.eddsa:return la.elliptic.generate(Ce).then((({oid:ke,Q:Ae,secret:Ce})=>({privateParams:{seed:Ce},publicParams:{oid:new ki(ke),Q:Ae}})));case er.publicKey.ecdh:return la.elliptic.generate(Ce).then((({oid:ke,Q:Ae,secret:Ce,hash:qe,cipher:ze})=>({privateParams:{d:Ce},publicParams:{oid:new ki(ke),Q:Ae,kdfParams:new _n({hash:qe,cipher:ze})}})));case er.publicKey.dsa:case er.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(ke,Ae,Ce){if(!Ae||!Ce)throw Error("Missing key parameters");switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:{const{n:ke,e:qe}=Ae,{d:ze,p:Ve,q:tt,u:rt}=Ce;return la.rsa.validateParams(ke,qe,ze,Ve,tt,rt)}case er.publicKey.dsa:{const{p:ke,q:qe,g:ze,y:Ve}=Ae,{x:tt}=Ce;return la.dsa.validateParams(ke,qe,ze,Ve,tt)}case er.publicKey.elgamal:{const{p:ke,g:qe,y:ze}=Ae,{x:Ve}=Ce;return la.elgamal.validateParams(ke,qe,ze,Ve)}case er.publicKey.ecdsa:case er.publicKey.ecdh:{const qe=la.elliptic[er.read(er.publicKey,ke)],{oid:ze,Q:Ve}=Ae,{d:tt}=Ce;return qe.validateParams(ze,Ve,tt)}case er.publicKey.eddsa:{const{oid:ke,Q:qe}=Ae,{seed:ze}=Ce;return la.elliptic.eddsa.validateParams(ke,qe,ze)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(ke){const{blockSize:Ae}=kn(ke),Ce=await ii(Ae),qe=new Uint8Array([Ce[Ce.length-2],Ce[Ce.length-1]]);return Zt.concat([Ce,qe])},generateSessionKey:function(ke){const{keySize:Ae}=kn(ke);return ii(Ae)},getAEADMode:function(ke){const Ae=er.read(er.aead,ke);return lo[Ae]},getCipher:kn});const pa=Zt.getWebCrypto(),ma=Zt.getNodeCrypto(),ga=ma?ma.getCiphers():[],ba={idea:ga.includes("idea-cfb")?"idea-cfb":void 0,tripledes:ga.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,cast5:ga.includes("cast5-cfb")?"cast5-cfb":void 0,blowfish:ga.includes("bf-cfb")?"bf-cfb":void 0,aes128:ga.includes("aes-128-cfb")?"aes-128-cfb":void 0,aes192:ga.includes("aes-192-cfb")?"aes-192-cfb":void 0,aes256:ga.includes("aes-256-cfb")?"aes-256-cfb":void 0};var va=Object.freeze({__proto__:null,encrypt:async function(ke,Ae,Ce,qe,ze){const Ve=er.read(er.symmetric,ke);if(Zt.getNodeCrypto()&&ba[Ve])return function(ke,Ae,Ce,qe){const ze=er.read(er.symmetric,ke),Ve=new ma.createCipheriv(ba[ze],Ae,qe);return Y(Ce,(ke=>new Uint8Array(Ve.update(ke))))}(ke,Ae,Ce,qe);if("aes"===Ve.substr(0,3))return function(ke,Ae,Ce,qe,ze){if(Zt.getWebCrypto()&&24!==Ae.length&&!Zt.isStream(Ce)&&Ce.length>=3e3*ze.minBytesForWebCrypto)return async function(ke,Ae,Ce,qe){const ze="AES-CBC",Ve=await pa.importKey("raw",Ae,{name:ze},!1,["encrypt"]),{blockSize:tt}=kn(ke),rt=Zt.concatUint8Array([new Uint8Array(tt),Ce]),it=new Uint8Array(await pa.encrypt({name:ze,iv:qe},Ve,rt)).subarray(0,Ce.length);return function(ke,Ae){for(let Ce=0;Ce<ke.length;Ce++)ke[Ce]=ke[Ce]^Ae[Ce]}(it,Ce),it}(ke,Ae,Ce,qe);const Ve=new ei(Ae,qe);return Y(Ce,(ke=>Ve.aes.AES_Encrypt_process(ke)),(()=>Ve.aes.AES_Encrypt_finish()))}(ke,Ae,Ce,qe,ze);const tt=new Er[Ve](Ae),rt=tt.blockSize,it=qe.slice();let nt=new Uint8Array;const h=ke=>{ke&&(nt=Zt.concatUint8Array([nt,ke]));const Ae=new Uint8Array(nt.length);let Ce,qe=0;for(;ke?nt.length>=rt:nt.length;){const ke=tt.encrypt(it);for(Ce=0;Ce<rt;Ce++)it[Ce]=nt[Ce]^ke[Ce],Ae[qe++]=it[Ce];nt=nt.subarray(rt)}return Ae.subarray(0,qe)};return Y(Ce,h,h)},decrypt:async function(ke,Ae,Ce,qe){const ze=er.read(er.symmetric,ke);if(Zt.getNodeCrypto()&&ba[ze])return function(ke,Ae,Ce,qe){const ze=er.read(er.symmetric,ke),Ve=new ma.createDecipheriv(ba[ze],Ae,qe);return Y(Ce,(ke=>new Uint8Array(Ve.update(ke))))}(ke,Ae,Ce,qe);if("aes"===ze.substr(0,3))return function(ke,Ae,Ce,qe){if(Zt.isStream(Ce)){const ke=new ei(Ae,qe);return Y(Ce,(Ae=>ke.aes.AES_Decrypt_process(Ae)),(()=>ke.aes.AES_Decrypt_finish()))}return ei.decrypt(Ce,Ae,qe)}(0,Ae,Ce,qe);const Ve=new Er[ze](Ae),tt=Ve.blockSize;let rt=qe,it=new Uint8Array;const u=ke=>{ke&&(it=Zt.concatUint8Array([it,ke]));const Ae=new Uint8Array(it.length);let Ce,qe=0;for(;ke?it.length>=tt:it.length;){const ke=Ve.encrypt(rt);for(rt=it,Ce=0;Ce<tt;Ce++)Ae[qe++]=rt[Ce]^ke[Ce];it=it.subarray(tt)}return Ae.subarray(0,qe)};return Y(Ce,u,u)}});class Kn{static encrypt(ke,Ae,Ce){return new Kn(Ae,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce){return new Kn(Ae,Ce).encrypt(ke)}constructor(ke,Ae,Ce){this.aes=Ce||new Oe(ke,void 0,!1,"CTR"),delete this.aes.padding,this.AES_CTR_set_options(Ae)}encrypt(ke){return Ue(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ue(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}AES_CTR_set_options(ke,Ae,Ce){let{asm:qe}=this.aes.acquire_asm();if(void 0!==Ce){if(Ce<8||Ce>48)throw new Be("illegal counter size");let ke=Math.pow(2,Ce)-1;qe.set_mask(0,0,ke/4294967296|0,0|ke)}else Ce=48,qe.set_mask(0,0,65535,4294967295);if(void 0===ke)throw Error("nonce is required");{let Ae=ke.length;if(!Ae||Ae>16)throw new Be("illegal nonce size");let Ce=new DataView(new ArrayBuffer(16));new Uint8Array(Ce.buffer).set(ke),qe.set_nonce(Ce.getUint32(0),Ce.getUint32(4),Ce.getUint32(8),Ce.getUint32(12))}if(void 0!==Ae){if(Ae<0||Ae>=Math.pow(2,Ce))throw new Be("illegal counter value");qe.set_counter(0,0,Ae/4294967296|0,0|Ae)}}}class Dn{static encrypt(ke,Ae,Ce=!0,qe){return new Dn(Ae,qe,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce=!0,qe){return new Dn(Ae,qe,Ce).decrypt(ke)}constructor(ke,Ae,Ce=!0,qe){this.aes=qe||new Oe(ke,Ae,Ce,"CBC")}encrypt(ke){return Ue(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ue(this.aes.AES_Decrypt_process(ke),this.aes.AES_Decrypt_finish())}}const wa=Zt.getWebCrypto(),_a=Zt.getNodeCrypto();function In(ke,Ae){const Ce=ke.length-16;for(let qe=0;qe<16;qe++)ke[qe+Ce]^=Ae[qe];return ke}const ka=new Uint8Array(16);async function Tn(ke){const Ae=await async function(ke){if(Zt.getWebCrypto()&&24!==ke.length)return ke=await wa.importKey("raw",ke,{name:"AES-CBC",length:8*ke.length},!1,["encrypt"]),async function(Ae){const Ce=await wa.encrypt({name:"AES-CBC",iv:ka,length:128},ke,Ae);return new Uint8Array(Ce).subarray(0,Ce.byteLength-16)};if(Zt.getNodeCrypto())return async function(Ae){const Ce=new _a.createCipheriv("aes-"+8*ke.length+"-cbc",ke,ka).update(Ae);return new Uint8Array(Ce)};return async function(Ae){return Dn.encrypt(Ae,ke,!1,ka)}}(ke),Ce=Zt.double(await Ae(ka)),qe=Zt.double(Ce);return async function(ke){return(await Ae(function(ke,Ae,Ce){if(ke.length&&ke.length%16==0)return In(ke,Ae);const qe=new Uint8Array(ke.length+(16-ke.length%16));return qe.set(ke),qe[ke.length]=128,In(qe,Ce)}(ke,Ce,qe))).subarray(-16)}}const Aa=Zt.getWebCrypto(),Sa=Zt.getNodeCrypto(),Ea=Zt.getNodeBuffer(),Ma=new Uint8Array(16),xa=new Uint8Array(16);xa[15]=1;const Ca=new Uint8Array(16);async function Ln(ke){const Ae=await Tn(ke);return function(ke,Ce){return Ae(Zt.concatUint8Array([ke,Ce]))}}async function Wn(ke){return Zt.getWebCrypto()&&24!==ke.length?(ke=await Aa.importKey("raw",ke,{name:"AES-CTR",length:8*ke.length},!1,["encrypt"]),async function(Ae,Ce){const qe=await Aa.encrypt({name:"AES-CTR",counter:Ce,length:128},ke,Ae);return new Uint8Array(qe)}):Zt.getNodeCrypto()?async function(Ae,Ce){const qe=new Sa.createCipheriv("aes-"+8*ke.length+"-ctr",ke,Ce),ze=Ea.concat([qe.update(Ae),qe.final()]);return new Uint8Array(ze)}:async function(Ae,Ce){return Kn.encrypt(Ae,ke,Ce)}}async function Hn(ke,Ae){if(ke!==er.symmetric.aes128&&ke!==er.symmetric.aes192&&ke!==er.symmetric.aes256)throw Error("EAX mode supports only AES cipher");const[Ce,qe]=await Promise.all([Ln(Ae),Wn(Ae)]);return{encrypt:async function(ke,Ae,ze){const[Ve,tt]=await Promise.all([Ce(Ma,Ae),Ce(xa,ze)]),rt=await qe(ke,Ve),it=await Ce(Ca,rt);for(let ke=0;ke<16;ke++)it[ke]^=tt[ke]^Ve[ke];return Zt.concatUint8Array([rt,it])},decrypt:async function(ke,Ae,ze){if(ke.length<16)throw Error("Invalid EAX ciphertext");const Ve=ke.subarray(0,-16),tt=ke.subarray(-16),[rt,it,nt]=await Promise.all([Ce(Ma,Ae),Ce(xa,ze),Ce(Ca,Ve)]),ot=nt;for(let ke=0;ke<16;ke++)ot[ke]^=it[ke]^rt[ke];if(!Zt.equalsUint8Array(tt,ot))throw Error("Authentication tag mismatch");return await qe(Ve,rt)}}}Ca[15]=2,Hn.getNonce=function(ke,Ae){const Ce=ke.slice();for(let ke=0;ke<Ae.length;ke++)Ce[8+ke]^=Ae[ke];return Ce},Hn.blockLength=16,Hn.ivLength=16,Hn.tagLength=16;function Gn(ke){let Ae=0;for(let Ce=1;0==(ke&Ce);Ce<<=1)Ae++;return Ae}function Vn(ke,Ae){for(let Ce=0;Ce<ke.length;Ce++)ke[Ce]^=Ae[Ce];return ke}function $n(ke,Ae){return Vn(ke.slice(),Ae)}const Ha=new Uint8Array(16),Qa=new Uint8Array([1]);async function Xn(ke,Ae){let Ce,qe,ze,Ve=0;function s(ke,Ae,qe,tt){const rt=Ae.length/16|0;!function(ke,Ae){const Ce=Zt.nbits(Math.max(ke.length,Ae.length)/16|0)-1;for(let ke=Ve+1;ke<=Ce;ke++)ze[ke]=Zt.double(ze[ke-1]);Ve=Ce}(Ae,tt);const it=Zt.concatUint8Array([Ha.subarray(0,15-qe.length),Qa,qe]),nt=63&it[15];it[15]&=192;const ot=Ce(it),ct=Zt.concatUint8Array([ot,$n(ot.subarray(0,8),ot.subarray(1,9))]),ht=Zt.shiftRight(ct.subarray(0+(nt>>3),17+(nt>>3)),8-(7&nt)).subarray(1),ft=new Uint8Array(16),yt=new Uint8Array(Ae.length+16);let mt,kt=0;for(mt=0;mt<rt;mt++)Vn(ht,ze[Gn(mt+1)]),yt.set(Vn(ke($n(ht,Ae)),ht),kt),Vn(ft,ke===Ce?Ae:yt.subarray(kt)),Ae=Ae.subarray(16),kt+=16;if(Ae.length){Vn(ht,ze.x);const qe=Ce(ht);yt.set($n(Ae,qe),kt);const Ve=new Uint8Array(16);Ve.set(ke===Ce?Ae:yt.subarray(kt,-16),0),Ve[Ae.length]=128,Vn(ft,Ve),kt+=Ae.length}const St=Vn(Ce(Vn(Vn(ft,ht),ze.$)),function(ke){if(!ke.length)return Ha;const Ae=ke.length/16|0,qe=new Uint8Array(16),Ve=new Uint8Array(16);for(let tt=0;tt<Ae;tt++)Vn(qe,ze[Gn(tt+1)]),Vn(Ve,Ce($n(qe,ke))),ke=ke.subarray(16);if(ke.length){Vn(qe,ze.x);const Ae=new Uint8Array(16);Ae.set(ke,0),Ae[ke.length]=128,Vn(Ae,qe),Vn(Ve,Ce(Ae))}return Ve}(tt));return yt.set(St,kt),yt}return function(ke,Ae){const Ve=er.read(er.symmetric,ke),tt=new Er[Ve](Ae);Ce=tt.encrypt.bind(tt),qe=tt.decrypt.bind(tt);const rt=Ce(Ha),it=Zt.double(rt);ze=[],ze[0]=Zt.double(it),ze.x=rt,ze.$=it}(ke,Ae),{encrypt:async function(ke,Ae,qe){return s(Ce,ke,Ae,qe)},decrypt:async function(ke,Ae,Ce){if(ke.length<16)throw Error("Invalid OCB ciphertext");const ze=ke.subarray(-16);ke=ke.subarray(0,-16);const Ve=s(qe,ke,Ae,Ce);if(Zt.equalsUint8Array(ze,Ve.subarray(-16)))return Ve.subarray(0,-16);throw Error("Authentication tag mismatch")}}}Xn.getNonce=function(ke,Ae){const Ce=ke.slice();for(let ke=0;ke<Ae.length;ke++)Ce[7+ke]^=Ae[ke];return Ce},Xn.blockLength=16,Xn.ivLength=15,Xn.tagLength=16;class Qn{constructor(ke,Ae,Ce,qe=16,ze){this.tagSize=qe,this.gamma0=0,this.counter=1,this.aes=ze||new Oe(ke,void 0,!1,"CTR");let{asm:Ve,heap:tt}=this.aes.acquire_asm();if(Ve.gcm_init(),this.tagSize<4||this.tagSize>16)throw new Be("illegal tagSize value");const rt=Ae.length||0,it=new Uint8Array(16);12!==rt?(this._gcm_mac_process(Ae),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,tt[4]=0,tt[5]=0,tt[6]=0,tt[7]=0,tt[8]=0,tt[9]=0,tt[10]=0,tt[11]=rt>>>29,tt[12]=rt>>>21&255,tt[13]=rt>>>13&255,tt[14]=rt>>>5&255,tt[15]=rt<<3&255,Ve.mac(nr.MAC.GCM,nr.HEAP_DATA,16),Ve.get_iv(nr.HEAP_DATA),Ve.set_iv(0,0,0,0),it.set(tt.subarray(0,16))):(it.set(Ae),it[15]=1);const nt=new DataView(it.buffer);if(this.gamma0=nt.getUint32(12),Ve.set_nonce(nt.getUint32(0),nt.getUint32(4),nt.getUint32(8),0),Ve.set_mask(0,0,0,4294967295),void 0!==Ce){if(Ce.length>68719476704)throw new Be("illegal adata length");Ce.length?(this.adata=Ce,this._gcm_mac_process(Ce)):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");Ve.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(ke,Ae,Ce,qe,ze){return new Qn(Ae,Ce,qe,ze).encrypt(ke)}static decrypt(ke,Ae,Ce,qe,ze){return new Qn(Ae,Ce,qe,ze).decrypt(ke)}encrypt(ke){return this.AES_GCM_encrypt(ke)}decrypt(ke){return this.AES_GCM_decrypt(ke)}AES_GCM_Encrypt_process(ke){let Ae=0,Ce=ke.length||0,{asm:qe,heap:ze}=this.aes.acquire_asm(),Ve=this.counter,tt=this.aes.pos,rt=this.aes.len,it=0,nt=rt+Ce&-16,ot=0;if((Ve-1<<4)+rt+Ce>68719476704)throw new RangeError("counter overflow");const ct=new Uint8Array(nt);for(;Ce>0;)ot=Re(ze,tt+rt,ke,Ae,Ce),rt+=ot,Ae+=ot,Ce-=ot,ot=qe.cipher(nr.ENC.CTR,nr.HEAP_DATA+tt,rt),ot=qe.mac(nr.MAC.GCM,nr.HEAP_DATA+tt,ot),ot&&ct.set(ze.subarray(tt,tt+ot),it),Ve+=ot>>>4,it+=ot,ot<rt?(tt+=ot,rt-=ot):(tt=0,rt=0);return this.counter=Ve,this.aes.pos=tt,this.aes.len=rt,ct}AES_GCM_Encrypt_finish(){let{asm:ke,heap:Ae}=this.aes.acquire_asm(),Ce=this.counter,qe=this.tagSize,ze=this.adata,Ve=this.aes.pos,tt=this.aes.len;const rt=new Uint8Array(tt+qe);ke.cipher(nr.ENC.CTR,nr.HEAP_DATA+Ve,tt+15&-16),tt&&rt.set(Ae.subarray(Ve,Ve+tt));let it=tt;for(;15⁢it++)Ae[Ve+it]=0;ke.mac(nr.MAC.GCM,nr.HEAP_DATA+Ve,it);const nt=void 0!==ze?ze.length:0,ot=(Ce-1<<4)+tt;return Ae[0]=0,Ae[1]=0,Ae[2]=0,Ae[3]=nt>>>29,Ae[4]=nt>>>21,Ae[5]=nt>>>13&255,Ae[6]=nt>>>5&255,Ae[7]=nt<<3&255,Ae[8]=Ae[9]=Ae[10]=0,Ae[11]=ot>>>29,Ae[12]=ot>>>21&255,Ae[13]=ot>>>13&255,Ae[14]=ot>>>5&255,Ae[15]=ot<<3&255,ke.mac(nr.MAC.GCM,nr.HEAP_DATA,16),ke.get_iv(nr.HEAP_DATA),ke.set_counter(0,0,0,this.gamma0),ke.cipher(nr.ENC.CTR,nr.HEAP_DATA,16),rt.set(Ae.subarray(0,qe),tt),this.counter=1,this.aes.pos=0,this.aes.len=0,rt}AES_GCM_Decrypt_process(ke){let Ae=0,Ce=ke.length||0,{asm:qe,heap:ze}=this.aes.acquire_asm(),Ve=this.counter,tt=this.tagSize,rt=this.aes.pos,it=this.aes.len,nt=0,ot=it+Ce>tt?it+Ce-tt&-16:0,ct=it+Ce-ot,ht=0;if((Ve-1<<4)+it+Ce>68719476704)throw new RangeError("counter overflow");const ft=new Uint8Array(ot);for(;Ce>ct;)ht=Re(ze,rt+it,ke,Ae,Ce-ct),it+=ht,Ae+=ht,Ce-=ht,ht=qe.mac(nr.MAC.GCM,nr.HEAP_DATA+rt,ht),ht=qe.cipher(nr.DEC.CTR,nr.HEAP_DATA+rt,ht),ht&&ft.set(ze.subarray(rt,rt+ht),nt),Ve+=ht>>>4,nt+=ht,rt=0,it=0;return Ce>0&&(it+=Re(ze,0,ke,Ae,Ce)),this.counter=Ve,this.aes.pos=rt,this.aes.len=it,ft}AES_GCM_Decrypt_finish(){let{asm:ke,heap:Ae}=this.aes.acquire_asm(),Ce=this.tagSize,qe=this.adata,ze=this.counter,Ve=this.aes.pos,tt=this.aes.len,rt=tt-Ce;if(tt<Ce)throw new Ie("authentication tag not found");const it=new Uint8Array(rt),nt=new Uint8Array(Ae.subarray(Ve+rt,Ve+tt));let ot=rt;for(;15&ot;ot++)Ae[Ve+ot]=0;ke.mac(nr.MAC.GCM,nr.HEAP_DATA+Ve,ot),ke.cipher(nr.DEC.CTR,nr.HEAP_DATA+Ve,ot),rt&&it.set(Ae.subarray(Ve,Ve+rt));const ct=void 0!==qe?qe.length:0,ht=(ze-1<<4)+tt-Ce;Ae[0]=0,Ae[1]=0,Ae[2]=0,Ae[3]=ct>>>29,Ae[4]=ct>>>21,Ae[5]=ct>>>13&255,Ae[6]=ct>>>5&255,Ae[7]=ct<<3&255,Ae[8]=Ae[9]=Ae[10]=0,Ae[11]=ht>>>29,Ae[12]=ht>>>21&255,Ae[13]=ht>>>13&255,Ae[14]=ht>>>5&255,Ae[15]=ht<<3&255,ke.mac(nr.MAC.GCM,nr.HEAP_DATA,16),ke.get_iv(nr.HEAP_DATA),ke.set_counter(0,0,0,this.gamma0),ke.cipher(nr.ENC.CTR,nr.HEAP_DATA,16);let ft=0;for(let ke=0;ke<Ce;++ke)ft|=nt[ke]^Ae[ke];if(ft)throw new Te("data integrity check failed");return this.counter=1,this.aes.pos=0,this.aes.len=0,it}AES_GCM_decrypt(ke){const Ae=this.AES_GCM_Decrypt_process(ke),Ce=this.AES_GCM_Decrypt_finish(),qe=new Uint8Array(Ae.length+Ce.length);return Ae.length&&qe.set(Ae),Ce.length&&qe.set(Ce,Ae.length),qe}AES_GCM_encrypt(ke){const Ae=this.AES_GCM_Encrypt_process(ke),Ce=this.AES_GCM_Encrypt_finish(),qe=new Uint8Array(Ae.length+Ce.length);return Ae.length&&qe.set(Ae),Ce.length&&qe.set(Ce,Ae.length),qe}_gcm_mac_process(ke){let{asm:Ae,heap:Ce}=this.aes.acquire_asm(),qe=0,ze=ke.length||0,Ve=0;for(;ze>0;){for(Ve=Re(Ce,0,ke,qe,ze),qe+=Ve,ze-=Ve;15&Ve;)Ce[Ve++]=0;Ae.mac(nr.MAC.GCM,nr.HEAP_DATA,Ve)}}}const io=Zt.getWebCrypto(),no=Zt.getNodeCrypto(),ho=Zt.getNodeBuffer();async function ra(ke,Ae){if(ke!==er.symmetric.aes128&&ke!==er.symmetric.aes192&&ke!==er.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Zt.getWebCrypto()&&24!==Ae.length){const ke=await io.importKey("raw",Ae,{name:"AES-GCM"},!1,["encrypt","decrypt"]);return{encrypt:async function(Ce,qe,ze=new Uint8Array){if(!Ce.length)return Qn.encrypt(Ce,Ae,qe,ze);const Ve=await io.encrypt({name:"AES-GCM",iv:qe,additionalData:ze,tagLength:128},ke,Ce);return new Uint8Array(Ve)},decrypt:async function(Ce,qe,ze=new Uint8Array){if(16===Ce.length)return Qn.decrypt(Ce,Ae,qe,ze);const Ve=await io.decrypt({name:"AES-GCM",iv:qe,additionalData:ze,tagLength:128},ke,Ce);return new Uint8Array(Ve)}}}return Zt.getNodeCrypto()?{encrypt:async function(ke,Ce,qe=new Uint8Array){const ze=new no.createCipheriv("aes-"+8*Ae.length+"-gcm",Ae,Ce);ze.setAAD(qe);const Ve=ho.concat([ze.update(ke),ze.final(),ze.getAuthTag()]);return new Uint8Array(Ve)},decrypt:async function(ke,Ce,qe=new Uint8Array){const ze=new no.createDecipheriv("aes-"+8*Ae.length+"-gcm",Ae,Ce);ze.setAAD(qe),ze.setAuthTag(ke.slice(ke.length-16,ke.length));const Ve=ho.concat([ze.update(ke.slice(0,ke.length-16)),ze.final()]);return new Uint8Array(Ve)}}:{encrypt:async function(ke,Ce,qe){return Qn.encrypt(ke,Ae,Ce,qe)},decrypt:async function(ke,Ce,qe){return Qn.decrypt(ke,Ae,Ce,qe)}}}ra.getNonce=function(ke,Ae){const Ce=ke.slice();for(let ke=0;ke<Ae.length;ke++)Ce[4+ke]^=Ae[ke];return Ce},ra.blockLength=16,ra.ivLength=12,ra.tagLength=16;var lo={cfb:va,gcm:ra,experimentalGCM:ra,eax:Hn,ocb:Xn};var go=Object.freeze({__proto__:null,parseSignatureParams:function(ke,Ae){let Ce=0;switch(ke){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaEncrypt:case er.publicKey.rsaSign:return{s:Zt.readMPI(Ae.subarray(Ce))};case er.publicKey.dsa:case er.publicKey.ecdsa:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;return{r:ke,s:Zt.readMPI(Ae.subarray(Ce))}}case er.publicKey.eddsa:{let ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2,ke=Zt.leftPad(ke,32);let qe=Zt.readMPI(Ae.subarray(Ce));return qe=Zt.leftPad(qe,32),{r:ke,s:qe}}default:throw new Ui("Unknown signature algorithm.")}},verify:async function(ke,Ae,Ce,qe,ze,Ve){switch(ke){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaEncrypt:case er.publicKey.rsaSign:{const{n:ke,e:tt}=qe,rt=Zt.leftPad(Ce.s,ke.length);return la.rsa.verify(Ae,ze,rt,ke,tt,Ve)}case er.publicKey.dsa:{const{g:ke,p:ze,q:tt,y:rt}=qe,{r:it,s:nt}=Ce;return la.dsa.verify(Ae,it,nt,Ve,ke,ze,tt,rt)}case er.publicKey.ecdsa:{const{oid:ke,Q:tt}=qe,rt=new la.elliptic.Curve(ke).payloadSize,it=Zt.leftPad(Ce.r,rt),nt=Zt.leftPad(Ce.s,rt);return la.elliptic.ecdsa.verify(ke,Ae,{r:it,s:nt},ze,tt,Ve)}case er.publicKey.eddsa:{const{oid:ke,Q:tt}=qe;return la.elliptic.eddsa.verify(ke,Ae,Ce,ze,tt,Ve)}default:throw Error("Unknown signature algorithm.")}},sign:async function(ke,Ae,Ce,qe,ze,Ve){if(!Ce||!qe)throw Error("Missing key parameters");switch(ke){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaEncrypt:case er.publicKey.rsaSign:{const{n:ke,e:tt}=Ce,{d:rt,p:it,q:nt,u:ot}=qe;return{s:await la.rsa.sign(Ae,ze,ke,tt,rt,it,nt,ot,Ve)}}case er.publicKey.dsa:{const{g:ke,p:ze,q:tt}=Ce,{x:rt}=qe;return la.dsa.sign(Ae,Ve,ke,ze,tt,rt)}case er.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case er.publicKey.ecdsa:{const{oid:ke,Q:tt}=Ce,{d:rt}=qe;return la.elliptic.ecdsa.sign(ke,Ae,ze,tt,rt,Ve)}case er.publicKey.eddsa:{const{oid:ke,Q:tt}=Ce,{seed:rt}=qe;return la.elliptic.eddsa.sign(ke,Ae,ze,tt,rt,Ve)}default:throw Error("Unknown signature algorithm.")}}});const vo={cipher:Er,hash:Nn,mode:lo,publicKey:la,signature:go,random:Fn,pkcs1:Jn,pkcs5:ca,aesKW:aa};Object.assign(vo,da);var wo="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function oa(ke,Ae){return ke.length===Ae?ke:ke.subarray?ke.subarray(0,Ae):(ke.length=Ae,ke)}const ko={arraySet:function(ke,Ae,Ce,qe,ze){if(Ae.subarray&&ke.subarray)ke.set(Ae.subarray(Ce,Ce+qe),ze);else for(let Ve=0;Ve<qe;Ve++)ke[ze+Ve]=Ae[Ce+Ve]},flattenChunks:function(ke){let Ae,Ce,qe,ze,Ve;for(qe=0,Ae=0,Ce=ke.length;Ae<Ce;Ae++)qe+=ke[Ae].length;const tt=new Uint8Array(qe);for(ze=0,Ae=0,Ce=ke.length;Ae<Ce;Ae++)Ve=ke[Ae],tt.set(Ve,ze),ze+=Ve.length;return tt}},Mo={arraySet:function(ke,Ae,Ce,qe,ze){for(let Ve=0;Ve<qe;Ve++)ke[ze+Ve]=Ae[Ce+Ve]},flattenChunks:function(ke){return[].concat.apply([],ke)}};let Io=wo?Uint8Array:Array,zo=wo?Uint16Array:Array,ic=wo?Int32Array:Array,nc=wo?ko.flattenChunks:Mo.flattenChunks,ac=wo?ko.arraySet:Mo.arraySet;function ya(ke){let Ae=ke.length;for(;--Ae>=0;)ke[Ae]=0}const hc=[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],lc=[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],dc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],pc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],gc=Array(576);ya(gc);const Ac=Array(60);ya(Ac);const Cc=Array(512);ya(Cc);const Dc=Array(256);ya(Dc);const Bc=Array(29);ya(Bc);const Tc=Array(30);function Pa(ke,Ae,Ce,qe,ze){this.static_tree=ke,this.extra_bits=Ae,this.extra_base=Ce,this.elems=qe,this.max_length=ze,this.has_stree=ke&&ke.length}let Uc,Ic,zc;function Ka(ke,Ae){this.dyn_tree=ke,this.max_code=0,this.stat_desc=Ae}function Da(ke){return ke<256?Cc[ke]:Cc[256+(ke>>>7)]}function Ra(ke,Ae){ke.pending_buf[ke.pending++]=255&Ae,ke.pending_buf[ke.pending++]=Ae>>>8&255}function Ua(ke,Ae,Ce){ke.bi_valid>16-Ce?(ke.bi_buf|=Ae<<ke.bi_valid&65535,Ra(ke,ke.bi_buf),ke.bi_buf=Ae>>16-ke.bi_valid,ke.bi_valid+=Ce-16):(ke.bi_buf|=Ae<<ke.bi_valid&65535,ke.bi_valid+=Ce)}function Ia(ke,Ae,Ce){Ua(ke,Ce[2*Ae],Ce[2*Ae+1])}function Ba(ke,Ae){let Ce=0;do{Ce|=1&ke,ke>>>=1,Ce<<=1}while(--Ae>0);return Ce>>>1}function Ta(ke,Ae,Ce){const qe=Array(16);let ze,Ve,tt=0;for(ze=1;ze<=15;ze++)qe[ze]=tt=tt+Ce[ze-1]<<1;for(Ve=0;Ve<=Ae;Ve++){const Ae=ke[2*Ve+1];0!==Ae&&(ke[2*Ve]=Ba(qe[Ae]++,Ae))}}function za(ke){let Ae;for(Ae=0;Ae<286;Ae++)ke.dyn_ltree[2*Ae]=0;for(Ae=0;Ae<30;Ae++)ke.dyn_dtree[2*Ae]=0;for(Ae=0;Ae<19;Ae++)ke.bl_tree[2*Ae]=0;ke.dyn_ltree[512]=1,ke.opt_len=ke.static_len=0,ke.last_lit=ke.matches=0}function qa(ke){ke.bi_valid>8?Ra(ke,ke.bi_buf):ke.bi_valid>0&&(ke.pending_buf[ke.pending++]=ke.bi_buf),ke.bi_buf=0,ke.bi_valid=0}function Oa(ke,Ae,Ce,qe){const ze=2*Ae,Ve=2*Ce;return ke[ze]<ke[Ve]||ke[ze]===ke[Ve]&&qe[Ae]<=qe[Ce]}function Fa(ke,Ae,Ce){const qe=ke.heap[Ce];let ze=Ce<<1;for(;ze<=ke.heap_len&&(ze<ke.heap_len&&Oa(Ae,ke.heap[ze+1],ke.heap[ze],ke.depth)&&ze++,!Oa(Ae,qe,ke.heap[ze],ke.depth));)ke.heap[Ce]=ke.heap[ze],Ce=ze,ze<<=1;ke.heap[Ce]=qe}function Na(ke,Ae,Ce){let qe,ze,Ve,tt,rt=0;if(0!==ke.last_lit)do{qe=ke.pending_buf[ke.d_buf+2*rt]<<8|ke.pending_buf[ke.d_buf+2*rt+1],ze=ke.pending_buf[ke.l_buf+rt],rt++,0===qe?Ia(ke,ze,Ae):(Ve=Dc[ze],Ia(ke,Ve+256+1,Ae),tt=hc[Ve],0!==tt&&(ze-=Bc[Ve],Ua(ke,ze,tt)),qe--,Ve=Da(qe),Ia(ke,Ve,Ce),tt=lc[Ve],0!==tt&&(qe-=Tc[Ve],Ua(ke,qe,tt)))}while(rt<ke.last_lit);Ia(ke,256,Ae)}function ja(ke,Ae){const Ce=Ae.dyn_tree,qe=Ae.stat_desc.static_tree,ze=Ae.stat_desc.has_stree,Ve=Ae.stat_desc.elems;let tt,rt,it,nt=-1;for(ke.heap_len=0,ke.heap_max=573,tt=0;tt<Ve;tt++)0!==Ce[2*tt]?(ke.heap[++ke.heap_len]=nt=tt,ke.depth[tt]=0):Ce[2*tt+1]=0;for(;ke.heap_len<2;)it=ke.heap[++ke.heap_len]=nt<2?++nt:0,Ce[2*it]=1,ke.depth[it]=0,ke.opt_len--,ze&&(ke.static_len-=qe[2*it+1]);for(Ae.max_code=nt,tt=ke.heap_len>>1;tt>=1;tt--)Fa(ke,Ce,tt);it=Ve;do{tt=ke.heap[1],ke.heap[1]=ke.heap[ke.heap_len--],Fa(ke,Ce,1),rt=ke.heap[1],ke.heap[--ke.heap_max]=tt,ke.heap[--ke.heap_max]=rt,Ce[2*it]=Ce[2*tt]+Ce[2*rt],ke.depth[it]=(ke.depth[tt]>=ke.depth[rt]?ke.depth[tt]:ke.depth[rt])+1,Ce[2*tt+1]=Ce[2*rt+1]=it,ke.heap[1]=it++,Fa(ke,Ce,1)}while(ke.heap_len>=2);ke.heap[--ke.heap_max]=ke.heap[1],function(ke,Ae){const Ce=Ae.dyn_tree,qe=Ae.max_code,ze=Ae.stat_desc.static_tree,Ve=Ae.stat_desc.has_stree,tt=Ae.stat_desc.extra_bits,rt=Ae.stat_desc.extra_base,it=Ae.stat_desc.max_length;let nt,ot,ct,ht,ft,yt,mt=0;for(ht=0;ht<=15;ht++)ke.bl_count[ht]=0;for(Ce[2*ke.heap[ke.heap_max]+1]=0,nt=ke.heap_max+1;nt<573;nt++)ot=ke.heap[nt],ht=Ce[2*Ce[2*ot+1]+1]+1,ht>it&&(ht=it,mt++),Ce[2*ot+1]=ht,ot>qe||(ke.bl_count[ht]++,ft=0,ot>=rt&&(ft=tt[ot-rt]),yt=Ce[2*ot],ke.opt_len+=yt*(ht+ft),Ve&&(ke.static_len+=yt*(ze[2*ot+1]+ft)));if(0!==mt){do{for(ht=it-1;0===ke.bl_count[ht];)ht--;ke.bl_count[ht]--,ke.bl_count[ht+1]+=2,ke.bl_count[it]--,mt-=2}while(mt>0);for(ht=it;0!==ht;ht--)for(ot=ke.bl_count[ht];0!==ot;)ct=ke.heap[--nt],ct>qe||(Ce[2*ct+1]!==ht&&(ke.opt_len+=(ht-Ce[2*ct+1])*Ce[2*ct],Ce[2*ct+1]=ht),ot--)}}(ke,Ae),Ta(Ce,nt,ke.bl_count)}function La(ke,Ae,Ce){let qe,ze,Ve=-1,tt=Ae[1],rt=0,it=7,nt=4;for(0===tt&&(it=138,nt=3),Ae[2*(Ce+1)+1]=65535,qe=0;qe<=Ce;qe++)ze=tt,tt=Ae[2*(qe+1)+1],++rt<it&&ze===tt||(rt<nt?ke.bl_tree[2*ze]+=rt:0!==ze?(ze!==Ve&&ke.bl_tree[2*ze]++,ke.bl_tree[32]++):rt<=10?ke.bl_tree[34]++:ke.bl_tree[36]++,rt=0,Ve=ze,0===tt?(it=138,nt=3):ze===tt?(it=6,nt=3):(it=7,nt=4))}function Wa(ke,Ae,Ce){let qe,ze,Ve=-1,tt=Ae[1],rt=0,it=7,nt=4;for(0===tt&&(it=138,nt=3),qe=0;qe<=Ce;qe++)if(ze=tt,tt=Ae[2*(qe+1)+1],!(++rt<it&&ze===tt)){if(rt<nt)do{Ia(ke,ze,ke.bl_tree)}while(0!=--rt);else 0!==ze?(ze!==Ve&&(Ia(ke,ze,ke.bl_tree),rt--),Ia(ke,16,ke.bl_tree),Ua(ke,rt-3,2)):rt<=10?(Ia(ke,17,ke.bl_tree),Ua(ke,rt-3,3)):(Ia(ke,18,ke.bl_tree),Ua(ke,rt-11,7));rt=0,Ve=ze,0===tt?(it=138,nt=3):ze===tt?(it=6,nt=3):(it=7,nt=4)}}ya(Tc);let Vc=!1;function Ga(ke){Vc||(!function(){let ke,Ae,Ce,qe,ze;const Ve=Array(16);for(Ce=0,qe=0;qe<28;qe++)for(Bc[qe]=Ce,ke=0;ke<1<<hc[qe];ke++)Dc[Ce++]=qe;for(Dc[Ce-1]=qe,ze=0,qe=0;qe<16;qe++)for(Tc[qe]=ze,ke=0;ke<1<<lc[qe];ke++)Cc[ze++]=qe;for(ze>>=7;qe<30;qe++)for(Tc[qe]=ze<<7,ke=0;ke<1<<lc[qe]-7;ke++)Cc[256+ze++]=qe;for(Ae=0;Ae<=15;Ae++)Ve[Ae]=0;for(ke=0;ke<=143;)gc[2*ke+1]=8,ke++,Ve[8]++;for(;ke<=255;)gc[2*ke+1]=9,ke++,Ve[9]++;for(;ke<=279;)gc[2*ke+1]=7,ke++,Ve[7]++;for(;ke<=287;)gc[2*ke+1]=8,ke++,Ve[8]++;for(Ta(gc,287,Ve),ke=0;ke<30;ke++)Ac[2*ke+1]=5,Ac[2*ke]=Ba(ke,5);Uc=new Pa(gc,hc,257,286,15),Ic=new Pa(Ac,lc,0,30,15),zc=new Pa([],dc,0,19,7)}(),Vc=!0),ke.l_desc=new Ka(ke.dyn_ltree,Uc),ke.d_desc=new Ka(ke.dyn_dtree,Ic),ke.bl_desc=new Ka(ke.bl_tree,zc),ke.bi_buf=0,ke.bi_valid=0,za(ke)}function Va(ke,Ae,Ce,qe){Ua(ke,0+(qe?1:0),3),function(ke,Ae,Ce,qe){qa(ke),qe&&(Ra(ke,Ce),Ra(ke,~Ce)),ac(ke.pending_buf,ke.window,Ae,Ce,ke.pending),ke.pending+=Ce}(ke,Ae,Ce,!0)}function $a(ke){Ua(ke,2,3),Ia(ke,256,gc),function(ke){16===ke.bi_valid?(Ra(ke,ke.bi_buf),ke.bi_buf=0,ke.bi_valid=0):ke.bi_valid>=8&&(ke.pending_buf[ke.pending++]=255&ke.bi_buf,ke.bi_buf>>=8,ke.bi_valid-=8)}(ke)}function Za(ke,Ae,Ce,qe){let ze,Ve,tt=0;ke.level>0?(2===ke.strm.data_type&&(ke.strm.data_type=function(ke){let Ae,Ce=4093624447;for(Ae=0;Ae<=31;Ae++,Ce>>>=1)if(1&Ce&&0!==ke.dyn_ltree[2*Ae])return 0;if(0!==ke.dyn_ltree[18]||0!==ke.dyn_ltree[20]||0!==ke.dyn_ltree[26])return 1;for(Ae=32;Ae<256;Ae++)if(0!==ke.dyn_ltree[2*Ae])return 1;return 0}(ke)),ja(ke,ke.l_desc),ja(ke,ke.d_desc),tt=function(ke){let Ae;for(La(ke,ke.dyn_ltree,ke.l_desc.max_code),La(ke,ke.dyn_dtree,ke.d_desc.max_code),ja(ke,ke.bl_desc),Ae=18;Ae>=3&&0===ke.bl_tree[2*pc[Ae]+1];Ae--);return ke.opt_len+=3*(Ae+1)+5+5+4,Ae}(ke),ze=ke.opt_len+3+7>>>3,Ve=ke.static_len+3+7>>>3,Ve<=ze&&(ze=Ve)):ze=Ve=Ce+5,Ce+4<=ze&&-1!==Ae?Va(ke,Ae,Ce,qe):4===ke.strategy||Ve===ze?(Ua(ke,2+(qe?1:0),3),Na(ke,gc,Ac)):(Ua(ke,4+(qe?1:0),3),function(ke,Ae,Ce,qe){let ze;for(Ua(ke,Ae-257,5),Ua(ke,Ce-1,5),Ua(ke,qe-4,4),ze=0;ze<qe;ze++)Ua(ke,ke.bl_tree[2*pc[ze]+1],3);Wa(ke,ke.dyn_ltree,Ae-1),Wa(ke,ke.dyn_dtree,Ce-1)}(ke,ke.l_desc.max_code+1,ke.d_desc.max_code+1,tt+1),Na(ke,ke.dyn_ltree,ke.dyn_dtree)),za(ke),qe&&qa(ke)}function Ya(ke,Ae,Ce){return ke.pending_buf[ke.d_buf+2*ke.last_lit]=Ae>>>8&255,ke.pending_buf[ke.d_buf+2*ke.last_lit+1]=255&Ae,ke.pending_buf[ke.l_buf+ke.last_lit]=255&Ce,ke.last_lit++,0===Ae?ke.dyn_ltree[2*Ce]++:(ke.matches++,Ae--,ke.dyn_ltree[2*(Dc[Ce]+256+1)]++,ke.dyn_dtree[2*Da(Ae)]++),ke.last_lit===ke.lit_bufsize-1}function Xa(ke,Ae,Ce,qe){let ze=65535&ke|0,Ve=ke>>>16&65535|0,tt=0;for(;0!==Ce;){tt=Ce>2e3?2e3:Ce,Ce-=tt;do{ze=ze+Ae[qe++]|0,Ve=Ve+ze|0}while(--tt);ze%=65521,Ve%=65521}return ze|Ve<<16|0}const su=function(){let ke;const Ae=[];for(let Ce=0;Ce<256;Ce++){ke=Ce;for(let Ae=0;Ae<8;Ae++)ke=1&ke?3988292384^ke>>>1:ke>>>1;Ae[Ce]=ke}return Ae}();function Ja(ke,Ae,Ce,qe){const ze=su,Ve=qe+Ce;ke^=-1;for(let Ce=qe;Ce<Ve;Ce++)ke=ke>>>8^ze[255&(ke^Ae[Ce])];return-1^ke}var au={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function ts(ke,Ae){return ke.msg=au[Ae],Ae}function rs(ke){return(ke<<1)-(ke>4?9:0)}function is(ke){let Ae=ke.length;for(;--Ae>=0;)ke[Ae]=0}function ns(ke){const Ae=ke.state;let Ce=Ae.pending;Ce>ke.avail_out&&(Ce=ke.avail_out),0!==Ce&&(ac(ke.output,Ae.pending_buf,Ae.pending_out,Ce,ke.next_out),ke.next_out+=Ce,Ae.pending_out+=Ce,ke.total_out+=Ce,ke.avail_out-=Ce,Ae.pending-=Ce,0===Ae.pending&&(Ae.pending_out=0))}function as(ke,Ae){Za(ke,ke.block_start>=0?ke.block_start:-1,ke.strstart-ke.block_start,Ae),ke.block_start=ke.strstart,ns(ke.strm)}function ss(ke,Ae){ke.pending_buf[ke.pending++]=Ae}function os(ke,Ae){ke.pending_buf[ke.pending++]=Ae>>>8&255,ke.pending_buf[ke.pending++]=255&Ae}function cs(ke,Ae,Ce,qe){let ze=ke.avail_in;return ze>qe&&(ze=qe),0===ze?0:(ke.avail_in-=ze,ac(Ae,ke.input,ke.next_in,ze,Ce),1===ke.state.wrap?ke.adler=Xa(ke.adler,Ae,ze,Ce):2===ke.state.wrap&&(ke.adler=Ja(ke.adler,Ae,ze,Ce)),ke.next_in+=ze,ke.total_in+=ze,ze)}function us(ke,Ae){let Ce,qe,ze=ke.max_chain_length,Ve=ke.strstart,tt=ke.prev_length,rt=ke.nice_match;const it=ke.strstart>ke.w_size-262?ke.strstart-(ke.w_size-262):0,nt=ke.window,ot=ke.w_mask,ct=ke.prev,ht=ke.strstart+258;let ft=nt[Ve+tt-1],yt=nt[Ve+tt];ke.prev_length>=ke.good_match&&(ze>>=2),rt>ke.lookahead&&(rt=ke.lookahead);do{if(Ce=Ae,nt[Ce+tt]===yt&&nt[Ce+tt-1]===ft&&nt[Ce]===nt[Ve]&&nt[++Ce]===nt[Ve+1]){Ve+=2,Ce++;do{}while(nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&nt[++Ve]===nt[++Ce]&&Ve<ht);if(qe=258-(ht-Ve),Ve=ht-258,qe>tt){if(ke.match_start=Ae,tt=qe,qe>=rt)break;ft=nt[Ve+tt-1],yt=nt[Ve+tt]}}}while((Ae=ct[Ae&ot])>it&&0!=--ze);return tt<=ke.lookahead?tt:ke.lookahead}function hs(ke){const Ae=ke.w_size;let Ce,qe,ze,Ve,tt;do{if(Ve=ke.window_size-ke.lookahead-ke.strstart,ke.strstart>=Ae+(Ae-262)){ac(ke.window,ke.window,Ae,Ae,0),ke.match_start-=Ae,ke.strstart-=Ae,ke.block_start-=Ae,qe=ke.hash_size,Ce=qe;do{ze=ke.head[--Ce],ke.head[Ce]=ze>=Ae?ze-Ae:0}while(--qe);qe=Ae,Ce=qe;do{ze=ke.prev[--Ce],ke.prev[Ce]=ze>=Ae?ze-Ae:0}while(--qe);Ve+=Ae}if(0===ke.strm.avail_in)break;if(qe=cs(ke.strm,ke.window,ke.strstart+ke.lookahead,Ve),ke.lookahead+=qe,ke.lookahead+ke.insert>=3)for(tt=ke.strstart-ke.insert,ke.ins_h=ke.window[tt],ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[tt+1])&ke.hash_mask;ke.insert&&(ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[tt+3-1])&ke.hash_mask,ke.prev[tt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=tt,tt++,ke.insert--,!(ke.lookahead+ke.insert<3)););}while(ke.lookahead<262&&0!==ke.strm.avail_in)}function fs(ke,Ae){let Ce,qe;for(;;){if(ke.lookahead<262){if(hs(ke),ke.lookahead<262&&0===Ae)return 1;if(0===ke.lookahead)break}if(Ce=0,ke.lookahead>=3&&(ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[ke.strstart+3-1])&ke.hash_mask,Ce=ke.prev[ke.strstart&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=ke.strstart),0!==Ce&&ke.strstart-Ce<=ke.w_size-262&&(ke.match_length=us(ke,Ce)),ke.match_length>=3)if(qe=Ya(ke,ke.strstart-ke.match_start,ke.match_length-3),ke.lookahead-=ke.match_length,ke.match_length<=ke.max_lazy_match&&ke.lookahead>=3){ke.match_length--;do{ke.strstart++,ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[ke.strstart+3-1])&ke.hash_mask,Ce=ke.prev[ke.strstart&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=ke.strstart}while(0!=--ke.match_length);ke.strstart++}else ke.strstart+=ke.match_length,ke.match_length=0,ke.ins_h=ke.window[ke.strstart],ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[ke.strstart+1])&ke.hash_mask;else qe=Ya(ke,0,ke.window[ke.strstart]),ke.lookahead--,ke.strstart++;if(qe&&(as(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=ke.strstart<2?ke.strstart:2,4===Ae?(as(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&(as(ke,!1),0===ke.strm.avail_out)?1:2}function ds(ke,Ae){let Ce,qe,ze;for(;;){if(ke.lookahead<262){if(hs(ke),ke.lookahead<262&&0===Ae)return 1;if(0===ke.lookahead)break}if(Ce=0,ke.lookahead>=3&&(ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[ke.strstart+3-1])&ke.hash_mask,Ce=ke.prev[ke.strstart&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=ke.strstart),ke.prev_length=ke.match_length,ke.prev_match=ke.match_start,ke.match_length=2,0!==Ce&&ke.prev_length<ke.max_lazy_match&&ke.strstart-Ce<=ke.w_size-262&&(ke.match_length=us(ke,Ce),ke.match_length<=5&&(1===ke.strategy||3===ke.match_length&&ke.strstart-ke.match_start>4096)&&(ke.match_length=2)),ke.prev_length>=3&&ke.match_length<=ke.prev_length){ze=ke.strstart+ke.lookahead-3,qe=Ya(ke,ke.strstart-1-ke.prev_match,ke.prev_length-3),ke.lookahead-=ke.prev_length-1,ke.prev_length-=2;do{++ke.strstart<=ze&&(ke.ins_h=(ke.ins_h<<ke.hash_shift^ke.window[ke.strstart+3-1])&ke.hash_mask,Ce=ke.prev[ke.strstart&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=ke.strstart)}while(0!=--ke.prev_length);if(ke.match_available=0,ke.match_length=2,ke.strstart++,qe&&(as(ke,!1),0===ke.strm.avail_out))return 1}else if(ke.match_available){if(qe=Ya(ke,0,ke.window[ke.strstart-1]),qe&&as(ke,!1),ke.strstart++,ke.lookahead--,0===ke.strm.avail_out)return 1}else ke.match_available=1,ke.strstart++,ke.lookahead--}return ke.match_available&&(qe=Ya(ke,0,ke.window[ke.strstart-1]),ke.match_available=0),ke.insert=ke.strstart<2?ke.strstart:2,4===Ae?(as(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&(as(ke,!1),0===ke.strm.avail_out)?1:2}class ls{constructor(ke,Ae,Ce,qe,ze){this.good_length=ke,this.max_lazy=Ae,this.nice_length=Ce,this.max_chain=qe,this.func=ze}}const ou=[new ls(0,0,0,0,(function(ke,Ae){let Ce=65535;for(Ce>ke.pending_buf_size-5&&(Ce=ke.pending_buf_size-5);;){if(ke.lookahead<=1){if(hs(ke),0===ke.lookahead&&0===Ae)return 1;if(0===ke.lookahead)break}ke.strstart+=ke.lookahead,ke.lookahead=0;const qe=ke.block_start+Ce;if((0===ke.strstart||ke.strstart>=qe)&&(ke.lookahead=ke.strstart-qe,ke.strstart=qe,as(ke,!1),0===ke.strm.avail_out))return 1;if(ke.strstart-ke.block_start>=ke.w_size-262&&(as(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=0,4===Ae?(as(ke,!0),0===ke.strm.avail_out?3:4):(ke.strstart>ke.block_start&&(as(ke,!1),ke.strm.avail_out),1)})),new ls(4,4,8,4,fs),new ls(4,5,16,8,fs),new ls(4,6,32,32,fs),new ls(4,4,16,16,ds),new ls(8,16,32,32,ds),new ls(8,16,128,128,ds),new ls(8,32,128,256,ds),new ls(32,128,258,1024,ds),new ls(32,258,258,4096,ds)];class ys{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=8,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 zo(1146),this.dyn_dtree=new zo(122),this.bl_tree=new zo(78),is(this.dyn_ltree),is(this.dyn_dtree),is(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new zo(16),this.heap=new zo(573),is(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new zo(573),is(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 bs(ke){const Ae=function(ke){let Ae;return ke&&ke.state?(ke.total_in=ke.total_out=0,ke.data_type=2,Ae=ke.state,Ae.pending=0,Ae.pending_out=0,Ae.wrap<0&&(Ae.wrap=-Ae.wrap),Ae.status=Ae.wrap?42:113,ke.adler=2===Ae.wrap?0:1,Ae.last_flush=0,Ga(Ae),0):ts(ke,-2)}(ke);return 0===Ae&&function(ke){ke.window_size=2*ke.w_size,is(ke.head),ke.max_lazy_match=ou[ke.level].max_lazy,ke.good_match=ou[ke.level].good_length,ke.nice_match=ou[ke.level].nice_length,ke.max_chain_length=ou[ke.level].max_chain,ke.strstart=0,ke.block_start=0,ke.lookahead=0,ke.insert=0,ke.match_length=ke.prev_length=2,ke.match_available=0,ke.ins_h=0}(ke.state),Ae}function ms(ke,Ae){let Ce,qe,ze,Ve;if(!ke||!ke.state||Ae>5||Ae<0)return ke?ts(ke,-2):-2;if(qe=ke.state,!ke.output||!ke.input&&0!==ke.avail_in||666===qe.status&&4!==Ae)return ts(ke,0===ke.avail_out?-5:-2);if(qe.strm=ke,Ce=qe.last_flush,qe.last_flush=Ae,42===qe.status)if(2===qe.wrap)ke.adler=0,ss(qe,31),ss(qe,139),ss(qe,8),qe.gzhead?(ss(qe,(qe.gzhead.text?1:0)+(qe.gzhead.hcrc?2:0)+(qe.gzhead.extra?4:0)+(qe.gzhead.name?8:0)+(qe.gzhead.comment?16:0)),ss(qe,255&qe.gzhead.time),ss(qe,qe.gzhead.time>>8&255),ss(qe,qe.gzhead.time>>16&255),ss(qe,qe.gzhead.time>>24&255),ss(qe,9===qe.level?2:qe.strategy>=2||qe.level<2?4:0),ss(qe,255&qe.gzhead.os),qe.gzhead.extra&&qe.gzhead.extra.length&&(ss(qe,255&qe.gzhead.extra.length),ss(qe,qe.gzhead.extra.length>>8&255)),qe.gzhead.hcrc&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending,0)),qe.gzindex=0,qe.status=69):(ss(qe,0),ss(qe,0),ss(qe,0),ss(qe,0),ss(qe,0),ss(qe,9===qe.level?2:qe.strategy>=2||qe.level<2?4:0),ss(qe,3),qe.status=113);else{let Ae=8+(qe.w_bits-8<<4)<<8,Ce=-1;Ce=qe.strategy>=2||qe.level<2?0:qe.level<6?1:6===qe.level?2:3,Ae|=Ce<<6,0!==qe.strstart&&(Ae|=32),Ae+=31-Ae%31,qe.status=113,os(qe,Ae),0!==qe.strstart&&(os(qe,ke.adler>>>16),os(qe,65535&ke.adler)),ke.adler=1}if(69===qe.status)if(qe.gzhead.extra){for(ze=qe.pending;qe.gzindex<(65535&qe.gzhead.extra.length)&&(qe.pending!==qe.pending_buf_size||(qe.gzhead.hcrc&&qe.pending>ze&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending-ze,ze)),ns(ke),ze=qe.pending,qe.pending!==qe.pending_buf_size));)ss(qe,255&qe.gzhead.extra[qe.gzindex]),qe.gzindex++;qe.gzhead.hcrc&&qe.pending>ze&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending-ze,ze)),qe.gzindex===qe.gzhead.extra.length&&(qe.gzindex=0,qe.status=73)}else qe.status=73;if(73===qe.status)if(qe.gzhead.name){ze=qe.pending;do{if(qe.pending===qe.pending_buf_size&&(qe.gzhead.hcrc&&qe.pending>ze&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending-ze,ze)),ns(ke),ze=qe.pending,qe.pending===qe.pending_buf_size)){Ve=1;break}Ve=qe.gzindex<qe.gzhead.name.length?255&qe.gzhead.name.charCodeAt(qe.gzindex++):0,ss(qe,Ve)}while(0!==Ve);qe.gzhead.hcrc&&qe.pending>ze&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending-ze,ze)),0===Ve&&(qe.gzindex=0,qe.status=91)}else qe.status=91;if(91===qe.status)if(qe.gzhead.comment){ze=qe.pending;do{if(qe.pending===qe.pending_buf_size&&(qe.gzhead.hcrc&&qe.pending>ze&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending-ze,ze)),ns(ke),ze=qe.pending,qe.pending===qe.pending_buf_size)){Ve=1;break}Ve=qe.gzindex<qe.gzhead.comment.length?255&qe.gzhead.comment.charCodeAt(qe.gzindex++):0,ss(qe,Ve)}while(0!==Ve);qe.gzhead.hcrc&&qe.pending>ze&&(ke.adler=Ja(ke.adler,qe.pending_buf,qe.pending-ze,ze)),0===Ve&&(qe.status=103)}else qe.status=103;if(103===qe.status&&(qe.gzhead.hcrc?(qe.pending+2>qe.pending_buf_size&&ns(ke),qe.pending+2<=qe.pending_buf_size&&(ss(qe,255&ke.adler),ss(qe,ke.adler>>8&255),ke.adler=0,qe.status=113)):qe.status=113),0!==qe.pending){if(ns(ke),0===ke.avail_out)return qe.last_flush=-1,0}else if(0===ke.avail_in&&rs(Ae)<=rs(Ce)&&4!==Ae)return ts(ke,-5);if(666===qe.status&&0!==ke.avail_in)return ts(ke,-5);if(0!==ke.avail_in||0!==qe.lookahead||0!==Ae&&666!==qe.status){var tt=2===qe.strategy?function(ke,Ae){let Ce;for(;;){if(0===ke.lookahead&&(hs(ke),0===ke.lookahead)){if(0===Ae)return 1;break}if(ke.match_length=0,Ce=Ya(ke,0,ke.window[ke.strstart]),ke.lookahead--,ke.strstart++,Ce&&(as(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=0,4===Ae?(as(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&(as(ke,!1),0===ke.strm.avail_out)?1:2}(qe,Ae):3===qe.strategy?function(ke,Ae){let Ce,qe,ze,Ve;const tt=ke.window;for(;;){if(ke.lookahead<=258){if(hs(ke),ke.lookahead<=258&&0===Ae)return 1;if(0===ke.lookahead)break}if(ke.match_length=0,ke.lookahead>=3&&ke.strstart>0&&(ze=ke.strstart-1,qe=tt[ze],qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze])){Ve=ke.strstart+258;do{}while(qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze]&&qe===tt[++ze]&&ze<Ve);ke.match_length=258-(Ve-ze),ke.match_length>ke.lookahead&&(ke.match_length=ke.lookahead)}if(ke.match_length>=3?(Ce=Ya(ke,1,ke.match_length-3),ke.lookahead-=ke.match_length,ke.strstart+=ke.match_length,ke.match_length=0):(Ce=Ya(ke,0,ke.window[ke.strstart]),ke.lookahead--,ke.strstart++),Ce&&(as(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=0,4===Ae?(as(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&(as(ke,!1),0===ke.strm.avail_out)?1:2}(qe,Ae):ou[qe.level].func(qe,Ae);if(3!==tt&&4!==tt||(qe.status=666),1===tt||3===tt)return 0===ke.avail_out&&(qe.last_flush=-1),0;if(2===tt&&(1===Ae?$a(qe):5!==Ae&&(Va(qe,0,0,!1),3===Ae&&(is(qe.head),0===qe.lookahead&&(qe.strstart=0,qe.block_start=0,qe.insert=0))),ns(ke),0===ke.avail_out))return qe.last_flush=-1,0}return 4!==Ae?0:qe.wrap<=0?1:(2===qe.wrap?(ss(qe,255&ke.adler),ss(qe,ke.adler>>8&255),ss(qe,ke.adler>>16&255),ss(qe,ke.adler>>24&255),ss(qe,255&ke.total_in),ss(qe,ke.total_in>>8&255),ss(qe,ke.total_in>>16&255),ss(qe,ke.total_in>>24&255)):(os(qe,ke.adler>>>16),os(qe,65535&ke.adler)),ns(ke),qe.wrap>0&&(qe.wrap=-qe.wrap),0!==qe.pending?0:1)}try{String.fromCharCode.call(null,0)}catch(qe){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(qe){}const cu=new Io(256);for(let ke=0;ke<256;ke++)cu[ke]=ke>=252?6:ke>=248?5:ke>=240?4:ke>=224?3:ke>=192?2:1;function ws(ke){let Ae,Ce,qe,ze,Ve=0;const tt=ke.length;for(qe=0;qe<tt;qe++)Ae=ke.charCodeAt(qe),55296==(64512&Ae)&&qe+1<tt&&(Ce=ke.charCodeAt(qe+1),56320==(64512&Ce)&&(Ae=65536+(Ae-55296<<10)+(Ce-56320),qe++)),Ve+=Ae<128?1:Ae<2048?2:Ae<65536?3:4;const rt=new Io(Ve);for(ze=0,qe=0;ze<Ve;qe++)Ae=ke.charCodeAt(qe),55296==(64512&Ae)&&qe+1<tt&&(Ce=ke.charCodeAt(qe+1),56320==(64512&Ce)&&(Ae=65536+(Ae-55296<<10)+(Ce-56320),qe++)),Ae<128?rt[ze++]=Ae:Ae<2048?(rt[ze++]=192|Ae>>>6,rt[ze++]=128|63&Ae):Ae<65536?(rt[ze++]=224|Ae>>>12,rt[ze++]=128|Ae>>>6&63,rt[ze++]=128|63&Ae):(rt[ze++]=240|Ae>>>18,rt[ze++]=128|Ae>>>12&63,rt[ze++]=128|Ae>>>6&63,rt[ze++]=128|63&Ae);return rt}cu[254]=cu[254]=1;class vs{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 _s{constructor(ke){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...ke||{}};const Ae=this.options;Ae.raw&&Ae.windowBits>0?Ae.windowBits=-Ae.windowBits:Ae.gzip&&Ae.windowBits>0&&Ae.windowBits<16&&(Ae.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new vs,this.strm.avail_out=0;var Ce,qe,ze=function(ke,Ae,Ce,qe,ze,Ve){if(!ke)return-2;let tt=1;if(-1===Ae&&(Ae=6),qe<0?(tt=0,qe=-qe):qe>15&&(tt=2,qe-=16),ze<1||ze>9||8!==Ce||qe<8||qe>15||Ae<0||Ae>9||Ve<0||Ve>4)return ts(ke,-2);8===qe&&(qe=9);const rt=new ys;return ke.state=rt,rt.strm=ke,rt.wrap=tt,rt.gzhead=null,rt.w_bits=qe,rt.w_size=1<<rt.w_bits,rt.w_mask=rt.w_size-1,rt.hash_bits=ze+7,rt.hash_size=1<<rt.hash_bits,rt.hash_mask=rt.hash_size-1,rt.hash_shift=~~((rt.hash_bits+3-1)/3),rt.window=new Io(2*rt.w_size),rt.head=new zo(rt.hash_size),rt.prev=new zo(rt.w_size),rt.lit_bufsize=1<<ze+6,rt.pending_buf_size=4*rt.lit_bufsize,rt.pending_buf=new Io(rt.pending_buf_size),rt.d_buf=1*rt.lit_bufsize,rt.l_buf=3*rt.lit_bufsize,rt.level=Ae,rt.strategy=Ve,rt.method=Ce,bs(ke)}(this.strm,Ae.level,Ae.method,Ae.windowBits,Ae.memLevel,Ae.strategy);if(0!==ze)throw Error(au[ze]);if(Ae.header&&(Ce=this.strm,qe=Ae.header,Ce&&Ce.state&&(2!==Ce.state.wrap||(Ce.state.gzhead=qe))),Ae.dictionary){let ke;if(ke="string"==typeof Ae.dictionary?ws(Ae.dictionary):Ae.dictionary instanceof ArrayBuffer?new Uint8Array(Ae.dictionary):Ae.dictionary,0!==(ze=function(ke,Ae){let Ce,qe,ze,Ve,tt,rt,it,nt,ot=Ae.length;if(!ke||!ke.state)return-2;if(Ce=ke.state,Ve=Ce.wrap,2===Ve||1===Ve&&42!==Ce.status||Ce.lookahead)return-2;for(1===Ve&&(ke.adler=Xa(ke.adler,Ae,ot,0)),Ce.wrap=0,ot>=Ce.w_size&&(0===Ve&&(is(Ce.head),Ce.strstart=0,Ce.block_start=0,Ce.insert=0),nt=new Io(Ce.w_size),ac(nt,Ae,ot-Ce.w_size,Ce.w_size,0),Ae=nt,ot=Ce.w_size),tt=ke.avail_in,rt=ke.next_in,it=ke.input,ke.avail_in=ot,ke.next_in=0,ke.input=Ae,hs(Ce);Ce.lookahead>=3;){qe=Ce.strstart,ze=Ce.lookahead-2;do{Ce.ins_h=(Ce.ins_h<<Ce.hash_shift^Ce.window[qe+3-1])&Ce.hash_mask,Ce.prev[qe&Ce.w_mask]=Ce.head[Ce.ins_h],Ce.head[Ce.ins_h]=qe,qe++}while(--ze);Ce.strstart=qe,Ce.lookahead=2,hs(Ce)}return Ce.strstart+=Ce.lookahead,Ce.block_start=Ce.strstart,Ce.insert=Ce.lookahead,Ce.lookahead=0,Ce.match_length=Ce.prev_length=2,Ce.match_available=0,ke.next_in=rt,ke.input=it,ke.avail_in=tt,Ce.wrap=Ve,0}(this.strm,ke)))throw Error(au[ze]);this._dict_set=!0}}push(ke,Ae){const{strm:Ce,options:{chunkSize:qe}}=this;var ze,Ve;if(this.ended)return!1;Ve=Ae===~~Ae?Ae:!0===Ae?4:0,"string"==typeof ke?Ce.input=ws(ke):ke instanceof ArrayBuffer?Ce.input=new Uint8Array(ke):Ce.input=ke,Ce.next_in=0,Ce.avail_in=Ce.input.length;do{if(0===Ce.avail_out&&(Ce.output=new Io(qe),Ce.next_out=0,Ce.avail_out=qe),1!==(ze=ms(Ce,Ve))&&0!==ze)return this.onEnd(ze),this.ended=!0,!1;0!==Ce.avail_out&&(0!==Ce.avail_in||4!==Ve&&2!==Ve)||this.onData(oa(Ce.output,Ce.next_out))}while((Ce.avail_in>0||0===Ce.avail_out)&&1!==ze);return 4===Ve?(ze=function(ke){let Ae;return ke&&ke.state?(Ae=ke.state.status,42!==Ae&&69!==Ae&&73!==Ae&&91!==Ae&&103!==Ae&&113!==Ae&&666!==Ae?ts(ke,-2):(ke.state=null,113===Ae?ts(ke,-3):0)):-2}(this.strm),this.onEnd(ze),this.ended=!0,0===ze):2!==Ve||(this.onEnd(0),Ce.avail_out=0,!0)}onData(ke){this.chunks.push(ke)}onEnd(ke){0===ke&&(this.result=nc(this.chunks)),this.chunks=[],this.err=ke,this.msg=this.strm.msg}}function ks(ke,Ae){let Ce,qe,ze,Ve,tt,rt,it,nt,ot,ct;const ht=ke.state;Ce=ke.next_in;const ft=ke.input,yt=Ce+(ke.avail_in-5);qe=ke.next_out;const mt=ke.output,kt=qe-(Ae-ke.avail_out),St=qe+(ke.avail_out-257),Et=ht.dmax,Pt=ht.wsize,Dt=ht.whave,Rt=ht.wnext,Bt=ht.window;ze=ht.hold,Ve=ht.bits;const Tt=ht.lencode,Ut=ht.distcode,Kt=(1<<ht.lenbits)-1,It=(1<<ht.distbits)-1;e:do{Ve<15&&(ze+=ft[Ce++]<<Ve,Ve+=8,ze+=ft[Ce++]<<Ve,Ve+=8),tt=Tt[ze&Kt];t:for(;;){if(rt=tt>>>24,ze>>>=rt,Ve-=rt,rt=tt>>>16&255,0===rt)mt[qe++]=65535&tt;else{if(!(16&rt)){if(0==(64&rt)){tt=Tt[(65535&tt)+(ze&(1<<rt)-1)];continue t}if(32&rt){ht.mode=12;break e}ke.msg="invalid literal/length code",ht.mode=30;break e}it=65535&tt,rt&=15,rt&&(Ve<rt&&(ze+=ft[Ce++]<<Ve,Ve+=8),it+=ze&(1<<rt)-1,ze>>>=rt,Ve-=rt),Ve<15&&(ze+=ft[Ce++]<<Ve,Ve+=8,ze+=ft[Ce++]<<Ve,Ve+=8),tt=Ut[ze&It];r:for(;;){if(rt=tt>>>24,ze>>>=rt,Ve-=rt,rt=tt>>>16&255,!(16&rt)){if(0==(64&rt)){tt=Ut[(65535&tt)+(ze&(1<<rt)-1)];continue r}ke.msg="invalid distance code",ht.mode=30;break e}if(nt=65535&tt,rt&=15,Ve<rt&&(ze+=ft[Ce++]<<Ve,Ve+=8,Ve<rt&&(ze+=ft[Ce++]<<Ve,Ve+=8)),nt+=ze&(1<<rt)-1,nt>Et){ke.msg="invalid distance too far back",ht.mode=30;break e}if(ze>>>=rt,Ve-=rt,rt=qe-kt,nt>rt){if(rt=nt-rt,rt>Dt&&ht.sane){ke.msg="invalid distance too far back",ht.mode=30;break e}if(ot=0,ct=Bt,0===Rt){if(ot+=Pt-rt,rt<it){it-=rt;do{mt[qe++]=Bt[ot++]}while(--rt);ot=qe-nt,ct=mt}}else if(Rt<rt){if(ot+=Pt+Rt-rt,rt-=Rt,rt<it){it-=rt;do{mt[qe++]=Bt[ot++]}while(--rt);if(ot=0,Rt<it){rt=Rt,it-=rt;do{mt[qe++]=Bt[ot++]}while(--rt);ot=qe-nt,ct=mt}}}else if(ot+=Rt-rt,rt<it){it-=rt;do{mt[qe++]=Bt[ot++]}while(--rt);ot=qe-nt,ct=mt}for(;it>2;)mt[qe++]=ct[ot++],mt[qe++]=ct[ot++],mt[qe++]=ct[ot++],it-=3;it&&(mt[qe++]=ct[ot++],it>1&&(mt[qe++]=ct[ot++]))}else{ot=qe-nt;do{mt[qe++]=mt[ot++],mt[qe++]=mt[ot++],mt[qe++]=mt[ot++],it-=3}while(it>2);it&&(mt[qe++]=mt[ot++],it>1&&(mt[qe++]=mt[ot++]))}break}}break}}while(Ce<yt&&qe<St);it=Ve>>3,Ce-=it,Ve-=it<<3,ze&=(1<<Ve)-1,ke.next_in=Ce,ke.next_out=qe,ke.avail_in=Ce<yt?yt-Ce+5:5-(Ce-yt),ke.avail_out=qe<St?St-qe+257:257-(qe-St),ht.hold=ze,ht.bits=Ve}const uu=[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],hu=[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],Cu=[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],Du=[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 xs(ke,Ae,Ce,qe,ze,Ve,tt,rt){const it=rt.bits;let nt,ot,ct,ht,ft,yt=0,mt=0,kt=0,St=0,Et=0,Pt=0,Dt=0,Rt=0,Bt=0,Tt=0,Ut=null,Kt=0;const It=new zo(16),Ot=new zo(16);let Nt,qt,zt,Ft=null,Lt=0;for(yt=0;yt<=15;yt++)It[yt]=0;for(mt=0;mt<qe;mt++)It[Ae[Ce+mt]]++;for(Et=it,St=15;St>=1&&0===It[St];St--);if(Et>St&&(Et=St),0===St)return ze[Ve++]=20971520,ze[Ve++]=20971520,rt.bits=1,0;for(kt=1;kt<St&&0===It[kt];kt++);for(Et<kt&&(Et=kt),Rt=1,yt=1;yt<=15;yt++)if(Rt<<=1,Rt-=It[yt],Rt<0)return-1;if(Rt>0&&(0===ke||1!==St))return-1;for(Ot[1]=0,yt=1;yt<15;yt++)Ot[yt+1]=Ot[yt]+It[yt];for(mt=0;mt<qe;mt++)0!==Ae[Ce+mt]&&(tt[Ot[Ae[Ce+mt]]++]=mt);0===ke?(Ut=Ft=tt,ft=19):1===ke?(Ut=uu,Kt-=257,Ft=hu,Lt-=257,ft=256):(Ut=Cu,Ft=Du,ft=-1),Tt=0,mt=0,yt=kt,ht=Ve,Pt=Et,Dt=0,ct=-1,Bt=1<<Et;const Ht=Bt-1;if(1===ke&&Bt>852||2===ke&&Bt>592)return 1;for(;;){Nt=yt-Dt,tt[mt]<ft?(qt=0,zt=tt[mt]):tt[mt]>ft?(qt=Ft[Lt+tt[mt]],zt=Ut[Kt+tt[mt]]):(qt=96,zt=0),nt=1<<yt-Dt,ot=1<<Pt,kt=ot;do{ot-=nt,ze[ht+(Tt>>Dt)+ot]=Nt<<24|qt<<16|zt|0}while(0!==ot);for(nt=1<<yt-1;Tt&nt;)nt>>=1;if(0!==nt?(Tt&=nt-1,Tt+=nt):Tt=0,mt++,0==--It[yt]){if(yt===St)break;yt=Ae[Ce+tt[mt]]}if(yt>Et&&(Tt&Ht)!==ct){for(0===Dt&&(Dt=Et),ht+=kt,Pt=yt-Dt,Rt=1<<Pt;Pt+Dt<St&&(Rt-=It[Pt+Dt],!(Rt<=0));)Pt++,Rt<<=1;if(Bt+=1<<Pt,1===ke&&Bt>852||2===ke&&Bt>592)return 1;ct=Tt&Ht,ze[ct]=Et<<24|Pt<<16|ht-Ve|0}}return 0!==Tt&&(ze[ht+Tt]=yt-Dt<<24|64<<16|0),rt.bits=Et,0}function Ms(ke){return(ke>>>24&255)+(ke>>>8&65280)+((65280&ke)<<8)+((255&ke)<<24)}class Cs{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 zo(320),this.work=new zo(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function Ks(ke){let Ae;return ke&&ke.state?(Ae=ke.state,Ae.wsize=0,Ae.whave=0,Ae.wnext=0,function(ke){let Ae;return ke&&ke.state?(Ae=ke.state,ke.total_in=ke.total_out=Ae.total=0,ke.msg="",Ae.wrap&&(ke.adler=1&Ae.wrap),Ae.mode=1,Ae.last=0,Ae.havedict=0,Ae.dmax=32768,Ae.head=null,Ae.hold=0,Ae.bits=0,Ae.lencode=Ae.lendyn=new ic(852),Ae.distcode=Ae.distdyn=new ic(592),Ae.sane=1,Ae.back=-1,0):-2}(ke)):-2}function Ds(ke,Ae){let Ce,qe;return ke?(qe=new Cs,ke.state=qe,qe.window=null,Ce=function(ke,Ae){let Ce,qe;return ke&&ke.state?(qe=ke.state,Ae<0?(Ce=0,Ae=-Ae):(Ce=1+(Ae>>4),Ae<48&&(Ae&=15)),Ae&&(Ae<8||Ae>15)?-2:(null!==qe.window&&qe.wbits!==Ae&&(qe.window=null),qe.wrap=Ce,qe.wbits=Ae,Ks(ke))):-2}(ke,Ae),0!==Ce&&(ke.state=null),Ce):-2}let Iu,jh,hf=!0;function Bs(ke){if(hf){let Ae;for(Iu=new ic(512),jh=new ic(32),Ae=0;Ae<144;)ke.lens[Ae++]=8;for(;Ae<256;)ke.lens[Ae++]=9;for(;Ae<280;)ke.lens[Ae++]=7;for(;Ae<288;)ke.lens[Ae++]=8;for(xs(1,ke.lens,0,288,Iu,0,ke.work,{bits:9}),Ae=0;Ae<32;)ke.lens[Ae++]=5;xs(2,ke.lens,0,32,jh,0,ke.work,{bits:5}),hf=!1}ke.lencode=Iu,ke.lenbits=9,ke.distcode=jh,ke.distbits=5}function Ts(ke,Ae,Ce,qe){let ze;const Ve=ke.state;return null===Ve.window&&(Ve.wsize=1<<Ve.wbits,Ve.wnext=0,Ve.whave=0,Ve.window=new Io(Ve.wsize)),qe>=Ve.wsize?(ac(Ve.window,Ae,Ce-Ve.wsize,Ve.wsize,0),Ve.wnext=0,Ve.whave=Ve.wsize):(ze=Ve.wsize-Ve.wnext,ze>qe&&(ze=qe),ac(Ve.window,Ae,Ce-qe,ze,Ve.wnext),(qe-=ze)?(ac(Ve.window,Ae,Ce-qe,qe,0),Ve.wnext=qe,Ve.whave=Ve.wsize):(Ve.wnext+=ze,Ve.wnext===Ve.wsize&&(Ve.wnext=0),Ve.whave<Ve.wsize&&(Ve.whave+=ze))),0}function zs(ke,Ae){let Ce,qe,ze,Ve,tt,rt,it,nt,ot,ct,ht,ft,yt,mt,kt,St,Et,Pt,Dt,Rt,Bt,Tt,Ut,Kt,It=0,Ot=new Io(4);const Nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ke||!ke.state||!ke.output||!ke.input&&0!==ke.avail_in)return-2;Ce=ke.state,12===Ce.mode&&(Ce.mode=13),tt=ke.next_out,ze=ke.output,it=ke.avail_out,Ve=ke.next_in,qe=ke.input,rt=ke.avail_in,nt=Ce.hold,ot=Ce.bits,ct=rt,ht=it,Tt=0;e:for(;;)switch(Ce.mode){case 1:if(0===Ce.wrap){Ce.mode=13;break}for(;ot<16;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(2&Ce.wrap&&35615===nt){Ce.check=0,Ot[0]=255&nt,Ot[1]=nt>>>8&255,Ce.check=Ja(Ce.check,Ot,2,0),nt=0,ot=0,Ce.mode=2;break}if(Ce.flags=0,Ce.head&&(Ce.head.done=!1),!(1&Ce.wrap)||(((255&nt)<<8)+(nt>>8))%31){ke.msg="incorrect header check",Ce.mode=30;break}if(8!=(15&nt)){ke.msg="unknown compression method",Ce.mode=30;break}if(nt>>>=4,ot-=4,Bt=8+(15&nt),0===Ce.wbits)Ce.wbits=Bt;else if(Bt>Ce.wbits){ke.msg="invalid window size",Ce.mode=30;break}Ce.dmax=1<<Bt,ke.adler=Ce.check=1,Ce.mode=512&nt?10:12,nt=0,ot=0;break;case 2:for(;ot<16;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(Ce.flags=nt,8!=(255&Ce.flags)){ke.msg="unknown compression method",Ce.mode=30;break}if(57344&Ce.flags){ke.msg="unknown header flags set",Ce.mode=30;break}Ce.head&&(Ce.head.text=nt>>8&1),512&Ce.flags&&(Ot[0]=255&nt,Ot[1]=nt>>>8&255,Ce.check=Ja(Ce.check,Ot,2,0)),nt=0,ot=0,Ce.mode=3;case 3:for(;ot<32;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}Ce.head&&(Ce.head.time=nt),512&Ce.flags&&(Ot[0]=255&nt,Ot[1]=nt>>>8&255,Ot[2]=nt>>>16&255,Ot[3]=nt>>>24&255,Ce.check=Ja(Ce.check,Ot,4,0)),nt=0,ot=0,Ce.mode=4;case 4:for(;ot<16;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}Ce.head&&(Ce.head.xflags=255&nt,Ce.head.os=nt>>8),512&Ce.flags&&(Ot[0]=255&nt,Ot[1]=nt>>>8&255,Ce.check=Ja(Ce.check,Ot,2,0)),nt=0,ot=0,Ce.mode=5;case 5:if(1024&Ce.flags){for(;ot<16;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}Ce.length=nt,Ce.head&&(Ce.head.extra_len=nt),512&Ce.flags&&(Ot[0]=255&nt,Ot[1]=nt>>>8&255,Ce.check=Ja(Ce.check,Ot,2,0)),nt=0,ot=0}else Ce.head&&(Ce.head.extra=null);Ce.mode=6;case 6:if(1024&Ce.flags&&(ft=Ce.length,ft>rt&&(ft=rt),ft&&(Ce.head&&(Bt=Ce.head.extra_len-Ce.length,Ce.head.extra||(Ce.head.extra=Array(Ce.head.extra_len)),ac(Ce.head.extra,qe,Ve,ft,Bt)),512&Ce.flags&&(Ce.check=Ja(Ce.check,qe,ft,Ve)),rt-=ft,Ve+=ft,Ce.length-=ft),Ce.length))break e;Ce.length=0,Ce.mode=7;case 7:if(2048&Ce.flags){if(0===rt)break e;ft=0;do{Bt=qe[Ve+ft++],Ce.head&&Bt&&Ce.length<65536&&(Ce.head.name+=String.fromCharCode(Bt))}while(Bt&&ft<rt);if(512&Ce.flags&&(Ce.check=Ja(Ce.check,qe,ft,Ve)),rt-=ft,Ve+=ft,Bt)break e}else Ce.head&&(Ce.head.name=null);Ce.length=0,Ce.mode=8;case 8:if(4096&Ce.flags){if(0===rt)break e;ft=0;do{Bt=qe[Ve+ft++],Ce.head&&Bt&&Ce.length<65536&&(Ce.head.comment+=String.fromCharCode(Bt))}while(Bt&&ft<rt);if(512&Ce.flags&&(Ce.check=Ja(Ce.check,qe,ft,Ve)),rt-=ft,Ve+=ft,Bt)break e}else Ce.head&&(Ce.head.comment=null);Ce.mode=9;case 9:if(512&Ce.flags){for(;ot<16;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(nt!==(65535&Ce.check)){ke.msg="header crc mismatch",Ce.mode=30;break}nt=0,ot=0}Ce.head&&(Ce.head.hcrc=Ce.flags>>9&1,Ce.head.done=!0),ke.adler=Ce.check=0,Ce.mode=12;break;case 10:for(;ot<32;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}ke.adler=Ce.check=Ms(nt),nt=0,ot=0,Ce.mode=11;case 11:if(0===Ce.havedict)return ke.next_out=tt,ke.avail_out=it,ke.next_in=Ve,ke.avail_in=rt,Ce.hold=nt,Ce.bits=ot,2;ke.adler=Ce.check=1,Ce.mode=12;case 12:if(5===Ae||6===Ae)break e;case 13:if(Ce.last){nt>>>=7&ot,ot-=7&ot,Ce.mode=27;break}for(;ot<3;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}switch(Ce.last=1&nt,nt>>>=1,ot-=1,3&nt){case 0:Ce.mode=14;break;case 1:if(Bs(Ce),Ce.mode=20,6===Ae){nt>>>=2,ot-=2;break e}break;case 2:Ce.mode=17;break;case 3:ke.msg="invalid block type",Ce.mode=30}nt>>>=2,ot-=2;break;case 14:for(nt>>>=7&ot,ot-=7&ot;ot<32;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if((65535&nt)!=(nt>>>16^65535)){ke.msg="invalid stored block lengths",Ce.mode=30;break}if(Ce.length=65535&nt,nt=0,ot=0,Ce.mode=15,6===Ae)break e;case 15:Ce.mode=16;case 16:if(ft=Ce.length,ft){if(ft>rt&&(ft=rt),ft>it&&(ft=it),0===ft)break e;ac(ze,qe,Ve,ft,tt),rt-=ft,Ve+=ft,it-=ft,tt+=ft,Ce.length-=ft;break}Ce.mode=12;break;case 17:for(;ot<14;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(Ce.nlen=257+(31&nt),nt>>>=5,ot-=5,Ce.ndist=1+(31&nt),nt>>>=5,ot-=5,Ce.ncode=4+(15&nt),nt>>>=4,ot-=4,Ce.nlen>286||Ce.ndist>30){ke.msg="too many length or distance symbols",Ce.mode=30;break}Ce.have=0,Ce.mode=18;case 18:for(;Ce.have<Ce.ncode;){for(;ot<3;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}Ce.lens[Nt[Ce.have++]]=7&nt,nt>>>=3,ot-=3}for(;Ce.have<19;)Ce.lens[Nt[Ce.have++]]=0;if(Ce.lencode=Ce.lendyn,Ce.lenbits=7,Ut={bits:Ce.lenbits},Tt=xs(0,Ce.lens,0,19,Ce.lencode,0,Ce.work,Ut),Ce.lenbits=Ut.bits,Tt){ke.msg="invalid code lengths set",Ce.mode=30;break}Ce.have=0,Ce.mode=19;case 19:for(;Ce.have<Ce.nlen+Ce.ndist;){for(;It=Ce.lencode[nt&(1<<Ce.lenbits)-1],kt=It>>>24,St=It>>>16&255,Et=65535&It,!(kt<=ot);){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(Et<16)nt>>>=kt,ot-=kt,Ce.lens[Ce.have++]=Et;else{if(16===Et){for(Kt=kt+2;ot<Kt;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(nt>>>=kt,ot-=kt,0===Ce.have){ke.msg="invalid bit length repeat",Ce.mode=30;break}Bt=Ce.lens[Ce.have-1],ft=3+(3&nt),nt>>>=2,ot-=2}else if(17===Et){for(Kt=kt+3;ot<Kt;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}nt>>>=kt,ot-=kt,Bt=0,ft=3+(7&nt),nt>>>=3,ot-=3}else{for(Kt=kt+7;ot<Kt;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}nt>>>=kt,ot-=kt,Bt=0,ft=11+(127&nt),nt>>>=7,ot-=7}if(Ce.have+ft>Ce.nlen+Ce.ndist){ke.msg="invalid bit length repeat",Ce.mode=30;break}for(;ft--;)Ce.lens[Ce.have++]=Bt}}if(30===Ce.mode)break;if(0===Ce.lens[256]){ke.msg="invalid code -- missing end-of-block",Ce.mode=30;break}if(Ce.lenbits=9,Ut={bits:Ce.lenbits},Tt=xs(1,Ce.lens,0,Ce.nlen,Ce.lencode,0,Ce.work,Ut),Ce.lenbits=Ut.bits,Tt){ke.msg="invalid literal/lengths set",Ce.mode=30;break}if(Ce.distbits=6,Ce.distcode=Ce.distdyn,Ut={bits:Ce.distbits},Tt=xs(2,Ce.lens,Ce.nlen,Ce.ndist,Ce.distcode,0,Ce.work,Ut),Ce.distbits=Ut.bits,Tt){ke.msg="invalid distances set",Ce.mode=30;break}if(Ce.mode=20,6===Ae)break e;case 20:Ce.mode=21;case 21:if(rt>=6&&it>=258){ke.next_out=tt,ke.avail_out=it,ke.next_in=Ve,ke.avail_in=rt,Ce.hold=nt,Ce.bits=ot,ks(ke,ht),tt=ke.next_out,ze=ke.output,it=ke.avail_out,Ve=ke.next_in,qe=ke.input,rt=ke.avail_in,nt=Ce.hold,ot=Ce.bits,12===Ce.mode&&(Ce.back=-1);break}for(Ce.back=0;It=Ce.lencode[nt&(1<<Ce.lenbits)-1],kt=It>>>24,St=It>>>16&255,Et=65535&It,!(kt<=ot);){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(St&&0==(240&St)){for(Pt=kt,Dt=St,Rt=Et;It=Ce.lencode[Rt+((nt&(1<<Pt+Dt)-1)>>Pt)],kt=It>>>24,St=It>>>16&255,Et=65535&It,!(Pt+kt<=ot);){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}nt>>>=Pt,ot-=Pt,Ce.back+=Pt}if(nt>>>=kt,ot-=kt,Ce.back+=kt,Ce.length=Et,0===St){Ce.mode=26;break}if(32&St){Ce.back=-1,Ce.mode=12;break}if(64&St){ke.msg="invalid literal/length code",Ce.mode=30;break}Ce.extra=15&St,Ce.mode=22;case 22:if(Ce.extra){for(Kt=Ce.extra;ot<Kt;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}Ce.length+=nt&(1<<Ce.extra)-1,nt>>>=Ce.extra,ot-=Ce.extra,Ce.back+=Ce.extra}Ce.was=Ce.length,Ce.mode=23;case 23:for(;It=Ce.distcode[nt&(1<<Ce.distbits)-1],kt=It>>>24,St=It>>>16&255,Et=65535&It,!(kt<=ot);){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(0==(240&St)){for(Pt=kt,Dt=St,Rt=Et;It=Ce.distcode[Rt+((nt&(1<<Pt+Dt)-1)>>Pt)],kt=It>>>24,St=It>>>16&255,Et=65535&It,!(Pt+kt<=ot);){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}nt>>>=Pt,ot-=Pt,Ce.back+=Pt}if(nt>>>=kt,ot-=kt,Ce.back+=kt,64&St){ke.msg="invalid distance code",Ce.mode=30;break}Ce.offset=Et,Ce.extra=15&St,Ce.mode=24;case 24:if(Ce.extra){for(Kt=Ce.extra;ot<Kt;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}Ce.offset+=nt&(1<<Ce.extra)-1,nt>>>=Ce.extra,ot-=Ce.extra,Ce.back+=Ce.extra}if(Ce.offset>Ce.dmax){ke.msg="invalid distance too far back",Ce.mode=30;break}Ce.mode=25;case 25:if(0===it)break e;if(ft=ht-it,Ce.offset>ft){if(ft=Ce.offset-ft,ft>Ce.whave&&Ce.sane){ke.msg="invalid distance too far back",Ce.mode=30;break}ft>Ce.wnext?(ft-=Ce.wnext,yt=Ce.wsize-ft):yt=Ce.wnext-ft,ft>Ce.length&&(ft=Ce.length),mt=Ce.window}else mt=ze,yt=tt-Ce.offset,ft=Ce.length;ft>it&&(ft=it),it-=ft,Ce.length-=ft;do{ze[tt++]=mt[yt++]}while(--ft);0===Ce.length&&(Ce.mode=21);break;case 26:if(0===it)break e;ze[tt++]=Ce.length,it--,Ce.mode=21;break;case 27:if(Ce.wrap){for(;ot<32;){if(0===rt)break e;rt--,nt|=qe[Ve++]<<ot,ot+=8}if(ht-=it,ke.total_out+=ht,Ce.total+=ht,ht&&(ke.adler=Ce.check=Ce.flags?Ja(Ce.check,ze,ht,tt-ht):Xa(Ce.check,ze,ht,tt-ht)),ht=it,(Ce.flags?nt:Ms(nt))!==Ce.check){ke.msg="incorrect data check",Ce.mode=30;break}nt=0,ot=0}Ce.mode=28;case 28:if(Ce.wrap&&Ce.flags){for(;ot<32;){if(0===rt)break e;rt--,nt+=qe[Ve++]<<ot,ot+=8}if(nt!==(4294967295&Ce.total)){ke.msg="incorrect length check",Ce.mode=30;break}nt=0,ot=0}Ce.mode=29;case 29:Tt=1;break e;case 30:Tt=-3;break e;case 32:default:return-2}return ke.next_out=tt,ke.avail_out=it,ke.next_in=Ve,ke.avail_in=rt,Ce.hold=nt,Ce.bits=ot,(Ce.wsize||ht!==ke.avail_out&&Ce.mode<30&&(Ce.mode<27||4!==Ae))&&Ts(ke,ke.output,ke.next_out,ht-ke.avail_out),ct-=ke.avail_in,ht-=ke.avail_out,ke.total_in+=ct,ke.total_out+=ht,Ce.total+=ht,Ce.wrap&&ht&&(ke.adler=Ce.check=Ce.flags?Ja(Ce.check,ze,ht,ke.next_out-ht):Xa(Ce.check,ze,ht,ke.next_out-ht)),ke.data_type=Ce.bits+(Ce.last?64:0)+(12===Ce.mode?128:0)+(20===Ce.mode||15===Ce.mode?256:0),(0===ct&&0===ht||4===Ae)&&0===Tt&&(Tt=-5),Tt}function qs(ke,Ae){const Ce=Ae.length;let qe,ze;return ke&&ke.state?(qe=ke.state,0!==qe.wrap&&11!==qe.mode?-2:11===qe.mode&&(ze=1,ze=Xa(ze,Ae,Ce,0),ze!==qe.check)?-3:(Ts(ke,Ae,Ce,Ce),qe.havedict=1,0)):-2}class Os{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 Fs{constructor(ke){this.options={chunkSize:16384,windowBits:0,...ke||{}};const Ae=this.options;Ae.raw&&Ae.windowBits>=0&&Ae.windowBits<16&&(Ae.windowBits=-Ae.windowBits,0===Ae.windowBits&&(Ae.windowBits=-15)),!(Ae.windowBits>=0&&Ae.windowBits<16)||ke&&ke.windowBits||(Ae.windowBits+=32),Ae.windowBits>15&&Ae.windowBits<48&&0==(15&Ae.windowBits)&&(Ae.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new vs,this.strm.avail_out=0;let Ce=Ds(this.strm,Ae.windowBits);if(0!==Ce)throw Error(au[Ce]);if(this.header=new Os,function(ke,Ae){let Ce;ke&&ke.state&&(Ce=ke.state,0==(2&Ce.wrap)||(Ce.head=Ae,Ae.done=!1))}(this.strm,this.header),Ae.dictionary&&("string"==typeof Ae.dictionary?Ae.dictionary=ws(Ae.dictionary):Ae.dictionary instanceof ArrayBuffer&&(Ae.dictionary=new Uint8Array(Ae.dictionary)),Ae.raw&&(Ce=qs(this.strm,Ae.dictionary),0!==Ce)))throw Error(au[Ce])}push(ke,Ae){const{strm:Ce,options:{chunkSize:qe,dictionary:ze}}=this;let Ve,tt,rt=!1;if(this.ended)return!1;tt=Ae===~~Ae?Ae:!0===Ae?4:0,"string"==typeof ke?Ce.input=function(ke){const Ae=new Io(ke.length);for(let Ce=0,qe=Ae.length;Ce<qe;Ce++)Ae[Ce]=ke.charCodeAt(Ce);return Ae}(ke):ke instanceof ArrayBuffer?Ce.input=new Uint8Array(ke):Ce.input=ke,Ce.next_in=0,Ce.avail_in=Ce.input.length;do{if(0===Ce.avail_out&&(Ce.output=new Io(qe),Ce.next_out=0,Ce.avail_out=qe),Ve=zs(Ce,0),2===Ve&&ze&&(Ve=qs(this.strm,ze)),-5===Ve&&!0===rt&&(Ve=0,rt=!1),1!==Ve&&0!==Ve)return this.onEnd(Ve),this.ended=!0,!1;Ce.next_out&&(0!==Ce.avail_out&&1!==Ve&&(0!==Ce.avail_in||4!==tt&&2!==tt)||this.onData(oa(Ce.output,Ce.next_out))),0===Ce.avail_in&&0===Ce.avail_out&&(rt=!0)}while((Ce.avail_in>0||0===Ce.avail_out)&&1!==Ve);return 1===Ve&&(tt=4),4===tt?(Ve=function(ke){if(!ke||!ke.state)return-2;const Ae=ke.state;return Ae.window&&(Ae.window=null),ke.state=null,0}(this.strm),this.onEnd(Ve),this.ended=!0,0===Ve):2!==tt||(this.onEnd(0),Ce.avail_out=0,!0)}onData(ke){this.chunks.push(ke)}onEnd(ke){0===ke&&(this.result=nc(this.chunks)),this.chunks=[],this.err=ke,this.msg=this.strm.msg}}var ff=[0,1,3,7,15,31,63,127,255],js=function(ke){this.stream=ke,this.bitOffset=0,this.curByte=0,this.hasByte=!1};js.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},js.prototype.read=function(ke){for(var Ae=0;ke>0;){this._ensureByte();var Ce=8-this.bitOffset;if(ke>=Ce)Ae<<=Ce,Ae|=ff[Ce]&this.curByte,this.hasByte=!1,this.bitOffset=0,ke-=Ce;else{Ae<<=ke;var qe=Ce-ke;Ae|=(this.curByte&ff[ke]<<qe)>>qe,this.bitOffset+=ke,ke=0}}return Ae},js.prototype.seek=function(ke){var Ae=ke%8,Ce=(ke-Ae)/8;this.bitOffset=Ae,this.stream.seek(Ce),this.hasByte=!1},js.prototype.pi=function(){var ke,Ae=new Uint8Array(6);for(ke=0;ke<Ae.length;ke++)Ae[ke]=this.read(8);return function(ke){return Array.prototype.map.call(ke,(ke=>("00"+ke.toString(16)).slice(-2))).join("")}(Ae)};var tl=js,Ws=function(){};Ws.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Ws.prototype.read=function(ke,Ae,Ce){for(var qe=0;qe<Ce;){var ze=this.readByte();if(ze<0)return 0===qe?-1:qe;ke[Ae++]=ze,qe++}return qe},Ws.prototype.seek=function(ke){throw Error("abstract method seek() not implemented")},Ws.prototype.writeByte=function(ke){throw Error("abstract method readByte() not implemented")},Ws.prototype.write=function(ke,Ae,Ce){var qe;for(qe=0;qe<Ce;qe++)this.writeByte(ke[Ae++]);return Ce},Ws.prototype.flush=function(){};var il,al=Ws,ol=(il=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 ke=4294967295;this.getCRC=function(){return~ke>>>0},this.updateCRC=function(Ae){ke=ke<<8^il[255&(ke>>>24^Ae)]},this.updateCRCRun=function(Ae,Ce){for(;Ce-- >0;)ke=ke<<8^il[255&(ke>>>24^Ae)]}}),$s=function(ke,Ae){var Ce,qe=ke[Ae];for(Ce=Ae;Ce>0;Ce--)ke[Ce]=ke[Ce-1];return ke[0]=qe,qe},cl={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},ul={};ul[cl.LAST_BLOCK]="Bad file checksum",ul[cl.NOT_BZIP_DATA]="Not bzip data",ul[cl.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",ul[cl.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",ul[cl.DATA_ERROR]="Data error",ul[cl.OUT_OF_MEMORY]="Out of memory",ul[cl.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var Xs=function(ke,Ae){var Ce=ul[ke]||"unknown error";Ae&&(Ce+=": "+Ae);var qe=new TypeError(Ce);throw qe.errorCode=ke,qe},Qs=function(ke,Ae){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(ke,Ae)};Qs.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new ol,!0):(this.writeCount=-1,!1)},Qs.prototype._start_bunzip=function(ke,Ae){var Ce=new Uint8Array(4);4===ke.read(Ce,0,4)&&"BZh"===String.fromCharCode(Ce[0],Ce[1],Ce[2])||Xs(cl.NOT_BZIP_DATA,"bad magic");var qe=Ce[3]-48;(qe<1||qe>9)&&Xs(cl.NOT_BZIP_DATA,"level out of range"),this.reader=new tl(ke),this.dbufSize=1e5*qe,this.nextoutput=0,this.outputStream=Ae,this.streamCRC=0},Qs.prototype._get_next_block=function(){var ke,Ae,Ce,qe=this.reader,ze=qe.pi();if("177245385090"===ze)return!1;"314159265359"!==ze&&Xs(cl.NOT_BZIP_DATA),this.targetBlockCRC=qe.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,qe.read(1)&&Xs(cl.OBSOLETE_INPUT);var Ve=qe.read(24);Ve>this.dbufSize&&Xs(cl.DATA_ERROR,"initial position out of bounds");var tt=qe.read(16),rt=new Uint8Array(256),it=0;for(ke=0;ke<16;ke++)if(tt&1<<15-ke){var nt=16*ke;for(Ce=qe.read(16),Ae=0;Ae<16;Ae++)Ce&1<<15-Ae&&(rt[it++]=nt+Ae)}var ot=qe.read(3);(ot<2||ot>6)&&Xs(cl.DATA_ERROR);var ct=qe.read(15);0===ct&&Xs(cl.DATA_ERROR);var ht=new Uint8Array(256);for(ke=0;ke<ot;ke++)ht[ke]=ke;var ft=new Uint8Array(ct);for(ke=0;ke<ct;ke++){for(Ae=0;qe.read(1);Ae++)Ae>=ot&&Xs(cl.DATA_ERROR);ft[ke]=$s(ht,Ae)}var yt,mt=it+2,kt=[];for(Ae=0;Ae<ot;Ae++){var St,Et,Pt=new Uint8Array(mt),Dt=new Uint16Array(21);for(tt=qe.read(5),ke=0;ke<mt;ke++){for(;(tt<1||tt>20)&&Xs(cl.DATA_ERROR),qe.read(1);)qe.read(1)?tt--:tt++;Pt[ke]=tt}for(St=Et=Pt[0],ke=1;ke<mt;ke++)Pt[ke]>Et?Et=Pt[ke]:Pt[ke]<St&&(St=Pt[ke]);yt={},kt.push(yt),yt.permute=new Uint16Array(258),yt.limit=new Uint32Array(22),yt.base=new Uint32Array(21),yt.minLen=St,yt.maxLen=Et;var Rt=0;for(ke=St;ke<=Et;ke++)for(Dt[ke]=yt.limit[ke]=0,tt=0;tt<mt;tt++)Pt[tt]===ke&&(yt.permute[Rt++]=tt);for(ke=0;ke<mt;ke++)Dt[Pt[ke]]++;for(Rt=tt=0,ke=St;ke<Et;ke++)Rt+=Dt[ke],yt.limit[ke]=Rt-1,Rt<<=1,tt+=Dt[ke],yt.base[ke+1]=Rt-tt;yt.limit[Et+1]=Number.MAX_VALUE,yt.limit[Et]=Rt+Dt[Et]-1,yt.base[St]=0}var Bt=new Uint32Array(256);for(ke=0;ke<256;ke++)ht[ke]=ke;var Tt,Ut=0,Kt=0,It=0,Ot=this.dbuf=new Uint32Array(this.dbufSize);for(mt=0;;){for(mt--||(mt=49,It>=ct&&Xs(cl.DATA_ERROR),yt=kt[ft[It++]]),ke=yt.minLen,Ae=qe.read(ke);ke>yt.maxLen&&Xs(cl.DATA_ERROR),!(Ae<=yt.limit[ke]);ke++)Ae=Ae<<1|qe.read(1);((Ae-=yt.base[ke])<0||Ae>=258)&&Xs(cl.DATA_ERROR);var Nt=yt.permute[Ae];if(0!==Nt&&1!==Nt){if(Ut)for(Ut=0,Kt+tt>this.dbufSize&&Xs(cl.DATA_ERROR),Bt[Tt=rt[ht[0]]]+=tt;tt--;)Ot[Kt++]=Tt;if(Nt>it)break;Kt>=this.dbufSize&&Xs(cl.DATA_ERROR),Bt[Tt=rt[Tt=$s(ht,ke=Nt-1)]]++,Ot[Kt++]=Tt}else Ut||(Ut=1,tt=0),tt+=0===Nt?Ut:2*Ut,Ut<<=1}for((Ve<0||Ve>=Kt)&&Xs(cl.DATA_ERROR),Ae=0,ke=0;ke<256;ke++)Ce=Ae+Bt[ke],Bt[ke]=Ae,Ae=Ce;for(ke=0;ke<Kt;ke++)Ot[Bt[Tt=255&Ot[ke]]]|=ke<<8,Bt[Tt]++;var qt=0,zt=0,Ft=0;return Kt&&(zt=255&(qt=Ot[Ve]),qt>>=8,Ft=-1),this.writePos=qt,this.writeCurrent=zt,this.writeCount=Kt,this.writeRun=Ft,!0},Qs.prototype._read_bunzip=function(ke,Ae){var Ce,qe,ze;if(this.writeCount<0)return 0;var Ve=this.dbuf,tt=this.writePos,rt=this.writeCurrent,it=this.writeCount;this.outputsize;for(var nt=this.writeRun;it;){for(it--,qe=rt,rt=255&(tt=Ve[tt]),tt>>=8,3==nt++?(Ce=rt,ze=qe,rt=-1):(Ce=1,ze=rt),this.blockCRC.updateCRCRun(ze,Ce);Ce--;)this.outputStream.writeByte(ze),this.nextoutput++;rt!=qe&&(nt=0)}return this.writeCount=it,this.blockCRC.getCRC()!==this.targetBlockCRC&&Xs(cl.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var Js=function(ke){if("readByte"in ke)return ke;var Ae=new al;return Ae.pos=0,Ae.readByte=function(){return ke[this.pos++]},Ae.seek=function(ke){this.pos=ke},Ae.eof=function(){return this.pos>=ke.length},Ae},eo=function(ke){var Ae=new al,Ce=!0;if(ke)if("number"==typeof ke)Ae.buffer=new Uint8Array(ke),Ce=!1;else{if("writeByte"in ke)return ke;Ae.buffer=ke,Ce=!1}else Ae.buffer=new Uint8Array(16384);return Ae.pos=0,Ae.writeByte=function(ke){if(Ce&&this.pos>=this.buffer.length){var Ae=new Uint8Array(2*this.buffer.length);Ae.set(this.buffer),this.buffer=Ae}this.buffer[this.pos++]=ke},Ae.getBuffer=function(){if(this.pos!==this.buffer.length){if(!Ce)throw new TypeError("outputsize does not match decoded input");var ke=new Uint8Array(this.pos);ke.set(this.buffer.subarray(0,this.pos)),this.buffer=ke}return this.buffer},Ae._coerced=!0,Ae};var to=function(ke,Ae,Ce){for(var qe=Js(ke),ze=eo(Ae),Ve=new Qs(qe,ze);!("eof"in qe)||!qe.eof();)if(Ve._init_block())Ve._read_bunzip();else{var tt=Ve.reader.read(32)>>>0;if(tt!==Ve.streamCRC&&Xs(cl.DATA_ERROR,"Bad stream CRC (got "+Ve.streamCRC.toString(16)+" expected "+tt.toString(16)+")"),!Ce||!("eof"in qe)||qe.eof())break;Ve._start_bunzip(qe,ze)}if("getBuffer"in ze)return ze.getBuffer()};class ro{static get tag(){return er.packet.literalData}constructor(ke=new Date){this.format=er.literal.utf8,this.date=Zt.normalizeDate(ke),this.text=null,this.data=null,this.filename=""}setText(ke,Ae=er.literal.utf8){this.format=Ae,this.text=ke,this.data=null}getText(ke=!1){return(null===this.text||Zt.isStream(this.text))&&(this.text=Zt.decodeUTF8(Zt.nativeEOL(this.getBytes(ke)))),this.text}setBytes(ke,Ae){this.format=Ae,this.data=ke,this.text=null}getBytes(ke=!1){return null===this.data&&(this.data=Zt.canonicalizeEOL(Zt.encodeUTF8(this.text))),ke?ee(this.data):this.data}setFilename(ke){this.filename=ke}getFilename(){return this.filename}async read(ke){await Q(ke,(async ke=>{const Ae=await ke.readByte(),Ce=await ke.readByte();this.filename=Zt.decodeUTF8(await ke.readBytes(Ce)),this.date=Zt.readDate(await ke.readBytes(4));let qe=ke.remainder();_(qe)&&(qe=await ie(qe)),this.setBytes(qe,Ae)}))}writeHeader(){const ke=Zt.encodeUTF8(this.filename),Ae=new Uint8Array([ke.length]),Ce=new Uint8Array([this.format]),qe=Zt.writeDate(this.date);return Zt.concatUint8Array([Ce,Ae,ke,qe])}write(){const ke=this.writeHeader(),Ae=this.getBytes();return Zt.concat([ke,Ae])}}const hl=Symbol("verified"),fl=new Set([er.signatureSubpacket.issuer,er.signatureSubpacket.issuerFingerprint,er.signatureSubpacket.embeddedSignature]);class ao{static get tag(){return er.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 Me,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[hl]=null}read(ke){let Ae=0;if(this.version=ke[Ae++],4!==this.version&&5!==this.version)throw new Ui(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=ke[Ae++],this.publicKeyAlgorithm=ke[Ae++],this.hashAlgorithm=ke[Ae++],Ae+=this.readSubPackets(ke.subarray(Ae,ke.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=ke.subarray(0,Ae),Ae+=this.readSubPackets(ke.subarray(Ae,ke.length),!1),this.signedHashValue=ke.subarray(Ae,Ae+2),Ae+=2,this.params=vo.signature.parseSignatureParams(this.publicKeyAlgorithm,ke.subarray(Ae,ke.length))}writeParams(){return this.params instanceof Promise?ae((async()=>vo.serializeParams(this.publicKeyAlgorithm,await this.params))):vo.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const ke=[];return ke.push(this.signatureData),ke.push(this.writeUnhashedSubPackets()),ke.push(this.signedHashValue),ke.push(this.writeParams()),Zt.concat(ke)}async sign(ke,Ae,Ce=new Date,qe=!1){5===ke.version?this.version=5:this.version=4;const ze=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Zt.normalizeDate(Ce),this.issuerKeyVersion=ke.version,this.issuerFingerprint=ke.getFingerprintBytes(),this.issuerKeyID=ke.getKeyID(),ze.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Zt.concat(ze);const Ve=this.toHash(this.signatureType,Ae,qe),tt=await this.hash(this.signatureType,Ae,Ve,qe);this.signedHashValue=re(J(tt),0,2);const o=async()=>vo.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,ke.publicParams,ke.privateParams,Ve,await ie(tt));Zt.isStream(tt)?this.params=o():(this.params=await o(),this[hl]=!0)}writeHashedSubPackets(){const ke=er.signatureSubpacket,Ae=[];let Ce;if(null===this.created)throw Error("Missing signature creation time");Ae.push(so(ke.signatureCreationTime,Zt.writeDate(this.created))),null!==this.signatureExpirationTime&&Ae.push(so(ke.signatureExpirationTime,Zt.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&Ae.push(so(ke.exportableCertification,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(Ce=new Uint8Array([this.trustLevel,this.trustAmount]),Ae.push(so(ke.trustSignature,Ce))),null!==this.regularExpression&&Ae.push(so(ke.regularExpression,this.regularExpression)),null!==this.revocable&&Ae.push(so(ke.revocable,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&Ae.push(so(ke.keyExpirationTime,Zt.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredSymmetricAlgorithms)),Ae.push(so(ke.preferredSymmetricAlgorithms,Ce))),null!==this.revocationKeyClass&&(Ce=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),Ce=Zt.concat([Ce,this.revocationKeyFingerprint]),Ae.push(so(ke.revocationKey,Ce))),this.issuerKeyID.isNull()||5===this.issuerKeyVersion||Ae.push(so(ke.issuer,this.issuerKeyID.write())),this.rawNotations.forEach((([{name:qe,value:ze,humanReadable:Ve}])=>{Ce=[new Uint8Array([Ve?128:0,0,0,0])],Ce.push(Zt.writeNumber(qe.length,2)),Ce.push(Zt.writeNumber(ze.length,2)),Ce.push(Zt.stringToUint8Array(qe)),Ce.push(ze),Ce=Zt.concat(Ce),Ae.push(so(ke.notationData,Ce))})),null!==this.preferredHashAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredHashAlgorithms)),Ae.push(so(ke.preferredHashAlgorithms,Ce))),null!==this.preferredCompressionAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredCompressionAlgorithms)),Ae.push(so(ke.preferredCompressionAlgorithms,Ce))),null!==this.keyServerPreferences&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.keyServerPreferences)),Ae.push(so(ke.keyServerPreferences,Ce))),null!==this.preferredKeyServer&&Ae.push(so(ke.preferredKeyServer,Zt.stringToUint8Array(this.preferredKeyServer))),null!==this.isPrimaryUserID&&Ae.push(so(ke.primaryUserID,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&Ae.push(so(ke.policyURI,Zt.stringToUint8Array(this.policyURI))),null!==this.keyFlags&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.keyFlags)),Ae.push(so(ke.keyFlags,Ce))),null!==this.signersUserID&&Ae.push(so(ke.signersUserID,Zt.stringToUint8Array(this.signersUserID))),null!==this.reasonForRevocationFlag&&(Ce=Zt.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),Ae.push(so(ke.reasonForRevocation,Ce))),null!==this.features&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.features)),Ae.push(so(ke.features,Ce))),null!==this.signatureTargetPublicKeyAlgorithm&&(Ce=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],Ce.push(Zt.stringToUint8Array(this.signatureTargetHash)),Ce=Zt.concat(Ce),Ae.push(so(ke.signatureTarget,Ce))),null!==this.embeddedSignature&&Ae.push(so(ke.embeddedSignature,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(Ce=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],Ce=Zt.concat(Ce),Ae.push(so(ke.issuerFingerprint,Ce))),null!==this.preferredAEADAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredAEADAlgorithms)),Ae.push(so(ke.preferredAEADAlgorithms,Ce)));const qe=Zt.concat(Ae),ze=Zt.writeNumber(qe.length,2);return Zt.concat([ze,qe])}writeUnhashedSubPackets(){const ke=[];this.unhashedSubpackets.forEach((Ae=>{ke.push(xi(Ae.length)),ke.push(Ae)}));const Ae=Zt.concat(ke),Ce=Zt.writeNumber(Ae.length,2);return Zt.concat([Ce,Ae])}readSubPacket(ke,Ae=!0){let Ce=0;const qe=128&ke[Ce],ze=127&ke[Ce];if(Ae||(this.unhashedSubpackets.push(ke.subarray(Ce,ke.length)),fl.has(ze)))switch(Ce++,ze){case er.signatureSubpacket.signatureCreationTime:this.created=Zt.readDate(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.signatureExpirationTime:{const Ae=Zt.readNumber(ke.subarray(Ce,ke.length));this.signatureNeverExpires=0===Ae,this.signatureExpirationTime=Ae;break}case er.signatureSubpacket.exportableCertification:this.exportable=1===ke[Ce++];break;case er.signatureSubpacket.trustSignature:this.trustLevel=ke[Ce++],this.trustAmount=ke[Ce++];break;case er.signatureSubpacket.regularExpression:this.regularExpression=ke[Ce];break;case er.signatureSubpacket.revocable:this.revocable=1===ke[Ce++];break;case er.signatureSubpacket.keyExpirationTime:{const Ae=Zt.readNumber(ke.subarray(Ce,ke.length));this.keyExpirationTime=Ae,this.keyNeverExpires=0===Ae;break}case er.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...ke.subarray(Ce,ke.length)];break;case er.signatureSubpacket.revocationKey:this.revocationKeyClass=ke[Ce++],this.revocationKeyAlgorithm=ke[Ce++],this.revocationKeyFingerprint=ke.subarray(Ce,Ce+20);break;case er.signatureSubpacket.issuer:this.issuerKeyID.read(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.notationData:{const Ae=!!(128&ke[Ce]);Ce+=4;const ze=Zt.readNumber(ke.subarray(Ce,Ce+2));Ce+=2;const Ve=Zt.readNumber(ke.subarray(Ce,Ce+2));Ce+=2;const tt=Zt.uint8ArrayToString(ke.subarray(Ce,Ce+ze)),rt=ke.subarray(Ce+ze,Ce+ze+Ve);this.rawNotations.push({name:tt,humanReadable:Ae,value:rt,critical:qe}),Ae&&(this.notations[tt]=Zt.uint8ArrayToString(rt));break}case er.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...ke.subarray(Ce,ke.length)];break;case er.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...ke.subarray(Ce,ke.length)];break;case er.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...ke.subarray(Ce,ke.length)];break;case er.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=Zt.uint8ArrayToString(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.primaryUserID:this.isPrimaryUserID=0!==ke[Ce++];break;case er.signatureSubpacket.policyURI:this.policyURI=Zt.uint8ArrayToString(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.keyFlags:this.keyFlags=[...ke.subarray(Ce,ke.length)];break;case er.signatureSubpacket.signersUserID:this.signersUserID=Zt.uint8ArrayToString(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=ke[Ce++],this.reasonForRevocationString=Zt.uint8ArrayToString(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.features:this.features=[...ke.subarray(Ce,ke.length)];break;case er.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=ke[Ce++],this.signatureTargetHashAlgorithm=ke[Ce++];const Ae=vo.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Zt.uint8ArrayToString(ke.subarray(Ce,Ce+Ae));break}case er.signatureSubpacket.embeddedSignature:this.embeddedSignature=new ao,this.embeddedSignature.read(ke.subarray(Ce,ke.length));break;case er.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=ke[Ce++],this.issuerFingerprint=ke.subarray(Ce,ke.length),5===this.issuerKeyVersion?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case er.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...ke.subarray(Ce,ke.length)];break;default:{const ke=Error("Unknown signature subpacket type "+ze);if(qe)throw ke;Zt.printDebug(ke)}}}readSubPackets(ke,Ae=!0,Ce){const qe=Zt.readNumber(ke.subarray(0,2));let ze=2;for(;ze<2+qe;){const qe=Pi(ke.subarray(ze,ke.length));ze+=qe.offset,this.readSubPacket(ke.subarray(ze,ze+qe.len),Ae,Ce),ze+=qe.len}return ze}toSign(ke,Ae){const Ce=er.signature;switch(ke){case Ce.binary:return null!==Ae.text?Zt.encodeUTF8(Ae.getText(!0)):Ae.getBytes(!0);case Ce.text:{const ke=Ae.getBytes(!0);return Zt.canonicalizeEOL(ke)}case Ce.standalone:return new Uint8Array(0);case Ce.certGeneric:case Ce.certPersona:case Ce.certCasual:case Ce.certPositive:case Ce.certRevocation:{let ke,qe;if(Ae.userID)qe=180,ke=Ae.userID;else{if(!Ae.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");qe=209,ke=Ae.userAttribute}const ze=ke.write();return Zt.concat([this.toSign(Ce.key,Ae),new Uint8Array([qe]),Zt.writeNumber(ze.length,4),ze])}case Ce.subkeyBinding:case Ce.subkeyRevocation:case Ce.keyBinding:return Zt.concat([this.toSign(Ce.key,Ae),this.toSign(Ce.key,{key:Ae.bind})]);case Ce.key:if(void 0===Ae.key)throw Error("Key packet is required for this signature.");return Ae.key.writeForHash(this.version);case Ce.keyRevocation:return this.toSign(Ce.key,Ae);case Ce.timestamp:return new Uint8Array(0);case Ce.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(ke,Ae){let Ce=0;return Y(J(this.signatureData),(ke=>{Ce+=ke.length}),(()=>{const qe=[];return 5!==this.version||this.signatureType!==er.signature.binary&&this.signatureType!==er.signature.text||(Ae?qe.push(new Uint8Array(6)):qe.push(ke.writeHeader())),qe.push(new Uint8Array([this.version,255])),5===this.version&&qe.push(new Uint8Array(4)),qe.push(Zt.writeNumber(Ce,4)),Zt.concat(qe)}))}toHash(ke,Ae,Ce=!1){const qe=this.toSign(ke,Ae);return Zt.concat([qe,this.signatureData,this.calculateTrailer(Ae,Ce)])}async hash(ke,Ae,Ce,qe=!1){return Ce||(Ce=this.toHash(ke,Ae,qe)),vo.hash.digest(this.hashAlgorithm,Ce)}async verify(ke,Ae,Ce,qe=new Date,ze=!1,Ve=tr){if(!this.issuerKeyID.equals(ke.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==ke.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const tt=Ae===er.signature.binary||Ae===er.signature.text;if(!(this[hl]&&!tt)){let qe,Ve;if(this.hashed?Ve=await this.hashed:(qe=this.toHash(Ae,Ce,ze),Ve=await this.hash(Ae,Ce,qe)),Ve=await ie(Ve),this.signedHashValue[0]!==Ve[0]||this.signedHashValue[1]!==Ve[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[hl]=await vo.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,ke.publicParams,qe,Ve),!this[hl])throw Error("Signature verification failed")}const rt=Zt.normalizeDate(qe);if(rt&&this.created>rt)throw Error("Signature creation time is in the future");if(rt&&rt>=this.getExpirationTime())throw Error("Signature is expired");if(Ve.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+er.read(er.hash,this.hashAlgorithm).toUpperCase());if(Ve.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[er.signature.binary,er.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+er.read(er.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach((({name:ke,critical:Ae})=>{if(Ae&&Ve.knownNotations.indexOf(ke)<0)throw Error("Unknown critical notation: "+ke)})),null!==this.revocationKeyClass)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(ke=new Date){const Ae=Zt.normalizeDate(ke);return null!==Ae&&!(this.created<=Ae&&Ae<this.getExpirationTime())}getExpirationTime(){return this.signatureNeverExpires?1/0:new Date(this.created.getTime()+1e3*this.signatureExpirationTime)}}function so(ke,Ae){const Ce=[];return Ce.push(xi(Ae.length+1)),Ce.push(new Uint8Array([ke])),Ce.push(Ae),Zt.concat(Ce)}class oo{static get tag(){return er.packet.onePassSignature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.issuerKeyID=null,this.flags=null}read(ke){let Ae=0;if(this.version=ke[Ae++],3!==this.version)throw new Ui(`Version ${this.version} of the one-pass signature packet is unsupported.`);return this.signatureType=ke[Ae++],this.hashAlgorithm=ke[Ae++],this.publicKeyAlgorithm=ke[Ae++],this.issuerKeyID=new Me,this.issuerKeyID.read(ke.subarray(Ae,Ae+8)),Ae+=8,this.flags=ke[Ae++],this}write(){const ke=new Uint8Array([3,this.signatureType,this.hashAlgorithm,this.publicKeyAlgorithm]),Ae=new Uint8Array([this.flags]);return Zt.concatUint8Array([ke,this.issuerKeyID.write(),Ae])}calculateTrailer(...ke){return ae((async()=>ao.prototype.calculateTrailer.apply(await this.correspondingSig,ke)))}async verify(){const ke=await this.correspondingSig;if(!ke||ke.constructor.tag!==er.packet.signature)throw Error("Corresponding signature packet missing");if(ke.signatureType!==this.signatureType||ke.hashAlgorithm!==this.hashAlgorithm||ke.publicKeyAlgorithm!==this.publicKeyAlgorithm||!ke.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return ke.hashed=this.hashed,ke.verify.apply(ke,arguments)}}function co(ke,Ae){if(!Ae[ke]){let Ce;try{Ce=er.read(er.packet,ke)}catch(Ae){throw new Ui("Unknown packet type with tag: "+ke)}throw Error("Packet not allowed in this context: "+Ce)}return new Ae[ke]}oo.prototype.hash=ao.prototype.hash,oo.prototype.toHash=ao.prototype.toHash,oo.prototype.toSign=ao.prototype.toSign;class uo extends Array{static async fromBinary(ke,Ae,Ce=tr){const qe=new uo;return await qe.read(ke,Ae,Ce),qe}async read(ke,Ae,Ce=tr){this.stream=X(ke,(async(ke,qe)=>{const ze=G(qe);try{for(;;){await ze.ready;if(await Ri(ke,(async ke=>{try{if(ke.tag===er.packet.marker||ke.tag===er.packet.trust)return;const qe=co(ke.tag,Ae);qe.packets=new uo,qe.fromStream=Zt.isStream(ke.packet),await qe.read(ke.packet,Ce),await ze.write(qe)}catch(Ae){const qe=!Ce.ignoreUnsupportedPackets&&Ae instanceof Ui,Ve=!(Ce.ignoreMalformedPackets||Ae instanceof Ui);if(qe||Ve||Di(ke.tag))await ze.abort(Ae);else{const Ae=new Ii(ke.tag,ke.packet);await ze.write(Ae)}Zt.printDebugError(Ae)}})))return await ze.ready,void await ze.close()}}catch(ke){await ze.abort(ke)}}));const qe=H(this.stream);for(;;){const{done:ke,value:Ae}=await qe.read();if(ke?this.stream=null:this.push(Ae),ke||Di(Ae.constructor.tag))break}qe.releaseLock()}write(){const ke=[];for(let Ae=0;Ae<this.length;Ae++){const Ce=this[Ae]instanceof Ii?this[Ae].tag:this[Ae].constructor.tag,qe=this[Ae].write();if(Zt.isStream(qe)&&Di(this[Ae].constructor.tag)){let Ae=[],ze=0;const Ve=512;ke.push(Ci(Ce)),ke.push(Y(qe,(ke=>{if(Ae.push(ke),ze+=ke.length,ze>=Ve){const ke=Math.min(Math.log(ze)/Math.LN2|0,30),Ce=2**ke,qe=Zt.concat([Mi(ke)].concat(Ae));return Ae=[qe.subarray(1+Ce)],ze=Ae[0].length,qe.subarray(0,1+Ce)}}),(()=>Zt.concat([xi(ze)].concat(Ae)))))}else{if(Zt.isStream(qe)){let Ae=0;ke.push(Y(J(qe),(ke=>{Ae+=ke.length}),(()=>Ki(Ce,Ae))))}else ke.push(Ki(Ce,qe.length));ke.push(qe)}}return Zt.concat(ke)}filterByTag(...ke){const Ae=new uo,r=ke=>Ae=>ke===Ae;for(let Ce=0;Ce<this.length;Ce++)ke.some(r(this[Ce].constructor.tag))&&Ae.push(this[Ce]);return Ae}findPacket(ke){return this.find((Ae=>Ae.constructor.tag===ke))}indexOfTag(...ke){const Ae=[],Ce=this,i=ke=>Ae=>ke===Ae;for(let qe=0;qe<this.length;qe++)ke.some(i(Ce[qe].constructor.tag))&&Ae.push(qe);return Ae}}const ll=Zt.constructAllowedPackets([ro,oo,ao]);class fo{static get tag(){return er.packet.compressedData}constructor(ke=tr){this.packets=null,this.algorithm=ke.preferredCompressionAlgorithm,this.compressed=null,this.deflateLevel=ke.deflateLevel}async read(ke,Ae=tr){await Q(ke,(async ke=>{this.algorithm=await ke.readByte(),this.compressed=ke.remainder(),await this.decompress(Ae)}))}write(){return null===this.compressed&&this.compress(),Zt.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(ke=tr){const Ae=er.read(er.compression,this.algorithm),Ce=gl[Ae];if(!Ce)throw Error(Ae+" decompression not supported");this.packets=await uo.fromBinary(Ce(this.compressed),ll,ke)}compress(){const ke=er.read(er.compression,this.algorithm),Ae=yl[ke];if(!Ae)throw Error(ke+" compression not supported");this.compressed=Ae(this.packets.write(),this.deflateLevel)}}const dl=Zt.getNodeZlib();function po(ke){return ke}function yo(ke,Ae,Ce={}){return function(qe){return!Zt.isStream(qe)||_(qe)?ae((()=>ie(qe).then((Ae=>new Promise(((qe,ze)=>{ke(Ae,Ce,((ke,Ae)=>{if(ke)return ze(ke);qe(Ae)}))})))))):It(Ot(qe).pipe(Ae(Ce)))}}function bo(ke,Ae={}){return function(Ce){const qe=new ke(Ae);return Y(Ce,(ke=>{if(ke.length)return qe.push(ke,2),qe.result}),(()=>{if(ke===_s)return qe.push([],4),qe.result}))}}function mo(ke){return function(Ae){return ae((async()=>ke(await ie(Ae))))}}const yl=dl?{zip:(ke,Ae)=>yo(dl.deflateRaw,dl.createDeflateRaw,{level:Ae})(ke),zlib:(ke,Ae)=>yo(dl.deflate,dl.createDeflate,{level:Ae})(ke)}:{zip:(ke,Ae)=>bo(_s,{raw:!0,level:Ae})(ke),zlib:(ke,Ae)=>bo(_s,{level:Ae})(ke)},gl=dl?{uncompressed:po,zip:yo(dl.inflateRaw,dl.createInflateRaw),zlib:yo(dl.inflate,dl.createInflate),bzip2:mo(to)}:{uncompressed:po,zip:bo(Fs,{raw:!0}),zlib:bo(Fs),bzip2:mo(to)},bl=Zt.constructAllowedPackets([ro,fo,oo,ao]);class _o{static get tag(){return er.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(ke){await Q(ke,(async ke=>{const Ae=await ke.readByte();if(1!==Ae)throw new Ui(`Version ${Ae} of the SEIP packet is unsupported.`);this.encrypted=ke.remainder()}))}write(){return Zt.concat([new Uint8Array([1]),this.encrypted])}async encrypt(ke,Ae,Ce=tr){const{blockSize:qe}=vo.getCipher(ke);let ze=this.packets.write();_(ze)&&(ze=await ie(ze));const Ve=await vo.getPrefixRandom(ke),tt=new Uint8Array([211,20]),rt=Zt.concat([Ve,ze,tt]),it=await vo.hash.sha1(ee(rt)),nt=Zt.concat([rt,it]);return this.encrypted=await vo.mode.cfb.encrypt(ke,Ae,nt,new Uint8Array(qe),Ce),!0}async decrypt(ke,Ae,Ce=tr){const{blockSize:qe}=vo.getCipher(ke);let ze=J(this.encrypted);_(ze)&&(ze=await ie(ze));const Ve=await vo.mode.cfb.decrypt(ke,Ae,ze,new Uint8Array(qe)),tt=re(ee(Ve),-20),rt=re(Ve,0,-20),it=Promise.all([ie(await vo.hash.sha1(ee(rt))),ie(tt)]).then((([ke,Ae])=>{if(!Zt.equalsUint8Array(ke,Ae))throw Error("Modification detected.");return new Uint8Array})),nt=re(rt,qe+2);let ot=re(nt,0,-2);return ot=W([ot,ae((()=>it))]),Zt.isStream(ze)&&Ce.allowUnauthenticatedStream||(ot=await ie(ot)),this.packets=await uo.fromBinary(ot,bl,Ce),!0}}const vl=Zt.constructAllowedPackets([ro,fo,oo,ao]);class Ao{static get tag(){return er.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=er.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(ke){await Q(ke,(async ke=>{const Ae=await ke.readByte();if(1!==Ae)throw new Ui(`Version ${Ae} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await ke.readByte(),this.aeadAlgorithm=await ke.readByte(),this.chunkSizeByte=await ke.readByte();const Ce=vo.getAEADMode(this.aeadAlgorithm);this.iv=await ke.readBytes(Ce.ivLength),this.encrypted=ke.remainder()}))}write(){return Zt.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(ke,Ae,Ce=tr){this.packets=await uo.fromBinary(await this.crypt("decrypt",Ae,J(this.encrypted)),vl,Ce)}async encrypt(ke,Ae,Ce=tr){this.cipherAlgorithm=ke;const{ivLength:qe}=vo.getAEADMode(this.aeadAlgorithm);this.iv=await vo.random.getRandomBytes(qe),this.chunkSizeByte=Ce.aeadChunkSizeByte;const ze=this.packets.write();this.encrypted=await this.crypt("encrypt",Ae,ze)}async crypt(ke,Ae,Ce){const qe=vo.getAEADMode(this.aeadAlgorithm),ze=await qe(this.cipherAlgorithm,Ae),Ve="decrypt"===ke?qe.tagLength:0,tt="encrypt"===ke?qe.tagLength:0,rt=2**(this.chunkSizeByte+6)+Ve,it=new ArrayBuffer(21),nt=new Uint8Array(it,0,13),ot=new Uint8Array(it),ct=new DataView(it),ht=new Uint8Array(it,5,8);nt.set([192|Ao.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let ft=0,yt=Promise.resolve(),mt=0,kt=0;const St=this.iv;return X(Ce,(async(Ae,Ce)=>{if("array"!==Zt.isStream(Ae)){const ke=new Gt({},{highWaterMark:Zt.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:ke=>ke.length});V(ke.readable,Ce),Ce=ke.writable}const it=H(Ae),Et=G(Ce);try{for(;;){let Ae=await it.readBytes(rt+Ve)||new Uint8Array;const Ce=Ae.subarray(Ae.length-Ve);let Pt,Dt;if(Ae=Ae.subarray(0,Ae.length-Ve),!ft||Ae.length?(it.unshift(Ce),Pt=ze[ke](Ae,qe.getNonce(St,ht),nt),kt+=Ae.length-Ve+tt):(ct.setInt32(17,mt),Pt=ze[ke](Ce,qe.getNonce(St,ht),ot),kt+=tt,Dt=!0),mt+=Ae.length-Ve,yt=yt.then((()=>Pt)).then((async ke=>{await Et.ready,await Et.write(ke),kt-=ke.length})).catch((ke=>Et.abort(ke))),(Dt||kt>Et.desiredSize)&&await yt,Dt){await Et.close();break}ct.setInt32(9,++ft)}}catch(ke){await Et.abort(ke)}}))}}class So{static get tag(){return er.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new Me,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(ke){if(this.version=ke[0],3!==this.version)throw new Ui(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(ke.subarray(1,ke.length)),this.publicKeyAlgorithm=ke[9],this.encrypted=vo.parseEncSessionKeyParams(this.publicKeyAlgorithm,ke.subarray(10))}write(){const ke=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),vo.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return Zt.concatUint8Array(ke)}async encrypt(ke){const Ae=Zt.concatUint8Array([new Uint8Array([er.write(er.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,Zt.writeChecksum(this.sessionKey)]),Ce=er.write(er.publicKey,this.publicKeyAlgorithm);this.encrypted=await vo.publicKeyEncrypt(Ce,ke.publicParams,Ae,ke.getFingerprintBytes())}async decrypt(ke,Ae){if(this.publicKeyAlgorithm!==ke.algorithm)throw Error("Decryption error");const Ce=Ae?Zt.concatUint8Array([new Uint8Array([Ae.sessionKeyAlgorithm]),Ae.sessionKey,Zt.writeChecksum(Ae.sessionKey)]):null,qe=await vo.publicKeyDecrypt(this.publicKeyAlgorithm,ke.publicParams,ke.privateParams,this.encrypted,ke.getFingerprintBytes(),Ce),ze=qe[0],Ve=qe.subarray(1,qe.length-2),tt=qe.subarray(qe.length-2),rt=Zt.writeChecksum(Ve),it=rt[0]===tt[0]&rt[1]===tt[1];if(Ae){const ke=it&ze===Ae.sessionKeyAlgorithm&Ve.length===Ae.sessionKey.length;this.sessionKeyAlgorithm=Zt.selectUint8(ke,ze,Ae.sessionKeyAlgorithm),this.sessionKey=Zt.selectUint8Array(ke,Ve,Ae.sessionKey)}else{if(!(it&&er.read(er.symmetric,ze)))throw Error("Decryption error");this.sessionKey=Ve,this.sessionKeyAlgorithm=ze}}}class Eo{constructor(ke=tr){this.algorithm=er.hash.sha256,this.type="iterated",this.c=ke.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(ke){let Ae=0;switch(this.type=er.read(er.s2k,ke[Ae++]),this.algorithm=ke[Ae++],this.type){case"simple":break;case"salted":this.salt=ke.subarray(Ae,Ae+8),Ae+=8;break;case"iterated":this.salt=ke.subarray(Ae,Ae+8),Ae+=8,this.c=ke[Ae++];break;case"gnu":if("GNU"!==Zt.uint8ArrayToString(ke.subarray(Ae,Ae+3)))throw Error("Unknown s2k type.");Ae+=3;if(1001!==1e3+ke[Ae++])throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return Ae}write(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...Zt.stringToUint8Array("GNU"),1]);const ke=[new Uint8Array([er.write(er.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":ke.push(this.salt);break;case"iterated":ke.push(this.salt),ke.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return Zt.concatUint8Array(ke)}async produceKey(ke,Ae){ke=Zt.encodeUTF8(ke);const Ce=[];let qe=0,ze=0;for(;qe<Ae;){let Ae;switch(this.type){case"simple":Ae=Zt.concatUint8Array([new Uint8Array(ze),ke]);break;case"salted":Ae=Zt.concatUint8Array([new Uint8Array(ze),this.salt,ke]);break;case"iterated":{const Ce=Zt.concatUint8Array([this.salt,ke]);let qe=Ce.length;const Ve=Math.max(this.getCount(),qe);Ae=new Uint8Array(ze+Ve),Ae.set(Ce,ze);for(let ke=ze+qe;ke<Ve;ke+=qe,qe*=2)Ae.copyWithin(ke,ze,ke);break}case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}const Ve=await vo.hash.digest(this.algorithm,Ae);Ce.push(Ve),qe+=Ve.length,ze++}return Zt.concatUint8Array(Ce).subarray(0,Ae)}}class Po{static get tag(){return er.packet.symEncryptedSessionKey}constructor(ke=tr){this.version=ke.aeadProtect?5:4,this.sessionKey=null,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm=er.symmetric.aes256,this.aeadAlgorithm=er.write(er.aead,ke.preferredAEADAlgorithm),this.encrypted=null,this.s2k=null,this.iv=null}read(ke){let Ae=0;if(this.version=ke[Ae++],4!==this.version&&5!==this.version)throw new Ui(`Version ${this.version} of the SKESK packet is unsupported.`);const Ce=ke[Ae++];if(5===this.version&&(this.aeadAlgorithm=ke[Ae++]),this.s2k=new Eo,Ae+=this.s2k.read(ke.subarray(Ae,ke.length)),5===this.version){const Ce=vo.getAEADMode(this.aeadAlgorithm);this.iv=ke.subarray(Ae,Ae+=Ce.ivLength)}5===this.version||Ae<ke.length?(this.encrypted=ke.subarray(Ae,ke.length),this.sessionKeyEncryptionAlgorithm=Ce):this.sessionKeyAlgorithm=Ce}write(){const ke=null===this.encrypted?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm;let Ae;return 5===this.version?Ae=Zt.concatUint8Array([new Uint8Array([this.version,ke,this.aeadAlgorithm]),this.s2k.write(),this.iv,this.encrypted]):(Ae=Zt.concatUint8Array([new Uint8Array([this.version,ke]),this.s2k.write()]),null!==this.encrypted&&(Ae=Zt.concatUint8Array([Ae,this.encrypted]))),Ae}async decrypt(ke){const Ae=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,{blockSize:Ce,keySize:qe}=vo.getCipher(Ae),ze=await this.s2k.produceKey(ke,qe);if(5===this.version){const ke=vo.getAEADMode(this.aeadAlgorithm),Ce=new Uint8Array([192|Po.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),qe=await ke(Ae,ze);this.sessionKey=await qe.decrypt(this.encrypted,this.iv,Ce)}else if(null!==this.encrypted){const ke=await vo.mode.cfb.decrypt(Ae,ze,this.encrypted,new Uint8Array(Ce));this.sessionKeyAlgorithm=er.write(er.symmetric,ke[0]),this.sessionKey=ke.subarray(1,ke.length)}else this.sessionKey=ze}async encrypt(ke,Ae=tr){const Ce=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=Ce,this.s2k=new Eo(Ae),this.s2k.salt=await vo.random.getRandomBytes(8);const{blockSize:qe,keySize:ze}=vo.getCipher(Ce),Ve=await this.s2k.produceKey(ke,ze);if(null===this.sessionKey&&(this.sessionKey=await vo.generateSessionKey(this.sessionKeyAlgorithm)),5===this.version){const ke=vo.getAEADMode(this.aeadAlgorithm);this.iv=await vo.random.getRandomBytes(ke.ivLength);const Ae=new Uint8Array([192|Po.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),qe=await ke(Ce,Ve);this.encrypted=await qe.encrypt(this.sessionKey,this.iv,Ae)}else{const ke=Zt.concatUint8Array([new Uint8Array([this.sessionKeyAlgorithm]),this.sessionKey]);this.encrypted=await vo.mode.cfb.encrypt(Ce,Ve,ke,new Uint8Array(qe),Ae)}}}class xo{static get tag(){return er.packet.publicKey}constructor(ke=new Date,Ae=tr){this.version=Ae.v5Keys?5:4,this.created=Zt.normalizeDate(ke),this.algorithm=null,this.publicParams=null,this.expirationTimeV3=0,this.fingerprint=null,this.keyID=null}static fromSecretKeyPacket(ke){const Ae=new xo,{version:Ce,created:qe,algorithm:ze,publicParams:Ve,keyID:tt,fingerprint:rt}=ke;return Ae.version=Ce,Ae.created=qe,Ae.algorithm=ze,Ae.publicParams=Ve,Ae.keyID=tt,Ae.fingerprint=rt,Ae}async read(ke){let Ae=0;if(this.version=ke[Ae++],4===this.version||5===this.version){this.created=Zt.readDate(ke.subarray(Ae,Ae+4)),Ae+=4,this.algorithm=ke[Ae++],5===this.version&&(Ae+=4);const{read:Ce,publicParams:qe}=vo.parsePublicKeyParams(this.algorithm,ke.subarray(Ae));return this.publicParams=qe,Ae+=Ce,await this.computeFingerprintAndKeyID(),Ae}throw new Ui(`Version ${this.version} of the key packet is unsupported.`)}write(){const ke=[];ke.push(new Uint8Array([this.version])),ke.push(Zt.writeDate(this.created)),ke.push(new Uint8Array([this.algorithm]));const Ae=vo.serializeParams(this.algorithm,this.publicParams);return 5===this.version&&ke.push(Zt.writeNumber(Ae.length,4)),ke.push(Ae),Zt.concatUint8Array(ke)}writeForHash(ke){const Ae=this.writePublicKey();return 5===ke?Zt.concatUint8Array([new Uint8Array([154]),Zt.writeNumber(Ae.length,4),Ae]):Zt.concatUint8Array([new Uint8Array([153]),Zt.writeNumber(Ae.length,2),Ae])}isDecrypted(){return null}getCreationTime(){return this.created}getKeyID(){return this.keyID}async computeFingerprintAndKeyID(){if(await this.computeFingerprint(),this.keyID=new Me,5===this.version)this.keyID.read(this.fingerprint.subarray(0,8));else{if(4!==this.version)throw Error("Unsupported key version");this.keyID.read(this.fingerprint.subarray(12,20))}}async computeFingerprint(){const ke=this.writeForHash(this.version);if(5===this.version)this.fingerprint=await vo.hash.sha256(ke);else{if(4!==this.version)throw Error("Unsupported key version");this.fingerprint=await vo.hash.sha1(ke)}}getFingerprintBytes(){return this.fingerprint}getFingerprint(){return Zt.uint8ArrayToHex(this.getFingerprintBytes())}hasSameFingerprintAs(ke){return this.version===ke.version&&Zt.equalsUint8Array(this.writePublicKey(),ke.writePublicKey())}getAlgorithmInfo(){const ke={};ke.algorithm=er.read(er.publicKey,this.algorithm);const Ae=this.publicParams.n||this.publicParams.p;return Ae?ke.bits=Zt.uint8ArrayBitLength(Ae):ke.curve=this.publicParams.oid.getName(),ke}}xo.prototype.readPublicKey=xo.prototype.read,xo.prototype.writePublicKey=xo.prototype.write;const wl=Zt.constructAllowedPackets([ro,fo,oo,ao]);class Co{static get tag(){return er.packet.symmetricallyEncryptedData}constructor(){this.encrypted=null,this.packets=null}read(ke){this.encrypted=ke}write(){return this.encrypted}async decrypt(ke,Ae,Ce=tr){if(!Ce.allowUnauthenticatedMessages)throw Error("Message is not authenticated.");const{blockSize:qe}=vo.getCipher(ke),ze=await ie(J(this.encrypted)),Ve=await vo.mode.cfb.decrypt(ke,Ae,ze.subarray(qe+2),ze.subarray(2,qe+2));this.packets=await uo.fromBinary(Ve,wl,Ce)}async encrypt(ke,Ae,Ce=tr){const qe=this.packets.write(),{blockSize:ze}=vo.getCipher(ke),Ve=await vo.getPrefixRandom(ke),tt=await vo.mode.cfb.encrypt(ke,Ae,Ve,new Uint8Array(ze),Ce),rt=await vo.mode.cfb.encrypt(ke,Ae,qe,tt.subarray(2),Ce);this.encrypted=Zt.concat([tt,rt])}}class Ko extends xo{static get tag(){return er.packet.publicSubkey}constructor(ke,Ae){super(ke,Ae)}static fromSecretSubkeyPacket(ke){const Ae=new Ko,{version:Ce,created:qe,algorithm:ze,publicParams:Ve,keyID:tt,fingerprint:rt}=ke;return Ae.version=Ce,Ae.created=qe,Ae.algorithm=ze,Ae.publicParams=Ve,Ae.keyID=tt,Ae.fingerprint=rt,Ae}}class Do{static get tag(){return er.packet.userAttribute}constructor(){this.attributes=[]}read(ke){let Ae=0;for(;Ae<ke.length;){const Ce=Pi(ke.subarray(Ae,ke.length));Ae+=Ce.offset,this.attributes.push(Zt.uint8ArrayToString(ke.subarray(Ae,Ae+Ce.len))),Ae+=Ce.len}}write(){const ke=[];for(let Ae=0;Ae<this.attributes.length;Ae++)ke.push(xi(this.attributes[Ae].length)),ke.push(Zt.stringToUint8Array(this.attributes[Ae]));return Zt.concatUint8Array(ke)}equals(ke){return!!(ke&&ke instanceof Do)&&this.attributes.every((function(Ae,Ce){return Ae===ke.attributes[Ce]}))}}class Ro extends xo{static get tag(){return er.packet.secretKey}constructor(ke=new Date,Ae=tr){super(ke,Ae),this.keyMaterial=null,this.isEncrypted=null,this.s2kUsage=0,this.s2k=null,this.symmetric=null,this.aead=null,this.privateParams=null}async read(ke){let Ae=await this.readPublicKey(ke);if(this.s2kUsage=ke[Ae++],5===this.version&&Ae++,255===this.s2kUsage||254===this.s2kUsage||253===this.s2kUsage){if(this.symmetric=ke[Ae++],253===this.s2kUsage&&(this.aead=ke[Ae++]),this.s2k=new Eo,Ae+=this.s2k.read(ke.subarray(Ae,ke.length)),"gnu-dummy"===this.s2k.type)return}else this.s2kUsage&&(this.symmetric=this.s2kUsage);if(this.s2kUsage&&(this.iv=ke.subarray(Ae,Ae+vo.getCipher(this.symmetric).blockSize),Ae+=this.iv.length),5===this.version&&(Ae+=4),this.keyMaterial=ke.subarray(Ae),this.isEncrypted=!!this.s2kUsage,!this.isEncrypted){const Ae=this.keyMaterial.subarray(0,-2);if(!Zt.equalsUint8Array(Zt.writeChecksum(Ae),this.keyMaterial.subarray(-2)))throw Error("Key checksum mismatch");try{const{privateParams:ke}=vo.parsePrivateKeyParams(this.algorithm,Ae,this.publicParams);this.privateParams=ke}catch(ke){if(ke instanceof Ui)throw ke;throw Error("Error reading MPIs")}}}write(){const ke=[this.writePublicKey()];ke.push(new Uint8Array([this.s2kUsage]));const Ae=[];return 255!==this.s2kUsage&&254!==this.s2kUsage&&253!==this.s2kUsage||(Ae.push(this.symmetric),253===this.s2kUsage&&Ae.push(this.aead),Ae.push(...this.s2k.write())),this.s2kUsage&&"gnu-dummy"!==this.s2k.type&&Ae.push(...this.iv),5===this.version&&ke.push(new Uint8Array([Ae.length])),ke.push(new Uint8Array(Ae)),this.isDummy()||(this.s2kUsage||(this.keyMaterial=vo.serializeParams(this.algorithm,this.privateParams)),5===this.version&&ke.push(Zt.writeNumber(this.keyMaterial.length,4)),ke.push(this.keyMaterial),this.s2kUsage||ke.push(Zt.writeChecksum(this.keyMaterial))),Zt.concatUint8Array(ke)}isDecrypted(){return!1===this.isEncrypted}isDummy(){return!(!this.s2k||"gnu-dummy"!==this.s2k.type)}makeDummy(ke=tr){this.isDummy()||(this.isDecrypted()&&this.clearPrivateParams(),this.isEncrypted=null,this.keyMaterial=null,this.s2k=new Eo(ke),this.s2k.algorithm=0,this.s2k.c=0,this.s2k.type="gnu-dummy",this.s2kUsage=254,this.symmetric=er.symmetric.aes256)}async encrypt(ke,Ae=tr){if(this.isDummy())return;if(!this.isDecrypted())throw Error("Key packet is already encrypted");if(!ke)throw Error("A non-empty passphrase is required for key encryption.");this.s2k=new Eo(Ae),this.s2k.salt=await vo.random.getRandomBytes(8);const Ce=vo.serializeParams(this.algorithm,this.privateParams);this.symmetric=er.symmetric.aes256;const qe=await Uo(this.s2k,ke,this.symmetric),{blockSize:ze}=vo.getCipher(this.symmetric);if(this.iv=await vo.random.getRandomBytes(ze),Ae.aeadProtect){this.s2kUsage=253,this.aead=er.aead.eax;const ke=vo.getAEADMode(this.aead),Ae=await ke(this.symmetric,qe);this.keyMaterial=await Ae.encrypt(Ce,this.iv.subarray(0,ke.ivLength),new Uint8Array)}else this.s2kUsage=254,this.keyMaterial=await vo.mode.cfb.encrypt(this.symmetric,qe,Zt.concatUint8Array([Ce,await vo.hash.sha1(Ce,Ae)]),this.iv,Ae)}async decrypt(ke){if(this.isDummy())return!1;if(this.isDecrypted())throw Error("Key packet is already decrypted.");let Ae,Ce;if(254!==this.s2kUsage&&253!==this.s2kUsage)throw 255===this.s2kUsage?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(Ae=await Uo(this.s2k,ke,this.symmetric),253===this.s2kUsage){const qe=vo.getAEADMode(this.aead),ze=await qe(this.symmetric,Ae);try{Ce=await ze.decrypt(this.keyMaterial,this.iv.subarray(0,qe.ivLength),new Uint8Array)}catch(ke){if("Authentication tag mismatch"===ke.message)throw Error("Incorrect key passphrase: "+ke.message);throw ke}}else{const ke=await vo.mode.cfb.decrypt(this.symmetric,Ae,this.keyMaterial,this.iv);Ce=ke.subarray(0,-20);const qe=await vo.hash.sha1(Ce);if(!Zt.equalsUint8Array(qe,ke.subarray(-20)))throw Error("Incorrect key passphrase")}try{const{privateParams:ke}=vo.parsePrivateKeyParams(this.algorithm,Ce,this.publicParams);this.privateParams=ke}catch(ke){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 ke;try{ke=await vo.validateParams(this.algorithm,this.publicParams,this.privateParams)}catch(Ae){ke=!1}if(!ke)throw Error("Key is invalid")}async generate(ke,Ae){const{privateParams:Ce,publicParams:qe}=await vo.generateParams(this.algorithm,ke,Ae);this.privateParams=Ce,this.publicParams=qe,this.isEncrypted=!1}clearPrivateParams(){this.isDummy()||(Object.keys(this.privateParams).forEach((ke=>{this.privateParams[ke].fill(0),delete this.privateParams[ke]})),this.privateParams=null,this.isEncrypted=!0)}}async function Uo(ke,Ae,Ce){const{keySize:qe}=vo.getCipher(Ce);return ke.produceKey(Ae,qe)}var _l=bt((function(ke){!function(Ae){function r(ke){function t(){return Ce<qe}function r(){return Ce}function n(ke){Ce=ke}function a(){Ce=0,qe=Ae.length}function s(ke,Ae){return{name:ke,tokens:Ae||"",semantic:Ae||"",children:[]}}function o(ke,Ae){var Ce;return null===Ae?null:((Ce=s(ke)).tokens=Ae.tokens,Ce.semantic=Ae.semantic,Ce.children.push(Ae),Ce)}function c(ke,Ae){return null!==Ae&&(ke.tokens+=Ae.tokens,ke.semantic+=Ae.semantic),ke.children.push(Ae),ke}function u(ke){var qe;return t()&&ke(qe=Ae[Ce])?(Ce+=1,s("token",qe)):null}function h(ke){return function(){return o("literal",u((function(Ae){return Ae===ke})))}}function f(){var ke=arguments;return function(){var Ae,Ce,qe,ze;for(ze=r(),Ce=s("and"),Ae=0;Ae<ke.length;Ae+=1){if(null===(qe=ke[Ae]()))return n(ze),null;c(Ce,qe)}return Ce}}function d(){var ke=arguments;return function(){var Ae,Ce,qe;for(qe=r(),Ae=0;Ae<ke.length;Ae+=1){if(null!==(Ce=ke[Ae]()))return Ce;n(qe)}return null}}function l(ke){return function(){var Ae,Ce;return Ce=r(),null!==(Ae=ke())?Ae:(n(Ce),s("opt"))}}function p(ke){return function(){var Ae=ke();return null!==Ae&&(Ae.semantic=""),Ae}}function y(ke){return function(){var Ae=ke();return null!==Ae&&Ae.semantic.length>0&&(Ae.semantic=" "),Ae}}function b(ke,Ae){return function(){var Ce,qe,ze,Ve,tt;for(Ve=r(),Ce=s("star"),ze=0,tt=void 0===Ae?0:Ae;null!==(qe=ke());)ze+=1,c(Ce,qe);return ze>=tt?Ce:(n(Ve),null)}}function m(ke){return ke.charCodeAt(0)>=128}function g(){return o("cr",h("\r")())}function w(){return o("crlf",f(g,k)())}function v(){return o("dquote",h('"')())}function _(){return o("htab",h("\t")())}function k(){return o("lf",h("\n")())}function A(){return o("sp",h(" ")())}function S(){return o("vchar",u((function(Ae){var Ce=Ae.charCodeAt(0),qe=33<=Ce&&Ce<=126;return ke.rfc6532&&(qe=qe||m(Ae)),qe})))}function E(){return o("wsp",d(A,_)())}function P(){var ke=o("quoted-pair",d(f(h("\\"),d(S,E)),ie)());return null===ke?null:(ke.semantic=ke.semantic[1],ke)}function x(){return o("fws",d(ae,f(l(f(b(E),p(w))),b(E,1)))())}function M(){return o("ctext",d((function(){return u((function(Ae){var Ce=Ae.charCodeAt(0),qe=33<=Ce&&Ce<=39||42<=Ce&&Ce<=91||93<=Ce&&Ce<=126;return ke.rfc6532&&(qe=qe||m(Ae)),qe}))}),te)())}function C(){return o("ccontent",d(M,P,K)())}function K(){return o("comment",f(h("("),b(f(l(x),C)),l(x),h(")"))())}function D(){return o("cfws",d(f(b(f(l(x),K),1),l(x)),x)())}function R(){return o("atext",u((function(Ae){var Ce="a"<=Ae&&Ae<="z"||"A"<=Ae&&Ae<="Z"||"0"<=Ae&&Ae<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(Ae)>=0;return ke.rfc6532&&(Ce=Ce||m(Ae)),Ce})))}function U(){return o("atom",f(y(l(D)),b(R,1),y(l(D)))())}function I(){var ke,Ae;return null===(ke=o("dot-atom-text",b(R,1)()))||null!==(Ae=b(f(h("."),b(R,1)))())&&c(ke,Ae),ke}function B(){return o("dot-atom",f(p(l(D)),I,p(l(D)))())}function T(){return o("qtext",d((function(){return u((function(Ae){var Ce=Ae.charCodeAt(0),qe=33===Ce||35<=Ce&&Ce<=91||93<=Ce&&Ce<=126;return ke.rfc6532&&(qe=qe||m(Ae)),qe}))}),re)())}function z(){return o("qcontent",d(T,P)())}function q(){return o("quoted-string",f(p(l(D)),p(v),b(f(l(y(x)),z)),l(p(x)),p(v),p(l(D)))())}function O(){return o("word",d(U,q)())}function F(){return o("address",d(N,W)())}function N(){return o("mailbox",d(j,J)())}function j(){return o("name-addr",f(l(H),L)())}function L(){return o("angle-addr",d(f(p(l(D)),h("<"),J,h(">"),p(l(D))),se)())}function W(){return o("group",f(H,h(":"),l($),h(";"),p(l(D)))())}function H(){return o("display-name",(null!==(ke=o("phrase",d(ne,b(O,1))()))&&(ke.semantic=function(ke){return ke.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(ke.semantic)),ke));var ke}function G(){return o("mailbox-list",d(f(N,b(f(h(","),N))),ue)())}function V(){return o("address-list",d(f(F,b(f(h(","),F))),he)())}function $(){return o("group-list",d(G,p(D),fe)())}function Z(){return o("local-part",d(de,B,q)())}function Y(){return o("dtext",d((function(){return u((function(Ae){var Ce=Ae.charCodeAt(0),qe=33<=Ce&&Ce<=90||94<=Ce&&Ce<=126;return ke.rfc6532&&(qe=qe||m(Ae)),qe}))}),pe)())}function X(){return o("domain-literal",f(p(l(D)),h("["),b(f(l(x),Y)),l(x),h("]"),p(l(D)))())}function Q(){return o("domain",(Ae=d(le,B,X)(),ke.rejectTLD&&Ae&&Ae.semantic&&Ae.semantic.indexOf(".")<0?null:(Ae&&(Ae.semantic=Ae.semantic.replace(/\s+/g,"")),Ae)));var Ae}function J(){return o("addr-spec",f(Z,h("@"),Q)())}function ee(){return ke.strict?null:o("obs-NO-WS-CTL",u((function(ke){var Ae=ke.charCodeAt(0);return 1<=Ae&&Ae<=8||11===Ae||12===Ae||14<=Ae&&Ae<=31||127===Ae})))}function te(){return ke.strict?null:o("obs-ctext",ee())}function re(){return ke.strict?null:o("obs-qtext",ee())}function ie(){return ke.strict?null:o("obs-qp",f(h("\\"),d(h("\0"),ee,k,g))())}function ne(){return ke.strict?null:ke.atInDisplayName?o("obs-phrase",f(O,b(d(O,h("."),h("@"),y(D))))()):o("obs-phrase",f(O,b(d(O,h("."),y(D))))())}function ae(){return ke.strict?null:o("obs-FWS",b(f(p(l(w)),E),1)())}function se(){return ke.strict?null:o("obs-angle-addr",f(p(l(D)),h("<"),oe,J,h(">"),p(l(D)))())}function oe(){return ke.strict?null:o("obs-route",f(ce,h(":"))())}function ce(){return ke.strict?null:o("obs-domain-list",f(b(d(p(D),h(","))),h("@"),Q,b(f(h(","),p(l(D)),l(f(h("@"),Q)))))())}function ue(){return ke.strict?null:o("obs-mbox-list",f(b(f(p(l(D)),h(","))),N,b(f(h(","),l(f(N,p(D))))))())}function he(){return ke.strict?null:o("obs-addr-list",f(b(f(p(l(D)),h(","))),F,b(f(h(","),l(f(F,p(D))))))())}function fe(){return ke.strict?null:o("obs-group-list",f(b(f(p(l(D)),h(",")),1),p(l(D)))())}function de(){return ke.strict?null:o("obs-local-part",f(O,b(f(h("."),O)))())}function le(){return ke.strict?null:o("obs-domain",f(U,b(f(h("."),U)))())}function pe(){return ke.strict?null:o("obs-dtext",d(ee,P)())}function ye(ke,Ae){var Ce,qe,ze;if(null==Ae)return null;for(qe=[Ae];qe.length>0;){if((ze=qe.pop()).name===ke)return ze;for(Ce=ze.children.length-1;Ce>=0;Ce-=1)qe.push(ze.children[Ce])}return null}function be(ke,Ae){var Ce,qe,ze,Ve,tt;if(null==Ae)return null;for(qe=[Ae],Ve=[],tt={},Ce=0;Ce<ke.length;Ce+=1)tt[ke[Ce]]=!0;for(;qe.length>0;)if((ze=qe.pop()).name in tt)Ve.push(ze);else for(Ce=ze.children.length-1;Ce>=0;Ce-=1)qe.push(ze.children[Ce]);return Ve}function me(Ae){var Ce,qe,ze,Ve,tt;if(null===Ae)return null;for(Ce=[],qe=be(["group","mailbox"],Ae),ze=0;ze<qe.length;ze+=1)"group"===(Ve=qe[ze]).name?Ce.push(ge(Ve)):"mailbox"===Ve.name&&Ce.push(we(Ve));return tt={ast:Ae,addresses:Ce},ke.simple&&(tt=function(ke){var Ae;if(ke&&ke.addresses)for(Ae=0;Ae<ke.addresses.length;Ae+=1)delete ke.addresses[Ae].node;return ke}(tt)),ke.oneResult?function(Ae){if(!Ae)return null;if(!ke.partial&&Ae.addresses.length>1)return null;return Ae.addresses&&Ae.addresses[0]}(tt):ke.simple?tt&&tt.addresses:tt}function ge(ke){var Ae,Ce=ye("display-name",ke),qe=[],ze=be(["mailbox"],ke);for(Ae=0;Ae<ze.length;Ae+=1)qe.push(we(ze[Ae]));return{node:ke,parts:{name:Ce},type:ke.name,name:ve(Ce),addresses:qe}}function we(ke){var Ae=ye("display-name",ke),Ce=ye("addr-spec",ke),qe=function(ke,Ae){var Ce,qe,ze,Ve;if(null==Ae)return null;for(qe=[Ae],Ve=[];qe.length>0;)for((ze=qe.pop()).name===ke&&Ve.push(ze),Ce=ze.children.length-1;Ce>=0;Ce-=1)qe.push(ze.children[Ce]);return Ve}("cfws",ke),ze=be(["comment"],ke),Ve=ye("local-part",Ce),tt=ye("domain",Ce);return{node:ke,parts:{name:Ae,address:Ce,local:Ve,domain:tt,comments:qe},type:ke.name,name:ve(Ae),address:ve(Ce),local:ve(Ve),domain:ve(tt),comments:_e(ze),groupName:ve(ke.groupName)}}function ve(ke){return null!=ke?ke.semantic:null}function _e(ke){var Ae="";if(ke)for(var Ce=0;Ce<ke.length;Ce+=1)Ae+=ve(ke[Ce]);return Ae}var Ae,Ce,qe,ze,Ve;if(null===(ke=i(ke,{})))return null;if(Ae=ke.input,Ve={address:F,"address-list":V,"angle-addr":L,from:function(){return o("from",d(G,V)())},group:W,mailbox:N,"mailbox-list":G,"reply-to":function(){return o("reply-to",V())},sender:function(){return o("sender",d(N,F)())}}[ke.startAt]||V,!ke.strict){if(a(),ke.strict=!0,ze=Ve(Ae),ke.partial||!t())return me(ze);ke.strict=!1}return a(),ze=Ve(Ae),!ke.partial&&t()?null:me(ze)}function i(ke,Ae){function r(ke){return"[object String]"===Object.prototype.toString.call(ke)}function i(ke){return null==ke}var Ce,qe;if(r(ke))ke={input:ke};else if(!function(ke){return ke===Object(ke)}(ke))return null;if(!r(ke.input))return null;if(!Ae)return null;for(qe in Ce={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1})i(ke[qe])&&(ke[qe]=i(Ae[qe])?Ce[qe]:Ae[qe]);return ke}r.parseOneAddress=function(ke){return r(i(ke,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseAddressList=function(ke){return r(i(ke,{rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseFrom=function(ke){return r(i(ke,{rfc6532:!0,simple:!0,startAt:"from"}))},r.parseSender=function(ke){return r(i(ke,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},r.parseReplyTo=function(ke){return r(i(ke,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},ke.exports=r}()}));class Bo{static get tag(){return er.packet.userID}constructor(){this.userID="",this.name="",this.email="",this.comment=""}static fromObject(ke){if(Zt.isString(ke)||ke.name&&!Zt.isString(ke.name)||ke.email&&!Zt.isEmailAddress(ke.email)||ke.comment&&!Zt.isString(ke.comment))throw Error("Invalid user ID format");const Ae=new Bo;Object.assign(Ae,ke);const Ce=[];return Ae.name&&Ce.push(Ae.name),Ae.comment&&Ce.push(`(${Ae.comment})`),Ae.email&&Ce.push(`<${Ae.email}>`),Ae.userID=Ce.join(" "),Ae}read(ke,Ae=tr){const Ce=Zt.decodeUTF8(ke);if(Ce.length>Ae.maxUserIDLength)throw Error("User ID string is too long");try{const{name:ke,address:Ae,comments:qe}=_l.parseOneAddress({input:Ce,atInDisplayName:!0});this.comment=qe.replace(/^\(|\)$/g,""),this.name=ke,this.email=Ae}catch(ke){}this.userID=Ce}write(){return Zt.encodeUTF8(this.userID)}equals(ke){return ke&&ke.userID===this.userID}}class To extends Ro{static get tag(){return er.packet.secretSubkey}constructor(ke=new Date,Ae=tr){super(ke,Ae)}}const Al=Zt.constructAllowedPackets([ao]);class qo{constructor(ke){this.packets=ke||new uo}write(){return this.packets.write()}armor(ke=tr){return xe(er.armor.signature,this.write(),void 0,void 0,void 0,ke)}getSigningKeyIDs(){return this.packets.map((ke=>ke.issuerKeyID))}}async function Oo(ke,Ae){const Ce=new To(ke.date,Ae);return Ce.packets=null,Ce.algorithm=er.write(er.publicKey,ke.algorithm),await Ce.generate(ke.rsaBits,ke.curve),await Ce.computeFingerprintAndKeyID(),Ce}async function Fo(ke,Ae){const Ce=new Ro(ke.date,Ae);return Ce.packets=null,Ce.algorithm=er.write(er.publicKey,ke.algorithm),await Ce.generate(ke.rsaBits,ke.curve,ke.config),await Ce.computeFingerprintAndKeyID(),Ce}async function No(ke,Ae,Ce,qe,ze=new Date,Ve){let tt,rt;for(let it=ke.length-1;it>=0;it--)try{(!tt||ke[it].created>=tt.created)&&(await ke[it].verify(Ae,Ce,qe,ze,void 0,Ve),tt=ke[it])}catch(ke){rt=ke}if(!tt)throw Zt.wrapError(`Could not find valid ${er.read(er.signature,Ce)} signature in key ${Ae.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,((ke,Ae,Ce)=>Ae+" "+Ce.toLowerCase())),rt);return tt}function jo(ke,Ae,Ce=new Date){const qe=Zt.normalizeDate(Ce);if(null!==qe){const Ce=Zo(ke,Ae);return!(ke.created<=qe&&qe<Ce)}return!1}async function Lo(ke,Ae,Ce,qe){const ze={};ze.key=Ae,ze.bind=ke;const Ve=new ao;return Ve.signatureType=er.signature.subkeyBinding,Ve.publicKeyAlgorithm=Ae.algorithm,Ve.hashAlgorithm=await Wo(null,ke,void 0,void 0,qe),Ce.sign?(Ve.keyFlags=[er.keyFlags.signData],Ve.embeddedSignature=await Go(ze,null,ke,{signatureType:er.signature.keyBinding},Ce.date,void 0,void 0,qe)):Ve.keyFlags=[er.keyFlags.encryptCommunication|er.keyFlags.encryptStorage],Ce.keyExpirationTime>0&&(Ve.keyExpirationTime=Ce.keyExpirationTime,Ve.keyNeverExpires=!1),await Ve.sign(Ae,ze,Ce.date),Ve}async function Wo(ke,Ae,Ce=new Date,qe={},ze){let Ve=ze.preferredHashAlgorithm,tt=Ve;if(ke){const Ae=await ke.getPrimaryUser(Ce,qe,ze);Ae.selfCertification.preferredHashAlgorithms&&([tt]=Ae.selfCertification.preferredHashAlgorithms,Ve=vo.hash.getHashByteLength(Ve)<=vo.hash.getHashByteLength(tt)?tt:Ve)}switch(Object.getPrototypeOf(Ae)){case Ro.prototype:case xo.prototype:case To.prototype:case Ko.prototype:switch(Ae.algorithm){case er.publicKey.ecdh:case er.publicKey.ecdsa:case er.publicKey.eddsa:tt=vo.publicKey.elliptic.getPreferredHashAlgo(Ae.publicParams.oid)}}return vo.hash.getHashByteLength(Ve)<=vo.hash.getHashByteLength(tt)?tt:Ve}async function Ho(ke,Ae=[],Ce=new Date,qe=[],ze=tr){const Ve={symmetric:er.symmetric.aes128,aead:er.aead.eax,compression:er.compression.uncompressed}[ke],tt={symmetric:ze.preferredSymmetricAlgorithm,aead:ze.preferredAEADAlgorithm,compression:ze.preferredCompressionAlgorithm}[ke],rt={symmetric:"preferredSymmetricAlgorithms",aead:"preferredAEADAlgorithms",compression:"preferredCompressionAlgorithms"}[ke];return(await Promise.all(Ae.map((async function(ke,Ae){const Ve=(await ke.getPrimaryUser(Ce,qe[Ae],ze)).selfCertification[rt];return!!Ve&&Ve.indexOf(tt)>=0})))).every(Boolean)?tt:Ve}async function Go(ke,Ae,Ce,qe,ze,Ve,tt=!1,rt){if(Ce.isDummy())throw Error("Cannot sign with a gnu-dummy key.");if(!Ce.isDecrypted())throw Error("Signing key is not decrypted.");const it=new ao;return Object.assign(it,qe),it.publicKeyAlgorithm=Ce.algorithm,it.hashAlgorithm=await Wo(Ae,Ce,ze,Ve,rt),await it.sign(Ce,ke,ze,tt),it}async function Vo(ke,Ae,Ce,qe=new Date,ze){(ke=ke[Ce])&&(Ae[Ce].length?await Promise.all(ke.map((async function(ke){ke.isExpired(qe)||ze&&!await ze(ke)||Ae[Ce].some((function(Ae){return Zt.equalsUint8Array(Ae.writeParams(),ke.writeParams())}))||Ae[Ce].push(ke)}))):Ae[Ce]=ke)}async function $o(ke,Ae,Ce,qe,ze,Ve,tt=new Date,rt){Ve=Ve||ke;const it=[];return await Promise.all(qe.map((async function(ke){try{ze&&!ke.issuerKeyID.equals(ze.issuerKeyID)||(await ke.verify(Ve,Ae,Ce,rt.revocationsExpire?tt:null,!1,rt),it.push(ke.issuerKeyID))}catch(ke){}}))),ze?(ze.revoked=!!it.some((ke=>ke.equals(ze.issuerKeyID)))||(ze.revoked||!1),ze.revoked):it.length>0}function Zo(ke,Ae){let Ce;return!1===Ae.keyNeverExpires&&(Ce=ke.created.getTime()+1e3*Ae.keyExpirationTime),Ce?new Date(Ce):1/0}function Yo(ke,Ae={}){switch(ke.type=ke.type||Ae.type,ke.curve=ke.curve||Ae.curve,ke.rsaBits=ke.rsaBits||Ae.rsaBits,ke.keyExpirationTime=void 0!==ke.keyExpirationTime?ke.keyExpirationTime:Ae.keyExpirationTime,ke.passphrase=Zt.isString(ke.passphrase)?ke.passphrase:Ae.passphrase,ke.date=ke.date||Ae.date,ke.sign=ke.sign||!1,ke.type){case"ecc":try{ke.curve=er.write(er.curve,ke.curve)}catch(ke){throw Error("Unknown curve")}ke.curve!==er.curve.ed25519&&ke.curve!==er.curve.curve25519||(ke.curve=ke.sign?er.curve.ed25519:er.curve.curve25519),ke.sign?ke.algorithm=ke.curve===er.curve.ed25519?er.publicKey.eddsa:er.publicKey.ecdsa:ke.algorithm=er.publicKey.ecdh;break;case"rsa":ke.algorithm=er.publicKey.rsaEncryptSign;break;default:throw Error("Unsupported key type "+ke.type)}return ke}function Xo(ke,Ae){const Ce=ke.algorithm;return Ce!==er.publicKey.rsaEncrypt&&Ce!==er.publicKey.elgamal&&Ce!==er.publicKey.ecdh&&(!Ae.keyFlags||0!=(Ae.keyFlags[0]&er.keyFlags.signData))}function Qo(ke,Ae){const Ce=ke.algorithm;return Ce!==er.publicKey.dsa&&Ce!==er.publicKey.rsaSign&&Ce!==er.publicKey.ecdsa&&Ce!==er.publicKey.eddsa&&(!Ae.keyFlags||0!=(Ae.keyFlags[0]&er.keyFlags.encryptCommunication)||0!=(Ae.keyFlags[0]&er.keyFlags.encryptStorage))}function Jo(ke,Ae){return!!Ae.allowInsecureDecryptionWithSigningKeys||(!ke.keyFlags||0!=(ke.keyFlags[0]&er.keyFlags.encryptCommunication)||0!=(ke.keyFlags[0]&er.keyFlags.encryptStorage))}function ec(ke,Ae){const Ce=er.write(er.publicKey,ke.algorithm),qe=ke.getAlgorithmInfo();if(Ae.rejectPublicKeyAlgorithms.has(Ce))throw Error(qe.algorithm+" keys are considered too weak.");switch(Ce){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:case er.publicKey.rsaEncrypt:if(qe.bits<Ae.minRSABits)throw Error(`RSA keys shorter than ${Ae.minRSABits} bits are considered too weak.`);break;case er.publicKey.ecdsa:case er.publicKey.eddsa:case er.publicKey.ecdh:if(Ae.rejectCurves.has(qe.curve))throw Error(`Support for ${qe.algorithm} keys using curve ${qe.curve} is disabled.`)}}class tc{constructor(ke,Ae){this.userID=ke.constructor.tag===er.packet.userID?ke:null,this.userAttribute=ke.constructor.tag===er.packet.userAttribute?ke:null,this.selfCertifications=[],this.otherCertifications=[],this.revocationSignatures=[],this.mainKey=Ae}toPacketList(){const ke=new uo;return ke.push(this.userID||this.userAttribute),ke.push(...this.revocationSignatures),ke.push(...this.selfCertifications),ke.push(...this.otherCertifications),ke}clone(){const ke=new tc(this.userID||this.userAttribute,this.mainKey);return ke.selfCertifications=[...this.selfCertifications],ke.otherCertifications=[...this.otherCertifications],ke.revocationSignatures=[...this.revocationSignatures],ke}async certify(ke,Ae,Ce){const qe=this.mainKey.keyPacket,ze={userID:this.userID,userAttribute:this.userAttribute,key:qe},Ve=new tc(ze.userID||ze.userAttribute,this.mainKey);return Ve.otherCertifications=await Promise.all(ke.map((async function(ke){if(!ke.isPrivate())throw Error("Need private key for signing");if(ke.hasSameFingerprintAs(qe))throw Error("The user's own key can only be used for self-certifications");const Ve=await ke.getSigningKey(void 0,Ae,void 0,Ce);return Go(ze,ke,Ve.keyPacket,{signatureType:er.signature.certGeneric,keyFlags:[er.keyFlags.certifyKeys|er.keyFlags.signData]},Ae,void 0,void 0,Ce)}))),await Ve.update(this,Ae,Ce),Ve}async isRevoked(ke,Ae,Ce=new Date,qe){const ze=this.mainKey.keyPacket;return $o(ze,er.signature.certRevocation,{key:ze,userID:this.userID,userAttribute:this.userAttribute},this.revocationSignatures,ke,Ae,Ce,qe)}async verifyCertificate(ke,Ae,Ce=new Date,qe){const ze=this,Ve=this.mainKey.keyPacket,tt={userID:this.userID,userAttribute:this.userAttribute,key:Ve},{issuerKeyID:rt}=ke,it=Ae.filter((ke=>ke.getKeys(rt).length>0));return 0===it.length?null:(await Promise.all(it.map((async Ae=>{const Ve=await Ae.getSigningKey(rt,ke.created,void 0,qe);if(ke.revoked||await ze.isRevoked(ke,Ve.keyPacket,Ce,qe))throw Error("User certificate is revoked");try{await ke.verify(Ve.keyPacket,er.signature.certGeneric,tt,Ce,void 0,qe)}catch(ke){throw Zt.wrapError("User certificate is invalid",ke)}}))),!0)}async verifyAllCertifications(ke,Ae=new Date,Ce){const qe=this,ze=this.selfCertifications.concat(this.otherCertifications);return Promise.all(ze.map((async ze=>({keyID:ze.issuerKeyID,valid:await qe.verifyCertificate(ze,ke,Ae,Ce).catch((()=>!1))}))))}async verify(ke=new Date,Ae){if(!this.selfCertifications.length)throw Error("No self-certifications found");const Ce=this,qe=this.mainKey.keyPacket,ze={userID:this.userID,userAttribute:this.userAttribute,key:qe};let Ve;for(let tt=this.selfCertifications.length-1;tt>=0;tt--)try{const Ve=this.selfCertifications[tt];if(Ve.revoked||await Ce.isRevoked(Ve,void 0,ke,Ae))throw Error("Self-certification is revoked");try{await Ve.verify(qe,er.signature.certGeneric,ze,ke,void 0,Ae)}catch(ke){throw Zt.wrapError("Self-certification is invalid",ke)}return!0}catch(ke){Ve=ke}throw Ve}async update(ke,Ae,Ce){const qe=this.mainKey.keyPacket,ze={userID:this.userID,userAttribute:this.userAttribute,key:qe};await Vo(ke,this,"selfCertifications",Ae,(async function(ke){try{return await ke.verify(qe,er.signature.certGeneric,ze,Ae,!1,Ce),!0}catch(ke){return!1}})),await Vo(ke,this,"otherCertifications",Ae),await Vo(ke,this,"revocationSignatures",Ae,(function(ke){return $o(qe,er.signature.certRevocation,ze,[ke],void 0,void 0,Ae,Ce)}))}}class rc{constructor(ke,Ae){this.keyPacket=ke,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=Ae}toPacketList(){const ke=new uo;return ke.push(this.keyPacket),ke.push(...this.revocationSignatures),ke.push(...this.bindingSignatures),ke}clone(){const ke=new rc(this.keyPacket,this.mainKey);return ke.bindingSignatures=[...this.bindingSignatures],ke.revocationSignatures=[...this.revocationSignatures],ke}async isRevoked(ke,Ae,Ce=new Date,qe=tr){const ze=this.mainKey.keyPacket;return $o(ze,er.signature.subkeyRevocation,{key:ze,bind:this.keyPacket},this.revocationSignatures,ke,Ae,Ce,qe)}async verify(ke=new Date,Ae=tr){const Ce=this.mainKey.keyPacket,qe={key:Ce,bind:this.keyPacket},ze=await No(this.bindingSignatures,Ce,er.signature.subkeyBinding,qe,ke,Ae);if(ze.revoked||await this.isRevoked(ze,null,ke,Ae))throw Error("Subkey is revoked");if(jo(this.keyPacket,ze,ke))throw Error("Subkey is expired");return ze}async getExpirationTime(ke=new Date,Ae=tr){const Ce=this.mainKey.keyPacket,qe={key:Ce,bind:this.keyPacket};let ze;try{ze=await No(this.bindingSignatures,Ce,er.signature.subkeyBinding,qe,ke,Ae)}catch(ke){return null}const Ve=Zo(this.keyPacket,ze),tt=ze.getExpirationTime();return Ve<tt?Ve:tt}async update(ke,Ae=new Date,Ce=tr){const qe=this.mainKey.keyPacket;if(!this.hasSameFingerprintAs(ke))throw Error("Subkey update method: fingerprints of subkeys not equal");this.keyPacket.constructor.tag===er.packet.publicSubkey&&ke.keyPacket.constructor.tag===er.packet.secretSubkey&&(this.keyPacket=ke.keyPacket);const ze=this,Ve={key:qe,bind:ze.keyPacket};await Vo(ke,this,"bindingSignatures",Ae,(async function(ke){for(let Ae=0;Ae<ze.bindingSignatures.length;Ae++)if(ze.bindingSignatures[Ae].issuerKeyID.equals(ke.issuerKeyID))return ke.created>ze.bindingSignatures[Ae].created&&(ze.bindingSignatures[Ae]=ke),!1;try{return await ke.verify(qe,er.signature.subkeyBinding,Ve,Ae,void 0,Ce),!0}catch(ke){return!1}})),await Vo(ke,this,"revocationSignatures",Ae,(function(ke){return $o(qe,er.signature.subkeyRevocation,Ve,[ke],void 0,void 0,Ae,Ce)}))}async revoke(ke,{flag:Ae=er.reasonForRevocation.noReason,string:Ce=""}={},qe=new Date,ze=tr){const Ve={key:ke,bind:this.keyPacket},tt=new rc(this.keyPacket,this.mainKey);return tt.revocationSignatures.push(await Go(Ve,null,ke,{signatureType:er.signature.subkeyRevocation,reasonForRevocationFlag:er.write(er.reasonForRevocation,Ae),reasonForRevocationString:Ce},qe,void 0,!1,ze)),await tt.update(this),tt}hasSameFingerprintAs(ke){return this.keyPacket.hasSameFingerprintAs(ke.keyPacket||ke)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((ke=>{rc.prototype[ke]=function(){return this.keyPacket[ke]()}}));const Sl=Zt.constructAllowedPackets([ao]),Pl=new Set([er.packet.publicKey,er.packet.privateKey]),xl=new Set([er.packet.publicKey,er.packet.privateKey,er.packet.publicSubkey,er.packet.privateSubkey]);class sc{packetListToStructure(ke,Ae=new Set){let Ce,qe,ze,Ve;for(const tt of ke){if(tt instanceof Ii){xl.has(tt.tag)&&!Ve&&(Ve=Pl.has(tt.tag)?Pl:xl);continue}const ke=tt.constructor.tag;if(Ve){if(!Ve.has(ke))continue;Ve=null}if(Ae.has(ke))throw Error("Unexpected packet type: "+ke);switch(ke){case er.packet.publicKey:case er.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=tt,qe=this.getKeyID(),!qe)throw Error("Missing Key ID");break;case er.packet.userID:case er.packet.userAttribute:Ce=new tc(tt,this),this.users.push(Ce);break;case er.packet.publicSubkey:case er.packet.secretSubkey:Ce=null,ze=new rc(tt,this),this.subkeys.push(ze);break;case er.packet.signature:switch(tt.signatureType){case er.signature.certGeneric:case er.signature.certPersona:case er.signature.certCasual:case er.signature.certPositive:if(!Ce){Zt.printDebug("Dropping certification signatures without preceding user packet");continue}tt.issuerKeyID.equals(qe)?Ce.selfCertifications.push(tt):Ce.otherCertifications.push(tt);break;case er.signature.certRevocation:Ce?Ce.revocationSignatures.push(tt):this.directSignatures.push(tt);break;case er.signature.key:this.directSignatures.push(tt);break;case er.signature.subkeyBinding:if(!ze){Zt.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}ze.bindingSignatures.push(tt);break;case er.signature.keyRevocation:this.revocationSignatures.push(tt);break;case er.signature.subkeyRevocation:if(!ze){Zt.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}ze.revocationSignatures.push(tt)}}}}toPacketList(){const ke=new uo;return ke.push(this.keyPacket),ke.push(...this.revocationSignatures),ke.push(...this.directSignatures),this.users.map((Ae=>ke.push(...Ae.toPacketList()))),this.subkeys.map((Ae=>ke.push(...Ae.toPacketList()))),ke}clone(ke=!1){const Ae=new this.constructor(this.toPacketList());return ke&&Ae.getKeys().forEach((ke=>{if(ke.keyPacket=Object.create(Object.getPrototypeOf(ke.keyPacket),Object.getOwnPropertyDescriptors(ke.keyPacket)),!ke.keyPacket.isDecrypted())return;const Ae={};Object.keys(ke.keyPacket.privateParams).forEach((Ce=>{Ae[Ce]=new Uint8Array(ke.keyPacket.privateParams[Ce])})),ke.keyPacket.privateParams=Ae})),Ae}getSubkeys(ke=null){return this.subkeys.filter((Ae=>!ke||Ae.getKeyID().equals(ke,!0)))}getKeys(ke=null){const Ae=[];return ke&&!this.getKeyID().equals(ke,!0)||Ae.push(this),Ae.concat(this.getSubkeys(ke))}getKeyIDs(){return this.getKeys().map((ke=>ke.getKeyID()))}getUserIDs(){return this.users.map((ke=>ke.userID?ke.userID.userID:null)).filter((ke=>null!==ke))}write(){return this.toPacketList().write()}async getSigningKey(ke=null,Ae=new Date,Ce={},qe=tr){await this.verifyPrimaryKey(Ae,Ce,qe);const ze=this.keyPacket,Ve=this.subkeys.slice().sort(((ke,Ae)=>Ae.keyPacket.created-ke.keyPacket.created));let tt;for(const Ce of Ve)if(!ke||Ce.getKeyID().equals(ke))try{await Ce.verify(Ae,qe);const ke={key:ze,bind:Ce.keyPacket},Ve=await No(Ce.bindingSignatures,ze,er.signature.subkeyBinding,ke,Ae,qe);if(!Xo(Ce.keyPacket,Ve))continue;if(!Ve.embeddedSignature)throw Error("Missing embedded signature");return await No([Ve.embeddedSignature],Ce.keyPacket,er.signature.keyBinding,ke,Ae,qe),ec(Ce.keyPacket,qe),Ce}catch(ke){tt=ke}try{const Ve=await this.getPrimaryUser(Ae,Ce,qe);if((!ke||ze.getKeyID().equals(ke))&&Xo(ze,Ve.selfCertification))return ec(ze,qe),this}catch(ke){tt=ke}throw Zt.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),tt)}async getEncryptionKey(ke,Ae=new Date,Ce={},qe=tr){await this.verifyPrimaryKey(Ae,Ce,qe);const ze=this.keyPacket,Ve=this.subkeys.slice().sort(((ke,Ae)=>Ae.keyPacket.created-ke.keyPacket.created));let tt;for(const Ce of Ve)if(!ke||Ce.getKeyID().equals(ke))try{await Ce.verify(Ae,qe);const ke={key:ze,bind:Ce.keyPacket},Ve=await No(Ce.bindingSignatures,ze,er.signature.subkeyBinding,ke,Ae,qe);if(Qo(Ce.keyPacket,Ve))return ec(Ce.keyPacket,qe),Ce}catch(ke){tt=ke}try{const Ve=await this.getPrimaryUser(Ae,Ce,qe);if((!ke||ze.getKeyID().equals(ke))&&Qo(ze,Ve.selfCertification))return ec(ze,qe),this}catch(ke){tt=ke}throw Zt.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),tt)}async isRevoked(ke,Ae,Ce=new Date,qe=tr){return $o(this.keyPacket,er.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,ke,Ae,Ce,qe)}async verifyPrimaryKey(ke=new Date,Ae={},Ce=tr){const qe=this.keyPacket;if(await this.isRevoked(null,null,ke,Ce))throw Error("Primary key is revoked");const{selfCertification:ze}=await this.getPrimaryUser(ke,Ae,Ce);if(jo(qe,ze,ke))throw Error("Primary key is expired");const Ve=await No(this.directSignatures,qe,er.signature.key,{key:qe},ke,Ce).catch((()=>{}));if(Ve&&jo(qe,Ve,ke))throw Error("Primary key is expired")}async getExpirationTime(ke,Ae=tr){let Ce;try{const{selfCertification:qe}=await this.getPrimaryUser(null,ke,Ae),ze=Zo(this.keyPacket,qe),Ve=qe.getExpirationTime(),tt=await No(this.directSignatures,this.keyPacket,er.signature.key,{key:this.keyPacket},null,Ae).catch((()=>{}));if(tt){const ke=Zo(this.keyPacket,tt);Ce=Math.min(ze,Ve,ke)}else Ce=ze<Ve?ze:Ve}catch(ke){Ce=null}return Zt.normalizeDate(Ce)}async getPrimaryUser(ke=new Date,Ae={},Ce=tr){const qe=this.keyPacket,ze=[];let Ve;for(let tt=0;tt<this.users.length;tt++)try{const Ve=this.users[tt];if(!Ve.userID)continue;if(void 0!==Ae.name&&Ve.userID.name!==Ae.name||void 0!==Ae.email&&Ve.userID.email!==Ae.email||void 0!==Ae.comment&&Ve.userID.comment!==Ae.comment)throw Error("Could not find user that matches that user ID");const rt={userID:Ve.userID,key:qe},it=await No(Ve.selfCertifications,qe,er.signature.certGeneric,rt,ke,Ce);ze.push({index:tt,user:Ve,selfCertification:it})}catch(ke){Ve=ke}if(!ze.length)throw Ve||Error("Could not find primary user");await Promise.all(ze.map((async function(Ae){return Ae.user.revoked||Ae.user.isRevoked(Ae.selfCertification,null,ke,Ce)})));const tt=ze.sort((function(ke,Ae){const Ce=ke.selfCertification,qe=Ae.selfCertification;return qe.revoked-Ce.revoked||Ce.isPrimaryUserID-qe.isPrimaryUserID||Ce.created-qe.created})).pop(),{user:rt,selfCertification:it}=tt;if(it.revoked||await rt.isRevoked(it,null,ke,Ce))throw Error("Primary user is revoked");return tt}async update(ke,Ae=new Date,Ce=tr){if(!this.hasSameFingerprintAs(ke))throw Error("Primary key fingerprints must be equal to update the key");if(!this.isPrivate()&&ke.isPrivate()){if(!(this.subkeys.length===ke.subkeys.length&&this.subkeys.every((Ae=>ke.subkeys.some((ke=>Ae.hasSameFingerprintAs(ke)))))))throw Error("Cannot update public key with private key if subkeys mismatch");return ke.update(this,Ce)}const qe=this.clone();return await Vo(ke,qe,"revocationSignatures",Ae,(ze=>$o(qe.keyPacket,er.signature.keyRevocation,qe,[ze],null,ke.keyPacket,Ae,Ce))),await Vo(ke,qe,"directSignatures",Ae),await Promise.all(ke.users.map((async ke=>{const ze=qe.users.filter((Ae=>ke.userID&&ke.userID.equals(Ae.userID)||ke.userAttribute&&ke.userAttribute.equals(Ae.userAttribute)));if(ze.length>0)await Promise.all(ze.map((qe=>qe.update(ke,Ae,Ce))));else{const Ae=ke.clone();Ae.mainKey=qe,qe.users.push(Ae)}}))),await Promise.all(ke.subkeys.map((async ke=>{const ze=qe.subkeys.filter((Ae=>Ae.hasSameFingerprintAs(ke)));if(ze.length>0)await Promise.all(ze.map((qe=>qe.update(ke,Ae,Ce))));else{const Ae=ke.clone();Ae.mainKey=qe,qe.subkeys.push(Ae)}}))),qe}async getRevocationCertificate(ke=new Date,Ae=tr){const Ce={key:this.keyPacket},qe=await No(this.revocationSignatures,this.keyPacket,er.signature.keyRevocation,Ce,ke,Ae),ze=new uo;return ze.push(qe),xe(er.armor.publicKey,ze.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(ke,Ae=new Date,Ce=tr){const qe=await Pe(ke,Ce),ze=(await uo.fromBinary(qe.data,Sl,Ce)).findPacket(er.packet.signature);if(!ze||ze.signatureType!==er.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!ze.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await ze.verify(this.keyPacket,er.signature.keyRevocation,{key:this.keyPacket},Ae,void 0,Ce)}catch(ke){throw Zt.wrapError("Could not verify revocation signature",ke)}const Ve=this.clone();return Ve.revocationSignatures.push(ze),Ve}async signPrimaryUser(ke,Ae,Ce,qe=tr){const{index:ze,user:Ve}=await this.getPrimaryUser(Ae,Ce,qe),tt=await Ve.certify(ke,Ae,qe),rt=this.clone();return rt.users[ze]=tt,rt}async signAllUsers(ke,Ae=new Date,Ce=tr){const qe=this.clone();return qe.users=await Promise.all(this.users.map((function(qe){return qe.certify(ke,Ae,Ce)}))),qe}async verifyPrimaryUser(ke,Ae=new Date,Ce,qe=tr){const ze=this.keyPacket,{user:Ve}=await this.getPrimaryUser(Ae,Ce,qe);return ke?await Ve.verifyAllCertifications(ke,Ae,qe):[{keyID:ze.getKeyID(),valid:await Ve.verify(Ae,qe).catch((()=>!1))}]}async verifyAllUsers(ke,Ae=new Date,Ce=tr){const qe=this.keyPacket,ze=[];return await Promise.all(this.users.map((async Ve=>{const tt=ke?await Ve.verifyAllCertifications(ke,Ae,Ce):[{keyID:qe.getKeyID(),valid:await Ve.verify(Ae,Ce).catch((()=>!1))}];ze.push(...tt.map((ke=>({userID:Ve.userID.userID,keyID:ke.keyID,valid:ke.valid}))))}))),ze}}function oc(ke){for(const Ae of ke)switch(Ae.constructor.tag){case er.packet.secretKey:return new uc(ke);case er.packet.publicKey:return new cc(ke)}throw Error("No key packet found")}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((ke=>{sc.prototype[ke]=rc.prototype[ke]}));class cc extends sc{constructor(ke){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],ke&&(this.packetListToStructure(ke,new Set([er.packet.secretKey,er.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(ke=tr){return xe(er.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,ke)}}class uc extends cc{constructor(ke){if(super(),this.packetListToStructure(ke,new Set([er.packet.publicKey,er.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const ke=new uo,Ae=this.toPacketList();for(const Ce of Ae)switch(Ce.constructor.tag){case er.packet.secretKey:{const Ae=xo.fromSecretKeyPacket(Ce);ke.push(Ae);break}case er.packet.secretSubkey:{const Ae=Ko.fromSecretSubkeyPacket(Ce);ke.push(Ae);break}default:ke.push(Ce)}return new cc(ke)}armor(ke=tr){return xe(er.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,ke)}async getDecryptionKeys(ke,Ae=new Date,Ce={},qe=tr){const ze=this.keyPacket,Ve=[];for(let Ce=0;Ce<this.subkeys.length;Ce++)if(!ke||this.subkeys[Ce].getKeyID().equals(ke,!0))try{const ke={key:ze,bind:this.subkeys[Ce].keyPacket};Jo(await No(this.subkeys[Ce].bindingSignatures,ze,er.signature.subkeyBinding,ke,Ae,qe),qe)&&Ve.push(this.subkeys[Ce])}catch(ke){}const tt=await this.getPrimaryUser(Ae,Ce,qe);return ke&&!ze.getKeyID().equals(ke,!0)||!Jo(tt.selfCertification,qe)||Ve.push(this),Ve}isDecrypted(){return this.getKeys().some((({keyPacket:ke})=>ke.isDecrypted()))}async validate(ke=tr){if(!this.isPrivate())throw Error("Cannot validate a public key");let Ae;if(this.keyPacket.isDummy()){const Ce=await this.getSigningKey(null,null,void 0,{...ke,rejectPublicKeyAlgorithms:new Set,minRSABits:0});Ce&&!Ce.keyPacket.isDummy()&&(Ae=Ce.keyPacket)}else Ae=this.keyPacket;if(Ae)return Ae.validate();{const ke=this.getKeys();if(ke.map((ke=>ke.keyPacket.isDummy())).every(Boolean))throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(ke.map((async ke=>ke.keyPacket.validate())))}}clearPrivateParams(){this.getKeys().forEach((({keyPacket:ke})=>{ke.isDecrypted()&&ke.clearPrivateParams()}))}async revoke({flag:ke=er.reasonForRevocation.noReason,string:Ae=""}={},Ce=new Date,qe=tr){if(!this.isPrivate())throw Error("Need private key for revoking");const ze={key:this.keyPacket},Ve=this.clone();return Ve.revocationSignatures.push(await Go(ze,null,this.keyPacket,{signatureType:er.signature.keyRevocation,reasonForRevocationFlag:er.write(er.reasonForRevocation,ke),reasonForRevocationString:Ae},Ce,void 0,void 0,qe)),Ve}async addSubkey(ke={}){const Ae={...tr,...ke.config};if(ke.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(ke.rsaBits<Ae.minRSABits)throw Error(`rsaBits should be at least ${Ae.minRSABits}, got: ${ke.rsaBits}`);const Ce=this.keyPacket;if(Ce.isDummy())throw Error("Cannot add subkey to gnu-dummy primary key");if(!Ce.isDecrypted())throw Error("Key is not decrypted");const qe=Ce.getAlgorithmInfo();qe.type=qe.curve?"ecc":"rsa",qe.rsaBits=qe.bits||4096,qe.curve=qe.curve||"curve25519",ke=Yo(ke,qe);const ze=await Oo(ke);ec(ze,Ae);const Ve=await Lo(ze,Ce,ke,Ae),tt=this.toPacketList();return tt.push(ze,Ve),new uc(tt)}}const Cl=Zt.constructAllowedPackets([xo,Ko,Ro,To,Bo,Do,ao]);async function fc(ke,Ae,Ce,qe){Ce.passphrase&&await ke.encrypt(Ce.passphrase,qe),await Promise.all(Ae.map((async function(ke,Ae){const ze=Ce.subkeys[Ae].passphrase;ze&&await ke.encrypt(ze,qe)})));const ze=new uo;ze.push(ke),await Promise.all(Ce.userIDs.map((async function(Ae,ze){function a(ke,Ae){return[Ae,...ke.filter((ke=>ke!==Ae))]}const Ve=Bo.fromObject(Ae),tt={};tt.userID=Ve,tt.key=ke;const rt=new ao;return rt.signatureType=er.signature.certGeneric,rt.publicKeyAlgorithm=ke.algorithm,rt.hashAlgorithm=await Wo(null,ke,void 0,void 0,qe),rt.keyFlags=[er.keyFlags.certifyKeys|er.keyFlags.signData],rt.preferredSymmetricAlgorithms=a([er.symmetric.aes256,er.symmetric.aes128,er.symmetric.aes192],qe.preferredSymmetricAlgorithm),qe.aeadProtect&&(rt.preferredAEADAlgorithms=a([er.aead.eax,er.aead.ocb],qe.preferredAEADAlgorithm)),rt.preferredHashAlgorithms=a([er.hash.sha256,er.hash.sha512],qe.preferredHashAlgorithm),rt.preferredCompressionAlgorithms=a([er.compression.zlib,er.compression.zip,er.compression.uncompressed],qe.preferredCompressionAlgorithm),0===ze&&(rt.isPrimaryUserID=!0),rt.features=[0],rt.features[0]|=er.features.modificationDetection,qe.aeadProtect&&(rt.features[0]|=er.features.aead),qe.v5Keys&&(rt.features[0]|=er.features.v5Keys),Ce.keyExpirationTime>0&&(rt.keyExpirationTime=Ce.keyExpirationTime,rt.keyNeverExpires=!1),await rt.sign(ke,tt,Ce.date),{userIDPacket:Ve,signaturePacket:rt}}))).then((ke=>{ke.forEach((({userIDPacket:ke,signaturePacket:Ae})=>{ze.push(ke),ze.push(Ae)}))})),await Promise.all(Ae.map((async function(Ae,ze){const Ve=Ce.subkeys[ze];return{secretSubkeyPacket:Ae,subkeySignaturePacket:await Lo(Ae,ke,Ve,qe)}}))).then((ke=>{ke.forEach((({secretSubkeyPacket:ke,subkeySignaturePacket:Ae})=>{ze.push(ke),ze.push(Ae)}))}));const Ve={key:ke};return ze.push(await Go(Ve,null,ke,{signatureType:er.signature.keyRevocation,reasonForRevocationFlag:er.reasonForRevocation.noReason,reasonForRevocationString:""},Ce.date,void 0,void 0,qe)),Ce.passphrase&&ke.clearPrivateParams(),await Promise.all(Ae.map((async function(ke,Ae){Ce.subkeys[Ae].passphrase&&ke.clearPrivateParams()}))),new uc(ze)}const Tl=Zt.constructAllowedPackets([ro,fo,Ao,_o,Co,So,Po,oo,ao]),Il=Zt.constructAllowedPackets([Po]),Ol=Zt.constructAllowedPackets([ao]);class yc{constructor(ke){this.packets=ke||new uo}getEncryptionKeyIDs(){const ke=[];return this.packets.filterByTag(er.packet.publicKeyEncryptedSessionKey).forEach((function(Ae){ke.push(Ae.publicKeyID)})),ke}getSigningKeyIDs(){const ke=this.unwrapCompressed(),Ae=ke.packets.filterByTag(er.packet.onePassSignature);if(Ae.length>0)return Ae.map((ke=>ke.issuerKeyID));return ke.packets.filterByTag(er.packet.signature).map((ke=>ke.issuerKeyID))}async decrypt(ke,Ae,Ce,qe=new Date,ze=tr){const Ve=Ce||await this.decryptSessionKeys(ke,Ae,qe,ze),tt=this.packets.filterByTag(er.packet.symmetricallyEncryptedData,er.packet.symEncryptedIntegrityProtectedData,er.packet.aeadEncryptedData);if(0===tt.length)throw Error("No encrypted data found");const rt=tt[0];let it=null;const nt=Promise.all(Ve.map((async({algorithm:ke,data:Ae})=>{if(!Zt.isUint8Array(Ae)||!Zt.isString(ke))throw Error("Invalid session key for decryption.");try{const Ce=er.write(er.symmetric,ke);await rt.decrypt(Ce,Ae,ze)}catch(ke){Zt.printDebugError(ke),it=ke}})));if(ne(rt.encrypted),rt.encrypted=null,await nt,!rt.packets||!rt.packets.length)throw it||Error("Decryption failed.");const ot=new yc(rt.packets);return rt.packets=new uo,ot}async decryptSessionKeys(ke,Ae,Ce=new Date,qe=tr){let ze,Ve=[];if(Ae){const ke=this.packets.filterByTag(er.packet.symEncryptedSessionKey);if(0===ke.length)throw Error("No symmetrically encrypted session key packet found.");await Promise.all(Ae.map((async function(Ae,Ce){let ze;ze=Ce?await uo.fromBinary(ke.write(),Il,qe):ke,await Promise.all(ze.map((async function(ke){try{await ke.decrypt(Ae),Ve.push(ke)}catch(ke){Zt.printDebugError(ke)}})))})))}else{if(!ke)throw Error("No key or password specified.");{const Ae=this.packets.filterByTag(er.packet.publicKeyEncryptedSessionKey);if(0===Ae.length)throw Error("No public key encrypted session key packet found.");await Promise.all(Ae.map((async function(Ae){await Promise.all(ke.map((async function(ke){let tt=[er.symmetric.aes256,er.symmetric.aes128,er.symmetric.tripledes,er.symmetric.cast5];try{const Ae=await ke.getPrimaryUser(Ce,void 0,qe);Ae.selfCertification.preferredSymmetricAlgorithms&&(tt=tt.concat(Ae.selfCertification.preferredSymmetricAlgorithms))}catch(ke){}const rt=(await ke.getDecryptionKeys(Ae.publicKeyID,null,void 0,qe)).map((ke=>ke.keyPacket));await Promise.all(rt.map((async function(ke){if(!ke||ke.isDummy())return;if(!ke.isDecrypted())throw Error("Decryption key is not decrypted.");if(qe.constantTimePKCS1Decryption&&(Ae.publicKeyAlgorithm===er.publicKey.rsaEncrypt||Ae.publicKeyAlgorithm===er.publicKey.rsaEncryptSign||Ae.publicKeyAlgorithm===er.publicKey.rsaSign||Ae.publicKeyAlgorithm===er.publicKey.elgamal)){const Ce=Ae.write();await Promise.all(Array.from(qe.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map((async Ae=>{const qe=new So;qe.read(Ce);const tt={sessionKeyAlgorithm:Ae,sessionKey:await vo.generateSessionKey(Ae)};try{await qe.decrypt(ke,tt),Ve.push(qe)}catch(ke){Zt.printDebugError(ke),ze=ke}})))}else try{if(await Ae.decrypt(ke),!tt.includes(er.write(er.symmetric,Ae.sessionKeyAlgorithm)))throw Error("A non-preferred symmetric algorithm was used.");Ve.push(Ae)}catch(ke){Zt.printDebugError(ke),ze=ke}})))}))),ne(Ae.encrypted),Ae.encrypted=null})))}}if(Ve.length>0){if(Ve.length>1){const ke=new Set;Ve=Ve.filter((Ae=>{const Ce=Ae.sessionKeyAlgorithm+Zt.uint8ArrayToString(Ae.sessionKey);return!ke.has(Ce)&&(ke.add(Ce),!0)}))}return Ve.map((ke=>({data:ke.sessionKey,algorithm:er.read(er.symmetric,ke.sessionKeyAlgorithm)})))}throw ze||Error("Session key decryption failed.")}getLiteralData(){const ke=this.unwrapCompressed().packets.findPacket(er.packet.literalData);return ke&&ke.getBytes()||null}getFilename(){const ke=this.unwrapCompressed().packets.findPacket(er.packet.literalData);return ke&&ke.getFilename()||null}getText(){const ke=this.unwrapCompressed().packets.findPacket(er.packet.literalData);return ke?ke.getText():null}static async generateSessionKey(ke=[],Ae=new Date,Ce=[],qe=tr){const ze=await Ho("symmetric",ke,Ae,Ce,qe),Ve=er.read(er.symmetric,ze),tt=qe.aeadProtect&&await async function(ke,Ae=new Date,Ce=[],qe=tr){let ze=!0;return await Promise.all(ke.map((async function(ke,Ve){const tt=await ke.getPrimaryUser(Ae,Ce[Ve],qe);tt.selfCertification.features&&tt.selfCertification.features[0]&er.features.aead||(ze=!1)}))),ze}(ke,Ae,Ce,qe)?er.read(er.aead,await Ho("aead",ke,Ae,Ce,qe)):void 0;return{data:await vo.generateSessionKey(ze),algorithm:Ve,aeadAlgorithm:tt}}async encrypt(ke,Ae,Ce,qe=!1,ze=[],Ve=new Date,tt=[],rt=tr){if(Ce){if(!Zt.isUint8Array(Ce.data)||!Zt.isString(Ce.algorithm))throw Error("Invalid session key for encryption.")}else if(ke&&ke.length)Ce=await yc.generateSessionKey(ke,Ve,tt,rt);else{if(!Ae||!Ae.length)throw Error("No keys, passwords, or session key provided.");Ce=await yc.generateSessionKey(void 0,void 0,void 0,rt)}const{data:it,algorithm:nt,aeadAlgorithm:ot}=Ce,ct=await yc.encryptSessionKey(it,nt,ot,ke,Ae,qe,ze,Ve,tt,rt);let ht;ot?(ht=new Ao,ht.aeadAlgorithm=er.write(er.aead,ot)):ht=new _o,ht.packets=this.packets;const ft=er.write(er.symmetric,nt);return await ht.encrypt(ft,it,rt),ct.packets.push(ht),ht.packets=new uo,ct}static async encryptSessionKey(ke,Ae,Ce,qe,ze,Ve=!1,tt=[],rt=new Date,it=[],nt=tr){const ot=new uo,ct=er.write(er.symmetric,Ae),ht=Ce&&er.write(er.aead,Ce);if(qe){const Ae=await Promise.all(qe.map((async function(Ae,Ce){const qe=await Ae.getEncryptionKey(tt[Ce],rt,it,nt),ze=new So;return ze.publicKeyID=Ve?Me.wildcard():qe.getKeyID(),ze.publicKeyAlgorithm=qe.keyPacket.algorithm,ze.sessionKey=ke,ze.sessionKeyAlgorithm=ct,await ze.encrypt(qe.keyPacket),delete ze.sessionKey,ze})));ot.push(...Ae)}if(ze){const t=async function(ke,Ae){try{return await ke.decrypt(Ae),1}catch(ke){return 0}},r=(ke,Ae)=>ke+Ae,i=async function(ke,Ae,Ce,qe){const Ve=new Po(nt);if(Ve.sessionKey=ke,Ve.sessionKeyAlgorithm=Ae,Ce&&(Ve.aeadAlgorithm=Ce),await Ve.encrypt(qe,nt),nt.passwordCollisionCheck){if(1!==(await Promise.all(ze.map((ke=>t(Ve,ke))))).reduce(r))return i(ke,Ae,qe)}return delete Ve.sessionKey,Ve},Ae=await Promise.all(ze.map((Ae=>i(ke,ct,ht,Ae))));ot.push(...Ae)}return new yc(ot)}async sign(ke=[],Ae=null,Ce=[],qe=new Date,ze=[],Ve=tr){const tt=new uo,rt=this.packets.findPacket(er.packet.literalData);if(!rt)throw Error("No literal data packet to sign.");let it,nt;const ot=null===rt.text?er.signature.binary:er.signature.text;if(Ae)for(nt=Ae.packets.filterByTag(er.packet.signature),it=nt.length-1;it>=0;it--){const Ae=nt[it],Ce=new oo;Ce.signatureType=Ae.signatureType,Ce.hashAlgorithm=Ae.hashAlgorithm,Ce.publicKeyAlgorithm=Ae.publicKeyAlgorithm,Ce.issuerKeyID=Ae.issuerKeyID,ke.length||0!==it||(Ce.flags=1),tt.push(Ce)}return await Promise.all(Array.from(ke).reverse().map((async function(Ae,tt){if(!Ae.isPrivate())throw Error("Need private key for signing");const rt=Ce[ke.length-1-tt],it=await Ae.getSigningKey(rt,qe,ze,Ve),nt=new oo;return nt.signatureType=ot,nt.hashAlgorithm=await Wo(Ae,it.keyPacket,qe,ze,Ve),nt.publicKeyAlgorithm=it.keyPacket.algorithm,nt.issuerKeyID=it.getKeyID(),tt===ke.length-1&&(nt.flags=1),nt}))).then((ke=>{ke.forEach((ke=>tt.push(ke)))})),tt.push(rt),tt.push(...await bc(rt,ke,Ae,Ce,qe,ze,!1,Ve)),new yc(tt)}compress(ke,Ae=tr){if(ke===er.compression.uncompressed)return this;const Ce=new fo(Ae);Ce.algorithm=ke,Ce.packets=this.packets;const qe=new uo;return qe.push(Ce),new yc(qe)}async signDetached(ke=[],Ae=null,Ce=[],qe=new Date,ze=[],Ve=tr){const tt=this.packets.findPacket(er.packet.literalData);if(!tt)throw Error("No literal data packet to sign.");return new qo(await bc(tt,ke,Ae,Ce,qe,ze,!0,Ve))}async verify(ke,Ae=new Date,Ce=tr){const qe=this.unwrapCompressed(),ze=qe.packets.filterByTag(er.packet.literalData);if(1!==ze.length)throw Error("Can only verify message with one literal data packet.");_(qe.packets.stream)&&qe.packets.push(...await ie(qe.packets.stream,(ke=>ke||[])));const Ve=qe.packets.filterByTag(er.packet.onePassSignature).reverse(),tt=qe.packets.filterByTag(er.packet.signature);return Ve.length&&!tt.length&&Zt.isStream(qe.packets.stream)&&!_(qe.packets.stream)?(await Promise.all(Ve.map((async ke=>{ke.correspondingSig=new Promise(((Ae,Ce)=>{ke.correspondingSigResolve=Ae,ke.correspondingSigReject=Ce})),ke.signatureData=ae((async()=>(await ke.correspondingSig).signatureData)),ke.hashed=ie(await ke.hash(ke.signatureType,ze[0],void 0,!1)),ke.hashed.catch((()=>{}))}))),qe.packets.stream=X(qe.packets.stream,(async(ke,Ae)=>{const Ce=H(ke),qe=G(Ae);try{for(let ke=0;ke<Ve.length;ke++){const{value:Ae}=await Ce.read();Ve[ke].correspondingSigResolve(Ae)}await Ce.readToEnd(),await qe.ready,await qe.close()}catch(ke){Ve.forEach((Ae=>{Ae.correspondingSigReject(ke)})),await qe.abort(ke)}})),mc(Ve,ze,ke,Ae,!1,Ce)):mc(tt,ze,ke,Ae,!1,Ce)}verifyDetached(ke,Ae,Ce=new Date,qe=tr){const ze=this.unwrapCompressed().packets.filterByTag(er.packet.literalData);if(1!==ze.length)throw Error("Can only verify message with one literal data packet.");return mc(ke.packets,ze,Ae,Ce,!0,qe)}unwrapCompressed(){const ke=this.packets.filterByTag(er.packet.compressedData);return ke.length?new yc(ke[0].packets):this}async appendSignature(ke,Ae=tr){await this.packets.read(Zt.isUint8Array(ke)?ke:(await Pe(ke)).data,Ol,Ae)}write(){return this.packets.write()}armor(ke=tr){return xe(er.armor.message,this.write(),null,null,null,ke)}}async function bc(ke,Ae,Ce=null,qe=[],ze=new Date,Ve=[],tt=!1,rt=tr){const it=new uo,nt=null===ke.text?er.signature.binary:er.signature.text;if(await Promise.all(Ae.map((async(Ae,Ce)=>{const it=Ve[Ce];if(!Ae.isPrivate())throw Error("Need private key for signing");const ot=await Ae.getSigningKey(qe[Ce],ze,it,rt);return Go(ke,Ae,ot.keyPacket,{signatureType:nt},ze,it,tt,rt)}))).then((ke=>{it.push(...ke)})),Ce){const ke=Ce.packets.filterByTag(er.packet.signature);it.push(...ke)}return it}async function mc(ke,Ae,Ce,qe=new Date,ze=!1,Ve=tr){return Promise.all(ke.filter((function(ke){return["text","binary"].includes(er.read(er.signature,ke.signatureType))})).map((async function(ke){return async function(ke,Ae,Ce,qe=new Date,ze=!1,Ve=tr){let tt,rt;for(const Ae of Ce){const Ce=Ae.getKeys(ke.issuerKeyID);if(Ce.length>0){tt=Ae,rt=Ce[0];break}}const it=ke instanceof oo?ke.correspondingSig:ke,nt={keyID:ke.issuerKeyID,verified:(async()=>{if(!rt)throw Error("Could not find signing key with key ID "+ke.issuerKeyID.toHex());await ke.verify(rt.keyPacket,ke.signatureType,Ae[0],qe,ze,Ve);const Ce=await it;if(rt.getCreationTime()>Ce.created)throw Error("Key is newer than the signature");try{await tt.getSigningKey(rt.getKeyID(),Ce.created,void 0,Ve)}catch(ke){if(!Ve.allowInsecureVerificationWithReformattedKeys||!ke.message.match(/Signature creation time is in the future/))throw ke;await tt.getSigningKey(rt.getKeyID(),qe,void 0,Ve)}return!0})(),signature:(async()=>{const ke=await it,Ae=new uo;return ke&&Ae.push(ke),new qo(Ae)})()};return nt.signature.catch((()=>{})),nt.verified.catch((()=>{})),nt}(ke,Ae,Ce,qe,ze,Ve)})))}const Nl=Zt.constructAllowedPackets([ao]);class wc{constructor(ke,Ae){if(this.text=Zt.removeTrailingSpaces(ke).replace(/\r?\n/g,"\r\n"),Ae&&!(Ae instanceof qo))throw Error("Invalid signature input");this.signature=Ae||new qo(new uo)}getSigningKeyIDs(){const ke=[];return this.signature.packets.forEach((function(Ae){ke.push(Ae.issuerKeyID)})),ke}async sign(ke,Ae=null,Ce=[],qe=new Date,ze=[],Ve=tr){const tt=new ro;tt.setText(this.text);const rt=new qo(await bc(tt,ke,Ae,Ce,qe,ze,!0,Ve));return new wc(this.text,rt)}verify(ke,Ae=new Date,Ce=tr){const qe=this.signature.packets,ze=new ro;return ze.setText(this.text),mc(qe,[ze],ke,Ae,!0,Ce)}getText(){return this.text.replace(/\r\n/g,"\n")}armor(ke=tr){let Ae=this.signature.packets.map((function(ke){return er.read(er.hash,ke.hashAlgorithm).toUpperCase()}));Ae=Ae.filter((function(ke,Ae,Ce){return Ce.indexOf(ke)===Ae}));const Ce={hash:Ae.join(),text:this.text,data:this.signature.packets.write()};return xe(er.armor.signed,Ce,void 0,void 0,void 0,ke)}}function vc(ke){if(!(ke instanceof yc))throw Error("Parameter [message] needs to be of type Message")}function _c(ke){if(!(ke instanceof wc||ke instanceof yc))throw Error("Parameter [message] needs to be of type Message or CleartextMessage")}function kc(ke){if("armored"!==ke&&"binary"!==ke&&"object"!==ke)throw Error("Unsupported format "+ke)}const ql=Object.keys(tr).length;function Sc(ke){const Ae=Object.keys(ke);if(Ae.length!==ql)for(const ke of Ae)if(void 0===tr[ke])throw Error("Unknown config property: "+ke)}function Ec(ke){return ke&&!Zt.isArray(ke)&&(ke=[ke]),ke}async function Pc(ke,Ae,Ce="utf8"){const qe=Zt.isStream(ke);return"array"===qe?ie(ke):"node"===Ae?(ke=Ot(ke),"binary"!==Ce&&ke.setEncoding(Ce),ke):"web"===Ae&&"ponyfill"===qe?Ft(ke):ke}function xc(ke,Ae){ke.data=X(Ae.packets.stream,(async(Ae,Ce)=>{await V(ke.data,Ce,{preventClose:!0});const qe=G(Ce);try{await ie(Ae,(ke=>ke)),await qe.close()}catch(ke){await qe.abort(ke)}}))}function Mc(ke,Ae,Ce){switch(Ae){case"object":return ke;case"armored":return ke.armor(Ce);case"binary":return ke.write();default:throw Error("Unsupported format "+Ae)}}const jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:ke=>`Symbol(${ke})`;function Kc(){}const zl="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function Rc(ke){return"object"==typeof ke&&null!==ke||"function"==typeof ke}const Ll=Kc,Wl=Promise,Gl=Promise.prototype.then,$l=Promise.resolve.bind(Wl),Vl=Promise.reject.bind(Wl);function qc(ke){return new Wl(ke)}function Oc(ke){return $l(ke)}function Fc(ke){return Vl(ke)}function Nc(ke,Ae,Ce){return Gl.call(ke,Ae,Ce)}function jc(ke,Ae,Ce){Nc(Nc(ke,Ae,Ce),void 0,Ll)}function Lc(ke,Ae){jc(ke,Ae)}function Wc(ke,Ae){jc(ke,void 0,Ae)}function Hc(ke,Ae,Ce){return Nc(ke,Ae,Ce)}function Gc(ke){Nc(ke,void 0,Ll)}const Yl=(()=>{const ke=zl&&zl.queueMicrotask;if("function"==typeof ke)return ke;const Ae=Oc(void 0);return ke=>Nc(Ae,ke)})();function $c(ke,Ae,Ce){if("function"!=typeof ke)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(ke,Ae,Ce)}function Zc(ke,Ae,Ce){try{return Oc($c(ke,Ae,Ce))}catch(ke){return Fc(ke)}}class Yc{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(ke){const Ae=this._back;let Ce=Ae;16383===Ae._elements.length&&(Ce={_elements:[],_next:void 0}),Ae._elements.push(ke),Ce!==Ae&&(this._back=Ce,Ae._next=Ce),++this._size}shift(){const ke=this._front;let Ae=ke;const Ce=this._cursor;let qe=Ce+1;const ze=ke._elements,Ve=ze[Ce];return 16384===qe&&(Ae=ke._next,qe=0),--this._size,this._cursor=qe,ke!==Ae&&(this._front=Ae),ze[Ce]=void 0,Ve}forEach(ke){let Ae=this._cursor,Ce=this._front,qe=Ce._elements;for(;!(Ae===qe.length&&void 0===Ce._next||Ae===qe.length&&(Ce=Ce._next,qe=Ce._elements,Ae=0,0===qe.length));)ke(qe[Ae]),++Ae}peek(){const ke=this._front,Ae=this._cursor;return ke._elements[Ae]}}function Xc(ke,Ae){ke._ownerReadableStream=Ae,Ae._reader=ke,"readable"===Ae._state?tu(ke):"closed"===Ae._state?function(ke){tu(ke),nu(ke)}(ke):ru(ke,Ae._storedError)}function Qc(ke,Ae){return Tf(ke._ownerReadableStream,Ae)}function Jc(ke){"readable"===ke._ownerReadableStream._state?iu(ke,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(ke,Ae){ru(ke,Ae)}(ke,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),ke._ownerReadableStream._reader=void 0,ke._ownerReadableStream=void 0}function eu(ke){return new TypeError("Cannot "+ke+" a stream using a released reader")}function tu(ke){ke._closedPromise=qc(((Ae,Ce)=>{ke._closedPromise_resolve=Ae,ke._closedPromise_reject=Ce}))}function ru(ke,Ae){tu(ke),iu(ke,Ae)}function iu(ke,Ae){void 0!==ke._closedPromise_reject&&(Gc(ke._closedPromise),ke._closedPromise_reject(Ae),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0)}function nu(ke){void 0!==ke._closedPromise_resolve&&(ke._closedPromise_resolve(void 0),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0)}const Jl=jl("[[AbortSteps]]"),Xl=jl("[[ErrorSteps]]"),Ql=jl("[[CancelSteps]]"),hd=jl("[[PullSteps]]"),Ad=Number.isFinite||function(ke){return"number"==typeof ke&&isFinite(ke)},Sd=Math.trunc||function(ke){return ke<0?Math.ceil(ke):Math.floor(ke)};function fu(ke,Ae){if(void 0!==ke&&("object"!=typeof(Ce=ke)&&"function"!=typeof Ce))throw new TypeError(Ae+" is not an object.");var Ce}function du(ke,Ae){if("function"!=typeof ke)throw new TypeError(Ae+" is not a function.")}function lu(ke,Ae){if(!function(ke){return"object"==typeof ke&&null!==ke||"function"==typeof ke}(ke))throw new TypeError(Ae+" is not an object.")}function pu(ke,Ae,Ce){if(void 0===ke)throw new TypeError(`Parameter ${Ae} is required in '${Ce}'.`)}function yu(ke,Ae,Ce){if(void 0===ke)throw new TypeError(`${Ae} is required in '${Ce}'.`)}function bu(ke){return Number(ke)}function mu(ke){return 0===ke?0:ke}function gu(ke,Ae){const Ce=Number.MAX_SAFE_INTEGER;let qe=Number(ke);if(qe=mu(qe),!Ad(qe))throw new TypeError(Ae+" is not a finite number");if(qe=function(ke){return mu(Sd(ke))}(qe),qe<0||qe>Ce)throw new TypeError(`${Ae} is outside the accepted range of 0 to ${Ce}, inclusive`);return Ad(qe)&&0!==qe?qe:0}function wu(ke,Ae){if(!If(ke))throw new TypeError(Ae+" is not a ReadableStream.")}function vu(ke){return new Eu(ke)}function _u(ke,Ae){ke._reader._readRequests.push(Ae)}function ku(ke,Ae,Ce){const qe=ke._reader._readRequests.shift();Ce?qe._closeSteps():qe._chunkSteps(Ae)}function Au(ke){return ke._reader._readRequests.length}function Su(ke){const Ae=ke._reader;return void 0!==Ae&&!!Pu(Ae)}class Eu{constructor(ke){if(pu(ke,1,"ReadableStreamDefaultReader"),wu(ke,"First parameter"),Bf(ke))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Xc(this,ke),this._readRequests=new Yc}get closed(){return Pu(this)?this._closedPromise:Fc(Mu("closed"))}cancel(ke){return Pu(this)?void 0===this._ownerReadableStream?Fc(eu("cancel")):Qc(this,ke):Fc(Mu("cancel"))}read(){if(!Pu(this))return Fc(Mu("read"));if(void 0===this._ownerReadableStream)return Fc(eu("read from"));let ke,Ae;const Ce=qc(((Ce,qe)=>{ke=Ce,Ae=qe}));return xu(this,{_chunkSteps:Ae=>ke({value:Ae,done:!1}),_closeSteps:()=>ke({value:void 0,done:!0}),_errorSteps:ke=>Ae(ke)}),Ce}releaseLock(){if(!Pu(this))throw Mu("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Jc(this)}}}function Pu(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_readRequests")}function xu(ke,Ae){const Ce=ke._ownerReadableStream;Ce._disturbed=!0,"closed"===Ce._state?Ae._closeSteps():"errored"===Ce._state?Ae._errorSteps(Ce._storedError):Ce._readableStreamController[hd](Ae)}function Mu(ke){return new TypeError(`ReadableStreamDefaultReader.prototype.${ke} can only be used on a ReadableStreamDefaultReader`)}let Md;Object.defineProperties(Eu.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Eu.prototype,jl.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof jl.asyncIterator&&(Md={[jl.asyncIterator](){return this}},Object.defineProperty(Md,jl.asyncIterator,{enumerable:!1}));class Ku{constructor(ke,Ae){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=ke,this._preventCancel=Ae}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Hc(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(ke){const t=()=>this._returnSteps(ke);return this._ongoingPromise?Hc(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const ke=this._reader;if(void 0===ke._ownerReadableStream)return Fc(eu("iterate"));let Ae,Ce;const qe=qc(((ke,qe)=>{Ae=ke,Ce=qe}));return xu(ke,{_chunkSteps:ke=>{this._ongoingPromise=void 0,Yl((()=>Ae({value:ke,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Jc(ke),Ae({value:void 0,done:!0})},_errorSteps:Ae=>{this._ongoingPromise=void 0,this._isFinished=!0,Jc(ke),Ce(Ae)}}),qe}_returnSteps(ke){if(this._isFinished)return Promise.resolve({value:ke,done:!0});this._isFinished=!0;const Ae=this._reader;if(void 0===Ae._ownerReadableStream)return Fc(eu("finish iterating"));if(!this._preventCancel){const Ce=Qc(Ae,ke);return Jc(Ae),Hc(Ce,(()=>({value:ke,done:!0})))}return Jc(Ae),Oc({value:ke,done:!0})}}const Pd={next(){return Ru(this)?this._asyncIteratorImpl.next():Fc(Uu("next"))},return(ke){return Ru(this)?this._asyncIteratorImpl.return(ke):Fc(Uu("return"))}};function Ru(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_asyncIteratorImpl")}function Uu(ke){return new TypeError(`ReadableStreamAsyncIterator.${ke} can only be used on a ReadableSteamAsyncIterator`)}void 0!==Md&&Object.setPrototypeOf(Pd,Md);const Dd=Number.isNaN||function(ke){return ke!=ke};function Bu(ke){return!!function(ke){if("number"!=typeof ke)return!1;if(Dd(ke))return!1;if(ke<0)return!1;return!0}(ke)&&ke!==1/0}function Tu(ke){const Ae=ke._queue.shift();return ke._queueTotalSize-=Ae.size,ke._queueTotalSize<0&&(ke._queueTotalSize=0),Ae.value}function zu(ke,Ae,Ce){if(!Bu(Ce=Number(Ce)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");ke._queue.push({value:Ae,size:Ce}),ke._queueTotalSize+=Ce}function qu(ke){ke._queue=new Yc,ke._queueTotalSize=0}function Ou(ke){return ke.slice()}class Fu{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Lu(this))throw ah("view");return this._view}respond(ke){if(!Lu(this))throw ah("respond");if(pu(ke,1,"respond"),ke=gu(ke,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(ke,Ae){if(!Bu(Ae=Number(Ae)))throw new RangeError("bytesWritten must be a finite");Ju(ke,Ae)}(this._associatedReadableByteStreamController,ke)}respondWithNewView(ke){if(!Lu(this))throw ah("respondWithNewView");if(pu(ke,1,"respondWithNewView"),!ArrayBuffer.isView(ke))throw new TypeError("You can only respond with array buffer views");if(0===ke.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===ke.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(ke,Ae){const Ce=ke._pendingPullIntos.peek();if(Ce.byteOffset+Ce.bytesFilled!==Ae.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(Ce.byteLength!==Ae.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");Ce.buffer=Ae.buffer,Ju(ke,Ae.byteLength)}(this._associatedReadableByteStreamController,ke)}}Object.defineProperties(Fu.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Fu.prototype,jl.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Nu{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ju(this))throw sh("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){const ke=this._pendingPullIntos.peek(),Ae=new Uint8Array(ke.buffer,ke.byteOffset+ke.bytesFilled,ke.byteLength-ke.bytesFilled),Ce=Object.create(Fu.prototype);!function(ke,Ae,Ce){ke._associatedReadableByteStreamController=Ae,ke._view=Ce}(Ce,this,Ae),this._byobRequest=Ce}return this._byobRequest}get desiredSize(){if(!ju(this))throw sh("desiredSize");return ih(this)}close(){if(!ju(this))throw sh("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const ke=this._controlledReadableByteStream._state;if("readable"!==ke)throw new TypeError(`The stream (in ${ke} state) is not in the readable state and cannot be closed`);!function(ke){const Ae=ke._controlledReadableByteStream;if(ke._closeRequested||"readable"!==Ae._state)return;if(ke._queueTotalSize>0)return void(ke._closeRequested=!0);if(ke._pendingPullIntos.length>0){if(ke._pendingPullIntos.peek().bytesFilled>0){const Ae=new TypeError("Insufficient bytes to fill elements in the given buffer");throw rh(ke,Ae),Ae}}th(ke),zf(Ae)}(this)}enqueue(ke){if(!ju(this))throw sh("enqueue");if(pu(ke,1,"enqueue"),!ArrayBuffer.isView(ke))throw new TypeError("chunk must be an array buffer view");if(0===ke.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===ke.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const Ae=this._controlledReadableByteStream._state;if("readable"!==Ae)throw new TypeError(`The stream (in ${Ae} state) is not in the readable state and cannot be enqueued to`);!function(ke,Ae){const Ce=ke._controlledReadableByteStream;if(ke._closeRequested||"readable"!==Ce._state)return;const qe=Ae.buffer,ze=Ae.byteOffset,Ve=Ae.byteLength,tt=qe;if(Su(Ce))if(0===Au(Ce))Vu(ke,tt,ze,Ve);else{ku(Ce,new Uint8Array(tt,ze,Ve),!1)}else uh(Ce)?(Vu(ke,tt,ze,Ve),Qu(ke)):Vu(ke,tt,ze,Ve);Wu(ke)}(this,ke)}error(ke){if(!ju(this))throw sh("error");rh(this,ke)}[Ql](ke){if(this._pendingPullIntos.length>0){this._pendingPullIntos.peek().bytesFilled=0}qu(this);const Ae=this._cancelAlgorithm(ke);return th(this),Ae}[hd](ke){const Ae=this._controlledReadableByteStream;if(this._queueTotalSize>0){const Ae=this._queue.shift();this._queueTotalSize-=Ae.byteLength,Yu(this);const Ce=new Uint8Array(Ae.buffer,Ae.byteOffset,Ae.byteLength);return void ke._chunkSteps(Ce)}const Ce=this._autoAllocateChunkSize;if(void 0!==Ce){let qe;try{qe=new ArrayBuffer(Ce)}catch(Ae){return void ke._errorSteps(Ae)}const ze={buffer:qe,byteOffset:0,byteLength:Ce,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(ze)}_u(Ae,ke),Wu(this)}}function ju(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_controlledReadableByteStream")}function Lu(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_associatedReadableByteStreamController")}function Wu(ke){if(!function(ke){const Ae=ke._controlledReadableByteStream;if("readable"!==Ae._state)return!1;if(ke._closeRequested)return!1;if(!ke._started)return!1;if(Su(Ae)&&Au(Ae)>0)return!0;if(uh(Ae)&&ch(Ae)>0)return!0;if(ih(ke)>0)return!0;return!1}(ke))return;if(ke._pulling)return void(ke._pullAgain=!0);ke._pulling=!0;jc(ke._pullAlgorithm(),(()=>{ke._pulling=!1,ke._pullAgain&&(ke._pullAgain=!1,Wu(ke))}),(Ae=>{rh(ke,Ae)}))}function Hu(ke,Ae){let Ce=!1;"closed"===ke._state&&(Ce=!0);const qe=Gu(Ae);"default"===Ae.readerType?ku(ke,qe,Ce):function(ke,Ae,Ce){const qe=ke._reader._readIntoRequests.shift();Ce?qe._closeSteps(Ae):qe._chunkSteps(Ae)}(ke,qe,Ce)}function Gu(ke){const Ae=ke.bytesFilled,Ce=ke.elementSize;return new ke.viewConstructor(ke.buffer,ke.byteOffset,Ae/Ce)}function Vu(ke,Ae,Ce,qe){ke._queue.push({buffer:Ae,byteOffset:Ce,byteLength:qe}),ke._queueTotalSize+=qe}function $u(ke,Ae){const Ce=Ae.elementSize,qe=Ae.bytesFilled-Ae.bytesFilled%Ce,ze=Math.min(ke._queueTotalSize,Ae.byteLength-Ae.bytesFilled),Ve=Ae.bytesFilled+ze,tt=Ve-Ve%Ce;let rt=ze,it=!1;tt>qe&&(rt=tt-Ae.bytesFilled,it=!0);const nt=ke._queue;for(;rt>0;){const Ce=nt.peek(),qe=Math.min(rt,Ce.byteLength),ze=Ae.byteOffset+Ae.bytesFilled;ot=Ae.buffer,ct=ze,ht=Ce.buffer,ft=Ce.byteOffset,yt=qe,new Uint8Array(ot).set(new Uint8Array(ht,ft,yt),ct),Ce.byteLength===qe?nt.shift():(Ce.byteOffset+=qe,Ce.byteLength-=qe),ke._queueTotalSize-=qe,Zu(ke,qe,Ae),rt-=qe}var ot,ct,ht,ft,yt;return it}function Zu(ke,Ae,Ce){Xu(ke),Ce.bytesFilled+=Ae}function Yu(ke){0===ke._queueTotalSize&&ke._closeRequested?(th(ke),zf(ke._controlledReadableByteStream)):Wu(ke)}function Xu(ke){null!==ke._byobRequest&&(ke._byobRequest._associatedReadableByteStreamController=void 0,ke._byobRequest._view=null,ke._byobRequest=null)}function Qu(ke){for(;ke._pendingPullIntos.length>0;){if(0===ke._queueTotalSize)return;const Ae=ke._pendingPullIntos.peek();$u(ke,Ae)&&(eh(ke),Hu(ke._controlledReadableByteStream,Ae))}}function Ju(ke,Ae){const Ce=ke._pendingPullIntos.peek();if("closed"===ke._controlledReadableByteStream._state){if(0!==Ae)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(ke,Ae){Ae.buffer=Ae.buffer;const Ce=ke._controlledReadableByteStream;if(uh(Ce))for(;ch(Ce)>0;)Hu(Ce,eh(ke))}(ke,Ce)}else!function(ke,Ae,Ce){if(Ce.bytesFilled+Ae>Ce.byteLength)throw new RangeError("bytesWritten out of range");if(Zu(ke,Ae,Ce),Ce.bytesFilled<Ce.elementSize)return;eh(ke);const qe=Ce.bytesFilled%Ce.elementSize;if(qe>0){const Ae=Ce.byteOffset+Ce.bytesFilled,ze=Ce.buffer.slice(Ae-qe,Ae);Vu(ke,ze,0,ze.byteLength)}Ce.buffer=Ce.buffer,Ce.bytesFilled-=qe,Hu(ke._controlledReadableByteStream,Ce),Qu(ke)}(ke,Ae,Ce);Wu(ke)}function eh(ke){const Ae=ke._pendingPullIntos.shift();return Xu(ke),Ae}function th(ke){ke._pullAlgorithm=void 0,ke._cancelAlgorithm=void 0}function rh(ke,Ae){const Ce=ke._controlledReadableByteStream;"readable"===Ce._state&&(!function(ke){Xu(ke),ke._pendingPullIntos=new Yc}(ke),qu(ke),th(ke),qf(Ce,Ae))}function ih(ke){const Ae=ke._controlledReadableByteStream._state;return"errored"===Ae?null:"closed"===Ae?0:ke._strategyHWM-ke._queueTotalSize}function nh(ke,Ae,Ce){const qe=Object.create(Nu.prototype);let n=()=>{},a=()=>Oc(void 0),s=()=>Oc(void 0);void 0!==Ae.start&&(n=()=>Ae.start(qe)),void 0!==Ae.pull&&(a=()=>Ae.pull(qe)),void 0!==Ae.cancel&&(s=ke=>Ae.cancel(ke));const ze=Ae.autoAllocateChunkSize;if(0===ze)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(ke,Ae,Ce,qe,ze,Ve,tt){Ae._controlledReadableByteStream=ke,Ae._pullAgain=!1,Ae._pulling=!1,Ae._byobRequest=null,Ae._queue=Ae._queueTotalSize=void 0,qu(Ae),Ae._closeRequested=!1,Ae._started=!1,Ae._strategyHWM=Ve,Ae._pullAlgorithm=qe,Ae._cancelAlgorithm=ze,Ae._autoAllocateChunkSize=tt,Ae._pendingPullIntos=new Yc,ke._readableStreamController=Ae,jc(Oc(Ce()),(()=>{Ae._started=!0,Wu(Ae)}),(ke=>{rh(Ae,ke)}))}(ke,qe,n,a,s,Ce,ze)}function ah(ke){return new TypeError(`ReadableStreamBYOBRequest.prototype.${ke} can only be used on a ReadableStreamBYOBRequest`)}function sh(ke){return new TypeError(`ReadableByteStreamController.prototype.${ke} can only be used on a ReadableByteStreamController`)}function oh(ke,Ae){ke._reader._readIntoRequests.push(Ae)}function ch(ke){return ke._reader._readIntoRequests.length}function uh(ke){const Ae=ke._reader;return void 0!==Ae&&!!fh(Ae)}Object.defineProperties(Nu.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Nu.prototype,jl.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class hh{constructor(ke){if(pu(ke,1,"ReadableStreamBYOBReader"),wu(ke,"First parameter"),Bf(ke))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ju(ke._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Xc(this,ke),this._readIntoRequests=new Yc}get closed(){return fh(this)?this._closedPromise:Fc(dh("closed"))}cancel(ke){return fh(this)?void 0===this._ownerReadableStream?Fc(eu("cancel")):Qc(this,ke):Fc(dh("cancel"))}read(ke){if(!fh(this))return Fc(dh("read"));if(!ArrayBuffer.isView(ke))return Fc(new TypeError("view must be an array buffer view"));if(0===ke.byteLength)return Fc(new TypeError("view must have non-zero byteLength"));if(0===ke.buffer.byteLength)return Fc(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return Fc(eu("read from"));let Ae,Ce;const qe=qc(((ke,qe)=>{Ae=ke,Ce=qe}));return function(ke,Ae,Ce){const qe=ke._ownerReadableStream;qe._disturbed=!0,"errored"===qe._state?Ce._errorSteps(qe._storedError):function(ke,Ae,Ce){const qe=ke._controlledReadableByteStream;let ze=1;Ae.constructor!==DataView&&(ze=Ae.constructor.BYTES_PER_ELEMENT);const Ve=Ae.constructor,tt={buffer:Ae.buffer,byteOffset:Ae.byteOffset,byteLength:Ae.byteLength,bytesFilled:0,elementSize:ze,viewConstructor:Ve,readerType:"byob"};if(ke._pendingPullIntos.length>0)return ke._pendingPullIntos.push(tt),void oh(qe,Ce);if("closed"!==qe._state){if(ke._queueTotalSize>0){if($u(ke,tt)){const Ae=Gu(tt);return Yu(ke),void Ce._chunkSteps(Ae)}if(ke._closeRequested){const Ae=new TypeError("Insufficient bytes to fill elements in the given buffer");return rh(ke,Ae),void Ce._errorSteps(Ae)}}ke._pendingPullIntos.push(tt),oh(qe,Ce),Wu(ke)}else{const ke=new Ve(tt.buffer,tt.byteOffset,0);Ce._closeSteps(ke)}}(qe._readableStreamController,Ae,Ce)}(this,ke,{_chunkSteps:ke=>Ae({value:ke,done:!1}),_closeSteps:ke=>Ae({value:ke,done:!0}),_errorSteps:ke=>Ce(ke)}),qe}releaseLock(){if(!fh(this))throw dh("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Jc(this)}}}function fh(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_readIntoRequests")}function dh(ke){return new TypeError(`ReadableStreamBYOBReader.prototype.${ke} can only be used on a ReadableStreamBYOBReader`)}function lh(ke,Ae){const{highWaterMark:Ce}=ke;if(void 0===Ce)return Ae;if(Dd(Ce)||Ce<0)throw new RangeError("Invalid highWaterMark");return Ce}function ph(ke){const{size:Ae}=ke;return Ae||(()=>1)}function yh(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.highWaterMark,qe=null==ke?void 0:ke.size;return{highWaterMark:void 0===Ce?void 0:bu(Ce),size:void 0===qe?void 0:bh(qe,Ae+" has member 'size' that")}}function bh(ke,Ae){return du(ke,Ae),Ae=>bu(ke(Ae))}function mh(ke,Ae,Ce){return du(ke,Ce),Ce=>Zc(ke,Ae,[Ce])}function gh(ke,Ae,Ce){return du(ke,Ce),()=>Zc(ke,Ae,[])}function wh(ke,Ae,Ce){return du(ke,Ce),Ce=>$c(ke,Ae,[Ce])}function vh(ke,Ae,Ce){return du(ke,Ce),(Ce,qe)=>Zc(ke,Ae,[Ce,qe])}function _h(ke,Ae){if(!Eh(ke))throw new TypeError(Ae+" is not a WritableStream.")}Object.defineProperties(hh.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(hh.prototype,jl.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class kh{constructor(ke={},Ae={}){void 0===ke?ke=null:lu(ke,"First parameter");const Ce=yh(Ae,"Second parameter"),qe=function(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.abort,qe=null==ke?void 0:ke.close,ze=null==ke?void 0:ke.start,Ve=null==ke?void 0:ke.type,tt=null==ke?void 0:ke.write;return{abort:void 0===Ce?void 0:mh(Ce,ke,Ae+" has member 'abort' that"),close:void 0===qe?void 0:gh(qe,ke,Ae+" has member 'close' that"),start:void 0===ze?void 0:wh(ze,ke,Ae+" has member 'start' that"),write:void 0===tt?void 0:vh(tt,ke,Ae+" has member 'write' that"),type:Ve}}(ke,"First parameter");Sh(this);if(void 0!==qe.type)throw new RangeError("Invalid type is specified");const ze=ph(Ce);!function(ke,Ae,Ce,qe){const ze=Object.create(Lh.prototype);let a=()=>{},s=()=>Oc(void 0),o=()=>Oc(void 0),c=()=>Oc(void 0);void 0!==Ae.start&&(a=()=>Ae.start(ze));void 0!==Ae.write&&(s=ke=>Ae.write(ke,ze));void 0!==Ae.close&&(o=()=>Ae.close());void 0!==Ae.abort&&(c=ke=>Ae.abort(ke));Wh(ke,ze,a,s,o,c,Ce,qe)}(this,qe,lh(Ce,1),ze)}get locked(){if(!Eh(this))throw Xh("locked");return Ph(this)}abort(ke){return Eh(this)?Ph(this)?Fc(new TypeError("Cannot abort a stream that already has a writer")):xh(this,ke):Fc(Xh("abort"))}close(){return Eh(this)?Ph(this)?Fc(new TypeError("Cannot close a stream that already has a writer")):Rh(this)?Fc(new TypeError("Cannot close an already-closing stream")):Mh(this):Fc(Xh("close"))}getWriter(){if(!Eh(this))throw Xh("getWriter");return Ah(this)}}function Ah(ke){return new Bh(ke)}function Sh(ke){ke._state="writable",ke._storedError=void 0,ke._writer=void 0,ke._writableStreamController=void 0,ke._writeRequests=new Yc,ke._inFlightWriteRequest=void 0,ke._closeRequest=void 0,ke._inFlightCloseRequest=void 0,ke._pendingAbortRequest=void 0,ke._backpressure=!1}function Eh(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_writableStreamController")}function Ph(ke){return void 0!==ke._writer}function xh(ke,Ae){const Ce=ke._state;if("closed"===Ce||"errored"===Ce)return Oc(void 0);if(void 0!==ke._pendingAbortRequest)return ke._pendingAbortRequest._promise;let qe=!1;"erroring"===Ce&&(qe=!0,Ae=void 0);const ze=qc(((Ce,ze)=>{ke._pendingAbortRequest={_promise:void 0,_resolve:Ce,_reject:ze,_reason:Ae,_wasAlreadyErroring:qe}}));return ke._pendingAbortRequest._promise=ze,qe||Kh(ke,Ae),ze}function Mh(ke){const Ae=ke._state;if("closed"===Ae||"errored"===Ae)return Fc(new TypeError(`The stream (in ${Ae} state) is not in the writable state and cannot be closed`));const Ce=qc(((Ae,Ce)=>{const qe={_resolve:Ae,_reject:Ce};ke._closeRequest=qe})),qe=ke._writer;var ze;return void 0!==qe&&ke._backpressure&&"writable"===Ae&&uf(qe),zu(ze=ke._writableStreamController,Rd,0),Vh(ze),Ce}function Ch(ke,Ae){"writable"!==ke._state?Dh(ke):Kh(ke,Ae)}function Kh(ke,Ae){const Ce=ke._writableStreamController;ke._state="erroring",ke._storedError=Ae;const qe=ke._writer;void 0!==qe&&Oh(qe,Ae),!function(ke){if(void 0===ke._inFlightWriteRequest&&void 0===ke._inFlightCloseRequest)return!1;return!0}(ke)&&Ce._started&&Dh(ke)}function Dh(ke){ke._state="errored",ke._writableStreamController[Xl]();const Ae=ke._storedError;if(ke._writeRequests.forEach((ke=>{ke._reject(Ae)})),ke._writeRequests=new Yc,void 0===ke._pendingAbortRequest)return void Uh(ke);const Ce=ke._pendingAbortRequest;if(ke._pendingAbortRequest=void 0,Ce._wasAlreadyErroring)return Ce._reject(Ae),void Uh(ke);jc(ke._writableStreamController[Jl](Ce._reason),(()=>{Ce._resolve(),Uh(ke)}),(Ae=>{Ce._reject(Ae),Uh(ke)}))}function Rh(ke){return void 0!==ke._closeRequest||void 0!==ke._inFlightCloseRequest}function Uh(ke){void 0!==ke._closeRequest&&(ke._closeRequest._reject(ke._storedError),ke._closeRequest=void 0);const Ae=ke._writer;void 0!==Ae&&rf(Ae,ke._storedError)}function Ih(ke,Ae){const Ce=ke._writer;void 0!==Ce&&Ae!==ke._backpressure&&(Ae?function(ke){af(ke)}(Ce):uf(Ce)),ke._backpressure=Ae}Object.defineProperties(kh.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(kh.prototype,jl.toStringTag,{value:"WritableStream",configurable:!0});class Bh{constructor(ke){if(pu(ke,1,"WritableStreamDefaultWriter"),_h(ke,"First parameter"),Ph(ke))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=ke,ke._writer=this;const Ae=ke._state;if("writable"===Ae)!Rh(ke)&&ke._backpressure?af(this):of(this),ef(this);else if("erroring"===Ae)sf(this,ke._storedError),ef(this);else if("closed"===Ae)of(this),ef(Ce=this),nf(Ce);else{const Ae=ke._storedError;sf(this,Ae),tf(this,Ae)}var Ce}get closed(){return Th(this)?this._closedPromise:Fc(Qh("closed"))}get desiredSize(){if(!Th(this))throw Qh("desiredSize");if(void 0===this._ownerWritableStream)throw Jh("desiredSize");return function(ke){const Ae=ke._ownerWritableStream,Ce=Ae._state;if("errored"===Ce||"erroring"===Ce)return null;if("closed"===Ce)return 0;return Gh(Ae._writableStreamController)}(this)}get ready(){return Th(this)?this._readyPromise:Fc(Qh("ready"))}abort(ke){return Th(this)?void 0===this._ownerWritableStream?Fc(Jh("abort")):function(ke,Ae){return xh(ke._ownerWritableStream,Ae)}(this,ke):Fc(Qh("abort"))}close(){if(!Th(this))return Fc(Qh("close"));const ke=this._ownerWritableStream;return void 0===ke?Fc(Jh("close")):Rh(ke)?Fc(new TypeError("Cannot close an already-closing stream")):zh(this)}releaseLock(){if(!Th(this))throw Qh("releaseLock");void 0!==this._ownerWritableStream&&Fh(this)}write(ke){return Th(this)?void 0===this._ownerWritableStream?Fc(Jh("write to")):Nh(this,ke):Fc(Qh("write"))}}function Th(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_ownerWritableStream")}function zh(ke){return Mh(ke._ownerWritableStream)}function qh(ke,Ae){"pending"===ke._closedPromiseState?rf(ke,Ae):function(ke,Ae){tf(ke,Ae)}(ke,Ae)}function Oh(ke,Ae){"pending"===ke._readyPromiseState?cf(ke,Ae):function(ke,Ae){sf(ke,Ae)}(ke,Ae)}function Fh(ke){const Ae=ke._ownerWritableStream,Ce=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Oh(ke,Ce),qh(ke,Ce),Ae._writer=void 0,ke._ownerWritableStream=void 0}function Nh(ke,Ae){const Ce=ke._ownerWritableStream,qe=Ce._writableStreamController,ze=function(ke,Ae){try{return ke._strategySizeAlgorithm(Ae)}catch(Ae){return $h(ke,Ae),1}}(qe,Ae);if(Ce!==ke._ownerWritableStream)return Fc(Jh("write to"));const Ve=Ce._state;if("errored"===Ve)return Fc(Ce._storedError);if(Rh(Ce)||"closed"===Ve)return Fc(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===Ve)return Fc(Ce._storedError);const tt=function(ke){return qc(((Ae,Ce)=>{const qe={_resolve:Ae,_reject:Ce};ke._writeRequests.push(qe)}))}(Ce);return function(ke,Ae,Ce){try{zu(ke,Ae,Ce)}catch(Ae){return void $h(ke,Ae)}const qe=ke._controlledWritableStream;if(!Rh(qe)&&"writable"===qe._state){Ih(qe,Zh(ke))}Vh(ke)}(qe,Ae,ze),tt}Object.defineProperties(Bh.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Bh.prototype,jl.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Rd={};class Lh{constructor(){throw new TypeError("Illegal constructor")}error(ke){if(!function(ke){if(!Rc(ke))return!1;if(!Object.prototype.hasOwnProperty.call(ke,"_controlledWritableStream"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&Yh(this,ke)}[Jl](ke){const Ae=this._abortAlgorithm(ke);return Hh(this),Ae}[Xl](){qu(this)}}function Wh(ke,Ae,Ce,qe,ze,Ve,tt,rt){Ae._controlledWritableStream=ke,ke._writableStreamController=Ae,Ae._queue=void 0,Ae._queueTotalSize=void 0,qu(Ae),Ae._started=!1,Ae._strategySizeAlgorithm=rt,Ae._strategyHWM=tt,Ae._writeAlgorithm=qe,Ae._closeAlgorithm=ze,Ae._abortAlgorithm=Ve;const it=Zh(Ae);Ih(ke,it);jc(Oc(Ce()),(()=>{Ae._started=!0,Vh(Ae)}),(Ce=>{Ae._started=!0,Ch(ke,Ce)}))}function Hh(ke){ke._writeAlgorithm=void 0,ke._closeAlgorithm=void 0,ke._abortAlgorithm=void 0,ke._strategySizeAlgorithm=void 0}function Gh(ke){return ke._strategyHWM-ke._queueTotalSize}function Vh(ke){const Ae=ke._controlledWritableStream;if(!ke._started)return;if(void 0!==Ae._inFlightWriteRequest)return;if("erroring"===Ae._state)return void Dh(Ae);if(0===ke._queue.length)return;const Ce=ke._queue.peek().value;Ce===Rd?function(ke){const Ae=ke._controlledWritableStream;(function(ke){ke._inFlightCloseRequest=ke._closeRequest,ke._closeRequest=void 0})(Ae),Tu(ke);const Ce=ke._closeAlgorithm();Hh(ke),jc(Ce,(()=>{!function(ke){ke._inFlightCloseRequest._resolve(void 0),ke._inFlightCloseRequest=void 0,"erroring"===ke._state&&(ke._storedError=void 0,void 0!==ke._pendingAbortRequest&&(ke._pendingAbortRequest._resolve(),ke._pendingAbortRequest=void 0)),ke._state="closed";const Ae=ke._writer;void 0!==Ae&&nf(Ae)}(Ae)}),(ke=>{!function(ke,Ae){ke._inFlightCloseRequest._reject(Ae),ke._inFlightCloseRequest=void 0,void 0!==ke._pendingAbortRequest&&(ke._pendingAbortRequest._reject(Ae),ke._pendingAbortRequest=void 0),Ch(ke,Ae)}(Ae,ke)}))}(ke):function(ke,Ae){const Ce=ke._controlledWritableStream;!function(ke){ke._inFlightWriteRequest=ke._writeRequests.shift()}(Ce);jc(ke._writeAlgorithm(Ae),(()=>{!function(ke){ke._inFlightWriteRequest._resolve(void 0),ke._inFlightWriteRequest=void 0}(Ce);const Ae=Ce._state;if(Tu(ke),!Rh(Ce)&&"writable"===Ae){const Ae=Zh(ke);Ih(Ce,Ae)}Vh(ke)}),(Ae=>{"writable"===Ce._state&&Hh(ke),function(ke,Ae){ke._inFlightWriteRequest._reject(Ae),ke._inFlightWriteRequest=void 0,Ch(ke,Ae)}(Ce,Ae)}))}(ke,Ce)}function $h(ke,Ae){"writable"===ke._controlledWritableStream._state&&Yh(ke,Ae)}function Zh(ke){return Gh(ke)<=0}function Yh(ke,Ae){const Ce=ke._controlledWritableStream;Hh(ke),Kh(Ce,Ae)}function Xh(ke){return new TypeError(`WritableStream.prototype.${ke} can only be used on a WritableStream`)}function Qh(ke){return new TypeError(`WritableStreamDefaultWriter.prototype.${ke} can only be used on a WritableStreamDefaultWriter`)}function Jh(ke){return new TypeError("Cannot "+ke+" a stream using a released writer")}function ef(ke){ke._closedPromise=qc(((Ae,Ce)=>{ke._closedPromise_resolve=Ae,ke._closedPromise_reject=Ce,ke._closedPromiseState="pending"}))}function tf(ke,Ae){ef(ke),rf(ke,Ae)}function rf(ke,Ae){void 0!==ke._closedPromise_reject&&(Gc(ke._closedPromise),ke._closedPromise_reject(Ae),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0,ke._closedPromiseState="rejected")}function nf(ke){void 0!==ke._closedPromise_resolve&&(ke._closedPromise_resolve(void 0),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0,ke._closedPromiseState="resolved")}function af(ke){ke._readyPromise=qc(((Ae,Ce)=>{ke._readyPromise_resolve=Ae,ke._readyPromise_reject=Ce})),ke._readyPromiseState="pending"}function sf(ke,Ae){af(ke),cf(ke,Ae)}function of(ke){af(ke),uf(ke)}function cf(ke,Ae){void 0!==ke._readyPromise_reject&&(Gc(ke._readyPromise),ke._readyPromise_reject(Ae),ke._readyPromise_resolve=void 0,ke._readyPromise_reject=void 0,ke._readyPromiseState="rejected")}function uf(ke){void 0!==ke._readyPromise_resolve&&(ke._readyPromise_resolve(void 0),ke._readyPromise_resolve=void 0,ke._readyPromise_reject=void 0,ke._readyPromiseState="fulfilled")}Object.defineProperties(Lh.prototype,{error:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Lh.prototype,jl.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const Bd="undefined"!=typeof DOMException?DOMException:void 0;const Td=function(ke){if("function"!=typeof ke&&"object"!=typeof ke)return!1;try{return new ke,!0}catch(ke){return!1}}(Bd)?Bd:function(){const e=function(ke,Ae){this.message=ke||"",this.name=Ae||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return Object.defineProperty(e.prototype=Object.create(Error.prototype),"constructor",{value:e,writable:!0,configurable:!0}),e}();function df(ke,Ae,Ce,qe,ze,Ve){const tt=vu(ke),rt=Ah(Ae);ke._disturbed=!0;let it=!1,nt=Oc(void 0);return qc(((ot,ct)=>{let ht;if(void 0!==Ve){if(ht=()=>{const Ce=new Td("Aborted","AbortError"),Ve=[];qe||Ve.push((()=>"writable"===Ae._state?xh(Ae,Ce):Oc(void 0))),ze||Ve.push((()=>"readable"===ke._state?Tf(ke,Ce):Oc(void 0))),y((()=>Promise.all(Ve.map((ke=>ke())))),!0,Ce)},Ve.aborted)return void ht();Ve.addEventListener("abort",ht)}if(p(ke,tt._closedPromise,(ke=>{qe?b(!0,ke):y((()=>xh(Ae,ke)),!0,ke)})),p(Ae,rt._closedPromise,(Ae=>{ze?b(!0,Ae):y((()=>Tf(ke,Ae)),!0,Ae)})),function(ke,Ae,Ce){"closed"===ke._state?Ce():Lc(Ae,Ce)}(ke,tt._closedPromise,(()=>{Ce?b():y((()=>function(ke){const Ae=ke._ownerWritableStream,Ce=Ae._state;return Rh(Ae)||"closed"===Ce?Oc(void 0):"errored"===Ce?Fc(Ae._storedError):zh(ke)}(rt)))})),Rh(Ae)||"closed"===Ae._state){const Ae=new TypeError("the destination writable stream closed before all data could be piped to it");ze?b(!0,Ae):y((()=>Tf(ke,Ae)),!0,Ae)}function l(){const ke=nt;return Nc(nt,(()=>ke!==nt?l():void 0))}function p(ke,Ae,Ce){"errored"===ke._state?Ce(ke._storedError):Wc(Ae,Ce)}function y(ke,Ce,qe){function n(){jc(ke(),(()=>m(Ce,qe)),(ke=>m(!0,ke)))}it||(it=!0,"writable"!==Ae._state||Rh(Ae)?n():Lc(l(),n))}function b(ke,Ce){it||(it=!0,"writable"!==Ae._state||Rh(Ae)?m(ke,Ce):Lc(l(),(()=>m(ke,Ce))))}function m(ke,Ae){Fh(rt),Jc(tt),void 0!==Ve&&Ve.removeEventListener("abort",ht),ke?ct(Ae):ot(void 0)}Gc(qc(((ke,Ae)=>{!function r(Ce){Ce?ke():Nc(it?Oc(!0):Nc(rt._readyPromise,(()=>qc(((ke,Ae)=>{xu(tt,{_chunkSteps:Ae=>{nt=Nc(Nh(rt,Ae),void 0,Kc),ke(!1)},_closeSteps:()=>ke(!0),_errorSteps:Ae})})))),r,Ae)}(!1)})))}))}class lf{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!pf(this))throw Sf("desiredSize");return _f(this)}close(){if(!pf(this))throw Sf("close");if(!kf(this))throw new TypeError("The stream is not in a state that permits close");gf(this)}enqueue(ke){if(!pf(this))throw Sf("enqueue");if(!kf(this))throw new TypeError("The stream is not in a state that permits enqueue");return wf(this,ke)}error(ke){if(!pf(this))throw Sf("error");vf(this,ke)}[Ql](ke){qu(this);const Ae=this._cancelAlgorithm(ke);return mf(this),Ae}[hd](ke){const Ae=this._controlledReadableStream;if(this._queue.length>0){const Ce=Tu(this);this._closeRequested&&0===this._queue.length?(mf(this),zf(Ae)):yf(this),ke._chunkSteps(Ce)}else _u(Ae,ke),yf(this)}}function pf(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_controlledReadableStream")}function yf(ke){if(!bf(ke))return;if(ke._pulling)return void(ke._pullAgain=!0);ke._pulling=!0;jc(ke._pullAlgorithm(),(()=>{ke._pulling=!1,ke._pullAgain&&(ke._pullAgain=!1,yf(ke))}),(Ae=>{vf(ke,Ae)}))}function bf(ke){const Ae=ke._controlledReadableStream;if(!kf(ke))return!1;if(!ke._started)return!1;if(Bf(Ae)&&Au(Ae)>0)return!0;return _f(ke)>0}function mf(ke){ke._pullAlgorithm=void 0,ke._cancelAlgorithm=void 0,ke._strategySizeAlgorithm=void 0}function gf(ke){if(!kf(ke))return;const Ae=ke._controlledReadableStream;ke._closeRequested=!0,0===ke._queue.length&&(mf(ke),zf(Ae))}function wf(ke,Ae){if(!kf(ke))return;const Ce=ke._controlledReadableStream;if(Bf(Ce)&&Au(Ce)>0)ku(Ce,Ae,!1);else{let Ce;try{Ce=ke._strategySizeAlgorithm(Ae)}catch(Ae){throw vf(ke,Ae),Ae}try{zu(ke,Ae,Ce)}catch(Ae){throw vf(ke,Ae),Ae}}yf(ke)}function vf(ke,Ae){const Ce=ke._controlledReadableStream;"readable"===Ce._state&&(qu(ke),mf(ke),qf(Ce,Ae))}function _f(ke){const Ae=ke._controlledReadableStream._state;return"errored"===Ae?null:"closed"===Ae?0:ke._strategyHWM-ke._queueTotalSize}function kf(ke){const Ae=ke._controlledReadableStream._state;return!ke._closeRequested&&"readable"===Ae}function Af(ke,Ae,Ce,qe,ze,Ve,tt){Ae._controlledReadableStream=ke,Ae._queue=void 0,Ae._queueTotalSize=void 0,qu(Ae),Ae._started=!1,Ae._closeRequested=!1,Ae._pullAgain=!1,Ae._pulling=!1,Ae._strategySizeAlgorithm=tt,Ae._strategyHWM=Ve,Ae._pullAlgorithm=qe,Ae._cancelAlgorithm=ze,ke._readableStreamController=Ae;jc(Oc(Ce()),(()=>{Ae._started=!0,yf(Ae)}),(ke=>{vf(Ae,ke)}))}function Sf(ke){return new TypeError(`ReadableStreamDefaultController.prototype.${ke} can only be used on a ReadableStreamDefaultController`)}function Ef(ke,Ae,Ce){return du(ke,Ce),Ce=>Zc(ke,Ae,[Ce])}function Pf(ke,Ae,Ce){return du(ke,Ce),Ce=>Zc(ke,Ae,[Ce])}function xf(ke,Ae,Ce){return du(ke,Ce),Ce=>$c(ke,Ae,[Ce])}function Mf(ke,Ae){if("bytes"!==(ke=""+ke))throw new TypeError(`${Ae} '${ke}' is not a valid enumeration value for ReadableStreamType`);return ke}function Cf(ke,Ae){if("byob"!==(ke=""+ke))throw new TypeError(`${Ae} '${ke}' is not a valid enumeration value for ReadableStreamReaderMode`);return ke}function Kf(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.preventAbort,qe=null==ke?void 0:ke.preventCancel,ze=null==ke?void 0:ke.preventClose,Ve=null==ke?void 0:ke.signal;return void 0!==Ve&&function(ke,Ae){if(!function(ke){if("object"!=typeof ke||null===ke)return!1;try{return"boolean"==typeof ke.aborted}catch(ke){return!1}}(ke))throw new TypeError(Ae+" is not an AbortSignal.")}(Ve,Ae+" has member 'signal' that"),{preventAbort:!!Ce,preventCancel:!!qe,preventClose:!!ze,signal:Ve}}Object.defineProperties(lf.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(lf.prototype,jl.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Df{constructor(ke={},Ae={}){void 0===ke?ke=null:lu(ke,"First parameter");const Ce=yh(Ae,"Second parameter"),qe=function(ke,Ae){fu(ke,Ae);const Ce=ke,qe=null==Ce?void 0:Ce.autoAllocateChunkSize,ze=null==Ce?void 0:Ce.cancel,Ve=null==Ce?void 0:Ce.pull,tt=null==Ce?void 0:Ce.start,rt=null==Ce?void 0:Ce.type;return{autoAllocateChunkSize:void 0===qe?void 0:gu(qe,Ae+" has member 'autoAllocateChunkSize' that"),cancel:void 0===ze?void 0:Ef(ze,Ce,Ae+" has member 'cancel' that"),pull:void 0===Ve?void 0:Pf(Ve,Ce,Ae+" has member 'pull' that"),start:void 0===tt?void 0:xf(tt,Ce,Ae+" has member 'start' that"),type:void 0===rt?void 0:Mf(rt,Ae+" has member 'type' that")}}(ke,"First parameter");if(Uf(this),"bytes"===qe.type){if(void 0!==Ce.size)throw new RangeError("The strategy for a byte stream cannot have a size function");nh(this,qe,lh(Ce,0))}else{const ke=ph(Ce);!function(ke,Ae,Ce,qe){const ze=Object.create(lf.prototype);let a=()=>{},s=()=>Oc(void 0),o=()=>Oc(void 0);void 0!==Ae.start&&(a=()=>Ae.start(ze)),void 0!==Ae.pull&&(s=()=>Ae.pull(ze)),void 0!==Ae.cancel&&(o=ke=>Ae.cancel(ke)),Af(ke,ze,a,s,o,Ce,qe)}(this,qe,lh(Ce,1),ke)}}get locked(){if(!If(this))throw Of("locked");return Bf(this)}cancel(ke){return If(this)?Bf(this)?Fc(new TypeError("Cannot cancel a stream that already has a reader")):Tf(this,ke):Fc(Of("cancel"))}getReader(ke){if(!If(this))throw Of("getReader");return void 0===function(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.mode;return{mode:void 0===Ce?void 0:Cf(Ce,Ae+" has member 'mode' that")}}(ke,"First parameter").mode?vu(this):function(ke){return new hh(ke)}(this)}pipeThrough(ke,Ae={}){if(!If(this))throw Of("pipeThrough");pu(ke,1,"pipeThrough");const Ce=function(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.readable;yu(Ce,"readable","ReadableWritablePair"),wu(Ce,Ae+" has member 'readable' that");const qe=null==ke?void 0:ke.writable;return yu(qe,"writable","ReadableWritablePair"),_h(qe,Ae+" has member 'writable' that"),{readable:Ce,writable:qe}}(ke,"First parameter"),qe=Kf(Ae,"Second parameter");if(Bf(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ph(Ce.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Gc(df(this,Ce.writable,qe.preventClose,qe.preventAbort,qe.preventCancel,qe.signal)),Ce.readable}pipeTo(ke,Ae={}){if(!If(this))return Fc(Of("pipeTo"));if(void 0===ke)return Fc("Parameter 1 is required in 'pipeTo'.");if(!Eh(ke))return Fc(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let Ce;try{Ce=Kf(Ae,"Second parameter")}catch(ke){return Fc(ke)}return Bf(this)?Fc(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ph(ke)?Fc(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):df(this,ke,Ce.preventClose,Ce.preventAbort,Ce.preventCancel,Ce.signal)}tee(){if(!If(this))throw Of("tee");const ke=function(ke,Ae){const Ce=vu(ke);let qe,ze,Ve,tt,rt,it=!1,nt=!1,ot=!1;const ct=qc((ke=>{rt=ke}));function d(){return it||(it=!0,xu(Ce,{_chunkSteps:ke=>{Yl((()=>{it=!1;const Ae=ke,Ce=ke;nt||wf(Ve._readableStreamController,Ae),ot||wf(tt._readableStreamController,Ce)}))},_closeSteps:()=>{it=!1,nt||gf(Ve._readableStreamController),ot||gf(tt._readableStreamController),nt&&ot||rt(void 0)},_errorSteps:()=>{it=!1}})),Oc(void 0)}function l(){}return Ve=Rf(l,d,(function(Ae){if(nt=!0,qe=Ae,ot){const Ae=Ou([qe,ze]),Ce=Tf(ke,Ae);rt(Ce)}return ct})),tt=Rf(l,d,(function(Ae){if(ot=!0,ze=Ae,nt){const Ae=Ou([qe,ze]),Ce=Tf(ke,Ae);rt(Ce)}return ct})),Wc(Ce._closedPromise,(ke=>{vf(Ve._readableStreamController,ke),vf(tt._readableStreamController,ke),nt&&ot||rt(void 0)})),[Ve,tt]}(this);return Ou(ke)}values(ke){if(!If(this))throw Of("values");return function(ke,Ae){const Ce=vu(ke),qe=new Ku(Ce,Ae),ze=Object.create(Pd);return ze._asyncIteratorImpl=qe,ze}(this,function(ke,Ae){return fu(ke,Ae),{preventCancel:!!(null==ke?void 0:ke.preventCancel)}}(ke,"First parameter").preventCancel)}}function Rf(ke,Ae,Ce,qe=1,ze=(()=>1)){const Ve=Object.create(Df.prototype);Uf(Ve);return Af(Ve,Object.create(lf.prototype),ke,Ae,Ce,qe,ze),Ve}function Uf(ke){ke._state="readable",ke._reader=void 0,ke._storedError=void 0,ke._disturbed=!1}function If(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_readableStreamController")}function Bf(ke){return void 0!==ke._reader}function Tf(ke,Ae){if(ke._disturbed=!0,"closed"===ke._state)return Oc(void 0);if("errored"===ke._state)return Fc(ke._storedError);zf(ke);return Hc(ke._readableStreamController[Ql](Ae),Kc)}function zf(ke){ke._state="closed";const Ae=ke._reader;void 0!==Ae&&(nu(Ae),Pu(Ae)&&(Ae._readRequests.forEach((ke=>{ke._closeSteps()})),Ae._readRequests=new Yc))}function qf(ke,Ae){ke._state="errored",ke._storedError=Ae;const Ce=ke._reader;void 0!==Ce&&(iu(Ce,Ae),Pu(Ce)?(Ce._readRequests.forEach((ke=>{ke._errorSteps(Ae)})),Ce._readRequests=new Yc):(Ce._readIntoRequests.forEach((ke=>{ke._errorSteps(Ae)})),Ce._readIntoRequests=new Yc))}function Of(ke){return new TypeError(`ReadableStream.prototype.${ke} can only be used on a ReadableStream`)}function Ff(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.highWaterMark;return yu(Ce,"highWaterMark","QueuingStrategyInit"),{highWaterMark:bu(Ce)}}Object.defineProperties(Df.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Df.prototype,jl.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof jl.asyncIterator&&Object.defineProperty(Df.prototype,jl.asyncIterator,{value:Df.prototype.values,writable:!0,configurable:!0});const Nf=function(ke){return ke.byteLength};class jf{constructor(ke){pu(ke,1,"ByteLengthQueuingStrategy"),ke=Ff(ke,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=ke.highWaterMark}get highWaterMark(){if(!Wf(this))throw Lf("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Wf(this))throw Lf("size");return Nf}}function Lf(ke){return new TypeError(`ByteLengthQueuingStrategy.prototype.${ke} can only be used on a ByteLengthQueuingStrategy`)}function Wf(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(jf.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(jf.prototype,jl.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Hf=function(){return 1};class Gf{constructor(ke){pu(ke,1,"CountQueuingStrategy"),ke=Ff(ke,"First parameter"),this._countQueuingStrategyHighWaterMark=ke.highWaterMark}get highWaterMark(){if(!$f(this))throw Vf("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!$f(this))throw Vf("size");return Hf}}function Vf(ke){return new TypeError(`CountQueuingStrategy.prototype.${ke} can only be used on a CountQueuingStrategy`)}function $f(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_countQueuingStrategyHighWaterMark")}function Zf(ke,Ae,Ce){return du(ke,Ce),Ce=>Zc(ke,Ae,[Ce])}function Yf(ke,Ae,Ce){return du(ke,Ce),Ce=>$c(ke,Ae,[Ce])}function Xf(ke,Ae,Ce){return du(ke,Ce),(Ce,qe)=>Zc(ke,Ae,[Ce,qe])}Object.defineProperties(Gf.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Gf.prototype,jl.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Qf{constructor(ke={},Ae={},Ce={}){void 0===ke&&(ke=null);const qe=yh(Ae,"Second parameter"),ze=yh(Ce,"Third parameter"),Ve=function(ke,Ae){fu(ke,Ae);const Ce=null==ke?void 0:ke.flush,qe=null==ke?void 0:ke.readableType,ze=null==ke?void 0:ke.start,Ve=null==ke?void 0:ke.transform,tt=null==ke?void 0:ke.writableType;return{flush:void 0===Ce?void 0:Zf(Ce,ke,Ae+" has member 'flush' that"),readableType:qe,start:void 0===ze?void 0:Yf(ze,ke,Ae+" has member 'start' that"),transform:void 0===Ve?void 0:Xf(Ve,ke,Ae+" has member 'transform' that"),writableType:tt}}(ke,"First parameter");if(void 0!==Ve.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==Ve.writableType)throw new RangeError("Invalid writableType specified");const tt=lh(ze,0),rt=ph(ze),it=lh(qe,1),nt=ph(qe);let ot;!function(ke,Ae,Ce,qe,ze,Ve){function s(){return Ae}function o(Ae){return function(ke,Ae){const Ce=ke._transformStreamController;if(ke._backpressure){return Hc(ke._backpressureChangePromise,(()=>{const qe=ke._writable;if("erroring"===qe._state)throw qe._storedError;return od(Ce,Ae)}))}return od(Ce,Ae)}(ke,Ae)}function c(Ae){return function(ke,Ae){return ed(ke,Ae),Oc(void 0)}(ke,Ae)}function u(){return function(ke){const Ae=ke._readable,Ce=ke._transformStreamController,qe=Ce._flushAlgorithm();return ad(Ce),Hc(qe,(()=>{if("errored"===Ae._state)throw Ae._storedError;gf(Ae._readableStreamController)}),(Ce=>{throw ed(ke,Ce),Ae._storedError}))}(ke)}function h(){return function(ke){return rd(ke,!1),ke._backpressureChangePromise}(ke)}function f(Ae){return td(ke,Ae),Oc(void 0)}ke._writable=function(ke,Ae,Ce,qe,ze=1,Ve=(()=>1)){const tt=Object.create(kh.prototype);return Sh(tt),Wh(tt,Object.create(Lh.prototype),ke,Ae,Ce,qe,ze,Ve),tt}(s,o,u,c,Ce,qe),ke._readable=Rf(s,h,f,ze,Ve),ke._backpressure=void 0,ke._backpressureChangePromise=void 0,ke._backpressureChangePromise_resolve=void 0,rd(ke,!0),ke._transformStreamController=void 0}(this,qc((ke=>{ot=ke})),it,nt,tt,rt),function(ke,Ae){const Ce=Object.create(id.prototype);let i=ke=>{try{return sd(Ce,ke),Oc(void 0)}catch(ke){return Fc(ke)}},n=()=>Oc(void 0);void 0!==Ae.transform&&(i=ke=>Ae.transform(ke,Ce));void 0!==Ae.flush&&(n=()=>Ae.flush(Ce));!function(ke,Ae,Ce,qe){Ae._controlledTransformStream=ke,ke._transformStreamController=Ae,Ae._transformAlgorithm=Ce,Ae._flushAlgorithm=qe}(ke,Ce,i,n)}(this,Ve),void 0!==Ve.start?ot(Ve.start(this._transformStreamController)):ot(void 0)}get readable(){if(!Jf(this))throw ud("readable");return this._readable}get writable(){if(!Jf(this))throw ud("writable");return this._writable}}function Jf(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_transformStreamController")}function ed(ke,Ae){vf(ke._readable._readableStreamController,Ae),td(ke,Ae)}function td(ke,Ae){ad(ke._transformStreamController),$h(ke._writable._writableStreamController,Ae),ke._backpressure&&rd(ke,!1)}function rd(ke,Ae){void 0!==ke._backpressureChangePromise&&ke._backpressureChangePromise_resolve(),ke._backpressureChangePromise=qc((Ae=>{ke._backpressureChangePromise_resolve=Ae})),ke._backpressure=Ae}Object.defineProperties(Qf.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(Qf.prototype,jl.toStringTag,{value:"TransformStream",configurable:!0});class id{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!nd(this))throw cd("desiredSize");return _f(this._controlledTransformStream._readable._readableStreamController)}enqueue(ke){if(!nd(this))throw cd("enqueue");sd(this,ke)}error(ke){if(!nd(this))throw cd("error");var Ae;Ae=ke,ed(this._controlledTransformStream,Ae)}terminate(){if(!nd(this))throw cd("terminate");!function(ke){const Ae=ke._controlledTransformStream;gf(Ae._readable._readableStreamController);td(Ae,new TypeError("TransformStream terminated"))}(this)}}function nd(ke){return!!Rc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_controlledTransformStream")}function ad(ke){ke._transformAlgorithm=void 0,ke._flushAlgorithm=void 0}function sd(ke,Ae){const Ce=ke._controlledTransformStream,qe=Ce._readable._readableStreamController;if(!kf(qe))throw new TypeError("Readable side is not in a state that permits enqueue");try{wf(qe,Ae)}catch(ke){throw td(Ce,ke),Ce._readable._storedError}(function(ke){return!bf(ke)})(qe)!==Ce._backpressure&&rd(Ce,!0)}function od(ke,Ae){return Hc(ke._transformAlgorithm(Ae),void 0,(Ae=>{throw ed(ke._controlledTransformStream,Ae),Ae}))}function cd(ke){return new TypeError(`TransformStreamDefaultController.prototype.${ke} can only be used on a TransformStreamDefaultController`)}function ud(ke){return new TypeError(`TransformStream.prototype.${ke} can only be used on a TransformStream`)}Object.defineProperties(id.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof jl.toStringTag&&Object.defineProperty(id.prototype,jl.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var Ud=Object.freeze({__proto__:null,ByteLengthQueuingStrategy:jf,CountQueuingStrategy:Gf,ReadableByteStreamController:Nu,ReadableStream:Df,ReadableStreamBYOBReader:hh,ReadableStreamBYOBRequest:Fu,ReadableStreamDefaultController:lf,ReadableStreamDefaultReader:Eu,TransformStream:Qf,TransformStreamDefaultController:id,WritableStream:kh,WritableStreamDefaultController:Lh,WritableStreamDefaultWriter:Bh}),fd=function(ke,Ae){return(fd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Ae){ke.__proto__=Ae}||function(ke,Ae){for(var Ce in Ae)Object.prototype.hasOwnProperty.call(Ae,Ce)&&(ke[Ce]=Ae[Ce])})(ke,Ae)};
|
|
/*! *****************************************************************************
|
|
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.
|
|
***************************************************************************** */function dd(ke,Ae){if("function"!=typeof Ae&&null!==Ae)throw new TypeError("Class extends value "+Ae+" is not a constructor or null");function r(){this.constructor=ke}fd(ke,Ae),ke.prototype=null===Ae?Object.create(Ae):(r.prototype=Ae.prototype,new r)}function ld(ke){if(!ke)throw new TypeError("Assertion failed")}function pd(){}function yd(ke){return"object"==typeof ke&&null!==ke||"function"==typeof ke}function bd(ke){if("function"!=typeof ke)return!1;var Ae=!1;try{new ke({start:function(){Ae=!0}})}catch(ke){}return Ae}function md(ke){return!!yd(ke)&&"function"==typeof ke.getReader}function gd(ke){return!!yd(ke)&&"function"==typeof ke.getWriter}function wd(ke){return!!yd(ke)&&(!!md(ke.readable)&&!!gd(ke.writable))}function vd(ke){try{return ke.getReader({mode:"byob"}).releaseLock(),!0}catch(ke){return!1}}function _d(ke,Ae){var Ce=(void 0===Ae?{}:Ae).type;return ld(md(ke)),ld(!1===ke.locked),"bytes"===(Ce=kd(Ce))?new qd(ke):new Nd(ke)}function kd(ke){var Ae=ke+"";if("bytes"===Ae)return Ae;if(void 0===ke)return ke;throw new RangeError("Invalid type is specified")}var Kd=function(){function e(ke){this._underlyingReader=void 0,this._readerMode=void 0,this._readableStreamController=void 0,this._pendingRead=void 0,this._underlyingStream=ke,this._attachDefaultReader()}return e.prototype.start=function(ke){this._readableStreamController=ke},e.prototype.cancel=function(ke){return ld(void 0!==this._underlyingReader),this._underlyingReader.cancel(ke)},e.prototype._attachDefaultReader=function(){if("default"!==this._readerMode){this._detachReader();var ke=this._underlyingStream.getReader();this._readerMode="default",this._attachReader(ke)}},e.prototype._attachReader=function(ke){var Ae=this;ld(void 0===this._underlyingReader),this._underlyingReader=ke;var Ce=this._underlyingReader.closed;Ce&&Ce.then((function(){return Ae._finishPendingRead()})).then((function(){ke===Ae._underlyingReader&&Ae._readableStreamController.close()}),(function(Ce){ke===Ae._underlyingReader&&Ae._readableStreamController.error(Ce)})).catch(pd)},e.prototype._detachReader=function(){void 0!==this._underlyingReader&&(this._underlyingReader.releaseLock(),this._underlyingReader=void 0,this._readerMode=void 0)},e.prototype._pullWithDefaultReader=function(){var ke=this;this._attachDefaultReader();var Ae=this._underlyingReader.read().then((function(Ae){var Ce=ke._readableStreamController;Ae.done?ke._tryClose():Ce.enqueue(Ae.value)}));return this._setPendingRead(Ae),Ae},e.prototype._tryClose=function(){try{this._readableStreamController.close()}catch(ke){}},e.prototype._setPendingRead=function(ke){var Ae,Ce=this,i=function(){Ce._pendingRead===Ae&&(Ce._pendingRead=void 0)};this._pendingRead=Ae=ke.then(i,i)},e.prototype._finishPendingRead=function(){var ke=this;if(this._pendingRead){var t=function(){return ke._finishPendingRead()};return this._pendingRead.then(t,t)}},e}(),Nd=function(ke){function t(){return null!==ke&&ke.apply(this,arguments)||this}return dd(t,ke),t.prototype.pull=function(){return this._pullWithDefaultReader()},t}(Kd);function Ed(ke){return new Uint8Array(ke.buffer,ke.byteOffset,ke.byteLength)}var qd=function(ke){function t(Ae){var Ce=this,qe=vd(Ae);return(Ce=ke.call(this,Ae)||this)._supportsByob=qe,Ce}return dd(t,ke),Object.defineProperty(t.prototype,"type",{get:function(){return"bytes"},enumerable:!1,configurable:!0}),t.prototype._attachByobReader=function(){if("byob"!==this._readerMode){ld(this._supportsByob),this._detachReader();var ke=this._underlyingStream.getReader({mode:"byob"});this._readerMode="byob",this._attachReader(ke)}},t.prototype.pull=function(){if(this._supportsByob){var ke=this._readableStreamController.byobRequest;if(ke)return this._pullWithByobRequest(ke)}return this._pullWithDefaultReader()},t.prototype._pullWithByobRequest=function(ke){var Ae=this;this._attachByobReader();var Ce=new Uint8Array(ke.view.byteLength),qe=this._underlyingReader.read(Ce).then((function(Ce){var qe,ze,Ve;Ae._readableStreamController,Ce.done?(Ae._tryClose(),ke.respond(0)):(qe=Ce.value,ze=ke.view,Ve=Ed(qe),Ed(ze).set(Ve,0),ke.respond(Ce.value.byteLength))}));return this._setPendingRead(qe),qe},t}(Kd);function xd(ke){ld(gd(ke)),ld(!1===ke.locked);var Ae=ke.getWriter();return new jd(Ae)}var jd=function(){function e(ke){var Ae=this;this._writableStreamController=void 0,this._pendingWrite=void 0,this._state="writable",this._storedError=void 0,this._underlyingWriter=ke,this._errorPromise=new Promise((function(ke,Ce){Ae._errorPromiseReject=Ce})),this._errorPromise.catch(pd)}return e.prototype.start=function(ke){var Ae=this;this._writableStreamController=ke,this._underlyingWriter.closed.then((function(){Ae._state="closed"})).catch((function(ke){return Ae._finishErroring(ke)}))},e.prototype.write=function(ke){var Ae=this,Ce=this._underlyingWriter;if(null===Ce.desiredSize)return Ce.ready;var qe=Ce.write(ke);qe.catch((function(ke){return Ae._finishErroring(ke)})),Ce.ready.catch((function(ke){return Ae._startErroring(ke)}));var ze=Promise.race([qe,this._errorPromise]);return this._setPendingWrite(ze),ze},e.prototype.close=function(){var ke=this;return void 0===this._pendingWrite?this._underlyingWriter.close():this._finishPendingWrite().then((function(){return ke.close()}))},e.prototype.abort=function(ke){if("errored"!==this._state)return this._underlyingWriter.abort(ke)},e.prototype._setPendingWrite=function(ke){var Ae,Ce=this,i=function(){Ce._pendingWrite===Ae&&(Ce._pendingWrite=void 0)};this._pendingWrite=Ae=ke.then(i,i)},e.prototype._finishPendingWrite=function(){var ke=this;if(void 0===this._pendingWrite)return Promise.resolve();var t=function(){return ke._finishPendingWrite()};return this._pendingWrite.then(t,t)},e.prototype._startErroring=function(ke){var Ae=this;if("writable"===this._state){this._state="erroring",this._storedError=ke;var r=function(){return Ae._finishErroring(ke)};void 0===this._pendingWrite?r():this._finishPendingWrite().then(r,r),this._writableStreamController.error(ke)}},e.prototype._finishErroring=function(ke){"writable"===this._state&&this._startErroring(ke),"erroring"===this._state&&(this._state="errored",this._errorPromiseReject(this._storedError))},e}();function Cd(ke){ld(wd(ke));var Ae=ke.readable,Ce=ke.writable;ld(!1===Ae.locked),ld(!1===Ce.locked);var qe,ze=Ae.getReader();try{qe=Ce.getWriter()}catch(ke){throw ze.releaseLock(),ke}return new zd(ze,qe)}var zd=function(){function e(ke,Ae){var Ce=this;this._transformStreamController=void 0,this._onRead=function(ke){if(!ke.done)return Ce._transformStreamController.enqueue(ke.value),Ce._reader.read().then(Ce._onRead)},this._onError=function(ke){Ce._flushReject(ke),Ce._transformStreamController.error(ke),Ce._reader.cancel(ke).catch(pd),Ce._writer.abort(ke).catch(pd)},this._onTerminate=function(){Ce._flushResolve(),Ce._transformStreamController.terminate();var ke=new TypeError("TransformStream terminated");Ce._writer.abort(ke).catch(pd)},this._reader=ke,this._writer=Ae,this._flushPromise=new Promise((function(ke,Ae){Ce._flushResolve=ke,Ce._flushReject=Ae}))}return e.prototype.start=function(ke){this._transformStreamController=ke,this._reader.read().then(this._onRead).then(this._onTerminate,this._onError);var Ae=this._reader.closed;Ae&&Ae.then(this._onTerminate,this._onError)},e.prototype.transform=function(ke){return this._writer.write(ke)},e.prototype.flush=function(){var ke=this;return this._writer.close().then((function(){return ke._flushPromise}))},e}(),Ld=Object.freeze({__proto__:null,createReadableStreamWrapper:function(ke){ld(function(ke){return!!bd(ke)&&!!md(new ke)}(ke));var Ae=function(ke){try{return new ke({type:"bytes"}),!0}catch(ke){return!1}}(ke);return function(Ce,qe){var ze=(void 0===qe?{}:qe).type;if("bytes"!==(ze=kd(ze))||Ae||(ze=void 0),Ce.constructor===ke&&("bytes"!==ze||vd(Ce)))return Ce;if("bytes"===ze){var Ve=_d(Ce,{type:ze});return new ke(Ve)}Ve=_d(Ce);return new ke(Ve)}},createTransformStreamWrapper:function(ke){return ld(function(ke){return!!bd(ke)&&!!wd(new ke)}(ke)),function(Ae){if(Ae.constructor===ke)return Ae;var Ce=Cd(Ae);return new ke(Ce)}},createWrappingReadableSource:_d,createWrappingTransformer:Cd,createWrappingWritableSink:xd,createWritableStreamWrapper:function(ke){return ld(function(ke){return!!bd(ke)&&!!gd(new ke)}(ke)),function(Ae){if(Ae.constructor===ke)return Ae;var Ce=xd(Ae);return new ke(Ce)}}}),Hd=bt((function(ke){!function(ke,Ae){function r(ke,Ae){if(!ke)throw Error(Ae||"Assertion failed")}function i(ke,Ae){ke.super_=Ae;var r=function(){};r.prototype=Ae.prototype,ke.prototype=new r,ke.prototype.constructor=ke}function n(ke,Ae,Ce){if(n.isBN(ke))return ke;this.negative=0,this.words=null,this.length=0,this.red=null,null!==ke&&("le"!==Ae&&"be"!==Ae||(Ce=Ae,Ae=10),this._init(ke||0,Ae||10,Ce||"be"))}var Ce;"object"==typeof ke?ke.exports=n:Ae.BN=n,n.BN=n,n.wordSize=26;try{Ce=ct.default.Buffer}catch(ke){}function s(ke,Ae,Ce){for(var qe=0,ze=Math.min(ke.length,Ce),Ve=Ae;Ve<ze;Ve++){var tt=ke.charCodeAt(Ve)-48;qe<<=4,qe|=tt>=49&&tt<=54?tt-49+10:tt>=17&&tt<=22?tt-17+10:15&tt}return qe}function o(ke,Ae,Ce,qe){for(var ze=0,Ve=Math.min(ke.length,Ce),tt=Ae;tt<Ve;tt++){var rt=ke.charCodeAt(tt)-48;ze*=qe,ze+=rt>=49?rt-49+10:rt>=17?rt-17+10:rt}return ze}n.isBN=function(ke){return ke instanceof n||null!==ke&&"object"==typeof ke&&ke.constructor.wordSize===n.wordSize&&Array.isArray(ke.words)},n.max=function(ke,Ae){return ke.cmp(Ae)>0?ke:Ae},n.min=function(ke,Ae){return ke.cmp(Ae)<0?ke:Ae},n.prototype._init=function(ke,Ae,Ce){if("number"==typeof ke)return this._initNumber(ke,Ae,Ce);if("object"==typeof ke)return this._initArray(ke,Ae,Ce);"hex"===Ae&&(Ae=16),r(Ae===(0|Ae)&&Ae>=2&&Ae<=36);var qe=0;"-"===(ke=ke.toString().replace(/\s+/g,""))[0]&&qe++,16===Ae?this._parseHex(ke,qe):this._parseBase(ke,Ae,qe),"-"===ke[0]&&(this.negative=1),this.strip(),"le"===Ce&&this._initArray(this.toArray(),Ae,Ce)},n.prototype._initNumber=function(ke,Ae,Ce){ke<0&&(this.negative=1,ke=-ke),ke<67108864?(this.words=[67108863&ke],this.length=1):ke<4503599627370496?(this.words=[67108863&ke,ke/67108864&67108863],this.length=2):(r(ke<9007199254740992),this.words=[67108863&ke,ke/67108864&67108863,1],this.length=3),"le"===Ce&&this._initArray(this.toArray(),Ae,Ce)},n.prototype._initArray=function(ke,Ae,Ce){if(r("number"==typeof ke.length),ke.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(ke.length/3),this.words=Array(this.length);for(var qe=0;qe<this.length;qe++)this.words[qe]=0;var ze,Ve,tt=0;if("be"===Ce)for(qe=ke.length-1,ze=0;qe>=0;qe-=3)Ve=ke[qe]|ke[qe-1]<<8|ke[qe-2]<<16,this.words[ze]|=Ve<<tt&67108863,this.words[ze+1]=Ve>>>26-tt&67108863,(tt+=24)>=26&&(tt-=26,ze++);else if("le"===Ce)for(qe=0,ze=0;qe<ke.length;qe+=3)Ve=ke[qe]|ke[qe+1]<<8|ke[qe+2]<<16,this.words[ze]|=Ve<<tt&67108863,this.words[ze+1]=Ve>>>26-tt&67108863,(tt+=24)>=26&&(tt-=26,ze++);return this.strip()},n.prototype._parseHex=function(ke,Ae){this.length=Math.ceil((ke.length-Ae)/6),this.words=Array(this.length);for(var Ce=0;Ce<this.length;Ce++)this.words[Ce]=0;var qe,ze,Ve=0;for(Ce=ke.length-6,qe=0;Ce>=Ae;Ce-=6)ze=s(ke,Ce,Ce+6),this.words[qe]|=ze<<Ve&67108863,this.words[qe+1]|=ze>>>26-Ve&4194303,(Ve+=24)>=26&&(Ve-=26,qe++);Ce+6!==Ae&&(ze=s(ke,Ae,Ce+6),this.words[qe]|=ze<<Ve&67108863,this.words[qe+1]|=ze>>>26-Ve&4194303),this.strip()},n.prototype._parseBase=function(ke,Ae,Ce){this.words=[0],this.length=1;for(var qe=0,ze=1;ze<=67108863;ze*=Ae)qe++;qe--,ze=ze/Ae|0;for(var Ve=ke.length-Ce,tt=Ve%qe,rt=Math.min(Ve,Ve-tt)+Ce,it=0,nt=Ce;nt<rt;nt+=qe)it=o(ke,nt,nt+qe,Ae),this.imuln(ze),this.words[0]+it<67108864?this.words[0]+=it:this._iaddn(it);if(0!==tt){var ot=1;for(it=o(ke,nt,ke.length,Ae),nt=0;nt<tt;nt++)ot*=Ae;this.imuln(ot),this.words[0]+it<67108864?this.words[0]+=it:this._iaddn(it)}},n.prototype.copy=function(ke){ke.words=Array(this.length);for(var Ae=0;Ae<this.length;Ae++)ke.words[Ae]=this.words[Ae];ke.length=this.length,ke.negative=this.negative,ke.red=this.red},n.prototype.clone=function(){var ke=new n(null);return this.copy(ke),ke},n.prototype._expand=function(ke){for(;this.length<ke;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var qe=["","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"],ze=[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],Ve=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(ke,Ae,Ce){Ce.negative=Ae.negative^ke.negative;var qe=ke.length+Ae.length|0;Ce.length=qe,qe=qe-1|0;var ze=0|ke.words[0],Ve=0|Ae.words[0],tt=ze*Ve,rt=67108863&tt,it=tt/67108864|0;Ce.words[0]=rt;for(var nt=1;nt<qe;nt++){for(var ot=it>>>26,ct=67108863&it,ht=Math.min(nt,Ae.length-1),ft=Math.max(0,nt-ke.length+1);ft<=ht;ft++){var yt=nt-ft|0;ot+=(tt=(ze=0|ke.words[yt])*(Ve=0|Ae.words[ft])+ct)/67108864|0,ct=67108863&tt}Ce.words[nt]=0|ct,it=0|ot}return 0!==it?Ce.words[nt]=0|it:Ce.length--,Ce.strip()}n.prototype.toString=function(ke,Ae){var Ce;if(Ae=0|Ae||1,16===(ke=ke||10)||"hex"===ke){Ce="";for(var tt=0,rt=0,it=0;it<this.length;it++){var nt=this.words[it],ot=(16777215&(nt<<tt|rt)).toString(16);Ce=0!==(rt=nt>>>24-tt&16777215)||it!==this.length-1?qe[6-ot.length]+ot+Ce:ot+Ce,(tt+=2)>=26&&(tt-=26,it--)}for(0!==rt&&(Ce=rt.toString(16)+Ce);Ce.length%Ae!=0;)Ce="0"+Ce;return 0!==this.negative&&(Ce="-"+Ce),Ce}if(ke===(0|ke)&&ke>=2&&ke<=36){var ct=ze[ke],ht=Ve[ke];Ce="";var ft=this.clone();for(ft.negative=0;!ft.isZero();){var yt=ft.modn(ht).toString(ke);Ce=(ft=ft.idivn(ht)).isZero()?yt+Ce:qe[ct-yt.length]+yt+Ce}for(this.isZero()&&(Ce="0"+Ce);Ce.length%Ae!=0;)Ce="0"+Ce;return 0!==this.negative&&(Ce="-"+Ce),Ce}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var ke=this.words[0];return 2===this.length?ke+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ke+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ke:ke},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(ke,Ae){return r(void 0!==Ce),this.toArrayLike(Ce,ke,Ae)},n.prototype.toArray=function(ke,Ae){return this.toArrayLike(Array,ke,Ae)},n.prototype.toArrayLike=function(ke,Ae,Ce){var qe=this.byteLength(),ze=Ce||Math.max(1,qe);r(qe<=ze,"byte array longer than desired length"),r(ze>0,"Requested array length <= 0"),this.strip();var Ve,tt,rt="le"===Ae,it=new ke(ze),nt=this.clone();if(rt){for(tt=0;!nt.isZero();tt++)Ve=nt.andln(255),nt.iushrn(8),it[tt]=Ve;for(;tt<ze;tt++)it[tt]=0}else{for(tt=0;tt<ze-qe;tt++)it[tt]=0;for(tt=0;!nt.isZero();tt++)Ve=nt.andln(255),nt.iushrn(8),it[ze-tt-1]=Ve}return it},n.prototype._countBits=Math.clz32?function(ke){return 32-Math.clz32(ke)}:function(ke){var Ae=ke,Ce=0;return Ae>=4096&&(Ce+=13,Ae>>>=13),Ae>=64&&(Ce+=7,Ae>>>=7),Ae>=8&&(Ce+=4,Ae>>>=4),Ae>=2&&(Ce+=2,Ae>>>=2),Ce+Ae},n.prototype._zeroBits=function(ke){if(0===ke)return 26;var Ae=ke,Ce=0;return 0==(8191&Ae)&&(Ce+=13,Ae>>>=13),0==(127&Ae)&&(Ce+=7,Ae>>>=7),0==(15&Ae)&&(Ce+=4,Ae>>>=4),0==(3&Ae)&&(Ce+=2,Ae>>>=2),0==(1&Ae)&&Ce++,Ce},n.prototype.bitLength=function(){var ke=this.words[this.length-1],Ae=this._countBits(ke);return 26*(this.length-1)+Ae},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var ke=0,Ae=0;Ae<this.length;Ae++){var Ce=this._zeroBits(this.words[Ae]);if(ke+=Ce,26!==Ce)break}return ke},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(ke){return 0!==this.negative?this.abs().inotn(ke).iaddn(1):this.clone()},n.prototype.fromTwos=function(ke){return this.testn(ke-1)?this.notn(ke).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(ke){for(;this.length<ke.length;)this.words[this.length++]=0;for(var Ae=0;Ae<ke.length;Ae++)this.words[Ae]=this.words[Ae]|ke.words[Ae];return this.strip()},n.prototype.ior=function(ke){return r(0==(this.negative|ke.negative)),this.iuor(ke)},n.prototype.or=function(ke){return this.length>ke.length?this.clone().ior(ke):ke.clone().ior(this)},n.prototype.uor=function(ke){return this.length>ke.length?this.clone().iuor(ke):ke.clone().iuor(this)},n.prototype.iuand=function(ke){var Ae;Ae=this.length>ke.length?ke:this;for(var Ce=0;Ce<Ae.length;Ce++)this.words[Ce]=this.words[Ce]&ke.words[Ce];return this.length=Ae.length,this.strip()},n.prototype.iand=function(ke){return r(0==(this.negative|ke.negative)),this.iuand(ke)},n.prototype.and=function(ke){return this.length>ke.length?this.clone().iand(ke):ke.clone().iand(this)},n.prototype.uand=function(ke){return this.length>ke.length?this.clone().iuand(ke):ke.clone().iuand(this)},n.prototype.iuxor=function(ke){var Ae,Ce;this.length>ke.length?(Ae=this,Ce=ke):(Ae=ke,Ce=this);for(var qe=0;qe<Ce.length;qe++)this.words[qe]=Ae.words[qe]^Ce.words[qe];if(this!==Ae)for(;qe<Ae.length;qe++)this.words[qe]=Ae.words[qe];return this.length=Ae.length,this.strip()},n.prototype.ixor=function(ke){return r(0==(this.negative|ke.negative)),this.iuxor(ke)},n.prototype.xor=function(ke){return this.length>ke.length?this.clone().ixor(ke):ke.clone().ixor(this)},n.prototype.uxor=function(ke){return this.length>ke.length?this.clone().iuxor(ke):ke.clone().iuxor(this)},n.prototype.inotn=function(ke){r("number"==typeof ke&&ke>=0);var Ae=0|Math.ceil(ke/26),Ce=ke%26;this._expand(Ae),Ce>0&&Ae--;for(var qe=0;qe<Ae;qe++)this.words[qe]=67108863&~this.words[qe];return Ce>0&&(this.words[qe]=~this.words[qe]&67108863>>26-Ce),this.strip()},n.prototype.notn=function(ke){return this.clone().inotn(ke)},n.prototype.setn=function(ke,Ae){r("number"==typeof ke&&ke>=0);var Ce=ke/26|0,qe=ke%26;return this._expand(Ce+1),this.words[Ce]=Ae?this.words[Ce]|1<<qe:this.words[Ce]&~(1<<qe),this.strip()},n.prototype.iadd=function(ke){var Ae,Ce,qe;if(0!==this.negative&&0===ke.negative)return this.negative=0,Ae=this.isub(ke),this.negative^=1,this._normSign();if(0===this.negative&&0!==ke.negative)return ke.negative=0,Ae=this.isub(ke),ke.negative=1,Ae._normSign();this.length>ke.length?(Ce=this,qe=ke):(Ce=ke,qe=this);for(var ze=0,Ve=0;Ve<qe.length;Ve++)Ae=(0|Ce.words[Ve])+(0|qe.words[Ve])+ze,this.words[Ve]=67108863&Ae,ze=Ae>>>26;for(;0!==ze&&Ve<Ce.length;Ve++)Ae=(0|Ce.words[Ve])+ze,this.words[Ve]=67108863&Ae,ze=Ae>>>26;if(this.length=Ce.length,0!==ze)this.words[this.length]=ze,this.length++;else if(Ce!==this)for(;Ve<Ce.length;Ve++)this.words[Ve]=Ce.words[Ve];return this},n.prototype.add=function(ke){var Ae;return 0!==ke.negative&&0===this.negative?(ke.negative=0,Ae=this.sub(ke),ke.negative^=1,Ae):0===ke.negative&&0!==this.negative?(this.negative=0,Ae=ke.sub(this),this.negative=1,Ae):this.length>ke.length?this.clone().iadd(ke):ke.clone().iadd(this)},n.prototype.isub=function(ke){if(0!==ke.negative){ke.negative=0;var Ae=this.iadd(ke);return ke.negative=1,Ae._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(ke),this.negative=1,this._normSign();var Ce,qe,ze=this.cmp(ke);if(0===ze)return this.negative=0,this.length=1,this.words[0]=0,this;ze>0?(Ce=this,qe=ke):(Ce=ke,qe=this);for(var Ve=0,tt=0;tt<qe.length;tt++)Ve=(Ae=(0|Ce.words[tt])-(0|qe.words[tt])+Ve)>>26,this.words[tt]=67108863&Ae;for(;0!==Ve&&tt<Ce.length;tt++)Ve=(Ae=(0|Ce.words[tt])+Ve)>>26,this.words[tt]=67108863&Ae;if(0===Ve&&tt<Ce.length&&Ce!==this)for(;tt<Ce.length;tt++)this.words[tt]=Ce.words[tt];return this.length=Math.max(this.length,tt),Ce!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(ke){return this.clone().isub(ke)};var l=function(ke,Ae,Ce){var qe,ze,Ve,tt=ke.words,rt=Ae.words,it=Ce.words,nt=0,ot=0|tt[0],ct=8191&ot,ht=ot>>>13,ft=0|tt[1],yt=8191&ft,mt=ft>>>13,kt=0|tt[2],St=8191&kt,Et=kt>>>13,Pt=0|tt[3],Dt=8191&Pt,Rt=Pt>>>13,Bt=0|tt[4],Tt=8191&Bt,Ut=Bt>>>13,Kt=0|tt[5],It=8191&Kt,Ot=Kt>>>13,Nt=0|tt[6],qt=8191&Nt,zt=Nt>>>13,Ft=0|tt[7],Lt=8191&Ft,Ht=Ft>>>13,Gt=0|tt[8],$t=8191&Gt,Vt=Gt>>>13,Zt=0|tt[9],Yt=8191&Zt,Jt=Zt>>>13,Xt=0|rt[0],Qt=8191&Xt,er=Xt>>>13,tr=0|rt[1],rr=8191&tr,ir=tr>>>13,nr=0|rt[2],sr=8191&nr,vr=nr>>>13,_r=0|rt[3],kr=8191&_r,Ar=_r>>>13,Sr=0|rt[4],Er=8191&Sr,xr=Sr>>>13,Dr=0|rt[5],Rr=8191&Dr,Br=Dr>>>13,Ur=0|rt[6],Ir=8191&Ur,Lr=Ur>>>13,Gr=0|rt[7],$r=8191&Gr,Vr=Gr>>>13,Jr=0|rt[8],Qr=8191&Jr,ti=Jr>>>13,ri=0|rt[9],si=8191&ri,ai=ri>>>13;Ce.negative=ke.negative^Ae.negative,Ce.length=19;var ui=(nt+(qe=Math.imul(ct,Qt))|0)+((8191&(ze=(ze=Math.imul(ct,er))+Math.imul(ht,Qt)|0))<<13)|0;nt=((Ve=Math.imul(ht,er))+(ze>>>13)|0)+(ui>>>26)|0,ui&=67108863,qe=Math.imul(yt,Qt),ze=(ze=Math.imul(yt,er))+Math.imul(mt,Qt)|0,Ve=Math.imul(mt,er);var hi=(nt+(qe=qe+Math.imul(ct,rr)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,ir)|0)+Math.imul(ht,rr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,ir)|0)+(ze>>>13)|0)+(hi>>>26)|0,hi&=67108863,qe=Math.imul(St,Qt),ze=(ze=Math.imul(St,er))+Math.imul(Et,Qt)|0,Ve=Math.imul(Et,er),qe=qe+Math.imul(yt,rr)|0,ze=(ze=ze+Math.imul(yt,ir)|0)+Math.imul(mt,rr)|0,Ve=Ve+Math.imul(mt,ir)|0;var pi=(nt+(qe=qe+Math.imul(ct,sr)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,vr)|0)+Math.imul(ht,sr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,vr)|0)+(ze>>>13)|0)+(pi>>>26)|0,pi&=67108863,qe=Math.imul(Dt,Qt),ze=(ze=Math.imul(Dt,er))+Math.imul(Rt,Qt)|0,Ve=Math.imul(Rt,er),qe=qe+Math.imul(St,rr)|0,ze=(ze=ze+Math.imul(St,ir)|0)+Math.imul(Et,rr)|0,Ve=Ve+Math.imul(Et,ir)|0,qe=qe+Math.imul(yt,sr)|0,ze=(ze=ze+Math.imul(yt,vr)|0)+Math.imul(mt,sr)|0,Ve=Ve+Math.imul(mt,vr)|0;var yi=(nt+(qe=qe+Math.imul(ct,kr)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,Ar)|0)+Math.imul(ht,kr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Ar)|0)+(ze>>>13)|0)+(yi>>>26)|0,yi&=67108863,qe=Math.imul(Tt,Qt),ze=(ze=Math.imul(Tt,er))+Math.imul(Ut,Qt)|0,Ve=Math.imul(Ut,er),qe=qe+Math.imul(Dt,rr)|0,ze=(ze=ze+Math.imul(Dt,ir)|0)+Math.imul(Rt,rr)|0,Ve=Ve+Math.imul(Rt,ir)|0,qe=qe+Math.imul(St,sr)|0,ze=(ze=ze+Math.imul(St,vr)|0)+Math.imul(Et,sr)|0,Ve=Ve+Math.imul(Et,vr)|0,qe=qe+Math.imul(yt,kr)|0,ze=(ze=ze+Math.imul(yt,Ar)|0)+Math.imul(mt,kr)|0,Ve=Ve+Math.imul(mt,Ar)|0;var mi=(nt+(qe=qe+Math.imul(ct,Er)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,xr)|0)+Math.imul(ht,Er)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,xr)|0)+(ze>>>13)|0)+(mi>>>26)|0,mi&=67108863,qe=Math.imul(It,Qt),ze=(ze=Math.imul(It,er))+Math.imul(Ot,Qt)|0,Ve=Math.imul(Ot,er),qe=qe+Math.imul(Tt,rr)|0,ze=(ze=ze+Math.imul(Tt,ir)|0)+Math.imul(Ut,rr)|0,Ve=Ve+Math.imul(Ut,ir)|0,qe=qe+Math.imul(Dt,sr)|0,ze=(ze=ze+Math.imul(Dt,vr)|0)+Math.imul(Rt,sr)|0,Ve=Ve+Math.imul(Rt,vr)|0,qe=qe+Math.imul(St,kr)|0,ze=(ze=ze+Math.imul(St,Ar)|0)+Math.imul(Et,kr)|0,Ve=Ve+Math.imul(Et,Ar)|0,qe=qe+Math.imul(yt,Er)|0,ze=(ze=ze+Math.imul(yt,xr)|0)+Math.imul(mt,Er)|0,Ve=Ve+Math.imul(mt,xr)|0;var gi=(nt+(qe=qe+Math.imul(ct,Rr)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,Br)|0)+Math.imul(ht,Rr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Br)|0)+(ze>>>13)|0)+(gi>>>26)|0,gi&=67108863,qe=Math.imul(qt,Qt),ze=(ze=Math.imul(qt,er))+Math.imul(zt,Qt)|0,Ve=Math.imul(zt,er),qe=qe+Math.imul(It,rr)|0,ze=(ze=ze+Math.imul(It,ir)|0)+Math.imul(Ot,rr)|0,Ve=Ve+Math.imul(Ot,ir)|0,qe=qe+Math.imul(Tt,sr)|0,ze=(ze=ze+Math.imul(Tt,vr)|0)+Math.imul(Ut,sr)|0,Ve=Ve+Math.imul(Ut,vr)|0,qe=qe+Math.imul(Dt,kr)|0,ze=(ze=ze+Math.imul(Dt,Ar)|0)+Math.imul(Rt,kr)|0,Ve=Ve+Math.imul(Rt,Ar)|0,qe=qe+Math.imul(St,Er)|0,ze=(ze=ze+Math.imul(St,xr)|0)+Math.imul(Et,Er)|0,Ve=Ve+Math.imul(Et,xr)|0,qe=qe+Math.imul(yt,Rr)|0,ze=(ze=ze+Math.imul(yt,Br)|0)+Math.imul(mt,Rr)|0,Ve=Ve+Math.imul(mt,Br)|0;var bi=(nt+(qe=qe+Math.imul(ct,Ir)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,Lr)|0)+Math.imul(ht,Ir)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Lr)|0)+(ze>>>13)|0)+(bi>>>26)|0,bi&=67108863,qe=Math.imul(Lt,Qt),ze=(ze=Math.imul(Lt,er))+Math.imul(Ht,Qt)|0,Ve=Math.imul(Ht,er),qe=qe+Math.imul(qt,rr)|0,ze=(ze=ze+Math.imul(qt,ir)|0)+Math.imul(zt,rr)|0,Ve=Ve+Math.imul(zt,ir)|0,qe=qe+Math.imul(It,sr)|0,ze=(ze=ze+Math.imul(It,vr)|0)+Math.imul(Ot,sr)|0,Ve=Ve+Math.imul(Ot,vr)|0,qe=qe+Math.imul(Tt,kr)|0,ze=(ze=ze+Math.imul(Tt,Ar)|0)+Math.imul(Ut,kr)|0,Ve=Ve+Math.imul(Ut,Ar)|0,qe=qe+Math.imul(Dt,Er)|0,ze=(ze=ze+Math.imul(Dt,xr)|0)+Math.imul(Rt,Er)|0,Ve=Ve+Math.imul(Rt,xr)|0,qe=qe+Math.imul(St,Rr)|0,ze=(ze=ze+Math.imul(St,Br)|0)+Math.imul(Et,Rr)|0,Ve=Ve+Math.imul(Et,Br)|0,qe=qe+Math.imul(yt,Ir)|0,ze=(ze=ze+Math.imul(yt,Lr)|0)+Math.imul(mt,Ir)|0,Ve=Ve+Math.imul(mt,Lr)|0;var vi=(nt+(qe=qe+Math.imul(ct,$r)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,Vr)|0)+Math.imul(ht,$r)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Vr)|0)+(ze>>>13)|0)+(vi>>>26)|0,vi&=67108863,qe=Math.imul($t,Qt),ze=(ze=Math.imul($t,er))+Math.imul(Vt,Qt)|0,Ve=Math.imul(Vt,er),qe=qe+Math.imul(Lt,rr)|0,ze=(ze=ze+Math.imul(Lt,ir)|0)+Math.imul(Ht,rr)|0,Ve=Ve+Math.imul(Ht,ir)|0,qe=qe+Math.imul(qt,sr)|0,ze=(ze=ze+Math.imul(qt,vr)|0)+Math.imul(zt,sr)|0,Ve=Ve+Math.imul(zt,vr)|0,qe=qe+Math.imul(It,kr)|0,ze=(ze=ze+Math.imul(It,Ar)|0)+Math.imul(Ot,kr)|0,Ve=Ve+Math.imul(Ot,Ar)|0,qe=qe+Math.imul(Tt,Er)|0,ze=(ze=ze+Math.imul(Tt,xr)|0)+Math.imul(Ut,Er)|0,Ve=Ve+Math.imul(Ut,xr)|0,qe=qe+Math.imul(Dt,Rr)|0,ze=(ze=ze+Math.imul(Dt,Br)|0)+Math.imul(Rt,Rr)|0,Ve=Ve+Math.imul(Rt,Br)|0,qe=qe+Math.imul(St,Ir)|0,ze=(ze=ze+Math.imul(St,Lr)|0)+Math.imul(Et,Ir)|0,Ve=Ve+Math.imul(Et,Lr)|0,qe=qe+Math.imul(yt,$r)|0,ze=(ze=ze+Math.imul(yt,Vr)|0)+Math.imul(mt,$r)|0,Ve=Ve+Math.imul(mt,Vr)|0;var wi=(nt+(qe=qe+Math.imul(ct,Qr)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,ti)|0)+Math.imul(ht,Qr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,ti)|0)+(ze>>>13)|0)+(wi>>>26)|0,wi&=67108863,qe=Math.imul(Yt,Qt),ze=(ze=Math.imul(Yt,er))+Math.imul(Jt,Qt)|0,Ve=Math.imul(Jt,er),qe=qe+Math.imul($t,rr)|0,ze=(ze=ze+Math.imul($t,ir)|0)+Math.imul(Vt,rr)|0,Ve=Ve+Math.imul(Vt,ir)|0,qe=qe+Math.imul(Lt,sr)|0,ze=(ze=ze+Math.imul(Lt,vr)|0)+Math.imul(Ht,sr)|0,Ve=Ve+Math.imul(Ht,vr)|0,qe=qe+Math.imul(qt,kr)|0,ze=(ze=ze+Math.imul(qt,Ar)|0)+Math.imul(zt,kr)|0,Ve=Ve+Math.imul(zt,Ar)|0,qe=qe+Math.imul(It,Er)|0,ze=(ze=ze+Math.imul(It,xr)|0)+Math.imul(Ot,Er)|0,Ve=Ve+Math.imul(Ot,xr)|0,qe=qe+Math.imul(Tt,Rr)|0,ze=(ze=ze+Math.imul(Tt,Br)|0)+Math.imul(Ut,Rr)|0,Ve=Ve+Math.imul(Ut,Br)|0,qe=qe+Math.imul(Dt,Ir)|0,ze=(ze=ze+Math.imul(Dt,Lr)|0)+Math.imul(Rt,Ir)|0,Ve=Ve+Math.imul(Rt,Lr)|0,qe=qe+Math.imul(St,$r)|0,ze=(ze=ze+Math.imul(St,Vr)|0)+Math.imul(Et,$r)|0,Ve=Ve+Math.imul(Et,Vr)|0,qe=qe+Math.imul(yt,Qr)|0,ze=(ze=ze+Math.imul(yt,ti)|0)+Math.imul(mt,Qr)|0,Ve=Ve+Math.imul(mt,ti)|0;var _i=(nt+(qe=qe+Math.imul(ct,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(ct,ai)|0)+Math.imul(ht,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,ai)|0)+(ze>>>13)|0)+(_i>>>26)|0,_i&=67108863,qe=Math.imul(Yt,rr),ze=(ze=Math.imul(Yt,ir))+Math.imul(Jt,rr)|0,Ve=Math.imul(Jt,ir),qe=qe+Math.imul($t,sr)|0,ze=(ze=ze+Math.imul($t,vr)|0)+Math.imul(Vt,sr)|0,Ve=Ve+Math.imul(Vt,vr)|0,qe=qe+Math.imul(Lt,kr)|0,ze=(ze=ze+Math.imul(Lt,Ar)|0)+Math.imul(Ht,kr)|0,Ve=Ve+Math.imul(Ht,Ar)|0,qe=qe+Math.imul(qt,Er)|0,ze=(ze=ze+Math.imul(qt,xr)|0)+Math.imul(zt,Er)|0,Ve=Ve+Math.imul(zt,xr)|0,qe=qe+Math.imul(It,Rr)|0,ze=(ze=ze+Math.imul(It,Br)|0)+Math.imul(Ot,Rr)|0,Ve=Ve+Math.imul(Ot,Br)|0,qe=qe+Math.imul(Tt,Ir)|0,ze=(ze=ze+Math.imul(Tt,Lr)|0)+Math.imul(Ut,Ir)|0,Ve=Ve+Math.imul(Ut,Lr)|0,qe=qe+Math.imul(Dt,$r)|0,ze=(ze=ze+Math.imul(Dt,Vr)|0)+Math.imul(Rt,$r)|0,Ve=Ve+Math.imul(Rt,Vr)|0,qe=qe+Math.imul(St,Qr)|0,ze=(ze=ze+Math.imul(St,ti)|0)+Math.imul(Et,Qr)|0,Ve=Ve+Math.imul(Et,ti)|0;var Bi=(nt+(qe=qe+Math.imul(yt,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(yt,ai)|0)+Math.imul(mt,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(mt,ai)|0)+(ze>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,qe=Math.imul(Yt,sr),ze=(ze=Math.imul(Yt,vr))+Math.imul(Jt,sr)|0,Ve=Math.imul(Jt,vr),qe=qe+Math.imul($t,kr)|0,ze=(ze=ze+Math.imul($t,Ar)|0)+Math.imul(Vt,kr)|0,Ve=Ve+Math.imul(Vt,Ar)|0,qe=qe+Math.imul(Lt,Er)|0,ze=(ze=ze+Math.imul(Lt,xr)|0)+Math.imul(Ht,Er)|0,Ve=Ve+Math.imul(Ht,xr)|0,qe=qe+Math.imul(qt,Rr)|0,ze=(ze=ze+Math.imul(qt,Br)|0)+Math.imul(zt,Rr)|0,Ve=Ve+Math.imul(zt,Br)|0,qe=qe+Math.imul(It,Ir)|0,ze=(ze=ze+Math.imul(It,Lr)|0)+Math.imul(Ot,Ir)|0,Ve=Ve+Math.imul(Ot,Lr)|0,qe=qe+Math.imul(Tt,$r)|0,ze=(ze=ze+Math.imul(Tt,Vr)|0)+Math.imul(Ut,$r)|0,Ve=Ve+Math.imul(Ut,Vr)|0,qe=qe+Math.imul(Dt,Qr)|0,ze=(ze=ze+Math.imul(Dt,ti)|0)+Math.imul(Rt,Qr)|0,Ve=Ve+Math.imul(Rt,ti)|0;var Ti=(nt+(qe=qe+Math.imul(St,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(St,ai)|0)+Math.imul(Et,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Et,ai)|0)+(ze>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,qe=Math.imul(Yt,kr),ze=(ze=Math.imul(Yt,Ar))+Math.imul(Jt,kr)|0,Ve=Math.imul(Jt,Ar),qe=qe+Math.imul($t,Er)|0,ze=(ze=ze+Math.imul($t,xr)|0)+Math.imul(Vt,Er)|0,Ve=Ve+Math.imul(Vt,xr)|0,qe=qe+Math.imul(Lt,Rr)|0,ze=(ze=ze+Math.imul(Lt,Br)|0)+Math.imul(Ht,Rr)|0,Ve=Ve+Math.imul(Ht,Br)|0,qe=qe+Math.imul(qt,Ir)|0,ze=(ze=ze+Math.imul(qt,Lr)|0)+Math.imul(zt,Ir)|0,Ve=Ve+Math.imul(zt,Lr)|0,qe=qe+Math.imul(It,$r)|0,ze=(ze=ze+Math.imul(It,Vr)|0)+Math.imul(Ot,$r)|0,Ve=Ve+Math.imul(Ot,Vr)|0,qe=qe+Math.imul(Tt,Qr)|0,ze=(ze=ze+Math.imul(Tt,ti)|0)+Math.imul(Ut,Qr)|0,Ve=Ve+Math.imul(Ut,ti)|0;var Oi=(nt+(qe=qe+Math.imul(Dt,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(Dt,ai)|0)+Math.imul(Rt,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Rt,ai)|0)+(ze>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,qe=Math.imul(Yt,Er),ze=(ze=Math.imul(Yt,xr))+Math.imul(Jt,Er)|0,Ve=Math.imul(Jt,xr),qe=qe+Math.imul($t,Rr)|0,ze=(ze=ze+Math.imul($t,Br)|0)+Math.imul(Vt,Rr)|0,Ve=Ve+Math.imul(Vt,Br)|0,qe=qe+Math.imul(Lt,Ir)|0,ze=(ze=ze+Math.imul(Lt,Lr)|0)+Math.imul(Ht,Ir)|0,Ve=Ve+Math.imul(Ht,Lr)|0,qe=qe+Math.imul(qt,$r)|0,ze=(ze=ze+Math.imul(qt,Vr)|0)+Math.imul(zt,$r)|0,Ve=Ve+Math.imul(zt,Vr)|0,qe=qe+Math.imul(It,Qr)|0,ze=(ze=ze+Math.imul(It,ti)|0)+Math.imul(Ot,Qr)|0,Ve=Ve+Math.imul(Ot,ti)|0;var qi=(nt+(qe=qe+Math.imul(Tt,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(Tt,ai)|0)+Math.imul(Ut,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Ut,ai)|0)+(ze>>>13)|0)+(qi>>>26)|0,qi&=67108863,qe=Math.imul(Yt,Rr),ze=(ze=Math.imul(Yt,Br))+Math.imul(Jt,Rr)|0,Ve=Math.imul(Jt,Br),qe=qe+Math.imul($t,Ir)|0,ze=(ze=ze+Math.imul($t,Lr)|0)+Math.imul(Vt,Ir)|0,Ve=Ve+Math.imul(Vt,Lr)|0,qe=qe+Math.imul(Lt,$r)|0,ze=(ze=ze+Math.imul(Lt,Vr)|0)+Math.imul(Ht,$r)|0,Ve=Ve+Math.imul(Ht,Vr)|0,qe=qe+Math.imul(qt,Qr)|0,ze=(ze=ze+Math.imul(qt,ti)|0)+Math.imul(zt,Qr)|0,Ve=Ve+Math.imul(zt,ti)|0;var zi=(nt+(qe=qe+Math.imul(It,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(It,ai)|0)+Math.imul(Ot,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Ot,ai)|0)+(ze>>>13)|0)+(zi>>>26)|0,zi&=67108863,qe=Math.imul(Yt,Ir),ze=(ze=Math.imul(Yt,Lr))+Math.imul(Jt,Ir)|0,Ve=Math.imul(Jt,Lr),qe=qe+Math.imul($t,$r)|0,ze=(ze=ze+Math.imul($t,Vr)|0)+Math.imul(Vt,$r)|0,Ve=Ve+Math.imul(Vt,Vr)|0,qe=qe+Math.imul(Lt,Qr)|0,ze=(ze=ze+Math.imul(Lt,ti)|0)+Math.imul(Ht,Qr)|0,Ve=Ve+Math.imul(Ht,ti)|0;var Fi=(nt+(qe=qe+Math.imul(qt,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(qt,ai)|0)+Math.imul(zt,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(zt,ai)|0)+(ze>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,qe=Math.imul(Yt,$r),ze=(ze=Math.imul(Yt,Vr))+Math.imul(Jt,$r)|0,Ve=Math.imul(Jt,Vr),qe=qe+Math.imul($t,Qr)|0,ze=(ze=ze+Math.imul($t,ti)|0)+Math.imul(Vt,Qr)|0,Ve=Ve+Math.imul(Vt,ti)|0;var Gi=(nt+(qe=qe+Math.imul(Lt,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul(Lt,ai)|0)+Math.imul(Ht,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Ht,ai)|0)+(ze>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,qe=Math.imul(Yt,Qr),ze=(ze=Math.imul(Yt,ti))+Math.imul(Jt,Qr)|0,Ve=Math.imul(Jt,ti);var Vi=(nt+(qe=qe+Math.imul($t,si)|0)|0)+((8191&(ze=(ze=ze+Math.imul($t,ai)|0)+Math.imul(Vt,si)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Vt,ai)|0)+(ze>>>13)|0)+(Vi>>>26)|0,Vi&=67108863;var Yi=(nt+(qe=Math.imul(Yt,si))|0)+((8191&(ze=(ze=Math.imul(Yt,ai))+Math.imul(Jt,si)|0))<<13)|0;return nt=((Ve=Math.imul(Jt,ai))+(ze>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,it[0]=ui,it[1]=hi,it[2]=pi,it[3]=yi,it[4]=mi,it[5]=gi,it[6]=bi,it[7]=vi,it[8]=wi,it[9]=_i,it[10]=Bi,it[11]=Ti,it[12]=Oi,it[13]=qi,it[14]=zi,it[15]=Fi,it[16]=Gi,it[17]=Vi,it[18]=Yi,0!==nt&&(it[19]=nt,Ce.length++),Ce};function p(ke,Ae,Ce){return(new y).mulp(ke,Ae,Ce)}function y(ke,Ae){this.x=ke,this.y=Ae}Math.imul||(l=d),n.prototype.mulTo=function(ke,Ae){var Ce=this.length+ke.length;return 10===this.length&&10===ke.length?l(this,ke,Ae):Ce<63?d(this,ke,Ae):Ce<1024?function(ke,Ae,Ce){Ce.negative=Ae.negative^ke.negative,Ce.length=ke.length+Ae.length;for(var qe=0,ze=0,Ve=0;Ve<Ce.length-1;Ve++){var tt=ze;ze=0;for(var rt=67108863&qe,it=Math.min(Ve,Ae.length-1),nt=Math.max(0,Ve-ke.length+1);nt<=it;nt++){var ot=Ve-nt,ct=(0|ke.words[ot])*(0|Ae.words[nt]),ht=67108863&ct;rt=67108863&(ht=ht+rt|0),ze+=(tt=(tt=tt+(ct/67108864|0)|0)+(ht>>>26)|0)>>>26,tt&=67108863}Ce.words[Ve]=rt,qe=tt,tt=ze}return 0!==qe?Ce.words[Ve]=qe:Ce.length--,Ce.strip()}(this,ke,Ae):p(this,ke,Ae)},y.prototype.makeRBT=function(ke){for(var Ae=Array(ke),Ce=n.prototype._countBits(ke)-1,qe=0;qe<ke;qe++)Ae[qe]=this.revBin(qe,Ce,ke);return Ae},y.prototype.revBin=function(ke,Ae,Ce){if(0===ke||ke===Ce-1)return ke;for(var qe=0,ze=0;ze<Ae;ze++)qe|=(1&ke)<<Ae-ze-1,ke>>=1;return qe},y.prototype.permute=function(ke,Ae,Ce,qe,ze,Ve){for(var tt=0;tt<Ve;tt++)qe[tt]=Ae[ke[tt]],ze[tt]=Ce[ke[tt]]},y.prototype.transform=function(ke,Ae,Ce,qe,ze,Ve){this.permute(Ve,ke,Ae,Ce,qe,ze);for(var tt=1;tt<ze;tt<<=1)for(var rt=tt<<1,it=Math.cos(2*Math.PI/rt),nt=Math.sin(2*Math.PI/rt),ot=0;ot<ze;ot+=rt)for(var ct=it,ht=nt,ft=0;ft<tt;ft++){var yt=Ce[ot+ft],mt=qe[ot+ft],kt=Ce[ot+ft+tt],St=qe[ot+ft+tt],Et=ct*kt-ht*St;St=ct*St+ht*kt,kt=Et,Ce[ot+ft]=yt+kt,qe[ot+ft]=mt+St,Ce[ot+ft+tt]=yt-kt,qe[ot+ft+tt]=mt-St,ft!==rt&&(Et=it*ct-nt*ht,ht=it*ht+nt*ct,ct=Et)}},y.prototype.guessLen13b=function(ke,Ae){var Ce=1|Math.max(Ae,ke),qe=1&Ce,ze=0;for(Ce=Ce/2|0;Ce;Ce>>>=1)ze++;return 1<<ze+1+qe},y.prototype.conjugate=function(ke,Ae,Ce){if(!(Ce<=1))for(var qe=0;qe<Ce/2;qe++){var ze=ke[qe];ke[qe]=ke[Ce-qe-1],ke[Ce-qe-1]=ze,ze=Ae[qe],Ae[qe]=-Ae[Ce-qe-1],Ae[Ce-qe-1]=-ze}},y.prototype.normalize13b=function(ke,Ae){for(var Ce=0,qe=0;qe<Ae/2;qe++){var ze=8192*Math.round(ke[2*qe+1]/Ae)+Math.round(ke[2*qe]/Ae)+Ce;ke[qe]=67108863&ze,Ce=ze<67108864?0:ze/67108864|0}return ke},y.prototype.convert13b=function(ke,Ae,Ce,qe){for(var ze=0,Ve=0;Ve<Ae;Ve++)ze+=0|ke[Ve],Ce[2*Ve]=8191&ze,ze>>>=13,Ce[2*Ve+1]=8191&ze,ze>>>=13;for(Ve=2*Ae;Ve<qe;++Ve)Ce[Ve]=0;r(0===ze),r(0==(-8192&ze))},y.prototype.stub=function(ke){for(var Ae=Array(ke),Ce=0;Ce<ke;Ce++)Ae[Ce]=0;return Ae},y.prototype.mulp=function(ke,Ae,Ce){var qe=2*this.guessLen13b(ke.length,Ae.length),ze=this.makeRBT(qe),Ve=this.stub(qe),tt=Array(qe),rt=Array(qe),it=Array(qe),nt=Array(qe),ot=Array(qe),ct=Array(qe),ht=Ce.words;ht.length=qe,this.convert13b(ke.words,ke.length,tt,qe),this.convert13b(Ae.words,Ae.length,nt,qe),this.transform(tt,Ve,rt,it,qe,ze),this.transform(nt,Ve,ot,ct,qe,ze);for(var ft=0;ft<qe;ft++){var yt=rt[ft]*ot[ft]-it[ft]*ct[ft];it[ft]=rt[ft]*ct[ft]+it[ft]*ot[ft],rt[ft]=yt}return this.conjugate(rt,it,qe),this.transform(rt,it,ht,Ve,qe,ze),this.conjugate(ht,Ve,qe),this.normalize13b(ht,qe),Ce.negative=ke.negative^Ae.negative,Ce.length=ke.length+Ae.length,Ce.strip()},n.prototype.mul=function(ke){var Ae=new n(null);return Ae.words=Array(this.length+ke.length),this.mulTo(ke,Ae)},n.prototype.mulf=function(ke){var Ae=new n(null);return Ae.words=Array(this.length+ke.length),p(this,ke,Ae)},n.prototype.imul=function(ke){return this.clone().mulTo(ke,this)},n.prototype.imuln=function(ke){r("number"==typeof ke),r(ke<67108864);for(var Ae=0,Ce=0;Ce<this.length;Ce++){var qe=(0|this.words[Ce])*ke,ze=(67108863&qe)+(67108863&Ae);Ae>>=26,Ae+=qe/67108864|0,Ae+=ze>>>26,this.words[Ce]=67108863&ze}return 0!==Ae&&(this.words[Ce]=Ae,this.length++),this},n.prototype.muln=function(ke){return this.clone().imuln(ke)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(ke){var Ae=function(ke){for(var Ae=Array(ke.bitLength()),Ce=0;Ce<Ae.length;Ce++){var qe=Ce/26|0,ze=Ce%26;Ae[Ce]=(ke.words[qe]&1<<ze)>>>ze}return Ae}(ke);if(0===Ae.length)return new n(1);for(var Ce=this,qe=0;qe<Ae.length&&0===Ae[qe];qe++,Ce=Ce.sqr());if(++qe<Ae.length)for(var ze=Ce.sqr();qe<Ae.length;qe++,ze=ze.sqr())0!==Ae[qe]&&(Ce=Ce.mul(ze));return Ce},n.prototype.iushln=function(ke){r("number"==typeof ke&&ke>=0);var Ae,Ce=ke%26,qe=(ke-Ce)/26,ze=67108863>>>26-Ce<<26-Ce;if(0!==Ce){var Ve=0;for(Ae=0;Ae<this.length;Ae++){var tt=this.words[Ae]&ze,rt=(0|this.words[Ae])-tt<<Ce;this.words[Ae]=rt|Ve,Ve=tt>>>26-Ce}Ve&&(this.words[Ae]=Ve,this.length++)}if(0!==qe){for(Ae=this.length-1;Ae>=0;Ae--)this.words[Ae+qe]=this.words[Ae];for(Ae=0;Ae<qe;Ae++)this.words[Ae]=0;this.length+=qe}return this.strip()},n.prototype.ishln=function(ke){return r(0===this.negative),this.iushln(ke)},n.prototype.iushrn=function(ke,Ae,Ce){var qe;r("number"==typeof ke&&ke>=0),qe=Ae?(Ae-Ae%26)/26:0;var ze=ke%26,Ve=Math.min((ke-ze)/26,this.length),tt=67108863^67108863>>>ze<<ze,rt=Ce;if(qe=Math.max(0,qe-=Ve),rt){for(var it=0;it<Ve;it++)rt.words[it]=this.words[it];rt.length=Ve}if(0===Ve);else if(this.length>Ve)for(this.length-=Ve,it=0;it<this.length;it++)this.words[it]=this.words[it+Ve];else this.words[0]=0,this.length=1;var nt=0;for(it=this.length-1;it>=0&&(0!==nt||it>=qe);it--){var ot=0|this.words[it];this.words[it]=nt<<26-ze|ot>>>ze,nt=ot&tt}return rt&&0!==nt&&(rt.words[rt.length++]=nt),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(ke,Ae,Ce){return r(0===this.negative),this.iushrn(ke,Ae,Ce)},n.prototype.shln=function(ke){return this.clone().ishln(ke)},n.prototype.ushln=function(ke){return this.clone().iushln(ke)},n.prototype.shrn=function(ke){return this.clone().ishrn(ke)},n.prototype.ushrn=function(ke){return this.clone().iushrn(ke)},n.prototype.testn=function(ke){r("number"==typeof ke&&ke>=0);var Ae=ke%26,Ce=(ke-Ae)/26,qe=1<<Ae;return!(this.length<=Ce)&&!!(this.words[Ce]&qe)},n.prototype.imaskn=function(ke){r("number"==typeof ke&&ke>=0);var Ae=ke%26,Ce=(ke-Ae)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=Ce)return this;if(0!==Ae&&Ce++,this.length=Math.min(Ce,this.length),0!==Ae){var qe=67108863^67108863>>>Ae<<Ae;this.words[this.length-1]&=qe}return this.strip()},n.prototype.maskn=function(ke){return this.clone().imaskn(ke)},n.prototype.iaddn=function(ke){return r("number"==typeof ke),r(ke<67108864),ke<0?this.isubn(-ke):0!==this.negative?1===this.length&&(0|this.words[0])<ke?(this.words[0]=ke-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(ke),this.negative=1,this):this._iaddn(ke)},n.prototype._iaddn=function(ke){this.words[0]+=ke;for(var Ae=0;Ae<this.length&&this.words[Ae]>=67108864;Ae++)this.words[Ae]-=67108864,Ae===this.length-1?this.words[Ae+1]=1:this.words[Ae+1]++;return this.length=Math.max(this.length,Ae+1),this},n.prototype.isubn=function(ke){if(r("number"==typeof ke),r(ke<67108864),ke<0)return this.iaddn(-ke);if(0!==this.negative)return this.negative=0,this.iaddn(ke),this.negative=1,this;if(this.words[0]-=ke,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Ae=0;Ae<this.length&&this.words[Ae]<0;Ae++)this.words[Ae]+=67108864,this.words[Ae+1]-=1;return this.strip()},n.prototype.addn=function(ke){return this.clone().iaddn(ke)},n.prototype.subn=function(ke){return this.clone().isubn(ke)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(ke,Ae,Ce){var qe,ze,Ve=ke.length+Ce;this._expand(Ve);var tt=0;for(qe=0;qe<ke.length;qe++){ze=(0|this.words[qe+Ce])+tt;var rt=(0|ke.words[qe])*Ae;tt=((ze-=67108863&rt)>>26)-(rt/67108864|0),this.words[qe+Ce]=67108863&ze}for(;qe<this.length-Ce;qe++)tt=(ze=(0|this.words[qe+Ce])+tt)>>26,this.words[qe+Ce]=67108863&ze;if(0===tt)return this.strip();for(r(-1===tt),tt=0,qe=0;qe<this.length;qe++)tt=(ze=-(0|this.words[qe])+tt)>>26,this.words[qe]=67108863&ze;return this.negative=1,this.strip()},n.prototype._wordDiv=function(ke,Ae){var Ce=(this.length,ke.length),qe=this.clone(),ze=ke,Ve=0|ze.words[ze.length-1];0!==(Ce=26-this._countBits(Ve))&&(ze=ze.ushln(Ce),qe.iushln(Ce),Ve=0|ze.words[ze.length-1]);var tt,rt=qe.length-ze.length;if("mod"!==Ae){(tt=new n(null)).length=rt+1,tt.words=Array(tt.length);for(var it=0;it<tt.length;it++)tt.words[it]=0}var nt=qe.clone()._ishlnsubmul(ze,1,rt);0===nt.negative&&(qe=nt,tt&&(tt.words[rt]=1));for(var ot=rt-1;ot>=0;ot--){var ct=67108864*(0|qe.words[ze.length+ot])+(0|qe.words[ze.length+ot-1]);for(ct=Math.min(ct/Ve|0,67108863),qe._ishlnsubmul(ze,ct,ot);0!==qe.negative;)ct--,qe.negative=0,qe._ishlnsubmul(ze,1,ot),qe.isZero()||(qe.negative^=1);tt&&(tt.words[ot]=ct)}return tt&&tt.strip(),qe.strip(),"div"!==Ae&&0!==Ce&&qe.iushrn(Ce),{div:tt||null,mod:qe}},n.prototype.divmod=function(ke,Ae,Ce){return r(!ke.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===ke.negative?(Ve=this.neg().divmod(ke,Ae),"mod"!==Ae&&(qe=Ve.div.neg()),"div"!==Ae&&(ze=Ve.mod.neg(),Ce&&0!==ze.negative&&ze.iadd(ke)),{div:qe,mod:ze}):0===this.negative&&0!==ke.negative?(Ve=this.divmod(ke.neg(),Ae),"mod"!==Ae&&(qe=Ve.div.neg()),{div:qe,mod:Ve.mod}):0!=(this.negative&ke.negative)?(Ve=this.neg().divmod(ke.neg(),Ae),"div"!==Ae&&(ze=Ve.mod.neg(),Ce&&0!==ze.negative&&ze.isub(ke)),{div:Ve.div,mod:ze}):ke.length>this.length||this.cmp(ke)<0?{div:new n(0),mod:this}:1===ke.length?"div"===Ae?{div:this.divn(ke.words[0]),mod:null}:"mod"===Ae?{div:null,mod:new n(this.modn(ke.words[0]))}:{div:this.divn(ke.words[0]),mod:new n(this.modn(ke.words[0]))}:this._wordDiv(ke,Ae);var qe,ze,Ve},n.prototype.div=function(ke){return this.divmod(ke,"div",!1).div},n.prototype.mod=function(ke){return this.divmod(ke,"mod",!1).mod},n.prototype.umod=function(ke){return this.divmod(ke,"mod",!0).mod},n.prototype.divRound=function(ke){var Ae=this.divmod(ke);if(Ae.mod.isZero())return Ae.div;var Ce=0!==Ae.div.negative?Ae.mod.isub(ke):Ae.mod,qe=ke.ushrn(1),ze=ke.andln(1),Ve=Ce.cmp(qe);return Ve<0||1===ze&&0===Ve?Ae.div:0!==Ae.div.negative?Ae.div.isubn(1):Ae.div.iaddn(1)},n.prototype.modn=function(ke){r(ke<=67108863);for(var Ae=(1<<26)%ke,Ce=0,qe=this.length-1;qe>=0;qe--)Ce=(Ae*Ce+(0|this.words[qe]))%ke;return Ce},n.prototype.idivn=function(ke){r(ke<=67108863);for(var Ae=0,Ce=this.length-1;Ce>=0;Ce--){var qe=(0|this.words[Ce])+67108864*Ae;this.words[Ce]=qe/ke|0,Ae=qe%ke}return this.strip()},n.prototype.divn=function(ke){return this.clone().idivn(ke)},n.prototype.egcd=function(ke){r(0===ke.negative),r(!ke.isZero());var Ae=this,Ce=ke.clone();Ae=0!==Ae.negative?Ae.umod(ke):Ae.clone();for(var qe=new n(1),ze=new n(0),Ve=new n(0),tt=new n(1),rt=0;Ae.isEven()&&Ce.isEven();)Ae.iushrn(1),Ce.iushrn(1),++rt;for(var it=Ce.clone(),nt=Ae.clone();!Ae.isZero();){for(var ot=0,ct=1;0==(Ae.words[0]&ct)&&ot<26;++ot,ct<<=1);if(ot>0)for(Ae.iushrn(ot);ot-- >0;)(qe.isOdd()||ze.isOdd())&&(qe.iadd(it),ze.isub(nt)),qe.iushrn(1),ze.iushrn(1);for(var ht=0,ft=1;0==(Ce.words[0]&ft)&&ht<26;++ht,ft<<=1);if(ht>0)for(Ce.iushrn(ht);ht-- >0;)(Ve.isOdd()||tt.isOdd())&&(Ve.iadd(it),tt.isub(nt)),Ve.iushrn(1),tt.iushrn(1);Ae.cmp(Ce)>=0?(Ae.isub(Ce),qe.isub(Ve),ze.isub(tt)):(Ce.isub(Ae),Ve.isub(qe),tt.isub(ze))}return{a:Ve,b:tt,gcd:Ce.iushln(rt)}},n.prototype._invmp=function(ke){r(0===ke.negative),r(!ke.isZero());var Ae=this,Ce=ke.clone();Ae=0!==Ae.negative?Ae.umod(ke):Ae.clone();for(var qe,ze=new n(1),Ve=new n(0),tt=Ce.clone();Ae.cmpn(1)>0&&Ce.cmpn(1)>0;){for(var rt=0,it=1;0==(Ae.words[0]&it)&&rt<26;++rt,it<<=1);if(rt>0)for(Ae.iushrn(rt);rt-- >0;)ze.isOdd()&&ze.iadd(tt),ze.iushrn(1);for(var nt=0,ot=1;0==(Ce.words[0]&ot)&&nt<26;++nt,ot<<=1);if(nt>0)for(Ce.iushrn(nt);nt-- >0;)Ve.isOdd()&&Ve.iadd(tt),Ve.iushrn(1);Ae.cmp(Ce)>=0?(Ae.isub(Ce),ze.isub(Ve)):(Ce.isub(Ae),Ve.isub(ze))}return(qe=0===Ae.cmpn(1)?ze:Ve).cmpn(0)<0&&qe.iadd(ke),qe},n.prototype.gcd=function(ke){if(this.isZero())return ke.abs();if(ke.isZero())return this.abs();var Ae=this.clone(),Ce=ke.clone();Ae.negative=0,Ce.negative=0;for(var qe=0;Ae.isEven()&&Ce.isEven();qe++)Ae.iushrn(1),Ce.iushrn(1);for(;;){for(;Ae.isEven();)Ae.iushrn(1);for(;Ce.isEven();)Ce.iushrn(1);var ze=Ae.cmp(Ce);if(ze<0){var Ve=Ae;Ae=Ce,Ce=Ve}else if(0===ze||0===Ce.cmpn(1))break;Ae.isub(Ce)}return Ce.iushln(qe)},n.prototype.invm=function(ke){return this.egcd(ke).a.umod(ke)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(ke){return this.words[0]&ke},n.prototype.bincn=function(ke){r("number"==typeof ke);var Ae=ke%26,Ce=(ke-Ae)/26,qe=1<<Ae;if(this.length<=Ce)return this._expand(Ce+1),this.words[Ce]|=qe,this;for(var ze=qe,Ve=Ce;0!==ze&&Ve<this.length;Ve++){var tt=0|this.words[Ve];ze=(tt+=ze)>>>26,tt&=67108863,this.words[Ve]=tt}return 0!==ze&&(this.words[Ve]=ze,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(ke){var Ae,Ce=ke<0;if(0!==this.negative&&!Ce)return-1;if(0===this.negative&&Ce)return 1;if(this.strip(),this.length>1)Ae=1;else{Ce&&(ke=-ke),r(ke<=67108863,"Number is too big");var qe=0|this.words[0];Ae=qe===ke?0:qe<ke?-1:1}return 0!==this.negative?0|-Ae:Ae},n.prototype.cmp=function(ke){if(0!==this.negative&&0===ke.negative)return-1;if(0===this.negative&&0!==ke.negative)return 1;var Ae=this.ucmp(ke);return 0!==this.negative?0|-Ae:Ae},n.prototype.ucmp=function(ke){if(this.length>ke.length)return 1;if(this.length<ke.length)return-1;for(var Ae=0,Ce=this.length-1;Ce>=0;Ce--){var qe=0|this.words[Ce],ze=0|ke.words[Ce];if(qe!==ze){qe<ze?Ae=-1:qe>ze&&(Ae=1);break}}return Ae},n.prototype.gtn=function(ke){return 1===this.cmpn(ke)},n.prototype.gt=function(ke){return 1===this.cmp(ke)},n.prototype.gten=function(ke){return this.cmpn(ke)>=0},n.prototype.gte=function(ke){return this.cmp(ke)>=0},n.prototype.ltn=function(ke){return-1===this.cmpn(ke)},n.prototype.lt=function(ke){return-1===this.cmp(ke)},n.prototype.lten=function(ke){return this.cmpn(ke)<=0},n.prototype.lte=function(ke){return this.cmp(ke)<=0},n.prototype.eqn=function(ke){return 0===this.cmpn(ke)},n.prototype.eq=function(ke){return 0===this.cmp(ke)},n.red=function(ke){return new k(ke)},n.prototype.toRed=function(ke){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),ke.convertTo(this)._forceRed(ke)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(ke){return this.red=ke,this},n.prototype.forceRed=function(ke){return r(!this.red,"Already a number in reduction context"),this._forceRed(ke)},n.prototype.redAdd=function(ke){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,ke)},n.prototype.redIAdd=function(ke){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,ke)},n.prototype.redSub=function(ke){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,ke)},n.prototype.redISub=function(ke){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,ke)},n.prototype.redShl=function(ke){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,ke)},n.prototype.redMul=function(ke){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,ke),this.red.mul(this,ke)},n.prototype.redIMul=function(ke){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,ke),this.red.imul(this,ke)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(ke){return r(this.red&&!ke.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,ke)};var tt={k256:null,p224:null,p192:null,p25519:null};function m(ke,Ae){this.name=ke,this.p=new n(Ae,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(ke){if("string"==typeof ke){var Ae=n._prime(ke);this.m=Ae.p,this.prime=Ae}else r(ke.gtn(1),"modulus must be greater than 1"),this.m=ke,this.prime=null}function A(ke){k.call(this,ke),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(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)}m.prototype._tmp=function(){var ke=new n(null);return ke.words=Array(Math.ceil(this.n/13)),ke},m.prototype.ireduce=function(ke){var Ae,Ce=ke;do{this.split(Ce,this.tmp),Ae=(Ce=(Ce=this.imulK(Ce)).iadd(this.tmp)).bitLength()}while(Ae>this.n);var qe=Ae<this.n?-1:Ce.ucmp(this.p);return 0===qe?(Ce.words[0]=0,Ce.length=1):qe>0?Ce.isub(this.p):Ce.strip(),Ce},m.prototype.split=function(ke,Ae){ke.iushrn(this.n,0,Ae)},m.prototype.imulK=function(ke){return ke.imul(this.k)},i(g,m),g.prototype.split=function(ke,Ae){for(var Ce=4194303,qe=Math.min(ke.length,9),ze=0;ze<qe;ze++)Ae.words[ze]=ke.words[ze];if(Ae.length=qe,ke.length<=9)return ke.words[0]=0,void(ke.length=1);var Ve=ke.words[9];for(Ae.words[Ae.length++]=Ve&Ce,ze=10;ze<ke.length;ze++){var tt=0|ke.words[ze];ke.words[ze-10]=(tt&Ce)<<4|Ve>>>22,Ve=tt}Ve>>>=22,ke.words[ze-10]=Ve,0===Ve&&ke.length>10?ke.length-=10:ke.length-=9},g.prototype.imulK=function(ke){ke.words[ke.length]=0,ke.words[ke.length+1]=0,ke.length+=2;for(var Ae=0,Ce=0;Ce<ke.length;Ce++){var qe=0|ke.words[Ce];Ae+=977*qe,ke.words[Ce]=67108863&Ae,Ae=64*qe+(Ae/67108864|0)}return 0===ke.words[ke.length-1]&&(ke.length--,0===ke.words[ke.length-1]&&ke.length--),ke},i(w,m),i(v,m),i(_,m),_.prototype.imulK=function(ke){for(var Ae=0,Ce=0;Ce<ke.length;Ce++){var qe=19*(0|ke.words[Ce])+Ae,ze=67108863&qe;qe>>>=26,ke.words[Ce]=ze,Ae=qe}return 0!==Ae&&(ke.words[ke.length++]=Ae),ke},n._prime=function(ke){if(tt[ke])return tt[ke];var Ae;if("k256"===ke)Ae=new g;else if("p224"===ke)Ae=new w;else if("p192"===ke)Ae=new v;else{if("p25519"!==ke)throw Error("Unknown prime "+ke);Ae=new _}return tt[ke]=Ae,Ae},k.prototype._verify1=function(ke){r(0===ke.negative,"red works only with positives"),r(ke.red,"red works only with red numbers")},k.prototype._verify2=function(ke,Ae){r(0==(ke.negative|Ae.negative),"red works only with positives"),r(ke.red&&ke.red===Ae.red,"red works only with red numbers")},k.prototype.imod=function(ke){return this.prime?this.prime.ireduce(ke)._forceRed(this):ke.umod(this.m)._forceRed(this)},k.prototype.neg=function(ke){return ke.isZero()?ke.clone():this.m.sub(ke)._forceRed(this)},k.prototype.add=function(ke,Ae){this._verify2(ke,Ae);var Ce=ke.add(Ae);return Ce.cmp(this.m)>=0&&Ce.isub(this.m),Ce._forceRed(this)},k.prototype.iadd=function(ke,Ae){this._verify2(ke,Ae);var Ce=ke.iadd(Ae);return Ce.cmp(this.m)>=0&&Ce.isub(this.m),Ce},k.prototype.sub=function(ke,Ae){this._verify2(ke,Ae);var Ce=ke.sub(Ae);return Ce.cmpn(0)<0&&Ce.iadd(this.m),Ce._forceRed(this)},k.prototype.isub=function(ke,Ae){this._verify2(ke,Ae);var Ce=ke.isub(Ae);return Ce.cmpn(0)<0&&Ce.iadd(this.m),Ce},k.prototype.shl=function(ke,Ae){return this._verify1(ke),this.imod(ke.ushln(Ae))},k.prototype.imul=function(ke,Ae){return this._verify2(ke,Ae),this.imod(ke.imul(Ae))},k.prototype.mul=function(ke,Ae){return this._verify2(ke,Ae),this.imod(ke.mul(Ae))},k.prototype.isqr=function(ke){return this.imul(ke,ke.clone())},k.prototype.sqr=function(ke){return this.mul(ke,ke)},k.prototype.sqrt=function(ke){if(ke.isZero())return ke.clone();var Ae=this.m.andln(3);if(r(Ae%2==1),3===Ae){var Ce=this.m.add(new n(1)).iushrn(2);return this.pow(ke,Ce)}for(var qe=this.m.subn(1),ze=0;!qe.isZero()&&0===qe.andln(1);)ze++,qe.iushrn(1);r(!qe.isZero());var Ve=new n(1).toRed(this),tt=Ve.redNeg(),rt=this.m.subn(1).iushrn(1),it=this.m.bitLength();for(it=new n(2*it*it).toRed(this);0!==this.pow(it,rt).cmp(tt);)it.redIAdd(tt);for(var nt=this.pow(it,qe),ot=this.pow(ke,qe.addn(1).iushrn(1)),ct=this.pow(ke,qe),ht=ze;0!==ct.cmp(Ve);){for(var ft=ct,yt=0;0!==ft.cmp(Ve);yt++)ft=ft.redSqr();r(yt<ht);var mt=this.pow(nt,new n(1).iushln(ht-yt-1));ot=ot.redMul(mt),nt=mt.redSqr(),ct=ct.redMul(nt),ht=yt}return ot},k.prototype.invm=function(ke){var Ae=ke._invmp(this.m);return 0!==Ae.negative?(Ae.negative=0,this.imod(Ae).redNeg()):this.imod(Ae)},k.prototype.pow=function(ke,Ae){if(Ae.isZero())return new n(1).toRed(this);if(0===Ae.cmpn(1))return ke.clone();var Ce=Array(16);Ce[0]=new n(1).toRed(this),Ce[1]=ke;for(var qe=2;qe<Ce.length;qe++)Ce[qe]=this.mul(Ce[qe-1],ke);var ze=Ce[0],Ve=0,tt=0,rt=Ae.bitLength()%26;for(0===rt&&(rt=26),qe=Ae.length-1;qe>=0;qe--){for(var it=Ae.words[qe],nt=rt-1;nt>=0;nt--){var ot=it>>nt&1;ze!==Ce[0]&&(ze=this.sqr(ze)),0!==ot||0!==Ve?(Ve<<=1,Ve|=ot,(4===++tt||0===qe&&0===nt)&&(ze=this.mul(ze,Ce[Ve]),tt=0,Ve=0)):tt=0}rt=26}return ze},k.prototype.convertTo=function(ke){var Ae=ke.umod(this.m);return Ae===ke?Ae.clone():Ae},k.prototype.convertFrom=function(ke){var Ae=ke.clone();return Ae.red=null,Ae},n.mont=function(ke){return new A(ke)},i(A,k),A.prototype.convertTo=function(ke){return this.imod(ke.ushln(this.shift))},A.prototype.convertFrom=function(ke){var Ae=this.imod(ke.mul(this.rinv));return Ae.red=null,Ae},A.prototype.imul=function(ke,Ae){if(ke.isZero()||Ae.isZero())return ke.words[0]=0,ke.length=1,ke;var Ce=ke.imul(Ae),qe=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ze=Ce.isub(qe).iushrn(this.shift),Ve=ze;return ze.cmp(this.m)>=0?Ve=ze.isub(this.m):ze.cmpn(0)<0&&(Ve=ze.iadd(this.m)),Ve._forceRed(this)},A.prototype.mul=function(ke,Ae){if(ke.isZero()||Ae.isZero())return new n(0)._forceRed(this);var Ce=ke.mul(Ae),qe=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ze=Ce.isub(qe).iushrn(this.shift),Ve=ze;return ze.cmp(this.m)>=0?Ve=ze.isub(this.m):ze.cmpn(0)<0&&(Ve=ze.iadd(this.m)),Ve._forceRed(this)},A.prototype.invm=function(ke){return this.imod(ke._invmp(this.m).mul(this.r2))._forceRed(this)}}(ke,Ir)})),Wd=Object.freeze({__proto__:null,default:Hd,__moduleExports:Hd});class Id{constructor(ke){if(void 0===ke)throw Error("Invalid BigInteger input");this.value=new Hd(ke)}clone(){const ke=new Id(null);return this.value.copy(ke.value),ke}iinc(){return this.value.iadd(new Hd(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new Hd(1)),this}dec(){return this.clone().idec()}iadd(ke){return this.value.iadd(ke.value),this}add(ke){return this.clone().iadd(ke)}isub(ke){return this.value.isub(ke.value),this}sub(ke){return this.clone().isub(ke)}imul(ke){return this.value.imul(ke.value),this}mul(ke){return this.clone().imul(ke)}imod(ke){return this.value=this.value.umod(ke.value),this}mod(ke){return this.clone().imod(ke)}modExp(ke,Ae){const Ce=Ae.isEven()?Hd.red(Ae.value):Hd.mont(Ae.value),qe=this.clone();return qe.value=qe.value.toRed(Ce).redPow(ke.value).fromRed(),qe}modInv(ke){if(!this.gcd(ke).isOne())throw Error("Inverse does not exist");return new Id(this.value.invm(ke.value))}gcd(ke){return new Id(this.value.gcd(ke.value))}ileftShift(ke){return this.value.ishln(ke.value.toNumber()),this}leftShift(ke){return this.clone().ileftShift(ke)}irightShift(ke){return this.value.ishrn(ke.value.toNumber()),this}rightShift(ke){return this.clone().irightShift(ke)}equal(ke){return this.value.eq(ke.value)}lt(ke){return this.value.lt(ke.value)}lte(ke){return this.value.lte(ke.value)}gt(ke){return this.value.gt(ke.value)}gte(ke){return this.value.gte(ke.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new Hd(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const ke=this.clone();return ke.value=ke.value.abs(),ke}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(ke){return this.value.testn(ke)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(ke="be",Ae){return this.value.toArrayLike(Uint8Array,ke,Ae)}}var Vd,Zd=Object.freeze({__proto__:null,default:Id}),Xd=bt((function(ke,Ae){var Ce=Ae;function i(ke){return 1===ke.length?"0"+ke:ke}function n(ke){for(var Ae="",Ce=0;Ce<ke.length;Ce++)Ae+=i(ke[Ce].toString(16));return Ae}Ce.toArray=function(ke,Ae){if(Array.isArray(ke))return ke.slice();if(!ke)return[];var Ce=[];if("string"!=typeof ke){for(var qe=0;qe<ke.length;qe++)Ce[qe]=0|ke[qe];return Ce}if("hex"===Ae){(ke=ke.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(ke="0"+ke);for(qe=0;qe<ke.length;qe+=2)Ce.push(parseInt(ke[qe]+ke[qe+1],16))}else for(qe=0;qe<ke.length;qe++){var ze=ke.charCodeAt(qe),Ve=ze>>8,tt=255&ze;Ve?Ce.push(Ve,tt):Ce.push(tt)}return Ce},Ce.zero2=i,Ce.toHex=n,Ce.encode=function(ke,Ae){return"hex"===Ae?n(ke):ke}})),ep=bt((function(ke,Ae){var Ce=Ae;Ce.assert=Ur,Ce.toArray=Xd.toArray,Ce.zero2=Xd.zero2,Ce.toHex=Xd.toHex,Ce.encode=Xd.encode,Ce.getNAF=function(ke,Ae){for(var Ce=[],qe=1<<Ae+1,ze=ke.clone();ze.cmpn(1)>=0;){var Ve;if(ze.isOdd()){var tt=ze.andln(qe-1);Ve=tt>(qe>>1)-1?(qe>>1)-tt:tt,ze.isubn(Ve)}else Ve=0;Ce.push(Ve);for(var rt=0!==ze.cmpn(0)&&0===ze.andln(qe-1)?Ae+1:1,it=1;it<rt;it++)Ce.push(0);ze.iushrn(rt)}return Ce},Ce.getJSF=function(ke,Ae){var Ce=[[],[]];ke=ke.clone(),Ae=Ae.clone();for(var qe=0,ze=0;ke.cmpn(-qe)>0||Ae.cmpn(-ze)>0;){var Ve,tt,rt,it=ke.andln(3)+qe&3,nt=Ae.andln(3)+ze&3;if(3===it&&(it=-1),3===nt&&(nt=-1),0==(1&it))Ve=0;else Ve=3!==(rt=ke.andln(7)+qe&7)&&5!==rt||2!==nt?it:-it;if(Ce[0].push(Ve),0==(1&nt))tt=0;else tt=3!==(rt=Ae.andln(7)+ze&7)&&5!==rt||2!==it?nt:-nt;Ce[1].push(tt),2*qe===Ve+1&&(qe=1-qe),2*ze===tt+1&&(ze=1-ze),ke.iushrn(1),Ae.iushrn(1)}return Ce},Ce.cachedProperty=function(ke,Ae,Ce){var qe="_"+Ae;ke.prototype[Ae]=function(){return void 0!==this[qe]?this[qe]:this[qe]=Ce.call(this)}},Ce.parseBytes=function(ke){return"string"==typeof ke?Ce.toArray(ke,"hex"):ke},Ce.intFromLE=function(ke){return new Hd(ke,"hex","le")}})),Od=function(ke){return Vd||(Vd=new Fd(null)),Vd.generate(ke)};function Fd(ke){this.rand=ke}var tp=Fd;if(Fd.prototype.generate=function(ke){return this._rand(ke)},Fd.prototype._rand=function(ke){if(this.rand.getBytes)return this.rand.getBytes(ke);for(var Ae=new Uint8Array(ke),Ce=0;Ce<Ae.length;Ce++)Ae[Ce]=this.rand.getByte();return Ae},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Fd.prototype._rand=function(ke){var Ae=new Uint8Array(ke);return self.crypto.getRandomValues(Ae),Ae}:self.msCrypto&&self.msCrypto.getRandomValues?Fd.prototype._rand=function(ke){var Ae=new Uint8Array(ke);return self.msCrypto.getRandomValues(Ae),Ae}:"object"==typeof window&&(Fd.prototype._rand=function(){throw Error("Not implemented yet")});else try{var rp=ft.default;if("function"!=typeof rp.randomBytes)throw Error("Not supported");Fd.prototype._rand=function(ke){return rp.randomBytes(ke)}}catch(qe){}Od.Rand=tp;var ip=ep.getNAF,np=ep.getJSF,sp=ep.assert;function Gd(ke,Ae){this.type=ke,this.p=new Hd(Ae.p,16),this.red=Ae.prime?Hd.red(Ae.prime):Hd.mont(this.p),this.zero=new Hd(0).toRed(this.red),this.one=new Hd(1).toRed(this.red),this.two=new Hd(2).toRed(this.red),this.n=Ae.n&&new Hd(Ae.n,16),this.g=Ae.g&&this.pointFromJSON(Ae.g,Ae.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var Ce=this.n&&this.p.div(this.n);!Ce||Ce.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ap=Gd;function $d(ke,Ae){this.curve=ke,this.type=Ae,this.precomputed=null}Gd.prototype.point=function(){throw Error("Not implemented")},Gd.prototype.validate=function(){throw Error("Not implemented")},Gd.prototype._fixedNafMul=function(ke,Ae){sp(ke.precomputed);var Ce=ke._getDoubles(),qe=ip(Ae,1),ze=(1<<Ce.step+1)-(Ce.step%2==0?2:1);ze/=3;for(var Ve=[],tt=0;tt<qe.length;tt+=Ce.step){var rt=0;for(Ae=tt+Ce.step-1;Ae>=tt;Ae--)rt=(rt<<1)+qe[Ae];Ve.push(rt)}for(var it=this.jpoint(null,null,null),nt=this.jpoint(null,null,null),ot=ze;ot>0;ot--){for(tt=0;tt<Ve.length;tt++){(rt=Ve[tt])===ot?nt=nt.mixedAdd(Ce.points[tt]):rt===-ot&&(nt=nt.mixedAdd(Ce.points[tt].neg()))}it=it.add(nt)}return it.toP()},Gd.prototype._wnafMul=function(ke,Ae){var Ce=4,qe=ke._getNAFPoints(Ce);Ce=qe.wnd;for(var ze=qe.points,Ve=ip(Ae,Ce),tt=this.jpoint(null,null,null),rt=Ve.length-1;rt>=0;rt--){for(Ae=0;rt>=0&&0===Ve[rt];rt--)Ae++;if(rt>=0&&Ae++,tt=tt.dblp(Ae),rt<0)break;var it=Ve[rt];sp(0!==it),tt="affine"===ke.type?it>0?tt.mixedAdd(ze[it-1>>1]):tt.mixedAdd(ze[-it-1>>1].neg()):it>0?tt.add(ze[it-1>>1]):tt.add(ze[-it-1>>1].neg())}return"affine"===ke.type?tt.toP():tt},Gd.prototype._wnafMulAdd=function(ke,Ae,Ce,qe,ze){for(var Ve=this._wnafT1,tt=this._wnafT2,rt=this._wnafT3,it=0,nt=0;nt<qe;nt++){var ot=(Tt=Ae[nt])._getNAFPoints(ke);Ve[nt]=ot.wnd,tt[nt]=ot.points}for(nt=qe-1;nt>=1;nt-=2){var ct=nt-1,ht=nt;if(1===Ve[ct]&&1===Ve[ht]){var ft=[Ae[ct],null,null,Ae[ht]];0===Ae[ct].y.cmp(Ae[ht].y)?(ft[1]=Ae[ct].add(Ae[ht]),ft[2]=Ae[ct].toJ().mixedAdd(Ae[ht].neg())):0===Ae[ct].y.cmp(Ae[ht].y.redNeg())?(ft[1]=Ae[ct].toJ().mixedAdd(Ae[ht]),ft[2]=Ae[ct].add(Ae[ht].neg())):(ft[1]=Ae[ct].toJ().mixedAdd(Ae[ht]),ft[2]=Ae[ct].toJ().mixedAdd(Ae[ht].neg()));var yt=[-3,-1,-5,-7,0,7,5,1,3],mt=np(Ce[ct],Ce[ht]);it=Math.max(mt[0].length,it),rt[ct]=Array(it),rt[ht]=Array(it);for(var kt=0;kt<it;kt++){var St=0|mt[0][kt],Et=0|mt[1][kt];rt[ct][kt]=yt[3*(St+1)+(Et+1)],rt[ht][kt]=0,tt[ct]=ft}}else rt[ct]=ip(Ce[ct],Ve[ct]),rt[ht]=ip(Ce[ht],Ve[ht]),it=Math.max(rt[ct].length,it),it=Math.max(rt[ht].length,it)}var Pt=this.jpoint(null,null,null),Dt=this._wnafT4;for(nt=it;nt>=0;nt--){for(var Rt=0;nt>=0;){var Bt=!0;for(kt=0;kt<qe;kt++)Dt[kt]=0|rt[kt][nt],0!==Dt[kt]&&(Bt=!1);if(!Bt)break;Rt++,nt--}if(nt>=0&&Rt++,Pt=Pt.dblp(Rt),nt<0)break;for(kt=0;kt<qe;kt++){var Tt,Ut=Dt[kt];0!==Ut&&(Ut>0?Tt=tt[kt][Ut-1>>1]:Ut<0&&(Tt=tt[kt][-Ut-1>>1].neg()),Pt="affine"===Tt.type?Pt.mixedAdd(Tt):Pt.add(Tt))}}for(nt=0;nt<qe;nt++)tt[nt]=null;return ze?Pt:Pt.toP()},Gd.BasePoint=$d,$d.prototype.eq=function(){throw Error("Not implemented")},$d.prototype.validate=function(){return this.curve.validate(this)},Gd.prototype.decodePoint=function(ke,Ae){ke=ep.toArray(ke,Ae);var Ce=this.p.byteLength();if((4===ke[0]||6===ke[0]||7===ke[0])&&ke.length-1==2*Ce)return 6===ke[0]?sp(ke[ke.length-1]%2==0):7===ke[0]&&sp(ke[ke.length-1]%2==1),this.point(ke.slice(1,1+Ce),ke.slice(1+Ce,1+2*Ce));if((2===ke[0]||3===ke[0])&&ke.length-1===Ce)return this.pointFromX(ke.slice(1,1+Ce),3===ke[0]);throw Error("Unknown point format")},$d.prototype.encodeCompressed=function(ke){return this.encode(ke,!0)},$d.prototype._encode=function(ke){var Ae=this.curve.p.byteLength(),Ce=this.getX().toArray("be",Ae);return ke?[this.getY().isEven()?2:3].concat(Ce):[4].concat(Ce,this.getY().toArray("be",Ae))},$d.prototype.encode=function(ke,Ae){return ep.encode(this._encode(Ae),ke)},$d.prototype.precompute=function(ke){if(this.precomputed)return this;var Ae={doubles:null,naf:null,beta:null};return Ae.naf=this._getNAFPoints(8),Ae.doubles=this._getDoubles(4,ke),Ae.beta=this._getBeta(),this.precomputed=Ae,this},$d.prototype._hasDoubles=function(ke){if(!this.precomputed)return!1;var Ae=this.precomputed.doubles;return!!Ae&&Ae.points.length>=Math.ceil((ke.bitLength()+1)/Ae.step)},$d.prototype._getDoubles=function(ke,Ae){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Ce=[this],qe=this,ze=0;ze<Ae;ze+=ke){for(var Ve=0;Ve<ke;Ve++)qe=qe.dbl();Ce.push(qe)}return{step:ke,points:Ce}},$d.prototype._getNAFPoints=function(ke){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var Ae=[this],Ce=(1<<ke)-1,qe=1===Ce?null:this.dbl(),ze=1;ze<Ce;ze++)Ae[ze]=Ae[ze-1].add(qe);return{wnd:ke,points:Ae}},$d.prototype._getBeta=function(){return null},$d.prototype.dblp=function(ke){for(var Ae=this,Ce=0;Ce<ke;Ce++)Ae=Ae.dbl();return Ae};var op=ep.assert;function Yd(ke){ap.call(this,"short",ke),this.a=new Hd(ke.a,16).toRed(this.red),this.b=new Hd(ke.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(ke),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}Gr(Yd,ap);var up=Yd;function Qd(ke,Ae,Ce,qe){ap.BasePoint.call(this,ke,"affine"),null===Ae&&null===Ce?(this.x=null,this.y=null,this.inf=!0):(this.x=new Hd(Ae,16),this.y=new Hd(Ce,16),qe&&(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 Jd(ke,Ae,Ce,qe){ap.BasePoint.call(this,ke,"jacobian"),null===Ae&&null===Ce&&null===qe?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Hd(0)):(this.x=new Hd(Ae,16),this.y=new Hd(Ce,16),this.z=new Hd(qe,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 el(ke){ap.call(this,"mont",ke),this.a=new Hd(ke.a,16).toRed(this.red),this.b=new Hd(ke.b,16).toRed(this.red),this.i4=new Hd(4).toRed(this.red).redInvm(),this.two=new Hd(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Yd.prototype._getEndomorphism=function(ke){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var Ae,Ce;if(ke.beta)Ae=new Hd(ke.beta,16).toRed(this.red);else{var qe=this._getEndoRoots(this.p);Ae=(Ae=qe[0].cmp(qe[1])<0?qe[0]:qe[1]).toRed(this.red)}if(ke.lambda)Ce=new Hd(ke.lambda,16);else{var ze=this._getEndoRoots(this.n);0===this.g.mul(ze[0]).x.cmp(this.g.x.redMul(Ae))?Ce=ze[0]:(Ce=ze[1],op(0===this.g.mul(Ce).x.cmp(this.g.x.redMul(Ae))))}return{beta:Ae,lambda:Ce,basis:ke.basis?ke.basis.map((function(ke){return{a:new Hd(ke.a,16),b:new Hd(ke.b,16)}})):this._getEndoBasis(Ce)}}},Yd.prototype._getEndoRoots=function(ke){var Ae=ke===this.p?this.red:Hd.mont(ke),Ce=new Hd(2).toRed(Ae).redInvm(),qe=Ce.redNeg(),ze=new Hd(3).toRed(Ae).redNeg().redSqrt().redMul(Ce);return[qe.redAdd(ze).fromRed(),qe.redSub(ze).fromRed()]},Yd.prototype._getEndoBasis=function(ke){for(var Ae,Ce,qe,ze,Ve,tt,rt,it,nt,ot=this.n.ushrn(Math.floor(this.n.bitLength()/2)),ct=ke,ht=this.n.clone(),ft=new Hd(1),yt=new Hd(0),mt=new Hd(0),kt=new Hd(1),St=0;0!==ct.cmpn(0);){var Et=ht.div(ct);it=ht.sub(Et.mul(ct)),nt=mt.sub(Et.mul(ft));var Pt=kt.sub(Et.mul(yt));if(!qe&&it.cmp(ot)<0)Ae=rt.neg(),Ce=ft,qe=it.neg(),ze=nt;else if(qe&&2==++St)break;rt=it,ht=ct,ct=it,mt=ft,ft=nt,kt=yt,yt=Pt}Ve=it.neg(),tt=nt;var Dt=qe.sqr().add(ze.sqr());return Ve.sqr().add(tt.sqr()).cmp(Dt)>=0&&(Ve=Ae,tt=Ce),qe.negative&&(qe=qe.neg(),ze=ze.neg()),Ve.negative&&(Ve=Ve.neg(),tt=tt.neg()),[{a:qe,b:ze},{a:Ve,b:tt}]},Yd.prototype._endoSplit=function(ke){var Ae=this.endo.basis,Ce=Ae[0],qe=Ae[1],ze=qe.b.mul(ke).divRound(this.n),Ve=Ce.b.neg().mul(ke).divRound(this.n),tt=ze.mul(Ce.a),rt=Ve.mul(qe.a),it=ze.mul(Ce.b),nt=Ve.mul(qe.b);return{k1:ke.sub(tt).sub(rt),k2:it.add(nt).neg()}},Yd.prototype.pointFromX=function(ke,Ae){(ke=new Hd(ke,16)).red||(ke=ke.toRed(this.red));var Ce=ke.redSqr().redMul(ke).redIAdd(ke.redMul(this.a)).redIAdd(this.b),qe=Ce.redSqrt();if(0!==qe.redSqr().redSub(Ce).cmp(this.zero))throw Error("invalid point");var ze=qe.fromRed().isOdd();return(Ae&&!ze||!Ae&&ze)&&(qe=qe.redNeg()),this.point(ke,qe)},Yd.prototype.validate=function(ke){if(ke.inf)return!0;var Ae=ke.x,Ce=ke.y,qe=this.a.redMul(Ae),ze=Ae.redSqr().redMul(Ae).redIAdd(qe).redIAdd(this.b);return 0===Ce.redSqr().redISub(ze).cmpn(0)},Yd.prototype._endoWnafMulAdd=function(ke,Ae,Ce){for(var qe=this._endoWnafT1,ze=this._endoWnafT2,Ve=0;Ve<ke.length;Ve++){var tt=this._endoSplit(Ae[Ve]),rt=ke[Ve],it=rt._getBeta();tt.k1.negative&&(tt.k1.ineg(),rt=rt.neg(!0)),tt.k2.negative&&(tt.k2.ineg(),it=it.neg(!0)),qe[2*Ve]=rt,qe[2*Ve+1]=it,ze[2*Ve]=tt.k1,ze[2*Ve+1]=tt.k2}for(var nt=this._wnafMulAdd(1,qe,ze,2*Ve,Ce),ot=0;ot<2*Ve;ot++)qe[ot]=null,ze[ot]=null;return nt},Gr(Qd,ap.BasePoint),Yd.prototype.point=function(ke,Ae,Ce){return new Qd(this,ke,Ae,Ce)},Yd.prototype.pointFromJSON=function(ke,Ae){return Qd.fromJSON(this,ke,Ae)},Qd.prototype._getBeta=function(){if(this.curve.endo){var ke=this.precomputed;if(ke&&ke.beta)return ke.beta;var Ae=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(ke){var Ce=this.curve,i=function(ke){return Ce.point(ke.x.redMul(Ce.endo.beta),ke.y)};ke.beta=Ae,Ae.precomputed={beta:null,naf:ke.naf&&{wnd:ke.naf.wnd,points:ke.naf.points.map(i)},doubles:ke.doubles&&{step:ke.doubles.step,points:ke.doubles.points.map(i)}}}return Ae}},Qd.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]},Qd.fromJSON=function(ke,Ae,Ce){"string"==typeof Ae&&(Ae=JSON.parse(Ae));var qe=ke.point(Ae[0],Ae[1],Ce);if(!Ae[2])return qe;function n(Ae){return ke.point(Ae[0],Ae[1],Ce)}var ze=Ae[2];return qe.precomputed={beta:null,doubles:ze.doubles&&{step:ze.doubles.step,points:[qe].concat(ze.doubles.points.map(n))},naf:ze.naf&&{wnd:ze.naf.wnd,points:[qe].concat(ze.naf.points.map(n))}},qe},Qd.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)+">"},Qd.prototype.isInfinity=function(){return this.inf},Qd.prototype.add=function(ke){if(this.inf)return ke;if(ke.inf)return this;if(this.eq(ke))return this.dbl();if(this.neg().eq(ke))return this.curve.point(null,null);if(0===this.x.cmp(ke.x))return this.curve.point(null,null);var Ae=this.y.redSub(ke.y);0!==Ae.cmpn(0)&&(Ae=Ae.redMul(this.x.redSub(ke.x).redInvm()));var Ce=Ae.redSqr().redISub(this.x).redISub(ke.x),qe=Ae.redMul(this.x.redSub(Ce)).redISub(this.y);return this.curve.point(Ce,qe)},Qd.prototype.dbl=function(){if(this.inf)return this;var ke=this.y.redAdd(this.y);if(0===ke.cmpn(0))return this.curve.point(null,null);var Ae=this.curve.a,Ce=this.x.redSqr(),qe=ke.redInvm(),ze=Ce.redAdd(Ce).redIAdd(Ce).redIAdd(Ae).redMul(qe),Ve=ze.redSqr().redISub(this.x.redAdd(this.x)),tt=ze.redMul(this.x.redSub(Ve)).redISub(this.y);return this.curve.point(Ve,tt)},Qd.prototype.getX=function(){return this.x.fromRed()},Qd.prototype.getY=function(){return this.y.fromRed()},Qd.prototype.mul=function(ke){return ke=new Hd(ke,16),this.isInfinity()?this:this._hasDoubles(ke)?this.curve._fixedNafMul(this,ke):this.curve.endo?this.curve._endoWnafMulAdd([this],[ke]):this.curve._wnafMul(this,ke)},Qd.prototype.mulAdd=function(ke,Ae,Ce){var qe=[this,Ae],ze=[ke,Ce];return this.curve.endo?this.curve._endoWnafMulAdd(qe,ze):this.curve._wnafMulAdd(1,qe,ze,2)},Qd.prototype.jmulAdd=function(ke,Ae,Ce){var qe=[this,Ae],ze=[ke,Ce];return this.curve.endo?this.curve._endoWnafMulAdd(qe,ze,!0):this.curve._wnafMulAdd(1,qe,ze,2,!0)},Qd.prototype.eq=function(ke){return this===ke||this.inf===ke.inf&&(this.inf||0===this.x.cmp(ke.x)&&0===this.y.cmp(ke.y))},Qd.prototype.neg=function(ke){if(this.inf)return this;var Ae=this.curve.point(this.x,this.y.redNeg());if(ke&&this.precomputed){var Ce=this.precomputed,i=function(ke){return ke.neg()};Ae.precomputed={naf:Ce.naf&&{wnd:Ce.naf.wnd,points:Ce.naf.points.map(i)},doubles:Ce.doubles&&{step:Ce.doubles.step,points:Ce.doubles.points.map(i)}}}return Ae},Qd.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Gr(Jd,ap.BasePoint),Yd.prototype.jpoint=function(ke,Ae,Ce){return new Jd(this,ke,Ae,Ce)},Jd.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var ke=this.z.redInvm(),Ae=ke.redSqr(),Ce=this.x.redMul(Ae),qe=this.y.redMul(Ae).redMul(ke);return this.curve.point(Ce,qe)},Jd.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Jd.prototype.add=function(ke){if(this.isInfinity())return ke;if(ke.isInfinity())return this;var Ae=ke.z.redSqr(),Ce=this.z.redSqr(),qe=this.x.redMul(Ae),ze=ke.x.redMul(Ce),Ve=this.y.redMul(Ae.redMul(ke.z)),tt=ke.y.redMul(Ce.redMul(this.z)),rt=qe.redSub(ze),it=Ve.redSub(tt);if(0===rt.cmpn(0))return 0!==it.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var nt=rt.redSqr(),ot=nt.redMul(rt),ct=qe.redMul(nt),ht=it.redSqr().redIAdd(ot).redISub(ct).redISub(ct),ft=it.redMul(ct.redISub(ht)).redISub(Ve.redMul(ot)),yt=this.z.redMul(ke.z).redMul(rt);return this.curve.jpoint(ht,ft,yt)},Jd.prototype.mixedAdd=function(ke){if(this.isInfinity())return ke.toJ();if(ke.isInfinity())return this;var Ae=this.z.redSqr(),Ce=this.x,qe=ke.x.redMul(Ae),ze=this.y,Ve=ke.y.redMul(Ae).redMul(this.z),tt=Ce.redSub(qe),rt=ze.redSub(Ve);if(0===tt.cmpn(0))return 0!==rt.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var it=tt.redSqr(),nt=it.redMul(tt),ot=Ce.redMul(it),ct=rt.redSqr().redIAdd(nt).redISub(ot).redISub(ot),ht=rt.redMul(ot.redISub(ct)).redISub(ze.redMul(nt)),ft=this.z.redMul(tt);return this.curve.jpoint(ct,ht,ft)},Jd.prototype.dblp=function(ke){if(0===ke)return this;if(this.isInfinity())return this;if(!ke)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var Ae=this,Ce=0;Ce<ke;Ce++)Ae=Ae.dbl();return Ae}var qe=this.curve.a,ze=this.curve.tinv,Ve=this.x,tt=this.y,rt=this.z,it=rt.redSqr().redSqr(),nt=tt.redAdd(tt);for(Ce=0;Ce<ke;Ce++){var ot=Ve.redSqr(),ct=nt.redSqr(),ht=ct.redSqr(),ft=ot.redAdd(ot).redIAdd(ot).redIAdd(qe.redMul(it)),yt=Ve.redMul(ct),mt=ft.redSqr().redISub(yt.redAdd(yt)),kt=yt.redISub(mt),St=ft.redMul(kt);St=St.redIAdd(St).redISub(ht);var Et=nt.redMul(rt);Ce+1<ke&&(it=it.redMul(ht)),Ve=mt,rt=Et,nt=St}return this.curve.jpoint(Ve,nt.redMul(ze),rt)},Jd.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Jd.prototype._zeroDbl=function(){var ke,Ae,Ce;if(this.zOne){var qe=this.x.redSqr(),ze=this.y.redSqr(),Ve=ze.redSqr(),tt=this.x.redAdd(ze).redSqr().redISub(qe).redISub(Ve);tt=tt.redIAdd(tt);var rt=qe.redAdd(qe).redIAdd(qe),it=rt.redSqr().redISub(tt).redISub(tt),nt=Ve.redIAdd(Ve);nt=(nt=nt.redIAdd(nt)).redIAdd(nt),ke=it,Ae=rt.redMul(tt.redISub(it)).redISub(nt),Ce=this.y.redAdd(this.y)}else{var ot=this.x.redSqr(),ct=this.y.redSqr(),ht=ct.redSqr(),ft=this.x.redAdd(ct).redSqr().redISub(ot).redISub(ht);ft=ft.redIAdd(ft);var yt=ot.redAdd(ot).redIAdd(ot),mt=yt.redSqr(),kt=ht.redIAdd(ht);kt=(kt=kt.redIAdd(kt)).redIAdd(kt),ke=mt.redISub(ft).redISub(ft),Ae=yt.redMul(ft.redISub(ke)).redISub(kt),Ce=(Ce=this.y.redMul(this.z)).redIAdd(Ce)}return this.curve.jpoint(ke,Ae,Ce)},Jd.prototype._threeDbl=function(){var ke,Ae,Ce;if(this.zOne){var qe=this.x.redSqr(),ze=this.y.redSqr(),Ve=ze.redSqr(),tt=this.x.redAdd(ze).redSqr().redISub(qe).redISub(Ve);tt=tt.redIAdd(tt);var rt=qe.redAdd(qe).redIAdd(qe).redIAdd(this.curve.a),it=rt.redSqr().redISub(tt).redISub(tt);ke=it;var nt=Ve.redIAdd(Ve);nt=(nt=nt.redIAdd(nt)).redIAdd(nt),Ae=rt.redMul(tt.redISub(it)).redISub(nt),Ce=this.y.redAdd(this.y)}else{var ot=this.z.redSqr(),ct=this.y.redSqr(),ht=this.x.redMul(ct),ft=this.x.redSub(ot).redMul(this.x.redAdd(ot));ft=ft.redAdd(ft).redIAdd(ft);var yt=ht.redIAdd(ht),mt=(yt=yt.redIAdd(yt)).redAdd(yt);ke=ft.redSqr().redISub(mt),Ce=this.y.redAdd(this.z).redSqr().redISub(ct).redISub(ot);var kt=ct.redSqr();kt=(kt=(kt=kt.redIAdd(kt)).redIAdd(kt)).redIAdd(kt),Ae=ft.redMul(yt.redISub(ke)).redISub(kt)}return this.curve.jpoint(ke,Ae,Ce)},Jd.prototype._dbl=function(){var ke=this.curve.a,Ae=this.x,Ce=this.y,qe=this.z,ze=qe.redSqr().redSqr(),Ve=Ae.redSqr(),tt=Ce.redSqr(),rt=Ve.redAdd(Ve).redIAdd(Ve).redIAdd(ke.redMul(ze)),it=Ae.redAdd(Ae),nt=(it=it.redIAdd(it)).redMul(tt),ot=rt.redSqr().redISub(nt.redAdd(nt)),ct=nt.redISub(ot),ht=tt.redSqr();ht=(ht=(ht=ht.redIAdd(ht)).redIAdd(ht)).redIAdd(ht);var ft=rt.redMul(ct).redISub(ht),yt=Ce.redAdd(Ce).redMul(qe);return this.curve.jpoint(ot,ft,yt)},Jd.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var ke=this.x.redSqr(),Ae=this.y.redSqr(),Ce=this.z.redSqr(),qe=Ae.redSqr(),ze=ke.redAdd(ke).redIAdd(ke),Ve=ze.redSqr(),tt=this.x.redAdd(Ae).redSqr().redISub(ke).redISub(qe),rt=(tt=(tt=(tt=tt.redIAdd(tt)).redAdd(tt).redIAdd(tt)).redISub(Ve)).redSqr(),it=qe.redIAdd(qe);it=(it=(it=it.redIAdd(it)).redIAdd(it)).redIAdd(it);var nt=ze.redIAdd(tt).redSqr().redISub(Ve).redISub(rt).redISub(it),ot=Ae.redMul(nt);ot=(ot=ot.redIAdd(ot)).redIAdd(ot);var ct=this.x.redMul(rt).redISub(ot);ct=(ct=ct.redIAdd(ct)).redIAdd(ct);var ht=this.y.redMul(nt.redMul(it.redISub(nt)).redISub(tt.redMul(rt)));ht=(ht=(ht=ht.redIAdd(ht)).redIAdd(ht)).redIAdd(ht);var ft=this.z.redAdd(tt).redSqr().redISub(Ce).redISub(rt);return this.curve.jpoint(ct,ht,ft)},Jd.prototype.mul=function(ke,Ae){return ke=new Hd(ke,Ae),this.curve._wnafMul(this,ke)},Jd.prototype.eq=function(ke){if("affine"===ke.type)return this.eq(ke.toJ());if(this===ke)return!0;var Ae=this.z.redSqr(),Ce=ke.z.redSqr();if(0!==this.x.redMul(Ce).redISub(ke.x.redMul(Ae)).cmpn(0))return!1;var qe=Ae.redMul(this.z),ze=Ce.redMul(ke.z);return 0===this.y.redMul(ze).redISub(ke.y.redMul(qe)).cmpn(0)},Jd.prototype.eqXToP=function(ke){var Ae=this.z.redSqr(),Ce=ke.toRed(this.curve.red).redMul(Ae);if(0===this.x.cmp(Ce))return!0;for(var qe=ke.clone(),ze=this.curve.redN.redMul(Ae);;){if(qe.iadd(this.curve.n),qe.cmp(this.curve.p)>=0)return!1;if(Ce.redIAdd(ze),0===this.x.cmp(Ce))return!0}},Jd.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)+">"},Jd.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Gr(el,ap);var hp=el;function rl(ke,Ae,Ce){ap.BasePoint.call(this,ke,"projective"),null===Ae&&null===Ce?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Hd(Ae,16),this.z=new Hd(Ce,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}el.prototype.validate=function(ke){var Ae=ke.normalize().x,Ce=Ae.redSqr(),qe=Ce.redMul(Ae).redAdd(Ce.redMul(this.a)).redAdd(Ae);return 0===qe.redSqrt().redSqr().cmp(qe)},Gr(rl,ap.BasePoint),el.prototype.decodePoint=function(ke,Ae){if(33===(ke=ep.toArray(ke,Ae)).length&&64===ke[0]&&(ke=ke.slice(1,33).reverse()),32!==ke.length)throw Error("Unknown point compression format");return this.point(ke,1)},el.prototype.point=function(ke,Ae){return new rl(this,ke,Ae)},el.prototype.pointFromJSON=function(ke){return rl.fromJSON(this,ke)},rl.prototype.precompute=function(){},rl.prototype._encode=function(ke){var Ae=this.curve.p.byteLength();return ke?[64].concat(this.getX().toArray("le",Ae)):this.getX().toArray("be",Ae)},rl.fromJSON=function(ke,Ae){return new rl(ke,Ae[0],Ae[1]||ke.one)},rl.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)+">"},rl.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},rl.prototype.dbl=function(){var ke=this.x.redAdd(this.z).redSqr(),Ae=this.x.redSub(this.z).redSqr(),Ce=ke.redSub(Ae),qe=ke.redMul(Ae),ze=Ce.redMul(Ae.redAdd(this.curve.a24.redMul(Ce)));return this.curve.point(qe,ze)},rl.prototype.add=function(){throw Error("Not supported on Montgomery curve")},rl.prototype.diffAdd=function(ke,Ae){var Ce=this.x.redAdd(this.z),qe=this.x.redSub(this.z),ze=ke.x.redAdd(ke.z),Ve=ke.x.redSub(ke.z).redMul(Ce),tt=ze.redMul(qe),rt=Ae.z.redMul(Ve.redAdd(tt).redSqr()),it=Ae.x.redMul(Ve.redISub(tt).redSqr());return this.curve.point(rt,it)},rl.prototype.mul=function(ke){for(var Ae=(ke=new Hd(ke,16)).clone(),Ce=this,qe=this.curve.point(null,null),ze=[];0!==Ae.cmpn(0);Ae.iushrn(1))ze.push(Ae.andln(1));for(var Ve=ze.length-1;Ve>=0;Ve--)0===ze[Ve]?(Ce=Ce.diffAdd(qe,this),qe=qe.dbl()):(qe=Ce.diffAdd(qe,this),Ce=Ce.dbl());return qe},rl.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},rl.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},rl.prototype.eq=function(ke){return 0===this.getX().cmp(ke.getX())},rl.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},rl.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var fp=ep.assert;function nl(ke){this.twisted=1!=(0|ke.a),this.mOneA=this.twisted&&-1==(0|ke.a),this.extended=this.mOneA,ap.call(this,"edwards",ke),this.a=new Hd(ke.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Hd(ke.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Hd(ke.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),fp(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|ke.c)}Gr(nl,ap);var lp=nl;function sl(ke,Ae,Ce,qe,ze){ap.BasePoint.call(this,ke,"projective"),null===Ae&&null===Ce&&null===qe?(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 Hd(Ae,16),this.y=new Hd(Ce,16),this.z=qe?new Hd(qe,16):this.curve.one,this.t=ze&&new Hd(ze,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()))))}nl.prototype._mulA=function(ke){return this.mOneA?ke.redNeg():this.a.redMul(ke)},nl.prototype._mulC=function(ke){return this.oneC?ke:this.c.redMul(ke)},nl.prototype.jpoint=function(ke,Ae,Ce,qe){return this.point(ke,Ae,Ce,qe)},nl.prototype.pointFromX=function(ke,Ae){(ke=new Hd(ke,16)).red||(ke=ke.toRed(this.red));var Ce=ke.redSqr(),qe=this.c2.redSub(this.a.redMul(Ce)),ze=this.one.redSub(this.c2.redMul(this.d).redMul(Ce)),Ve=qe.redMul(ze.redInvm()),tt=Ve.redSqrt();if(0!==tt.redSqr().redSub(Ve).cmp(this.zero))throw Error("invalid point");var rt=tt.fromRed().isOdd();return(Ae&&!rt||!Ae&&rt)&&(tt=tt.redNeg()),this.point(ke,tt)},nl.prototype.pointFromY=function(ke,Ae){(ke=new Hd(ke,16)).red||(ke=ke.toRed(this.red));var Ce=ke.redSqr(),qe=Ce.redSub(this.c2),ze=Ce.redMul(this.d).redMul(this.c2).redSub(this.a),Ve=qe.redMul(ze.redInvm());if(0===Ve.cmp(this.zero)){if(Ae)throw Error("invalid point");return this.point(this.zero,ke)}var tt=Ve.redSqrt();if(0!==tt.redSqr().redSub(Ve).cmp(this.zero))throw Error("invalid point");return tt.fromRed().isOdd()!==Ae&&(tt=tt.redNeg()),this.point(tt,ke)},nl.prototype.validate=function(ke){if(ke.isInfinity())return!0;ke.normalize();var Ae=ke.x.redSqr(),Ce=ke.y.redSqr(),qe=Ae.redMul(this.a).redAdd(Ce),ze=this.c2.redMul(this.one.redAdd(this.d.redMul(Ae).redMul(Ce)));return 0===qe.cmp(ze)},Gr(sl,ap.BasePoint),nl.prototype.pointFromJSON=function(ke){return sl.fromJSON(this,ke)},nl.prototype.point=function(ke,Ae,Ce,qe){return new sl(this,ke,Ae,Ce,qe)},sl.fromJSON=function(ke,Ae){return new sl(ke,Ae[0],Ae[1],Ae[2])},sl.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)+">"},sl.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},sl.prototype._extDbl=function(){var ke=this.x.redSqr(),Ae=this.y.redSqr(),Ce=this.z.redSqr();Ce=Ce.redIAdd(Ce);var qe=this.curve._mulA(ke),ze=this.x.redAdd(this.y).redSqr().redISub(ke).redISub(Ae),Ve=qe.redAdd(Ae),tt=Ve.redSub(Ce),rt=qe.redSub(Ae),it=ze.redMul(tt),nt=Ve.redMul(rt),ot=ze.redMul(rt),ct=tt.redMul(Ve);return this.curve.point(it,nt,ct,ot)},sl.prototype._projDbl=function(){var ke,Ae,Ce,qe=this.x.redAdd(this.y).redSqr(),ze=this.x.redSqr(),Ve=this.y.redSqr();if(this.curve.twisted){var tt=(nt=this.curve._mulA(ze)).redAdd(Ve);if(this.zOne)ke=qe.redSub(ze).redSub(Ve).redMul(tt.redSub(this.curve.two)),Ae=tt.redMul(nt.redSub(Ve)),Ce=tt.redSqr().redSub(tt).redSub(tt);else{var rt=this.z.redSqr(),it=tt.redSub(rt).redISub(rt);ke=qe.redSub(ze).redISub(Ve).redMul(it),Ae=tt.redMul(nt.redSub(Ve)),Ce=tt.redMul(it)}}else{var nt=ze.redAdd(Ve);rt=this.curve._mulC(this.z).redSqr(),it=nt.redSub(rt).redSub(rt);ke=this.curve._mulC(qe.redISub(nt)).redMul(it),Ae=this.curve._mulC(nt).redMul(ze.redISub(Ve)),Ce=nt.redMul(it)}return this.curve.point(ke,Ae,Ce)},sl.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},sl.prototype._extAdd=function(ke){var Ae=this.y.redSub(this.x).redMul(ke.y.redSub(ke.x)),Ce=this.y.redAdd(this.x).redMul(ke.y.redAdd(ke.x)),qe=this.t.redMul(this.curve.dd).redMul(ke.t),ze=this.z.redMul(ke.z.redAdd(ke.z)),Ve=Ce.redSub(Ae),tt=ze.redSub(qe),rt=ze.redAdd(qe),it=Ce.redAdd(Ae),nt=Ve.redMul(tt),ot=rt.redMul(it),ct=Ve.redMul(it),ht=tt.redMul(rt);return this.curve.point(nt,ot,ht,ct)},sl.prototype._projAdd=function(ke){var Ae,Ce,qe=this.z.redMul(ke.z),ze=qe.redSqr(),Ve=this.x.redMul(ke.x),tt=this.y.redMul(ke.y),rt=this.curve.d.redMul(Ve).redMul(tt),it=ze.redSub(rt),nt=ze.redAdd(rt),ot=this.x.redAdd(this.y).redMul(ke.x.redAdd(ke.y)).redISub(Ve).redISub(tt),ct=qe.redMul(it).redMul(ot);return this.curve.twisted?(Ae=qe.redMul(nt).redMul(tt.redSub(this.curve._mulA(Ve))),Ce=it.redMul(nt)):(Ae=qe.redMul(nt).redMul(tt.redSub(Ve)),Ce=this.curve._mulC(it).redMul(nt)),this.curve.point(ct,Ae,Ce)},sl.prototype.add=function(ke){return this.isInfinity()?ke:ke.isInfinity()?this:this.curve.extended?this._extAdd(ke):this._projAdd(ke)},sl.prototype.mul=function(ke){return this._hasDoubles(ke)?this.curve._fixedNafMul(this,ke):this.curve._wnafMul(this,ke)},sl.prototype.mulAdd=function(ke,Ae,Ce){return this.curve._wnafMulAdd(1,[this,Ae],[ke,Ce],2,!1)},sl.prototype.jmulAdd=function(ke,Ae,Ce){return this.curve._wnafMulAdd(1,[this,Ae],[ke,Ce],2,!0)},sl.prototype.normalize=function(){if(this.zOne)return this;var ke=this.z.redInvm();return this.x=this.x.redMul(ke),this.y=this.y.redMul(ke),this.t&&(this.t=this.t.redMul(ke)),this.z=this.curve.one,this.zOne=!0,this},sl.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},sl.prototype.getX=function(){return this.normalize(),this.x.fromRed()},sl.prototype.getY=function(){return this.normalize(),this.y.fromRed()},sl.prototype.eq=function(ke){return this===ke||0===this.getX().cmp(ke.getX())&&0===this.getY().cmp(ke.getY())},sl.prototype.eqXToP=function(ke){var Ae=ke.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(Ae))return!0;for(var Ce=ke.clone(),qe=this.curve.redN.redMul(this.z);;){if(Ce.iadd(this.curve.n),Ce.cmp(this.curve.p)>=0)return!1;if(Ae.redIAdd(qe),0===this.x.cmp(Ae))return!0}},sl.prototype.toP=sl.prototype.normalize,sl.prototype.mixedAdd=sl.prototype.add;var dp=bt((function(ke,Ae){var Ce=Ae;Ce.base=ap,Ce.short=up,Ce.mont=hp,Ce.edwards=lp})),pp=$r.rotl32,yp=$r.sum32,mp=$r.sum32_5,gp=ti.ft_1,bp=Jr.BlockHash,vp=[1518500249,1859775393,2400959708,3395469782];function pl(){if(!(this instanceof pl))return new pl;bp.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}$r.inherits(pl,bp);var wp=pl;pl.blockSize=512,pl.outSize=160,pl.hmacStrength=80,pl.padLength=64,pl.prototype._update=function(ke,Ae){for(var Ce=this.W,qe=0;qe<16;qe++)Ce[qe]=ke[Ae+qe];for(;qe<Ce.length;qe++)Ce[qe]=pp(Ce[qe-3]^Ce[qe-8]^Ce[qe-14]^Ce[qe-16],1);var ze=this.h[0],Ve=this.h[1],tt=this.h[2],rt=this.h[3],it=this.h[4];for(qe=0;qe<Ce.length;qe++){var nt=~~(qe/20),ot=mp(pp(ze,5),gp(nt,Ve,tt,rt),it,Ce[qe],vp[nt]);it=rt,rt=tt,tt=pp(Ve,30),Ve=ze,ze=ot}this.h[0]=yp(this.h[0],ze),this.h[1]=yp(this.h[1],Ve),this.h[2]=yp(this.h[2],tt),this.h[3]=yp(this.h[3],rt),this.h[4]=yp(this.h[4],it)},pl.prototype._digest=function(ke){return"hex"===ke?$r.toHex32(this.h,"big"):$r.split32(this.h,"big")};var _p={sha1:wp,sha224:_i,sha256:wi,sha384:rn,sha512:tn};function ml(ke,Ae,Ce){if(!(this instanceof ml))return new ml(ke,Ae,Ce);this.Hash=ke,this.blockSize=ke.blockSize/8,this.outSize=ke.outSize/8,this.inner=null,this.outer=null,this._init($r.toArray(Ae,Ce))}var kp=ml;ml.prototype._init=function(ke){ke.length>this.blockSize&&(ke=(new this.Hash).update(ke).digest()),Ur(ke.length<=this.blockSize);for(var Ae=ke.length;Ae<this.blockSize;Ae++)ke.push(0);for(Ae=0;Ae<ke.length;Ae++)ke[Ae]^=54;for(this.inner=(new this.Hash).update(ke),Ae=0;Ae<ke.length;Ae++)ke[Ae]^=106;this.outer=(new this.Hash).update(ke)},ml.prototype.update=function(ke,Ae){return this.inner.update(ke,Ae),this},ml.prototype.digest=function(ke){return this.outer.update(this.inner.digest()),this.outer.digest(ke)};var Ap=bt((function(ke,Ae){var Ce=Ae;Ce.utils=$r,Ce.common=Jr,Ce.sha=_p,Ce.ripemd=xn,Ce.hmac=kp,Ce.sha1=Ce.sha.sha1,Ce.sha256=Ce.sha.sha256,Ce.sha224=Ce.sha.sha224,Ce.sha384=Ce.sha.sha384,Ce.sha512=Ce.sha.sha512,Ce.ripemd160=Ce.ripemd.ripemd160})),Sp={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"]]}},Ep=bt((function(ke,Ae){var Ce,qe=Ae,ze=ep.assert;function a(ke){if("short"===ke.type)this.curve=new dp.short(ke);else if("edwards"===ke.type)this.curve=new dp.edwards(ke);else{if("mont"!==ke.type)throw Error("Unknown curve type.");this.curve=new dp.mont(ke)}this.g=this.curve.g,this.n=this.curve.n,this.hash=ke.hash,ze(this.g.validate(),"Invalid curve"),ze(this.g.mul(this.n).isInfinity(),"Invalid curve, n*G != O")}function s(ke,Ae){Object.defineProperty(qe,ke,{configurable:!0,enumerable:!0,get:function(){var Ce=new a(Ae);return Object.defineProperty(qe,ke,{configurable:!0,enumerable:!0,value:Ce}),Ce}})}qe.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:Ap.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:Ap.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:Ap.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:Ap.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:Ap.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:Ap.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:Ap.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:Ap.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:Ap.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:Ap.sha512,gRed:!1,g:["81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822","7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892"]});try{Ce=Sp}catch(ke){Ce=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:Ap.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Ce]})}));function kl(ke){if(!(this instanceof kl))return new kl(ke);this.hash=ke.hash,this.predResist=!!ke.predResist,this.outLen=this.hash.outSize,this.minEntropy=ke.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var Ae=Xd.toArray(ke.entropy,ke.entropyEnc||"hex"),Ce=Xd.toArray(ke.nonce,ke.nonceEnc||"hex"),qe=Xd.toArray(ke.pers,ke.persEnc||"hex");Ur(Ae.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(Ae,Ce,qe)}var Mp=kl;kl.prototype._init=function(ke,Ae,Ce){var qe=ke.concat(Ae).concat(Ce);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var ze=0;ze<this.V.length;ze++)this.K[ze]=0,this.V[ze]=1;this._update(qe),this._reseed=1,this.reseedInterval=281474976710656},kl.prototype._hmac=function(){return new Ap.hmac(this.hash,this.K)},kl.prototype._update=function(ke){var Ae=this._hmac().update(this.V).update([0]);ke&&(Ae=Ae.update(ke)),this.K=Ae.digest(),this.V=this._hmac().update(this.V).digest(),ke&&(this.K=this._hmac().update(this.V).update([1]).update(ke).digest(),this.V=this._hmac().update(this.V).digest())},kl.prototype.reseed=function(ke,Ae,Ce,qe){"string"!=typeof Ae&&(qe=Ce,Ce=Ae,Ae=null),ke=Xd.toArray(ke,Ae),Ce=Xd.toArray(Ce,qe),Ur(ke.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(ke.concat(Ce||[])),this._reseed=1},kl.prototype.generate=function(ke,Ae,Ce,qe){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof Ae&&(qe=Ce,Ce=Ae,Ae=null),Ce&&(Ce=Xd.toArray(Ce,qe||"hex"),this._update(Ce));for(var ze=[];ze.length<ke;)this.V=this._hmac().update(this.V).digest(),ze=ze.concat(this.V);var Ve=ze.slice(0,ke);return this._update(Ce),this._reseed++,Xd.encode(Ve,Ae)};var Pp=ep.assert;function El(ke,Ae){this.ec=ke,this.priv=null,this.pub=null,Ae.priv&&this._importPrivate(Ae.priv,Ae.privEnc),Ae.pub&&this._importPublic(Ae.pub,Ae.pubEnc)}var xp=El;El.fromPublic=function(ke,Ae,Ce){return Ae instanceof El?Ae:new El(ke,{pub:Ae,pubEnc:Ce})},El.fromPrivate=function(ke,Ae,Ce){return Ae instanceof El?Ae:new El(ke,{priv:Ae,privEnc:Ce})},El.prototype.validate=function(){var ke=this.getPublic();return ke.isInfinity()?{result:!1,reason:"Invalid public key"}:ke.validate()?ke.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"}},El.prototype.getPublic=function(ke,Ae){return this.pub||(this.pub=this.ec.g.mul(this.priv)),ke?this.pub.encode(ke,Ae):this.pub},El.prototype.getPrivate=function(ke){return"hex"===ke?this.priv.toString(16,2):this.priv},El.prototype._importPrivate=function(ke,Ae){if(this.priv=new Hd(ke,Ae||16),"mont"===this.ec.curve.type){var Ce=this.ec.curve.one,qe=Ce.ushln(252).sub(Ce).ushln(3);this.priv=this.priv.or(Ce.ushln(254)),this.priv=this.priv.and(qe)}else this.priv=this.priv.umod(this.ec.curve.n)},El.prototype._importPublic=function(ke,Ae){if(ke.x||ke.y)return"mont"===this.ec.curve.type?Pp(ke.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Pp(ke.x&&ke.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(ke.x,ke.y));this.pub=this.ec.curve.decodePoint(ke,Ae)},El.prototype.derive=function(ke){return ke.mul(this.priv).getX()},El.prototype.sign=function(ke,Ae,Ce){return this.ec.sign(ke,this,Ae,Ce)},El.prototype.verify=function(ke,Ae){return this.ec.verify(ke,Ae,this)},El.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Cp=ep.assert;function Ml(ke,Ae){if(ke instanceof Ml)return ke;this._importDER(ke,Ae)||(Cp(ke.r&&ke.s,"Signature without r or s"),this.r=new Hd(ke.r,16),this.s=new Hd(ke.s,16),void 0===ke.recoveryParam?this.recoveryParam=null:this.recoveryParam=ke.recoveryParam)}var Dp=Ml;function Kl(){this.place=0}function Dl(ke,Ae){var Ce=ke[Ae.place++];if(!(128&Ce))return Ce;for(var qe=15&Ce,ze=0,Ve=0,tt=Ae.place;Ve<qe;Ve++,tt++)ze<<=8,ze|=ke[tt];return Ae.place=tt,ze}function Rl(ke){for(var Ae=0,Ce=ke.length-1;!ke[Ae]&&!(128&ke[Ae+1])&&Ae<Ce;)Ae++;return 0===Ae?ke:ke.slice(Ae)}function Ul(ke,Ae){if(Ae<128)ke.push(Ae);else{var Ce=1+(Math.log(Ae)/Math.LN2>>>3);for(ke.push(128|Ce);--Ce;)ke.push(Ae>>>(Ce<<3)&255);ke.push(Ae)}}Ml.prototype._importDER=function(ke,Ae){ke=ep.toArray(ke,Ae);var Ce=new Kl;if(48!==ke[Ce.place++])return!1;if(Dl(ke,Ce)+Ce.place!==ke.length)return!1;if(2!==ke[Ce.place++])return!1;var qe=Dl(ke,Ce),ze=ke.slice(Ce.place,qe+Ce.place);if(Ce.place+=qe,2!==ke[Ce.place++])return!1;var Ve=Dl(ke,Ce);if(ke.length!==Ve+Ce.place)return!1;var tt=ke.slice(Ce.place,Ve+Ce.place);return 0===ze[0]&&128&ze[1]&&(ze=ze.slice(1)),0===tt[0]&&128&tt[1]&&(tt=tt.slice(1)),this.r=new Hd(ze),this.s=new Hd(tt),this.recoveryParam=null,!0},Ml.prototype.toDER=function(ke){var Ae=this.r.toArray(),Ce=this.s.toArray();for(128&Ae[0]&&(Ae=[0].concat(Ae)),128&Ce[0]&&(Ce=[0].concat(Ce)),Ae=Rl(Ae),Ce=Rl(Ce);!(Ce[0]||128&Ce[1]);)Ce=Ce.slice(1);var qe=[2];Ul(qe,Ae.length),(qe=qe.concat(Ae)).push(2),Ul(qe,Ce.length);var ze=qe.concat(Ce),Ve=[48];return Ul(Ve,ze.length),Ve=Ve.concat(ze),ep.encode(Ve,ke)};var Rp=ep.assert;function Bl(ke){if(!(this instanceof Bl))return new Bl(ke);"string"==typeof ke&&(Rp(Ep.hasOwnProperty(ke),"Unknown curve "+ke),ke=Ep[ke]),ke instanceof Ep.PresetCurve&&(ke={curve:ke}),this.curve=ke.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=ke.curve.g,this.g.precompute(ke.curve.n.bitLength()+1),this.hash=ke.hash||ke.curve.hash}var Bp=Bl;Bl.prototype.keyPair=function(ke){return new xp(this,ke)},Bl.prototype.keyFromPrivate=function(ke,Ae){return xp.fromPrivate(this,ke,Ae)},Bl.prototype.keyFromPublic=function(ke,Ae){return xp.fromPublic(this,ke,Ae)},Bl.prototype.genKeyPair=function(ke){ke||(ke={});var Ae=new Mp({hash:this.hash,pers:ke.pers,persEnc:ke.persEnc||"utf8",entropy:ke.entropy||Od(this.hash.hmacStrength),entropyEnc:ke.entropy&&ke.entropyEnc||"utf8",nonce:this.n.toArray()});if("mont"===this.curve.type){var Ce=new Hd(Ae.generate(32));return this.keyFromPrivate(Ce)}for(var qe=this.n.byteLength(),ze=this.n.sub(new Hd(2));;){if(!((Ce=new Hd(Ae.generate(qe))).cmp(ze)>0))return Ce.iaddn(1),this.keyFromPrivate(Ce)}},Bl.prototype._truncateToN=function(ke,Ae,Ce){var qe=(Ce=Ce||8*ke.byteLength())-this.n.bitLength();return qe>0&&(ke=ke.ushrn(qe)),!Ae&&ke.cmp(this.n)>=0?ke.sub(this.n):ke},Bl.prototype.truncateMsg=function(ke){var Ae;return ke instanceof Uint8Array?(Ae=8*ke.byteLength,ke=this._truncateToN(new Hd(ke,16),!1,Ae)):"string"==typeof ke?(Ae=4*ke.length,ke=this._truncateToN(new Hd(ke,16),!1,Ae)):ke=this._truncateToN(new Hd(ke,16)),ke},Bl.prototype.sign=function(ke,Ae,Ce,qe){"object"==typeof Ce&&(qe=Ce,Ce=null),qe||(qe={}),Ae=this.keyFromPrivate(Ae,Ce),ke=this.truncateMsg(ke);for(var ze=this.n.byteLength(),Ve=Ae.getPrivate().toArray("be",ze),tt=ke.toArray("be",ze),rt=new Mp({hash:this.hash,entropy:Ve,nonce:tt,pers:qe.pers,persEnc:qe.persEnc||"utf8"}),it=this.n.sub(new Hd(1)),nt=0;;nt++){var ot=qe.k?qe.k(nt):new Hd(rt.generate(this.n.byteLength()));if(!((ot=this._truncateToN(ot,!0)).cmpn(1)<=0||ot.cmp(it)>=0)){var ct=this.g.mul(ot);if(!ct.isInfinity()){var ht=ct.getX(),ft=ht.umod(this.n);if(0!==ft.cmpn(0)){var yt=ot.invm(this.n).mul(ft.mul(Ae.getPrivate()).iadd(ke));if(0!==(yt=yt.umod(this.n)).cmpn(0)){var mt=(ct.getY().isOdd()?1:0)|(0!==ht.cmp(ft)?2:0);return qe.canonical&&yt.cmp(this.nh)>0&&(yt=this.n.sub(yt),mt^=1),new Dp({r:ft,s:yt,recoveryParam:mt})}}}}}},Bl.prototype.verify=function(ke,Ae,Ce,qe){return Ce=this.keyFromPublic(Ce,qe),Ae=new Dp(Ae,"hex"),this._verify(this.truncateMsg(ke),Ae,Ce)||this._verify(this._truncateToN(new Hd(ke,16)),Ae,Ce)},Bl.prototype._verify=function(ke,Ae,Ce){var qe=Ae.r,ze=Ae.s;if(qe.cmpn(1)<0||qe.cmp(this.n)>=0)return!1;if(ze.cmpn(1)<0||ze.cmp(this.n)>=0)return!1;var Ve,tt=ze.invm(this.n),rt=tt.mul(ke).umod(this.n),it=tt.mul(qe).umod(this.n);return this.curve._maxwellTrick?!(Ve=this.g.jmulAdd(rt,Ce.getPublic(),it)).isInfinity()&&Ve.eqXToP(qe):!(Ve=this.g.mulAdd(rt,Ce.getPublic(),it)).isInfinity()&&0===Ve.getX().umod(this.n).cmp(qe)},Bl.prototype.recoverPubKey=function(ke,Ae,Ce,qe){Rp((3&Ce)===Ce,"The recovery param is more than two bits"),Ae=new Dp(Ae,qe);var ze=this.n,Ve=new Hd(ke),tt=Ae.r,rt=Ae.s,it=1&Ce,nt=Ce>>1;if(tt.cmp(this.curve.p.umod(this.curve.n))>=0&&nt)throw Error("Unable to find sencond key candinate");tt=nt?this.curve.pointFromX(tt.add(this.curve.n),it):this.curve.pointFromX(tt,it);var ot=Ae.r.invm(ze),ct=ze.sub(Ve).mul(ot).umod(ze),ht=rt.mul(ot).umod(ze);return this.g.mulAdd(ct,tt,ht)},Bl.prototype.getKeyRecoveryParam=function(ke,Ae,Ce,qe){if(null!==(Ae=new Dp(Ae,qe)).recoveryParam)return Ae.recoveryParam;for(var ze=0;ze<4;ze++){var Ve;try{Ve=this.recoverPubKey(ke,Ae,ze)}catch(ke){continue}if(Ve.eq(Ce))return ze}throw Error("Unable to find valid recovery factor")};var Tp=ep.assert,Up=ep.parseBytes,Kp=ep.cachedProperty;function Fl(ke,Ae){if(this.eddsa=ke,Ae.hasOwnProperty("secret")&&(this._secret=Up(Ae.secret)),ke.isPoint(Ae.pub))this._pub=Ae.pub;else if(this._pubBytes=Up(Ae.pub),this._pubBytes&&33===this._pubBytes.length&&64===this._pubBytes[0]&&(this._pubBytes=this._pubBytes.slice(1,33)),this._pubBytes&&32!==this._pubBytes.length)throw Error("Unknown point compression format")}Fl.fromPublic=function(ke,Ae){return Ae instanceof Fl?Ae:new Fl(ke,{pub:Ae})},Fl.fromSecret=function(ke,Ae){return Ae instanceof Fl?Ae:new Fl(ke,{secret:Ae})},Fl.prototype.secret=function(){return this._secret},Kp(Fl,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Kp(Fl,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Kp(Fl,"privBytes",(function(){var ke=this.eddsa,Ae=this.hash(),Ce=ke.encodingLength-1,qe=Ae.slice(0,ke.encodingLength);return qe[0]&=248,qe[Ce]&=127,qe[Ce]|=64,qe})),Kp(Fl,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Kp(Fl,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Kp(Fl,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Fl.prototype.sign=function(ke){return Tp(this._secret,"KeyPair can only verify"),this.eddsa.sign(ke,this)},Fl.prototype.verify=function(ke,Ae){return this.eddsa.verify(ke,Ae,this)},Fl.prototype.getSecret=function(ke){return Tp(this._secret,"KeyPair is public only"),ep.encode(this.secret(),ke)},Fl.prototype.getPublic=function(ke,Ae){return ep.encode((Ae?[64]:[]).concat(this.pubBytes()),ke)};var Ip=Fl,Op=ep.assert,Np=ep.cachedProperty,qp=ep.parseBytes;function Hl(ke,Ae){this.eddsa=ke,"object"!=typeof Ae&&(Ae=qp(Ae)),Array.isArray(Ae)&&(Ae={R:Ae.slice(0,ke.encodingLength),S:Ae.slice(ke.encodingLength)}),Op(Ae.R&&Ae.S,"Signature without R or S"),ke.isPoint(Ae.R)&&(this._R=Ae.R),Ae.S instanceof Hd&&(this._S=Ae.S),this._Rencoded=Array.isArray(Ae.R)?Ae.R:Ae.Rencoded,this._Sencoded=Array.isArray(Ae.S)?Ae.S:Ae.Sencoded}Np(Hl,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Np(Hl,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Np(Hl,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Np(Hl,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Hl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Hl.prototype.toHex=function(){return ep.encode(this.toBytes(),"hex").toUpperCase()};var jp=Hl,zp=ep.assert,Fp=ep.parseBytes;function Zl(ke){if(zp("ed25519"===ke,"only tested with ed25519 so far"),!(this instanceof Zl))return new Zl(ke);ke=Ep[ke].curve;this.curve=ke,this.g=ke.g,this.g.precompute(ke.n.bitLength()+1),this.pointClass=ke.point().constructor,this.encodingLength=Math.ceil(ke.n.bitLength()/8),this.hash=Ap.sha512}var Lp=Zl;Zl.prototype.sign=function(ke,Ae){ke=Fp(ke);var Ce=this.keyFromSecret(Ae),qe=this.hashInt(Ce.messagePrefix(),ke),ze=this.g.mul(qe),Ve=this.encodePoint(ze),tt=this.hashInt(Ve,Ce.pubBytes(),ke).mul(Ce.priv()),rt=qe.add(tt).umod(this.curve.n);return this.makeSignature({R:ze,S:rt,Rencoded:Ve})},Zl.prototype.verify=function(ke,Ae,Ce){ke=Fp(ke),Ae=this.makeSignature(Ae);var qe=this.keyFromPublic(Ce),ze=this.hashInt(Ae.Rencoded(),qe.pubBytes(),ke),Ve=this.g.mul(Ae.S());return Ae.R().add(qe.pub().mul(ze)).eq(Ve)},Zl.prototype.hashInt=function(){for(var ke=this.hash(),Ae=0;Ae<arguments.length;Ae++)ke.update(arguments[Ae]);return ep.intFromLE(ke.digest()).umod(this.curve.n)},Zl.prototype.keyPair=function(ke){return new Ip(this,ke)},Zl.prototype.keyFromPublic=function(ke){return Ip.fromPublic(this,ke)},Zl.prototype.keyFromSecret=function(ke){return Ip.fromSecret(this,ke)},Zl.prototype.genKeyPair=function(ke){ke||(ke={});var Ae=new Mp({hash:this.hash,pers:ke.pers,persEnc:ke.persEnc||"utf8",entropy:ke.entropy||Od(this.hash.hmacStrength),entropyEnc:ke.entropy&&ke.entropyEnc||"utf8",nonce:this.curve.n.toArray()});return this.keyFromSecret(Ae.generate(32))},Zl.prototype.makeSignature=function(ke){return ke instanceof jp?ke:new jp(this,ke)},Zl.prototype.encodePoint=function(ke){var Ae=ke.getY().toArray("le",this.encodingLength);return Ae[this.encodingLength-1]|=ke.getX().isOdd()?128:0,Ae},Zl.prototype.decodePoint=function(ke){var Ae=(ke=ep.parseBytes(ke)).length-1,Ce=ke.slice(0,Ae).concat(-129&ke[Ae]),qe=0!=(128&ke[Ae]),ze=ep.intFromLE(Ce);return this.curve.pointFromY(ze,qe)},Zl.prototype.encodeInt=function(ke){return ke.toArray("le",this.encodingLength)},Zl.prototype.decodeInt=function(ke){return ep.intFromLE(ke)},Zl.prototype.isPoint=function(ke){return ke instanceof this.pointClass};var Hp=bt((function(ke,Ae){var Ce=Ae;Ce.utils=ep,Ce.rand=Od,Ce.curve=dp,Ce.curves=Ep,Ce.ec=Bp,Ce.eddsa=Lp})),Wp=Object.freeze({__proto__:null,default:Hp,__moduleExports:Hp});Ae.AEADEncryptedDataPacket=Ao,Ae.CleartextMessage=wc,Ae.CompressedDataPacket=fo,Ae.LiteralDataPacket=ro,Ae.MarkerPacket=class{static get tag(){return er.packet.marker}read(ke){return 80===ke[0]&&71===ke[1]&&80===ke[2]}write(){return new Uint8Array([80,71,80])}},Ae.Message=yc,Ae.OnePassSignaturePacket=oo,Ae.PacketList=uo,Ae.PrivateKey=uc,Ae.PublicKey=cc,Ae.PublicKeyEncryptedSessionKeyPacket=So,Ae.PublicKeyPacket=xo,Ae.PublicSubkeyPacket=Ko,Ae.SecretKeyPacket=Ro,Ae.SecretSubkeyPacket=To,Ae.Signature=qo,Ae.SignaturePacket=ao,Ae.Subkey=rc,Ae.SymEncryptedIntegrityProtectedDataPacket=_o,Ae.SymEncryptedSessionKeyPacket=Po,Ae.SymmetricallyEncryptedDataPacket=Co,Ae.TrustPacket=class{static get tag(){return er.packet.trust}read(){throw new Ui("Trust packets are not supported")}write(){throw new Ui("Trust packets are not supported")}},Ae.UnparseablePacket=Ii,Ae.UserAttributePacket=Do,Ae.UserIDPacket=Bo,Ae.armor=xe,Ae.config=tr,Ae.createCleartextMessage=async function({text:ke,...Ae}){if(!ke)throw Error("createCleartextMessage: must pass options object containing `text`");if(!Zt.isString(ke))throw Error("createCleartextMessage: options.text must be a string");const Ce=Object.keys(Ae);if(Ce.length>0)throw Error("Unknown option: "+Ce.join(", "));return new wc(ke)},Ae.createMessage=async function({text:ke,binary:Ae,filename:Ce,date:qe=new Date,format:ze=(void 0!==ke?"utf8":"binary"),...Ve}){let tt=void 0!==ke?ke:Ae;if(void 0===tt)throw Error("createMessage: must pass options object containing `text` or `binary`");if(ke&&!Zt.isString(ke)&&!Zt.isStream(ke))throw Error("createMessage: options.text must be a string or stream");if(Ae&&!Zt.isUint8Array(Ae)&&!Zt.isStream(Ae))throw Error("createMessage: options.binary must be a Uint8Array or stream");const rt=Object.keys(Ve);if(rt.length>0)throw Error("Unknown option: "+rt.join(", "));const it=Zt.isStream(tt);it&&(await F(),tt=j(tt));const nt=new ro(qe);void 0!==ke?nt.setText(tt,er.write(er.literal,ze)):nt.setBytes(tt,er.write(er.literal,ze)),void 0!==Ce&&nt.setFilename(Ce);const ot=new uo;ot.push(nt);const ct=new yc(ot);return ct.fromStream=it,ct},Ae.decrypt=async function({message:ke,decryptionKeys:Ae,passwords:Ce,sessionKeys:qe,verificationKeys:ze,expectSigned:Ve=!1,format:tt="utf8",signature:rt=null,date:it=new Date,config:nt,...ot}){if(Sc(nt={...tr,...nt}),vc(ke),ze=Ec(ze),Ae=Ec(Ae),Ce=Ec(Ce),qe=Ec(qe),ot.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decrypt, pass `decryptionKeys` instead");if(ot.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.decrypt, pass `verificationKeys` instead");const ct=Object.keys(ot);if(ct.length>0)throw Error("Unknown option: "+ct.join(", "));try{const ot=await ke.decrypt(Ae,Ce,qe,it,nt);ze||(ze=[]);const ct={};if(ct.signatures=rt?await ot.verifyDetached(rt,ze,it,nt):await ot.verify(ze,it,nt),ct.data="binary"===tt?ot.getLiteralData():ot.getText(),ct.filename=ot.getFilename(),xc(ct,ke),Ve){if(0===ze.length)throw Error("Verification keys are required to verify message signatures");if(0===ct.signatures.length)throw Error("Message is not signed");ct.data=W([ct.data,ae((async()=>{await Zt.anyPromise(ct.signatures.map((ke=>ke.verified)))}))])}return ct.data=await Pc(ct.data,ke.fromStream,tt),ct}catch(ke){throw Zt.wrapError("Error decrypting message",ke)}},Ae.decryptKey=async function({privateKey:ke,passphrase:Ae,config:Ce,...qe}){Sc(Ce={...tr,...Ce});const ze=Object.keys(qe);if(ze.length>0)throw Error("Unknown option: "+ze.join(", "));if(!ke.isPrivate())throw Error("Cannot decrypt a public key");const Ve=ke.clone(!0),tt=Zt.isArray(Ae)?Ae:[Ae];try{return await Promise.all(Ve.getKeys().map((ke=>Zt.anyPromise(tt.map((Ae=>ke.keyPacket.decrypt(Ae))))))),await Ve.validate(Ce),Ve}catch(ke){throw Ve.clearPrivateParams(),Zt.wrapError("Error decrypting private key",ke)}},Ae.decryptSessionKeys=async function({message:ke,decryptionKeys:Ae,passwords:Ce,date:qe=new Date,config:ze,...Ve}){if(Sc(ze={...tr,...ze}),vc(ke),Ae=Ec(Ae),Ce=Ec(Ce),Ve.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decryptSessionKeys, pass `decryptionKeys` instead");const tt=Object.keys(Ve);if(tt.length>0)throw Error("Unknown option: "+tt.join(", "));try{return await ke.decryptSessionKeys(Ae,Ce,qe,ze)}catch(ke){throw Zt.wrapError("Error decrypting session keys",ke)}},Ae.encrypt=async function({message:ke,encryptionKeys:Ae,signingKeys:Ce,passwords:qe,sessionKey:ze,format:Ve="armored",signature:tt=null,wildcard:rt=!1,signingKeyIDs:it=[],encryptionKeyIDs:nt=[],date:ot=new Date,signingUserIDs:ct=[],encryptionUserIDs:ht=[],config:ft,...yt}){if(Sc(ft={...tr,...ft}),vc(ke),kc(Ve),Ae=Ec(Ae),Ce=Ec(Ce),qe=Ec(qe),it=Ec(it),nt=Ec(nt),ct=Ec(ct),ht=Ec(ht),yt.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(yt.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encrypt, pass `encryptionKeys` instead");if(yt.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.encrypt, pass `signingKeys` instead");if(void 0!==yt.armor)throw Error("The `armor` option has been removed from openpgp.encrypt, pass `format` instead.");const mt=Object.keys(yt);if(mt.length>0)throw Error("Unknown option: "+mt.join(", "));Ce||(Ce=[]);const kt=ke.fromStream;try{if((Ce.length||tt)&&(ke=await ke.sign(Ce,tt,it,ot,ct,ft)),ke=ke.compress(await Ho("compression",Ae,ot,ht,ft),ft),ke=await ke.encrypt(Ae,qe,ze,rt,nt,ot,ht,ft),"object"===Ve)return ke;const yt="armored"===Ve;return Pc(yt?ke.armor(ft):ke.write(),kt,yt?"utf8":"binary")}catch(ke){throw Zt.wrapError("Error encrypting message",ke)}},Ae.encryptKey=async function({privateKey:ke,passphrase:Ae,config:Ce,...qe}){Sc(Ce={...tr,...Ce});const ze=Object.keys(qe);if(ze.length>0)throw Error("Unknown option: "+ze.join(", "));if(!ke.isPrivate())throw Error("Cannot encrypt a public key");const Ve=ke.clone(!0),tt=Ve.getKeys(),rt=Zt.isArray(Ae)?Ae:Array(tt.length).fill(Ae);if(rt.length!==tt.length)throw Error("Invalid number of passphrases given for key encryption");try{return await Promise.all(tt.map((async(ke,Ae)=>{const{keyPacket:qe}=ke;await qe.encrypt(rt[Ae],Ce),qe.clearPrivateParams()}))),Ve}catch(ke){throw Ve.clearPrivateParams(),Zt.wrapError("Error encrypting private key",ke)}},Ae.encryptSessionKey=async function({data:ke,algorithm:Ae,aeadAlgorithm:Ce,encryptionKeys:qe,passwords:ze,format:Ve="armored",wildcard:tt=!1,encryptionKeyIDs:rt=[],date:it=new Date,encryptionUserIDs:nt=[],config:ot,...ct}){if(Sc(ot={...tr,...ot}),function(ke,Ae){if(!Zt.isUint8Array(ke))throw Error("Parameter ["+(Ae||"data")+"] must be of type Uint8Array")}(ke),function(ke,Ae){if(!Zt.isString(ke))throw Error("Parameter ["+(Ae||"data")+"] must be of type String")}(Ae,"algorithm"),kc(Ve),qe=Ec(qe),ze=Ec(ze),rt=Ec(rt),nt=Ec(nt),ct.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encryptSessionKey, pass `encryptionKeys` instead");const ht=Object.keys(ct);if(ht.length>0)throw Error("Unknown option: "+ht.join(", "));if(!(qe&&0!==qe.length||ze&&0!==ze.length))throw Error("No encryption keys or passwords provided.");try{return Mc(await yc.encryptSessionKey(ke,Ae,Ce,qe,ze,tt,rt,it,nt,ot),Ve,ot)}catch(ke){throw Zt.wrapError("Error encrypting session key",ke)}},Ae.enums=er,Ae.generateKey=async function({userIDs:ke=[],passphrase:Ae,type:Ce="ecc",rsaBits:qe=4096,curve:ze="curve25519",keyExpirationTime:Ve=0,date:tt=new Date,subkeys:rt=[{}],format:it="armored",config:nt,...ot}){Sc(nt={...tr,...nt}),ke=Ec(ke);const ct=Object.keys(ot);if(ct.length>0)throw Error("Unknown option: "+ct.join(", "));if(0===ke.length)throw Error("UserIDs are required for key generation");if("rsa"===Ce&&qe<nt.minRSABits)throw Error(`rsaBits should be at least ${nt.minRSABits}, got: ${qe}`);const ht={userIDs:ke,passphrase:Ae,type:Ce,rsaBits:qe,curve:ze,keyExpirationTime:Ve,date:tt,subkeys:rt};try{const{key:ke,revocationCertificate:Ae}=await async function(ke,Ae){ke.sign=!0,(ke=Yo(ke)).subkeys=ke.subkeys.map(((Ae,Ce)=>Yo(ke.subkeys[Ce],ke)));let Ce=[Fo(ke,Ae)];Ce=Ce.concat(ke.subkeys.map((ke=>Oo(ke,Ae))));const qe=await Promise.all(Ce),ze=await fc(qe[0],qe.slice(1),ke,Ae),Ve=await ze.getRevocationCertificate(ke.date,Ae);return ze.revocationSignatures=[],{key:ze,revocationCertificate:Ve}}(ht,nt);return ke.getKeys().forEach((({keyPacket:ke})=>ec(ke,nt))),{privateKey:Mc(ke,it,nt),publicKey:Mc(ke.toPublic(),it,nt),revocationCertificate:Ae}}catch(ke){throw Zt.wrapError("Error generating keypair",ke)}},Ae.generateSessionKey=async function({encryptionKeys:ke,date:Ae=new Date,encryptionUserIDs:Ce=[],config:qe,...ze}){if(Sc(qe={...tr,...qe}),ke=Ec(ke),Ce=Ec(Ce),ze.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.generateSessionKey, pass `encryptionKeys` instead");const Ve=Object.keys(ze);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));try{return await yc.generateSessionKey(ke,Ae,Ce,qe)}catch(ke){throw Zt.wrapError("Error generating session key",ke)}},Ae.readCleartextMessage=async function({cleartextMessage:ke,config:Ae,...Ce}){if(Ae={...tr,...Ae},!ke)throw Error("readCleartextMessage: must pass options object containing `cleartextMessage`");if(!Zt.isString(ke))throw Error("readCleartextMessage: options.cleartextMessage must be a string");const qe=Object.keys(Ce);if(qe.length>0)throw Error("Unknown option: "+qe.join(", "));const ze=await Pe(ke);if(ze.type!==er.armor.signed)throw Error("No cleartext signed message.");const Ve=await uo.fromBinary(ze.data,Nl,Ae);!function(ke,Ae){const r=function(ke){const r=ke=>Ae=>ke.hashAlgorithm===Ae;for(let Ce=0;Ce<Ae.length;Ce++)if(Ae[Ce].constructor.tag===er.packet.signature&&!ke.some(r(Ae[Ce])))return!1;return!0};let Ce=null,qe=[];if(ke.forEach((function(ke){if(Ce=ke.match(/Hash: (.+)/),!Ce)throw Error('Only "Hash" header allowed in cleartext signed message');Ce=Ce[1].replace(/\s/g,""),Ce=Ce.split(","),Ce=Ce.map((function(ke){ke=ke.toLowerCase();try{return er.write(er.hash,ke)}catch(Ae){throw Error("Unknown hash algorithm in armor header: "+ke)}})),qe=qe.concat(Ce)})),!qe.length&&!r([er.hash.md5]))throw Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(qe.length&&!r(qe))throw Error("Hash algorithm mismatch in armor header and signature")}(ze.headers,Ve);const tt=new qo(Ve);return new wc(ze.text,tt)},Ae.readKey=async function({armoredKey:ke,binaryKey:Ae,config:Ce,...qe}){if(Ce={...tr,...Ce},!ke&&!Ae)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(ke&&!Zt.isString(ke))throw Error("readKey: options.armoredKey must be a string");if(Ae&&!Zt.isUint8Array(Ae))throw Error("readKey: options.binaryKey must be a Uint8Array");const ze=Object.keys(qe);if(ze.length>0)throw Error("Unknown option: "+ze.join(", "));let Ve;if(ke){const{type:Ae,data:qe}=await Pe(ke,Ce);if(Ae!==er.armor.publicKey&&Ae!==er.armor.privateKey)throw Error("Armored text not of type key");Ve=qe}else Ve=Ae;return oc(await uo.fromBinary(Ve,Cl,Ce))},Ae.readKeys=async function({armoredKeys:ke,binaryKeys:Ae,config:Ce,...qe}){Ce={...tr,...Ce};let ze=ke||Ae;if(!ze)throw Error("readKeys: must pass options object containing `armoredKeys` or `binaryKeys`");if(ke&&!Zt.isString(ke))throw Error("readKeys: options.armoredKeys must be a string");if(Ae&&!Zt.isUint8Array(Ae))throw Error("readKeys: options.binaryKeys must be a Uint8Array");const Ve=Object.keys(qe);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));if(ke){const{type:Ae,data:qe}=await Pe(ke,Ce);if(Ae!==er.armor.publicKey&&Ae!==er.armor.privateKey)throw Error("Armored text not of type key");ze=qe}const tt=[],rt=await uo.fromBinary(ze,Cl,Ce),it=rt.indexOfTag(er.packet.publicKey,er.packet.secretKey);if(0===it.length)throw Error("No key packet found");for(let ke=0;ke<it.length;ke++){const Ae=oc(rt.slice(it[ke],it[ke+1]));tt.push(Ae)}return tt},Ae.readMessage=async function({armoredMessage:ke,binaryMessage:Ae,config:Ce,...qe}){Ce={...tr,...Ce};let ze=ke||Ae;if(!ze)throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`");if(ke&&!Zt.isString(ke)&&!Zt.isStream(ke))throw Error("readMessage: options.armoredMessage must be a string or stream");if(Ae&&!Zt.isUint8Array(Ae)&&!Zt.isStream(Ae))throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream");const Ve=Object.keys(qe);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));const tt=Zt.isStream(ze);if(tt&&(await F(),ze=j(ze)),ke){const{type:ke,data:Ae}=await Pe(ze,Ce);if(ke!==er.armor.message)throw Error("Armored text not of type message");ze=Ae}const rt=await uo.fromBinary(ze,Tl,Ce),it=new yc(rt);return it.fromStream=tt,it},Ae.readPrivateKey=async function({armoredKey:ke,binaryKey:Ae,config:Ce,...qe}){if(Ce={...tr,...Ce},!ke&&!Ae)throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`");if(ke&&!Zt.isString(ke))throw Error("readPrivateKey: options.armoredKey must be a string");if(Ae&&!Zt.isUint8Array(Ae))throw Error("readPrivateKey: options.binaryKey must be a Uint8Array");const ze=Object.keys(qe);if(ze.length>0)throw Error("Unknown option: "+ze.join(", "));let Ve;if(ke){const{type:Ae,data:qe}=await Pe(ke,Ce);if(Ae!==er.armor.privateKey)throw Error("Armored text not of type private key");Ve=qe}else Ve=Ae;const tt=await uo.fromBinary(Ve,Cl,Ce);return new uc(tt)},Ae.readPrivateKeys=async function({armoredKeys:ke,binaryKeys:Ae,config:Ce}){Ce={...tr,...Ce};let qe=ke||Ae;if(!qe)throw Error("readPrivateKeys: must pass options object containing `armoredKeys` or `binaryKeys`");if(ke&&!Zt.isString(ke))throw Error("readPrivateKeys: options.armoredKeys must be a string");if(Ae&&!Zt.isUint8Array(Ae))throw Error("readPrivateKeys: options.binaryKeys must be a Uint8Array");if(ke){const{type:Ae,data:ze}=await Pe(ke,Ce);if(Ae!==er.armor.privateKey)throw Error("Armored text not of type private key");qe=ze}const ze=[],Ve=await uo.fromBinary(qe,Cl,Ce),tt=Ve.indexOfTag(er.packet.secretKey);if(0===tt.length)throw Error("No secret key packet found");for(let ke=0;ke<tt.length;ke++){const Ae=Ve.slice(tt[ke],tt[ke+1]),Ce=new uc(Ae);ze.push(Ce)}return ze},Ae.readSignature=async function({armoredSignature:ke,binarySignature:Ae,config:Ce,...qe}){Ce={...tr,...Ce};let ze=ke||Ae;if(!ze)throw Error("readSignature: must pass options object containing `armoredSignature` or `binarySignature`");if(ke&&!Zt.isString(ke))throw Error("readSignature: options.armoredSignature must be a string");if(Ae&&!Zt.isUint8Array(Ae))throw Error("readSignature: options.binarySignature must be a Uint8Array");const Ve=Object.keys(qe);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));if(ke){const{type:ke,data:Ae}=await Pe(ze,Ce);if(ke!==er.armor.signature)throw Error("Armored text not of type signature");ze=Ae}const tt=await uo.fromBinary(ze,Al,Ce);return new qo(tt)},Ae.reformatKey=async function({privateKey:ke,userIDs:Ae=[],passphrase:Ce,keyExpirationTime:qe=0,date:ze,format:Ve="armored",config:tt,...rt}){Sc(tt={...tr,...tt}),Ae=Ec(Ae);const it=Object.keys(rt);if(it.length>0)throw Error("Unknown option: "+it.join(", "));if(0===Ae.length)throw Error("UserIDs are required for key reformat");const nt={privateKey:ke,userIDs:Ae,passphrase:Ce,keyExpirationTime:qe,date:ze};try{const{key:ke,revocationCertificate:Ae}=await async function(ke,Ae){ke=o(ke);const{privateKey:Ce}=ke;if(!Ce.isPrivate())throw Error("Cannot reformat a public key");if(Ce.keyPacket.isDummy())throw Error("Cannot reformat a gnu-dummy primary key");if(!Ce.getKeys().every((({keyPacket:ke})=>ke.isDecrypted())))throw Error("Key is not decrypted");const qe=Ce.keyPacket;ke.subkeys||(ke.subkeys=await Promise.all(Ce.subkeys.map((async ke=>{const Ce=ke.keyPacket,ze={key:qe,bind:Ce},Ve=await No(ke.bindingSignatures,qe,er.signature.subkeyBinding,ze,null,Ae).catch((()=>({})));return{sign:Ve.keyFlags&&Ve.keyFlags[0]&er.keyFlags.signData}}))));const ze=Ce.subkeys.map((ke=>ke.keyPacket));if(ke.subkeys.length!==ze.length)throw Error("Number of subkey options does not match number of subkeys");ke.subkeys=ke.subkeys.map((Ae=>o(Ae,ke)));const Ve=await fc(qe,ze,ke,Ae),tt=await Ve.getRevocationCertificate(ke.date,Ae);return Ve.revocationSignatures=[],{key:Ve,revocationCertificate:tt};function o(ke,Ae={}){return ke.keyExpirationTime=ke.keyExpirationTime||Ae.keyExpirationTime,ke.passphrase=Zt.isString(ke.passphrase)?ke.passphrase:Ae.passphrase,ke.date=ke.date||Ae.date,ke}}(nt,tt);return{privateKey:Mc(ke,Ve,tt),publicKey:Mc(ke.toPublic(),Ve,tt),revocationCertificate:Ae}}catch(ke){throw Zt.wrapError("Error reformatting keypair",ke)}},Ae.revokeKey=async function({key:ke,revocationCertificate:Ae,reasonForRevocation:Ce,date:qe=new Date,format:ze="armored",config:Ve,...tt}){Sc(Ve={...tr,...Ve});const rt=Object.keys(tt);if(rt.length>0)throw Error("Unknown option: "+rt.join(", "));try{const tt=Ae?await ke.applyRevocationCertificate(Ae,qe,Ve):await ke.revoke(Ce,qe,Ve);return tt.isPrivate()?{privateKey:Mc(tt,ze,Ve),publicKey:Mc(tt.toPublic(),ze,Ve)}:{privateKey:null,publicKey:Mc(tt,ze,Ve)}}catch(ke){throw Zt.wrapError("Error revoking key",ke)}},Ae.sign=async function({message:ke,signingKeys:Ae,format:Ce="armored",detached:qe=!1,signingKeyIDs:ze=[],date:Ve=new Date,signingUserIDs:tt=[],config:rt,...it}){if(Sc(rt={...tr,...rt}),_c(ke),kc(Ce),Ae=Ec(Ae),ze=Ec(ze),tt=Ec(tt),it.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.sign, pass `signingKeys` instead");if(void 0!==it.armor)throw Error("The `armor` option has been removed from openpgp.sign, pass `format` instead.");const nt=Object.keys(it);if(nt.length>0)throw Error("Unknown option: "+nt.join(", "));if(ke instanceof wc&&"binary"===Ce)throw Error("Cannot return signed cleartext message in binary format");if(ke instanceof wc&&qe)throw Error("Cannot detach-sign a cleartext message");if(!Ae||0===Ae.length)throw Error("No signing keys provided");try{let it;if(it=qe?await ke.signDetached(Ae,void 0,ze,Ve,tt,rt):await ke.sign(Ae,void 0,ze,Ve,tt,rt),"object"===Ce)return it;const nt="armored"===Ce;return it=nt?it.armor(rt):it.write(),qe&&(it=X(ke.packets.write(),(async(ke,Ae)=>{await Promise.all([V(it,Ae),ie(ke).catch((()=>{}))])}))),Pc(it,ke.fromStream,nt?"utf8":"binary")}catch(ke){throw Zt.wrapError("Error signing message",ke)}},Ae.unarmor=Pe,Ae.verify=async function({message:ke,verificationKeys:Ae,expectSigned:Ce=!1,format:qe="utf8",signature:ze=null,date:Ve=new Date,config:tt,...rt}){if(Sc(tt={...tr,...tt}),_c(ke),Ae=Ec(Ae),rt.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.verify, pass `verificationKeys` instead");const it=Object.keys(rt);if(it.length>0)throw Error("Unknown option: "+it.join(", "));if(ke instanceof wc&&"binary"===qe)throw Error("Can't return cleartext message data as binary");if(ke instanceof wc&&ze)throw Error("Can't verify detached cleartext signature");try{const rt={};if(rt.signatures=ze?await ke.verifyDetached(ze,Ae,Ve,tt):await ke.verify(Ae,Ve,tt),rt.data="binary"===qe?ke.getLiteralData():ke.getText(),ke.fromStream&&xc(rt,ke),Ce){if(0===rt.signatures.length)throw Error("Message is not signed");rt.data=W([rt.data,ae((async()=>{await Zt.anyPromise(rt.signatures.map((ke=>ke.verified)))}))])}return rt.data=await Pc(rt.data,ke.fromStream,qe),rt}catch(ke){throw Zt.wrapError("Error verifying signed message",ke)}}},5118:(ke,Ae,Ce)=>{"use strict";var qe=Ce(4300);var ze=qe.Buffer;var Ve={};var tt;for(tt in qe){if(!qe.hasOwnProperty(tt))continue;if(tt==="SlowBuffer"||tt==="Buffer")continue;Ve[tt]=qe[tt]}var rt=Ve.Buffer={};for(tt in ze){if(!ze.hasOwnProperty(tt))continue;if(tt==="allocUnsafe"||tt==="allocUnsafeSlow")continue;rt[tt]=ze[tt]}Ve.Buffer.prototype=ze.prototype;if(!rt.from||rt.from===Uint8Array.from){rt.from=function(ke,Ae,Ce){if(typeof ke==="number"){throw new TypeError('The "value" argument must not be of type number. Received type '+typeof ke)}if(ke&&typeof ke.length==="undefined"){throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}return ze(ke,Ae,Ce)}}if(!rt.alloc){rt.alloc=function(ke,Ae,Ce){if(typeof ke!=="number"){throw new TypeError('The "size" argument must be of type number. Received type '+typeof ke)}if(ke<0||ke>=2*(1<<30)){throw new RangeError('The value "'+ke+'" is invalid for option "size"')}var qe=ze(ke);if(!Ae||Ae.length===0){qe.fill(0)}else if(typeof Ce==="string"){qe.fill(Ae,Ce)}else{qe.fill(Ae)}return qe}}if(!Ve.kStringMaxLength){try{Ve.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(ke){}}if(!Ve.constants){Ve.constants={MAX_LENGTH:Ve.kMaxLength};if(Ve.kStringMaxLength){Ve.constants.MAX_STRING_LENGTH=Ve.kStringMaxLength}}ke.exports=Ve},4294:(ke,Ae,Ce)=>{ke.exports=Ce(4219)},4219:(ke,Ae,Ce)=>{"use strict";var qe=Ce(1808);var ze=Ce(4404);var Ve=Ce(3685);var tt=Ce(5687);var rt=Ce(2361);var it=Ce(9491);var nt=Ce(3837);Ae.httpOverHttp=httpOverHttp;Ae.httpsOverHttp=httpsOverHttp;Ae.httpOverHttps=httpOverHttps;Ae.httpsOverHttps=httpsOverHttps;function httpOverHttp(ke){var Ae=new TunnelingAgent(ke);Ae.request=Ve.request;return Ae}function httpsOverHttp(ke){var Ae=new TunnelingAgent(ke);Ae.request=Ve.request;Ae.createSocket=createSecureSocket;Ae.defaultPort=443;return Ae}function httpOverHttps(ke){var Ae=new TunnelingAgent(ke);Ae.request=tt.request;return Ae}function httpsOverHttps(ke){var Ae=new TunnelingAgent(ke);Ae.request=tt.request;Ae.createSocket=createSecureSocket;Ae.defaultPort=443;return Ae}function TunnelingAgent(ke){var Ae=this;Ae.options=ke||{};Ae.proxyOptions=Ae.options.proxy||{};Ae.maxSockets=Ae.options.maxSockets||Ve.Agent.defaultMaxSockets;Ae.requests=[];Ae.sockets=[];Ae.on("free",(function onFree(ke,Ce,qe,ze){var Ve=toOptions(Ce,qe,ze);for(var tt=0,rt=Ae.requests.length;tt<rt;++tt){var it=Ae.requests[tt];if(it.host===Ve.host&&it.port===Ve.port){Ae.requests.splice(tt,1);it.request.onSocket(ke);return}}ke.destroy();Ae.removeSocket(ke)}))}nt.inherits(TunnelingAgent,rt.EventEmitter);TunnelingAgent.prototype.addRequest=function addRequest(ke,Ae,Ce,qe){var ze=this;var Ve=mergeOptions({request:ke},ze.options,toOptions(Ae,Ce,qe));if(ze.sockets.length>=this.maxSockets){ze.requests.push(Ve);return}ze.createSocket(Ve,(function(Ae){Ae.on("free",onFree);Ae.on("close",onCloseOrRemove);Ae.on("agentRemove",onCloseOrRemove);ke.onSocket(Ae);function onFree(){ze.emit("free",Ae,Ve)}function onCloseOrRemove(ke){ze.removeSocket(Ae);Ae.removeListener("free",onFree);Ae.removeListener("close",onCloseOrRemove);Ae.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(ke,Ae){var Ce=this;var qe={};Ce.sockets.push(qe);var ze=mergeOptions({},Ce.proxyOptions,{method:"CONNECT",path:ke.host+":"+ke.port,agent:false,headers:{host:ke.host+":"+ke.port}});if(ke.localAddress){ze.localAddress=ke.localAddress}if(ze.proxyAuth){ze.headers=ze.headers||{};ze.headers["Proxy-Authorization"]="Basic "+new Buffer(ze.proxyAuth).toString("base64")}ot("making CONNECT request");var Ve=Ce.request(ze);Ve.useChunkedEncodingByDefault=false;Ve.once("response",onResponse);Ve.once("upgrade",onUpgrade);Ve.once("connect",onConnect);Ve.once("error",onError);Ve.end();function onResponse(ke){ke.upgrade=true}function onUpgrade(ke,Ae,Ce){process.nextTick((function(){onConnect(ke,Ae,Ce)}))}function onConnect(ze,tt,rt){Ve.removeAllListeners();tt.removeAllListeners();if(ze.statusCode!==200){ot("tunneling socket could not be established, statusCode=%d",ze.statusCode);tt.destroy();var it=new Error("tunneling socket could not be established, "+"statusCode="+ze.statusCode);it.code="ECONNRESET";ke.request.emit("error",it);Ce.removeSocket(qe);return}if(rt.length>0){ot("got illegal response body from proxy");tt.destroy();var it=new Error("got illegal response body from proxy");it.code="ECONNRESET";ke.request.emit("error",it);Ce.removeSocket(qe);return}ot("tunneling connection has established");Ce.sockets[Ce.sockets.indexOf(qe)]=tt;return Ae(tt)}function onError(Ae){Ve.removeAllListeners();ot("tunneling socket could not be established, cause=%s\n",Ae.message,Ae.stack);var ze=new Error("tunneling socket could not be established, "+"cause="+Ae.message);ze.code="ECONNRESET";ke.request.emit("error",ze);Ce.removeSocket(qe)}};TunnelingAgent.prototype.removeSocket=function removeSocket(ke){var Ae=this.sockets.indexOf(ke);if(Ae===-1){return}this.sockets.splice(Ae,1);var Ce=this.requests.shift();if(Ce){this.createSocket(Ce,(function(ke){Ce.request.onSocket(ke)}))}};function createSecureSocket(ke,Ae){var Ce=this;TunnelingAgent.prototype.createSocket.call(Ce,ke,(function(qe){var Ve=ke.request.getHeader("host");var tt=mergeOptions({},Ce.options,{socket:qe,servername:Ve?Ve.replace(/:.*$/,""):ke.host});var rt=ze.connect(0,tt);Ce.sockets[Ce.sockets.indexOf(qe)]=rt;Ae(rt)}))}function toOptions(ke,Ae,Ce){if(typeof ke==="string"){return{host:ke,port:Ae,localAddress:Ce}}return ke}function mergeOptions(ke){for(var Ae=1,Ce=arguments.length;Ae<Ce;++Ae){var qe=arguments[Ae];if(typeof qe==="object"){var ze=Object.keys(qe);for(var Ve=0,tt=ze.length;Ve<tt;++Ve){var rt=ze[Ve];if(qe[rt]!==undefined){ke[rt]=qe[rt]}}}}return ke}var ot;if(process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)){ot=function(){var ke=Array.prototype.slice.call(arguments);if(typeof ke[0]==="string"){ke[0]="TUNNEL: "+ke[0]}else{ke.unshift("TUNNEL:")}console.error.apply(console,ke)}}else{ot=function(){}}Ae.debug=ot},5840:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Object.defineProperty(Ae,"v1",{enumerable:true,get:function(){return qe.default}});Object.defineProperty(Ae,"v3",{enumerable:true,get:function(){return ze.default}});Object.defineProperty(Ae,"v4",{enumerable:true,get:function(){return Ve.default}});Object.defineProperty(Ae,"v5",{enumerable:true,get:function(){return tt.default}});Object.defineProperty(Ae,"NIL",{enumerable:true,get:function(){return rt.default}});Object.defineProperty(Ae,"version",{enumerable:true,get:function(){return it.default}});Object.defineProperty(Ae,"validate",{enumerable:true,get:function(){return nt.default}});Object.defineProperty(Ae,"stringify",{enumerable:true,get:function(){return ot.default}});Object.defineProperty(Ae,"parse",{enumerable:true,get:function(){return ct.default}});var qe=_interopRequireDefault(Ce(8628));var ze=_interopRequireDefault(Ce(6409));var Ve=_interopRequireDefault(Ce(5122));var tt=_interopRequireDefault(Ce(9120));var rt=_interopRequireDefault(Ce(5332));var it=_interopRequireDefault(Ce(1595));var nt=_interopRequireDefault(Ce(6900));var ot=_interopRequireDefault(Ce(8950));var ct=_interopRequireDefault(Ce(2746));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}},4569:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(6113));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function md5(ke){if(Array.isArray(ke)){ke=Buffer.from(ke)}else if(typeof ke==="string"){ke=Buffer.from(ke,"utf8")}return qe.default.createHash("md5").update(ke).digest()}var ze=md5;Ae["default"]=ze},5332:(ke,Ae)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var Ce="00000000-0000-0000-0000-000000000000";Ae["default"]=Ce},2746:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(6900));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function parse(ke){if(!(0,qe.default)(ke)){throw TypeError("Invalid UUID")}let Ae;const Ce=new Uint8Array(16);Ce[0]=(Ae=parseInt(ke.slice(0,8),16))>>>24;Ce[1]=Ae>>>16&255;Ce[2]=Ae>>>8&255;Ce[3]=Ae&255;Ce[4]=(Ae=parseInt(ke.slice(9,13),16))>>>8;Ce[5]=Ae&255;Ce[6]=(Ae=parseInt(ke.slice(14,18),16))>>>8;Ce[7]=Ae&255;Ce[8]=(Ae=parseInt(ke.slice(19,23),16))>>>8;Ce[9]=Ae&255;Ce[10]=(Ae=parseInt(ke.slice(24,36),16))/1099511627776&255;Ce[11]=Ae/4294967296&255;Ce[12]=Ae>>>24&255;Ce[13]=Ae>>>16&255;Ce[14]=Ae>>>8&255;Ce[15]=Ae&255;return Ce}var ze=parse;Ae["default"]=ze},814:(ke,Ae)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var Ce=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;Ae["default"]=Ce},807:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=rng;var qe=_interopRequireDefault(Ce(6113));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}const ze=new Uint8Array(256);let Ve=ze.length;function rng(){if(Ve>ze.length-16){qe.default.randomFillSync(ze);Ve=0}return ze.slice(Ve,Ve+=16)}},5274:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(6113));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function sha1(ke){if(Array.isArray(ke)){ke=Buffer.from(ke)}else if(typeof ke==="string"){ke=Buffer.from(ke,"utf8")}return qe.default.createHash("sha1").update(ke).digest()}var ze=sha1;Ae["default"]=ze},8950:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(6900));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}const ze=[];for(let ke=0;ke<256;++ke){ze.push((ke+256).toString(16).substr(1))}function stringify(ke,Ae=0){const Ce=(ze[ke[Ae+0]]+ze[ke[Ae+1]]+ze[ke[Ae+2]]+ze[ke[Ae+3]]+"-"+ze[ke[Ae+4]]+ze[ke[Ae+5]]+"-"+ze[ke[Ae+6]]+ze[ke[Ae+7]]+"-"+ze[ke[Ae+8]]+ze[ke[Ae+9]]+"-"+ze[ke[Ae+10]]+ze[ke[Ae+11]]+ze[ke[Ae+12]]+ze[ke[Ae+13]]+ze[ke[Ae+14]]+ze[ke[Ae+15]]).toLowerCase();if(!(0,qe.default)(Ce)){throw TypeError("Stringified UUID is invalid")}return Ce}var Ve=stringify;Ae["default"]=Ve},8628:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(807));var ze=_interopRequireDefault(Ce(8950));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}let Ve;let tt;let rt=0;let it=0;function v1(ke,Ae,Ce){let nt=Ae&&Ce||0;const ot=Ae||new Array(16);ke=ke||{};let ct=ke.node||Ve;let ht=ke.clockseq!==undefined?ke.clockseq:tt;if(ct==null||ht==null){const Ae=ke.random||(ke.rng||qe.default)();if(ct==null){ct=Ve=[Ae[0]|1,Ae[1],Ae[2],Ae[3],Ae[4],Ae[5]]}if(ht==null){ht=tt=(Ae[6]<<8|Ae[7])&16383}}let ft=ke.msecs!==undefined?ke.msecs:Date.now();let yt=ke.nsecs!==undefined?ke.nsecs:it+1;const mt=ft-rt+(yt-it)/1e4;if(mt<0&&ke.clockseq===undefined){ht=ht+1&16383}if((mt<0||ft>rt)&&ke.nsecs===undefined){yt=0}if(yt>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}rt=ft;it=yt;tt=ht;ft+=122192928e5;const kt=((ft&268435455)*1e4+yt)%4294967296;ot[nt++]=kt>>>24&255;ot[nt++]=kt>>>16&255;ot[nt++]=kt>>>8&255;ot[nt++]=kt&255;const St=ft/4294967296*1e4&268435455;ot[nt++]=St>>>8&255;ot[nt++]=St&255;ot[nt++]=St>>>24&15|16;ot[nt++]=St>>>16&255;ot[nt++]=ht>>>8|128;ot[nt++]=ht&255;for(let ke=0;ke<6;++ke){ot[nt+ke]=ct[ke]}return Ae||(0,ze.default)(ot)}var nt=v1;Ae["default"]=nt},6409:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(5998));var ze=_interopRequireDefault(Ce(4569));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}const Ve=(0,qe.default)("v3",48,ze.default);var tt=Ve;Ae["default"]=tt},5998:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=_default;Ae.URL=Ae.DNS=void 0;var qe=_interopRequireDefault(Ce(8950));var ze=_interopRequireDefault(Ce(2746));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function stringToBytes(ke){ke=unescape(encodeURIComponent(ke));const Ae=[];for(let Ce=0;Ce<ke.length;++Ce){Ae.push(ke.charCodeAt(Ce))}return Ae}const Ve="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ae.DNS=Ve;const tt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Ae.URL=tt;function _default(ke,Ae,Ce){function generateUUID(ke,Ve,tt,rt){if(typeof ke==="string"){ke=stringToBytes(ke)}if(typeof Ve==="string"){Ve=(0,ze.default)(Ve)}if(Ve.length!==16){throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)")}let it=new Uint8Array(16+ke.length);it.set(Ve);it.set(ke,Ve.length);it=Ce(it);it[6]=it[6]&15|Ae;it[8]=it[8]&63|128;if(tt){rt=rt||0;for(let ke=0;ke<16;++ke){tt[rt+ke]=it[ke]}return tt}return(0,qe.default)(it)}try{generateUUID.name=ke}catch(ke){}generateUUID.DNS=Ve;generateUUID.URL=tt;return generateUUID}},5122:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(807));var ze=_interopRequireDefault(Ce(8950));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function v4(ke,Ae,Ce){ke=ke||{};const Ve=ke.random||(ke.rng||qe.default)();Ve[6]=Ve[6]&15|64;Ve[8]=Ve[8]&63|128;if(Ae){Ce=Ce||0;for(let ke=0;ke<16;++ke){Ae[Ce+ke]=Ve[ke]}return Ae}return(0,ze.default)(Ve)}var Ve=v4;Ae["default"]=Ve},9120:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(5998));var ze=_interopRequireDefault(Ce(5274));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}const Ve=(0,qe.default)("v5",80,ze.default);var tt=Ve;Ae["default"]=tt},6900:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(814));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function validate(ke){return typeof ke==="string"&&qe.default.test(ke)}var ze=validate;Ae["default"]=ze},1595:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});Ae["default"]=void 0;var qe=_interopRequireDefault(Ce(6900));function _interopRequireDefault(ke){return ke&&ke.__esModule?ke:{default:ke}}function version(ke){if(!(0,qe.default)(ke)){throw TypeError("Invalid UUID")}return parseInt(ke.substr(14,1),16)}var ze=version;Ae["default"]=ze},8954:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;var ze=Object.getOwnPropertyDescriptor(Ae,Ce);if(!ze||("get"in ze?!Ae.__esModule:ze.writable||ze.configurable)){ze={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,qe,ze)}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.prototype.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.getInputs=void 0;const rt=Ve(Ce(2186));function getInputs(){return tt(this,void 0,void 0,(function*(){return{gpgPrivateKey:rt.getInput("gpg_private_key",{required:true}),passphrase:rt.getInput("passphrase"),gitConfigGlobal:rt.getBooleanInput("git_config_global"),gitUserSigningkey:rt.getBooleanInput("git_user_signingkey"),gitCommitGpgsign:rt.getBooleanInput("git_commit_gpgsign"),gitTagGpgsign:rt.getBooleanInput("git_tag_gpgsign"),gitPushGpgsign:rt.getInput("git_push_gpgsign")||"if-asked",gitCommitterName:rt.getInput("git_committer_name"),gitCommitterEmail:rt.getInput("git_committer_email"),workdir:rt.getInput("workdir")||".",fingerprint:rt.getInput("fingerprint")}}))}Ae.getInputs=getInputs},6350:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;var ze=Object.getOwnPropertyDescriptor(Ae,Ce);if(!ze||("get"in ze?!Ae.__esModule:ze.writable||ze.configurable)){ze={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,qe,ze)}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.prototype.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.setConfig=void 0;const rt=Ve(Ce(1514));const git=(ke=[])=>tt(void 0,void 0,void 0,(function*(){return yield rt.getExecOutput(`git`,ke,{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}return ke.stdout.trim()}))}));function setConfig(ke,Ae,Ce){return tt(this,void 0,void 0,(function*(){const qe=["config"];if(Ce){qe.push("--global")}qe.push(ke,Ae);yield git(qe)}))}Ae.setConfig=setConfig},3759:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;var ze=Object.getOwnPropertyDescriptor(Ae,Ce);if(!ze||("get"in ze?!Ae.__esModule:ze.writable||ze.configurable)){ze={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,qe,ze)}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.prototype.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.killAgent=Ae.deleteKey=Ae.presetPassphrase=Ae.configureAgent=Ae.getKeygrip=Ae.parseKeygripFromGpgColonsOutput=Ae.getKeygrips=Ae.importKey=Ae.getDirs=Ae.getVersion=Ae.agentConfig=void 0;const rt=Ve(Ce(1514));const it=Ve(Ce(7147));const nt=Ve(Ce(1017));const ot=Ve(Ce(2037));const ct=Ve(Ce(5728));Ae.agentConfig=`default-cache-ttl 21600\nmax-cache-ttl 31536000\nallow-preset-passphrase`;const getGnupgHome=()=>tt(void 0,void 0,void 0,(function*(){if(process.env.GNUPGHOME){return process.env.GNUPGHOME}let ke=nt.join(process.env.HOME||"",".gnupg");if(ot.platform()=="win32"&&!process.env.HOME){ke=nt.join(process.env.USERPROFILE||"",".gnupg")}return ke}));const gpgConnectAgent=ke=>tt(void 0,void 0,void 0,(function*(){return yield rt.getExecOutput(`gpg-connect-agent "${ke}" /bye`,[],{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}for(const Ae of ke.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(Ae.startsWith("ERR")){throw new Error(Ae)}}return ke.stdout.trim()}))}));const getVersion=()=>tt(void 0,void 0,void 0,(function*(){return yield rt.getExecOutput("gpg",["--version"],{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}let Ae="";let Ce="";for(const qe of ke.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(qe.startsWith("gpg (GnuPG) ")){Ae=qe.substr("gpg (GnuPG) ".length).trim()}else if(qe.startsWith("gpg (GnuPG/MacGPG2) ")){Ae=qe.substr("gpg (GnuPG/MacGPG2) ".length).trim()}else if(qe.startsWith("libgcrypt ")){Ce=qe.substr("libgcrypt ".length).trim()}}return{gnupg:Ae,libgcrypt:Ce}}))}));Ae.getVersion=getVersion;const getDirs=()=>tt(void 0,void 0,void 0,(function*(){return yield rt.getExecOutput("gpgconf",["--list-dirs"],{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}let Ae="";let Ce="";let qe="";let ze="";for(const Ve of ke.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(Ve.startsWith("libdir:")){Ae=Ve.substr("libdir:".length).replace("%3a",":").trim()}else if(Ve.startsWith("libexecdir:")){Ce=Ve.substr("libexecdir:".length).replace("%3a",":").trim()}else if(Ve.startsWith("datadir:")){qe=Ve.substr("datadir:".length).replace("%3a",":").trim()}else if(Ve.startsWith("homedir:")){ze=Ve.substr("homedir:".length).replace("%3a",":").trim()}}return{libdir:Ae,libexecdir:Ce,datadir:qe,homedir:ze}}))}));Ae.getDirs=getDirs;const importKey=ke=>tt(void 0,void 0,void 0,(function*(){const Ae=it.mkdtempSync(nt.join(ot.tmpdir(),"ghaction-import-gpg-"));const Ce=`${Ae}/key.pgp`;it.writeFileSync(Ce,(yield ct.isArmored(ke))?ke:Buffer.from(ke,"base64").toString(),{mode:384});return yield rt.getExecOutput("gpg",["--import","--batch","--yes",Ce],{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}if(ke.stderr!=""){return ke.stderr.trim()}return ke.stdout.trim()})).finally((()=>{it.unlinkSync(Ce)}))}));Ae.importKey=importKey;const getKeygrips=ke=>tt(void 0,void 0,void 0,(function*(){return yield rt.getExecOutput("gpg",["--batch","--with-colons","--with-keygrip","--list-secret-keys",ke],{ignoreReturnCode:true,silent:true}).then((ke=>{const Ae=[];for(const Ce of ke.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(Ce.startsWith("grp")){Ae.push(Ce.replace(/(grp|:)/g,"").trim())}}return Ae}))}));Ae.getKeygrips=getKeygrips;const parseKeygripFromGpgColonsOutput=(ke,Ae)=>{let Ce="";let qe=false;const ze=ke.replace(/\r/g,"").trim().split(/\n/g);for(const ke of ze){if(ke.startsWith(`fpr:`)&&ke.includes(`:${Ae}:`)){qe=true;continue}if(ke.startsWith("grp:")&&qe){Ce=ke.replace(/(grp|:)/g,"").trim();break}}return Ce};Ae.parseKeygripFromGpgColonsOutput=parseKeygripFromGpgColonsOutput;const getKeygrip=ke=>tt(void 0,void 0,void 0,(function*(){return yield rt.getExecOutput("gpg",["--batch","--with-colons","--with-keygrip","--list-secret-keys",ke],{ignoreReturnCode:true,silent:true}).then((Ce=>(0,Ae.parseKeygripFromGpgColonsOutput)(Ce.stdout,ke)))}));Ae.getKeygrip=getKeygrip;const configureAgent=ke=>tt(void 0,void 0,void 0,(function*(){const Ae=nt.join(yield getGnupgHome(),"gpg-agent.conf");yield it.writeFile(Ae,ke,(function(ke){if(ke)throw ke}));yield gpgConnectAgent("RELOADAGENT")}));Ae.configureAgent=configureAgent;const presetPassphrase=(ke,Ae)=>tt(void 0,void 0,void 0,(function*(){const Ce=Buffer.from(Ae,"utf8").toString("hex").toUpperCase();yield gpgConnectAgent(`PRESET_PASSPHRASE ${ke} -1 ${Ce}`);return yield gpgConnectAgent(`KEYINFO ${ke}`)}));Ae.presetPassphrase=presetPassphrase;const deleteKey=ke=>tt(void 0,void 0,void 0,(function*(){yield rt.getExecOutput("gpg",["--batch","--yes","--delete-secret-keys",ke],{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}}));yield rt.getExecOutput("gpg",["--batch","--yes","--delete-keys",ke],{ignoreReturnCode:true,silent:true}).then((ke=>{if(ke.stderr.length>0&&ke.exitCode!=0){throw new Error(ke.stderr)}}))}));Ae.deleteKey=deleteKey;const killAgent=()=>tt(void 0,void 0,void 0,(function*(){yield gpgConnectAgent("KILLAGENT")}));Ae.killAgent=killAgent},399:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;var ze=Object.getOwnPropertyDescriptor(Ae,Ce);if(!ze||("get"in ze?!Ae.__esModule:ze.writable||ze.configurable)){ze={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,qe,ze)}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.prototype.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});const rt=Ve(Ce(2186));const it=Ve(Ce(8954));const nt=Ve(Ce(6350));const ot=Ve(Ce(3759));const ct=Ve(Ce(5728));const ht=Ve(Ce(963));function run(){return tt(this,void 0,void 0,(function*(){try{const ke=yield it.getInputs();if(ke.workdir&&ke.workdir!=="."){rt.info(`Using ${ke.workdir} as working directory...`);process.chdir(ke.workdir)}const Ae=yield ot.getVersion();const Ce=yield ot.getDirs();yield rt.group(`GnuPG info`,(()=>tt(this,void 0,void 0,(function*(){rt.info(`Version : ${Ae.gnupg} (libgcrypt ${Ae.libgcrypt})`);rt.info(`Libdir : ${Ce.libdir}`);rt.info(`Libexecdir : ${Ce.libexecdir}`);rt.info(`Datadir : ${Ce.datadir}`);rt.info(`Homedir : ${Ce.homedir}`)}))));const qe=yield ct.readPrivateKey(ke.gpgPrivateKey);yield rt.group(`GPG private key info`,(()=>tt(this,void 0,void 0,(function*(){rt.info(`Fingerprint : ${qe.fingerprint}`);rt.info(`KeyID : ${qe.keyID}`);rt.info(`Name : ${qe.name}`);rt.info(`Email : ${qe.email}`);rt.info(`CreationTime : ${qe.creationTime}`)}))));ht.setFingerprint(qe.fingerprint);let ze=qe.fingerprint;if(ke.fingerprint){ze=ke.fingerprint}yield rt.group(`Fingerprint to use`,(()=>tt(this,void 0,void 0,(function*(){rt.info(ze)}))));yield rt.group(`Importing GPG private key`,(()=>tt(this,void 0,void 0,(function*(){yield ot.importKey(ke.gpgPrivateKey).then((ke=>{rt.info(ke)}))}))));if(ke.passphrase&&!ke.fingerprint){rt.info("Configuring GnuPG agent");yield ot.configureAgent(ot.agentConfig);yield rt.group(`Getting keygrips`,(()=>tt(this,void 0,void 0,(function*(){for(const Ae of yield ot.getKeygrips(ze)){rt.info(`Presetting passphrase for ${Ae}`);yield ot.presetPassphrase(Ae,ke.passphrase).then((ke=>{rt.debug(ke)}))}}))))}if(ke.passphrase&&ke.fingerprint){rt.info("Configuring GnuPG agent");yield ot.configureAgent(ot.agentConfig);yield rt.group(`Getting keygrip for fingerprint`,(()=>tt(this,void 0,void 0,(function*(){const Ae=yield ot.getKeygrip(ze);rt.info(`Presetting passphrase for key ${ze} with keygrip ${Ae}`);yield ot.presetPassphrase(Ae,ke.passphrase).then((ke=>{rt.debug(ke)}))}))))}yield rt.group(`Setting outputs`,(()=>tt(this,void 0,void 0,(function*(){rt.info(`fingerprint=${ze}`);rt.setOutput("fingerprint",ze);rt.info(`keyid=${qe.keyID}`);rt.setOutput("keyid",qe.keyID);rt.info(`name=${qe.name}`);rt.setOutput("name",qe.name);rt.info(`email=${qe.email}`);rt.setOutput("email",qe.email)}))));if(ke.gitUserSigningkey){rt.info("Setting GPG signing keyID for this Git repository");yield nt.setConfig("user.signingkey",qe.keyID,ke.gitConfigGlobal);const Ae=ke.gitCommitterEmail||qe.email;const Ce=ke.gitCommitterName||qe.name;if(Ae!=qe.email){rt.setFailed(`Committer email "${ke.gitCommitterEmail}" (name: "${ke.gitCommitterName}") does not match GPG private key email "${qe.email}" (name: "${qe.name}")`);return}rt.info(`Configuring Git committer (${Ce} <${Ae}>)`);yield nt.setConfig("user.name",Ce,ke.gitConfigGlobal);yield nt.setConfig("user.email",Ae,ke.gitConfigGlobal);if(ke.gitCommitGpgsign){rt.info("Sign all commits automatically");yield nt.setConfig("commit.gpgsign","true",ke.gitConfigGlobal)}if(ke.gitTagGpgsign){rt.info("Sign all tags automatically");yield nt.setConfig("tag.gpgsign","true",ke.gitConfigGlobal)}if(ke.gitPushGpgsign){rt.info("Sign all pushes automatically");yield nt.setConfig("push.gpgsign",ke.gitPushGpgsign,ke.gitConfigGlobal)}}}catch(ke){rt.setFailed(ke.message)}}))}function cleanup(){return tt(this,void 0,void 0,(function*(){if(ht.fingerprint.length<=0){rt.debug("Primary key fingerprint is not defined. Skipping cleanup.");return}try{rt.info(`Removing key ${ht.fingerprint}`);yield ot.deleteKey(ht.fingerprint);rt.info("Killing GnuPG agent");yield ot.killAgent()}catch(ke){rt.warning(ke.message)}}))}if(!ht.IsPost){run()}else{cleanup()}},5728:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;var ze=Object.getOwnPropertyDescriptor(Ae,Ce);if(!ze||("get"in ze?!Ae.__esModule:ze.writable||ze.configurable)){ze={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,qe,ze)}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.prototype.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,qe){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,ze){function fulfilled(ke){try{step(qe.next(ke))}catch(ke){ze(ke)}}function rejected(ke){try{step(qe["throw"](ke))}catch(ke){ze(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((qe=qe.apply(ke,Ae||[])).next())}))};var rt=this&&this.__importDefault||function(ke){return ke&&ke.__esModule?ke:{default:ke}};Object.defineProperty(Ae,"__esModule",{value:true});Ae.isArmored=Ae.generateKeyPair=Ae.readPrivateKey=void 0;const it=Ve(Ce(7946));const nt=rt(Ce(2764));const readPrivateKey=ke=>tt(void 0,void 0,void 0,(function*(){const Ce=yield it.readKey({armoredKey:(yield(0,Ae.isArmored)(ke))?ke:Buffer.from(ke,"base64").toString()});const qe=yield Ce.getPrimaryUser().then((ke=>{var Ae;return(0,nt.default)((Ae=ke.user.userID)===null||Ae===void 0?void 0:Ae.userID)[0]}));return{fingerprint:Ce.getFingerprint().toUpperCase(),keyID:Ce.getKeyID().toHex().toUpperCase(),name:qe.name,email:qe.address,creationTime:Ce.getCreationTime()}}));Ae.readPrivateKey=readPrivateKey;const generateKeyPair=(ke,Ae,Ce,qe)=>tt(void 0,void 0,void 0,(function*(){const ze=yield it.generateKey({userIDs:[{name:ke,email:Ae}],passphrase:Ce,type:qe});return{publicKey:ze.publicKey.replace(/\r\n/g,"\n").trim(),privateKey:ze.privateKey.replace(/\r\n/g,"\n").trim()}}));Ae.generateKeyPair=generateKeyPair;const isArmored=ke=>tt(void 0,void 0,void 0,(function*(){return ke.trimLeft().startsWith("---")}));Ae.isArmored=isArmored},963:function(ke,Ae,Ce){"use strict";var qe=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;var ze=Object.getOwnPropertyDescriptor(Ae,Ce);if(!ze||("get"in ze?!Ae.__esModule:ze.writable||ze.configurable)){ze={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,qe,ze)}:function(ke,Ae,Ce,qe){if(qe===undefined)qe=Ce;ke[qe]=Ae[Ce]});var ze=this&&this.__setModuleDefault||(Object.create?function(ke,Ae){Object.defineProperty(ke,"default",{enumerable:true,value:Ae})}:function(ke,Ae){ke["default"]=Ae});var Ve=this&&this.__importStar||function(ke){if(ke&&ke.__esModule)return ke;var Ae={};if(ke!=null)for(var Ce in ke)if(Ce!=="default"&&Object.prototype.hasOwnProperty.call(ke,Ce))qe(Ae,ke,Ce);ze(Ae,ke);return Ae};Object.defineProperty(Ae,"__esModule",{value:true});Ae.setFingerprint=Ae.fingerprint=Ae.IsPost=void 0;const tt=Ve(Ce(2186));Ae.IsPost=!!process.env["STATE_isPost"];Ae.fingerprint=process.env["STATE_fingerprint"]||"";function setFingerprint(ke){tt.saveState("fingerprint",ke)}Ae.setFingerprint=setFingerprint;if(!Ae.IsPost){tt.saveState("isPost","true")}},9491:ke=>{"use strict";ke.exports=require("assert")},4300:ke=>{"use strict";ke.exports=require("buffer")},2081:ke=>{"use strict";ke.exports=require("child_process")},6113:ke=>{"use strict";ke.exports=require("crypto")},2361:ke=>{"use strict";ke.exports=require("events")},7147:ke=>{"use strict";ke.exports=require("fs")},3685:ke=>{"use strict";ke.exports=require("http")},5687:ke=>{"use strict";ke.exports=require("https")},1808:ke=>{"use strict";ke.exports=require("net")},2037:ke=>{"use strict";ke.exports=require("os")},1017:ke=>{"use strict";ke.exports=require("path")},2781:ke=>{"use strict";ke.exports=require("stream")},1576:ke=>{"use strict";ke.exports=require("string_decoder")},9512:ke=>{"use strict";ke.exports=require("timers")},4404:ke=>{"use strict";ke.exports=require("tls")},3837:ke=>{"use strict";ke.exports=require("util")},9796:ke=>{"use strict";ke.exports=require("zlib")}};var Ae={};function __nccwpck_require__(Ce){var qe=Ae[Ce];if(qe!==undefined){return qe.exports}var ze=Ae[Ce]={id:Ce,loaded:false,exports:{}};var Ve=true;try{ke[Ce].call(ze.exports,ze,ze.exports,__nccwpck_require__);Ve=false}finally{if(Ve)delete Ae[Ce]}ze.loaded=true;return ze.exports}(()=>{__nccwpck_require__.nmd=ke=>{ke.paths=[];if(!ke.children)ke.children=[];return ke}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var Ce=__nccwpck_require__(399);module.exports=Ce})();
|
|
//# sourceMappingURL=index.js.map
|