mirror of https://github.com/aminya/setup-cpp
3 lines
77 KiB
JavaScript
3 lines
77 KiB
JavaScript
function $parcel$export(e,t,r,i){Object.defineProperty(e,t,{get:r,set:i,enumerable:!0,configurable:!0});}function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e;}var $a2uk8$path=require("path"),$a2uk8$os=require("os"),$a2uk8$fs=require("fs"),$a2uk8$stream=require("stream"),$a2uk8$util=require("util"),$a2uk8$assert=require("assert"),$a2uk8$child_process=require("child_process"),$a2uk8$http=require("http"),$a2uk8$https=require("https"),$parcel$global=globalThis,parcelRequire=$parcel$global.parcelRequire810d,parcelRegister=parcelRequire.register;parcelRegister("apy8x",function(e,t){var r,i,s,n,o,a,h,l,c;function u(e){return e.startsWith("pypy");}async function p(e,t,a){var h;l.IS_MAC&&(process.env.AGENT_TOOLSDIRECTORY="/Users/runner/hostedtoolcache");let c=null===(h=process.env.AGENT_TOOLSDIRECTORY)||void 0===h?void 0:h.trim();if("string"==typeof c&&""!==c&&(process.env.RUNNER_TOOL_CACHE=process.env.AGENT_TOOLSDIRECTORY),(0,s.debug)("Python is expected to be installed into "+process.env.RUNNER_TOOL_CACHE),e){let t;if(u(e)){let i=await(0,r.findPyPyVersion)(e,a,!0,d,!1);t=`${i.resolvedPyPyVersion}-${i.resolvedPythonVersion}`,(0,o.info)(`Successfully set up PyPy ${i.resolvedPyPyVersion} with Python (${i.resolvedPythonVersion})`);}else{let r=await(0,i.useCpythonVersion)(e,a,!0,d,!1);t=r.version,(0,o.info)(`Successfully set up ${r.impl} (${t})`);}}n.GITHUB_ACTIONS&&(await f());}async function f(){let e=(0,h.join)(c,"python_matcher.json");if(!(await(0,a.pathExists)(e)))return(0,o.warning)("the python_matcher.json file does not exist in the same folder as setup-cpp.js");(0,o.info)("::add-matcher::"+e);}$parcel$export(e.exports,"setupActionsPython",()=>p),r=parcelRequire("957JZ"),i=parcelRequire("2mbyd"),s=parcelRequire("k1l4q"),n=parcelRequire("dKklS"),o=parcelRequire("pcnv8"),a=parcelRequire("ibhuk"),h=parcelRequire("drEX5"),l=parcelRequire("clwE1"),c=$a2uk8$path.resolve(__dirname,"../../src/python");let d=!1;}),parcelRegister("957JZ",function(e,t){var r,i,s,n,o;async function a(e,t,s,o,a){let c,u,p="",f="",d=l(e);if(o&&(u=await r.getAvailablePyPyVersions())&&u.length>0){let e=r.findRelease(u,d.pythonVersion,d.pypyVersion,t,!1);e?(n.info(`Resolved as PyPy ${e.resolvedPyPyVersion} with Python (${e.resolvedPythonVersion})`),d.pythonVersion=e.resolvedPythonVersion,d.pypyVersion=e.resolvedPyPyVersion):n.info(`Failed to resolve PyPy ${d.pypyVersion} with Python (${d.pythonVersion}) from manifest`);}({installDir:c,resolvedPythonVersion:f,resolvedPyPyVersion:p}=h(d.pythonVersion,d.pypyVersion,t)),c||({installDir:c,resolvedPythonVersion:f,resolvedPyPyVersion:p}=await r.installPyPy(d.pypyVersion,d.pythonVersion,t,a,u));let y=i.IS_WINDOWS?"Scripts":"bin",m=$a2uk8$path.join(c,y),x=i.IS_WINDOWS?".exe":"",g=$a2uk8$path.join(i.IS_WINDOWS?c:m,"python"+x),w=r.getPyPyBinaryPath(c);return s&&(n.exportVariable("pythonLocation",c),n.exportVariable("Python_ROOT_DIR",c),n.exportVariable("Python2_ROOT_DIR",c),n.exportVariable("Python3_ROOT_DIR",c),n.exportVariable("PKG_CONFIG_PATH",w+"/lib/pkgconfig"),n.addPath(w),n.addPath(m)),n.setOutput("python-version","pypy"+p),n.setOutput("python-path",g),{resolvedPyPyVersion:p,resolvedPythonVersion:f};}function h(e,t,r){let a="",h="",l=i.IS_WINDOWS?c(e):o.find("PyPy",e,r);return l&&(h=(0,i.getPyPyVersionFromPath)(l),a=(0,i.readExactPyPyVersionFile)(l),s.satisfies(a,t)||(l=null,a="",h="")),l||n.info(`PyPy version ${e} (${t}) was not found in the local cache`),{installDir:l,resolvedPythonVersion:h,resolvedPyPyVersion:a};}function l(e){let t;let s=e.split("-").filter(e=>!!e);if(/^(pypy)(.+)/.test(s[0])){let e=s[0].replace("pypy","");s.splice(0,1,"pypy",e);}if(s.length<2||"pypy"!=s[0])throw Error("Invalid 'version' property for PyPy. PyPy version should be specified as 'pypy<python-version>' or 'pypy-<python-version>'. See README for examples and documentation.");let n=s[1];if(t=s.length>2?r.pypyVersionToSemantic(s[2]):"x",!(0,i.validateVersion)(n)||!(0,i.validateVersion)(t))throw Error("Invalid 'version' property for PyPy. Both Python version and PyPy versions should satisfy SemVer notation. See README for examples and documentation.");if(!(0,i.validatePythonVersionFormatForPyPy)(n))throw Error("Invalid format of Python version for PyPy. Python version should be specified in format 'x.y'. See README for examples and documentation.");return{pypyVersion:t,pythonVersion:n};}function c(e){let t="";return(0,i.WINDOWS_ARCHS).forEach(r=>t=t||o.find("PyPy",e,r)),t;}$parcel$export(e.exports,"findPyPyVersion",()=>a),r=parcelRequire("jsAqG"),i=parcelRequire("clwE1"),s=parcelRequire("51NgG"),n=parcelRequire("k1l4q"),o=parcelRequire("1GQ3N");}),parcelRegister("jsAqG",function(e,t){var r,i,s,n,o,a;async function h(e,t,s,n,o){let h;if(!(o=null!=o?o:await l())||0===o.length)throw Error("No release was found in PyPy version.json");let d=p(o,t,e,s,!1);if(!n||d&&d.foundAsset||(r.info([`Stable PyPy version ${t} (${e}) with arch ${s} not found`,"Trying pre-release versions"].join($a2uk8$os.EOL)),d=p(o,t,e,s,!0)),!d||!d.foundAsset)throw Error(`PyPy version ${t} (${e}) with arch ${s} not found`);let{foundAsset:y,resolvedPythonVersion:m,resolvedPyPyVersion:x}=d,g=""+y.download_url;r.info(`Downloading PyPy from "${g}" ...`);try{let e=await i.downloadTool(g);r.info("Extracting downloaded archive..."),h=a.IS_WINDOWS?await i.extractZip(e):await i.extractTar(e,void 0,"x");let t=$parcel$interopDefault($a2uk8$fs).readdirSync(h)[0],n=$a2uk8$path.join(h,t),o=n;(0,a.isNightlyKeyword)(x)||(o=await i.cacheDir(n,"PyPy",m,s)),(0,a.writeExactPyPyVersionFile)(o,x);let l=f(o);return await c(l,m),await u(l),{installDir:o,resolvedPythonVersion:m,resolvedPyPyVersion:x};}catch(e){throw e instanceof Error&&(e instanceof i.HTTPError&&(403===e.httpStatusCode||429===e.httpStatusCode)?r.info(`Received HTTP status code ${e.httpStatusCode}. This usually indicates the rate limit has been exceeded`):r.info(e.message),void 0!==e.stack&&r.debug(e.stack)),e;}}async function l(){let e="https://downloads.python.org/pypy/versions.json",t=new n.HttpClient("tool-cache"),r=await t.getJson(e);if(!r.result)throw Error(`Unable to retrieve the list of available PyPy versions from '${e}'`);return r.result;}async function c(e,t){let i=s.coerce(t),n=s.major(i),o=s.minor(i),h=2===n?"":"3",l=`${n}.${o}`,c=a.IS_WINDOWS?".exe":"";r.info("Creating symlinks..."),(0,a.createSymlinkInFolder)(e,`pypy${h}${c}`,`python${n}${c}`,!0),(0,a.createSymlinkInFolder)(e,`pypy${h}${c}`,"python"+c,!0),(0,a.createSymlinkInFolder)(e,`pypy${h}${c}`,`pypy${l}${c}`,!0);}async function u(e){r.info("Installing and updating pip");let t=$a2uk8$path.join(e,"python");await o.exec(`${t} -m ensurepip`),await o.exec(`${e}/python -m pip install --ignore-installed pip`);}function p(e,t,r,i,n){let o={includePrerelease:n},h=e.filter(e=>{let n=s.satisfies(s.coerce(e.python_version),t),h=(0,a.isNightlyKeyword)(r)&&(0,a.isNightlyKeyword)(e.pypy_version)||s.satisfies(d(e.pypy_version),r,o),l=e.files&&(a.IS_WINDOWS?y(e,i):m(e,i,process.platform));return n&&h&&l;});if(0===h.length)return null;let l=h.sort((e,t)=>s.compare(s.coerce(d(t.pypy_version)),s.coerce(d(e.pypy_version)))||s.compare(s.coerce(t.python_version),s.coerce(e.python_version)))[0];return{foundAsset:a.IS_WINDOWS?x(l,i):g(l,i,process.platform),resolvedPythonVersion:l.python_version,resolvedPyPyVersion:l.pypy_version.trim()};}function f(e){let t=$a2uk8$path.join(e,"bin");return a.IS_WINDOWS?e:t;}function d(e){let t=/(\d+\.\d+\.\d+)((?:a|b|rc))(\d*)/g;return e.replace(t,"$1-$2.$3");}function y(e,t){return t=w(t),e.files.some(e=>(0,a.WINDOWS_PLATFORMS).includes(e.platform)&&e.arch===t);}function m(e,t,r){return e.files.some(e=>e.arch===t&&e.platform===r);}function x(e,t){return t=w(t),e.files.find(e=>(0,a.WINDOWS_PLATFORMS).includes(e.platform)&&e.arch===t);}function g(e,t,r){return e.files.find(e=>e.arch===t&&e.platform===r);}function w(e){return"x32"===e&&(e="x86"),e;}$parcel$export(e.exports,"installPyPy",()=>h),$parcel$export(e.exports,"getAvailablePyPyVersions",()=>l),$parcel$export(e.exports,"findRelease",()=>p),$parcel$export(e.exports,"getPyPyBinaryPath",()=>f),$parcel$export(e.exports,"pypyVersionToSemantic",()=>d),r=parcelRequire("k1l4q"),i=parcelRequire("1GQ3N"),s=parcelRequire("51NgG"),n=parcelRequire("ba1Cu"),o=parcelRequire("ca0ts"),a=parcelRequire("clwE1");}),parcelRegister("1GQ3N",function(e,t){function r(e,t,r,s){return E(this,void 0,void 0,function*(){t=t||L.join(S(),H.default()),yield D.mkdirP(L.dirname(t)),$.debug("Downloading "+e),$.debug("Destination "+t);let n=3,o=O("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),a=O("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),h=new R.RetryHelper(n,o,a);return yield h.execute(()=>E(this,void 0,void 0,function*(){return yield i(e,t||"",r,s);}),e=>!(e instanceof W)||!e.httpStatusCode||!(e.httpStatusCode<500)||408===e.httpStatusCode||429===e.httpStatusCode);});}function i(e,t,r,i){return E(this,void 0,void 0,function*(){if(M.existsSync(t))throw Error(`Destination file path ${t} already exists`);let s=new j.HttpClient(K,[],{allowRetries:!1});r&&($.debug("set auth"),void 0===i&&(i={}),i.authorization=r);let n=yield s.get(e,i);if(200!==n.message.statusCode){let t=new W(n.message.statusCode);throw $.debug(`Failed to download from "${e}". Code(${n.message.statusCode}) Message(${n.message.statusMessage})`),t;}let o=q.promisify(F.pipeline),a=O("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>n.message)(),h=!1;try{return yield o(a,M.createWriteStream(t)),$.debug("download complete"),h=!0,t;}finally{if(!h){$.debug("download failed");try{yield D.rmRF(t);}catch(e){$.debug(`Failed to delete '${t}'. ${e.message}`);}}}});}function s(e,t,r){return E(this,void 0,void 0,function*(){$a2uk8$assert.ok(B,"extract7z() not supported on current OS"),$a2uk8$assert.ok(e,'parameter "file" is required'),t=yield m(t);let i=process.cwd();if(process.chdir(t),r)try{let t=$.isDebug()?"-bb1":"-bb0",i=["x",t,"-bd","-sccUTF-8",e],s={silent:!0};yield A.exec(`"${r}"`,i,s);}finally{process.chdir(i);}else{let r=L.join(C,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,""),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${r}' -Source '${s}' -Target '${n}'`],a={silent:!0};try{let e=yield D.which("powershell",!0);yield A.exec(`"${e}"`,o,a);}finally{process.chdir(i);}}return t;});}function n(e,t,r="xz"){return E(this,void 0,void 0,function*(){let i;if(!e)throw Error("parameter 'file' is required");t=yield m(t),$.debug("Checking tar --version");let s="";yield A.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>s+=e.toString(),stderr:e=>s+=e.toString()}}),$.debug(s.trim());let n=s.toUpperCase().includes("GNU TAR");i=r instanceof Array?r:[r],$.isDebug()&&!r.includes("v")&&i.push("-v");let o=t,a=e;return B&&n&&(i.push("--force-local"),o=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),n&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",o,"-f",a),yield A.exec("tar",i),t;});}function o(e,t,r=[]){return E(this,void 0,void 0,function*(){let i;$a2uk8$assert.ok(G,"extractXar() not supported on current OS"),$a2uk8$assert.ok(e,'parameter "file" is required'),t=yield m(t),(i=r instanceof Array?r:[r]).push("-x","-C",t,"-f",e),$.isDebug()&&i.push("-v");let s=yield D.which("xar",!0);return yield A.exec(`"${s}"`,_(i)),t;});}function a(e,t){return E(this,void 0,void 0,function*(){if(!e)throw Error("parameter 'file' is required");return t=yield m(t),B?yield h(e,t):yield l(e,t),t;});}function h(e,t){return E(this,void 0,void 0,function*(){let r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),s=yield D.which("pwsh",!1);if(s){let e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ; try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) } catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`];$.debug("Using pwsh at path: "+s),yield A.exec(`"${s}"`,e);}else{let e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`],t=yield D.which("powershell",!0);$.debug("Using powershell at path: "+t),yield A.exec(`"${t}"`,e);}});}function l(e,t){return E(this,void 0,void 0,function*(){let r=yield D.which("unzip",!0),i=[e];$.isDebug()||i.unshift("-q"),i.unshift("-o"),yield A.exec(`"${r}"`,i,{cwd:t});});}function c(e,t,r,i){return E(this,void 0,void 0,function*(){if(r=V.clean(r)||r,i=i||k.arch(),$.debug(`Caching tool ${t} ${r} ${i}`),$.debug("source dir: "+e),!M.statSync(e).isDirectory())throw Error("sourceDir is not a directory");let s=yield x(t,r,i);for(let t of M.readdirSync(e)){let r=L.join(e,t);yield D.cp(r,s,{recursive:!0});}return g(t,r,i),s;});}function u(e,t,r,i,s){return E(this,void 0,void 0,function*(){if(i=V.clean(i)||i,s=s||k.arch(),$.debug(`Caching tool ${r} ${i} ${s}`),$.debug("source file: "+e),!M.statSync(e).isFile())throw Error("sourceFile is not a file");let n=yield x(r,i,s),o=L.join(n,t);return $.debug("destination file "+o),yield D.cp(e,o),g(r,i,s),n;});}function p(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||k.arch(),w(t)||(t=b(f(e,r),t));let i="";if(t){t=V.clean(t)||"";let s=L.join(v(),e,t,r);$.debug("checking cache: "+s),M.existsSync(s)&&M.existsSync(`${s}.complete`)?($.debug(`Found tool in cache ${e} ${t} ${r}`),i=s):$.debug("not found");}return i;}function f(e,t){let r=[];t=t||k.arch();let i=L.join(v(),e);if(M.existsSync(i)){for(let e of M.readdirSync(i))if(w(e)){let s=L.join(i,e,t||"");M.existsSync(s)&&M.existsSync(`${s}.complete`)&&r.push(e);}}return r;}function d(e,t,r,i="master"){return E(this,void 0,void 0,function*(){let s=[],n=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`,o=new j.HttpClient("tool-cache"),a={};r&&($.debug("set auth"),a.authorization=r);let h=yield o.getJson(n,a);if(!h.result)return s;let l="";for(let e of h.result.tree)if("versions-manifest.json"===e.path){l=e.url;break;}a.accept="application/vnd.github.VERSION.raw";let c=yield(yield o.get(l,a)).readBody();if(c){c=c.replace(/^\uFEFF/,"");try{s=JSON.parse(c);}catch(e){$.debug("Invalid json");}}return s;});}function y(e,t,r,i=k.arch()){return E(this,void 0,void 0,function*(){return yield U._findMatch(e,t,r,i);});}function m(e){return E(this,void 0,void 0,function*(){return e||(e=L.join(S(),H.default())),yield D.mkdirP(e),e;});}function x(e,t,r){return E(this,void 0,void 0,function*(){let i=L.join(v(),e,V.clean(t)||t,r||"");$.debug("destination "+i);let s=`${i}.complete`;return yield D.rmRF(i),yield D.rmRF(s),yield D.mkdirP(i),i;});}function g(e,t,r){let i=L.join(v(),e,V.clean(t)||t,r||""),s=`${i}.complete`;M.writeFileSync(s,""),$.debug("finished caching tool");}function w(e){let t=V.clean(e)||"";$.debug("isExplicit: "+t);let r=null!=V.valid(t);return $.debug("explicit? "+r),r;}function b(e,t){let r="";$.debug(`evaluating ${e.length} versions`),e=e.sort((e,t)=>V.gt(e,t)?1:-1);for(let i=e.length-1;i>=0;i--){let s=e[i];if(V.satisfies(s,t)){r=s;break;}}return r?$.debug("matched: "+r):$.debug("match not found"),r;}function v(){let e=process.env.RUNNER_TOOL_CACHE||"";return $a2uk8$assert.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e;}function S(){let e=process.env.RUNNER_TEMP||"";return $a2uk8$assert.ok(e,"Expected RUNNER_TEMP to be defined"),e;}function O(e,t){let r=$parcel$global[e];return void 0!==r?r:t;}function _(e){return Array.from(new Set(e));}var N,P,T,E,I,A,R,C=$a2uk8$path.resolve(__dirname,"../../node_modules/.pnpm/@actions+tool-cache@1.7.2/node_modules/@actions/tool-cache/lib");N=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),P=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),T=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&N(t,e,r);return P(t,e),t;},E=e.exports&&e.exports.__awaiter||function(e,t,r,i){function s(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{h(i.next(e));}catch(e){n(e);}}function a(e){try{h(i.throw(e));}catch(e){n(e);}}function h(e){e.done?r(e.value):s(e.value).then(o,a);}h((i=i.apply(e,t||[])).next());});},I=e.exports&&e.exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e};},Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.evaluateVersions=e.exports.isExplicitVersion=e.exports.findFromManifest=e.exports.getManifestFromRepo=e.exports.findAllVersions=e.exports.find=e.exports.cacheFile=e.exports.cacheDir=e.exports.extractZip=e.exports.extractXar=e.exports.extractTar=e.exports.extract7z=e.exports.downloadTool=e.exports.HTTPError=void 0;let $=T(parcelRequire("k1l4q")),D=T(parcelRequire("g9WSN")),M=T($a2uk8$fs),U=T(parcelRequire("2YXUl")),k=T($a2uk8$os),L=T($a2uk8$path),j=T(parcelRequire("ba1Cu")),V=T(parcelRequire("a5mzA")),F=T($a2uk8$stream),q=T($a2uk8$util),H=I(parcelRequire("iFKS7"));A=parcelRequire("ca0ts"),R=parcelRequire("9g1b2");class W extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype);}}e.exports.HTTPError=W;let B="win32"===process.platform,G="darwin"===process.platform,K="actions/tool-cache";e.exports.downloadTool=r,e.exports.extract7z=s,e.exports.extractTar=n,e.exports.extractXar=o,e.exports.extractZip=a,e.exports.cacheDir=c,e.exports.cacheFile=u,e.exports.find=p,e.exports.findAllVersions=f,e.exports.getManifestFromRepo=d,e.exports.findFromManifest=y,e.exports.isExplicitVersion=w,e.exports.evaluateVersions=b;}),parcelRegister("2YXUl",function(e,t){var r,i,s,n,o;function a(t,r,i,s){return n(this,void 0,void 0,function*(){let n,a,h;let l=$a2uk8$os.platform();for(let n of i){let i=n.version;if(o.debug(`check ${i} satisfies ${t}`),c.satisfies(i,t)&&(!r||n.stable===r)&&(h=n.files.find(t=>{o.debug(`${t.arch}===${s} && ${t.platform}===${l}`);let r=t.arch===s&&t.platform===l;if(r&&t.platform_version){let i=e.exports._getOsVersion();r=i===t.platform_version||c.satisfies(i,t.platform_version);}return r;}))){o.debug("matched "+n.version),a=n;break;}}return a&&h&&((n=Object.assign({},a)).files=[h]),n;});}function h(){let t=$a2uk8$os.platform(),r="";if("darwin"===t)r=$a2uk8$child_process.execSync("sw_vers -productVersion").toString();else if("linux"===t){let t=e.exports._readLinuxVersionFile();if(t)for(let e of t.split("\n")){let t=e.split("=");if(2===t.length&&("VERSION_ID"===t[0].trim()||"DISTRIB_RELEASE"===t[0].trim())){r=t[1].trim().replace(/^"/,"").replace(/"$/,"");break;}}}return r;}function l(){let e="/etc/lsb-release",t="/etc/os-release",r="";return $a2uk8$fs.existsSync(e)?r=$a2uk8$fs.readFileSync(e).toString():$a2uk8$fs.existsSync(t)&&(r=$a2uk8$fs.readFileSync(t).toString()),r;}r=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),i=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),s=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.hasOwnProperty.call(e,s)&&r(t,e,s);return i(t,e),t;},n=e.exports&&e.exports.__awaiter||function(e,t,r,i){function s(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{h(i.next(e));}catch(e){n(e);}}function a(e){try{h(i.throw(e));}catch(e){n(e);}}function h(e){e.done?r(e.value):s(e.value).then(o,a);}h((i=i.apply(e,t||[])).next());});},Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports._readLinuxVersionFile=e.exports._getOsVersion=e.exports._findMatch=void 0;let c=s(parcelRequire("a5mzA"));o=parcelRequire("k1l4q"),e.exports._findMatch=a,e.exports._getOsVersion=h,e.exports._readLinuxVersionFile=l;}),parcelRegister("ba1Cu",function(e,t){var r,i,s,n;let o;function a(e){let t=r.getProxyUrl(new URL(e));return t?t.href:"";}function h(e){return"https:"===new URL(e).protocol;}Object.defineProperty(e.exports,"__esModule",{value:!0}),r=parcelRequire("8NGVX"),function(e){e[e.OK=200]="OK",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.ResourceMoved=302]="ResourceMoved",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.SwitchProxy=306]="SwitchProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout";}(i=e.exports.HttpCodes||(e.exports.HttpCodes={})),function(e){e.Accept="accept",e.ContentType="content-type";}(s=e.exports.Headers||(e.exports.Headers={})),function(e){e.ApplicationJson="application/json";}(n=e.exports.MediaTypes||(e.exports.MediaTypes={})),e.exports.getProxyUrl=a;let l=[i.MovedPermanently,i.ResourceMoved,i.SeeOther,i.TemporaryRedirect,i.PermanentRedirect],c=[i.BadGateway,i.ServiceUnavailable,i.GatewayTimeout],u=["OPTIONS","GET","DELETE","HEAD"],p=10,f=5;class d extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,d.prototype);}}e.exports.HttpClientError=d;class y{constructor(e){this.message=e;}readBody(){return new Promise(async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",e=>{r=Buffer.concat([r,e]);}),this.message.on("end",()=>{e(r.toString());});});}}e.exports.HttpClientResponse=y,e.exports.isHttps=h;class m{constructor(e,t,r){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.maxRetries));}options(e,t){return this.request("OPTIONS",e,null,t||{});}get(e,t){return this.request("GET",e,null,t||{});}del(e,t){return this.request("DELETE",e,null,t||{});}post(e,t,r){return this.request("POST",e,t,r||{});}patch(e,t,r){return this.request("PATCH",e,t,r||{});}put(e,t,r){return this.request("PUT",e,t,r||{});}head(e,t){return this.request("HEAD",e,null,t||{});}sendStream(e,t,r,i){return this.request(e,t,r,i);}async getJson(e,t={}){t[s.Accept]=this._getExistingOrDefaultHeader(t,s.Accept,n.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions);}async postJson(e,t,r={}){let i=JSON.stringify(t,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,n.ApplicationJson),r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,n.ApplicationJson);let o=await this.post(e,i,r);return this._processResponse(o,this.requestOptions);}async putJson(e,t,r={}){let i=JSON.stringify(t,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,n.ApplicationJson),r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,n.ApplicationJson);let o=await this.put(e,i,r);return this._processResponse(o,this.requestOptions);}async patchJson(e,t,r={}){let i=JSON.stringify(t,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,n.ApplicationJson),r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,n.ApplicationJson);let o=await this.patch(e,i,r);return this._processResponse(o,this.requestOptions);}async request(e,t,r,s){let n;if(this._disposed)throw Error("Client has already been disposed.");let o=new URL(t),a=this._prepareRequest(e,o,s),h=this._allowRetries&&-1!=u.indexOf(e)?this._maxRetries+1:1,p=0;for(;p<h;){if((n=await this.requestRaw(a,r))&&n.message&&n.message.statusCode===i.Unauthorized){let e;for(let t=0;t<this.handlers.length;t++)if(this.handlers[t].canHandleAuthentication(n)){e=this.handlers[t];break;}if(e)return e.handleAuthentication(this,a,r);break;}let t=this._maxRedirects;for(;-1!=l.indexOf(n.message.statusCode)&&this._allowRedirects&&t>0;){let i=n.message.headers.location;if(!i)break;let h=new URL(i);if("https:"==o.protocol&&o.protocol!=h.protocol&&!this._allowRedirectDowngrade)throw Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(await n.readBody(),h.hostname!==o.hostname)for(let e in s)"authorization"===e.toLowerCase()&&delete s[e];a=this._prepareRequest(e,h,s),n=await this.requestRaw(a,r),t--;}if(-1==c.indexOf(n.message.statusCode))break;(p+=1)<h&&(await n.readBody(),await this._performExponentialBackoff(p));}return n;}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0;}requestRaw(e,t){return new Promise((r,i)=>{let s=function(e,t){e&&i(e),r(t);};this.requestRawWithCallback(e,t,s);});}requestRawWithCallback(e,t,r){let i;"string"==typeof t&&(e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let s=!1,n=(e,t)=>{s||(s=!0,r(e,t));},o=e.httpModule.request(e.options,e=>{n(null,new y(e));});o.on("socket",e=>{i=e;}),o.setTimeout(this._socketTimeout||18e4,()=>{i&&i.end(),n(Error("Request timeout: "+e.options.path),null);}),o.on("error",function(e){n(e,null);}),t&&"string"==typeof t&&o.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",function(){o.end();}),t.pipe(o)):o.end();}getAgent(e){let t=new URL(e);return this._getAgent(t);}_prepareRequest(e,t,r){let i={};i.parsedUrl=t;let s="https:"===i.parsedUrl.protocol;i.httpModule=s?$a2uk8$https:$a2uk8$http;let n=s?443:80;return i.options={},i.options.host=i.parsedUrl.hostname,i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):n,i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||""),i.options.method=e,i.options.headers=this._mergeHeaders(r),null!=this.userAgent&&(i.options.headers["user-agent"]=this.userAgent),i.options.agent=this._getAgent(i.parsedUrl),this.handlers&&this.handlers.forEach(e=>{e.prepareRequest(i.options);}),i;}_mergeHeaders(e){let t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});return this.requestOptions&&this.requestOptions.headers?Object.assign({},t(this.requestOptions.headers),t(e)):t(e||{});}_getExistingOrDefaultHeader(e,t,r){let i;let s=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});return this.requestOptions&&this.requestOptions.headers&&(i=s(this.requestOptions.headers)[t]),e[t]||i||r;}_getAgent(e){let t;let i=r.getProxyUrl(e),s=i&&i.hostname;if(this._keepAlive&&s&&(t=this._proxyAgent),this._keepAlive&&!s&&(t=this._agent),t)return t;let n="https:"===e.protocol,a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||$a2uk8$http.globalAgent.maxSockets),s){let e;o||(o=parcelRequire("bbp3j"));let r={maxSockets:a,keepAlive:this._keepAlive,proxy:{...((i.username||i.password)&&{proxyAuth:`${i.username}:${i.password}`}),host:i.hostname,port:i.port}},s="https:"===i.protocol;t=(e=n?s?o.httpsOverHttps:o.httpsOverHttp:s?o.httpOverHttps:o.httpOverHttp)(r),this._proxyAgent=t;}if(this._keepAlive&&!t){let e={keepAlive:this._keepAlive,maxSockets:a};t=n?new $a2uk8$https.Agent(e):new $a2uk8$http.Agent(e),this._agent=t;}return t||(t=n?$a2uk8$https.globalAgent:$a2uk8$http.globalAgent),n&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t;}_performExponentialBackoff(e){let t=f*Math.pow(2,e=Math.min(p,e));return new Promise(e=>setTimeout(()=>e(),t));}static dateTimeDeserializer(e,t){if("string"==typeof t){let e=new Date(t);if(!isNaN(e.valueOf()))return e;}return t;}async _processResponse(e,t){return new Promise(async(r,s)=>{let n,o;let a=e.message.statusCode,h={statusCode:a,result:null,headers:{}};a==i.NotFound&&r(h);try{(o=await e.readBody())&&o.length>0&&(n=t&&t.deserializeDates?JSON.parse(o,m.dateTimeDeserializer):JSON.parse(o),h.result=n),h.headers=e.message.headers;}catch(e){}if(a>299){let e;let t=new d(e=n&&n.message?n.message:o&&o.length>0?o:"Failed request: ("+a+")",a);t.result=h.result,s(t);}else r(h);});}}e.exports.HttpClient=m;}),parcelRegister("8NGVX",function(e,t){function r(e){let t,r,s="https:"===e.protocol;return i(e)||(r=s?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY)&&(t=new URL(r)),t;}function i(e){let t;if(!e.hostname)return!1;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;e.port?t=+e.port:"http:"===e.protocol?t=80:"https:"===e.protocol&&(t=443);let i=[e.hostname.toUpperCase()];for(let e of("number"==typeof t&&i.push(`${i[0]}:${t}`),r.split(",").map(e=>e.trim().toUpperCase()).filter(e=>e)))if(i.some(t=>t===e))return!0;return!1;}Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.getProxyUrl=r,e.exports.checkBypass=i;}),parcelRegister("9g1b2",function(e,t){var r=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),i=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),s=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.hasOwnProperty.call(e,s)&&r(t,e,s);return i(t,e),t;},n=e.exports&&e.exports.__awaiter||function(e,t,r,i){function s(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{h(i.next(e));}catch(e){n(e);}}function a(e){try{h(i.throw(e));}catch(e){n(e);}}function h(e){e.done?r(e.value):s(e.value).then(o,a);}h((i=i.apply(e,t||[])).next());});};Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.RetryHelper=void 0;let o=s(parcelRequire("k1l4q"));class a{constructor(e,t,r){if(e<1)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds");}execute(e,t){return n(this,void 0,void 0,function*(){let r=1;for(;r<this.maxAttempts;){try{return yield e();}catch(e){if(t&&!t(e))throw e;o.info(e.message);}let i=this.getSleepAmount();o.info(`Waiting ${i} seconds before trying again`),yield this.sleep(i),r++;}return yield e();});}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds;}sleep(e){return n(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,1e3*e));});}}e.exports.RetryHelper=a;}),parcelRegister("clwE1",function(e,t){var r,i,s;function n(e,t,r,i=!1){let s=$a2uk8$path.join(e,t),o=$a2uk8$path.join(e,r);$parcel$interopDefault($a2uk8$fs).existsSync(o)||($parcel$interopDefault($a2uk8$fs).symlinkSync(s,o),!m&&i&&$parcel$interopDefault($a2uk8$fs).chmodSync(o,"755"));}function o(e){return a(e)||!!i.validRange(e);}function a(e){return"nightly"===e;}function h(e){return $a2uk8$path.basename($a2uk8$path.dirname(e));}function l(e){let t="",r=$a2uk8$path.join(e,v);return $parcel$interopDefault($a2uk8$fs).existsSync(r)&&(t=$parcel$interopDefault($a2uk8$fs).readFileSync(r).toString().trim()),t;}function c(e,t){let r=$a2uk8$path.join(e,v);$parcel$interopDefault($a2uk8$fs).writeFileSync(r,t);}function u(e){return /^\d+\.\d+$/.test(e);}async function p(){let{stdout:e}=await s.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{osName:"Windows",osVersion:e.trim().split(" ")[3]};}async function f(){let{stdout:e}=await s.getExecOutput("sw_vers",["-productVersion"],{silent:!0});return{osName:"macOS",osVersion:e.trim()};}async function d(){let{stdout:e}=await s.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,i]=e.trim().split("\n");return r.debug(`OS Name: ${t}, Version: ${i}`),{osName:t,osVersion:i};}async function y(){let e;try{m?e=await p():x?e=await d():g&&(e=await f());}catch(t){let e=t;r.debug(e.message);}finally{return e;}}$parcel$export(e.exports,"IS_WINDOWS",()=>m),$parcel$export(e.exports,"IS_LINUX",()=>x),$parcel$export(e.exports,"IS_MAC",()=>g),$parcel$export(e.exports,"WINDOWS_ARCHS",()=>w),$parcel$export(e.exports,"WINDOWS_PLATFORMS",()=>b),$parcel$export(e.exports,"createSymlinkInFolder",()=>n),$parcel$export(e.exports,"validateVersion",()=>o),$parcel$export(e.exports,"isNightlyKeyword",()=>a),$parcel$export(e.exports,"getPyPyVersionFromPath",()=>h),$parcel$export(e.exports,"readExactPyPyVersionFile",()=>l),$parcel$export(e.exports,"writeExactPyPyVersionFile",()=>c),$parcel$export(e.exports,"validatePythonVersionFormatForPyPy",()=>u),$parcel$export(e.exports,"getOSInfo",()=>y),r=parcelRequire("k1l4q"),i=parcelRequire("51NgG"),parcelRequire("8y2rb"),s=parcelRequire("ca0ts");let m="win32"===process.platform,x="linux"===process.platform,g="darwin"===process.platform,w=["x86","x64"],b=["win32","win64"],v="PYPY_VERSION";}),parcelRegister("8y2rb",function(e,t){var r;$parcel$export(e.exports,"parse",()=>r,e=>r=e),r=parcelRequire("li79u"),parcelRequire("e8UAf");}),parcelRegister("li79u",function(e,t){e.exports=parcelRequire("Pq9Hv"),e.exports.async=parcelRequire("9qHsG"),e.exports.stream=parcelRequire("aluRl"),e.exports.prettyError=parcelRequire("buqvX");}),parcelRegister("Pq9Hv",function(e,t){var r,i;function s(e){$parcel$global.Buffer&&$parcel$global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new r();try{return t.parse(e),t.finish();}catch(t){throw i(t,e);}}e.exports=s,r=parcelRequire("cpPXN"),i=parcelRequire("buqvX");}),parcelRegister("cpPXN",function(module,exports){var $D3EKL,$dAzRT,$11l48,$2cVXm;let _custom;function isDigit(e){return e>=CHAR_0&&e<=CHAR_9;}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9;}function isBit(e){return e===CHAR_1||e===CHAR_0;}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7;}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN;}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN;}function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1);}function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}});}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE;}function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}});}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE;}function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}});}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST;}function List(){return Object.defineProperties([],{[_type]:{value:LIST}});}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST;}function Integer(e){let t=+e;return(Object.is(t,-0)&&(t=0),$parcel$global.BigInt&&!Number.isSafeInteger(t))?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this);}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}});}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER;}function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}});}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT;}function tomlType(e){let t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer";}}return t;}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table();}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine();}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M;}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);else throw this.error(new TomlError(`Unknown character "${this.char}"`));}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"));}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement);}recordAssignStatement(e){let t=this.ctx,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table();}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=e.value,this.goto(this.parseWhitespaceToEOL);}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword);}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot);}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0;}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword);}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'));}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue);}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e});}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar());}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList);}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext);}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore);}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL);}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else throw this.error(new TomlError("Can't redefine existing key"));}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext);}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext);}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore);}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[e])){let t=Table();this.ctx[e].push(t),this.ctx=t;}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd);}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));else if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else throw this.error(new TomlError("Can't redefine an existing key"));}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext);}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);else if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);else if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);else if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);else throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"));}recordValue(e){return this.returnNow(e);}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'));}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'));}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'));}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'));}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey);}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else if(0!==this.state.buf.length)return this.returnNow();else throw this.error(new TomlError("Empty bare keys are not allowed"));}while(this.nextChar());}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString);}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow();}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent);}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent));}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent));}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString);}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));else if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString);}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow();}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent);}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));else if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`));}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent);}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent));}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent));}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape);}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"));}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow();}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char));}parseUnicodeReturn(e){try{let t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t));}catch(e){throw this.error(TomlError.wrap(e));}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return();}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return();}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan);}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart);}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger);}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf));}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow();}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow();}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else return this.returnNow(Float(this.state.buf));}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"));}parseNumberExponent(){if(isDigit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);else return this.returnNow(Float(this.state.buf));}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly);}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);else if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);else if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);else return this.returnNow(Integer(this.state.buf));}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"));}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"));}parseNumberBaseOrDateTime(){if(this.char===CHAR_b)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin);if(this.char===CHAR_o)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct);if(this.char===CHAR_x)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex);if(this.char===CHAR_PERIOD)return this.goto(this.parseNumberInteger);if(isDigit(this.char))return this.goto(this.parseDateTimeOnly);else return this.returnNow(Integer(this.state.buf));}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth);}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay);}if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"));}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour);}if(this.atEndOfWord())return this.returnNow($11l48(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"));}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow($11l48(this.state.result)):this.goto(this.parseTimeHour);}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin);}if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"));}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);else throw this.error(new TomlError("Incomplete datetime"));}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction);}else throw this.error(new TomlError("Incomplete datetime"));}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin);}throw this.error(new TomlError("Incomplete time"));}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);else throw this.error(new TomlError("Incomplete time"));}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe);}else throw this.error(new TomlError("Incomplete time"));}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return($2cVXm(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction);}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow($2cVXm(this.state.result+"."+this.state.buf));}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"));}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return($D3EKL(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow($dAzRT(this.state.result+this.state.buf));else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"));}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return($D3EKL(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow($dAzRT(this.state.result+this.state.buf));else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"));}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep);}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"));}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"));}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return($D3EKL(this.state.result+this.state.buf));}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"));}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0;}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue);}recordInlineListValue(e){if(this.state.resultArr){let t=this.state.resultArr[_contentType],r=tomlType(e);if(t!==r)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${r}`));}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext);}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"));}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue));}recordInlineTableValue(e){let t=this.state.resultTable,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table();}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=e.value,this.goto(this.parseInlineTableNext);}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"));}}return t;}module.exports=makeParserClass(parcelRequire("7LR6o")),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null;}}TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t;},module.exports.TomlError=TomlError,$D3EKL=parcelRequire("D3EKL"),$dAzRT=parcelRequire("dAzRT"),$11l48=parcelRequire("11l48"),$2cVXm=parcelRequire("2cVXm");let CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"},_type=Symbol(),_declared=Symbol(),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0},INLINE_TABLE=Symbol(),TABLE=Symbol(),_contentType=Symbol(),INLINE_LIST=Symbol(),LIST=Symbol();try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom;}catch(_){}let _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=$parcel$global.BigInt.asIntN(64,e);}catch(e){this.value=null;}Object.defineProperty(this,_type,{value:INTEGER});}isNaN(){return null===this.value;}toString(){return this.value+"";}[_inspect](){return`[BigInt: ${this.toString()}]}`;}valueOf(){return this.value;}}let INTEGER=Symbol(),FLOAT=Symbol();}),parcelRegister("7LR6o",function(e,t){let r=1114112;class i extends Error{constructor(e,t,r){super("[ParserError] "+e,t,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}}class s{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null;}}class n{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new s(this.parseStart);}parse(e){let t;if(0!==e.length&&null!=e.length){for(this._buf=e+"",this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null;}}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer();}haveBuffer(){return this.ii<this._buf.length;}runOne(){return this.state.parser.call(this,this.state.returned);}finish(){let e;this.char=r;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj;}next(e){if("function"!=typeof e)throw new i("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e;}goto(e){return this.next(e),this.runOne();}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new s(e);}callNow(e,t){return this.call(e,t),this.runOne();}return(e){if(0===this.stack.length)throw this.error(new i("Stack underflow"));void 0===e&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e;}returnNow(e){return this.return(e),this.runOne();}consume(){if(this.char===r)throw this.error(new i("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii];}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e;}parseStart(){throw new i("Must declare a parseStart method");}}n.END=r,n.Error=i,e.exports=n;}),parcelRegister("D3EKL",function(e,t){e.exports=e=>{let t=new Date(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRegister("dAzRT",function(e,t){var r=parcelRequire("k3bxK");class i extends Date{constructor(e){super(e+"Z"),this.isFloating=!0;}toISOString(){let e=`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`,t=`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`;return`${e}T${t}`;}}e.exports=e=>{let t=new i(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRegister("k3bxK",function(e,t){e.exports=(e,t)=>{for(t+="";t.length<e;)t="0"+t;return t;};}),parcelRegister("11l48",function(e,t){var r=parcelRequire("k3bxK");let i=$parcel$global.Date;class s extends i{constructor(e){super(e),this.isDate=!0;}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`;}}e.exports=e=>{let t=new s(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRegister("2cVXm",function(e,t){var r=parcelRequire("k3bxK");class i extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0;}toISOString(){return`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`;}}e.exports=e=>{let t=new i(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRegister("buqvX",function(e,t){function r(e,t){if(null==e.pos||null==e.line)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
|
|
`,t&&t.split){let i=t.split(/\n/),s=(Math.min(i.length,e.line+3)+"").length,n=" ";for(;n.length<s;)n+=" ";for(let t=Math.max(0,e.line-1);t<Math.min(i.length,e.line+2);++t){let o=t+1+"";if(o.length<s&&(o=" "+o),e.line===t){r+=o+"> "+i[t]+"\n"+n+" ";for(let t=0;t<e.col;++t)r+=" ";r+="^\n";}else r+=o+": "+i[t]+"\n";}}return e.message=r+"\n",e;}e.exports=r;}),parcelRegister("9qHsG",function(e,t){var r,i;function s(e,t){function s(t,r,n,o){if(t>=e.length)try{return n(a.finish());}catch(t){return o(i(t,e));}try{a.parse(e.slice(t,t+r)),setImmediate(s,t+r,r,n,o);}catch(t){o(i(t,e));}}t||(t={});let n=0,o=t.blocksize||40960,a=new r();return new Promise((e,t)=>{setImmediate(s,n,o,e,t);});}e.exports=s,r=parcelRequire("cpPXN"),i=parcelRequire("buqvX");}),parcelRegister("aluRl",function(e,t){var r;function i(e){return e?s(e):n(e);}function s(e){let t=new r();return e.setEncoding("utf8"),new Promise((r,i)=>{let s;function n(){if(h=!0,!s)try{r(t.finish());}catch(e){i(e);}}function o(e){l=!0,i(e);}function a(){let r;for(s=!0;null!==(r=e.read());)try{t.parse(r);}catch(e){return o(e);}if(s=!1,h)return n();l||e.once("readable",a);}let h=!1,l=!1;e.once("end",n),e.once("error",o),a();});}function n(){let e=new r();return new $a2uk8$stream.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r));}catch(e){this.emit("error",e);}i();},flush(t){try{this.push(e.finish());}catch(e){this.emit("error",e);}t();}});}e.exports=i,r=parcelRequire("cpPXN");}),parcelRegister("e8UAf",function(e,t){function r(e){if(null===e)throw i("null");if(void 0===e)throw i("undefined");if("object"!=typeof e)throw i(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;let t=c(e);if("table"!==t)throw i(t);return h("","",e);}function i(e){return Error("Can only stringify objects, not "+e);}function s(){return Error("Array values can't have mixed types");}function n(e){return Object.keys(e).filter(t=>l(e[t]));}function o(e){return Object.keys(e).filter(t=>!l(e[t]));}function a(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))!e[r]||"function"!=typeof e[r].toJSON||"toISOString"in e[r]?t[r]=e[r]:t[r]=e[r].toJSON();return t;}function h(e,t,r){i=n(r=a(r)),s=o(r);var i,s,h=[],l=t||"";i.forEach(e=>{var t=c(r[e]);"undefined"!==t&&"null"!==t&&h.push(l+u(e)+" = "+x(r[e],!0));}),h.length>0&&h.push("");var p=e&&i.length>0?t+" ":"";return s.forEach(t=>{h.push(E(e,p,t,r[t]));}),h.join("\n");}function l(e){switch(c(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==c(e[0]);case"table":return 0===Object.keys(e).length;default:return!1;}}function c(e){if(void 0===e)return"undefined";if(null===e)return"null";if("bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0))return"integer";if("number"==typeof e)return"float";if("boolean"==typeof e)return"boolean";else if("string"==typeof e)return"string";else if("toISOString"in e)return isNaN(e)?"undefined":"datetime";else if(Array.isArray(e))return"array";else return"table";}function u(e){var t=e+"";return /^[-A-Za-z0-9_]+$/.test(t)?t:p(t);}function p(e){return'"'+y(e).replace(/"/g,'\\"')+'"';}function f(e){return"'"+e+"'";}function d(e,t){for(;t.length<e;)t="0"+t;return t;}function y(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+d(4,e.codePointAt(0).toString(16)));}function m(e){let t=e.split(/\n/).map(e=>y(e).replace(/"(?="")/g,'\\"')).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""';}function x(e,t){let r=c(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),g(e,r);}function g(e,t){switch(t||(t=c(e)),t){case"string-multiline":return m(e);case"string":return p(e);case"string-literal":return f(e);case"integer":return w(e);case"float":return b(e);case"boolean":return v(e);case"datetime":return S(e);case"array":return P(e.filter(e=>"null"!==c(e)&&"undefined"!==c(e)&&"nan"!==c(e)));case"table":return T(e);default:throw i(t);}}function w(e){return(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,"_");}function b(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=(e+"").split("."),r=t[0],i=t[1]||0;return w(r)+"."+i;}function v(e){return e+"";}function S(e){return e.toISOString();}function O(e){return"float"===e||"integer"===e;}function _(e){var t=c(e[0]);return e.every(e=>c(e)===t)?t:e.every(e=>O(c(e)))?"float":"mixed";}function N(e){let t=_(e);if("mixed"===t)throw s();return t;}function P(e){let t=N(e=a(e));var r="[",i=e.map(e=>g(e,t));return i.join(", ").length>60||/\n/.test(i)?r+="\n "+i.join(",\n ")+"\n":r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]";}function T(e){e=a(e);var t=[];return Object.keys(e).forEach(r=>{t.push(u(r)+" = "+x(e[r],!1));}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}";}function E(e,t,r,s){var n=c(s);if("array"===n)return I(e,t,r,s);if("table"===n)return A(e,t,r,s);throw i(n);}function I(e,t,r,s){N(s=a(s));var n=c(s[0]);if("table"!==n)throw i(n);var o=e+u(r),l="";return s.forEach(e=>{l.length>0&&(l+="\n"),l+=t+"[["+o+"]]\n"+h(o+".",t,e);}),l;}function A(e,t,r,i){var s=e+u(r),o="";return n(i).length>0&&(o+=t+"["+s+"]\n"),o+h(s+".",t,i);}e.exports=r,e.exports.value=g;}),parcelRegister("2mbyd",function(e,t){var r,i,s,n,o;function a(e){return r.IS_WINDOWS?$a2uk8$path.join(e,"Scripts"):$a2uk8$path.join(e,"bin");}async function h(e,t,h,p,f){let d=null,y=u(l(e),f);if(n.debug(`Semantic version spec of ${e} is ${y}`),p){var m;d=await s.getManifest();let e=null===(m=await s.findReleaseFromManifest(y,t,d))||void 0===m?void 0:m.version;e?(y=e,n.info(`Resolved as '${y}'`)):n.info(`Failed to resolve version ${y} from manifest`);}let x=o.find("Python",y,t);if(!x){n.info(`Version ${y} was not found in the local cache`);let e=await s.findReleaseFromManifest(y,t,d);e&&e.files&&e.files.length>0&&(n.info(`Version ${y} is available for downloading`),await s.installCpythonFromRelease(e),x=o.find("Python",y,t));}if(!x){let i=await(0,r.getOSInfo)();throw Error([`The version '${e}' with architecture '${t}' was not found for ${i?`${i.osName} ${i.osVersion}`:"this operating system"}.`,"The list of all available versions can be found here: "+s.MANIFEST_URL].join($a2uk8$os.EOL));}let g=a(x),w=r.IS_WINDOWS?".exe":"",b=$a2uk8$path.join(r.IS_WINDOWS?x:g,"python"+w);if(h){if(n.exportVariable("pythonLocation",x),n.exportVariable("PKG_CONFIG_PATH",x+"/lib/pkgconfig"),n.exportVariable("pythonLocation",x),n.exportVariable("Python_ROOT_DIR",x),n.exportVariable("Python2_ROOT_DIR",x),n.exportVariable("Python3_ROOT_DIR",x),n.exportVariable("PKG_CONFIG_PATH",x+"/lib/pkgconfig"),r.IS_LINUX){let e=process.env.LD_LIBRARY_PATH?":"+process.env.LD_LIBRARY_PATH:"",t=$a2uk8$path.join(x,"lib");e.split(":").includes(t)||n.exportVariable("LD_LIBRARY_PATH",t+e);}if(n.addPath(x),n.addPath(g),r.IS_WINDOWS){let e=$a2uk8$path.basename($a2uk8$path.dirname(x)),t=i.major(e),r=i.minor(e),s=$a2uk8$path.join(process.env.APPDATA||"","Python",`Python${t}${r}`,"Scripts");n.addPath(s);}}let v=c(x);return n.setOutput("python-version",v),n.setOutput("python-path",b),{impl:"CPython",version:v};}function l(e){let t=/^(\d+)\.(\d+)-dev$/;return e.replace(t,"~$1.$2.0-0");}function c(e){let t=e.split($a2uk8$path.sep),r=t.findIndex(e=>"PyPy"===e||"Python"===e);return t[r+1]||"";}function u(e,t){let r=/(\d+\.\d+\.\d+)((?:a|b|rc)\d*)/g,i=/^(\d+)\.(\d+)$/,s=e.replace(r,"$1-$2");return t&&(s=s.replace(i,"~$1.$2.0-0")),s;}$parcel$export(e.exports,"useCpythonVersion",()=>h),r=parcelRequire("clwE1"),i=parcelRequire("51NgG"),s=parcelRequire("adAKt"),n=parcelRequire("k1l4q"),o=parcelRequire("1GQ3N");}),parcelRegister("adAKt",function(e,t){var r,i,s,n;async function o(e,t,r){return r||(r=await a()),await i.findFromManifest(e,!1,r,t);}function a(){return r.debug(`Getting manifest from ${p}/${f}@${d}`),i.getManifestFromRepo(p,f,u,d);}async function h(e){let t={cwd:e,env:{...process.env,...(n.IS_LINUX&&{LD_LIBRARY_PATH:$a2uk8$path.join(e,"lib")})},silent:!0,listeners:{stdout(e){r.info(e.toString().trim());},stderr(e){r.error(e.toString().trim());}}};n.IS_WINDOWS?await s.exec("powershell",["./setup.ps1"],t):await s.exec("bash",["./setup.sh"],t);}async function l(e){let t=e.files[0].download_url;r.info(`Download from "${t}"`);let s="";try{let e;s=await i.downloadTool(t,void 0,u),r.info("Extract downloaded archive"),e=n.IS_WINDOWS?await i.extractZip(s):await i.extractTar(s),r.info("Execute installation script"),await h(e);}catch(e){throw e instanceof i.HTTPError&&(403===e.httpStatusCode||429===e.httpStatusCode?r.info(`Received HTTP status code ${e.httpStatusCode}. This usually indicates the rate limit has been exceeded`):r.info(e.message),e.stack&&r.debug(e.stack)),e;}}$parcel$export(e.exports,"MANIFEST_URL",()=>y),$parcel$export(e.exports,"findReleaseFromManifest",()=>o),$parcel$export(e.exports,"getManifest",()=>a),$parcel$export(e.exports,"installCpythonFromRelease",()=>l),r=parcelRequire("k1l4q"),i=parcelRequire("1GQ3N"),s=parcelRequire("ca0ts"),n=parcelRequire("clwE1");let c=r.getInput("token"),u=c?"token "+c:void 0,p="actions",f="python-versions",d="main",y=`https://raw.githubusercontent.com/${p}/${f}/${d}/versions-manifest.json`;});
|
|
//# sourceMappingURL=actions_python.895b8a50.js.map
|