mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-08 22:43:33 -05:00
18d642e07d
* Bump openpgp from 5.1.0 to 5.2.0 Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/openpgpjs/openpgpjs/releases) - [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: openpgp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update generated content Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
17 lines
No EOL
718 KiB
JavaScript
Generated
17 lines
No EOL
718 KiB
JavaScript
Generated
require('./sourcemap-register.js');(()=>{var ke={7351:function(ke,Ae,Ce){"use strict";var ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;Object.defineProperty(ke,ze,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(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 ze=new Command(ke,Ae,Ce);process.stdout.write(ze.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 ze=this.properties[Ce];if(ze){if(Ae){Ae=false}else{ke+=","}ke+=`${Ce}=${escapeProperty(ze)}`}}}}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 ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;Object.defineProperty(ke,ze,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze=process.env["GITHUB_ENV"]||"";if(ze){const Ae="_GitHubActionsFileCommandDelimeter_";const ze=`${ke}<<${Ae}${ot.EOL}${Ce}${ot.EOL}${Ae}`;it.issueCommand("ENV",ze)}else{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.issueCommand("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!==""));return Ce}Ae.getMultilineInput=getMultilineInput;function getBooleanInput(ke,Ae){const Ce=["true","True","TRUE"];const ze=["false","False","FALSE"];const qe=getInput(ke,Ae);if(Ce.includes(qe))return true;if(ze.includes(qe))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){process.stdout.write(ot.EOL);rt.issueCommand("set-output",{name:ke},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){rt.issueCommand("save-state",{name:ke},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},717:function(ke,Ae,Ce){"use strict";var ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;Object.defineProperty(ke,ze,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};Object.defineProperty(Ae,"__esModule",{value:true});Ae.issueCommand=void 0;const tt=Ve(Ce(7147));const rt=Ve(Ce(2037));const it=Ce(5278);function issueCommand(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,`${it.toCommandValue(Ae)}${rt.EOL}`,{encoding:"utf8"})}Ae.issueCommand=issueCommand},8041:function(ke,Ae,Ce){"use strict";var ze=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.OidcClient=void 0;const qe=Ce(9925);const Ve=Ce(3702);const tt=Ce(2186);class OidcClient{static createHttpClient(ke=true,Ae=10){const Ce={allowRetries:ke,maxRetries:Ae};return new qe.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 ze(this,void 0,void 0,(function*(){const Ce=OidcClient.createHttpClient();const ze=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 qe=(Ae=ze.result)===null||Ae===void 0?void 0:Ae.value;if(!qe){throw new Error("Response json body do not have ID Token field")}return qe}))}static getIDToken(ke){return ze(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},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 ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;Object.defineProperty(ke,ze,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze=it.argStringToArray(ke);if(ze.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const qe=ze[0];Ae=ze.slice(1).concat(Ae||[]);const Ve=new it.ToolRunner(qe,Ae,Ce);return Ve.exec()}))}Ae.exec=exec;function getExecOutput(ke,Ae,Ce){var ze,qe;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=(ze=Ce===null||Ce===void 0?void 0:Ce.listeners)===null||ze===void 0?void 0:ze.stdout;const ct=(qe=Ce===null||Ce===void 0?void 0:Ce.listeners)===null||qe===void 0?void 0:qe.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 ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;Object.defineProperty(ke,ze,{enumerable:true,get:function(){return Ae[Ce]}})}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze=this._getSpawnArgs(ke);let qe=Ae?"":"[command]";if(yt){if(this._isCmdFile()){qe+=Ce;for(const ke of ze){qe+=` ${ke}`}}else if(ke.windowsVerbatimArguments){qe+=`"${Ce}"`;for(const ke of ze){qe+=` ${ke}`}}else{qe+=this._windowsQuoteCmdArg(Ce);for(const ke of ze){qe+=` ${this._windowsQuoteCmdArg(ke)}`}}}else{qe+=Ce;for(const ke of ze){qe+=` ${ke}`}}return qe}_processLineBuffer(ke,Ae,Ce){try{let ze=Ae+ke.toString();let qe=ze.indexOf(rt.EOL);while(qe>-1){const ke=ze.substring(0,qe);Ce(ke);ze=ze.substring(qe+rt.EOL.length);qe=ze.indexOf(rt.EOL)}return ze}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 ze of ke){if(Ae.some((ke=>ke===ze))){Ce=true;break}}if(!Ce){return ke}let ze='"';let qe=true;for(let Ae=ke.length;Ae>0;Ae--){ze+=ke[Ae-1];if(qe&&ke[Ae-1]==="\\"){ze+="\\"}else if(ke[Ae-1]==='"'){qe=true;ze+='"'}else{qe=false}}ze+='"';return ze.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 ze=ke.length;ze>0;ze--){Ae+=ke[ze-1];if(Ce&&ke[ze-1]==="\\"){Ae+="\\"}else if(ke[ze-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 ze=new ExecState(Ce,this.toolPath);ze.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 qe=this._getSpawnFileName();const Ve=nt.spawn(qe,this._getSpawnArgs(Ce),this._getSpawnOptions(this.options,qe));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=>{ze.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=>{ze.processError=ke.message;ze.processExited=true;ze.processClosed=true;ze.CheckComplete()}));Ve.on("exit",(ke=>{ze.processExitCode=ke;ze.processExited=true;this._debug(`Exit code ${ke} received from tool '${this.toolPath}'`);ze.CheckComplete()}));Ve.on("close",(ke=>{ze.processExitCode=ke;ze.processExited=true;ze.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);ze.CheckComplete()}));ze.on("done",((Ce,ze)=>{if(tt.length>0){this.emit("stdline",tt)}if(it.length>0){this.emit("errline",it)}Ve.removeAllListeners();if(Ce){Ae(Ce)}else{ke(ze)}}));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 ze=false;let qe="";function append(ke){if(ze&&ke!=='"'){qe+="\\"}qe+=ke;ze=false}for(let Ve=0;Ve<ke.length;Ve++){const tt=ke.charAt(Ve);if(tt==='"'){if(!ze){Ce=!Ce}else{append(tt)}continue}if(tt==="\\"&&ze){append(tt);continue}if(tt==="\\"&&Ce){ze=true;continue}if(tt===" "&&!Ce){if(qe.length>0){Ae.push(qe);qe=""}continue}append(tt)}if(qe.length>0){Ae.push(qe.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()}}},3702:(ke,Ae)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});class BasicCredentialHandler{constructor(ke,Ae){this.username=ke;this.password=Ae}prepareRequest(ke){ke.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(ke){return false}handleAuthentication(ke,Ae,Ce){return null}}Ae.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(ke){this.token=ke}prepareRequest(ke){ke.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(ke){return false}handleAuthentication(ke,Ae,Ce){return null}}Ae.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(ke){this.token=ke}prepareRequest(ke){ke.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(ke){return false}handleAuthentication(ke,Ae,Ce){return null}}Ae.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(ke,Ae,Ce)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});const ze=Ce(3685);const qe=Ce(5687);const Ve=Ce(6443);let tt;var rt;(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"})(rt=Ae.HttpCodes||(Ae.HttpCodes={}));var it;(function(ke){ke["Accept"]="accept";ke["ContentType"]="content-type"})(it=Ae.Headers||(Ae.Headers={}));var nt;(function(ke){ke["ApplicationJson"]="application/json"})(nt=Ae.MediaTypes||(Ae.MediaTypes={}));function getProxyUrl(ke){let Ae=Ve.getProxyUrl(new URL(ke));return Ae?Ae.href:""}Ae.getProxyUrl=getProxyUrl;const ot=[rt.MovedPermanently,rt.ResourceMoved,rt.SeeOther,rt.TemporaryRedirect,rt.PermanentRedirect];const ct=[rt.BadGateway,rt.ServiceUnavailable,rt.GatewayTimeout];const ht=["OPTIONS","GET","DELETE","HEAD"];const ft=10;const yt=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 new Promise((async(ke,Ae)=>{let Ce=Buffer.alloc(0);this.message.on("data",(ke=>{Ce=Buffer.concat([Ce,ke])}));this.message.on("end",(()=>{ke(Ce.toString())}))}))}}Ae.HttpClientResponse=HttpClientResponse;function isHttps(ke){let 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 this.request("OPTIONS",ke,null,Ae||{})}get(ke,Ae){return this.request("GET",ke,null,Ae||{})}del(ke,Ae){return this.request("DELETE",ke,null,Ae||{})}post(ke,Ae,Ce){return this.request("POST",ke,Ae,Ce||{})}patch(ke,Ae,Ce){return this.request("PATCH",ke,Ae,Ce||{})}put(ke,Ae,Ce){return this.request("PUT",ke,Ae,Ce||{})}head(ke,Ae){return this.request("HEAD",ke,null,Ae||{})}sendStream(ke,Ae,Ce,ze){return this.request(ke,Ae,Ce,ze)}async getJson(ke,Ae={}){Ae[it.Accept]=this._getExistingOrDefaultHeader(Ae,it.Accept,nt.ApplicationJson);let Ce=await this.get(ke,Ae);return this._processResponse(Ce,this.requestOptions)}async postJson(ke,Ae,Ce={}){let ze=JSON.stringify(Ae,null,2);Ce[it.Accept]=this._getExistingOrDefaultHeader(Ce,it.Accept,nt.ApplicationJson);Ce[it.ContentType]=this._getExistingOrDefaultHeader(Ce,it.ContentType,nt.ApplicationJson);let qe=await this.post(ke,ze,Ce);return this._processResponse(qe,this.requestOptions)}async putJson(ke,Ae,Ce={}){let ze=JSON.stringify(Ae,null,2);Ce[it.Accept]=this._getExistingOrDefaultHeader(Ce,it.Accept,nt.ApplicationJson);Ce[it.ContentType]=this._getExistingOrDefaultHeader(Ce,it.ContentType,nt.ApplicationJson);let qe=await this.put(ke,ze,Ce);return this._processResponse(qe,this.requestOptions)}async patchJson(ke,Ae,Ce={}){let ze=JSON.stringify(Ae,null,2);Ce[it.Accept]=this._getExistingOrDefaultHeader(Ce,it.Accept,nt.ApplicationJson);Ce[it.ContentType]=this._getExistingOrDefaultHeader(Ce,it.ContentType,nt.ApplicationJson);let qe=await this.patch(ke,ze,Ce);return this._processResponse(qe,this.requestOptions)}async request(ke,Ae,Ce,ze){if(this._disposed){throw new Error("Client has already been disposed.")}let qe=new URL(Ae);let Ve=this._prepareRequest(ke,qe,ze);let tt=this._allowRetries&&ht.indexOf(ke)!=-1?this._maxRetries+1:1;let it=0;let nt;while(it<tt){nt=await this.requestRaw(Ve,Ce);if(nt&&nt.message&&nt.message.statusCode===rt.Unauthorized){let ke;for(let Ae=0;Ae<this.handlers.length;Ae++){if(this.handlers[Ae].canHandleAuthentication(nt)){ke=this.handlers[Ae];break}}if(ke){return ke.handleAuthentication(this,Ve,Ce)}else{return nt}}let Ae=this._maxRedirects;while(ot.indexOf(nt.message.statusCode)!=-1&&this._allowRedirects&&Ae>0){const tt=nt.message.headers["location"];if(!tt){break}let rt=new URL(tt);if(qe.protocol=="https:"&&qe.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.")}await nt.readBody();if(rt.hostname!==qe.hostname){for(let ke in ze){if(ke.toLowerCase()==="authorization"){delete ze[ke]}}}Ve=this._prepareRequest(ke,rt,ze);nt=await this.requestRaw(Ve,Ce);Ae--}if(ct.indexOf(nt.message.statusCode)==-1){return nt}it+=1;if(it<tt){await nt.readBody();await this._performExponentialBackoff(it)}}return nt}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(ke,Ae){return new Promise(((Ce,ze)=>{let callbackForResult=function(ke,Ae){if(ke){ze(ke)}Ce(Ae)};this.requestRawWithCallback(ke,Ae,callbackForResult)}))}requestRawWithCallback(ke,Ae,Ce){let ze;if(typeof Ae==="string"){ke.options.headers["Content-Length"]=Buffer.byteLength(Ae,"utf8")}let qe=false;let handleResult=(ke,Ae)=>{if(!qe){qe=true;Ce(ke,Ae)}};let Ve=ke.httpModule.request(ke.options,(ke=>{let Ae=new HttpClientResponse(ke);handleResult(null,Ae)}));Ve.on("socket",(ke=>{ze=ke}));Ve.setTimeout(this._socketTimeout||3*6e4,(()=>{if(ze){ze.end()}handleResult(new Error("Request timeout: "+ke.options.path),null)}));Ve.on("error",(function(ke){handleResult(ke,null)}));if(Ae&&typeof Ae==="string"){Ve.write(Ae,"utf8")}if(Ae&&typeof Ae!=="string"){Ae.on("close",(function(){Ve.end()}));Ae.pipe(Ve)}else{Ve.end()}}getAgent(ke){let Ae=new URL(ke);return this._getAgent(Ae)}_prepareRequest(ke,Ae,Ce){const Ve={};Ve.parsedUrl=Ae;const tt=Ve.parsedUrl.protocol==="https:";Ve.httpModule=tt?qe:ze;const rt=tt?443:80;Ve.options={};Ve.options.host=Ve.parsedUrl.hostname;Ve.options.port=Ve.parsedUrl.port?parseInt(Ve.parsedUrl.port):rt;Ve.options.path=(Ve.parsedUrl.pathname||"")+(Ve.parsedUrl.search||"");Ve.options.method=ke;Ve.options.headers=this._mergeHeaders(Ce);if(this.userAgent!=null){Ve.options.headers["user-agent"]=this.userAgent}Ve.options.agent=this._getAgent(Ve.parsedUrl);if(this.handlers){this.handlers.forEach((ke=>{ke.prepareRequest(Ve.options)}))}return Ve}_mergeHeaders(ke){const lowercaseKeys=ke=>Object.keys(ke).reduce(((Ae,Ce)=>(Ae[Ce.toLowerCase()]=ke[Ce],Ae)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(ke))}return lowercaseKeys(ke||{})}_getExistingOrDefaultHeader(ke,Ae,Ce){const lowercaseKeys=ke=>Object.keys(ke).reduce(((Ae,Ce)=>(Ae[Ce.toLowerCase()]=ke[Ce],Ae)),{});let ze;if(this.requestOptions&&this.requestOptions.headers){ze=lowercaseKeys(this.requestOptions.headers)[Ae]}return ke[Ae]||ze||Ce}_getAgent(ke){let Ae;let rt=Ve.getProxyUrl(ke);let it=rt&&rt.hostname;if(this._keepAlive&&it){Ae=this._proxyAgent}if(this._keepAlive&&!it){Ae=this._agent}if(!!Ae){return Ae}const nt=ke.protocol==="https:";let ot=100;if(!!this.requestOptions){ot=this.requestOptions.maxSockets||ze.globalAgent.maxSockets}if(it){if(!tt){tt=Ce(4294)}const ke={maxSockets:ot,keepAlive:this._keepAlive,proxy:{...(rt.username||rt.password)&&{proxyAuth:`${rt.username}:${rt.password}`},host:rt.hostname,port:rt.port}};let ze;const qe=rt.protocol==="https:";if(nt){ze=qe?tt.httpsOverHttps:tt.httpsOverHttp}else{ze=qe?tt.httpOverHttps:tt.httpOverHttp}Ae=ze(ke);this._proxyAgent=Ae}if(this._keepAlive&&!Ae){const ke={keepAlive:this._keepAlive,maxSockets:ot};Ae=nt?new qe.Agent(ke):new ze.Agent(ke);this._agent=Ae}if(!Ae){Ae=nt?qe.globalAgent:ze.globalAgent}if(nt&&this._ignoreSslError){Ae.options=Object.assign(Ae.options||{},{rejectUnauthorized:false})}return Ae}_performExponentialBackoff(ke){ke=Math.min(ft,ke);const Ae=yt*Math.pow(2,ke);return new Promise((ke=>setTimeout((()=>ke()),Ae)))}static dateTimeDeserializer(ke,Ae){if(typeof Ae==="string"){let ke=new Date(Ae);if(!isNaN(ke.valueOf())){return ke}}return Ae}async _processResponse(ke,Ae){return new Promise((async(Ce,ze)=>{const qe=ke.message.statusCode;const Ve={statusCode:qe,result:null,headers:{}};if(qe==rt.NotFound){Ce(Ve)}let tt;let it;try{it=await ke.readBody();if(it&&it.length>0){if(Ae&&Ae.deserializeDates){tt=JSON.parse(it,HttpClient.dateTimeDeserializer)}else{tt=JSON.parse(it)}Ve.result=tt}Ve.headers=ke.message.headers}catch(ke){}if(qe>299){let ke;if(tt&&tt.message){ke=tt.message}else if(it&&it.length>0){ke=it}else{ke="Failed request: ("+qe+")"}let Ae=new HttpClientError(ke,qe);Ae.result=Ve.result;ze(Ae)}else{Ce(Ve)}}))}}Ae.HttpClient=HttpClient},6443:(ke,Ae)=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:true});function getProxyUrl(ke){let Ae=ke.protocol==="https:";let Ce;if(checkBypass(ke)){return Ce}let ze;if(Ae){ze=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{ze=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(ze){Ce=new URL(ze)}return Ce}Ae.getProxyUrl=getProxyUrl;function checkBypass(ke){if(!ke.hostname){return false}let 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}let ze=[ke.hostname.toUpperCase()];if(typeof Ce==="number"){ze.push(`${ze[0]}:${Ce}`)}for(let ke of Ae.split(",").map((ke=>ke.trim().toUpperCase())).filter((ke=>ke))){if(ze.some((Ae=>Ae===ke))){return true}}return false}Ae.checkBypass=checkBypass},1962:function(ke,Ae,Ce){"use strict";var ze=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.apply(ke,Ae||[])).next())}))};var qe;Object.defineProperty(Ae,"__esModule",{value:true});const Ve=Ce(9491);const tt=Ce(7147);const rt=Ce(1017);qe=tt.promises,Ae.chmod=qe.chmod,Ae.copyFile=qe.copyFile,Ae.lstat=qe.lstat,Ae.mkdir=qe.mkdir,Ae.readdir=qe.readdir,Ae.readlink=qe.readlink,Ae.rename=qe.rename,Ae.rmdir=qe.rmdir,Ae.stat=qe.stat,Ae.symlink=qe.symlink,Ae.unlink=qe.unlink;Ae.IS_WINDOWS=process.platform==="win32";function exists(ke){return ze(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 ze(this,void 0,void 0,(function*(){const ze=Ce?yield Ae.stat(ke):yield Ae.lstat(ke);return ze.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,qe=1){return ze(this,void 0,void 0,(function*(){Ve.ok(ke,"a path argument must be provided");ke=rt.resolve(ke);if(qe>=Ce)return Ae.mkdir(ke);try{yield Ae.mkdir(ke);return}catch(ze){switch(ze.code){case"ENOENT":{yield mkdirP(rt.dirname(ke),Ce,qe+1);yield Ae.mkdir(ke);return}default:{let Ce;try{Ce=yield Ae.stat(ke)}catch(ke){throw ze}if(!Ce.isDirectory())throw ze}}}}))}Ae.mkdirP=mkdirP;function tryGetExecutablePath(ke,Ce){return ze(this,void 0,void 0,(function*(){let ze=undefined;try{ze=yield Ae.stat(ke)}catch(Ae){if(Ae.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${ke}': ${Ae}`)}}if(ze&&ze.isFile()){if(Ae.IS_WINDOWS){const Ae=rt.extname(ke).toUpperCase();if(Ce.some((ke=>ke.toUpperCase()===Ae))){return ke}}else{if(isUnixExecutable(ze)){return ke}}}const qe=ke;for(const Ve of Ce){ke=qe+Ve;ze=undefined;try{ze=yield Ae.stat(ke)}catch(Ae){if(Ae.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${ke}': ${Ae}`)}}if(ze&&ze.isFile()){if(Ae.IS_WINDOWS){try{const Ce=rt.dirname(ke);const ze=rt.basename(ke).toUpperCase();for(const qe of yield Ae.readdir(Ce)){if(ze===qe.toUpperCase()){ke=rt.join(Ce,qe);break}}}catch(Ae){console.log(`Unexpected error attempting to determine the actual case of the file '${ke}': ${Ae}`)}return ke}else{if(isUnixExecutable(ze)){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 ze=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});const qe=Ce(2081);const Ve=Ce(1017);const tt=Ce(3837);const rt=Ce(1962);const it=tt.promisify(qe.exec);function cp(ke,Ae,Ce={}){return ze(this,void 0,void 0,(function*(){const{force:ze,recursive:qe}=readCopyOptions(Ce);const tt=(yield rt.exists(Ae))?yield rt.stat(Ae):null;if(tt&&tt.isFile()&&!ze){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(!qe){throw new Error(`Failed to copy. ${ke} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(ke,it,0,ze)}}else{if(Ve.relative(ke,it)===""){throw new Error(`'${it}' and '${ke}' are the same file`)}yield copyFile(ke,it,ze)}}))}Ae.cp=cp;function mv(ke,Ae,Ce={}){return ze(this,void 0,void 0,(function*(){if(yield rt.exists(Ae)){let ze=true;if(yield rt.isDirectory(Ae)){Ae=Ve.join(Ae,Ve.basename(ke));ze=yield rt.exists(Ae)}if(ze){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 ze(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 ze(this,void 0,void 0,(function*(){yield rt.mkdirP(ke)}))}Ae.mkdirP=mkdirP;function which(ke,Ae){return ze(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 ze of Ce){const Ce=yield rt.tryGetExecutablePath(ze+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,qe){return ze(this,void 0,void 0,(function*(){if(Ce>=255)return;Ce++;yield mkdirP(Ae);const ze=yield rt.readdir(ke);for(const Ve of ze){const ze=`${ke}/${Ve}`;const tt=`${Ae}/${Ve}`;const it=yield rt.lstat(ze);if(it.isDirectory()){yield cpDirRecursive(ze,tt,Ce,qe)}else{yield copyFile(ze,tt,qe)}}yield rt.chmod(Ae,(yield rt.stat(ke)).mode)}))}function copyFile(ke,Ae,Ce){return ze(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 ze=[];var qe=[];var Ve=[];Ce.forEach((function(ke){if(ke.type==="operator"&&(ke.value===","||ke.value===";")){if(qe.length){ze.push(qe)}qe=[]}else{qe.push(ke)}}));if(qe.length){ze.push(qe)}ze.forEach((function(ke){ke=_handleAddress(ke);if(ke.length){Ve=Ve.concat(ke)}}));return Ve}function _handleAddress(ke){var Ae;var Ce=false;var ze="text";var qe;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"<":ze="address";break;case"(":ze="comment";break;case":":ze="group";Ce=true;break;default:ze="text"}}else if(Ae.value){if(ze==="address"){Ae.value=Ae.value.replace(/^[^<]*<\s*/,"")}tt[ze].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||qe&&qe.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{qe={address:tt.address||tt.text||"",name:tt.text||tt.address||""};if(qe.address===qe.name){if((qe.address||"").match(/@/)){qe.name=""}else{qe.address=""}}Ve.push(qe)}}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,ze=this.str.length;Ce<ze;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 ze=Ae;ze.bignum=Ce(6641);ze.define=Ce(5245).define;ze.base=Ce(8096);ze.constants=Ce(3371);ze.decoders=Ce(4952);ze.encoders=Ce(9083)},5245:(ke,Ae,Ce)=>{"use strict";const ze=Ce(9083);const qe=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(qe[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(ze[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 ze=Ce(4124);const qe=Ce(3744).b;const Ve=Ce(5118).Buffer;function DecoderBuffer(ke,Ae){qe.call(this,Ae);if(!Ve.isBuffer(ke)){this.error("Input not Buffer");return}this.base=ke;this.offset=0;this.length=ke.length}ze(DecoderBuffer,qe);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:qe.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;qe.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 ze=Ae;ze.Reporter=Ce(3744).b;ze.DecoderBuffer=Ce(5298).C;ze.EncoderBuffer=Ce(5298).R;ze.Node=Ce(842)},842:(ke,Ae,Ce)=>{"use strict";const ze=Ce(3744).b;const qe=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 ze={};this._baseState=ze;ze.name=Ce;ze.enc=ke;ze.parent=Ae||null;ze.children=null;ze.tag=null;ze.args=null;ze.reverseArgs=null;ze.choice=null;ze.optional=false;ze.any=false;ze.obj=false;ze.use=null;ze.useDecoder=null;ze.key=null;ze["default"]=null;ze.explicit=null;ze.implicit=null;ze.contains=null;if(!ze.parent){ze.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 ze=ke[Ce];Ae[ze]=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 ze=Ce["default"];let qe=true;let tt=null;if(Ce.key!==null)tt=ke.enterKey(Ce.key);if(Ce.optional){let ze=null;if(Ce.explicit!==null)ze=Ce.explicit;else if(Ce.implicit!==null)ze=Ce.implicit;else if(Ce.tag!==null)ze=Ce.tag;if(ze===null&&!Ce.any){const ze=ke.save();try{if(Ce.choice===null)this._decodeGeneric(Ce.tag,ke,Ae);else this._decodeChoice(ke,Ae);qe=true}catch(ke){qe=false}ke.restore(ze)}else{qe=this._peekTag(ke,ze,Ce.any);if(ke.isError(qe))return qe}}let rt;if(Ce.obj&&qe)rt=ke.enterObject();if(qe){if(Ce.explicit!==null){const Ae=this._decodeTag(ke,Ce.explicit);if(ke.isError(Ae))return Ae;ke=Ae}const qe=ke.offset;if(Ce.use===null&&Ce.choice===null){let Ae;if(Ce.any)Ae=ke.save();const qe=this._decodeTag(ke,Ce.implicit!==null?Ce.implicit:Ce.tag,Ce.any);if(ke.isError(qe))return qe;if(Ce.any)ze=ke.raw(Ae);else ke=qe}if(Ae&&Ae.track&&Ce.tag!==null)Ae.track(ke.path(),qe,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){ze=this._decodeGeneric(Ce.tag,ke,Ae)}else{ze=this._decodeChoice(ke,Ae)}if(ke.isError(ze))return ze;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 qe=new Ve(ze);ze=this._getUse(Ce.contains,ke._reporterState.obj)._decode(qe,Ae)}}if(Ce.obj&&qe)ze=ke.leaveObject(rt);if(Ce.key!==null&&(ze!==null||qe===true))ke.leaveKey(tt,Ce.key,ze);else if(tt!==null)ke.exitKey(tt);return ze};Node.prototype._decodeGeneric=function decodeGeneric(ke,Ae,Ce){const ze=this._baseState;if(ke==="seq"||ke==="set")return null;if(ke==="seqof"||ke==="setof")return this._decodeList(Ae,ke,ze.args[0],Ce);else if(/str$/.test(ke))return this._decodeStr(Ae,ke,Ce);else if(ke==="objid"&&ze.args)return this._decodeObjid(Ae,ze.args[0],ze.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,ze.args&&ze.args[0],Ce);if(ze.use!==null){return this._getUse(ze.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 ze=null;let qe=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;ze={type:Ve,value:Ce};qe=true}catch(Ae){ke.restore(tt);return false}return true}),this);if(!qe)return ke.error("Choice not matched");return ze};Node.prototype._createEncoderBuffer=function createEncoderBuffer(ke){return new qe(ke,this.reporter)};Node.prototype._encode=function encode(ke,Ae,Ce){const ze=this._baseState;if(ze["default"]!==null&&ze["default"]===ke)return;const qe=this._encodeValue(ke,Ae,Ce);if(qe===undefined)return;if(this._skipDefault(qe,Ae,Ce))return;return qe};Node.prototype._encodeValue=function encode(ke,Ae,Ce){const qe=this._baseState;if(qe.parent===null)return qe.children[0]._encode(ke,Ae||new ze);let Ve=null;this.reporter=Ae;if(qe.optional&&ke===undefined){if(qe["default"]!==null)ke=qe["default"];else return}let tt=null;let rt=false;if(qe.any){Ve=this._createEncoderBuffer(ke)}else if(qe.choice){Ve=this._encodeChoice(ke,Ae)}else if(qe.contains){tt=this._getUse(qe.contains,Ce)._encode(ke,Ae);rt=true}else if(qe.children){tt=qe.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 ze=Ae.enterKey(Ce._baseState.key);if(typeof ke!=="object")return Ae.error("Child expected, but input is not object");const qe=Ce._encode(ke[Ce._baseState.key],Ae,ke);Ae.leaveKey(ze);return qe}),this).filter((function(ke){return ke}));tt=this._createEncoderBuffer(tt)}else{if(qe.tag==="seqof"||qe.tag==="setof"){if(!(qe.args&&qe.args.length===1))return Ae.error("Too many args for : "+qe.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 ze=this._baseState;return this._getUse(ze.args[0],ke)._encode(Ce,Ae)}),Ce))}else if(qe.use!==null){Ve=this._getUse(qe.use,Ce)._encode(ke,Ae)}else{tt=this._encodePrimitive(qe.tag,ke);rt=true}}if(!qe.any&&qe.choice===null){const ke=qe.implicit!==null?qe.implicit:qe.tag;const Ce=qe.implicit===null?"universal":"context";if(ke===null){if(qe.use===null)Ae.error("Tag could be omitted only for .use()")}else{if(qe.use===null)Ve=this._encodeComposite(ke,rt,Ce,tt)}}if(qe.explicit!==null)Ve=this._encodeComposite(qe.explicit,false,"context",Ve);return Ve};Node.prototype._encodeChoice=function encodeChoice(ke,Ae){const Ce=this._baseState;const ze=Ce.choice[ke.type];if(!ze){tt(false,ke.type+" not found in "+JSON.stringify(Object.keys(Ce.choice)))}return ze._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 ze=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 ze=this._reporterState;this.exitKey(ke);if(ze.obj!==null)ze.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 ze=ke instanceof ReporterError;if(ze){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(!ze)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)}ze(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 ze=ke[Ce];Ae[ze]=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 ze=Ae;ze._reverse=function reverse(ke){const Ae={};Object.keys(ke).forEach((function(Ce){if((Ce|0)==Ce)Ce=Ce|0;const ze=ke[Ce];Ae[ze]=Ce}));return Ae};ze.der=Ce(1188)},3332:(ke,Ae,Ce)=>{"use strict";const ze=Ce(4124);const qe=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)}ze(DERNode,tt);DERNode.prototype._peekTag=function peekTag(ke,Ae,Ce){if(ke.isEmpty())return false;const ze=ke.save();const qe=derDecodeTag(ke,'Failed to peek tag: "'+Ae+'"');if(ke.isError(qe))return qe;ke.restore(ze);return qe.tag===Ae||qe.tagStr===Ae||qe.tagStr+"of"===Ae||Ce};DERNode.prototype._decodeTag=function decodeTag(ke,Ae,Ce){const ze=derDecodeTag(ke,'Failed to decode tag of "'+Ae+'"');if(ke.isError(ze))return ze;let qe=derDecodeLen(ke,ze.primitive,'Failed to get length of "'+Ae+'"');if(ke.isError(qe))return qe;if(!Ce&&ze.tag!==Ae&&ze.tagStr!==Ae&&ze.tagStr+"of"!==Ae){return ke.error('Failed to match tag: "'+Ae+'"')}if(ze.primitive||qe!==null)return ke.skip(qe,'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;qe=ke.offset-Ve.offset;ke.restore(Ve);return ke.skip(qe,'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 ze=derDecodeLen(ke,Ce.primitive,Ae);if(ke.isError(ze))return ze;let qe;if(Ce.primitive||ze!==null)qe=ke.skip(ze);else qe=this._skipUntilEnd(ke,Ae);if(ke.isError(qe))return qe;if(Ce.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(ke,Ae,Ce,ze){const qe=[];while(!ke.isEmpty()){const Ae=this._peekTag(ke,"end");if(ke.isError(Ae))return Ae;const Ve=Ce.decode(ke,"der",ze);if(ke.isError(Ve)&&Ae)break;qe.push(Ve)}return qe};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 ze;const qe=[];let Ve=0;let tt=0;while(!ke.isEmpty()){tt=ke.readUInt8();Ve<<=7;Ve|=tt&127;if((tt&128)===0){qe.push(Ve);Ve=0}}if(tt&128)qe.push(Ve);const rt=qe[0]/40|0;const it=qe[0]%40;if(Ce)ze=qe;else ze=[rt,it].concat(qe.slice(1));if(Ae){let ke=Ae[ze.join(" ")];if(ke===undefined)ke=Ae[ze.join(".")];if(ke!==undefined)ze=ke}return ze};DERNode.prototype._decodeTime=function decodeTime(ke,Ae){const Ce=ke.raw().toString();let ze;let qe;let Ve;let tt;let rt;let it;if(Ae==="gentime"){ze=Ce.slice(0,4)|0;qe=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"){ze=Ce.slice(0,2)|0;qe=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(ze<70)ze=2e3+ze;else ze=1900+ze}else{return ke.error("Decoding "+Ae+" time is not supported yet")}return Date.UTC(ze,qe-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 ze=new qe(Ce);if(Ae)ze=Ae[ze.toString(10)]||ze;return ze};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 ze=rt.tagClass[Ce>>6];const qe=(Ce&32)===0;if((Ce&31)===31){let ze=Ce;Ce=0;while((ze&128)===128){ze=ke.readUInt8(Ae);if(ke.isError(ze))return ze;Ce<<=7;Ce|=ze&127}}else{Ce&=31}const Ve=rt.tag[Ce];return{cls:ze,primitive:qe,tag:Ce,tagStr:Ve}}function derDecodeLen(ke,Ae,Ce){let ze=ke.readUInt8(Ce);if(ke.isError(ze))return ze;if(!Ae&&ze===128)return null;if((ze&128)===0){return ze}const qe=ze&127;if(qe>4)return ke.error("length octect is too long");ze=0;for(let Ae=0;Ae<qe;Ae++){ze<<=8;const Ae=ke.readUInt8(Ce);if(ke.isError(Ae))return Ae;ze|=Ae}return ze}},4952:(ke,Ae,Ce)=>{"use strict";const ze=Ae;ze.der=Ce(3332);ze.pem=Ce(8361)},8361:(ke,Ae,Ce)=>{"use strict";const ze=Ce(4124);const qe=Ce(5118).Buffer;const Ve=Ce(3332);function PEMDecoder(ke){Ve.call(this,ke);this.enc="pem"}ze(PEMDecoder,Ve);ke.exports=PEMDecoder;PEMDecoder.prototype.decode=function decode(ke,Ae){const Ce=ke.toString().split(/[\r\n]+/g);const ze=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]!==ze)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: "+ze);const nt=Ce.slice(rt+1,it).join("");nt.replace(/[^a-z0-9+/=]+/gi,"");const ot=qe.from(nt,"base64");return Ve.prototype.decode.call(this,ot,Ae)}},5769:(ke,Ae,Ce)=>{"use strict";const ze=Ce(4124);const qe=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)}ze(DERNode,Ve);DERNode.prototype._encodeComposite=function encodeComposite(ke,Ae,Ce,ze){const Ve=encodeTag(ke,Ae,Ce,this.reporter);if(ze.length<128){const ke=qe.alloc(2);ke[0]=Ve;ke[1]=ze.length;return this._createEncoderBuffer([ke,ze])}let tt=1;for(let ke=ze.length;ke>=256;ke>>=8)tt++;const rt=qe.alloc(1+1+tt);rt[0]=Ve;rt[1]=128|tt;for(let ke=1+tt,Ae=ze.length;Ae>0;ke--,Ae>>=8)rt[ke]=Ae&255;return this._createEncoderBuffer([rt,ze])};DERNode.prototype._encodeStr=function encodeStr(ke,Ae){if(Ae==="bitstr"){return this._createEncoderBuffer([ke.unused|0,ke.data])}else if(Ae==="bmpstr"){const Ae=qe.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 ze=0;for(let Ae=0;Ae<ke.length;Ae++){let Ce=ke[Ae];for(ze++;Ce>=128;Ce>>=7)ze++}const Ve=qe.alloc(ze);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 ze=new Date(ke);if(Ae==="gentime"){Ce=[two(ze.getUTCFullYear()),two(ze.getUTCMonth()+1),two(ze.getUTCDate()),two(ze.getUTCHours()),two(ze.getUTCMinutes()),two(ze.getUTCSeconds()),"Z"].join("")}else if(Ae==="utctime"){Ce=[two(ze.getUTCFullYear()%100),two(ze.getUTCMonth()+1),two(ze.getUTCDate()),two(ze.getUTCHours()),two(ze.getUTCMinutes()),two(ze.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"&&!qe.isBuffer(ke)){const Ae=ke.toArray();if(!ke.sign&&Ae[0]&128){Ae.unshift(0)}ke=qe.from(Ae)}if(qe.isBuffer(ke)){let Ae=ke.length;if(ke.length===0)Ae++;const Ce=qe.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 ze=new Array(Ce);for(let Ae=ze.length-1;Ae>=0;Ae--){ze[Ae]=ke&255;ke>>=8}if(ze[0]&128){ze.unshift(0)}return this._createEncoderBuffer(qe.from(ze))};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 ze=this._baseState;let qe;if(ze["default"]===null)return false;const Ve=ke.join();if(ze.defaultBuffer===undefined)ze.defaultBuffer=this._encodeValue(ze["default"],Ae,Ce).join();if(Ve.length!==ze.defaultBuffer.length)return false;for(qe=0;qe<Ve.length;qe++)if(Ve[qe]!==ze.defaultBuffer[qe])return false;return true};function encodeTag(ke,Ae,Ce,ze){let qe;if(ke==="seqof")ke="seq";else if(ke==="setof")ke="set";if(tt.tagByName.hasOwnProperty(ke))qe=tt.tagByName[ke];else if(typeof ke==="number"&&(ke|0)===ke)qe=ke;else return ze.error("Unknown tag: "+ke);if(qe>=31)return ze.error("Multi-octet tag encoding unsupported");if(!Ae)qe|=32;qe|=tt.tagClassByName[Ce||"universal"]<<6;return qe}},9083:(ke,Ae,Ce)=>{"use strict";const ze=Ae;ze.der=Ce(5769);ze.pem=Ce(279)},279:(ke,Ae,Ce)=>{"use strict";const ze=Ce(4124);const qe=Ce(5769);function PEMEncoder(ke){qe.call(this,ke);this.enc="pem"}ze(PEMEncoder,qe);ke.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(ke,Ae){const Ce=qe.prototype.encode.call(this,ke);const ze=Ce.toString("base64");const Ve=["-----BEGIN "+Ae.label+"-----"];for(let ke=0;ke<ze.length;ke+=64)Ve.push(ze.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 ze;try{ze=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 ze=0;if(ke[0]==="-"){ze++}if(Ae===16){this._parseHex(ke,ze)}else{this._parseBase(ke,Ae,ze)}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 ze=0;ze<this.length;ze++){this.words[ze]=0}var qe,Ve;var tt=0;if(Ce==="be"){for(ze=ke.length-1,qe=0;ze>=0;ze-=3){Ve=ke[ze]|ke[ze-1]<<8|ke[ze-2]<<16;this.words[qe]|=Ve<<tt&67108863;this.words[qe+1]=Ve>>>26-tt&67108863;tt+=24;if(tt>=26){tt-=26;qe++}}}else if(Ce==="le"){for(ze=0,qe=0;ze<ke.length;ze+=3){Ve=ke[ze]|ke[ze+1]<<8|ke[ze+2]<<16;this.words[qe]|=Ve<<tt&67108863;this.words[qe+1]=Ve>>>26-tt&67108863;tt+=24;if(tt>=26){tt-=26;qe++}}}return this.strip()};function parseHex(ke,Ae,Ce){var ze=0;var qe=Math.min(ke.length,Ce);for(var Ve=Ae;Ve<qe;Ve++){var tt=ke.charCodeAt(Ve)-48;ze<<=4;if(tt>=49&&tt<=54){ze|=tt-49+10}else if(tt>=17&&tt<=22){ze|=tt-17+10}else{ze|=tt&15}}return ze}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 ze,qe;var Ve=0;for(Ce=ke.length-6,ze=0;Ce>=Ae;Ce-=6){qe=parseHex(ke,Ce,Ce+6);this.words[ze]|=qe<<Ve&67108863;this.words[ze+1]|=qe>>>26-Ve&4194303;Ve+=24;if(Ve>=26){Ve-=26;ze++}}if(Ce+6!==Ae){qe=parseHex(ke,Ae,Ce+6);this.words[ze]|=qe<<Ve&67108863;this.words[ze+1]|=qe>>>26-Ve&4194303}this.strip()};function parseBase(ke,Ae,Ce,ze){var qe=0;var Ve=Math.min(ke.length,Ce);for(var tt=Ae;tt<Ve;tt++){var rt=ke.charCodeAt(tt)-48;qe*=ze;if(rt>=49){qe+=rt-49+10}else if(rt>=17){qe+=rt-17+10}else{qe+=rt}}return qe}BN.prototype._parseBase=function _parseBase(ke,Ae,Ce){this.words=[0];this.length=1;for(var ze=0,qe=1;qe<=67108863;qe*=Ae){ze++}ze--;qe=qe/Ae|0;var Ve=ke.length-Ce;var tt=Ve%ze;var rt=Math.min(Ve,Ve-tt)+Ce;var it=0;for(var nt=Ce;nt<rt;nt+=ze){it=parseBase(ke,nt,nt+ze,Ae);this.imuln(qe);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 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"];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 ze=0;var rt=0;for(var it=0;it<this.length;it++){var nt=this.words[it];var ot=((nt<<ze|rt)&16777215).toString(16);rt=nt>>>24-ze&16777215;if(rt!==0||it!==this.length-1){Ce=qe[6-ot.length]+ot+Ce}else{Ce=ot+Ce}ze+=2;if(ze>=26){ze-=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=qe[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 ze!=="undefined");return this.toArrayLike(ze,ke,Ae)};BN.prototype.toArray=function toArray(ke,Ae){return this.toArrayLike(Array,ke,Ae)};BN.prototype.toArrayLike=function toArrayLike(ke,Ae,Ce){var ze=this.byteLength();var qe=Ce||Math.max(1,ze);assert(ze<=qe,"byte array longer than desired length");assert(qe>0,"Requested array length <= 0");this.strip();var Ve=Ae==="le";var tt=new ke(qe);var rt,it;var nt=this.clone();if(!Ve){for(it=0;it<qe-ze;it++){tt[it]=0}for(it=0;!nt.isZero();it++){rt=nt.andln(255);nt.iushrn(8);tt[qe-it-1]=rt}}else{for(it=0;!nt.isZero();it++){rt=nt.andln(255);nt.iushrn(8);tt[it]=rt}for(;it<qe;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 ze=Ce/26|0;var qe=Ce%26;Ae[Ce]=(ke.words[ze]&1<<qe)>>>qe}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 ze=0;ze<Ce.length;ze++){this.words[ze]=Ae.words[ze]^Ce.words[ze]}if(this!==Ae){for(;ze<Ae.length;ze++){this.words[ze]=Ae.words[ze]}}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 ze=0;ze<Ae;ze++){this.words[ze]=~this.words[ze]&67108863}if(Ce>0){this.words[ze]=~this.words[ze]&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 ze=ke%26;this._expand(Ce+1);if(Ae){this.words[Ce]=this.words[Ce]|1<<ze}else{this.words[Ce]=this.words[Ce]&~(1<<ze)}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,ze;if(this.length>ke.length){Ce=this;ze=ke}else{Ce=ke;ze=this}var qe=0;for(var Ve=0;Ve<ze.length;Ve++){Ae=(Ce.words[Ve]|0)+(ze.words[Ve]|0)+qe;this.words[Ve]=Ae&67108863;qe=Ae>>>26}for(;qe!==0&&Ve<Ce.length;Ve++){Ae=(Ce.words[Ve]|0)+qe;this.words[Ve]=Ae&67108863;qe=Ae>>>26}this.length=Ce.length;if(qe!==0){this.words[this.length]=qe;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 ze,qe;if(Ce>0){ze=this;qe=ke}else{ze=ke;qe=this}var Ve=0;for(var tt=0;tt<qe.length;tt++){Ae=(ze.words[tt]|0)-(qe.words[tt]|0)+Ve;Ve=Ae>>26;this.words[tt]=Ae&67108863}for(;Ve!==0&&tt<ze.length;tt++){Ae=(ze.words[tt]|0)+Ve;Ve=Ae>>26;this.words[tt]=Ae&67108863}if(Ve===0&&tt<ze.length&&ze!==this){for(;tt<ze.length;tt++){this.words[tt]=ze.words[tt]}}this.length=Math.max(this.length,tt);if(ze!==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 ze=ke.length+Ae.length|0;Ce.length=ze;ze=ze-1|0;var qe=ke.words[0]|0;var Ve=Ae.words[0]|0;var tt=qe*Ve;var rt=tt&67108863;var it=tt/67108864|0;Ce.words[0]=rt;for(var nt=1;nt<ze;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;qe=ke.words[yt]|0;Ve=Ae.words[ft]|0;tt=qe*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 ze=ke.words;var qe=Ae.words;var Ve=Ce.words;var tt=0;var rt;var it;var nt;var ot=ze[0]|0;var ct=ot&8191;var ht=ot>>>13;var ft=ze[1]|0;var yt=ft&8191;var mt=ft>>>13;var kt=ze[2]|0;var St=kt&8191;var Et=kt>>>13;var Pt=ze[3]|0;var Bt=Pt&8191;var Dt=Pt>>>13;var Rt=ze[4]|0;var Tt=Rt&8191;var Kt=Rt>>>13;var It=ze[5]|0;var Ut=It&8191;var Ot=It>>>13;var Nt=ze[6]|0;var zt=Nt&8191;var qt=Nt>>>13;var Ft=ze[7]|0;var Lt=Ft&8191;var Ht=Ft>>>13;var Gt=ze[8]|0;var $t=Gt&8191;var Vt=Gt>>>13;var Zt=ze[9]|0;var Xt=Zt&8191;var Jt=Zt>>>13;var Yt=qe[0]|0;var Qt=Yt&8191;var er=Yt>>>13;var tr=qe[1]|0;var rr=tr&8191;var ir=tr>>>13;var nr=qe[2]|0;var sr=nr&8191;var vr=nr>>>13;var _r=qe[3]|0;var kr=_r&8191;var Ar=_r>>>13;var Sr=qe[4]|0;var Er=Sr&8191;var xr=Sr>>>13;var Br=qe[5]|0;var Dr=Br&8191;var Rr=Br>>>13;var Ir=qe[6]|0;var Ur=Ir&8191;var Lr=Ir>>>13;var Gr=qe[7]|0;var Vr=Gr&8191;var Xr=Gr>>>13;var Qr=qe[8]|0;var ei=Qr&8191;var ti=Qr>>>13;var ri=qe[9]|0;var ii=ri&8191;var ni=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 oi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(oi>>>26)|0;oi&=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 ci=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(ci>>>26)|0;ci&=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 hi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(hi>>>26)|0;hi&=67108863;rt=Math.imul(Bt,Qt);it=Math.imul(Bt,er);it=it+Math.imul(Dt,Qt)|0;nt=Math.imul(Dt,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 li=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(li>>>26)|0;li&=67108863;rt=Math.imul(Tt,Qt);it=Math.imul(Tt,er);it=it+Math.imul(Kt,Qt)|0;nt=Math.imul(Kt,er);rt=rt+Math.imul(Bt,rr)|0;it=it+Math.imul(Bt,ir)|0;it=it+Math.imul(Dt,rr)|0;nt=nt+Math.imul(Dt,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 di=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(di>>>26)|0;di&=67108863;rt=Math.imul(Ut,Qt);it=Math.imul(Ut,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(Kt,rr)|0;nt=nt+Math.imul(Kt,ir)|0;rt=rt+Math.imul(Bt,sr)|0;it=it+Math.imul(Bt,vr)|0;it=it+Math.imul(Dt,sr)|0;nt=nt+Math.imul(Dt,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,Dr)|0;it=it+Math.imul(ct,Rr)|0;it=it+Math.imul(ht,Dr)|0;nt=nt+Math.imul(ht,Rr)|0;var pi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(pi>>>26)|0;pi&=67108863;rt=Math.imul(zt,Qt);it=Math.imul(zt,er);it=it+Math.imul(qt,Qt)|0;nt=Math.imul(qt,er);rt=rt+Math.imul(Ut,rr)|0;it=it+Math.imul(Ut,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(Kt,sr)|0;nt=nt+Math.imul(Kt,vr)|0;rt=rt+Math.imul(Bt,kr)|0;it=it+Math.imul(Bt,Ar)|0;it=it+Math.imul(Dt,kr)|0;nt=nt+Math.imul(Dt,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,Dr)|0;it=it+Math.imul(yt,Rr)|0;it=it+Math.imul(mt,Dr)|0;nt=nt+Math.imul(mt,Rr)|0;rt=rt+Math.imul(ct,Ur)|0;it=it+Math.imul(ct,Lr)|0;it=it+Math.imul(ht,Ur)|0;nt=nt+Math.imul(ht,Lr)|0;var yi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(yi>>>26)|0;yi&=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(zt,rr)|0;it=it+Math.imul(zt,ir)|0;it=it+Math.imul(qt,rr)|0;nt=nt+Math.imul(qt,ir)|0;rt=rt+Math.imul(Ut,sr)|0;it=it+Math.imul(Ut,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(Kt,kr)|0;nt=nt+Math.imul(Kt,Ar)|0;rt=rt+Math.imul(Bt,Er)|0;it=it+Math.imul(Bt,xr)|0;it=it+Math.imul(Dt,Er)|0;nt=nt+Math.imul(Dt,xr)|0;rt=rt+Math.imul(St,Dr)|0;it=it+Math.imul(St,Rr)|0;it=it+Math.imul(Et,Dr)|0;nt=nt+Math.imul(Et,Rr)|0;rt=rt+Math.imul(yt,Ur)|0;it=it+Math.imul(yt,Lr)|0;it=it+Math.imul(mt,Ur)|0;nt=nt+Math.imul(mt,Lr)|0;rt=rt+Math.imul(ct,Vr)|0;it=it+Math.imul(ct,Xr)|0;it=it+Math.imul(ht,Vr)|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($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(zt,sr)|0;it=it+Math.imul(zt,vr)|0;it=it+Math.imul(qt,sr)|0;nt=nt+Math.imul(qt,vr)|0;rt=rt+Math.imul(Ut,kr)|0;it=it+Math.imul(Ut,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(Kt,Er)|0;nt=nt+Math.imul(Kt,xr)|0;rt=rt+Math.imul(Bt,Dr)|0;it=it+Math.imul(Bt,Rr)|0;it=it+Math.imul(Dt,Dr)|0;nt=nt+Math.imul(Dt,Rr)|0;rt=rt+Math.imul(St,Ur)|0;it=it+Math.imul(St,Lr)|0;it=it+Math.imul(Et,Ur)|0;nt=nt+Math.imul(Et,Lr)|0;rt=rt+Math.imul(yt,Vr)|0;it=it+Math.imul(yt,Xr)|0;it=it+Math.imul(mt,Vr)|0;nt=nt+Math.imul(mt,Xr)|0;rt=rt+Math.imul(ct,ei)|0;it=it+Math.imul(ct,ti)|0;it=it+Math.imul(ht,ei)|0;nt=nt+Math.imul(ht,ti)|0;var bi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(bi>>>26)|0;bi&=67108863;rt=Math.imul(Xt,Qt);it=Math.imul(Xt,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(zt,kr)|0;it=it+Math.imul(zt,Ar)|0;it=it+Math.imul(qt,kr)|0;nt=nt+Math.imul(qt,Ar)|0;rt=rt+Math.imul(Ut,Er)|0;it=it+Math.imul(Ut,xr)|0;it=it+Math.imul(Ot,Er)|0;nt=nt+Math.imul(Ot,xr)|0;rt=rt+Math.imul(Tt,Dr)|0;it=it+Math.imul(Tt,Rr)|0;it=it+Math.imul(Kt,Dr)|0;nt=nt+Math.imul(Kt,Rr)|0;rt=rt+Math.imul(Bt,Ur)|0;it=it+Math.imul(Bt,Lr)|0;it=it+Math.imul(Dt,Ur)|0;nt=nt+Math.imul(Dt,Lr)|0;rt=rt+Math.imul(St,Vr)|0;it=it+Math.imul(St,Xr)|0;it=it+Math.imul(Et,Vr)|0;nt=nt+Math.imul(Et,Xr)|0;rt=rt+Math.imul(yt,ei)|0;it=it+Math.imul(yt,ti)|0;it=it+Math.imul(mt,ei)|0;nt=nt+Math.imul(mt,ti)|0;rt=rt+Math.imul(ct,ii)|0;it=it+Math.imul(ct,ni)|0;it=it+Math.imul(ht,ii)|0;nt=nt+Math.imul(ht,ni)|0;var Si=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Si>>>26)|0;Si&=67108863;rt=Math.imul(Xt,rr);it=Math.imul(Xt,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(zt,Er)|0;it=it+Math.imul(zt,xr)|0;it=it+Math.imul(qt,Er)|0;nt=nt+Math.imul(qt,xr)|0;rt=rt+Math.imul(Ut,Dr)|0;it=it+Math.imul(Ut,Rr)|0;it=it+Math.imul(Ot,Dr)|0;nt=nt+Math.imul(Ot,Rr)|0;rt=rt+Math.imul(Tt,Ur)|0;it=it+Math.imul(Tt,Lr)|0;it=it+Math.imul(Kt,Ur)|0;nt=nt+Math.imul(Kt,Lr)|0;rt=rt+Math.imul(Bt,Vr)|0;it=it+Math.imul(Bt,Xr)|0;it=it+Math.imul(Dt,Vr)|0;nt=nt+Math.imul(Dt,Xr)|0;rt=rt+Math.imul(St,ei)|0;it=it+Math.imul(St,ti)|0;it=it+Math.imul(Et,ei)|0;nt=nt+Math.imul(Et,ti)|0;rt=rt+Math.imul(yt,ii)|0;it=it+Math.imul(yt,ni)|0;it=it+Math.imul(mt,ii)|0;nt=nt+Math.imul(mt,ni)|0;var Ei=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ei>>>26)|0;Ei&=67108863;rt=Math.imul(Xt,sr);it=Math.imul(Xt,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(zt,Dr)|0;it=it+Math.imul(zt,Rr)|0;it=it+Math.imul(qt,Dr)|0;nt=nt+Math.imul(qt,Rr)|0;rt=rt+Math.imul(Ut,Ur)|0;it=it+Math.imul(Ut,Lr)|0;it=it+Math.imul(Ot,Ur)|0;nt=nt+Math.imul(Ot,Lr)|0;rt=rt+Math.imul(Tt,Vr)|0;it=it+Math.imul(Tt,Xr)|0;it=it+Math.imul(Kt,Vr)|0;nt=nt+Math.imul(Kt,Xr)|0;rt=rt+Math.imul(Bt,ei)|0;it=it+Math.imul(Bt,ti)|0;it=it+Math.imul(Dt,ei)|0;nt=nt+Math.imul(Dt,ti)|0;rt=rt+Math.imul(St,ii)|0;it=it+Math.imul(St,ni)|0;it=it+Math.imul(Et,ii)|0;nt=nt+Math.imul(Et,ni)|0;var Mi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Mi>>>26)|0;Mi&=67108863;rt=Math.imul(Xt,kr);it=Math.imul(Xt,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,Dr)|0;it=it+Math.imul(Lt,Rr)|0;it=it+Math.imul(Ht,Dr)|0;nt=nt+Math.imul(Ht,Rr)|0;rt=rt+Math.imul(zt,Ur)|0;it=it+Math.imul(zt,Lr)|0;it=it+Math.imul(qt,Ur)|0;nt=nt+Math.imul(qt,Lr)|0;rt=rt+Math.imul(Ut,Vr)|0;it=it+Math.imul(Ut,Xr)|0;it=it+Math.imul(Ot,Vr)|0;nt=nt+Math.imul(Ot,Xr)|0;rt=rt+Math.imul(Tt,ei)|0;it=it+Math.imul(Tt,ti)|0;it=it+Math.imul(Kt,ei)|0;nt=nt+Math.imul(Kt,ti)|0;rt=rt+Math.imul(Bt,ii)|0;it=it+Math.imul(Bt,ni)|0;it=it+Math.imul(Dt,ii)|0;nt=nt+Math.imul(Dt,ni)|0;var Ci=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ci>>>26)|0;Ci&=67108863;rt=Math.imul(Xt,Er);it=Math.imul(Xt,xr);it=it+Math.imul(Jt,Er)|0;nt=Math.imul(Jt,xr);rt=rt+Math.imul($t,Dr)|0;it=it+Math.imul($t,Rr)|0;it=it+Math.imul(Vt,Dr)|0;nt=nt+Math.imul(Vt,Rr)|0;rt=rt+Math.imul(Lt,Ur)|0;it=it+Math.imul(Lt,Lr)|0;it=it+Math.imul(Ht,Ur)|0;nt=nt+Math.imul(Ht,Lr)|0;rt=rt+Math.imul(zt,Vr)|0;it=it+Math.imul(zt,Xr)|0;it=it+Math.imul(qt,Vr)|0;nt=nt+Math.imul(qt,Xr)|0;rt=rt+Math.imul(Ut,ei)|0;it=it+Math.imul(Ut,ti)|0;it=it+Math.imul(Ot,ei)|0;nt=nt+Math.imul(Ot,ti)|0;rt=rt+Math.imul(Tt,ii)|0;it=it+Math.imul(Tt,ni)|0;it=it+Math.imul(Kt,ii)|0;nt=nt+Math.imul(Kt,ni)|0;var Ri=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ri>>>26)|0;Ri&=67108863;rt=Math.imul(Xt,Dr);it=Math.imul(Xt,Rr);it=it+Math.imul(Jt,Dr)|0;nt=Math.imul(Jt,Rr);rt=rt+Math.imul($t,Ur)|0;it=it+Math.imul($t,Lr)|0;it=it+Math.imul(Vt,Ur)|0;nt=nt+Math.imul(Vt,Lr)|0;rt=rt+Math.imul(Lt,Vr)|0;it=it+Math.imul(Lt,Xr)|0;it=it+Math.imul(Ht,Vr)|0;nt=nt+Math.imul(Ht,Xr)|0;rt=rt+Math.imul(zt,ei)|0;it=it+Math.imul(zt,ti)|0;it=it+Math.imul(qt,ei)|0;nt=nt+Math.imul(qt,ti)|0;rt=rt+Math.imul(Ut,ii)|0;it=it+Math.imul(Ut,ni)|0;it=it+Math.imul(Ot,ii)|0;nt=nt+Math.imul(Ot,ni)|0;var Ki=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ki>>>26)|0;Ki&=67108863;rt=Math.imul(Xt,Ur);it=Math.imul(Xt,Lr);it=it+Math.imul(Jt,Ur)|0;nt=Math.imul(Jt,Lr);rt=rt+Math.imul($t,Vr)|0;it=it+Math.imul($t,Xr)|0;it=it+Math.imul(Vt,Vr)|0;nt=nt+Math.imul(Vt,Xr)|0;rt=rt+Math.imul(Lt,ei)|0;it=it+Math.imul(Lt,ti)|0;it=it+Math.imul(Ht,ei)|0;nt=nt+Math.imul(Ht,ti)|0;rt=rt+Math.imul(zt,ii)|0;it=it+Math.imul(zt,ni)|0;it=it+Math.imul(qt,ii)|0;nt=nt+Math.imul(qt,ni)|0;var Ii=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ii>>>26)|0;Ii&=67108863;rt=Math.imul(Xt,Vr);it=Math.imul(Xt,Xr);it=it+Math.imul(Jt,Vr)|0;nt=Math.imul(Jt,Xr);rt=rt+Math.imul($t,ei)|0;it=it+Math.imul($t,ti)|0;it=it+Math.imul(Vt,ei)|0;nt=nt+Math.imul(Vt,ti)|0;rt=rt+Math.imul(Lt,ii)|0;it=it+Math.imul(Lt,ni)|0;it=it+Math.imul(Ht,ii)|0;nt=nt+Math.imul(Ht,ni)|0;var Ui=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ui>>>26)|0;Ui&=67108863;rt=Math.imul(Xt,ei);it=Math.imul(Xt,ti);it=it+Math.imul(Jt,ei)|0;nt=Math.imul(Jt,ti);rt=rt+Math.imul($t,ii)|0;it=it+Math.imul($t,ni)|0;it=it+Math.imul(Vt,ii)|0;nt=nt+Math.imul(Vt,ni)|0;var Ni=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(Ni>>>26)|0;Ni&=67108863;rt=Math.imul(Xt,ii);it=Math.imul(Xt,ni);it=it+Math.imul(Jt,ii)|0;nt=Math.imul(Jt,ni);var zi=(tt+rt|0)+((it&8191)<<13)|0;tt=(nt+(it>>>13)|0)+(zi>>>26)|0;zi&=67108863;Ve[0]=oi;Ve[1]=ci;Ve[2]=hi;Ve[3]=li;Ve[4]=di;Ve[5]=pi;Ve[6]=yi;Ve[7]=mi;Ve[8]=bi;Ve[9]=Si;Ve[10]=Ei;Ve[11]=Mi;Ve[12]=Ci;Ve[13]=Ri;Ve[14]=Ki;Ve[15]=Ii;Ve[16]=Ui;Ve[17]=Ni;Ve[18]=zi;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 ze=0;var qe=0;for(var Ve=0;Ve<Ce.length-1;Ve++){var tt=qe;qe=0;var rt=ze&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;qe+=tt>>>26;tt&=67108863}Ce.words[Ve]=rt;ze=tt;tt=qe}if(ze!==0){Ce.words[Ve]=ze}else{Ce.length--}return Ce.strip()}function jumboMulTo(ke,Ae,Ce){var ze=new FFTM;return ze.mulp(ke,Ae,Ce)}BN.prototype.mulTo=function mulTo(ke,Ae){var Ce;var ze=this.length+ke.length;if(this.length===10&&ke.length===10){Ce=rt(this,ke,Ae)}else if(ze<63){Ce=smallMulTo(this,ke,Ae)}else if(ze<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 ze=0;ze<ke;ze++){Ae[ze]=this.revBin(ze,Ce,ke)}return Ae};FFTM.prototype.revBin=function revBin(ke,Ae,Ce){if(ke===0||ke===Ce-1)return ke;var ze=0;for(var qe=0;qe<Ae;qe++){ze|=(ke&1)<<Ae-qe-1;ke>>=1}return ze};FFTM.prototype.permute=function permute(ke,Ae,Ce,ze,qe,Ve){for(var tt=0;tt<Ve;tt++){ze[tt]=Ae[ke[tt]];qe[tt]=Ce[ke[tt]]}};FFTM.prototype.transform=function transform(ke,Ae,Ce,ze,qe,Ve){this.permute(Ve,ke,Ae,Ce,ze,qe);for(var tt=1;tt<qe;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<qe;ot+=rt){var ct=it;var ht=nt;for(var ft=0;ft<tt;ft++){var yt=Ce[ot+ft];var mt=ze[ot+ft];var kt=Ce[ot+ft+tt];var St=ze[ot+ft+tt];var Et=ct*kt-ht*St;St=ct*St+ht*kt;kt=Et;Ce[ot+ft]=yt+kt;ze[ot+ft]=mt+St;Ce[ot+ft+tt]=yt-kt;ze[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 ze=Ce&1;var qe=0;for(Ce=Ce/2|0;Ce;Ce=Ce>>>1){qe++}return 1<<qe+1+ze};FFTM.prototype.conjugate=function conjugate(ke,Ae,Ce){if(Ce<=1)return;for(var ze=0;ze<Ce/2;ze++){var qe=ke[ze];ke[ze]=ke[Ce-ze-1];ke[Ce-ze-1]=qe;qe=Ae[ze];Ae[ze]=-Ae[Ce-ze-1];Ae[Ce-ze-1]=-qe}};FFTM.prototype.normalize13b=function normalize13b(ke,Ae){var Ce=0;for(var ze=0;ze<Ae/2;ze++){var qe=Math.round(ke[2*ze+1]/Ae)*8192+Math.round(ke[2*ze]/Ae)+Ce;ke[ze]=qe&67108863;if(qe<67108864){Ce=0}else{Ce=qe/67108864|0}}return ke};FFTM.prototype.convert13b=function convert13b(ke,Ae,Ce,ze){var qe=0;for(var Ve=0;Ve<Ae;Ve++){qe=qe+(ke[Ve]|0);Ce[2*Ve]=qe&8191;qe=qe>>>13;Ce[2*Ve+1]=qe&8191;qe=qe>>>13}for(Ve=2*Ae;Ve<ze;++Ve){Ce[Ve]=0}assert(qe===0);assert((qe&~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 ze=2*this.guessLen13b(ke.length,Ae.length);var qe=this.makeRBT(ze);var Ve=this.stub(ze);var tt=new Array(ze);var rt=new Array(ze);var it=new Array(ze);var nt=new Array(ze);var ot=new Array(ze);var ct=new Array(ze);var ht=Ce.words;ht.length=ze;this.convert13b(ke.words,ke.length,tt,ze);this.convert13b(Ae.words,Ae.length,nt,ze);this.transform(tt,Ve,rt,it,ze,qe);this.transform(nt,Ve,ot,ct,ze,qe);for(var ft=0;ft<ze;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,ze);this.transform(rt,it,ht,Ve,ze,qe);this.conjugate(ht,Ve,ze);this.normalize13b(ht,ze);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 ze=(this.words[Ce]|0)*ke;var qe=(ze&67108863)+(Ae&67108863);Ae>>=26;Ae+=ze/67108864|0;Ae+=qe>>>26;this.words[Ce]=qe&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 ze=0;ze<Ae.length;ze++,Ce=Ce.sqr()){if(Ae[ze]!==0)break}if(++ze<Ae.length){for(var qe=Ce.sqr();ze<Ae.length;ze++,qe=qe.sqr()){if(Ae[ze]===0)continue;Ce=Ce.mul(qe)}}return Ce};BN.prototype.iushln=function iushln(ke){assert(typeof ke==="number"&&ke>=0);var Ae=ke%26;var Ce=(ke-Ae)/26;var ze=67108863>>>26-Ae<<26-Ae;var qe;if(Ae!==0){var Ve=0;for(qe=0;qe<this.length;qe++){var tt=this.words[qe]&ze;var rt=(this.words[qe]|0)-tt<<Ae;this.words[qe]=rt|Ve;Ve=tt>>>26-Ae}if(Ve){this.words[qe]=Ve;this.length++}}if(Ce!==0){for(qe=this.length-1;qe>=0;qe--){this.words[qe+Ce]=this.words[qe]}for(qe=0;qe<Ce;qe++){this.words[qe]=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 ze;if(Ae){ze=(Ae-Ae%26)/26}else{ze=0}var qe=ke%26;var Ve=Math.min((ke-qe)/26,this.length);var tt=67108863^67108863>>>qe<<qe;var rt=Ce;ze-=Ve;ze=Math.max(0,ze);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>=ze);it--){var ot=this.words[it]|0;this.words[it]=nt<<26-qe|ot>>>qe;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 ze=1<<Ae;if(this.length<=Ce)return false;var qe=this.words[Ce];return!!(qe&ze)};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 ze=67108863^67108863>>>Ae<<Ae;this.words[this.length-1]&=ze}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 ze=ke.length+Ce;var qe;this._expand(ze);var Ve;var tt=0;for(qe=0;qe<ke.length;qe++){Ve=(this.words[qe+Ce]|0)+tt;var rt=(ke.words[qe]|0)*Ae;Ve-=rt&67108863;tt=(Ve>>26)-(rt/67108864|0);this.words[qe+Ce]=Ve&67108863}for(;qe<this.length-Ce;qe++){Ve=(this.words[qe+Ce]|0)+tt;tt=Ve>>26;this.words[qe+Ce]=Ve&67108863}if(tt===0)return this.strip();assert(tt===-1);tt=0;for(qe=0;qe<this.length;qe++){Ve=-(this.words[qe]|0)+tt;tt=Ve>>26;this.words[qe]=Ve&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(ke,Ae){var Ce=this.length-ke.length;var ze=this.clone();var qe=ke;var Ve=qe.words[qe.length-1]|0;var tt=this._countBits(Ve);Ce=26-tt;if(Ce!==0){qe=qe.ushln(Ce);ze.iushln(Ce);Ve=qe.words[qe.length-1]|0}var rt=ze.length-qe.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=ze.clone()._ishlnsubmul(qe,1,rt);if(ot.negative===0){ze=ot;if(it){it.words[rt]=1}}for(var ct=rt-1;ct>=0;ct--){var ht=(ze.words[qe.length+ct]|0)*67108864+(ze.words[qe.length+ct-1]|0);ht=Math.min(ht/Ve|0,67108863);ze._ishlnsubmul(qe,ht,ct);while(ze.negative!==0){ht--;ze.negative=0;ze._ishlnsubmul(qe,1,ct);if(!ze.isZero()){ze.negative^=1}}if(it){it.words[ct]=ht}}if(it){it.strip()}ze.strip();if(Ae!=="div"&&Ce!==0){ze.iushrn(Ce)}return{div:it||null,mod:ze}};BN.prototype.divmod=function divmod(ke,Ae,Ce){assert(!ke.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var ze,qe,Ve;if(this.negative!==0&&ke.negative===0){Ve=this.neg().divmod(ke,Ae);if(Ae!=="mod"){ze=Ve.div.neg()}if(Ae!=="div"){qe=Ve.mod.neg();if(Ce&&qe.negative!==0){qe.iadd(ke)}}return{div:ze,mod:qe}}if(this.negative===0&&ke.negative!==0){Ve=this.divmod(ke.neg(),Ae);if(Ae!=="mod"){ze=Ve.div.neg()}return{div:ze,mod:Ve.mod}}if((this.negative&ke.negative)!==0){Ve=this.neg().divmod(ke.neg(),Ae);if(Ae!=="div"){qe=Ve.mod.neg();if(Ce&&qe.negative!==0){qe.isub(ke)}}return{div:Ve.div,mod:qe}}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 ze=ke.ushrn(1);var qe=ke.andln(1);var Ve=Ce.cmp(ze);if(Ve<0||qe===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 ze=this.length-1;ze>=0;ze--){Ce=(Ae*Ce+(this.words[ze]|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 ze=(this.words[Ce]|0)+Ae*67108864;this.words[Ce]=ze/ke|0;Ae=ze%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 ze=new BN(1);var qe=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(ze.isOdd()||qe.isOdd()){ze.iadd(it);qe.isub(nt)}ze.iushrn(1);qe.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);ze.isub(Ve);qe.isub(tt)}else{Ce.isub(Ae);Ve.isub(ze);tt.isub(qe)}}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 ze=new BN(1);var qe=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(ze.isOdd()){ze.iadd(Ve)}ze.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(qe.isOdd()){qe.iadd(Ve)}qe.iushrn(1)}}if(Ae.cmp(Ce)>=0){Ae.isub(Ce);ze.isub(qe)}else{Ce.isub(Ae);qe.isub(ze)}}var ot;if(Ae.cmpn(1)===0){ot=ze}else{ot=qe}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 ze=0;Ae.isEven()&&Ce.isEven();ze++){Ae.iushrn(1);Ce.iushrn(1)}do{while(Ae.isEven()){Ae.iushrn(1)}while(Ce.isEven()){Ce.iushrn(1)}var qe=Ae.cmp(Ce);if(qe<0){var Ve=Ae;Ae=Ce;Ce=Ve}else if(qe===0||Ce.cmpn(1)===0){break}Ae.isub(Ce)}while(true);return Ce.iushln(ze)};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 ze=1<<Ae;if(this.length<=Ce){this._expand(Ce+1);this.words[Ce]|=ze;return this}var qe=ze;for(var Ve=Ce;qe!==0&&Ve<this.length;Ve++){var tt=this.words[Ve]|0;tt+=qe;qe=tt>>>26;tt&=67108863;this.words[Ve]=tt}if(qe!==0){this.words[Ve]=qe;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 ze=this.words[0]|0;Ce=ze===ke?0:ze<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 ze=this.words[Ce]|0;var qe=ke.words[Ce]|0;if(ze===qe)continue;if(ze<qe){Ae=-1}else if(ze>qe){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 ze=Ce<this.n?-1:Ae.ucmp(this.p);if(ze===0){Ae.words[0]=0;Ae.length=1}else if(ze>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 ze=Math.min(ke.length,9);for(var qe=0;qe<ze;qe++){Ae.words[qe]=ke.words[qe]}Ae.length=ze;if(ke.length<=9){ke.words[0]=0;ke.length=1;return}var Ve=ke.words[9];Ae.words[Ae.length++]=Ve&Ce;for(qe=10;qe<ke.length;qe++){var tt=ke.words[qe]|0;ke.words[qe-10]=(tt&Ce)<<4|Ve>>>22;Ve=tt}Ve>>>=22;ke.words[qe-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 ze=ke.words[Ce]|0;Ae+=ze*977;ke.words[Ce]=Ae&67108863;Ae=ze*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 ze=(ke.words[Ce]|0)*19+Ae;var qe=ze&67108863;ze>>>=26;ke.words[Ce]=qe;Ae=ze}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 ze=this.m.subn(1);var qe=0;while(!ze.isZero()&&ze.andln(1)===0){qe++;ze.iushrn(1)}assert(!ze.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,ze);var ot=this.pow(ke,ze.addn(1).iushrn(1));var ct=this.pow(ke,ze);var ht=qe;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 ze=new Array(1<<Ce);ze[0]=new BN(1).toRed(this);ze[1]=ke;for(var qe=2;qe<ze.length;qe++){ze[qe]=this.mul(ze[qe-1],ke)}var Ve=ze[0];var tt=0;var rt=0;var it=Ae.bitLength()%26;if(it===0){it=26}for(qe=Ae.length-1;qe>=0;qe--){var nt=Ae.words[qe];for(var ot=it-1;ot>=0;ot--){var ct=nt>>ot&1;if(Ve!==ze[0]){Ve=this.sqr(Ve)}if(ct===0&&tt===0){rt=0;continue}tt<<=1;tt|=ct;rt++;if(rt!==Ce&&(qe!==0||ot!==0))continue;Ve=this.mul(Ve,ze[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 ze=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var qe=Ce.isub(ze).iushrn(this.shift);var Ve=qe;if(qe.cmp(this.m)>=0){Ve=qe.isub(this.m)}else if(qe.cmpn(0)<0){Ve=qe.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 ze=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var qe=Ce.isub(ze).iushrn(this.shift);var Ve=qe;if(qe.cmp(this.m)>=0){Ve=qe.isub(this.m)}else if(qe.cmpn(0)<0){Ve=qe.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 ze=Ce(3837);if(typeof ze.inherits!=="function")throw"";ke.exports=ze.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.2.0 - 2022-03-02 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */const ze="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Object.defineProperty(Ae,"__esModule",{value:!0});var qe=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(qe),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"),Bt=Symbol("doneWritingReject"),Dt=Symbol("readingIndex");class v extends Array{constructor(){super(),this[Et]=new Promise(((ke,Ae)=>{this[Pt]=ke,this[Bt]=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[Dt]&&(this[Dt]=0),{read:async()=>(await this[Et],this[Dt]===this.length?{value:void 0,done:!0}:{value:this[this[Dt]++],done:!1})}},v.prototype.readToEnd=async function(ke){await this[Et];const Ae=ke(this.slice(this[Dt]));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[Bt](ke),ke},k.prototype.releaseLock=function(){};const Rt="object"==typeof ze.process&&"object"==typeof ze.process.versions,Tt=Rt&&ht.default.Readable;function E(ke){return _(ke)?"array":ze.ReadableStream&&ze.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 ze=0;return ke.forEach((function(ke){Ce.set(ke,ze),ze+=ke.length})),Ce}const Kt=Rt&&ct.default.Buffer,It=Rt&&ht.default.Readable;let Ut,Ot;if(It){Ut=function(ke){let Ae=!1;return new Lt({start(Ce){ke.pause(),ke.on("data",(ze=>{Ae||(Kt.isBuffer(ze)&&(ze=new Uint8Array(ze.buffer,ze.byteOffset,ze.byteLength)),Ce.enqueue(ze),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 It{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,zt=Symbol("externalBuffer");function U(ke){if(this.stream=ke,ke[zt]&&(this[zt]=ke[zt].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=Ut(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){}}}U.prototype.read=async function(){if(this[zt]&&this[zt].length){return{done:!1,value:this[zt].shift()}}return this._read()},U.prototype.releaseLock=function(){this[zt]&&(this.stream[zt]=this[zt]),this._releaseLock()},U.prototype.cancel=function(ke){return this._cancel(ke)},U.prototype.readLine=async function(){let ke,Ae=[];for(;!ke;){let{done:Ce,value:ze}=await this.read();if(ze+="",Ce)return Ae.length?W(Ae):void 0;const qe=ze.indexOf("\n")+1;qe&&(ke=W(Ae.concat(ze.substr(0,qe))),Ae=[]),qe!==ze.length&&Ae.push(ze.substr(qe))}return this.unshift(...Ae),ke},U.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},U.prototype.readBytes=async function(ke){const Ae=[];let Ce=0;for(;;){const{done:ze,value:qe}=await this.read();if(ze)return Ae.length?W(Ae):void 0;if(Ae.push(qe),Ce+=qe.length,Ce>=ke){const Ce=W(Ae);return this.unshift(re(Ce,ke)),re(Ce,0,ke)}}},U.prototype.peekBytes=async function(ke){const Ae=await this.readBytes(ke);return this.unshift(Ae),Ae},U.prototype.unshift=function(...ke){this[zt]||(this[zt]=[]),1===ke.length&&P(ke[0])&&this[zt].length&&ke[0].length&&this[zt][0].byteOffset>=ke[0].length?this[zt][0]=new Uint8Array(this[zt][0].buffer,this[zt][0].byteOffset-ke[0].length,this[zt][0].byteLength+ke[0].length):this[zt].unshift(...ke.filter((ke=>ke&&ke.length)))},U.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 qt,Ft,{ReadableStream:Lt,WritableStream:Ht,TransformStream:Gt}=ze;async function F(){if(Gt)return;const[ke,Ae]=await Promise.all([Promise.resolve().then((function(){return Md})),Promise.resolve().then((function(){return Kd}))]);({ReadableStream:Lt,WritableStream:Ht,TransformStream:Gt}=ke);const{createReadableStreamWrapper:Ce}=Ae;ze.ReadableStream&&Lt!==ze.ReadableStream&&(qt=Ce(Lt),Ft=Ce(ze.ReadableStream))}const $t=Rt&&ct.default.Buffer;function j(ke){let Ae=E(ke);return"node"===Ae?Ut(ke):"web"===Ae&&qt?qt(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(ze.map((Ae=>ne(Ae,ke))))}));let Ce=Promise.resolve();const ze=ke.map(((ze,qe)=>X(ze,((ze,Ve)=>(Ce=Ce.then((()=>V(ze,Ae.writable,{preventClose:qe!==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(((ze,qe)=>(Ce=Ce.then((()=>V(ze,Ae,{preventClose:qe!==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 U(ke)}function G(ke){return new k(ke)}async function V(ke,Ae,{preventClose:Ce=!1,preventAbort:ze=!1,preventCancel:qe=!1}={}){if(E(ke)&&!_(ke)){ke=j(ke);try{if(ke[zt]){const Ce=G(Ae);for(let Ae=0;Ae<ke[zt].length;Ae++)await Ce.ready,await Ce.write(ke[zt][Ae]);Ce.releaseLock()}await ke.pipeTo(Ae,{preventClose:Ce,preventAbort:ze,preventCancel:qe})}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){ze||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,ze=!1;return{readable:new Lt({start(ke){Ce=ke},pull(){Ae?Ae():ze=!0},cancel:ke},{highWaterMark:0}),writable:new Ht({write:async function(ke){Ce.enqueue(ke),ze?ze=!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 ze=new v;return(async()=>{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;const it=G(ze);await it.write(rt),await it.close()})(),ze}if(E(ke))return $(ke,{async transform(ke,Ce){try{const ze=await Ae(ke);void 0!==ze&&Ce.enqueue(ze)}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 ze=Ae(ke),qe=Ce();return void 0!==ze&&void 0!==qe?W([ze,qe]):void 0!==ze?ze:qe}function X(ke,Ae){if(E(ke)&&!_(ke)){let Ce;const ze=new Gt({start(ke){Ce=ke}}),qe=V(ke,ze.writable),Ve=Z((async function(ke){Ce.error(ke),await qe,await new Promise(setTimeout)}));return Ae(ze.readable,Ve.writable),Ve.readable}ke=L(ke);const Ce=new v;return Ae(ke,Ce),Ce}function Q(ke,Ae){let Ce;const ze=X(ke,((ke,qe)=>{const Ve=H(ke);Ve.remainder=()=>(Ve.releaseLock(),V(ke,qe),ze),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][zt]=Ae[1][zt]=ke[zt],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 ze=H(ke),qe=G(Ce);try{for(;;){await qe.ready;const{done:Ce,value:Ve}=await ze.read();if(Ce){try{Ae.close()}catch(ke){}return void await qe.close()}try{Ae.enqueue(Ve)}catch(ke){}await qe.write(Ve)}}catch(ke){Ae.error(ke),await qe.abort(ke)}}));te(ke,Ce)}}):re(ke)}function te(ke,Ae){Object.entries(Object.getOwnPropertyDescriptors(ke.constructor.prototype)).forEach((([Ce,ze])=>{"constructor"!==Ce&&(ze.value?ze.value=ze.value.bind(Ae):ze.get=ze.get.bind(Ae),Object.defineProperty(ke,Ce,ze))}))}function re(ke,Ae=0,Ce=1/0){if(_(ke))throw Error("Not implemented");if(E(ke)){if(Ae>=0&&Ce>=0){let ze=0;return $(ke,{transform(ke,qe){ze<Ce?(ze+ke.length>=Ae&&qe.enqueue(re(ke,Math.max(Ae-ze,0),Ce-ze)),ze+=ke.length):qe.terminate()}})}if(Ae<0&&(Ce<0||Ce===1/0)){let ze=[];return Y(ke,(ke=>{ke.length>=-Ae?ze=[ke]:ze.push(ke)}),(()=>re(W(ze),Ae,Ce)))}if(0===Ae&&Ce<0){let ze;return Y(ke,(ke=>{const qe=ze?W([ze,ke]):ke;if(qe.length>=-Ce)return ze=re(qe,Ce),re(qe,Ae,Ce);ze=qe}))}return console.warn(`stream.slice(input, ${Ae}, ${Ce}) not implemented efficiently.`),ae((async()=>re(await ie(ke),Ae,Ce)))}return ke[zt]&&(ke=W(ke[zt].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 ze=Ae[ke].toString(16);Ce[ke]=Ae[ke]<=15?"0"+ze:ze}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,ze=this.value;ze%=Ae.value;let qe=BigInt(1);for(;Ce>BigInt(0);){const ke=Ce&BigInt(1);Ce>>=BigInt(1);const Ve=qe*ze%Ae.value;qe=ke?Ve:qe,ze=ze*ze%Ae.value}return new se(qe)}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),ze=BigInt(1),qe=BigInt(0),Ve=this.value;for(ke=ke.value;ke!==BigInt(0);){const tt=Ve/ke;let rt=Ae;Ae=ze-tt*Ae,ze=rt,rt=Ce,Ce=qe-tt*Ce,qe=rt,rt=ke,ke=Ve%ke,Ve=rt}return{x:new se(ze),y:new se(qe),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),ze=this.isNegative()?Ce:ke;let qe=1;const Ve=this.clone();for(;!Ve.irightShift(Ae).equal(ze);)qe++;return qe}byteLength(){const ke=new se(0),Ae=new se(-1),Ce=this.isNegative()?Ae:ke,ze=new se(8);let qe=1;const Ve=this.clone();for(;!Ve.irightShift(ze).equal(Ce);)qe++;return qe}toUint8Array(ke="be",Ae){let Ce=this.value.toString(16);Ce.length%2==1&&(Ce="0"+Ce);const ze=Ce.length/2,qe=new Uint8Array(Ae||ze),Ve=Ae?Ae-ze:0;let tt=0;for(;tt<ze;)qe[tt+Ve]=parseInt(Ce.slice(2*tt,2*tt+2),16),tt++;return"be"!==ke&&qe.reverse(),qe}}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 ze=0;ze<Ae;ze++)Ce[ze]=ke>>8*(Ae-ze-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),ze=Ae-ke.length;return Ce.set(ke,ze),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)),ze=new Uint8Array([(65280&Ae)>>8,255&Ae]);return Zt.concatUint8Array([ze,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 ze,qe=0;for(;qe<Ce;){for(ze=ke[qe++].toString(16);ze.length<2;)ze="0"+ze;Ae.push(""+ze)}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,ze=(ke=new Uint8Array(ke)).length;for(let qe=0;qe<ze;qe+=Ce)Ae.push(String.fromCharCode.apply(String,ke.subarray(qe,qe+Ce<ze?qe+Ce:ze)));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(ke)},printDebugError:function(ke){Vt&&console.error(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 ze=0;ze<Ce;ze++)Ae[ze]=ke[ze]<<1^ke[ze+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!==ze&&ze.crypto&&ze.crypto.subtle},detectNode:function(){return"object"==typeof ze.process&&"object"==typeof ze.process.versions},detectBigInt:()=>"undefined"!=typeof BigInt,getBigInteger:async function(){if(Zt.detectBigInt())return se;{const{default:ke}=await Promise.resolve().then((function(){return qd}));return ke}},getNodeCrypto:function(){return ft.default},getNodeZlib:function(){return yt.default},getNodeBuffer:function(){return(ct.default||{}).Buffer},getHardwareConcurrency:function(){if(Zt.detectNode()){return mt.default.cpus().length}return"undefined"!=typeof navigator&&navigator.hardwareConcurrency||1},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 ze=[];for(let Ae=0;Ce=ke.indexOf(10,Ae)+1,Ce;Ae=Ce)13!==ke[Ce-2]&&ze.push(Ce);if(!ze.length)return ke;const qe=new Uint8Array(ke.length+ze.length);let Ve=0;for(let Ae=0;Ae<ze.length;Ae++){const Ce=ke.subarray(ze[Ae-1]||0,ze[Ae]);qe.set(Ce,Ve),Ve+=Ce.length,qe[Ve-1]=13,qe[Ve]=10,Ve++}return qe.set(ke.subarray(ze[ze.length-1]||0),Ve),qe}),(()=>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 ze=0;for(let Ae=0;Ae!==ke.length;Ae=Ce){Ce=ke.indexOf(13,Ae)+1,Ce||(Ce=ke.length);const qe=Ce-(10===ke[Ce]?1:0);Ae&&ke.copyWithin(ze,Ae,qe),ze+=qe-Ae}return ke.subarray(0,ze)}),(()=>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]);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 ze;await Promise.all(ke.map((async ke=>{try{Ae(await ke)}catch(ke){ze=ke}}))),Ce(ze)}))},selectUint8Array:function(ke,Ae,Ce){const ze=Math.max(Ae.length,Ce.length),qe=new Uint8Array(ze);let Ve=0;for(let ze=0;ze<qe.length;ze++)qe[ze]=Ae[ze]&256-ke|Ce[ze]&255+ke,Ve+=ke&ze<Ae.length|1-ke&ze<Ce.length;return qe.subarray(0,Ve)},selectUint8:function(ke,Ae,Ce){return Ae&256-ke|Ce&255+ke}},Xt=Zt.getNodeBuffer();let Jt,Yt;function de(ke){let Ae=new Uint8Array;return Y(ke,(ke=>{Ae=Zt.concatUint8Array([Ae,ke]);const Ce=[],ze=Math.floor(Ae.length/45),qe=45*ze,Ve=Jt(Ae.subarray(0,qe));for(let ke=0;ke<ze;ke++)Ce.push(Ve.substr(60*ke,60)),Ce.push("\n");return Ae=Ae.subarray(qe),Ce.join("")}),(()=>Ae.length?Jt(Ae)+"\n":""))}function le(ke){let Ae="";return Y(ke,(ke=>{Ae+=ke;let Ce=0;const ze=[" ","\t","\r","\n"];for(let ke=0;ke<ze.length;ke++){const qe=ze[ke];for(let ke=Ae.indexOf(qe);-1!==ke;ke=Ae.indexOf(qe,ke+1))Ce++}let qe=Ae.length;for(;qe>0&&(qe-Ce)%4!=0;qe--)ze.includes(Ae[qe])&&Ce--;const Ve=Yt(Ae.substr(0,qe));return Ae=Ae.substr(qe),Ve}),(()=>Yt(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}Xt?(Jt=ke=>Xt.from(ke).toString("base64"),Yt=ke=>{const Ae=Xt.from(ke,"base64");return new Uint8Array(Ae.buffer,Ae.byteOffset,Ae.byteLength)}):(Jt=ke=>btoa(Zt.uint8ArrayToString(ke)),Yt=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.2.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,ze=new Uint32Array(ke.buffer,ke.byteOffset,Ce);for(let ke=0;ke<Ce;ke++)Ae^=ze[ke],Ae=rr[0][Ae>>24&255]^rr[1][Ae>>16&255]^rr[2][Ae>>8&255]^rr[3][Ae>>0&255];for(let ze=4*Ce;ze<ke.length;ze++)Ae=Ae>>8^rr[0][255&Ae^ke[ze]]}),(()=>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++){if(!/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(ke[Ae]))throw 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 ze=ke.lastIndexOf("=");return ze>=0&&ze!==ke.length-1&&(Ae=ke.slice(0,ze),Ce=ke.slice(ze+1).substr(0,4)),{body:Ae,checksum:Ce}}function Pe(ke,Ae=tr){return new Promise((async(Ce,ze)=>{try{const qe=/^-----[^-]+-----$/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||(qe.test(ke)?(ht=ht.join("\r\n"),nt=!0,Se(ct),ct=[],it=!1):ht.push(ke.replace(/^- /,"")));else if(qe.test(ke)&&ze(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 qe.test(ke)&&(tt=we(ke))}}catch(ke){return void ze(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(qe);if(1===Ae.length)throw Error("Misformed armored text");const ze=Ee(Ae[0].slice(0,-1));ot=ze.checksum,await mt.write(ze.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 ze=ie(_e(ee(ke)));ze.catch((()=>{})),await V(ke,Ce,{preventClose:!0});const qe=G(Ce);try{const ke=(await ze).replace("\n","");if(ot!==ke&&(ot||Ae.checksumRequired))throw Error("Ascii armor integrity check failed");await qe.ready,await qe.close()}catch(ke){await qe.abort(ke)}}))}catch(ke){ze(ke)}})).then((async ke=>(_(ke.data)&&(ke.data=await ie(ke.data)),ke)))}function xe(ke,Ae,Ce,ze,qe,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+"/"+ze+"-----\n"),nt.push(ve(qe,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP MESSAGE, PART "+Ce+"/"+ze+"-----\n");break;case er.armor.multipartLast:nt.push("-----BEGIN PGP MESSAGE, PART "+Ce+"-----\n"),nt.push(ve(qe,Ve)),nt.push(de(Ae)),nt.push("=",_e(it)),nt.push("-----END PGP MESSAGE, PART "+Ce+"-----\n");break;case er.armor.signed:nt.push("\n-----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(qe,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(qe,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(qe,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(qe,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(qe,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,ze){var qe=ke[(Ae[Ce]+Ae[ze])%255];return 0!==Ce&&0!==ze||(qe=0),qe}var ze,qe,Ve,tt,rt=!1;function u(){function u(Ce){var ze,qe,Ve;for(qe=Ve=function(Ce){var ze=ke[255-Ae[Ce]];return 0===Ce&&(ze=0),ze}(Ce),ze=0;ze<4;ze++)Ve^=qe=255&(qe<<1|qe>>>7);return Ve^=99}Ce||function(){ke=[],Ae=[];var ze,qe,Ve=1;for(ze=0;ze<255;ze++)ke[ze]=Ve,qe=128&Ve,Ve<<=1,Ve&=255,128===qe&&(Ve^=27),Ve^=ke[ze],Ae[ke[ze]]=ze;ke[255]=ke[0],Ae[0]=0,Ce=!0}(),ze=[],qe=[],Ve=[[],[],[],[]],tt=[[],[],[],[]];for(var it=0;it<256;it++){var nt=u(it);ze[it]=nt,qe[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(ze,512),Ce.set(qe,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 ze=0,qe=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,Bt=0,Dt=0,Rt=0,Tt=0;var Kt=new ke.Uint32Array(Ce),It=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^Kt[(ke|0)>>2],nt=nt^Kt[(ke|4)>>2],ot=ot^Kt[(ke|8)>>2],ct=ct^Kt[(ke|12)>>2];for(Pt=16;(Pt|0)<=rt<<4;Pt=Pt+16|0){mt=Kt[(Ce|it>>22&1020)>>2]^Kt[(ht|nt>>14&1020)>>2]^Kt[(ft|ot>>6&1020)>>2]^Kt[(yt|ct<<2&1020)>>2]^Kt[(ke|Pt|0)>>2],kt=Kt[(Ce|nt>>22&1020)>>2]^Kt[(ht|ot>>14&1020)>>2]^Kt[(ft|ct>>6&1020)>>2]^Kt[(yt|it<<2&1020)>>2]^Kt[(ke|Pt|4)>>2],St=Kt[(Ce|ot>>22&1020)>>2]^Kt[(ht|ct>>14&1020)>>2]^Kt[(ft|it>>6&1020)>>2]^Kt[(yt|nt<<2&1020)>>2]^Kt[(ke|Pt|8)>>2],Et=Kt[(Ce|ct>>22&1020)>>2]^Kt[(ht|it>>14&1020)>>2]^Kt[(ft|nt>>6&1020)>>2]^Kt[(yt|ot<<2&1020)>>2]^Kt[(ke|Pt|12)>>2];it=mt,nt=kt,ot=St,ct=Et}ze=Kt[(Ae|it>>22&1020)>>2]<<24^Kt[(Ae|nt>>14&1020)>>2]<<16^Kt[(Ae|ot>>6&1020)>>2]<<8^Kt[(Ae|ct<<2&1020)>>2]^Kt[(ke|Pt|0)>>2],qe=Kt[(Ae|nt>>22&1020)>>2]<<24^Kt[(Ae|ot>>14&1020)>>2]<<16^Kt[(Ae|ct>>6&1020)>>2]<<8^Kt[(Ae|it<<2&1020)>>2]^Kt[(ke|Pt|4)>>2],Ve=Kt[(Ae|ot>>22&1020)>>2]<<24^Kt[(Ae|ct>>14&1020)>>2]<<16^Kt[(Ae|it>>6&1020)>>2]<<8^Kt[(Ae|nt<<2&1020)>>2]^Kt[(ke|Pt|8)>>2],tt=Kt[(Ae|ct>>22&1020)>>2]<<24^Kt[(Ae|it>>14&1020)>>2]<<16^Kt[(Ae|nt>>6&1020)>>2]<<8^Kt[(Ae|ot<<2&1020)>>2]^Kt[(ke|Pt|12)>>2]}function x(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;P(0x0000,0x0800,0x1000,Tt,ke,Ae,Ce,ze)}function M(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;var Ve=0;P(0x0400,0x0c00,0x2000,Tt,ke,ze,Ce,Ae);Ve=qe,qe=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=ze,it=qe,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=qe,qe=tt,tt=ht;ze=ze^rt,qe=qe^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=ze=ze^ke,it=qe=qe^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);ze=ze^ke,qe=qe^Ae,Ve=Ve^Ce,tt=tt^ct;rt=ke,it=Ae,nt=Ce,ot=ct}function I(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=ze,it=qe,nt=Ve,ot=tt;ze=ze^ke,qe=qe^Ae,Ve=Ve^Ce,tt=tt^ct}function U(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);ze=ze^ke;qe=qe^Ae;Ve=Ve^Ce;tt=tt^rt}function B(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;var qe=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,ze=ze^ot;qe=Pt|0,Ve=Bt|0,tt=Dt|0,ct=Rt|0;for(;(kt|0)<128;kt=kt+1|0){if(qe>>>31){ht=ht^ke,ft=ft^Ae,yt=yt^Ce,mt=mt^ze}qe=qe<<1|Ve>>>31,Ve=Ve<<1|tt>>>31,tt=tt<<1|ct>>>31,ct=ct<<1;St=ze&1;ze=ze>>>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;ze=ke,qe=Ae,Ve=Ce,tt=rt}function q(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;rt=ke,it=Ae,nt=Ce,ot=ze}function O(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;ct=ke,ht=Ae,ft=Ce,yt=ze}function F(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;mt=ke,kt=Ae,St=Ce,Et=ze}function N(ke,Ae,Ce,ze){ke=ke|0;Ae=Ae|0;Ce=Ce|0;ze=ze|0;yt=~Et&yt|Et&ze,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;It[ke|0]=ze>>>24,It[ke|1]=ze>>>16&255,It[ke|2]=ze>>>8&255,It[ke|3]=ze&255,It[ke|4]=qe>>>24,It[ke|5]=qe>>>16&255,It[ke|6]=qe>>>8&255,It[ke|7]=qe&255,It[ke|8]=Ve>>>24,It[ke|9]=Ve>>>16&255,It[ke|10]=Ve>>>8&255,It[ke|11]=Ve&255,It[ke|12]=tt>>>24,It[ke|13]=tt>>>16&255,It[ke|14]=tt>>>8&255,It[ke|15]=tt&255;return 16}function L(ke){ke=ke|0;if(ke&15)return-1;It[ke|0]=rt>>>24,It[ke|1]=rt>>>16&255,It[ke|2]=rt>>>8&255,It[ke|3]=rt&255,It[ke|4]=it>>>24,It[ke|5]=it>>>16&255,It[ke|6]=it>>>8&255,It[ke|7]=it&255,It[ke|8]=nt>>>24,It[ke|9]=nt>>>16&255,It[ke|10]=nt>>>8&255,It[ke|11]=nt&255,It[ke|12]=ot>>>24,It[ke|13]=ot>>>16&255,It[ke|14]=ot>>>8&255,It[ke|15]=ot&255;return 16}function W(){x(0,0,0,0);Pt=ze,Bt=qe,Dt=Ve,Rt=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){Ut[ke&7](It[Ae|0]<<24|It[Ae|1]<<16|It[Ae|2]<<8|It[Ae|3],It[Ae|4]<<24|It[Ae|5]<<16|It[Ae|6]<<8|It[Ae|7],It[Ae|8]<<24|It[Ae|9]<<16|It[Ae|10]<<8|It[Ae|11],It[Ae|12]<<24|It[Ae|13]<<16|It[Ae|14]<<8|It[Ae|15]);It[Ae|0]=ze>>>24,It[Ae|1]=ze>>>16&255,It[Ae|2]=ze>>>8&255,It[Ae|3]=ze&255,It[Ae|4]=qe>>>24,It[Ae|5]=qe>>>16&255,It[Ae|6]=qe>>>8&255,It[Ae|7]=qe&255,It[Ae|8]=Ve>>>24,It[Ae|9]=Ve>>>16&255,It[Ae|10]=Ve>>>8&255,It[Ae|11]=Ve&255,It[Ae|12]=tt>>>24,It[Ae|13]=tt>>>16&255,It[Ae|14]=tt>>>8&255,It[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 ze=0;if(Ae&15)return-1;while((Ce|0)>=16){Ot[ke&1](It[Ae|0]<<24|It[Ae|1]<<16|It[Ae|2]<<8|It[Ae|3],It[Ae|4]<<24|It[Ae|5]<<16|It[Ae|6]<<8|It[Ae|7],It[Ae|8]<<24|It[Ae|9]<<16|It[Ae|10]<<8|It[Ae|11],It[Ae|12]<<24|It[Ae|13]<<16|It[Ae|14]<<8|It[Ae|15]);ze=ze+16|0,Ae=Ae+16|0,Ce=Ce-16|0}return ze|0}var Ut=[x,M,C,K,D,R,I,U];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,qe,Ve,rt,it,ot,ct,ht){var ft=Ce.subarray(0,60),yt=Ce.subarray(256,316);ft.set([Ae,qe,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=ze[St>>>24]<<24^ze[St>>>16&255]<<16^ze[St>>>8&255]<<8^ze[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][ze[St>>>24]]^tt[1][ze[St>>>16&255]]^tt[2][ze[St>>>8&255]]^tt[3][ze[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,ze,qe){const Ve=ke.length-Ae,tt=Ve<qe?Ve:qe;return ke.set(Ce.subarray(ze,ze+tt),Ae),tt}function Ie(...ke){const Ae=ke.reduce(((ke,Ae)=>ke+Ae.length),0),Ce=new Uint8Array(Ae);let ze=0;for(let Ae=0;Ae<ke.length;Ae++)Ce.set(ke[Ae],ze),ze+=ke[Ae].length;return Ce}class Ue 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,ze,qe,Ve){this.pos=0,this.len=0,this.mode=ze,this.pos=0,this.len=0,this.key=ke,this.iv=Ae,this.padding=Ce,this.acquire_asm(qe,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(),ze=ke.length;if(16!==ze&&24!==ze&&32!==ze)throw new Be("illegal key size");const qe=new DataView(ke.buffer,ke.byteOffset,ke.byteLength);if(Ce.set_key(ze>>2,qe.getUint32(0),qe.getUint32(4),qe.getUint32(8),qe.getUint32(12),ze>16?qe.getUint32(16):0,ze>16?qe.getUint32(20):0,ze>24?qe.getUint32(24):0,ze>24?qe.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(),ze=nr.ENC[this.mode],qe=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(ze,qe+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],ze=nr.HEAP_DATA,qe=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[qe+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,ze+qe,Ve),rt&&it.set(ke.subarray(qe,qe+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(),ze=nr.DEC[this.mode],qe=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(ze,qe+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],ze=nr.HEAP_DATA,qe=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,ze+qe,Ve),this.hasOwnProperty("padding")&&this.padding){let Ae=ke[qe+tt-1];if(Ae<1||Ae>16||Ae>tt)throw new Te("bad padding");let Ce=0;for(let ze=Ae;ze>1;ze--)Ce|=Ae^ke[qe+tt-ze];if(Ce)throw new Te("bad padding");tt-=Ae}}const rt=new Uint8Array(tt);return tt>0&&rt.set(ke.subarray(qe,qe+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 Ie(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ie(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,ze,qe,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,Bt,Dt,Rt,Tt,Kt,It,Ut,Ot,Nt=0,zt=Ae.length;const qt=32===ke.length?3:9;Dt=3===qt?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&&(zt=(Ae=function(ke,Ae){const Ce=8-ke.length%8;let ze;if(2===Ae&&Ce<8)ze=32;else if(1===Ae)ze=Ce;else{if(Ae||!(Ce<8)){if(8===Ce)return ke;throw Error("des: invalid padding")}ze=0}const qe=new Uint8Array(ke.length+Ce);for(let Ae=0;Ae<ke.length;Ae++)qe[Ae]=ke[Ae];for(let Ae=0;Ae<Ce;Ae++)qe[ke.length+Ae]=ze;return qe}(Ae,Ve)).length);let Ft=new Uint8Array(zt),Lt=0;for(1===ze&&(Rt=qe[Nt++]<<24|qe[Nt++]<<16|qe[Nt++]<<8|qe[Nt++],Kt=qe[Nt++]<<24|qe[Nt++]<<16|qe[Nt++]<<8|qe[Nt++],Nt=0);Nt<zt;){for(Pt=Ae[Nt++]<<24|Ae[Nt++]<<16|Ae[Nt++]<<8|Ae[Nt++],Bt=Ae[Nt++]<<24|Ae[Nt++]<<16|Ae[Nt++]<<8|Ae[Nt++],1===ze&&(Ce?(Pt^=Rt,Bt^=Kt):(Tt=Rt,It=Kt,Rt=Pt,Kt=Bt)),kt=252645135&(Pt>>>4^Bt),Bt^=kt,Pt^=kt<<4,kt=65535&(Pt>>>16^Bt),Bt^=kt,Pt^=kt<<16,kt=858993459&(Bt>>>2^Pt),Pt^=kt,Bt^=kt<<2,kt=16711935&(Bt>>>8^Pt),Pt^=kt,Bt^=kt<<8,kt=1431655765&(Pt>>>1^Bt),Bt^=kt,Pt^=kt<<1,Pt=Pt<<1|Pt>>>31,Bt=Bt<<1|Bt>>>31,mt=0;mt<qt;mt+=3){for(Ut=Dt[mt+1],Ot=Dt[mt+2],yt=Dt[mt];yt!==Ut;yt+=Ot)St=Bt^ke[yt],Et=(Bt>>>4|Bt<<28)^ke[yt+1],kt=Pt,Pt=Bt,Bt=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=Bt,Bt=kt}Pt=Pt>>>1|Pt<<31,Bt=Bt>>>1|Bt<<31,kt=1431655765&(Pt>>>1^Bt),Bt^=kt,Pt^=kt<<1,kt=16711935&(Bt>>>8^Pt),Pt^=kt,Bt^=kt<<8,kt=858993459&(Bt>>>2^Pt),Pt^=kt,Bt^=kt<<2,kt=65535&(Pt>>>16^Bt),Bt^=kt,Pt^=kt<<16,kt=252645135&(Pt>>>4^Bt),Bt^=kt,Pt^=kt<<4,1===ze&&(Ce?(Rt=Pt,Kt=Bt):(Pt^=Tt,Bt^=It)),Ft[Lt++]=Pt>>>24,Ft[Lt++]=Pt>>>16&255,Ft[Lt++]=Pt>>>8&255,Ft[Lt++]=255&Pt,Ft[Lt++]=Bt>>>24,Ft[Lt++]=Bt>>>16&255,Ft[Lt++]=Bt>>>8&255,Ft[Lt++]=255&Bt}return Ce||(Ft=function(ke,Ae){let Ce,ze=null;if(2===Ae)Ce=32;else if(1===Ae)ze=ke[ke.length-1];else{if(Ae)throw Error("des: invalid padding");Ce=0}if(!ze){for(ze=1;ke[ke.length-ze]===Ce;)ze++;ze--}return ke.subarray(0,ke.length-ze)}(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],ze=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],qe=[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,Bt,Dt=0,Rt=0;for(let Tt=0;Tt<mt;Tt++){let mt=ke[Dt++]<<24|ke[Dt++]<<16|ke[Dt++]<<8|ke[Dt++],Tt=ke[Dt++]<<24|ke[Dt++]<<16|ke[Dt++]<<8|ke[Dt++];Bt=252645135&(mt>>>4^Tt),Tt^=Bt,mt^=Bt<<4,Bt=65535&(Tt>>>-16^mt),mt^=Bt,Tt^=Bt<<-16,Bt=858993459&(mt>>>2^Tt),Tt^=Bt,mt^=Bt<<2,Bt=65535&(Tt>>>-16^mt),mt^=Bt,Tt^=Bt<<-16,Bt=1431655765&(mt>>>1^Tt),Tt^=Bt,mt^=Bt<<1,Bt=16711935&(Tt>>>8^mt),mt^=Bt,Tt^=Bt<<8,Bt=1431655765&(mt>>>1^Tt),Tt^=Bt,mt^=Bt<<1,Bt=mt<<8|Tt>>>20&240,mt=Tt<<24|Tt<<8&16711680|Tt>>>8&65280|Tt>>>24&240,Tt=Bt;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]|ze[mt>>>20&15]|qe[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],Bt=65535&(Pt>>>16^Et),kt[Rt++]=Et^Bt,kt[Rt++]=Pt^Bt<<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 ze,qe=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];ze=Ve,Ve=qe^r(Ve,this.masking[0],this.rotate[0]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[1],this.rotate[1]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[2],this.rotate[2]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[3],this.rotate[3]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[4],this.rotate[4]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[5],this.rotate[5]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[6],this.rotate[6]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[7],this.rotate[7]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[8],this.rotate[8]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[9],this.rotate[9]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[10],this.rotate[10]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[11],this.rotate[11]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[12],this.rotate[12]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[13],this.rotate[13]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[14],this.rotate[14]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[15],this.rotate[15]),qe=ze,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]=qe>>>24&255,Ae[Ce+5]=qe>>>16&255,Ae[Ce+6]=qe>>>8&255,Ae[Ce+7]=255&qe}return Ae},this.decrypt=function(ke){const Ae=Array(ke.length);for(let Ce=0;Ce<ke.length;Ce+=8){let ze,qe=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];ze=Ve,Ve=qe^r(Ve,this.masking[15],this.rotate[15]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[14],this.rotate[14]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[13],this.rotate[13]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[12],this.rotate[12]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[11],this.rotate[11]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[10],this.rotate[10]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[9],this.rotate[9]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[8],this.rotate[8]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[7],this.rotate[7]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[6],this.rotate[6]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[5],this.rotate[5]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[4],this.rotate[4]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[3],this.rotate[3]),qe=ze,ze=Ve,Ve=qe^n(Ve,this.masking[2],this.rotate[2]),qe=ze,ze=Ve,Ve=qe^i(Ve,this.masking[1],this.rotate[1]),qe=ze,ze=Ve,Ve=qe^r(Ve,this.masking[0],this.rotate[0]),qe=ze,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]=qe>>>24&255,Ae[Ce+5]=qe>>16&255,Ae[Ce+6]=qe>>8&255,Ae[Ce+7]=255&qe}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,ze){const qe=Ae+ke,Ve=qe<<ze|qe>>>32-ze;return(Ce[0][Ve>>>24]^Ce[1][Ve>>>16&255])-Ce[2][Ve>>>8&255]+Ce[3][255&Ve]}function i(ke,Ae,ze){const qe=Ae^ke,Ve=qe<<ze|qe>>>32-ze;return Ce[0][Ve>>>24]-Ce[1][Ve>>>16&255]+Ce[2][Ve>>>8&255]^Ce[3][255&Ve]}function n(ke,Ae,ze){const qe=Ae-ke,Ve=qe<<ze|qe>>>32-ze;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(ze){const qe=[,,,,,,,,],Ve=Array(32);let tt;for(let ke=0;ke<4;ke++)tt=4*ke,qe[ke]=ze[tt]<<24|ze[tt+1]<<16|ze[tt+2]<<8|ze[tt+3];const rt=[6,7,4,5];let it,nt=0;for(let ze=0;ze<2;ze++)for(let ze=0;ze<4;ze++){for(tt=0;tt<4;tt++){const Ae=ke[ze][tt];it=qe[Ae[1]],it^=Ce[4][qe[Ae[2]>>>2]>>>24-8*(3&Ae[2])&255],it^=Ce[5][qe[Ae[3]>>>2]>>>24-8*(3&Ae[3])&255],it^=Ce[6][qe[Ae[4]>>>2]>>>24-8*(3&Ae[4])&255],it^=Ce[7][qe[Ae[5]>>>2]>>>24-8*(3&Ae[5])&255],it^=Ce[rt[tt]][qe[Ae[6]>>>2]>>>24-8*(3&Ae[6])&255],qe[Ae[0]]=it}for(tt=0;tt<4;tt++){const ke=Ae[ze][tt];it=Ce[4][qe[ke[0]>>>2]>>>24-8*(3&ke[0])&255],it^=Ce[5][qe[ke[1]>>>2]>>>24-8*(3&ke[1])&255],it^=Ce[6][qe[ke[2]>>>2]>>>24-8*(3&ke[2])&255],it^=Ce[7][qe[ke[3]>>>2]>>>24-8*(3&ke[3])&255],it^=Ce[4+tt][qe[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,ze=[],qe=[[],[],[],[]];function a(ke){return qe[0][Xe(ke,0)]^qe[1][Xe(ke,1)]^qe[2][Xe(ke,2)]^qe[3][Xe(ke,3)]}function s(ke){return qe[0][Xe(ke,3)]^qe[1][Xe(ke,0)]^qe[2][Xe(ke,1)]^qe[3][Xe(ke,2)]}function o(ke,Ae){let Ce=a(Ae[0]),qe=s(Ae[1]);Ae[2]=$e(Ae[2]^Ce+qe+ze[4*ke+8]&_r,31),Ae[3]=$e(Ae[3],1)^Ce+2*qe+ze[4*ke+9]&_r,Ce=a(Ae[2]),qe=s(Ae[3]),Ae[0]=$e(Ae[0]^Ce+qe+ze[4*ke+10]&_r,31),Ae[1]=$e(Ae[1],1)^Ce+2*qe+ze[4*ke+11]&_r}function c(ke,Ae){let Ce=a(Ae[0]),qe=s(Ae[1]);Ae[2]=$e(Ae[2],1)^Ce+qe+ze[4*ke+10]&_r,Ae[3]=$e(Ae[3]^Ce+2*qe+ze[4*ke+11]&_r,31),Ce=a(Ae[2]),qe=s(Ae[3]),Ae[0]=$e(Ae[0],1)^Ce+qe+ze[4*ke+8]&_r,Ae[1]=$e(Ae[1]^Ce+2*qe+ze[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]],Bt=[[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]],Dt=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],Rt=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],Tt=[[],[]],Kt=[[],[],[],[]];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,ze,qe;for(Ce=0;Ce<8;Ce++)ze=Ae>>>24,Ae=Ae<<8&_r|ke>>>24,ke=ke<<8&_r,qe=ze<<1,128&ze&&(qe^=333),Ae^=ze^qe<<16,qe^=ze>>>1,1&ze&&(qe^=166),Ae^=qe<<24|qe<<8;return Ae}function M(ke,Ae){const Ce=Ae>>4,ze=15&Ae,qe=St[ke][Ce^ze],Ve=Et[ke][Dt[ze]^Rt[Ce]];return Bt[ke][Dt[Ve]^Rt[qe]]<<4|Pt[ke][qe^Ve]}function C(ke,Ae){let Ce=Xe(ke,0),ze=Xe(ke,1),qe=Xe(ke,2),Ve=Xe(ke,3);switch(ht){case 4:Ce=Tt[1][Ce]^Xe(Ae[3],0),ze=Tt[0][ze]^Xe(Ae[3],1),qe=Tt[0][qe]^Xe(Ae[3],2),Ve=Tt[1][Ve]^Xe(Ae[3],3);case 3:Ce=Tt[1][Ce]^Xe(Ae[2],0),ze=Tt[1][ze]^Xe(Ae[2],1),qe=Tt[0][qe]^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),ze=Tt[0][Tt[1][ze]^Xe(Ae[1],1)]^Xe(Ae[0],1),qe=Tt[1][Tt[0][qe]^Xe(Ae[1],2)]^Xe(Ae[0],2),Ve=Tt[1][Tt[1][Ve]^Xe(Ae[1],3)]^Xe(Ae[0],3)}return Kt[0][Ce]^Kt[1][ze]^Kt[2][qe]^Kt[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),Kt[0][Ce]=yt+(mt<<8)+(kt<<16)+(kt<<24),Kt[2][Ce]=mt+(kt<<8)+(yt<<16)+(kt<<24),yt=Tt[0][Ce],mt=E(yt),kt=P(yt),Kt[1][Ce]=kt+(kt<<8)+(mt<<16)+(yt<<24),Kt[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),ze[Ce]=Ve+tt&_r,ze[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:qe[0][Ce]=Kt[0][Tt[0][Tt[0][Ve]^Xe(ft[1],0)]^Xe(ft[0],0)],qe[1][Ce]=Kt[1][Tt[0][Tt[1][tt]^Xe(ft[1],1)]^Xe(ft[0],1)],qe[2][Ce]=Kt[2][Tt[1][Tt[0][rt]^Xe(ft[1],2)]^Xe(ft[0],2)],qe[3][Ce]=Kt[3][Tt[1][Tt[1][it]^Xe(ft[1],3)]^Xe(ft[0],3)]}},close:function(){ze=[],qe=[[],[],[],[]]},encrypt:function(ke,qe){Ae=ke,Ce=qe;const Ve=[Ze(Ae,Ce)^ze[0],Ze(Ae,Ce+4)^ze[1],Ze(Ae,Ce+8)^ze[2],Ze(Ae,Ce+12)^ze[3]];for(let ke=0;ke<8;ke++)o(ke,Ve);return Ye(Ae,Ce,Ve[2]^ze[4]),Ye(Ae,Ce+4,Ve[3]^ze[5]),Ye(Ae,Ce+8,Ve[0]^ze[6]),Ye(Ae,Ce+12,Ve[1]^ze[7]),Ce+=16,Ae},decrypt:function(ke,qe){Ae=ke,Ce=qe;const Ve=[Ze(Ae,Ce)^ze[4],Ze(Ae,Ce+4)^ze[5],Ze(Ae,Ce+8)^ze[6],Ze(Ae,Ce+12)^ze[7]];for(let ke=7;ke>=0;ke--)c(ke,Ve);Ye(Ae,Ce,Ve[2]^ze[0]),Ye(Ae,Ce+4,Ve[3]^ze[1]),Ye(Ae,Ce+8,Ve[0]^ze[2]),Ye(Ae,Ce+12,Ve[1]^ze[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,ze=255&(ke>>>=8),qe=255&(ke>>>=8),Ve=255&(ke>>>=8);return Ae=this.sboxes[0][Ve]+this.sboxes[1][qe],Ae^=this.sboxes[2][ze],Ae+=this.sboxes[3][Ce],Ae},Je.prototype._encryptBlock=function(ke){let Ae,Ce=ke[0],ze=ke[1];for(Ae=0;Ae<this.NN;++Ae){Ce^=this.parray[Ae],ze=this._F(Ce)^ze;const ke=Ce;Ce=ze,ze=ke}Ce^=this.parray[this.NN+0],ze^=this.parray[this.NN+1],ke[0]=this._clean(ze),ke[1]=this._clean(Ce)},Je.prototype.encryptBlock=function(ke){let Ae;const Ce=[0,0],ze=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+ze];this._encryptBlock(Ce);const qe=[];for(Ae=0;Ae<this.BLOCKSIZE/2;++Ae)qe[Ae+0]=Ce[0]>>>24-8*Ae&255,qe[Ae+ze]=Ce[1]>>>24-8*Ae&255;return qe},Je.prototype._decryptBlock=function(ke){let Ae,Ce=ke[0],ze=ke[1];for(Ae=this.NN+1;Ae>1;--Ae){Ce^=this.parray[Ae],ze=this._F(Ce)^ze;const ke=Ce;Ce=ze,ze=ke}Ce^=this.parray[1],ze^=this.parray[0],ke[0]=this._clean(ze),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 ze=0;for(let Ae=0;Ae<4;++Ae)ze=ze<<8|255&ke[Ce],++Ce>=ke.length&&(Ce=0);this.parray[Ae]=this.PARRAY[Ae]^ze}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 ze=[0,0];for(Ae=0;Ae<this.NN+2;Ae+=2)this._encryptBlock(ze),this.parray[Ae+0]=ze[0],this.parray[Ae+1]=ze[1];for(Ae=0;Ae<4;++Ae)for(Ce=0;Ce<256;Ce+=2)this._encryptBlock(ze),this.sboxes[Ae][Ce+0]=ze[0],this.sboxes[Ae][Ce+1]=ze[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 ze=0,qe=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 Bt=new ke.Uint8Array(Ce);function _(ke,Ae,Ce,it,nt,ot,ct,ht,ft,yt,mt,kt,St,Et,Pt,Bt){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;Bt=Bt|0;var Dt=0,Rt=0,Tt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,zt=0,qt=0,Ft=0,Lt=0,Ht=0,Gt=0,$t=0,Vt=0,Zt=0,Xt=0,Jt=0,Yt=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,Br=0,Dr=0,Rr=0,Ir=0,Ur=0,Lr=0,Gr=0,Vr=0,Xr=0,Qr=0,ei=0,ti=0,ri=0,ii=0,ni=0,oi=0,ci=0,hi=0,li=0,di=0,pi=0,yi=0,mi=0,bi=0,Si=0,Ei=0,Mi=0,Ci=0,Ri=0,Ki=0,Ii=0,Ui=0,Ni=0,zi=0,qi=0,ji=0,Gi=0;Dt=ze;Rt=qe;Tt=Ve;Kt=tt;It=rt;Ot=ke+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=Ae+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=Ce+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=it+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=nt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=ot+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=ct+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=ht+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=ft+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=yt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=mt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=kt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=St+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=Et+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=Pt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ot=Bt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Et^ft^Ce^ke;Nt=Ut<<1|Ut>>>31;Ot=Nt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Pt^yt^it^Ae;zt=Ut<<1|Ut>>>31;Ot=zt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Bt^mt^nt^Ce;qt=Ut<<1|Ut>>>31;Ot=qt+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Nt^kt^ot^it;Ft=Ut<<1|Ut>>>31;Ot=Ft+(Dt<<5|Dt>>>27)+It+(Rt&Tt|~Rt&Kt)+0x5a827999|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=zt^St^ct^nt;Lt=Ut<<1|Ut>>>31;Ot=Lt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=qt^Et^ht^ot;Ht=Ut<<1|Ut>>>31;Ot=Ht+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ft^Pt^ft^ct;Gt=Ut<<1|Ut>>>31;Ot=Gt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Lt^Bt^yt^ht;$t=Ut<<1|Ut>>>31;Ot=$t+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ht^Nt^mt^ft;Vt=Ut<<1|Ut>>>31;Ot=Vt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Gt^zt^kt^yt;Zt=Ut<<1|Ut>>>31;Ot=Zt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=$t^qt^St^mt;Xt=Ut<<1|Ut>>>31;Ot=Xt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Vt^Ft^Et^kt;Jt=Ut<<1|Ut>>>31;Ot=Jt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Zt^Lt^Pt^St;Yt=Ut<<1|Ut>>>31;Ot=Yt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Xt^Ht^Bt^Et;Qt=Ut<<1|Ut>>>31;Ot=Qt+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Jt^Gt^Nt^Pt;er=Ut<<1|Ut>>>31;Ot=er+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Yt^$t^zt^Bt;tr=Ut<<1|Ut>>>31;Ot=tr+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Qt^Vt^qt^Nt;rr=Ut<<1|Ut>>>31;Ot=rr+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=er^Zt^Ft^zt;ir=Ut<<1|Ut>>>31;Ot=ir+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=tr^Xt^Lt^qt;nr=Ut<<1|Ut>>>31;Ot=nr+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=rr^Jt^Ht^Ft;sr=Ut<<1|Ut>>>31;Ot=sr+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ir^Yt^Gt^Lt;vr=Ut<<1|Ut>>>31;Ot=vr+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=nr^Qt^$t^Ht;_r=Ut<<1|Ut>>>31;Ot=_r+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=sr^er^Vt^Gt;kr=Ut<<1|Ut>>>31;Ot=kr+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=vr^tr^Zt^$t;Ar=Ut<<1|Ut>>>31;Ot=Ar+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)+0x6ed9eba1|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=_r^rr^Xt^Vt;Sr=Ut<<1|Ut>>>31;Ot=Sr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=kr^ir^Jt^Zt;Er=Ut<<1|Ut>>>31;Ot=Er+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ar^nr^Yt^Xt;xr=Ut<<1|Ut>>>31;Ot=xr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Sr^sr^Qt^Jt;Br=Ut<<1|Ut>>>31;Ot=Br+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Er^vr^er^Yt;Dr=Ut<<1|Ut>>>31;Ot=Dr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=xr^_r^tr^Qt;Rr=Ut<<1|Ut>>>31;Ot=Rr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Br^kr^rr^er;Ir=Ut<<1|Ut>>>31;Ot=Ir+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Dr^Ar^ir^tr;Ur=Ut<<1|Ut>>>31;Ot=Ur+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Rr^Sr^nr^rr;Lr=Ut<<1|Ut>>>31;Ot=Lr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ir^Er^sr^ir;Gr=Ut<<1|Ut>>>31;Ot=Gr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ur^xr^vr^nr;Vr=Ut<<1|Ut>>>31;Ot=Vr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Lr^Br^_r^sr;Xr=Ut<<1|Ut>>>31;Ot=Xr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Gr^Dr^kr^vr;Qr=Ut<<1|Ut>>>31;Ot=Qr+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Vr^Rr^Ar^_r;ei=Ut<<1|Ut>>>31;Ot=ei+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Xr^Ir^Sr^kr;ti=Ut<<1|Ut>>>31;Ot=ti+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Qr^Ur^Er^Ar;ri=Ut<<1|Ut>>>31;Ot=ri+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ei^Lr^xr^Sr;ii=Ut<<1|Ut>>>31;Ot=ii+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ti^Gr^Br^Er;ni=Ut<<1|Ut>>>31;Ot=ni+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ri^Vr^Dr^xr;oi=Ut<<1|Ut>>>31;Ot=oi+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ii^Xr^Rr^Br;ci=Ut<<1|Ut>>>31;Ot=ci+(Dt<<5|Dt>>>27)+It+(Rt&Tt|Rt&Kt|Tt&Kt)-0x70e44324|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ni^Qr^Ir^Dr;hi=Ut<<1|Ut>>>31;Ot=hi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=oi^ei^Ur^Rr;li=Ut<<1|Ut>>>31;Ot=li+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=ci^ti^Lr^Ir;di=Ut<<1|Ut>>>31;Ot=di+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=hi^ri^Gr^Ur;pi=Ut<<1|Ut>>>31;Ot=pi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=li^ii^Vr^Lr;yi=Ut<<1|Ut>>>31;Ot=yi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=di^ni^Xr^Gr;mi=Ut<<1|Ut>>>31;Ot=mi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=pi^oi^Qr^Vr;bi=Ut<<1|Ut>>>31;Ot=bi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=yi^ci^ei^Xr;Si=Ut<<1|Ut>>>31;Ot=Si+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=mi^hi^ti^Qr;Ei=Ut<<1|Ut>>>31;Ot=Ei+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=bi^li^ri^ei;Mi=Ut<<1|Ut>>>31;Ot=Mi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Si^di^ii^ti;Ci=Ut<<1|Ut>>>31;Ot=Ci+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ei^pi^ni^ri;Ri=Ut<<1|Ut>>>31;Ot=Ri+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Mi^yi^oi^ii;Ki=Ut<<1|Ut>>>31;Ot=Ki+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ci^mi^ci^ni;Ii=Ut<<1|Ut>>>31;Ot=Ii+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ri^bi^hi^oi;Ui=Ut<<1|Ut>>>31;Ot=Ui+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ki^Si^li^ci;Ni=Ut<<1|Ut>>>31;Ot=Ni+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ii^Ei^di^hi;zi=Ut<<1|Ut>>>31;Ot=zi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ui^Mi^pi^li;qi=Ut<<1|Ut>>>31;Ot=qi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=Ni^Ci^yi^di;ji=Ut<<1|Ut>>>31;Ot=ji+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;Ut=zi^Ri^mi^pi;Gi=Ut<<1|Ut>>>31;Ot=Gi+(Dt<<5|Dt>>>27)+It+(Rt^Tt^Kt)-0x359d3e2a|0;It=Kt;Kt=Tt;Tt=Rt<<30|Rt>>>2;Rt=Dt;Dt=Ot;ze=ze+Dt|0;qe=qe+Rt|0;Ve=Ve+Tt|0;tt=tt+Kt|0;rt=rt+It|0}function k(ke){ke=ke|0;_(Bt[ke|0]<<24|Bt[ke|1]<<16|Bt[ke|2]<<8|Bt[ke|3],Bt[ke|4]<<24|Bt[ke|5]<<16|Bt[ke|6]<<8|Bt[ke|7],Bt[ke|8]<<24|Bt[ke|9]<<16|Bt[ke|10]<<8|Bt[ke|11],Bt[ke|12]<<24|Bt[ke|13]<<16|Bt[ke|14]<<8|Bt[ke|15],Bt[ke|16]<<24|Bt[ke|17]<<16|Bt[ke|18]<<8|Bt[ke|19],Bt[ke|20]<<24|Bt[ke|21]<<16|Bt[ke|22]<<8|Bt[ke|23],Bt[ke|24]<<24|Bt[ke|25]<<16|Bt[ke|26]<<8|Bt[ke|27],Bt[ke|28]<<24|Bt[ke|29]<<16|Bt[ke|30]<<8|Bt[ke|31],Bt[ke|32]<<24|Bt[ke|33]<<16|Bt[ke|34]<<8|Bt[ke|35],Bt[ke|36]<<24|Bt[ke|37]<<16|Bt[ke|38]<<8|Bt[ke|39],Bt[ke|40]<<24|Bt[ke|41]<<16|Bt[ke|42]<<8|Bt[ke|43],Bt[ke|44]<<24|Bt[ke|45]<<16|Bt[ke|46]<<8|Bt[ke|47],Bt[ke|48]<<24|Bt[ke|49]<<16|Bt[ke|50]<<8|Bt[ke|51],Bt[ke|52]<<24|Bt[ke|53]<<16|Bt[ke|54]<<8|Bt[ke|55],Bt[ke|56]<<24|Bt[ke|57]<<16|Bt[ke|58]<<8|Bt[ke|59],Bt[ke|60]<<24|Bt[ke|61]<<16|Bt[ke|62]<<8|Bt[ke|63])}function A(ke){ke=ke|0;Bt[ke|0]=ze>>>24;Bt[ke|1]=ze>>>16&255;Bt[ke|2]=ze>>>8&255;Bt[ke|3]=ze&255;Bt[ke|4]=qe>>>24;Bt[ke|5]=qe>>>16&255;Bt[ke|6]=qe>>>8&255;Bt[ke|7]=qe&255;Bt[ke|8]=Ve>>>24;Bt[ke|9]=Ve>>>16&255;Bt[ke|10]=Ve>>>8&255;Bt[ke|11]=Ve&255;Bt[ke|12]=tt>>>24;Bt[ke|13]=tt>>>16&255;Bt[ke|14]=tt>>>8&255;Bt[ke|15]=tt&255;Bt[ke|16]=rt>>>24;Bt[ke|17]=rt>>>16&255;Bt[ke|18]=rt>>>8&255;Bt[ke|19]=rt&255}function S(){ze=0x67452301;qe=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;ze=ke;qe=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 ze=0,qe=0;if(ke&63)return-1;if(~Ce)if(Ce&31)return-1;if((Ae|0)>=64){ze=P(ke,Ae)|0;if((ze|0)==-1)return-1;ke=ke+ze|0;Ae=Ae-ze|0}ze=ze+Ae|0;it=it+Ae|0;if(it>>>0<Ae>>>0)nt=nt+1|0;Bt[ke|Ae]=0x80;if((Ae|0)>=56){for(qe=Ae+1|0;(qe|0)<64;qe=qe+1|0)Bt[ke|qe]=0x00;k(ke);Ae=0;Bt[ke|0]=0}for(qe=Ae+1|0;(qe|0)<59;qe=qe+1|0)Bt[ke|qe]=0;Bt[ke|56]=nt>>>21&255;Bt[ke|57]=nt>>>13&255;Bt[ke|58]=nt>>>5&255;Bt[ke|59]=nt<<3&255|it>>>29;Bt[ke|60]=it>>>21&255;Bt[ke|61]=it>>>13&255;Bt[ke|62]=it>>>5&255;Bt[ke|63]=it<<3&255;k(ke);if(~Ce)A(Ce);return ze|0}function M(){ze=ot;qe=ct;Ve=ht;tt=ft;rt=yt;it=64;nt=0}function C(){ze=mt;qe=kt;Ve=St;tt=Et;rt=Pt;it=64;nt=0}function K(ke,Ae,Ce,Bt,Dt,Rt,Tt,Kt,It,Ut,Ot,Nt,zt,qt,Ft,Lt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;Bt=Bt|0;Dt=Dt|0;Rt=Rt|0;Tt=Tt|0;Kt=Kt|0;It=It|0;Ut=Ut|0;Ot=Ot|0;Nt=Nt|0;zt=zt|0;qt=qt|0;Ft=Ft|0;Lt=Lt|0;S();_(ke^0x5c5c5c5c,Ae^0x5c5c5c5c,Ce^0x5c5c5c5c,Bt^0x5c5c5c5c,Dt^0x5c5c5c5c,Rt^0x5c5c5c5c,Tt^0x5c5c5c5c,Kt^0x5c5c5c5c,It^0x5c5c5c5c,Ut^0x5c5c5c5c,Ot^0x5c5c5c5c,Nt^0x5c5c5c5c,zt^0x5c5c5c5c,qt^0x5c5c5c5c,Ft^0x5c5c5c5c,Lt^0x5c5c5c5c);mt=ze;kt=qe;St=Ve;Et=tt;Pt=rt;S();_(ke^0x36363636,Ae^0x36363636,Ce^0x36363636,Bt^0x36363636,Dt^0x36363636,Rt^0x36363636,Tt^0x36363636,Kt^0x36363636,It^0x36363636,Ut^0x36363636,Ot^0x36363636,Nt^0x36363636,zt^0x36363636,qt^0x36363636,Ft^0x36363636,Lt^0x36363636);ot=ze;ct=qe;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=ze,nt=qe,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;Bt[ke+Ae|0]=Ce>>>24;Bt[ke+Ae+1|0]=Ce>>>16&255;Bt[ke+Ae+2|0]=Ce>>>8&255;Bt[ke+Ae+3|0]=Ce&255;D(ke,Ae+4|0,-1)|0;ot=mt=ze,ct=kt=qe,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=ze,kt=qe,St=Ve,Et=tt,Pt=rt;C();_(mt,kt,St,Et,Pt,0x80000000,0,0,0,0,0,0,0,0,0,672);mt=ze,kt=qe,St=Ve,Et=tt,Pt=rt;ot=ot^ze;ct=ct^qe;ht=ht^Ve;ft=ft^tt;yt=yt^rt;it=it-1|0}ze=ot;qe=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 Ue("state must be reset before processing new data");const{asm:Ae,heap:Ce}=this.acquire_asm();let ze=this.pos,qe=this.len,Ve=0,tt=ke.length,rt=0;for(;tt>0;)rt=Re(Ce,ze+qe,ke,Ve,tt),qe+=rt,Ve+=rt,tt-=rt,rt=Ae.process(ze,qe),ze+=rt,qe-=rt,qe||(ze=0);return this.pos=ze,this.len=qe,this}finish(){if(null!==this.result)throw new Ue("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=[],Br=[];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=Br.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),Br.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 Dr=[],Rr=[];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=Dr.pop()||De(),this.asm=Rr.pop()||function(ke,Ae,Ce){"use asm";var ze=0,qe=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,Bt=0,Dt=0,Rt=0,Tt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,zt=new ke.Uint8Array(Ce);function K(ke,Ae,Ce,ct,ht,ft,yt,mt,kt,St,Et,Pt,Bt,Dt,Rt,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;Bt=Bt|0;Dt=Dt|0;Rt=Rt|0;Tt=Tt|0;var Kt=0,It=0,Ut=0,Ot=0,Nt=0,zt=0,qt=0,Ft=0;Kt=ze;It=qe;Ut=Ve;Ot=tt;Nt=rt;zt=it;qt=nt;Ft=ot;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(qt^Nt&(zt^qt))+0x428a2f98|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;qt=Ae+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0x71374491|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;zt=Ce+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0xb5c0fbcf|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Nt=ct+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0xe9b5dba5|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Ot=ht+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0x3956c25b|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Ut=ft+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0x59f111f1|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;It=yt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0x923f82a4|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Kt=mt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0xab1c5ed5|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;Ft=kt+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(qt^Nt&(zt^qt))+0xd807aa98|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<10)|0;qt=St+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0x12835b01|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(Ft>>>2^Ft>>>13^Ft>>>22^Ft<<30^Ft<<19^Ft<<10)|0;zt=Et+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0x243185be|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Nt=Pt+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0x550c7dc3|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Ot=Bt+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0x72be5d74|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Ut=Dt+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0x80deb1fe|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;It=Rt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0x9bdc06a7|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Kt=Tt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0xc19bf174|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;ke=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+ke+St|0;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(qt^Nt&(zt^qt))+0xe49b69c1|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<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;qt=Ae+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0xefbe4786|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(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;zt=Ce+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0x0fc19dc6|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;ct=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+ct+Bt|0;Nt=ct+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0x240ca1cc|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Ce>>>17^Ce>>>19^Ce>>>10^Ce<<15^Ce<<13)+ht+Dt|0;Ot=ht+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0x2de92c6f|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(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+Rt|0;Ut=ft+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0x4a7484aa|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(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;It=yt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0x5cb0a9dc|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<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;Kt=mt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0x76f988da|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<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)+(qt^Nt&(zt^qt))+0x983e5152|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<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;qt=St+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0xa831c66d|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(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;zt=Et+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0xb00327c8|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Pt=(Bt>>>7^Bt>>>18^Bt>>>3^Bt<<25^Bt<<14)+(St>>>17^St>>>19^St>>>10^St<<15^St<<13)+Pt+ht|0;Nt=Pt+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0xbf597fc7|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Bt=(Dt>>>7^Dt>>>18^Dt>>>3^Dt<<25^Dt<<14)+(Et>>>17^Et>>>19^Et>>>10^Et<<15^Et<<13)+Bt+ft|0;Ot=Bt+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0xc6e00bf3|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Dt=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(Pt>>>17^Pt>>>19^Pt>>>10^Pt<<15^Pt<<13)+Dt+yt|0;Ut=Dt+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0xd5a79147|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Rt=(Tt>>>7^Tt>>>18^Tt>>>3^Tt<<25^Tt<<14)+(Bt>>>17^Bt>>>19^Bt>>>10^Bt<<15^Bt<<13)+Rt+mt|0;It=Rt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0x06ca6351|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Tt=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Dt>>>17^Dt>>>19^Dt>>>10^Dt<<15^Dt<<13)+Tt+kt|0;Kt=Tt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0x14292967|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;ke=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+ke+St|0;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(qt^Nt&(zt^qt))+0x27b70a85|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<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;qt=Ae+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0x2e1b2138|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(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;zt=Ce+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0x4d2c6dfc|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;ct=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+ct+Bt|0;Nt=ct+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0x53380d13|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Ce>>>17^Ce>>>19^Ce>>>10^Ce<<15^Ce<<13)+ht+Dt|0;Ot=ht+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0x650a7354|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(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+Rt|0;Ut=ft+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0x766a0abb|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(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;It=yt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0x81c2c92e|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<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;Kt=mt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0x92722c85|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<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)+(qt^Nt&(zt^qt))+0xa2bfe8a1|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<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;qt=St+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0xa81a664b|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(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;zt=Et+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0xc24b8b70|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Pt=(Bt>>>7^Bt>>>18^Bt>>>3^Bt<<25^Bt<<14)+(St>>>17^St>>>19^St>>>10^St<<15^St<<13)+Pt+ht|0;Nt=Pt+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0xc76c51a3|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Bt=(Dt>>>7^Dt>>>18^Dt>>>3^Dt<<25^Dt<<14)+(Et>>>17^Et>>>19^Et>>>10^Et<<15^Et<<13)+Bt+ft|0;Ot=Bt+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0xd192e819|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Dt=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(Pt>>>17^Pt>>>19^Pt>>>10^Pt<<15^Pt<<13)+Dt+yt|0;Ut=Dt+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0xd6990624|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Rt=(Tt>>>7^Tt>>>18^Tt>>>3^Tt<<25^Tt<<14)+(Bt>>>17^Bt>>>19^Bt>>>10^Bt<<15^Bt<<13)+Rt+mt|0;It=Rt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0xf40e3585|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Tt=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Dt>>>17^Dt>>>19^Dt>>>10^Dt<<15^Dt<<13)+Tt+kt|0;Kt=Tt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0x106aa070|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;ke=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Rt>>>17^Rt>>>19^Rt>>>10^Rt<<15^Rt<<13)+ke+St|0;Ft=ke+Ft+(Nt>>>6^Nt>>>11^Nt>>>25^Nt<<26^Nt<<21^Nt<<7)+(qt^Nt&(zt^qt))+0x19a4c116|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<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;qt=Ae+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0x1e376c08|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(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;zt=Ce+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0x2748774c|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;ct=(ht>>>7^ht>>>18^ht>>>3^ht<<25^ht<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+ct+Bt|0;Nt=ct+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0x34b0bcb5|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;ht=(ft>>>7^ft>>>18^ft>>>3^ft<<25^ft<<14)+(Ce>>>17^Ce>>>19^Ce>>>10^Ce<<15^Ce<<13)+ht+Dt|0;Ot=ht+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0x391c0cb3|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(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+Rt|0;Ut=ft+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0x4ed8aa4a|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(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;It=yt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0x5b9cca4f|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<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;Kt=mt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0x682e6ff3|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<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)+(qt^Nt&(zt^qt))+0x748f82ee|0;Ot=Ot+Ft|0;Ft=Ft+(Kt&It^Ut&(Kt^It))+(Kt>>>2^Kt>>>13^Kt>>>22^Kt<<30^Kt<<19^Kt<<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;qt=St+qt+(Ot>>>6^Ot>>>11^Ot>>>25^Ot<<26^Ot<<21^Ot<<7)+(zt^Ot&(Nt^zt))+0x78a5636f|0;Ut=Ut+qt|0;qt=qt+(Ft&Kt^It&(Ft^Kt))+(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;zt=Et+zt+(Ut>>>6^Ut>>>11^Ut>>>25^Ut<<26^Ut<<21^Ut<<7)+(Nt^Ut&(Ot^Nt))+0x84c87814|0;It=It+zt|0;zt=zt+(qt&Ft^Kt&(qt^Ft))+(qt>>>2^qt>>>13^qt>>>22^qt<<30^qt<<19^qt<<10)|0;Pt=(Bt>>>7^Bt>>>18^Bt>>>3^Bt<<25^Bt<<14)+(St>>>17^St>>>19^St>>>10^St<<15^St<<13)+Pt+ht|0;Nt=Pt+Nt+(It>>>6^It>>>11^It>>>25^It<<26^It<<21^It<<7)+(Ot^It&(Ut^Ot))+0x8cc70208|0;Kt=Kt+Nt|0;Nt=Nt+(zt&qt^Ft&(zt^qt))+(zt>>>2^zt>>>13^zt>>>22^zt<<30^zt<<19^zt<<10)|0;Bt=(Dt>>>7^Dt>>>18^Dt>>>3^Dt<<25^Dt<<14)+(Et>>>17^Et>>>19^Et>>>10^Et<<15^Et<<13)+Bt+ft|0;Ot=Bt+Ot+(Kt>>>6^Kt>>>11^Kt>>>25^Kt<<26^Kt<<21^Kt<<7)+(Ut^Kt&(It^Ut))+0x90befffa|0;Ft=Ft+Ot|0;Ot=Ot+(Nt&zt^qt&(Nt^zt))+(Nt>>>2^Nt>>>13^Nt>>>22^Nt<<30^Nt<<19^Nt<<10)|0;Dt=(Rt>>>7^Rt>>>18^Rt>>>3^Rt<<25^Rt<<14)+(Pt>>>17^Pt>>>19^Pt>>>10^Pt<<15^Pt<<13)+Dt+yt|0;Ut=Dt+Ut+(Ft>>>6^Ft>>>11^Ft>>>25^Ft<<26^Ft<<21^Ft<<7)+(It^Ft&(Kt^It))+0xa4506ceb|0;qt=qt+Ut|0;Ut=Ut+(Ot&Nt^zt&(Ot^Nt))+(Ot>>>2^Ot>>>13^Ot>>>22^Ot<<30^Ot<<19^Ot<<10)|0;Rt=(Tt>>>7^Tt>>>18^Tt>>>3^Tt<<25^Tt<<14)+(Bt>>>17^Bt>>>19^Bt>>>10^Bt<<15^Bt<<13)+Rt+mt|0;It=Rt+It+(qt>>>6^qt>>>11^qt>>>25^qt<<26^qt<<21^qt<<7)+(Kt^qt&(Ft^Kt))+0xbef9a3f7|0;zt=zt+It|0;It=It+(Ut&Ot^Nt&(Ut^Ot))+(Ut>>>2^Ut>>>13^Ut>>>22^Ut<<30^Ut<<19^Ut<<10)|0;Tt=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Dt>>>17^Dt>>>19^Dt>>>10^Dt<<15^Dt<<13)+Tt+kt|0;Kt=Tt+Kt+(zt>>>6^zt>>>11^zt>>>25^zt<<26^zt<<21^zt<<7)+(Ft^zt&(qt^Ft))+0xc67178f2|0;Nt=Nt+Kt|0;Kt=Kt+(It&Ut^Ot&(It^Ut))+(It>>>2^It>>>13^It>>>22^It<<30^It<<19^It<<10)|0;ze=ze+Kt|0;qe=qe+It|0;Ve=Ve+Ut|0;tt=tt+Ot|0;rt=rt+Nt|0;it=it+zt|0;nt=nt+qt|0;ot=ot+Ft|0}function D(ke){ke=ke|0;K(zt[ke|0]<<24|zt[ke|1]<<16|zt[ke|2]<<8|zt[ke|3],zt[ke|4]<<24|zt[ke|5]<<16|zt[ke|6]<<8|zt[ke|7],zt[ke|8]<<24|zt[ke|9]<<16|zt[ke|10]<<8|zt[ke|11],zt[ke|12]<<24|zt[ke|13]<<16|zt[ke|14]<<8|zt[ke|15],zt[ke|16]<<24|zt[ke|17]<<16|zt[ke|18]<<8|zt[ke|19],zt[ke|20]<<24|zt[ke|21]<<16|zt[ke|22]<<8|zt[ke|23],zt[ke|24]<<24|zt[ke|25]<<16|zt[ke|26]<<8|zt[ke|27],zt[ke|28]<<24|zt[ke|29]<<16|zt[ke|30]<<8|zt[ke|31],zt[ke|32]<<24|zt[ke|33]<<16|zt[ke|34]<<8|zt[ke|35],zt[ke|36]<<24|zt[ke|37]<<16|zt[ke|38]<<8|zt[ke|39],zt[ke|40]<<24|zt[ke|41]<<16|zt[ke|42]<<8|zt[ke|43],zt[ke|44]<<24|zt[ke|45]<<16|zt[ke|46]<<8|zt[ke|47],zt[ke|48]<<24|zt[ke|49]<<16|zt[ke|50]<<8|zt[ke|51],zt[ke|52]<<24|zt[ke|53]<<16|zt[ke|54]<<8|zt[ke|55],zt[ke|56]<<24|zt[ke|57]<<16|zt[ke|58]<<8|zt[ke|59],zt[ke|60]<<24|zt[ke|61]<<16|zt[ke|62]<<8|zt[ke|63])}function R(ke){ke=ke|0;zt[ke|0]=ze>>>24;zt[ke|1]=ze>>>16&255;zt[ke|2]=ze>>>8&255;zt[ke|3]=ze&255;zt[ke|4]=qe>>>24;zt[ke|5]=qe>>>16&255;zt[ke|6]=qe>>>8&255;zt[ke|7]=qe&255;zt[ke|8]=Ve>>>24;zt[ke|9]=Ve>>>16&255;zt[ke|10]=Ve>>>8&255;zt[ke|11]=Ve&255;zt[ke|12]=tt>>>24;zt[ke|13]=tt>>>16&255;zt[ke|14]=tt>>>8&255;zt[ke|15]=tt&255;zt[ke|16]=rt>>>24;zt[ke|17]=rt>>>16&255;zt[ke|18]=rt>>>8&255;zt[ke|19]=rt&255;zt[ke|20]=it>>>24;zt[ke|21]=it>>>16&255;zt[ke|22]=it>>>8&255;zt[ke|23]=it&255;zt[ke|24]=nt>>>24;zt[ke|25]=nt>>>16&255;zt[ke|26]=nt>>>8&255;zt[ke|27]=nt&255;zt[ke|28]=ot>>>24;zt[ke|29]=ot>>>16&255;zt[ke|30]=ot>>>8&255;zt[ke|31]=ot&255}function I(){ze=0x6a09e667;qe=0xbb67ae85;Ve=0x3c6ef372;tt=0xa54ff53a;rt=0x510e527f;it=0x9b05688c;nt=0x1f83d9ab;ot=0x5be0cd19;ct=ht=0}function U(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;ze=ke;qe=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 ze=0,qe=0;if(ke&63)return-1;if(~Ce)if(Ce&31)return-1;if((Ae|0)>=64){ze=B(ke,Ae)|0;if((ze|0)==-1)return-1;ke=ke+ze|0;Ae=Ae-ze|0}ze=ze+Ae|0;ct=ct+Ae|0;if(ct>>>0<Ae>>>0)ht=ht+1|0;zt[ke|Ae]=0x80;if((Ae|0)>=56){for(qe=Ae+1|0;(qe|0)<64;qe=qe+1|0)zt[ke|qe]=0x00;D(ke);Ae=0;zt[ke|0]=0}for(qe=Ae+1|0;(qe|0)<59;qe=qe+1|0)zt[ke|qe]=0;zt[ke|56]=ht>>>21&255;zt[ke|57]=ht>>>13&255;zt[ke|58]=ht>>>5&255;zt[ke|59]=ht<<3&255|ct>>>29;zt[ke|60]=ct>>>21&255;zt[ke|61]=ct>>>13&255;zt[ke|62]=ct>>>5&255;zt[ke|63]=ct<<3&255;D(ke);if(~Ce)R(Ce);return ze|0}function z(){ze=ft;qe=yt;Ve=mt;tt=kt;rt=St;it=Et;nt=Pt;ot=Bt;ct=64;ht=0}function q(){ze=Dt;qe=Rt;Ve=Tt;tt=Kt;rt=It;it=Ut;nt=Ot;ot=Nt;ct=64;ht=0}function O(ke,Ae,Ce,zt,qt,Ft,Lt,Ht,Gt,$t,Vt,Zt,Xt,Jt,Yt,Qt){ke=ke|0;Ae=Ae|0;Ce=Ce|0;zt=zt|0;qt=qt|0;Ft=Ft|0;Lt=Lt|0;Ht=Ht|0;Gt=Gt|0;$t=$t|0;Vt=Vt|0;Zt=Zt|0;Xt=Xt|0;Jt=Jt|0;Yt=Yt|0;Qt=Qt|0;I();K(ke^0x5c5c5c5c,Ae^0x5c5c5c5c,Ce^0x5c5c5c5c,zt^0x5c5c5c5c,qt^0x5c5c5c5c,Ft^0x5c5c5c5c,Lt^0x5c5c5c5c,Ht^0x5c5c5c5c,Gt^0x5c5c5c5c,$t^0x5c5c5c5c,Vt^0x5c5c5c5c,Zt^0x5c5c5c5c,Xt^0x5c5c5c5c,Jt^0x5c5c5c5c,Yt^0x5c5c5c5c,Qt^0x5c5c5c5c);Dt=ze;Rt=qe;Tt=Ve;Kt=tt;It=rt;Ut=it;Ot=nt;Nt=ot;I();K(ke^0x36363636,Ae^0x36363636,Ce^0x36363636,zt^0x36363636,qt^0x36363636,Ft^0x36363636,Lt^0x36363636,Ht^0x36363636,Gt^0x36363636,$t^0x36363636,Vt^0x36363636,Zt^0x36363636,Xt^0x36363636,Jt^0x36363636,Yt^0x36363636,Qt^0x36363636);ft=ze;yt=qe;mt=Ve;kt=tt;St=rt;Et=it;Pt=nt;Bt=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=ze,ht=qe,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,Bt=0,Dt=0,Rt=0,Tt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0;if(ke&63)return-1;if(~ht)if(ht&31)return-1;zt[ke+Ae|0]=Ce>>>24;zt[ke+Ae+1|0]=Ce>>>16&255;zt[ke+Ae+2|0]=Ce>>>8&255;zt[ke+Ae+3|0]=Ce&255;F(ke,Ae+4|0,-1)|0;ft=Dt=ze,yt=Rt=qe,mt=Tt=Ve,kt=Kt=tt,St=It=rt,Et=Ut=it,Pt=Ot=nt,Bt=Nt=ot;ct=ct-1|0;while((ct|0)>0){z();K(Dt,Rt,Tt,Kt,It,Ut,Ot,Nt,0x80000000,0,0,0,0,0,0,768);Dt=ze,Rt=qe,Tt=Ve,Kt=tt,It=rt,Ut=it,Ot=nt,Nt=ot;q();K(Dt,Rt,Tt,Kt,It,Ut,Ot,Nt,0x80000000,0,0,0,0,0,0,768);Dt=ze,Rt=qe,Tt=Ve,Kt=tt,It=rt,Ut=it,Ot=nt,Nt=ot;ft=ft^ze;yt=yt^qe;mt=mt^Ve;kt=kt^tt;St=St^rt;Et=Et^it;Pt=Pt^nt;Bt=Bt^ot;ct=ct-1|0}ze=ft;qe=yt;Ve=mt;tt=kt;rt=St;it=Et;nt=Pt;ot=Bt;if(~ht)R(ht);return 0}return{reset:I,init:U,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&&(Dr.push(this.heap),Rr.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 Ir=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 Ur=void 0!==ze?ze:"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 Vr={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),ze=0;ze<ke.length;ze+=2)Ce.push(parseInt(ke[ze]+ke[ze+1],16))}else for(var ze=0;ze<ke.length;ze++){var qe=ke.charCodeAt(ze),Ve=qe>>8,tt=255&qe;Ve?Ce.push(Ve,tt):Ce.push(tt)}else for(ze=0;ze<ke.length;ze++)Ce[ze]=0|ke[ze];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="",ze=0;ze<ke.length;ze++){var qe=ke[ze];"little"===Ae&&(qe=wt(qe)),Ce+=_t(qe.toString(16))}return Ce},zero2:vt,zero8:_t,join32:function(ke,Ae,Ce,ze){var qe=Ce-Ae;Ir(qe%4==0);for(var Ve=Array(qe/4),tt=0,rt=Ae;tt<Ve.length;tt++,rt+=4){var it;it="big"===ze?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),ze=0,qe=0;ze<ke.length;ze++,qe+=4){var Ve=ke[ze];"big"===Ae?(Ce[qe]=Ve>>>24,Ce[qe+1]=Ve>>>16&255,Ce[qe+2]=Ve>>>8&255,Ce[qe+3]=255&Ve):(Ce[qe+3]=Ve>>>24,Ce[qe+2]=Ve>>>16&255,Ce[qe+1]=Ve>>>8&255,Ce[qe]=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,ze){return ke+Ae+Ce+ze>>>0},sum32_5:function(ke,Ae,Ce,ze,qe){return ke+Ae+Ce+ze+qe>>>0},sum64:function(ke,Ae,Ce,ze){var qe=ke[Ae],Ve=ze+ke[Ae+1]>>>0,tt=(Ve<ze?1:0)+Ce+qe;ke[Ae]=tt>>>0,ke[Ae+1]=Ve},sum64_hi:function(ke,Ae,Ce,ze){return(Ae+ze>>>0<Ae?1:0)+ke+Ce>>>0},sum64_lo:function(ke,Ae,Ce,ze){return Ae+ze>>>0},sum64_4_hi:function(ke,Ae,Ce,ze,qe,Ve,tt,rt){var it=0,nt=Ae;return it+=(nt=nt+ze>>>0)<Ae?1:0,it+=(nt=nt+Ve>>>0)<Ve?1:0,ke+Ce+qe+tt+(it+=(nt=nt+rt>>>0)<rt?1:0)>>>0},sum64_4_lo:function(ke,Ae,Ce,ze,qe,Ve,tt,rt){return Ae+ze+Ve+rt>>>0},sum64_5_hi:function(ke,Ae,Ce,ze,qe,Ve,tt,rt,it,nt){var ot=0,ct=Ae;return ot+=(ct=ct+ze>>>0)<Ae?1:0,ot+=(ct=ct+Ve>>>0)<Ve?1:0,ot+=(ct=ct+rt>>>0)<rt?1:0,ke+Ce+qe+tt+it+(ot+=(ct=ct+nt>>>0)<nt?1:0)>>>0},sum64_5_lo:function(ke,Ae,Ce,ze,qe,Ve,tt,rt,it,nt){return Ae+ze+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 Xr=At;At.prototype.update=function(ke,Ae){if(ke=Vr.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=Vr.join32(ke,0,ke.length-Ce,this.endian);for(var ze=0;ze<ke.length;ze+=this._delta32)this._update(ke,ze,ze+this._delta32)}return this},At.prototype.digest=function(ke){return this.update(this._pad()),Ir(null===this.pending),this._digest(ke)},At.prototype._pad=function(){var ke=this.pendingTotal,Ae=this._delta8,Ce=Ae-(ke+this.padLength)%Ae,ze=Array(Ce+this.padLength);ze[0]=128;for(var qe=1;qe<Ce;qe++)ze[qe]=0;if(ke<<=3,"big"===this.endian){for(var Ve=8;Ve<this.padLength;Ve++)ze[qe++]=0;ze[qe++]=0,ze[qe++]=0,ze[qe++]=0,ze[qe++]=0,ze[qe++]=ke>>>24&255,ze[qe++]=ke>>>16&255,ze[qe++]=ke>>>8&255,ze[qe++]=255&ke}else for(ze[qe++]=255&ke,ze[qe++]=ke>>>8&255,ze[qe++]=ke>>>16&255,ze[qe++]=ke>>>24&255,ze[qe++]=0,ze[qe++]=0,ze[qe++]=0,ze[qe++]=0,Ve=8;Ve<this.padLength;Ve++)ze[qe++]=0;return ze};var Qr={BlockHash:Xr},ei=Vr.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,ze){return 0===ke?xt(Ae,Ce,ze):1===ke||3===ke?Ct(Ae,Ce,ze):2===ke?Mt(Ae,Ce,ze):void 0},ch32:xt,maj32:Mt,p32:Ct,s0_256:function(ke){return ei(ke,2)^ei(ke,13)^ei(ke,22)},s1_256:function(ke){return ei(ke,6)^ei(ke,11)^ei(ke,25)},g0_256:function(ke){return ei(ke,7)^ei(ke,18)^ke>>>3},g1_256:function(ke){return ei(ke,17)^ei(ke,19)^ke>>>10}},ri=Vr.sum32,ii=Vr.sum32_4,ni=Vr.sum32_5,oi=ti.ch32,ci=ti.maj32,hi=ti.s0_256,li=ti.s1_256,di=ti.g0_256,pi=ti.g1_256,yi=Qr.BlockHash,mi=[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;yi.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=mi,this.W=Array(64)}Vr.inherits(jt,yi);var bi=jt;function Wt(){if(!(this instanceof Wt))return new Wt;bi.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,ze=0;ze<16;ze++)Ce[ze]=ke[Ae+ze];for(;ze<Ce.length;ze++)Ce[ze]=ii(pi(Ce[ze-2]),Ce[ze-7],di(Ce[ze-15]),Ce[ze-16]);var qe=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(Ir(this.k.length===Ce.length),ze=0;ze<Ce.length;ze++){var ht=ni(ct,li(it),oi(it,nt,ot),this.k[ze],Ce[ze]),ft=ri(hi(qe),ci(qe,Ve,tt));ct=ot,ot=nt,nt=it,it=ri(rt,ht),rt=tt,tt=Ve,Ve=qe,qe=ri(ht,ft)}this.h[0]=ri(this.h[0],qe),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?Vr.toHex32(this.h,"big"):Vr.split32(this.h,"big")},Vr.inherits(Wt,bi);var Si=Wt;Wt.blockSize=512,Wt.outSize=224,Wt.hmacStrength=192,Wt.padLength=64,Wt.prototype._digest=function(ke){return"hex"===ke?Vr.toHex32(this.h.slice(0,7),"big"):Vr.split32(this.h.slice(0,7),"big")};var Ei=Vr.rotr64_hi,Mi=Vr.rotr64_lo,Ci=Vr.shr64_hi,Ri=Vr.shr64_lo,Ki=Vr.sum64,Ii=Vr.sum64_hi,Ui=Vr.sum64_lo,Ni=Vr.sum64_4_hi,zi=Vr.sum64_4_lo,qi=Vr.sum64_5_hi,ji=Vr.sum64_5_lo,Gi=Qr.BlockHash,$i=[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;Gi.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=$i,this.W=Array(160)}Vr.inherits(ar,Gi);var Vi=ar;function or(ke,Ae,Ce,ze,qe){var Ve=ke&Ce^~ke&qe;return Ve<0&&(Ve+=4294967296),Ve}function cr(ke,Ae,Ce,ze,qe,Ve){var tt=Ae&ze^~Ae&Ve;return tt<0&&(tt+=4294967296),tt}function ur(ke,Ae,Ce,ze,qe){var Ve=ke&Ce^ke&qe^Ce&qe;return Ve<0&&(Ve+=4294967296),Ve}function hr(ke,Ae,Ce,ze,qe,Ve){var tt=Ae&ze^Ae&Ve^ze&Ve;return tt<0&&(tt+=4294967296),tt}function fr(ke,Ae){var Ce=Ei(ke,Ae,28)^Ei(Ae,ke,2)^Ei(Ae,ke,7);return Ce<0&&(Ce+=4294967296),Ce}function dr(ke,Ae){var Ce=Mi(ke,Ae,28)^Mi(Ae,ke,2)^Mi(Ae,ke,7);return Ce<0&&(Ce+=4294967296),Ce}function lr(ke,Ae){var Ce=Ei(ke,Ae,14)^Ei(ke,Ae,18)^Ei(Ae,ke,9);return Ce<0&&(Ce+=4294967296),Ce}function pr(ke,Ae){var Ce=Mi(ke,Ae,14)^Mi(ke,Ae,18)^Mi(Ae,ke,9);return Ce<0&&(Ce+=4294967296),Ce}function yr(ke,Ae){var Ce=Ei(ke,Ae,1)^Ei(ke,Ae,8)^Ci(ke,Ae,7);return Ce<0&&(Ce+=4294967296),Ce}function br(ke,Ae){var Ce=Mi(ke,Ae,1)^Mi(ke,Ae,8)^Ri(ke,Ae,7);return Ce<0&&(Ce+=4294967296),Ce}function mr(ke,Ae){var Ce=Ei(ke,Ae,19)^Ei(Ae,ke,29)^Ci(ke,Ae,6);return Ce<0&&(Ce+=4294967296),Ce}function gr(ke,Ae){var Ce=Mi(ke,Ae,19)^Mi(Ae,ke,29)^Ri(ke,Ae,6);return Ce<0&&(Ce+=4294967296),Ce}function wr(){if(!(this instanceof wr))return new wr;Vi.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,ze=0;ze<32;ze++)Ce[ze]=ke[Ae+ze];for(;ze<Ce.length;ze+=2){var qe=mr(Ce[ze-4],Ce[ze-3]),Ve=gr(Ce[ze-4],Ce[ze-3]),tt=Ce[ze-14],rt=Ce[ze-13],it=yr(Ce[ze-30],Ce[ze-29]),nt=br(Ce[ze-30],Ce[ze-29]),ot=Ce[ze-32],ct=Ce[ze-31];Ce[ze]=Ni(qe,Ve,tt,rt,it,nt,ot,ct),Ce[ze+1]=zi(qe,Ve,tt,rt,it,nt,ot,ct)}},ar.prototype._update=function(ke,Ae){this._prepareBlock(ke,Ae);var Ce=this.W,ze=this.h[0],qe=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];Ir(this.k.length===Ce.length);for(var Pt=0;Pt<Ce.length;Pt+=2){var Bt=St,Dt=Et,Rt=lr(ct,ht),Tt=pr(ct,ht),Kt=or(ct,ht,ft,yt,mt),It=cr(ct,ht,ft,yt,mt,kt),Ut=this.k[Pt],Ot=this.k[Pt+1],Nt=Ce[Pt],zt=Ce[Pt+1],qt=qi(Bt,Dt,Rt,Tt,Kt,It,Ut,Ot,Nt,zt),Ft=ji(Bt,Dt,Rt,Tt,Kt,It,Ut,Ot,Nt,zt);Bt=fr(ze,qe),Dt=dr(ze,qe),Rt=ur(ze,qe,Ve,tt,rt),Tt=hr(ze,qe,Ve,tt,rt,it);var Lt=Ii(Bt,Dt,Rt,Tt),Ht=Ui(Bt,Dt,Rt,Tt);St=mt,Et=kt,mt=ft,kt=yt,ft=ct,yt=ht,ct=Ii(nt,ot,qt,Ft),ht=Ui(ot,ot,qt,Ft),nt=rt,ot=it,rt=Ve,it=tt,Ve=ze,tt=qe,ze=Ii(qt,Ft,Lt,Ht),qe=Ui(qt,Ft,Lt,Ht)}Ki(this.h,0,ze,qe),Ki(this.h,2,Ve,tt),Ki(this.h,4,rt,it),Ki(this.h,6,nt,ot),Ki(this.h,8,ct,ht),Ki(this.h,10,ft,yt),Ki(this.h,12,mt,kt),Ki(this.h,14,St,Et)},ar.prototype._digest=function(ke){return"hex"===ke?Vr.toHex32(this.h,"big"):Vr.split32(this.h,"big")},Vr.inherits(wr,Vi);var Zi=wr;wr.blockSize=1024,wr.outSize=384,wr.hmacStrength=192,wr.padLength=128,wr.prototype._digest=function(ke){return"hex"===ke?Vr.toHex32(this.h.slice(0,12),"big"):Vr.split32(this.h.slice(0,12),"big")};var Xi=Vr.rotl32,Ji=Vr.sum32,Yi=Vr.sum32_3,Qi=Vr.sum32_4,sn=Qr.BlockHash;function Pr(){if(!(this instanceof Pr))return new Pr;sn.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Vr.inherits(Pr,sn);var an=Pr;function Mr(ke,Ae,Ce,ze){return ke<=15?Ae^Ce^ze:ke<=31?Ae&Ce|~Ae&ze:ke<=47?(Ae|~Ce)^ze:ke<=63?Ae&ze|Ce&~ze:Ae^(Ce|~ze)}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],ze=this.h[1],qe=this.h[2],Ve=this.h[3],tt=this.h[4],rt=Ce,it=ze,nt=qe,ot=Ve,ct=tt,ht=0;ht<80;ht++){var ft=Ji(Xi(Qi(Ce,Mr(ht,ze,qe,Ve),ke[on[ht]+Ae],Cr(ht)),un[ht]),tt);Ce=tt,tt=Ve,Ve=Xi(qe,10),qe=ze,ze=ft,ft=Ji(Xi(Qi(rt,Mr(79-ht,it,nt,ot),ke[cn[ht]+Ae],Kr(ht)),hn[ht]),ct),rt=ct,ct=ot,ot=Xi(nt,10),nt=it,it=ft}ft=Yi(this.h[1],qe,ot),this.h[1]=Yi(this.h[2],Ve,ct),this.h[2]=Yi(this.h[3],tt,rt),this.h[3]=Yi(this.h[4],Ce,it),this.h[4]=Yi(this.h[0],ze,nt),this.h[0]=ft},Pr.prototype._digest=function(ke){return"hex"===ke?Vr.toHex32(this.h,"little"):Vr.split32(this.h,"little")};var on=[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],cn=[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],un=[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],hn=[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],mn={ripemd160:an};function Tr(ke,Ae){let Ce=ke[0],ze=ke[1],qe=ke[2],Ve=ke[3];Ce=qr(Ce,ze,qe,Ve,Ae[0],7,-680876936),Ve=qr(Ve,Ce,ze,qe,Ae[1],12,-389564586),qe=qr(qe,Ve,Ce,ze,Ae[2],17,606105819),ze=qr(ze,qe,Ve,Ce,Ae[3],22,-1044525330),Ce=qr(Ce,ze,qe,Ve,Ae[4],7,-176418897),Ve=qr(Ve,Ce,ze,qe,Ae[5],12,1200080426),qe=qr(qe,Ve,Ce,ze,Ae[6],17,-1473231341),ze=qr(ze,qe,Ve,Ce,Ae[7],22,-45705983),Ce=qr(Ce,ze,qe,Ve,Ae[8],7,1770035416),Ve=qr(Ve,Ce,ze,qe,Ae[9],12,-1958414417),qe=qr(qe,Ve,Ce,ze,Ae[10],17,-42063),ze=qr(ze,qe,Ve,Ce,Ae[11],22,-1990404162),Ce=qr(Ce,ze,qe,Ve,Ae[12],7,1804603682),Ve=qr(Ve,Ce,ze,qe,Ae[13],12,-40341101),qe=qr(qe,Ve,Ce,ze,Ae[14],17,-1502002290),ze=qr(ze,qe,Ve,Ce,Ae[15],22,1236535329),Ce=Or(Ce,ze,qe,Ve,Ae[1],5,-165796510),Ve=Or(Ve,Ce,ze,qe,Ae[6],9,-1069501632),qe=Or(qe,Ve,Ce,ze,Ae[11],14,643717713),ze=Or(ze,qe,Ve,Ce,Ae[0],20,-373897302),Ce=Or(Ce,ze,qe,Ve,Ae[5],5,-701558691),Ve=Or(Ve,Ce,ze,qe,Ae[10],9,38016083),qe=Or(qe,Ve,Ce,ze,Ae[15],14,-660478335),ze=Or(ze,qe,Ve,Ce,Ae[4],20,-405537848),Ce=Or(Ce,ze,qe,Ve,Ae[9],5,568446438),Ve=Or(Ve,Ce,ze,qe,Ae[14],9,-1019803690),qe=Or(qe,Ve,Ce,ze,Ae[3],14,-187363961),ze=Or(ze,qe,Ve,Ce,Ae[8],20,1163531501),Ce=Or(Ce,ze,qe,Ve,Ae[13],5,-1444681467),Ve=Or(Ve,Ce,ze,qe,Ae[2],9,-51403784),qe=Or(qe,Ve,Ce,ze,Ae[7],14,1735328473),ze=Or(ze,qe,Ve,Ce,Ae[12],20,-1926607734),Ce=Fr(Ce,ze,qe,Ve,Ae[5],4,-378558),Ve=Fr(Ve,Ce,ze,qe,Ae[8],11,-2022574463),qe=Fr(qe,Ve,Ce,ze,Ae[11],16,1839030562),ze=Fr(ze,qe,Ve,Ce,Ae[14],23,-35309556),Ce=Fr(Ce,ze,qe,Ve,Ae[1],4,-1530992060),Ve=Fr(Ve,Ce,ze,qe,Ae[4],11,1272893353),qe=Fr(qe,Ve,Ce,ze,Ae[7],16,-155497632),ze=Fr(ze,qe,Ve,Ce,Ae[10],23,-1094730640),Ce=Fr(Ce,ze,qe,Ve,Ae[13],4,681279174),Ve=Fr(Ve,Ce,ze,qe,Ae[0],11,-358537222),qe=Fr(qe,Ve,Ce,ze,Ae[3],16,-722521979),ze=Fr(ze,qe,Ve,Ce,Ae[6],23,76029189),Ce=Fr(Ce,ze,qe,Ve,Ae[9],4,-640364487),Ve=Fr(Ve,Ce,ze,qe,Ae[12],11,-421815835),qe=Fr(qe,Ve,Ce,ze,Ae[15],16,530742520),ze=Fr(ze,qe,Ve,Ce,Ae[2],23,-995338651),Ce=Nr(Ce,ze,qe,Ve,Ae[0],6,-198630844),Ve=Nr(Ve,Ce,ze,qe,Ae[7],10,1126891415),qe=Nr(qe,Ve,Ce,ze,Ae[14],15,-1416354905),ze=Nr(ze,qe,Ve,Ce,Ae[5],21,-57434055),Ce=Nr(Ce,ze,qe,Ve,Ae[12],6,1700485571),Ve=Nr(Ve,Ce,ze,qe,Ae[3],10,-1894986606),qe=Nr(qe,Ve,Ce,ze,Ae[10],15,-1051523),ze=Nr(ze,qe,Ve,Ce,Ae[1],21,-2054922799),Ce=Nr(Ce,ze,qe,Ve,Ae[8],6,1873313359),Ve=Nr(Ve,Ce,ze,qe,Ae[15],10,-30611744),qe=Nr(qe,Ve,Ce,ze,Ae[6],15,-1560198380),ze=Nr(ze,qe,Ve,Ce,Ae[13],21,1309151649),Ce=Nr(Ce,ze,qe,Ve,Ae[4],6,-145523070),Ve=Nr(Ve,Ce,ze,qe,Ae[11],10,-1120210379),qe=Nr(qe,Ve,Ce,ze,Ae[2],15,718787259),ze=Nr(ze,qe,Ve,Ce,Ae[9],21,-343485551),ke[0]=Hr(Ce,ke[0]),ke[1]=Hr(ze,ke[1]),ke[2]=Hr(qe,ke[2]),ke[3]=Hr(Ve,ke[3])}function zr(ke,Ae,Ce,ze,qe,Ve){return Ae=Hr(Hr(Ae,ke),Hr(ze,Ve)),Hr(Ae<<qe|Ae>>>32-qe,Ce)}function qr(ke,Ae,Ce,ze,qe,Ve,tt){return zr(Ae&Ce|~Ae&ze,ke,Ae,qe,Ve,tt)}function Or(ke,Ae,Ce,ze,qe,Ve,tt){return zr(Ae&ze|Ce&~ze,ke,Ae,qe,Ve,tt)}function Fr(ke,Ae,Ce,ze,qe,Ve,tt){return zr(Ae^Ce^ze,ke,Ae,qe,Ve,tt)}function Nr(ke,Ae,Ce,ze,qe,Ve,tt){return zr(Ce^(Ae|~ze),ke,Ae,qe,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 bn="0123456789abcdef".split("");function Wr(ke){let Ae="",Ce=0;for(;Ce<4;Ce++)Ae+=bn[ke>>8*Ce+4&15]+bn[ke>>8*Ce&15];return Ae}function Hr(ke,Ae){return ke+Ae&4294967295}const vn=Zt.getWebCrypto(),_n=Zt.getNodeCrypto();function $r(ke){return async function(Ae){const Ce=_n.createHash(ke);return Y(Ae,(ke=>{Ce.update(ke)}),(()=>new Uint8Array(Ce.digest())))}}function Zr(ke,Ae){return async function(Ce,ze=tr){if(_(Ce)&&(Ce=await ie(Ce)),!Zt.isStream(Ce)&&vn&&Ae&&Ce.length>=ze.minBytesForWebCrypto)return new Uint8Array(await vn.digest(Ae,Ce));const qe=ke();return Y(Ce,(ke=>{qe.update(ke)}),(()=>new Uint8Array(qe.digest())))}}function Yr(ke,Ae){return async function(Ce,ze=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 vn&&Ae&&Ce.length>=ze.minBytesForWebCrypto?new Uint8Array(await vn.digest(Ae,Ce)):ke.bytes(Ce)}}let kn;kn=_n?{md5:$r("md5"),sha1:$r("sha1"),sha224:$r("sha224"),sha256:$r("sha256"),sha384:$r("sha384"),sha512:$r("sha512"),ripemd:$r("ripemd160")}:{md5:async function(ke){const Ae=function(ke){const Ae=ke.length,Ce=[1732584193,-271733879,-1732584194,271733878];let ze;for(ze=64;ze<=ke.length;ze+=64)Tr(Ce,jr(ke.substring(ze-64,ze)));ke=ke.substring(ze-64);const qe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(ze=0;ze<ke.length;ze++)qe[ze>>2]|=ke.charCodeAt(ze)<<(ze%4<<3);if(qe[ze>>2]|=128<<(ze%4<<3),ze>55)for(Tr(Ce,qe),ze=0;ze<16;ze++)qe[ze]=0;return qe[14]=8*Ae,Tr(Ce,qe),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:Yr(ut,"SHA-1"),sha224:Zr(Si),sha256:Yr(dt,"SHA-256"),sha384:Zr(Zi,"SHA-384"),sha512:Zr(Vi,"SHA-512"),ripemd:Zr(an)};var An={md5:kn.md5,sha1:kn.sha1,sha224:kn.sha224,sha256:kn.sha256,sha384:kn.sha384,sha512:kn.sha512,ripemd:kn.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 Jr{static encrypt(ke,Ae,Ce){return new Jr(Ae,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce){return new Jr(Ae,Ce).decrypt(ke)}constructor(ke,Ae,Ce){this.aes=Ce||new Oe(ke,Ae,!0,"CFB"),delete this.aes.padding}encrypt(ke){return Ie(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ie(this.aes.AES_Decrypt_process(ke),this.aes.AES_Decrypt_finish())}}const Sn=Zt.getWebCrypto(),En=Zt.getNodeCrypto(),Pn=En?En.getCiphers():[],Dn={idea:Pn.includes("idea-cfb")?"idea-cfb":void 0,tripledes:Pn.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,cast5:Pn.includes("cast5-cfb")?"cast5-cfb":void 0,blowfish:Pn.includes("bf-cfb")?"bf-cfb":void 0,aes128:Pn.includes("aes-128-cfb")?"aes-128-cfb":void 0,aes192:Pn.includes("aes-192-cfb")?"aes-192-cfb":void 0,aes256:Pn.includes("aes-256-cfb")?"aes-256-cfb":void 0};var Un=Object.freeze({__proto__:null,encrypt:async function(ke,Ae,Ce,ze,qe){const Ve=er.read(er.symmetric,ke);if(Zt.getNodeCrypto()&&Dn[Ve])return function(ke,Ae,Ce,ze){const qe=er.read(er.symmetric,ke),Ve=new En.createCipheriv(Dn[qe],Ae,ze);return Y(Ce,(ke=>new Uint8Array(Ve.update(ke))))}(ke,Ae,Ce,ze);if("aes"===Ve.substr(0,3))return function(ke,Ae,Ce,ze,qe){if(Zt.getWebCrypto()&&24!==Ae.length&&!Zt.isStream(Ce)&&Ce.length>=3e3*qe.minBytesForWebCrypto)return async function(ke,Ae,Ce,ze){const qe="AES-CBC",Ve=await Sn.importKey("raw",Ae,{name:qe},!1,["encrypt"]),{blockSize:tt}=crypto.getCipher(ke),rt=Zt.concatUint8Array([new Uint8Array(tt),Ce]),it=new Uint8Array(await Sn.encrypt({name:qe,iv:ze},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,ze);const Ve=new Jr(Ae,ze);return Y(Ce,(ke=>Ve.aes.AES_Encrypt_process(ke)),(()=>Ve.aes.AES_Encrypt_finish()))}(ke,Ae,Ce,ze,qe);const tt=new Er[Ve](Ae),rt=tt.blockSize,it=ze.slice();let nt=new Uint8Array;const h=ke=>{ke&&(nt=Zt.concatUint8Array([nt,ke]));const Ae=new Uint8Array(nt.length);let Ce,ze=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[ze++]=it[Ce];nt=nt.subarray(rt)}return Ae.subarray(0,ze)};return Y(Ce,h,h)},decrypt:async function(ke,Ae,Ce,ze){const qe=er.read(er.symmetric,ke);if(Zt.getNodeCrypto()&&Dn[qe])return function(ke,Ae,Ce,ze){const qe=er.read(er.symmetric,ke),Ve=new En.createDecipheriv(Dn[qe],Ae,ze);return Y(Ce,(ke=>new Uint8Array(Ve.update(ke))))}(ke,Ae,Ce,ze);if("aes"===qe.substr(0,3))return function(ke,Ae,Ce,ze){if(Zt.isStream(Ce)){const ke=new Jr(Ae,ze);return Y(Ce,(Ae=>ke.aes.AES_Decrypt_process(Ae)),(()=>ke.aes.AES_Decrypt_finish()))}return Jr.decrypt(Ce,Ae,ze)}(0,Ae,Ce,ze);const Ve=new Er[qe](Ae),tt=Ve.blockSize;let rt=ze,it=new Uint8Array;const u=ke=>{ke&&(it=Zt.concatUint8Array([it,ke]));const Ae=new Uint8Array(it.length);let Ce,ze=0;for(;ke?it.length>=tt:it.length;){const ke=Ve.encrypt(rt);for(rt=it,Ce=0;Ce<tt;Ce++)Ae[ze++]=rt[Ce]^ke[Ce];it=it.subarray(tt)}return Ae.subarray(0,ze)};return Y(Ce,u,u)}});class ai{static encrypt(ke,Ae,Ce){return new ai(Ae,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce){return new ai(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 Ie(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ie(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}AES_CTR_set_options(ke,Ae,Ce){let{asm:ze}=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;ze.set_mask(0,0,ke/4294967296|0,0|ke)}else Ce=48,ze.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),ze.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");ze.set_counter(0,0,Ae/4294967296|0,0|Ae)}}}class si{static encrypt(ke,Ae,Ce=!0,ze){return new si(Ae,ze,Ce).encrypt(ke)}static decrypt(ke,Ae,Ce=!0,ze){return new si(Ae,ze,Ce).decrypt(ke)}constructor(ke,Ae,Ce=!0,ze){this.aes=ze||new Oe(ke,Ae,Ce,"CBC")}encrypt(ke){return Ie(this.aes.AES_Encrypt_process(ke),this.aes.AES_Encrypt_finish())}decrypt(ke){return Ie(this.aes.AES_Decrypt_process(ke),this.aes.AES_Decrypt_finish())}}const On=Zt.getWebCrypto(),qn=Zt.getNodeCrypto();function ui(ke,Ae){const Ce=ke.length-16;for(let ze=0;ze<16;ze++)ke[ze+Ce]^=Ae[ze];return ke}const Fn=new Uint8Array(16);async function fi(ke){const Ae=await async function(ke){if(Zt.getWebCrypto()&&24!==ke.length)return ke=await On.importKey("raw",ke,{name:"AES-CBC",length:8*ke.length},!1,["encrypt"]),async function(Ae){const Ce=await On.encrypt({name:"AES-CBC",iv:Fn,length:128},ke,Ae);return new Uint8Array(Ce).subarray(0,Ce.byteLength-16)};if(Zt.getNodeCrypto())return async function(Ae){const Ce=new qn.createCipheriv("aes-"+8*ke.length+"-cbc",ke,Fn).update(Ae);return new Uint8Array(Ce)};return async function(Ae){return si.encrypt(Ae,ke,!1,Fn)}}(ke),Ce=Zt.double(await Ae(Fn)),ze=Zt.double(Ce);return async function(ke){return(await Ae(function(ke,Ae,Ce){if(ke.length&&ke.length%16==0)return ui(ke,Ae);const ze=new Uint8Array(ke.length+(16-ke.length%16));return ze.set(ke),ze[ke.length]=128,ui(ze,Ce)}(ke,Ce,ze))).subarray(-16)}}const Hn=Zt.getWebCrypto(),Gn=Zt.getNodeCrypto(),$n=Zt.getNodeBuffer(),Vn=new Uint8Array(16),Zn=new Uint8Array(16);Zn[15]=1;const Xn=new Uint8Array(16);async function gi(ke){const Ae=await fi(ke);return function(ke,Ce){return Ae(Zt.concatUint8Array([ke,Ce]))}}async function wi(ke){return Zt.getWebCrypto()&&24!==ke.length?(ke=await Hn.importKey("raw",ke,{name:"AES-CTR",length:8*ke.length},!1,["encrypt"]),async function(Ae,Ce){const ze=await Hn.encrypt({name:"AES-CTR",counter:Ce,length:128},ke,Ae);return new Uint8Array(ze)}):Zt.getNodeCrypto()?async function(Ae,Ce){const ze=new Gn.createCipheriv("aes-"+8*ke.length+"-ctr",ke,Ce),qe=$n.concat([ze.update(Ae),ze.final()]);return new Uint8Array(qe)}:async function(Ae,Ce){return ai.encrypt(Ae,ke,Ce)}}async function vi(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,ze]=await Promise.all([gi(Ae),wi(Ae)]);return{encrypt:async function(ke,Ae,qe){const[Ve,tt]=await Promise.all([Ce(Vn,Ae),Ce(Zn,qe)]),rt=await ze(ke,Ve),it=await Ce(Xn,rt);for(let ke=0;ke<16;ke++)it[ke]^=tt[ke]^Ve[ke];return Zt.concatUint8Array([rt,it])},decrypt:async function(ke,Ae,qe){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(Vn,Ae),Ce(Zn,qe),Ce(Xn,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 ze(Ve,rt)}}}Xn[15]=2,vi.getNonce=function(ke,Ae){const Ce=ke.slice();for(let ke=0;ke<Ae.length;ke++)Ce[8+ke]^=Ae[ke];return Ce},vi.blockLength=16,vi.ivLength=16,vi.tagLength=16;function _i(ke){let Ae=0;for(let Ce=1;0==(ke&Ce);Ce<<=1)Ae++;return Ae}function ki(ke,Ae){for(let Ce=0;Ce<ke.length;Ce++)ke[Ce]^=Ae[Ce];return ke}function Ai(ke,Ae){return ki(ke.slice(),Ae)}const Jn=new Uint8Array(16),Qn=new Uint8Array([1]);async function Pi(ke,Ae){let Ce,ze,qe,Ve=0;function s(ke,Ae,ze,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++)qe[ke]=Zt.double(qe[ke-1]);Ve=Ce}(Ae,tt);const it=Zt.concatUint8Array([Jn.subarray(0,15-ze.length),Qn,ze]),nt=63&it[15];it[15]&=192;const ot=Ce(it),ct=Zt.concatUint8Array([ot,Ai(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++)ki(ht,qe[_i(mt+1)]),yt.set(ki(ke(Ai(ht,Ae)),ht),kt),ki(ft,ke===Ce?Ae:yt.subarray(kt)),Ae=Ae.subarray(16),kt+=16;if(Ae.length){ki(ht,qe.x);const ze=Ce(ht);yt.set(Ai(Ae,ze),kt);const Ve=new Uint8Array(16);Ve.set(ke===Ce?Ae:yt.subarray(kt,-16),0),Ve[Ae.length]=128,ki(ft,Ve),kt+=Ae.length}const St=ki(Ce(ki(ki(ft,ht),qe.$)),function(ke){if(!ke.length)return Jn;const Ae=ke.length/16|0,ze=new Uint8Array(16),Ve=new Uint8Array(16);for(let tt=0;tt<Ae;tt++)ki(ze,qe[_i(tt+1)]),ki(Ve,Ce(Ai(ze,ke))),ke=ke.subarray(16);if(ke.length){ki(ze,qe.x);const Ae=new Uint8Array(16);Ae.set(ke,0),Ae[ke.length]=128,ki(Ae,ze),ki(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),ze=tt.decrypt.bind(tt);const rt=Ce(Jn),it=Zt.double(rt);qe=[],qe[0]=Zt.double(it),qe.x=rt,qe.$=it}(ke,Ae),{encrypt:async function(ke,Ae,ze){return s(Ce,ke,Ae,ze)},decrypt:async function(ke,Ae,Ce){if(ke.length<16)throw Error("Invalid OCB ciphertext");const qe=ke.subarray(-16);ke=ke.subarray(0,-16);const Ve=s(ze,ke,Ae,Ce);if(Zt.equalsUint8Array(qe,Ve.subarray(-16)))return Ve.subarray(0,-16);throw Error("Authentication tag mismatch")}}}Pi.getNonce=function(ke,Ae){const Ce=ke.slice();for(let ke=0;ke<Ae.length;ke++)Ce[7+ke]^=Ae[ke];return Ce},Pi.blockLength=16,Pi.ivLength=15,Pi.tagLength=16;class xi{constructor(ke,Ae,Ce,ze=16,qe){this.tagSize=ze,this.gamma0=0,this.counter=1,this.aes=qe||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,ze,qe){return new xi(Ae,Ce,ze,qe).encrypt(ke)}static decrypt(ke,Ae,Ce,ze,qe){return new xi(Ae,Ce,ze,qe).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:ze,heap:qe}=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(qe,tt+rt,ke,Ae,Ce),rt+=ot,Ae+=ot,Ce-=ot,ot=ze.cipher(nr.ENC.CTR,nr.HEAP_DATA+tt,rt),ot=ze.mac(nr.MAC.GCM,nr.HEAP_DATA+tt,ot),ot&&ct.set(qe.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,ze=this.tagSize,qe=this.adata,Ve=this.aes.pos,tt=this.aes.len;const rt=new Uint8Array(tt+ze);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!==qe?qe.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,ze),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:ze,heap:qe}=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(qe,rt+it,ke,Ae,Ce-ct),it+=ht,Ae+=ht,Ce-=ht,ht=ze.mac(nr.MAC.GCM,nr.HEAP_DATA+rt,ht),ht=ze.cipher(nr.DEC.CTR,nr.HEAP_DATA+rt,ht),ht&&ft.set(qe.subarray(rt,rt+ht),nt),Ve+=ht>>>4,nt+=ht,rt=0,it=0;return Ce>0&&(it+=Re(qe,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,ze=this.adata,qe=this.counter,Ve=this.aes.pos,tt=this.aes.len,rt=tt-Ce;if(tt<Ce)throw new Ue("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!==ze?ze.length:0,ht=(qe-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(),ze=new Uint8Array(Ae.length+Ce.length);return Ae.length&&ze.set(Ae),Ce.length&&ze.set(Ce,Ae.length),ze}AES_GCM_encrypt(ke){const Ae=this.AES_GCM_Encrypt_process(ke),Ce=this.AES_GCM_Encrypt_finish(),ze=new Uint8Array(Ae.length+Ce.length);return Ae.length&&ze.set(Ae),Ce.length&&ze.set(Ce,Ae.length),ze}_gcm_mac_process(ke){let{asm:Ae,heap:Ce}=this.aes.acquire_asm(),ze=0,qe=ke.length||0,Ve=0;for(;qe>0;){for(Ve=Re(Ce,0,ke,ze,qe),ze+=Ve,qe-=Ve;15&Ve;)Ce[Ve++]=0;Ae.mac(nr.MAC.GCM,nr.HEAP_DATA,Ve)}}}const is=Zt.getWebCrypto(),os=Zt.getNodeCrypto(),ls=Zt.getNodeBuffer();async function Di(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 is.importKey("raw",Ae,{name:"AES-GCM"},!1,["encrypt","decrypt"]);return{encrypt:async function(Ce,ze,qe=new Uint8Array){if(!Ce.length)return xi.encrypt(Ce,Ae,ze,qe);const Ve=await is.encrypt({name:"AES-GCM",iv:ze,additionalData:qe,tagLength:128},ke,Ce);return new Uint8Array(Ve)},decrypt:async function(Ce,ze,qe=new Uint8Array){if(16===Ce.length)return xi.decrypt(Ce,Ae,ze,qe);const Ve=await is.decrypt({name:"AES-GCM",iv:ze,additionalData:qe,tagLength:128},ke,Ce);return new Uint8Array(Ve)}}}return Zt.getNodeCrypto()?{encrypt:async function(ke,Ce,ze=new Uint8Array){const qe=new os.createCipheriv("aes-"+8*Ae.length+"-gcm",Ae,Ce);qe.setAAD(ze);const Ve=ls.concat([qe.update(ke),qe.final(),qe.getAuthTag()]);return new Uint8Array(Ve)},decrypt:async function(ke,Ce,ze=new Uint8Array){const qe=new os.createDecipheriv("aes-"+8*Ae.length+"-gcm",Ae,Ce);qe.setAAD(ze),qe.setAuthTag(ke.slice(ke.length-16,ke.length));const Ve=ls.concat([qe.update(ke.slice(0,ke.length-16)),qe.final()]);return new Uint8Array(Ve)}}:{encrypt:async function(ke,Ce,ze){return xi.encrypt(ke,Ae,Ce,ze)},decrypt:async function(ke,Ce,ze){return xi.decrypt(ke,Ae,Ce,ze)}}}Di.getNonce=function(ke,Ae){const Ce=ke.slice();for(let ke=0;ke<Ae.length;ke++)Ce[4+ke]^=Ae[ke];return Ce},Di.blockLength=16,Di.ivLength=12,Di.tagLength=16;var ds={cfb:Un,gcm:Di,experimentalGCM:Di,eax:vi,ocb:Pi},ps=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(),ze=t([1]),qe=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,ze){return function(ke,Ae,Ce,ze,qe){var Ve,tt=0;for(Ve=0;Ve<qe;Ve++)tt|=ke[Ae+Ve]^Ce[ze+Ve];return(1&tt-1>>>8)-1}(ke,Ae,Ce,ze,32)}function p(ke,Ae){var Ce;for(Ce=0;Ce<16;Ce++)ke[Ce]=0|Ae[Ce]}function y(ke){var Ae,Ce,ze=1;for(Ae=0;Ae<16;Ae++)Ce=ke[Ae]+ze+65535,ze=Math.floor(Ce/65536),ke[Ae]=Ce-65536*ze;ke[0]+=ze-1+37*(ze-1)}function b(ke,Ae,Ce){for(var ze,qe=~(Ce-1),Ve=0;Ve<16;Ve++)ze=qe&(ke[Ve]^Ae[Ve]),ke[Ve]^=ze,Ae[Ve]^=ze}function m(ke,Ae){var Ce,ze,qe,Ve=t(),tt=t();for(Ce=0;Ce<16;Ce++)tt[Ce]=Ae[Ce];for(y(tt),y(tt),y(tt),ze=0;ze<2;ze++){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),qe=Ve[15]>>16&1,Ve[14]&=65535,b(tt,Ve,1-qe)}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),ze=new Uint8Array(32);return m(Ce,ke),m(ze,Ae),l(Ce,0,ze,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 ze=0;ze<16;ze++)ke[ze]=Ae[ze]+Ce[ze]}function k(ke,Ae,Ce){for(var ze=0;ze<16;ze++)ke[ze]=Ae[ze]-Ce[ze]}function A(ke,Ae,Ce){var ze,qe,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,Bt=0,Dt=0,Rt=0,Tt=0,Kt=0,It=0,Ut=0,Ot=0,Nt=0,zt=0,qt=0,Ft=0,Lt=0,Ht=0,Gt=0,$t=0,Vt=Ce[0],Zt=Ce[1],Xt=Ce[2],Jt=Ce[3],Yt=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+=(ze=Ae[0])*Vt,tt+=ze*Zt,rt+=ze*Xt,it+=ze*Jt,nt+=ze*Yt,ot+=ze*Qt,ct+=ze*er,ht+=ze*tr,ft+=ze*rr,yt+=ze*ir,mt+=ze*nr,kt+=ze*sr,St+=ze*vr,Et+=ze*_r,Pt+=ze*kr,Bt+=ze*Ar,tt+=(ze=Ae[1])*Vt,rt+=ze*Zt,it+=ze*Xt,nt+=ze*Jt,ot+=ze*Yt,ct+=ze*Qt,ht+=ze*er,ft+=ze*tr,yt+=ze*rr,mt+=ze*ir,kt+=ze*nr,St+=ze*sr,Et+=ze*vr,Pt+=ze*_r,Bt+=ze*kr,Dt+=ze*Ar,rt+=(ze=Ae[2])*Vt,it+=ze*Zt,nt+=ze*Xt,ot+=ze*Jt,ct+=ze*Yt,ht+=ze*Qt,ft+=ze*er,yt+=ze*tr,mt+=ze*rr,kt+=ze*ir,St+=ze*nr,Et+=ze*sr,Pt+=ze*vr,Bt+=ze*_r,Dt+=ze*kr,Rt+=ze*Ar,it+=(ze=Ae[3])*Vt,nt+=ze*Zt,ot+=ze*Xt,ct+=ze*Jt,ht+=ze*Yt,ft+=ze*Qt,yt+=ze*er,mt+=ze*tr,kt+=ze*rr,St+=ze*ir,Et+=ze*nr,Pt+=ze*sr,Bt+=ze*vr,Dt+=ze*_r,Rt+=ze*kr,Tt+=ze*Ar,nt+=(ze=Ae[4])*Vt,ot+=ze*Zt,ct+=ze*Xt,ht+=ze*Jt,ft+=ze*Yt,yt+=ze*Qt,mt+=ze*er,kt+=ze*tr,St+=ze*rr,Et+=ze*ir,Pt+=ze*nr,Bt+=ze*sr,Dt+=ze*vr,Rt+=ze*_r,Tt+=ze*kr,Kt+=ze*Ar,ot+=(ze=Ae[5])*Vt,ct+=ze*Zt,ht+=ze*Xt,ft+=ze*Jt,yt+=ze*Yt,mt+=ze*Qt,kt+=ze*er,St+=ze*tr,Et+=ze*rr,Pt+=ze*ir,Bt+=ze*nr,Dt+=ze*sr,Rt+=ze*vr,Tt+=ze*_r,Kt+=ze*kr,It+=ze*Ar,ct+=(ze=Ae[6])*Vt,ht+=ze*Zt,ft+=ze*Xt,yt+=ze*Jt,mt+=ze*Yt,kt+=ze*Qt,St+=ze*er,Et+=ze*tr,Pt+=ze*rr,Bt+=ze*ir,Dt+=ze*nr,Rt+=ze*sr,Tt+=ze*vr,Kt+=ze*_r,It+=ze*kr,Ut+=ze*Ar,ht+=(ze=Ae[7])*Vt,ft+=ze*Zt,yt+=ze*Xt,mt+=ze*Jt,kt+=ze*Yt,St+=ze*Qt,Et+=ze*er,Pt+=ze*tr,Bt+=ze*rr,Dt+=ze*ir,Rt+=ze*nr,Tt+=ze*sr,Kt+=ze*vr,It+=ze*_r,Ut+=ze*kr,Ot+=ze*Ar,ft+=(ze=Ae[8])*Vt,yt+=ze*Zt,mt+=ze*Xt,kt+=ze*Jt,St+=ze*Yt,Et+=ze*Qt,Pt+=ze*er,Bt+=ze*tr,Dt+=ze*rr,Rt+=ze*ir,Tt+=ze*nr,Kt+=ze*sr,It+=ze*vr,Ut+=ze*_r,Ot+=ze*kr,Nt+=ze*Ar,yt+=(ze=Ae[9])*Vt,mt+=ze*Zt,kt+=ze*Xt,St+=ze*Jt,Et+=ze*Yt,Pt+=ze*Qt,Bt+=ze*er,Dt+=ze*tr,Rt+=ze*rr,Tt+=ze*ir,Kt+=ze*nr,It+=ze*sr,Ut+=ze*vr,Ot+=ze*_r,Nt+=ze*kr,zt+=ze*Ar,mt+=(ze=Ae[10])*Vt,kt+=ze*Zt,St+=ze*Xt,Et+=ze*Jt,Pt+=ze*Yt,Bt+=ze*Qt,Dt+=ze*er,Rt+=ze*tr,Tt+=ze*rr,Kt+=ze*ir,It+=ze*nr,Ut+=ze*sr,Ot+=ze*vr,Nt+=ze*_r,zt+=ze*kr,qt+=ze*Ar,kt+=(ze=Ae[11])*Vt,St+=ze*Zt,Et+=ze*Xt,Pt+=ze*Jt,Bt+=ze*Yt,Dt+=ze*Qt,Rt+=ze*er,Tt+=ze*tr,Kt+=ze*rr,It+=ze*ir,Ut+=ze*nr,Ot+=ze*sr,Nt+=ze*vr,zt+=ze*_r,qt+=ze*kr,Ft+=ze*Ar,St+=(ze=Ae[12])*Vt,Et+=ze*Zt,Pt+=ze*Xt,Bt+=ze*Jt,Dt+=ze*Yt,Rt+=ze*Qt,Tt+=ze*er,Kt+=ze*tr,It+=ze*rr,Ut+=ze*ir,Ot+=ze*nr,Nt+=ze*sr,zt+=ze*vr,qt+=ze*_r,Ft+=ze*kr,Lt+=ze*Ar,Et+=(ze=Ae[13])*Vt,Pt+=ze*Zt,Bt+=ze*Xt,Dt+=ze*Jt,Rt+=ze*Yt,Tt+=ze*Qt,Kt+=ze*er,It+=ze*tr,Ut+=ze*rr,Ot+=ze*ir,Nt+=ze*nr,zt+=ze*sr,qt+=ze*vr,Ft+=ze*_r,Lt+=ze*kr,Ht+=ze*Ar,Pt+=(ze=Ae[14])*Vt,Bt+=ze*Zt,Dt+=ze*Xt,Rt+=ze*Jt,Tt+=ze*Yt,Kt+=ze*Qt,It+=ze*er,Ut+=ze*tr,Ot+=ze*rr,Nt+=ze*ir,zt+=ze*nr,qt+=ze*sr,Ft+=ze*vr,Lt+=ze*_r,Ht+=ze*kr,Gt+=ze*Ar,Bt+=(ze=Ae[15])*Vt,tt+=38*(Rt+=ze*Xt),rt+=38*(Tt+=ze*Jt),it+=38*(Kt+=ze*Yt),nt+=38*(It+=ze*Qt),ot+=38*(Ut+=ze*er),ct+=38*(Ot+=ze*tr),ht+=38*(Nt+=ze*rr),ft+=38*(zt+=ze*ir),yt+=38*(qt+=ze*nr),mt+=38*(Ft+=ze*sr),kt+=38*(Lt+=ze*vr),St+=38*(Ht+=ze*_r),Et+=38*(Gt+=ze*kr),Pt+=38*($t+=ze*Ar),Ve=(ze=(Ve+=38*(Dt+=ze*Zt))+(qe=1)+65535)-65536*(qe=Math.floor(ze/65536)),tt=(ze=tt+qe+65535)-65536*(qe=Math.floor(ze/65536)),rt=(ze=rt+qe+65535)-65536*(qe=Math.floor(ze/65536)),it=(ze=it+qe+65535)-65536*(qe=Math.floor(ze/65536)),nt=(ze=nt+qe+65535)-65536*(qe=Math.floor(ze/65536)),ot=(ze=ot+qe+65535)-65536*(qe=Math.floor(ze/65536)),ct=(ze=ct+qe+65535)-65536*(qe=Math.floor(ze/65536)),ht=(ze=ht+qe+65535)-65536*(qe=Math.floor(ze/65536)),ft=(ze=ft+qe+65535)-65536*(qe=Math.floor(ze/65536)),yt=(ze=yt+qe+65535)-65536*(qe=Math.floor(ze/65536)),mt=(ze=mt+qe+65535)-65536*(qe=Math.floor(ze/65536)),kt=(ze=kt+qe+65535)-65536*(qe=Math.floor(ze/65536)),St=(ze=St+qe+65535)-65536*(qe=Math.floor(ze/65536)),Et=(ze=Et+qe+65535)-65536*(qe=Math.floor(ze/65536)),Pt=(ze=Pt+qe+65535)-65536*(qe=Math.floor(ze/65536)),Bt=(ze=Bt+qe+65535)-65536*(qe=Math.floor(ze/65536)),Ve=(ze=(Ve+=qe-1+37*(qe-1))+(qe=1)+65535)-65536*(qe=Math.floor(ze/65536)),tt=(ze=tt+qe+65535)-65536*(qe=Math.floor(ze/65536)),rt=(ze=rt+qe+65535)-65536*(qe=Math.floor(ze/65536)),it=(ze=it+qe+65535)-65536*(qe=Math.floor(ze/65536)),nt=(ze=nt+qe+65535)-65536*(qe=Math.floor(ze/65536)),ot=(ze=ot+qe+65535)-65536*(qe=Math.floor(ze/65536)),ct=(ze=ct+qe+65535)-65536*(qe=Math.floor(ze/65536)),ht=(ze=ht+qe+65535)-65536*(qe=Math.floor(ze/65536)),ft=(ze=ft+qe+65535)-65536*(qe=Math.floor(ze/65536)),yt=(ze=yt+qe+65535)-65536*(qe=Math.floor(ze/65536)),mt=(ze=mt+qe+65535)-65536*(qe=Math.floor(ze/65536)),kt=(ze=kt+qe+65535)-65536*(qe=Math.floor(ze/65536)),St=(ze=St+qe+65535)-65536*(qe=Math.floor(ze/65536)),Et=(ze=Et+qe+65535)-65536*(qe=Math.floor(ze/65536)),Pt=(ze=Pt+qe+65535)-65536*(qe=Math.floor(ze/65536)),Bt=(ze=Bt+qe+65535)-65536*(qe=Math.floor(ze/65536)),Ve+=qe-1+37*(qe-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]=Bt}function S(ke,Ae){A(ke,Ae,Ae)}function E(ke,Ae){var Ce,ze=t();for(Ce=0;Ce<16;Ce++)ze[Ce]=Ae[Ce];for(Ce=253;Ce>=0;Ce--)S(ze,ze),2!==Ce&&4!==Ce&&A(ze,ze,Ae);for(Ce=0;Ce<16;Ce++)ke[Ce]=ze[Ce]}function P(ke,Ae,Ce){var ze,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,ze=tt[Ve>>>3]>>>(7&Ve)&1),b(ot,ct,ze),_(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,qe),_(it,it,ct),A(ot,ot,it),A(it,ct,ft),A(ct,nt,rt),S(nt,ht),b(it,nt,ze),b(ot,ct,ze);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(),ze=t(),qe=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),_(ze,ke[0],ke[1]),_(ct,Ae[0],Ae[1]),A(ze,ze,ct),A(qe,ke[3],Ae[3]),A(qe,qe,tt),A(Ve,ke[2],Ae[2]),_(Ve,Ve,Ve),k(rt,ze,Ce),k(it,Ve,qe),_(nt,Ve,qe),_(ot,ze,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 ze;for(ze=0;ze<4;ze++)b(ke[ze],Ae[ze],Ce)}function K(ke,Ae){var Ce=t(),ze=t(),qe=t();E(qe,Ae[2]),A(Ce,Ae[0],qe),A(ze,Ae[1],qe),m(ke,ze),ke[31]^=w(Ce)<<7}function D(ke,Ae,qe){var Ve,tt;for(p(ke[0],Ce),p(ke[1],ze),p(ke[2],ze),p(ke[3],Ce),tt=255;tt>=0;--tt)C(ke,Ae,Ve=qe[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],ze),A(Ce[3],rt,it),D(ke,Ce,Ae)}function I(Ae,Ce,ze){var qe,Ve,tt=[t(),t(),t(),t()];for(ze||r(Ce,32),(qe=ke.hash(Ce.subarray(0,32)))[0]&=248,qe[31]&=127,qe[31]|=64,R(tt,qe),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,ze,qe,Ve;for(ze=63;ze>=32;--ze){for(Ce=0,qe=ze-32,Ve=ze-12;qe<Ve;++qe)Ae[qe]+=Ce-16*Ae[ze]*ot[qe-(ze-32)],Ce=Math.floor((Ae[qe]+128)/256),Ae[qe]-=256*Ce;Ae[qe]+=Ce,Ae[ze]=0}for(Ce=0,qe=0;qe<32;qe++)Ae[qe]+=Ce-(Ae[31]>>4)*ot[qe],Ce=Ae[qe]>>8,Ae[qe]&=255;for(qe=0;qe<32;qe++)Ae[qe]-=Ce*ot[qe];for(ze=0;ze<32;ze++)Ae[ze+1]+=Ae[ze]>>8,ke[ze]=255&Ae[ze]}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 qe=t(),tt=t(),rt=t(),it=t(),ot=t(),ct=t(),ht=t();return p(ke[2],ze),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(qe,ht,rt),A(qe,qe,it),function(ke,Ae){var Ce,ze=t();for(Ce=0;Ce<16;Ce++)ze[Ce]=Ae[Ce];for(Ce=250;Ce>=0;Ce--)S(ze,ze),1!==Ce&&A(ze,ze,Ae);for(Ce=0;Ce<16;Ce++)ke[Ce]=ze[Ce]}(qe,qe),A(qe,qe,rt),A(qe,qe,it),A(qe,qe,it),A(ke[0],qe,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),ze=new Uint8Array(32);return ke=Ce,r(Ae=ze,32),x(ke,Ae),{publicKey:Ce,secretKey:ze}},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 ze=new Uint8Array(ct+Ae.length);return function(Ae,Ce,ze,qe){var Ve,tt,rt,it,nt,ot=new Float64Array(64),ct=[t(),t(),t(),t()];(Ve=ke.hash(qe.subarray(0,32)))[0]&=248,Ve[31]&=127,Ve[31]|=64;var ht=ze+64;for(it=0;it<ze;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]=qe[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)}(ze,Ae,Ae.length,Ce),ze},ke.sign.detached=function(Ae,Ce){for(var ze=ke.sign(Ae,Ce),qe=new Uint8Array(ct),Ve=0;Ve<qe.length;Ve++)qe[Ve]=ze[Ve];return qe},ke.sign.detached.verify=function(Ae,Ce,ze){if(O(Ae,Ce,ze),Ce.length!==ct)throw Error("bad signature size");if(32!==ze.length)throw Error("bad public key size");var qe,Ve=new Uint8Array(ct+Ae.length),tt=new Uint8Array(ct+Ae.length);for(qe=0;qe<ct;qe++)Ve[qe]=Ce[qe];for(qe=0;qe<Ae.length;qe++)Ve[qe+ct]=Ae[qe];return function(Ae,Ce,ze,qe){var Ve,tt,rt=new Uint8Array(32),it=[t(),t(),t(),t()],nt=[t(),t(),t(),t()];if(ze<64)return-1;if(z(nt,qe))return-1;for(Ve=0;Ve<ze;Ve++)Ae[Ve]=Ce[Ve];for(Ve=0;Ve<32;Ve++)Ae[Ve+32]=qe[Ve];if(T(tt=ke.hash(Ae.subarray(0,ze))),D(it,nt,tt),R(nt,Ce.subarray(32)),M(it,nt),K(rt,it),ze-=64,l(Ce,0,rt,0)){for(Ve=0;Ve<ze;Ve++)Ae[Ve]=0;return-1}for(Ve=0;Ve<ze;Ve++)Ae[Ve]=Ce[Ve+64];return ze}(tt,Ve,Ve.length,ze)>=0},ke.sign.keyPair=function(){var ke=new Uint8Array(32),Ae=new Uint8Array(64);return I(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),ze=0;ze<32;ze++)Ce[ze]=ke[ze];return I(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 ze,qe=new Uint8Array(Ce);for(ze=0;ze<Ce;ze+=65536)Ae.getRandomValues(qe.subarray(ze,ze+Math.min(Ce-ze,65536)));for(ze=0;ze<Ce;ze++)ke[ze]=qe[ze];F(qe)}))}else(Ae=ft.default)&&Ae.randomBytes&&ke.setPRNG((function(ke,Ce){var ze,qe=Ae.randomBytes(Ce);for(ze=0;ze<Ce;ze++)ke[ze]=qe[ze];F(qe)}))}()}(ke.exports?ke.exports:self.nacl=self.nacl||{})}));const ys=Zt.getNodeCrypto();async function Bi(ke){const Ae=new Uint8Array(ke);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(Ae);else if(ys){const ke=ys.randomBytes(Ae.length);Ae.set(ke)}else{if(!_s.buffer)throw Error("No secure random number generator available.");await _s.get(Ae)}return Ae}async function Ti(ke,Ae){const Ce=await Zt.getBigInteger();if(Ae.lt(ke))throw Error("Illegal parameter value: max <= min");const ze=Ae.sub(ke),qe=ze.byteLength();return new Ce(await Bi(qe+8)).mod(ze).add(ke)}const _s=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 ks=Object.freeze({__proto__:null,getRandomBytes:Bi,getRandomBigInteger:Ti,randomBuffer:_s});async function Oi(ke,Ae,Ce){const ze=await Zt.getBigInteger(),qe=new ze(1),Ve=qe.leftShift(new ze(ke-1)),tt=new ze(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 Ti(Ve,Ve.leftShift(qe));let nt=it.mod(tt).toNumber();do{it.iadd(new ze(rt[nt])),nt=(nt+rt[nt])%rt.length,it.bitLength()>ke&&(it.imod(Ve.leftShift(qe)).iadd(Ve),nt=it.mod(tt).toNumber())}while(!await Fi(it,Ae,Ce));return it}async function Fi(ke,Ae,Ce){return!(Ae&&!ke.dec().gcd(Ae).isOne())&&(!!await async function(ke){const Ae=await Zt.getBigInteger();return As.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 ze=await Zt.getBigInteger(),qe=ke.bitLength();Ae||(Ae=Math.max(1,qe/48|0));const Ve=ke.dec();let tt=0;for(;!Ve.getBit(tt);)tt++;const rt=ke.rightShift(new ze(tt));for(;Ae>0;Ae--){let Ae,qe=(Ce?Ce():await Ti(new ze(2),Ve)).modExp(rt,ke);if(!qe.isOne()&&!qe.equal(Ve)){for(Ae=1;Ae<tt;Ae++){if(qe=qe.mul(qe).mod(ke),qe.isOne())return!1;if(qe.equal(Ve))break}if(Ae===tt)return!1}}return!0}(ke,Ce)))}const As=[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 Bs=[];async function Li(ke,Ae){const Ce=ke.length;if(Ce>Ae-11)throw Error("Message too long");const ze=await async function(ke){const Ae=new Uint8Array(ke);let Ce=0;for(;Ce<ke;){const ze=await Bi(ke-Ce);for(let ke=0;ke<ze.length;ke++)0!==ze[ke]&&(Ae[Ce++]=ze[ke])}return Ae}(Ae-Ce-3),qe=new Uint8Array(Ae);return qe[1]=2,qe.set(ze,2),qe.set(ke,Ae-Ce),qe}function Wi(ke,Ae){let Ce=2,ze=1;for(let Ae=Ce;Ae<ke.length;Ae++)ze&=0!==ke[Ae],Ce+=ze;const qe=Ce-2,Ve=ke.subarray(Ce+1),tt=0===ke[0]&2===ke[1]&qe>=8&!ze;if(Ae)return Zt.selectUint8Array(tt,Ve,Ae);if(tt)return Ve;throw Error("Decryption error")}async function Hi(ke,Ae,Ce){let ze;if(Ae.length!==An.getHashByteLength(ke))throw Error("Invalid hash length");const qe=new Uint8Array(Bs[ke].length);for(ze=0;ze<Bs[ke].length;ze++)qe[ze]=Bs[ke][ze];const Ve=qe.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(qe,Ce-Ve),rt.set(Ae,Ce-Ae.length),rt}Bs[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],Bs[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],Bs[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],Bs[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],Bs[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],Bs[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],Bs[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];var Rs=Object.freeze({__proto__:null,emeEncode:Li,emeDecode:Wi,emsaEncode:Hi});const Ts=Zt.getWebCrypto(),Ks=Zt.getNodeCrypto(),Us=Ks?St.default:void 0,Os=Zt.detectNode()?Us.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,qs=Zt.detectNode()?Us.define("RSAPubliceKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})):void 0;var ea=Object.freeze({__proto__:null,sign:async function(ke,Ae,Ce,ze,qe,Ve,tt,rt,it){if(Ae&&!Zt.isStream(Ae))if(Zt.getWebCrypto())try{return await async function(ke,Ae,Ce,ze,qe,Ve,tt,rt){const it=await async function(ke,Ae,Ce,ze,qe,Ve){const tt=await Zt.getBigInteger(),rt=new tt(ze),it=new tt(qe),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(qe,!0),q:ye(ze,!0),dp:ye(ot,!0),dq:ye(ct,!0),qi:ye(Ve,!0),ext:!0}}(Ce,ze,qe,Ve,tt,rt),nt={name:"RSASSA-PKCS1-v1_5",hash:{name:ke}},ot=await Ts.importKey("jwk",it,nt,!1,["sign"]);return new Uint8Array(await Ts.sign("RSASSA-PKCS1-v1_5",ot,Ae))}(er.read(er.webHash,ke),Ae,Ce,ze,qe,Ve,tt,rt)}catch(ke){Zt.printDebugError(ke)}else if(Zt.getNodeCrypto())return async function(ke,Ae,Ce,ze,qe,Ve,tt,rt){const{default:it}=await Promise.resolve().then((function(){return Od})),nt=new it(Ve),ot=new it(tt),ct=new it(qe),ht=ct.mod(ot.subn(1)),ft=ct.mod(nt.subn(1)),yt=Ks.createSign(er.read(er.hash,ke));yt.write(Ae),yt.end();const mt={version:0,modulus:new it(Ce),publicExponent:new it(ze),privateExponent:new it(qe),prime1:new it(tt),prime2:new it(Ve),exponent1:ht,exponent2:ft,coefficient:new it(rt)};if(void 0!==Ks.createPrivateKey){const ke=Os.encode(mt,"der");return new Uint8Array(yt.sign({key:ke,format:"der",type:"pkcs1"}))}const kt=Os.encode(mt,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(yt.sign(kt))}(ke,Ae,Ce,ze,qe,Ve,tt,rt);return async function(ke,Ae,Ce,ze){const qe=await Zt.getBigInteger();Ae=new qe(Ae);const Ve=new qe(await Hi(ke,ze,Ae.byteLength()));if(Ce=new qe(Ce),Ve.gte(Ae))throw Error("Message size cannot exceed modulus size");return Ve.modExp(Ce,Ae).toUint8Array("be",Ae.byteLength())}(ke,Ce,qe,it)},verify:async function(ke,Ae,Ce,ze,qe,Ve){if(Ae&&!Zt.isStream(Ae))if(Zt.getWebCrypto())try{return await async function(ke,Ae,Ce,ze,qe){const Ve=function(ke,Ae){return{kty:"RSA",n:ye(ke,!0),e:ye(Ae,!0),ext:!0}}(ze,qe),tt=await Ts.importKey("jwk",Ve,{name:"RSASSA-PKCS1-v1_5",hash:{name:ke}},!1,["verify"]);return Ts.verify("RSASSA-PKCS1-v1_5",tt,Ce,Ae)}(er.read(er.webHash,ke),Ae,Ce,ze,qe)}catch(ke){Zt.printDebugError(ke)}else if(Zt.getNodeCrypto())return async function(ke,Ae,Ce,ze,qe){const{default:Ve}=await Promise.resolve().then((function(){return Od})),tt=Ks.createVerify(er.read(er.hash,ke));tt.write(Ae),tt.end();const rt={modulus:new Ve(ze),publicExponent:new Ve(qe)};let it;if(void 0!==Ks.createPrivateKey){it={key:qs.encode(rt,"der"),format:"der",type:"pkcs1"}}else it=qs.encode(rt,"pem",{label:"RSA PUBLIC KEY"});try{return await tt.verify(it,Ce)}catch(ke){return!1}}(ke,Ae,Ce,ze,qe);return async function(ke,Ae,Ce,ze,qe){const Ve=await Zt.getBigInteger();if(Ce=new Ve(Ce),Ae=new Ve(Ae),ze=new Ve(ze),Ae.gte(Ce))throw Error("Signature size cannot exceed modulus size");const tt=Ae.modExp(ze,Ce).toUint8Array("be",Ce.byteLength()),rt=await Hi(ke,qe,Ce.byteLength());return Zt.equalsUint8Array(tt,rt)}(ke,Ce,ze,qe,Ve)},encrypt:async function(ke,Ae,Ce){return Zt.getNodeCrypto()?async function(ke,Ae,Ce){const{default:ze}=await Promise.resolve().then((function(){return Od})),qe={modulus:new ze(Ae),publicExponent:new ze(Ce)};let Ve;if(void 0!==Ks.createPrivateKey){Ve={key:qs.encode(qe,"der"),format:"der",type:"pkcs1",padding:Ks.constants.RSA_PKCS1_PADDING}}else{Ve={key:qs.encode(qe,"pem",{label:"RSA PUBLIC KEY"}),padding:Ks.constants.RSA_PKCS1_PADDING}}return new Uint8Array(Ks.publicEncrypt(Ve,ke))}(ke,Ae,Ce):async function(ke,Ae,Ce){const ze=await Zt.getBigInteger();if(Ae=new ze(Ae),ke=new ze(await Li(ke,Ae.byteLength())),Ce=new ze(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,ze,qe,Ve,tt,rt){return Zt.getNodeCrypto()?async function(ke,Ae,Ce,ze,qe,Ve,tt,rt){const{default:it}=await Promise.resolve().then((function(){return Od})),nt=new it(qe),ot=new it(Ve),ct=new it(ze),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(ze),prime1:new it(Ve),prime2:new it(qe),exponent1:ht,exponent2:ft,coefficient:new it(tt)};let mt;if(void 0!==Ks.createPrivateKey){mt={key:Os.encode(yt,"der"),format:"der",type:"pkcs1",padding:Ks.constants.RSA_PKCS1_PADDING}}else{mt={key:Os.encode(yt,"pem",{label:"RSA PRIVATE KEY"}),padding:Ks.constants.RSA_PKCS1_PADDING}}try{return new Uint8Array(Ks.privateDecrypt(mt,ke))}catch(ke){if(rt)return rt;throw Error("Decryption error")}}(ke,Ae,Ce,ze,qe,Ve,tt,rt):async function(ke,Ae,Ce,ze,qe,Ve,tt,rt){const it=await Zt.getBigInteger();if(ke=new it(ke),Ae=new it(Ae),Ce=new it(Ce),ze=new it(ze),qe=new it(qe),Ve=new it(Ve),tt=new it(tt),ke.gte(Ae))throw Error("Data too large.");const nt=ze.mod(Ve.dec()),ot=ze.mod(qe.dec()),ct=(await Ti(new it(2),Ae)).mod(Ae),ht=ct.modInv(Ae).modExp(Ce,Ae),ft=(ke=ke.mul(ht).mod(Ae)).modExp(ot,qe),yt=ke.modExp(nt,Ve);let mt=tt.mul(yt.sub(ft)).mod(Ve).mul(qe).add(ft);return mt=mt.mul(ct).mod(Ae),Wi(mt.toUint8Array("be",Ae.byteLength()),rt)}(ke,Ae,Ce,ze,qe,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"}},ze=await Ts.generateKey(Ce,!0,["sign","verify"]),qe=await Ts.exportKey("jwk",ze.privateKey);return{n:pe(qe.n),e:Ae.toUint8Array(),d:pe(qe.d),p:pe(qe.q),q:pe(qe.p),u:pe(qe.qi)}}if(Zt.getNodeCrypto()&&Ks.generateKeyPair&&Os){const Ce={modulusLength:ke,publicExponent:Ae.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},ze=await new Promise(((ke,Ae)=>Ks.generateKeyPair("rsa",Ce,((Ce,ze,qe)=>{Ce?Ae(Ce):ke(Os.decode(qe,"der"))}))));return{n:ze.modulus.toArrayLike(Uint8Array),e:ze.publicExponent.toArrayLike(Uint8Array),d:ze.privateExponent.toArrayLike(Uint8Array),p:ze.prime2.toArrayLike(Uint8Array),q:ze.prime1.toArrayLike(Uint8Array),u:ze.coefficient.toArrayLike(Uint8Array)}}let Ce,ze,qe;do{ze=await Oi(ke-(ke>>1),Ae,40),Ce=await Oi(ke>>1,Ae,40),qe=Ce.mul(ze)}while(qe.bitLength()!==ke);const Ve=Ce.dec().imul(ze.dec());return ze.lt(Ce)&&([Ce,ze]=[ze,Ce]),{n:qe.toUint8Array(),e:Ae.toUint8Array(),d:Ae.modInv(Ve).toUint8Array(),p:Ce.toUint8Array(),q:ze.toUint8Array(),u:Ce.modInv(ze).toUint8Array()}},validateParams:async function(ke,Ae,Ce,ze,qe,Ve){const tt=await Zt.getBigInteger();if(ke=new tt(ke),ze=new tt(ze),qe=new tt(qe),!ze.mul(qe).equal(ke))return!1;const rt=new tt(2);if(Ve=new tt(Ve),!ze.mul(Ve).mod(qe).isOne())return!1;Ae=new tt(Ae),Ce=new tt(Ce);const it=new tt(Math.floor(ke.bitLength()/3)),nt=await Ti(rt,rt.leftShift(it)),ot=nt.mul(Ce).mul(Ae);return!(!ot.mod(ze.dec()).equal(nt)||!ot.mod(qe.dec()).equal(nt))}});var ta=Object.freeze({__proto__:null,encrypt:async function(ke,Ae,Ce,ze){const qe=await Zt.getBigInteger();Ae=new qe(Ae),Ce=new qe(Ce),ze=new qe(ze);const Ve=new qe(await Li(ke,Ae.byteLength())),tt=await Ti(new qe(1),Ae.dec());return{c1:Ce.modExp(tt,Ae).toUint8Array(),c2:ze.modExp(tt,Ae).imul(Ve).imod(Ae).toUint8Array()}},decrypt:async function(ke,Ae,Ce,ze,qe){const Ve=await Zt.getBigInteger();return ke=new Ve(ke),Ae=new Ve(Ae),Ce=new Ve(Ce),ze=new Ve(ze),Wi(ke.modExp(ze,Ce).modInv(Ce).imul(Ae).imod(Ce).toUint8Array("be",Ce.byteLength()),qe)},validateParams:async function(ke,Ae,Ce,ze){const qe=await Zt.getBigInteger();ke=new qe(ke),Ae=new qe(Ae),Ce=new qe(Ce);const Ve=new qe(1);if(Ae.lte(Ve)||Ae.gte(ke))return!1;const tt=new qe(ke.bitLength()),rt=new qe(1023);if(tt.lt(rt))return!1;if(!Ae.modExp(ke.dec(),ke).isOne())return!1;let it=Ae;const nt=new qe(1),ot=new qe(2).leftShift(new qe(17));for(;nt.lt(ot);){if(it=it.mul(Ae).imod(ke),it.isOne())return!1;nt.iinc()}ze=new qe(ze);const ct=new qe(2),ht=await Ti(ct.leftShift(tt.dec()),ct.leftShift(tt)),ft=ke.dec().imul(ht).iadd(ze);return!!Ce.equal(Ae.modExp(ft,ke))}});class en{constructor(ke){if(ke instanceof en)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 tn(ke,Ae){return ke.keyPair({priv:Ae})}function rn(ke,Ae){const Ce=ke.keyPair({pub:Ae});if(!0!==Ce.validate().result)throw Error("Invalid elliptic public key");return Ce}async function nn(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 qp}));return new Ae.ec(ke)}const ra=Zt.getWebCrypto(),ia=Zt.getNodeCrypto(),sa={p256:"P-256",p384:"P-384",p521:"P-521"},aa=ia?ia.getCurves():[],oa=ia?{secp256k1:aa.includes("secp256k1")?"secp256k1":void 0,p256:aa.includes("prime256v1")?"prime256v1":void 0,p384:aa.includes("secp384r1")?"secp384r1":void 0,p521:aa.includes("secp521r1")?"secp521r1":void 0,ed25519:aa.includes("ED25519")?"ED25519":void 0,curve25519:aa.includes("X25519")?"X25519":void 0,brainpoolP256r1:aa.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:aa.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:aa.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},ca={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:oa.p256,web:sa.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:oa.p384,web:sa.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:oa.p521,web:sa.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:oa.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:oa.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:oa.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:oa.brainpoolP512r1,payloadSize:64}};class fn{constructor(ke,Ae){try{(Zt.isArray(ke)||Zt.isUint8Array(ke))&&(ke=new en(ke)),ke instanceof en&&(ke=ke.getName()),this.name=er.write(er.curve,ke)}catch(ke){throw Error("Not valid curve")}Ae=Ae||ca[this.name],this.keyType=Ae.keyType,this.oid=Ae.oid,this.hash=Ae.hash,this.cipher=Ae.cipher,this.node=Ae.node&&ca[this.name],this.web=Ae.web&&ca[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 ra.generateKey({name:"ECDSA",namedCurve:sa[ke]},!0,["sign","verify"]),Ce=await ra.exportKey("jwk",Ae.privateKey);return{publicKey:ln(await ra.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=ia.createECDH(oa[ke]);return await Ae.generateKeys(),{publicKey:new Uint8Array(Ae.getPublicKey()),privateKey:new Uint8Array(Ae.getPrivateKey())}}(this.name);case"curve25519":{const Ae=await Bi(32);Ae[0]=127&Ae[0]|64,Ae[31]&=248;const Ce=Ae.slice().reverse();ke=ps.box.keyPair.fromSecretKey(Ce);return{publicKey:Zt.concatUint8Array([new Uint8Array([64]),ke.publicKey]),privateKey:Ae}}case"ed25519":{const ke=await Bi(32),Ae=ps.sign.keyPair.fromSeed(ke);return{publicKey:Zt.concatUint8Array([new Uint8Array([64]),Ae.publicKey]),privateKey:ke}}}const Ae=await nn(this.name);return ke=await Ae.genKeyPair({entropy:Zt.uint8ArrayToString(await Bi(32))}),{publicKey:new Uint8Array(ke.getPublic("array",!1)),privateKey:ke.getPrivate().toArrayLike(Uint8Array)}}}async function dn(ke,Ae,Ce,ze){const qe={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:ke===er.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},Ve=Ae.getName();if(!qe[Ve])return!1;if("curve25519"===Ve){ze=ze.slice().reverse();const{publicKey:ke}=ps.box.keyPair.fromSecretKey(ze);Ce=new Uint8Array(Ce);const Ae=new Uint8Array([64,...ke]);return!!Zt.equalsUint8Array(Ae,Ce)}const tt=await nn(Ve);try{Ce=rn(tt,Ce).getPublic()}catch(ke){return!1}return!!tn(tt,ze).getPublic().eq(Ce)}function ln(ke){const Ae=pe(ke.x),Ce=pe(ke.y),ze=new Uint8Array(Ae.length+Ce.length+1);return ze[0]=4,ze.set(Ae,1),ze.set(Ce,Ae.length+1),ze}function pn(ke,Ae,Ce){const ze=ke,qe=Ce.slice(1,ze+1),Ve=Ce.slice(ze+1,2*ze+1);return{kty:"EC",crv:Ae,x:ye(qe,!0),y:ye(Ve,!0),ext:!0}}function yn(ke,Ae,Ce,ze){const qe=pn(ke,Ae,Ce);return qe.d=ye(ze,!0),qe}const ua=Zt.getWebCrypto(),ha=Zt.getNodeCrypto();async function gn(ke,Ae,Ce,ze,qe,Ve){const tt=new fn(ke);if(Ce&&!Zt.isStream(Ce)){const Ve={publicKey:ze,privateKey:qe};switch(tt.type){case"web":try{return await async function(ke,Ae,Ce,ze){const qe=ke.payloadSize,Ve=yn(ke.payloadSize,sa[ke.name],ze.publicKey,ze.privateKey),tt=await ua.importKey("jwk",Ve,{name:"ECDSA",namedCurve:sa[ke.name],hash:{name:er.read(er.webHash,ke.hash)}},!1,["sign"]),rt=new Uint8Array(await ua.sign({name:"ECDSA",namedCurve:sa[ke.name],hash:{name:er.read(er.webHash,Ae)}},tt,Ce));return{r:rt.slice(0,qe),s:rt.slice(qe,qe<<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,ze){const qe=ha.createSign(er.read(er.hash,Ae));qe.write(Ce),qe.end();const Ve=da.encode({version:1,parameters:ke.oid,privateKey:Array.from(ze.privateKey),publicKey:{unused:0,data:Array.from(ze.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return la.decode(qe.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 ze=await nn(ke.name),qe=tn(ze,Ce).sign(Ae);return{r:qe.r.toArrayLike(Uint8Array),s:qe.s.toArrayLike(Uint8Array)}}(tt,Ve,qe)}async function wn(ke,Ae,Ce,ze,qe,Ve){const tt=new fn(ke);if(ze&&!Zt.isStream(ze))switch(tt.type){case"web":try{return await async function(ke,Ae,{r:Ce,s:ze},qe,Ve){const tt=pn(ke.payloadSize,sa[ke.name],Ve),rt=await ua.importKey("jwk",tt,{name:"ECDSA",namedCurve:sa[ke.name],hash:{name:er.read(er.webHash,ke.hash)}},!1,["verify"]),it=Zt.concatUint8Array([Ce,ze]).buffer;return ua.verify({name:"ECDSA",namedCurve:sa[ke.name],hash:{name:er.read(er.webHash,Ae)}},rt,it,qe)}(tt,Ae,Ce,ze,qe)}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:ze},qe,Ve){const{default:tt}=await Promise.resolve().then((function(){return Od})),rt=ha.createVerify(er.read(er.hash,Ae));rt.write(qe),rt.end();const it=ma.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:ke.oid},subjectPublicKey:{unused:0,data:Array.from(Ve)}},"pem",{label:"PUBLIC KEY"}),nt=la.encode({r:new tt(Ce),s:new tt(ze)},"der");try{return rt.verify(it,nt)}catch(ke){return!1}}(tt,Ae,Ce,ze,qe)}return async function(ke,Ae,Ce,ze){const qe=await nn(ke.name);return rn(qe,ze).verify(Ce,Ae)}(tt,Ce,void 0===Ae?ze:Ve,qe)}const fa=ha?St.default:void 0,la=ha?fa.define("ECDSASignature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})):void 0,da=ha?fa.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,pa=ha?fa.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())})):void 0,ma=ha?fa.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(pa),this.key("subjectPublicKey").bitstr())})):void 0;var ga=Object.freeze({__proto__:null,sign:gn,verify:wn,validateParams:async function(ke,Ae,Ce){const ze=new fn(ke);if(ze.keyType!==er.publicKey.ecdsa)return!1;switch(ze.type){case"web":case"node":{const ze=await Bi(8),qe=er.hash.sha256,Ve=await An.digest(qe,ze);try{const tt=await gn(ke,qe,ze,Ae,Ce,Ve);return await wn(ke,qe,tt,ze,Ae,Ve)}catch(ke){return!1}}default:return dn(er.publicKey.ecdsa,ke,Ae,Ce)}}});ps.hash=ke=>new Uint8Array(Vi().update(ke).digest());var ba=Object.freeze({__proto__:null,sign:async function(ke,Ae,Ce,ze,qe,Ve){if(An.getHashByteLength(Ae)<An.getHashByteLength(er.hash.sha256))throw Error("Hash algorithm too weak: sha256 or stronger is required for EdDSA.");const tt=Zt.concatUint8Array([qe,ze.subarray(1)]),rt=ps.sign.detached(Ve,tt);return{r:rt.subarray(0,32),s:rt.subarray(32)}},verify:async function(ke,Ae,{r:Ce,s:ze},qe,Ve,tt){const rt=Zt.concatUint8Array([Ce,ze]);return ps.sign.detached.verify(tt,rt,Ve.subarray(1))},validateParams:async function(ke,Ae,Ce){if("ed25519"!==ke.getName())return!1;const{publicKey:ze}=ps.sign.keyPair.fromSeed(Ce),qe=new Uint8Array([64,...ze]);return Zt.equalsUint8Array(Ae,qe)}});function xn(ke,Ae){const Ce=new Er["aes"+8*ke.length](ke),ze=new Uint32Array([2795939494,2795939494]),qe=Cn(Ae);let Ve=ze;const tt=qe,rt=qe.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=Cn(Ce.encrypt(Kn(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 Kn(Ve,tt)}function Mn(ke,Ae){const Ce=new Er["aes"+8*ke.length](ke),ze=new Uint32Array([2795939494,2795939494]),qe=Cn(Ae);let Ve=qe.subarray(0,2);const tt=qe.subarray(2),rt=qe.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=Cn(Ce.decrypt(Kn(nt))),Ve=nt.subarray(0,2),tt[2*Ae]=nt[2],tt[2*Ae+1]=nt[3];if(Ve[0]===ze[0]&&Ve[1]===ze[1])return Kn(tt);throw Error("Key Data Integrity failed")}function Cn(ke){const{length:Ae}=ke,Ce=function(ke){if(Zt.isString(ke)){const{length:Ae}=ke,Ce=new ArrayBuffer(Ae),ze=new Uint8Array(Ce);for(let Ce=0;Ce<Ae;++Ce)ze[Ce]=ke.charCodeAt(Ce);return Ce}return new Uint8Array(ke).buffer}(ke),ze=new DataView(Ce),qe=new Uint32Array(Ae/4);for(let ke=0;ke<Ae/4;++ke)qe[ke]=ze.getUint32(4*ke);return qe}function Kn(){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 ze=0;for(let ke=0;ke<arguments.length;++ke){for(let Ae=0;Ae<arguments[ke].length;++Ae)Ce.setUint32(ze+4*Ae,arguments[ke][Ae]);ze+=4*arguments[ke].length}return new Uint8Array(Ae)}var Ua=Object.freeze({__proto__:null,wrap:xn,unwrap:Mn});function Rn(ke){const Ae=8-ke.length%8,Ce=new Uint8Array(ke.length+Ae).fill(Ae);return Ce.set(ke),Ce}function In(ke){const Ae=ke.length;if(Ae>0){const Ce=ke[Ae-1];if(Ce>=1){const ze=ke.subarray(Ae-Ce),qe=new Uint8Array(Ce).fill(Ce);if(Zt.equalsUint8Array(ze,qe))return ke.subarray(0,Ae-Ce)}}throw Error("Invalid padding")}var Na=Object.freeze({__proto__:null,encode:Rn,decode:In});class Bn{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 Tn{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 zn(ke){const Ae=er.read(er.symmetric,ke);return Er[Ae]}var La=Object.freeze({__proto__:null,publicKeyEncrypt:async function(ke,Ae,Ce,ze){switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:{const{n:ke,e:ze}=Ae;return{c:await uo.rsa.encrypt(Ce,ke,ze)}}case er.publicKey.elgamal:{const{p:ke,g:ze,y:qe}=Ae;return uo.elgamal.encrypt(Ce,ke,ze,qe)}case er.publicKey.ecdh:{const{oid:ke,Q:qe,kdfParams:Ve}=Ae,{publicKey:tt,wrappedKey:rt}=await uo.elliptic.ecdh.encrypt(ke,Ve,Ce,qe,ze);return{V:tt,C:new Bn(rt)}}default:return[]}},publicKeyDecrypt:async function(ke,Ae,Ce,ze,qe,Ve){switch(ke){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaEncrypt:{const{c:ke}=ze,{n:qe,e:tt}=Ae,{d:rt,p:it,q:nt,u:ot}=Ce;return uo.rsa.decrypt(ke,qe,tt,rt,it,nt,ot,Ve)}case er.publicKey.elgamal:{const{c1:ke,c2:qe}=ze,tt=Ae.p,rt=Ce.x;return uo.elgamal.decrypt(ke,qe,tt,rt,Ve)}case er.publicKey.ecdh:{const{oid:ke,Q:Ve,kdfParams:tt}=Ae,{d:rt}=Ce,{V:it,C:nt}=ze;return uo.elliptic.ecdh.decrypt(ke,tt,it,nt.data,Ve,rt,qe)}default:throw Error("Invalid 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 ze=Zt.readMPI(Ae.subarray(Ce));return Ce+=ze.length+2,{read:Ce,publicParams:{n:ke,e:ze}}}case er.publicKey.dsa:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;const ze=Zt.readMPI(Ae.subarray(Ce));Ce+=ze.length+2;const qe=Zt.readMPI(Ae.subarray(Ce));Ce+=qe.length+2;const Ve=Zt.readMPI(Ae.subarray(Ce));return Ce+=Ve.length+2,{read:Ce,publicParams:{p:ke,q:ze,g:qe,y:Ve}}}case er.publicKey.elgamal:{const ke=Zt.readMPI(Ae.subarray(Ce));Ce+=ke.length+2;const ze=Zt.readMPI(Ae.subarray(Ce));Ce+=ze.length+2;const qe=Zt.readMPI(Ae.subarray(Ce));return Ce+=qe.length+2,{read:Ce,publicParams:{p:ke,g:ze,y:qe}}}case er.publicKey.ecdsa:{const ke=new en;Ce+=ke.read(Ae);const ze=Zt.readMPI(Ae.subarray(Ce));return Ce+=ze.length+2,{read:Ce,publicParams:{oid:ke,Q:ze}}}case er.publicKey.eddsa:{const ke=new en;Ce+=ke.read(Ae);let ze=Zt.readMPI(Ae.subarray(Ce));return Ce+=ze.length+2,ze=Zt.leftPad(ze,33),{read:Ce,publicParams:{oid:ke,Q:ze}}}case er.publicKey.ecdh:{const ke=new en;Ce+=ke.read(Ae);const ze=Zt.readMPI(Ae.subarray(Ce));Ce+=ze.length+2;const qe=new Tn;return Ce+=qe.read(Ae.subarray(Ce)),{read:Ce,publicParams:{oid:ke,Q:ze,kdfParams:qe}}}default:throw Error("Invalid public key encryption algorithm.")}},parsePrivateKeyParams:function(ke,Ae,Ce){let ze=0;switch(ke){case er.publicKey.rsaEncrypt:case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:{const ke=Zt.readMPI(Ae.subarray(ze));ze+=ke.length+2;const Ce=Zt.readMPI(Ae.subarray(ze));ze+=Ce.length+2;const qe=Zt.readMPI(Ae.subarray(ze));ze+=qe.length+2;const Ve=Zt.readMPI(Ae.subarray(ze));return ze+=Ve.length+2,{read:ze,privateParams:{d:ke,p:Ce,q:qe,u:Ve}}}case er.publicKey.dsa:case er.publicKey.elgamal:{const ke=Zt.readMPI(Ae.subarray(ze));return ze+=ke.length+2,{read:ze,privateParams:{x:ke}}}case er.publicKey.ecdsa:case er.publicKey.ecdh:{const ke=new fn(Ce.oid);let qe=Zt.readMPI(Ae.subarray(ze));return ze+=qe.length+2,qe=Zt.leftPad(qe,ke.payloadSize),{read:ze,privateParams:{d:qe}}}case er.publicKey.eddsa:{let ke=Zt.readMPI(Ae.subarray(ze));return ze+=ke.length+2,ke=Zt.leftPad(ke,32),{read:ze,privateParams:{seed:ke}}}default:throw Error("Invalid 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 ze=new Bn;return ze.read(Ae.subarray(Ce)),{V:ke,C:ze}}default:throw Error("Invalid 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 uo.rsa.generate(Ae,65537).then((({n:ke,e:Ae,d:Ce,p:ze,q:qe,u:Ve})=>({privateParams:{d:Ce,p:ze,q:qe,u:Ve},publicParams:{n:ke,e:Ae}})));case er.publicKey.ecdsa:return uo.elliptic.generate(Ce).then((({oid:ke,Q:Ae,secret:Ce})=>({privateParams:{d:Ce},publicParams:{oid:new en(ke),Q:Ae}})));case er.publicKey.eddsa:return uo.elliptic.generate(Ce).then((({oid:ke,Q:Ae,secret:Ce})=>({privateParams:{seed:Ce},publicParams:{oid:new en(ke),Q:Ae}})));case er.publicKey.ecdh:return uo.elliptic.generate(Ce).then((({oid:ke,Q:Ae,secret:Ce,hash:ze,cipher:qe})=>({privateParams:{d:Ce},publicParams:{oid:new en(ke),Q:Ae,kdfParams:new Tn({hash:ze,cipher:qe})}})));case er.publicKey.dsa:case er.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Invalid 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:ze}=Ae,{d:qe,p:Ve,q:tt,u:rt}=Ce;return uo.rsa.validateParams(ke,ze,qe,Ve,tt,rt)}case er.publicKey.dsa:{const{p:ke,q:ze,g:qe,y:Ve}=Ae,{x:tt}=Ce;return uo.dsa.validateParams(ke,ze,qe,Ve,tt)}case er.publicKey.elgamal:{const{p:ke,g:ze,y:qe}=Ae,{x:Ve}=Ce;return uo.elgamal.validateParams(ke,ze,qe,Ve)}case er.publicKey.ecdsa:case er.publicKey.ecdh:{const ze=uo.elliptic[er.read(er.publicKey,ke)],{oid:qe,Q:Ve}=Ae,{d:tt}=Ce;return ze.validateParams(qe,Ve,tt)}case er.publicKey.eddsa:{const{oid:ke,Q:ze}=Ae,{seed:qe}=Ce;return uo.elliptic.eddsa.validateParams(ke,ze,qe)}default:throw Error("Invalid public key algorithm.")}},getPrefixRandom:async function(ke){const{blockSize:Ae}=zn(ke),Ce=await Bi(Ae),ze=new Uint8Array([Ce[Ce.length-2],Ce[Ce.length-1]]);return Zt.concat([Ce,ze])},generateSessionKey:function(ke){const{keySize:Ae}=zn(ke);return Bi(Ae)},getAEADMode:function(ke){const Ae=er.read(er.aead,ke);return ds[Ae]},getCipher:zn});const eo=Zt.getWebCrypto(),to=Zt.getNodeCrypto();function Nn(ke,Ae,Ce,ze){return Zt.concatUint8Array([Ae.write(),new Uint8Array([ke]),Ce.write(),Zt.stringToUint8Array("Anonymous Sender "),ze.subarray(0,20)])}async function jn(ke,Ae,Ce,ze,qe=!1,Ve=!1){let tt;if(qe){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 An.digest(ke,Zt.concatUint8Array([new Uint8Array([0,0,0,1]),Ae,ze]))).subarray(0,Ce)}async function Ln(ke,Ae){switch(ke.type){case"curve25519":{const Ce=await Bi(32),{secretKey:ze,sharedKey:qe}=await Wn(ke,Ae,null,Ce);let{publicKey:Ve}=ps.box.keyPair.fromSecretKey(ze);return Ve=Zt.concatUint8Array([new Uint8Array([64]),Ve]),{publicKey:Ve,sharedKey:qe}}case"web":if(ke.web&&Zt.getWebCrypto())try{return await async function(ke,Ae){const Ce=pn(ke.payloadSize,ke.web.web,Ae);let ze=eo.generateKey({name:"ECDH",namedCurve:ke.web.web},!0,["deriveKey","deriveBits"]),qe=eo.importKey("jwk",Ce,{name:"ECDH",namedCurve:ke.web.web},!1,[]);[ze,qe]=await Promise.all([ze,qe]);let Ve=eo.deriveBits({name:"ECDH",namedCurve:ke.web.web,public:qe},ze.privateKey,ke.web.sharedSize),tt=eo.exportKey("jwk",ze.publicKey);[Ve,tt]=await Promise.all([Ve,tt]);const rt=new Uint8Array(Ve);return{publicKey:new Uint8Array(ln(tt)),sharedKey:rt}}(ke,Ae)}catch(ke){Zt.printDebugError(ke)}break;case"node":return async function(ke,Ae){const Ce=to.createECDH(ke.node.node);Ce.generateKeys();const ze=new Uint8Array(Ce.computeSecret(Ae));return{publicKey:new Uint8Array(Ce.getPublicKey()),sharedKey:ze}}(ke,Ae)}return async function(ke,Ae){const Ce=await nn(ke.name),ze=await ke.genKeyPair();Ae=rn(Ce,Ae);const qe=tn(Ce,ze.privateKey),Ve=ze.publicKey,tt=qe.derive(Ae.getPublic()),rt=Ce.curve.p.byteLength(),it=tt.toArrayLike(Uint8Array,"be",rt);return{publicKey:Ve,sharedKey:it}}(ke,Ae)}async function Wn(ke,Ae,Ce,ze){if(ze.length!==ke.payloadSize){const Ae=new Uint8Array(ke.payloadSize);Ae.set(ze,ke.payloadSize-ze.length),ze=Ae}switch(ke.type){case"curve25519":{const ke=ze.slice().reverse();return{secretKey:ke,sharedKey:ps.scalarMult(ke,Ae.subarray(1))}}case"web":if(ke.web&&Zt.getWebCrypto())try{return await async function(ke,Ae,Ce,ze){const qe=yn(ke.payloadSize,ke.web.web,Ce,ze);let Ve=eo.importKey("jwk",qe,{name:"ECDH",namedCurve:ke.web.web},!0,["deriveKey","deriveBits"]);const tt=pn(ke.payloadSize,ke.web.web,Ae);let rt=eo.importKey("jwk",tt,{name:"ECDH",namedCurve:ke.web.web},!0,[]);[Ve,rt]=await Promise.all([Ve,rt]);let it=eo.deriveBits({name:"ECDH",namedCurve:ke.web.web,public:rt},Ve,ke.web.sharedSize),nt=eo.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,ze)}catch(ke){Zt.printDebugError(ke)}break;case"node":return async function(ke,Ae,Ce){const ze=to.createECDH(ke.node.node);ze.setPrivateKey(Ce);const qe=new Uint8Array(ze.computeSecret(Ae));return{secretKey:new Uint8Array(ze.getPrivateKey()),sharedKey:qe}}(ke,Ae,ze)}return async function(ke,Ae,Ce){const ze=await nn(ke.name);Ae=rn(ze,Ae),Ce=tn(ze,Ce);const qe=new Uint8Array(Ce.getPrivate()),Ve=Ce.derive(Ae.getPublic()),tt=ze.curve.p.byteLength(),rt=Ve.toArrayLike(Uint8Array,"be",tt);return{secretKey:qe,sharedKey:rt}}(ke,Ae,ze)}var oo=Object.freeze({__proto__:null,validateParams:async function(ke,Ae,Ce){return dn(er.publicKey.ecdh,ke,Ae,Ce)},encrypt:async function(ke,Ae,Ce,ze,qe){const Ve=Rn(Ce),tt=new fn(ke),{publicKey:rt,sharedKey:it}=await Ln(tt,ze),nt=Nn(er.publicKey.ecdh,ke,Ae,qe),{keySize:ot}=zn(Ae.cipher);return{publicKey:rt,wrappedKey:xn(await jn(Ae.hash,it,ot,nt),Ve)}},decrypt:async function(ke,Ae,Ce,ze,qe,Ve,tt){const rt=new fn(ke),{sharedKey:it}=await Wn(rt,Ce,qe,Ve),nt=Nn(er.publicKey.ecdh,ke,Ae,tt),{keySize:ot}=zn(Ae.cipher);let ct;for(let Ce=0;Ce<3;Ce++)try{return In(Mn(await jn(Ae.hash,it,ot,nt,1===Ce,2===Ce),ze))}catch(ke){ct=ke}throw ct}});var uo={rsa:ea,elgamal:ta,elliptic:Object.freeze({__proto__:null,Curve:fn,ecdh:oo,ecdsa:ga,eddsa:ba,generate:async function(ke){const Ae=await Zt.getBigInteger();ke=new fn(ke);const Ce=await ke.genKeyPair(),ze=new Ae(Ce.publicKey).toUint8Array(),qe=new Ae(Ce.privateKey).toUint8Array("be",ke.payloadSize);return{oid:ke.oid,Q:ze,secret:qe,hash:ke.hash,cipher:ke.cipher}},getPreferredHashAlgo:function(ke){return ca[er.write(er.curve,ke.toHex())].hash}}),dsa:Object.freeze({__proto__:null,sign:async function(ke,Ae,Ce,ze,qe,Ve){const tt=await Zt.getBigInteger(),rt=new tt(1);let it,nt,ot,ct;ze=new tt(ze),qe=new tt(qe),Ce=new tt(Ce),Ve=new tt(Ve),Ce=Ce.mod(ze),Ve=Ve.mod(qe);const ht=new tt(Ae.subarray(0,qe.byteLength())).mod(qe);for(;;){if(it=await Ti(rt,qe),nt=Ce.modExp(it,ze).imod(qe),nt.isZero())continue;const ke=Ve.mul(nt).imod(qe);if(ct=ht.add(ke).imod(qe),ot=it.modInv(qe).imul(ct).imod(qe),!ot.isZero())break}return{r:nt.toUint8Array("be",qe.byteLength()),s:ot.toUint8Array("be",qe.byteLength())}},verify:async function(ke,Ae,Ce,ze,qe,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),qe=new it(qe),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(ze.subarray(0,tt.byteLength())).imod(tt),ct=Ce.modInv(tt);if(ct.isZero())return Zt.printDebug("invalid DSA Signature"),!1;qe=qe.mod(Ve),rt=rt.mod(Ve);const ht=ot.mul(ct).imod(tt),ft=Ae.mul(ct).imod(tt),yt=qe.modExp(ht,Ve),mt=rt.modExp(ft,Ve);return yt.mul(mt).imod(Ve).imod(tt).equal(Ae)},validateParams:async function(ke,Ae,Ce,ze,qe){const Ve=await Zt.getBigInteger();ke=new Ve(ke),Ae=new Ve(Ae),Ce=new Ve(Ce),ze=new Ve(ze);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 Fi(Ae,null,32))return!1;qe=new Ve(qe);const nt=new Ve(2),ot=await Ti(nt.leftShift(rt.dec()),nt.leftShift(rt)),ct=Ae.mul(ot).add(qe);return!!ze.equal(Ce.modExp(ct,ke))}}),nacl:ps};var yo=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 ze=Zt.readMPI(Ae.subarray(Ce));return ze=Zt.leftPad(ze,32),{r:ke,s:ze}}default:throw Error("Invalid signature algorithm.")}},verify:async function(ke,Ae,Ce,ze,qe,Ve){switch(ke){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaEncrypt:case er.publicKey.rsaSign:{const{n:ke,e:tt}=ze,rt=Zt.leftPad(Ce.s,ke.length);return uo.rsa.verify(Ae,qe,rt,ke,tt,Ve)}case er.publicKey.dsa:{const{g:ke,p:qe,q:tt,y:rt}=ze,{r:it,s:nt}=Ce;return uo.dsa.verify(Ae,it,nt,Ve,ke,qe,tt,rt)}case er.publicKey.ecdsa:{const{oid:ke,Q:tt}=ze,rt=new uo.elliptic.Curve(ke).payloadSize,it=Zt.leftPad(Ce.r,rt),nt=Zt.leftPad(Ce.s,rt);return uo.elliptic.ecdsa.verify(ke,Ae,{r:it,s:nt},qe,tt,Ve)}case er.publicKey.eddsa:{const{oid:ke,Q:tt}=ze;return uo.elliptic.eddsa.verify(ke,Ae,Ce,qe,tt,Ve)}default:throw Error("Invalid signature algorithm.")}},sign:async function(ke,Ae,Ce,ze,qe,Ve){if(!Ce||!ze)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}=ze;return{s:await uo.rsa.sign(Ae,qe,ke,tt,rt,it,nt,ot,Ve)}}case er.publicKey.dsa:{const{g:ke,p:qe,q:tt}=Ce,{x:rt}=ze;return uo.dsa.sign(Ae,Ve,ke,qe,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}=ze;return uo.elliptic.ecdsa.sign(ke,Ae,qe,tt,rt,Ve)}case er.publicKey.eddsa:{const{oid:ke,Q:tt}=Ce,{seed:rt}=ze;return uo.elliptic.eddsa.sign(ke,Ae,qe,tt,rt,Ve)}default:throw Error("Invalid signature algorithm.")}}});const mo={cipher:Er,hash:An,mode:ds,publicKey:uo,signature:yo,random:ks,pkcs1:Rs,pkcs5:Na,aesKW:Ua};Object.assign(mo,La);var bo="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function Yn(ke,Ae){return ke.length===Ae?ke:ke.subarray?ke.subarray(0,Ae):(ke.length=Ae,ke)}const wo={arraySet:function(ke,Ae,Ce,ze,qe){if(Ae.subarray&&ke.subarray)ke.set(Ae.subarray(Ce,Ce+ze),qe);else for(let Ve=0;Ve<ze;Ve++)ke[qe+Ve]=Ae[Ce+Ve]},flattenChunks:function(ke){let Ae,Ce,ze,qe,Ve;for(ze=0,Ae=0,Ce=ke.length;Ae<Ce;Ae++)ze+=ke[Ae].length;const tt=new Uint8Array(ze);for(qe=0,Ae=0,Ce=ke.length;Ae<Ce;Ae++)Ve=ke[Ae],tt.set(Ve,qe),qe+=Ve.length;return tt}},Eo={arraySet:function(ke,Ae,Ce,ze,qe){for(let Ve=0;Ve<ze;Ve++)ke[qe+Ve]=Ae[Ce+Ve]},flattenChunks:function(ke){return[].concat.apply([],ke)}};let Do=bo?Uint8Array:Array,Uo=bo?Uint16Array:Array,ec=bo?Int32Array:Array,ac=bo?wo.flattenChunks:Eo.flattenChunks,oc=bo?wo.arraySet:Eo.arraySet;function na(ke){let Ae=ke.length;for(;--Ae>=0;)ke[Ae]=0}const cc=[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],uc=[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],lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],gc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Sc=Array(576);na(Sc);const Mc=Array(60);na(Mc);const Pc=Array(512);na(Pc);const Cc=Array(256);na(Cc);const Dc=Array(29);na(Dc);const Rc=Array(30);function ya(ke,Ae,Ce,ze,qe){this.static_tree=ke,this.extra_bits=Ae,this.extra_base=Ce,this.elems=ze,this.max_length=qe,this.has_stree=ke&&ke.length}let Kc,jc,eu;function wa(ke,Ae){this.dyn_tree=ke,this.max_code=0,this.stat_desc=Ae}function va(ke){return ke<256?Pc[ke]:Pc[256+(ke>>>7)]}function _a(ke,Ae){ke.pending_buf[ke.pending++]=255&Ae,ke.pending_buf[ke.pending++]=Ae>>>8&255}function ka(ke,Ae,Ce){ke.bi_valid>16-Ce?(ke.bi_buf|=Ae<<ke.bi_valid&65535,_a(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 Aa(ke,Ae,Ce){ka(ke,Ce[2*Ae],Ce[2*Ae+1])}function Sa(ke,Ae){let Ce=0;do{Ce|=1&ke,ke>>>=1,Ce<<=1}while(--Ae>0);return Ce>>>1}function Ea(ke,Ae,Ce){const ze=Array(16);let qe,Ve,tt=0;for(qe=1;qe<=15;qe++)ze[qe]=tt=tt+Ce[qe-1]<<1;for(Ve=0;Ve<=Ae;Ve++){const Ae=ke[2*Ve+1];0!==Ae&&(ke[2*Ve]=Sa(ze[Ae]++,Ae))}}function Pa(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 xa(ke){ke.bi_valid>8?_a(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 Ma(ke,Ae,Ce,ze){const qe=2*Ae,Ve=2*Ce;return ke[qe]<ke[Ve]||ke[qe]===ke[Ve]&&ze[Ae]<=ze[Ce]}function Ca(ke,Ae,Ce){const ze=ke.heap[Ce];let qe=Ce<<1;for(;qe<=ke.heap_len&&(qe<ke.heap_len&&Ma(Ae,ke.heap[qe+1],ke.heap[qe],ke.depth)&&qe++,!Ma(Ae,ze,ke.heap[qe],ke.depth));)ke.heap[Ce]=ke.heap[qe],Ce=qe,qe<<=1;ke.heap[Ce]=ze}function Ka(ke,Ae,Ce){let ze,qe,Ve,tt,rt=0;if(0!==ke.last_lit)do{ze=ke.pending_buf[ke.d_buf+2*rt]<<8|ke.pending_buf[ke.d_buf+2*rt+1],qe=ke.pending_buf[ke.l_buf+rt],rt++,0===ze?Aa(ke,qe,Ae):(Ve=Cc[qe],Aa(ke,Ve+256+1,Ae),tt=cc[Ve],0!==tt&&(qe-=Dc[Ve],ka(ke,qe,tt)),ze--,Ve=va(ze),Aa(ke,Ve,Ce),tt=uc[Ve],0!==tt&&(ze-=Rc[Ve],ka(ke,ze,tt)))}while(rt<ke.last_lit);Aa(ke,256,Ae)}function Da(ke,Ae){const Ce=Ae.dyn_tree,ze=Ae.stat_desc.static_tree,qe=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--,qe&&(ke.static_len-=ze[2*it+1]);for(Ae.max_code=nt,tt=ke.heap_len>>1;tt>=1;tt--)Ca(ke,Ce,tt);it=Ve;do{tt=ke.heap[1],ke.heap[1]=ke.heap[ke.heap_len--],Ca(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++,Ca(ke,Ce,1)}while(ke.heap_len>=2);ke.heap[--ke.heap_max]=ke.heap[1],function(ke,Ae){const Ce=Ae.dyn_tree,ze=Ae.max_code,qe=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>ze||(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*(qe[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>ze||(Ce[2*ct+1]!==ht&&(ke.opt_len+=(ht-Ce[2*ct+1])*Ce[2*ct],Ce[2*ct+1]=ht),ot--)}}(ke,Ae),Ea(Ce,nt,ke.bl_count)}function Ra(ke,Ae,Ce){let ze,qe,Ve=-1,tt=Ae[1],rt=0,it=7,nt=4;for(0===tt&&(it=138,nt=3),Ae[2*(Ce+1)+1]=65535,ze=0;ze<=Ce;ze++)qe=tt,tt=Ae[2*(ze+1)+1],++rt<it&&qe===tt||(rt<nt?ke.bl_tree[2*qe]+=rt:0!==qe?(qe!==Ve&&ke.bl_tree[2*qe]++,ke.bl_tree[32]++):rt<=10?ke.bl_tree[34]++:ke.bl_tree[36]++,rt=0,Ve=qe,0===tt?(it=138,nt=3):qe===tt?(it=6,nt=3):(it=7,nt=4))}function Ia(ke,Ae,Ce){let ze,qe,Ve=-1,tt=Ae[1],rt=0,it=7,nt=4;for(0===tt&&(it=138,nt=3),ze=0;ze<=Ce;ze++)if(qe=tt,tt=Ae[2*(ze+1)+1],!(++rt<it&&qe===tt)){if(rt<nt)do{Aa(ke,qe,ke.bl_tree)}while(0!=--rt);else 0!==qe?(qe!==Ve&&(Aa(ke,qe,ke.bl_tree),rt--),Aa(ke,16,ke.bl_tree),ka(ke,rt-3,2)):rt<=10?(Aa(ke,17,ke.bl_tree),ka(ke,rt-3,3)):(Aa(ke,18,ke.bl_tree),ka(ke,rt-11,7));rt=0,Ve=qe,0===tt?(it=138,nt=3):qe===tt?(it=6,nt=3):(it=7,nt=4)}}na(Rc);let tu=!1;function Ba(ke){tu||(!function(){let ke,Ae,Ce,ze,qe;const Ve=Array(16);for(Ce=0,ze=0;ze<28;ze++)for(Dc[ze]=Ce,ke=0;ke<1<<cc[ze];ke++)Cc[Ce++]=ze;for(Cc[Ce-1]=ze,qe=0,ze=0;ze<16;ze++)for(Rc[ze]=qe,ke=0;ke<1<<uc[ze];ke++)Pc[qe++]=ze;for(qe>>=7;ze<30;ze++)for(Rc[ze]=qe<<7,ke=0;ke<1<<uc[ze]-7;ke++)Pc[256+qe++]=ze;for(Ae=0;Ae<=15;Ae++)Ve[Ae]=0;for(ke=0;ke<=143;)Sc[2*ke+1]=8,ke++,Ve[8]++;for(;ke<=255;)Sc[2*ke+1]=9,ke++,Ve[9]++;for(;ke<=279;)Sc[2*ke+1]=7,ke++,Ve[7]++;for(;ke<=287;)Sc[2*ke+1]=8,ke++,Ve[8]++;for(Ea(Sc,287,Ve),ke=0;ke<30;ke++)Mc[2*ke+1]=5,Mc[2*ke]=Sa(ke,5);Kc=new ya(Sc,cc,257,286,15),jc=new ya(Mc,uc,0,30,15),eu=new ya([],lc,0,19,7)}(),tu=!0),ke.l_desc=new wa(ke.dyn_ltree,Kc),ke.d_desc=new wa(ke.dyn_dtree,jc),ke.bl_desc=new wa(ke.bl_tree,eu),ke.bi_buf=0,ke.bi_valid=0,Pa(ke)}function Ta(ke,Ae,Ce,ze){ka(ke,0+(ze?1:0),3),function(ke,Ae,Ce,ze){xa(ke),ze&&(_a(ke,Ce),_a(ke,~Ce)),oc(ke.pending_buf,ke.window,Ae,Ce,ke.pending),ke.pending+=Ce}(ke,Ae,Ce,!0)}function za(ke){ka(ke,2,3),Aa(ke,256,Sc),function(ke){16===ke.bi_valid?(_a(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 qa(ke,Ae,Ce,ze){let qe,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)),Da(ke,ke.l_desc),Da(ke,ke.d_desc),tt=function(ke){let Ae;for(Ra(ke,ke.dyn_ltree,ke.l_desc.max_code),Ra(ke,ke.dyn_dtree,ke.d_desc.max_code),Da(ke,ke.bl_desc),Ae=18;Ae>=3&&0===ke.bl_tree[2*gc[Ae]+1];Ae--);return ke.opt_len+=3*(Ae+1)+5+5+4,Ae}(ke),qe=ke.opt_len+3+7>>>3,Ve=ke.static_len+3+7>>>3,Ve<=qe&&(qe=Ve)):qe=Ve=Ce+5,Ce+4<=qe&&-1!==Ae?Ta(ke,Ae,Ce,ze):4===ke.strategy||Ve===qe?(ka(ke,2+(ze?1:0),3),Ka(ke,Sc,Mc)):(ka(ke,4+(ze?1:0),3),function(ke,Ae,Ce,ze){let qe;for(ka(ke,Ae-257,5),ka(ke,Ce-1,5),ka(ke,ze-4,4),qe=0;qe<ze;qe++)ka(ke,ke.bl_tree[2*gc[qe]+1],3);Ia(ke,ke.dyn_ltree,Ae-1),Ia(ke,ke.dyn_dtree,Ce-1)}(ke,ke.l_desc.max_code+1,ke.d_desc.max_code+1,tt+1),Ka(ke,ke.dyn_ltree,ke.dyn_dtree)),Pa(ke),ze&&xa(ke)}function Oa(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*(Cc[Ce]+256+1)]++,ke.dyn_dtree[2*va(Ae)]++),ke.last_lit===ke.lit_bufsize-1}function Fa(ke,Ae,Ce,ze){let qe=65535&ke|0,Ve=ke>>>16&65535|0,tt=0;for(;0!==Ce;){tt=Ce>2e3?2e3:Ce,Ce-=tt;do{qe=qe+Ae[ze++]|0,Ve=Ve+qe|0}while(--tt);qe%=65521,Ve%=65521}return qe|Ve<<16|0}const ru=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,ze){const qe=ru,Ve=ze+Ce;ke^=-1;for(let Ce=ze;Ce<Ve;Ce++)ke=ke>>>8^qe[255&(ke^Ae[Ce])];return-1^ke}var iu={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 Wa(ke,Ae){return ke.msg=iu[Ae],Ae}function Ha(ke){return(ke<<1)-(ke>4?9:0)}function Ga(ke){let Ae=ke.length;for(;--Ae>=0;)ke[Ae]=0}function Va(ke){const Ae=ke.state;let Ce=Ae.pending;Ce>ke.avail_out&&(Ce=ke.avail_out),0!==Ce&&(oc(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 $a(ke,Ae){qa(ke,ke.block_start>=0?ke.block_start:-1,ke.strstart-ke.block_start,Ae),ke.block_start=ke.strstart,Va(ke.strm)}function Za(ke,Ae){ke.pending_buf[ke.pending++]=Ae}function Ya(ke,Ae){ke.pending_buf[ke.pending++]=Ae>>>8&255,ke.pending_buf[ke.pending++]=255&Ae}function Xa(ke,Ae,Ce,ze){let qe=ke.avail_in;return qe>ze&&(qe=ze),0===qe?0:(ke.avail_in-=qe,oc(Ae,ke.input,ke.next_in,qe,Ce),1===ke.state.wrap?ke.adler=Fa(ke.adler,Ae,qe,Ce):2===ke.state.wrap&&(ke.adler=ja(ke.adler,Ae,qe,Ce)),ke.next_in+=qe,ke.total_in+=qe,qe)}function Qa(ke,Ae){let Ce,ze,qe=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&&(qe>>=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(ze=258-(ht-Ve),Ve=ht-258,ze>tt){if(ke.match_start=Ae,tt=ze,ze>=rt)break;ft=nt[Ve+tt-1],yt=nt[Ve+tt]}}}while((Ae=ct[Ae&ot])>it&&0!=--qe);return tt<=ke.lookahead?tt:ke.lookahead}function Ja(ke){const Ae=ke.w_size;let Ce,ze,qe,Ve,tt;do{if(Ve=ke.window_size-ke.lookahead-ke.strstart,ke.strstart>=Ae+(Ae-262)){oc(ke.window,ke.window,Ae,Ae,0),ke.match_start-=Ae,ke.strstart-=Ae,ke.block_start-=Ae,ze=ke.hash_size,Ce=ze;do{qe=ke.head[--Ce],ke.head[Ce]=qe>=Ae?qe-Ae:0}while(--ze);ze=Ae,Ce=ze;do{qe=ke.prev[--Ce],ke.prev[Ce]=qe>=Ae?qe-Ae:0}while(--ze);Ve+=Ae}if(0===ke.strm.avail_in)break;if(ze=Xa(ke.strm,ke.window,ke.strstart+ke.lookahead,Ve),ke.lookahead+=ze,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 es(ke,Ae){let Ce,ze;for(;;){if(ke.lookahead<262){if(Ja(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=Qa(ke,Ce)),ke.match_length>=3)if(ze=Oa(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 ze=Oa(ke,0,ke.window[ke.strstart]),ke.lookahead--,ke.strstart++;if(ze&&($a(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=ke.strstart<2?ke.strstart:2,4===Ae?($a(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&($a(ke,!1),0===ke.strm.avail_out)?1:2}function ts(ke,Ae){let Ce,ze,qe;for(;;){if(ke.lookahead<262){if(Ja(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=Qa(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){qe=ke.strstart+ke.lookahead-3,ze=Oa(ke,ke.strstart-1-ke.prev_match,ke.prev_length-3),ke.lookahead-=ke.prev_length-1,ke.prev_length-=2;do{++ke.strstart<=qe&&(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++,ze&&($a(ke,!1),0===ke.strm.avail_out))return 1}else if(ke.match_available){if(ze=Oa(ke,0,ke.window[ke.strstart-1]),ze&&$a(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&&(ze=Oa(ke,0,ke.window[ke.strstart-1]),ke.match_available=0),ke.insert=ke.strstart<2?ke.strstart:2,4===Ae?($a(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&($a(ke,!1),0===ke.strm.avail_out)?1:2}class rs{constructor(ke,Ae,Ce,ze,qe){this.good_length=ke,this.max_lazy=Ae,this.nice_length=Ce,this.max_chain=ze,this.func=qe}}const nu=[new rs(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(Ja(ke),0===ke.lookahead&&0===Ae)return 1;if(0===ke.lookahead)break}ke.strstart+=ke.lookahead,ke.lookahead=0;const ze=ke.block_start+Ce;if((0===ke.strstart||ke.strstart>=ze)&&(ke.lookahead=ke.strstart-ze,ke.strstart=ze,$a(ke,!1),0===ke.strm.avail_out))return 1;if(ke.strstart-ke.block_start>=ke.w_size-262&&($a(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=0,4===Ae?($a(ke,!0),0===ke.strm.avail_out?3:4):(ke.strstart>ke.block_start&&($a(ke,!1),ke.strm.avail_out),1)})),new rs(4,4,8,4,es),new rs(4,5,16,8,es),new rs(4,6,32,32,es),new rs(4,4,16,16,ts),new rs(8,16,32,32,ts),new rs(8,16,128,128,ts),new rs(8,32,128,256,ts),new rs(32,128,258,1024,ts),new rs(32,258,258,4096,ts)];class ns{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 Uo(1146),this.dyn_dtree=new Uo(122),this.bl_tree=new Uo(78),Ga(this.dyn_ltree),Ga(this.dyn_dtree),Ga(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uo(16),this.heap=new Uo(573),Ga(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uo(573),Ga(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 as(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,Ba(Ae),0):Wa(ke,-2)}(ke);return 0===Ae&&function(ke){ke.window_size=2*ke.w_size,Ga(ke.head),ke.max_lazy_match=nu[ke.level].max_lazy,ke.good_match=nu[ke.level].good_length,ke.nice_match=nu[ke.level].nice_length,ke.max_chain_length=nu[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 ss(ke,Ae){let Ce,ze,qe,Ve;if(!ke||!ke.state||Ae>5||Ae<0)return ke?Wa(ke,-2):-2;if(ze=ke.state,!ke.output||!ke.input&&0!==ke.avail_in||666===ze.status&&4!==Ae)return Wa(ke,0===ke.avail_out?-5:-2);if(ze.strm=ke,Ce=ze.last_flush,ze.last_flush=Ae,42===ze.status)if(2===ze.wrap)ke.adler=0,Za(ze,31),Za(ze,139),Za(ze,8),ze.gzhead?(Za(ze,(ze.gzhead.text?1:0)+(ze.gzhead.hcrc?2:0)+(ze.gzhead.extra?4:0)+(ze.gzhead.name?8:0)+(ze.gzhead.comment?16:0)),Za(ze,255&ze.gzhead.time),Za(ze,ze.gzhead.time>>8&255),Za(ze,ze.gzhead.time>>16&255),Za(ze,ze.gzhead.time>>24&255),Za(ze,9===ze.level?2:ze.strategy>=2||ze.level<2?4:0),Za(ze,255&ze.gzhead.os),ze.gzhead.extra&&ze.gzhead.extra.length&&(Za(ze,255&ze.gzhead.extra.length),Za(ze,ze.gzhead.extra.length>>8&255)),ze.gzhead.hcrc&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending,0)),ze.gzindex=0,ze.status=69):(Za(ze,0),Za(ze,0),Za(ze,0),Za(ze,0),Za(ze,0),Za(ze,9===ze.level?2:ze.strategy>=2||ze.level<2?4:0),Za(ze,3),ze.status=113);else{let Ae=8+(ze.w_bits-8<<4)<<8,Ce=-1;Ce=ze.strategy>=2||ze.level<2?0:ze.level<6?1:6===ze.level?2:3,Ae|=Ce<<6,0!==ze.strstart&&(Ae|=32),Ae+=31-Ae%31,ze.status=113,Ya(ze,Ae),0!==ze.strstart&&(Ya(ze,ke.adler>>>16),Ya(ze,65535&ke.adler)),ke.adler=1}if(69===ze.status)if(ze.gzhead.extra){for(qe=ze.pending;ze.gzindex<(65535&ze.gzhead.extra.length)&&(ze.pending!==ze.pending_buf_size||(ze.gzhead.hcrc&&ze.pending>qe&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending-qe,qe)),Va(ke),qe=ze.pending,ze.pending!==ze.pending_buf_size));)Za(ze,255&ze.gzhead.extra[ze.gzindex]),ze.gzindex++;ze.gzhead.hcrc&&ze.pending>qe&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending-qe,qe)),ze.gzindex===ze.gzhead.extra.length&&(ze.gzindex=0,ze.status=73)}else ze.status=73;if(73===ze.status)if(ze.gzhead.name){qe=ze.pending;do{if(ze.pending===ze.pending_buf_size&&(ze.gzhead.hcrc&&ze.pending>qe&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending-qe,qe)),Va(ke),qe=ze.pending,ze.pending===ze.pending_buf_size)){Ve=1;break}Ve=ze.gzindex<ze.gzhead.name.length?255&ze.gzhead.name.charCodeAt(ze.gzindex++):0,Za(ze,Ve)}while(0!==Ve);ze.gzhead.hcrc&&ze.pending>qe&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending-qe,qe)),0===Ve&&(ze.gzindex=0,ze.status=91)}else ze.status=91;if(91===ze.status)if(ze.gzhead.comment){qe=ze.pending;do{if(ze.pending===ze.pending_buf_size&&(ze.gzhead.hcrc&&ze.pending>qe&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending-qe,qe)),Va(ke),qe=ze.pending,ze.pending===ze.pending_buf_size)){Ve=1;break}Ve=ze.gzindex<ze.gzhead.comment.length?255&ze.gzhead.comment.charCodeAt(ze.gzindex++):0,Za(ze,Ve)}while(0!==Ve);ze.gzhead.hcrc&&ze.pending>qe&&(ke.adler=ja(ke.adler,ze.pending_buf,ze.pending-qe,qe)),0===Ve&&(ze.status=103)}else ze.status=103;if(103===ze.status&&(ze.gzhead.hcrc?(ze.pending+2>ze.pending_buf_size&&Va(ke),ze.pending+2<=ze.pending_buf_size&&(Za(ze,255&ke.adler),Za(ze,ke.adler>>8&255),ke.adler=0,ze.status=113)):ze.status=113),0!==ze.pending){if(Va(ke),0===ke.avail_out)return ze.last_flush=-1,0}else if(0===ke.avail_in&&Ha(Ae)<=Ha(Ce)&&4!==Ae)return Wa(ke,-5);if(666===ze.status&&0!==ke.avail_in)return Wa(ke,-5);if(0!==ke.avail_in||0!==ze.lookahead||0!==Ae&&666!==ze.status){var tt=2===ze.strategy?function(ke,Ae){let Ce;for(;;){if(0===ke.lookahead&&(Ja(ke),0===ke.lookahead)){if(0===Ae)return 1;break}if(ke.match_length=0,Ce=Oa(ke,0,ke.window[ke.strstart]),ke.lookahead--,ke.strstart++,Ce&&($a(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=0,4===Ae?($a(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&($a(ke,!1),0===ke.strm.avail_out)?1:2}(ze,Ae):3===ze.strategy?function(ke,Ae){let Ce,ze,qe,Ve;const tt=ke.window;for(;;){if(ke.lookahead<=258){if(Ja(ke),ke.lookahead<=258&&0===Ae)return 1;if(0===ke.lookahead)break}if(ke.match_length=0,ke.lookahead>=3&&ke.strstart>0&&(qe=ke.strstart-1,ze=tt[qe],ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe])){Ve=ke.strstart+258;do{}while(ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe]&&ze===tt[++qe]&&qe<Ve);ke.match_length=258-(Ve-qe),ke.match_length>ke.lookahead&&(ke.match_length=ke.lookahead)}if(ke.match_length>=3?(Ce=Oa(ke,1,ke.match_length-3),ke.lookahead-=ke.match_length,ke.strstart+=ke.match_length,ke.match_length=0):(Ce=Oa(ke,0,ke.window[ke.strstart]),ke.lookahead--,ke.strstart++),Ce&&($a(ke,!1),0===ke.strm.avail_out))return 1}return ke.insert=0,4===Ae?($a(ke,!0),0===ke.strm.avail_out?3:4):ke.last_lit&&($a(ke,!1),0===ke.strm.avail_out)?1:2}(ze,Ae):nu[ze.level].func(ze,Ae);if(3!==tt&&4!==tt||(ze.status=666),1===tt||3===tt)return 0===ke.avail_out&&(ze.last_flush=-1),0;if(2===tt&&(1===Ae?za(ze):5!==Ae&&(Ta(ze,0,0,!1),3===Ae&&(Ga(ze.head),0===ze.lookahead&&(ze.strstart=0,ze.block_start=0,ze.insert=0))),Va(ke),0===ke.avail_out))return ze.last_flush=-1,0}return 4!==Ae?0:ze.wrap<=0?1:(2===ze.wrap?(Za(ze,255&ke.adler),Za(ze,ke.adler>>8&255),Za(ze,ke.adler>>16&255),Za(ze,ke.adler>>24&255),Za(ze,255&ke.total_in),Za(ze,ke.total_in>>8&255),Za(ze,ke.total_in>>16&255),Za(ze,ke.total_in>>24&255)):(Ya(ze,ke.adler>>>16),Ya(ze,65535&ke.adler)),Va(ke),ze.wrap>0&&(ze.wrap=-ze.wrap),0!==ze.pending?0:1)}try{String.fromCharCode.call(null,0)}catch(ze){}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(ze){}const au=new Do(256);for(let ke=0;ke<256;ke++)au[ke]=ke>=252?6:ke>=248?5:ke>=240?4:ke>=224?3:ke>=192?2:1;function cs(ke){let Ae,Ce,ze,qe,Ve=0;const tt=ke.length;for(ze=0;ze<tt;ze++)Ae=ke.charCodeAt(ze),55296==(64512&Ae)&&ze+1<tt&&(Ce=ke.charCodeAt(ze+1),56320==(64512&Ce)&&(Ae=65536+(Ae-55296<<10)+(Ce-56320),ze++)),Ve+=Ae<128?1:Ae<2048?2:Ae<65536?3:4;const rt=new Do(Ve);for(qe=0,ze=0;qe<Ve;ze++)Ae=ke.charCodeAt(ze),55296==(64512&Ae)&&ze+1<tt&&(Ce=ke.charCodeAt(ze+1),56320==(64512&Ce)&&(Ae=65536+(Ae-55296<<10)+(Ce-56320),ze++)),Ae<128?rt[qe++]=Ae:Ae<2048?(rt[qe++]=192|Ae>>>6,rt[qe++]=128|63&Ae):Ae<65536?(rt[qe++]=224|Ae>>>12,rt[qe++]=128|Ae>>>6&63,rt[qe++]=128|63&Ae):(rt[qe++]=240|Ae>>>18,rt[qe++]=128|Ae>>>12&63,rt[qe++]=128|Ae>>>6&63,rt[qe++]=128|63&Ae);return rt}au[254]=au[254]=1;class us{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 hs{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 us,this.strm.avail_out=0;var Ce,ze,qe=function(ke,Ae,Ce,ze,qe,Ve){if(!ke)return-2;let tt=1;if(-1===Ae&&(Ae=6),ze<0?(tt=0,ze=-ze):ze>15&&(tt=2,ze-=16),qe<1||qe>9||8!==Ce||ze<8||ze>15||Ae<0||Ae>9||Ve<0||Ve>4)return Wa(ke,-2);8===ze&&(ze=9);const rt=new ns;return ke.state=rt,rt.strm=ke,rt.wrap=tt,rt.gzhead=null,rt.w_bits=ze,rt.w_size=1<<rt.w_bits,rt.w_mask=rt.w_size-1,rt.hash_bits=qe+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 Do(2*rt.w_size),rt.head=new Uo(rt.hash_size),rt.prev=new Uo(rt.w_size),rt.lit_bufsize=1<<qe+6,rt.pending_buf_size=4*rt.lit_bufsize,rt.pending_buf=new Do(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,as(ke)}(this.strm,Ae.level,Ae.method,Ae.windowBits,Ae.memLevel,Ae.strategy);if(0!==qe)throw Error(iu[qe]);if(Ae.header&&(Ce=this.strm,ze=Ae.header,Ce&&Ce.state&&(2!==Ce.state.wrap||(Ce.state.gzhead=ze))),Ae.dictionary){let ke;if(ke="string"==typeof Ae.dictionary?cs(Ae.dictionary):Ae.dictionary instanceof ArrayBuffer?new Uint8Array(Ae.dictionary):Ae.dictionary,0!==(qe=function(ke,Ae){let Ce,ze,qe,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=Fa(ke.adler,Ae,ot,0)),Ce.wrap=0,ot>=Ce.w_size&&(0===Ve&&(Ga(Ce.head),Ce.strstart=0,Ce.block_start=0,Ce.insert=0),nt=new Do(Ce.w_size),oc(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,Ja(Ce);Ce.lookahead>=3;){ze=Ce.strstart,qe=Ce.lookahead-2;do{Ce.ins_h=(Ce.ins_h<<Ce.hash_shift^Ce.window[ze+3-1])&Ce.hash_mask,Ce.prev[ze&Ce.w_mask]=Ce.head[Ce.ins_h],Ce.head[Ce.ins_h]=ze,ze++}while(--qe);Ce.strstart=ze,Ce.lookahead=2,Ja(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(iu[qe]);this._dict_set=!0}}push(ke,Ae){const{strm:Ce,options:{chunkSize:ze}}=this;var qe,Ve;if(this.ended)return!1;Ve=Ae===~~Ae?Ae:!0===Ae?4:0,"string"==typeof ke?Ce.input=cs(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 Do(ze),Ce.next_out=0,Ce.avail_out=ze),1!==(qe=ss(Ce,Ve))&&0!==qe)return this.onEnd(qe),this.ended=!0,!1;0!==Ce.avail_out&&(0!==Ce.avail_in||4!==Ve&&2!==Ve)||this.onData(Yn(Ce.output,Ce.next_out))}while((Ce.avail_in>0||0===Ce.avail_out)&&1!==qe);return 4===Ve?(qe=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?Wa(ke,-2):(ke.state=null,113===Ae?Wa(ke,-3):0)):-2}(this.strm),this.onEnd(qe),this.ended=!0,0===qe):2!==Ve||(this.onEnd(0),Ce.avail_out=0,!0)}onData(ke){this.chunks.push(ke)}onEnd(ke){0===ke&&(this.result=ac(this.chunks)),this.chunks=[],this.err=ke,this.msg=this.strm.msg}}function fs(ke,Ae){let Ce,ze,qe,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);ze=ke.next_out;const mt=ke.output,kt=ze-(Ae-ke.avail_out),St=ze+(ke.avail_out-257),Et=ht.dmax,Pt=ht.wsize,Bt=ht.whave,Dt=ht.wnext,Rt=ht.window;qe=ht.hold,Ve=ht.bits;const Tt=ht.lencode,Kt=ht.distcode,It=(1<<ht.lenbits)-1,Ut=(1<<ht.distbits)-1;e:do{Ve<15&&(qe+=ft[Ce++]<<Ve,Ve+=8,qe+=ft[Ce++]<<Ve,Ve+=8),tt=Tt[qe&It];t:for(;;){if(rt=tt>>>24,qe>>>=rt,Ve-=rt,rt=tt>>>16&255,0===rt)mt[ze++]=65535&tt;else{if(!(16&rt)){if(0==(64&rt)){tt=Tt[(65535&tt)+(qe&(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&&(qe+=ft[Ce++]<<Ve,Ve+=8),it+=qe&(1<<rt)-1,qe>>>=rt,Ve-=rt),Ve<15&&(qe+=ft[Ce++]<<Ve,Ve+=8,qe+=ft[Ce++]<<Ve,Ve+=8),tt=Kt[qe&Ut];r:for(;;){if(rt=tt>>>24,qe>>>=rt,Ve-=rt,rt=tt>>>16&255,!(16&rt)){if(0==(64&rt)){tt=Kt[(65535&tt)+(qe&(1<<rt)-1)];continue r}ke.msg="invalid distance code",ht.mode=30;break e}if(nt=65535&tt,rt&=15,Ve<rt&&(qe+=ft[Ce++]<<Ve,Ve+=8,Ve<rt&&(qe+=ft[Ce++]<<Ve,Ve+=8)),nt+=qe&(1<<rt)-1,nt>Et){ke.msg="invalid distance too far back",ht.mode=30;break e}if(qe>>>=rt,Ve-=rt,rt=ze-kt,nt>rt){if(rt=nt-rt,rt>Bt&&ht.sane){ke.msg="invalid distance too far back",ht.mode=30;break e}if(ot=0,ct=Rt,0===Dt){if(ot+=Pt-rt,rt<it){it-=rt;do{mt[ze++]=Rt[ot++]}while(--rt);ot=ze-nt,ct=mt}}else if(Dt<rt){if(ot+=Pt+Dt-rt,rt-=Dt,rt<it){it-=rt;do{mt[ze++]=Rt[ot++]}while(--rt);if(ot=0,Dt<it){rt=Dt,it-=rt;do{mt[ze++]=Rt[ot++]}while(--rt);ot=ze-nt,ct=mt}}}else if(ot+=Dt-rt,rt<it){it-=rt;do{mt[ze++]=Rt[ot++]}while(--rt);ot=ze-nt,ct=mt}for(;it>2;)mt[ze++]=ct[ot++],mt[ze++]=ct[ot++],mt[ze++]=ct[ot++],it-=3;it&&(mt[ze++]=ct[ot++],it>1&&(mt[ze++]=ct[ot++]))}else{ot=ze-nt;do{mt[ze++]=mt[ot++],mt[ze++]=mt[ot++],mt[ze++]=mt[ot++],it-=3}while(it>2);it&&(mt[ze++]=mt[ot++],it>1&&(mt[ze++]=mt[ot++]))}break}}break}}while(Ce<yt&&ze<St);it=Ve>>3,Ce-=it,Ve-=it<<3,qe&=(1<<Ve)-1,ke.next_in=Ce,ke.next_out=ze,ke.avail_in=Ce<yt?yt-Ce+5:5-(Ce-yt),ke.avail_out=ze<St?St-ze+257:257-(ze-St),ht.hold=qe,ht.bits=Ve}const Su=[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],Pu=[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],zh=[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 bs(ke,Ae,Ce,ze,qe,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,Bt=0,Dt=0,Rt=0,Tt=0,Kt=null,It=0;const Ut=new Uo(16),Ot=new Uo(16);let Nt,zt,qt,Ft=null,Lt=0;for(yt=0;yt<=15;yt++)Ut[yt]=0;for(mt=0;mt<ze;mt++)Ut[Ae[Ce+mt]]++;for(Et=it,St=15;St>=1&&0===Ut[St];St--);if(Et>St&&(Et=St),0===St)return qe[Ve++]=20971520,qe[Ve++]=20971520,rt.bits=1,0;for(kt=1;kt<St&&0===Ut[kt];kt++);for(Et<kt&&(Et=kt),Dt=1,yt=1;yt<=15;yt++)if(Dt<<=1,Dt-=Ut[yt],Dt<0)return-1;if(Dt>0&&(0===ke||1!==St))return-1;for(Ot[1]=0,yt=1;yt<15;yt++)Ot[yt+1]=Ot[yt]+Ut[yt];for(mt=0;mt<ze;mt++)0!==Ae[Ce+mt]&&(tt[Ot[Ae[Ce+mt]]++]=mt);0===ke?(Kt=Ft=tt,ft=19):1===ke?(Kt=Su,It-=257,Ft=Pu,Lt-=257,ft=256):(Kt=Cu,Ft=zh,ft=-1),Tt=0,mt=0,yt=kt,ht=Ve,Pt=Et,Bt=0,ct=-1,Rt=1<<Et;const Ht=Rt-1;if(1===ke&&Rt>852||2===ke&&Rt>592)return 1;for(;;){Nt=yt-Bt,tt[mt]<ft?(zt=0,qt=tt[mt]):tt[mt]>ft?(zt=Ft[Lt+tt[mt]],qt=Kt[It+tt[mt]]):(zt=96,qt=0),nt=1<<yt-Bt,ot=1<<Pt,kt=ot;do{ot-=nt,qe[ht+(Tt>>Bt)+ot]=Nt<<24|zt<<16|qt|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==--Ut[yt]){if(yt===St)break;yt=Ae[Ce+tt[mt]]}if(yt>Et&&(Tt&Ht)!==ct){for(0===Bt&&(Bt=Et),ht+=kt,Pt=yt-Bt,Dt=1<<Pt;Pt+Bt<St&&(Dt-=Ut[Pt+Bt],!(Dt<=0));)Pt++,Dt<<=1;if(Rt+=1<<Pt,1===ke&&Rt>852||2===ke&&Rt>592)return 1;ct=Tt&Ht,qe[ct]=Et<<24|Pt<<16|ht-Ve|0}}return 0!==Tt&&(qe[ht+Tt]=yt-Bt<<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 gs{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 Uo(320),this.work=new Uo(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function ws(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 ec(852),Ae.distcode=Ae.distdyn=new ec(592),Ae.sane=1,Ae.back=-1,0):-2}(ke)):-2}function vs(ke,Ae){let Ce,ze;return ke?(ze=new gs,ke.state=ze,ze.window=null,Ce=function(ke,Ae){let Ce,ze;return ke&&ke.state?(ze=ke.state,Ae<0?(Ce=0,Ae=-Ae):(Ce=1+(Ae>>4),Ae<48&&(Ae&=15)),Ae&&(Ae<8||Ae>15)?-2:(null!==ze.window&&ze.wbits!==Ae&&(ze.window=null),ze.wrap=Ce,ze.wbits=Ae,ws(ke))):-2}(ke,Ae),0!==Ce&&(ke.state=null),Ce):-2}let sf,af,el=!0;function Ss(ke){if(el){let Ae;for(sf=new ec(512),af=new ec(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(bs(1,ke.lens,0,288,sf,0,ke.work,{bits:9}),Ae=0;Ae<32;)ke.lens[Ae++]=5;bs(2,ke.lens,0,32,af,0,ke.work,{bits:5}),el=!1}ke.lencode=sf,ke.lenbits=9,ke.distcode=af,ke.distbits=5}function Es(ke,Ae,Ce,ze){let qe;const Ve=ke.state;return null===Ve.window&&(Ve.wsize=1<<Ve.wbits,Ve.wnext=0,Ve.whave=0,Ve.window=new Do(Ve.wsize)),ze>=Ve.wsize?(oc(Ve.window,Ae,Ce-Ve.wsize,Ve.wsize,0),Ve.wnext=0,Ve.whave=Ve.wsize):(qe=Ve.wsize-Ve.wnext,qe>ze&&(qe=ze),oc(Ve.window,Ae,Ce-ze,qe,Ve.wnext),(ze-=qe)?(oc(Ve.window,Ae,Ce-ze,ze,0),Ve.wnext=ze,Ve.whave=Ve.wsize):(Ve.wnext+=qe,Ve.wnext===Ve.wsize&&(Ve.wnext=0),Ve.whave<Ve.wsize&&(Ve.whave+=qe))),0}function Ps(ke,Ae){let Ce,ze,qe,Ve,tt,rt,it,nt,ot,ct,ht,ft,yt,mt,kt,St,Et,Pt,Bt,Dt,Rt,Tt,Kt,It,Ut=0,Ot=new Do(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,qe=ke.output,it=ke.avail_out,Ve=ke.next_in,ze=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+=ze[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,Rt=8+(15&nt),0===Ce.wbits)Ce.wbits=Rt;else if(Rt>Ce.wbits){ke.msg="invalid window size",Ce.mode=30;break}Ce.dmax=1<<Rt,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+=ze[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+=ze[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+=ze[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+=ze[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&&(Rt=Ce.head.extra_len-Ce.length,Ce.head.extra||(Ce.head.extra=Array(Ce.head.extra_len)),oc(Ce.head.extra,ze,Ve,ft,Rt)),512&Ce.flags&&(Ce.check=ja(Ce.check,ze,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{Rt=ze[Ve+ft++],Ce.head&&Rt&&Ce.length<65536&&(Ce.head.name+=String.fromCharCode(Rt))}while(Rt&&ft<rt);if(512&Ce.flags&&(Ce.check=ja(Ce.check,ze,ft,Ve)),rt-=ft,Ve+=ft,Rt)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{Rt=ze[Ve+ft++],Ce.head&&Rt&&Ce.length<65536&&(Ce.head.comment+=String.fromCharCode(Rt))}while(Rt&&ft<rt);if(512&Ce.flags&&(Ce.check=ja(Ce.check,ze,ft,Ve)),rt-=ft,Ve+=ft,Rt)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+=ze[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+=ze[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+=ze[Ve++]<<ot,ot+=8}switch(Ce.last=1&nt,nt>>>=1,ot-=1,3&nt){case 0:Ce.mode=14;break;case 1:if(Ss(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+=ze[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;oc(qe,ze,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+=ze[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+=ze[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,Kt={bits:Ce.lenbits},Tt=bs(0,Ce.lens,0,19,Ce.lencode,0,Ce.work,Kt),Ce.lenbits=Kt.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(;Ut=Ce.lencode[nt&(1<<Ce.lenbits)-1],kt=Ut>>>24,St=Ut>>>16&255,Et=65535&Ut,!(kt<=ot);){if(0===rt)break e;rt--,nt+=ze[Ve++]<<ot,ot+=8}if(Et<16)nt>>>=kt,ot-=kt,Ce.lens[Ce.have++]=Et;else{if(16===Et){for(It=kt+2;ot<It;){if(0===rt)break e;rt--,nt+=ze[Ve++]<<ot,ot+=8}if(nt>>>=kt,ot-=kt,0===Ce.have){ke.msg="invalid bit length repeat",Ce.mode=30;break}Rt=Ce.lens[Ce.have-1],ft=3+(3&nt),nt>>>=2,ot-=2}else if(17===Et){for(It=kt+3;ot<It;){if(0===rt)break e;rt--,nt+=ze[Ve++]<<ot,ot+=8}nt>>>=kt,ot-=kt,Rt=0,ft=3+(7&nt),nt>>>=3,ot-=3}else{for(It=kt+7;ot<It;){if(0===rt)break e;rt--,nt+=ze[Ve++]<<ot,ot+=8}nt>>>=kt,ot-=kt,Rt=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++]=Rt}}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,Kt={bits:Ce.lenbits},Tt=bs(1,Ce.lens,0,Ce.nlen,Ce.lencode,0,Ce.work,Kt),Ce.lenbits=Kt.bits,Tt){ke.msg="invalid literal/lengths set",Ce.mode=30;break}if(Ce.distbits=6,Ce.distcode=Ce.distdyn,Kt={bits:Ce.distbits},Tt=bs(2,Ce.lens,Ce.nlen,Ce.ndist,Ce.distcode,0,Ce.work,Kt),Ce.distbits=Kt.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,fs(ke,ht),tt=ke.next_out,qe=ke.output,it=ke.avail_out,Ve=ke.next_in,ze=ke.input,rt=ke.avail_in,nt=Ce.hold,ot=Ce.bits,12===Ce.mode&&(Ce.back=-1);break}for(Ce.back=0;Ut=Ce.lencode[nt&(1<<Ce.lenbits)-1],kt=Ut>>>24,St=Ut>>>16&255,Et=65535&Ut,!(kt<=ot);){if(0===rt)break e;rt--,nt+=ze[Ve++]<<ot,ot+=8}if(St&&0==(240&St)){for(Pt=kt,Bt=St,Dt=Et;Ut=Ce.lencode[Dt+((nt&(1<<Pt+Bt)-1)>>Pt)],kt=Ut>>>24,St=Ut>>>16&255,Et=65535&Ut,!(Pt+kt<=ot);){if(0===rt)break e;rt--,nt+=ze[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(It=Ce.extra;ot<It;){if(0===rt)break e;rt--,nt+=ze[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(;Ut=Ce.distcode[nt&(1<<Ce.distbits)-1],kt=Ut>>>24,St=Ut>>>16&255,Et=65535&Ut,!(kt<=ot);){if(0===rt)break e;rt--,nt+=ze[Ve++]<<ot,ot+=8}if(0==(240&St)){for(Pt=kt,Bt=St,Dt=Et;Ut=Ce.distcode[Dt+((nt&(1<<Pt+Bt)-1)>>Pt)],kt=Ut>>>24,St=Ut>>>16&255,Et=65535&Ut,!(Pt+kt<=ot);){if(0===rt)break e;rt--,nt+=ze[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(It=Ce.extra;ot<It;){if(0===rt)break e;rt--,nt+=ze[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=qe,yt=tt-Ce.offset,ft=Ce.length;ft>it&&(ft=it),it-=ft,Ce.length-=ft;do{qe[tt++]=mt[yt++]}while(--ft);0===Ce.length&&(Ce.mode=21);break;case 26:if(0===it)break e;qe[tt++]=Ce.length,it--,Ce.mode=21;break;case 27:if(Ce.wrap){for(;ot<32;){if(0===rt)break e;rt--,nt|=ze[Ve++]<<ot,ot+=8}if(ht-=it,ke.total_out+=ht,Ce.total+=ht,ht&&(ke.adler=Ce.check=Ce.flags?ja(Ce.check,qe,ht,tt-ht):Fa(Ce.check,qe,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+=ze[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))&&Es(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,qe,ht,ke.next_out-ht):Fa(Ce.check,qe,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 xs(ke,Ae){const Ce=Ae.length;let ze,qe;return ke&&ke.state?(ze=ke.state,0!==ze.wrap&&11!==ze.mode?-2:11===ze.mode&&(qe=1,qe=Fa(qe,Ae,Ce,0),qe!==ze.check)?-3:(Es(ke,Ae,Ce,Ce),ze.havedict=1,0)):-2}class Ms{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 Cs{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 us,this.strm.avail_out=0;let Ce=vs(this.strm,Ae.windowBits);if(0!==Ce)throw Error(iu[Ce]);if(this.header=new Ms,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=cs(Ae.dictionary):Ae.dictionary instanceof ArrayBuffer&&(Ae.dictionary=new Uint8Array(Ae.dictionary)),Ae.raw&&(Ce=xs(this.strm,Ae.dictionary),0!==Ce)))throw Error(iu[Ce])}push(ke,Ae){const{strm:Ce,options:{chunkSize:ze,dictionary:qe}}=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 Do(ke.length);for(let Ce=0,ze=Ae.length;Ce<ze;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 Do(ze),Ce.next_out=0,Ce.avail_out=ze),Ve=Ps(Ce,0),2===Ve&&qe&&(Ve=xs(this.strm,qe)),-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(Yn(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=ac(this.chunks)),this.chunks=[],this.err=ke,this.msg=this.strm.msg}}var rl=[0,1,3,7,15,31,63,127,255],Ds=function(ke){this.stream=ke,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Ds.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Ds.prototype.read=function(ke){for(var Ae=0;ke>0;){this._ensureByte();var Ce=8-this.bitOffset;if(ke>=Ce)Ae<<=Ce,Ae|=rl[Ce]&this.curByte,this.hasByte=!1,this.bitOffset=0,ke-=Ce;else{Ae<<=ke;var ze=Ce-ke;Ae|=(this.curByte&rl[ke]<<ze)>>ze,this.bitOffset+=ke,ke=0}}return Ae},Ds.prototype.seek=function(ke){var Ae=ke%8,Ce=(ke-Ae)/8;this.bitOffset=Ae,this.stream.seek(Ce),this.hasByte=!1},Ds.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 il=Ds,Is=function(){};Is.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Is.prototype.read=function(ke,Ae,Ce){for(var ze=0;ze<Ce;){var qe=this.readByte();if(qe<0)return 0===ze?-1:ze;ke[Ae++]=qe,ze++}return ze},Is.prototype.seek=function(ke){throw Error("abstract method seek() not implemented")},Is.prototype.writeByte=function(ke){throw Error("abstract method readByte() not implemented")},Is.prototype.write=function(ke,Ae,Ce){var ze;for(ze=0;ze<Ce;ze++)this.writeByte(ke[Ae++]);return Ce},Is.prototype.flush=function(){};var nl,sl=Is,al=(nl=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^nl[255&(ke>>>24^Ae)]},this.updateCRCRun=function(Ae,Ce){for(;Ce-- >0;)ke=ke<<8^nl[255&(ke>>>24^Ae)]}}),zs=function(ke,Ae){var Ce,ze=ke[Ae];for(Ce=Ae;Ce>0;Ce--)ke[Ce]=ke[Ce-1];return ke[0]=ze,ze},ol={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},cl={};cl[ol.LAST_BLOCK]="Bad file checksum",cl[ol.NOT_BZIP_DATA]="Not bzip data",cl[ol.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",cl[ol.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",cl[ol.DATA_ERROR]="Data error",cl[ol.OUT_OF_MEMORY]="Out of memory",cl[ol.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var Fs=function(ke,Ae){var Ce=cl[ke]||"unknown error";Ae&&(Ce+=": "+Ae);var ze=new TypeError(Ce);throw ze.errorCode=ke,ze},Ns=function(ke,Ae){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(ke,Ae)};Ns.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new al,!0):(this.writeCount=-1,!1)},Ns.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])||Fs(ol.NOT_BZIP_DATA,"bad magic");var ze=Ce[3]-48;(ze<1||ze>9)&&Fs(ol.NOT_BZIP_DATA,"level out of range"),this.reader=new il(ke),this.dbufSize=1e5*ze,this.nextoutput=0,this.outputStream=Ae,this.streamCRC=0},Ns.prototype._get_next_block=function(){var ke,Ae,Ce,ze=this.reader,qe=ze.pi();if("177245385090"===qe)return!1;"314159265359"!==qe&&Fs(ol.NOT_BZIP_DATA),this.targetBlockCRC=ze.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,ze.read(1)&&Fs(ol.OBSOLETE_INPUT);var Ve=ze.read(24);Ve>this.dbufSize&&Fs(ol.DATA_ERROR,"initial position out of bounds");var tt=ze.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=ze.read(16),Ae=0;Ae<16;Ae++)Ce&1<<15-Ae&&(rt[it++]=nt+Ae)}var ot=ze.read(3);(ot<2||ot>6)&&Fs(ol.DATA_ERROR);var ct=ze.read(15);0===ct&&Fs(ol.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;ze.read(1);Ae++)Ae>=ot&&Fs(ol.DATA_ERROR);ft[ke]=zs(ht,Ae)}var yt,mt=it+2,kt=[];for(Ae=0;Ae<ot;Ae++){var St,Et,Pt=new Uint8Array(mt),Bt=new Uint16Array(21);for(tt=ze.read(5),ke=0;ke<mt;ke++){for(;(tt<1||tt>20)&&Fs(ol.DATA_ERROR),ze.read(1);)ze.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 Dt=0;for(ke=St;ke<=Et;ke++)for(Bt[ke]=yt.limit[ke]=0,tt=0;tt<mt;tt++)Pt[tt]===ke&&(yt.permute[Dt++]=tt);for(ke=0;ke<mt;ke++)Bt[Pt[ke]]++;for(Dt=tt=0,ke=St;ke<Et;ke++)Dt+=Bt[ke],yt.limit[ke]=Dt-1,Dt<<=1,tt+=Bt[ke],yt.base[ke+1]=Dt-tt;yt.limit[Et+1]=Number.MAX_VALUE,yt.limit[Et]=Dt+Bt[Et]-1,yt.base[St]=0}var Rt=new Uint32Array(256);for(ke=0;ke<256;ke++)ht[ke]=ke;var Tt,Kt=0,It=0,Ut=0,Ot=this.dbuf=new Uint32Array(this.dbufSize);for(mt=0;;){for(mt--||(mt=49,Ut>=ct&&Fs(ol.DATA_ERROR),yt=kt[ft[Ut++]]),ke=yt.minLen,Ae=ze.read(ke);ke>yt.maxLen&&Fs(ol.DATA_ERROR),!(Ae<=yt.limit[ke]);ke++)Ae=Ae<<1|ze.read(1);((Ae-=yt.base[ke])<0||Ae>=258)&&Fs(ol.DATA_ERROR);var Nt=yt.permute[Ae];if(0!==Nt&&1!==Nt){if(Kt)for(Kt=0,It+tt>this.dbufSize&&Fs(ol.DATA_ERROR),Rt[Tt=rt[ht[0]]]+=tt;tt--;)Ot[It++]=Tt;if(Nt>it)break;It>=this.dbufSize&&Fs(ol.DATA_ERROR),Rt[Tt=rt[Tt=zs(ht,ke=Nt-1)]]++,Ot[It++]=Tt}else Kt||(Kt=1,tt=0),tt+=0===Nt?Kt:2*Kt,Kt<<=1}for((Ve<0||Ve>=It)&&Fs(ol.DATA_ERROR),Ae=0,ke=0;ke<256;ke++)Ce=Ae+Rt[ke],Rt[ke]=Ae,Ae=Ce;for(ke=0;ke<It;ke++)Ot[Rt[Tt=255&Ot[ke]]]|=ke<<8,Rt[Tt]++;var zt=0,qt=0,Ft=0;return It&&(qt=255&(zt=Ot[Ve]),zt>>=8,Ft=-1),this.writePos=zt,this.writeCurrent=qt,this.writeCount=It,this.writeRun=Ft,!0},Ns.prototype._read_bunzip=function(ke,Ae){var Ce,ze,qe;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--,ze=rt,rt=255&(tt=Ve[tt]),tt>>=8,3==nt++?(Ce=rt,qe=ze,rt=-1):(Ce=1,qe=rt),this.blockCRC.updateCRCRun(qe,Ce);Ce--;)this.outputStream.writeByte(qe),this.nextoutput++;rt!=ze&&(nt=0)}return this.writeCount=it,this.blockCRC.getCRC()!==this.targetBlockCRC&&Fs(ol.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 sl;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},Ls=function(ke){var Ae=new sl,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 Ws=function(ke,Ae,Ce){for(var ze=js(ke),qe=Ls(Ae),Ve=new Ns(ze,qe);!("eof"in ze)||!ze.eof();)if(Ve._init_block())Ve._read_bunzip();else{var tt=Ve.reader.read(32)>>>0;if(tt!==Ve.streamCRC&&Fs(ol.DATA_ERROR,"Bad stream CRC (got "+Ve.streamCRC.toString(16)+" expected "+tt.toString(16)+")"),!Ce||!("eof"in ze)||ze.eof())break;Ve._start_bunzip(ze,qe)}if("getBuffer"in qe)return qe.getBuffer()};class Hs{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 ze=ke.remainder();_(ze)&&(ze=await ie(ze)),this.setBytes(ze,Ae)}))}writeHeader(){const ke=Zt.encodeUTF8(this.filename),Ae=new Uint8Array([ke.length]),Ce=new Uint8Array([this.format]),ze=Zt.writeDate(this.date);return Zt.concatUint8Array([Ce,Ae,ke,ze])}write(){const ke=this.writeHeader(),Ae=this.getBytes();return Zt.concat([ke,Ae])}}function Gs(ke){let Ae,Ce=0;const ze=ke[0];return ze<192?([Ce]=ke,Ae=1):ze<255?(Ce=(ke[0]-192<<8)+ke[1]+192,Ae=2):255===ze&&(Ce=Zt.readNumber(ke.subarray(1,5)),Ae=5),{len:Ce,offset:Ae}}function Vs(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 $s(ke){if(ke<0||ke>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+ke])}function Zs(ke){return new Uint8Array([192|ke])}function Ys(ke,Ae){return Zt.concatUint8Array([Zs(ke),Vs(Ae)])}function Xs(ke){return[er.packet.literalData,er.packet.compressedData,er.packet.symmetricallyEncryptedData,er.packet.symEncryptedIntegrityProtectedData,er.packet.aeadEncryptedData].includes(ke)}async function Qs(ke,Ae){const Ce=H(ke);let ze,qe;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=Xs(nt);let ht,ft=null;if(ct){if("array"===Zt.isStream(ke)){const ke=new v;ze=G(ke),ft=ke}else{const ke=new Gt;ze=G(ke.writable),ft=ke.readable}qe=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(;;){ze&&await ze.ready;const{done:Ae,value:qe}=await Ce.read();if(Ae){if(rt===1/0)break;throw Error("Unexpected end of packet")}const Ve=rt===1/0?qe:qe.subarray(0,rt-ke);if(ze?await ze.write(Ve):ft.push(Ve),ke+=qe.length,ke>=rt){Ce.unshift(qe.subarray(rt-ke+qe.length));break}}}}while(ht);const yt=await Ce.peekBytes(ct?1/0:2);return ze?(await ze.ready,await ze.close()):(ft=Zt.concatUint8Array(ft),await Ae({tag:nt,packet:ft})),!yt||!yt.length}catch(ke){if(ze)return await ze.abort(ke),!0;throw ke}finally{ze&&await qe,Ce.releaseLock()}}class Js extends Error{constructor(...ke){super(...ke),Error.captureStackTrace&&Error.captureStackTrace(this,Js),this.name="UnsupportedError"}}const hl=Symbol("verified"),fl=new Set([er.signatureSubpacket.issuer,er.signatureSubpacket.issuerFingerprint,er.signatureSubpacket.embeddedSignature]);class ro{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 Js(`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=mo.signature.parseSignatureParams(this.publicKeyAlgorithm,ke.subarray(Ae,ke.length))}writeParams(){return this.params instanceof Promise?ae((async()=>mo.serializeParams(this.publicKeyAlgorithm,await this.params))):mo.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,ze=!1){5===ke.version?this.version=5:this.version=4;const qe=[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(),qe.push(this.writeHashedSubPackets()),this.signatureData=Zt.concat(qe);const Ve=this.toHash(this.signatureType,Ae,ze),tt=await this.hash(this.signatureType,Ae,Ve,ze);this.signedHashValue=re(J(tt),0,2);const o=async()=>mo.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(io(ke.signatureCreationTime,Zt.writeDate(this.created))),null!==this.signatureExpirationTime&&Ae.push(io(ke.signatureExpirationTime,Zt.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&Ae.push(io(ke.exportableCertification,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(Ce=new Uint8Array([this.trustLevel,this.trustAmount]),Ae.push(io(ke.trustSignature,Ce))),null!==this.regularExpression&&Ae.push(io(ke.regularExpression,this.regularExpression)),null!==this.revocable&&Ae.push(io(ke.revocable,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&Ae.push(io(ke.keyExpirationTime,Zt.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredSymmetricAlgorithms)),Ae.push(io(ke.preferredSymmetricAlgorithms,Ce))),null!==this.revocationKeyClass&&(Ce=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),Ce=Zt.concat([Ce,this.revocationKeyFingerprint]),Ae.push(io(ke.revocationKey,Ce))),this.rawNotations.forEach((([{name:ze,value:qe,humanReadable:Ve}])=>{Ce=[new Uint8Array([Ve?128:0,0,0,0])],Ce.push(Zt.writeNumber(ze.length,2)),Ce.push(Zt.writeNumber(qe.length,2)),Ce.push(Zt.stringToUint8Array(ze)),Ce.push(qe),Ce=Zt.concat(Ce),Ae.push(io(ke.notationData,Ce))})),null!==this.preferredHashAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredHashAlgorithms)),Ae.push(io(ke.preferredHashAlgorithms,Ce))),null!==this.preferredCompressionAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredCompressionAlgorithms)),Ae.push(io(ke.preferredCompressionAlgorithms,Ce))),null!==this.keyServerPreferences&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.keyServerPreferences)),Ae.push(io(ke.keyServerPreferences,Ce))),null!==this.preferredKeyServer&&Ae.push(io(ke.preferredKeyServer,Zt.stringToUint8Array(this.preferredKeyServer))),null!==this.isPrimaryUserID&&Ae.push(io(ke.primaryUserID,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&Ae.push(io(ke.policyURI,Zt.stringToUint8Array(this.policyURI))),null!==this.keyFlags&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.keyFlags)),Ae.push(io(ke.keyFlags,Ce))),null!==this.signersUserID&&Ae.push(io(ke.signersUserID,Zt.stringToUint8Array(this.signersUserID))),null!==this.reasonForRevocationFlag&&(Ce=Zt.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),Ae.push(io(ke.reasonForRevocation,Ce))),null!==this.features&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.features)),Ae.push(io(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(io(ke.signatureTarget,Ce))),null!==this.preferredAEADAlgorithms&&(Ce=Zt.stringToUint8Array(Zt.uint8ArrayToString(this.preferredAEADAlgorithms)),Ae.push(io(ke.preferredAEADAlgorithms,Ce)));const ze=Zt.concat(Ae),qe=Zt.writeNumber(ze.length,2);return Zt.concat([qe,ze])}writeUnhashedSubPackets(){const ke=er.signatureSubpacket,Ae=[];let Ce;this.issuerKeyID.isNull()||5===this.issuerKeyVersion||Ae.push(io(ke.issuer,this.issuerKeyID.write())),null!==this.embeddedSignature&&Ae.push(io(ke.embeddedSignature,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(Ce=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],Ce=Zt.concat(Ce),Ae.push(io(ke.issuerFingerprint,Ce))),this.unhashedSubpackets.forEach((ke=>{Ae.push(Vs(ke.length)),Ae.push(ke)}));const ze=Zt.concat(Ae),qe=Zt.writeNumber(ze.length,2);return Zt.concat([qe,ze])}readSubPacket(ke,Ae=!0){let Ce=0;const ze=128&ke[Ce],qe=127&ke[Ce];if(Ae||fl.has(qe))switch(Ce++,qe){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 qe=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+qe)),rt=ke.subarray(Ce+qe,Ce+qe+Ve);this.rawNotations.push({name:tt,humanReadable:Ae,value:rt,critical:ze}),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=mo.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Zt.uint8ArrayToString(ke.subarray(Ce,Ce+Ae));break}case er.signatureSubpacket.embeddedSignature:this.embeddedSignature=new ro,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 "+qe);if(ze)throw ke;Zt.printDebug(ke)}}else this.unhashedSubpackets.push(ke.subarray(Ce,ke.length))}readSubPackets(ke,Ae=!0,Ce){const ze=Zt.readNumber(ke.subarray(0,2));let qe=2;for(;qe<2+ze;){const ze=Gs(ke.subarray(qe,ke.length));qe+=ze.offset,this.readSubPacket(ke.subarray(qe,qe+ze.len),Ae,Ce),qe+=ze.len}return qe}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,ze;if(Ae.userID)ze=180,ke=Ae.userID;else{if(!Ae.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");ze=209,ke=Ae.userAttribute}const qe=ke.write();return Zt.concat([this.toSign(Ce.key,Ae),new Uint8Array([ze]),Zt.writeNumber(qe.length,4),qe])}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 ze=[];return 5!==this.version||this.signatureType!==er.signature.binary&&this.signatureType!==er.signature.text||(Ae?ze.push(new Uint8Array(6)):ze.push(ke.writeHeader())),ze.push(new Uint8Array([this.version,255])),5===this.version&&ze.push(new Uint8Array(4)),ze.push(Zt.writeNumber(Ce,4)),Zt.concat(ze)}))}toHash(ke,Ae,Ce=!1){const ze=this.toSign(ke,Ae);return Zt.concat([ze,this.signatureData,this.calculateTrailer(Ae,Ce)])}async hash(ke,Ae,Ce,ze=!1){return Ce||(Ce=this.toHash(ke,Ae,ze)),mo.hash.digest(this.hashAlgorithm,Ce)}async verify(ke,Ae,Ce,ze=new Date,qe=!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 ze,Ve;if(this.hashed?Ve=await this.hashed:(ze=this.toHash(Ae,Ce,qe),Ve=await this.hash(Ae,Ce,ze)),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 mo.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,ke.publicParams,ze,Ve),!this[hl])throw Error("Signature verification failed")}const rt=Zt.normalizeDate(ze);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 io(ke,Ae){const Ce=[];return Ce.push(Vs(Ae.length+1)),Ce.push(new Uint8Array([ke])),Ce.push(Ae),Zt.concat(Ce)}class no{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 Js(`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()=>ro.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 ao(ke,Ae){if(!Ae[ke]){let Ce;try{Ce=er.read(er.packet,ke)}catch(Ae){throw new Js("Unknown packet type with tag: "+ke)}throw Error("Packet not allowed in this context: "+Ce)}return new Ae[ke]}no.prototype.hash=ro.prototype.hash,no.prototype.toHash=ro.prototype.toHash,no.prototype.toSign=ro.prototype.toSign;class so extends Array{static async fromBinary(ke,Ae,Ce=tr){const ze=new so;return await ze.read(ke,Ae,Ce),ze}async read(ke,Ae,Ce=tr){this.stream=X(ke,(async(ke,ze)=>{const qe=G(ze);try{for(;;){await qe.ready;if(await Qs(ke,(async ke=>{try{if(ke.tag===er.packet.marker||ke.tag===er.packet.trust)return;const ze=ao(ke.tag,Ae);ze.packets=new so,ze.fromStream=Zt.isStream(ke.packet),await ze.read(ke.packet,Ce),await qe.write(ze)}catch(Ae){const ze=!Ce.ignoreUnsupportedPackets&&Ae instanceof Js,Ve=!(Ce.ignoreMalformedPackets||Ae instanceof Js);(ze||Ve||Xs(ke.tag))&&await qe.abort(Ae),Zt.printDebugError(Ae)}})))return await qe.ready,void await qe.close()}}catch(ke){await qe.abort(ke)}}));const ze=H(this.stream);for(;;){const{done:ke,value:Ae}=await ze.read();if(ke?this.stream=null:this.push(Ae),ke||Xs(Ae.constructor.tag))break}ze.releaseLock()}write(){const ke=[];for(let Ae=0;Ae<this.length;Ae++){const Ce=this[Ae].write();if(Zt.isStream(Ce)&&Xs(this[Ae].constructor.tag)){let ze=[],qe=0;const Ve=512;ke.push(Zs(this[Ae].constructor.tag)),ke.push(Y(Ce,(ke=>{if(ze.push(ke),qe+=ke.length,qe>=Ve){const ke=Math.min(Math.log(qe)/Math.LN2|0,30),Ae=2**ke,Ce=Zt.concat([$s(ke)].concat(ze));return ze=[Ce.subarray(1+Ae)],qe=ze[0].length,Ce.subarray(0,1+Ae)}}),(()=>Zt.concat([Vs(qe)].concat(ze)))))}else{if(Zt.isStream(Ce)){let ze=0;ke.push(Y(J(Ce),(ke=>{ze+=ke.length}),(()=>Ys(this[Ae].constructor.tag,ze))))}else ke.push(Ys(this[Ae].constructor.tag,Ce.length));ke.push(Ce)}}return Zt.concat(ke)}filterByTag(...ke){const Ae=new so,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 ze=0;ze<this.length;ze++)ke.some(i(Ce[ze].constructor.tag))&&Ae.push(ze);return Ae}}const ll=Zt.constructAllowedPackets([Hs,no,ro]);class co{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 so.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 pl=Zt.getNodeZlib();function ho(ke){return ke}function fo(ke,Ae,Ce={}){return function(ze){return!Zt.isStream(ze)||_(ze)?ae((()=>ie(ze).then((Ae=>new Promise(((ze,qe)=>{ke(Ae,Ce,((ke,Ae)=>{if(ke)return qe(ke);ze(Ae)}))})))))):Ut(Ot(ze).pipe(Ae(Ce)))}}function lo(ke,Ae={}){return function(Ce){const ze=new ke(Ae);return Y(Ce,(ke=>{if(ke.length)return ze.push(ke,2),ze.result}),(()=>{if(ke===hs)return ze.push([],4),ze.result}))}}function po(ke){return function(Ae){return ae((async()=>ke(await ie(Ae))))}}const yl=pl?{zip:(ke,Ae)=>fo(pl.deflateRaw,pl.createDeflateRaw,{level:Ae})(ke),zlib:(ke,Ae)=>fo(pl.deflate,pl.createDeflate,{level:Ae})(ke)}:{zip:(ke,Ae)=>lo(hs,{raw:!0,level:Ae})(ke),zlib:(ke,Ae)=>lo(hs,{level:Ae})(ke)},gl=pl?{uncompressed:ho,zip:fo(pl.inflateRaw,pl.createInflateRaw),zlib:fo(pl.inflate,pl.createInflate),bzip2:po(Ws)}:{uncompressed:ho,zip:lo(Cs,{raw:!0}),zlib:lo(Cs),bzip2:po(Ws)},bl=Zt.constructAllowedPackets([Hs,co,no,ro]);class go{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 Js(`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:ze}=mo.getCipher(ke);let qe=this.packets.write();_(qe)&&(qe=await ie(qe));const Ve=await mo.getPrefixRandom(ke),tt=new Uint8Array([211,20]),rt=Zt.concat([Ve,qe,tt]),it=await mo.hash.sha1(ee(rt)),nt=Zt.concat([rt,it]);return this.encrypted=await mo.mode.cfb.encrypt(ke,Ae,nt,new Uint8Array(ze),Ce),!0}async decrypt(ke,Ae,Ce=tr){const{blockSize:ze}=mo.getCipher(ke);let qe=J(this.encrypted);_(qe)&&(qe=await ie(qe));const Ve=await mo.mode.cfb.decrypt(ke,Ae,qe,new Uint8Array(ze)),tt=re(ee(Ve),-20),rt=re(Ve,0,-20),it=Promise.all([ie(await mo.hash.sha1(ee(rt))),ie(tt)]).then((([ke,Ae])=>{if(!Zt.equalsUint8Array(ke,Ae))throw Error("Modification detected.");return new Uint8Array})),nt=re(rt,ze+2);let ot=re(nt,0,-2);return ot=W([ot,ae((()=>it))]),Zt.isStream(qe)&&Ce.allowUnauthenticatedStream||(ot=await ie(ot)),this.packets=await so.fromBinary(ot,bl,Ce),!0}}const wl=Zt.constructAllowedPackets([Hs,co,no,ro]);class vo{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 Js(`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=mo.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 so.fromBinary(await this.crypt("decrypt",Ae,J(this.encrypted)),wl,Ce)}async encrypt(ke,Ae,Ce=tr){this.cipherAlgorithm=ke;const{ivLength:ze}=mo.getAEADMode(this.aeadAlgorithm);this.iv=await mo.random.getRandomBytes(ze),this.chunkSizeByte=Ce.aeadChunkSizeByte;const qe=this.packets.write();this.encrypted=await this.crypt("encrypt",Ae,qe)}async crypt(ke,Ae,Ce){const ze=mo.getAEADMode(this.aeadAlgorithm),qe=await ze(this.cipherAlgorithm,Ae),Ve="decrypt"===ke?ze.tagLength:0,tt="encrypt"===ke?ze.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|vo.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,Bt;if(Ae=Ae.subarray(0,Ae.length-Ve),!ft||Ae.length?(it.unshift(Ce),Pt=qe[ke](Ae,ze.getNonce(St,ht),nt),kt+=Ae.length-Ve+tt):(ct.setInt32(17,mt),Pt=qe[ke](Ce,ze.getNonce(St,ht),ot),kt+=tt,Bt=!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))),(Bt||kt>Et.desiredSize)&&await yt,Bt){await Et.close();break}ct.setInt32(9,++ft)}}catch(ke){await Et.abort(ke)}}))}}class _o{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 Js(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(ke.subarray(1,ke.length)),this.publicKeyAlgorithm=ke[9],this.encrypted=mo.parseEncSessionKeyParams(this.publicKeyAlgorithm,ke.subarray(10))}write(){const ke=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),mo.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 mo.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,ze=await mo.publicKeyDecrypt(this.publicKeyAlgorithm,ke.publicParams,ke.privateParams,this.encrypted,ke.getFingerprintBytes(),Ce),qe=ze[0],Ve=ze.subarray(1,ze.length-2),tt=ze.subarray(ze.length-2),rt=Zt.writeChecksum(Ve),it=rt[0]===tt[0]&rt[1]===tt[1];if(Ae){const ke=it&qe===Ae.sessionKeyAlgorithm&Ve.length===Ae.sessionKey.length;this.sessionKeyAlgorithm=Zt.selectUint8(ke,qe,Ae.sessionKeyAlgorithm),this.sessionKey=Zt.selectUint8Array(ke,Ve,Ae.sessionKey)}else{if(!(it&&er.read(er.symmetric,qe)))throw Error("Decryption error");this.sessionKey=Ve,this.sessionKeyAlgorithm=qe}}}class ko{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 ze=0,qe=0;for(;ze<Ae;){let Ae;switch(this.type){case"simple":Ae=Zt.concatUint8Array([new Uint8Array(qe),ke]);break;case"salted":Ae=Zt.concatUint8Array([new Uint8Array(qe),this.salt,ke]);break;case"iterated":{const Ce=Zt.concatUint8Array([this.salt,ke]);let ze=Ce.length;const Ve=Math.max(this.getCount(),ze);Ae=new Uint8Array(qe+Ve),Ae.set(Ce,qe);for(let ke=qe+ze;ke<Ve;ke+=ze,ze*=2)Ae.copyWithin(ke,qe,ke);break}case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}const Ve=await mo.hash.digest(this.algorithm,Ae);Ce.push(Ve),ze+=Ve.length,qe++}return Zt.concatUint8Array(Ce).subarray(0,Ae)}}class Ao{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 Js(`Version ${this.version} of the SKESK packet is unsupported.`);const Ce=ke[Ae++];if(5===this.version&&(this.aeadAlgorithm=ke[Ae++]),this.s2k=new ko,Ae+=this.s2k.read(ke.subarray(Ae,ke.length)),5===this.version){const Ce=mo.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:ze}=mo.getCipher(Ae),qe=await this.s2k.produceKey(ke,ze);if(5===this.version){const ke=mo.getAEADMode(this.aeadAlgorithm),Ce=new Uint8Array([192|Ao.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),ze=await ke(Ae,qe);this.sessionKey=await ze.decrypt(this.encrypted,this.iv,Ce)}else if(null!==this.encrypted){const ke=await mo.mode.cfb.decrypt(Ae,qe,this.encrypted,new Uint8Array(Ce));this.sessionKeyAlgorithm=er.write(er.symmetric,ke[0]),this.sessionKey=ke.subarray(1,ke.length)}else this.sessionKey=qe}async encrypt(ke,Ae=tr){const Ce=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=Ce,this.s2k=new ko(Ae),this.s2k.salt=await mo.random.getRandomBytes(8);const{blockSize:ze,keySize:qe}=mo.getCipher(Ce),Ve=await this.s2k.produceKey(ke,qe);if(null===this.sessionKey&&(this.sessionKey=await mo.generateSessionKey(this.sessionKeyAlgorithm)),5===this.version){const ke=mo.getAEADMode(this.aeadAlgorithm);this.iv=await mo.random.getRandomBytes(ke.ivLength);const Ae=new Uint8Array([192|Ao.tag,this.version,this.sessionKeyEncryptionAlgorithm,this.aeadAlgorithm]),ze=await ke(Ce,Ve);this.encrypted=await ze.encrypt(this.sessionKey,this.iv,Ae)}else{const ke=Zt.concatUint8Array([new Uint8Array([this.sessionKeyAlgorithm]),this.sessionKey]);this.encrypted=await mo.mode.cfb.encrypt(Ce,Ve,ke,new Uint8Array(ze),Ae)}}}class So{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 So,{version:Ce,created:ze,algorithm:qe,publicParams:Ve,keyID:tt,fingerprint:rt}=ke;return Ae.version=Ce,Ae.created=ze,Ae.algorithm=qe,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);try{const{read:Ce,publicParams:ze}=mo.parsePublicKeyParams(this.algorithm,ke.subarray(Ae));this.publicParams=ze,Ae+=Ce}catch(ke){throw Error("Error reading MPIs")}return await this.computeFingerprintAndKeyID(),Ae}throw new Js(`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=mo.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 mo.hash.sha256(ke);else{if(4!==this.version)throw Error("Unsupported key version");this.fingerprint=await mo.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}}So.prototype.readPublicKey=So.prototype.read,So.prototype.writePublicKey=So.prototype.write;const _l=Zt.constructAllowedPackets([Hs,co,no,ro]);class Po{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:ze}=mo.getCipher(ke),qe=await ie(J(this.encrypted)),Ve=await mo.mode.cfb.decrypt(ke,Ae,qe.subarray(ze+2),qe.subarray(2,ze+2));this.packets=await so.fromBinary(Ve,_l,Ce)}async encrypt(ke,Ae,Ce=tr){const ze=this.packets.write(),{blockSize:qe}=mo.getCipher(ke),Ve=await mo.getPrefixRandom(ke),tt=await mo.mode.cfb.encrypt(ke,Ae,Ve,new Uint8Array(qe),Ce),rt=await mo.mode.cfb.encrypt(ke,Ae,ze,tt.subarray(2),Ce);this.encrypted=Zt.concat([tt,rt])}}class xo extends So{static get tag(){return er.packet.publicSubkey}constructor(ke,Ae){super(ke,Ae)}static fromSecretSubkeyPacket(ke){const Ae=new xo,{version:Ce,created:ze,algorithm:qe,publicParams:Ve,keyID:tt,fingerprint:rt}=ke;return Ae.version=Ce,Ae.created=ze,Ae.algorithm=qe,Ae.publicParams=Ve,Ae.keyID=tt,Ae.fingerprint=rt,Ae}}class Mo{static get tag(){return er.packet.userAttribute}constructor(){this.attributes=[]}read(ke){let Ae=0;for(;Ae<ke.length;){const Ce=Gs(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(Vs(this.attributes[Ae].length)),ke.push(Zt.stringToUint8Array(this.attributes[Ae]));return Zt.concatUint8Array(ke)}equals(ke){return!!(ke&&ke instanceof Mo)&&this.attributes.every((function(Ae,Ce){return Ae===ke.attributes[Ce]}))}}class Co extends So{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 ko,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+mo.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}=mo.parsePrivateKeyParams(this.algorithm,Ae,this.publicParams);this.privateParams=ke}catch(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=mo.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 ko(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(this.isDecrypted()&&!ke)return void(this.s2kUsage=0);if(!ke)throw Error("The key must be decrypted before removing passphrase protection.");this.s2k=new ko(Ae),this.s2k.salt=await mo.random.getRandomBytes(8);const Ce=mo.serializeParams(this.algorithm,this.privateParams);this.symmetric=er.symmetric.aes256;const ze=await Ko(this.s2k,ke,this.symmetric),{blockSize:qe}=mo.getCipher(this.symmetric);if(this.iv=await mo.random.getRandomBytes(qe),Ae.aeadProtect){this.s2kUsage=253,this.aead=er.aead.eax;const ke=mo.getAEADMode(this.aead),Ae=await ke(this.symmetric,ze);this.keyMaterial=await Ae.encrypt(Ce,this.iv.subarray(0,ke.ivLength),new Uint8Array)}else this.s2kUsage=254,this.keyMaterial=await mo.mode.cfb.encrypt(this.symmetric,ze,Zt.concatUint8Array([Ce,await mo.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 Ko(this.s2k,ke,this.symmetric),253===this.s2kUsage){const ze=mo.getAEADMode(this.aead),qe=await ze(this.symmetric,Ae);try{Ce=await qe.decrypt(this.keyMaterial,this.iv.subarray(0,ze.ivLength),new Uint8Array)}catch(ke){if("Authentication tag mismatch"===ke.message)throw Error("Incorrect key passphrase: "+ke.message);throw ke}}else{const ke=await mo.mode.cfb.decrypt(this.symmetric,Ae,this.keyMaterial,this.iv);Ce=ke.subarray(0,-20);const ze=await mo.hash.sha1(Ce);if(!Zt.equalsUint8Array(ze,ke.subarray(-20)))throw Error("Incorrect key passphrase")}try{const{privateParams:ke}=mo.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 mo.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:ze}=await mo.generateParams(this.algorithm,ke,Ae);this.privateParams=Ce,this.publicParams=ze,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 Ko(ke,Ae,Ce){const{keySize:ze}=mo.getCipher(Ce);return ke.produceKey(Ae,ze)}var kl=bt((function(ke){!function(Ae){function r(ke){function t(){return Ce<ze}function r(){return Ce}function n(ke){Ce=ke}function a(){Ce=0,ze=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 ze;return t()&&ke(ze=Ae[Ce])?(Ce+=1,s("token",ze)):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,ze,qe;for(qe=r(),Ce=s("and"),Ae=0;Ae<ke.length;Ae+=1){if(null===(ze=ke[Ae]()))return n(qe),null;c(Ce,ze)}return Ce}}function d(){var ke=arguments;return function(){var Ae,Ce,ze;for(ze=r(),Ae=0;Ae<ke.length;Ae+=1){if(null!==(Ce=ke[Ae]()))return Ce;n(ze)}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,ze,qe,Ve,tt;for(Ve=r(),Ce=s("star"),qe=0,tt=void 0===Ae?0:Ae;null!==(ze=ke());)qe+=1,c(Ce,ze);return qe>=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),ze=33<=Ce&&Ce<=126;return ke.rfc6532&&(ze=ze||m(Ae)),ze})))}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),ze=33<=Ce&&Ce<=39||42<=Ce&&Ce<=91||93<=Ce&&Ce<=126;return ke.rfc6532&&(ze=ze||m(Ae)),ze}))}),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 I(){return o("atom",f(y(l(D)),b(R,1),y(l(D)))())}function U(){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)),U,p(l(D)))())}function T(){return o("qtext",d((function(){return u((function(Ae){var Ce=Ae.charCodeAt(0),ze=33===Ce||35<=Ce&&Ce<=91||93<=Ce&&Ce<=126;return ke.rfc6532&&(ze=ze||m(Ae)),ze}))}),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(I,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),ze=33<=Ce&&Ce<=90||94<=Ce&&Ce<=126;return ke.rfc6532&&(ze=ze||m(Ae)),ze}))}),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(I,b(f(h("."),I)))())}function pe(){return ke.strict?null:o("obs-dtext",d(ee,P)())}function ye(ke,Ae){var Ce,ze,qe;if(null==Ae)return null;for(ze=[Ae];ze.length>0;){if((qe=ze.pop()).name===ke)return qe;for(Ce=qe.children.length-1;Ce>=0;Ce-=1)ze.push(qe.children[Ce])}return null}function be(ke,Ae){var Ce,ze,qe,Ve,tt;if(null==Ae)return null;for(ze=[Ae],Ve=[],tt={},Ce=0;Ce<ke.length;Ce+=1)tt[ke[Ce]]=!0;for(;ze.length>0;)if((qe=ze.pop()).name in tt)Ve.push(qe);else for(Ce=qe.children.length-1;Ce>=0;Ce-=1)ze.push(qe.children[Ce]);return Ve}function me(Ae){var Ce,ze,qe,Ve,tt;if(null===Ae)return null;for(Ce=[],ze=be(["group","mailbox"],Ae),qe=0;qe<ze.length;qe+=1)"group"===(Ve=ze[qe]).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),ze=[],qe=be(["mailbox"],ke);for(Ae=0;Ae<qe.length;Ae+=1)ze.push(we(qe[Ae]));return{node:ke,parts:{name:Ce},type:ke.name,name:ve(Ce),addresses:ze}}function we(ke){var Ae=ye("display-name",ke),Ce=ye("addr-spec",ke),ze=function(ke,Ae){var Ce,ze,qe,Ve;if(null==Ae)return null;for(ze=[Ae],Ve=[];ze.length>0;)for((qe=ze.pop()).name===ke&&Ve.push(qe),Ce=qe.children.length-1;Ce>=0;Ce-=1)ze.push(qe.children[Ce]);return Ve}("cfws",ke),qe=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:ze},type:ke.name,name:ve(Ae),address:ve(Ce),local:ve(Ve),domain:ve(tt),comments:_e(qe),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,ze,qe,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,qe=Ve(Ae),ke.partial||!t())return me(qe);ke.strict=!1}return a(),qe=Ve(Ae),!ke.partial&&t()?null:me(qe)}function i(ke,Ae){function r(ke){return"[object String]"===Object.prototype.toString.call(ke)}function i(ke){return null==ke}var Ce,ze;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(ze in Ce={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1})i(ke[ze])&&(ke[ze]=i(Ae[ze])?Ce[ze]:Ae[ze]);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 Ro{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 Ro;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:ze}=kl.parseOneAddress({input:Ce,atInDisplayName:!0});this.comment=ze.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 Io extends Co{static get tag(){return er.packet.secretSubkey}constructor(ke=new Date,Ae=tr){super(ke,Ae)}}const Sl=Zt.constructAllowedPackets([ro]);class Bo{constructor(ke){this.packets=ke||new so}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 To(ke,Ae){const Ce=new Io(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 zo(ke,Ae){const Ce=new Co(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 qo(ke,Ae,Ce,ze,qe=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,ze,qe,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 Oo(ke,Ae,Ce=new Date){const ze=Zt.normalizeDate(Ce);if(null!==ze){const Ce=Go(ke,Ae);return!(ke.created<=ze&&ze<Ce)}return!1}async function Fo(ke,Ae,Ce,ze){const qe={};qe.key=Ae,qe.bind=ke;const Ve=new ro;return Ve.signatureType=er.signature.subkeyBinding,Ve.publicKeyAlgorithm=Ae.algorithm,Ve.hashAlgorithm=await No(null,ke,void 0,void 0,ze),Ce.sign?(Ve.keyFlags=[er.keyFlags.signData],Ve.embeddedSignature=await Lo(qe,null,ke,{signatureType:er.signature.keyBinding},Ce.date,void 0,void 0,ze)):Ve.keyFlags=[er.keyFlags.encryptCommunication|er.keyFlags.encryptStorage],Ce.keyExpirationTime>0&&(Ve.keyExpirationTime=Ce.keyExpirationTime,Ve.keyNeverExpires=!1),await Ve.sign(Ae,qe,Ce.date),Ve}async function No(ke,Ae,Ce=new Date,ze={},qe){let Ve=qe.preferredHashAlgorithm,tt=Ve;if(ke){const Ae=await ke.getPrimaryUser(Ce,ze,qe);Ae.selfCertification.preferredHashAlgorithms&&([tt]=Ae.selfCertification.preferredHashAlgorithms,Ve=mo.hash.getHashByteLength(Ve)<=mo.hash.getHashByteLength(tt)?tt:Ve)}switch(Object.getPrototypeOf(Ae)){case Co.prototype:case So.prototype:case Io.prototype:case xo.prototype:switch(Ae.algorithm){case er.publicKey.ecdh:case er.publicKey.ecdsa:case er.publicKey.eddsa:tt=mo.publicKey.elliptic.getPreferredHashAlgo(Ae.publicParams.oid)}}return mo.hash.getHashByteLength(Ve)<=mo.hash.getHashByteLength(tt)?tt:Ve}async function jo(ke,Ae=[],Ce=new Date,ze=[],qe=tr){const Ve={symmetric:er.symmetric.aes128,aead:er.aead.eax,compression:er.compression.uncompressed}[ke],tt={symmetric:qe.preferredSymmetricAlgorithm,aead:qe.preferredAEADAlgorithm,compression:qe.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,ze[Ae],qe)).selfCertification[rt];return!!Ve&&Ve.indexOf(tt)>=0})))).every(Boolean)?tt:Ve}async function Lo(ke,Ae,Ce,ze,qe,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 ro;return Object.assign(it,ze),it.publicKeyAlgorithm=Ce.algorithm,it.hashAlgorithm=await No(Ae,Ce,qe,Ve,rt),await it.sign(Ce,ke,qe,tt),it}async function Wo(ke,Ae,Ce,ze=new Date,qe){(ke=ke[Ce])&&(Ae[Ce].length?await Promise.all(ke.map((async function(ke){ke.isExpired(ze)||qe&&!await qe(ke)||Ae[Ce].some((function(Ae){return Zt.equalsUint8Array(Ae.writeParams(),ke.writeParams())}))||Ae[Ce].push(ke)}))):Ae[Ce]=ke)}async function Ho(ke,Ae,Ce,ze,qe,Ve,tt=new Date,rt){Ve=Ve||ke;const it=[];return await Promise.all(ze.map((async function(ke){try{qe&&!ke.issuerKeyID.equals(qe.issuerKeyID)||(await ke.verify(Ve,Ae,Ce,rt.revocationsExpire?tt:null,!1,rt),it.push(ke.issuerKeyID))}catch(ke){}}))),qe?(qe.revoked=!!it.some((ke=>ke.equals(qe.issuerKeyID)))||(qe.revoked||!1),qe.revoked):it.length>0}function Go(ke,Ae){let Ce;return!1===Ae.keyNeverExpires&&(Ce=ke.created.getTime()+1e3*Ae.keyExpirationTime),Ce?new Date(Ce):1/0}function Vo(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("Invalid 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 $o(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 Zo(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 Yo(ke,Ae){return!!Ae.allowInsecureDecryptionWithSigningKeys||(!ke.keyFlags||0!=(ke.keyFlags[0]&er.keyFlags.encryptCommunication)||0!=(ke.keyFlags[0]&er.keyFlags.encryptStorage))}function Xo(ke,Ae){const Ce=er.write(er.publicKey,ke.algorithm),ze=ke.getAlgorithmInfo();if(Ae.rejectPublicKeyAlgorithms.has(Ce))throw Error(ze.algorithm+" keys are considered too weak.");switch(Ce){case er.publicKey.rsaEncryptSign:case er.publicKey.rsaSign:case er.publicKey.rsaEncrypt:if(ze.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(ze.curve))throw Error(`Support for ${ze.algorithm} keys using curve ${ze.curve} is disabled.`)}}class Qo{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 so;return ke.push(this.userID||this.userAttribute),ke.push(...this.revocationSignatures),ke.push(...this.selfCertifications),ke.push(...this.otherCertifications),ke}clone(){const ke=new Qo(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 ze=this.mainKey.keyPacket,qe={userID:this.userID,userAttribute:this.userAttribute,key:ze},Ve=new Qo(qe.userID||qe.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(ze))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 Lo(qe,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,ze){const qe=this.mainKey.keyPacket;return Ho(qe,er.signature.certRevocation,{key:qe,userID:this.userID,userAttribute:this.userAttribute},this.revocationSignatures,ke,Ae,Ce,ze)}async verifyCertificate(ke,Ae,Ce=new Date,ze){const qe=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,ze);if(ke.revoked||await qe.isRevoked(ke,Ve.keyPacket,Ce,ze))throw Error("User certificate is revoked");try{await ke.verify(Ve.keyPacket,er.signature.certGeneric,tt,Ce,void 0,ze)}catch(ke){throw Zt.wrapError("User certificate is invalid",ke)}}))),!0)}async verifyAllCertifications(ke,Ae=new Date,Ce){const ze=this,qe=this.selfCertifications.concat(this.otherCertifications);return Promise.all(qe.map((async qe=>({keyID:qe.issuerKeyID,valid:await ze.verifyCertificate(qe,ke,Ae,Ce).catch((()=>!1))}))))}async verify(ke=new Date,Ae){if(!this.selfCertifications.length)throw Error("No self-certifications found");const Ce=this,ze=this.mainKey.keyPacket,qe={userID:this.userID,userAttribute:this.userAttribute,key:ze};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(ze,er.signature.certGeneric,qe,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 ze=this.mainKey.keyPacket,qe={userID:this.userID,userAttribute:this.userAttribute,key:ze};await Wo(ke,this,"selfCertifications",Ae,(async function(ke){try{return await ke.verify(ze,er.signature.certGeneric,qe,Ae,!1,Ce),!0}catch(ke){return!1}})),await Wo(ke,this,"otherCertifications",Ae),await Wo(ke,this,"revocationSignatures",Ae,(function(ke){return Ho(ze,er.signature.certRevocation,qe,[ke],void 0,void 0,Ae,Ce)}))}}class Jo{constructor(ke,Ae){this.keyPacket=ke,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=Ae}toPacketList(){const ke=new so;return ke.push(this.keyPacket),ke.push(...this.revocationSignatures),ke.push(...this.bindingSignatures),ke}clone(){const ke=new Jo(this.keyPacket,this.mainKey);return ke.bindingSignatures=[...this.bindingSignatures],ke.revocationSignatures=[...this.revocationSignatures],ke}async isRevoked(ke,Ae,Ce=new Date,ze=tr){const qe=this.mainKey.keyPacket;return Ho(qe,er.signature.subkeyRevocation,{key:qe,bind:this.keyPacket},this.revocationSignatures,ke,Ae,Ce,ze)}async verify(ke=new Date,Ae=tr){const Ce=this.mainKey.keyPacket,ze={key:Ce,bind:this.keyPacket},qe=await qo(this.bindingSignatures,Ce,er.signature.subkeyBinding,ze,ke,Ae);if(qe.revoked||await this.isRevoked(qe,null,ke,Ae))throw Error("Subkey is revoked");if(Oo(this.keyPacket,qe,ke))throw Error("Subkey is expired");return qe}async getExpirationTime(ke=new Date,Ae=tr){const Ce=this.mainKey.keyPacket,ze={key:Ce,bind:this.keyPacket};let qe;try{qe=await qo(this.bindingSignatures,Ce,er.signature.subkeyBinding,ze,ke,Ae)}catch(ke){return null}const Ve=Go(this.keyPacket,qe),tt=qe.getExpirationTime();return Ve<tt?Ve:tt}async update(ke,Ae=new Date,Ce=tr){const ze=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 qe=this,Ve={key:ze,bind:qe.keyPacket};await Wo(ke,this,"bindingSignatures",Ae,(async function(ke){for(let Ae=0;Ae<qe.bindingSignatures.length;Ae++)if(qe.bindingSignatures[Ae].issuerKeyID.equals(ke.issuerKeyID))return ke.created>qe.bindingSignatures[Ae].created&&(qe.bindingSignatures[Ae]=ke),!1;try{return await ke.verify(ze,er.signature.subkeyBinding,Ve,Ae,void 0,Ce),!0}catch(ke){return!1}})),await Wo(ke,this,"revocationSignatures",Ae,(function(ke){return Ho(ze,er.signature.subkeyRevocation,Ve,[ke],void 0,void 0,Ae,Ce)}))}async revoke(ke,{flag:Ae=er.reasonForRevocation.noReason,string:Ce=""}={},ze=new Date,qe=tr){const Ve={key:ke,bind:this.keyPacket},tt=new Jo(this.keyPacket,this.mainKey);return tt.revocationSignatures.push(await Lo(Ve,null,ke,{signatureType:er.signature.subkeyRevocation,reasonForRevocationFlag:er.write(er.reasonForRevocation,Ae),reasonForRevocationString:Ce},ze,void 0,!1,qe)),await tt.update(this),tt}hasSameFingerprintAs(ke){return this.keyPacket.hasSameFingerprintAs(ke.keyPacket||ke)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((ke=>{Jo.prototype[ke]=function(){return this.keyPacket[ke]()}}));const Cl=Zt.constructAllowedPackets([ro]);class tc{packetListToStructure(ke,Ae=new Set){let Ce,ze,qe;for(const Ve of ke){const ke=Ve.constructor.tag;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=Ve,ze=this.getKeyID(),!ze)throw Error("Missing Key ID");break;case er.packet.userID:case er.packet.userAttribute:Ce=new Qo(Ve,this),this.users.push(Ce);break;case er.packet.publicSubkey:case er.packet.secretSubkey:Ce=null,qe=new Jo(Ve,this),this.subkeys.push(qe);break;case er.packet.signature:switch(Ve.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}Ve.issuerKeyID.equals(ze)?Ce.selfCertifications.push(Ve):Ce.otherCertifications.push(Ve);break;case er.signature.certRevocation:Ce?Ce.revocationSignatures.push(Ve):this.directSignatures.push(Ve);break;case er.signature.key:this.directSignatures.push(Ve);break;case er.signature.subkeyBinding:if(!qe){Zt.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}qe.bindingSignatures.push(Ve);break;case er.signature.keyRevocation:this.revocationSignatures.push(Ve);break;case er.signature.subkeyRevocation:if(!qe){Zt.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}qe.revocationSignatures.push(Ve)}}}}toPacketList(){const ke=new so;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={},ze=tr){await this.verifyPrimaryKey(Ae,Ce,ze);const qe=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,ze);const ke={key:qe,bind:Ce.keyPacket},Ve=await qo(Ce.bindingSignatures,qe,er.signature.subkeyBinding,ke,Ae,ze);if(!$o(Ce.keyPacket,Ve))continue;if(!Ve.embeddedSignature)throw Error("Missing embedded signature");return await qo([Ve.embeddedSignature],Ce.keyPacket,er.signature.keyBinding,ke,Ae,ze),Xo(Ce.keyPacket,ze),Ce}catch(ke){tt=ke}try{const Ve=await this.getPrimaryUser(Ae,Ce,ze);if((!ke||qe.getKeyID().equals(ke))&&$o(qe,Ve.selfCertification))return Xo(qe,ze),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={},ze=tr){await this.verifyPrimaryKey(Ae,Ce,ze);const qe=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,ze);const ke={key:qe,bind:Ce.keyPacket},Ve=await qo(Ce.bindingSignatures,qe,er.signature.subkeyBinding,ke,Ae,ze);if(Zo(Ce.keyPacket,Ve))return Xo(Ce.keyPacket,ze),Ce}catch(ke){tt=ke}try{const Ve=await this.getPrimaryUser(Ae,Ce,ze);if((!ke||qe.getKeyID().equals(ke))&&Zo(qe,Ve.selfCertification))return Xo(qe,ze),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,ze=tr){return Ho(this.keyPacket,er.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,ke,Ae,Ce,ze)}async verifyPrimaryKey(ke=new Date,Ae={},Ce=tr){const ze=this.keyPacket;if(await this.isRevoked(null,null,ke,Ce))throw Error("Primary key is revoked");const{selfCertification:qe}=await this.getPrimaryUser(ke,Ae,Ce);if(Oo(ze,qe,ke))throw Error("Primary key is expired");const Ve=await qo(this.directSignatures,ze,er.signature.key,{key:ze},ke,Ce).catch((()=>{}));if(Ve&&Oo(ze,Ve,ke))throw Error("Primary key is expired")}async getExpirationTime(ke,Ae=tr){let Ce;try{const{selfCertification:ze}=await this.getPrimaryUser(null,ke,Ae),qe=Go(this.keyPacket,ze),Ve=ze.getExpirationTime(),tt=await qo(this.directSignatures,this.keyPacket,er.signature.key,{key:this.keyPacket},null,Ae).catch((()=>{}));if(tt){const ke=Go(this.keyPacket,tt);Ce=Math.min(qe,Ve,ke)}else Ce=qe<Ve?qe:Ve}catch(ke){Ce=null}return Zt.normalizeDate(Ce)}async getPrimaryUser(ke=new Date,Ae={},Ce=tr){const ze=this.keyPacket,qe=[];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:ze},it=await qo(Ve.selfCertifications,ze,er.signature.certGeneric,rt,ke,Ce);qe.push({index:tt,user:Ve,selfCertification:it})}catch(ke){Ve=ke}if(!qe.length)throw Ve||Error("Could not find primary user");await Promise.all(qe.map((async function(Ae){return Ae.user.revoked||Ae.user.isRevoked(Ae.selfCertification,null,ke,Ce)})));const tt=qe.sort((function(ke,Ae){const Ce=ke.selfCertification,ze=Ae.selfCertification;return ze.revoked-Ce.revoked||Ce.isPrimaryUserID-ze.isPrimaryUserID||Ce.created-ze.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 ze=this.clone();return await Wo(ke,ze,"revocationSignatures",Ae,(qe=>Ho(ze.keyPacket,er.signature.keyRevocation,ze,[qe],null,ke.keyPacket,Ae,Ce))),await Wo(ke,ze,"directSignatures",Ae),await Promise.all(ke.users.map((async ke=>{const qe=ze.users.filter((Ae=>ke.userID&&ke.userID.equals(Ae.userID)||ke.userAttribute&&ke.userAttribute.equals(Ae.userAttribute)));if(qe.length>0)await Promise.all(qe.map((ze=>ze.update(ke,Ae,Ce))));else{const Ae=ke.clone();Ae.mainKey=ze,ze.users.push(Ae)}}))),await Promise.all(ke.subkeys.map((async ke=>{const qe=ze.subkeys.filter((Ae=>Ae.hasSameFingerprintAs(ke)));if(qe.length>0)await Promise.all(qe.map((ze=>ze.update(ke,Ae,Ce))));else{const Ae=ke.clone();Ae.mainKey=ze,ze.subkeys.push(Ae)}}))),ze}async getRevocationCertificate(ke=new Date,Ae=tr){const Ce={key:this.keyPacket},ze=await qo(this.revocationSignatures,this.keyPacket,er.signature.keyRevocation,Ce,ke,Ae),qe=new so;return qe.push(ze),xe(er.armor.publicKey,qe.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(ke,Ae=new Date,Ce=tr){const ze=await Pe(ke,Ce),qe=(await so.fromBinary(ze.data,Cl,Ce)).findPacket(er.packet.signature);if(!qe||qe.signatureType!==er.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!qe.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await qe.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(qe),Ve}async signPrimaryUser(ke,Ae,Ce,ze=tr){const{index:qe,user:Ve}=await this.getPrimaryUser(Ae,Ce,ze),tt=await Ve.certify(ke,Ae,ze),rt=this.clone();return rt.users[qe]=tt,rt}async signAllUsers(ke,Ae=new Date,Ce=tr){const ze=this.clone();return ze.users=await Promise.all(this.users.map((function(ze){return ze.certify(ke,Ae,Ce)}))),ze}async verifyPrimaryUser(ke,Ae=new Date,Ce,ze=tr){const qe=this.keyPacket,{user:Ve}=await this.getPrimaryUser(Ae,Ce,ze);return ke?await Ve.verifyAllCertifications(ke,Ae,ze):[{keyID:qe.getKeyID(),valid:await Ve.verify(Ae,ze).catch((()=>!1))}]}async verifyAllUsers(ke,Ae=new Date,Ce=tr){const ze=this.keyPacket,qe=[];return await Promise.all(this.users.map((async Ve=>{const tt=ke?await Ve.verifyAllCertifications(ke,Ae,Ce):[{keyID:ze.getKeyID(),valid:await Ve.verify(Ae,Ce).catch((()=>!1))}];qe.push(...tt.map((ke=>({userID:Ve.userID.userID,keyID:ke.keyID,valid:ke.valid}))))}))),qe}}function rc(ke){for(const Ae of ke)switch(Ae.constructor.tag){case er.packet.secretKey:return new nc(ke);case er.packet.publicKey:return new ic(ke)}throw Error("No key packet found")}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((ke=>{tc.prototype[ke]=Jo.prototype[ke]}));class ic extends tc{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 nc extends ic{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 so,Ae=this.toPacketList();for(const Ce of Ae)switch(Ce.constructor.tag){case er.packet.secretKey:{const Ae=So.fromSecretKeyPacket(Ce);ke.push(Ae);break}case er.packet.secretSubkey:{const Ae=xo.fromSecretSubkeyPacket(Ce);ke.push(Ae);break}default:ke.push(Ce)}return new ic(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={},ze=tr){const qe=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:qe,bind:this.subkeys[Ce].keyPacket};Yo(await qo(this.subkeys[Ce].bindingSignatures,qe,er.signature.subkeyBinding,ke,Ae,ze),ze)&&Ve.push(this.subkeys[Ce])}catch(ke){}const tt=await this.getPrimaryUser(Ae,Ce,ze);return ke&&!qe.getKeyID().equals(ke,!0)||!Yo(tt.selfCertification,ze)||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,ze=tr){if(!this.isPrivate())throw Error("Need private key for revoking");const qe={key:this.keyPacket},Ve=this.clone();return Ve.revocationSignatures.push(await Lo(qe,null,this.keyPacket,{signatureType:er.signature.keyRevocation,reasonForRevocationFlag:er.write(er.reasonForRevocation,ke),reasonForRevocationString:Ae},Ce,void 0,void 0,ze)),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 ze=Ce.getAlgorithmInfo();ze.type=ze.curve?"ecc":"rsa",ze.rsaBits=ze.bits||4096,ze.curve=ze.curve||"curve25519",ke=Vo(ke,ze);const qe=await To(ke);Xo(qe,Ae);const Ve=await Fo(qe,Ce,ke,Ae),tt=this.toPacketList();return tt.push(qe,Ve),new nc(tt)}}const Dl=Zt.constructAllowedPackets([So,xo,Co,Io,Ro,Mo,ro]);async function sc(ke,Ae,Ce,ze){Ce.passphrase&&await ke.encrypt(Ce.passphrase,ze),await Promise.all(Ae.map((async function(ke,Ae){const qe=Ce.subkeys[Ae].passphrase;qe&&await ke.encrypt(qe,ze)})));const qe=new so;qe.push(ke),await Promise.all(Ce.userIDs.map((async function(Ae,qe){function a(ke,Ae){return[Ae,...ke.filter((ke=>ke!==Ae))]}const Ve=Ro.fromObject(Ae),tt={};tt.userID=Ve,tt.key=ke;const rt=new ro;return rt.signatureType=er.signature.certGeneric,rt.publicKeyAlgorithm=ke.algorithm,rt.hashAlgorithm=await No(null,ke,void 0,void 0,ze),rt.keyFlags=[er.keyFlags.certifyKeys|er.keyFlags.signData],rt.preferredSymmetricAlgorithms=a([er.symmetric.aes256,er.symmetric.aes128,er.symmetric.aes192],ze.preferredSymmetricAlgorithm),ze.aeadProtect&&(rt.preferredAEADAlgorithms=a([er.aead.eax,er.aead.ocb],ze.preferredAEADAlgorithm)),rt.preferredHashAlgorithms=a([er.hash.sha256,er.hash.sha512],ze.preferredHashAlgorithm),rt.preferredCompressionAlgorithms=a([er.compression.zlib,er.compression.zip,er.compression.uncompressed],ze.preferredCompressionAlgorithm),0===qe&&(rt.isPrimaryUserID=!0),rt.features=[0],rt.features[0]|=er.features.modificationDetection,ze.aeadProtect&&(rt.features[0]|=er.features.aead),ze.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})=>{qe.push(ke),qe.push(Ae)}))})),await Promise.all(Ae.map((async function(Ae,qe){const Ve=Ce.subkeys[qe];return{secretSubkeyPacket:Ae,subkeySignaturePacket:await Fo(Ae,ke,Ve,ze)}}))).then((ke=>{ke.forEach((({secretSubkeyPacket:ke,subkeySignaturePacket:Ae})=>{qe.push(ke),qe.push(Ae)}))}));const Ve={key:ke};return qe.push(await Lo(Ve,null,ke,{signatureType:er.signature.keyRevocation,reasonForRevocationFlag:er.reasonForRevocation.noReason,reasonForRevocationString:""},Ce.date,void 0,void 0,ze)),Ce.passphrase&&ke.clearPrivateParams(),await Promise.all(Ae.map((async function(ke,Ae){Ce.subkeys[Ae].passphrase&&ke.clearPrivateParams()}))),new nc(qe)}const Rl=Zt.constructAllowedPackets([Hs,co,vo,go,Po,_o,Ao,no,ro]),Tl=Zt.constructAllowedPackets([Ao]),Il=Zt.constructAllowedPackets([ro]);class hc{constructor(ke){this.packets=ke||new so}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,ze=new Date,qe=tr){const Ve=Ce||await this.decryptSessionKeys(ke,Ae,ze,qe),tt=this.packets.filterByTag(er.packet.symmetricallyEncryptedData,er.packet.symEncryptedIntegrityProtectedData,er.packet.aeadEncryptedData);if(0===tt.length)return this;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,qe)}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 hc(rt.packets);return rt.packets=new so,ot}async decryptSessionKeys(ke,Ae,Ce=new Date,ze=tr){let qe,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 qe;qe=Ce?await so.fromBinary(ke.write(),Tl,ze):ke,await Promise.all(qe.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,ze);Ae.selfCertification.preferredSymmetricAlgorithms&&(tt=tt.concat(Ae.selfCertification.preferredSymmetricAlgorithms))}catch(ke){}const rt=(await ke.getDecryptionKeys(Ae.publicKeyID,null,void 0,ze)).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(ze.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(ze.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map((async Ae=>{const ze=new _o;ze.read(Ce);const tt={sessionKeyAlgorithm:Ae,sessionKey:await mo.generateSessionKey(Ae)};try{await ze.decrypt(ke,tt),Ve.push(ze)}catch(ke){Zt.printDebugError(ke),qe=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),qe=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 qe||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=[],ze=tr){const qe=await jo("symmetric",ke,Ae,Ce,ze),Ve=er.read(er.symmetric,qe),tt=ze.aeadProtect&&await async function(ke,Ae=new Date,Ce=[],ze=tr){let qe=!0;return await Promise.all(ke.map((async function(ke,Ve){const tt=await ke.getPrimaryUser(Ae,Ce[Ve],ze);tt.selfCertification.features&&tt.selfCertification.features[0]&er.features.aead||(qe=!1)}))),qe}(ke,Ae,Ce,ze)?er.read(er.aead,await jo("aead",ke,Ae,Ce,ze)):void 0;return{data:await mo.generateSessionKey(qe),algorithm:Ve,aeadAlgorithm:tt}}async encrypt(ke,Ae,Ce,ze=!1,qe=[],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 hc.generateSessionKey(ke,Ve,tt,rt);else{if(!Ae||!Ae.length)throw Error("No keys, passwords, or session key provided.");Ce=await hc.generateSessionKey(void 0,void 0,void 0,rt)}const{data:it,algorithm:nt,aeadAlgorithm:ot}=Ce,ct=await hc.encryptSessionKey(it,nt,ot,ke,Ae,ze,qe,Ve,tt,rt);let ht;ot?(ht=new vo,ht.aeadAlgorithm=er.write(er.aead,ot)):ht=new go,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 so,ct}static async encryptSessionKey(ke,Ae,Ce,ze,qe,Ve=!1,tt=[],rt=new Date,it=[],nt=tr){const ot=new so,ct=er.write(er.symmetric,Ae),ht=Ce&&er.write(er.aead,Ce);if(ze){const Ae=await Promise.all(ze.map((async function(Ae,Ce){const ze=await Ae.getEncryptionKey(tt[Ce],rt,it,nt),qe=new _o;return qe.publicKeyID=Ve?Me.wildcard():ze.getKeyID(),qe.publicKeyAlgorithm=ze.keyPacket.algorithm,qe.sessionKey=ke,qe.sessionKeyAlgorithm=ct,await qe.encrypt(ze.keyPacket),delete qe.sessionKey,qe})));ot.push(...Ae)}if(qe){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,ze){const Ve=new Ao(nt);if(Ve.sessionKey=ke,Ve.sessionKeyAlgorithm=Ae,Ce&&(Ve.aeadAlgorithm=Ce),await Ve.encrypt(ze,nt),nt.passwordCollisionCheck){if(1!==(await Promise.all(qe.map((ke=>t(Ve,ke))))).reduce(r))return i(ke,Ae,ze)}return delete Ve.sessionKey,Ve},Ae=await Promise.all(qe.map((Ae=>i(ke,ct,ht,Ae))));ot.push(...Ae)}return new hc(ot)}async sign(ke=[],Ae=null,Ce=[],ze=new Date,qe=[],Ve=tr){const tt=new so,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 no;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,ze,qe,Ve),nt=new no;return nt.signatureType=ot,nt.hashAlgorithm=await No(Ae,it.keyPacket,ze,qe,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 fc(rt,ke,Ae,Ce,ze,qe,!1,Ve)),new hc(tt)}compress(ke,Ae=tr){if(ke===er.compression.uncompressed)return this;const Ce=new co(Ae);Ce.algorithm=ke,Ce.packets=this.packets;const ze=new so;return ze.push(Ce),new hc(ze)}async signDetached(ke=[],Ae=null,Ce=[],ze=new Date,qe=[],Ve=tr){const tt=this.packets.findPacket(er.packet.literalData);if(!tt)throw Error("No literal data packet to sign.");return new Bo(await fc(tt,ke,Ae,Ce,ze,qe,!0,Ve))}async verify(ke,Ae=new Date,Ce=tr){const ze=this.unwrapCompressed(),qe=ze.packets.filterByTag(er.packet.literalData);if(1!==qe.length)throw Error("Can only verify message with one literal data packet.");_(ze.packets.stream)&&ze.packets.push(...await ie(ze.packets.stream,(ke=>ke||[])));const Ve=ze.packets.filterByTag(er.packet.onePassSignature).reverse(),tt=ze.packets.filterByTag(er.packet.signature);return Ve.length&&!tt.length&&Zt.isStream(ze.packets.stream)&&!_(ze.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,qe[0],void 0,!1)),ke.hashed.catch((()=>{}))}))),ze.packets.stream=X(ze.packets.stream,(async(ke,Ae)=>{const Ce=H(ke),ze=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 ze.ready,await ze.close()}catch(ke){Ve.forEach((Ae=>{Ae.correspondingSigReject(ke)})),await ze.abort(ke)}})),dc(Ve,qe,ke,Ae,!1,Ce)):dc(tt,qe,ke,Ae,!1,Ce)}verifyDetached(ke,Ae,Ce=new Date,ze=tr){const qe=this.unwrapCompressed().packets.filterByTag(er.packet.literalData);if(1!==qe.length)throw Error("Can only verify message with one literal data packet.");return dc(ke.packets,qe,Ae,Ce,!0,ze)}unwrapCompressed(){const ke=this.packets.filterByTag(er.packet.compressedData);return ke.length?new hc(ke[0].packets):this}async appendSignature(ke,Ae=tr){await this.packets.read(Zt.isUint8Array(ke)?ke:(await Pe(ke)).data,Il,Ae)}write(){return this.packets.write()}armor(ke=tr){return xe(er.armor.message,this.write(),null,null,null,ke)}}async function fc(ke,Ae,Ce=null,ze=[],qe=new Date,Ve=[],tt=!1,rt=tr){const it=new so,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(ze[Ce],qe,it,rt);return Lo(ke,Ae,ot.keyPacket,{signatureType:nt},qe,it,tt,rt)}))).then((ke=>{it.push(...ke)})),Ce){const ke=Ce.packets.filterByTag(er.packet.signature);it.push(...ke)}return it}async function dc(ke,Ae,Ce,ze=new Date,qe=!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,ze=new Date,qe=!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 no?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],ze,qe,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(),ze,void 0,Ve)}return!0})(),signature:(async()=>{const ke=await it,Ae=new so;return ke&&Ae.push(ke),new Bo(Ae)})()};return nt.signature.catch((()=>{})),nt.verified.catch((()=>{})),nt}(ke,Ae,Ce,ze,qe,Ve)})))}const Ul=Zt.constructAllowedPackets([ro]);class pc{constructor(ke,Ae){if(this.text=Zt.removeTrailingSpaces(ke).replace(/\r?\n/g,"\r\n"),Ae&&!(Ae instanceof Bo))throw Error("Invalid signature input");this.signature=Ae||new Bo(new so)}getSigningKeyIDs(){const ke=[];return this.signature.packets.forEach((function(Ae){ke.push(Ae.issuerKeyID)})),ke}async sign(ke,Ae=null,Ce=[],ze=new Date,qe=[],Ve=tr){const tt=new Hs;tt.setText(this.text);const rt=new Bo(await fc(tt,ke,Ae,Ce,ze,qe,!0,Ve));return new pc(this.text,rt)}verify(ke,Ae=new Date,Ce=tr){const ze=this.signature.packets,qe=new Hs;return qe.setText(this.text),dc(ze,[qe],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 yc(ke){if(!(ke instanceof hc))throw Error("Parameter [message] needs to be of type Message")}function bc(ke){if(!(ke instanceof pc||ke instanceof hc))throw Error("Parameter [message] needs to be of type Message or CleartextMessage")}function mc(ke){if("armored"!==ke&&"binary"!==ke&&"object"!==ke)throw Error("Unsupported format "+ke)}const Ol=Object.keys(tr).length;function wc(ke){const Ae=Object.keys(ke);if(Ae.length!==Ol)for(const ke of Ae)if(void 0===tr[ke])throw Error("Unknown config property: "+ke)}function vc(ke){return ke&&!Zt.isArray(ke)&&(ke=[ke]),ke}async function _c(ke,Ae,Ce="utf8"){const ze=Zt.isStream(ke);return"array"===ze?ie(ke):"node"===Ae?(ke=Ot(ke),"binary"!==Ce&&ke.setEncoding(Ce),ke):"web"===Ae&&"ponyfill"===ze?Ft(ke):ke}function kc(ke,Ae){ke.data=X(Ae.packets.stream,(async(Ae,Ce)=>{await V(ke.data,Ce,{preventClose:!0});const ze=G(Ce);try{await ie(Ae,(ke=>ke)),await ze.close()}catch(ke){await ze.abort(ke)}}))}function Ac(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 Nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:ke=>`Symbol(${ke})`;function Ec(){}const zl="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function xc(ke){return"object"==typeof ke&&null!==ke||"function"==typeof ke}const ql=Ec,jl=Promise,Ll=Promise.prototype.then,Hl=Promise.resolve.bind(jl),Gl=Promise.reject.bind(jl);function Ic(ke){return new jl(ke)}function Uc(ke){return Hl(ke)}function Bc(ke){return Gl(ke)}function Tc(ke,Ae,Ce){return Ll.call(ke,Ae,Ce)}function zc(ke,Ae,Ce){Tc(Tc(ke,Ae,Ce),void 0,ql)}function qc(ke,Ae){zc(ke,Ae)}function Oc(ke,Ae){zc(ke,void 0,Ae)}function Fc(ke,Ae,Ce){return Tc(ke,Ae,Ce)}function Nc(ke){Tc(ke,void 0,ql)}const $l=(()=>{const ke=zl&&zl.queueMicrotask;if("function"==typeof ke)return ke;const Ae=Uc(void 0);return ke=>Tc(Ae,ke)})();function Lc(ke,Ae,Ce){if("function"!=typeof ke)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(ke,Ae,Ce)}function Wc(ke,Ae,Ce){try{return Uc(Lc(ke,Ae,Ce))}catch(ke){return Bc(ke)}}class Hc{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 ze=Ce+1;const qe=ke._elements,Ve=qe[Ce];return 16384===ze&&(Ae=ke._next,ze=0),--this._size,this._cursor=ze,ke!==Ae&&(this._front=Ae),qe[Ce]=void 0,Ve}forEach(ke){let Ae=this._cursor,Ce=this._front,ze=Ce._elements;for(;!(Ae===ze.length&&void 0===Ce._next||Ae===ze.length&&(Ce=Ce._next,ze=Ce._elements,Ae=0,0===ze.length));)ke(ze[Ae]),++Ae}peek(){const ke=this._front,Ae=this._cursor;return ke._elements[Ae]}}function Gc(ke,Ae){ke._ownerReadableStream=Ae,Ae._reader=ke,"readable"===Ae._state?Yc(ke):"closed"===Ae._state?function(ke){Yc(ke),Jc(ke)}(ke):Xc(ke,Ae._storedError)}function Vc(ke,Ae){return Df(ke._ownerReadableStream,Ae)}function $c(ke){"readable"===ke._ownerReadableStream._state?Qc(ke,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(ke,Ae){Xc(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 Zc(ke){return new TypeError("Cannot "+ke+" a stream using a released reader")}function Yc(ke){ke._closedPromise=Ic(((Ae,Ce)=>{ke._closedPromise_resolve=Ae,ke._closedPromise_reject=Ce}))}function Xc(ke,Ae){Yc(ke),Qc(ke,Ae)}function Qc(ke,Ae){void 0!==ke._closedPromise_reject&&(Nc(ke._closedPromise),ke._closedPromise_reject(Ae),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0)}function Jc(ke){void 0!==ke._closedPromise_resolve&&(ke._closedPromise_resolve(void 0),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0)}const Vl=Nl("[[AbortSteps]]"),Zl=Nl("[[ErrorSteps]]"),Xl=Nl("[[CancelSteps]]"),Jl=Nl("[[PullSteps]]"),Yl=Number.isFinite||function(ke){return"number"==typeof ke&&isFinite(ke)},Ql=Math.trunc||function(ke){return ke<0?Math.ceil(ke):Math.floor(ke)};function su(ke,Ae){if(void 0!==ke&&("object"!=typeof(Ce=ke)&&"function"!=typeof Ce))throw new TypeError(Ae+" is not an object.");var Ce}function ou(ke,Ae){if("function"!=typeof ke)throw new TypeError(Ae+" is not a function.")}function cu(ke,Ae){if(!function(ke){return"object"==typeof ke&&null!==ke||"function"==typeof ke}(ke))throw new TypeError(Ae+" is not an object.")}function uu(ke,Ae,Ce){if(void 0===ke)throw new TypeError(`Parameter ${Ae} is required in '${Ce}'.`)}function hu(ke,Ae,Ce){if(void 0===ke)throw new TypeError(`${Ae} is required in '${Ce}'.`)}function fu(ke){return Number(ke)}function du(ke){return 0===ke?0:ke}function lu(ke,Ae){const Ce=Number.MAX_SAFE_INTEGER;let ze=Number(ke);if(ze=du(ze),!Yl(ze))throw new TypeError(Ae+" is not a finite number");if(ze=function(ke){return du(Ql(ke))}(ze),ze<0||ze>Ce)throw new TypeError(`${Ae} is outside the accepted range of 0 to ${Ce}, inclusive`);return Yl(ze)&&0!==ze?ze:0}function pu(ke,Ae){if(!Cf(ke))throw new TypeError(Ae+" is not a ReadableStream.")}function yu(ke){return new vu(ke)}function bu(ke,Ae){ke._reader._readRequests.push(Ae)}function mu(ke,Ae,Ce){const ze=ke._reader._readRequests.shift();Ce?ze._closeSteps():ze._chunkSteps(Ae)}function gu(ke){return ke._reader._readRequests.length}function wu(ke){const Ae=ke._reader;return void 0!==Ae&&!!_u(Ae)}class vu{constructor(ke){if(uu(ke,1,"ReadableStreamDefaultReader"),pu(ke,"First parameter"),Kf(ke))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Gc(this,ke),this._readRequests=new Hc}get closed(){return _u(this)?this._closedPromise:Bc(Au("closed"))}cancel(ke){return _u(this)?void 0===this._ownerReadableStream?Bc(Zc("cancel")):Vc(this,ke):Bc(Au("cancel"))}read(){if(!_u(this))return Bc(Au("read"));if(void 0===this._ownerReadableStream)return Bc(Zc("read from"));let ke,Ae;const Ce=Ic(((Ce,ze)=>{ke=Ce,Ae=ze}));return ku(this,{_chunkSteps:Ae=>ke({value:Ae,done:!1}),_closeSteps:()=>ke({value:void 0,done:!0}),_errorSteps:ke=>Ae(ke)}),Ce}releaseLock(){if(!_u(this))throw Au("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");$c(this)}}}function _u(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_readRequests")}function ku(ke,Ae){const Ce=ke._ownerReadableStream;Ce._disturbed=!0,"closed"===Ce._state?Ae._closeSteps():"errored"===Ce._state?Ae._errorSteps(Ce._storedError):Ce._readableStreamController[Jl](Ae)}function Au(ke){return new TypeError(`ReadableStreamDefaultReader.prototype.${ke} can only be used on a ReadableStreamDefaultReader`)}let ad;Object.defineProperties(vu.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(vu.prototype,Nl.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof Nl.asyncIterator&&(ad={[Nl.asyncIterator](){return this}},Object.defineProperty(ad,Nl.asyncIterator,{enumerable:!1}));class Eu{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?Fc(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(ke){const t=()=>this._returnSteps(ke);return this._ongoingPromise?Fc(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 Bc(Zc("iterate"));let Ae,Ce;const ze=Ic(((ke,ze)=>{Ae=ke,Ce=ze}));return ku(ke,{_chunkSteps:ke=>{this._ongoingPromise=void 0,$l((()=>Ae({value:ke,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,$c(ke),Ae({value:void 0,done:!0})},_errorSteps:Ae=>{this._ongoingPromise=void 0,this._isFinished=!0,$c(ke),Ce(Ae)}}),ze}_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 Bc(Zc("finish iterating"));if(!this._preventCancel){const Ce=Vc(Ae,ke);return $c(Ae),Fc(Ce,(()=>({value:ke,done:!0})))}return $c(Ae),Uc({value:ke,done:!0})}}const gd={next(){return xu(this)?this._asyncIteratorImpl.next():Bc(Mu("next"))},return(ke){return xu(this)?this._asyncIteratorImpl.return(ke):Bc(Mu("return"))}};function xu(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_asyncIteratorImpl")}function Mu(ke){return new TypeError(`ReadableStreamAsyncIterator.${ke} can only be used on a ReadableSteamAsyncIterator`)}void 0!==ad&&Object.setPrototypeOf(gd,ad);const wd=Number.isNaN||function(ke){return ke!=ke};function Ku(ke){return!!function(ke){if("number"!=typeof ke)return!1;if(wd(ke))return!1;if(ke<0)return!1;return!0}(ke)&&ke!==1/0}function Du(ke){const Ae=ke._queue.shift();return ke._queueTotalSize-=Ae.size,ke._queueTotalSize<0&&(ke._queueTotalSize=0),Ae.value}function Ru(ke,Ae,Ce){if(!Ku(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 Iu(ke){ke._queue=new Hc,ke._queueTotalSize=0}function Uu(ke){return ke.slice()}class Bu{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!qu(this))throw eh("view");return this._view}respond(ke){if(!qu(this))throw eh("respond");if(uu(ke,1,"respond"),ke=lu(ke,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(ke,Ae){if(!Ku(Ae=Number(Ae)))throw new RangeError("bytesWritten must be a finite");$u(ke,Ae)}(this._associatedReadableByteStreamController,ke)}respondWithNewView(ke){if(!qu(this))throw eh("respondWithNewView");if(uu(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,$u(ke,Ae.byteLength)}(this._associatedReadableByteStreamController,ke)}}Object.defineProperties(Bu.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Bu.prototype,Nl.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Tu{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!zu(this))throw th("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(Bu.prototype);!function(ke,Ae,Ce){ke._associatedReadableByteStreamController=Ae,ke._view=Ce}(Ce,this,Ae),this._byobRequest=Ce}return this._byobRequest}get desiredSize(){if(!zu(this))throw th("desiredSize");return Qu(this)}close(){if(!zu(this))throw th("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 Xu(ke,Ae),Ae}}Yu(ke),Rf(Ae)}(this)}enqueue(ke){if(!zu(this))throw th("enqueue");if(uu(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 ze=Ae.buffer,qe=Ae.byteOffset,Ve=Ae.byteLength,tt=ze;if(wu(Ce))if(0===gu(Ce))ju(ke,tt,qe,Ve);else{mu(Ce,new Uint8Array(tt,qe,Ve),!1)}else nh(Ce)?(ju(ke,tt,qe,Ve),Vu(ke)):ju(ke,tt,qe,Ve);Ou(ke)}(this,ke)}error(ke){if(!zu(this))throw th("error");Xu(this,ke)}[Xl](ke){if(this._pendingPullIntos.length>0){this._pendingPullIntos.peek().bytesFilled=0}Iu(this);const Ae=this._cancelAlgorithm(ke);return Yu(this),Ae}[Jl](ke){const Ae=this._controlledReadableByteStream;if(this._queueTotalSize>0){const Ae=this._queue.shift();this._queueTotalSize-=Ae.byteLength,Hu(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 ze;try{ze=new ArrayBuffer(Ce)}catch(Ae){return void ke._errorSteps(Ae)}const qe={buffer:ze,byteOffset:0,byteLength:Ce,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(qe)}bu(Ae,ke),Ou(this)}}function zu(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_controlledReadableByteStream")}function qu(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_associatedReadableByteStreamController")}function Ou(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(wu(Ae)&&gu(Ae)>0)return!0;if(nh(Ae)&&ih(Ae)>0)return!0;if(Qu(ke)>0)return!0;return!1}(ke))return;if(ke._pulling)return void(ke._pullAgain=!0);ke._pulling=!0;zc(ke._pullAlgorithm(),(()=>{ke._pulling=!1,ke._pullAgain&&(ke._pullAgain=!1,Ou(ke))}),(Ae=>{Xu(ke,Ae)}))}function Fu(ke,Ae){let Ce=!1;"closed"===ke._state&&(Ce=!0);const ze=Nu(Ae);"default"===Ae.readerType?mu(ke,ze,Ce):function(ke,Ae,Ce){const ze=ke._reader._readIntoRequests.shift();Ce?ze._closeSteps(Ae):ze._chunkSteps(Ae)}(ke,ze,Ce)}function Nu(ke){const Ae=ke.bytesFilled,Ce=ke.elementSize;return new ke.viewConstructor(ke.buffer,ke.byteOffset,Ae/Ce)}function ju(ke,Ae,Ce,ze){ke._queue.push({buffer:Ae,byteOffset:Ce,byteLength:ze}),ke._queueTotalSize+=ze}function Lu(ke,Ae){const Ce=Ae.elementSize,ze=Ae.bytesFilled-Ae.bytesFilled%Ce,qe=Math.min(ke._queueTotalSize,Ae.byteLength-Ae.bytesFilled),Ve=Ae.bytesFilled+qe,tt=Ve-Ve%Ce;let rt=qe,it=!1;tt>ze&&(rt=tt-Ae.bytesFilled,it=!0);const nt=ke._queue;for(;rt>0;){const Ce=nt.peek(),ze=Math.min(rt,Ce.byteLength),qe=Ae.byteOffset+Ae.bytesFilled;ot=Ae.buffer,ct=qe,ht=Ce.buffer,ft=Ce.byteOffset,yt=ze,new Uint8Array(ot).set(new Uint8Array(ht,ft,yt),ct),Ce.byteLength===ze?nt.shift():(Ce.byteOffset+=ze,Ce.byteLength-=ze),ke._queueTotalSize-=ze,Wu(ke,ze,Ae),rt-=ze}var ot,ct,ht,ft,yt;return it}function Wu(ke,Ae,Ce){Gu(ke),Ce.bytesFilled+=Ae}function Hu(ke){0===ke._queueTotalSize&&ke._closeRequested?(Yu(ke),Rf(ke._controlledReadableByteStream)):Ou(ke)}function Gu(ke){null!==ke._byobRequest&&(ke._byobRequest._associatedReadableByteStreamController=void 0,ke._byobRequest._view=null,ke._byobRequest=null)}function Vu(ke){for(;ke._pendingPullIntos.length>0;){if(0===ke._queueTotalSize)return;const Ae=ke._pendingPullIntos.peek();Lu(ke,Ae)&&(Zu(ke),Fu(ke._controlledReadableByteStream,Ae))}}function $u(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(nh(Ce))for(;ih(Ce)>0;)Fu(Ce,Zu(ke))}(ke,Ce)}else!function(ke,Ae,Ce){if(Ce.bytesFilled+Ae>Ce.byteLength)throw new RangeError("bytesWritten out of range");if(Wu(ke,Ae,Ce),Ce.bytesFilled<Ce.elementSize)return;Zu(ke);const ze=Ce.bytesFilled%Ce.elementSize;if(ze>0){const Ae=Ce.byteOffset+Ce.bytesFilled,qe=Ce.buffer.slice(Ae-ze,Ae);ju(ke,qe,0,qe.byteLength)}Ce.buffer=Ce.buffer,Ce.bytesFilled-=ze,Fu(ke._controlledReadableByteStream,Ce),Vu(ke)}(ke,Ae,Ce);Ou(ke)}function Zu(ke){const Ae=ke._pendingPullIntos.shift();return Gu(ke),Ae}function Yu(ke){ke._pullAlgorithm=void 0,ke._cancelAlgorithm=void 0}function Xu(ke,Ae){const Ce=ke._controlledReadableByteStream;"readable"===Ce._state&&(!function(ke){Gu(ke),ke._pendingPullIntos=new Hc}(ke),Iu(ke),Yu(ke),If(Ce,Ae))}function Qu(ke){const Ae=ke._controlledReadableByteStream._state;return"errored"===Ae?null:"closed"===Ae?0:ke._strategyHWM-ke._queueTotalSize}function Ju(ke,Ae,Ce){const ze=Object.create(Tu.prototype);let n=()=>{},a=()=>Uc(void 0),s=()=>Uc(void 0);void 0!==Ae.start&&(n=()=>Ae.start(ze)),void 0!==Ae.pull&&(a=()=>Ae.pull(ze)),void 0!==Ae.cancel&&(s=ke=>Ae.cancel(ke));const qe=Ae.autoAllocateChunkSize;if(0===qe)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(ke,Ae,Ce,ze,qe,Ve,tt){Ae._controlledReadableByteStream=ke,Ae._pullAgain=!1,Ae._pulling=!1,Ae._byobRequest=null,Ae._queue=Ae._queueTotalSize=void 0,Iu(Ae),Ae._closeRequested=!1,Ae._started=!1,Ae._strategyHWM=Ve,Ae._pullAlgorithm=ze,Ae._cancelAlgorithm=qe,Ae._autoAllocateChunkSize=tt,Ae._pendingPullIntos=new Hc,ke._readableStreamController=Ae,zc(Uc(Ce()),(()=>{Ae._started=!0,Ou(Ae)}),(ke=>{Xu(Ae,ke)}))}(ke,ze,n,a,s,Ce,qe)}function eh(ke){return new TypeError(`ReadableStreamBYOBRequest.prototype.${ke} can only be used on a ReadableStreamBYOBRequest`)}function th(ke){return new TypeError(`ReadableByteStreamController.prototype.${ke} can only be used on a ReadableByteStreamController`)}function rh(ke,Ae){ke._reader._readIntoRequests.push(Ae)}function ih(ke){return ke._reader._readIntoRequests.length}function nh(ke){const Ae=ke._reader;return void 0!==Ae&&!!sh(Ae)}Object.defineProperties(Tu.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Tu.prototype,Nl.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class ah{constructor(ke){if(uu(ke,1,"ReadableStreamBYOBReader"),pu(ke,"First parameter"),Kf(ke))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!zu(ke._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Gc(this,ke),this._readIntoRequests=new Hc}get closed(){return sh(this)?this._closedPromise:Bc(oh("closed"))}cancel(ke){return sh(this)?void 0===this._ownerReadableStream?Bc(Zc("cancel")):Vc(this,ke):Bc(oh("cancel"))}read(ke){if(!sh(this))return Bc(oh("read"));if(!ArrayBuffer.isView(ke))return Bc(new TypeError("view must be an array buffer view"));if(0===ke.byteLength)return Bc(new TypeError("view must have non-zero byteLength"));if(0===ke.buffer.byteLength)return Bc(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return Bc(Zc("read from"));let Ae,Ce;const ze=Ic(((ke,ze)=>{Ae=ke,Ce=ze}));return function(ke,Ae,Ce){const ze=ke._ownerReadableStream;ze._disturbed=!0,"errored"===ze._state?Ce._errorSteps(ze._storedError):function(ke,Ae,Ce){const ze=ke._controlledReadableByteStream;let qe=1;Ae.constructor!==DataView&&(qe=Ae.constructor.BYTES_PER_ELEMENT);const Ve=Ae.constructor,tt={buffer:Ae.buffer,byteOffset:Ae.byteOffset,byteLength:Ae.byteLength,bytesFilled:0,elementSize:qe,viewConstructor:Ve,readerType:"byob"};if(ke._pendingPullIntos.length>0)return ke._pendingPullIntos.push(tt),void rh(ze,Ce);if("closed"!==ze._state){if(ke._queueTotalSize>0){if(Lu(ke,tt)){const Ae=Nu(tt);return Hu(ke),void Ce._chunkSteps(Ae)}if(ke._closeRequested){const Ae=new TypeError("Insufficient bytes to fill elements in the given buffer");return Xu(ke,Ae),void Ce._errorSteps(Ae)}}ke._pendingPullIntos.push(tt),rh(ze,Ce),Ou(ke)}else{const ke=new Ve(tt.buffer,tt.byteOffset,0);Ce._closeSteps(ke)}}(ze._readableStreamController,Ae,Ce)}(this,ke,{_chunkSteps:ke=>Ae({value:ke,done:!1}),_closeSteps:ke=>Ae({value:ke,done:!0}),_errorSteps:ke=>Ce(ke)}),ze}releaseLock(){if(!sh(this))throw oh("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");$c(this)}}}function sh(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_readIntoRequests")}function oh(ke){return new TypeError(`ReadableStreamBYOBReader.prototype.${ke} can only be used on a ReadableStreamBYOBReader`)}function ch(ke,Ae){const{highWaterMark:Ce}=ke;if(void 0===Ce)return Ae;if(wd(Ce)||Ce<0)throw new RangeError("Invalid highWaterMark");return Ce}function uh(ke){const{size:Ae}=ke;return Ae||(()=>1)}function hh(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.highWaterMark,ze=null==ke?void 0:ke.size;return{highWaterMark:void 0===Ce?void 0:fu(Ce),size:void 0===ze?void 0:fh(ze,Ae+" has member 'size' that")}}function fh(ke,Ae){return ou(ke,Ae),Ae=>fu(ke(Ae))}function dh(ke,Ae,Ce){return ou(ke,Ce),Ce=>Wc(ke,Ae,[Ce])}function lh(ke,Ae,Ce){return ou(ke,Ce),()=>Wc(ke,Ae,[])}function ph(ke,Ae,Ce){return ou(ke,Ce),Ce=>Lc(ke,Ae,[Ce])}function yh(ke,Ae,Ce){return ou(ke,Ce),(Ce,ze)=>Wc(ke,Ae,[Ce,ze])}function bh(ke,Ae){if(!vh(ke))throw new TypeError(Ae+" is not a WritableStream.")}Object.defineProperties(ah.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(ah.prototype,Nl.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class mh{constructor(ke={},Ae={}){void 0===ke?ke=null:cu(ke,"First parameter");const Ce=hh(Ae,"Second parameter"),ze=function(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.abort,ze=null==ke?void 0:ke.close,qe=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:dh(Ce,ke,Ae+" has member 'abort' that"),close:void 0===ze?void 0:lh(ze,ke,Ae+" has member 'close' that"),start:void 0===qe?void 0:ph(qe,ke,Ae+" has member 'start' that"),write:void 0===tt?void 0:yh(tt,ke,Ae+" has member 'write' that"),type:Ve}}(ke,"First parameter");wh(this);if(void 0!==ze.type)throw new RangeError("Invalid type is specified");const qe=uh(Ce);!function(ke,Ae,Ce,ze){const qe=Object.create(qh.prototype);let a=()=>{},s=()=>Uc(void 0),o=()=>Uc(void 0),c=()=>Uc(void 0);void 0!==Ae.start&&(a=()=>Ae.start(qe));void 0!==Ae.write&&(s=ke=>Ae.write(ke,qe));void 0!==Ae.close&&(o=()=>Ae.close());void 0!==Ae.abort&&(c=ke=>Ae.abort(ke));Oh(ke,qe,a,s,o,c,Ce,ze)}(this,ze,ch(Ce,1),qe)}get locked(){if(!vh(this))throw Gh("locked");return _h(this)}abort(ke){return vh(this)?_h(this)?Bc(new TypeError("Cannot abort a stream that already has a writer")):kh(this,ke):Bc(Gh("abort"))}close(){return vh(this)?_h(this)?Bc(new TypeError("Cannot close a stream that already has a writer")):xh(this)?Bc(new TypeError("Cannot close an already-closing stream")):Ah(this):Bc(Gh("close"))}getWriter(){if(!vh(this))throw Gh("getWriter");return gh(this)}}function gh(ke){return new Kh(ke)}function wh(ke){ke._state="writable",ke._storedError=void 0,ke._writer=void 0,ke._writableStreamController=void 0,ke._writeRequests=new Hc,ke._inFlightWriteRequest=void 0,ke._closeRequest=void 0,ke._inFlightCloseRequest=void 0,ke._pendingAbortRequest=void 0,ke._backpressure=!1}function vh(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_writableStreamController")}function _h(ke){return void 0!==ke._writer}function kh(ke,Ae){const Ce=ke._state;if("closed"===Ce||"errored"===Ce)return Uc(void 0);if(void 0!==ke._pendingAbortRequest)return ke._pendingAbortRequest._promise;let ze=!1;"erroring"===Ce&&(ze=!0,Ae=void 0);const qe=Ic(((Ce,qe)=>{ke._pendingAbortRequest={_promise:void 0,_resolve:Ce,_reject:qe,_reason:Ae,_wasAlreadyErroring:ze}}));return ke._pendingAbortRequest._promise=qe,ze||Eh(ke,Ae),qe}function Ah(ke){const Ae=ke._state;if("closed"===Ae||"errored"===Ae)return Bc(new TypeError(`The stream (in ${Ae} state) is not in the writable state and cannot be closed`));const Ce=Ic(((Ae,Ce)=>{const ze={_resolve:Ae,_reject:Ce};ke._closeRequest=ze})),ze=ke._writer;var qe;return void 0!==ze&&ke._backpressure&&"writable"===Ae&&nf(ze),Ru(qe=ke._writableStreamController,_d,0),jh(qe),Ce}function Sh(ke,Ae){"writable"!==ke._state?Ph(ke):Eh(ke,Ae)}function Eh(ke,Ae){const Ce=ke._writableStreamController;ke._state="erroring",ke._storedError=Ae;const ze=ke._writer;void 0!==ze&&Uh(ze,Ae),!function(ke){if(void 0===ke._inFlightWriteRequest&&void 0===ke._inFlightCloseRequest)return!1;return!0}(ke)&&Ce._started&&Ph(ke)}function Ph(ke){ke._state="errored",ke._writableStreamController[Zl]();const Ae=ke._storedError;if(ke._writeRequests.forEach((ke=>{ke._reject(Ae)})),ke._writeRequests=new Hc,void 0===ke._pendingAbortRequest)return void Mh(ke);const Ce=ke._pendingAbortRequest;if(ke._pendingAbortRequest=void 0,Ce._wasAlreadyErroring)return Ce._reject(Ae),void Mh(ke);zc(ke._writableStreamController[Vl](Ce._reason),(()=>{Ce._resolve(),Mh(ke)}),(Ae=>{Ce._reject(Ae),Mh(ke)}))}function xh(ke){return void 0!==ke._closeRequest||void 0!==ke._inFlightCloseRequest}function Mh(ke){void 0!==ke._closeRequest&&(ke._closeRequest._reject(ke._storedError),ke._closeRequest=void 0);const Ae=ke._writer;void 0!==Ae&&Xh(Ae,ke._storedError)}function Ch(ke,Ae){const Ce=ke._writer;void 0!==Ce&&Ae!==ke._backpressure&&(Ae?function(ke){Jh(ke)}(Ce):nf(Ce)),ke._backpressure=Ae}Object.defineProperties(mh.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(mh.prototype,Nl.toStringTag,{value:"WritableStream",configurable:!0});class Kh{constructor(ke){if(uu(ke,1,"WritableStreamDefaultWriter"),bh(ke,"First parameter"),_h(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)!xh(ke)&&ke._backpressure?Jh(this):tf(this),Zh(this);else if("erroring"===Ae)ef(this,ke._storedError),Zh(this);else if("closed"===Ae)tf(this),Zh(Ce=this),Qh(Ce);else{const Ae=ke._storedError;ef(this,Ae),Yh(this,Ae)}var Ce}get closed(){return Dh(this)?this._closedPromise:Bc(Vh("closed"))}get desiredSize(){if(!Dh(this))throw Vh("desiredSize");if(void 0===this._ownerWritableStream)throw $h("desiredSize");return function(ke){const Ae=ke._ownerWritableStream,Ce=Ae._state;if("errored"===Ce||"erroring"===Ce)return null;if("closed"===Ce)return 0;return Nh(Ae._writableStreamController)}(this)}get ready(){return Dh(this)?this._readyPromise:Bc(Vh("ready"))}abort(ke){return Dh(this)?void 0===this._ownerWritableStream?Bc($h("abort")):function(ke,Ae){return kh(ke._ownerWritableStream,Ae)}(this,ke):Bc(Vh("abort"))}close(){if(!Dh(this))return Bc(Vh("close"));const ke=this._ownerWritableStream;return void 0===ke?Bc($h("close")):xh(ke)?Bc(new TypeError("Cannot close an already-closing stream")):Rh(this)}releaseLock(){if(!Dh(this))throw Vh("releaseLock");void 0!==this._ownerWritableStream&&Bh(this)}write(ke){return Dh(this)?void 0===this._ownerWritableStream?Bc($h("write to")):Th(this,ke):Bc(Vh("write"))}}function Dh(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_ownerWritableStream")}function Rh(ke){return Ah(ke._ownerWritableStream)}function Ih(ke,Ae){"pending"===ke._closedPromiseState?Xh(ke,Ae):function(ke,Ae){Yh(ke,Ae)}(ke,Ae)}function Uh(ke,Ae){"pending"===ke._readyPromiseState?rf(ke,Ae):function(ke,Ae){ef(ke,Ae)}(ke,Ae)}function Bh(ke){const Ae=ke._ownerWritableStream,Ce=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Uh(ke,Ce),Ih(ke,Ce),Ae._writer=void 0,ke._ownerWritableStream=void 0}function Th(ke,Ae){const Ce=ke._ownerWritableStream,ze=Ce._writableStreamController,qe=function(ke,Ae){try{return ke._strategySizeAlgorithm(Ae)}catch(Ae){return Lh(ke,Ae),1}}(ze,Ae);if(Ce!==ke._ownerWritableStream)return Bc($h("write to"));const Ve=Ce._state;if("errored"===Ve)return Bc(Ce._storedError);if(xh(Ce)||"closed"===Ve)return Bc(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===Ve)return Bc(Ce._storedError);const tt=function(ke){return Ic(((Ae,Ce)=>{const ze={_resolve:Ae,_reject:Ce};ke._writeRequests.push(ze)}))}(Ce);return function(ke,Ae,Ce){try{Ru(ke,Ae,Ce)}catch(Ae){return void Lh(ke,Ae)}const ze=ke._controlledWritableStream;if(!xh(ze)&&"writable"===ze._state){Ch(ze,Wh(ke))}jh(ke)}(ze,Ae,qe),tt}Object.defineProperties(Kh.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Kh.prototype,Nl.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const _d={};class qh{constructor(){throw new TypeError("Illegal constructor")}error(ke){if(!function(ke){if(!xc(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&&Hh(this,ke)}[Vl](ke){const Ae=this._abortAlgorithm(ke);return Fh(this),Ae}[Zl](){Iu(this)}}function Oh(ke,Ae,Ce,ze,qe,Ve,tt,rt){Ae._controlledWritableStream=ke,ke._writableStreamController=Ae,Ae._queue=void 0,Ae._queueTotalSize=void 0,Iu(Ae),Ae._started=!1,Ae._strategySizeAlgorithm=rt,Ae._strategyHWM=tt,Ae._writeAlgorithm=ze,Ae._closeAlgorithm=qe,Ae._abortAlgorithm=Ve;const it=Wh(Ae);Ch(ke,it);zc(Uc(Ce()),(()=>{Ae._started=!0,jh(Ae)}),(Ce=>{Ae._started=!0,Sh(ke,Ce)}))}function Fh(ke){ke._writeAlgorithm=void 0,ke._closeAlgorithm=void 0,ke._abortAlgorithm=void 0,ke._strategySizeAlgorithm=void 0}function Nh(ke){return ke._strategyHWM-ke._queueTotalSize}function jh(ke){const Ae=ke._controlledWritableStream;if(!ke._started)return;if(void 0!==Ae._inFlightWriteRequest)return;if("erroring"===Ae._state)return void Ph(Ae);if(0===ke._queue.length)return;const Ce=ke._queue.peek().value;Ce===_d?function(ke){const Ae=ke._controlledWritableStream;(function(ke){ke._inFlightCloseRequest=ke._closeRequest,ke._closeRequest=void 0})(Ae),Du(ke);const Ce=ke._closeAlgorithm();Fh(ke),zc(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&&Qh(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),Sh(ke,Ae)}(Ae,ke)}))}(ke):function(ke,Ae){const Ce=ke._controlledWritableStream;!function(ke){ke._inFlightWriteRequest=ke._writeRequests.shift()}(Ce);zc(ke._writeAlgorithm(Ae),(()=>{!function(ke){ke._inFlightWriteRequest._resolve(void 0),ke._inFlightWriteRequest=void 0}(Ce);const Ae=Ce._state;if(Du(ke),!xh(Ce)&&"writable"===Ae){const Ae=Wh(ke);Ch(Ce,Ae)}jh(ke)}),(Ae=>{"writable"===Ce._state&&Fh(ke),function(ke,Ae){ke._inFlightWriteRequest._reject(Ae),ke._inFlightWriteRequest=void 0,Sh(ke,Ae)}(Ce,Ae)}))}(ke,Ce)}function Lh(ke,Ae){"writable"===ke._controlledWritableStream._state&&Hh(ke,Ae)}function Wh(ke){return Nh(ke)<=0}function Hh(ke,Ae){const Ce=ke._controlledWritableStream;Fh(ke),Eh(Ce,Ae)}function Gh(ke){return new TypeError(`WritableStream.prototype.${ke} can only be used on a WritableStream`)}function Vh(ke){return new TypeError(`WritableStreamDefaultWriter.prototype.${ke} can only be used on a WritableStreamDefaultWriter`)}function $h(ke){return new TypeError("Cannot "+ke+" a stream using a released writer")}function Zh(ke){ke._closedPromise=Ic(((Ae,Ce)=>{ke._closedPromise_resolve=Ae,ke._closedPromise_reject=Ce,ke._closedPromiseState="pending"}))}function Yh(ke,Ae){Zh(ke),Xh(ke,Ae)}function Xh(ke,Ae){void 0!==ke._closedPromise_reject&&(Nc(ke._closedPromise),ke._closedPromise_reject(Ae),ke._closedPromise_resolve=void 0,ke._closedPromise_reject=void 0,ke._closedPromiseState="rejected")}function Qh(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 Jh(ke){ke._readyPromise=Ic(((Ae,Ce)=>{ke._readyPromise_resolve=Ae,ke._readyPromise_reject=Ce})),ke._readyPromiseState="pending"}function ef(ke,Ae){Jh(ke),rf(ke,Ae)}function tf(ke){Jh(ke),nf(ke)}function rf(ke,Ae){void 0!==ke._readyPromise_reject&&(Nc(ke._readyPromise),ke._readyPromise_reject(Ae),ke._readyPromise_resolve=void 0,ke._readyPromise_reject=void 0,ke._readyPromiseState="rejected")}function nf(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(qh.prototype,{error:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(qh.prototype,Nl.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const Ad="undefined"!=typeof DOMException?DOMException:void 0;const Ed=function(ke){if("function"!=typeof ke&&"object"!=typeof ke)return!1;try{return new ke,!0}catch(ke){return!1}}(Ad)?Ad: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 of(ke,Ae,Ce,ze,qe,Ve){const tt=yu(ke),rt=gh(Ae);ke._disturbed=!0;let it=!1,nt=Uc(void 0);return Ic(((ot,ct)=>{let ht;if(void 0!==Ve){if(ht=()=>{const Ce=new Ed("Aborted","AbortError"),Ve=[];ze||Ve.push((()=>"writable"===Ae._state?kh(Ae,Ce):Uc(void 0))),qe||Ve.push((()=>"readable"===ke._state?Df(ke,Ce):Uc(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=>{ze?b(!0,ke):y((()=>kh(Ae,ke)),!0,ke)})),p(Ae,rt._closedPromise,(Ae=>{qe?b(!0,Ae):y((()=>Df(ke,Ae)),!0,Ae)})),function(ke,Ae,Ce){"closed"===ke._state?Ce():qc(Ae,Ce)}(ke,tt._closedPromise,(()=>{Ce?b():y((()=>function(ke){const Ae=ke._ownerWritableStream,Ce=Ae._state;return xh(Ae)||"closed"===Ce?Uc(void 0):"errored"===Ce?Bc(Ae._storedError):Rh(ke)}(rt)))})),xh(Ae)||"closed"===Ae._state){const Ae=new TypeError("the destination writable stream closed before all data could be piped to it");qe?b(!0,Ae):y((()=>Df(ke,Ae)),!0,Ae)}function l(){const ke=nt;return Tc(nt,(()=>ke!==nt?l():void 0))}function p(ke,Ae,Ce){"errored"===ke._state?Ce(ke._storedError):Oc(Ae,Ce)}function y(ke,Ce,ze){function n(){zc(ke(),(()=>m(Ce,ze)),(ke=>m(!0,ke)))}it||(it=!0,"writable"!==Ae._state||xh(Ae)?n():qc(l(),n))}function b(ke,Ce){it||(it=!0,"writable"!==Ae._state||xh(Ae)?m(ke,Ce):qc(l(),(()=>m(ke,Ce))))}function m(ke,Ae){Bh(rt),$c(tt),void 0!==Ve&&Ve.removeEventListener("abort",ht),ke?ct(Ae):ot(void 0)}Nc(Ic(((ke,Ae)=>{!function r(Ce){Ce?ke():Tc(it?Uc(!0):Tc(rt._readyPromise,(()=>Ic(((ke,Ae)=>{ku(tt,{_chunkSteps:Ae=>{nt=Tc(Th(rt,Ae),void 0,Ec),ke(!1)},_closeSteps:()=>ke(!0),_errorSteps:Ae})})))),r,Ae)}(!1)})))}))}class cf{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!uf(this))throw wf("desiredSize");return bf(this)}close(){if(!uf(this))throw wf("close");if(!mf(this))throw new TypeError("The stream is not in a state that permits close");lf(this)}enqueue(ke){if(!uf(this))throw wf("enqueue");if(!mf(this))throw new TypeError("The stream is not in a state that permits enqueue");return pf(this,ke)}error(ke){if(!uf(this))throw wf("error");yf(this,ke)}[Xl](ke){Iu(this);const Ae=this._cancelAlgorithm(ke);return df(this),Ae}[Jl](ke){const Ae=this._controlledReadableStream;if(this._queue.length>0){const Ce=Du(this);this._closeRequested&&0===this._queue.length?(df(this),Rf(Ae)):hf(this),ke._chunkSteps(Ce)}else bu(Ae,ke),hf(this)}}function uf(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_controlledReadableStream")}function hf(ke){if(!ff(ke))return;if(ke._pulling)return void(ke._pullAgain=!0);ke._pulling=!0;zc(ke._pullAlgorithm(),(()=>{ke._pulling=!1,ke._pullAgain&&(ke._pullAgain=!1,hf(ke))}),(Ae=>{yf(ke,Ae)}))}function ff(ke){const Ae=ke._controlledReadableStream;if(!mf(ke))return!1;if(!ke._started)return!1;if(Kf(Ae)&&gu(Ae)>0)return!0;return bf(ke)>0}function df(ke){ke._pullAlgorithm=void 0,ke._cancelAlgorithm=void 0,ke._strategySizeAlgorithm=void 0}function lf(ke){if(!mf(ke))return;const Ae=ke._controlledReadableStream;ke._closeRequested=!0,0===ke._queue.length&&(df(ke),Rf(Ae))}function pf(ke,Ae){if(!mf(ke))return;const Ce=ke._controlledReadableStream;if(Kf(Ce)&&gu(Ce)>0)mu(Ce,Ae,!1);else{let Ce;try{Ce=ke._strategySizeAlgorithm(Ae)}catch(Ae){throw yf(ke,Ae),Ae}try{Ru(ke,Ae,Ce)}catch(Ae){throw yf(ke,Ae),Ae}}hf(ke)}function yf(ke,Ae){const Ce=ke._controlledReadableStream;"readable"===Ce._state&&(Iu(ke),df(ke),If(Ce,Ae))}function bf(ke){const Ae=ke._controlledReadableStream._state;return"errored"===Ae?null:"closed"===Ae?0:ke._strategyHWM-ke._queueTotalSize}function mf(ke){const Ae=ke._controlledReadableStream._state;return!ke._closeRequested&&"readable"===Ae}function gf(ke,Ae,Ce,ze,qe,Ve,tt){Ae._controlledReadableStream=ke,Ae._queue=void 0,Ae._queueTotalSize=void 0,Iu(Ae),Ae._started=!1,Ae._closeRequested=!1,Ae._pullAgain=!1,Ae._pulling=!1,Ae._strategySizeAlgorithm=tt,Ae._strategyHWM=Ve,Ae._pullAlgorithm=ze,Ae._cancelAlgorithm=qe,ke._readableStreamController=Ae;zc(Uc(Ce()),(()=>{Ae._started=!0,hf(Ae)}),(ke=>{yf(Ae,ke)}))}function wf(ke){return new TypeError(`ReadableStreamDefaultController.prototype.${ke} can only be used on a ReadableStreamDefaultController`)}function vf(ke,Ae,Ce){return ou(ke,Ce),Ce=>Wc(ke,Ae,[Ce])}function _f(ke,Ae,Ce){return ou(ke,Ce),Ce=>Wc(ke,Ae,[Ce])}function kf(ke,Ae,Ce){return ou(ke,Ce),Ce=>Lc(ke,Ae,[Ce])}function Af(ke,Ae){if("bytes"!==(ke=""+ke))throw new TypeError(`${Ae} '${ke}' is not a valid enumeration value for ReadableStreamType`);return ke}function Sf(ke,Ae){if("byob"!==(ke=""+ke))throw new TypeError(`${Ae} '${ke}' is not a valid enumeration value for ReadableStreamReaderMode`);return ke}function Ef(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.preventAbort,ze=null==ke?void 0:ke.preventCancel,qe=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:!!ze,preventClose:!!qe,signal:Ve}}Object.defineProperties(cf.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(cf.prototype,Nl.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Pf{constructor(ke={},Ae={}){void 0===ke?ke=null:cu(ke,"First parameter");const Ce=hh(Ae,"Second parameter"),ze=function(ke,Ae){su(ke,Ae);const Ce=ke,ze=null==Ce?void 0:Ce.autoAllocateChunkSize,qe=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===ze?void 0:lu(ze,Ae+" has member 'autoAllocateChunkSize' that"),cancel:void 0===qe?void 0:vf(qe,Ce,Ae+" has member 'cancel' that"),pull:void 0===Ve?void 0:_f(Ve,Ce,Ae+" has member 'pull' that"),start:void 0===tt?void 0:kf(tt,Ce,Ae+" has member 'start' that"),type:void 0===rt?void 0:Af(rt,Ae+" has member 'type' that")}}(ke,"First parameter");if(Mf(this),"bytes"===ze.type){if(void 0!==Ce.size)throw new RangeError("The strategy for a byte stream cannot have a size function");Ju(this,ze,ch(Ce,0))}else{const ke=uh(Ce);!function(ke,Ae,Ce,ze){const qe=Object.create(cf.prototype);let a=()=>{},s=()=>Uc(void 0),o=()=>Uc(void 0);void 0!==Ae.start&&(a=()=>Ae.start(qe)),void 0!==Ae.pull&&(s=()=>Ae.pull(qe)),void 0!==Ae.cancel&&(o=ke=>Ae.cancel(ke)),gf(ke,qe,a,s,o,Ce,ze)}(this,ze,ch(Ce,1),ke)}}get locked(){if(!Cf(this))throw Uf("locked");return Kf(this)}cancel(ke){return Cf(this)?Kf(this)?Bc(new TypeError("Cannot cancel a stream that already has a reader")):Df(this,ke):Bc(Uf("cancel"))}getReader(ke){if(!Cf(this))throw Uf("getReader");return void 0===function(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.mode;return{mode:void 0===Ce?void 0:Sf(Ce,Ae+" has member 'mode' that")}}(ke,"First parameter").mode?yu(this):function(ke){return new ah(ke)}(this)}pipeThrough(ke,Ae={}){if(!Cf(this))throw Uf("pipeThrough");uu(ke,1,"pipeThrough");const Ce=function(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.readable;hu(Ce,"readable","ReadableWritablePair"),pu(Ce,Ae+" has member 'readable' that");const ze=null==ke?void 0:ke.writable;return hu(ze,"writable","ReadableWritablePair"),bh(ze,Ae+" has member 'writable' that"),{readable:Ce,writable:ze}}(ke,"First parameter"),ze=Ef(Ae,"Second parameter");if(Kf(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(_h(Ce.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Nc(of(this,Ce.writable,ze.preventClose,ze.preventAbort,ze.preventCancel,ze.signal)),Ce.readable}pipeTo(ke,Ae={}){if(!Cf(this))return Bc(Uf("pipeTo"));if(void 0===ke)return Bc("Parameter 1 is required in 'pipeTo'.");if(!vh(ke))return Bc(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let Ce;try{Ce=Ef(Ae,"Second parameter")}catch(ke){return Bc(ke)}return Kf(this)?Bc(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):_h(ke)?Bc(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):of(this,ke,Ce.preventClose,Ce.preventAbort,Ce.preventCancel,Ce.signal)}tee(){if(!Cf(this))throw Uf("tee");const ke=function(ke,Ae){const Ce=yu(ke);let ze,qe,Ve,tt,rt,it=!1,nt=!1,ot=!1;const ct=Ic((ke=>{rt=ke}));function d(){return it||(it=!0,ku(Ce,{_chunkSteps:ke=>{$l((()=>{it=!1;const Ae=ke,Ce=ke;nt||pf(Ve._readableStreamController,Ae),ot||pf(tt._readableStreamController,Ce)}))},_closeSteps:()=>{it=!1,nt||lf(Ve._readableStreamController),ot||lf(tt._readableStreamController),nt&&ot||rt(void 0)},_errorSteps:()=>{it=!1}})),Uc(void 0)}function l(){}return Ve=xf(l,d,(function(Ae){if(nt=!0,ze=Ae,ot){const Ae=Uu([ze,qe]),Ce=Df(ke,Ae);rt(Ce)}return ct})),tt=xf(l,d,(function(Ae){if(ot=!0,qe=Ae,nt){const Ae=Uu([ze,qe]),Ce=Df(ke,Ae);rt(Ce)}return ct})),Oc(Ce._closedPromise,(ke=>{yf(Ve._readableStreamController,ke),yf(tt._readableStreamController,ke),nt&&ot||rt(void 0)})),[Ve,tt]}(this);return Uu(ke)}values(ke){if(!Cf(this))throw Uf("values");return function(ke,Ae){const Ce=yu(ke),ze=new Eu(Ce,Ae),qe=Object.create(gd);return qe._asyncIteratorImpl=ze,qe}(this,function(ke,Ae){return su(ke,Ae),{preventCancel:!!(null==ke?void 0:ke.preventCancel)}}(ke,"First parameter").preventCancel)}}function xf(ke,Ae,Ce,ze=1,qe=(()=>1)){const Ve=Object.create(Pf.prototype);Mf(Ve);return gf(Ve,Object.create(cf.prototype),ke,Ae,Ce,ze,qe),Ve}function Mf(ke){ke._state="readable",ke._reader=void 0,ke._storedError=void 0,ke._disturbed=!1}function Cf(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_readableStreamController")}function Kf(ke){return void 0!==ke._reader}function Df(ke,Ae){if(ke._disturbed=!0,"closed"===ke._state)return Uc(void 0);if("errored"===ke._state)return Bc(ke._storedError);Rf(ke);return Fc(ke._readableStreamController[Xl](Ae),Ec)}function Rf(ke){ke._state="closed";const Ae=ke._reader;void 0!==Ae&&(Jc(Ae),_u(Ae)&&(Ae._readRequests.forEach((ke=>{ke._closeSteps()})),Ae._readRequests=new Hc))}function If(ke,Ae){ke._state="errored",ke._storedError=Ae;const Ce=ke._reader;void 0!==Ce&&(Qc(Ce,Ae),_u(Ce)?(Ce._readRequests.forEach((ke=>{ke._errorSteps(Ae)})),Ce._readRequests=new Hc):(Ce._readIntoRequests.forEach((ke=>{ke._errorSteps(Ae)})),Ce._readIntoRequests=new Hc))}function Uf(ke){return new TypeError(`ReadableStream.prototype.${ke} can only be used on a ReadableStream`)}function Bf(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.highWaterMark;return hu(Ce,"highWaterMark","QueuingStrategyInit"),{highWaterMark:fu(Ce)}}Object.defineProperties(Pf.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Pf.prototype,Nl.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof Nl.asyncIterator&&Object.defineProperty(Pf.prototype,Nl.asyncIterator,{value:Pf.prototype.values,writable:!0,configurable:!0});const Tf=function(ke){return ke.byteLength};class zf{constructor(ke){uu(ke,1,"ByteLengthQueuingStrategy"),ke=Bf(ke,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=ke.highWaterMark}get highWaterMark(){if(!Of(this))throw qf("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Of(this))throw qf("size");return Tf}}function qf(ke){return new TypeError(`ByteLengthQueuingStrategy.prototype.${ke} can only be used on a ByteLengthQueuingStrategy`)}function Of(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(zf.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(zf.prototype,Nl.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const Ff=function(){return 1};class Nf{constructor(ke){uu(ke,1,"CountQueuingStrategy"),ke=Bf(ke,"First parameter"),this._countQueuingStrategyHighWaterMark=ke.highWaterMark}get highWaterMark(){if(!Lf(this))throw jf("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Lf(this))throw jf("size");return Ff}}function jf(ke){return new TypeError(`CountQueuingStrategy.prototype.${ke} can only be used on a CountQueuingStrategy`)}function Lf(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_countQueuingStrategyHighWaterMark")}function Wf(ke,Ae,Ce){return ou(ke,Ce),Ce=>Wc(ke,Ae,[Ce])}function Hf(ke,Ae,Ce){return ou(ke,Ce),Ce=>Lc(ke,Ae,[Ce])}function Gf(ke,Ae,Ce){return ou(ke,Ce),(Ce,ze)=>Wc(ke,Ae,[Ce,ze])}Object.defineProperties(Nf.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Nf.prototype,Nl.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Vf{constructor(ke={},Ae={},Ce={}){void 0===ke&&(ke=null);const ze=hh(Ae,"Second parameter"),qe=hh(Ce,"Third parameter"),Ve=function(ke,Ae){su(ke,Ae);const Ce=null==ke?void 0:ke.flush,ze=null==ke?void 0:ke.readableType,qe=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:Wf(Ce,ke,Ae+" has member 'flush' that"),readableType:ze,start:void 0===qe?void 0:Hf(qe,ke,Ae+" has member 'start' that"),transform:void 0===Ve?void 0:Gf(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=ch(qe,0),rt=uh(qe),it=ch(ze,1),nt=uh(ze);let ot;!function(ke,Ae,Ce,ze,qe,Ve){function s(){return Ae}function o(Ae){return function(ke,Ae){const Ce=ke._transformStreamController;if(ke._backpressure){return Fc(ke._backpressureChangePromise,(()=>{const ze=ke._writable;if("erroring"===ze._state)throw ze._storedError;return rd(Ce,Ae)}))}return rd(Ce,Ae)}(ke,Ae)}function c(Ae){return function(ke,Ae){return Zf(ke,Ae),Uc(void 0)}(ke,Ae)}function u(){return function(ke){const Ae=ke._readable,Ce=ke._transformStreamController,ze=Ce._flushAlgorithm();return ed(Ce),Fc(ze,(()=>{if("errored"===Ae._state)throw Ae._storedError;lf(Ae._readableStreamController)}),(Ce=>{throw Zf(ke,Ce),Ae._storedError}))}(ke)}function h(){return function(ke){return Xf(ke,!1),ke._backpressureChangePromise}(ke)}function f(Ae){return Yf(ke,Ae),Uc(void 0)}ke._writable=function(ke,Ae,Ce,ze,qe=1,Ve=(()=>1)){const tt=Object.create(mh.prototype);return wh(tt),Oh(tt,Object.create(qh.prototype),ke,Ae,Ce,ze,qe,Ve),tt}(s,o,u,c,Ce,ze),ke._readable=xf(s,h,f,qe,Ve),ke._backpressure=void 0,ke._backpressureChangePromise=void 0,ke._backpressureChangePromise_resolve=void 0,Xf(ke,!0),ke._transformStreamController=void 0}(this,Ic((ke=>{ot=ke})),it,nt,tt,rt),function(ke,Ae){const Ce=Object.create(Qf.prototype);let i=ke=>{try{return td(Ce,ke),Uc(void 0)}catch(ke){return Bc(ke)}},n=()=>Uc(void 0);void 0!==Ae.transform&&(i=ke=>Ae.transform(ke,Ce));void 0!==Ae.flush&&(n=()=>Ae.flush(Ce));!function(ke,Ae,Ce,ze){Ae._controlledTransformStream=ke,ke._transformStreamController=Ae,Ae._transformAlgorithm=Ce,Ae._flushAlgorithm=ze}(ke,Ce,i,n)}(this,Ve),void 0!==Ve.start?ot(Ve.start(this._transformStreamController)):ot(void 0)}get readable(){if(!$f(this))throw nd("readable");return this._readable}get writable(){if(!$f(this))throw nd("writable");return this._writable}}function $f(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_transformStreamController")}function Zf(ke,Ae){yf(ke._readable._readableStreamController,Ae),Yf(ke,Ae)}function Yf(ke,Ae){ed(ke._transformStreamController),Lh(ke._writable._writableStreamController,Ae),ke._backpressure&&Xf(ke,!1)}function Xf(ke,Ae){void 0!==ke._backpressureChangePromise&&ke._backpressureChangePromise_resolve(),ke._backpressureChangePromise=Ic((Ae=>{ke._backpressureChangePromise_resolve=Ae})),ke._backpressure=Ae}Object.defineProperties(Vf.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Vf.prototype,Nl.toStringTag,{value:"TransformStream",configurable:!0});class Qf{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Jf(this))throw id("desiredSize");return bf(this._controlledTransformStream._readable._readableStreamController)}enqueue(ke){if(!Jf(this))throw id("enqueue");td(this,ke)}error(ke){if(!Jf(this))throw id("error");var Ae;Ae=ke,Zf(this._controlledTransformStream,Ae)}terminate(){if(!Jf(this))throw id("terminate");!function(ke){const Ae=ke._controlledTransformStream;lf(Ae._readable._readableStreamController);Yf(Ae,new TypeError("TransformStream terminated"))}(this)}}function Jf(ke){return!!xc(ke)&&!!Object.prototype.hasOwnProperty.call(ke,"_controlledTransformStream")}function ed(ke){ke._transformAlgorithm=void 0,ke._flushAlgorithm=void 0}function td(ke,Ae){const Ce=ke._controlledTransformStream,ze=Ce._readable._readableStreamController;if(!mf(ze))throw new TypeError("Readable side is not in a state that permits enqueue");try{pf(ze,Ae)}catch(ke){throw Yf(Ce,ke),Ce._readable._storedError}(function(ke){return!ff(ke)})(ze)!==Ce._backpressure&&Xf(Ce,!0)}function rd(ke,Ae){return Fc(ke._transformAlgorithm(Ae),void 0,(Ae=>{throw Zf(ke._controlledTransformStream,Ae),Ae}))}function id(ke){return new TypeError(`TransformStreamDefaultController.prototype.${ke} can only be used on a TransformStreamDefaultController`)}function nd(ke){return new TypeError(`TransformStream.prototype.${ke} can only be used on a TransformStream`)}Object.defineProperties(Qf.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof Nl.toStringTag&&Object.defineProperty(Qf.prototype,Nl.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});var Md=Object.freeze({__proto__:null,ByteLengthQueuingStrategy:zf,CountQueuingStrategy:Nf,ReadableByteStreamController:Tu,ReadableStream:Pf,ReadableStreamBYOBReader:ah,ReadableStreamBYOBRequest:Bu,ReadableStreamDefaultController:cf,ReadableStreamDefaultReader:vu,TransformStream:Vf,TransformStreamDefaultController:Qf,WritableStream:mh,WritableStreamDefaultController:qh,WritableStreamDefaultWriter:Kh}),sd=function(ke,Ae){return(sd=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 od(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}sd(ke,Ae),ke.prototype=null===Ae?Object.create(Ae):(r.prototype=Ae.prototype,new r)}function cd(ke){if(!ke)throw new TypeError("Assertion failed")}function ud(){}function hd(ke){return"object"==typeof ke&&null!==ke||"function"==typeof ke}function fd(ke){if("function"!=typeof ke)return!1;var Ae=!1;try{new ke({start:function(){Ae=!0}})}catch(ke){}return Ae}function dd(ke){return!!hd(ke)&&"function"==typeof ke.getReader}function ld(ke){return!!hd(ke)&&"function"==typeof ke.getWriter}function pd(ke){return!!hd(ke)&&(!!dd(ke.readable)&&!!ld(ke.writable))}function yd(ke){try{return ke.getReader({mode:"byob"}).releaseLock(),!0}catch(ke){return!1}}function bd(ke,Ae){var Ce=(void 0===Ae?{}:Ae).type;return cd(dd(ke)),cd(!1===ke.locked),"bytes"===(Ce=md(Ce))?new Dd(ke):new Pd(ke)}function md(ke){var Ae=ke+"";if("bytes"===Ae)return Ae;if(void 0===ke)return ke;throw new RangeError("Invalid type is specified")}var xd=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 cd(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;cd(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(ud)},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}(),Pd=function(ke){function t(){return null!==ke&&ke.apply(this,arguments)||this}return od(t,ke),t.prototype.pull=function(){return this._pullWithDefaultReader()},t}(xd);function vd(ke){return new Uint8Array(ke.buffer,ke.byteOffset,ke.byteLength)}var Dd=function(ke){function t(Ae){var Ce=this,ze=yd(Ae);return(Ce=ke.call(this,Ae)||this)._supportsByob=ze,Ce}return od(t,ke),Object.defineProperty(t.prototype,"type",{get:function(){return"bytes"},enumerable:!1,configurable:!0}),t.prototype._attachByobReader=function(){if("byob"!==this._readerMode){cd(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),ze=this._underlyingReader.read(Ce).then((function(Ce){var ze,qe,Ve;Ae._readableStreamController,Ce.done?(Ae._tryClose(),ke.respond(0)):(ze=Ce.value,qe=ke.view,Ve=vd(ze),vd(qe).set(Ve,0),ke.respond(Ce.value.byteLength))}));return this._setPendingRead(ze),ze},t}(xd);function kd(ke){cd(ld(ke)),cd(!1===ke.locked);var Ae=ke.getWriter();return new Rd(Ae)}var Rd=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(ud)}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 ze=Ce.write(ke);ze.catch((function(ke){return Ae._finishErroring(ke)})),Ce.ready.catch((function(ke){return Ae._startErroring(ke)}));var qe=Promise.race([ze,this._errorPromise]);return this._setPendingWrite(qe),qe},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 Sd(ke){cd(pd(ke));var Ae=ke.readable,Ce=ke.writable;cd(!1===Ae.locked),cd(!1===Ce.locked);var ze,qe=Ae.getReader();try{ze=Ce.getWriter()}catch(ke){throw qe.releaseLock(),ke}return new Td(qe,ze)}var Td=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(ud),Ce._writer.abort(ke).catch(ud)},this._onTerminate=function(){Ce._flushResolve(),Ce._transformStreamController.terminate();var ke=new TypeError("TransformStream terminated");Ce._writer.abort(ke).catch(ud)},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}(),Kd=Object.freeze({__proto__:null,createReadableStreamWrapper:function(ke){cd(function(ke){return!!fd(ke)&&!!dd(new ke)}(ke));var Ae=function(ke){try{return new ke({type:"bytes"}),!0}catch(ke){return!1}}(ke);return function(Ce,ze){var qe=(void 0===ze?{}:ze).type;if("bytes"!==(qe=md(qe))||Ae||(qe=void 0),Ce.constructor===ke&&("bytes"!==qe||yd(Ce)))return Ce;if("bytes"===qe){var Ve=bd(Ce,{type:qe});return new ke(Ve)}Ve=bd(Ce);return new ke(Ve)}},createTransformStreamWrapper:function(ke){return cd(function(ke){return!!fd(ke)&&!!pd(new ke)}(ke)),function(Ae){if(Ae.constructor===ke)return Ae;var Ce=Sd(Ae);return new ke(Ce)}},createWrappingReadableSource:bd,createWrappingTransformer:Sd,createWrappingWritableSink:kd,createWritableStreamWrapper:function(ke){return cd(function(ke){return!!fd(ke)&&!!ld(new ke)}(ke)),function(Ae){if(Ae.constructor===ke)return Ae;var Ce=kd(Ae);return new ke(Ce)}}}),Id=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 ze=0,qe=Math.min(ke.length,Ce),Ve=Ae;Ve<qe;Ve++){var tt=ke.charCodeAt(Ve)-48;ze<<=4,ze|=tt>=49&&tt<=54?tt-49+10:tt>=17&&tt<=22?tt-17+10:15&tt}return ze}function o(ke,Ae,Ce,ze){for(var qe=0,Ve=Math.min(ke.length,Ce),tt=Ae;tt<Ve;tt++){var rt=ke.charCodeAt(tt)-48;qe*=ze,qe+=rt>=49?rt-49+10:rt>=17?rt-17+10:rt}return qe}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 ze=0;"-"===(ke=ke.toString().replace(/\s+/g,""))[0]&&ze++,16===Ae?this._parseHex(ke,ze):this._parseBase(ke,Ae,ze),"-"===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 ze=0;ze<this.length;ze++)this.words[ze]=0;var qe,Ve,tt=0;if("be"===Ce)for(ze=ke.length-1,qe=0;ze>=0;ze-=3)Ve=ke[ze]|ke[ze-1]<<8|ke[ze-2]<<16,this.words[qe]|=Ve<<tt&67108863,this.words[qe+1]=Ve>>>26-tt&67108863,(tt+=24)>=26&&(tt-=26,qe++);else if("le"===Ce)for(ze=0,qe=0;ze<ke.length;ze+=3)Ve=ke[ze]|ke[ze+1]<<8|ke[ze+2]<<16,this.words[qe]|=Ve<<tt&67108863,this.words[qe+1]=Ve>>>26-tt&67108863,(tt+=24)>=26&&(tt-=26,qe++);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 ze,qe,Ve=0;for(Ce=ke.length-6,ze=0;Ce>=Ae;Ce-=6)qe=s(ke,Ce,Ce+6),this.words[ze]|=qe<<Ve&67108863,this.words[ze+1]|=qe>>>26-Ve&4194303,(Ve+=24)>=26&&(Ve-=26,ze++);Ce+6!==Ae&&(qe=s(ke,Ae,Ce+6),this.words[ze]|=qe<<Ve&67108863,this.words[ze+1]|=qe>>>26-Ve&4194303),this.strip()},n.prototype._parseBase=function(ke,Ae,Ce){this.words=[0],this.length=1;for(var ze=0,qe=1;qe<=67108863;qe*=Ae)ze++;ze--,qe=qe/Ae|0;for(var Ve=ke.length-Ce,tt=Ve%ze,rt=Math.min(Ve,Ve-tt)+Ce,it=0,nt=Ce;nt<rt;nt+=ze)it=o(ke,nt,nt+ze,Ae),this.imuln(qe),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 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"],qe=[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 ze=ke.length+Ae.length|0;Ce.length=ze,ze=ze-1|0;var qe=0|ke.words[0],Ve=0|Ae.words[0],tt=qe*Ve,rt=67108863&tt,it=tt/67108864|0;Ce.words[0]=rt;for(var nt=1;nt<ze;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=(qe=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?ze[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=qe[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:ze[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 ze=this.byteLength(),qe=Ce||Math.max(1,ze);r(ze<=qe,"byte array longer than desired length"),r(qe>0,"Requested array length <= 0"),this.strip();var Ve,tt,rt="le"===Ae,it=new ke(qe),nt=this.clone();if(rt){for(tt=0;!nt.isZero();tt++)Ve=nt.andln(255),nt.iushrn(8),it[tt]=Ve;for(;tt<qe;tt++)it[tt]=0}else{for(tt=0;tt<qe-ze;tt++)it[tt]=0;for(tt=0;!nt.isZero();tt++)Ve=nt.andln(255),nt.iushrn(8),it[qe-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 ze=0;ze<Ce.length;ze++)this.words[ze]=Ae.words[ze]^Ce.words[ze];if(this!==Ae)for(;ze<Ae.length;ze++)this.words[ze]=Ae.words[ze];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 ze=0;ze<Ae;ze++)this.words[ze]=67108863&~this.words[ze];return Ce>0&&(this.words[ze]=~this.words[ze]&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,ze=ke%26;return this._expand(Ce+1),this.words[Ce]=Ae?this.words[Ce]|1<<ze:this.words[Ce]&~(1<<ze),this.strip()},n.prototype.iadd=function(ke){var Ae,Ce,ze;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,ze=ke):(Ce=ke,ze=this);for(var qe=0,Ve=0;Ve<ze.length;Ve++)Ae=(0|Ce.words[Ve])+(0|ze.words[Ve])+qe,this.words[Ve]=67108863&Ae,qe=Ae>>>26;for(;0!==qe&&Ve<Ce.length;Ve++)Ae=(0|Ce.words[Ve])+qe,this.words[Ve]=67108863&Ae,qe=Ae>>>26;if(this.length=Ce.length,0!==qe)this.words[this.length]=qe,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,ze,qe=this.cmp(ke);if(0===qe)return this.negative=0,this.length=1,this.words[0]=0,this;qe>0?(Ce=this,ze=ke):(Ce=ke,ze=this);for(var Ve=0,tt=0;tt<ze.length;tt++)Ve=(Ae=(0|Ce.words[tt])-(0|ze.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 ze,qe,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],Bt=8191&Pt,Dt=Pt>>>13,Rt=0|tt[4],Tt=8191&Rt,Kt=Rt>>>13,It=0|tt[5],Ut=8191&It,Ot=It>>>13,Nt=0|tt[6],zt=8191&Nt,qt=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],Xt=8191&Zt,Jt=Zt>>>13,Yt=0|rt[0],Qt=8191&Yt,er=Yt>>>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,Br=0|rt[5],Dr=8191&Br,Rr=Br>>>13,Ir=0|rt[6],Ur=8191&Ir,Lr=Ir>>>13,Gr=0|rt[7],Vr=8191&Gr,Xr=Gr>>>13,Qr=0|rt[8],ei=8191&Qr,ti=Qr>>>13,ri=0|rt[9],ii=8191&ri,ni=ri>>>13;Ce.negative=ke.negative^Ae.negative,Ce.length=19;var oi=(nt+(ze=Math.imul(ct,Qt))|0)+((8191&(qe=(qe=Math.imul(ct,er))+Math.imul(ht,Qt)|0))<<13)|0;nt=((Ve=Math.imul(ht,er))+(qe>>>13)|0)+(oi>>>26)|0,oi&=67108863,ze=Math.imul(yt,Qt),qe=(qe=Math.imul(yt,er))+Math.imul(mt,Qt)|0,Ve=Math.imul(mt,er);var ci=(nt+(ze=ze+Math.imul(ct,rr)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,ir)|0)+Math.imul(ht,rr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,ir)|0)+(qe>>>13)|0)+(ci>>>26)|0,ci&=67108863,ze=Math.imul(St,Qt),qe=(qe=Math.imul(St,er))+Math.imul(Et,Qt)|0,Ve=Math.imul(Et,er),ze=ze+Math.imul(yt,rr)|0,qe=(qe=qe+Math.imul(yt,ir)|0)+Math.imul(mt,rr)|0,Ve=Ve+Math.imul(mt,ir)|0;var hi=(nt+(ze=ze+Math.imul(ct,sr)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,vr)|0)+Math.imul(ht,sr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,vr)|0)+(qe>>>13)|0)+(hi>>>26)|0,hi&=67108863,ze=Math.imul(Bt,Qt),qe=(qe=Math.imul(Bt,er))+Math.imul(Dt,Qt)|0,Ve=Math.imul(Dt,er),ze=ze+Math.imul(St,rr)|0,qe=(qe=qe+Math.imul(St,ir)|0)+Math.imul(Et,rr)|0,Ve=Ve+Math.imul(Et,ir)|0,ze=ze+Math.imul(yt,sr)|0,qe=(qe=qe+Math.imul(yt,vr)|0)+Math.imul(mt,sr)|0,Ve=Ve+Math.imul(mt,vr)|0;var li=(nt+(ze=ze+Math.imul(ct,kr)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,Ar)|0)+Math.imul(ht,kr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Ar)|0)+(qe>>>13)|0)+(li>>>26)|0,li&=67108863,ze=Math.imul(Tt,Qt),qe=(qe=Math.imul(Tt,er))+Math.imul(Kt,Qt)|0,Ve=Math.imul(Kt,er),ze=ze+Math.imul(Bt,rr)|0,qe=(qe=qe+Math.imul(Bt,ir)|0)+Math.imul(Dt,rr)|0,Ve=Ve+Math.imul(Dt,ir)|0,ze=ze+Math.imul(St,sr)|0,qe=(qe=qe+Math.imul(St,vr)|0)+Math.imul(Et,sr)|0,Ve=Ve+Math.imul(Et,vr)|0,ze=ze+Math.imul(yt,kr)|0,qe=(qe=qe+Math.imul(yt,Ar)|0)+Math.imul(mt,kr)|0,Ve=Ve+Math.imul(mt,Ar)|0;var di=(nt+(ze=ze+Math.imul(ct,Er)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,xr)|0)+Math.imul(ht,Er)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,xr)|0)+(qe>>>13)|0)+(di>>>26)|0,di&=67108863,ze=Math.imul(Ut,Qt),qe=(qe=Math.imul(Ut,er))+Math.imul(Ot,Qt)|0,Ve=Math.imul(Ot,er),ze=ze+Math.imul(Tt,rr)|0,qe=(qe=qe+Math.imul(Tt,ir)|0)+Math.imul(Kt,rr)|0,Ve=Ve+Math.imul(Kt,ir)|0,ze=ze+Math.imul(Bt,sr)|0,qe=(qe=qe+Math.imul(Bt,vr)|0)+Math.imul(Dt,sr)|0,Ve=Ve+Math.imul(Dt,vr)|0,ze=ze+Math.imul(St,kr)|0,qe=(qe=qe+Math.imul(St,Ar)|0)+Math.imul(Et,kr)|0,Ve=Ve+Math.imul(Et,Ar)|0,ze=ze+Math.imul(yt,Er)|0,qe=(qe=qe+Math.imul(yt,xr)|0)+Math.imul(mt,Er)|0,Ve=Ve+Math.imul(mt,xr)|0;var pi=(nt+(ze=ze+Math.imul(ct,Dr)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,Rr)|0)+Math.imul(ht,Dr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Rr)|0)+(qe>>>13)|0)+(pi>>>26)|0,pi&=67108863,ze=Math.imul(zt,Qt),qe=(qe=Math.imul(zt,er))+Math.imul(qt,Qt)|0,Ve=Math.imul(qt,er),ze=ze+Math.imul(Ut,rr)|0,qe=(qe=qe+Math.imul(Ut,ir)|0)+Math.imul(Ot,rr)|0,Ve=Ve+Math.imul(Ot,ir)|0,ze=ze+Math.imul(Tt,sr)|0,qe=(qe=qe+Math.imul(Tt,vr)|0)+Math.imul(Kt,sr)|0,Ve=Ve+Math.imul(Kt,vr)|0,ze=ze+Math.imul(Bt,kr)|0,qe=(qe=qe+Math.imul(Bt,Ar)|0)+Math.imul(Dt,kr)|0,Ve=Ve+Math.imul(Dt,Ar)|0,ze=ze+Math.imul(St,Er)|0,qe=(qe=qe+Math.imul(St,xr)|0)+Math.imul(Et,Er)|0,Ve=Ve+Math.imul(Et,xr)|0,ze=ze+Math.imul(yt,Dr)|0,qe=(qe=qe+Math.imul(yt,Rr)|0)+Math.imul(mt,Dr)|0,Ve=Ve+Math.imul(mt,Rr)|0;var yi=(nt+(ze=ze+Math.imul(ct,Ur)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,Lr)|0)+Math.imul(ht,Ur)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Lr)|0)+(qe>>>13)|0)+(yi>>>26)|0,yi&=67108863,ze=Math.imul(Lt,Qt),qe=(qe=Math.imul(Lt,er))+Math.imul(Ht,Qt)|0,Ve=Math.imul(Ht,er),ze=ze+Math.imul(zt,rr)|0,qe=(qe=qe+Math.imul(zt,ir)|0)+Math.imul(qt,rr)|0,Ve=Ve+Math.imul(qt,ir)|0,ze=ze+Math.imul(Ut,sr)|0,qe=(qe=qe+Math.imul(Ut,vr)|0)+Math.imul(Ot,sr)|0,Ve=Ve+Math.imul(Ot,vr)|0,ze=ze+Math.imul(Tt,kr)|0,qe=(qe=qe+Math.imul(Tt,Ar)|0)+Math.imul(Kt,kr)|0,Ve=Ve+Math.imul(Kt,Ar)|0,ze=ze+Math.imul(Bt,Er)|0,qe=(qe=qe+Math.imul(Bt,xr)|0)+Math.imul(Dt,Er)|0,Ve=Ve+Math.imul(Dt,xr)|0,ze=ze+Math.imul(St,Dr)|0,qe=(qe=qe+Math.imul(St,Rr)|0)+Math.imul(Et,Dr)|0,Ve=Ve+Math.imul(Et,Rr)|0,ze=ze+Math.imul(yt,Ur)|0,qe=(qe=qe+Math.imul(yt,Lr)|0)+Math.imul(mt,Ur)|0,Ve=Ve+Math.imul(mt,Lr)|0;var mi=(nt+(ze=ze+Math.imul(ct,Vr)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,Xr)|0)+Math.imul(ht,Vr)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,Xr)|0)+(qe>>>13)|0)+(mi>>>26)|0,mi&=67108863,ze=Math.imul($t,Qt),qe=(qe=Math.imul($t,er))+Math.imul(Vt,Qt)|0,Ve=Math.imul(Vt,er),ze=ze+Math.imul(Lt,rr)|0,qe=(qe=qe+Math.imul(Lt,ir)|0)+Math.imul(Ht,rr)|0,Ve=Ve+Math.imul(Ht,ir)|0,ze=ze+Math.imul(zt,sr)|0,qe=(qe=qe+Math.imul(zt,vr)|0)+Math.imul(qt,sr)|0,Ve=Ve+Math.imul(qt,vr)|0,ze=ze+Math.imul(Ut,kr)|0,qe=(qe=qe+Math.imul(Ut,Ar)|0)+Math.imul(Ot,kr)|0,Ve=Ve+Math.imul(Ot,Ar)|0,ze=ze+Math.imul(Tt,Er)|0,qe=(qe=qe+Math.imul(Tt,xr)|0)+Math.imul(Kt,Er)|0,Ve=Ve+Math.imul(Kt,xr)|0,ze=ze+Math.imul(Bt,Dr)|0,qe=(qe=qe+Math.imul(Bt,Rr)|0)+Math.imul(Dt,Dr)|0,Ve=Ve+Math.imul(Dt,Rr)|0,ze=ze+Math.imul(St,Ur)|0,qe=(qe=qe+Math.imul(St,Lr)|0)+Math.imul(Et,Ur)|0,Ve=Ve+Math.imul(Et,Lr)|0,ze=ze+Math.imul(yt,Vr)|0,qe=(qe=qe+Math.imul(yt,Xr)|0)+Math.imul(mt,Vr)|0,Ve=Ve+Math.imul(mt,Xr)|0;var bi=(nt+(ze=ze+Math.imul(ct,ei)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,ti)|0)+Math.imul(ht,ei)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,ti)|0)+(qe>>>13)|0)+(bi>>>26)|0,bi&=67108863,ze=Math.imul(Xt,Qt),qe=(qe=Math.imul(Xt,er))+Math.imul(Jt,Qt)|0,Ve=Math.imul(Jt,er),ze=ze+Math.imul($t,rr)|0,qe=(qe=qe+Math.imul($t,ir)|0)+Math.imul(Vt,rr)|0,Ve=Ve+Math.imul(Vt,ir)|0,ze=ze+Math.imul(Lt,sr)|0,qe=(qe=qe+Math.imul(Lt,vr)|0)+Math.imul(Ht,sr)|0,Ve=Ve+Math.imul(Ht,vr)|0,ze=ze+Math.imul(zt,kr)|0,qe=(qe=qe+Math.imul(zt,Ar)|0)+Math.imul(qt,kr)|0,Ve=Ve+Math.imul(qt,Ar)|0,ze=ze+Math.imul(Ut,Er)|0,qe=(qe=qe+Math.imul(Ut,xr)|0)+Math.imul(Ot,Er)|0,Ve=Ve+Math.imul(Ot,xr)|0,ze=ze+Math.imul(Tt,Dr)|0,qe=(qe=qe+Math.imul(Tt,Rr)|0)+Math.imul(Kt,Dr)|0,Ve=Ve+Math.imul(Kt,Rr)|0,ze=ze+Math.imul(Bt,Ur)|0,qe=(qe=qe+Math.imul(Bt,Lr)|0)+Math.imul(Dt,Ur)|0,Ve=Ve+Math.imul(Dt,Lr)|0,ze=ze+Math.imul(St,Vr)|0,qe=(qe=qe+Math.imul(St,Xr)|0)+Math.imul(Et,Vr)|0,Ve=Ve+Math.imul(Et,Xr)|0,ze=ze+Math.imul(yt,ei)|0,qe=(qe=qe+Math.imul(yt,ti)|0)+Math.imul(mt,ei)|0,Ve=Ve+Math.imul(mt,ti)|0;var Si=(nt+(ze=ze+Math.imul(ct,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(ct,ni)|0)+Math.imul(ht,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(ht,ni)|0)+(qe>>>13)|0)+(Si>>>26)|0,Si&=67108863,ze=Math.imul(Xt,rr),qe=(qe=Math.imul(Xt,ir))+Math.imul(Jt,rr)|0,Ve=Math.imul(Jt,ir),ze=ze+Math.imul($t,sr)|0,qe=(qe=qe+Math.imul($t,vr)|0)+Math.imul(Vt,sr)|0,Ve=Ve+Math.imul(Vt,vr)|0,ze=ze+Math.imul(Lt,kr)|0,qe=(qe=qe+Math.imul(Lt,Ar)|0)+Math.imul(Ht,kr)|0,Ve=Ve+Math.imul(Ht,Ar)|0,ze=ze+Math.imul(zt,Er)|0,qe=(qe=qe+Math.imul(zt,xr)|0)+Math.imul(qt,Er)|0,Ve=Ve+Math.imul(qt,xr)|0,ze=ze+Math.imul(Ut,Dr)|0,qe=(qe=qe+Math.imul(Ut,Rr)|0)+Math.imul(Ot,Dr)|0,Ve=Ve+Math.imul(Ot,Rr)|0,ze=ze+Math.imul(Tt,Ur)|0,qe=(qe=qe+Math.imul(Tt,Lr)|0)+Math.imul(Kt,Ur)|0,Ve=Ve+Math.imul(Kt,Lr)|0,ze=ze+Math.imul(Bt,Vr)|0,qe=(qe=qe+Math.imul(Bt,Xr)|0)+Math.imul(Dt,Vr)|0,Ve=Ve+Math.imul(Dt,Xr)|0,ze=ze+Math.imul(St,ei)|0,qe=(qe=qe+Math.imul(St,ti)|0)+Math.imul(Et,ei)|0,Ve=Ve+Math.imul(Et,ti)|0;var Ei=(nt+(ze=ze+Math.imul(yt,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(yt,ni)|0)+Math.imul(mt,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(mt,ni)|0)+(qe>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,ze=Math.imul(Xt,sr),qe=(qe=Math.imul(Xt,vr))+Math.imul(Jt,sr)|0,Ve=Math.imul(Jt,vr),ze=ze+Math.imul($t,kr)|0,qe=(qe=qe+Math.imul($t,Ar)|0)+Math.imul(Vt,kr)|0,Ve=Ve+Math.imul(Vt,Ar)|0,ze=ze+Math.imul(Lt,Er)|0,qe=(qe=qe+Math.imul(Lt,xr)|0)+Math.imul(Ht,Er)|0,Ve=Ve+Math.imul(Ht,xr)|0,ze=ze+Math.imul(zt,Dr)|0,qe=(qe=qe+Math.imul(zt,Rr)|0)+Math.imul(qt,Dr)|0,Ve=Ve+Math.imul(qt,Rr)|0,ze=ze+Math.imul(Ut,Ur)|0,qe=(qe=qe+Math.imul(Ut,Lr)|0)+Math.imul(Ot,Ur)|0,Ve=Ve+Math.imul(Ot,Lr)|0,ze=ze+Math.imul(Tt,Vr)|0,qe=(qe=qe+Math.imul(Tt,Xr)|0)+Math.imul(Kt,Vr)|0,Ve=Ve+Math.imul(Kt,Xr)|0,ze=ze+Math.imul(Bt,ei)|0,qe=(qe=qe+Math.imul(Bt,ti)|0)+Math.imul(Dt,ei)|0,Ve=Ve+Math.imul(Dt,ti)|0;var Mi=(nt+(ze=ze+Math.imul(St,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(St,ni)|0)+Math.imul(Et,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Et,ni)|0)+(qe>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,ze=Math.imul(Xt,kr),qe=(qe=Math.imul(Xt,Ar))+Math.imul(Jt,kr)|0,Ve=Math.imul(Jt,Ar),ze=ze+Math.imul($t,Er)|0,qe=(qe=qe+Math.imul($t,xr)|0)+Math.imul(Vt,Er)|0,Ve=Ve+Math.imul(Vt,xr)|0,ze=ze+Math.imul(Lt,Dr)|0,qe=(qe=qe+Math.imul(Lt,Rr)|0)+Math.imul(Ht,Dr)|0,Ve=Ve+Math.imul(Ht,Rr)|0,ze=ze+Math.imul(zt,Ur)|0,qe=(qe=qe+Math.imul(zt,Lr)|0)+Math.imul(qt,Ur)|0,Ve=Ve+Math.imul(qt,Lr)|0,ze=ze+Math.imul(Ut,Vr)|0,qe=(qe=qe+Math.imul(Ut,Xr)|0)+Math.imul(Ot,Vr)|0,Ve=Ve+Math.imul(Ot,Xr)|0,ze=ze+Math.imul(Tt,ei)|0,qe=(qe=qe+Math.imul(Tt,ti)|0)+Math.imul(Kt,ei)|0,Ve=Ve+Math.imul(Kt,ti)|0;var Ci=(nt+(ze=ze+Math.imul(Bt,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(Bt,ni)|0)+Math.imul(Dt,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Dt,ni)|0)+(qe>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,ze=Math.imul(Xt,Er),qe=(qe=Math.imul(Xt,xr))+Math.imul(Jt,Er)|0,Ve=Math.imul(Jt,xr),ze=ze+Math.imul($t,Dr)|0,qe=(qe=qe+Math.imul($t,Rr)|0)+Math.imul(Vt,Dr)|0,Ve=Ve+Math.imul(Vt,Rr)|0,ze=ze+Math.imul(Lt,Ur)|0,qe=(qe=qe+Math.imul(Lt,Lr)|0)+Math.imul(Ht,Ur)|0,Ve=Ve+Math.imul(Ht,Lr)|0,ze=ze+Math.imul(zt,Vr)|0,qe=(qe=qe+Math.imul(zt,Xr)|0)+Math.imul(qt,Vr)|0,Ve=Ve+Math.imul(qt,Xr)|0,ze=ze+Math.imul(Ut,ei)|0,qe=(qe=qe+Math.imul(Ut,ti)|0)+Math.imul(Ot,ei)|0,Ve=Ve+Math.imul(Ot,ti)|0;var Ri=(nt+(ze=ze+Math.imul(Tt,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(Tt,ni)|0)+Math.imul(Kt,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Kt,ni)|0)+(qe>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,ze=Math.imul(Xt,Dr),qe=(qe=Math.imul(Xt,Rr))+Math.imul(Jt,Dr)|0,Ve=Math.imul(Jt,Rr),ze=ze+Math.imul($t,Ur)|0,qe=(qe=qe+Math.imul($t,Lr)|0)+Math.imul(Vt,Ur)|0,Ve=Ve+Math.imul(Vt,Lr)|0,ze=ze+Math.imul(Lt,Vr)|0,qe=(qe=qe+Math.imul(Lt,Xr)|0)+Math.imul(Ht,Vr)|0,Ve=Ve+Math.imul(Ht,Xr)|0,ze=ze+Math.imul(zt,ei)|0,qe=(qe=qe+Math.imul(zt,ti)|0)+Math.imul(qt,ei)|0,Ve=Ve+Math.imul(qt,ti)|0;var Ki=(nt+(ze=ze+Math.imul(Ut,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(Ut,ni)|0)+Math.imul(Ot,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Ot,ni)|0)+(qe>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,ze=Math.imul(Xt,Ur),qe=(qe=Math.imul(Xt,Lr))+Math.imul(Jt,Ur)|0,Ve=Math.imul(Jt,Lr),ze=ze+Math.imul($t,Vr)|0,qe=(qe=qe+Math.imul($t,Xr)|0)+Math.imul(Vt,Vr)|0,Ve=Ve+Math.imul(Vt,Xr)|0,ze=ze+Math.imul(Lt,ei)|0,qe=(qe=qe+Math.imul(Lt,ti)|0)+Math.imul(Ht,ei)|0,Ve=Ve+Math.imul(Ht,ti)|0;var Ii=(nt+(ze=ze+Math.imul(zt,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(zt,ni)|0)+Math.imul(qt,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(qt,ni)|0)+(qe>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,ze=Math.imul(Xt,Vr),qe=(qe=Math.imul(Xt,Xr))+Math.imul(Jt,Vr)|0,Ve=Math.imul(Jt,Xr),ze=ze+Math.imul($t,ei)|0,qe=(qe=qe+Math.imul($t,ti)|0)+Math.imul(Vt,ei)|0,Ve=Ve+Math.imul(Vt,ti)|0;var Ui=(nt+(ze=ze+Math.imul(Lt,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul(Lt,ni)|0)+Math.imul(Ht,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Ht,ni)|0)+(qe>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,ze=Math.imul(Xt,ei),qe=(qe=Math.imul(Xt,ti))+Math.imul(Jt,ei)|0,Ve=Math.imul(Jt,ti);var Ni=(nt+(ze=ze+Math.imul($t,ii)|0)|0)+((8191&(qe=(qe=qe+Math.imul($t,ni)|0)+Math.imul(Vt,ii)|0))<<13)|0;nt=((Ve=Ve+Math.imul(Vt,ni)|0)+(qe>>>13)|0)+(Ni>>>26)|0,Ni&=67108863;var zi=(nt+(ze=Math.imul(Xt,ii))|0)+((8191&(qe=(qe=Math.imul(Xt,ni))+Math.imul(Jt,ii)|0))<<13)|0;return nt=((Ve=Math.imul(Jt,ni))+(qe>>>13)|0)+(zi>>>26)|0,zi&=67108863,it[0]=oi,it[1]=ci,it[2]=hi,it[3]=li,it[4]=di,it[5]=pi,it[6]=yi,it[7]=mi,it[8]=bi,it[9]=Si,it[10]=Ei,it[11]=Mi,it[12]=Ci,it[13]=Ri,it[14]=Ki,it[15]=Ii,it[16]=Ui,it[17]=Ni,it[18]=zi,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 ze=0,qe=0,Ve=0;Ve<Ce.length-1;Ve++){var tt=qe;qe=0;for(var rt=67108863&ze,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),qe+=(tt=(tt=tt+(ct/67108864|0)|0)+(ht>>>26)|0)>>>26,tt&=67108863}Ce.words[Ve]=rt,ze=tt,tt=qe}return 0!==ze?Ce.words[Ve]=ze: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,ze=0;ze<ke;ze++)Ae[ze]=this.revBin(ze,Ce,ke);return Ae},y.prototype.revBin=function(ke,Ae,Ce){if(0===ke||ke===Ce-1)return ke;for(var ze=0,qe=0;qe<Ae;qe++)ze|=(1&ke)<<Ae-qe-1,ke>>=1;return ze},y.prototype.permute=function(ke,Ae,Ce,ze,qe,Ve){for(var tt=0;tt<Ve;tt++)ze[tt]=Ae[ke[tt]],qe[tt]=Ce[ke[tt]]},y.prototype.transform=function(ke,Ae,Ce,ze,qe,Ve){this.permute(Ve,ke,Ae,Ce,ze,qe);for(var tt=1;tt<qe;tt<<=1)for(var rt=tt<<1,it=Math.cos(2*Math.PI/rt),nt=Math.sin(2*Math.PI/rt),ot=0;ot<qe;ot+=rt)for(var ct=it,ht=nt,ft=0;ft<tt;ft++){var yt=Ce[ot+ft],mt=ze[ot+ft],kt=Ce[ot+ft+tt],St=ze[ot+ft+tt],Et=ct*kt-ht*St;St=ct*St+ht*kt,kt=Et,Ce[ot+ft]=yt+kt,ze[ot+ft]=mt+St,Ce[ot+ft+tt]=yt-kt,ze[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),ze=1&Ce,qe=0;for(Ce=Ce/2|0;Ce;Ce>>>=1)qe++;return 1<<qe+1+ze},y.prototype.conjugate=function(ke,Ae,Ce){if(!(Ce<=1))for(var ze=0;ze<Ce/2;ze++){var qe=ke[ze];ke[ze]=ke[Ce-ze-1],ke[Ce-ze-1]=qe,qe=Ae[ze],Ae[ze]=-Ae[Ce-ze-1],Ae[Ce-ze-1]=-qe}},y.prototype.normalize13b=function(ke,Ae){for(var Ce=0,ze=0;ze<Ae/2;ze++){var qe=8192*Math.round(ke[2*ze+1]/Ae)+Math.round(ke[2*ze]/Ae)+Ce;ke[ze]=67108863&qe,Ce=qe<67108864?0:qe/67108864|0}return ke},y.prototype.convert13b=function(ke,Ae,Ce,ze){for(var qe=0,Ve=0;Ve<Ae;Ve++)qe+=0|ke[Ve],Ce[2*Ve]=8191&qe,qe>>>=13,Ce[2*Ve+1]=8191&qe,qe>>>=13;for(Ve=2*Ae;Ve<ze;++Ve)Ce[Ve]=0;r(0===qe),r(0==(-8192&qe))},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 ze=2*this.guessLen13b(ke.length,Ae.length),qe=this.makeRBT(ze),Ve=this.stub(ze),tt=Array(ze),rt=Array(ze),it=Array(ze),nt=Array(ze),ot=Array(ze),ct=Array(ze),ht=Ce.words;ht.length=ze,this.convert13b(ke.words,ke.length,tt,ze),this.convert13b(Ae.words,Ae.length,nt,ze),this.transform(tt,Ve,rt,it,ze,qe),this.transform(nt,Ve,ot,ct,ze,qe);for(var ft=0;ft<ze;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,ze),this.transform(rt,it,ht,Ve,ze,qe),this.conjugate(ht,Ve,ze),this.normalize13b(ht,ze),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 ze=(0|this.words[Ce])*ke,qe=(67108863&ze)+(67108863&Ae);Ae>>=26,Ae+=ze/67108864|0,Ae+=qe>>>26,this.words[Ce]=67108863&qe}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 ze=Ce/26|0,qe=Ce%26;Ae[Ce]=(ke.words[ze]&1<<qe)>>>qe}return Ae}(ke);if(0===Ae.length)return new n(1);for(var Ce=this,ze=0;ze<Ae.length&&0===Ae[ze];ze++,Ce=Ce.sqr());if(++ze<Ae.length)for(var qe=Ce.sqr();ze<Ae.length;ze++,qe=qe.sqr())0!==Ae[ze]&&(Ce=Ce.mul(qe));return Ce},n.prototype.iushln=function(ke){r("number"==typeof ke&&ke>=0);var Ae,Ce=ke%26,ze=(ke-Ce)/26,qe=67108863>>>26-Ce<<26-Ce;if(0!==Ce){var Ve=0;for(Ae=0;Ae<this.length;Ae++){var tt=this.words[Ae]&qe,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!==ze){for(Ae=this.length-1;Ae>=0;Ae--)this.words[Ae+ze]=this.words[Ae];for(Ae=0;Ae<ze;Ae++)this.words[Ae]=0;this.length+=ze}return this.strip()},n.prototype.ishln=function(ke){return r(0===this.negative),this.iushln(ke)},n.prototype.iushrn=function(ke,Ae,Ce){var ze;r("number"==typeof ke&&ke>=0),ze=Ae?(Ae-Ae%26)/26:0;var qe=ke%26,Ve=Math.min((ke-qe)/26,this.length),tt=67108863^67108863>>>qe<<qe,rt=Ce;if(ze=Math.max(0,ze-=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>=ze);it--){var ot=0|this.words[it];this.words[it]=nt<<26-qe|ot>>>qe,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,ze=1<<Ae;return!(this.length<=Ce)&&!!(this.words[Ce]&ze)},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 ze=67108863^67108863>>>Ae<<Ae;this.words[this.length-1]&=ze}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 ze,qe,Ve=ke.length+Ce;this._expand(Ve);var tt=0;for(ze=0;ze<ke.length;ze++){qe=(0|this.words[ze+Ce])+tt;var rt=(0|ke.words[ze])*Ae;tt=((qe-=67108863&rt)>>26)-(rt/67108864|0),this.words[ze+Ce]=67108863&qe}for(;ze<this.length-Ce;ze++)tt=(qe=(0|this.words[ze+Ce])+tt)>>26,this.words[ze+Ce]=67108863&qe;if(0===tt)return this.strip();for(r(-1===tt),tt=0,ze=0;ze<this.length;ze++)tt=(qe=-(0|this.words[ze])+tt)>>26,this.words[ze]=67108863&qe;return this.negative=1,this.strip()},n.prototype._wordDiv=function(ke,Ae){var Ce=(this.length,ke.length),ze=this.clone(),qe=ke,Ve=0|qe.words[qe.length-1];0!==(Ce=26-this._countBits(Ve))&&(qe=qe.ushln(Ce),ze.iushln(Ce),Ve=0|qe.words[qe.length-1]);var tt,rt=ze.length-qe.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=ze.clone()._ishlnsubmul(qe,1,rt);0===nt.negative&&(ze=nt,tt&&(tt.words[rt]=1));for(var ot=rt-1;ot>=0;ot--){var ct=67108864*(0|ze.words[qe.length+ot])+(0|ze.words[qe.length+ot-1]);for(ct=Math.min(ct/Ve|0,67108863),ze._ishlnsubmul(qe,ct,ot);0!==ze.negative;)ct--,ze.negative=0,ze._ishlnsubmul(qe,1,ot),ze.isZero()||(ze.negative^=1);tt&&(tt.words[ot]=ct)}return tt&&tt.strip(),ze.strip(),"div"!==Ae&&0!==Ce&&ze.iushrn(Ce),{div:tt||null,mod:ze}},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&&(ze=Ve.div.neg()),"div"!==Ae&&(qe=Ve.mod.neg(),Ce&&0!==qe.negative&&qe.iadd(ke)),{div:ze,mod:qe}):0===this.negative&&0!==ke.negative?(Ve=this.divmod(ke.neg(),Ae),"mod"!==Ae&&(ze=Ve.div.neg()),{div:ze,mod:Ve.mod}):0!=(this.negative&ke.negative)?(Ve=this.neg().divmod(ke.neg(),Ae),"div"!==Ae&&(qe=Ve.mod.neg(),Ce&&0!==qe.negative&&qe.isub(ke)),{div:Ve.div,mod:qe}):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 ze,qe,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,ze=ke.ushrn(1),qe=ke.andln(1),Ve=Ce.cmp(ze);return Ve<0||1===qe&&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,ze=this.length-1;ze>=0;ze--)Ce=(Ae*Ce+(0|this.words[ze]))%ke;return Ce},n.prototype.idivn=function(ke){r(ke<=67108863);for(var Ae=0,Ce=this.length-1;Ce>=0;Ce--){var ze=(0|this.words[Ce])+67108864*Ae;this.words[Ce]=ze/ke|0,Ae=ze%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 ze=new n(1),qe=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;)(ze.isOdd()||qe.isOdd())&&(ze.iadd(it),qe.isub(nt)),ze.iushrn(1),qe.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),ze.isub(Ve),qe.isub(tt)):(Ce.isub(Ae),Ve.isub(ze),tt.isub(qe))}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 ze,qe=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;)qe.isOdd()&&qe.iadd(tt),qe.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),qe.isub(Ve)):(Ce.isub(Ae),Ve.isub(qe))}return(ze=0===Ae.cmpn(1)?qe:Ve).cmpn(0)<0&&ze.iadd(ke),ze},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 ze=0;Ae.isEven()&&Ce.isEven();ze++)Ae.iushrn(1),Ce.iushrn(1);for(;;){for(;Ae.isEven();)Ae.iushrn(1);for(;Ce.isEven();)Ce.iushrn(1);var qe=Ae.cmp(Ce);if(qe<0){var Ve=Ae;Ae=Ce,Ce=Ve}else if(0===qe||0===Ce.cmpn(1))break;Ae.isub(Ce)}return Ce.iushln(ze)},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,ze=1<<Ae;if(this.length<=Ce)return this._expand(Ce+1),this.words[Ce]|=ze,this;for(var qe=ze,Ve=Ce;0!==qe&&Ve<this.length;Ve++){var tt=0|this.words[Ve];qe=(tt+=qe)>>>26,tt&=67108863,this.words[Ve]=tt}return 0!==qe&&(this.words[Ve]=qe,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 ze=0|this.words[0];Ae=ze===ke?0:ze<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 ze=0|this.words[Ce],qe=0|ke.words[Ce];if(ze!==qe){ze<qe?Ae=-1:ze>qe&&(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 ze=Ae<this.n?-1:Ce.ucmp(this.p);return 0===ze?(Ce.words[0]=0,Ce.length=1):ze>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,ze=Math.min(ke.length,9),qe=0;qe<ze;qe++)Ae.words[qe]=ke.words[qe];if(Ae.length=ze,ke.length<=9)return ke.words[0]=0,void(ke.length=1);var Ve=ke.words[9];for(Ae.words[Ae.length++]=Ve&Ce,qe=10;qe<ke.length;qe++){var tt=0|ke.words[qe];ke.words[qe-10]=(tt&Ce)<<4|Ve>>>22,Ve=tt}Ve>>>=22,ke.words[qe-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 ze=0|ke.words[Ce];Ae+=977*ze,ke.words[Ce]=67108863&Ae,Ae=64*ze+(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 ze=19*(0|ke.words[Ce])+Ae,qe=67108863&ze;ze>>>=26,ke.words[Ce]=qe,Ae=ze}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 ze=this.m.subn(1),qe=0;!ze.isZero()&&0===ze.andln(1);)qe++,ze.iushrn(1);r(!ze.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,ze),ot=this.pow(ke,ze.addn(1).iushrn(1)),ct=this.pow(ke,ze),ht=qe;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 ze=2;ze<Ce.length;ze++)Ce[ze]=this.mul(Ce[ze-1],ke);var qe=Ce[0],Ve=0,tt=0,rt=Ae.bitLength()%26;for(0===rt&&(rt=26),ze=Ae.length-1;ze>=0;ze--){for(var it=Ae.words[ze],nt=rt-1;nt>=0;nt--){var ot=it>>nt&1;qe!==Ce[0]&&(qe=this.sqr(qe)),0!==ot||0!==Ve?(Ve<<=1,Ve|=ot,(4===++tt||0===ze&&0===nt)&&(qe=this.mul(qe,Ce[Ve]),tt=0,Ve=0)):tt=0}rt=26}return qe},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),ze=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),qe=Ce.isub(ze).iushrn(this.shift),Ve=qe;return qe.cmp(this.m)>=0?Ve=qe.isub(this.m):qe.cmpn(0)<0&&(Ve=qe.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),ze=Ce.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),qe=Ce.isub(ze).iushrn(this.shift),Ve=qe;return qe.cmp(this.m)>=0?Ve=qe.isub(this.m):qe.cmpn(0)<0&&(Ve=qe.iadd(this.m)),Ve._forceRed(this)},A.prototype.invm=function(ke){return this.imod(ke._invmp(this.m).mul(this.r2))._forceRed(this)}}(ke,Ur)})),Od=Object.freeze({__proto__:null,default:Id,__moduleExports:Id});class Cd{constructor(ke){if(void 0===ke)throw Error("Invalid BigInteger input");this.value=new Id(ke)}clone(){const ke=new Cd(null);return this.value.copy(ke.value),ke}iinc(){return this.value.iadd(new Id(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new Id(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()?Id.red(Ae.value):Id.mont(Ae.value),ze=this.clone();return ze.value=ze.value.toRed(Ce).redPow(ke.value).fromRed(),ze}modInv(ke){if(!this.gcd(ke).isOne())throw Error("Inverse does not exist");return new Cd(this.value.invm(ke.value))}gcd(ke){return new Cd(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 Id(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 zd,qd=Object.freeze({__proto__:null,default:Cd}),jd=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 ze=0;ze<ke.length;ze++)Ce[ze]=0|ke[ze];return Ce}if("hex"===Ae){(ke=ke.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(ke="0"+ke);for(ze=0;ze<ke.length;ze+=2)Ce.push(parseInt(ke[ze]+ke[ze+1],16))}else for(ze=0;ze<ke.length;ze++){var qe=ke.charCodeAt(ze),Ve=qe>>8,tt=255&qe;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}})),Fd=bt((function(ke,Ae){var Ce=Ae;Ce.assert=Ir,Ce.toArray=jd.toArray,Ce.zero2=jd.zero2,Ce.toHex=jd.toHex,Ce.encode=jd.encode,Ce.getNAF=function(ke,Ae){for(var Ce=[],ze=1<<Ae+1,qe=ke.clone();qe.cmpn(1)>=0;){var Ve;if(qe.isOdd()){var tt=qe.andln(ze-1);Ve=tt>(ze>>1)-1?(ze>>1)-tt:tt,qe.isubn(Ve)}else Ve=0;Ce.push(Ve);for(var rt=0!==qe.cmpn(0)&&0===qe.andln(ze-1)?Ae+1:1,it=1;it<rt;it++)Ce.push(0);qe.iushrn(rt)}return Ce},Ce.getJSF=function(ke,Ae){var Ce=[[],[]];ke=ke.clone(),Ae=Ae.clone();for(var ze=0,qe=0;ke.cmpn(-ze)>0||Ae.cmpn(-qe)>0;){var Ve,tt,rt,it=ke.andln(3)+ze&3,nt=Ae.andln(3)+qe&3;if(3===it&&(it=-1),3===nt&&(nt=-1),0==(1&it))Ve=0;else Ve=3!==(rt=ke.andln(7)+ze&7)&&5!==rt||2!==nt?it:-it;if(Ce[0].push(Ve),0==(1&nt))tt=0;else tt=3!==(rt=Ae.andln(7)+qe&7)&&5!==rt||2!==it?nt:-nt;Ce[1].push(tt),2*ze===Ve+1&&(ze=1-ze),2*qe===tt+1&&(qe=1-qe),ke.iushrn(1),Ae.iushrn(1)}return Ce},Ce.cachedProperty=function(ke,Ae,Ce){var ze="_"+Ae;ke.prototype[Ae]=function(){return void 0!==this[ze]?this[ze]:this[ze]=Ce.call(this)}},Ce.parseBytes=function(ke){return"string"==typeof ke?Ce.toArray(ke,"hex"):ke},Ce.intFromLE=function(ke){return new Id(ke,"hex","le")}})),Ud=function(ke){return zd||(zd=new Bd(null)),zd.generate(ke)};function Bd(ke){this.rand=ke}var Wd=Bd;if(Bd.prototype.generate=function(ke){return this._rand(ke)},Bd.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?Bd.prototype._rand=function(ke){var Ae=new Uint8Array(ke);return self.crypto.getRandomValues(Ae),Ae}:self.msCrypto&&self.msCrypto.getRandomValues?Bd.prototype._rand=function(ke){var Ae=new Uint8Array(ke);return self.msCrypto.getRandomValues(Ae),Ae}:"object"==typeof window&&(Bd.prototype._rand=function(){throw Error("Not implemented yet")});else try{var Gd=ft.default;if("function"!=typeof Gd.randomBytes)throw Error("Not supported");Bd.prototype._rand=function(ke){return Gd.randomBytes(ke)}}catch(ze){}Ud.Rand=Wd;var Yd=Fd.getNAF,Qd=Fd.getJSF,ep=Fd.assert;function Nd(ke,Ae){this.type=ke,this.p=new Id(Ae.p,16),this.red=Ae.prime?Id.red(Ae.prime):Id.mont(this.p),this.zero=new Id(0).toRed(this.red),this.one=new Id(1).toRed(this.red),this.two=new Id(2).toRed(this.red),this.n=Ae.n&&new Id(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 tp=Nd;function Ld(ke,Ae){this.curve=ke,this.type=Ae,this.precomputed=null}Nd.prototype.point=function(){throw Error("Not implemented")},Nd.prototype.validate=function(){throw Error("Not implemented")},Nd.prototype._fixedNafMul=function(ke,Ae){ep(ke.precomputed);var Ce=ke._getDoubles(),ze=Yd(Ae,1),qe=(1<<Ce.step+1)-(Ce.step%2==0?2:1);qe/=3;for(var Ve=[],tt=0;tt<ze.length;tt+=Ce.step){var rt=0;for(Ae=tt+Ce.step-1;Ae>=tt;Ae--)rt=(rt<<1)+ze[Ae];Ve.push(rt)}for(var it=this.jpoint(null,null,null),nt=this.jpoint(null,null,null),ot=qe;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()},Nd.prototype._wnafMul=function(ke,Ae){var Ce=4,ze=ke._getNAFPoints(Ce);Ce=ze.wnd;for(var qe=ze.points,Ve=Yd(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];ep(0!==it),tt="affine"===ke.type?it>0?tt.mixedAdd(qe[it-1>>1]):tt.mixedAdd(qe[-it-1>>1].neg()):it>0?tt.add(qe[it-1>>1]):tt.add(qe[-it-1>>1].neg())}return"affine"===ke.type?tt.toP():tt},Nd.prototype._wnafMulAdd=function(ke,Ae,Ce,ze,qe){for(var Ve=this._wnafT1,tt=this._wnafT2,rt=this._wnafT3,it=0,nt=0;nt<ze;nt++){var ot=(Tt=Ae[nt])._getNAFPoints(ke);Ve[nt]=ot.wnd,tt[nt]=ot.points}for(nt=ze-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=Qd(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]=Yd(Ce[ct],Ve[ct]),rt[ht]=Yd(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),Bt=this._wnafT4;for(nt=it;nt>=0;nt--){for(var Dt=0;nt>=0;){var Rt=!0;for(kt=0;kt<ze;kt++)Bt[kt]=0|rt[kt][nt],0!==Bt[kt]&&(Rt=!1);if(!Rt)break;Dt++,nt--}if(nt>=0&&Dt++,Pt=Pt.dblp(Dt),nt<0)break;for(kt=0;kt<ze;kt++){var Tt,Kt=Bt[kt];0!==Kt&&(Kt>0?Tt=tt[kt][Kt-1>>1]:Kt<0&&(Tt=tt[kt][-Kt-1>>1].neg()),Pt="affine"===Tt.type?Pt.mixedAdd(Tt):Pt.add(Tt))}}for(nt=0;nt<ze;nt++)tt[nt]=null;return qe?Pt:Pt.toP()},Nd.BasePoint=Ld,Ld.prototype.eq=function(){throw Error("Not implemented")},Ld.prototype.validate=function(){return this.curve.validate(this)},Nd.prototype.decodePoint=function(ke,Ae){ke=Fd.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]?ep(ke[ke.length-1]%2==0):7===ke[0]&&ep(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")},Ld.prototype.encodeCompressed=function(ke){return this.encode(ke,!0)},Ld.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))},Ld.prototype.encode=function(ke,Ae){return Fd.encode(this._encode(Ae),ke)},Ld.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},Ld.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)},Ld.prototype._getDoubles=function(ke,Ae){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Ce=[this],ze=this,qe=0;qe<Ae;qe+=ke){for(var Ve=0;Ve<ke;Ve++)ze=ze.dbl();Ce.push(ze)}return{step:ke,points:Ce}},Ld.prototype._getNAFPoints=function(ke){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var Ae=[this],Ce=(1<<ke)-1,ze=1===Ce?null:this.dbl(),qe=1;qe<Ce;qe++)Ae[qe]=Ae[qe-1].add(ze);return{wnd:ke,points:Ae}},Ld.prototype._getBeta=function(){return null},Ld.prototype.dblp=function(ke){for(var Ae=this,Ce=0;Ce<ke;Ce++)Ae=Ae.dbl();return Ae};var rp=Fd.assert;function Hd(ke){tp.call(this,"short",ke),this.a=new Id(ke.a,16).toRed(this.red),this.b=new Id(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(Hd,tp);var ip=Hd;function Vd(ke,Ae,Ce,ze){tp.BasePoint.call(this,ke,"affine"),null===Ae&&null===Ce?(this.x=null,this.y=null,this.inf=!0):(this.x=new Id(Ae,16),this.y=new Id(Ce,16),ze&&(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 $d(ke,Ae,Ce,ze){tp.BasePoint.call(this,ke,"jacobian"),null===Ae&&null===Ce&&null===ze?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Id(0)):(this.x=new Id(Ae,16),this.y=new Id(Ce,16),this.z=new Id(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.zOne=this.z===this.curve.one}function Zd(ke){tp.call(this,"mont",ke),this.a=new Id(ke.a,16).toRed(this.red),this.b=new Id(ke.b,16).toRed(this.red),this.i4=new Id(4).toRed(this.red).redInvm(),this.two=new Id(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Hd.prototype._getEndomorphism=function(ke){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var Ae,Ce;if(ke.beta)Ae=new Id(ke.beta,16).toRed(this.red);else{var ze=this._getEndoRoots(this.p);Ae=(Ae=ze[0].cmp(ze[1])<0?ze[0]:ze[1]).toRed(this.red)}if(ke.lambda)Ce=new Id(ke.lambda,16);else{var qe=this._getEndoRoots(this.n);0===this.g.mul(qe[0]).x.cmp(this.g.x.redMul(Ae))?Ce=qe[0]:(Ce=qe[1],rp(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 Id(ke.a,16),b:new Id(ke.b,16)}})):this._getEndoBasis(Ce)}}},Hd.prototype._getEndoRoots=function(ke){var Ae=ke===this.p?this.red:Id.mont(ke),Ce=new Id(2).toRed(Ae).redInvm(),ze=Ce.redNeg(),qe=new Id(3).toRed(Ae).redNeg().redSqrt().redMul(Ce);return[ze.redAdd(qe).fromRed(),ze.redSub(qe).fromRed()]},Hd.prototype._getEndoBasis=function(ke){for(var Ae,Ce,ze,qe,Ve,tt,rt,it,nt,ot=this.n.ushrn(Math.floor(this.n.bitLength()/2)),ct=ke,ht=this.n.clone(),ft=new Id(1),yt=new Id(0),mt=new Id(0),kt=new Id(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(!ze&&it.cmp(ot)<0)Ae=rt.neg(),Ce=ft,ze=it.neg(),qe=nt;else if(ze&&2==++St)break;rt=it,ht=ct,ct=it,mt=ft,ft=nt,kt=yt,yt=Pt}Ve=it.neg(),tt=nt;var Bt=ze.sqr().add(qe.sqr());return Ve.sqr().add(tt.sqr()).cmp(Bt)>=0&&(Ve=Ae,tt=Ce),ze.negative&&(ze=ze.neg(),qe=qe.neg()),Ve.negative&&(Ve=Ve.neg(),tt=tt.neg()),[{a:ze,b:qe},{a:Ve,b:tt}]},Hd.prototype._endoSplit=function(ke){var Ae=this.endo.basis,Ce=Ae[0],ze=Ae[1],qe=ze.b.mul(ke).divRound(this.n),Ve=Ce.b.neg().mul(ke).divRound(this.n),tt=qe.mul(Ce.a),rt=Ve.mul(ze.a),it=qe.mul(Ce.b),nt=Ve.mul(ze.b);return{k1:ke.sub(tt).sub(rt),k2:it.add(nt).neg()}},Hd.prototype.pointFromX=function(ke,Ae){(ke=new Id(ke,16)).red||(ke=ke.toRed(this.red));var Ce=ke.redSqr().redMul(ke).redIAdd(ke.redMul(this.a)).redIAdd(this.b),ze=Ce.redSqrt();if(0!==ze.redSqr().redSub(Ce).cmp(this.zero))throw Error("invalid point");var qe=ze.fromRed().isOdd();return(Ae&&!qe||!Ae&&qe)&&(ze=ze.redNeg()),this.point(ke,ze)},Hd.prototype.validate=function(ke){if(ke.inf)return!0;var Ae=ke.x,Ce=ke.y,ze=this.a.redMul(Ae),qe=Ae.redSqr().redMul(Ae).redIAdd(ze).redIAdd(this.b);return 0===Ce.redSqr().redISub(qe).cmpn(0)},Hd.prototype._endoWnafMulAdd=function(ke,Ae,Ce){for(var ze=this._endoWnafT1,qe=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)),ze[2*Ve]=rt,ze[2*Ve+1]=it,qe[2*Ve]=tt.k1,qe[2*Ve+1]=tt.k2}for(var nt=this._wnafMulAdd(1,ze,qe,2*Ve,Ce),ot=0;ot<2*Ve;ot++)ze[ot]=null,qe[ot]=null;return nt},Gr(Vd,tp.BasePoint),Hd.prototype.point=function(ke,Ae,Ce){return new Vd(this,ke,Ae,Ce)},Hd.prototype.pointFromJSON=function(ke,Ae){return Vd.fromJSON(this,ke,Ae)},Vd.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}},Vd.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]},Vd.fromJSON=function(ke,Ae,Ce){"string"==typeof Ae&&(Ae=JSON.parse(Ae));var ze=ke.point(Ae[0],Ae[1],Ce);if(!Ae[2])return ze;function n(Ae){return ke.point(Ae[0],Ae[1],Ce)}var qe=Ae[2];return ze.precomputed={beta:null,doubles:qe.doubles&&{step:qe.doubles.step,points:[ze].concat(qe.doubles.points.map(n))},naf:qe.naf&&{wnd:qe.naf.wnd,points:[ze].concat(qe.naf.points.map(n))}},ze},Vd.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)+">"},Vd.prototype.isInfinity=function(){return this.inf},Vd.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),ze=Ae.redMul(this.x.redSub(Ce)).redISub(this.y);return this.curve.point(Ce,ze)},Vd.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(),ze=ke.redInvm(),qe=Ce.redAdd(Ce).redIAdd(Ce).redIAdd(Ae).redMul(ze),Ve=qe.redSqr().redISub(this.x.redAdd(this.x)),tt=qe.redMul(this.x.redSub(Ve)).redISub(this.y);return this.curve.point(Ve,tt)},Vd.prototype.getX=function(){return this.x.fromRed()},Vd.prototype.getY=function(){return this.y.fromRed()},Vd.prototype.mul=function(ke){return ke=new Id(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)},Vd.prototype.mulAdd=function(ke,Ae,Ce){var ze=[this,Ae],qe=[ke,Ce];return this.curve.endo?this.curve._endoWnafMulAdd(ze,qe):this.curve._wnafMulAdd(1,ze,qe,2)},Vd.prototype.jmulAdd=function(ke,Ae,Ce){var ze=[this,Ae],qe=[ke,Ce];return this.curve.endo?this.curve._endoWnafMulAdd(ze,qe,!0):this.curve._wnafMulAdd(1,ze,qe,2,!0)},Vd.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))},Vd.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},Vd.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Gr($d,tp.BasePoint),Hd.prototype.jpoint=function(ke,Ae,Ce){return new $d(this,ke,Ae,Ce)},$d.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),ze=this.y.redMul(Ae).redMul(ke);return this.curve.point(Ce,ze)},$d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},$d.prototype.add=function(ke){if(this.isInfinity())return ke;if(ke.isInfinity())return this;var Ae=ke.z.redSqr(),Ce=this.z.redSqr(),ze=this.x.redMul(Ae),qe=ke.x.redMul(Ce),Ve=this.y.redMul(Ae.redMul(ke.z)),tt=ke.y.redMul(Ce.redMul(this.z)),rt=ze.redSub(qe),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=ze.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)},$d.prototype.mixedAdd=function(ke){if(this.isInfinity())return ke.toJ();if(ke.isInfinity())return this;var Ae=this.z.redSqr(),Ce=this.x,ze=ke.x.redMul(Ae),qe=this.y,Ve=ke.y.redMul(Ae).redMul(this.z),tt=Ce.redSub(ze),rt=qe.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(qe.redMul(nt)),ft=this.z.redMul(tt);return this.curve.jpoint(ct,ht,ft)},$d.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 ze=this.curve.a,qe=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(ze.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(qe),rt)},$d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},$d.prototype._zeroDbl=function(){var ke,Ae,Ce;if(this.zOne){var ze=this.x.redSqr(),qe=this.y.redSqr(),Ve=qe.redSqr(),tt=this.x.redAdd(qe).redSqr().redISub(ze).redISub(Ve);tt=tt.redIAdd(tt);var rt=ze.redAdd(ze).redIAdd(ze),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)},$d.prototype._threeDbl=function(){var ke,Ae,Ce;if(this.zOne){var ze=this.x.redSqr(),qe=this.y.redSqr(),Ve=qe.redSqr(),tt=this.x.redAdd(qe).redSqr().redISub(ze).redISub(Ve);tt=tt.redIAdd(tt);var rt=ze.redAdd(ze).redIAdd(ze).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)},$d.prototype._dbl=function(){var ke=this.curve.a,Ae=this.x,Ce=this.y,ze=this.z,qe=ze.redSqr().redSqr(),Ve=Ae.redSqr(),tt=Ce.redSqr(),rt=Ve.redAdd(Ve).redIAdd(Ve).redIAdd(ke.redMul(qe)),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(ze);return this.curve.jpoint(ot,ft,yt)},$d.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(),ze=Ae.redSqr(),qe=ke.redAdd(ke).redIAdd(ke),Ve=qe.redSqr(),tt=this.x.redAdd(Ae).redSqr().redISub(ke).redISub(ze),rt=(tt=(tt=(tt=tt.redIAdd(tt)).redAdd(tt).redIAdd(tt)).redISub(Ve)).redSqr(),it=ze.redIAdd(ze);it=(it=(it=it.redIAdd(it)).redIAdd(it)).redIAdd(it);var nt=qe.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)},$d.prototype.mul=function(ke,Ae){return ke=new Id(ke,Ae),this.curve._wnafMul(this,ke)},$d.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 ze=Ae.redMul(this.z),qe=Ce.redMul(ke.z);return 0===this.y.redMul(qe).redISub(ke.y.redMul(ze)).cmpn(0)},$d.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 ze=ke.clone(),qe=this.curve.redN.redMul(Ae);;){if(ze.iadd(this.curve.n),ze.cmp(this.curve.p)>=0)return!1;if(Ce.redIAdd(qe),0===this.x.cmp(Ce))return!0}},$d.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)+">"},$d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Gr(Zd,tp);var np=Zd;function Xd(ke,Ae,Ce){tp.BasePoint.call(this,ke,"projective"),null===Ae&&null===Ce?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Id(Ae,16),this.z=new Id(Ce,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Zd.prototype.validate=function(ke){var Ae=ke.normalize().x,Ce=Ae.redSqr(),ze=Ce.redMul(Ae).redAdd(Ce.redMul(this.a)).redAdd(Ae);return 0===ze.redSqrt().redSqr().cmp(ze)},Gr(Xd,tp.BasePoint),Zd.prototype.decodePoint=function(ke,Ae){if(33===(ke=Fd.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)},Zd.prototype.point=function(ke,Ae){return new Xd(this,ke,Ae)},Zd.prototype.pointFromJSON=function(ke){return Xd.fromJSON(this,ke)},Xd.prototype.precompute=function(){},Xd.prototype._encode=function(ke){var Ae=this.curve.p.byteLength();return ke?[64].concat(this.getX().toArray("le",Ae)):this.getX().toArray("be",Ae)},Xd.fromJSON=function(ke,Ae){return new Xd(ke,Ae[0],Ae[1]||ke.one)},Xd.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)+">"},Xd.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Xd.prototype.dbl=function(){var ke=this.x.redAdd(this.z).redSqr(),Ae=this.x.redSub(this.z).redSqr(),Ce=ke.redSub(Ae),ze=ke.redMul(Ae),qe=Ce.redMul(Ae.redAdd(this.curve.a24.redMul(Ce)));return this.curve.point(ze,qe)},Xd.prototype.add=function(){throw Error("Not supported on Montgomery curve")},Xd.prototype.diffAdd=function(ke,Ae){var Ce=this.x.redAdd(this.z),ze=this.x.redSub(this.z),qe=ke.x.redAdd(ke.z),Ve=ke.x.redSub(ke.z).redMul(Ce),tt=qe.redMul(ze),rt=Ae.z.redMul(Ve.redAdd(tt).redSqr()),it=Ae.x.redMul(Ve.redISub(tt).redSqr());return this.curve.point(rt,it)},Xd.prototype.mul=function(ke){for(var Ae=(ke=new Id(ke,16)).clone(),Ce=this,ze=this.curve.point(null,null),qe=[];0!==Ae.cmpn(0);Ae.iushrn(1))qe.push(Ae.andln(1));for(var Ve=qe.length-1;Ve>=0;Ve--)0===qe[Ve]?(Ce=Ce.diffAdd(ze,this),ze=ze.dbl()):(ze=Ce.diffAdd(ze,this),Ce=Ce.dbl());return ze},Xd.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},Xd.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},Xd.prototype.eq=function(ke){return 0===this.getX().cmp(ke.getX())},Xd.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Xd.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var sp=Fd.assert;function Jd(ke){this.twisted=1!=(0|ke.a),this.mOneA=this.twisted&&-1==(0|ke.a),this.extended=this.mOneA,tp.call(this,"edwards",ke),this.a=new Id(ke.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Id(ke.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Id(ke.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),sp(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|ke.c)}Gr(Jd,tp);var ap=Jd;function tl(ke,Ae,Ce,ze,qe){tp.BasePoint.call(this,ke,"projective"),null===Ae&&null===Ce&&null===ze?(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 Id(Ae,16),this.y=new Id(Ce,16),this.z=ze?new Id(ze,16):this.curve.one,this.t=qe&&new Id(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.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()))))}Jd.prototype._mulA=function(ke){return this.mOneA?ke.redNeg():this.a.redMul(ke)},Jd.prototype._mulC=function(ke){return this.oneC?ke:this.c.redMul(ke)},Jd.prototype.jpoint=function(ke,Ae,Ce,ze){return this.point(ke,Ae,Ce,ze)},Jd.prototype.pointFromX=function(ke,Ae){(ke=new Id(ke,16)).red||(ke=ke.toRed(this.red));var Ce=ke.redSqr(),ze=this.c2.redSub(this.a.redMul(Ce)),qe=this.one.redSub(this.c2.redMul(this.d).redMul(Ce)),Ve=ze.redMul(qe.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)},Jd.prototype.pointFromY=function(ke,Ae){(ke=new Id(ke,16)).red||(ke=ke.toRed(this.red));var Ce=ke.redSqr(),ze=Ce.redSub(this.c2),qe=Ce.redMul(this.d).redMul(this.c2).redSub(this.a),Ve=ze.redMul(qe.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)},Jd.prototype.validate=function(ke){if(ke.isInfinity())return!0;ke.normalize();var Ae=ke.x.redSqr(),Ce=ke.y.redSqr(),ze=Ae.redMul(this.a).redAdd(Ce),qe=this.c2.redMul(this.one.redAdd(this.d.redMul(Ae).redMul(Ce)));return 0===ze.cmp(qe)},Gr(tl,tp.BasePoint),Jd.prototype.pointFromJSON=function(ke){return tl.fromJSON(this,ke)},Jd.prototype.point=function(ke,Ae,Ce,ze){return new tl(this,ke,Ae,Ce,ze)},tl.fromJSON=function(ke,Ae){return new tl(ke,Ae[0],Ae[1],Ae[2])},tl.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)+">"},tl.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},tl.prototype._extDbl=function(){var ke=this.x.redSqr(),Ae=this.y.redSqr(),Ce=this.z.redSqr();Ce=Ce.redIAdd(Ce);var ze=this.curve._mulA(ke),qe=this.x.redAdd(this.y).redSqr().redISub(ke).redISub(Ae),Ve=ze.redAdd(Ae),tt=Ve.redSub(Ce),rt=ze.redSub(Ae),it=qe.redMul(tt),nt=Ve.redMul(rt),ot=qe.redMul(rt),ct=tt.redMul(Ve);return this.curve.point(it,nt,ct,ot)},tl.prototype._projDbl=function(){var ke,Ae,Ce,ze=this.x.redAdd(this.y).redSqr(),qe=this.x.redSqr(),Ve=this.y.redSqr();if(this.curve.twisted){var tt=(nt=this.curve._mulA(qe)).redAdd(Ve);if(this.zOne)ke=ze.redSub(qe).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=ze.redSub(qe).redISub(Ve).redMul(it),Ae=tt.redMul(nt.redSub(Ve)),Ce=tt.redMul(it)}}else{var nt=qe.redAdd(Ve);rt=this.curve._mulC(this.z).redSqr(),it=nt.redSub(rt).redSub(rt);ke=this.curve._mulC(ze.redISub(nt)).redMul(it),Ae=this.curve._mulC(nt).redMul(qe.redISub(Ve)),Ce=nt.redMul(it)}return this.curve.point(ke,Ae,Ce)},tl.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},tl.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)),ze=this.t.redMul(this.curve.dd).redMul(ke.t),qe=this.z.redMul(ke.z.redAdd(ke.z)),Ve=Ce.redSub(Ae),tt=qe.redSub(ze),rt=qe.redAdd(ze),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)},tl.prototype._projAdd=function(ke){var Ae,Ce,ze=this.z.redMul(ke.z),qe=ze.redSqr(),Ve=this.x.redMul(ke.x),tt=this.y.redMul(ke.y),rt=this.curve.d.redMul(Ve).redMul(tt),it=qe.redSub(rt),nt=qe.redAdd(rt),ot=this.x.redAdd(this.y).redMul(ke.x.redAdd(ke.y)).redISub(Ve).redISub(tt),ct=ze.redMul(it).redMul(ot);return this.curve.twisted?(Ae=ze.redMul(nt).redMul(tt.redSub(this.curve._mulA(Ve))),Ce=it.redMul(nt)):(Ae=ze.redMul(nt).redMul(tt.redSub(Ve)),Ce=this.curve._mulC(it).redMul(nt)),this.curve.point(ct,Ae,Ce)},tl.prototype.add=function(ke){return this.isInfinity()?ke:ke.isInfinity()?this:this.curve.extended?this._extAdd(ke):this._projAdd(ke)},tl.prototype.mul=function(ke){return this._hasDoubles(ke)?this.curve._fixedNafMul(this,ke):this.curve._wnafMul(this,ke)},tl.prototype.mulAdd=function(ke,Ae,Ce){return this.curve._wnafMulAdd(1,[this,Ae],[ke,Ce],2,!1)},tl.prototype.jmulAdd=function(ke,Ae,Ce){return this.curve._wnafMulAdd(1,[this,Ae],[ke,Ce],2,!0)},tl.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},tl.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},tl.prototype.getX=function(){return this.normalize(),this.x.fromRed()},tl.prototype.getY=function(){return this.normalize(),this.y.fromRed()},tl.prototype.eq=function(ke){return this===ke||0===this.getX().cmp(ke.getX())&&0===this.getY().cmp(ke.getY())},tl.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(),ze=this.curve.redN.redMul(this.z);;){if(Ce.iadd(this.curve.n),Ce.cmp(this.curve.p)>=0)return!1;if(Ae.redIAdd(ze),0===this.x.cmp(Ae))return!0}},tl.prototype.toP=tl.prototype.normalize,tl.prototype.mixedAdd=tl.prototype.add;var op=bt((function(ke,Ae){var Ce=Ae;Ce.base=tp,Ce.short=ip,Ce.mont=np,Ce.edwards=ap})),up=Vr.rotl32,hp=Vr.sum32,fp=Vr.sum32_5,lp=ti.ft_1,dp=Qr.BlockHash,pp=[1518500249,1859775393,2400959708,3395469782];function ul(){if(!(this instanceof ul))return new ul;dp.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}Vr.inherits(ul,dp);var yp=ul;ul.blockSize=512,ul.outSize=160,ul.hmacStrength=80,ul.padLength=64,ul.prototype._update=function(ke,Ae){for(var Ce=this.W,ze=0;ze<16;ze++)Ce[ze]=ke[Ae+ze];for(;ze<Ce.length;ze++)Ce[ze]=up(Ce[ze-3]^Ce[ze-8]^Ce[ze-14]^Ce[ze-16],1);var qe=this.h[0],Ve=this.h[1],tt=this.h[2],rt=this.h[3],it=this.h[4];for(ze=0;ze<Ce.length;ze++){var nt=~~(ze/20),ot=fp(up(qe,5),lp(nt,Ve,tt,rt),it,Ce[ze],pp[nt]);it=rt,rt=tt,tt=up(Ve,30),Ve=qe,qe=ot}this.h[0]=hp(this.h[0],qe),this.h[1]=hp(this.h[1],Ve),this.h[2]=hp(this.h[2],tt),this.h[3]=hp(this.h[3],rt),this.h[4]=hp(this.h[4],it)},ul.prototype._digest=function(ke){return"hex"===ke?Vr.toHex32(this.h,"big"):Vr.split32(this.h,"big")};var mp={sha1:yp,sha224:Si,sha256:bi,sha384:Zi,sha512:Vi};function dl(ke,Ae,Ce){if(!(this instanceof dl))return new dl(ke,Ae,Ce);this.Hash=ke,this.blockSize=ke.blockSize/8,this.outSize=ke.outSize/8,this.inner=null,this.outer=null,this._init(Vr.toArray(Ae,Ce))}var gp=dl;dl.prototype._init=function(ke){ke.length>this.blockSize&&(ke=(new this.Hash).update(ke).digest()),Ir(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)},dl.prototype.update=function(ke,Ae){return this.inner.update(ke,Ae),this},dl.prototype.digest=function(ke){return this.outer.update(this.inner.digest()),this.outer.digest(ke)};var bp=bt((function(ke,Ae){var Ce=Ae;Ce.utils=Vr,Ce.common=Qr,Ce.sha=mp,Ce.ripemd=mn,Ce.hmac=gp,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})),vp={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"]]}},wp=bt((function(ke,Ae){var Ce,ze=Ae,qe=Fd.assert;function a(ke){if("short"===ke.type)this.curve=new op.short(ke);else if("edwards"===ke.type)this.curve=new op.edwards(ke);else{if("mont"!==ke.type)throw Error("Unknown curve type.");this.curve=new op.mont(ke)}this.g=this.curve.g,this.n=this.curve.n,this.hash=ke.hash,qe(this.g.validate(),"Invalid curve"),qe(this.g.mul(this.n).isInfinity(),"Invalid curve, n*G != O")}function s(ke,Ae){Object.defineProperty(ze,ke,{configurable:!0,enumerable:!0,get:function(){var Ce=new a(Ae);return Object.defineProperty(ze,ke,{configurable:!0,enumerable:!0,value:Ce}),Ce}})}ze.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:bp.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:bp.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:bp.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:bp.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:bp.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:bp.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:bp.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:bp.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:bp.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:bp.sha512,gRed:!1,g:["81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822","7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892"]});try{Ce=vp}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:bp.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Ce]})}));function ml(ke){if(!(this instanceof ml))return new ml(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=jd.toArray(ke.entropy,ke.entropyEnc||"hex"),Ce=jd.toArray(ke.nonce,ke.nonceEnc||"hex"),ze=jd.toArray(ke.pers,ke.persEnc||"hex");Ir(Ae.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(Ae,Ce,ze)}var _p=ml;ml.prototype._init=function(ke,Ae,Ce){var ze=ke.concat(Ae).concat(Ce);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var qe=0;qe<this.V.length;qe++)this.K[qe]=0,this.V[qe]=1;this._update(ze),this._reseed=1,this.reseedInterval=281474976710656},ml.prototype._hmac=function(){return new bp.hmac(this.hash,this.K)},ml.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())},ml.prototype.reseed=function(ke,Ae,Ce,ze){"string"!=typeof Ae&&(ze=Ce,Ce=Ae,Ae=null),ke=jd.toArray(ke,Ae),Ce=jd.toArray(Ce,ze),Ir(ke.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(ke.concat(Ce||[])),this._reseed=1},ml.prototype.generate=function(ke,Ae,Ce,ze){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof Ae&&(ze=Ce,Ce=Ae,Ae=null),Ce&&(Ce=jd.toArray(Ce,ze||"hex"),this._update(Ce));for(var qe=[];qe.length<ke;)this.V=this._hmac().update(this.V).digest(),qe=qe.concat(this.V);var Ve=qe.slice(0,ke);return this._update(Ce),this._reseed++,jd.encode(Ve,Ae)};var kp=Fd.assert;function vl(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 Ap=vl;vl.fromPublic=function(ke,Ae,Ce){return Ae instanceof vl?Ae:new vl(ke,{pub:Ae,pubEnc:Ce})},vl.fromPrivate=function(ke,Ae,Ce){return Ae instanceof vl?Ae:new vl(ke,{priv:Ae,privEnc:Ce})},vl.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"}},vl.prototype.getPublic=function(ke,Ae){return this.pub||(this.pub=this.ec.g.mul(this.priv)),ke?this.pub.encode(ke,Ae):this.pub},vl.prototype.getPrivate=function(ke){return"hex"===ke?this.priv.toString(16,2):this.priv},vl.prototype._importPrivate=function(ke,Ae){if(this.priv=new Id(ke,Ae||16),"mont"===this.ec.curve.type){var Ce=this.ec.curve.one,ze=Ce.ushln(252).sub(Ce).ushln(3);this.priv=this.priv.or(Ce.ushln(254)),this.priv=this.priv.and(ze)}else this.priv=this.priv.umod(this.ec.curve.n)},vl.prototype._importPublic=function(ke,Ae){if(ke.x||ke.y)return"mont"===this.ec.curve.type?kp(ke.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||kp(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)},vl.prototype.derive=function(ke){return ke.mul(this.priv).getX()},vl.prototype.sign=function(ke,Ae,Ce){return this.ec.sign(ke,this,Ae,Ce)},vl.prototype.verify=function(ke,Ae){return this.ec.verify(ke,Ae,this)},vl.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Sp=Fd.assert;function Al(ke,Ae){if(ke instanceof Al)return ke;this._importDER(ke,Ae)||(Sp(ke.r&&ke.s,"Signature without r or s"),this.r=new Id(ke.r,16),this.s=new Id(ke.s,16),void 0===ke.recoveryParam?this.recoveryParam=null:this.recoveryParam=ke.recoveryParam)}var Ep=Al;function El(){this.place=0}function Pl(ke,Ae){var Ce=ke[Ae.place++];if(!(128&Ce))return Ce;for(var ze=15&Ce,qe=0,Ve=0,tt=Ae.place;Ve<ze;Ve++,tt++)qe<<=8,qe|=ke[tt];return Ae.place=tt,qe}function xl(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 Ml(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)}}Al.prototype._importDER=function(ke,Ae){ke=Fd.toArray(ke,Ae);var Ce=new El;if(48!==ke[Ce.place++])return!1;if(Pl(ke,Ce)+Ce.place!==ke.length)return!1;if(2!==ke[Ce.place++])return!1;var ze=Pl(ke,Ce),qe=ke.slice(Ce.place,ze+Ce.place);if(Ce.place+=ze,2!==ke[Ce.place++])return!1;var Ve=Pl(ke,Ce);if(ke.length!==Ve+Ce.place)return!1;var tt=ke.slice(Ce.place,Ve+Ce.place);return 0===qe[0]&&128&qe[1]&&(qe=qe.slice(1)),0===tt[0]&&128&tt[1]&&(tt=tt.slice(1)),this.r=new Id(qe),this.s=new Id(tt),this.recoveryParam=null,!0},Al.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=xl(Ae),Ce=xl(Ce);!(Ce[0]||128&Ce[1]);)Ce=Ce.slice(1);var ze=[2];Ml(ze,Ae.length),(ze=ze.concat(Ae)).push(2),Ml(ze,Ce.length);var qe=ze.concat(Ce),Ve=[48];return Ml(Ve,qe.length),Ve=Ve.concat(qe),Fd.encode(Ve,ke)};var Mp=Fd.assert;function Kl(ke){if(!(this instanceof Kl))return new Kl(ke);"string"==typeof ke&&(Mp(wp.hasOwnProperty(ke),"Unknown curve "+ke),ke=wp[ke]),ke instanceof wp.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 xp=Kl;Kl.prototype.keyPair=function(ke){return new Ap(this,ke)},Kl.prototype.keyFromPrivate=function(ke,Ae){return Ap.fromPrivate(this,ke,Ae)},Kl.prototype.keyFromPublic=function(ke,Ae){return Ap.fromPublic(this,ke,Ae)},Kl.prototype.genKeyPair=function(ke){ke||(ke={});var Ae=new _p({hash:this.hash,pers:ke.pers,persEnc:ke.persEnc||"utf8",entropy:ke.entropy||Ud(this.hash.hmacStrength),entropyEnc:ke.entropy&&ke.entropyEnc||"utf8",nonce:this.n.toArray()});if("mont"===this.curve.type){var Ce=new Id(Ae.generate(32));return this.keyFromPrivate(Ce)}for(var ze=this.n.byteLength(),qe=this.n.sub(new Id(2));;){if(!((Ce=new Id(Ae.generate(ze))).cmp(qe)>0))return Ce.iaddn(1),this.keyFromPrivate(Ce)}},Kl.prototype._truncateToN=function(ke,Ae,Ce){var ze=(Ce=Ce||8*ke.byteLength())-this.n.bitLength();return ze>0&&(ke=ke.ushrn(ze)),!Ae&&ke.cmp(this.n)>=0?ke.sub(this.n):ke},Kl.prototype.truncateMsg=function(ke){var Ae;return ke instanceof Uint8Array?(Ae=8*ke.byteLength,ke=this._truncateToN(new Id(ke,16),!1,Ae)):"string"==typeof ke?(Ae=4*ke.length,ke=this._truncateToN(new Id(ke,16),!1,Ae)):ke=this._truncateToN(new Id(ke,16)),ke},Kl.prototype.sign=function(ke,Ae,Ce,ze){"object"==typeof Ce&&(ze=Ce,Ce=null),ze||(ze={}),Ae=this.keyFromPrivate(Ae,Ce),ke=this.truncateMsg(ke);for(var qe=this.n.byteLength(),Ve=Ae.getPrivate().toArray("be",qe),tt=ke.toArray("be",qe),rt=new _p({hash:this.hash,entropy:Ve,nonce:tt,pers:ze.pers,persEnc:ze.persEnc||"utf8"}),it=this.n.sub(new Id(1)),nt=0;;nt++){var ot=ze.k?ze.k(nt):new Id(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 ze.canonical&&yt.cmp(this.nh)>0&&(yt=this.n.sub(yt),mt^=1),new Ep({r:ft,s:yt,recoveryParam:mt})}}}}}},Kl.prototype.verify=function(ke,Ae,Ce,ze){return Ce=this.keyFromPublic(Ce,ze),Ae=new Ep(Ae,"hex"),this._verify(this.truncateMsg(ke),Ae,Ce)||this._verify(this._truncateToN(new Id(ke,16)),Ae,Ce)},Kl.prototype._verify=function(ke,Ae,Ce){var ze=Ae.r,qe=Ae.s;if(ze.cmpn(1)<0||ze.cmp(this.n)>=0)return!1;if(qe.cmpn(1)<0||qe.cmp(this.n)>=0)return!1;var Ve,tt=qe.invm(this.n),rt=tt.mul(ke).umod(this.n),it=tt.mul(ze).umod(this.n);return this.curve._maxwellTrick?!(Ve=this.g.jmulAdd(rt,Ce.getPublic(),it)).isInfinity()&&Ve.eqXToP(ze):!(Ve=this.g.mulAdd(rt,Ce.getPublic(),it)).isInfinity()&&0===Ve.getX().umod(this.n).cmp(ze)},Kl.prototype.recoverPubKey=function(ke,Ae,Ce,ze){Mp((3&Ce)===Ce,"The recovery param is more than two bits"),Ae=new Ep(Ae,ze);var qe=this.n,Ve=new Id(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(qe),ct=qe.sub(Ve).mul(ot).umod(qe),ht=rt.mul(ot).umod(qe);return this.g.mulAdd(ct,tt,ht)},Kl.prototype.getKeyRecoveryParam=function(ke,Ae,Ce,ze){if(null!==(Ae=new Ep(Ae,ze)).recoveryParam)return Ae.recoveryParam;for(var qe=0;qe<4;qe++){var Ve;try{Ve=this.recoverPubKey(ke,Ae,qe)}catch(ke){continue}if(Ve.eq(Ce))return qe}throw Error("Unable to find valid recovery factor")};var Pp=Fd.assert,Cp=Fd.parseBytes,Bp=Fd.cachedProperty;function Bl(ke,Ae){if(this.eddsa=ke,Ae.hasOwnProperty("secret")&&(this._secret=Cp(Ae.secret)),ke.isPoint(Ae.pub))this._pub=Ae.pub;else if(this._pubBytes=Cp(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")}Bl.fromPublic=function(ke,Ae){return Ae instanceof Bl?Ae:new Bl(ke,{pub:Ae})},Bl.fromSecret=function(ke,Ae){return Ae instanceof Bl?Ae:new Bl(ke,{secret:Ae})},Bl.prototype.secret=function(){return this._secret},Bp(Bl,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Bp(Bl,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Bp(Bl,"privBytes",(function(){var ke=this.eddsa,Ae=this.hash(),Ce=ke.encodingLength-1,ze=Ae.slice(0,ke.encodingLength);return ze[0]&=248,ze[Ce]&=127,ze[Ce]|=64,ze})),Bp(Bl,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Bp(Bl,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Bp(Bl,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Bl.prototype.sign=function(ke){return Pp(this._secret,"KeyPair can only verify"),this.eddsa.sign(ke,this)},Bl.prototype.verify=function(ke,Ae){return this.eddsa.verify(ke,Ae,this)},Bl.prototype.getSecret=function(ke){return Pp(this._secret,"KeyPair is public only"),Fd.encode(this.secret(),ke)},Bl.prototype.getPublic=function(ke,Ae){return Fd.encode((Ae?[64]:[]).concat(this.pubBytes()),ke)};var Dp=Bl,Rp=Fd.assert,Tp=Fd.cachedProperty,Kp=Fd.parseBytes;function Fl(ke,Ae){this.eddsa=ke,"object"!=typeof Ae&&(Ae=Kp(Ae)),Array.isArray(Ae)&&(Ae={R:Ae.slice(0,ke.encodingLength),S:Ae.slice(ke.encodingLength)}),Rp(Ae.R&&Ae.S,"Signature without R or S"),ke.isPoint(Ae.R)&&(this._R=Ae.R),Ae.S instanceof Id&&(this._S=Ae.S),this._Rencoded=Array.isArray(Ae.R)?Ae.R:Ae.Rencoded,this._Sencoded=Array.isArray(Ae.S)?Ae.S:Ae.Sencoded}Tp(Fl,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Tp(Fl,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Tp(Fl,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Tp(Fl,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Fl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Fl.prototype.toHex=function(){return Fd.encode(this.toBytes(),"hex").toUpperCase()};var Ip=Fl,Up=Fd.assert,Op=Fd.parseBytes;function Wl(ke){if(Up("ed25519"===ke,"only tested with ed25519 so far"),!(this instanceof Wl))return new Wl(ke);ke=wp[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=bp.sha512}var Np=Wl;Wl.prototype.sign=function(ke,Ae){ke=Op(ke);var Ce=this.keyFromSecret(Ae),ze=this.hashInt(Ce.messagePrefix(),ke),qe=this.g.mul(ze),Ve=this.encodePoint(qe),tt=this.hashInt(Ve,Ce.pubBytes(),ke).mul(Ce.priv()),rt=ze.add(tt).umod(this.curve.n);return this.makeSignature({R:qe,S:rt,Rencoded:Ve})},Wl.prototype.verify=function(ke,Ae,Ce){ke=Op(ke),Ae=this.makeSignature(Ae);var ze=this.keyFromPublic(Ce),qe=this.hashInt(Ae.Rencoded(),ze.pubBytes(),ke),Ve=this.g.mul(Ae.S());return Ae.R().add(ze.pub().mul(qe)).eq(Ve)},Wl.prototype.hashInt=function(){for(var ke=this.hash(),Ae=0;Ae<arguments.length;Ae++)ke.update(arguments[Ae]);return Fd.intFromLE(ke.digest()).umod(this.curve.n)},Wl.prototype.keyPair=function(ke){return new Dp(this,ke)},Wl.prototype.keyFromPublic=function(ke){return Dp.fromPublic(this,ke)},Wl.prototype.keyFromSecret=function(ke){return Dp.fromSecret(this,ke)},Wl.prototype.genKeyPair=function(ke){ke||(ke={});var Ae=new _p({hash:this.hash,pers:ke.pers,persEnc:ke.persEnc||"utf8",entropy:ke.entropy||Ud(this.hash.hmacStrength),entropyEnc:ke.entropy&&ke.entropyEnc||"utf8",nonce:this.curve.n.toArray()});return this.keyFromSecret(Ae.generate(32))},Wl.prototype.makeSignature=function(ke){return ke instanceof Ip?ke:new Ip(this,ke)},Wl.prototype.encodePoint=function(ke){var Ae=ke.getY().toArray("le",this.encodingLength);return Ae[this.encodingLength-1]|=ke.getX().isOdd()?128:0,Ae},Wl.prototype.decodePoint=function(ke){var Ae=(ke=Fd.parseBytes(ke)).length-1,Ce=ke.slice(0,Ae).concat(-129&ke[Ae]),ze=0!=(128&ke[Ae]),qe=Fd.intFromLE(Ce);return this.curve.pointFromY(qe,ze)},Wl.prototype.encodeInt=function(ke){return ke.toArray("le",this.encodingLength)},Wl.prototype.decodeInt=function(ke){return Fd.intFromLE(ke)},Wl.prototype.isPoint=function(ke){return ke instanceof this.pointClass};var zp=bt((function(ke,Ae){var Ce=Ae;Ce.utils=Fd,Ce.rand=Ud,Ce.curve=op,Ce.curves=wp,Ce.ec=xp,Ce.eddsa=Np})),qp=Object.freeze({__proto__:null,default:zp,__moduleExports:zp});Ae.AEADEncryptedDataPacket=vo,Ae.CleartextMessage=pc,Ae.CompressedDataPacket=co,Ae.LiteralDataPacket=Hs,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=hc,Ae.OnePassSignaturePacket=no,Ae.PacketList=so,Ae.PrivateKey=nc,Ae.PublicKey=ic,Ae.PublicKeyEncryptedSessionKeyPacket=_o,Ae.PublicKeyPacket=So,Ae.PublicSubkeyPacket=xo,Ae.SecretKeyPacket=Co,Ae.SecretSubkeyPacket=Io,Ae.Signature=Bo,Ae.SignaturePacket=ro,Ae.Subkey=Jo,Ae.SymEncryptedIntegrityProtectedDataPacket=go,Ae.SymEncryptedSessionKeyPacket=Ao,Ae.SymmetricallyEncryptedDataPacket=Po,Ae.TrustPacket=class{static get tag(){return er.packet.trust}read(){throw new Js("Trust packets are not supported")}write(){throw new Js("Trust packets are not supported")}},Ae.UserAttributePacket=Mo,Ae.UserIDPacket=Ro,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 pc(ke)},Ae.createMessage=async function({text:ke,binary:Ae,filename:Ce,date:ze=new Date,format:qe=(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 Hs(ze);void 0!==ke?nt.setText(tt,er.write(er.literal,qe)):nt.setBytes(tt,er.write(er.literal,qe)),void 0!==Ce&&nt.setFilename(Ce);const ot=new so;ot.push(nt);const ct=new hc(ot);return ct.fromStream=it,ct},Ae.decrypt=async function({message:ke,decryptionKeys:Ae,passwords:Ce,sessionKeys:ze,verificationKeys:qe,expectSigned:Ve=!1,format:tt="utf8",signature:rt=null,date:it=new Date,config:nt,...ot}){if(wc(nt={...tr,...nt}),yc(ke),qe=vc(qe),Ae=vc(Ae),Ce=vc(Ce),ze=vc(ze),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,ze,it,nt);qe||(qe=[]);const ct={};if(ct.signatures=rt?await ot.verifyDetached(rt,qe,it,nt):await ot.verify(qe,it,nt),ct.data="binary"===tt?ot.getLiteralData():ot.getText(),ct.filename=ot.getFilename(),kc(ct,ke),Ve){if(0===qe.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 _c(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,...ze}){wc(Ce={...tr,...Ce});const qe=Object.keys(ze);if(qe.length>0)throw Error("Unknown option: "+qe.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:ze=new Date,config:qe,...Ve}){if(wc(qe={...tr,...qe}),yc(ke),Ae=vc(Ae),Ce=vc(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,ze,qe)}catch(ke){throw Zt.wrapError("Error decrypting session keys",ke)}},Ae.encrypt=async function({message:ke,encryptionKeys:Ae,signingKeys:Ce,passwords:ze,sessionKey:qe,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(wc(ft={...tr,...ft}),yc(ke),mc(Ve),Ae=vc(Ae),Ce=vc(Ce),ze=vc(ze),it=vc(it),nt=vc(nt),ct=vc(ct),ht=vc(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 jo("compression",Ae,ot,ht,ft),ft),ke=await ke.encrypt(Ae,ze,qe,rt,nt,ot,ht,ft),"object"===Ve)return ke;const yt="armored"===Ve;return _c(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,...ze}){wc(Ce={...tr,...Ce});const qe=Object.keys(ze);if(qe.length>0)throw Error("Unknown option: "+qe.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:ze}=ke;await ze.encrypt(rt[Ae],Ce),ze.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:ze,passwords:qe,format:Ve="armored",wildcard:tt=!1,encryptionKeyIDs:rt=[],date:it=new Date,encryptionUserIDs:nt=[],config:ot,...ct}){if(wc(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"),mc(Ve),ze=vc(ze),qe=vc(qe),rt=vc(rt),nt=vc(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(", "));try{return Ac(await hc.encryptSessionKey(ke,Ae,Ce,ze,qe,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:ze=4096,curve:qe="curve25519",keyExpirationTime:Ve=0,date:tt=new Date,subkeys:rt=[{}],format:it="armored",config:nt,...ot}){wc(nt={...tr,...nt}),ke=vc(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&&ze<nt.minRSABits)throw Error(`rsaBits should be at least ${nt.minRSABits}, got: ${ze}`);const ht={userIDs:ke,passphrase:Ae,type:Ce,rsaBits:ze,curve:qe,keyExpirationTime:Ve,date:tt,subkeys:rt};try{const{key:ke,revocationCertificate:Ae}=await async function(ke,Ae){ke.sign=!0,(ke=Vo(ke)).subkeys=ke.subkeys.map(((Ae,Ce)=>Vo(ke.subkeys[Ce],ke)));let Ce=[zo(ke,Ae)];Ce=Ce.concat(ke.subkeys.map((ke=>To(ke,Ae))));const ze=await Promise.all(Ce),qe=await sc(ze[0],ze.slice(1),ke,Ae),Ve=await qe.getRevocationCertificate(ke.date,Ae);return qe.revocationSignatures=[],{key:qe,revocationCertificate:Ve}}(ht,nt);return ke.getKeys().forEach((({keyPacket:ke})=>Xo(ke,nt))),{privateKey:Ac(ke,it,nt),publicKey:Ac(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:ze,...qe}){if(wc(ze={...tr,...ze}),ke=vc(ke),Ce=vc(Ce),qe.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.generateSessionKey, pass `encryptionKeys` instead");const Ve=Object.keys(qe);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));try{return await hc.generateSessionKey(ke,Ae,Ce,ze)}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 ze=Object.keys(Ce);if(ze.length>0)throw Error("Unknown option: "+ze.join(", "));const qe=await Pe(ke);if(qe.type!==er.armor.signed)throw Error("No cleartext signed message.");const Ve=await so.fromBinary(qe.data,Ul,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,ze=[];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)}})),ze=ze.concat(Ce)})),!ze.length&&!r([er.hash.md5]))throw Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(ze.length&&!r(ze))throw Error("Hash algorithm mismatch in armor header and signature")}(qe.headers,Ve);const tt=new Bo(Ve);return new pc(qe.text,tt)},Ae.readKey=async function({armoredKey:ke,binaryKey:Ae,config:Ce,...ze}){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 qe=Object.keys(ze);if(qe.length>0)throw Error("Unknown option: "+qe.join(", "));let Ve;if(ke){const{type:Ae,data:ze}=await Pe(ke,Ce);if(Ae!==er.armor.publicKey&&Ae!==er.armor.privateKey)throw Error("Armored text not of type key");Ve=ze}else Ve=Ae;return rc(await so.fromBinary(Ve,Dl,Ce))},Ae.readKeys=async function({armoredKeys:ke,binaryKeys:Ae,config:Ce,...ze}){Ce={...tr,...Ce};let qe=ke||Ae;if(!qe)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(ze);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));if(ke){const{type:Ae,data:ze}=await Pe(ke,Ce);if(Ae!==er.armor.publicKey&&Ae!==er.armor.privateKey)throw Error("Armored text not of type key");qe=ze}const tt=[],rt=await so.fromBinary(qe,Dl,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=rc(rt.slice(it[ke],it[ke+1]));tt.push(Ae)}return tt},Ae.readMessage=async function({armoredMessage:ke,binaryMessage:Ae,config:Ce,...ze}){Ce={...tr,...Ce};let qe=ke||Ae;if(!qe)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(ze);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));const tt=Zt.isStream(qe);if(tt&&(await F(),qe=j(qe)),ke){const{type:ke,data:Ae}=await Pe(qe,Ce);if(ke!==er.armor.message)throw Error("Armored text not of type message");qe=Ae}const rt=await so.fromBinary(qe,Rl,Ce),it=new hc(rt);return it.fromStream=tt,it},Ae.readPrivateKey=async function({armoredKey:ke,binaryKey:Ae,config:Ce,...ze}){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 qe=Object.keys(ze);if(qe.length>0)throw Error("Unknown option: "+qe.join(", "));let Ve;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");Ve=ze}else Ve=Ae;const tt=await so.fromBinary(Ve,Dl,Ce);return new nc(tt)},Ae.readPrivateKeys=async function({armoredKeys:ke,binaryKeys:Ae,config:Ce}){Ce={...tr,...Ce};let ze=ke||Ae;if(!ze)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:qe}=await Pe(ke,Ce);if(Ae!==er.armor.privateKey)throw Error("Armored text not of type private key");ze=qe}const qe=[],Ve=await so.fromBinary(ze,Dl,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 nc(Ae);qe.push(Ce)}return qe},Ae.readSignature=async function({armoredSignature:ke,binarySignature:Ae,config:Ce,...ze}){Ce={...tr,...Ce};let qe=ke||Ae;if(!qe)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(ze);if(Ve.length>0)throw Error("Unknown option: "+Ve.join(", "));if(ke){const{type:ke,data:Ae}=await Pe(qe,Ce);if(ke!==er.armor.signature)throw Error("Armored text not of type signature");qe=Ae}const tt=await so.fromBinary(qe,Sl,Ce);return new Bo(tt)},Ae.reformatKey=async function({privateKey:ke,userIDs:Ae=[],passphrase:Ce="",keyExpirationTime:ze=0,date:qe,format:Ve="armored",config:tt,...rt}){wc(tt={...tr,...tt}),Ae=vc(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:ze,date:qe};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 ze=Ce.keyPacket;ke.subkeys||(ke.subkeys=await Promise.all(Ce.subkeys.map((async ke=>{const Ce=ke.keyPacket,qe={key:ze,bind:Ce},Ve=await qo(ke.bindingSignatures,ze,er.signature.subkeyBinding,qe,null,Ae).catch((()=>({})));return{sign:Ve.keyFlags&&Ve.keyFlags[0]&er.keyFlags.signData}}))));const qe=Ce.subkeys.map((ke=>ke.keyPacket));if(ke.subkeys.length!==qe.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 sc(ze,qe,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:Ac(ke,Ve,tt),publicKey:Ac(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:ze=new Date,format:qe="armored",config:Ve,...tt}){wc(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,ze,Ve):await ke.revoke(Ce,ze,Ve);return tt.isPrivate()?{privateKey:Ac(tt,qe,Ve),publicKey:Ac(tt.toPublic(),qe,Ve)}:{privateKey:null,publicKey:Ac(tt,qe,Ve)}}catch(ke){throw Zt.wrapError("Error revoking key",ke)}},Ae.sign=async function({message:ke,signingKeys:Ae,format:Ce="armored",detached:ze=!1,signingKeyIDs:qe=[],date:Ve=new Date,signingUserIDs:tt=[],config:rt,...it}){if(wc(rt={...tr,...rt}),bc(ke),mc(Ce),Ae=vc(Ae),qe=vc(qe),tt=vc(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 pc&&"binary"===Ce)throw Error("Cannot return signed cleartext message in binary format");if(ke instanceof pc&&ze)throw Error("Cannot detach-sign a cleartext message");if(!Ae||0===Ae.length)throw Error("No signing keys provided");try{let it;if(it=ze?await ke.signDetached(Ae,void 0,qe,Ve,tt,rt):await ke.sign(Ae,void 0,qe,Ve,tt,rt),"object"===Ce)return it;const nt="armored"===Ce;return it=nt?it.armor(rt):it.write(),ze&&(it=X(ke.packets.write(),(async(ke,Ae)=>{await Promise.all([V(it,Ae),ie(ke).catch((()=>{}))])}))),_c(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:ze="utf8",signature:qe=null,date:Ve=new Date,config:tt,...rt}){if(wc(tt={...tr,...tt}),bc(ke),Ae=vc(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 pc&&"binary"===ze)throw Error("Can't return cleartext message data as binary");if(ke instanceof pc&&qe)throw Error("Can't verify detached cleartext signature");try{const rt={};if(rt.signatures=qe?await ke.verifyDetached(qe,Ae,Ve,tt):await ke.verify(Ae,Ve,tt),rt.data="binary"===ze?ke.getLiteralData():ke.getText(),ke.fromStream&&kc(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 _c(rt.data,ke.fromStream,ze),rt}catch(ke){throw Zt.wrapError("Error verifying signed message",ke)}}},5118:(ke,Ae,Ce)=>{"use strict";var ze=Ce(4300);var qe=ze.Buffer;var Ve={};var tt;for(tt in ze){if(!ze.hasOwnProperty(tt))continue;if(tt==="SlowBuffer"||tt==="Buffer")continue;Ve[tt]=ze[tt]}var rt=Ve.Buffer={};for(tt in qe){if(!qe.hasOwnProperty(tt))continue;if(tt==="allocUnsafe"||tt==="allocUnsafeSlow")continue;rt[tt]=qe[tt]}Ve.Buffer.prototype=qe.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 qe(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 ze=qe(ke);if(!Ae||Ae.length===0){ze.fill(0)}else if(typeof Ce==="string"){ze.fill(Ae,Ce)}else{ze.fill(Ae)}return ze}}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 ze=Ce(1808);var qe=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,ze,qe){var Ve=toOptions(Ce,ze,qe);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,ze){var qe=this;var Ve=mergeOptions({request:ke},qe.options,toOptions(Ae,Ce,ze));if(qe.sockets.length>=this.maxSockets){qe.requests.push(Ve);return}qe.createSocket(Ve,(function(Ae){Ae.on("free",onFree);Ae.on("close",onCloseOrRemove);Ae.on("agentRemove",onCloseOrRemove);ke.onSocket(Ae);function onFree(){qe.emit("free",Ae,Ve)}function onCloseOrRemove(ke){qe.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 ze={};Ce.sockets.push(ze);var qe=mergeOptions({},Ce.proxyOptions,{method:"CONNECT",path:ke.host+":"+ke.port,agent:false,headers:{host:ke.host+":"+ke.port}});if(ke.localAddress){qe.localAddress=ke.localAddress}if(qe.proxyAuth){qe.headers=qe.headers||{};qe.headers["Proxy-Authorization"]="Basic "+new Buffer(qe.proxyAuth).toString("base64")}ot("making CONNECT request");var Ve=Ce.request(qe);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(qe,tt,rt){Ve.removeAllListeners();tt.removeAllListeners();if(qe.statusCode!==200){ot("tunneling socket could not be established, statusCode=%d",qe.statusCode);tt.destroy();var it=new Error("tunneling socket could not be established, "+"statusCode="+qe.statusCode);it.code="ECONNRESET";ke.request.emit("error",it);Ce.removeSocket(ze);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(ze);return}ot("tunneling connection has established");Ce.sockets[Ce.sockets.indexOf(ze)]=tt;return Ae(tt)}function onError(Ae){Ve.removeAllListeners();ot("tunneling socket could not be established, cause=%s\n",Ae.message,Ae.stack);var qe=new Error("tunneling socket could not be established, "+"cause="+Ae.message);qe.code="ECONNRESET";ke.request.emit("error",qe);Ce.removeSocket(ze)}};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(ze){var Ve=ke.request.getHeader("host");var tt=mergeOptions({},Ce.options,{socket:ze,servername:Ve?Ve.replace(/:.*$/,""):ke.host});var rt=qe.connect(0,tt);Ce.sockets[Ce.sockets.indexOf(ze)]=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 ze=arguments[Ae];if(typeof ze==="object"){var qe=Object.keys(ze);for(var Ve=0,tt=qe.length;Ve<tt;++Ve){var rt=qe[Ve];if(ze[rt]!==undefined){ke[rt]=ze[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},8954:function(ke,Ae,Ce){"use strict";var ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;var qe=Object.getOwnPropertyDescriptor(Ae,Ce);if(!qe||("get"in qe?!Ae.__esModule:qe.writable||qe.configurable)){qe={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,ze,qe)}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.apply(ke,Ae||[])).next())}))};Object.defineProperty(Ae,"__esModule",{value:true});Ae.setOutput=Ae.getInputs=void 0;const rt=Ve(Ce(2186));const it=Ce(7351);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;function setOutput(ke,Ae){(0,it.issueCommand)("set-output",{name:ke},Ae)}Ae.setOutput=setOutput},6350:function(ke,Ae,Ce){"use strict";var ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;var qe=Object.getOwnPropertyDescriptor(Ae,Ce);if(!qe||("get"in qe?!Ae.__esModule:qe.writable||qe.configurable)){qe={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,ze,qe)}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze=["config"];if(Ce){ze.push("--global")}ze.push(ke,Ae);yield git(ze)}))}Ae.setConfig=setConfig},3759:function(ke,Ae,Ce){"use strict";var ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;var qe=Object.getOwnPropertyDescriptor(Ae,Ce);if(!qe||("get"in qe?!Ae.__esModule:qe.writable||qe.configurable)){qe={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,ze,qe)}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze of ke.stdout.replace(/\r/g,"").trim().split(/\n/g)){if(ze.startsWith("gpg (GnuPG) ")){Ae=ze.substr("gpg (GnuPG) ".length).trim()}else if(ze.startsWith("gpg (GnuPG/MacGPG2) ")){Ae=ze.substr("gpg (GnuPG/MacGPG2) ".length).trim()}else if(ze.startsWith("libgcrypt ")){Ce=ze.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 ze="";let qe="";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:")){ze=Ve.substr("datadir:".length).replace("%3a",":").trim()}else if(Ve.startsWith("homedir:")){qe=Ve.substr("homedir:".length).replace("%3a",":").trim()}}return{libdir:Ae,libexecdir:Ce,datadir:ze,homedir:qe}}))}));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 ze=false;const qe=ke.replace(/\r/g,"").trim().split(/\n/g);for(const ke of qe){if(ke.startsWith(`fpr:`)&&ke.includes(`:${Ae}:`)){ze=true;continue}if(ke.startsWith("grp:")&&ze){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 ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;var qe=Object.getOwnPropertyDescriptor(Ae,Ce);if(!qe||("get"in qe?!Ae.__esModule:qe.writable||qe.configurable)){qe={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,ze,qe)}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze=yield ct.readPrivateKey(ke.gpgPrivateKey);yield rt.group(`GPG private key info`,(()=>tt(this,void 0,void 0,(function*(){rt.info(`Fingerprint : ${ze.fingerprint}`);rt.info(`KeyID : ${ze.keyID}`);rt.info(`Name : ${ze.name}`);rt.info(`Email : ${ze.email}`);rt.info(`CreationTime : ${ze.creationTime}`)}))));ht.setFingerprint(ze.fingerprint);let qe=ze.fingerprint;if(ke.fingerprint){qe=ke.fingerprint}yield rt.group(`Fingerprint to use`,(()=>tt(this,void 0,void 0,(function*(){rt.info(qe)}))));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(qe)){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(qe);rt.info(`Presetting passphrase for key ${qe} 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=${qe}`);it.setOutput("fingerprint",qe);rt.info(`keyid=${ze.keyID}`);it.setOutput("keyid",ze.keyID);rt.info(`name=${ze.name}`);it.setOutput("name",ze.name);rt.info(`email=${ze.email}`);it.setOutput("email",ze.email)}))));if(ke.gitUserSigningkey){rt.info("Setting GPG signing keyID for this Git repository");yield nt.setConfig("user.signingkey",ze.keyID,ke.gitConfigGlobal);const Ae=ke.gitCommitterEmail||ze.email;const Ce=ke.gitCommitterName||ze.name;if(Ae!=ze.email){rt.setFailed(`Committer email "${ke.gitCommitterEmail}" (name: "${ke.gitCommitterName}") does not match GPG private key email "${ze.email}" (name: "${ze.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 ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;var qe=Object.getOwnPropertyDescriptor(Ae,Ce);if(!qe||("get"in qe?!Ae.__esModule:qe.writable||qe.configurable)){qe={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,ze,qe)}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(Ae,ke);return Ae};var tt=this&&this.__awaiter||function(ke,Ae,Ce,ze){function adopt(ke){return ke instanceof Ce?ke:new Ce((function(Ae){Ae(ke)}))}return new(Ce||(Ce=Promise))((function(Ce,qe){function fulfilled(ke){try{step(ze.next(ke))}catch(ke){qe(ke)}}function rejected(ke){try{step(ze["throw"](ke))}catch(ke){qe(ke)}}function step(ke){ke.done?Ce(ke.value):adopt(ke.value).then(fulfilled,rejected)}step((ze=ze.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 ze=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:ze.name,email:ze.address,creationTime:Ce.getCreationTime()}}));Ae.readPrivateKey=readPrivateKey;const generateKeyPair=(ke,Ae,Ce,ze)=>tt(void 0,void 0,void 0,(function*(){const qe=yield it.generateKey({userIDs:[{name:ke,email:Ae}],passphrase:Ce,type:ze});return{publicKey:qe.publicKey.replace(/\r\n/g,"\n").trim(),privateKey:qe.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 ze=this&&this.__createBinding||(Object.create?function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;var qe=Object.getOwnPropertyDescriptor(Ae,Ce);if(!qe||("get"in qe?!Ae.__esModule:qe.writable||qe.configurable)){qe={enumerable:true,get:function(){return Ae[Ce]}}}Object.defineProperty(ke,ze,qe)}:function(ke,Ae,Ce,ze){if(ze===undefined)ze=Ce;ke[ze]=Ae[Ce]});var qe=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))ze(Ae,ke,Ce);qe(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 ze=Ae[Ce];if(ze!==undefined){return ze.exports}var qe=Ae[Ce]={id:Ce,loaded:false,exports:{}};var Ve=true;try{ke[Ce].call(qe.exports,qe,qe.exports,__nccwpck_require__);Ve=false}finally{if(Ve)delete Ae[Ce]}qe.loaded=true;return qe.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
|