forked from redhat-actions/oc-login
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
4 lines (4 loc) · 75.8 KB
/
index.js
1
2
3
4
require('./sourcemap-register.js');(()=>{"use strict";var e={351:function(e,t,r){var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=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))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=o(r(87));const a=r(278);function issueCommand(e,t,r){const i=new Command(e,t,r);process.stdout.write(i.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+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 i=this.properties[r];if(i){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(i)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(e,t,r){var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=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))i(t,e,r);n(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(351);const l=r(717);const u=r(278);const c=o(r(87));const f=o(r(622));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 i=process.env["GITHUB_ENV"]||"";if(i){const t="_GitHubActionsFileCommandDelimeter_";const i=`${e}<<${t}${c.EOL}${r}${c.EOL}${t}`;l.issueCommand("ENV",i)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueCommand("PATH",e)}else{a.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 getBooleanInput(e,t){const r=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(i.includes(n))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(c.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.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){a.issueCommand("debug",{},e)}t.debug=debug;function error(e){a.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){a.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.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){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},717:function(e,t,r){var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=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))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const s=o(r(747));const a=o(r(87));const l=r(278);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,`${l.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},278:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});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},514:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(r(159));function exec(e,t,r){return i(this,void 0,void 0,(function*(){const i=o.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const s=new o.ToolRunner(n,t,r);return s.exec()}))}t.exec=exec},159:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(r(87));const s=n(r(614));const a=n(r(129));const l=n(r(622));const u=n(r(436));const c=n(r(962));const f=process.platform==="win32";class ToolRunner extends s.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 i=this._getSpawnArgs(e);let n=t?"":"[command]";if(f){if(this._isCmdFile()){n+=r;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${r}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(r);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=r;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,r){try{let i=t+e.toString();let n=i.indexOf(o.EOL);while(n>-1){const e=i.substring(0,n);r(e);i=i.substring(n+o.EOL.length);n=i.indexOf(o.EOL)}t=i}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){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 i of e){if(t.some((e=>e===i))){r=true;break}}if(!r){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.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 i=e.length;i>0;i--){t+=e[i-1];if(r&&e[i-1]==="\\"){t+="\\"}else if(e[i-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 i(this,void 0,void 0,(function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield u.which(this.toolPath,true);return new Promise(((e,t)=>{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)+o.EOL)}const i=new ExecState(r,this.toolPath);i.on("debug",(e=>{this._debug(e)}));const n=this._getSpawnFileName();const s=a.spawn(n,this._getSpawnArgs(r),this._getSpawnOptions(this.options,n));const l="";if(s.stdout){s.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)}this._processLineBuffer(e,l,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}const u="";if(s.stderr){s.stderr.on("data",(e=>{i.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)}this._processLineBuffer(e,u,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}s.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));s.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));s.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((r,i)=>{if(l.length>0){this.emit("stdline",l)}if(u.length>0){this.emit("errline",u)}s.removeAllListeners();if(r){t(r)}else{e(i)}}));if(this.options.input){if(!s.stdin){throw new Error("child process missing stdin")}s.stdin.end(this.options.input)}}))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let o=0;o<e.length;o++){const s=e.charAt(o);if(s==='"'){if(!i){r=!r}else{append(s)}continue}if(s==="\\"&&i){append(s);continue}if(s==="\\"&&r){i=true;continue}if(s===" "&&!r){if(n.length>0){t.push(n);n=""}continue}append(s)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends s.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=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()}}},962:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};var o;Object.defineProperty(t,"__esModule",{value:true});const s=r(357);const a=n(r(747));const l=n(r(622));o=a.promises,t.chmod=o.chmod,t.copyFile=o.copyFile,t.lstat=o.lstat,t.mkdir=o.mkdir,t.readdir=o.readdir,t.readlink=o.readlink,t.rename=o.rename,t.rmdir=o.rmdir,t.stat=o.stat,t.symlink=o.symlink,t.unlink=o.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return i(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 i(this,void 0,void 0,(function*(){const i=r?yield t.stat(e):yield t.lstat(e);return i.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 mkdirP(e,r=1e3,n=1){return i(this,void 0,void 0,(function*(){s.ok(e,"a path argument must be provided");e=l.resolve(e);if(n>=r)return t.mkdir(e);try{yield t.mkdir(e);return}catch(i){switch(i.code){case"ENOENT":{yield mkdirP(l.dirname(e),r,n+1);yield t.mkdir(e);return}default:{let r;try{r=yield t.stat(e)}catch(e){throw i}if(!r.isDirectory())throw i}}}}))}t.mkdirP=mkdirP;function tryGetExecutablePath(e,r){return i(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const o of r){e=n+o;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const r=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield t.readdir(r)){if(i===n.toUpperCase()){e=l.join(r,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){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()}},436:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(r(129));const s=n(r(622));const a=r(669);const l=n(r(962));const u=a.promisify(o.exec);function cp(e,t,r={}){return i(this,void 0,void 0,(function*(){const{force:i,recursive:n}=readCopyOptions(r);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!i){return}const a=o&&o.isDirectory()?s.join(t,s.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,a,0,i)}}else{if(s.relative(e,a)===""){throw new Error(`'${a}' and '${e}' are the same file`)}yield copyFile(e,a,i)}}))}t.cp=cp;function mv(e,t,r={}){return i(this,void 0,void 0,(function*(){if(yield l.exists(t)){let i=true;if(yield l.isDirectory(t)){t=s.join(t,s.basename(e));i=yield l.exists(t)}if(i){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(s.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return i(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){try{if(yield l.isDirectory(e,true)){yield u(`rd /s /q "${e}"`)}else{yield u(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield l.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield l.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm -rf "${e}"`)}else{yield l.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return i(this,void 0,void 0,(function*(){yield l.mkdirP(e)}))}t.mkdirP=mkdirP;function which(e,t){return i(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(l.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 i(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(s.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const r=yield l.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(s.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(s.delimiter)){if(e){r.push(e)}}}const i=[];for(const n of r){const r=yield l.tryGetExecutablePath(s.join(n,e),t);if(r){i.push(r)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);return{force:t,recursive:r}}function cpDirRecursive(e,t,r,n){return i(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield l.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const a=yield l.lstat(i);if(a.isDirectory()){yield cpDirRecursive(i,s,r,n)}else{yield copyFile(i,s,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,r){return i(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const r=yield l.readlink(e);yield l.symlink(r,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||r){yield l.copyFile(e,t)}}))}},357:e=>{e.exports=require("assert")},129:e=>{e.exports=require("child_process")},614:e=>{e.exports=require("events")},747:e=>{e.exports=require("fs")},87:e=>{e.exports=require("os")},622:e=>{e.exports=require("path")},669:e=>{e.exports=require("util")}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{__nccwpck_require__.r(r);var e=__nccwpck_require__(186);var t=__nccwpck_require__(622);var i=__nccwpck_require__(747);var n=__nccwpck_require__(669);var o;(function(e){e["CERTIFICATE_AUTHORITY_DATA"]="certificate_authority_data";e["INSECURE_SKIP_TLS_VERIFY"]="insecure_skip_tls_verify";e["LOGOUT"]="logout";e["NAMESPACE"]="namespace";e["OPENSHIFT_PASSWORD"]="openshift_password";e["OPENSHIFT_SERVER_URL"]="openshift_server_url";e["OPENSHIFT_TOKEN"]="openshift_token";e["OPENSHIFT_USERNAME"]="openshift_username";e["REVEAL_CLUSTER_NAME"]="reveal_cluster_name"})(o||(o={}));var s;(function(e){})(s||(s={}));var a=__nccwpck_require__(514);const l=require("stream");class CmdOutputHider extends l.Writable{constructor(e,t){super();this.outStream=e;this.outContents=t;this.hasEchoedCmdLine=false}write(e){if(!this.hasEchoedCmdLine){this.outStream.write(e);if(e.toString().includes("\n")){this.hasEchoedCmdLine=true;this.outStream.write(`*** Suppressing command output\n`)}}else{this.outContents+=e.toString()}return false}getContents(){return this.outContents}}let u;function getOS(){if(u==null){const t=process.platform;if(t==="win32"){u="windows"}else if(t==="darwin"){u="macos"}else if(t!=="linux"){e.warning(`Unrecognized OS "${t}"`);u="linux"}else{u="linux"}}return u}const c=getOS()==="windows"?"oc.exe":"oc";var f;(function(r){let i;(function(e){e["Login"]="login";e["Logout"]="logout";e["Config"]="config";e["View"]="view";e["SetContext"]="set-context";e["CurrentContext"]="current-context";e["Whoami"]="whoami"})(i=r.Commands||(r.Commands={}));let n;(function(e){e["ServerURL"]="server";e["Token"]="token";e["Username"]="username";e["Password"]="password";e["SkipTLSVerify"]="insecure-skip-tls-verify";e["CertificateAuthority"]="certificate-authority";e["Flatten"]="flatten";e["Minify"]="minify";e["Namespace"]="namespace";e["Current"]="current"})(n=r.Flags||(r.Flags={}));function getOptions(e){return Object.entries(e).reduce(((e,t)=>{const[r,i]=t;if(i==null){return e}let n="--"+r;if(i!==""){n+=`=${i}`}e.push(n);return e}),[])}r.getOptions=getOptions;async function exec(r,i={}){let n="";let o="";const s={...i};s.ignoreReturnCode=true;if(i.hideOutput){const e=i.outStream||process.stdout;s.outStream=new CmdOutputHider(e,n)}s.listeners={stdout:e=>{n+=e.toString()},stderr:e=>{o+=e.toString()}};if(i.group){const t=[c,...r].join(" ");e.startGroup(t)}try{const l=await a.exec(c,r,s);if(i.ignoreReturnCode!==true&&l!==0){let e=`${t.basename(c)} exited with code ${l}`;if(o){e+=`\n${o}`}throw new Error(e)}return{exitCode:l,output:n,error:o}}finally{if(i.group){e.endGroup()}}}r.exec=exec})(f||(f={}));const p=f;var d;(function(r){function getAuthInputs(){const t=e.getInput(o.OPENSHIFT_SERVER_URL,{required:true});if(t){e.debug("Found OpenShift Server URL")}const r=e.getInput(o.CERTIFICATE_AUTHORITY_DATA);const i=e.getInput(o.INSECURE_SKIP_TLS_VERIFY)==="true";const n={serverURL:t,certAuthorityData:r,skipTlsVerify:i};const s=e.getInput(o.OPENSHIFT_USERNAME);const a=e.getInput(o.OPENSHIFT_PASSWORD);if(s&&a){e.debug("Found OpenShift credentials");return{...n,credentials:{username:s,password:a}}}const l=e.getInput(o.OPENSHIFT_TOKEN);if(l){e.debug("Found OpenShift Token");return{...n,token:l}}throw new Error(`Failed to login: Required action inputs are missing. `+`Either "${o.OPENSHIFT_TOKEN}", or both "${o.OPENSHIFT_USERNAME}" and `+`"${o.OPENSHIFT_PASSWORD}" must be set.`)}const s="openshift-ca.crt";async function writeOutCA(r){const o=t.join(process.cwd(),s);e.info(`Writing out certificate authority data to ${o}`);await(0,n.promisify)(i.writeFile)(o,r);return o}async function login(){const t=getAuthInputs();let r;if(t.token){e.info("Authenticating using token");r={token:t.token}}else if(t.credentials){e.info("Authenticating using credentials");r={username:t.credentials.username,password:t.credentials.password}}else{throw new Error("Neither a token nor credentials was provided.")}r[p.Flags.ServerURL]=t.serverURL;if(t.skipTlsVerify){r[p.Flags.SkipTLSVerify]=""}if(t.certAuthorityData){const e=await writeOutCA(t.certAuthorityData);r[p.Flags.CertificateAuthority]=e}const i=[p.Commands.Login,...p.getOptions(r)];await p.exec(i);await p.exec([p.Commands.Whoami])}r.login=login;async function logout(){await p.exec([p.Commands.Logout])}r.logout=logout})(d||(d={}));const h=d;
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,t){var r,i,n,o;if(t){o=Object.keys(t);for(r=0,i=o.length;r<i;r+=1){n=o[r];e[n]=t[n]}}return e}function repeat(e,t){var r="",i;for(i=0;i<t;i+=1){r+=e}return r}function isNegativeZero(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var m=isNothing;var g=isObject;var v=toArray;var w=repeat;var y=isNegativeZero;var S=extend;var _={isNothing:m,isObject:g,toArray:v,repeat:w,isNegativeZero:y,extend:S};function formatError(e,t){var r="",i=e.reason||"(unknown reason)";if(!e.mark)return i;if(e.mark.name){r+='in "'+e.mark.name+'" '}r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!t&&e.mark.snippet){r+="\n\n"+e.mark.snippet}return i+" "+r}function YAMLException$1(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException$1.prototype=Object.create(Error.prototype);YAMLException$1.prototype.constructor=YAMLException$1;YAMLException$1.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};var b=YAMLException$1;function getLine(e,t,r,i,n){var o="";var s="";var a=Math.floor(n/2)-1;if(i-t>a){o=" ... ";t=i-a+o.length}if(r-i>a){s=" ...";r=i+a-s.length}return{str:o+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+o.length}}function padStart(e,t){return _.repeat(" ",t-e.length)+e}function makeSnippet(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var r=/\r?\n|\r|\0/g;var i=[0];var n=[];var o;var s=-1;while(o=r.exec(e.buffer)){n.push(o.index);i.push(o.index+o[0].length);if(e.position<=o.index&&s<0){s=i.length-2}}if(s<0)s=i.length-1;var a="",l,u;var c=Math.min(e.line+t.linesAfter,n.length).toString().length;var f=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore;l++){if(s-l<0)break;u=getLine(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),f);a=_.repeat(" ",t.indent)+padStart((e.line-l+1).toString(),c)+" | "+u.str+"\n"+a}u=getLine(e.buffer,i[s],n[s],e.position,f);a+=_.repeat(" ",t.indent)+padStart((e.line+1).toString(),c)+" | "+u.str+"\n";a+=_.repeat("-",t.indent+c+3+u.pos)+"^"+"\n";for(l=1;l<=t.linesAfter;l++){if(s+l>=n.length)break;u=getLine(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),f);a+=_.repeat(" ",t.indent)+padStart((e.line+l+1).toString(),c)+" | "+u.str+"\n"}return a.replace(/\n$/,"")}var E=makeSnippet;var C=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var A=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))}))}return t}function Type$1(e,t){t=t||{};Object.keys(t).forEach((function(t){if(C.indexOf(t)===-1){throw new b('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(A.indexOf(this.kind)===-1){throw new b('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}var O=Type$1;function compileList(e,t){var r=[];e[t].forEach((function(e){var t=r.length;r.forEach((function(r,i){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t=i}}));r[t]=e}));return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function collectType(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(collectType)}return e}function Schema$1(e){return this.extend(e)}Schema$1.prototype.extend=function extend(e){var t=[];var r=[];if(e instanceof O){r.push(e)}else if(Array.isArray(e)){r=r.concat(e)}else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit))){if(e.implicit)t=t.concat(e.implicit);if(e.explicit)r=r.concat(e.explicit)}else{throw new b("Schema.extend argument should be a Type, [ Type ], "+"or a schema definition ({ implicit: [...], explicit: [...] })")}t.forEach((function(e){if(!(e instanceof O)){throw new b("Specified list of YAML types (or a single Type object) contains a non-Type object.")}if(e.loadKind&&e.loadKind!=="scalar"){throw new b("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}if(e.multi){throw new b("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}}));r.forEach((function(e){if(!(e instanceof O)){throw new b("Specified list of YAML types (or a single Type object) contains a non-Type object.")}}));var i=Object.create(Schema$1.prototype);i.implicit=(this.implicit||[]).concat(t);i.explicit=(this.explicit||[]).concat(r);i.compiledImplicit=compileList(i,"implicit");i.compiledExplicit=compileList(i,"explicit");i.compiledTypeMap=compileMap(i.compiledImplicit,i.compiledExplicit);return i};var x=Schema$1;var k=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}});var I=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}});var T=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}});var N=new x({explicit:[k,I,T]});function resolveYamlNull(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}var P=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function resolveYamlBoolean(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var L=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var t=e.length,r=0,i=false,n;if(!t)return false;n=e[r];if(n==="-"||n==="+"){n=e[++r]}if(n==="0"){if(r+1===t)return true;n=e[++r];if(n==="b"){r++;for(;r<t;r++){n=e[r];if(n==="_")continue;if(n!=="0"&&n!=="1")return false;i=true}return i&&n!=="_"}if(n==="x"){r++;for(;r<t;r++){n=e[r];if(n==="_")continue;if(!isHexCode(e.charCodeAt(r)))return false;i=true}return i&&n!=="_"}if(n==="o"){r++;for(;r<t;r++){n=e[r];if(n==="_")continue;if(!isOctCode(e.charCodeAt(r)))return false;i=true}return i&&n!=="_"}}if(n==="_")return false;for(;r<t;r++){n=e[r];if(n==="_")continue;if(!isDecCode(e.charCodeAt(r))){return false}i=true}if(!i||n==="_")return false;return true}function constructYamlInteger(e){var t=e,r=1,i;if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}i=t[0];if(i==="-"||i==="+"){if(i==="-")r=-1;t=t.slice(1);i=t[0]}if(t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function isInteger(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!_.isNegativeZero(e))}var F=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});var j=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!j.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var t,r;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return r*parseFloat(t,10)}var M=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(_.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return M.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_.isNegativeZero(e))}var $=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});var R=N.extend({implicit:[P,L,F,$]});var D=R;var W=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var Y=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(W.exec(e)!==null)return true;if(Y.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var t,r,i,n,o,s,a,l=0,u=null,c,f,p;t=W.exec(e);if(t===null)t=Y.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];i=+t[2]-1;n=+t[3];if(!t[4]){return new Date(Date.UTC(r,i,n))}o=+t[4];s=+t[5];a=+t[6];if(t[7]){l=t[7].slice(0,3);while(l.length<3){l+="0"}l=+l}if(t[9]){c=+t[10];f=+(t[11]||0);u=(c*60+f)*6e4;if(t[9]==="-")u=-u}p=new Date(Date.UTC(r,i,n,o,s,a,l));if(u)p.setTime(p.getTime()-u);return p}function representYamlTimestamp(e){return e.toISOString()}var U=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(e){return e==="<<"||e===null}var B=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var t,r,i=0,n=e.length,o=q;for(r=0;r<n;r++){t=o.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;i+=6}return i%8===0}function constructYamlBinary(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=q,s=0,a=[];for(t=0;t<n;t++){if(t%4===0&&t){a.push(s>>16&255);a.push(s>>8&255);a.push(s&255)}s=s<<6|o.indexOf(i.charAt(t))}r=n%4*6;if(r===0){a.push(s>>16&255);a.push(s>>8&255);a.push(s&255)}else if(r===18){a.push(s>>10&255);a.push(s>>2&255)}else if(r===12){a.push(s>>4&255)}return new Uint8Array(a)}function representYamlBinary(e){var t="",r=0,i,n,o=e.length,s=q;for(i=0;i<o;i++){if(i%3===0&&i){t+=s[r>>18&63];t+=s[r>>12&63];t+=s[r>>6&63];t+=s[r&63]}r=(r<<8)+e[i]}n=o%3;if(n===0){t+=s[r>>18&63];t+=s[r>>12&63];t+=s[r>>6&63];t+=s[r&63]}else if(n===2){t+=s[r>>10&63];t+=s[r>>4&63];t+=s[r<<2&63];t+=s[64]}else if(n===1){t+=s[r>>2&63];t+=s[r<<4&63];t+=s[64];t+=s[64]}return t}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var H=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});var V=Object.prototype.hasOwnProperty;var G=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,i,n,o,s,a=e;for(r=0,i=a.length;r<i;r+=1){n=a[r];s=false;if(G.call(n)!=="[object Object]")return false;for(o in n){if(V.call(n,o)){if(!s)s=true;else return false}}if(!s)return false;if(t.indexOf(o)===-1)t.push(o);else return false}return true}function constructYamlOmap(e){return e!==null?e:[]}var K=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});var Q=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,i,n,o,s=e;o=new Array(s.length);for(t=0,r=s.length;t<r;t+=1){i=s[t];if(Q.call(i)!=="[object Object]")return false;n=Object.keys(i);if(n.length!==1)return false;o[t]=[n[0],i[n[0]]]}return true}function constructYamlPairs(e){if(e===null)return[];var t,r,i,n,o,s=e;o=new Array(s.length);for(t=0,r=s.length;t<r;t+=1){i=s[t];n=Object.keys(i);o[t]=[n[0],i[n[0]]]}return o}var Z=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});var z=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(z.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}var J=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});var X=D.extend({implicit:[U,B],explicit:[H,K,Z,J]});var ee=Object.prototype.hasOwnProperty;var te=1;var re=2;var ie=3;var ne=4;var oe=1;var se=2;var ae=3;var le=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var ue=/[\x85\u2028\u2029]/;var ce=/[,\[\]\{\}]/;var fe=/^(?:!|!!|![a-z\-]+!)$/i;var pe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var de=new Array(256);var he=new Array(256);for(var me=0;me<256;me++){de[me]=simpleEscapeSequence(me)?1:0;he[me]=simpleEscapeSequence(me)}function State$1(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||X;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=E(r);return new b(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var ge={YAML:function handleYamlDirective(e,t,r){var i,n,o;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(i===null){throwError(e,"ill-formed argument of the YAML directive")}n=parseInt(i[1],10);o=parseInt(i[2],10);if(n!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=o<2;if(o!==1&&o!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var i,n;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}i=r[0];n=r[1];if(!fe.test(i)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(ee.call(e.tagMap,i)){throwError(e,'there is a previously declared suffix for "'+i+'" tag handle')}if(!pe.test(n)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{n=decodeURIComponent(n)}catch(t){throwError(e,"tag prefix is malformed: "+n)}e.tagMap[i]=n}};function captureSegment(e,t,r,i){var n,o,s,a;if(t<r){a=e.input.slice(t,r);if(i){for(n=0,o=a.length;n<o;n+=1){s=a.charCodeAt(n);if(!(s===9||32<=s&&s<=1114111)){throwError(e,"expected valid JSON character")}}}else if(le.test(a)){throwError(e,"the stream contains non-printable characters")}e.result+=a}}function mergeMappings(e,t,r,i){var n,o,s,a;if(!_.isObject(r)){throwError(e,"cannot merge mappings; the provided source object is unacceptable")}n=Object.keys(r);for(s=0,a=n.length;s<a;s+=1){o=n[s];if(!ee.call(t,o)){t[o]=r[o];i[o]=true}}}function storeMappingPair(e,t,r,i,n,o,s,a,l){var u,c;if(Array.isArray(n)){n=Array.prototype.slice.call(n);for(u=0,c=n.length;u<c;u+=1){if(Array.isArray(n[u])){throwError(e,"nested arrays are not supported inside keys")}if(typeof n==="object"&&_class(n[u])==="[object Object]"){n[u]="[object Object]"}}}if(typeof n==="object"&&_class(n)==="[object Object]"){n="[object Object]"}n=String(n);if(t===null){t={}}if(i==="tag:yaml.org,2002:merge"){if(Array.isArray(o)){for(u=0,c=o.length;u<c;u+=1){mergeMappings(e,t,o[u],r)}}else{mergeMappings(e,t,o,r)}}else{if(!e.json&&!ee.call(r,n)&&ee.call(t,n)){e.line=s||e.line;e.lineStart=a||e.lineStart;e.position=l||e.position;throwError(e,"duplicated mapping key")}if(n==="__proto__"){Object.defineProperty(t,n,{configurable:true,enumerable:true,writable:true,value:o})}else{t[n]=o}delete r[n]}return t}function readLineBreak(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{throwError(e,"a line break is expected")}e.line+=1;e.lineStart=e.position;e.firstTabInLine=-1}function skipSeparationSpace(e,t,r){var i=0,n=e.input.charCodeAt(e.position);while(n!==0){while(is_WHITE_SPACE(n)){if(n===9&&e.firstTabInLine===-1){e.firstTabInLine=e.position}n=e.input.charCodeAt(++e.position)}if(t&&n===35){do{n=e.input.charCodeAt(++e.position)}while(n!==10&&n!==13&&n!==0)}if(is_EOL(n)){readLineBreak(e);n=e.input.charCodeAt(e.position);i++;e.lineIndent=0;while(n===32){e.lineIndent++;n=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&i!==0&&e.lineIndent<r){throwWarning(e,"deficient indentation")}return i}function testDocumentSeparator(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||is_WS_OR_EOL(r)){return true}}return false}function writeFoldedLines(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=_.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var i,n,o,s,a,l,u,c,f=e.kind,p=e.result,d;d=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(d)||is_FLOW_INDICATOR(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96){return false}if(d===63||d===45){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){return false}}e.kind="scalar";e.result="";o=s=e.position;a=false;while(d!==0){if(d===58){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){break}}else if(d===35){i=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(i)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(d)){break}else if(is_EOL(d)){l=e.line;u=e.lineStart;c=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){a=true;d=e.input.charCodeAt(e.position);continue}else{e.position=s;e.line=l;e.lineStart=u;e.lineIndent=c;break}}if(a){captureSegment(e,o,s,false);writeFoldedLines(e,e.line-l);o=s=e.position;a=false}if(!is_WHITE_SPACE(d)){s=e.position+1}d=e.input.charCodeAt(++e.position)}captureSegment(e,o,s,false);if(e.result){return true}e.kind=f;e.result=p;return false}function readSingleQuotedScalar(e,t){var r,i,n;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;i=n=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,i,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){i=e.position;e.position++;n=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,i,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));i=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,i,n,o,s,a;a=e.input.charCodeAt(e.position);if(a!==34){return false}e.kind="scalar";e.result="";e.position++;r=i=e.position;while((a=e.input.charCodeAt(e.position))!==0){if(a===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(a===92){captureSegment(e,r,e.position,true);a=e.input.charCodeAt(++e.position);if(is_EOL(a)){skipSeparationSpace(e,false,t)}else if(a<256&&de[a]){e.result+=he[a];e.position++}else if((s=escapedHexLen(a))>0){n=s;o=0;for(;n>0;n--){a=e.input.charCodeAt(++e.position);if((s=fromHexCode(a))>=0){o=(o<<4)+s}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(o);e.position++}else{throwError(e,"unknown escape sequence")}r=i=e.position}else if(is_EOL(a)){captureSegment(e,r,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,i,n,o,s=e.tag,a,l=e.anchor,u,c,f,p,d,h=Object.create(null),m,g,v,w;w=e.input.charCodeAt(e.position);if(w===91){c=93;d=false;a=[]}else if(w===123){c=125;d=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}w=e.input.charCodeAt(++e.position);while(w!==0){skipSeparationSpace(e,true,t);w=e.input.charCodeAt(e.position);if(w===c){e.position++;e.tag=s;e.anchor=l;e.kind=d?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(w===44){throwError(e,"expected the node content, but found ','")}g=m=v=null;f=p=false;if(w===63){u=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(u)){f=p=true;e.position++;skipSeparationSpace(e,true,t)}}i=e.line;n=e.lineStart;o=e.position;composeNode(e,t,te,false,true);g=e.tag;m=e.result;skipSeparationSpace(e,true,t);w=e.input.charCodeAt(e.position);if((p||e.line===i)&&w===58){f=true;w=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,te,false,true);v=e.result}if(d){storeMappingPair(e,a,h,g,m,v,i,n,o)}else if(f){a.push(storeMappingPair(e,null,h,g,m,v,i,n,o))}else{a.push(m)}skipSeparationSpace(e,true,t);w=e.input.charCodeAt(e.position);if(w===44){r=true;w=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,i,n=oe,o=false,s=false,a=t,l=0,u=false,c,f;f=e.input.charCodeAt(e.position);if(f===124){i=false}else if(f===62){i=true}else{return false}e.kind="scalar";e.result="";while(f!==0){f=e.input.charCodeAt(++e.position);if(f===43||f===45){if(oe===n){n=f===43?ae:se}else{throwError(e,"repeat of a chomping mode identifier")}}else if((c=fromDecimalCode(f))>=0){if(c===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!s){a=t+c-1;s=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(f)){do{f=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(f));if(f===35){do{f=e.input.charCodeAt(++e.position)}while(!is_EOL(f)&&f!==0)}}while(f!==0){readLineBreak(e);e.lineIndent=0;f=e.input.charCodeAt(e.position);while((!s||e.lineIndent<a)&&f===32){e.lineIndent++;f=e.input.charCodeAt(++e.position)}if(!s&&e.lineIndent>a){a=e.lineIndent}if(is_EOL(f)){l++;continue}if(e.lineIndent<a){if(n===ae){e.result+=_.repeat("\n",o?1+l:l)}else if(n===oe){if(o){e.result+="\n"}}break}if(i){if(is_WHITE_SPACE(f)){u=true;e.result+=_.repeat("\n",o?1+l:l)}else if(u){u=false;e.result+=_.repeat("\n",l+1)}else if(l===0){if(o){e.result+=" "}}else{e.result+=_.repeat("\n",l)}}else{e.result+=_.repeat("\n",o?1+l:l)}o=true;s=true;l=0;r=e.position;while(!is_EOL(f)&&f!==0){f=e.input.charCodeAt(++e.position)}captureSegment(e,r,e.position,false)}return true}function readBlockSequence(e,t){var r,i=e.tag,n=e.anchor,o=[],s,a=false,l;if(e.firstTabInLine!==-1)return false;if(e.anchor!==null){e.anchorMap[e.anchor]=o}l=e.input.charCodeAt(e.position);while(l!==0){if(e.firstTabInLine!==-1){e.position=e.firstTabInLine;throwError(e,"tab characters must not be used in indentation")}if(l!==45){break}s=e.input.charCodeAt(e.position+1);if(!is_WS_OR_EOL(s)){break}a=true;e.position++;if(skipSeparationSpace(e,true,-1)){if(e.lineIndent<=t){o.push(null);l=e.input.charCodeAt(e.position);continue}}r=e.line;composeNode(e,t,ie,false,true);o.push(e.result);skipSeparationSpace(e,true,-1);l=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&l!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(a){e.tag=i;e.anchor=n;e.kind="sequence";e.result=o;return true}return false}function readBlockMapping(e,t,r){var i,n,o,s,a,l,u=e.tag,c=e.anchor,f={},p=Object.create(null),d=null,h=null,m=null,g=false,v=false,w;if(e.firstTabInLine!==-1)return false;if(e.anchor!==null){e.anchorMap[e.anchor]=f}w=e.input.charCodeAt(e.position);while(w!==0){if(!g&&e.firstTabInLine!==-1){e.position=e.firstTabInLine;throwError(e,"tab characters must not be used in indentation")}i=e.input.charCodeAt(e.position+1);o=e.line;if((w===63||w===58)&&is_WS_OR_EOL(i)){if(w===63){if(g){storeMappingPair(e,f,p,d,h,null,s,a,l);d=h=m=null}v=true;g=true;n=true}else if(g){g=false;n=true}else{throwError(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;w=i}else{s=e.line;a=e.lineStart;l=e.position;if(!composeNode(e,r,re,false,true)){break}if(e.line===o){w=e.input.charCodeAt(e.position);while(is_WHITE_SPACE(w)){w=e.input.charCodeAt(++e.position)}if(w===58){w=e.input.charCodeAt(++e.position);if(!is_WS_OR_EOL(w)){throwError(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(g){storeMappingPair(e,f,p,d,h,null,s,a,l);d=h=m=null}v=true;g=false;n=false;d=e.tag;h=e.result}else if(v){throwError(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=u;e.anchor=c;return true}}else if(v){throwError(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=u;e.anchor=c;return true}}if(e.line===o||e.lineIndent>t){if(g){s=e.line;a=e.lineStart;l=e.position}if(composeNode(e,t,ne,true,n)){if(g){h=e.result}else{m=e.result}}if(!g){storeMappingPair(e,f,p,d,h,m,s,a,l);d=h=m=null}skipSeparationSpace(e,true,-1);w=e.input.charCodeAt(e.position)}if((e.line===o||e.lineIndent>t)&&w!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(g){storeMappingPair(e,f,p,d,h,null,s,a,l)}if(v){e.tag=u;e.anchor=c;e.kind="mapping";e.result=f}return v}function readTagProperty(e){var t,r=false,i=false,n,o,s;s=e.input.charCodeAt(e.position);if(s!==33)return false;if(e.tag!==null){throwError(e,"duplication of a tag property")}s=e.input.charCodeAt(++e.position);if(s===60){r=true;s=e.input.charCodeAt(++e.position)}else if(s===33){i=true;n="!!";s=e.input.charCodeAt(++e.position)}else{n="!"}t=e.position;if(r){do{s=e.input.charCodeAt(++e.position)}while(s!==0&&s!==62);if(e.position<e.length){o=e.input.slice(t,e.position);s=e.input.charCodeAt(++e.position)}else{throwError(e,"unexpected end of the stream within a verbatim tag")}}else{while(s!==0&&!is_WS_OR_EOL(s)){if(s===33){if(!i){n=e.input.slice(t-1,e.position+1);if(!fe.test(n)){throwError(e,"named tag handle cannot contain such characters")}i=true;t=e.position+1}else{throwError(e,"tag suffix cannot contain exclamation marks")}}s=e.input.charCodeAt(++e.position)}o=e.input.slice(t,e.position);if(ce.test(o)){throwError(e,"tag suffix cannot contain flow indicator characters")}}if(o&&!pe.test(o)){throwError(e,"tag name cannot contain such characters: "+o)}try{o=decodeURIComponent(o)}catch(t){throwError(e,"tag name is malformed: "+o)}if(r){e.tag=o}else if(ee.call(e.tagMap,n)){e.tag=e.tagMap[n]+o}else if(n==="!"){e.tag="!"+o}else if(n==="!!"){e.tag="tag:yaml.org,2002:"+o}else{throwError(e,'undeclared tag handle "'+n+'"')}return true}function readAnchorProperty(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){throwError(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){throwError(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}function readAlias(e){var t,r,i;i=e.input.charCodeAt(e.position);if(i!==42)return false;i=e.input.charCodeAt(++e.position);t=e.position;while(i!==0&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i)){i=e.input.charCodeAt(++e.position)}if(e.position===t){throwError(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!ee.call(e.anchorMap,r)){throwError(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];skipSeparationSpace(e,true,-1);return true}function composeNode(e,t,r,i,n){var o,s,a,l=1,u=false,c=false,f,p,d,h,m,g;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;o=s=a=ne===r||ie===r;if(i){if(skipSeparationSpace(e,true,-1)){u=true;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}}if(l===1){while(readTagProperty(e)||readAnchorProperty(e)){if(skipSeparationSpace(e,true,-1)){u=true;a=o;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}else{a=false}}}if(a){a=u||n}if(l===1||ne===r){if(te===r||re===r){m=t}else{m=t+1}g=e.position-e.lineStart;if(l===1){if(a&&(readBlockSequence(e,g)||readBlockMapping(e,g,m))||readFlowCollection(e,m)){c=true}else{if(s&&readBlockScalar(e,m)||readSingleQuotedScalar(e,m)||readDoubleQuotedScalar(e,m)){c=true}else if(readAlias(e)){c=true;if(e.tag!==null||e.anchor!==null){throwError(e,"alias node should not have any properties")}}else if(readPlainScalar(e,m,te===r)){c=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(l===0){c=a&&readBlockSequence(e,g)}}if(e.tag===null){if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}else if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){throwError(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(f=0,p=e.implicitTypes.length;f<p;f+=1){h=e.implicitTypes[f];if(h.resolve(e.result)){e.result=h.construct(e.result);e.tag=h.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(e.tag!=="!"){if(ee.call(e.typeMap[e.kind||"fallback"],e.tag)){h=e.typeMap[e.kind||"fallback"][e.tag]}else{h=null;d=e.typeMap.multi[e.kind||"fallback"];for(f=0,p=d.length;f<p;f+=1){if(e.tag.slice(0,d[f].tag.length)===d[f].tag){h=d[f];break}}}if(!h){throwError(e,"unknown tag !<"+e.tag+">")}if(e.result!==null&&h.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"')}if(!h.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=h.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||c}function readDocument(e){var t=e.position,r,i,n,o=false,s;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((s=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);s=e.input.charCodeAt(e.position);if(e.lineIndent>0||s!==37){break}o=true;s=e.input.charCodeAt(++e.position);r=e.position;while(s!==0&&!is_WS_OR_EOL(s)){s=e.input.charCodeAt(++e.position)}i=e.input.slice(r,e.position);n=[];if(i.length<1){throwError(e,"directive name must not be less than one character in length")}while(s!==0){while(is_WHITE_SPACE(s)){s=e.input.charCodeAt(++e.position)}if(s===35){do{s=e.input.charCodeAt(++e.position)}while(s!==0&&!is_EOL(s));break}if(is_EOL(s))break;r=e.position;while(s!==0&&!is_WS_OR_EOL(s)){s=e.input.charCodeAt(++e.position)}n.push(e.input.slice(r,e.position))}if(s!==0)readLineBreak(e);if(ee.call(ge,i)){ge[i](e,i,n)}else{throwWarning(e,'unknown document directive "'+i+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(o){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,ne,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&ue.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position<e.length-1){throwError(e,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new State$1(e,t);var i=e.indexOf("\0");if(i!==-1){r.position=i;throwError(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){readDocument(r)}return r.documents}function loadAll$1(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var i=loadDocuments(e,r);if(typeof t!=="function"){return i}for(var n=0,o=i.length;n<o;n+=1){t(i[n])}}function load$1(e,t){var r=loadDocuments(e,t);if(r.length===0){return undefined}else if(r.length===1){return r[0]}throw new b("expected a single document in the stream, but found more")}var ve=loadAll$1;var we=load$1;var ye={loadAll:ve,load:we};var Se=Object.prototype.toString;var _e=Object.prototype.hasOwnProperty;var be=65279;var Ee=9;var Ce=10;var Ae=13;var Oe=32;var xe=33;var ke=34;var Ie=35;var Te=37;var Ne=38;var Pe=39;var Le=42;var Fe=44;var je=45;var Me=58;var $e=61;var Re=62;var De=63;var We=64;var Ye=91;var Ue=93;var Be=96;var qe=123;var He=124;var Ve=125;var Ge={};Ge[0]="\\0";Ge[7]="\\a";Ge[8]="\\b";Ge[9]="\\t";Ge[10]="\\n";Ge[11]="\\v";Ge[12]="\\f";Ge[13]="\\r";Ge[27]="\\e";Ge[34]='\\"';Ge[92]="\\\\";Ge[133]="\\N";Ge[160]="\\_";Ge[8232]="\\L";Ge[8233]="\\P";var Ke=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var Qe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,t){var r,i,n,o,s,a,l;if(t===null)return{};r={};i=Object.keys(t);for(n=0,o=i.length;n<o;n+=1){s=i[n];a=String(t[s]);if(s.slice(0,2)==="!!"){s="tag:yaml.org,2002:"+s.slice(2)}l=e.compiledTypeMap["fallback"][s];if(l&&_e.call(l.styleAliases,a)){a=l.styleAliases[a]}r[s]=a}return r}function encodeHex(e){var t,r,i;t=e.toString(16).toUpperCase();if(e<=255){r="x";i=2}else if(e<=65535){r="u";i=4}else if(e<=4294967295){r="U";i=8}else{throw new b("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+_.repeat("0",i-t.length)+t}var Ze=1,ze=2;function State(e){this.schema=e["schema"]||X;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=_.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=compileStyleMap(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.quotingType=e["quotingType"]==='"'?ze:Ze;this.forceQuotes=e["forceQuotes"]||false;this.replacer=typeof e["replacer"]==="function"?e["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(e,t){var r=_.repeat(" ",t),i=0,n=-1,o="",s,a=e.length;while(i<a){n=e.indexOf("\n",i);if(n===-1){s=e.slice(i);i=a}else{s=e.slice(i,n+1);i=n+1}if(s.length&&s!=="\n")o+=r;o+=s}return o}function generateNextLine(e,t){return"\n"+_.repeat(" ",e.indent*t)}function testImplicitResolving(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1){n=e.implicitTypes[r];if(n.resolve(t)){return true}}return false}function isWhitespace(e){return e===Oe||e===Ee}function isPrintable(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==be||65536<=e&&e<=1114111}function isNsCharOrWhitespace(e){return isPrintable(e)&&e!==be&&e!==Ae&&e!==Ce}function isPlainSafe(e,t,r){var i=isNsCharOrWhitespace(e);var n=i&&!isWhitespace(e);return(r?i:i&&e!==Fe&&e!==Ye&&e!==Ue&&e!==qe&&e!==Ve)&&e!==Ie&&!(t===Me&&!n)||isNsCharOrWhitespace(t)&&!isWhitespace(t)&&e===Ie||t===Me&&n}function isPlainSafeFirst(e){return isPrintable(e)&&e!==be&&!isWhitespace(e)&&e!==je&&e!==De&&e!==Me&&e!==Fe&&e!==Ye&&e!==Ue&&e!==qe&&e!==Ve&&e!==Ie&&e!==Ne&&e!==Le&&e!==xe&&e!==He&&e!==$e&&e!==Re&&e!==Pe&&e!==ke&&e!==Te&&e!==We&&e!==Be}function isPlainSafeLast(e){return!isWhitespace(e)&&e!==Me}function codePointAt(e,t){var r=e.charCodeAt(t),i;if(r>=55296&&r<=56319&&t+1<e.length){i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){return(r-55296)*1024+i-56320+65536}}return r}function needIndentIndicator(e){var t=/^\n* /;return t.test(e)}var Je=1,Xe=2,et=3,tt=4,rt=5;function chooseScalarStyle(e,t,r,i,n,o,s,a){var l;var u=0;var c=null;var f=false;var p=false;var d=i!==-1;var h=-1;var m=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||s){for(l=0;l<e.length;u>=65536?l+=2:l++){u=codePointAt(e,l);if(!isPrintable(u)){return rt}m=m&&isPlainSafe(u,c,a);c=u}}else{for(l=0;l<e.length;u>=65536?l+=2:l++){u=codePointAt(e,l);if(u===Ce){f=true;if(d){p=p||l-h-1>i&&e[h+1]!==" ";h=l}}else if(!isPrintable(u)){return rt}m=m&&isPlainSafe(u,c,a);c=u}p=p||d&&(l-h-1>i&&e[h+1]!==" ")}if(!f&&!p){if(m&&!s&&!n(e)){return Je}return o===ze?rt:Xe}if(r>9&&needIndentIndicator(e)){return rt}if(!s){return p?tt:et}return o===ze?rt:Xe}function writeScalar(e,t,r,i,n){e.dump=function(){if(t.length===0){return e.quotingType===ze?'""':"''"}if(!e.noCompatMode){if(Ke.indexOf(t)!==-1||Qe.test(t)){return e.quotingType===ze?'"'+t+'"':"'"+t+"'"}}var o=e.indent*Math.max(1,r);var s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o);var a=i||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,a,e.indent,s,testAmbiguity,e.quotingType,e.forceQuotes&&!i,n)){case Je:return t;case Xe:return"'"+t.replace(/'/g,"''")+"'";case et:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case tt:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,s),o));case rt:return'"'+escapeString(t)+'"';default:throw new b("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var i=e[e.length-1]==="\n";var n=i&&(e[e.length-2]==="\n"||e==="\n");var o=n?"+":i?"":"-";return r+o+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var i=function(){var i=e.indexOf("\n");i=i!==-1?i:e.length;r.lastIndex=i;return foldLine(e.slice(0,i),t)}();var n=e[0]==="\n"||e[0]===" ";var o;var s;while(s=r.exec(e)){var a=s[1],l=s[2];o=l[0]===" ";i+=a+(!n&&!o&&l!==""?"\n":"")+foldLine(l,t);n=o}return i}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var i;var n=0,o,s=0,a=0;var l="";while(i=r.exec(e)){a=i.index;if(a-n>t){o=s>n?s:a;l+="\n"+e.slice(n,o);n=o+1}s=a}l+="\n";if(e.length-n>t&&s>n){l+=e.slice(n,s)+"\n"+e.slice(s+1)}else{l+=e.slice(n)}return l.slice(1)}function escapeString(e){var t="";var r=0;var i;for(var n=0;n<e.length;r>=65536?n+=2:n++){r=codePointAt(e,n);i=Ge[r];if(!i&&isPrintable(r)){t+=e[n];if(r>=65536)t+=e[n+1]}else{t+=i||encodeHex(r)}}return t}function writeFlowSequence(e,t,r){var i="",n=e.tag,o,s,a;for(o=0,s=r.length;o<s;o+=1){a=r[o];if(e.replacer){a=e.replacer.call(r,String(o),a)}if(writeNode(e,t,a,false,false)||typeof a==="undefined"&&writeNode(e,t,null,false,false)){if(i!=="")i+=","+(!e.condenseFlow?" ":"");i+=e.dump}}e.tag=n;e.dump="["+i+"]"}function writeBlockSequence(e,t,r,i){var n="",o=e.tag,s,a,l;for(s=0,a=r.length;s<a;s+=1){l=r[s];if(e.replacer){l=e.replacer.call(r,String(s),l)}if(writeNode(e,t+1,l,true,true,false,true)||typeof l==="undefined"&&writeNode(e,t+1,null,true,true,false,true)){if(!i||n!==""){n+=generateNextLine(e,t)}if(e.dump&&Ce===e.dump.charCodeAt(0)){n+="-"}else{n+="- "}n+=e.dump}}e.tag=o;e.dump=n||"[]"}function writeFlowMapping(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,a,l,u,c;for(s=0,a=o.length;s<a;s+=1){c="";if(i!=="")c+=", ";if(e.condenseFlow)c+='"';l=o[s];u=r[l];if(e.replacer){u=e.replacer.call(r,l,u)}if(!writeNode(e,t,l,false,false)){continue}if(e.dump.length>1024)c+="? ";c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,u,false,false)){continue}c+=e.dump;i+=c}e.tag=n;e.dump="{"+i+"}"}function writeBlockMapping(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),a,l,u,c,f,p;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new b("sortKeys must be a boolean or a function")}for(a=0,l=s.length;a<l;a+=1){p="";if(!i||n!==""){p+=generateNextLine(e,t)}u=s[a];c=r[u];if(e.replacer){c=e.replacer.call(r,u,c)}if(!writeNode(e,t+1,u,true,true,true)){continue}f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(f){if(e.dump&&Ce===e.dump.charCodeAt(0)){p+="?"}else{p+="? "}}p+=e.dump;if(f){p+=generateNextLine(e,t)}if(!writeNode(e,t+1,c,true,f)){continue}if(e.dump&&Ce===e.dump.charCodeAt(0)){p+=":"}else{p+=": "}p+=e.dump;n+=p}e.tag=o;e.dump=n||"{}"}function detectType(e,t,r){var i,n,o,s,a,l;n=r?e.explicitTypes:e.implicitTypes;for(o=0,s=n.length;o<s;o+=1){a=n[o];if((a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t==="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r){if(a.multi&&a.representName){e.tag=a.representName(t)}else{e.tag=a.tag}}else{e.tag="?"}if(a.represent){l=e.styleMap[a.tag]||a.defaultStyle;if(Se.call(a.represent)==="[object Function]"){i=a.represent(t,l)}else if(_e.call(a.represent,l)){i=a.represent[l](t,l)}else{throw new b("!<"+a.tag+'> tag resolver accepts not "'+l+'" style')}e.dump=i}return true}}return false}function writeNode(e,t,r,i,n,o,s){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var a=Se.call(e.dump);var l=i;var u;if(i){i=e.flowLevel<0||e.flowLevel>t}var c=a==="[object Object]"||a==="[object Array]",f,p;if(c){f=e.duplicates.indexOf(r);p=f!==-1}if(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0){n=false}if(p&&e.usedDuplicates[f]){e.dump="*ref_"+f}else{if(c&&p&&!e.usedDuplicates[f]){e.usedDuplicates[f]=true}if(a==="[object Object]"){if(i&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,n);if(p){e.dump="&ref_"+f+e.dump}}else{writeFlowMapping(e,t,e.dump);if(p){e.dump="&ref_"+f+" "+e.dump}}}else if(a==="[object Array]"){if(i&&e.dump.length!==0){if(e.noArrayIndent&&!s&&t>0){writeBlockSequence(e,t-1,e.dump,n)}else{writeBlockSequence(e,t,e.dump,n)}if(p){e.dump="&ref_"+f+e.dump}}else{writeFlowSequence(e,t,e.dump);if(p){e.dump="&ref_"+f+" "+e.dump}}}else if(a==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,o,l)}}else if(a==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new b("unacceptable kind of an object to dump "+a)}if(e.tag!==null&&e.tag!=="?"){u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){u="!"+u}else if(u.slice(0,18)==="tag:yaml.org,2002:"){u="!!"+u.slice(18)}else{u="!<"+u+">"}e.dump=u+" "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],i=[],n,o;inspectNode(e,r,i);for(n=0,o=i.length;n<o;n+=1){t.duplicates.push(r[i[n]])}t.usedDuplicates=new Array(o)}function inspectNode(e,t,r){var i,n,o;if(e!==null&&typeof e==="object"){n=t.indexOf(e);if(n!==-1){if(r.indexOf(n)===-1){r.push(n)}}else{t.push(e);if(Array.isArray(e)){for(n=0,o=e.length;n<o;n+=1){inspectNode(e[n],t,r)}}else{i=Object.keys(e);for(n=0,o=i.length;n<o;n+=1){inspectNode(e[i[n]],t,r)}}}}}function dump$1(e,t){t=t||{};var r=new State(t);if(!r.noRefs)getDuplicateReferences(e,r);var i=e;if(r.replacer){i=r.replacer.call({"":i},"",i)}if(writeNode(r,0,i,true,true))return r.dump+"\n";return""}var it=dump$1;var nt={dump:it};function renamed(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+t+" instead, which is now safe by default.")}}var ot=O;var st=x;var at=N;var lt=R;var ut=D;var ct=X;var ft=ye.load;var pt=ye.loadAll;var dt=nt.dump;var ht=b;var mt={binary:H,float:$,map:T,null:P,pairs:Z,set:J,timestamp:U,bool:L,int:F,merge:B,omap:K,seq:I,str:k};var gt=renamed("safeLoad","load");var vt=renamed("safeLoadAll","loadAll");var wt=renamed("safeDump","dump");var yt={Type:ot,Schema:st,FAILSAFE_SCHEMA:at,JSON_SCHEMA:lt,CORE_SCHEMA:ut,DEFAULT_SCHEMA:ct,load:ft,loadAll:pt,dump:dt,YAMLException:ht,types:mt,safeLoad:gt,safeLoadAll:vt,safeDump:wt};const St=null&&yt;var _t;(function(r){const o="kubeconfig.yaml";const s="KUBECONFIG";async function maskSecrets(t){const r=await getKubeConfig();let i=ft(r);if(i==null){throw new Error(`Could not load Kubeconfig as yaml`)}i=i;if(!t){i.contexts.forEach((t=>{const r=t.context.cluster;if(r){e.debug(`Masking cluster name`);e.setSecret(r)}}))}i.users.forEach((t=>{const r=["client-certificate-data","client-key-data","token"];r.forEach((r=>{const i=t.user[r];if(i){e.debug(`Masking ${r}`);e.setSecret(i)}}))}))}r.maskSecrets=maskSecrets;function getKubeConfigPath(){let e;const r=process.env.GITHUB_WORKSPACE;if(r){e=r}else{e=process.cwd()}return t.resolve(e,o)}async function writeOutKubeConfig(){const t=await getKubeConfig();const r=getKubeConfigPath();e.info(`Writing out Kubeconfig to ${r}`);await(0,n.promisify)(i.writeFile)(r,t);await(0,n.promisify)(i.chmod)(r,"600");e.startGroup("Kubeconfig contents");e.info(t);e.endGroup();e.info(`Exporting ${s}=${r}`);e.exportVariable(s,r);return r}r.writeOutKubeConfig=writeOutKubeConfig;async function deleteKubeConfig(){const e=getKubeConfigPath();if(await(0,n.promisify)(i.exists)(e)){await(0,n.promisify)(i.unlink)(e)}}r.deleteKubeConfig=deleteKubeConfig;async function setCurrentContextNamespace(t){const r=(await p.exec([p.Commands.Config,p.Commands.CurrentContext])).output.trim();e.info(`Set current context's namespace to "${t}"`);const i=p.getOptions({namespace:t});await p.exec([p.Commands.Config,p.Commands.SetContext,r,...i])}r.setCurrentContextNamespace=setCurrentContextNamespace;async function getKubeConfig(){const e=p.getOptions({flatten:""});const t=await p.exec([p.Commands.Config,p.Commands.View,...e],{hideOutput:true});return t.output}})(_t||(_t={}));const bt=_t;const Et=!!process.env.STATE_isPost;async function run(){e.debug(`Runner OS is ${getOS()}`);e.debug(`Node version is ${process.version}`);await h.login();const t=e.getInput(o.REVEAL_CLUSTER_NAME)==="true";e.debug(`Reveal cluster name ? ${t}`);await bt.maskSecrets(t);const r=e.getInput(o.NAMESPACE);if(r){await bt.setCurrentContextNamespace(r)}else{e.info(`No namespace provided`)}await bt.writeOutKubeConfig()}async function logout(){await h.logout();await bt.deleteKubeConfig()}if(!Et){run().then((()=>{e.info("Success.")})).catch(e.setFailed)}else{const t=e.getBooleanInput(o.LOGOUT);if(t){logout().catch(e.setFailed)}}})();module.exports=r})();
//# sourceMappingURL=index.js.map