require('./sourcemap-register.js');(()=>{var e={7351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=o(r(2037));const c=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const a="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return c.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return c.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const c=r(7351);const a=r(717);const u=r(5278);const l=o(r(2037));const f=o(r(1017));const d=r(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=u.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${l.EOL}${r}${l.EOL}${t}`;a.issueCommand("ENV",n)}else{c.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){c.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){a.issueCommand("PATH",e)}else{c.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${f.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(l.EOL);c.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){c.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){c.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){c.issueCommand("error",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){c.issueCommand("warning",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){c.issueCommand("notice",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){c.issue("group",e)}t.startGroup=startGroup;function endGroup(){c.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return s(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){c.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},717:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const s=o(r(7147));const c=o(r(2037));const a=r(5278);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!s.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}s.appendFileSync(r,`${a.toCommandValue(t)}${c.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},8041:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=r(9925);const o=r(3702);const s=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}s.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);s.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},1514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const c=r(1576);const a=o(r(8159));function exec(e,t,r){return s(this,void 0,void 0,(function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const o=new a.ToolRunner(i,t,r);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,i;return s(this,void 0,void 0,(function*(){let o="";let s="";const a=new c.StringDecoder("utf8");const u=new c.StringDecoder("utf8");const l=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const f=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stderr;const stdErrListener=e=>{s+=u.write(e);if(f){f(e)}};const stdOutListener=e=>{o+=a.write(e);if(l){l(e)}};const d=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:d}));o+=a.end();s+=u.end();return{exitCode:p,stdout:o,stderr:s}}))}t.getExecOutput=getExecOutput},8159:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const c=o(r(2037));const a=o(r(2361));const u=o(r(2081));const l=o(r(1017));const f=o(r(7436));const d=o(r(1962));const p=r(9512);const h=process.platform==="win32";class ToolRunner extends a.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(h){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(c.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+c.EOL.length);i=n.indexOf(c.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(h){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(h){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some((e=>e===n))){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return s(this,void 0,void 0,(function*(){if(!d.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.which(this.toolPath,true);return new Promise(((e,t)=>s(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+c.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield d.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const o=u.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));let s="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let a="";if(o.stderr){o.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}a=this._processLineBuffer(e,a,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));o.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));o.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((r,n)=>{if(s.length>0){this.emit("stdline",s)}if(a.length>0){this.emit("errline",a)}o.removeAllListeners();if(r){t(r)}else{e(n)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(s)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends a.EventEmitter{constructor(e,t){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(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=p.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=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){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=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",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},3702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(3685);const i=r(5687);const o=r(6443);let s;var c;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(c=t.HttpCodes||(t.HttpCodes={}));var a;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(a=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=o.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const l=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const f=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const d=["OPTIONS","GET","DELETE","HEAD"];const p=10;const h=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){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=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[a.Accept]=this._getExistingOrDefaultHeader(t,a.Accept,u.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[a.Accept]=this._getExistingOrDefaultHeader(r,a.Accept,u.ApplicationJson);r[a.ContentType]=this._getExistingOrDefaultHeader(r,a.ContentType,u.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[a.Accept]=this._getExistingOrDefaultHeader(r,a.Accept,u.ApplicationJson);r[a.ContentType]=this._getExistingOrDefaultHeader(r,a.ContentType,u.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[a.Accept]=this._getExistingOrDefaultHeader(r,a.Accept,u.ApplicationJson);r[a.ContentType]=this._getExistingOrDefaultHeader(r,a.ContentType,u.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(t);let o=this._prepareRequest(e,i,n);let s=this._allowRetries&&d.indexOf(e)!=-1?this._maxRetries+1:1;let a=0;let u;while(a0){const s=u.message.headers["location"];if(!s){break}let c=new URL(s);if(i.protocol=="https:"&&i.protocol!=c.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 u.readBody();if(c.hostname!==i.hostname){for(let e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}o=this._prepareRequest(e,c,n);u=await this.requestRaw(o,r);t--}if(f.indexOf(u.message.statusCode)==-1){return u}a+=1;if(a{let callbackForResult=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let handleResult=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));o.on("socket",(e=>{n=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));o.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){o.end()}));t.pipe(o)}else{o.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const o={};o.parsedUrl=t;const s=o.parsedUrl.protocol==="https:";o.httpModule=s?i:n;const c=s?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):c;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(o.options)}))}return o}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;let c=o.getProxyUrl(e);let a=c&&c.hostname;if(this._keepAlive&&a){t=this._proxyAgent}if(this._keepAlive&&!a){t=this._agent}if(!!t){return t}const u=e.protocol==="https:";let l=100;if(!!this.requestOptions){l=this.requestOptions.maxSockets||n.globalAgent.maxSockets}if(a){if(!s){s=r(4294)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{...(c.username||c.password)&&{proxyAuth:`${c.username}:${c.password}`},host:c.hostname,port:c.port}};let n;const i=c.protocol==="https:";if(u){n=i?s.httpsOverHttps:s.httpsOverHttp}else{n=i?s.httpOverHttps:s.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:l};t=u?new i.Agent(e):new n.Agent(e);this._agent=t}if(!t){t=u?i.globalAgent:n.globalAgent}if(u&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(p,e);const t=h*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(r,n)=>{const i=e.message.statusCode;const o={statusCode:i,result:null,headers:{}};if(i==c.NotFound){r(o)}let s;let a;try{a=await e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){s=JSON.parse(a,HttpClient.dateTimeDeserializer)}else{s=JSON.parse(a)}o.result=s}o.headers=e.message.headers}catch(e){}if(i>299){let e;if(s&&s.message){e=s.message}else if(a&&a.length>0){e=a}else{e="Failed request: ("+i+")"}let t=new HttpClientError(e,i);t.result=o.result;n(t)}else{r(o)}}))}}t.HttpClient=HttpClient},6443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let n;if(t){n=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{n=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(n){r=new URL(n)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(n.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},1962:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var c;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rename=t.readlink=t.readdir=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const a=o(r(7147));const u=o(r(1017));c=a.promises,t.chmod=c.chmod,t.copyFile=c.copyFile,t.lstat=c.lstat,t.mkdir=c.mkdir,t.readdir=c.readdir,t.readlink=c.readlink,t.rename=c.rename,t.rmdir=c.rmdir,t.stat=c.stat,t.symlink=c.symlink,t.unlink=c.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return s(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return s(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return s(this,void 0,void 0,(function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=u.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of r){e=i+o;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=u.dirname(e);const n=u.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=u.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const c=r(9491);const a=o(r(2081));const u=o(r(1017));const l=r(3837);const f=o(r(1962));const d=l.promisify(a.exec);const p=l.promisify(a.execFile);function cp(e,t,r={}){return s(this,void 0,void 0,(function*(){const{force:n,recursive:i,copySourceDirectory:o}=readCopyOptions(r);const s=(yield f.exists(t))?yield f.stat(t):null;if(s&&s.isFile()&&!n){return}const c=s&&s.isDirectory()&&o?u.join(t,u.basename(e)):t;if(!(yield f.exists(e))){throw new Error(`no such file or directory: ${e}`)}const a=yield f.stat(e);if(a.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,c,0,n)}}else{if(u.relative(e,c)===""){throw new Error(`'${c}' and '${e}' are the same file`)}yield copyFile(e,c,n)}}))}t.cp=cp;function mv(e,t,r={}){return s(this,void 0,void 0,(function*(){if(yield f.exists(t)){let n=true;if(yield f.isDirectory(t)){t=u.join(t,u.basename(e));n=yield f.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(u.dirname(t));yield f.rename(e,t)}))}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,(function*(){if(f.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=f.getCmdPath();if(yield f.isDirectory(e,true)){yield d(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield d(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield f.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield f.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield p(`rm`,[`-rf`,`${e}`])}else{yield f.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,(function*(){c.ok(e,"a path argument must be provided");yield f.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(f.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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: ${e}. 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.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(f.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(u.delimiter)){if(e){t.push(e)}}}if(f.isRooted(e)){const r=yield f.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(u.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(u.delimiter)){if(e){r.push(e)}}}const n=[];for(const i of r){const r=yield f.tryGetExecutablePath(u.join(i,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return s(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield f.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const c=yield f.lstat(i);if(c.isDirectory()){yield cpDirRecursive(i,s,r,n)}else{yield copyFile(i,s,n)}}yield f.chmod(t,(yield f.stat(e)).mode)}))}function copyFile(e,t,r){return s(this,void 0,void 0,(function*(){if((yield f.lstat(e)).isSymbolicLink()){try{yield f.lstat(t);yield f.unlink(t)}catch(e){if(e.code==="EPERM"){yield f.chmod(t,"0666");yield f.unlink(t)}}const r=yield f.readlink(e);yield f.symlink(r,t,f.IS_WINDOWS?"junction":null)}else if(!(yield f.exists(t))||r){yield f.copyFile(e,t)}}))}},2764:e=>{"use strict";e.exports=addressparser;function addressparser(e){var t=new Tokenizer(e);var r=t.tokenize();var n=[];var i=[];var o=[];r.forEach((function(e){if(e.type==="operator"&&(e.value===","||e.value===";")){if(i.length){n.push(i)}i=[]}else{i.push(e)}}));if(i.length){n.push(i)}n.forEach((function(e){e=_handleAddress(e);if(e.length){o=o.concat(e)}}));return o}function _handleAddress(e){var t;var r=false;var n="text";var i;var o=[];var s={address:[],comment:[],group:[],text:[]};var c;var a;for(c=0,a=e.length;c=0;c--){if(s.text[c].match(/^[^@\s]+@[^@\s]+$/)){s.address=s.text.splice(c,1);break}}var _regexHandler=function(e){if(!s.address.length){s.address=[e.trim()];return" "}else{return e}};if(!s.address.length){for(c=s.text.length-1;c>=0;c--){s.text[c]=s.text[c].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,_regexHandler).trim();if(s.address.length){break}}}}if(!s.text.length&&s.comment.length){s.text=s.comment;s.comment=[]}if(s.address.length>1){s.text=s.text.concat(s.address.splice(1))}s.text=s.text.join(" ");s.address=s.address.join(" ");if(!s.address&&r){return[]}else{i={address:s.address||s.text||"",name:s.text||s.address||""};if(i.address===i.name){if((i.address||"").match(/@/)){i.name=""}else{i.address=""}}o.push(i)}}return o}function Tokenizer(e){this.str=(e||"").toString();this.operatorCurrent="";this.operatorExpecting="";this.node=null;this.escaped=false;this.list=[]}Tokenizer.prototype.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""};Tokenizer.prototype.tokenize=function(){var e,t=[];for(var r=0,n=this.str.length;r{"use strict";const n=r(7758);const i=r(1017);const o=r(8605).mkdirsSync;const s=r(2548).utimesMillisSync;const c=r(3901);function copySync(e,t,r){if(typeof r==="function"){r={filter:r}}r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n"+"\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002")}const{srcStat:n,destStat:i}=c.checkPathsSync(e,t,"copy",r);c.checkParentPathsSync(e,n,t,"copy");return handleFilterAndCopy(i,e,t,r)}function handleFilterAndCopy(e,t,r,s){if(s.filter&&!s.filter(t,r))return;const c=i.dirname(r);if(!n.existsSync(c))o(c);return getStats(e,t,r,s)}function startCopy(e,t,r,n){if(n.filter&&!n.filter(t,r))return;return getStats(e,t,r,n)}function getStats(e,t,r,i){const o=i.dereference?n.statSync:n.lstatSync;const s=o(t);if(s.isDirectory())return onDir(s,e,t,r,i);else if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return onFile(s,e,t,r,i);else if(s.isSymbolicLink())return onLink(e,t,r,i);else if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);else if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function onFile(e,t,r,n,i){if(!t)return copyFile(e,r,n,i);return mayCopyFile(e,r,n,i)}function mayCopyFile(e,t,r,i){if(i.overwrite){n.unlinkSync(r);return copyFile(e,t,r,i)}else if(i.errorOnExist){throw new Error(`'${r}' already exists`)}}function copyFile(e,t,r,i){n.copyFileSync(t,r);if(i.preserveTimestamps)handleTimestamps(e.mode,t,r);return setDestMode(r,e.mode)}function handleTimestamps(e,t,r){if(fileIsNotWritable(e))makeFileWritable(r,e);return setDestTimestamps(t,r)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t){return setDestMode(e,t|128)}function setDestMode(e,t){return n.chmodSync(e,t)}function setDestTimestamps(e,t){const r=n.statSync(e);return s(t,r.atime,r.mtime)}function onDir(e,t,r,n,i){if(!t)return mkDirAndCopy(e.mode,r,n,i);return copyDir(r,n,i)}function mkDirAndCopy(e,t,r,i){n.mkdirSync(r);copyDir(t,r,i);return setDestMode(r,e)}function copyDir(e,t,r){n.readdirSync(e).forEach((n=>copyDirItem(n,e,t,r)))}function copyDirItem(e,t,r,n){const o=i.join(t,e);const s=i.join(r,e);const{destStat:a}=c.checkPathsSync(o,s,"copy",n);return startCopy(a,o,s,n)}function onLink(e,t,r,o){let s=n.readlinkSync(t);if(o.dereference){s=i.resolve(process.cwd(),s)}if(!e){return n.symlinkSync(s,r)}else{let e;try{e=n.readlinkSync(r)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return n.symlinkSync(s,r);throw e}if(o.dereference){e=i.resolve(process.cwd(),e)}if(c.isSrcSubdir(s,e)){throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`)}if(n.statSync(r).isDirectory()&&c.isSrcSubdir(e,s)){throw new Error(`Cannot overwrite '${e}' with '${s}'.`)}return copyLink(s,r)}}function copyLink(e,t){n.unlinkSync(t);return n.symlinkSync(e,t)}e.exports=copySync},8834:(e,t,r)=>{"use strict";const n=r(7758);const i=r(1017);const o=r(8605).mkdirs;const s=r(3835).pathExists;const c=r(2548).utimesMillis;const a=r(3901);function copy(e,t,r,n){if(typeof r==="function"&&!n){n=r;r={}}else if(typeof r==="function"){r={filter:r}}n=n||function(){};r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n"+"\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001")}a.checkPaths(e,t,"copy",r,((i,o)=>{if(i)return n(i);const{srcStat:s,destStat:c}=o;a.checkParentPaths(e,s,t,"copy",(i=>{if(i)return n(i);if(r.filter)return handleFilter(checkParentDir,c,e,t,r,n);return checkParentDir(c,e,t,r,n)}))}))}function checkParentDir(e,t,r,n,c){const a=i.dirname(r);s(a,((i,s)=>{if(i)return c(i);if(s)return getStats(e,t,r,n,c);o(a,(i=>{if(i)return c(i);return getStats(e,t,r,n,c)}))}))}function handleFilter(e,t,r,n,i,o){Promise.resolve(i.filter(r,n)).then((s=>{if(s)return e(t,r,n,i,o);return o()}),(e=>o(e)))}function startCopy(e,t,r,n,i){if(n.filter)return handleFilter(getStats,e,t,r,n,i);return getStats(e,t,r,n,i)}function getStats(e,t,r,i,o){const s=i.dereference?n.stat:n.lstat;s(t,((n,s)=>{if(n)return o(n);if(s.isDirectory())return onDir(s,e,t,r,i,o);else if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return onFile(s,e,t,r,i,o);else if(s.isSymbolicLink())return onLink(e,t,r,i,o);else if(s.isSocket())return o(new Error(`Cannot copy a socket file: ${t}`));else if(s.isFIFO())return o(new Error(`Cannot copy a FIFO pipe: ${t}`));return o(new Error(`Unknown file: ${t}`))}))}function onFile(e,t,r,n,i,o){if(!t)return copyFile(e,r,n,i,o);return mayCopyFile(e,r,n,i,o)}function mayCopyFile(e,t,r,i,o){if(i.overwrite){n.unlink(r,(n=>{if(n)return o(n);return copyFile(e,t,r,i,o)}))}else if(i.errorOnExist){return o(new Error(`'${r}' already exists`))}else return o()}function copyFile(e,t,r,i,o){n.copyFile(t,r,(n=>{if(n)return o(n);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,t,r,o);return setDestMode(r,e.mode,o)}))}function handleTimestampsAndMode(e,t,r,n){if(fileIsNotWritable(e)){return makeFileWritable(r,e,(i=>{if(i)return n(i);return setDestTimestampsAndMode(e,t,r,n)}))}return setDestTimestampsAndMode(e,t,r,n)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t,r){return setDestMode(e,t|128,r)}function setDestTimestampsAndMode(e,t,r,n){setDestTimestamps(t,r,(t=>{if(t)return n(t);return setDestMode(r,e,n)}))}function setDestMode(e,t,r){return n.chmod(e,t,r)}function setDestTimestamps(e,t,r){n.stat(e,((e,n)=>{if(e)return r(e);return c(t,n.atime,n.mtime,r)}))}function onDir(e,t,r,n,i,o){if(!t)return mkDirAndCopy(e.mode,r,n,i,o);return copyDir(r,n,i,o)}function mkDirAndCopy(e,t,r,i,o){n.mkdir(r,(n=>{if(n)return o(n);copyDir(t,r,i,(t=>{if(t)return o(t);return setDestMode(r,e,o)}))}))}function copyDir(e,t,r,i){n.readdir(e,((n,o)=>{if(n)return i(n);return copyDirItems(o,e,t,r,i)}))}function copyDirItems(e,t,r,n,i){const o=e.pop();if(!o)return i();return copyDirItem(e,o,t,r,n,i)}function copyDirItem(e,t,r,n,o,s){const c=i.join(r,t);const u=i.join(n,t);a.checkPaths(c,u,"copy",o,((t,i)=>{if(t)return s(t);const{destStat:a}=i;startCopy(a,c,u,o,(t=>{if(t)return s(t);return copyDirItems(e,r,n,o,s)}))}))}function onLink(e,t,r,o,s){n.readlink(t,((t,c)=>{if(t)return s(t);if(o.dereference){c=i.resolve(process.cwd(),c)}if(!e){return n.symlink(c,r,s)}else{n.readlink(r,((t,u)=>{if(t){if(t.code==="EINVAL"||t.code==="UNKNOWN")return n.symlink(c,r,s);return s(t)}if(o.dereference){u=i.resolve(process.cwd(),u)}if(a.isSrcSubdir(c,u)){return s(new Error(`Cannot copy '${c}' to a subdirectory of itself, '${u}'.`))}if(e.isDirectory()&&a.isSrcSubdir(u,c)){return s(new Error(`Cannot overwrite '${u}' with '${c}'.`))}return copyLink(c,r,s)}))}}))}function copyLink(e,t,r){n.unlink(t,(i=>{if(i)return r(i);return n.symlink(e,t,r)}))}e.exports=copy},1335:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;e.exports={copy:n(r(8834)),copySync:r(9618)}},6970:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const i=r(1176);const o=r(1017);const s=r(8605);const c=r(7357);const a=n((async function emptyDir(e){let t;try{t=await i.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>c.remove(o.join(e,t)))))}));function emptyDirSync(e){let t;try{t=i.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=o.join(e,t);c.removeSync(t)}))}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:a,emptydir:a}},2164:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(1017);const o=r(7758);const s=r(8605);function createFile(e,t){function makeFile(){o.writeFile(e,"",(e=>{if(e)return t(e);t()}))}o.stat(e,((r,n)=>{if(!r&&n.isFile())return t();const c=i.dirname(e);o.stat(c,((e,r)=>{if(e){if(e.code==="ENOENT"){return s.mkdirs(c,(e=>{if(e)return t(e);makeFile()}))}return t(e)}if(r.isDirectory())makeFile();else{o.readdir(c,(e=>{if(e)return t(e)}))}}))}))}function createFileSync(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{if(!o.statSync(r).isDirectory()){o.readdirSync(r)}}catch(e){if(e&&e.code==="ENOENT")s.mkdirsSync(r);else throw e}o.writeFileSync(e,"")}e.exports={createFile:n(createFile),createFileSync:createFileSync}},55:(e,t,r)=>{"use strict";const{createFile:n,createFileSync:i}=r(2164);const{createLink:o,createLinkSync:s}=r(3797);const{createSymlink:c,createSymlinkSync:a}=r(2549);e.exports={createFile:n,createFileSync:i,ensureFile:n,ensureFileSync:i,createLink:o,createLinkSync:s,ensureLink:o,ensureLinkSync:s,createSymlink:c,createSymlinkSync:a,ensureSymlink:c,ensureSymlinkSync:a}},3797:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(1017);const o=r(7758);const s=r(8605);const c=r(3835).pathExists;const{areIdentical:a}=r(3901);function createLink(e,t,r){function makeLink(e,t){o.link(e,t,(e=>{if(e)return r(e);r(null)}))}o.lstat(t,((n,u)=>{o.lstat(e,((n,o)=>{if(n){n.message=n.message.replace("lstat","ensureLink");return r(n)}if(u&&a(o,u))return r(null);const l=i.dirname(t);c(l,((n,i)=>{if(n)return r(n);if(i)return makeLink(e,t);s.mkdirs(l,(n=>{if(n)return r(n);makeLink(e,t)}))}))}))}))}function createLinkSync(e,t){let r;try{r=o.lstatSync(t)}catch{}try{const t=o.lstatSync(e);if(r&&a(t,r))return}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const n=i.dirname(t);const c=o.existsSync(n);if(c)return o.linkSync(e,t);s.mkdirsSync(n);return o.linkSync(e,t)}e.exports={createLink:n(createLink),createLinkSync:createLinkSync}},3727:(e,t,r)=>{"use strict";const n=r(1017);const i=r(7758);const o=r(3835).pathExists;function symlinkPaths(e,t,r){if(n.isAbsolute(e)){return i.lstat(e,(t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:e})}))}else{const s=n.dirname(t);const c=n.join(s,e);return o(c,((t,o)=>{if(t)return r(t);if(o){return r(null,{toCwd:c,toDst:e})}else{return i.lstat(e,(t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:n.relative(s,e)})}))}}))}}function symlinkPathsSync(e,t){let r;if(n.isAbsolute(e)){r=i.existsSync(e);if(!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const o=n.dirname(t);const s=n.join(o,e);r=i.existsSync(s);if(r){return{toCwd:s,toDst:e}}else{r=i.existsSync(e);if(!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(o,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},8254:(e,t,r)=>{"use strict";const n=r(7758);function symlinkType(e,t,r){r=typeof t==="function"?t:r;t=typeof t==="function"?false:t;if(t)return r(null,t);n.lstat(e,((e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file";r(null,t)}))}function symlinkTypeSync(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},2549:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(1017);const o=r(1176);const s=r(8605);const c=s.mkdirs;const a=s.mkdirsSync;const u=r(3727);const l=u.symlinkPaths;const f=u.symlinkPathsSync;const d=r(8254);const p=d.symlinkType;const h=d.symlinkTypeSync;const m=r(3835).pathExists;const{areIdentical:y}=r(3901);function createSymlink(e,t,r,n){n=typeof r==="function"?r:n;r=typeof r==="function"?false:r;o.lstat(t,((i,s)=>{if(!i&&s.isSymbolicLink()){Promise.all([o.stat(e),o.stat(t)]).then((([i,o])=>{if(y(i,o))return n(null);_createSymlink(e,t,r,n)}))}else _createSymlink(e,t,r,n)}))}function _createSymlink(e,t,r,n){l(e,t,((s,a)=>{if(s)return n(s);e=a.toDst;p(a.toCwd,r,((r,s)=>{if(r)return n(r);const a=i.dirname(t);m(a,((r,i)=>{if(r)return n(r);if(i)return o.symlink(e,t,s,n);c(a,(r=>{if(r)return n(r);o.symlink(e,t,s,n)}))}))}))}))}function createSymlinkSync(e,t,r){let n;try{n=o.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=o.statSync(e);const n=o.statSync(t);if(y(r,n))return}const s=f(e,t);e=s.toDst;r=h(s.toCwd,r);const c=i.dirname(t);const u=o.existsSync(c);if(u)return o.symlinkSync(e,t,r);a(c);return o.symlinkSync(e,t,r)}e.exports={createSymlink:n(createSymlink),createSymlinkSync:createSymlinkSync}},1176:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(7758);const o=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>typeof i[e]==="function"));Object.assign(t,i);o.forEach((e=>{t[e]=n(i[e])}));t.exists=function(e,t){if(typeof t==="function"){return i.exists(e,t)}return new Promise((t=>i.exists(e,t)))};t.read=function(e,t,r,n,o,s){if(typeof s==="function"){return i.read(e,t,r,n,o,s)}return new Promise(((s,c)=>{i.read(e,t,r,n,o,((e,t,r)=>{if(e)return c(e);s({bytesRead:t,buffer:r})}))}))};t.write=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.write(e,t,...r)}return new Promise(((n,o)=>{i.write(e,t,...r,((e,t,r)=>{if(e)return o(e);n({bytesWritten:t,buffer:r})}))}))};if(typeof i.writev==="function"){t.writev=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.writev(e,t,...r)}return new Promise(((n,o)=>{i.writev(e,t,...r,((e,t,r)=>{if(e)return o(e);n({bytesWritten:t,buffers:r})}))}))}}if(typeof i.realpath.native==="function"){t.realpath.native=n(i.realpath.native)}else{process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}},5630:(e,t,r)=>{"use strict";e.exports={...r(1176),...r(1335),...r(6970),...r(55),...r(213),...r(8605),...r(1497),...r(1832),...r(3835),...r(7357)}},213:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const i=r(8970);i.outputJson=n(r(531));i.outputJsonSync=r(9421);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},8970:(e,t,r)=>{"use strict";const n=r(6160);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},9421:(e,t,r)=>{"use strict";const{stringify:n}=r(5902);const{outputFileSync:i}=r(1832);function outputJsonSync(e,t,r){const o=n(t,r);i(e,o,r)}e.exports=outputJsonSync},531:(e,t,r)=>{"use strict";const{stringify:n}=r(5902);const{outputFile:i}=r(1832);async function outputJson(e,t,r={}){const o=n(t,r);await i(e,o,r)}e.exports=outputJson},8605:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const{makeDir:i,makeDirSync:o}=r(2751);const s=n(i);e.exports={mkdirs:s,mkdirsSync:o,mkdirp:s,mkdirpSync:o,ensureDir:s,ensureDirSync:o}},2751:(e,t,r)=>{"use strict";const n=r(1176);const{checkPath:i}=r(9907);const getMode=e=>{const t={mode:511};if(typeof e==="number")return e;return{...t,...e}.mode};e.exports.makeDir=async(e,t)=>{i(e);return n.mkdir(e,{mode:getMode(t),recursive:true})};e.exports.makeDirSync=(e,t)=>{i(e);return n.mkdirSync(e,{mode:getMode(t),recursive:true})}},9907:(e,t,r)=>{"use strict";const n=r(1017);e.exports.checkPath=function checkPath(e){if(process.platform==="win32"){const t=/[<>:"|?*]/.test(e.replace(n.parse(e).root,""));if(t){const t=new Error(`Path contains invalid characters: ${e}`);t.code="EINVAL";throw t}}}},1497:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;e.exports={move:n(r(2231)),moveSync:r(2047)}},2047:(e,t,r)=>{"use strict";const n=r(7758);const i=r(1017);const o=r(1335).copySync;const s=r(7357).removeSync;const c=r(8605).mkdirpSync;const a=r(3901);function moveSync(e,t,r){r=r||{};const n=r.overwrite||r.clobber||false;const{srcStat:o,isChangingCase:s=false}=a.checkPathsSync(e,t,"move",r);a.checkParentPathsSync(e,o,t,"move");if(!isParentRoot(t))c(i.dirname(t));return doRename(e,t,n,s)}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,i){if(i)return rename(e,t,r);if(r){s(t);return rename(e,t,r)}if(n.existsSync(t))throw new Error("dest already exists.");return rename(e,t,r)}function rename(e,t,r){try{n.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return moveAcrossDevice(e,t,r)}}function moveAcrossDevice(e,t,r){const n={overwrite:r,errorOnExist:true};o(e,t,n);return s(e)}e.exports=moveSync},2231:(e,t,r)=>{"use strict";const n=r(7758);const i=r(1017);const o=r(1335).copy;const s=r(7357).remove;const c=r(8605).mkdirp;const a=r(3835).pathExists;const u=r(3901);function move(e,t,r,n){if(typeof r==="function"){n=r;r={}}r=r||{};const o=r.overwrite||r.clobber||false;u.checkPaths(e,t,"move",r,((r,s)=>{if(r)return n(r);const{srcStat:a,isChangingCase:l=false}=s;u.checkParentPaths(e,a,t,"move",(r=>{if(r)return n(r);if(isParentRoot(t))return doRename(e,t,o,l,n);c(i.dirname(t),(r=>{if(r)return n(r);return doRename(e,t,o,l,n)}))}))}))}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,n,i){if(n)return rename(e,t,r,i);if(r){return s(t,(n=>{if(n)return i(n);return rename(e,t,r,i)}))}a(t,((n,o)=>{if(n)return i(n);if(o)return i(new Error("dest already exists."));return rename(e,t,r,i)}))}function rename(e,t,r,i){n.rename(e,t,(n=>{if(!n)return i();if(n.code!=="EXDEV")return i(n);return moveAcrossDevice(e,t,r,i)}))}function moveAcrossDevice(e,t,r,n){const i={overwrite:r,errorOnExist:true};o(e,t,i,(t=>{if(t)return n(t);return s(e,n)}))}e.exports=move},1832:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(7758);const o=r(1017);const s=r(8605);const c=r(3835).pathExists;function outputFile(e,t,r,n){if(typeof r==="function"){n=r;r="utf8"}const a=o.dirname(e);c(a,((o,c)=>{if(o)return n(o);if(c)return i.writeFile(e,t,r,n);s.mkdirs(a,(o=>{if(o)return n(o);i.writeFile(e,t,r,n)}))}))}function outputFileSync(e,...t){const r=o.dirname(e);if(i.existsSync(r)){return i.writeFileSync(e,...t)}s.mkdirsSync(r);i.writeFileSync(e,...t)}e.exports={outputFile:n(outputFile),outputFileSync:outputFileSync}},3835:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const i=r(1176);function pathExists(e){return i.access(e).then((()=>true)).catch((()=>false))}e.exports={pathExists:n(pathExists),pathExistsSync:i.existsSync}},7357:(e,t,r)=>{"use strict";const n=r(7758);const i=r(9046).fromCallback;const o=r(8761);function remove(e,t){if(n.rm)return n.rm(e,{recursive:true,force:true},t);o(e,t)}function removeSync(e){if(n.rmSync)return n.rmSync(e,{recursive:true,force:true});o.sync(e)}e.exports={remove:i(remove),removeSync:removeSync}},8761:(e,t,r)=>{"use strict";const n=r(7758);const i=r(1017);const o=r(9491);const s=process.platform==="win32";function defaults(e){const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((t=>{e[t]=e[t]||n[t];t=t+"Sync";e[t]=e[t]||n[t]}));e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,t,r){let n=0;if(typeof t==="function"){r=t;t={}}o(e,"rimraf: missing path");o.strictEqual(typeof e,"string","rimraf: path should be a string");o.strictEqual(typeof r,"function","rimraf: callback function required");o(t,"rimraf: invalid options argument provided");o.strictEqual(typeof t,"object","rimraf: options should be object");defaults(t);rimraf_(e,t,(function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&nrimraf_(e,t,CB)),r)}if(i.code==="ENOENT")i=null}r(i)}))}function rimraf_(e,t,r){o(e);o(t);o(typeof r==="function");t.lstat(e,((n,i)=>{if(n&&n.code==="ENOENT"){return r(null)}if(n&&n.code==="EPERM"&&s){return fixWinEPERM(e,t,n,r)}if(i&&i.isDirectory()){return rmdir(e,t,n,r)}t.unlink(e,(n=>{if(n){if(n.code==="ENOENT"){return r(null)}if(n.code==="EPERM"){return s?fixWinEPERM(e,t,n,r):rmdir(e,t,n,r)}if(n.code==="EISDIR"){return rmdir(e,t,n,r)}}return r(n)}))}))}function fixWinEPERM(e,t,r,n){o(e);o(t);o(typeof n==="function");t.chmod(e,438,(i=>{if(i){n(i.code==="ENOENT"?null:r)}else{t.stat(e,((i,o)=>{if(i){n(i.code==="ENOENT"?null:r)}else if(o.isDirectory()){rmdir(e,t,r,n)}else{t.unlink(e,n)}}))}}))}function fixWinEPERMSync(e,t,r){let n;o(e);o(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}try{n=t.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}if(n.isDirectory()){rmdirSync(e,t,r)}else{t.unlinkSync(e)}}function rmdir(e,t,r,n){o(e);o(t);o(typeof n==="function");t.rmdir(e,(i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,t,n)}else if(i&&i.code==="ENOTDIR"){n(r)}else{n(i)}}))}function rmkids(e,t,r){o(e);o(t);o(typeof r==="function");t.readdir(e,((n,o)=>{if(n)return r(n);let s=o.length;let c;if(s===0)return t.rmdir(e,r);o.forEach((n=>{rimraf(i.join(e,n),t,(n=>{if(c){return}if(n)return r(c=n);if(--s===0){t.rmdir(e,r)}}))}))}))}function rimrafSync(e,t){let r;t=t||{};defaults(t);o(e,"rimraf: missing path");o.strictEqual(typeof e,"string","rimraf: path should be a string");o(t,"rimraf: missing options");o.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if(r.code==="ENOENT"){return}if(r.code==="EPERM"&&s){fixWinEPERMSync(e,t,r)}}try{if(r&&r.isDirectory()){rmdirSync(e,t,null)}else{t.unlinkSync(e)}}catch(r){if(r.code==="ENOENT"){return}else if(r.code==="EPERM"){return s?fixWinEPERMSync(e,t,r):rmdirSync(e,t,r)}else if(r.code!=="EISDIR"){throw r}rmdirSync(e,t,r)}}function rmdirSync(e,t,r){o(e);o(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR"){throw r}else if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"){rmkidsSync(e,t)}else if(n.code!=="ENOENT"){throw n}}}function rmkidsSync(e,t){o(e);o(t);t.readdirSync(e).forEach((r=>rimrafSync(i.join(e,r),t)));if(s){const r=Date.now();do{try{const r=t.rmdirSync(e,t);return r}catch{}}while(Date.now()-r<500)}else{const r=t.rmdirSync(e,t);return r}}e.exports=rimraf;rimraf.sync=rimrafSync},3901:(e,t,r)=>{"use strict";const n=r(1176);const i=r(1017);const o=r(3837);function getStats(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:true}):e=>n.lstat(e,{bigint:true});return Promise.all([i(e),i(t).catch((e=>{if(e.code==="ENOENT")return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function getStatsSync(e,t,r){let i;const o=r.dereference?e=>n.statSync(e,{bigint:true}):e=>n.lstatSync(e,{bigint:true});const s=o(e);try{i=o(t)}catch(e){if(e.code==="ENOENT")return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:i}}function checkPaths(e,t,r,n,s){o.callbackify(getStats)(e,t,n,((n,o)=>{if(n)return s(n);const{srcStat:c,destStat:a}=o;if(a){if(areIdentical(c,a)){const n=i.basename(e);const o=i.basename(t);if(r==="move"&&n!==o&&n.toLowerCase()===o.toLowerCase()){return s(null,{srcStat:c,destStat:a,isChangingCase:true})}return s(new Error("Source and destination must not be the same."))}if(c.isDirectory()&&!a.isDirectory()){return s(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`))}if(!c.isDirectory()&&a.isDirectory()){return s(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}}if(c.isDirectory()&&isSrcSubdir(e,t)){return s(new Error(errMsg(e,t,r)))}return s(null,{srcStat:c,destStat:a})}))}function checkPathsSync(e,t,r,n){const{srcStat:o,destStat:s}=getStatsSync(e,t,n);if(s){if(areIdentical(o,s)){const n=i.basename(e);const c=i.basename(t);if(r==="move"&&n!==c&&n.toLowerCase()===c.toLowerCase()){return{srcStat:o,destStat:s,isChangingCase:true}}throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!s.isDirectory()){throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`)}if(!o.isDirectory()&&s.isDirectory()){throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}}if(o.isDirectory()&&isSrcSubdir(e,t)){throw new Error(errMsg(e,t,r))}return{srcStat:o,destStat:s}}function checkParentPaths(e,t,r,o,s){const c=i.resolve(i.dirname(e));const a=i.resolve(i.dirname(r));if(a===c||a===i.parse(a).root)return s();n.stat(a,{bigint:true},((n,i)=>{if(n){if(n.code==="ENOENT")return s();return s(n)}if(areIdentical(t,i)){return s(new Error(errMsg(e,r,o)))}return checkParentPaths(e,t,a,o,s)}))}function checkParentPathsSync(e,t,r,o){const s=i.resolve(i.dirname(e));const c=i.resolve(i.dirname(r));if(c===s||c===i.parse(c).root)return;let a;try{a=n.statSync(c,{bigint:true})}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(t,a)){throw new Error(errMsg(e,r,o))}return checkParentPathsSync(e,t,c,o)}function areIdentical(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function isSrcSubdir(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e));const n=i.resolve(t).split(i.sep).filter((e=>e));return r.reduce(((e,t,r)=>e&&n[r]===t),true)}function errMsg(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir,areIdentical:areIdentical}},2548:(e,t,r)=>{"use strict";const n=r(7758);function utimesMillis(e,t,r,i){n.open(e,"r+",((e,o)=>{if(e)return i(e);n.futimes(o,t,r,(e=>{n.close(o,(t=>{if(i)i(e||t)}))}))}))}function utimesMillisSync(e,t,r){const i=n.openSync(e,"r+");n.futimesSync(i,t,r);return n.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},7356:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},7758:(e,t,r)=>{var n=r(7147);var i=r(263);var o=r(3086);var s=r(7356);var c=r(3837);var a;var u;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){a=Symbol.for("graceful-fs.queue");u=Symbol.for("graceful-fs.previous")}else{a="___graceful-fs.queue";u="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,a,{get:function(){return t}})}var l=noop;if(c.debuglog)l=c.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))l=function(){var e=c.format.apply(c,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!n[a]){var f=global[a]||[];publishQueue(n,f);n.close=function(e){function close(t,r){return e.call(n,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,u,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);resetQueue()}Object.defineProperty(closeSync,u,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){l(n[a]);r(9491).equal(n[a].length,0)}))}}if(!global[a]){publishQueue(global,n[a])}e.exports=patch(s(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n,i){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n],t,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i,o){return r(e,t,n,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i],r,o||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i,o){return n(e,t,r,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i],n,o||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var s=e.copyFile;if(s)e.copyFile=copyFile;function copyFile(e,t,r,n){if(typeof r==="function"){n=r;r=0}return go$copyFile(e,t,r,n);function go$copyFile(e,t,r,n,i){return s(e,t,r,(function(o){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,n],o,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var c=e.readdir;e.readdir=readdir;var a=/^v[0-5]\./;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;var n=a.test(process.version)?function go$readdir(e,t,r,n){return c(e,fs$readdirCallback(e,t,r,n))}:function go$readdir(e,t,r,n){return c(e,t,fs$readdirCallback(e,t,r,n))};return n(e,t,r);function fs$readdirCallback(e,t,r,i){return function(o,s){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([n,[e,t,r],o,i||Date.now(),Date.now()]);else{if(s&&s.sort)s.sort();if(typeof r==="function")r.call(this,o,s)}}}}if(process.version.substr(0,4)==="v0.8"){var u=o(e);ReadStream=u.ReadStream;WriteStream=u.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var f=e.WriteStream;if(f){WriteStream.prototype=Object.create(f.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var d=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(e){d=e},enumerable:true,configurable:true});var p=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return f.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var h=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n,i){return h(e,t,r,(function(o,s){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$open,[e,t,r,n],o,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}return e}function enqueue(e){l("ENQUEUE",e[0].name,e[1]);n[a].push(e);retry()}var d;function resetQueue(){var e=Date.now();for(var t=0;t2){n[a][t][3]=e;n[a][t][4]=e}}retry()}function retry(){clearTimeout(d);d=undefined;if(n[a].length===0)return;var e=n[a].shift();var t=e[0];var r=e[1];var i=e[2];var o=e[3];var s=e[4];if(o===undefined){l("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-o>=6e4){l("TIMEOUT",t.name,r);var c=r.pop();if(typeof c==="function")c.call(null,i)}else{var u=Date.now()-s;var f=Math.max(s-o,1);var p=Math.min(f*1.2,100);if(u>=p){l("RETRY",t.name,r);t.apply(null,r.concat([o]))}else{n[a].push(e)}}if(d===undefined){d=setTimeout(retry,0)}}},3086:(e,t,r)=>{var n=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var s=0,c=o.length;sthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var o=0,s=i.length;o= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(e,t,r)=>{var n=r(2057);var i=process.cwd;var o=null;var s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=i.call(process);return o};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var c=process.chdir;process.chdir=function(e){o=null;c.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c)}e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(e.chmod&&!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(e.chown&&!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(s==="win32"){e.rename=typeof e.rename!=="function"?e.rename:function(t){function rename(r,n,i){var o=Date.now();var s=0;t(r,n,(function CB(c){if(c&&(c.code==="EACCES"||c.code==="EPERM")&&Date.now()-o<6e4){setTimeout((function(){e.stat(n,(function(e,o){if(e&&e.code==="ENOENT")t(r,n,CB);else i(c)}))}),s);if(s<100)s+=10;return}if(i)i(c)}))}if(Object.setPrototypeOf)Object.setPrototypeOf(rename,t);return rename}(e.rename)}e.read=typeof e.read!=="function"?e.read:function(t){function read(r,n,i,o,s,c){var a;if(c&&typeof c==="function"){var u=0;a=function(l,f,d){if(l&&l.code==="EAGAIN"&&u<10){u++;return t.call(e,r,n,i,o,s,a)}c.apply(this,arguments)}}return t.call(e,r,n,i,o,s,a)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=typeof e.readSync!=="function"?e.readSync:function(t){return function(r,n,i,o,s){var c=0;while(true){try{return t.call(e,r,n,i,o,s)}catch(e){if(e.code==="EAGAIN"&&c<10){c++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,(function(t){e.close(n,(function(e){if(i)i(t||e)}))}))}))};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var o=true;var s;try{s=e.fchmodSync(i,r);o=false}finally{if(o){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return s}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")&&e.futimes){e.lutimes=function(t,r,i,o){e.open(t,n.O_SYMLINK,(function(t,n){if(t){if(o)o(t);return}e.futimes(n,r,i,(function(t){e.close(n,(function(e){if(o)o(t||e)}))}))}))};e.lutimesSync=function(t,r,i){var o=e.openSync(t,n.O_SYMLINK);var s;var c=true;try{s=e.futimesSync(o,r,i);c=false}finally{if(c){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return s}}else if(e.futimes){e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,o){return t.call(e,r,n,i,(function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i){if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296}return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},6160:(e,t,r)=>{let n;try{n=r(7758)}catch(e){n=r(7147)}const i=r(9046);const{stringify:o,stripBom:s}=r(5902);async function _readFile(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const o="throws"in t?t.throws:true;let c=await i.fromCallback(r.readFile)(e,t);c=s(c);let a;try{a=JSON.parse(c,t?t.reviver:null)}catch(t){if(o){t.message=`${e}: ${t.message}`;throw t}else{return null}}return a}const c=i.fromPromise(_readFile);function readFileSync(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const i="throws"in t?t.throws:true;try{let n=r.readFileSync(e,t);n=s(n);return JSON.parse(n,t.reviver)}catch(t){if(i){t.message=`${e}: ${t.message}`;throw t}else{return null}}}async function _writeFile(e,t,r={}){const s=r.fs||n;const c=o(t,r);await i.fromCallback(s.writeFile)(e,c,r)}const a=i.fromPromise(_writeFile);function writeFileSync(e,t,r={}){const i=r.fs||n;const s=o(t,r);return i.writeFileSync(e,s,r)}const u={readFile:c,readFileSync:readFileSync,writeFile:a,writeFileSync:writeFileSync};e.exports=u},5902:e=>{function stringify(e,{EOL:t="\n",finalEOL:r=true,replacer:n=null,spaces:i}={}){const o=r?t:"";const s=JSON.stringify(e,n,i);return s.replace(/\n/g,t)+o}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var n=r(1808);var i=r(4404);var o=r(3685);var s=r(5687);var c=r(2361);var a=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var o=toOptions(r,n,i);for(var s=0,c=t.requests.length;s=this.maxSockets){i.requests.push(o);return}i.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,o)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(i);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,s,c){o.removeAllListeners();s.removeAllListeners();if(i.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",i.statusCode);s.destroy();var a=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);a.code="ECONNRESET";e.request.emit("error",a);r.removeSocket(n);return}if(c.length>0){l("got illegal response body from proxy");s.destroy();var a=new Error("got illegal response body from proxy");a.code="ECONNRESET";e.request.emit("error",a);r.removeSocket(n);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=s;return t(s)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host");var s=mergeOptions({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host});var c=i.connect(0,s);r.sockets[r.sockets.indexOf(n)]=c;t(c)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";t.fromCallback=function(e){return Object.defineProperty((function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise(((r,n)=>{e.call(this,...t,((e,t)=>e!=null?n(e):r(t)))}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if(typeof r!=="function")return e.apply(this,t);else e.apply(this,t.slice(0,-1)).then((e=>r(null,e)),r)}),"name",{value:e.name})}},5047:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.exec=void 0;const c=o(r(1514));const exec=(e,t=[],r)=>s(void 0,void 0,void 0,(function*(){let n="";let i="";const o={silent:r,ignoreReturnCode:true};o.listeners={stdout:e=>{n+=e.toString()},stderr:e=>{i+=e.toString()}};const s=yield c.exec(e,t,o);return{success:s===0,stdout:n.trim(),stderr:i.trim()}}));t.exec=exec},6350:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.push=t.showStat=t.commit=t.add=t.setConfig=t.hasChanges=t.isDirty=t.checkout=t.init=t.clone=t.remoteBranchExists=t.defaults=void 0;const c=o(r(5047));const a=o(r(1514));t.defaults={targetBranch:"gh-pages",committer:"GitHub ",author:"github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>",message:"Deploy to GitHub pages"};function remoteBranchExists(e,t){return s(this,void 0,void 0,(function*(){return yield c.exec("git",["ls-remote","--heads",e,t],true).then((e=>{if(e.stderr!=""&&!e.success){throw new Error(e.stderr)}return e.stdout.trim().length>0}))}))}t.remoteBranchExists=remoteBranchExists;function clone(e,t,r){return s(this,void 0,void 0,(function*(){yield a.exec("git",["clone","--quiet","--branch",t,"--depth","1",e,r])}))}t.clone=clone;function init(e){return s(this,void 0,void 0,(function*(){yield a.exec("git",["init",e])}))}t.init=init;function checkout(e){return s(this,void 0,void 0,(function*(){yield a.exec("git",["checkout","--orphan",e])}))}t.checkout=checkout;function isDirty(){return s(this,void 0,void 0,(function*(){return yield c.exec("git",["status","--short"],true).then((e=>{if(e.stderr!=""&&!e.success){throw new Error(e.stderr)}return e.stdout.trim().length>0}))}))}t.isDirty=isDirty;function hasChanges(){return s(this,void 0,void 0,(function*(){return yield c.exec("git",["status","--porcelain"],true).then((e=>{if(e.stderr!=""&&!e.success){throw new Error(e.stderr)}return e.stdout.trim().length>0}))}))}t.hasChanges=hasChanges;function setConfig(e,t){return s(this,void 0,void 0,(function*(){yield a.exec("git",["config",e,t])}))}t.setConfig=setConfig;function add(e,t){return s(this,void 0,void 0,(function*(){const r=["add"];if(t){r.push("--verbose")}r.push("--all",e);yield a.exec("git",r)}))}t.add=add;function commit(e,t,r){return s(this,void 0,void 0,(function*(){const n=[];n.push("commit");if(e){n.push("--allow-empty")}if(t!==""){n.push("--author",t)}n.push("--message",r);yield a.exec("git",n)}))}t.commit=commit;function showStat(){return s(this,void 0,void 0,(function*(){return yield c.exec("git",["show",`--stat-count=1000`,"HEAD"],true).then((e=>{if(e.stderr!=""&&!e.success){throw new Error(e.stderr)}return e.stdout.trim()}))}))}t.showStat=showStat;function push(e,t,r){return s(this,void 0,void 0,(function*(){const n=[];n.push("push");if(r){n.push("--force")}n.push(e,t);yield a.exec("git",n)}))}t.push=push},399:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=c(r(2764));const u=r(5630);const l=o(r(7147));const f=o(r(2037));const d=o(r(1017));const p=o(r(2186));const h=o(r(6350));function run(){return s(this,void 0,void 0,(function*(){try{const e=p.getInput("domain")||"github.com";const t=p.getInput("repo")||process.env["GITHUB_REPOSITORY"]||"";const r=p.getInput("target_branch")||h.defaults.targetBranch;const n=/true/i.test(p.getInput("keep_history"));const i=/true/i.test(p.getInput("allow_empty_commit"));const o=p.getInput("build_dir",{required:true});const c=/true/i.test(p.getInput("absolute_build_dir"));const m=/true/i.test(p.getInput("follow_symlinks"));const y=p.getInput("committer")||h.defaults.committer;const g=p.getInput("author")||h.defaults.author;const v=p.getInput("commit_message")||h.defaults.message;const S=p.getInput("fqdn");const w=/false/i.test(p.getInput("jekyll"));const b=/true/i.test(p.getInput("dry_run"));const E=/true/i.test(p.getInput("verbose"));if(!l.existsSync(o)){p.setFailed("Build dir does not exist");return}let _=String("https://");if(process.env["GH_PAT"]){p.debug(`Use GH_PAT`);_=_.concat(process.env["GH_PAT"].trim(),"@")}else if(process.env["GITHUB_TOKEN"]){p.debug(`Use GITHUB_TOKEN`);_=_.concat("x-access-token:",process.env["GITHUB_TOKEN"].trim(),"@")}else if(!b){p.setFailed("You have to provide a GITHUB_TOKEN or GH_PAT");return}_=_.concat(e,"/",t,".git");p.debug(`remoteURL=${_}`);const k=yield h.remoteBranchExists(_,r);p.debug(`remoteBranchExists=${k}`);const x=l.mkdtempSync(d.join(f.tmpdir(),"github-pages-"));p.debug(`tmpdir=${x}`);const O=d.resolve(".");p.debug(`currentdir=${O}`);process.chdir(x);if(n&&k){p.startGroup(`Cloning ${t}`);yield h.clone(_,r,".");p.endGroup()}else{p.startGroup(`Initializing local git repo`);yield h.init(".");yield h.checkout(r);p.endGroup()}let P=0;yield p.group(`Copying ${d.join(O,o)} to ${x}`,(()=>s(this,void 0,void 0,(function*(){const e=c?o:d.join(O,o);yield(0,u.copy)(e,x,{filter:(e,t)=>{if(E){p.info(`${e} => ${t}`)}else{if(P>1&&P%80===0){process.stdout.write("\n")}process.stdout.write(".");P++}return true},dereference:m}).catch((e=>{p.error(e)}));p.info(`${P} file(s) copied.`)}))));if(S){p.info(`Writing ${S} domain name to ${d.join(x,"CNAME")}`);yield l.writeFileSync(d.join(x,"CNAME"),S.trim())}if(w){p.info(`Disabling Jekyll support via ${d.join(x,".nojekyll")}`);yield l.writeFileSync(d.join(x,".nojekyll"),"")}const C=yield h.isDirty();p.debug(`isDirty=${C}`);if(n&&k&&!C){p.info("No changes to commit");return}const T=(0,a.default)(y)[0];p.startGroup(`Configuring git committer`);yield h.setConfig("user.name",T.name);yield h.setConfig("user.email",T.address);p.endGroup();if(!(yield h.hasChanges())){p.info("Nothing to deploy");return}p.startGroup(`Updating index of working tree`);yield h.add(".",E);p.endGroup();const D=(0,a.default)(g)[0];yield p.group(`Committing changes`,(()=>s(this,void 0,void 0,(function*(){yield h.commit(i,`${D.name} <${D.address}>`,v);yield h.showStat().then((e=>{p.info(e)}))}))));if(!b){p.startGroup(`Pushing ${o} directory to ${r} branch on ${t} repo`);if(!n){p.debug(`Force push`)}yield h.push(_,r,!n);p.endGroup();p.info(`Content of ${o} has been deployed to GitHub Pages!`)}else{p.warning(`Push disabled (dry run)`)}process.chdir(O)}catch(e){p.setFailed(e.message)}}))}run()},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var o=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(399);module.exports=r})(); //# sourceMappingURL=index.js.map