diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b06b2c73..272005e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,6 +74,7 @@ jobs: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} + androidVersionCode: ${{ github.run_number }} customParameters: -profile SomeProfile -someBoolean -someValue exampleValue - uses: actions/upload-artifact@v1 with: diff --git a/README.md b/README.md index d19cb15f..d52bdc63 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,12 @@ No version will be set by Builder. **(not recommended)** > Not recommended unless you generate a new version in a pre-commit hook. Manually > setting versions is error-prone. +#### androidVersionCode + +Configure the android `versionCode`. + +When not specified, the version code is generated from the version using the `major * 1000000 + minor * 1000 + patch` scheme; + #### allowDirtyBuild Allows the branch of the build to be dirty, and still generate the build. diff --git a/action.yml b/action.yml index 4476db7b..edde174e 100644 --- a/action.yml +++ b/action.yml @@ -26,6 +26,14 @@ inputs: required: false default: '' description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.' + versioning: + required: false + default: 'Semantic' + description: 'The versioning scheme to use when building the project' + androidVersionCode: + required: false + default: '' + description: 'The android versionCode' outputs: {} branding: icon: 'box' diff --git a/action/default-build-script/Assets/Editor/Builder.cs b/action/default-build-script/Assets/Editor/Builder.cs index adb60912..e931f301 100644 --- a/action/default-build-script/Assets/Editor/Builder.cs +++ b/action/default-build-script/Assets/Editor/Builder.cs @@ -28,6 +28,7 @@ namespace UnityBuilderAction // Set version for this build VersionApplicator.SetVersion(options["version"]); + VersionApplicator.SetAndroidVersionCode(options["androidVersionCode"]); // Perform build BuildReport buildReport = BuildPipeline.BuildPlayer(buildOptions); diff --git a/action/default-build-script/Assets/Editor/Versioning/VersionApplicator.cs b/action/default-build-script/Assets/Editor/Versioning/VersionApplicator.cs index bc844b48..687e5cc9 100644 --- a/action/default-build-script/Assets/Editor/Versioning/VersionApplicator.cs +++ b/action/default-build-script/Assets/Editor/Versioning/VersionApplicator.cs @@ -1,5 +1,4 @@ using System; -using JetBrains.Annotations; using UnityEditor; namespace UnityBuilderAction.Versioning @@ -11,10 +10,14 @@ namespace UnityBuilderAction.Versioning if (version == "none") { return; } - + Apply(version); } + public static void SetAndroidVersionCode(string androidVersionCode) { + PlayerSettings.Android.bundleVersionCode = Int32.Parse(androidVersionCode); + } + static void Apply(string version) { PlayerSettings.bundleVersion = version; diff --git a/action/index.js b/action/index.js index 5f172892..01b44a14 100644 --- a/action/index.js +++ b/action/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__(712)}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 s=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 s=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 f=yield u.stat(e);if(f.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,n)}}else{if(a.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,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 s(`rd /s /q "${e}"`)}else{yield s(`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 s(`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 s=yield u.lstat(n);if(s.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())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=i(t(87));const o=i(t(614));const u=i(t(129));const s=i(t(622));const f=i(t(1));const c=i(t(672));const l=process.platform==="win32";class ToolRunner extends o.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(l){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 i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);t(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(l){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(l){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(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||l&&this.toolPath.includes("\\"))){this.toolPath=s.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)+a.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const o=u.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const s="";if(o.stdout){o.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,s,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const f="";if(o.stderr){o.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,f,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}o.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});o.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});o.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(t,n)=>{if(s.length>0){this.emit("stdline",s)}if(f.length>0){this.emit("errline",f)}o.removeAllListeners();if(t){r(t)}else{e(n)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}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 o.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")},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const i=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+i.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const a="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const n=this.properties[t];if(n){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(n)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}r.toCommandValue=toCommandValue;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},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())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=t(431);const o=i(t(87));const u=i(t(622));var s;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(s=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){const t=a.toCommandValue(r);process.env[e]=t;a.issueCommand("set-env",{name:e},t)}r.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){a.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${u.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){a.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}r.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=s.Failure;error(e)}r.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}r.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}r.debug=debug;function error(e){a.issue("error",e instanceof Error?e.toString():e)}r.error=error;function warning(e){a.issue("warning",e instanceof Error?e.toString():e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){a.issue("group",e)}r.startGroup=startGroup;function endGroup(){a.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){a.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()}},712: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 actionFolder(){return`${action_Action.rootFolder}/action`}static get dockerfile(){return`${action_Action.actionFolder}/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;const u=t(470);class input_Input{static get unityVersion(){return u.getInput("unityVersion")}static get targetPlatform(){return u.getInput("targetPlatform")||o.default}static get projectPath(){const e=u.getInput("projectPath")||".";return e.replace(/\/$/,"")}static get buildName(){return u.getInput("buildName")||this.targetPlatform}static get buildsPath(){return u.getInput("buildsPath")||"build"}static get buildMethod(){return u.getInput("buildMethod")}static get versioningStrategy(){return u.getInput("versioning")||"Semantic"}static get specifiedVersion(){return u.getInput("version")||""}static get allowDirtyBuild(){const e=u.getInput("allowDirtyBuild")||"false";return e==="true"?"true":"false"}static get customParameters(){return u.getInput("customParameters")||""}}var s=input_Input;var f=t(470);class NotImplementedException extends Error{constructor(e){super(e);this.name="NotImplementedException"}}var c=NotImplementedException;class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError"}}var l=ValidationError;var v=t(986);class system_System{static async run(e,r,t){let n="";let i="";let a="";const o={stdout:e=>{n+=e.toString()},stderr:e=>{i+=e.toString()},debug:e=>{a+=e.toString()}};const u=()=>{if(a!==""){Object(f.debug)(a)}if(n!==""){Object(f.info)(n)}if(i!==""){Object(f.warning)(i)}};const s=t=>{let n=e;if(Array.isArray(r)){n+=` ${r.join(" ")}`}else if(typeof r==="string"){n+=` ${r}`}throw new Error(`Failed to run "${n}".\n ${t}`)};try{const n=await Object(v.exec)(e,r,{silent:true,listeners:o,...t});u();if(n!==0){s(`Command returned non-zero exit code.\nError: ${i}`)}}catch(e){u();s(`In-command error caught: ${e}`)}return n}}var d=system_System;class versioning_Versioning{static get projectPath(){return s.projectPath}static get isDirtyAllowed(){return s.allowDirtyBuild==="true"}static get strategies(){return{None:"None",Semantic:"Semantic",Tag:"Tag",Custom:"Custom"}}static get branch(){return this.headRef||this.ref&&this.ref.slice(11)}static get headRef(){return process.env.GITHUB_HEAD_REF}static get ref(){return process.env.GITHUB_REF}static get sha(){return process.env.GITHUB_SHA}static get descriptionRegex(){return/^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g}static async determineVersion(e,r){if(!Object.hasOwnProperty.call(this.strategies,e)){throw new l(`Versioning strategy should be one of ${Object.values(this.strategies).join(", ")}.`)}let t;switch(e){case this.strategies.None:t="none";break;case this.strategies.Custom:t=r;break;case this.strategies.Semantic:t=await this.generateSemanticVersion();break;case this.strategies.Tag:t=await this.generateTagVersion();break;default:throw new c(`Strategy ${e} is not implemented.`)}return t}static async generateSemanticVersion(){await this.fetch();if(await this.isDirty()&&!this.isDirtyAllowed){throw new Error("Branch is dirty. Refusing to base semantic version on uncommitted changes")}if(!await this.hasAnyVersionTags()){const e=`0.0.${await this.getTotalNumberOfCommits()}`;Object(f.info)(`Generated version ${e} (no version tags found).`);return e}const{tag:e,commits:r,hash:t}=await this.parseSemanticVersion();Object(f.info)(`Found semantic version ${e}.${r} for ${this.branch}@${t}`);return`${e}.${r}`}static async generateTagVersion(){let e=await this.getTag();if(e.charAt(0)==="v"){e=e.slice(1)}return e}static async parseSemanticVersion(){const e=await this.getVersionDescription();try{const[r,t,n,i]=this.descriptionRegex.exec(e);return{match:r,tag:t,commits:n,hash:i}}catch(r){throw new Error(`Failed to parse git describe output: "${e}".`)}}static async fetch(){try{await this.git(["fetch","--unshallow"])}catch(e){Object(f.warning)(`Fetch --unshallow caught: ${e}`);await this.git(["fetch"])}}static async getVersionDescription(){return this.git(["describe","--long","--tags","--always","--debug",this.sha])}static async isDirty(){const e=await this.git(["status","--porcelain"]);return e!==""}static async getTag(){return this.git(["tag","--points-at","HEAD"])}static async hasAnyVersionTags(){const e=await d.run("sh",undefined,{input:Buffer.from("git tag --list --merged HEAD | grep v[0-9]* | wc -l"),silent:false});const r=Number.parseInt(e,10);return r!==0}static async getTotalNumberOfCommits(){const e=await this.git(["rev-list","--count",this.sha]);return Number.parseInt(e,10)}static async git(e,r={}){return d.run("git",e,{cwd:this.projectPath,...r})}}class build_parameters_BuildParameters{static async create(){const e=this.parseBuildFile(s.buildName,s.targetPlatform);const r=await versioning_Versioning.determineVersion(s.versioningStrategy,s.specifiedVersion);return{version:s.unityVersion,platform:s.targetPlatform,projectPath:s.projectPath,buildName:s.buildName,buildPath:`${s.buildsPath}/${s.targetPlatform}`,buildFile:e,buildMethod:s.buildMethod,buildVersion:r,customParameters:s.customParameters}}static parseBuildFile(e,r){if(o.isWindows(r)){return`${e}.exe`}if(o.isAndroid(r)){return`${e}.apk`}return e}}var p=build_parameters_BuildParameters;var h=t(747);var g=t.n(h);class Unity{static get libraryFolder(){return"Library"}}var y=Unity;class project_Project{static get relativePath(){const{projectPath:e}=s;return`${e}`}static get absolutePath(){const{workspace:e}=a;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${y.libraryFolder}`}}var b=project_Project;class cache_Cache{static verify(){if(!g().existsSync(b.libraryFolder)){this.notifyAboutCachingPossibility()}}static notifyAboutCachingPossibility(){if(a.isRunningLocally){return}Object(f.warning)(`\n Library folder does not exist.\n Consider setting up caching to speed up your workflow,\n if this is not your first build.\n `)}}var m=cache_Cache;var _=typeof global=="object"&&global&&global.Object===Object&&global;var w=_;var S=typeof self=="object"&&self&&self.Object===Object&&self;var O=w||S||Function("return this")();var x=O;var E=x.Symbol;var j=E;var I=Object.prototype;var A=I.hasOwnProperty;var R=I.toString;var k=j?j.toStringTag:undefined;function getRawTag(e){var r=A.call(e,k),t=e[k];try{e[k]=undefined;var n=true}catch(e){}var i=R.call(e);if(n){if(r){e[k]=t}else{delete e[k]}}return i}var W=getRawTag;var C=Object.prototype;var P=C.toString;function objectToString(e){return P.call(e)}var T=objectToString;var M="[object Null]",B="[object Undefined]";var D=j?j.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?B:M}return D&&D in Object(e)?W(e):T(e)}var $=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var L=isObjectLike;var N="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||L(e)&&$(e)==N}var F=isSymbol;var z=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(F(e)){return z}return+e}var U=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t0){if(++r>=mr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var Sr=shortOut;var Or=Sr(ze);var xr=Or;var Er=/\{\n\/\* \[wrapped with (.+)\] \*/,jr=/,? & /;function getWrapDetails(e){var r=e.match(Er);return r?r[1].split(jr):[]}var Ir=getWrapDetails;var Ar=/\{(?:\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(Ar,"{\n/* [wrapped with "+r+"] */\n")}var Rr=insertWrapDetails;function constant(e){return function(){return e}}var kr=constant;var Wr=function(){try{var e=Be(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Cr=Wr;var Pr=!Cr?pe:function(e,r){return Cr(e,"toString",{configurable:true,enumerable:false,value:kr(r),writable:true})};var Tr=Pr;var Mr=Sr(Tr);var Br=Mr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var zr=arrayIncludes;var Ur=1,qr=2,Gr=8,Hr=16,Kr=32,Zr=64,Xr=128,Yr=256,Jr=512;var Qr=[["ary",Xr],["bind",Ur],["bindKey",qr],["curry",Gr],["curryRight",Hr],["flip",Jr],["partial",Kr],["partialRight",Zr],["rearg",Yr]];function updateWrapDetails(e,r){Dr(Qr,function(t){var n="_."+t[0];if(r&t[1]&&!zr(e,n)){e.push(n)}});return e.sort()}var Vr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Br(e,Rr(n,Vr(Ir(n),t)))}var et=setWrapToString;var rt=1,tt=2,nt=4,it=8,at=32,ot=64;function createRecurry(e,r,t,n,i,a,o,u,s,f){var c=r&it,l=c?o:undefined,v=c?undefined:o,d=c?a:undefined,p=c?undefined:a;r|=c?at:ot;r&=~(c?ot:at);if(!(r&nt)){r&=~(rt|tt)}var h=[e,r,i,d,l,p,v,u,s,f];var g=t.apply(undefined,h);if(br(e)){xr(g,h)}g.placeholder=n;return et(g,e,r)}var ut=createRecurry;function getHolder(e){var r=e;return r.placeholder}var st=getHolder;var ft=9007199254740991;var ct=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?ft:r;return!!r&&(t=="number"||t!="symbol"&&ct.test(e))&&(e>-1&&e%1==0&&e1){y.reverse()}if(c&&s-1&&e%1==0&&e<=rn}var tn=isLength;function isArrayLike(e){return e!=null&&tn(e.length)&&!me(e)}var nn=isArrayLike;function isIterateeCall(e,r,t){if(!ee(t)){return false}var n=typeof r;if(n=="number"?nn(t)&<(r,t.length):n=="string"&&r in t){return Kt(t[r],e)}return false}var an=isIterateeCall;function createAssigner(e){return en(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&&an(t[0],t[1],o)){a=i<3?undefined:a;i=1}r=Object(r);while(++n-1}var ra=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Yi(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var ta=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{Ra(i,u)}}else if(!n){i[i.length]=u}}return i}var Ca=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?Ca(e,1):[]}var Pa=flatten;function flatRest(e){return Br(Vt(e,undefined,Pa),e+"")}var Ta=flatRest;var Ma=Ta(Aa);var Ba=Ma;var Da=ci(Object.getPrototypeOf,Object);var $a=Da;var La="[object Object]";var Na=Function.prototype,Fa=Object.prototype;var za=Na.toString;var Ua=Fa.hasOwnProperty;var qa=za.call(Object);function isPlainObject(e){if(!L(e)||$(e)!=La){return false}var r=$a(e);if(r===null){return true}var t=Ua.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&za.call(t)==qa}var Ga=isPlainObject;var Ha="[object DOMException]",Ka="[object Error]";function isError(e){if(!L(e)){return false}var r=$(e);return r==Ka||r==Ha||typeof e.message=="string"&&typeof e.name=="string"&&!Ga(e)}var Za=isError;var Xa=en(function(e,r){try{return Xe(e,undefined,r)}catch(e){return Za(e)?e:new Error(e)}});var Ya=Xa;var Ja="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Ja)}e=le(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Qa=before;var Va=1,eo=32;var ro=en(function(e,r,t){var n=Va;if(t.length){var i=ht(t,st(ro));n|=eo}return Ut(e,n,r,t,i)});ro.placeholder={};var to=ro;var no=Ta(function(e,r){Dr(r,function(r){r=Ea(r);Ht(e,r,to(e[r],e))});return e});var io=no;var ao=1,oo=2,uo=32;var so=en(function(e,r,t){var n=ao|oo;if(t.length){var i=ht(t,st(so));n|=uo}return Ut(r,n,e,t,i)});so.placeholder={};var fo=so;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:co(e,r,t)}var lo=castSlice;var vo="\\ud800-\\udfff",po="\\u0300-\\u036f",ho="\\ufe20-\\ufe2f",go="\\u20d0-\\u20ff",yo=po+ho+go,bo="\\ufe0e\\ufe0f";var mo="\\u200d";var _o=RegExp("["+mo+vo+yo+bo+"]");function hasUnicode(e){return _o.test(e)}var wo=hasUnicode;function asciiToArray(e){return e.split("")}var So=asciiToArray;var Oo="\\ud800-\\udfff",xo="\\u0300-\\u036f",Eo="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",Io=xo+Eo+jo,Ao="\\ufe0e\\ufe0f";var Ro="["+Oo+"]",ko="["+Io+"]",Wo="\\ud83c[\\udffb-\\udfff]",Co="(?:"+ko+"|"+Wo+")",Po="[^"+Oo+"]",To="(?:\\ud83c[\\udde6-\\uddff]){2}",Mo="[\\ud800-\\udbff][\\udc00-\\udfff]",Bo="\\u200d";var Do=Co+"?",$o="["+Ao+"]?",Lo="(?:"+Bo+"(?:"+[Po,To,Mo].join("|")+")"+$o+Do+")*",No=$o+Do+Lo,Fo="(?:"+[Po+ko+"?",ko,To,Mo,Ro].join("|")+")";var zo=RegExp(Wo+"(?="+Wo+")|"+Fo+No,"g");function unicodeToArray(e){return e.match(zo)||[]}var Uo=unicodeToArray;function stringToArray(e){return wo(e)?Uo(e):So(e)}var qo=stringToArray;function createCaseFirst(e){return function(r){r=Sa(r);var t=wo(r)?qo(r):undefined;var n=t?t[0]:r.charAt(0);var i=t?lo(t,1).join(""):r.slice(1);return n[e]()+i}}var Go=createCaseFirst;var Ho=Go("toUpperCase");var Ko=Ho;function capitalize(e){return Ko(Sa(e).toLowerCase())}var Zo=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 hs=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=ue(t);t=t===t?t:0}if(r!==undefined){r=ue(r);r=r===r?r:0}return hs(ue(e),r,t)}var gs=clamp;function stackClear(){this.__data__=new na;this.size=0}var ys=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var bs=stackDelete;function stackGet(e){return this.__data__.get(e)}var ms=stackGet;function stackHas(e){return this.__data__.has(e)}var _s=stackHas;var ws=200;function stackSet(e,r){var t=this.__data__;if(t instanceof na){var n=t.__data__;if(!aa||n.lengthu)){return false}var f=a.get(e);if(f&&a.get(r)){return f==r}var c=-1,l=true,v=t&el?new Yc: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)}f=0;n=s=i=u=undefined}function flush(){return u===undefined?o:trailingEdge(Sv())}function debounced(){var e=Sv(),t=shouldInvoke(e);n=arguments;i=this;s=e;if(t){if(u===undefined){return leadingEdge(s)}if(l){clearTimeout(u);u=setTimeout(timerExpired,r);return invokeFunc(s)}}if(u===undefined){u=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var jv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var Iv=defaultTo;var Av=Object.prototype;var Rv=Av.hasOwnProperty;var kv=en(function(e,r){e=Object(e);var t=-1;var n=r.length;var i=n>2?r[2]:undefined;if(i&&an(r[0],r[1],i)){n=1}while(++t=Yv){a=Qc;o=false;r=new Yc(r)}e:while(++i=0&&e.slice(t,i)==r}var wd=endsWith;function baseToPairs(e,r){return q(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 Od=setToPairs;var xd="[object Map]",Ed="[object Set]";function createToPairs(e){return function(r){var t=vf(r);if(t==xd){return tl(r)}if(t==Ed){return Od(r)}return Sd(r,e(r))}}var jd=createToPairs;var Id=jd(gi);var Ad=Id;var Rd=jd(Ei);var kd=Rd;var Wd={"&":"&","<":"<",">":">",'"':""","'":"'"};var Cd=Yo(Wd);var Pd=Cd;var Td=/[&<>"']/g,Md=RegExp(Td.source);function escape_escape(e){e=Sa(e);return e&&Md.test(e)?e.replace(Td,Pd):e}var Bd=escape_escape;var Dd=/[\\^$.*+?()[\]{}|]/g,$d=RegExp(Dd.source);function escapeRegExp(e){e=Sa(e);return e&&$d.test(e)?e.replace(Dd,"\\$&"):e}var Ld=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:le(n);if(n<0){n+=i}n=t>n?0:qd(n);while(t-1?i[a?r[o]:o]:undefined}}var Xd=createFind;var Yd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:le(t);if(i<0){i=Yd(n+i,0)}return $r(e,Zl(r,3),i)}var Jd=findIndex;var Qd=Xd(Jd);var Vd=Qd;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 ep=baseFindKey;function findKey(e,r){return ep(e,Zl(r,3),ov)}var rp=findKey;var tp=Math.max,np=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=le(t);i=t<0?tp(n+i,0):np(i,n-1)}return $r(e,Zl(r,3),i,true)}var ip=findLastIndex;var ap=Xd(ip);var op=ap;function findLastKey(e,r){return ep(e,Zl(r,3),yd)}var up=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var sp=head;function baseMap(e,r){var t=-1,n=nn(e)?Array(e.length):[];fv(e,function(e,i,a){n[++t]=r(e,i,a)});return n}var fp=baseMap;function map_map(e,r){var t=H(e)?q:fp;return t(e,Zl(r,3))}var cp=map_map;function flatMap(e,r){return Ca(cp(e,r),1)}var lp=flatMap;var vp=1/0;function flatMapDeep(e,r){return Ca(cp(e,r),vp)}var dp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:le(t);return Ca(cp(e,r),t)}var pp=flatMapDepth;var hp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?Ca(e,hp):[]}var gp=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:le(r);return Ca(e,r)}var yp=flattenDepth;var bp=512;function flip(e){return Ut(e,bp)}var mp=flip;var _p=ss("floor");var wp=_p;var Sp="Expected a function";var Op=8,xp=32,Ep=128,jp=256;function createFlow(e){return Ta(function(r){var t=r.length,n=t,i=vr.prototype.thru;if(e){r.reverse()}while(n--){var a=r[n];if(typeof a!="function"){throw new TypeError(Sp)}if(i&&!o&&lr(a)=="wrapper"){var o=new vr([],true)}}n=o?n:t;while(++nr}var qp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=ue(r);t=ue(t)}return e(r,t)}}var Gp=createRelationalOperation;var Hp=Gp(qp);var Kp=Hp;var Zp=Gp(function(e,r){return e>=r});var Xp=Zp;var Yp=Object.prototype;var Jp=Yp.hasOwnProperty;function baseHas(e,r){return e!=null&&Jp.call(e,r)}var Qp=baseHas;function has(e,r){return e!=null&&Nl(e,r,Qp)}var Vp=has;var eh=Math.max,rh=Math.min;function baseInRange(e,r,t){return e>=rh(r,t)&&e-1:!!i&&Fr(e,r,t)>-1}var fh=includes_includes;var ch=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:le(t);if(i<0){i=ch(n+i,0)}return Fr(e,r,i)}var lh=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?co(e,0,-1):[]}var vh=initial;var dh=Math.min;function baseIntersection(e,r,t){var n=t?Xv:zr,i=e[0].length,a=e.length,o=a,u=Array(a),s=Infinity,f=[];while(o--){var c=e[o];if(o&&r){c=q(c,Jn(r))}s=dh(c.length,s);u[o]=!t&&(r||i>=120&&c.length>=120)?new Yc(o&&c):undefined}c=e[0];var l=-1,v=u[0];e:while(++l=-xg&&e<=xg}var Eg=isSafeInteger;function isUndefined(e){return e===undefined}var jg=isUndefined;var Ig="[object WeakMap]";function isWeakMap(e){return L(e)&&vf(e)==Ig}var Ag=isWeakMap;var Rg="[object WeakSet]";function isWeakSet(e){return L(e)&&$(e)==Rg}var kg=isWeakSet;var Wg=1;function iteratee_iteratee(e){return Zl(typeof e=="function"?e:Pc(e,Wg))}var Cg=iteratee_iteratee;var Pg=Array.prototype;var Tg=Pg.join;function join(e,r){return e==null?"":Tg.call(e,r)}var Mg=join;var Bg=ts(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Dg=Bg;var $g=lv(function(e,r,t){Ht(e,t,r)});var Lg=$g;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var Ng=strictLastIndexOf;var Fg=Math.max,zg=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=le(t);i=i<0?Fg(n+i,0):zg(i,n-1)}return r===r?Ng(e,r,i):$r(e,Lr,i,true)}var Ug=lastIndexOf;var qg=ts(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Gg=qg;var Hg=Go("toLowerCase");var Kg=Hg;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Wy=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return lt(r,t)?e[r]:undefined}var Cy=baseNth;function nth(e,r){return e&&e.length?Cy(e,le(r)):undefined}var Py=nth;function nthArg(e){e=le(e);return en(function(r){return Cy(r,e)})}var Ty=nthArg;function baseUnset(e,r){r=Oa(r,e);e=Ph(e,r);return e==null||delete e[Ea(ed(r))]}var My=baseUnset;function customOmitClone(e){return Ga(e)?undefined:e}var By=customOmitClone;var Dy=1,$y=2,Ly=4;var Ny=Ta(function(e,r){var t={};if(e==null){return t}var n=false;r=q(r,function(r){r=Oa(r,e);n||(n=r.length>1);return r});Jt(e,Hs(e),t);if(n){t=Pc(t,Dy|$y|Ly,By)}var i=r.length;while(i--){My(t,r[i])}return t});var Fy=Ny;function baseSet(e,r,t,n){if(!ee(e)){return e}r=Oa(r,e);var i=-1,a=r.length,o=a-1,u=e;while(u!=null&&++ir||a&&o&&s&&!u&&!f||n&&o&&s||!t&&s||!i){return 1}if(!n&&!a&&!f&&e=u){return s}var f=t[n];return s*(f=="desc"?-1:1)}}return e.index-r.index}var Xy=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=q(r.length?r:[pe],Jn(Zl));var i=fp(e,function(e,t,i){var a=q(r,function(r){return r(e)});return{criteria:a,index:++n,value:e}});return Ky(i,function(e,r){return Xy(e,r,t)})}var Yy=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!H(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!H(t)){t=t==null?[]:[t]}return Yy(e,r,t)}var Jy=orderBy;function createOver(e){return Ta(function(r){r=q(r,Jn(Zl));return en(function(t){var n=this;return e(r,function(e){return Xe(e,n,t)})})})}var Qy=createOver;var Vy=Qy(q);var eb=Vy;var rb=en;var tb=rb;var nb=Math.min;var ib=tb(function(e,r){r=r.length==1&&H(r[0])?q(r[0],Jn(Zl)):q(Ca(r,1),Jn(Zl));var t=r.length;return en(function(n){var i=-1,a=nb(n.length,t);while(++icb){return t}do{if(r%2){t+=e}r=lb(r/2);if(r){e+=e}}while(r);return t}var vb=baseRepeat;var db=Gl("length");var pb=db;var hb="\\ud800-\\udfff",gb="\\u0300-\\u036f",yb="\\ufe20-\\ufe2f",bb="\\u20d0-\\u20ff",mb=gb+yb+bb,_b="\\ufe0e\\ufe0f";var wb="["+hb+"]",Sb="["+mb+"]",Ob="\\ud83c[\\udffb-\\udfff]",xb="(?:"+Sb+"|"+Ob+")",Eb="[^"+hb+"]",jb="(?:\\ud83c[\\udde6-\\uddff]){2}",Ib="[\\ud800-\\udbff][\\udc00-\\udfff]",Ab="\\u200d";var Rb=xb+"?",kb="["+_b+"]?",Wb="(?:"+Ab+"(?:"+[Eb,jb,Ib].join("|")+")"+kb+Rb+")*",Cb=kb+Rb+Wb,Pb="(?:"+[Eb+Sb+"?",Sb,jb,Ib,wb].join("|")+")";var Tb=RegExp(Ob+"(?="+Ob+")|"+Pb+Cb,"g");function unicodeSize(e){var r=Tb.lastIndex=0;while(Tb.test(e)){++r}return r}var Mb=unicodeSize;function stringSize(e){return wo(e)?Mb(e):pb(e)}var Bb=stringSize;var Db=Math.ceil;function createPadding(e,r){r=r===undefined?" ":Y(r);var t=r.length;if(t<2){return t?vb(r,e):r}var n=vb(r,Db(e/Bb(r)));return wo(r)?lo(qo(n),0,e).join(""):n.slice(0,e)}var $b=createPadding;var Lb=Math.ceil,Nb=Math.floor;function pad(e,r,t){e=Sa(e);r=le(r);var n=r?Bb(e):0;if(!r||n>=r){return e}var i=(r-n)/2;return $b(Nb(i),t)+e+$b(Lb(i),t)}var Fb=pad;function padEnd(e,r,t){e=Sa(e);r=le(r);var n=r?Bb(e):0;return r&&n-1){if(u!==e){sm.call(u,s,1)}sm.call(e,s,1)}}return e}var fm=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?fm(e,r):e}var cm=pullAll;var lm=en(cm);var vm=lm;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?fm(e,r,Zl(t,2)):e}var dm=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?fm(e,r,undefined,t):e}var pm=pullAllWith;var hm=Array.prototype;var gm=hm.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(lt(i)){gm.call(e,i,1)}else{My(e,i)}}}return e}var ym=basePullAt;var bm=Ta(function(e,r){var t=e==null?0:e.length,n=Aa(e,r);ym(e,q(r,function(e){return lt(e,t)?+e:e}).sort(Zy));return n});var mm=bm;var _m=Math.floor,wm=Math.random;function baseRandom(e,r){return e+_m(wm()*(r-e+1))}var Sm=baseRandom;var Om=parseFloat;var xm=Math.min,Em=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&an(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=ce(e);if(r===undefined){r=e;e=0}else{r=ce(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var i=Em();return xm(e+i*(r-e+Om("1e-"+((i+"").length-1))),r)}return Sm(e,r)}var jm=random;var Im=Math.ceil,Am=Math.max;function baseRange(e,r,t,n){var i=-1,a=Am(Im((r-e)/(t||1)),0),o=Array(a);while(a--){o[n?a:++i]=e;e+=t}return o}var Rm=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&an(r,t,n)){t=n=undefined}r=ce(r);if(t===undefined){t=r;r=0}else{t=ce(t)}n=n===undefined?r1&&an(e,r[0],r[1])){r=[]}else if(t>2&&an(r[0],r[1],r[2])){r=[r[0]]}return Yy(e,Ca(r,1),[])});var w_=__;var S_=4294967295,O_=S_-1;var x_=Math.floor,E_=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,s=F(r),f=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<=A_){while(n>>1,o=e[a];if(o!==null&&!F(o)&&(t?o<=r:o>>0;if(!t){return[]}e=Sa(e);if(e&&(typeof r=="string"||r!=null&&!Og(r))){r=Y(r);if(!r&&wo(e)){return lo(qo(e),0,t)}}return e.split(r,t)}var N_=split;var F_="Expected a function";var z_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(F_)}r=r==null?0:z_(le(r),0);return en(function(t){var n=t[r],i=lo(t,0,r);if(n){Ra(i,n)}return Xe(e,this,i)})}var U_=spread;var q_=ts(function(e,r,t){return e+(t?" ":"")+Ko(r)});var G_=q_;function startsWith(e,r,t){e=Sa(e);t=t==null?0:hs(le(t),0,e.length);r=Y(r);return e.slice(t,t+r.length)==r}var H_=startsWith;function stubObject(){return{}}var K_=stubObject;function stubString(){return""}var Z_=stubString;function stubTrue(){return true}var X_=stubTrue;var Y_=J(function(e,r){return e-r},0);var J_=Y_;function sum(e){return e&&e.length?sy(e,pe):0}var Q_=sum;function sumBy(e,r){return e&&e.length?sy(e,Zl(r,2)):0}var V_=sumBy;function tail(e){var r=e==null?0:e.length;return r?co(e,1,r):[]}var ew=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:le(r);return co(e,0,r<0?0:r)}var rw=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:le(r);r=n-r;return co(e,r<0?0:r,n)}var tw=takeRight;function takeRightWhile(e,r){return e&&e.length?fd(e,Zl(r,3),false,true):[]}var nw=takeRightWhile;function takeWhile(e,r){return e&&e.length?fd(e,Zl(r,3)):[]}var iw=takeWhile;function tap(e,r){r(e);return e}var aw=tap;var ow=Object.prototype;var uw=ow.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Kt(e,ow[t])&&!uw.call(n,t)){return r}return e}var sw=customDefaultsAssignIn;var fw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+fw[e]}var cw=escapeStringChar;var lw=/<%=([\s\S]+?)%>/g;var vw=lw;var dw=/<%-([\s\S]+?)%>/g;var pw=dw;var hw=/<%([\s\S]+?)%>/g;var gw=hw;var yw={escape:pw,evaluate:gw,interpolate:vw,variable:"",imports:{_:{escape:Bd}}};var bw=yw;var mw=/\b__p \+= '';/g,_w=/\b(__p \+=) '' \+/g,ww=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var Sw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Ow=/($^)/;var xw=/['\n\r\u2028\u2029\\]/g;var Ew=Object.prototype;var jw=Ew.hasOwnProperty;function template(e,r,t){var n=bw.imports._.templateSettings||bw;if(t&&an(e,r,t)){r=undefined}e=Sa(e);r=Ri({},r,n,sw);var i=Ri({},r.imports,n.imports,sw),a=gi(i),o=oh(i,a);var u,s,f=0,c=r.interpolate||Ow,l="__p += '";var v=RegExp((r.escape||Ow).source+"|"+c.source+"|"+(c===vw?Sw:Ow).source+"|"+(r.evaluate||Ow).source+"|$","g");var d=jw.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(f,o).replace(xw,cw);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(a){s=true;l+="';\n"+a+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}f=o+r.length;return r});l+="';\n";var p=jw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(mw,""):l).replace(_w,"$1").replace(ww,"$1;");l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var h=Ya(function(){return Function(a,d+"return "+l).apply(undefined,o)});h.source=l;if(Za(h)){throw h}return h}var Iw=template;var Aw="Expected a function";function throttle(e,r,t){var n=true,i=true;if(typeof e!="function"){throw new TypeError(Aw)}if(ee(t)){n="leading"in t?!!t.leading:n;i="trailing"in t?!!t.trailing:i}return jv(e,r,{leading:n,maxWait:r,trailing:i})}var Rw=throttle;function thru(e,r){return r(e)}var kw=thru;var Ww=9007199254740991;var Cw=4294967295;var Pw=Math.min;function times(e,r){e=le(e);if(e<1||e>Ww){return[]}var t=Cw,n=Pw(e,Cw);r=vd(r);e-=Cw;var i=fn(n,r);while(++t-1){}return t}var qw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Gw=charsStartIndex;var Hw=/^\s+|\s+$/g;function trim(e,r,t){e=Sa(e);if(e&&(t||r===undefined)){return e.replace(Hw,"")}if(!e||!(r=Y(r))){return e}var n=qo(e),i=qo(r),a=Gw(n,i),o=qw(n,i)+1;return lo(n,a,o).join("")}var Kw=trim;var Zw=/\s+$/;function trimEnd(e,r,t){e=Sa(e);if(e&&(t||r===undefined)){return e.replace(Zw,"")}if(!e||!(r=Y(r))){return e}var n=qo(e),i=qw(n,qo(r))+1;return lo(n,0,i).join("")}var Xw=trimEnd;var Yw=/^\s+/;function trimStart(e,r,t){e=Sa(e);if(e&&(t||r===undefined)){return e.replace(Yw,"")}if(!e||!(r=Y(r))){return e}var n=qo(e),i=Gw(n,qo(r));return lo(n,i).join("")}var Jw=trimStart;var Qw=30,Vw="...";var eS=/\w*$/;function truncate(e,r){var t=Qw,n=Vw;if(ee(r)){var i="separator"in r?r.separator:i;t="length"in r?le(r.length):t;n="omission"in r?Y(r.omission):n}e=Sa(e);var a=e.length;if(wo(e)){var o=qo(e);a=o.length}if(t>=a){return e}var u=t-Bb(n);if(u<1){return n}var s=o?lo(o,0,u).join(""):e.slice(0,u);if(i===undefined){return s+n}if(o){u+=s.length-u}if(Og(i)){if(e.slice(u).search(i)){var f,c=s;if(!i.global){i=RegExp(i.source,Sa(eS.exec(i))+"g")}i.lastIndex=0;while(f=i.exec(c)){var l=f.index}s=s.slice(0,l===undefined?u:l)}}else if(e.indexOf(Y(i),u)!=u){var v=s.lastIndexOf(i);if(v>-1){s=s.slice(0,v)}}return s+n}var rS=truncate;function unary(e){return Gt(e,1)}var tS=unary;var nS={"&":"&","<":"<",">":">",""":'"',"'":"'"};var iS=Yo(nS);var aS=iS;var oS=/&(?:amp|lt|gt|quot|#39);/g,uS=RegExp(oS.source);function unescape_unescape(e){e=Sa(e);return e&&uS.test(e)?e.replace(oS,aS):e}var sS=unescape_unescape;var fS=1/0;var cS=!(Qs&&1/nl(new Qs([,-0]))[1]==fS)?ir:function(e){return new Qs(e)};var lS=cS;var vS=200;function baseUniq(e,r,t){var n=-1,i=zr,a=e.length,o=true,u=[],s=u;if(t){o=false;i=Xv}else if(a>=vS){var f=r?null:lS(e);if(f){return nl(f)}o=false;i=Qc;s=new Yc}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof nr)||!lt(t)){return this.thru(i)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:kw,args:[i],thisArg:undefined});return new vr(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var LS=$S;function wrapperChain(){return ls(this)}var NS=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof nr){var r=e;if(this.__actions__.length){r=new nr(this)}r=r.reverse();r.__actions__.push({func:kw,args:[Jm],thisArg:undefined});return new vr(r,this.__chain__)}return this.thru(Jm)}var FS=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?dS(e[0]):[]}var i=-1,a=Array(n);while(++i1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return AS(e,t)});var rO=eO;var tO={chunk:ps,compact:Gc,concat:Hc,difference:Vv,differenceBy:td,differenceWith:id,drop:ud,dropRight:sd,dropRightWhile:cd,dropWhile:ld,fill:Hd,findIndex:Jd,findLastIndex:ip,first:sp,flatten:Pa,flattenDeep:gp,flattenDepth:yp,fromPairs:Bp,head:sp,indexOf:lh,initial:vh,intersection:yh,intersectionBy:mh,intersectionWith:wh,join:Mg,last:ed,lastIndexOf:Ug,nth:Py,pull:vm,pullAll:cm,pullAllBy:dm,pullAllWith:pm,pullAt:mm,remove:Um,reverse:Jm,slice:h_,sortedIndex:k_,sortedIndexBy:W_,sortedIndexOf:C_,sortedLastIndex:P_,sortedLastIndexBy:T_,sortedLastIndexOf:M_,sortedUniq:D_,sortedUniqBy:$_,tail:ew,take:rw,takeRight:tw,takeRightWhile:nw,takeWhile:iw,union:hS,unionBy:yS,unionWith:mS,uniq:_S,uniqBy:wS,uniqWith:SS,unzip:IS,unzipWith:AS,without:BS,xor:qS,xorBy:HS,xorWith:ZS,zip:YS,zipObject:QS,zipObjectDeep:VS,zipWith:rO};var nO={countBy:hv,each:dd,eachRight:_d,every:zd,filter:Zd,find:Vd,findLast:op,flatMap:lp,flatMapDeep:dp,flatMapDepth:pp,forEach:dd,forEachRight:_d,groupBy:Up,includes:fh,invokeMap:$h,keyBy:Lg,map:cp,orderBy:Jy,partition:em,reduce:Lm,reduceRight:Fm,reject:zm,sample:t_,sampleSize:o_,shuffle:l_,size:p_,some:m_,sortBy:w_};var iO={now:Sv};var aO={after:de,ary:Gt,before:Qa,bind:to,bindKey:fo,curry:bv,curryRight:_v,debounce:jv,defer:Hv,delay:Zv,flip:mp,memoize:ha,negate:Ey,once:Hy,overArgs:ab,partial:Xb,partialRight:Qb,rearg:Dm,rest:Km,spread:U_,throttle:Rw,unary:tS,wrap:DS};var oO={castArray:as,clone:Mc,cloneDeep:$c,cloneDeepWith:Fc,cloneWith:Uc,conformsTo:rv,eq:Kt,gt:Kp,gte:Xp,isArguments:gn,isArray:H,isArrayBuffer:Uh,isArrayLike:nn,isArrayLikeObject:Pv,isBoolean:Gh,isBuffer:xn,isDate:Yh,isElement:Jh,isEmpty:tg,isEqual:ng,isEqualWith:ig,isError:Za,isFinite:og,isFunction:me,isInteger:ug,isLength:tn,isMap:Jf,isMatch:sg,isMatchWith:fg,isNaN:vg,isNative:gg,isNil:yg,isNull:bg,isNumber:lg,isObject:ee,isObjectLike:L,isPlainObject:Ga,isRegExp:Og,isSafeInteger:Eg,isSet:tc,isString:ah,isSymbol:F,isTypedArray:oi,isUndefined:jg,isWeakMap:Ag,isWeakSet:kg,lt:Yg,lte:Qg,toArray:ky,toFinite:ce,toInteger:le,toLength:qd,toNumber:ue,toPlainObject:Mv,toSafeInteger:Fw,toString:Sa};var uO={add:V,ceil:cs,divide:od,floor:wp,max:oy,maxBy:uy,mean:ly,meanBy:vy,min:my,minBy:_y,multiply:Oy,round:Vm,subtract:J_,sum:Q_,sumBy:V_};var sO={clamp:gs,inRange:nh,random:jm};var fO={assign:_i,assignIn:Ii,assignInWith:Ri,assignWith:Wi,at:Ba,create:gv,defaults:Wv,defaultsDeep:zv,entries:Ad,entriesIn:kd,extend:Ii,extendWith:Ri,findKey:rp,findLastKey:up,forIn:Cp,forInRight:Pp,forOwn:Tp,forOwnRight:Mp,functions:$p,functionsIn:Lp,get:Ia,has:Vp,hasIn:Fl,invert:Ih,invertBy:Ch,invoke:Bh,keys:gi,keysIn:Ei,mapKeys:Vg,mapValues:ey,merge:py,mergeWith:Nv,omit:Fy,omitBy:Gy,pick:nm,pickBy:qy,result:Zm,set:u_,setWith:s_,toPairs:Ad,toPairsIn:kd,transform:Uw,unset:ES,update:kS,updateWith:WS,values:uh,valuesIn:TS};var cO={at:LS,chain:ls,commit:qc,lodash:yr,next:Wy,plant:im,reverse:FS,tap:aw,thru:kw,toIterator:Mw,toJSON:Dw,value:Dw,valueOf:Dw,wrapperChain:NS};var lO={camelCase:is,capitalize:Zo,deburr:uu,endsWith:wd,escape:Bd,escapeRegExp:Ld,kebabCase:Dg,lowerCase:Gg,lowerFirst:Kg,pad:Fb,padEnd:zb,padStart:Ub,parseInt:Hb,repeat:qm,replace:Gm,snakeCase:y_,split:N_,startCase:G_,startsWith:H_,template:Iw,templateSettings:bw,toLower:$w,toUpper:zw,trim:Kw,trimEnd:Xw,trimStart:Jw,truncate:rS,unescape:sS,upperCase:PS,upperFirst:Ko,words:Vu};var vO={attempt:Ya,bindAll:io,cond:Yl,conforms:ev,constant:kr,defaultTo:Iv,flow:Rp,flowRight:Wp,identity:pe,iteratee:Cg,matches:ty,matchesProperty:iy,method:gy,methodOf:by,mixin:wy,noop:ir,nthArg:Ty,over:eb,overEvery:ub,overSome:fb,property:Kl,propertyOf:am,range:Cm,rangeRight:Tm,stubArray:Ps,stubFalse:yn,stubObject:K_,stubString:Z_,stubTrue:X_,times:Tw,toPath:Lw,uniqueId:xS};function lazyClone(){var e=new nr(this.__wrapped__);e.__actions__=dr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=dr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=dr(this.__views__);return e}var dO=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new nr(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var pO=lazyReverse;var hO=Math.max,gO=Math.min;function getView(e,r,t){var n=-1,i=t.length;while(++n0||r<0)){return new nr(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=le(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};nr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};nr.prototype.toArray=function(){return this.take(jO)};ov(nr.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),i=yr[n?"take"+(r=="last"?"Right":""):r],a=n||/^find/.test(r);if(!i){return}yr.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof nr,s=o[0],f=u||H(r);var c=function(e){var r=i.apply(yr,Ra([e],o));return n&&l?r[0]:r};if(f&&t&&typeof s=="function"&&s.length!=1){u=f=false}var l=this.__chain__,v=!!this.__actions__.length,d=a&&!l,p=u&&!v;if(!a&&f){r=p?r:new nr(this);var h=e.apply(r,o);h.__actions__.push({func:kw,args:[c],thisArg:undefined});return new vr(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(c);return d?n?h.value()[0]:h.value():h}});Dr(["pop","push","shift","sort","splice","unshift"],function(e){var r=IO[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);yr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return r.apply(H(i)?i:[],e)}return this[t](function(t){return r.apply(H(t)?t:[],e)})}});ov(nr.prototype,function(e,r){var t=yr[r];if(t){var n=t.name+"";if(!RO.call(sr,n)){sr[n]=[]}sr[n].push({name:r,func:t})}});sr[St(undefined,OO).name]=[{name:"wrapper",func:undefined}];nr.prototype.clone=dO;nr.prototype.reverse=pO;nr.prototype.value=wO;yr.prototype.at=cO.at;yr.prototype.chain=cO.wrapperChain;yr.prototype.commit=cO.commit;yr.prototype.next=cO.next;yr.prototype.plant=cO.plant;yr.prototype.reverse=cO.reverse;yr.prototype.toJSON=yr.prototype.valueOf=yr.prototype.value=cO.value;yr.prototype.first=yr.prototype.head;if(kO){yr.prototype[kO]=cO.toIterator}var TO=yr;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(!Vp(image_tag_ImageTag.targetPlatformToImageSuffixMap,i)){throw new Error(`Platform "${i}" is currently not supported.`)}const a=Ia(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:u}=image_tag_ImageTag.imageSuffixes;return{[o.types.StandaloneOSX]:t,[o.types.StandaloneWindows]:n,[o.types.StandaloneWindows64]:n,[o.types.StandaloneLinux64]:n,[o.types.iOS]:a,[o.types.Android]:i,[o.types.WebGL]:r,[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]:u,[o.types.NoTarget]:e,[o.types.Test]:e}}get tag(){return Xw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Jw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var MO=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:i}=e;const{version:a,platform:o}=i;const u=new MO({repository:"",name:"unity-builder",version:a,platform:o});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${i} --tag ${u}`;await Object(v.exec)(s,undefined,{silent:r});return u}static async run(e,r,t=false){const{version:n,workspace:i,platform:a,projectPath:o,buildName:u,buildPath:s,buildFile:f,buildMethod:c,buildVersion:l,customParameters:d}=r;const p=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_LICENSE_FILE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION="${n}" --env PROJECT_PATH="${o}" --env BUILD_TARGET="${a}" --env BUILD_NAME="${u}" --env BUILD_PATH="${s}" --env BUILD_FILE="${f}" --env BUILD_METHOD="${c}" --env VERSION="${l}" --env CUSTOM_PARAMETERS="${d}" --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(v.exec)(p,undefined,{silent:t})}}var BO=docker_Docker;const DO=t(470);async function src_action(){a.checkCompatibility();m.verify();const{dockerfile:e,workspace:r,actionFolder:t}=a;const n=await p.create();const i=new MO(n);const o=await BO.build({path:t,dockerfile:e,baseImage:i});await BO.run(o,{workspace:r,...n})}src_action().catch(e=>{DO.setFailed(e.message)})},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())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=i(t(9));function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];r=n.slice(1).concat(r||[]);const o=new a.ToolRunner(i,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,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__(557)}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 s=t(672);const u=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 s.exists(r))?yield s.stat(r):null;if(o&&o.isFile()&&!n){return}const u=o&&o.isDirectory()?a.join(r,a.basename(e)):r;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)}})}r.cp=cp;function mv(e,r,t={}){return n(this,void 0,void 0,function*(){if(yield s.exists(r)){let n=true;if(yield s.isDirectory(r)){r=a.join(r,a.basename(e));n=yield s.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 s.rename(e,r)})}r.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 r=false;try{r=yield s.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(r){yield u(`rm -rf "${e}"`)}else{yield s.unlink(e)}}})}r.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield s.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(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 r=[];if(s.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(a.delimiter)){if(e){r.push(e)}}}if(s.isRooted(e)){const t=yield s.tryGetExecutablePath(e,r);if(t){return t}return""}if(e.includes("/")||s.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 s.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 s.readdir(e);for(const a of n){const n=`${e}/${a}`;const o=`${r}/${a}`;const u=yield s.lstat(n);if(u.isDirectory()){yield cpDirRecursive(n,o,t,i)}else{yield copyFile(n,o,i)}}yield s.chmod(r,(yield s.stat(e)).mode)})}function copyFile(e,r,t){return n(this,void 0,void 0,function*(){if((yield s.lstat(e)).isSymbolicLink()){try{yield s.lstat(r);yield s.unlink(r)}catch(e){if(e.code==="EPERM"){yield s.chmod(r,"0666");yield s.unlink(r)}}const t=yield s.readlink(e);yield s.symlink(t,r,s.IS_WINDOWS?"junction":null)}else if(!(yield s.exists(r))||t){yield s.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())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=i(t(87));const o=i(t(614));const s=i(t(129));const u=i(t(622));const c=i(t(1));const f=i(t(672));const l=process.platform==="win32";class ToolRunner extends o.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(l){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 i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);t(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(l){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(l){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(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||l&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.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)+a.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const o=s.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const u="";if(o.stdout){o.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,u,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(o.stderr){o.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}o.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});o.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});o.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(t,n)=>{if(u.length>0){this.emit("stdline",u)}if(c.length>0){this.emit("errline",c)}o.removeAllListeners();if(t){r(t)}else{e(n)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}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 o.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()}}},16:function(e,r,t){const n=t(65);const i=(e,r,t)=>{const i=new n(e,t);const a=new n(r,t);return i.compare(a)||i.compareBuild(a)};e.exports=i},65:function(e,r,t){const n=t(548);const{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=t(181);const{re:o,t:s}=t(976);const{compareIdentifiers:u}=t(760);class SemVer{constructor(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>i){throw new TypeError(`version is longer than ${i} characters`)}n("SemVer",e,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const t=e.trim().match(r.loose?o[s.LOOSE]:o[s.FULL]);if(!t){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+t[1];this.minor=+t[2];this.patch=+t[3];if(this.major>a||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>a||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>a||this.patch<0){throw new TypeError("Invalid patch version")}if(!t[4]){this.prerelease=[]}else{this.prerelease=t[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const r=+e;if(r>=0&&r=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1])){this.prerelease=[r,0]}}else{this.prerelease=[r,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},87:function(e){e.exports=require("os")},120:function(e,r,t){const n=t(16);const i=(e,r)=>e.sort((e,t)=>n(e,t,r));e.exports=i},124:function(e,r,t){class Range{constructor(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease){return e}else{return new Range(e.raw,r)}}if(e instanceof n){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}this.format()}format(){this.range=this.set.map(e=>{return e.join(" ").trim()}).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const r=this.options.loose;e=e.trim();const t=r?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];e=e.replace(t,E(this.options.includePrerelease));i("hyphen replace",e);e=e.replace(o[s.COMPARATORTRIM],u);i("comparator trim",e,o[s.COMPARATORTRIM]);e=e.replace(o[s.TILDETRIM],c);e=e.replace(o[s.CARETTRIM],f);e=e.split(/\s+/).join(" ");const a=r?o[s.COMPARATORLOOSE]:o[s.COMPARATOR];return e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>w(e,this.options)).filter(this.options.loose?e=>!!e.match(a):()=>true).map(e=>new n(e,this.options))}intersects(e,r){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(t=>{return l(t,r)&&e.set.some(e=>{return l(e,r)&&t.every(t=>{return e.every(e=>{return t.intersects(e,r)})})})})}test(e){if(!e){return false}if(typeof e==="string"){try{e=new a(e,this.options)}catch(e){return false}}for(let r=0;r{let t=true;const n=e.slice();let i=n.pop();while(t&&n.length){t=n.every(e=>{return i.intersects(e,r)});i=n.pop()}return t};const v=(e,r)=>{i("comp",e,r);e=g(e,r);i("caret",e);e=h(e,r);i("tildes",e);e=b(e,r);i("xrange",e);e=m(e,r);i("stars",e);return e};const d=e=>!e||e.toLowerCase()==="x"||e==="*";const h=(e,r)=>e.trim().split(/\s+/).map(e=>{return p(e,r)}).join(" ");const p=(e,r)=>{const t=r.loose?o[s.TILDELOOSE]:o[s.TILDE];return e.replace(t,(r,t,n,a,o)=>{i("tilde",e,r,t,n,a,o);let s;if(d(t)){s=""}else if(d(n)){s=`>=${t}.0.0 <${+t+1}.0.0-0`}else if(d(a)){s=`>=${t}.${n}.0 <${t}.${+n+1}.0-0`}else if(o){i("replaceTilde pr",o);s=`>=${t}.${n}.${a}-${o} <${t}.${+n+1}.0-0`}else{s=`>=${t}.${n}.${a} <${t}.${+n+1}.0-0`}i("tilde return",s);return s})};const g=(e,r)=>e.trim().split(/\s+/).map(e=>{return y(e,r)}).join(" ");const y=(e,r)=>{i("caret",e,r);const t=r.loose?o[s.CARETLOOSE]:o[s.CARET];const n=r.includePrerelease?"-0":"";return e.replace(t,(r,t,a,o,s)=>{i("caret",e,r,t,a,o,s);let u;if(d(t)){u=""}else if(d(a)){u=`>=${t}.0.0${n} <${+t+1}.0.0-0`}else if(d(o)){if(t==="0"){u=`>=${t}.${a}.0${n} <${t}.${+a+1}.0-0`}else{u=`>=${t}.${a}.0${n} <${+t+1}.0.0-0`}}else if(s){i("replaceCaret pr",s);if(t==="0"){if(a==="0"){u=`>=${t}.${a}.${o}-${s} <${t}.${a}.${+o+1}-0`}else{u=`>=${t}.${a}.${o}-${s} <${t}.${+a+1}.0-0`}}else{u=`>=${t}.${a}.${o}-${s} <${+t+1}.0.0-0`}}else{i("no pr");if(t==="0"){if(a==="0"){u=`>=${t}.${a}.${o}${n} <${t}.${a}.${+o+1}-0`}else{u=`>=${t}.${a}.${o}${n} <${t}.${+a+1}.0-0`}}else{u=`>=${t}.${a}.${o} <${+t+1}.0.0-0`}}i("caret return",u);return u})};const b=(e,r)=>{i("replaceXRanges",e,r);return e.split(/\s+/).map(e=>{return _(e,r)}).join(" ")};const _=(e,r)=>{e=e.trim();const t=r.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return e.replace(t,(t,n,a,o,s,u)=>{i("xRange",e,t,n,a,o,s,u);const c=d(a);const f=c||d(o);const l=f||d(s);const v=l;if(n==="="&&v){n=""}u=r.includePrerelease?"-0":"";if(c){if(n===">"||n==="<"){t="<0.0.0-0"}else{t="*"}}else if(n&&v){if(f){o=0}s=0;if(n===">"){n=">=";if(f){a=+a+1;o=0;s=0}else{o=+o+1;s=0}}else if(n==="<="){n="<";if(f){a=+a+1}else{o=+o+1}}if(n==="<")u="-0";t=`${n+a}.${o}.${s}${u}`}else if(f){t=`>=${a}.0.0${u} <${+a+1}.0.0-0`}else if(l){t=`>=${a}.${o}.0${u} <${a}.${+o+1}.0-0`}i("xRange return",t);return t})};const m=(e,r)=>{i("replaceStars",e,r);return e.trim().replace(o[s.STAR],"")};const w=(e,r)=>{i("replaceGTE0",e,r);return e.trim().replace(o[r.includePrerelease?s.GTE0PRE:s.GTE0],"")};const E=e=>(r,t,n,i,a,o,s,u,c,f,l,v,h)=>{if(d(n)){t=""}else if(d(i)){t=`>=${n}.0.0${e?"-0":""}`}else if(d(a)){t=`>=${n}.${i}.0${e?"-0":""}`}else if(o){t=`>=${t}`}else{t=`>=${t}${e?"-0":""}`}if(d(c)){u=""}else if(d(f)){u=`<${+c+1}.0.0-0`}else if(d(l)){u=`<${c}.${+f+1}.0-0`}else if(v){u=`<=${c}.${f}.${l}-${v}`}else if(e){u=`<${c}.${f}.${+l+1}-0`}else{u=`<=${u}`}return`${t} ${u}`.trim()};const I=(e,r,t)=>{for(let t=0;t0){const n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch){return true}}}return false}return true}},129:function(e){e.exports=require("child_process")},164:function(e,r,t){const n=t(65);const i=t(124);const a=t(486);const o=(e,r)=>{e=new i(e,r);let t=new n("0.0.0");if(e.test(t)){return t}t=new n("0.0.0-0");if(e.test(t)){return t}t=null;for(let r=0;r{const r=new n(e.semver.version);switch(e.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!t||a(t,r)){t=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})}if(t&&e.test(t)){return t}return null};e.exports=o},167:function(e,r,t){const n=t(874);const i=(e,r,t)=>n(e,r,t)>=0;e.exports=i},174:function(e,r,t){const n=Symbol("SemVer ANY");class Comparator{static get ANY(){return n}constructor(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!r.loose){return e}else{e=e.value}}s("comparator",e,r);this.options=r;this.loose=!!r.loose;this.parse(e);if(this.semver===n){this.value=""}else{this.value=this.operator+this.semver.version}s("comp",this)}parse(e){const r=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR];const t=e.match(r);if(!t){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=t[1]!==undefined?t[1]:"";if(this.operator==="="){this.operator=""}if(!t[2]){this.semver=n}else{this.semver=new u(t[2],this.options.loose)}}toString(){return this.value}test(e){s("Comparator.test",e,this.options.loose);if(this.semver===n||e===n){return true}if(typeof e==="string"){try{e=new u(e,this.options)}catch(e){return false}}return o(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new c(e.value,r).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new c(this.value,r).test(e.semver)}const t=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const i=this.semver.version===e.semver.version;const a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const s=o(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const u=o(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return t||n||i&&a||s||u}}e.exports=Comparator;const{re:i,t:a}=t(976);const o=t(752);const s=t(548);const u=t(65);const c=t(124)},181:function(e){const r="2.0.0";const t=256;const n=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;e.exports={SEMVER_SPEC_VERSION:r,MAX_LENGTH:t,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:i}},219:function(e,r,t){const n=t(124);const i=(e,r)=>new n(e,r).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=i},259:function(e,r,t){const n=t(124);const i=(e,r,t)=>{e=new n(e,t);r=new n(r,t);return e.intersects(r)};e.exports=i},283:function(e,r,t){const n=t(874);const i=(e,r)=>n(e,r,true);e.exports=i},298:function(e,r,t){const n=t(874);const i=(e,r,t)=>n(e,r,t)===0;e.exports=i},310:function(e,r,t){const n=t(124);const i=(e,r,t)=>{try{r=new n(r,t)}catch(e){return false}return r.test(e)};e.exports=i},323:function(e,r,t){const n=t(462);const i=(e,r,t)=>n(e,r,"<",t);e.exports=i},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const i=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+i.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const a="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const n=this.properties[t];if(n){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(n)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}r.toCommandValue=toCommandValue;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},462:function(e,r,t){const n=t(65);const i=t(174);const{ANY:a}=i;const o=t(124);const s=t(310);const u=t(486);const c=t(586);const f=t(898);const l=t(167);const v=(e,r,t,v)=>{e=new n(e,v);r=new o(r,v);let d,h,p,g,y;switch(t){case">":d=u;h=f;p=c;g=">";y=">=";break;case"<":d=c;h=l;p=u;g="<";y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,r,v)){return false}for(let t=0;t{if(e.semver===a){e=new i(">=0.0.0")}o=o||e;s=s||e;if(d(e.semver,o.semver,v)){o=e}else if(p(e.semver,s.semver,v)){s=e}});if(o.operator===g||o.operator===y){return false}if((!s.operator||s.operator===g)&&h(e,s.semver)){return false}else if(s.operator===y&&p(e,s.semver)){return false}}return true};e.exports=v},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())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=t(431);const o=i(t(87));const s=i(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){const t=a.toCommandValue(r);process.env[e]=t;a.issueCommand("set-env",{name:e},t)}r.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){a.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${s.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){a.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}r.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}r.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}r.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}r.debug=debug;function error(e){a.issue("error",e instanceof Error?e.toString():e)}r.error=error;function warning(e){a.issue("warning",e instanceof Error?e.toString():e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){a.issue("group",e)}r.startGroup=startGroup;function endGroup(){a.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){a.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},480:function(e,r,t){const n=t(124);const i=(e,r)=>{try{return new n(e,r).range||"*"}catch(e){return null}};e.exports=i},486:function(e,r,t){const n=t(874);const i=(e,r,t)=>n(e,r,t)>0;e.exports=i},489:function(e,r,t){const n=t(65);const i=(e,r)=>new n(e,r).patch;e.exports=i},499:function(e,r,t){const n=t(65);const i=t(830);const{re:a,t:o}=t(976);const s=(e,r)=>{if(e instanceof n){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}r=r||{};let t=null;if(!r.rtl){t=e.match(a[o.COERCE])}else{let r;while((r=a[o.COERCERTL].exec(e))&&(!t||t.index+t[0].length!==e.length)){if(!t||r.index+r[0].length!==t.index+t[0].length){t=r}a[o.COERCERTL].lastIndex=r.index+r[1].length+r[2].length}a[o.COERCERTL].lastIndex=-1}if(t===null)return null;return i(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,r)};e.exports=s},503:function(e,r,t){const n=t(830);const i=(e,r)=>{const t=n(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null};e.exports=i},531:function(e,r,t){const n=t(462);const i=(e,r,t)=>n(e,r,">",t);e.exports=i},548:function(e){const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=r},557: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 actionFolder(){return`${action_Action.rootFolder}/action`}static get dockerfile(){return`${action_Action.actionFolder}/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(470);var s=t(876);class android_versioning_AndroidVersioning{static determineVersionCode(e,r){if(!r){return android_versioning_AndroidVersioning.versionToVersionCode(e)}return r}static versionToVersionCode(e){const r=Object(s.parse)(e);if(!r){Object(o.warning)(`Could not parse "${e}" to semver, defaulting android version code to 1`);return 1}const t=r.major*1e6+r.minor*1e3+r.patch;if(t>=1e9){throw new Error(`Generated versionCode ${t} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`)}Object(o.info)(`Using android versionCode ${t}`);return t}}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 u=Platform;const c=t(470);class input_Input{static get unityVersion(){return c.getInput("unityVersion")}static get targetPlatform(){return c.getInput("targetPlatform")||u.default}static get projectPath(){const e=c.getInput("projectPath")||".";return e.replace(/\/$/,"")}static get buildName(){return c.getInput("buildName")||this.targetPlatform}static get buildsPath(){return c.getInput("buildsPath")||"build"}static get buildMethod(){return c.getInput("buildMethod")}static get versioningStrategy(){return c.getInput("versioning")||"Semantic"}static get specifiedVersion(){return c.getInput("version")||""}static get androidVersionCode(){return c.getInput("androidVersionCode")}static get allowDirtyBuild(){const e=c.getInput("allowDirtyBuild")||"false";return e==="true"?"true":"false"}static get customParameters(){return c.getInput("customParameters")||""}}var f=input_Input;class NotImplementedException extends Error{constructor(e){super(e);this.name="NotImplementedException"}}var l=NotImplementedException;class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError"}}var v=ValidationError;var d=t(986);class system_System{static async run(e,r,t){let n="";let i="";let a="";const s={stdout:e=>{n+=e.toString()},stderr:e=>{i+=e.toString()},debug:e=>{a+=e.toString()}};const u=()=>{if(a!==""){Object(o.debug)(a)}if(n!==""){Object(o.info)(n)}if(i!==""){Object(o.warning)(i)}};const c=t=>{let n=e;if(Array.isArray(r)){n+=` ${r.join(" ")}`}else if(typeof r==="string"){n+=` ${r}`}throw new Error(`Failed to run "${n}".\n ${t}`)};try{const n=await Object(d.exec)(e,r,{silent:true,listeners:s,...t});u();if(n!==0){c(`Command returned non-zero exit code.\nError: ${i}`)}}catch(e){u();c(`In-command error caught: ${e}`)}return n}}var h=system_System;class versioning_Versioning{static get projectPath(){return f.projectPath}static get isDirtyAllowed(){return f.allowDirtyBuild==="true"}static get strategies(){return{None:"None",Semantic:"Semantic",Tag:"Tag",Custom:"Custom"}}static get branch(){return this.headRef||this.ref&&this.ref.slice(11)}static get headRef(){return process.env.GITHUB_HEAD_REF}static get ref(){return process.env.GITHUB_REF}static get sha(){return process.env.GITHUB_SHA}static get descriptionRegex(){return/^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g}static async determineVersion(e,r){if(!Object.hasOwnProperty.call(this.strategies,e)){throw new v(`Versioning strategy should be one of ${Object.values(this.strategies).join(", ")}.`)}let t;switch(e){case this.strategies.None:t="none";break;case this.strategies.Custom:t=r;break;case this.strategies.Semantic:t=await this.generateSemanticVersion();break;case this.strategies.Tag:t=await this.generateTagVersion();break;default:throw new l(`Strategy ${e} is not implemented.`)}return t}static async generateSemanticVersion(){await this.fetch();if(await this.isDirty()&&!this.isDirtyAllowed){throw new Error("Branch is dirty. Refusing to base semantic version on uncommitted changes")}if(!await this.hasAnyVersionTags()){const e=`0.0.${await this.getTotalNumberOfCommits()}`;Object(o.info)(`Generated version ${e} (no version tags found).`);return e}const{tag:e,commits:r,hash:t}=await this.parseSemanticVersion();Object(o.info)(`Found semantic version ${e}.${r} for ${this.branch}@${t}`);return`${e}.${r}`}static async generateTagVersion(){let e=await this.getTag();if(e.charAt(0)==="v"){e=e.slice(1)}return e}static async parseSemanticVersion(){const e=await this.getVersionDescription();try{const[r,t,n,i]=this.descriptionRegex.exec(e);return{match:r,tag:t,commits:n,hash:i}}catch(r){throw new Error(`Failed to parse git describe output: "${e}".`)}}static async fetch(){try{await this.git(["fetch","--unshallow"])}catch(e){Object(o.warning)(`Fetch --unshallow caught: ${e}`);await this.git(["fetch"])}}static async getVersionDescription(){return this.git(["describe","--long","--tags","--always","--debug",this.sha])}static async isDirty(){const e=await this.git(["status","--porcelain"]);return e!==""}static async getTag(){return this.git(["tag","--points-at","HEAD"])}static async hasAnyVersionTags(){const e=await h.run("sh",undefined,{input:Buffer.from("git tag --list --merged HEAD | grep v[0-9]* | wc -l"),silent:false});const r=Number.parseInt(e,10);return r!==0}static async getTotalNumberOfCommits(){const e=await this.git(["rev-list","--count",this.sha]);return Number.parseInt(e,10)}static async git(e,r={}){return h.run("git",e,{cwd:this.projectPath,...r})}}class build_parameters_BuildParameters{static async create(){const e=this.parseBuildFile(f.buildName,f.targetPlatform);const r=await versioning_Versioning.determineVersion(f.versioningStrategy,f.specifiedVersion);const t=android_versioning_AndroidVersioning.determineVersionCode(r,f.androidVersionCode);return{version:f.unityVersion,platform:f.targetPlatform,projectPath:f.projectPath,buildName:f.buildName,buildPath:`${f.buildsPath}/${f.targetPlatform}`,buildFile:e,buildMethod:f.buildMethod,buildVersion:r,androidVersionCode:t,customParameters:f.customParameters}}static parseBuildFile(e,r){if(u.isWindows(r)){return`${e}.exe`}if(u.isAndroid(r)){return`${e}.apk`}return e}}var p=build_parameters_BuildParameters;var g=t(747);var y=t.n(g);class Unity{static get libraryFolder(){return"Library"}}var b=Unity;class project_Project{static get relativePath(){const{projectPath:e}=f;return`${e}`}static get absolutePath(){const{workspace:e}=a;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${b.libraryFolder}`}}var _=project_Project;class cache_Cache{static verify(){if(!y().existsSync(_.libraryFolder)){this.notifyAboutCachingPossibility()}}static notifyAboutCachingPossibility(){if(a.isRunningLocally){return}Object(o.warning)(`\n Library folder does not exist.\n Consider setting up caching to speed up your workflow,\n if this is not your first build.\n `)}}var m=cache_Cache;var w=typeof global=="object"&&global&&global.Object===Object&&global;var E=w;var I=typeof self=="object"&&self&&self.Object===Object&&self;var O=E||I||Function("return this")();var S=O;var R=S.Symbol;var A=R;var x=Object.prototype;var $=x.hasOwnProperty;var j=x.toString;var T=A?A.toStringTag:undefined;function getRawTag(e){var r=$.call(e,T),t=e[T];try{e[T]=undefined;var n=true}catch(e){}var i=j.call(e);if(n){if(r){e[T]=t}else{delete e[T]}}return i}var C=getRawTag;var N=Object.prototype;var L=N.toString;function objectToString(e){return L.call(e)}var P=objectToString;var k="[object Null]",W="[object Undefined]";var D=A?A.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?W:k}return D&&D in Object(e)?C(e):P(e)}var B=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var F=isObjectLike;var U="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||F(e)&&B(e)==U}var G=isSymbol;var z=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(G(e)){return z}return+e}var q=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t0){if(++r>=mr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var Ir=shortOut;var Or=Ir(ze);var Sr=Or;var Rr=/\{\n\/\* \[wrapped with (.+)\] \*/,Ar=/,? & /;function getWrapDetails(e){var r=e.match(Rr);return r?r[1].split(Ar):[]}var xr=getWrapDetails;var $r=/\{(?:\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($r,"{\n/* [wrapped with "+r+"] */\n")}var jr=insertWrapDetails;function constant(e){return function(){return e}}var Tr=constant;var Cr=function(){try{var e=We(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Nr=Cr;var Lr=!Nr?pe:function(e,r){return Nr(e,"toString",{configurable:true,enumerable:false,value:Tr(r),writable:true})};var Pr=Lr;var kr=Ir(Pr);var Wr=kr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var zr=arrayIncludes;var qr=1,Hr=2,Kr=8,Xr=16,Yr=32,Zr=64,Mr=128,Jr=256,Qr=512;var Vr=[["ary",Mr],["bind",qr],["bindKey",Hr],["curry",Kr],["curryRight",Xr],["flip",Qr],["partial",Yr],["partialRight",Zr],["rearg",Jr]];function updateWrapDetails(e,r){Dr(Vr,function(t){var n="_."+t[0];if(r&t[1]&&!zr(e,n)){e.push(n)}});return e.sort()}var et=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Wr(e,jr(n,et(xr(n),t)))}var rt=setWrapToString;var tt=1,nt=2,it=4,at=8,ot=32,st=64;function createRecurry(e,r,t,n,i,a,o,s,u,c){var f=r&at,l=f?o:undefined,v=f?undefined:o,d=f?a:undefined,h=f?undefined:a;r|=f?ot:st;r&=~(f?st:ot);if(!(r&it)){r&=~(tt|nt)}var p=[e,r,i,d,l,h,v,s,u,c];var g=t.apply(undefined,p);if(_r(e)){Sr(g,p)}g.placeholder=n;return rt(g,e,r)}var ut=createRecurry;function getHolder(e){var r=e;return r.placeholder}var ct=getHolder;var ft=9007199254740991;var lt=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?ft:r;return!!r&&(t=="number"||t!="symbol"&<.test(e))&&(e>-1&&e%1==0&&e1){y.reverse()}if(f&&u-1&&e%1==0&&e<=tn}var nn=isLength;function isArrayLike(e){return e!=null&&nn(e.length)&&!me(e)}var an=isArrayLike;function isIterateeCall(e,r,t){if(!re(t)){return false}var n=typeof r;if(n=="number"?an(t)&&vt(r,t.length):n=="string"&&r in t){return Yt(t[r],e)}return false}var on=isIterateeCall;function createAssigner(e){return rn(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&&on(t[0],t[1],o)){a=i<3?undefined:a;i=1}r=Object(r);while(++n-1}var ta=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Ji(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var na=listCacheSet;function ListCache(e){var r=-1,t=e==null?0:e.length;this.clear();while(++r0&&t(s)){if(r>1){baseFlatten(s,r-1,t,n,i)}else{ja(i,s)}}else if(!n){i[i.length]=s}}return i}var Na=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?Na(e,1):[]}var La=flatten;function flatRest(e){return Wr(en(e,undefined,La),e+"")}var Pa=flatRest;var ka=Pa($a);var Wa=ka;var Da=li(Object.getPrototypeOf,Object);var Ba=Da;var Fa="[object Object]";var Ua=Function.prototype,Ga=Object.prototype;var za=Ua.toString;var qa=Ga.hasOwnProperty;var Ha=za.call(Object);function isPlainObject(e){if(!F(e)||B(e)!=Fa){return false}var r=Ba(e);if(r===null){return true}var t=qa.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&za.call(t)==Ha}var Ka=isPlainObject;var Xa="[object DOMException]",Ya="[object Error]";function isError(e){if(!F(e)){return false}var r=B(e);return r==Ya||r==Xa||typeof e.message=="string"&&typeof e.name=="string"&&!Ka(e)}var Za=isError;var Ma=rn(function(e,r){try{return Me(e,undefined,r)}catch(e){return Za(e)?e:new Error(e)}});var Ja=Ma;var Qa="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Qa)}e=ve(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Va=before;var eo=1,ro=32;var to=rn(function(e,r,t){var n=eo;if(t.length){var i=gt(t,ct(to));n|=ro}return qt(e,n,r,t,i)});to.placeholder={};var no=to;var io=Pa(function(e,r){Dr(r,function(r){r=Ra(r);Xt(e,r,no(e[r],e))});return e});var ao=io;var oo=1,so=2,uo=32;var co=rn(function(e,r,t){var n=oo|so;if(t.length){var i=gt(t,ct(co));n|=uo}return qt(r,n,e,t,i)});co.placeholder={};var fo=co;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:lo(e,r,t)}var vo=castSlice;var ho="\\ud800-\\udfff",po="\\u0300-\\u036f",go="\\ufe20-\\ufe2f",yo="\\u20d0-\\u20ff",bo=po+go+yo,_o="\\ufe0e\\ufe0f";var mo="\\u200d";var wo=RegExp("["+mo+ho+bo+_o+"]");function hasUnicode(e){return wo.test(e)}var Eo=hasUnicode;function asciiToArray(e){return e.split("")}var Io=asciiToArray;var Oo="\\ud800-\\udfff",So="\\u0300-\\u036f",Ro="\\ufe20-\\ufe2f",Ao="\\u20d0-\\u20ff",xo=So+Ro+Ao,$o="\\ufe0e\\ufe0f";var jo="["+Oo+"]",To="["+xo+"]",Co="\\ud83c[\\udffb-\\udfff]",No="(?:"+To+"|"+Co+")",Lo="[^"+Oo+"]",Po="(?:\\ud83c[\\udde6-\\uddff]){2}",ko="[\\ud800-\\udbff][\\udc00-\\udfff]",Wo="\\u200d";var Do=No+"?",Bo="["+$o+"]?",Fo="(?:"+Wo+"(?:"+[Lo,Po,ko].join("|")+")"+Bo+Do+")*",Uo=Bo+Do+Fo,Go="(?:"+[Lo+To+"?",To,Po,ko,jo].join("|")+")";var zo=RegExp(Co+"(?="+Co+")|"+Go+Uo,"g");function unicodeToArray(e){return e.match(zo)||[]}var qo=unicodeToArray;function stringToArray(e){return Eo(e)?qo(e):Io(e)}var Ho=stringToArray;function createCaseFirst(e){return function(r){r=Ia(r);var t=Eo(r)?Ho(r):undefined;var n=t?t[0]:r.charAt(0);var i=t?vo(t,1).join(""):r.slice(1);return n[e]()+i}}var Ko=createCaseFirst;var Xo=Ko("toUpperCase");var Yo=Xo;function capitalize(e){return Yo(Ia(e).toLowerCase())}var Zo=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 gu=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=ue(t);t=t===t?t:0}if(r!==undefined){r=ue(r);r=r===r?r:0}return gu(ue(e),r,t)}var yu=clamp;function stackClear(){this.__data__=new ia;this.size=0}var bu=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var _u=stackDelete;function stackGet(e){return this.__data__.get(e)}var mu=stackGet;function stackHas(e){return this.__data__.has(e)}var wu=stackHas;var Eu=200;function stackSet(e,r){var t=this.__data__;if(t instanceof ia){var n=t.__data__;if(!oa||n.lengths)){return false}var c=a.get(e);if(c&&a.get(r)){return c==r}var f=-1,l=true,v=t&rl?new Jf:undefined;a.set(e,r);a.set(r,e);while(++f=r||t<0||l&&n>=a}function timerExpired(){var e=Iv();if(shouldInvoke(e)){return trailingEdge(e)}s=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){s=undefined;if(v&&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(Iv())}function debounced(){var e=Iv(),t=shouldInvoke(e);n=arguments;i=this;u=e;if(t){if(s===undefined){return leadingEdge(u)}if(l){clearTimeout(s);s=setTimeout(timerExpired,r);return invokeFunc(u)}}if(s===undefined){s=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var Av=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var xv=defaultTo;var $v=Object.prototype;var jv=$v.hasOwnProperty;var Tv=rn(function(e,r){e=Object(e);var t=-1;var n=r.length;var i=n>2?r[2]:undefined;if(i&&on(r[0],r[1],i)){n=1}while(++t=Jv){a=Vf;o=false;r=new Jf(r)}e:while(++i=0&&e.slice(t,i)==r}var Ed=endsWith;function baseToPairs(e,r){return H(r,function(r){return[r,e[r]]})}var Id=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var Od=setToPairs;var Sd="[object Map]",Rd="[object Set]";function createToPairs(e){return function(r){var t=vc(r);if(t==Sd){return nl(r)}if(t==Rd){return Od(r)}return Id(r,e(r))}}var Ad=createToPairs;var xd=Ad(yi);var $d=xd;var jd=Ad(Ri);var Td=jd;var Cd={"&":"&","<":"<",">":">",'"':""","'":"'"};var Nd=Jo(Cd);var Ld=Nd;var Pd=/[&<>"']/g,kd=RegExp(Pd.source);function escape_escape(e){e=Ia(e);return e&&kd.test(e)?e.replace(Pd,Ld):e}var Wd=escape_escape;var Dd=/[\\^$.*+?()[\]{}|]/g,Bd=RegExp(Dd.source);function escapeRegExp(e){e=Ia(e);return e&&Bd.test(e)?e.replace(Dd,"\\$&"):e}var Fd=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:ve(n);if(n<0){n+=i}n=t>n?0:Hd(n);while(t-1?i[a?r[o]:o]:undefined}}var Md=createFind;var Jd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:ve(t);if(i<0){i=Jd(n+i,0)}return Br(e,Zl(r,3),i)}var Qd=findIndex;var Vd=Md(Qd);var eh=Vd;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 rh=baseFindKey;function findKey(e,r){return rh(e,Zl(r,3),sv)}var th=findKey;var nh=Math.max,ih=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=ve(t);i=t<0?nh(n+i,0):ih(i,n-1)}return Br(e,Zl(r,3),i,true)}var ah=findLastIndex;var oh=Md(ah);var sh=oh;function findLastKey(e,r){return rh(e,Zl(r,3),bd)}var uh=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var ch=head;function baseMap(e,r){var t=-1,n=an(e)?Array(e.length):[];fv(e,function(e,i,a){n[++t]=r(e,i,a)});return n}var fh=baseMap;function map_map(e,r){var t=X(e)?H:fh;return t(e,Zl(r,3))}var lh=map_map;function flatMap(e,r){return Na(lh(e,r),1)}var vh=flatMap;var dh=1/0;function flatMapDeep(e,r){return Na(lh(e,r),dh)}var hh=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:ve(t);return Na(lh(e,r),t)}var ph=flatMapDepth;var gh=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?Na(e,gh):[]}var yh=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:ve(r);return Na(e,r)}var bh=flattenDepth;var _h=512;function flip(e){return qt(e,_h)}var mh=flip;var wh=cu("floor");var Eh=wh;var Ih="Expected a function";var Oh=8,Sh=32,Rh=128,Ah=256;function createFlow(e){return Pa(function(r){var t=r.length,n=t,i=dr.prototype.thru;if(e){r.reverse()}while(n--){var a=r[n];if(typeof a!="function"){throw new TypeError(Ih)}if(i&&!o&&vr(a)=="wrapper"){var o=new dr([],true)}}n=o?n:t;while(++nr}var Hh=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=ue(r);t=ue(t)}return e(r,t)}}var Kh=createRelationalOperation;var Xh=Kh(Hh);var Yh=Xh;var Zh=Kh(function(e,r){return e>=r});var Mh=Zh;var Jh=Object.prototype;var Qh=Jh.hasOwnProperty;function baseHas(e,r){return e!=null&&Qh.call(e,r)}var Vh=baseHas;function has(e,r){return e!=null&&Ul(e,r,Vh)}var ep=has;var rp=Math.max,tp=Math.min;function baseInRange(e,r,t){return e>=tp(r,t)&&e-1:!!i&&Gr(e,r,t)>-1}var fp=includes_includes;var lp=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:ve(t);if(i<0){i=lp(n+i,0)}return Gr(e,r,i)}var vp=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?lo(e,0,-1):[]}var dp=initial;var hp=Math.min;function baseIntersection(e,r,t){var n=t?Mv:zr,i=e[0].length,a=e.length,o=a,s=Array(a),u=Infinity,c=[];while(o--){var f=e[o];if(o&&r){f=H(f,Qn(r))}u=hp(f.length,u);s[o]=!t&&(r||i>=120&&f.length>=120)?new Jf(o&&f):undefined}f=e[0];var l=-1,v=s[0];e:while(++l=-Sg&&e<=Sg}var Rg=isSafeInteger;function isUndefined(e){return e===undefined}var Ag=isUndefined;var xg="[object WeakMap]";function isWeakMap(e){return F(e)&&vc(e)==xg}var $g=isWeakMap;var jg="[object WeakSet]";function isWeakSet(e){return F(e)&&B(e)==jg}var Tg=isWeakSet;var Cg=1;function iteratee_iteratee(e){return Zl(typeof e=="function"?e:Lf(e,Cg))}var Ng=iteratee_iteratee;var Lg=Array.prototype;var Pg=Lg.join;function join(e,r){return e==null?"":Pg.call(e,r)}var kg=join;var Wg=nu(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Dg=Wg;var Bg=vv(function(e,r,t){Xt(e,t,r)});var Fg=Bg;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var Ug=strictLastIndexOf;var Gg=Math.max,zg=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=ve(t);i=i<0?Gg(n+i,0):zg(i,n-1)}return r===r?Ug(e,r,i):Br(e,Fr,i,true)}var qg=lastIndexOf;var Hg=nu(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Kg=Hg;var Xg=Ko("toLowerCase");var Yg=Xg;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Cy=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return vt(r,t)?e[r]:undefined}var Ny=baseNth;function nth(e,r){return e&&e.length?Ny(e,ve(r)):undefined}var Ly=nth;function nthArg(e){e=ve(e);return rn(function(r){return Ny(r,e)})}var Py=nthArg;function baseUnset(e,r){r=Oa(r,e);e=Lp(e,r);return e==null||delete e[Ra(rd(r))]}var ky=baseUnset;function customOmitClone(e){return Ka(e)?undefined:e}var Wy=customOmitClone;var Dy=1,By=2,Fy=4;var Uy=Pa(function(e,r){var t={};if(e==null){return t}var n=false;r=H(r,function(r){r=Oa(r,e);n||(n=r.length>1);return r});Qt(e,Xu(e),t);if(n){t=Lf(t,Dy|By|Fy,Wy)}var i=r.length;while(i--){ky(t,r[i])}return t});var Gy=Uy;function baseSet(e,r,t,n){if(!re(e)){return e}r=Oa(r,e);var i=-1,a=r.length,o=a-1,s=e;while(s!=null&&++ir||a&&o&&u&&!s&&!c||n&&o&&u||!t&&u||!i){return 1}if(!n&&!a&&!c&&e=s){return u}var c=t[n];return u*(c=="desc"?-1:1)}}return e.index-r.index}var My=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=H(r.length?r:[pe],Qn(Zl));var i=fh(e,function(e,t,i){var a=H(r,function(r){return r(e)});return{criteria:a,index:++n,value:e}});return Yy(i,function(e,r){return My(e,r,t)})}var Jy=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!X(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!X(t)){t=t==null?[]:[t]}return Jy(e,r,t)}var Qy=orderBy;function createOver(e){return Pa(function(r){r=H(r,Qn(Zl));return rn(function(t){var n=this;return e(r,function(e){return Me(e,n,t)})})})}var Vy=createOver;var eb=Vy(H);var rb=eb;var tb=rn;var nb=tb;var ib=Math.min;var ab=nb(function(e,r){r=r.length==1&&X(r[0])?H(r[0],Qn(Zl)):H(Na(r,1),Qn(Zl));var t=r.length;return rn(function(n){var i=-1,a=ib(n.length,t);while(++ilb){return t}do{if(r%2){t+=e}r=vb(r/2);if(r){e+=e}}while(r);return t}var db=baseRepeat;var hb=Kl("length");var pb=hb;var gb="\\ud800-\\udfff",yb="\\u0300-\\u036f",bb="\\ufe20-\\ufe2f",_b="\\u20d0-\\u20ff",mb=yb+bb+_b,wb="\\ufe0e\\ufe0f";var Eb="["+gb+"]",Ib="["+mb+"]",Ob="\\ud83c[\\udffb-\\udfff]",Sb="(?:"+Ib+"|"+Ob+")",Rb="[^"+gb+"]",Ab="(?:\\ud83c[\\udde6-\\uddff]){2}",xb="[\\ud800-\\udbff][\\udc00-\\udfff]",$b="\\u200d";var jb=Sb+"?",Tb="["+wb+"]?",Cb="(?:"+$b+"(?:"+[Rb,Ab,xb].join("|")+")"+Tb+jb+")*",Nb=Tb+jb+Cb,Lb="(?:"+[Rb+Ib+"?",Ib,Ab,xb,Eb].join("|")+")";var Pb=RegExp(Ob+"(?="+Ob+")|"+Lb+Nb,"g");function unicodeSize(e){var r=Pb.lastIndex=0;while(Pb.test(e)){++r}return r}var kb=unicodeSize;function stringSize(e){return Eo(e)?kb(e):pb(e)}var Wb=stringSize;var Db=Math.ceil;function createPadding(e,r){r=r===undefined?" ":J(r);var t=r.length;if(t<2){return t?db(r,e):r}var n=db(r,Db(e/Wb(r)));return Eo(r)?vo(Ho(n),0,e).join(""):n.slice(0,e)}var Bb=createPadding;var Fb=Math.ceil,Ub=Math.floor;function pad(e,r,t){e=Ia(e);r=ve(r);var n=r?Wb(e):0;if(!r||n>=r){return e}var i=(r-n)/2;return Bb(Ub(i),t)+e+Bb(Fb(i),t)}var Gb=pad;function padEnd(e,r,t){e=Ia(e);r=ve(r);var n=r?Wb(e):0;return r&&n-1){if(s!==e){c_.call(s,u,1)}c_.call(e,u,1)}}return e}var f_=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?f_(e,r):e}var l_=pullAll;var v_=rn(l_);var d_=v_;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?f_(e,r,Zl(t,2)):e}var h_=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?f_(e,r,undefined,t):e}var p_=pullAllWith;var g_=Array.prototype;var y_=g_.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(vt(i)){y_.call(e,i,1)}else{ky(e,i)}}}return e}var b_=basePullAt;var __=Pa(function(e,r){var t=e==null?0:e.length,n=$a(e,r);b_(e,H(r,function(e){return vt(e,t)?+e:e}).sort(Zy));return n});var m_=__;var w_=Math.floor,E_=Math.random;function baseRandom(e,r){return e+w_(E_()*(r-e+1))}var I_=baseRandom;var O_=parseFloat;var S_=Math.min,R_=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&on(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=le(e);if(r===undefined){r=e;e=0}else{r=le(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var i=R_();return S_(e+i*(r-e+O_("1e-"+((i+"").length-1))),r)}return I_(e,r)}var A_=random;var x_=Math.ceil,$_=Math.max;function baseRange(e,r,t,n){var i=-1,a=$_(x_((r-e)/(t||1)),0),o=Array(a);while(a--){o[n?a:++i]=e;e+=t}return o}var j_=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&on(r,t,n)){t=n=undefined}r=le(r);if(t===undefined){t=r;r=0}else{t=le(t)}n=n===undefined?r1&&on(e,r[0],r[1])){r=[]}else if(t>2&&on(r[0],r[1],r[2])){r=[r[0]]}return Jy(e,Na(r,1),[])});var Em=wm;var Im=4294967295,Om=Im-1;var Sm=Math.floor,Rm=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var i=0,a=e==null?0:e.length,o=r!==r,s=r===null,u=G(r),c=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<=$m){while(n>>1,o=e[a];if(o!==null&&!G(o)&&(t?o<=r:o>>0;if(!t){return[]}e=Ia(e);if(e&&(typeof r=="string"||r!=null&&!Og(r))){r=J(r);if(!r&&Eo(e)){return vo(Ho(e),0,t)}}return e.split(r,t)}var Um=split;var Gm="Expected a function";var zm=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(Gm)}r=r==null?0:zm(ve(r),0);return rn(function(t){var n=t[r],i=vo(t,0,r);if(n){ja(i,n)}return Me(e,this,i)})}var qm=spread;var Hm=nu(function(e,r,t){return e+(t?" ":"")+Yo(r)});var Km=Hm;function startsWith(e,r,t){e=Ia(e);t=t==null?0:gu(ve(t),0,e.length);r=J(r);return e.slice(t,t+r.length)==r}var Xm=startsWith;function stubObject(){return{}}var Ym=stubObject;function stubString(){return""}var Zm=stubString;function stubTrue(){return true}var Mm=stubTrue;var Jm=Q(function(e,r){return e-r},0);var Qm=Jm;function sum(e){return e&&e.length?cy(e,pe):0}var Vm=sum;function sumBy(e,r){return e&&e.length?cy(e,Zl(r,2)):0}var ew=sumBy;function tail(e){var r=e==null?0:e.length;return r?lo(e,1,r):[]}var rw=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:ve(r);return lo(e,0,r<0?0:r)}var tw=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:ve(r);r=n-r;return lo(e,r<0?0:r,n)}var nw=takeRight;function takeRightWhile(e,r){return e&&e.length?fd(e,Zl(r,3),false,true):[]}var iw=takeRightWhile;function takeWhile(e,r){return e&&e.length?fd(e,Zl(r,3)):[]}var aw=takeWhile;function tap(e,r){r(e);return e}var ow=tap;var sw=Object.prototype;var uw=sw.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Yt(e,sw[t])&&!uw.call(n,t)){return r}return e}var cw=customDefaultsAssignIn;var fw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+fw[e]}var lw=escapeStringChar;var vw=/<%=([\s\S]+?)%>/g;var dw=vw;var hw=/<%-([\s\S]+?)%>/g;var pw=hw;var gw=/<%([\s\S]+?)%>/g;var yw=gw;var bw={escape:pw,evaluate:yw,interpolate:dw,variable:"",imports:{_:{escape:Wd}}};var _w=bw;var mw=/\b__p \+= '';/g,ww=/\b(__p \+=) '' \+/g,Ew=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var Iw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Ow=/($^)/;var Sw=/['\n\r\u2028\u2029\\]/g;var Rw=Object.prototype;var Aw=Rw.hasOwnProperty;function template(e,r,t){var n=_w.imports._.templateSettings||_w;if(t&&on(e,r,t)){r=undefined}e=Ia(e);r=ji({},r,n,cw);var i=ji({},r.imports,n.imports,cw),a=yi(i),o=sp(i,a);var s,u,c=0,f=r.interpolate||Ow,l="__p += '";var v=RegExp((r.escape||Ow).source+"|"+f.source+"|"+(f===dw?Iw:Ow).source+"|"+(r.evaluate||Ow).source+"|$","g");var d=Aw.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(c,o).replace(Sw,lw);if(t){s=true;l+="' +\n__e("+t+") +\n'"}if(a){u=true;l+="';\n"+a+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}c=o+r.length;return r});l+="';\n";var h=Aw.call(r,"variable")&&r.variable;if(!h){l="with (obj) {\n"+l+"\n}\n"}l=(u?l.replace(mw,""):l).replace(ww,"$1").replace(Ew,"$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 p=Ja(function(){return Function(a,d+"return "+l).apply(undefined,o)});p.source=l;if(Za(p)){throw p}return p}var xw=template;var $w="Expected a function";function throttle(e,r,t){var n=true,i=true;if(typeof e!="function"){throw new TypeError($w)}if(re(t)){n="leading"in t?!!t.leading:n;i="trailing"in t?!!t.trailing:i}return Av(e,r,{leading:n,maxWait:r,trailing:i})}var jw=throttle;function thru(e,r){return r(e)}var Tw=thru;var Cw=9007199254740991;var Nw=4294967295;var Lw=Math.min;function times(e,r){e=ve(e);if(e<1||e>Cw){return[]}var t=Nw,n=Lw(e,Nw);r=dd(r);e-=Nw;var i=fn(n,r);while(++t-1){}return t}var Hw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Kw=charsStartIndex;var Xw=/^\s+|\s+$/g;function trim(e,r,t){e=Ia(e);if(e&&(t||r===undefined)){return e.replace(Xw,"")}if(!e||!(r=J(r))){return e}var n=Ho(e),i=Ho(r),a=Kw(n,i),o=Hw(n,i)+1;return vo(n,a,o).join("")}var Yw=trim;var Zw=/\s+$/;function trimEnd(e,r,t){e=Ia(e);if(e&&(t||r===undefined)){return e.replace(Zw,"")}if(!e||!(r=J(r))){return e}var n=Ho(e),i=Hw(n,Ho(r))+1;return vo(n,0,i).join("")}var Mw=trimEnd;var Jw=/^\s+/;function trimStart(e,r,t){e=Ia(e);if(e&&(t||r===undefined)){return e.replace(Jw,"")}if(!e||!(r=J(r))){return e}var n=Ho(e),i=Kw(n,Ho(r));return vo(n,i).join("")}var Qw=trimStart;var Vw=30,eE="...";var rE=/\w*$/;function truncate(e,r){var t=Vw,n=eE;if(re(r)){var i="separator"in r?r.separator:i;t="length"in r?ve(r.length):t;n="omission"in r?J(r.omission):n}e=Ia(e);var a=e.length;if(Eo(e)){var o=Ho(e);a=o.length}if(t>=a){return e}var s=t-Wb(n);if(s<1){return n}var u=o?vo(o,0,s).join(""):e.slice(0,s);if(i===undefined){return u+n}if(o){s+=u.length-s}if(Og(i)){if(e.slice(s).search(i)){var c,f=u;if(!i.global){i=RegExp(i.source,Ia(rE.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(J(i),s)!=s){var v=u.lastIndexOf(i);if(v>-1){u=u.slice(0,v)}}return u+n}var tE=truncate;function unary(e){return Kt(e,1)}var nE=unary;var iE={"&":"&","<":"<",">":">",""":'"',"'":"'"};var aE=Jo(iE);var oE=aE;var sE=/&(?:amp|lt|gt|quot|#39);/g,uE=RegExp(sE.source);function unescape_unescape(e){e=Ia(e);return e&&uE.test(e)?e.replace(sE,oE):e}var cE=unescape_unescape;var fE=1/0;var lE=!(Vu&&1/il(new Vu([,-0]))[1]==fE)?ar:function(e){return new Vu(e)};var vE=lE;var dE=200;function baseUniq(e,r,t){var n=-1,i=zr,a=e.length,o=true,s=[],u=s;if(t){o=false;i=Mv}else if(a>=dE){var c=r?null:vE(e);if(c){return il(c)}o=false;i=Vf;u=new Jf}else{u=r?[]:s}e:while(++n1||this.__actions__.length||!(n instanceof ir)||!vt(t)){return this.thru(i)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:Tw,args:[i],thisArg:undefined});return new dr(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var FE=BE;function wrapperChain(){return vu(this)}var UE=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof ir){var r=e;if(this.__actions__.length){r=new ir(this)}r=r.reverse();r.__actions__.push({func:Tw,args:[Q_],thisArg:undefined});return new dr(r,this.__chain__)}return this.thru(Q_)}var GE=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?hE(e[0]):[]}var i=-1,a=Array(n);while(++i1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return $E(e,t)});var tI=rI;var nI={chunk:pu,compact:Kf,concat:Xf,difference:ed,differenceBy:nd,differenceWith:ad,drop:ud,dropRight:cd,dropRightWhile:ld,dropWhile:vd,fill:Xd,findIndex:Qd,findLastIndex:ah,first:ch,flatten:La,flattenDeep:yh,flattenDepth:bh,fromPairs:Wh,head:ch,indexOf:vp,initial:dp,intersection:bp,intersectionBy:mp,intersectionWith:Ep,join:kg,last:rd,lastIndexOf:qg,nth:Ly,pull:d_,pullAll:l_,pullAllBy:h_,pullAllWith:p_,pullAt:m_,remove:q_,reverse:Q_,slice:gm,sortedIndex:Tm,sortedIndexBy:Cm,sortedIndexOf:Nm,sortedLastIndex:Lm,sortedLastIndexBy:Pm,sortedLastIndexOf:km,sortedUniq:Dm,sortedUniqBy:Bm,tail:rw,take:tw,takeRight:nw,takeRightWhile:iw,takeWhile:aw,union:gE,unionBy:bE,unionWith:mE,uniq:wE,uniqBy:EE,uniqWith:IE,unzip:xE,unzipWith:$E,without:WE,xor:HE,xorBy:XE,xorWith:ZE,zip:JE,zipObject:VE,zipObjectDeep:eI,zipWith:tI};var iI={countBy:gv,each:hd,eachRight:wd,every:zd,filter:Zd,find:eh,findLast:sh,flatMap:vh,flatMapDeep:hh,flatMapDepth:ph,forEach:hd,forEachRight:wd,groupBy:qh,includes:fp,invokeMap:Bp,keyBy:Fg,map:lh,orderBy:Qy,partition:r_,reduce:F_,reduceRight:G_,reject:z_,sample:nm,sampleSize:sm,shuffle:vm,size:pm,some:mm,sortBy:Em};var aI={now:Iv};var oI={after:he,ary:Kt,before:Va,bind:no,bindKey:fo,curry:_v,curryRight:wv,debounce:Av,defer:Xv,delay:Zv,flip:mh,memoize:ga,negate:Ry,once:Xy,overArgs:ob,partial:Mb,partialRight:Vb,rearg:D_,rest:Y_,spread:qm,throttle:jw,unary:nE,wrap:DE};var sI={castArray:ou,clone:kf,cloneDeep:Bf,cloneDeepWith:Gf,cloneWith:qf,conformsTo:tv,eq:Yt,gt:Yh,gte:Mh,isArguments:yn,isArray:X,isArrayBuffer:qp,isArrayLike:an,isArrayLikeObject:Lv,isBoolean:Kp,isBuffer:Sn,isDate:Jp,isElement:Qp,isEmpty:ng,isEqual:ig,isEqualWith:ag,isError:Za,isFinite:sg,isFunction:me,isInteger:ug,isLength:nn,isMap:Jc,isMatch:cg,isMatchWith:fg,isNaN:dg,isNative:yg,isNil:bg,isNull:_g,isNumber:vg,isObject:re,isObjectLike:F,isPlainObject:Ka,isRegExp:Og,isSafeInteger:Rg,isSet:tf,isString:op,isSymbol:G,isTypedArray:si,isUndefined:Ag,isWeakMap:$g,isWeakSet:Tg,lt:Jg,lte:Vg,toArray:Ty,toFinite:le,toInteger:ve,toLength:Hd,toNumber:ue,toPlainObject:kv,toSafeInteger:Gw,toString:Ia};var uI={add:ee,ceil:lu,divide:sd,floor:Eh,max:sy,maxBy:uy,mean:vy,meanBy:dy,min:my,minBy:wy,multiply:Oy,round:em,subtract:Qm,sum:Vm,sumBy:ew};var cI={clamp:yu,inRange:ip,random:A_};var fI={assign:wi,assignIn:xi,assignInWith:ji,assignWith:Ci,at:Wa,create:yv,defaults:Cv,defaultsDeep:zv,entries:$d,entriesIn:Td,extend:xi,extendWith:ji,findKey:th,findLastKey:uh,forIn:Nh,forInRight:Lh,forOwn:Ph,forOwnRight:kh,functions:Bh,functionsIn:Fh,get:xa,has:ep,hasIn:Gl,invert:xp,invertBy:Np,invoke:Wp,keys:yi,keysIn:Ri,mapKeys:ey,mapValues:ry,merge:py,mergeWith:Uv,omit:Gy,omitBy:Ky,pick:i_,pickBy:Hy,result:Z_,set:um,setWith:cm,toPairs:$d,toPairsIn:Td,transform:qw,unset:RE,update:TE,updateWith:CE,values:up,valuesIn:PE};var lI={at:FE,chain:vu,commit:Hf,lodash:br,next:Cy,plant:a_,reverse:GE,tap:ow,thru:Tw,toIterator:kw,toJSON:Dw,value:Dw,valueOf:Dw,wrapperChain:UE};var vI={camelCase:au,capitalize:Zo,deburr:us,endsWith:Ed,escape:Wd,escapeRegExp:Fd,kebabCase:Dg,lowerCase:Kg,lowerFirst:Yg,pad:Gb,padEnd:zb,padStart:qb,parseInt:Xb,repeat:H_,replace:K_,snakeCase:bm,split:Um,startCase:Km,startsWith:Xm,template:xw,templateSettings:_w,toLower:Bw,toUpper:zw,trim:Yw,trimEnd:Mw,trimStart:Qw,truncate:tE,unescape:cE,upperCase:LE,upperFirst:Yo,words:eu};var dI={attempt:Ja,bindAll:ao,cond:Jl,conforms:rv,constant:Tr,defaultTo:xv,flow:jh,flowRight:Ch,identity:pe,iteratee:Ng,matches:ny,matchesProperty:ay,method:yy,methodOf:_y,mixin:Ey,noop:ar,nthArg:Py,over:rb,overEvery:ub,overSome:fb,property:Yl,propertyOf:o_,range:N_,rangeRight:P_,stubArray:Lu,stubFalse:bn,stubObject:Ym,stubString:Zm,stubTrue:Mm,times:Pw,toPath:Fw,uniqueId:SE};function lazyClone(){var e=new ir(this.__wrapped__);e.__actions__=hr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=hr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=hr(this.__views__);return e}var hI=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new ir(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var pI=lazyReverse;var gI=Math.max,yI=Math.min;function getView(e,r,t){var n=-1,i=t.length;while(++n0||r<0)){return new ir(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=ve(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};ir.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};ir.prototype.toArray=function(){return this.take(AI)};sv(ir.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),i=br[n?"take"+(r=="last"?"Right":""):r],a=n||/^find/.test(r);if(!i){return}br.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,s=r instanceof ir,u=o[0],c=s||X(r);var f=function(e){var r=i.apply(br,ja([e],o));return n&&l?r[0]:r};if(c&&t&&typeof u=="function"&&u.length!=1){s=c=false}var l=this.__chain__,v=!!this.__actions__.length,d=a&&!l,h=s&&!v;if(!a&&c){r=h?r:new ir(this);var p=e.apply(r,o);p.__actions__.push({func:Tw,args:[f],thisArg:undefined});return new dr(p,l)}if(d&&h){return e.apply(this,o)}p=this.thru(f);return d?n?p.value()[0]:p.value():p}});Dr(["pop","push","shift","sort","splice","unshift"],function(e){var r=xI[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return r.apply(X(i)?i:[],e)}return this[t](function(t){return r.apply(X(t)?t:[],e)})}});sv(ir.prototype,function(e,r){var t=br[r];if(t){var n=t.name+"";if(!jI.call(cr,n)){cr[n]=[]}cr[n].push({name:r,func:t})}});cr[It(undefined,OI).name]=[{name:"wrapper",func:undefined}];ir.prototype.clone=hI;ir.prototype.reverse=pI;ir.prototype.value=EI;br.prototype.at=lI.at;br.prototype.chain=lI.wrapperChain;br.prototype.commit=lI.commit;br.prototype.next=lI.next;br.prototype.plant=lI.plant;br.prototype.reverse=lI.reverse;br.prototype.toJSON=br.prototype.valueOf=br.prototype.value=lI.value;br.prototype.first=br.prototype.head;if(TI){br.prototype[TI]=lI.toIterator}var PI=br;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(!ep(image_tag_ImageTag.targetPlatformToImageSuffixMap,i)){throw new Error(`Platform "${i}" is currently not supported.`)}const a=xa(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{[u.types.StandaloneOSX]:t,[u.types.StandaloneWindows]:n,[u.types.StandaloneWindows64]:n,[u.types.StandaloneLinux64]:n,[u.types.iOS]:a,[u.types.Android]:i,[u.types.WebGL]:r,[u.types.WSAPlayer]:n,[u.types.PS4]:n,[u.types.XboxOne]:n,[u.types.tvOS]:n,[u.types.Switch]:n,[u.types.Lumin]:n,[u.types.BJM]:n,[u.types.Stadia]:n,[u.types.Facebook]:o,[u.types.NoTarget]:e,[u.types.Test]:e}}get tag(){return Mw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Qw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var kI=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:i}=e;const{version:a,platform:o}=i;const s=new kI({repository:"",name:"unity-builder",version:a,platform:o});const u=`docker build ${t} --file ${n} --build-arg IMAGE=${i} --tag ${s}`;await Object(d.exec)(u,undefined,{silent:r});return s}static async run(e,r,t=false){const{version:n,workspace:i,platform:a,projectPath:o,buildName:s,buildPath:u,buildFile:c,buildMethod:f,buildVersion:l,customParameters:v,androidVersionCode:h}=r;const p=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_LICENSE_FILE --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 VERSION="${l}" --env ANDROID_VERSION_CODE="${h}" --env CUSTOM_PARAMETERS="${v}" --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(d.exec)(p,undefined,{silent:t})}}var WI=docker_Docker;const DI=t(470);async function src_action(){a.checkCompatibility();m.verify();const{dockerfile:e,workspace:r,actionFolder:t}=a;const n=await p.create();const i=new kI(n);const o=await WI.build({path:t,dockerfile:e,baseImage:i});await WI.run(o,{workspace:r,...n})}src_action().catch(e=>{DI.setFailed(e.message)})},586:function(e,r,t){const n=t(874);const i=(e,r,t)=>n(e,r,t)<0;e.exports=i},593:function(e,r,t){const n=t(16);const i=(e,r)=>e.sort((e,t)=>n(t,e,r));e.exports=i},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},630:function(e,r,t){const n=t(874);const i=(e,r,t)=>n(r,e,t);e.exports=i},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 s=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=s.resolve(e);if(i>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(s.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=s.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=s.dirname(e);const n=s.basename(e).toUpperCase();for(const i of yield r.readdir(t)){if(n===i.toUpperCase()){e=s.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()}},714:function(e,r,t){const n=t(830);const i=(e,r)=>{const t=n(e,r);return t?t.version:null};e.exports=i},740:function(e,r,t){const n=t(65);const i=t(124);const a=(e,r,t)=>{let a=null;let o=null;let s=null;try{s=new i(r,t)}catch(e){return null}e.forEach(e=>{if(s.test(e)){if(!a||o.compare(e)===1){a=e;o=new n(a,t)}}});return a};e.exports=a},744:function(e,r,t){const n=t(65);const i=(e,r)=>new n(e,r).major;e.exports=i},747:function(e){e.exports=require("fs")},752:function(e,r,t){const n=t(298);const i=t(873);const a=t(486);const o=t(167);const s=t(586);const u=t(898);const c=(e,r,t,c)=>{switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e===t;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e!==t;case"":case"=":case"==":return n(e,t,c);case"!=":return i(e,t,c);case">":return a(e,t,c);case">=":return o(e,t,c);case"<":return s(e,t,c);case"<=":return u(e,t,c);default:throw new TypeError(`Invalid operator: ${r}`)}};e.exports=c},760:function(e){const r=/^[0-9]+$/;const t=(e,t)=>{const n=r.test(e);const i=r.test(t);if(n&&i){e=+e;t=+t}return e===t?0:n&&!i?-1:i&&!n?1:et(r,e);e.exports={compareIdentifiers:t,rcompareIdentifiers:n}},803:function(e,r,t){const n=t(65);const i=(e,r)=>new n(e,r).minor;e.exports=i},811:function(e,r,t){const n=t(65);const i=t(124);const a=(e,r,t)=>{let a=null;let o=null;let s=null;try{s=new i(r,t)}catch(e){return null}e.forEach(e=>{if(s.test(e)){if(!a||o.compare(e)===-1){a=e;o=new n(a,t)}}});return a};e.exports=a},822:function(e,r,t){const n=t(830);const i=t(298);const a=(e,r)=>{if(i(e,r)){return null}else{const t=n(e);const i=n(r);const a=t.prerelease.length||i.prerelease.length;const o=a?"pre":"";const s=a?"prerelease":"";for(const e in t){if(e==="major"||e==="minor"||e==="patch"){if(t[e]!==i[e]){return o+e}}}return s}};e.exports=a},830:function(e,r,t){const{MAX_LENGTH:n}=t(181);const{re:i,t:a}=t(976);const o=t(65);const s=(e,r)=>{if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>n){return null}const t=r.loose?i[a.LOOSE]:i[a.FULL];if(!t.test(e)){return null}try{return new o(e,r)}catch(e){return null}};e.exports=s},873:function(e,r,t){const n=t(874);const i=(e,r,t)=>n(e,r,t)!==0;e.exports=i},874:function(e,r,t){const n=t(65);const i=(e,r,t)=>new n(e,t).compare(new n(r,t));e.exports=i},876:function(e,r,t){const n=t(976);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:t(181).SEMVER_SPEC_VERSION,SemVer:t(65),compareIdentifiers:t(760).compareIdentifiers,rcompareIdentifiers:t(760).rcompareIdentifiers,parse:t(830),valid:t(714),clean:t(503),inc:t(928),diff:t(822),major:t(744),minor:t(803),patch:t(489),prerelease:t(968),compare:t(874),rcompare:t(630),compareLoose:t(283),compareBuild:t(16),sort:t(120),rsort:t(593),gt:t(486),lt:t(586),eq:t(298),neq:t(873),gte:t(167),lte:t(898),cmp:t(752),coerce:t(499),Comparator:t(174),Range:t(124),satisfies:t(310),toComparators:t(219),maxSatisfying:t(811),minSatisfying:t(740),minVersion:t(164),validRange:t(480),outside:t(462),gtr:t(531),ltr:t(323),intersects:t(259),simplifyRange:t(877),subset:t(999)}},877:function(e,r,t){const n=t(310);const i=t(874);e.exports=((e,r,t)=>{const a=[];let o=null;let s=null;const u=e.sort((e,r)=>i(e,r,t));for(const e of u){const i=n(e,r,t);if(i){s=e;if(!o)o=e}else{if(s){a.push([o,s])}s=null;o=null}}if(o)a.push([o,null]);const c=[];for(const[e,r]of a){if(e===r)c.push(e);else if(!r&&e===u[0])c.push("*");else if(!r)c.push(`>=${e}`);else if(e===u[0])c.push(`<=${r}`);else c.push(`${e} - ${r}`)}const f=c.join(" || ");const l=typeof r.raw==="string"?r.raw:String(r);return f.lengthn(e,r,t)<=0;e.exports=i},928:function(e,r,t){const n=t(65);const i=(e,r,t,i)=>{if(typeof t==="string"){i=t;t=undefined}try{return new n(e,t).inc(r,i).version}catch(e){return null}};e.exports=i},968:function(e,r,t){const n=t(830);const i=(e,r)=>{const t=n(e,r);return t&&t.prerelease.length?t.prerelease:null};e.exports=i},976:function(e,r,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=t(181);const i=t(548);r=e.exports={};const a=r.re=[];const o=r.src=[];const s=r.t={};let u=0;const c=(e,r,t)=>{const n=u++;i(n,r);s[e]=n;o[n]=r;a[n]=new RegExp(r,t?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*");c("NUMERICIDENTIFIERLOOSE","[0-9]+");c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");c("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.`+`(${o[s.NUMERICIDENTIFIER]})\\.`+`(${o[s.NUMERICIDENTIFIER]})`);c("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[s.NUMERICIDENTIFIERLOOSE]})`);c("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`);c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`);c("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`);c("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`);c("BUILDIDENTIFIER","[0-9A-Za-z-]+");c("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`);c("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`);c("FULL",`^${o[s.FULLPLAIN]}$`);c("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`);c("LOOSE",`^${o[s.LOOSEPLAIN]}$`);c("GTLT","((?:<|>)?=?)");c("XRANGEIDENTIFIERLOOSE",`${o[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);c("XRANGEIDENTIFIER",`${o[s.NUMERICIDENTIFIER]}|x|X|\\*`);c("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})`+`(?:\\.(${o[s.XRANGEIDENTIFIER]})`+`(?:\\.(${o[s.XRANGEIDENTIFIER]})`+`(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?`+`)?)?`);c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?`+`)?)?`);c("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`);c("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`);c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})`+`(?:\\.(\\d{1,${n}}))?`+`(?:\\.(\\d{1,${n}}))?`+`(?:$|[^\\d])`);c("COERCERTL",o[s.COERCE],true);c("LONETILDE","(?:~>?)");c("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";c("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`);c("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`);c("LONECARET","(?:\\^)");c("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";c("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`);c("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`);c("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`);c("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`);c("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";c("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[s.XRANGEPLAIN]})`+`\\s*$`);c("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[s.XRANGEPLAINLOOSE]})`+`\\s*$`);c("STAR","(<|>)?=?\\s*\\*");c("GTE0","^\\s*>=\\s*0.0.0\\s*$");c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},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())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=i(t(9));function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];r=n.slice(1).concat(r||[]);const o=new a.ToolRunner(i,r,t);return o.exec()})}r.exec=exec},999:function(e,r,t){const n=t(124);const{ANY:i}=t(174);const a=t(310);const o=t(874);const s=(e,r,t)=>{e=new n(e,t);r=new n(r,t);let i=false;e:for(const n of e.set){for(const e of r.set){const r=u(n,e,t);i=i||r!==null;if(r)continue e}if(i)return false}return true};const u=(e,r,t)=>{if(e.length===1&&e[0].semver===i)return r.length===1&&r[0].semver===i;const n=new Set;let s,u;for(const r of e){if(r.operator===">"||r.operator===">=")s=c(s,r,t);else if(r.operator==="<"||r.operator==="<=")u=f(u,r,t);else n.add(r.semver)}if(n.size>1)return null;let l;if(s&&u){l=o(s.semver,u.semver,t);if(l>0)return null;else if(l===0&&(s.operator!==">="||u.operator!=="<="))return null}for(const e of n){if(s&&!a(e,String(s),t))return null;if(u&&!a(e,String(u),t))return null;for(const n of r){if(!a(e,String(n),t))return false}return true}let v,d;let h,p;for(const e of r){p=p||e.operator===">"||e.operator===">=";h=h||e.operator==="<"||e.operator==="<=";if(s){if(e.operator===">"||e.operator===">="){v=c(s,e,t);if(v===e)return false}else if(s.operator===">="&&!a(s.semver,String(e),t))return false}if(u){if(e.operator==="<"||e.operator==="<="){d=f(u,e,t);if(d===e)return false}else if(u.operator==="<="&&!a(u.semver,String(e),t))return false}if(!e.operator&&(u||s)&&l!==0)return false}if(s&&h&&!u&&l!==0)return false;if(u&&p&&!s&&l!==0)return false;return true};const c=(e,r,t)=>{if(!e)return r;const n=o(e.semver,r.semver,t);return n>0?e:n<0?r:r.operator===">"&&e.operator===">="?r:e};const f=(e,r,t)=>{if(!e)return r;const n=o(e.semver,r.semver,t);return n<0?e:n>0?r:r.operator==="<"&&e.operator==="<="?r:e};e.exports=s}},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 diff --git a/action/steps/build.sh b/action/steps/build.sh index c7f50449..4ebeddfa 100644 --- a/action/steps/build.sh +++ b/action/steps/build.sh @@ -109,8 +109,8 @@ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \ -customBuildTarget "$BUILD_TARGET" \ -customBuildPath "$CUSTOM_BUILD_PATH" \ -executeMethod "$BUILD_METHOD" \ - -versioning "$VERSIONING" \ -version "$VERSION" \ + -androidVersionCode "$ANDROID_VERSION_CODE" \ $CUSTOM_PARAMETERS # Catch exit code diff --git a/package.json b/package.json index c4cea86a..a888e13d 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,14 @@ "prebuild": "yarn", "build": "ncc build src --out action --minify", "lint": "prettier --check \"src/**/*.js\" && eslint src", + "format": "prettier --write \"src/**/*.js\"", "test": "jest" }, "dependencies": { "@actions/core": "^1.2.4", "@actions/exec": "1.0.4", - "@actions/github": "^2.1.1" + "@actions/github": "^2.1.1", + "semver": "^7.3.2" }, "devDependencies": { "@babel/cli": "7.8.4", diff --git a/src/model/android-versioning.js b/src/model/android-versioning.js new file mode 100644 index 00000000..c47c3b80 --- /dev/null +++ b/src/model/android-versioning.js @@ -0,0 +1,33 @@ +import * as core from '@actions/core'; +import * as semver from 'semver'; + +export default class AndroidVersioning { + static determineVersionCode(version, inputVersionCode) { + if (!inputVersionCode) { + return AndroidVersioning.versionToVersionCode(version); + } + return inputVersionCode; + } + + static versionToVersionCode(version) { + const parsedVersion = semver.parse(version); + + if (!parsedVersion) { + core.warning(`Could not parse "${version}" to semver, defaulting android version code to 1`); + return 1; + } + + // The greatest value Google Plays allows is 2100000000. + // Allow for 3 patch digits, 3 minor digits and 3 major digits. + const versionCode = + parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch; + + if (versionCode >= 1000000000) { + throw new Error( + `Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`, + ); + } + core.info(`Using android versionCode ${versionCode}`); + return versionCode; + } +} diff --git a/src/model/android-versioning.test.js b/src/model/android-versioning.test.js new file mode 100644 index 00000000..9617f557 --- /dev/null +++ b/src/model/android-versioning.test.js @@ -0,0 +1,27 @@ +import AndroidVersioning from './android-versioning'; + +describe('Android Versioning', () => { + describe('versionToVersionCode', () => { + it('defaults to 1 when version is not a valid semver', () => { + expect(AndroidVersioning.versionToVersionCode('abcd')).toBe(1); + }); + + it('returns a number', () => { + expect(AndroidVersioning.versionToVersionCode('123.456.789')).toBe(123456789); + }); + + it('throw when generated version code is too large', () => { + expect(() => AndroidVersioning.versionToVersionCode('1234.0.0')).toThrow(); + }); + }); + + describe('determineVersionCode', () => { + it('defaults to parsed version', () => { + expect(AndroidVersioning.determineVersionCode('1.2.3', '')).toBe(1002003); + }); + + it('use specified code', () => { + expect(AndroidVersioning.determineVersionCode('1.2.3', 2)).toBe(2); + }); + }); +}); diff --git a/src/model/build-parameters.js b/src/model/build-parameters.js index cfc1824f..356d08c9 100644 --- a/src/model/build-parameters.js +++ b/src/model/build-parameters.js @@ -1,3 +1,4 @@ +import AndroidVersioning from './android-versioning'; import Input from './input'; import Platform from './platform'; import Versioning from './versioning'; @@ -10,6 +11,11 @@ class BuildParameters { Input.specifiedVersion, ); + const androidVersionCode = AndroidVersioning.determineVersionCode( + buildVersion, + Input.androidVersionCode, + ); + return { version: Input.unityVersion, platform: Input.targetPlatform, @@ -19,6 +25,7 @@ class BuildParameters { buildFile, buildMethod: Input.buildMethod, buildVersion, + androidVersionCode, customParameters: Input.customParameters, }; } diff --git a/src/model/build-parameters.test.js b/src/model/build-parameters.test.js index 6cbaa881..49c7edc9 100644 --- a/src/model/build-parameters.test.js +++ b/src/model/build-parameters.test.js @@ -30,6 +30,22 @@ describe('BuildParameters', () => { ); }); + it('returns the android version code with provided input', async () => { + const mockValue = '42'; + jest.spyOn(Input, 'androidVersionCode', 'get').mockReturnValue(mockValue); + await expect(BuildParameters.create()).resolves.toEqual( + expect.objectContaining({ androidVersionCode: mockValue }), + ); + }); + + it('returns the android version code from version by default', async () => { + const mockValue = ''; + jest.spyOn(Input, 'androidVersionCode', 'get').mockReturnValue(mockValue); + await expect(BuildParameters.create()).resolves.toEqual( + expect.objectContaining({ androidVersionCode: 1003037 }), + ); + }); + it('returns the platform', async () => { const mockValue = 'somePlatform'; jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockValue); diff --git a/src/model/docker.js b/src/model/docker.js index fb92b697..4a7a6772 100644 --- a/src/model/docker.js +++ b/src/model/docker.js @@ -29,6 +29,7 @@ class Docker { buildMethod, buildVersion, customParameters, + androidVersionCode, } = parameters; const command = `docker run \ @@ -47,6 +48,7 @@ class Docker { --env BUILD_FILE="${buildFile}" \ --env BUILD_METHOD="${buildMethod}" \ --env VERSION="${buildVersion}" \ + --env ANDROID_VERSION_CODE="${androidVersionCode}" \ --env CUSTOM_PARAMETERS="${customParameters}" \ --env HOME=/github/home \ --env GITHUB_REF \ diff --git a/src/model/docker.test.js b/src/model/docker.test.js index 7aed6aa4..261692a0 100644 --- a/src/model/docker.test.js +++ b/src/model/docker.test.js @@ -25,7 +25,7 @@ describe('Docker', () => { const parameters = { workspace: Action.rootFolder, projectPath: `${Action.rootFolder}/test-project`, - buildName: 'someBulidName', + buildName: 'someBuildName', buildsPath: 'build', method: '', }; diff --git a/src/model/input.js b/src/model/input.js index ccf5f9be..1524f2fa 100644 --- a/src/model/input.js +++ b/src/model/input.js @@ -41,6 +41,10 @@ class Input { return core.getInput('version') || ''; } + static get androidVersionCode() { + return core.getInput('androidVersionCode'); + } + static get allowDirtyBuild() { const input = core.getInput('allowDirtyBuild') || 'false'; diff --git a/src/model/input.test.js b/src/model/input.test.js index 4a0fb47c..4cb2fc27 100644 --- a/src/model/input.test.js +++ b/src/model/input.test.js @@ -118,6 +118,19 @@ describe('Input', () => { }); }); + describe('androidVersionCode', () => { + it('defaults to null', () => { + expect(Input.androidVersionCode).toBeFalsy(); + }); + + it('takes input from the users workflow', () => { + const mockValue = '42'; + const spy = jest.spyOn(core, 'getInput').mockReturnValue(mockValue); + expect(Input.androidVersionCode).toStrictEqual(mockValue); + expect(spy).toHaveBeenCalledTimes(1); + }); + }); + describe('allowDirtyBuild', () => { it('returns the default value', () => { expect(Input.allowDirtyBuild).toStrictEqual('false'); diff --git a/yarn.lock b/yarn.lock index 5017c07f..2857e93f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5045,7 +5045,7 @@ semver@^6.0.0, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.1.3: +semver@^7.1.3, semver@^7.3.2: version "7.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==