From 1ce0de19e0170085cb9bd5559a15b2e075182727 Mon Sep 17 00:00:00 2001 From: Webber Date: Sat, 25 Jan 2020 16:25:23 +0100 Subject: [PATCH] Add cache for Library --- builder/index.js | 2 +- package.json | 3 ++- src/index.js | 12 +++++++----- src/model/cache.js | 25 +++++++++++++++++++++++++ src/model/cache.test.js | 9 +++++++++ src/model/index.js | 10 ++++++++++ src/model/input.js | 2 +- src/model/unity.js | 7 +++++++ yarn.lock | 33 ++++++++++++++++++++++++++++++++- 9 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 src/model/cache.js create mode 100644 src/model/cache.test.js create mode 100644 src/model/index.js create mode 100644 src/model/unity.js diff --git a/builder/index.js b/builder/index.js index 74e06702..c79c25ce 100644 --- a/builder/index.js +++ b/builder/index.js @@ -1 +1 @@ -module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={i:r,l:false,exports:{}};e[r].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(329)}r(__webpack_require__);return startup()}({1:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,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?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const i=t(129);const a=t(622);const o=t(669);const u=t(672);const f=o.promisify(i.exec);function cp(e,r,t={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(t);const o=(yield u.exists(r))?yield u.stat(r):null;if(o&&o.isFile()&&!n){return}const f=o&&o.isDirectory()?a.join(r,a.basename(e)):r;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const s=yield u.stat(e);if(s.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,f,0,n)}}else{if(a.relative(e,f)===""){throw new Error(`'${f}' and '${e}' are the same file`)}yield copyFile(e,f,n)}})}r.cp=cp;function mv(e,r,t={}){return n(this,void 0,void 0,function*(){if(yield u.exists(r)){let n=true;if(yield u.isDirectory(r)){r=a.join(r,a.basename(e));n=yield u.exists(r)}if(n){if(t.force==null||t.force){yield rmRF(r)}else{throw new Error("Destination already exists")}}}yield mkdirP(a.dirname(r));yield u.rename(e,r)})}r.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(e,true)){yield f(`rd /s /q "${e}"`)}else{yield f(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield u.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let r=false;try{r=yield u.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(r){yield f(`rm -rf "${e}"`)}else{yield u.unlink(e)}}})}r.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield u.mkdirP(e)})}r.mkdirP=mkdirP;function which(e,r){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(r){const r=yield which(e,false);if(!r){if(u.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.`)}}}try{const r=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(a.delimiter)){if(e){r.push(e)}}}if(u.isRooted(e)){const t=yield u.tryGetExecutablePath(e,r);if(t){return t}return""}if(e.includes("/")||u.IS_WINDOWS&&e.includes("\\")){return""}const t=[];if(process.env.PATH){for(const e of process.env.PATH.split(a.delimiter)){if(e){t.push(e)}}}for(const n of t){const t=yield u.tryGetExecutablePath(n+a.sep+e,r);if(t){return t}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}r.which=which;function readCopyOptions(e){const r=e.force==null?true:e.force;const t=Boolean(e.recursive);return{force:r,recursive:t}}function cpDirRecursive(e,r,t,i){return n(this,void 0,void 0,function*(){if(t>=255)return;t++;yield mkdirP(r);const n=yield u.readdir(e);for(const a of n){const n=`${e}/${a}`;const o=`${r}/${a}`;const f=yield u.lstat(n);if(f.isDirectory()){yield cpDirRecursive(n,o,t,i)}else{yield copyFile(n,o,i)}}yield u.chmod(r,(yield u.stat(e)).mode)})}function copyFile(e,r,t){return n(this,void 0,void 0,function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(r);yield u.unlink(r)}catch(e){if(e.code==="EPERM"){yield u.chmod(r,"0666");yield u.unlink(r)}}const t=yield u.readlink(e);yield u.symlink(t,r,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(r))||t){yield u.copyFile(e,r)}})}},9:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,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?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const i=t(87);const a=t(614);const o=t(129);const u=t(622);const f=t(1);const s=t(672);const c=process.platform==="win32";class ToolRunner extends a.EventEmitter{constructor(e,r,t){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=r||[];this.options=t||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,r){const t=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=r?"":"[command]";if(c){if(this._isCmdFile()){i+=t;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${t}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(t);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=t;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,r,t){try{let n=r+e.toString();let a=n.indexOf(i.EOL);while(a>-1){const e=n.substring(0,a);t(e);n=n.substring(a+i.EOL.length);a=n.indexOf(i.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(c){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(c){if(this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const t of this.args){r+=" ";r+=e.windowsVerbatimArguments?t:this._windowsQuoteCmdArg(t)}r+='"';return[r]}}return this.args}_endsWith(e,r){return e.endsWith(r)}_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 r=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let t=false;for(const n of e){if(r.some(e=>e===n)){t=true;break}}if(!t){return e}let n='"';let i=true;for(let r=e.length;r>0;r--){n+=e[r-1];if(i&&e[r-1]==="\\"){n+="\\"}else if(e[r-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 r='"';let t=true;for(let n=e.length;n>0;n--){r+=e[n-1];if(t&&e[n-1]==="\\"){r+="\\"}else if(e[n-1]==='"'){t=true;r+="\\"}else{t=false}}r+='"';return r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const r={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};r.outStream=e.outStream||process.stdout;r.errStream=e.errStream||process.stderr;return r}_getSpawnOptions(e,r){e=e||{};const t={};t.cwd=e.cwd;t.env=e.env;t["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){t.argv0=`"${r}"`}return t}exec(){return n(this,void 0,void 0,function*(){if(!s.isRooted(this.toolPath)&&(this.toolPath.includes("/")||c&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.which(this.toolPath,true);return new Promise((e,r)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const t=this._cloneExecOptions(this.options);if(!t.silent&&t.outStream){t.outStream.write(this._getCommandString(t)+i.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const a=this._getSpawnFileName();const u=o.spawn(a,this._getSpawnArgs(t),this._getSpawnOptions(this.options,a));const f="";if(u.stdout){u.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!t.silent&&t.outStream){t.outStream.write(e)}this._processLineBuffer(e,f,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const s="";if(u.stderr){u.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,s,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}u.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});u.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});u.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",(t,n)=>{if(f.length>0){this.emit("stdline",f)}if(s.length>0){this.emit("errline",s)}u.removeAllListeners();if(t){r(t)}else{e(n)}})})})}}r.ToolRunner=ToolRunner;function argStringToArray(e){const r=[];let t=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let a=0;a0){r.push(i);i=""}continue}append(o)}if(i.length>0){r.push(i.trim())}return r}r.argStringToArray=argStringToArray;class ExecState extends a.EventEmitter{constructor(e,r){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(!r){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=r;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 r=`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(r)}e._setResult()}}},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},329:function(e,r,t){"use strict";t.r(r);var n=t(622);var i=t.n(n);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return i().basename(__dirname)==="model"}static get name(){return"unity-builder"}static get rootFolder(){if(action_Action.isRunningFromSource){return i().dirname(i().dirname(i().dirname(__filename)))}return i().dirname(i().dirname(__filename))}static get builderFolder(){return`${action_Action.rootFolder}/builder`}static get dockerfile(){return`${action_Action.builderFolder}/Dockerfile`}static get workspace(){return process.env.GITHUB_WORKSPACE}static checkCompatibility(){const e=process.platform;if(!action_Action.supportedPlatforms.includes(e)){throw new Error(`Currently ${e}-platform is not supported`)}}}var a=action_Action;var o=t(986);var u=typeof global=="object"&&global&&global.Object===Object&&global;var f=u;var s=typeof self=="object"&&self&&self.Object===Object&&self;var c=f||s||Function("return this")();var l=c;var v=l.Symbol;var d=v;var p=Object.prototype;var h=p.hasOwnProperty;var y=p.toString;var g=d?d.toStringTag:undefined;function getRawTag(e){var r=h.call(e,g),t=e[g];try{e[g]=undefined;var n=true}catch(e){}var i=y.call(e);if(n){if(r){e[g]=t}else{delete e[g]}}return i}var b=getRawTag;var m=Object.prototype;var _=m.toString;function objectToString(e){return _.call(e)}var w=objectToString;var x="[object Null]",S="[object Undefined]";var O=d?d.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?S:x}return O&&O in Object(e)?b(e):w(e)}var E=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var I=isObjectLike;var j="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||I(e)&&E(e)==j}var A=isSymbol;var R=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(A(e)){return R}return+e}var W=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t0){if(++r>=or){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var sr=shortOut;var cr=sr(Re);var lr=cr;var vr=/\{\n\/\* \[wrapped with (.+)\] \*/,dr=/,? & /;function getWrapDetails(e){var r=e.match(vr);return r?r[1].split(dr):[]}var pr=getWrapDetails;var hr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(e,r){var t=r.length;if(!t){return e}var n=t-1;r[n]=(t>1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(hr,"{\n/* [wrapped with "+r+"] */\n")}var yr=insertWrapDetails;function constant(e){return function(){return e}}var gr=constant;var br=function(){try{var e=Se(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var mr=br;var _r=!mr?re:function(e,r){return mr(e,"toString",{configurable:true,enumerable:false,value:gr(r),writable:true})};var wr=_r;var xr=sr(wr);var Sr=xr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Rr=arrayIncludes;var Wr=1,kr=2,Cr=8,Mr=16,Tr=32,Pr=64,Br=128,Dr=256,Lr=512;var $r=[["ary",Br],["bind",Wr],["bindKey",kr],["curry",Cr],["curryRight",Mr],["flip",Lr],["partial",Tr],["partialRight",Pr],["rearg",Dr]];function updateWrapDetails(e,r){Or($r,function(t){var n="_."+t[0];if(r&t[1]&&!Rr(e,n)){e.push(n)}});return e.sort()}var Nr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Sr(e,yr(n,Nr(pr(n),t)))}var zr=setWrapToString;var Fr=1,Ur=2,qr=4,Gr=8,Kr=32,Hr=64;function createRecurry(e,r,t,n,i,a,o,u,f,s){var c=r&Gr,l=c?o:undefined,v=c?undefined:o,d=c?a:undefined,p=c?undefined:a;r|=c?Kr:Hr;r&=~(c?Hr:Kr);if(!(r&qr)){r&=~(Fr|Ur)}var h=[e,r,i,d,l,p,v,u,f,s];var y=t.apply(undefined,h);if(ar(e)){lr(y,h)}y.placeholder=n;return zr(y,e,r)}var Zr=createRecurry;function getHolder(e){var r=e;return r.placeholder}var Xr=getHolder;var Yr=9007199254740991;var Jr=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?Yr:r;return!!r&&(t=="number"||t!="symbol"&&Jr.test(e))&&(e>-1&&e%1==0&&e1){b.reverse()}if(c&&f-1&&e%1==0&&e<=Ft}var Ut=isLength;function isArrayLike(e){return e!=null&&Ut(e.length)&&!oe(e)}var qt=isArrayLike;function isIterateeCall(e,r,t){if(!z(t)){return false}var n=typeof r;if(n=="number"?qt(t)&&Qr(r,t.length):n=="string"&&r in t){return Tt(t[r],e)}return false}var Gt=isIterateeCall;function createAssigner(e){return zt(function(r,t){var n=-1,i=t.length,a=i>1?t[i-1]:undefined,o=i>2?t[2]:undefined;a=e.length>3&&typeof a=="function"?(i--,a):undefined;if(o&&Gt(t[0],t[1],o)){a=i<3?undefined:a;i=1}r=Object(r);while(++n-1}var Fi=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Di(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var Ui=listCacheSet;function ListCache(e){var r=-1,t=e==null?0:e.length;this.clear();while(++r0&&t(u)){if(r>1){baseFlatten(u,r-1,t,n,i)}else{ya(i,u)}}else if(!n){i[i.length]=u}}return i}var ma=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?ma(e,1):[]}var _a=flatten;function flatRest(e){return Sr(Nt(e,undefined,_a),e+"")}var wa=flatRest;var xa=wa(ha);var Sa=xa;var Oa=Jn(Object.getPrototypeOf,Object);var Ea=Oa;var Ia="[object Object]";var ja=Function.prototype,Aa=Object.prototype;var Ra=ja.toString;var Wa=Aa.hasOwnProperty;var ka=Ra.call(Object);function isPlainObject(e){if(!I(e)||E(e)!=Ia){return false}var r=Ea(e);if(r===null){return true}var t=Wa.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Ra.call(t)==ka}var Ca=isPlainObject;var Ma="[object DOMException]",Ta="[object Error]";function isError(e){if(!I(e)){return false}var r=E(e);return r==Ta||r==Ma||typeof e.message=="string"&&typeof e.name=="string"&&!Ca(e)}var Pa=isError;var Ba=zt(function(e,r){try{return Be(e,undefined,r)}catch(e){return Pa(e)?e:new Error(e)}});var Da=Ba;var La="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(La)}e=Q(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var $a=before;var Na=1,za=32;var Fa=zt(function(e,r,t){var n=Na;if(t.length){var i=tt(t,Xr(Fa));n|=za}return Wt(e,n,r,t,i)});Fa.placeholder={};var Ua=Fa;var qa=wa(function(e,r){Or(r,function(r){r=va(r);Mt(e,r,Ua(e[r],e))});return e});var Ga=qa;var Ka=1,Ha=2,Za=32;var Xa=zt(function(e,r,t){var n=Ka|Ha;if(t.length){var i=tt(t,Xr(Xa));n|=Za}return Wt(r,n,e,t,i)});Xa.placeholder={};var Ya=Xa;function baseSlice(e,r,t){var n=-1,i=e.length;if(r<0){r=-r>i?0:i+r}t=t>i?i:t;if(t<0){t+=i}i=r>t?0:t-r>>>0;r>>>=0;var a=Array(i);while(++n=n?e:Ja(e,r,t)}var Qa=castSlice;var Va="\\ud800-\\udfff",eo="\\u0300-\\u036f",ro="\\ufe20-\\ufe2f",to="\\u20d0-\\u20ff",no=eo+ro+to,io="\\ufe0e\\ufe0f";var ao="\\u200d";var oo=RegExp("["+ao+Va+no+io+"]");function hasUnicode(e){return oo.test(e)}var uo=hasUnicode;function asciiToArray(e){return e.split("")}var fo=asciiToArray;var so="\\ud800-\\udfff",co="\\u0300-\\u036f",lo="\\ufe20-\\ufe2f",vo="\\u20d0-\\u20ff",po=co+lo+vo,ho="\\ufe0e\\ufe0f";var yo="["+so+"]",go="["+po+"]",bo="\\ud83c[\\udffb-\\udfff]",mo="(?:"+go+"|"+bo+")",_o="[^"+so+"]",wo="(?:\\ud83c[\\udde6-\\uddff]){2}",xo="[\\ud800-\\udbff][\\udc00-\\udfff]",So="\\u200d";var Oo=mo+"?",Eo="["+ho+"]?",Io="(?:"+So+"(?:"+[_o,wo,xo].join("|")+")"+Eo+Oo+")*",jo=Eo+Oo+Io,Ao="(?:"+[_o+go+"?",go,wo,xo,yo].join("|")+")";var Ro=RegExp(bo+"(?="+bo+")|"+Ao+jo,"g");function unicodeToArray(e){return e.match(Ro)||[]}var Wo=unicodeToArray;function stringToArray(e){return uo(e)?Wo(e):fo(e)}var ko=stringToArray;function createCaseFirst(e){return function(r){r=sa(r);var t=uo(r)?ko(r):undefined;var n=t?t[0]:r.charAt(0);var i=t?Qa(t,1).join(""):r.slice(1);return n[e]()+i}}var Co=createCaseFirst;var Mo=Co("toUpperCase");var To=Mo;function capitalize(e){return To(sa(e).toLowerCase())}var Po=capitalize;function arrayReduce(e,r,t,n){var i=-1,a=e==null?0:e.length;if(n&&a){t=e[++i]}while(++i=r?e:r}}return e}var tf=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=Z(t);t=t===t?t:0}if(r!==undefined){r=Z(r);r=r===r?r:0}return tf(Z(e),r,t)}var nf=clamp;function stackClear(){this.__data__=new qi;this.size=0}var af=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var of=stackDelete;function stackGet(e){return this.__data__.get(e)}var uf=stackGet;function stackHas(e){return this.__data__.has(e)}var ff=stackHas;var sf=200;function stackSet(e,r){var t=this.__data__;if(t instanceof qi){var n=t.__data__;if(!Ki||n.lengthu)){return false}var s=a.get(e);if(s&&a.get(r)){return s==r}var c=-1,l=true,v=t&zc?new Dc:undefined;a.set(e,r);a.set(r,e);while(++c=r||t<0||l&&n>=a}function timerExpired(){var e=sv();if(shouldInvoke(e)){return trailingEdge(e)}u=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){u=undefined;if(v&&n){return invokeFunc(e)}n=i=undefined;return o}function cancel(){if(u!==undefined){clearTimeout(u)}s=0;n=f=i=u=undefined}function flush(){return u===undefined?o:trailingEdge(sv())}function debounced(){var e=sv(),t=shouldInvoke(e);n=arguments;i=this;f=e;if(t){if(u===undefined){return leadingEdge(f)}if(l){clearTimeout(u);u=setTimeout(timerExpired,r);return invokeFunc(f)}}if(u===undefined){u=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var dv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var pv=defaultTo;var hv=Object.prototype;var yv=hv.hasOwnProperty;var gv=zt(function(e,r){e=Object(e);var t=-1;var n=r.length;var i=n>2?r[2]:undefined;if(i&&Gt(r[0],r[1],i)){n=1}while(++t=Dv){a=$c;o=false;r=new Dc(r)}e:while(++i=0&&e.slice(t,i)==r}var fd=endsWith;function baseToPairs(e,r){return k(r,function(r){return[r,e[r]]})}var sd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var cd=setToPairs;var ld="[object Map]",vd="[object Set]";function createToPairs(e){return function(r){var t=Vf(r);if(t==ld){return Uc(r)}if(t==vd){return cd(r)}return sd(r,e(r))}}var dd=createToPairs;var pd=dd(ni);var hd=pd;var yd=dd(vi);var gd=yd;var bd={"&":"&","<":"<",">":">",'"':""","'":"'"};var md=Do(bd);var _d=md;var wd=/[&<>"']/g,xd=RegExp(wd.source);function escape_escape(e){e=sa(e);return e&&xd.test(e)?e.replace(wd,_d):e}var Sd=escape_escape;var Od=/[\\^$.*+?()[\]{}|]/g,Ed=RegExp(Od.source);function escapeRegExp(e){e=sa(e);return e&&Ed.test(e)?e.replace(Od,"\\$&"):e}var Id=escapeRegExp;function arrayEvery(e,r){var t=-1,n=e==null?0:e.length;while(++ti?0:i+t}n=n===undefined||n>i?i:Q(n);if(n<0){n+=i}n=t>n?0:kd(n);while(t-1?i[a?r[o]:o]:undefined}}var Bd=createFind;var Dd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:Q(t);if(i<0){i=Dd(n+i,0)}return Er(e,Pl(r,3),i)}var Ld=findIndex;var $d=Bd(Ld);var Nd=$d;function baseFindKey(e,r,t){var n;t(e,function(e,t,i){if(r(e,t,i)){n=t;return false}});return n}var zd=baseFindKey;function findKey(e,r){return zd(e,Pl(r,3),Hl)}var Fd=findKey;var Ud=Math.max,qd=Math.min;function findLastIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=n-1;if(t!==undefined){i=Q(t);i=t<0?Ud(n+i,0):qd(i,n-1)}return Er(e,Pl(r,3),i,true)}var Gd=findLastIndex;var Kd=Bd(Gd);var Hd=Kd;function findLastKey(e,r){return zd(e,Pl(r,3),id)}var Zd=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var Xd=head;function baseMap(e,r){var t=-1,n=qt(e)?Array(e.length):[];Yl(e,function(e,i,a){n[++t]=r(e,i,a)});return n}var Yd=baseMap;function map_map(e,r){var t=M(e)?k:Yd;return t(e,Pl(r,3))}var Jd=map_map;function flatMap(e,r){return ma(Jd(e,r),1)}var Qd=flatMap;var Vd=1/0;function flatMapDeep(e,r){return ma(Jd(e,r),Vd)}var ep=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:Q(t);return ma(Jd(e,r),t)}var rp=flatMapDepth;var tp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?ma(e,tp):[]}var np=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:Q(r);return ma(e,r)}var ip=flattenDepth;var ap=512;function flip(e){return Wt(e,ap)}var op=flip;var up=Xu("floor");var fp=up;var sp="Expected a function";var cp=8,lp=32,vp=128,dp=256;function createFlow(e){return wa(function(r){var t=r.length,n=t,i=Ve.prototype.thru;if(e){r.reverse()}while(n--){var a=r[n];if(typeof a!="function"){throw new TypeError(sp)}if(i&&!o&&Qe(a)=="wrapper"){var o=new Ve([],true)}}n=o?n:t;while(++nr}var kp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=Z(r);t=Z(t)}return e(r,t)}}var Cp=createRelationalOperation;var Mp=Cp(kp);var Tp=Mp;var Pp=Cp(function(e,r){return e>=r});var Bp=Pp;var Dp=Object.prototype;var Lp=Dp.hasOwnProperty;function baseHas(e,r){return e!=null&&Lp.call(e,r)}var $p=baseHas;function has(e,r){return e!=null&&jl(e,r,$p)}var Np=has;var zp=Math.max,Fp=Math.min;function baseInRange(e,r,t){return e>=Fp(r,t)&&e-1:!!i&&Ar(e,r,t)>-1}var Yp=includes_includes;var Jp=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:Q(t);if(i<0){i=Jp(n+i,0)}return Ar(e,r,i)}var Qp=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?Ja(e,0,-1):[]}var Vp=initial;var eh=Math.min;function baseIntersection(e,r,t){var n=t?Bv:Rr,i=e[0].length,a=e.length,o=a,u=Array(a),f=Infinity,s=[];while(o--){var c=e[o];if(o&&r){c=k(c,Ln(r))}f=eh(c.length,f);u[o]=!t&&(r||i>=120&&c.length>=120)?new Dc(o&&c):undefined}c=e[0];var l=-1,v=u[0];e:while(++l=-ly&&e<=ly}var vy=isSafeInteger;function isUndefined(e){return e===undefined}var dy=isUndefined;var py="[object WeakMap]";function isWeakMap(e){return I(e)&&Vf(e)==py}var hy=isWeakMap;var yy="[object WeakSet]";function isWeakSet(e){return I(e)&&E(e)==yy}var gy=isWeakSet;var by=1;function iteratee_iteratee(e){return Pl(typeof e=="function"?e:_c(e,by))}var my=iteratee_iteratee;var _y=Array.prototype;var wy=_y.join;function join(e,r){return e==null?"":wy.call(e,r)}var xy=join;var Sy=Uu(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Oy=Sy;var Ey=Ql(function(e,r,t){Mt(e,t,r)});var Iy=Ey;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var jy=strictLastIndexOf;var Ay=Math.max,Ry=Math.min;function lastIndexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=n;if(t!==undefined){i=Q(t);i=i<0?Ay(n+i,0):Ry(i,n-1)}return r===r?jy(e,r,i):Er(e,Ir,i,true)}var Wy=lastIndexOf;var ky=Uu(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Cy=ky;var My=Co("toLowerCase");var Ty=My;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var bg=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return Qr(r,t)?e[r]:undefined}var mg=baseNth;function nth(e,r){return e&&e.length?mg(e,Q(r)):undefined}var _g=nth;function nthArg(e){e=Q(e);return zt(function(r){return mg(r,e)})}var wg=nthArg;function baseUnset(e,r){r=ca(r,e);e=_h(e,r);return e==null||delete e[va(zv(r))]}var xg=baseUnset;function customOmitClone(e){return Ca(e)?undefined:e}var Sg=customOmitClone;var Og=1,Eg=2,Ig=4;var jg=wa(function(e,r){var t={};if(e==null){return t}var n=false;r=k(r,function(r){r=ca(r,e);n||(n=r.length>1);return r});Lt(e,Tf(e),t);if(n){t=_c(t,Og|Eg|Ig,Sg)}var i=r.length;while(i--){xg(t,r[i])}return t});var Ag=jg;function baseSet(e,r,t,n){if(!z(e)){return e}r=ca(r,e);var i=-1,a=r.length,o=a-1,u=e;while(u!=null&&++ir||a&&o&&f&&!u&&!s||n&&o&&f||!t&&f||!i){return 1}if(!n&&!a&&!s&&e=u){return f}var s=t[n];return f*(s=="desc"?-1:1)}}return e.index-r.index}var Bg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=k(r.length?r:[re],Ln(Pl));var i=Yd(e,function(e,t,i){var a=k(r,function(r){return r(e)});return{criteria:a,index:++n,value:e}});return Tg(i,function(e,r){return Bg(e,r,t)})}var Dg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!M(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!M(t)){t=t==null?[]:[t]}return Dg(e,r,t)}var Lg=orderBy;function createOver(e){return wa(function(r){r=k(r,Ln(Pl));return zt(function(t){var n=this;return e(r,function(e){return Be(e,n,t)})})})}var $g=createOver;var Ng=$g(k);var zg=Ng;var Fg=zt;var Ug=Fg;var qg=Math.min;var Gg=Ug(function(e,r){r=r.length==1&&M(r[0])?k(r[0],Ln(Pl)):k(ma(r,1),Ln(Pl));var t=r.length;return zt(function(n){var i=-1,a=qg(n.length,t);while(++iJg){return t}do{if(r%2){t+=e}r=Qg(r/2);if(r){e+=e}}while(r);return t}var Vg=baseRepeat;var eb=Cl("length");var rb=eb;var tb="\\ud800-\\udfff",nb="\\u0300-\\u036f",ib="\\ufe20-\\ufe2f",ab="\\u20d0-\\u20ff",ob=nb+ib+ab,ub="\\ufe0e\\ufe0f";var fb="["+tb+"]",sb="["+ob+"]",cb="\\ud83c[\\udffb-\\udfff]",lb="(?:"+sb+"|"+cb+")",vb="[^"+tb+"]",db="(?:\\ud83c[\\udde6-\\uddff]){2}",pb="[\\ud800-\\udbff][\\udc00-\\udfff]",hb="\\u200d";var yb=lb+"?",gb="["+ub+"]?",bb="(?:"+hb+"(?:"+[vb,db,pb].join("|")+")"+gb+yb+")*",mb=gb+yb+bb,_b="(?:"+[vb+sb+"?",sb,db,pb,fb].join("|")+")";var wb=RegExp(cb+"(?="+cb+")|"+_b+mb,"g");function unicodeSize(e){var r=wb.lastIndex=0;while(wb.test(e)){++r}return r}var xb=unicodeSize;function stringSize(e){return uo(e)?xb(e):rb(e)}var Sb=stringSize;var Ob=Math.ceil;function createPadding(e,r){r=r===undefined?" ":D(r);var t=r.length;if(t<2){return t?Vg(r,e):r}var n=Vg(r,Ob(e/Sb(r)));return uo(r)?Qa(ko(n),0,e).join(""):n.slice(0,e)}var Eb=createPadding;var Ib=Math.ceil,jb=Math.floor;function pad(e,r,t){e=sa(e);r=Q(r);var n=r?Sb(e):0;if(!r||n>=r){return e}var i=(r-n)/2;return Eb(jb(i),t)+e+Eb(Ib(i),t)}var Ab=pad;function padEnd(e,r,t){e=sa(e);r=Q(r);var n=r?Sb(e):0;return r&&n-1){if(u!==e){Xb.call(u,f,1)}Xb.call(e,f,1)}}return e}var Yb=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?Yb(e,r):e}var Jb=pullAll;var Qb=zt(Jb);var Vb=Qb;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?Yb(e,r,Pl(t,2)):e}var em=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?Yb(e,r,undefined,t):e}var rm=pullAllWith;var tm=Array.prototype;var nm=tm.splice;function basePullAt(e,r){var t=e?r.length:0,n=t-1;while(t--){var i=r[t];if(t==n||i!==a){var a=i;if(Qr(i)){nm.call(e,i,1)}else{xg(e,i)}}}return e}var im=basePullAt;var am=wa(function(e,r){var t=e==null?0:e.length,n=ha(e,r);im(e,k(r,function(e){return Qr(e,t)?+e:e}).sort(Pg));return n});var om=am;var um=Math.floor,fm=Math.random;function baseRandom(e,r){return e+um(fm()*(r-e+1))}var sm=baseRandom;var cm=parseFloat;var lm=Math.min,vm=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&Gt(e,r,t)){r=t=undefined}if(t===undefined){if(typeof r=="boolean"){t=r;r=undefined}else if(typeof e=="boolean"){t=e;e=undefined}}if(e===undefined&&r===undefined){e=0;r=1}else{e=J(e);if(r===undefined){r=e;e=0}else{r=J(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var i=vm();return lm(e+i*(r-e+cm("1e-"+((i+"").length-1))),r)}return sm(e,r)}var dm=random;var pm=Math.ceil,hm=Math.max;function baseRange(e,r,t,n){var i=-1,a=hm(pm((r-e)/(t||1)),0),o=Array(a);while(a--){o[n?a:++i]=e;e+=t}return o}var ym=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&Gt(r,t,n)){t=n=undefined}r=J(r);if(t===undefined){t=r;r=0}else{t=J(t)}n=n===undefined?r1&&Gt(e,r[0],r[1])){r=[]}else if(t>2&&Gt(r[0],r[1],r[2])){r=[r[0]]}return Dg(e,ma(r,1),[])});var f_=u_;var s_=4294967295,c_=s_-1;var l_=Math.floor,v_=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var i=0,a=e==null?0:e.length,o=r!==r,u=r===null,f=A(r),s=r===undefined;while(i>>1;function baseSortedIndex(e,r,t){var n=0,i=e==null?n:e.length;if(typeof r=="number"&&r===r&&i<=h_){while(n>>1,o=e[a];if(o!==null&&!A(o)&&(t?o<=r:o>>0;if(!t){return[]}e=sa(e);if(e&&(typeof r=="string"||r!=null&&!cy(r))){r=D(r);if(!r&&uo(e)){return Qa(ko(e),0,t)}}return e.split(r,t)}var j_=split;var A_="Expected a function";var R_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(A_)}r=r==null?0:R_(Q(r),0);return zt(function(t){var n=t[r],i=Qa(t,0,r);if(n){ya(i,n)}return Be(e,this,i)})}var W_=spread;var k_=Uu(function(e,r,t){return e+(t?" ":"")+To(r)});var C_=k_;function startsWith(e,r,t){e=sa(e);t=t==null?0:tf(Q(t),0,e.length);r=D(r);return e.slice(t,t+r.length)==r}var M_=startsWith;function stubObject(){return{}}var T_=stubObject;function stubString(){return""}var P_=stubString;function stubTrue(){return true}var B_=stubTrue;var D_=L(function(e,r){return e-r},0);var L_=D_;function sum(e){return e&&e.length?Xy(e,re):0}var $_=sum;function sumBy(e,r){return e&&e.length?Xy(e,Pl(r,2)):0}var N_=sumBy;function tail(e){var r=e==null?0:e.length;return r?Ja(e,1,r):[]}var z_=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:Q(r);return Ja(e,0,r<0?0:r)}var F_=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:Q(r);r=n-r;return Ja(e,r<0?0:r,n)}var U_=takeRight;function takeRightWhile(e,r){return e&&e.length?Yv(e,Pl(r,3),false,true):[]}var q_=takeRightWhile;function takeWhile(e,r){return e&&e.length?Yv(e,Pl(r,3)):[]}var G_=takeWhile;function tap(e,r){r(e);return e}var K_=tap;var H_=Object.prototype;var Z_=H_.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Tt(e,H_[t])&&!Z_.call(n,t)){return r}return e}var X_=customDefaultsAssignIn;var Y_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+Y_[e]}var J_=escapeStringChar;var Q_=/<%=([\s\S]+?)%>/g;var V_=Q_;var ew=/<%-([\s\S]+?)%>/g;var rw=ew;var tw=/<%([\s\S]+?)%>/g;var nw=tw;var iw={escape:rw,evaluate:nw,interpolate:V_,variable:"",imports:{_:{escape:Sd}}};var aw=iw;var ow=/\b__p \+= '';/g,uw=/\b(__p \+=) '' \+/g,fw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var sw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var cw=/($^)/;var lw=/['\n\r\u2028\u2029\\]/g;var vw=Object.prototype;var dw=vw.hasOwnProperty;function template(e,r,t){var n=aw.imports._.templateSettings||aw;if(t&&Gt(e,r,t)){r=undefined}e=sa(e);r=yi({},r,n,X_);var i=yi({},r.imports,n.imports,X_),a=ni(i),o=Hp(i,a);var u,f,s=0,c=r.interpolate||cw,l="__p += '";var v=RegExp((r.escape||cw).source+"|"+c.source+"|"+(c===V_?sw:cw).source+"|"+(r.evaluate||cw).source+"|$","g");var d=dw.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(v,function(r,t,n,i,a,o){n||(n=i);l+=e.slice(s,o).replace(lw,J_);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(a){f=true;l+="';\n"+a+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}s=o+r.length;return r});l+="';\n";var p=dw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(f?l.replace(ow,""):l).replace(uw,"$1").replace(fw,"$1;");l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(f?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var h=Da(function(){return Function(a,d+"return "+l).apply(undefined,o)});h.source=l;if(Pa(h)){throw h}return h}var pw=template;var hw="Expected a function";function throttle(e,r,t){var n=true,i=true;if(typeof e!="function"){throw new TypeError(hw)}if(z(t)){n="leading"in t?!!t.leading:n;i="trailing"in t?!!t.trailing:i}return dv(e,r,{leading:n,maxWait:r,trailing:i})}var yw=throttle;function thru(e,r){return r(e)}var gw=thru;var bw=9007199254740991;var mw=4294967295;var _w=Math.min;function times(e,r){e=Q(e);if(e<1||e>bw){return[]}var t=mw,n=_w(e,mw);r=Vv(r);e-=mw;var i=Xt(n,r);while(++t-1){}return t}var kw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Cw=charsStartIndex;var Mw=/^\s+|\s+$/g;function trim(e,r,t){e=sa(e);if(e&&(t||r===undefined)){return e.replace(Mw,"")}if(!e||!(r=D(r))){return e}var n=ko(e),i=ko(r),a=Cw(n,i),o=kw(n,i)+1;return Qa(n,a,o).join("")}var Tw=trim;var Pw=/\s+$/;function trimEnd(e,r,t){e=sa(e);if(e&&(t||r===undefined)){return e.replace(Pw,"")}if(!e||!(r=D(r))){return e}var n=ko(e),i=kw(n,ko(r))+1;return Qa(n,0,i).join("")}var Bw=trimEnd;var Dw=/^\s+/;function trimStart(e,r,t){e=sa(e);if(e&&(t||r===undefined)){return e.replace(Dw,"")}if(!e||!(r=D(r))){return e}var n=ko(e),i=Cw(n,ko(r));return Qa(n,i).join("")}var Lw=trimStart;var $w=30,Nw="...";var zw=/\w*$/;function truncate(e,r){var t=$w,n=Nw;if(z(r)){var i="separator"in r?r.separator:i;t="length"in r?Q(r.length):t;n="omission"in r?D(r.omission):n}e=sa(e);var a=e.length;if(uo(e)){var o=ko(e);a=o.length}if(t>=a){return e}var u=t-Sb(n);if(u<1){return n}var f=o?Qa(o,0,u).join(""):e.slice(0,u);if(i===undefined){return f+n}if(o){u+=f.length-u}if(cy(i)){if(e.slice(u).search(i)){var s,c=f;if(!i.global){i=RegExp(i.source,sa(zw.exec(i))+"g")}i.lastIndex=0;while(s=i.exec(c)){var l=s.index}f=f.slice(0,l===undefined?u:l)}}else if(e.indexOf(D(i),u)!=u){var v=f.lastIndexOf(i);if(v>-1){f=f.slice(0,v)}}return f+n}var Fw=truncate;function unary(e){return Ct(e,1)}var Uw=unary;var qw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Gw=Do(qw);var Kw=Gw;var Hw=/&(?:amp|lt|gt|quot|#39);/g,Zw=RegExp(Hw.source);function unescape_unescape(e){e=sa(e);return e&&Zw.test(e)?e.replace(Hw,Kw):e}var Xw=unescape_unescape;var Yw=1/0;var Jw=!(Nf&&1/qc(new Nf([,-0]))[1]==Yw)?Ge:function(e){return new Nf(e)};var Qw=Jw;var Vw=200;function baseUniq(e,r,t){var n=-1,i=Rr,a=e.length,o=true,u=[],f=u;if(t){o=false;i=Bv}else if(a>=Vw){var s=r?null:Qw(e);if(s){return qc(s)}o=false;i=$c;f=new Dc}else{f=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof qe)||!Qr(t)){return this.thru(i)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:gw,args:[i],thisArg:undefined});return new Ve(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Ix=Ex;function wrapperChain(){return Qu(this)}var jx=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof qe){var r=e;if(this.__actions__.length){r=new qe(this)}r=r.reverse();r.__actions__.push({func:gw,args:[Lm],thisArg:undefined});return new Ve(r,this.__chain__)}return this.thru(Lm)}var Ax=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?ex(e[0]):[]}var i=-1,a=Array(n);while(++i1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return hx(e,t)});var Fx=zx;var Ux={chunk:rf,compact:Cc,concat:Mc,difference:Nv,differenceBy:Uv,differenceWith:Gv,drop:Zv,dropRight:Xv,dropRightWhile:Jv,dropWhile:Qv,fill:Md,findIndex:Ld,findLastIndex:Gd,first:Xd,flatten:_a,flattenDeep:np,flattenDepth:ip,fromPairs:Sp,head:Xd,indexOf:Qp,initial:Vp,intersection:ih,intersectionBy:oh,intersectionWith:fh,join:xy,last:zv,lastIndexOf:Wy,nth:_g,pull:Vb,pullAll:Jb,pullAllBy:em,pullAllWith:rm,pullAt:om,remove:Wm,reverse:Lm,slice:t_,sortedIndex:g_,sortedIndexBy:b_,sortedIndexOf:m_,sortedLastIndex:__,sortedLastIndexBy:w_,sortedLastIndexOf:x_,sortedUniq:O_,sortedUniqBy:E_,tail:z_,take:F_,takeRight:U_,takeRightWhile:q_,takeWhile:G_,union:tx,unionBy:ix,unionWith:ox,uniq:ux,uniqBy:fx,uniqWith:sx,unzip:px,unzipWith:hx,without:Sx,xor:kx,xorBy:Mx,xorWith:Px,zip:Dx,zipObject:$x,zipObjectDeep:Nx,zipWith:Fx};var qx={countBy:tv,each:ed,eachRight:ud,every:Rd,filter:Pd,find:Nd,findLast:Hd,flatMap:Qd,flatMapDeep:ep,flatMapDepth:rp,forEach:ed,forEachRight:ud,groupBy:Wp,includes:Yp,invokeMap:Eh,keyBy:Iy,map:Jd,orderBy:Lg,partition:zb,reduce:Im,reduceRight:Am,reject:Rm,sample:Um,sampleSize:Hm,shuffle:Qm,size:r_,some:o_,sortBy:f_};var Gx={now:sv};var Kx={after:ee,ary:Ct,before:$a,bind:Ua,bindKey:Ya,curry:av,curryRight:uv,debounce:dv,defer:Mv,delay:Pv,flip:op,memoize:ta,negate:vg,once:Mg,overArgs:Kg,partial:Bb,partialRight:$b,rearg:Om,rest:Tm,spread:W_,throttle:yw,unary:Uw,wrap:Ox};var Hx={castArray:Ku,clone:xc,cloneDeep:Ec,cloneDeepWith:Ac,cloneWith:Wc,conformsTo:Fl,eq:Tt,gt:Tp,gte:Bp,isArguments:tn,isArray:M,isArrayBuffer:Wh,isArrayLike:qt,isArrayLikeObject:_v,isBoolean:Ch,isBuffer:ln,isDate:Dh,isElement:Lh,isEmpty:Uh,isEqual:qh,isEqualWith:Gh,isError:Pa,isFinite:Hh,isFunction:oe,isInteger:Zh,isLength:Ut,isMap:Ls,isMatch:Xh,isMatchWith:Yh,isNaN:Vh,isNative:ny,isNil:iy,isNull:ay,isNumber:Qh,isObject:z,isObjectLike:I,isPlainObject:Ca,isRegExp:cy,isSafeInteger:vy,isSet:Us,isString:Kp,isSymbol:A,isTypedArray:Hn,isUndefined:dy,isWeakMap:hy,isWeakSet:gy,lt:Dy,lte:$y,toArray:gg,toFinite:J,toInteger:Q,toLength:kd,toNumber:Z,toPlainObject:xv,toSafeInteger:Aw,toString:sa};var Zx={add:N,ceil:Ju,divide:Hv,floor:fp,max:Hy,maxBy:Zy,mean:Qy,meanBy:Vy,min:og,minBy:ug,multiply:cg,round:Nm,subtract:L_,sum:$_,sumBy:N_};var Xx={clamp:nf,inRange:qp,random:dm};var Yx={assign:ui,assignIn:pi,assignInWith:yi,assignWith:bi,at:Sa,create:nv,defaults:bv,defaultsDeep:Rv,entries:hd,entriesIn:gd,extend:pi,extendWith:yi,findKey:Fd,findLastKey:Zd,forIn:mp,forInRight:_p,forOwn:wp,forOwnRight:xp,functions:Ep,functionsIn:Ip,get:pa,has:Np,hasIn:Al,invert:ph,invertBy:mh,invoke:Sh,keys:ni,keysIn:vi,mapKeys:Ny,mapValues:zy,merge:rg,mergeWith:jv,omit:Ag,omitBy:Cg,pick:qb,pickBy:kg,result:Pm,set:Zm,setWith:Xm,toPairs:hd,toPairsIn:gd,transform:Ww,unset:vx,update:gx,updateWith:bx,values:Zp,valuesIn:wx};var Jx={at:Ix,chain:Qu,commit:kc,lodash:ir,next:bg,plant:Gb,reverse:Ax,tap:K_,thru:gw,toIterator:xw,toJSON:Ow,value:Ow,valueOf:Ow,wrapperChain:jx};var Qx={camelCase:Gu,capitalize:Po,deburr:Zo,endsWith:fd,escape:Sd,escapeRegExp:Id,kebabCase:Oy,lowerCase:Cy,lowerFirst:Ty,pad:Ab,padEnd:Rb,padStart:Wb,parseInt:Mb,repeat:km,replace:Cm,snakeCase:i_,split:j_,startCase:C_,startsWith:M_,template:pw,templateSettings:aw,toLower:Ew,toUpper:Rw,trim:Tw,trimEnd:Bw,trimStart:Lw,truncate:Fw,unescape:Xw,upperCase:_x,upperFirst:To,words:Nu};var Vx={attempt:Da,bindAll:Ga,cond:Dl,conforms:zl,constant:gr,defaultTo:pv,flow:yp,flowRight:bp,identity:re,iteratee:my,matches:Uy,matchesProperty:Gy,method:ng,methodOf:ag,mixin:fg,noop:Ge,nthArg:wg,over:zg,overEvery:Zg,overSome:Yg,property:Tl,propertyOf:Kb,range:mm,rangeRight:wm,stubArray:wf,stubFalse:nn,stubObject:T_,stubString:P_,stubTrue:B_,times:ww,toPath:Iw,uniqueId:lx};function lazyClone(){var e=new qe(this.__wrapped__);e.__actions__=er(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=er(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=er(this.__views__);return e}var eS=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new qe(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var rS=lazyReverse;var tS=Math.max,nS=Math.min;function getView(e,r,t){var n=-1,i=t.length;while(++n0||r<0)){return new qe(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=Q(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};qe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};qe.prototype.toArray=function(){return this.take(dS)};Hl(qe.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),i=ir[n?"take"+(r=="last"?"Right":""):r],a=n||/^find/.test(r);if(!i){return}ir.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof qe,f=o[0],s=u||M(r);var c=function(e){var r=i.apply(ir,ya([e],o));return n&&l?r[0]:r};if(s&&t&&typeof f=="function"&&f.length!=1){u=s=false}var l=this.__chain__,v=!!this.__actions__.length,d=a&&!l,p=u&&!v;if(!a&&s){r=p?r:new qe(this);var h=e.apply(r,o);h.__actions__.push({func:gw,args:[c],thisArg:undefined});return new Ve(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(c);return d?n?h.value()[0]:h.value():h}});Or(["pop","push","shift","sort","splice","unshift"],function(e){var r=pS[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);ir.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return r.apply(M(i)?i:[],e)}return this[t](function(t){return r.apply(M(t)?t:[],e)})}});Hl(qe.prototype,function(e,r){var t=ir[r];if(t){var n=t.name+"";if(!yS.call(Xe,n)){Xe[n]=[]}Xe[n].push({name:r,func:t})}});Xe[st(undefined,cS).name]=[{name:"wrapper",func:undefined}];qe.prototype.clone=eS;qe.prototype.reverse=rS;qe.prototype.value=fS;ir.prototype.at=Jx.at;ir.prototype.chain=Jx.wrapperChain;ir.prototype.commit=Jx.commit;ir.prototype.next=Jx.next;ir.prototype.plant=Jx.plant;ir.prototype.reverse=Jx.reverse;ir.prototype.toJSON=ir.prototype.valueOf=ir.prototype.value=Jx.value;ir.prototype.first=ir.prototype.head;if(gS){ir.prototype[gS]=Jx.toIterator}var wS=ir;class Platform{static get default(){return Platform.types.StandaloneWindows64}static get types(){return{StandaloneOSX:"StandaloneOSX",StandaloneWindows:"StandaloneWindows",StandaloneWindows64:"StandaloneWindows64",StandaloneLinux64:"StandaloneLinux64",iOS:"iOS",Android:"Android",WebGL:"WebGL",WSAPlayer:"WSAPlayer",PS4:"PS4",XboxOne:"XboxOne",tvOS:"tvOS",Switch:"Switch",Lumin:"Lumin",BJM:"BJM",Stadia:"Stadia",Facebook:"Facebook",NoTarget:"NoTarget",Test:"Test"}}static isWindows(e){switch(e){case Platform.types.StandaloneWindows:case Platform.types.StandaloneWindows64:return true;default:return false}}static isAndroid(e){switch(e){case Platform.types.Android:return true;default:return false}}}var xS=Platform;class image_tag_ImageTag{constructor(e){const{repository:r="gableroux",name:t="unity3d",version:n="2019.2.11f1",platform:i}=e;if(!image_tag_ImageTag.versionPattern.test(n)){throw new Error(`Invalid version "${n}".`)}if(!Np(image_tag_ImageTag.targetPlatformToImageSuffixMap,i)){throw new Error(`Platform "${i}" is currently not supported.`)}const a=pa(image_tag_ImageTag.targetPlatformToImageSuffixMap,i,image_tag_ImageTag.imageSuffixes.generic);Object.assign(this,{repository:r,name:t,version:n,platform:i,builderPlatform:a})}static get versionPattern(){return/^20\d{2}\.\d\.\w{3,4}|3$/}static get imageSuffixes(){return{generic:"",webgl:"webgl",mac:"mac",windows:"windows",android:"android",ios:"ios",facebook:"facebook"}}static get targetPlatformToImageSuffixMap(){const{generic:e,webgl:r,mac:t,windows:n,android:i,ios:a,facebook:o}=image_tag_ImageTag.imageSuffixes;return{[xS.types.StandaloneOSX]:t,[xS.types.StandaloneWindows]:n,[xS.types.StandaloneWindows64]:n,[xS.types.StandaloneLinux64]:n,[xS.types.iOS]:a,[xS.types.Android]:i,[xS.types.WebGL]:r,[xS.types.WSAPlayer]:n,[xS.types.PS4]:n,[xS.types.XboxOne]:n,[xS.types.tvOS]:n,[xS.types.Switch]:n,[xS.types.Lumin]:n,[xS.types.BJM]:n,[xS.types.Stadia]:n,[xS.types.Facebook]:o,[xS.types.NoTarget]:e,[xS.types.Test]:e}}get tag(){return Bw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Lw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var SS=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:i}=e;const{version:a,platform:u}=i;const f=new SS({repository:"",name:"unity-builder",version:a,platform:u});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${i} --tag ${f}`;await Object(o.exec)(s,null,{silent:r});return f}static async run(e,r,t=false){const{version:n,workspace:i,platform:a,projectPath:u,buildName:f,buildPath:s,buildFile:c,buildMethod:l}=r;const v=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION=${n} --env PROJECT_PATH=${u} --env BUILD_TARGET=${a} --env BUILD_NAME=${f} --env BUILD_PATH=${s} --env BUILD_FILE=${c} --env BUILD_METHOD=${l} --env HOME=/github/home --env GITHUB_REF --env GITHUB_SHA --env GITHUB_REPOSITORY --env GITHUB_ACTOR --env GITHUB_WORKFLOW --env GITHUB_HEAD_REF --env GITHUB_BASE_REF --env GITHUB_EVENT_NAME --env GITHUB_WORKSPACE=/github/workspace --env GITHUB_ACTION --env GITHUB_EVENT_PATH --env RUNNER_OS --env RUNNER_TOOL_CACHE --env RUNNER_TEMP --env RUNNER_WORKSPACE --volume "/var/run/docker.sock":"/var/run/docker.sock" --volume "/home/runner/work/_temp/_github_home":"/github/home" --volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" --volume "${i}":"/github/workspace" ${e}`;await Object(o.exec)(v,null,{silent:t})}}var OS=docker_Docker;const ES=t(470);class input_Input{static getFromUser(){const e=ES.getInput("unityVersion");const r=ES.getInput("targetPlatform")||xS.default;const t=ES.getInput("projectPath");const n=ES.getInput("buildName")||r;const i=ES.getInput("buildsPath")||"build";const a=ES.getInput("buildMethod");return{unityVersion:e,targetPlatform:r,projectPath:t,buildName:n,buildsPath:i,buildMethod:a}}}var IS=input_Input;class build_parameters_BuildParameters{static create(e){const{unityVersion:r,targetPlatform:t,projectPath:n,buildName:i,buildsPath:a,buildMethod:o}=e;return{version:r,platform:t,projectPath:n,buildName:i,buildPath:`${a}/${t}`,buildFile:this.parseBuildFile(i,t),buildMethod:o}}static parseBuildFile(e,r){if(xS.isWindows(r)){return`${e}.exe`}if(xS.isAndroid(r)){return`${e}.apk`}return e}}var jS=build_parameters_BuildParameters;const AS=t(470);async function src_action(){a.checkCompatibility();const{dockerfile:e,workspace:r,builderFolder:t}=a;const n=jS.create(IS.getFromUser());const i=new SS(n);const o=await OS.build({path:t,dockerfile:e,baseImage:i});await OS.run(o,{workspace:r,...n})}src_action().catch(e=>{AS.setFailed(e.message)})},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});const n=t(87);function issueCommand(e,r,t){const i=new Command(e,r,t);process.stdout.write(i.toString()+n.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const i="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const t=this.properties[r];if(t){e+=`${r}=${escape(`${t||""}`)},`}}}}e+=i;const r=`${this.message||""}`;e+=escapeData(r);return e}}function escapeData(e){return e.replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escape(e){return e.replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/]/g,"%5D").replace(/;/g,"%3B")}},470:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,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?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const i=t(431);const a=t(87);const o=t(622);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){process.env[e]=r;i.issueCommand("set-env",{name:e},r)}r.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${o.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}return t.trim()}r.getInput=getInput;function setOutput(e,r){i.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setFailed(e){process.exitCode=u.Failure;error(e)}r.setFailed=setFailed;function debug(e){i.issueCommand("debug",{},e)}r.debug=debug;function error(e){i.issue("error",e)}r.error=error;function warning(e){i.issue("warning",e)}r.warning=warning;function info(e){process.stdout.write(e+a.EOL)}r.info=info;function startGroup(e){i.issue("group",e)}r.startGroup=startGroup;function endGroup(){i.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return n(this,void 0,void 0,function*(){startGroup(e);let t;try{t=yield r()}finally{endGroup()}return t})}r.group=group;function saveState(e,r){i.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},669:function(e){e.exports=require("util")},672:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,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?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var i;Object.defineProperty(r,"__esModule",{value:true});const a=t(357);const o=t(747);const u=t(622);i=o.promises,r.chmod=i.chmod,r.copyFile=i.copyFile,r.lstat=i.lstat,r.mkdir=i.mkdir,r.readdir=i.readdir,r.readlink=i.readlink,r.rename=i.rename,r.rmdir=i.rmdir,r.stat=i.stat,r.symlink=i.symlink,r.unlink=i.unlink;r.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield r.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}r.exists=exists;function isDirectory(e,t=false){return n(this,void 0,void 0,function*(){const n=t?yield r.stat(e):yield r.lstat(e);return n.isDirectory()})}r.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(r.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}r.isRooted=isRooted;function mkdirP(e,t=1e3,i=1){return n(this,void 0,void 0,function*(){a.ok(e,"a path argument must be provided");e=u.resolve(e);if(i>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(u.dirname(e),t,i+1);yield r.mkdir(e);return}default:{let t;try{t=yield r.stat(e)}catch(e){throw n}if(!t.isDirectory())throw n}}}})}r.mkdirP=mkdirP;function tryGetExecutablePath(e,t){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){const r=u.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===r)){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const a of t){e=i+a;n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){try{const t=u.dirname(e);const n=u.basename(e).toUpperCase();for(const i of yield r.readdir(t)){if(n===i.toUpperCase()){e=u.join(t,i);break}}}catch(r){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${r}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}r.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(r.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()}},747:function(e){e.exports=require("fs")},986:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,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?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const i=t(9);function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=i.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const a=n[0];r=n.slice(1).concat(r||[]);const o=new i.ToolRunner(a,r,t);return o.exec()})}r.exec=exec}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var r=Object.prototype.hasOwnProperty;e.d=function(e,t,n){if(!r.call(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}}}();!function(){e.t=function(r,t){if(t&1)r=this(r);if(t&8)return r;if(t&4&&typeof r==="object"&&r&&r.__esModule)return r;var n=Object.create(null);e.r(n);Object.defineProperty(n,"default",{enumerable:true,value:r});if(t&2&&typeof r!="string")for(var i in r)e.d(n,i,function(e){return r[e]}.bind(null,i));return n}}();!function(){e.n=function(r){var t=r&&r.__esModule?function getDefault(){return r["default"]}:function getModuleExports(){return r};e.d(t,"a",t);return t}}();!function(){e.hmd=function(e){e=Object.create(e);if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,"exports",{enumerable:true,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}});return e}}()}); \ No newline at end of file +module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={i:t,l:false,exports:{}};e[t].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(811)}t(__webpack_require__);return startup()}({0: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});const i=r(899);function exec(e,t,r){return n(this,void 0,void 0,function*(){const n=i.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const a=n[0];t=n.slice(1).concat(t||[]);const o=new i.ToolRunner(a,t,r);return o.exec()})}t.exec=exec},1: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});const i=r(129);const a=r(622);const o=r(669);const s=r(672);const u=o.promisify(i.exec);function cp(e,t,r={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(r);const o=(yield s.exists(t))?yield s.stat(t):null;if(o&&o.isFile()&&!n){return}const u=o&&o.isDirectory()?a.join(t,a.basename(e)):t;if(!(yield s.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield s.stat(e);if(c.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,u,0,n)}}else{if(a.relative(e,u)===""){throw new Error(`'${u}' and '${e}' are the same file`)}yield copyFile(e,u,n)}})}t.cp=cp;function mv(e,t,r={}){return n(this,void 0,void 0,function*(){if(yield s.exists(t)){let n=true;if(yield s.isDirectory(t)){t=a.join(t,a.basename(e));n=yield s.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(a.dirname(t));yield s.rename(e,t)})}t.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(s.IS_WINDOWS){try{if(yield s.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 s.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield s.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm -rf "${e}"`)}else{yield s.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield s.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return n(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(s.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.`)}}}try{const t=[];if(s.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(a.delimiter)){if(e){t.push(e)}}}if(s.isRooted(e)){const r=yield s.tryGetExecutablePath(e,t);if(r){return r}return""}if(e.includes("/")||s.IS_WINDOWS&&e.includes("\\")){return""}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(a.delimiter)){if(e){r.push(e)}}}for(const n of r){const r=yield s.tryGetExecutablePath(n+a.sep+e,t);if(r){return r}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;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,i){return n(this,void 0,void 0,function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield s.readdir(e);for(const a of n){const n=`${e}/${a}`;const o=`${t}/${a}`;const u=yield s.lstat(n);if(u.isDirectory()){yield cpDirRecursive(n,o,r,i)}else{yield copyFile(n,o,i)}}yield s.chmod(t,(yield s.stat(e)).mode)})}function copyFile(e,t,r){return n(this,void 0,void 0,function*(){if((yield s.lstat(e)).isSymbolicLink()){try{yield s.lstat(t);yield s.unlink(t)}catch(e){if(e.code==="EPERM"){yield s.chmod(t,"0666");yield s.unlink(t)}}const r=yield s.readlink(e);yield s.symlink(r,t,s.IS_WINDOWS?"junction":null)}else if(!(yield s.exists(t))||r){yield s.copyFile(e,t)}})}},9: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});const i=r(87);const a=r(614);const o=r(129);const s=r(622);const u=r(1);const c=r(672);const f=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(f){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 a=n.indexOf(i.EOL);while(a>-1){const e=n.substring(0,a);r(e);n=n.substring(a+i.EOL.length);a=n.indexOf(i.EOL)}t=n}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 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 n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=s.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)+i.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",e=>{this._debug(e)});const a=this._getSpawnFileName();const s=o.spawn(a,this._getSpawnArgs(r),this._getSpawnOptions(this.options,a));const u="";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,u,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(s.stderr){s.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)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}s.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});s.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});s.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(u.length>0){this.emit("stdline",u)}if(c.length>0){this.emit("errline",c)}s.removeAllListeners();if(r){t(r)}else{e(n)}})})})}}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 a=0;a0){t.push(i);i=""}continue}append(o)}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=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()}}},16:function(e){e.exports=require("tls")},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},139:function(e,t,r){var n=r(417);e.exports=function nodeRNG(){return n.randomBytes(16)}},141:function(e,t,r){"use strict";var n=r(631);var i=r(16);var a=r(605);var o=r(211);var s=r(614);var u=r(357);var c=r(669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=a.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=a.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.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||a.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",function onFree(e,r,n,i){var a=toOptions(r,n,i);for(var o=0,s=t.requests.length;o=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,a)}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")}f("making CONNECT request");var a=r.request(i);a.useChunkedEncodingByDefault=false;a.once("response",onResponse);a.once("upgrade",onUpgrade);a.once("connect",onConnect);a.once("error",onError);a.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick(function(){onConnect(e,t,r)})}function onConnect(i,o,s){a.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){f("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(s.length>0){f("got illegal response body from proxy");o.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}f("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=o;return t(o)}function onError(t){a.removeAllListeners();f("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 a=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:n,servername:a?a.replace(/:.*$/,""):e.host});var s=i.connect(0,o);r.sockets[r.sockets.indexOf(n)]=s;t(s)})}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;t0){e+=" ";for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const r=this.properties[t];if(r){e+=`${t}=${escape(`${r||""}`)},`}}}}e+=i;const t=`${this.message||""}`;e+=escapeData(t);return e}}function escapeData(e){return e.replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escape(e){return e.replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/]/g,"%5D").replace(/;/g,"%3B")}},470: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});const i=r(431);const a=r(87);const o=r(622);var s;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(s=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){process.env[e]=t;i.issueCommand("set-env",{name:e},t)}t.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${o.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}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){i.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setFailed(e){process.exitCode=s.Failure;error(e)}t.setFailed=setFailed;function debug(e){i.issueCommand("debug",{},e)}t.debug=debug;function error(e){i.issue("error",e)}t.error=error;function warning(e){i.issue("warning",e)}t.warning=warning;function info(e){process.stdout.write(e+a.EOL)}t.info=info;function startGroup(e){i.issue("group",e)}t.startGroup=startGroup;function endGroup(){i.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return n(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){i.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},533: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())})};var i=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 a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));const s=i(r(1));const u=i(r(747));const c=i(r(87));const f=i(r(622));const l=i(r(539));const d=i(r(550));const p=a(r(826));const h=r(0);const v=r(357);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const g=process.platform==="win32";const y="actions/tool-cache";let m=process.env["RUNNER_TEMP"]||"";let b=process.env["RUNNER_TOOL_CACHE"]||"";if(!m||!b){let e;if(g){e=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){e="/Users"}else{e="/home"}}if(!m){m=f.join(e,"actions","temp")}if(!b){b=f.join(e,"actions","cache")}}function downloadTool(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,i)=>n(this,void 0,void 0,function*(){try{const a=new l.HttpClient(y,[],{allowRetries:true,maxRetries:3});t=t||f.join(m,p.default());yield s.mkdirP(f.dirname(t));o.debug(`Downloading ${e}`);o.debug(`Downloading ${t}`);if(u.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const c=yield a.get(e);if(c.message.statusCode!==200){const t=new HTTPError(c.message.statusCode);o.debug(`Failed to download from "${e}". Code(${c.message.statusCode}) Message(${c.message.statusMessage})`);throw t}const d=u.createWriteStream(t);d.on("open",()=>n(this,void 0,void 0,function*(){try{const n=c.message.pipe(d);n.on("close",()=>{o.debug("download complete");r(t)})}catch(t){o.debug(`Failed to download from "${e}". Code(${c.message.statusCode}) Message(${c.message.statusMessage})`);i(t)}}));d.on("error",e=>{d.end();i(e)})}catch(e){i(e)}}))})}t.downloadTool=downloadTool;function extract7z(e,t,r){return n(this,void 0,void 0,function*(){v.ok(g,"extract7z() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=["x","-bb1","-bd","-sccUTF-8",e];const i={silent:true};yield h.exec(`"${r}"`,t,i)}finally{process.chdir(n)}}else{const r=f.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const a=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=`& '${r}' -Source '${i}' -Target '${a}'`;const u=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",o];const c={silent:true};try{const e=yield s.which("powershell",true);yield h.exec(`"${e}"`,u,c)}finally{process.chdir(n)}}return t})}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);let n="";yield h.exec("tar --version",[],{ignoreReturnCode:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});const i=n.toUpperCase().includes("GNU TAR");const a=[r];let o=t;let s=e;if(g&&i){a.push("--force-local");o=t.replace(/\\/g,"/");s=e.replace(/\\/g,"/")}if(i){a.push("--warning=no-unknown-keyword")}a.push("-C",o,"-f",s);yield h.exec(`tar`,a);return t})}t.extractTar=extractTar;function extractZip(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(g){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t})}t.extractZip=extractZip;function extractZipWin(e,t){return n(this,void 0,void 0,function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}')`;const a=yield s.which("powershell");const o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",i];yield h.exec(`"${a}"`,o)})}function extractZipNix(e,t){return n(this,void 0,void 0,function*(){const r=yield s.which("unzip");yield h.exec(`"${r}"`,[e],{cwd:t})})}function cacheDir(e,t,r,i){return n(this,void 0,void 0,function*(){r=d.clean(r)||r;i=i||c.arch();o.debug(`Caching tool ${t} ${r} ${i}`);o.debug(`source dir: ${e}`);if(!u.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of u.readdirSync(e)){const r=f.join(e,t);yield s.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n})}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,a){return n(this,void 0,void 0,function*(){i=d.clean(i)||i;a=a||c.arch();o.debug(`Caching tool ${r} ${i} ${a}`);o.debug(`source file: ${e}`);if(!u.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const n=yield _createToolPath(r,i,a);const l=f.join(n,t);o.debug(`destination file ${l}`);yield s.cp(e,l);_completeToolPath(r,i,a);return n})}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||c.arch();if(!_isExplicitVersion(t)){const n=findAllVersions(e,r);const i=_evaluateVersions(n,t);t=i}let n="";if(t){t=d.clean(t)||"";const i=f.join(b,e,t,r);o.debug(`checking cache: ${i}`);if(u.existsSync(i)&&u.existsSync(`${i}.complete`)){o.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{o.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||c.arch();const n=f.join(b,e);if(u.existsSync(n)){const e=u.readdirSync(n);for(const i of e){if(_isExplicitVersion(i)){const e=f.join(n,i,t||"");if(u.existsSync(e)&&u.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function _createExtractFolder(e){return n(this,void 0,void 0,function*(){if(!e){e=f.join(m,p.default())}yield s.mkdirP(e);return e})}function _createToolPath(e,t,r){return n(this,void 0,void 0,function*(){const n=f.join(b,e,d.clean(t)||t,r||"");o.debug(`destination ${n}`);const i=`${n}.complete`;yield s.rmRF(n);yield s.rmRF(i);yield s.mkdirP(n);return n})}function _completeToolPath(e,t,r){const n=f.join(b,e,d.clean(t)||t,r||"");const i=`${n}.complete`;u.writeFileSync(i,"");o.debug("finished caching tool")}function _isExplicitVersion(e){const t=d.clean(e)||"";o.debug(`isExplicit: ${t}`);const r=d.valid(t)!=null;o.debug(`explicit? ${r}`);return r}function _evaluateVersions(e,t){let r="";o.debug(`evaluating ${e.length} versions`);e=e.sort((e,t)=>{if(d.gt(e,t)){return 1}return-1});for(let n=e.length-1;n>=0;n--){const i=e[n];const a=d.satisfies(i,t);if(a){r=i;break}}if(r){o.debug(`matched: ${r}`)}else{o.debug("match not found")}return r}},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(835);const i=r(605);const a=r(211);const o=r(950);let s;var u;(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["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(u=t.HttpCodes||(t.HttpCodes={}));function getProxyUrl(e){let t=o.getProxyUrl(n.parse(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const c=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const f=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const l=["OPTIONS","GET","DELETE","HEAD"];const d=10;const p=5;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=n.parse(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 request(e,t,r,i){if(this._disposed){throw new Error("Client has already been disposed.")}let a=n.parse(t);let o=this._prepareRequest(e,a,i);let s=this._allowRetries&&l.indexOf(e)!=-1?this._maxRetries+1:1;let d=0;let p;while(d0){const s=p.message.headers["location"];if(!s){break}let u=n.parse(s);if(a.protocol=="https:"&&a.protocol!=u.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 p.readBody();o=this._prepareRequest(e,u,i);p=await this.requestRaw(o,r);t--}if(f.indexOf(p.message.statusCode)==-1){return p}d+=1;if(d{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let a=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);a(null,t)});o.on("socket",e=>{n=e});o.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.end()}a(new Error("Request timeout: "+e.options.path),null)});o.on("error",function(e){a(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=n.parse(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o=n.parsedUrl.protocol==="https:";n.httpModule=o?a:i;const s=o?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):s;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getAgent(e){let t;let n=o.getProxyUrl(e);let u=n&&n.hostname;if(this._keepAlive&&u){t=this._proxyAgent}if(this._keepAlive&&!u){t=this._agent}if(!!t){return t}const c=e.protocol==="https:";let f=100;if(!!this.requestOptions){f=this.requestOptions.maxSockets||i.globalAgent.maxSockets}if(u){if(!s){s=r(413)}const e={maxSockets:f,keepAlive:this._keepAlive,proxy:{proxyAuth:n.auth,host:n.hostname,port:n.port}};let i;const a=n.protocol==="https:";if(c){i=a?s.httpsOverHttps:s.httpsOverHttp}else{i=a?s.httpOverHttps:s.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:f};t=c?new a.Agent(e):new i.Agent(e);this._agent=t}if(!t){t=c?a.globalAgent:i.globalAgent}if(c&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(d,e);const t=p*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}}t.HttpClient=HttpClient},550:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var a=16;var o=t.re=[];var s=t.src=[];var u=t.tokens={};var c=0;function tok(e){u[e]=c++}tok("NUMERICIDENTIFIER");s[u.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");s[u.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");s[u.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");s[u.MAINVERSION]="("+s[u.NUMERICIDENTIFIER]+")\\."+"("+s[u.NUMERICIDENTIFIER]+")\\."+"("+s[u.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");s[u.MAINVERSIONLOOSE]="("+s[u.NUMERICIDENTIFIERLOOSE]+")\\."+"("+s[u.NUMERICIDENTIFIERLOOSE]+")\\."+"("+s[u.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");s[u.PRERELEASEIDENTIFIER]="(?:"+s[u.NUMERICIDENTIFIER]+"|"+s[u.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");s[u.PRERELEASEIDENTIFIERLOOSE]="(?:"+s[u.NUMERICIDENTIFIERLOOSE]+"|"+s[u.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");s[u.PRERELEASE]="(?:-("+s[u.PRERELEASEIDENTIFIER]+"(?:\\."+s[u.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");s[u.PRERELEASELOOSE]="(?:-?("+s[u.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+s[u.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");s[u.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");s[u.BUILD]="(?:\\+("+s[u.BUILDIDENTIFIER]+"(?:\\."+s[u.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");s[u.FULLPLAIN]="v?"+s[u.MAINVERSION]+s[u.PRERELEASE]+"?"+s[u.BUILD]+"?";s[u.FULL]="^"+s[u.FULLPLAIN]+"$";tok("LOOSEPLAIN");s[u.LOOSEPLAIN]="[v=\\s]*"+s[u.MAINVERSIONLOOSE]+s[u.PRERELEASELOOSE]+"?"+s[u.BUILD]+"?";tok("LOOSE");s[u.LOOSE]="^"+s[u.LOOSEPLAIN]+"$";tok("GTLT");s[u.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");s[u.XRANGEIDENTIFIERLOOSE]=s[u.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");s[u.XRANGEIDENTIFIER]=s[u.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");s[u.XRANGEPLAIN]="[v=\\s]*("+s[u.XRANGEIDENTIFIER]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIER]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIER]+")"+"(?:"+s[u.PRERELEASE]+")?"+s[u.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");s[u.XRANGEPLAINLOOSE]="[v=\\s]*("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+s[u.PRERELEASELOOSE]+")?"+s[u.BUILD]+"?"+")?)?";tok("XRANGE");s[u.XRANGE]="^"+s[u.GTLT]+"\\s*"+s[u.XRANGEPLAIN]+"$";tok("XRANGELOOSE");s[u.XRANGELOOSE]="^"+s[u.GTLT]+"\\s*"+s[u.XRANGEPLAINLOOSE]+"$";tok("COERCE");s[u.COERCE]="(^|[^\\d])"+"(\\d{1,"+a+"})"+"(?:\\.(\\d{1,"+a+"}))?"+"(?:\\.(\\d{1,"+a+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");o[u.COERCERTL]=new RegExp(s[u.COERCE],"g");tok("LONETILDE");s[u.LONETILDE]="(?:~>?)";tok("TILDETRIM");s[u.TILDETRIM]="(\\s*)"+s[u.LONETILDE]+"\\s+";o[u.TILDETRIM]=new RegExp(s[u.TILDETRIM],"g");var f="$1~";tok("TILDE");s[u.TILDE]="^"+s[u.LONETILDE]+s[u.XRANGEPLAIN]+"$";tok("TILDELOOSE");s[u.TILDELOOSE]="^"+s[u.LONETILDE]+s[u.XRANGEPLAINLOOSE]+"$";tok("LONECARET");s[u.LONECARET]="(?:\\^)";tok("CARETTRIM");s[u.CARETTRIM]="(\\s*)"+s[u.LONECARET]+"\\s+";o[u.CARETTRIM]=new RegExp(s[u.CARETTRIM],"g");var l="$1^";tok("CARET");s[u.CARET]="^"+s[u.LONECARET]+s[u.XRANGEPLAIN]+"$";tok("CARETLOOSE");s[u.CARETLOOSE]="^"+s[u.LONECARET]+s[u.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");s[u.COMPARATORLOOSE]="^"+s[u.GTLT]+"\\s*("+s[u.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");s[u.COMPARATOR]="^"+s[u.GTLT]+"\\s*("+s[u.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");s[u.COMPARATORTRIM]="(\\s*)"+s[u.GTLT]+"\\s*("+s[u.LOOSEPLAIN]+"|"+s[u.XRANGEPLAIN]+")";o[u.COMPARATORTRIM]=new RegExp(s[u.COMPARATORTRIM],"g");var d="$1$2$3";tok("HYPHENRANGE");s[u.HYPHENRANGE]="^\\s*("+s[u.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+s[u.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");s[u.HYPHENRANGELOOSE]="^\\s*("+s[u.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+s[u.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");s[u.STAR]="(<|>)?=?\\s*\\*";for(var p=0;pn){return null}var r=t.loose?o[u.LOOSE]:o[u.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var a=e.trim().match(t.loose?o[u.LOOSE]:o[u.FULL]);if(!a){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+a[1];this.minor=+a[2];this.patch=+a[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!a[4]){this.prerelease=[]}else{this.prerelease=a[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var a="prerelease"}for(var o in r){if(o==="major"||o==="minor"||o==="patch"){if(r[o]!==n[o]){return i+o}}}return a}}t.compareIdentifiers=compareIdentifiers;var h=/^[0-9]+$/;function compareIdentifiers(e,t){var r=h.test(e);var n=h.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===v){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var v={};Comparator.prototype.parse=function(e){var t=this.options.loose?o[u.COMPARATORLOOSE]:o[u.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=v}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===v||e===v){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var a=this.semver.version===e.semver.version;var o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var s=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||a&&o||s||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?o[u.HYPHENRANGELOOSE]:o[u.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(o[u.COMPARATORTRIM],d);r("comparator trim",e,o[u.COMPARATORTRIM]);e=e.replace(o[u.TILDETRIM],f);e=e.replace(o[u.CARETTRIM],l);e=e.split(/\s+/).join(" ");var i=t?o[u.COMPARATORLOOSE]:o[u.COMPARATOR];var a=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){a=a.filter(function(e){return!!e.match(i)})}a=a.map(function(e){return new Comparator(e,this.options)},this);return a};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return isSatisfiable(r,t)&&e.set.some(function(e){return isSatisfiable(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every(function(e){return i.intersects(e,t)});i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var n=t.loose?o[u.TILDELOOSE]:o[u.TILDE];return e.replace(n,function(t,n,i,a,o){r("tilde",e,t,n,i,a,o);var s;if(isX(n)){s=""}else if(isX(i)){s=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(a)){s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(o){r("replaceTilde pr",o);s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"}else{s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0"}r("tilde return",s);return s})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?o[u.CARETLOOSE]:o[u.CARET];return e.replace(n,function(t,n,i,a,o){r("caret",e,t,n,i,a,o);var s;if(isX(n)){s=""}else if(isX(i)){s=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(a)){if(n==="0"){s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{s=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(o){r("replaceCaret pr",o);if(n==="0"){if(i==="0"){s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1)}else{s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"}}else{s=">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){s=">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1)}else{s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0"}}else{s=">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"}}r("caret return",s);return s})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?o[u.XRANGELOOSE]:o[u.XRANGE];return e.replace(n,function(n,i,a,o,s,u){r("xRange",e,n,i,a,o,s,u);var c=isX(a);var f=c||isX(o);var l=f||isX(s);var d=l;if(i==="="&&d){i=""}u=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&d){if(f){o=0}s=0;if(i===">"){i=">=";if(f){a=+a+1;o=0;s=0}else{o=+o+1;s=0}}else if(i==="<="){i="<";if(f){a=+a+1}else{o=+o+1}}n=i+a+"."+o+"."+s+u}else if(f){n=">="+a+".0.0"+u+" <"+(+a+1)+".0.0"+u}else if(l){n=">="+a+"."+o+".0"+u+" <"+a+"."+(+o+1)+".0"+u}r("xRange return",n);return n})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(o[u.STAR],"")}function hyphenReplace(e,t,r,n,i,a,o,s,u,c,f,l,d){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(u)){s=""}else if(isX(c)){s="<"+(+u+1)+".0.0"}else if(isX(f)){s="<"+u+"."+(+c+1)+".0"}else if(l){s="<="+u+"."+c+"."+f+"-"+l}else{s="<="+s}return(t+" "+s).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var a=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(a.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}});return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var a=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(a.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}});return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,a,o,s,u;switch(r){case">":i=gt;a=lte;o=lt;s=">";u=">=";break;case"<":i=lt;a=gte;o=gt;s="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var c=0;c=0.0.0")}l=l||e;d=d||e;if(i(e.semver,l.semver,n)){l=e}else if(o(e.semver,d.semver,n)){d=e}});if(l.operator===s||l.operator===u){return false}if((!d.operator||d.operator===s)&&a(e,d.semver)){return false}else if(d.operator===u&&o(e,d.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(o[u.COERCE])}else{var n;while((n=o[u.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}o[u.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}o[u.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},605:function(e){e.exports=require("http")},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},631:function(e){e.exports=require("net")},669:function(e){e.exports=require("util")},672: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())})};var i;Object.defineProperty(t,"__esModule",{value:true});const a=r(357);const o=r(747);const s=r(622);i=o.promises,t.chmod=i.chmod,t.copyFile=i.copyFile,t.lstat=i.lstat,t.mkdir=i.mkdir,t.readdir=i.readdir,t.readlink=i.readlink,t.rename=i.rename,t.rmdir=i.rmdir,t.stat=i.stat,t.symlink=i.symlink,t.unlink=i.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return n(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 n(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 mkdirP(e,r=1e3,i=1){return n(this,void 0,void 0,function*(){a.ok(e,"a path argument must be provided");e=s.resolve(e);if(i>=r)return t.mkdir(e);try{yield t.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(s.dirname(e),r,i+1);yield t.mkdir(e);return}default:{let r;try{r=yield t.stat(e)}catch(e){throw n}if(!r.isDirectory())throw n}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,r){return n(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=s.extname(e).toUpperCase();if(r.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const a of r){e=i+a;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=s.dirname(e);const n=s.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=s.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()}},722:function(e){var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var n=r||0;var i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}e.exports=bytesToUuid},747:function(e){e.exports=require("fs")},811:function(e,t,r){"use strict";r.r(t);var n=r(622);var i=r.n(n);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return i().basename(__dirname)==="model"}static get name(){return"unity-builder"}static get rootFolder(){if(action_Action.isRunningFromSource){return i().dirname(i().dirname(i().dirname(__filename)))}return i().dirname(i().dirname(__filename))}static get builderFolder(){return`${action_Action.rootFolder}/builder`}static get dockerfile(){return`${action_Action.builderFolder}/Dockerfile`}static get workspace(){return process.env.GITHUB_WORKSPACE}static checkCompatibility(){const e=process.platform;if(!action_Action.supportedPlatforms.includes(e)){throw new Error(`Currently ${e}-platform is not supported`)}}}var a=action_Action;class Platform{static get default(){return Platform.types.StandaloneWindows64}static get types(){return{StandaloneOSX:"StandaloneOSX",StandaloneWindows:"StandaloneWindows",StandaloneWindows64:"StandaloneWindows64",StandaloneLinux64:"StandaloneLinux64",iOS:"iOS",Android:"Android",WebGL:"WebGL",WSAPlayer:"WSAPlayer",PS4:"PS4",XboxOne:"XboxOne",tvOS:"tvOS",Switch:"Switch",Lumin:"Lumin",BJM:"BJM",Stadia:"Stadia",Facebook:"Facebook",NoTarget:"NoTarget",Test:"Test"}}static isWindows(e){switch(e){case Platform.types.StandaloneWindows:case Platform.types.StandaloneWindows64:return true;default:return false}}static isAndroid(e){switch(e){case Platform.types.Android:return true;default:return false}}}var o=Platform;class build_parameters_BuildParameters{static create(e){const{unityVersion:t,targetPlatform:r,projectPath:n,buildName:i,buildsPath:a,buildMethod:o}=e;return{version:t,platform:r,projectPath:n,buildName:i,buildPath:`${a}/${r}`,buildFile:this.parseBuildFile(i,r),buildMethod:o}}static parseBuildFile(e,t){if(o.isWindows(t)){return`${e}.exe`}if(o.isAndroid(t)){return`${e}.apk`}return e}}var s=build_parameters_BuildParameters;const u=r(470);class input_Input{static getFromUser(){const e=u.getInput("unityVersion");const t=u.getInput("targetPlatform")||o.default;const r=u.getInput("projectPath")||"./";const n=u.getInput("buildName")||t;const i=u.getInput("buildsPath")||"build";const a=u.getInput("buildMethod");return{unityVersion:e,targetPlatform:t,projectPath:r,buildName:n,buildsPath:i,buildMethod:a}}}var c=input_Input;class Unity{static get libraryFolder(){return"Library"}}var f=Unity;const l=r(533);const d=r(470);class cache_Cache{static get libraryKey(){const{projectPath:e}=c.getFromUser();return`${e}`}static async load(){const e=await l.find("library",this.libraryKey);await d.addPath(e)}static async save(){await l.cacheDir(f.libraryFolder,"library",this.libraryKey)}}var p=cache_Cache;var h=r(986);var v=typeof global=="object"&&global&&global.Object===Object&&global;var g=v;var y=typeof self=="object"&&self&&self.Object===Object&&self;var m=g||y||Function("return this")();var b=m;var _=b.Symbol;var w=_;var E=Object.prototype;var S=E.hasOwnProperty;var O=E.toString;var R=w?w.toStringTag:undefined;function getRawTag(e){var t=S.call(e,R),r=e[R];try{e[R]=undefined;var n=true}catch(e){}var i=O.call(e);if(n){if(t){e[R]=r}else{delete e[R]}}return i}var I=getRawTag;var A=Object.prototype;var x=A.toString;function objectToString(e){return x.call(e)}var T=objectToString;var C="[object Null]",k="[object Undefined]";var j=w?w.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?k:C}return j&&j in Object(e)?I(e):T(e)}var N=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var L=isObjectLike;var P="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||L(e)&&N(e)==P}var D=isSymbol;var W=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(D(e)){return W}return+e}var B=baseToNumber;function arrayMap(e,t){var r=-1,n=e==null?0:e.length,i=Array(n);while(++r0){if(++t>=ht){return arguments[0]}}else{t=0}return e.apply(undefined,arguments)}}var yt=shortOut;var mt=yt(We);var bt=mt;var _t=/\{\n\/\* \[wrapped with (.+)\] \*/,wt=/,? & /;function getWrapDetails(e){var t=e.match(_t);return t?t[1].split(wt):[]}var Et=getWrapDetails;var St=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(e,t){var r=t.length;if(!r){return e}var n=r-1;t[n]=(r>1?"& ":"")+t[n];t=t.join(r>2?", ":" ");return e.replace(St,"{\n/* [wrapped with "+t+"] */\n")}var Ot=insertWrapDetails;function constant(e){return function(){return e}}var Rt=constant;var It=function(){try{var e=ke(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var At=It;var xt=!At?ce:function(e,t){return At(e,"toString",{configurable:true,enumerable:false,value:Rt(t),writable:true})};var Tt=xt;var Ct=yt(Tt);var kt=Ct;function arrayEach(e,t){var r=-1,n=e==null?0:e.length;while(++r-1}var Wt=arrayIncludes;var Bt=1,$t=2,Ft=8,Ut=16,qt=32,zt=64,Gt=128,Ht=256,Xt=512;var Kt=[["ary",Gt],["bind",Bt],["bindKey",$t],["curry",Ft],["curryRight",Ut],["flip",Xt],["partial",qt],["partialRight",zt],["rearg",Ht]];function updateWrapDetails(e,t){jt(Kt,function(r){var n="_."+r[0];if(t&r[1]&&!Wt(e,n)){e.push(n)}});return e.sort()}var Mt=updateWrapDetails;function setWrapToString(e,t,r){var n=t+"";return kt(e,Ot(n,Mt(Et(n),r)))}var Zt=setWrapToString;var Yt=1,Jt=2,Qt=4,Vt=8,er=32,tr=64;function createRecurry(e,t,r,n,i,a,o,s,u,c){var f=t&Vt,l=f?o:undefined,d=f?undefined:o,p=f?a:undefined,h=f?undefined:a;t|=f?er:tr;t&=~(f?tr:er);if(!(t&Qt)){t&=~(Yt|Jt)}var v=[e,t,i,p,l,h,d,s,u,c];var g=r.apply(undefined,v);if(pt(e)){bt(g,v)}g.placeholder=n;return Zt(g,e,t)}var rr=createRecurry;function getHolder(e){var t=e;return t.placeholder}var nr=getHolder;var ir=9007199254740991;var ar=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;t=t==null?ir:t;return!!t&&(r=="number"||r!="symbol"&&ar.test(e))&&(e>-1&&e%1==0&&e1){y.reverse()}if(f&&u-1&&e%1==0&&e<=Yr}var Jr=isLength;function isArrayLike(e){return e!=null&&Jr(e.length)&&!he(e)}var Qr=isArrayLike;function isIterateeCall(e,t,r){if(!Z(r)){return false}var n=typeof t;if(n=="number"?Qr(r)&&or(t,r.length):n=="string"&&t in r){return qr(r[t],e)}return false}var Vr=isIterateeCall;function createAssigner(e){return Zr(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:undefined,o=i>2?r[2]:undefined;a=e.length>3&&typeof a=="function"?(i--,a):undefined;if(o&&Vr(r[0],r[1],o)){a=i<3?undefined:a;i=1}t=Object(t);while(++n-1}var Yi=listCacheHas;function listCacheSet(e,t){var r=this.__data__,n=Hi(r,e);if(n<0){++this.size;r.push([e,t])}else{r[n][1]=t}return this}var Ji=listCacheSet;function ListCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t0&&r(s)){if(t>1){baseFlatten(s,t-1,r,n,i)}else{Oa(i,s)}}else if(!n){i[i.length]=s}}return i}var Aa=baseFlatten;function flatten(e){var t=e==null?0:e.length;return t?Aa(e,1):[]}var xa=flatten;function flatRest(e){return kt(Mr(e,undefined,xa),e+"")}var Ta=flatRest;var Ca=Ta(Sa);var ka=Ca;var ja=ai(Object.getPrototypeOf,Object);var Na=ja;var La="[object Object]";var Pa=Function.prototype,Da=Object.prototype;var Wa=Pa.toString;var Ba=Da.hasOwnProperty;var $a=Wa.call(Object);function isPlainObject(e){if(!L(e)||N(e)!=La){return false}var t=Na(e);if(t===null){return true}var r=Ba.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Wa.call(r)==$a}var Fa=isPlainObject;var Ua="[object DOMException]",qa="[object Error]";function isError(e){if(!L(e)){return false}var t=N(e);return t==qa||t==Ua||typeof e.message=="string"&&typeof e.name=="string"&&!Fa(e)}var za=isError;var Ga=Zr(function(e,t){try{return Ge(e,undefined,t)}catch(e){return za(e)?e:new Error(e)}});var Ha=Ga;var Xa="Expected a function";function before(e,t){var r;if(typeof t!="function"){throw new TypeError(Xa)}e=oe(e);return function(){if(--e>0){r=t.apply(this,arguments)}if(e<=1){t=undefined}return r}}var Ka=before;var Ma=1,Za=32;var Ya=Zr(function(e,t,r){var n=Ma;if(r.length){var i=fr(r,nr(Ya));n|=Za}return Br(e,n,t,r,i)});Ya.placeholder={};var Ja=Ya;var Qa=Ta(function(e,t){jt(t,function(t){t=_a(t);Ur(e,t,Ja(e[t],e))});return e});var Va=Qa;var eo=1,to=2,ro=32;var no=Zr(function(e,t,r){var n=eo|to;if(r.length){var i=fr(r,nr(no));n|=ro}return Br(t,n,e,r,i)});no.placeholder={};var io=no;function baseSlice(e,t,r){var n=-1,i=e.length;if(t<0){t=-t>i?0:i+t}r=r>i?i:r;if(r<0){r+=i}i=t>r?0:r-t>>>0;t>>>=0;var a=Array(i);while(++n=n?e:ao(e,t,r)}var oo=castSlice;var so="\\ud800-\\udfff",uo="\\u0300-\\u036f",co="\\ufe20-\\ufe2f",fo="\\u20d0-\\u20ff",lo=uo+co+fo,po="\\ufe0e\\ufe0f";var ho="\\u200d";var vo=RegExp("["+ho+so+lo+po+"]");function hasUnicode(e){return vo.test(e)}var go=hasUnicode;function asciiToArray(e){return e.split("")}var yo=asciiToArray;var mo="\\ud800-\\udfff",bo="\\u0300-\\u036f",_o="\\ufe20-\\ufe2f",wo="\\u20d0-\\u20ff",Eo=bo+_o+wo,So="\\ufe0e\\ufe0f";var Oo="["+mo+"]",Ro="["+Eo+"]",Io="\\ud83c[\\udffb-\\udfff]",Ao="(?:"+Ro+"|"+Io+")",xo="[^"+mo+"]",To="(?:\\ud83c[\\udde6-\\uddff]){2}",Co="[\\ud800-\\udbff][\\udc00-\\udfff]",ko="\\u200d";var jo=Ao+"?",No="["+So+"]?",Lo="(?:"+ko+"(?:"+[xo,To,Co].join("|")+")"+No+jo+")*",Po=No+jo+Lo,Do="(?:"+[xo+Ro+"?",Ro,To,Co,Oo].join("|")+")";var Wo=RegExp(Io+"(?="+Io+")|"+Do+Po,"g");function unicodeToArray(e){return e.match(Wo)||[]}var Bo=unicodeToArray;function stringToArray(e){return go(e)?Bo(e):yo(e)}var $o=stringToArray;function createCaseFirst(e){return function(t){t=ya(t);var r=go(t)?$o(t):undefined;var n=r?r[0]:t.charAt(0);var i=r?oo(r,1).join(""):t.slice(1);return n[e]()+i}}var Fo=createCaseFirst;var Uo=Fo("toUpperCase");var qo=Uo;function capitalize(e){return qo(ya(e).toLowerCase())}var zo=capitalize;function arrayReduce(e,t,r,n){var i=-1,a=e==null?0:e.length;if(n&&a){r=e[++i]}while(++i=t?e:t}}return e}var fu=baseClamp;function clamp(e,t,r){if(r===undefined){r=t;t=undefined}if(r!==undefined){r=re(r);r=r===r?r:0}if(t!==undefined){t=re(t);t=t===t?t:0}return fu(re(e),t,r)}var lu=clamp;function stackClear(){this.__data__=new Qi;this.size=0}var du=stackClear;function stackDelete(e){var t=this.__data__,r=t["delete"](e);this.size=t.size;return r}var pu=stackDelete;function stackGet(e){return this.__data__.get(e)}var hu=stackGet;function stackHas(e){return this.__data__.has(e)}var vu=stackHas;var gu=200;function stackSet(e,t){var r=this.__data__;if(r instanceof Qi){var n=r.__data__;if(!ea||n.lengths)){return false}var c=a.get(e);if(c&&a.get(t)){return c==t}var f=-1,l=true,d=r&Zf?new Hf:undefined;a.set(e,t);a.set(t,e);while(++f=t||r<0||l&&n>=a}function timerExpired(){var e=yd();if(shouldInvoke(e)){return trailingEdge(e)}s=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){s=undefined;if(d&&n){return invokeFunc(e)}n=i=undefined;return o}function cancel(){if(s!==undefined){clearTimeout(s)}c=0;n=u=i=s=undefined}function flush(){return s===undefined?o:trailingEdge(yd())}function debounced(){var e=yd(),r=shouldInvoke(e);n=arguments;i=this;u=e;if(r){if(s===undefined){return leadingEdge(u)}if(l){clearTimeout(s);s=setTimeout(timerExpired,t);return invokeFunc(u)}}if(s===undefined){s=setTimeout(timerExpired,t)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var wd=debounce;function defaultTo(e,t){return e==null||e!==e?t:e}var Ed=defaultTo;var Sd=Object.prototype;var Od=Sd.hasOwnProperty;var Rd=Zr(function(e,t){e=Object(e);var r=-1;var n=t.length;var i=n>2?t[2]:undefined;if(i&&Vr(t[0],t[1],i)){n=1}while(++r=Hd){a=Kf;o=false;t=new Hf(t)}e:while(++i=0&&e.slice(r,i)==t}var gp=endsWith;function baseToPairs(e,t){return $(t,function(t){return[t,e[t]]})}var yp=baseToPairs;function setToPairs(e){var t=-1,r=Array(e.size);e.forEach(function(e){r[++t]=[e,e]});return r}var mp=setToPairs;var bp="[object Map]",_p="[object Set]";function createToPairs(e){return function(t){var r=oc(t);if(r==bp){return Jf(t)}if(r==_p){return mp(t)}return yp(t,e(t))}}var wp=createToPairs;var Ep=wp(li);var Sp=Ep;var Op=wp(_i);var Rp=Op;var Ip={"&":"&","<":"<",">":">",'"':""","'":"'"};var Ap=Ho(Ip);var xp=Ap;var Tp=/[&<>"']/g,Cp=RegExp(Tp.source);function escape_escape(e){e=ya(e);return e&&Cp.test(e)?e.replace(Tp,xp):e}var kp=escape_escape;var jp=/[\\^$.*+?()[\]{}|]/g,Np=RegExp(jp.source);function escapeRegExp(e){e=ya(e);return e&&Np.test(e)?e.replace(jp,"\\$&"):e}var Lp=escapeRegExp;function arrayEvery(e,t){var r=-1,n=e==null?0:e.length;while(++ri?0:i+r}n=n===undefined||n>i?i:oe(n);if(n<0){n+=i}n=r>n?0:$p(n);while(r-1?i[a?t[o]:o]:undefined}}var Gp=createFind;var Hp=Math.max;function findIndex(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=r==null?0:oe(r);if(i<0){i=Hp(n+i,0)}return Nt(e,zl(t,3),i)}var Xp=findIndex;var Kp=Gp(Xp);var Mp=Kp;function baseFindKey(e,t,r){var n;r(e,function(e,r,i){if(t(e,r,i)){n=r;return false}});return n}var Zp=baseFindKey;function findKey(e,t){return Zp(e,zl(t,3),td)}var Yp=findKey;var Jp=Math.max,Qp=Math.min;function findLastIndex(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=n-1;if(r!==undefined){i=oe(r);i=r<0?Jp(n+i,0):Qp(i,n-1)}return Nt(e,zl(t,3),i,true)}var Vp=findLastIndex;var eh=Gp(Vp);var th=eh;function findLastKey(e,t){return Zp(e,zl(t,3),dp)}var rh=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var nh=head;function baseMap(e,t){var r=-1,n=Qr(e)?Array(e.length):[];id(e,function(e,i,a){n[++r]=t(e,i,a)});return n}var ih=baseMap;function map_map(e,t){var r=U(e)?$:ih;return r(e,zl(t,3))}var ah=map_map;function flatMap(e,t){return Aa(ah(e,t),1)}var oh=flatMap;var sh=1/0;function flatMapDeep(e,t){return Aa(ah(e,t),sh)}var uh=flatMapDeep;function flatMapDepth(e,t,r){r=r===undefined?1:oe(r);return Aa(ah(e,t),r)}var ch=flatMapDepth;var fh=1/0;function flattenDeep(e){var t=e==null?0:e.length;return t?Aa(e,fh):[]}var lh=flattenDeep;function flattenDepth(e,t){var r=e==null?0:e.length;if(!r){return[]}t=t===undefined?1:oe(t);return Aa(e,t)}var dh=flattenDepth;var ph=512;function flip(e){return Br(e,ph)}var hh=flip;var vh=nu("floor");var gh=vh;var yh="Expected a function";var mh=8,bh=32,_h=128,wh=256;function createFlow(e){return Ta(function(t){var r=t.length,n=r,i=st.prototype.thru;if(e){t.reverse()}while(n--){var a=t[n];if(typeof a!="function"){throw new TypeError(yh)}if(i&&!o&&ot(a)=="wrapper"){var o=new st([],true)}}n=o?n:r;while(++nt}var $h=baseGt;function createRelationalOperation(e){return function(t,r){if(!(typeof t=="string"&&typeof r=="string")){t=re(t);r=re(r)}return e(t,r)}}var Fh=createRelationalOperation;var Uh=Fh($h);var qh=Uh;var zh=Fh(function(e,t){return e>=t});var Gh=zh;var Hh=Object.prototype;var Xh=Hh.hasOwnProperty;function baseHas(e,t){return e!=null&&Xh.call(e,t)}var Kh=baseHas;function has(e,t){return e!=null&&Pl(e,t,Kh)}var Mh=has;var Zh=Math.max,Yh=Math.min;function baseInRange(e,t,r){return e>=Yh(t,r)&&e-1:!!i&&Dt(e,t,r)>-1}var iv=includes_includes;var av=Math.max;function indexOf_indexOf(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=r==null?0:oe(r);if(i<0){i=av(n+i,0)}return Dt(e,t,i)}var ov=indexOf_indexOf;function initial(e){var t=e==null?0:e.length;return t?ao(e,0,-1):[]}var sv=initial;var uv=Math.min;function baseIntersection(e,t,r){var n=r?Gd:Wt,i=e[0].length,a=e.length,o=a,s=Array(a),u=Infinity,c=[];while(o--){var f=e[o];if(o&&t){f=$(f,Xn(t))}u=uv(f.length,u);s[o]=!r&&(t||i>=120&&f.length>=120)?new Hf(o&&f):undefined}f=e[0];var l=-1,d=s[0];e:while(++l=-bg&&e<=bg}var _g=isSafeInteger;function isUndefined(e){return e===undefined}var wg=isUndefined;var Eg="[object WeakMap]";function isWeakMap(e){return L(e)&&oc(e)==Eg}var Sg=isWeakMap;var Og="[object WeakSet]";function isWeakSet(e){return L(e)&&N(e)==Og}var Rg=isWeakSet;var Ig=1;function iteratee_iteratee(e){return zl(typeof e=="function"?e:xf(e,Ig))}var Ag=iteratee_iteratee;var xg=Array.prototype;var Tg=xg.join;function join(e,t){return e==null?"":Tg.call(e,t)}var Cg=join;var kg=Js(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});var jg=kg;var Ng=od(function(e,t,r){Ur(e,r,t)});var Lg=Ng;function strictLastIndexOf(e,t,r){var n=r+1;while(n--){if(e[n]===t){return n}}return n}var Pg=strictLastIndexOf;var Dg=Math.max,Wg=Math.min;function lastIndexOf(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=n;if(r!==undefined){i=oe(r);i=i<0?Dg(n+i,0):Wg(i,n-1)}return t===t?Pg(e,t,i):Nt(e,Lt,i,true)}var Bg=lastIndexOf;var $g=Js(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()});var Fg=$g;var Ug=Fo("toLowerCase");var qg=Ug;function baseLt(e,t){return e=this.__values__.length,t=e?undefined:this.__values__[this.__index__++];return{done:e,value:t}}var Iy=wrapperNext;function baseNth(e,t){var r=e.length;if(!r){return}t+=t<0?r:0;return or(t,r)?e[t]:undefined}var Ay=baseNth;function nth(e,t){return e&&e.length?Ay(e,oe(t)):undefined}var xy=nth;function nthArg(e){e=oe(e);return Zr(function(t){return Ay(t,e)})}var Ty=nthArg;function baseUnset(e,t){t=ma(t,e);e=xv(e,t);return e==null||delete e[_a(Zd(t))]}var Cy=baseUnset;function customOmitClone(e){return Fa(e)?undefined:e}var ky=customOmitClone;var jy=1,Ny=2,Ly=4;var Py=Ta(function(e,t){var r={};if(e==null){return r}var n=false;t=$(t,function(t){t=ma(t,e);n||(n=t.length>1);return t});Xr(e,Uu(e),r);if(n){r=xf(r,jy|Ny|Ly,ky)}var i=t.length;while(i--){Cy(r,t[i])}return r});var Dy=Py;function baseSet(e,t,r,n){if(!Z(e)){return e}t=ma(t,e);var i=-1,a=t.length,o=a-1,s=e;while(s!=null&&++it||a&&o&&u&&!s&&!c||n&&o&&u||!r&&u||!i){return 1}if(!n&&!a&&!c&&e=s){return u}var c=r[n];return u*(c=="desc"?-1:1)}}return e.index-t.index}var Gy=compareMultiple;function baseOrderBy(e,t,r){var n=-1;t=$(t.length?t:[ce],Xn(zl));var i=ih(e,function(e,r,i){var a=$(t,function(t){return t(e)});return{criteria:a,index:++n,value:e}});return qy(i,function(e,t){return Gy(e,t,r)})}var Hy=baseOrderBy;function orderBy(e,t,r,n){if(e==null){return[]}if(!U(t)){t=t==null?[]:[t]}r=n?undefined:r;if(!U(r)){r=r==null?[]:[r]}return Hy(e,t,r)}var Xy=orderBy;function createOver(e){return Ta(function(t){t=$(t,Xn(zl));return Zr(function(r){var n=this;return e(t,function(e){return Ge(e,n,r)})})})}var Ky=createOver;var My=Ky($);var Zy=My;var Yy=Zr;var Jy=Yy;var Qy=Math.min;var Vy=Jy(function(e,t){t=t.length==1&&U(t[0])?$(t[0],Xn(zl)):$(Aa(t,1),Xn(zl));var r=t.length;return Zr(function(n){var i=-1,a=Qy(n.length,r);while(++iam){return r}do{if(t%2){r+=e}t=om(t/2);if(t){e+=e}}while(t);return r}var sm=baseRepeat;var um=Fl("length");var cm=um;var fm="\\ud800-\\udfff",lm="\\u0300-\\u036f",dm="\\ufe20-\\ufe2f",pm="\\u20d0-\\u20ff",hm=lm+dm+pm,vm="\\ufe0e\\ufe0f";var gm="["+fm+"]",ym="["+hm+"]",mm="\\ud83c[\\udffb-\\udfff]",bm="(?:"+ym+"|"+mm+")",_m="[^"+fm+"]",wm="(?:\\ud83c[\\udde6-\\uddff]){2}",Em="[\\ud800-\\udbff][\\udc00-\\udfff]",Sm="\\u200d";var Om=bm+"?",Rm="["+vm+"]?",Im="(?:"+Sm+"(?:"+[_m,wm,Em].join("|")+")"+Rm+Om+")*",Am=Rm+Om+Im,xm="(?:"+[_m+ym+"?",ym,wm,Em,gm].join("|")+")";var Tm=RegExp(mm+"(?="+mm+")|"+xm+Am,"g");function unicodeSize(e){var t=Tm.lastIndex=0;while(Tm.test(e)){++t}return t}var Cm=unicodeSize;function stringSize(e){return go(e)?Cm(e):cm(e)}var km=stringSize;var jm=Math.ceil;function createPadding(e,t){t=t===undefined?" ":H(t);var r=t.length;if(r<2){return r?sm(t,e):t}var n=sm(t,jm(e/km(t)));return go(t)?oo($o(n),0,e).join(""):n.slice(0,e)}var Nm=createPadding;var Lm=Math.ceil,Pm=Math.floor;function pad(e,t,r){e=ya(e);t=oe(t);var n=t?km(e):0;if(!t||n>=t){return e}var i=(t-n)/2;return Nm(Pm(i),r)+e+Nm(Lm(i),r)}var Dm=pad;function padEnd(e,t,r){e=ya(e);t=oe(t);var n=t?km(e):0;return t&&n-1){if(s!==e){nb.call(s,u,1)}nb.call(e,u,1)}}return e}var ib=basePullAll;function pullAll(e,t){return e&&e.length&&t&&t.length?ib(e,t):e}var ab=pullAll;var ob=Zr(ab);var sb=ob;function pullAllBy(e,t,r){return e&&e.length&&t&&t.length?ib(e,t,zl(r,2)):e}var ub=pullAllBy;function pullAllWith(e,t,r){return e&&e.length&&t&&t.length?ib(e,t,undefined,r):e}var cb=pullAllWith;var fb=Array.prototype;var lb=fb.splice;function basePullAt(e,t){var r=e?t.length:0,n=r-1;while(r--){var i=t[r];if(r==n||i!==a){var a=i;if(or(i)){lb.call(e,i,1)}else{Cy(e,i)}}}return e}var db=basePullAt;var pb=Ta(function(e,t){var r=e==null?0:e.length,n=Sa(e,t);db(e,$(t,function(e){return or(e,r)?+e:e}).sort(zy));return n});var hb=pb;var vb=Math.floor,gb=Math.random;function baseRandom(e,t){return e+vb(gb()*(t-e+1))}var yb=baseRandom;var mb=parseFloat;var bb=Math.min,_b=Math.random;function random(e,t,r){if(r&&typeof r!="boolean"&&Vr(e,t,r)){t=r=undefined}if(r===undefined){if(typeof t=="boolean"){r=t;t=undefined}else if(typeof e=="boolean"){r=e;e=undefined}}if(e===undefined&&t===undefined){e=0;t=1}else{e=ae(e);if(t===undefined){t=e;e=0}else{t=ae(t)}}if(e>t){var n=e;e=t;t=n}if(r||e%1||t%1){var i=_b();return bb(e+i*(t-e+mb("1e-"+((i+"").length-1))),t)}return yb(e,t)}var wb=random;var Eb=Math.ceil,Sb=Math.max;function baseRange(e,t,r,n){var i=-1,a=Sb(Eb((t-e)/(r||1)),0),o=Array(a);while(a--){o[n?a:++i]=e;e+=r}return o}var Ob=baseRange;function createRange(e){return function(t,r,n){if(n&&typeof n!="number"&&Vr(t,r,n)){r=n=undefined}t=ae(t);if(r===undefined){r=t;t=0}else{r=ae(r)}n=n===undefined?t1&&Vr(e,t[0],t[1])){t=[]}else if(r>2&&Vr(t[0],t[1],t[2])){t=[t[0]]}return Hy(e,Aa(t,1),[])});var g_=v_;var y_=4294967295,m_=y_-1;var b_=Math.floor,__=Math.min;function baseSortedIndexBy(e,t,r,n){t=r(t);var i=0,a=e==null?0:e.length,o=t!==t,s=t===null,u=D(t),c=t===undefined;while(i>>1;function baseSortedIndex(e,t,r){var n=0,i=e==null?n:e.length;if(typeof t=="number"&&t===t&&i<=S_){while(n>>1,o=e[a];if(o!==null&&!D(o)&&(r?o<=t:o>>0;if(!r){return[]}e=ya(e);if(e&&(typeof t=="string"||t!=null&&!mg(t))){t=H(t);if(!t&&go(e)){return oo($o(e),0,r)}}return e.split(t,r)}var P_=split;var D_="Expected a function";var W_=Math.max;function spread(e,t){if(typeof e!="function"){throw new TypeError(D_)}t=t==null?0:W_(oe(t),0);return Zr(function(r){var n=r[t],i=oo(r,0,t);if(n){Oa(i,n)}return Ge(e,this,i)})}var B_=spread;var $_=Js(function(e,t,r){return e+(r?" ":"")+qo(t)});var F_=$_;function startsWith(e,t,r){e=ya(e);r=r==null?0:fu(oe(r),0,e.length);t=H(t);return e.slice(r,r+t.length)==t}var U_=startsWith;function stubObject(){return{}}var q_=stubObject;function stubString(){return""}var z_=stubString;function stubTrue(){return true}var G_=stubTrue;var H_=X(function(e,t){return e-t},0);var X_=H_;function sum(e){return e&&e.length?ny(e,ce):0}var K_=sum;function sumBy(e,t){return e&&e.length?ny(e,zl(t,2)):0}var M_=sumBy;function tail(e){var t=e==null?0:e.length;return t?ao(e,1,t):[]}var Z_=tail;function take(e,t,r){if(!(e&&e.length)){return[]}t=r||t===undefined?1:oe(t);return ao(e,0,t<0?0:t)}var Y_=take;function takeRight(e,t,r){var n=e==null?0:e.length;if(!n){return[]}t=r||t===undefined?1:oe(t);t=n-t;return ao(e,t<0?0:t,n)}var J_=takeRight;function takeRightWhile(e,t){return e&&e.length?ip(e,zl(t,3),false,true):[]}var Q_=takeRightWhile;function takeWhile(e,t){return e&&e.length?ip(e,zl(t,3)):[]}var V_=takeWhile;function tap(e,t){t(e);return e}var ew=tap;var tw=Object.prototype;var rw=tw.hasOwnProperty;function customDefaultsAssignIn(e,t,r,n){if(e===undefined||qr(e,tw[r])&&!rw.call(n,r)){return t}return e}var nw=customDefaultsAssignIn;var iw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+iw[e]}var aw=escapeStringChar;var ow=/<%=([\s\S]+?)%>/g;var sw=ow;var uw=/<%-([\s\S]+?)%>/g;var cw=uw;var fw=/<%([\s\S]+?)%>/g;var lw=fw;var dw={escape:cw,evaluate:lw,interpolate:sw,variable:"",imports:{_:{escape:kp}}};var pw=dw;var hw=/\b__p \+= '';/g,vw=/\b(__p \+=) '' \+/g,gw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var yw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var mw=/($^)/;var bw=/['\n\r\u2028\u2029\\]/g;var _w=Object.prototype;var ww=_w.hasOwnProperty;function template(e,t,r){var n=pw.imports._.templateSettings||pw;if(r&&Vr(e,t,r)){t=undefined}e=ya(e);t=Oi({},t,n,nw);var i=Oi({},t.imports,n.imports,nw),a=li(i),o=tv(i,a);var s,u,c=0,f=t.interpolate||mw,l="__p += '";var d=RegExp((t.escape||mw).source+"|"+f.source+"|"+(f===sw?yw:mw).source+"|"+(t.evaluate||mw).source+"|$","g");var p=ww.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(d,function(t,r,n,i,a,o){n||(n=i);l+=e.slice(c,o).replace(bw,aw);if(r){s=true;l+="' +\n__e("+r+") +\n'"}if(a){u=true;l+="';\n"+a+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}c=o+t.length;return t});l+="';\n";var h=ww.call(t,"variable")&&t.variable;if(!h){l="with (obj) {\n"+l+"\n}\n"}l=(u?l.replace(hw,""):l).replace(vw,"$1").replace(gw,"$1;");l="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var v=Ha(function(){return Function(a,p+"return "+l).apply(undefined,o)});v.source=l;if(za(v)){throw v}return v}var Ew=template;var Sw="Expected a function";function throttle(e,t,r){var n=true,i=true;if(typeof e!="function"){throw new TypeError(Sw)}if(Z(r)){n="leading"in r?!!r.leading:n;i="trailing"in r?!!r.trailing:i}return wd(e,t,{leading:n,maxWait:t,trailing:i})}var Ow=throttle;function thru(e,t){return t(e)}var Rw=thru;var Iw=9007199254740991;var Aw=4294967295;var xw=Math.min;function times(e,t){e=oe(e);if(e<1||e>Iw){return[]}var r=Aw,n=xw(e,Aw);t=sp(t);e-=Aw;var i=nn(n,t);while(++r-1){}return r}var $w=charsEndIndex;function charsStartIndex(e,t){var r=-1,n=e.length;while(++r-1){}return r}var Fw=charsStartIndex;var Uw=/^\s+|\s+$/g;function trim(e,t,r){e=ya(e);if(e&&(r||t===undefined)){return e.replace(Uw,"")}if(!e||!(t=H(t))){return e}var n=$o(e),i=$o(t),a=Fw(n,i),o=$w(n,i)+1;return oo(n,a,o).join("")}var qw=trim;var zw=/\s+$/;function trimEnd(e,t,r){e=ya(e);if(e&&(r||t===undefined)){return e.replace(zw,"")}if(!e||!(t=H(t))){return e}var n=$o(e),i=$w(n,$o(t))+1;return oo(n,0,i).join("")}var Gw=trimEnd;var Hw=/^\s+/;function trimStart(e,t,r){e=ya(e);if(e&&(r||t===undefined)){return e.replace(Hw,"")}if(!e||!(t=H(t))){return e}var n=$o(e),i=Fw(n,$o(t));return oo(n,i).join("")}var Xw=trimStart;var Kw=30,Mw="...";var Zw=/\w*$/;function truncate(e,t){var r=Kw,n=Mw;if(Z(t)){var i="separator"in t?t.separator:i;r="length"in t?oe(t.length):r;n="omission"in t?H(t.omission):n}e=ya(e);var a=e.length;if(go(e)){var o=$o(e);a=o.length}if(r>=a){return e}var s=r-km(n);if(s<1){return n}var u=o?oo(o,0,s).join(""):e.slice(0,s);if(i===undefined){return u+n}if(o){s+=u.length-s}if(mg(i)){if(e.slice(s).search(i)){var c,f=u;if(!i.global){i=RegExp(i.source,ya(Zw.exec(i))+"g")}i.lastIndex=0;while(c=i.exec(f)){var l=c.index}u=u.slice(0,l===undefined?s:l)}}else if(e.indexOf(H(i),s)!=s){var d=u.lastIndexOf(i);if(d>-1){u=u.slice(0,d)}}return u+n}var Yw=truncate;function unary(e){return Fr(e,1)}var Jw=unary;var Qw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Vw=Ho(Qw);var eE=Vw;var tE=/&(?:amp|lt|gt|quot|#39);/g,rE=RegExp(tE.source);function unescape_unescape(e){e=ya(e);return e&&rE.test(e)?e.replace(tE,eE):e}var nE=unescape_unescape;var iE=1/0;var aE=!(Ku&&1/Qf(new Ku([,-0]))[1]==iE)?Ve:function(e){return new Ku(e)};var oE=aE;var sE=200;function baseUniq(e,t,r){var n=-1,i=Wt,a=e.length,o=true,s=[],u=s;if(r){o=false;i=Gd}else if(a>=sE){var c=t?null:oE(e);if(c){return Qf(c)}o=false;i=Kf;u=new Hf}else{u=t?[]:s}e:while(++n1||this.__actions__.length||!(n instanceof Qe)||!or(r)){return this.thru(i)}n=n.slice(r,+r+(t?1:0));n.__actions__.push({func:Rw,args:[i],thisArg:undefined});return new st(n,this.__chain__).thru(function(e){if(t&&!e.length){e.push(undefined)}return e})});var LE=NE;function wrapperChain(){return ou(this)}var PE=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof Qe){var t=e;if(this.__actions__.length){t=new Qe(this)}t=t.reverse();t.__actions__.push({func:Rw,args:[Xb],thisArg:undefined});return new st(t,this.__chain__)}return this.thru(Xb)}var DE=wrapperReverse;function baseXor(e,t,r){var n=e.length;if(n<2){return n?uE(e[0]):[]}var i=-1,a=Array(n);while(++i1?e[t-1]:undefined;r=typeof r=="function"?(e.pop(),r):undefined;return SE(e,r)});var YE=ZE;var JE={chunk:cu,compact:Ff,concat:Uf,difference:Md,differenceBy:Jd,differenceWith:Vd,drop:rp,dropRight:np,dropRightWhile:ap,dropWhile:op,fill:Up,findIndex:Xp,findLastIndex:Vp,first:nh,flatten:xa,flattenDeep:lh,flattenDepth:dh,fromPairs:kh,head:nh,indexOf:ov,initial:sv,intersection:dv,intersectionBy:hv,intersectionWith:gv,join:Cg,last:Zd,lastIndexOf:Bg,nth:xy,pull:sb,pullAll:ab,pullAllBy:ub,pullAllWith:cb,pullAt:hb,remove:Bb,reverse:Xb,slice:f_,sortedIndex:R_,sortedIndexBy:I_,sortedIndexOf:A_,sortedLastIndex:x_,sortedLastIndexBy:T_,sortedLastIndexOf:C_,sortedUniq:j_,sortedUniqBy:N_,tail:Z_,take:Y_,takeRight:J_,takeRightWhile:Q_,takeWhile:V_,union:fE,unionBy:dE,unionWith:hE,uniq:vE,uniqBy:gE,uniqWith:yE,unzip:EE,unzipWith:SE,without:kE,xor:$E,xorBy:UE,xorWith:zE,zip:HE,zipObject:KE,zipObjectDeep:ME,zipWith:YE};var QE={countBy:fd,each:up,eachRight:vp,every:Wp,filter:zp,find:Mp,findLast:th,flatMap:oh,flatMapDeep:uh,flatMapDepth:ch,forEach:up,forEachRight:vp,groupBy:Bh,includes:iv,invokeMap:Nv,keyBy:Lg,map:ah,orderBy:Xy,partition:Zm,reduce:Lb,reduceRight:Db,reject:Wb,sample:Jb,sampleSize:t_,shuffle:o_,size:c_,some:h_,sortBy:g_};var VE={now:yd};var eS={after:ue,ary:Fr,before:Ka,bind:Ja,bindKey:io,curry:pd,curryRight:vd,debounce:wd,defer:Ud,delay:zd,flip:hh,memoize:fa,negate:_y,once:Uy,overArgs:em,partial:Gm,partialRight:Km,rearg:jb,rest:qb,spread:B_,throttle:Ow,unary:Jw,wrap:jE};var tS={castArray:eu,clone:Cf,cloneDeep:Nf,cloneDeepWith:Df,cloneWith:Bf,conformsTo:Yl,eq:qr,gt:qh,gte:Gh,isArguments:ln,isArray:U,isArrayBuffer:Bv,isArrayLike:Qr,isArrayLikeObject:xd,isBoolean:Fv,isBuffer:bn,isDate:Hv,isElement:Xv,isEmpty:Jv,isEqual:Qv,isEqualWith:Vv,isError:za,isFinite:tg,isFunction:he,isInteger:rg,isLength:Jr,isMap:Hc,isMatch:ng,isMatchWith:ig,isNaN:sg,isNative:lg,isNil:dg,isNull:pg,isNumber:og,isObject:Z,isObjectLike:L,isPlainObject:Fa,isRegExp:mg,isSafeInteger:_g,isSet:Yc,isString:ev,isSymbol:D,isTypedArray:ti,isUndefined:wg,isWeakMap:Sg,isWeakSet:Rg,lt:Hg,lte:Kg,toArray:Ry,toFinite:ae,toInteger:oe,toLength:$p,toNumber:re,toPlainObject:Cd,toSafeInteger:Dw,toString:ya};var rS={add:M,ceil:au,divide:tp,floor:gh,max:ty,maxBy:ry,mean:oy,meanBy:sy,min:hy,minBy:vy,multiply:my,round:Mb,subtract:X_,sum:K_,sumBy:M_};var nS={clamp:lu,inRange:Qh,random:wb};var iS={assign:vi,assignIn:Ei,assignInWith:Oi,assignWith:Ii,at:ka,create:ld,defaults:Id,defaultsDeep:Wd,entries:Sp,entriesIn:Rp,extend:Ei,extendWith:Oi,findKey:Yp,findLastKey:rh,forIn:Ah,forInRight:xh,forOwn:Th,forOwnRight:Ch,functions:Nh,functionsIn:Lh,get:Ea,has:Mh,hasIn:Dl,invert:Ev,invertBy:Av,invoke:kv,keys:li,keysIn:_i,mapKeys:Mg,mapValues:Zg,merge:cy,mergeWith:Pd,omit:Dy,omitBy:Fy,pick:Qm,pickBy:$y,result:zb,set:r_,setWith:n_,toPairs:Sp,toPairsIn:Rp,transform:Bw,unset:_E,update:RE,updateWith:IE,values:rv,valuesIn:TE};var aS={at:LE,chain:ou,commit:$f,lodash:dt,next:Iy,plant:Vm,reverse:DE,tap:ew,thru:Rw,toIterator:Cw,toJSON:jw,value:jw,valueOf:jw,wrapperChain:PE};var oS={camelCase:Vs,capitalize:zo,deburr:rs,endsWith:gp,escape:kp,escapeRegExp:Lp,kebabCase:jg,lowerCase:Fg,lowerFirst:qg,pad:Dm,padEnd:Wm,padStart:Bm,parseInt:Um,repeat:$b,replace:Fb,snakeCase:d_,split:P_,startCase:F_,startsWith:U_,template:Ew,templateSettings:pw,toLower:Nw,toUpper:Ww,trim:qw,trimEnd:Gw,trimStart:Xw,truncate:Yw,unescape:nE,upperCase:xE,upperFirst:qo,words:Ms};var sS={attempt:Ha,bindAll:Va,cond:Hl,conforms:Zl,constant:Rt,defaultTo:Ed,flow:Oh,flowRight:Ih,identity:ce,iteratee:Ag,matches:Jg,matchesProperty:Vg,method:ly,methodOf:py,mixin:gy,noop:Ve,nthArg:Ty,over:Zy,overEvery:rm,overSome:im,property:ql,propertyOf:eb,range:Ab,rangeRight:Tb,stubArray:xu,stubFalse:dn,stubObject:q_,stubString:z_,stubTrue:G_,times:Tw,toPath:Lw,uniqueId:bE};function lazyClone(){var e=new Qe(this.__wrapped__);e.__actions__=ut(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=ut(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=ut(this.__views__);return e}var uS=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new Qe(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var cS=lazyReverse;var fS=Math.max,lS=Math.min;function getView(e,t,r){var n=-1,i=r.length;while(++n0||t<0)){return new Qe(r)}if(e<0){r=r.takeRight(-e)}else if(e){r=r.drop(e)}if(t!==undefined){t=oe(t);r=t<0?r.dropRight(-t):r.take(t-e)}return r};Qe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};Qe.prototype.toArray=function(){return this.take(wS)};td(Qe.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=dt[n?"take"+(t=="last"?"Right":""):t],a=n||/^find/.test(t);if(!i){return}dt.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,s=t instanceof Qe,u=o[0],c=s||U(t);var f=function(e){var t=i.apply(dt,Oa([e],o));return n&&l?t[0]:t};if(c&&r&&typeof u=="function"&&u.length!=1){s=c=false}var l=this.__chain__,d=!!this.__actions__.length,p=a&&!l,h=s&&!d;if(!a&&c){t=h?t:new Qe(this);var v=e.apply(t,o);v.__actions__.push({func:Rw,args:[f],thisArg:undefined});return new st(v,l)}if(p&&h){return e.apply(this,o)}v=this.thru(f);return p?n?v.value()[0]:v.value():v}});jt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ES[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);dt.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(U(i)?i:[],e)}return this[r](function(r){return t.apply(U(r)?r:[],e)})}});td(Qe.prototype,function(e,t){var r=dt[t];if(r){var n=r.name+"";if(!OS.call(nt,n)){nt[n]=[]}nt[n].push({name:t,func:r})}});nt[yr(undefined,mS).name]=[{name:"wrapper",func:undefined}];Qe.prototype.clone=uS;Qe.prototype.reverse=cS;Qe.prototype.value=gS;dt.prototype.at=aS.at;dt.prototype.chain=aS.wrapperChain;dt.prototype.commit=aS.commit;dt.prototype.next=aS.next;dt.prototype.plant=aS.plant;dt.prototype.reverse=aS.reverse;dt.prototype.toJSON=dt.prototype.valueOf=dt.prototype.value=aS.value;dt.prototype.first=dt.prototype.head;if(RS){dt.prototype[RS]=aS.toIterator}var TS=dt;class image_tag_ImageTag{constructor(e){const{repository:t="gableroux",name:r="unity3d",version:n="2019.2.11f1",platform:i}=e;if(!image_tag_ImageTag.versionPattern.test(n)){throw new Error(`Invalid version "${n}".`)}if(!Mh(image_tag_ImageTag.targetPlatformToImageSuffixMap,i)){throw new Error(`Platform "${i}" is currently not supported.`)}const a=Ea(image_tag_ImageTag.targetPlatformToImageSuffixMap,i,image_tag_ImageTag.imageSuffixes.generic);Object.assign(this,{repository:t,name:r,version:n,platform:i,builderPlatform:a})}static get versionPattern(){return/^20\d{2}\.\d\.\w{3,4}|3$/}static get imageSuffixes(){return{generic:"",webgl:"webgl",mac:"mac",windows:"windows",android:"android",ios:"ios",facebook:"facebook"}}static get targetPlatformToImageSuffixMap(){const{generic:e,webgl:t,mac:r,windows:n,android:i,ios:a,facebook:s}=image_tag_ImageTag.imageSuffixes;return{[o.types.StandaloneOSX]:r,[o.types.StandaloneWindows]:n,[o.types.StandaloneWindows64]:n,[o.types.StandaloneLinux64]:n,[o.types.iOS]:a,[o.types.Android]:i,[o.types.WebGL]:t,[o.types.WSAPlayer]:n,[o.types.PS4]:n,[o.types.XboxOne]:n,[o.types.tvOS]:n,[o.types.Switch]:n,[o.types.Lumin]:n,[o.types.BJM]:n,[o.types.Stadia]:n,[o.types.Facebook]:s,[o.types.NoTarget]:e,[o.types.Test]:e}}get tag(){return Gw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Xw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:t}=this;return`${e}:${t}`}}var CS=image_tag_ImageTag;class docker_Docker{static async build(e,t=false){const{path:r,dockerfile:n,baseImage:i}=e;const{version:a,platform:o}=i;const s=new CS({repository:"",name:"unity-builder",version:a,platform:o});const u=`docker build ${r} --file ${n} --build-arg IMAGE=${i} --tag ${s}`;await Object(h.exec)(u,null,{silent:t});return s}static async run(e,t,r=false){const{version:n,workspace:i,platform:a,projectPath:o,buildName:s,buildPath:u,buildFile:c,buildMethod:f}=t;const l=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION=${n} --env PROJECT_PATH=${o} --env BUILD_TARGET=${a} --env BUILD_NAME=${s} --env BUILD_PATH=${u} --env BUILD_FILE=${c} --env BUILD_METHOD=${f} --env HOME=/github/home --env GITHUB_REF --env GITHUB_SHA --env GITHUB_REPOSITORY --env GITHUB_ACTOR --env GITHUB_WORKFLOW --env GITHUB_HEAD_REF --env GITHUB_BASE_REF --env GITHUB_EVENT_NAME --env GITHUB_WORKSPACE=/github/workspace --env GITHUB_ACTION --env GITHUB_EVENT_PATH --env RUNNER_OS --env RUNNER_TOOL_CACHE --env RUNNER_TEMP --env RUNNER_WORKSPACE --volume "/var/run/docker.sock":"/var/run/docker.sock" --volume "/home/runner/work/_temp/_github_home":"/github/home" --volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" --volume "${i}":"/github/workspace" ${e}`;await Object(h.exec)(l,null,{silent:r})}}var kS=docker_Docker;const jS=r(470);async function src_action(){a.checkCompatibility();await p.load();const{dockerfile:e,workspace:t,builderFolder:r}=a;const n=s.create(c.getFromUser());const i=new CS(n);const o=await kS.build({path:r,dockerfile:e,baseImage:i});await kS.run(o,{workspace:t,...n});await p.save()}src_action().catch(e=>{jS.setFailed(e.message)})},826:function(e,t,r){var n=r(139);var i=r(722);function v4(e,t,r){var a=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var o=e.random||(e.rng||n)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){for(var s=0;s<16;++s){t[a+s]=o[s]}}return t||i(o)}e.exports=v4},835:function(e){e.exports=require("url")},899: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});const i=r(87);const a=r(614);const o=r(129);const s=r(622);const u=r(1);const c=r(672);const f=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(f){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 a=n.indexOf(i.EOL);while(a>-1){const e=n.substring(0,a);r(e);n=n.substring(a+i.EOL.length);a=n.indexOf(i.EOL)}t=n}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 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 n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=s.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)+i.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",e=>{this._debug(e)});const a=this._getSpawnFileName();const s=o.spawn(a,this._getSpawnArgs(r),this._getSpawnOptions(this.options,a));const u="";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,u,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(s.stderr){s.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)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}s.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});s.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});s.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(u.length>0){this.emit("stdline",u)}if(c.length>0){this.emit("errline",c)}s.removeAllListeners();if(r){t(r)}else{e(n)}})})})}}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 a=0;a0){t.push(i);i=""}continue}append(o)}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=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()}}},950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(835);function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let i;if(t){i=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{i=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(i){r=n.parse(i)}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},986: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});const i=r(9);function exec(e,t,r){return n(this,void 0,void 0,function*(){const n=i.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const a=n[0];t=n.slice(1).concat(t||[]);const o=new i.ToolRunner(a,t,r);return o.exec()})}t.exec=exec}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var t=Object.prototype.hasOwnProperty;e.d=function(e,r,n){if(!t.call(e,r)){Object.defineProperty(e,r,{enumerable:true,get:n})}}}();!function(){e.t=function(t,r){if(r&1)t=this(t);if(r&8)return t;if(r&4&&typeof t==="object"&&t&&t.__esModule)return t;var n=Object.create(null);e.r(n);Object.defineProperty(n,"default",{enumerable:true,value:t});if(r&2&&typeof t!="string")for(var i in t)e.d(n,i,function(e){return t[e]}.bind(null,i));return n}}();!function(){e.n=function(t){var r=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};e.d(r,"a",r);return r}}();!function(){e.hmd=function(e){e=Object.create(e);if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,"exports",{enumerable:true,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}});return e}}()}); \ No newline at end of file diff --git a/package.json b/package.json index d866b74e..81701ffd 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "dependencies": { "@actions/core": "^1.2.0", "@actions/exec": "1.0.2", - "@actions/github": "^2.0.0" + "@actions/github": "^2.0.0", + "@actions/tool-cache": "1.3.1" }, "devDependencies": { "@babel/cli": "7.7.5", diff --git a/src/index.js b/src/index.js index 545743e7..093a75bf 100644 --- a/src/index.js +++ b/src/index.js @@ -1,14 +1,13 @@ -import Action from './model/action'; -import Docker from './model/docker'; -import ImageTag from './model/image-tag'; -import Input from './model/input'; -import BuildParameters from './model/build-parameters'; +import { Action, Docker, Input, ImageTag, BuildParameters, Cache } from './model'; const core = require('@actions/core'); async function action() { Action.checkCompatibility(); + // Load cache + await Cache.load(); + const { dockerfile, workspace, builderFolder } = Action; const buildParameters = BuildParameters.create(Input.getFromUser()); const baseImage = new ImageTag(buildParameters); @@ -18,6 +17,9 @@ async function action() { // Run docker image await Docker.run(builtImage, { workspace, ...buildParameters }); + + // Save cache + await Cache.save(); } action().catch(error => { diff --git a/src/model/cache.js b/src/model/cache.js new file mode 100644 index 00000000..36712477 --- /dev/null +++ b/src/model/cache.js @@ -0,0 +1,25 @@ +import Input from './input'; +import Unity from './unity'; + +const tc = require('@actions/tool-cache'); +const core = require('@actions/core'); + +class Cache { + static get libraryKey() { + const { projectPath } = Input.getFromUser(); + + return `${projectPath}`; + } + + static async load() { + const libraryFolder = await tc.find('library', this.libraryKey); + + await core.addPath(libraryFolder); + } + + static async save() { + await tc.cacheDir(Unity.libraryFolder, 'library', this.libraryKey); + } +} + +export default Cache; diff --git a/src/model/cache.test.js b/src/model/cache.test.js new file mode 100644 index 00000000..7cf2c0ab --- /dev/null +++ b/src/model/cache.test.js @@ -0,0 +1,9 @@ +import Cache from './cache'; + +describe('Cache', () => { + describe('keys', () => { + it('returns a string', () => { + expect(typeof Cache.libraryKey).toBe('string'); + }); + }); +}); diff --git a/src/model/index.js b/src/model/index.js new file mode 100644 index 00000000..9039e773 --- /dev/null +++ b/src/model/index.js @@ -0,0 +1,10 @@ +import Action from './action'; +import BuildParameters from './build-parameters'; +import Cache from './cache'; +import Docker from './docker'; +import Input from './input'; +import ImageTag from './image-tag'; +import Platform from './platform'; +import Unity from './unity'; + +export { Action, BuildParameters, Cache, Docker, Input, ImageTag, Platform, Unity }; diff --git a/src/model/input.js b/src/model/input.js index 3322b158..dee2bee5 100644 --- a/src/model/input.js +++ b/src/model/input.js @@ -7,7 +7,7 @@ class Input { // Input variables specified in workflows using "with" prop. const unityVersion = core.getInput('unityVersion'); const targetPlatform = core.getInput('targetPlatform') || Platform.default; - const projectPath = core.getInput('projectPath'); + const projectPath = core.getInput('projectPath') || './'; const buildName = core.getInput('buildName') || targetPlatform; const buildsPath = core.getInput('buildsPath') || 'build'; const buildMethod = core.getInput('buildMethod'); // processed in docker file diff --git a/src/model/unity.js b/src/model/unity.js new file mode 100644 index 00000000..72f8e1ed --- /dev/null +++ b/src/model/unity.js @@ -0,0 +1,7 @@ +class Unity { + static get libraryFolder() { + return 'Library'; + } +} + +export default Unity; diff --git a/yarn.lock b/yarn.lock index 7408626d..c86ed182 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,6 +14,13 @@ dependencies: "@actions/io" "^1.0.1" +"@actions/exec@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@actions/exec/-/exec-1.0.3.tgz#b967f8700d6ff011dcc91243b58bafc1bb9ab95f" + integrity sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA== + dependencies: + "@actions/io" "^1.0.1" + "@actions/github@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@actions/github/-/github-2.0.0.tgz#5b066b1a8747bbf48d47a058d9c241a2e37d5ee7" @@ -22,11 +29,30 @@ "@octokit/graphql" "^4.3.1" "@octokit/rest" "^16.15.0" +"@actions/http-client@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.3.tgz#b5239d3d8c72378bdcef4d26bb15fa2a01d537fd" + integrity sha512-wFwh1U4adB/Zsk4cc9kVqaBOHoknhp/pJQk+aWTocbAZWpIl4Zx/At83WFRLXvxB+5HVTWOACM6qjULMZfQSfw== + dependencies: + tunnel "0.0.6" + "@actions/io@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.0.1.tgz#81a9418fe2bbdef2d2717a8e9f85188b9c565aca" integrity sha512-rhq+tfZukbtaus7xyUtwKfuiCRXd1hWSfmJNEpFgBQJ4woqPEpsBw04awicjwz9tyG2/MVhAEMfVn664Cri5zA== +"@actions/tool-cache@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@actions/tool-cache/-/tool-cache-1.3.1.tgz#0db440cefaa7d797d28e2892065b04bfcc1b697f" + integrity sha512-sKoEJv0/c7WzjPEq2PO12Sc8QdEp58XIBHMm3c4lUn/iZWgLz9HBeCuFGpLQjDvXJNfLZ4g+WD+rMjgOmpH4Ag== + dependencies: + "@actions/core" "^1.2.0" + "@actions/exec" "^1.0.0" + "@actions/http-client" "^1.0.3" + "@actions/io" "^1.0.1" + semver "^6.1.0" + uuid "^3.3.2" + "@babel/cli@7.7.5": version "7.7.5" resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.7.5.tgz#25702cc65418efc06989af3727897b9f4c8690b6" @@ -5089,7 +5115,7 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -5583,6 +5609,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tunnel@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"