UNPKG

setup-cpp

Version:

Install all the tools required for building and testing C++/C projects.

1 lines 65.8 kB
function requireClean(){if(hasRequiredClean)return clean_1;hasRequiredClean=1;const e=requireParse$1();return clean_1=(r,t)=>{const i=e(r.trim().replace(/^[=v]+/,""),t);return i?i.version:null}}function requireInc(){if(hasRequiredInc)return inc_1;hasRequiredInc=1;const e=requireSemver$1();return inc_1=(r,t,i,s,n)=>{"string"==typeof i&&(n=s,s=i,i=void 0);try{return new e(r instanceof e?r.version:r,i).inc(t,s,n).version}catch(a){return null}}}function requireDiff(){if(hasRequiredDiff)return diff_1;hasRequiredDiff=1;const e=requireParse$1();return diff_1=(r,t)=>{const i=e(r,null,!0),s=e(t,null,!0),n=i.compare(s);if(0===n)return null;const a=n>0,o=a?i:s,h=a?s:i,u=!!o.prerelease.length;if(h.prerelease.length&&!u){if(!h.patch&&!h.minor)return"major";if(0===h.compareMain(o))return h.minor&&!h.patch?"minor":"patch"}const c=u?"pre":"";return i.major!==s.major?c+"major":i.minor!==s.minor?c+"minor":i.patch!==s.patch?c+"patch":"prerelease"}}function requireMinor(){if(hasRequiredMinor)return minor_1;hasRequiredMinor=1;const e=requireSemver$1();return minor_1=(r,t)=>new e(r,t).minor}function requirePatch(){if(hasRequiredPatch)return patch_1;hasRequiredPatch=1;const e=requireSemver$1();return patch_1=(r,t)=>new e(r,t).patch}function requirePrerelease(){if(hasRequiredPrerelease)return prerelease_1;hasRequiredPrerelease=1;const e=requireParse$1();return prerelease_1=(r,t)=>{const i=e(r,t);return i&&i.prerelease.length?i.prerelease:null}}function requireRcompare(){if(hasRequiredRcompare)return rcompare_1;hasRequiredRcompare=1;const e=requireCompare();return rcompare_1=(r,t,i)=>e(t,r,i)}function requireCompareLoose(){if(hasRequiredCompareLoose)return compareLoose_1;hasRequiredCompareLoose=1;const e=requireCompare();return compareLoose_1=(r,t)=>e(r,t,!0)}function requireCompareBuild(){if(hasRequiredCompareBuild)return compareBuild_1;hasRequiredCompareBuild=1;const e=requireSemver$1();return compareBuild_1=(r,t,i)=>{const s=new e(r,i),n=new e(t,i);return s.compare(n)||s.compareBuild(n)}}function requireSort(){if(hasRequiredSort)return sort_1;hasRequiredSort=1;const e=requireCompareBuild();return sort_1=(r,t)=>r.sort(((r,i)=>e(r,i,t)))}function requireRsort(){if(hasRequiredRsort)return rsort_1;hasRequiredRsort=1;const e=requireCompareBuild();return rsort_1=(r,t)=>r.sort(((r,i)=>e(i,r,t)))}function requireToComparators(){if(hasRequiredToComparators)return toComparators_1;hasRequiredToComparators=1;const e=requireRange();return toComparators_1=(r,t)=>new e(r,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}function requireMaxSatisfying(){if(hasRequiredMaxSatisfying)return maxSatisfying_1;hasRequiredMaxSatisfying=1;const e=requireSemver$1(),r=requireRange();return maxSatisfying_1=(t,i,s)=>{let n=null,a=null,o=null;try{o=new r(i,s)}catch(h){return null}return t.forEach((r=>{o.test(r)&&(n&&-1!==a.compare(r)||(n=r,a=new e(n,s)))})),n}}function requireMinSatisfying(){if(hasRequiredMinSatisfying)return minSatisfying_1;hasRequiredMinSatisfying=1;const e=requireSemver$1(),r=requireRange();return minSatisfying_1=(t,i,s)=>{let n=null,a=null,o=null;try{o=new r(i,s)}catch(h){return null}return t.forEach((r=>{o.test(r)&&(n&&1!==a.compare(r)||(n=r,a=new e(n,s)))})),n}}function requireMinVersion(){if(hasRequiredMinVersion)return minVersion_1;hasRequiredMinVersion=1;const e=requireSemver$1(),r=requireRange(),t=requireGt();return minVersion_1=(i,s)=>{i=new r(i,s);let n=new e("0.0.0");if(i.test(n))return n;if(n=new e("0.0.0-0"),i.test(n))return n;n=null;for(let r=0;i.set.length>r;++r){let s=null;i.set[r].forEach((r=>{const i=new e(r.semver.version);switch(r.operator){case">":0===i.prerelease.length?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":s&&!t(i,s)||(s=i);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+r.operator)}})),!s||n&&!t(n,s)||(n=s)}return n&&i.test(n)?n:null}}function requireValid(){if(hasRequiredValid)return valid;hasRequiredValid=1;const e=requireRange();return valid=(r,t)=>{try{return new e(r,t).range||"*"}catch(i){return null}}}function requireOutside(){if(hasRequiredOutside)return outside_1;hasRequiredOutside=1;const e=requireSemver$1(),r=requireComparator(),{ANY:t}=r,i=requireRange(),s=requireSatisfies(),n=requireGt(),a=requireLt(),o=requireLte(),h=requireGte();return outside_1=(u,c,l,p)=>{let f,m,d,_,R;switch(u=new e(u,p),c=new i(c,p),l){case">":f=n,m=o,d=a,_=">",R=">=";break;case"<":f=a,m=h,d=n,_="<",R="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(u,c,p))return!1;for(let e=0;c.set.length>e;++e){let i=null,s=null;if(c.set[e].forEach((e=>{e.semver===t&&(e=new r(">=0.0.0")),i=i||e,s=s||e,f(e.semver,i.semver,p)?i=e:d(e.semver,s.semver,p)&&(s=e)})),i.operator===_||i.operator===R)return!1;if((!s.operator||s.operator===_)&&m(u,s.semver))return!1;if(s.operator===R&&d(u,s.semver))return!1}return!0}}function requireGtr(){if(hasRequiredGtr)return gtr_1;hasRequiredGtr=1;const e=requireOutside();return gtr_1=(r,t,i)=>e(r,t,">",i)}function requireLtr(){if(hasRequiredLtr)return ltr_1;hasRequiredLtr=1;const e=requireOutside();return ltr_1=(r,t,i)=>e(r,t,"<",i)}function requireIntersects(){if(hasRequiredIntersects)return intersects_1;hasRequiredIntersects=1;const e=requireRange();return intersects_1=(r,t,i)=>(r=new e(r,i),t=new e(t,i),r.intersects(t,i))}function requireSimplify(){if(hasRequiredSimplify)return simplify;hasRequiredSimplify=1;const e=requireSatisfies(),r=requireCompare();return simplify=(t,i,s)=>{const n=[];let a=null,o=null;const h=t.sort(((e,t)=>r(e,t,s)));for(const r of h)e(r,i,s)?(o=r,a||(a=r)):(o&&n.push([a,o]),o=null,a=null);a&&n.push([a,null]);const u=[];for(const[e,r]of n)u.push(e===r?e:r||e!==h[0]?r?e===h[0]?"<="+r:`${e} - ${r}`:">="+e:"*");const c=u.join(" || ");return("string"==typeof i.raw?i.raw:i+"").length>c.length?c:i}}function requireSubset(){if(hasRequiredSubset)return subset_1;hasRequiredSubset=1;const e=requireRange(),r=requireComparator(),{ANY:t}=r,i=requireSatisfies(),s=requireCompare(),n=[new r(">=0.0.0-0")],a=[new r(">=0.0.0")],o=(e,r,o)=>{if(e===r)return!0;if(1===e.length&&e[0].semver===t){if(1===r.length&&r[0].semver===t)return!0;e=o.includePrerelease?n:a}if(1===r.length&&r[0].semver===t){if(o.includePrerelease)return!0;r=a}const c=new Set;let l,p,f,m,d,_,R;for(const t of e)">"===t.operator||">="===t.operator?l=h(l,t,o):"<"===t.operator||"<="===t.operator?p=u(p,t,o):c.add(t.semver);if(c.size>1)return null;if(l&&p){if(f=s(l.semver,p.semver,o),f>0)return null;if(0===f&&(">="!==l.operator||"<="!==p.operator))return null}for(const t of c){if(l&&!i(t,l+"",o))return null;if(p&&!i(t,p+"",o))return null;for(const e of r)if(!i(t,e+"",o))return!1;return!0}let y=!(!p||o.includePrerelease||!p.semver.prerelease.length)&&p.semver,C=!(!l||o.includePrerelease||!l.semver.prerelease.length)&&l.semver;y&&1===y.prerelease.length&&"<"===p.operator&&0===y.prerelease[0]&&(y=!1);for(const t of r){if(R=R||">"===t.operator||">="===t.operator,_=_||"<"===t.operator||"<="===t.operator,l)if(C&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===C.major&&t.semver.minor===C.minor&&t.semver.patch===C.patch&&(C=!1),">"===t.operator||">="===t.operator){if(m=h(l,t,o),m===t&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,t+"",o))return!1;if(p)if(y&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===y.major&&t.semver.minor===y.minor&&t.semver.patch===y.patch&&(y=!1),"<"===t.operator||"<="===t.operator){if(d=u(p,t,o),d===t&&d!==p)return!1}else if("<="===p.operator&&!i(p.semver,t+"",o))return!1;if(!t.operator&&(p||l)&&0!==f)return!1}return!(l&&_&&!p&&0!==f||p&&R&&!l&&0!==f||C||y)},h=(e,r,t)=>{if(!e)return r;const i=s(e.semver,r.semver,t);return i>0?e:0>i||">"===r.operator&&">="===e.operator?r:e},u=(e,r,t)=>{if(!e)return r;const i=s(e.semver,r.semver,t);return 0>i?e:i>0||"<"===r.operator&&"<="===e.operator?r:e};return subset_1=(r,t,i={})=>{if(r===t)return!0;r=new e(r,i),t=new e(t,i);let s=!1;e:for(const e of r.set){for(const r of t.set){const t=o(e,r,i);if(s=s||null!==t,t)continue e}if(s)return!1}return!0}}function requireSemver(){if(hasRequiredSemver)return semver;hasRequiredSemver=1;const e=requireRe(),r=requireConstants(),t=requireSemver$1(),i=requireIdentifiers(),s=requireParse$1(),n=requireValid$1(),a=requireClean(),o=requireInc(),h=requireDiff(),u=requireMajor(),c=requireMinor(),l=requirePatch(),p=requirePrerelease(),f=requireCompare(),m=requireRcompare(),d=requireCompareLoose(),_=requireCompareBuild(),R=requireSort(),y=requireRsort(),C=requireGt(),E=requireLt(),T=requireEq(),g=requireNeq(),w=requireGte(),x=requireLte(),A=requireCmp(),S=requireCoerce(),P=requireComparator(),b=requireRange(),I=requireSatisfies(),N=requireToComparators(),H=requireMaxSatisfying(),O=requireMinSatisfying(),q=requireMinVersion(),L=requireValid(),v=requireOutside(),D=requireGtr(),M=requireLtr(),U=requireIntersects(),$=requireSimplify(),F=requireSubset();return semver={parse:s,valid:n,clean:a,inc:o,diff:h,major:u,minor:c,patch:l,prerelease:p,compare:f,rcompare:m,compareLoose:d,compareBuild:_,sort:R,rsort:y,gt:C,lt:E,eq:T,neq:g,gte:w,lte:x,cmp:A,coerce:S,Comparator:P,Range:b,satisfies:I,toComparators:N,maxSatisfying:H,minSatisfying:O,minVersion:q,validRange:L,outside:v,gtr:D,ltr:M,intersects:U,simplifyRange:$,subset:F,SemVer:t,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}}function requireParser(){if(hasRequiredParser)return parser;hasRequiredParser=1;const e=1114112;class r extends Error{constructor(e,t,i){super("[ParserError] "+e,t,i),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,r)}}class t{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class i{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 t(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let r;for(this._buf=e+"",this.ii=-1,this.char=-1;!1===r||this.nextChar();)r=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._buf.length>this.ii}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){let r;this.char=e;do{r=this.state.parser,this.runOne()}while(this.state.parser!==r);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if("function"!=typeof e)throw new r("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,r){r&&this.next(r),this.stack.push(this.state),this.state=new t(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(0===this.stack.length)throw this.error(new r("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===e)throw this.error(new r("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 r("Must declare a parseStart method")}}return i.END=e,i.Error=r,parser=i}function requireCreateDatetime(){return hasRequiredCreateDatetime?createDatetime:(hasRequiredCreateDatetime=1,createDatetime=e=>{const r=new Date(e);if(isNaN(r))throw new TypeError("Invalid Datetime");return r})}function requireFormatNum(){return hasRequiredFormatNum?formatNum:(hasRequiredFormatNum=1,formatNum=(e,r)=>{for(r+="";e>r.length;)r="0"+r;return r})}function requireCreateDatetimeFloat(){if(hasRequiredCreateDatetimeFloat)return createDatetimeFloat;hasRequiredCreateDatetimeFloat=1;const e=requireFormatNum();class r extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${e(2,this.getUTCMonth()+1)}-${e(2,this.getUTCDate())}T${e(2,this.getUTCHours())}:${e(2,this.getUTCMinutes())}:${e(2,this.getUTCSeconds())}.${e(3,this.getUTCMilliseconds())}`}}return createDatetimeFloat=e=>{const t=new r(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}}function requireCreateDate(){if(hasRequiredCreateDate)return createDate;hasRequiredCreateDate=1;const e=requireFormatNum(),r=commonjsGlobal.Date;class t extends r{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${e(2,this.getUTCMonth()+1)}-${e(2,this.getUTCDate())}`}}return createDate=e=>{const r=new t(e);if(isNaN(r))throw new TypeError("Invalid Datetime");return r}}function requireCreateTime(){if(hasRequiredCreateTime)return createTime;hasRequiredCreateTime=1;const e=requireFormatNum();class r extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${e(2,this.getUTCHours())}:${e(2,this.getUTCMinutes())}:${e(2,this.getUTCSeconds())}.${e(3,this.getUTCMilliseconds())}`}}return createTime=e=>{const t=new r(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}}function requireTomlParser(){function isDigit(e){return e>=CHAR_0&&CHAR_9>=e}function isHexit(e){return e>=CHAR_A&&CHAR_F>=e||e>=CHAR_a&&CHAR_f>=e||e>=CHAR_0&&CHAR_9>=e}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&CHAR_7>=e}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&CHAR_Z>=e||e>=CHAR_a&&CHAR_z>=e||e>=CHAR_0&&CHAR_9>=e||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&CHAR_Z>=e||e>=CHAR_a&&CHAR_z>=e||e>=CHAR_0&&CHAR_9>=e||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function hasKey(e,r){return!!hasOwnProperty.call(e,r)||("__proto__"===r&&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 r=Number(e);return Object.is(r,-0)&&(r=0),commonjsGlobal.BigInt&&!Number.isSafeInteger(r)?new BoxedBigInt(e):Object.defineProperties(new Number(r),{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){const r=typeof e;if("object"===r){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 r}function makeParserClass(e){return class 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);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 r=this.ctx,t=e.key.pop();for(let i of e.key){if(hasKey(r,i)&&!isTable(r[i]))throw this.error(new TomlError("Can't redefine existing key"));r=r[i]=r[i]||Table()}if(hasKey(r,t))throw this.error(new TomlError("Can't redefine existing key"));return r[_declared]=!0,r[t]=isInteger(e.value)||isFloat(e.value)?e.value.valueOf():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();if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I)throw this.errorControlCharIn("comments")}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]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}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]))throw this.error(new TomlError("Can't redefine an existing key"));{const r=Table();this.ctx[e].push(r),this.ctx=r}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"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}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);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);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.return("-"===this.state.buf?-1/0: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)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}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||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I)throw this.errorControlCharIn("strings");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||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings");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.next(this.parseLiteralMultiEnd3):(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd3(){return this.char===CHAR_APOS?(this.state.buf+="'",this.next(this.parseLiteralMultiEnd4)):this.returnNow()}parseLiteralMultiEnd4(){return this.char===CHAR_APOS?(this.state.buf+="'",this.return()):this.returnNow()}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"));if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I)throw this.errorControlCharIn("strings");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"));if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings");this.consume()}while(this.nextChar())}errorControlCharIn(e){let r="\\u00";return 16>this.char&&(r+="0"),r+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in ${e}, use ${r} 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.next(this.parseMultiEnd3):(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEnd3(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.next(this.parseMultiEnd4)):this.returnNow()}parseMultiEnd4(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.return()):this.returnNow()}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{const r=parseInt(e,16);if(r>=SURROGATE_FIRST&&SURROGATE_LAST>=r)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(r))}catch(r){throw this.error(TomlError.wrap(r))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}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)){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);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}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(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):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)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(4>this.state.buf.length){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(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(4>this.state.buf.length)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(2>this.state.buf.length)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))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(2>this.state.buf.length)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(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(2>this.state.buf.length)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))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(this.state.buf.length>=2||!isDigit(this.char)){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(2>this.state.buf.length)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)){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}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){return this.state.resultArr||(this.state.resultArr=InlineList(tomlType(e))),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 r=this.state.resultTable,t=e.key.pop();for(let i of e.key){if(hasKey(r,i)&&(!isTable(r[i])||r[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));r=r[i]=r[i]||Table()}if(hasKey(r,t))throw this.error(new TomlError("Can't redefine existing key"));return r[t]=isInteger(e.value)||isFloat(e.value)?e.value.valueOf():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.parseInlineTablePostComma);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTablePostComma(){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)throw this.error(new TomlError("Empty elements in inline tables are not permitted"));if(this.char===CHAR_RCUB)throw this.error(new TomlError("Trailing commas in inline tables are not permitted"));return this.goto(this.parseInlineTable)}}}if(hasRequiredTomlParser)return tomlParser.exports;hasRequiredTomlParser=1,tomlParser.exports=makeParserClass(requireParser()),tomlParser.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=>{const r=new TomlError(e.message);return r.code=e.code,r.wrapped=e,r},tomlParser.exports.TomlError=TomlError;const createDateTime=requireCreateDatetime(),createDateTimeFloat=requireCreateDatetimeFloat(),createDate=requireCreateDate(),createTime=requireCreateTime(),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]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"},_type=Symbol(),_declared=Symbol(),hasOwnProperty={}.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();let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(_){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=commonjsGlobal.BigInt.asIntN(64,e)}catch(_){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return this.value+""}[_inspect](){return`[BigInt: ${""+this}]}`}valueOf(){return this.value}}const INTEGER=Symbol(),FLOAT=Symbol();return tomlParser.exports}function requireParsePrettyError(){return hasRequiredParsePrettyError?parsePrettyError:(hasRequiredParsePrettyError=1,parsePrettyError=function(e,r){if(null==e.pos||null==e.line)return e;let t=e.message;if(t+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,r&&r.split){const i=r.split(/\n/),s=(Math.min(i.length,e.line+3)+"").length;let n=" ";for(;s>n.length;)n+=" ";for(let r=Math.max(0,e.line-1);Math.min(i.length,e.line+2)>r;++r){let a=r+1+"";if(s>a.length&&(a=" "+a),e.line===r){t+=a+"> "+i[r]+"\n",t+=n+" ";for(let r=0;e.col>r;++r)t+=" ";t+="^\n"}else t+=a+": "+i[r]+"\n"}}return e.message=t+"\n",e})}function requireParseString(){if(hasRequiredParseString)return parseString_1;hasRequiredParseString=1,parseString_1=function(t){commonjsGlobal.Buffer&&commonjsGlobal.Buffer.isBuffer(t)&&(t=t.toString("utf8"));const i=new e;try{return i.parse(t),i.finish()}catch(s){throw r(s,t)}};const e=requireTomlParser(),r=requireParsePrettyError();return parseString_1}function requireParseAsync(){if(hasRequiredParseAsync)return parseAsync_1;hasRequiredParseAsync=1,parseAsync_1=function(t,i){function s(e,i,n,o){if(e>=t.length)try{return n(a.finish())}catch(h){return o(r(h,t))}try{a.parse(t.slice(e,e+i)),setImmediate(s,e+i,i,n,o)}catch(h){o(r(h,t))}}i||(i={});const n=i.blocksize||40960,a=new e;return new Promise(((e,r)=>{setImmediate(s,0,n,e,r)}))};const e=requireTomlParser(),r=requireParsePrettyError();return parseAsync_1}function requireParseStream(){if(hasRequiredParseStream)return parseStream_1;hasRequiredParseStream=1,parseStream_1=function(t){return t?function(e){const t=new r;return e.setEncoding("utf8"),new Promise(((r,i)=>{function s(){if(o=!0,!a)try{r(t.finish())}catch(e){i(e)}}function n(e){h=!0,i(e)}let a,o=!1,h=!1;e.once("end",s),e.once("error",n),function r(){let i;for(a=!0;null!==(i=e.read());)try{t.parse(i)}catch(u){return n(u)}if(a=!1,o)return s();h||e.once("readable",r)}()}))}(t):function(){const t=new r;return new e.Transform({objectMode:!0,transform(e,r,i){try{t.parse(e.toString(r))}catch(s){this.emit("error",s)}i()},flush(e){try{this.push(t.finish())}catch(r){this.emit("error",r)}e()}})}()};const e=require$$0$1,r=requireTomlParser();return parseStream_1}function requireParse(){return hasRequiredParse||(hasRequiredParse=1,parse.exports=requireParseString(),parse.exports.async=requireParseAsync(),parse.exports.stream=requireParseStream(),parse.exports.prettyError=requireParsePrettyError()),parse.exports}function requireStringify(){function e(e){return Error("Can only stringify objects, not "+e)}function r(e){return Object.keys(e).filter((r=>s(e[r])))}function t(e){let r=Array.isArray(e)?[]:{}.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let t of Object.keys(e))r[t]=e[t]&&"function"==typeof e[t].toJSON&&!("toISOString"in e[t])?e[t].toJSON():e[t];return r}function i(o,h,c){let l,p;l=r(c=t(c)),p=function(e){return Object.keys(e).filter((r=>!s(e[r])))}(c);const f=[],m=h||"";l.forEach((e=>{var r=n(c[e]);"undefined"!==r&&"null"!==r&&f.push(m+a(e)+" = "+u(c[e],!0))})),f.length>0&&f.push("");const d=o&&l.length>0?h+" ":"";return p.forEach((s=>{f.push(function(s,o,h,u){const c=n(u);if("array"===c)return function(r,s,o,h){const u=n((h=t(h))[0]);if("table"!==u)throw e(u);const c=r+a(o);let l="";return h.forEach((e=>{l.length>0&&(l+="\n"),l+=s+"[["+c+"]]\n",l+=i(c+".",s,e)})),l}(s,o,h,u);if("table"===c)return function(e,t,s,n){const o=e+a(s);let h="";return r(n).length>0&&(h+=t+"["+o+"]\n"),h+i(o+".",t,n)}(s,o,h,u);throw e(c)}(o,d,s,c[s]))})),f.join("\n")}function s(e){switch(n(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"!==n(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function n(e){return void 0===e?"undefined":null===e?"null":"bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0)?"integer":"number"==typeof e?"float":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function a(e){const r=e+"";return/^[-A-Za-z0-9_]+$/.test(r)?r:o(r)}function o(e){return'"'+h(e).replace(/"/g,'\\"')+'"'}function h(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"+function(e,r){for(;4>r.length;)r="0"+r;return r}(0,e.codePointAt(0).toString(16))))}function u(e,r){let t=n(e);return"string"===t&&(r&&/\n/.test(e)?t="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(t="string-literal")),c(e,t)}function c(r,i){switch(i||(i=n(r)),i){case"string-multiline":return function(e){let r=e.split(/\n/).map((e=>h(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===r.slice(-1)&&(r+="\\\n"),'"""\n'+r+'"""'}(r);case"string":return o(r);case"string-literal":return"'"+r+"'";case"integer":return l(r);case"float":return function(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";const[r,t]=(e+"").split(".");return l(r)+"."+t}(r);case"boolean":return function(e){return e+""}(r);case"datetime":return function(e){return e.toISOString()}(r);case"array":return function(e){let r="[";const i=(e=t(e)).map((e=>c(e)));return i.join(", ").length>60||/\n/.test(i)?r+="\n "+i.join(",\n ")+"\n":r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]"}(r.filter((e=>"null"!==n(e)&&"undefined"!==n(e)&&"nan"!==n(e))));case"table":return function(e){e=t(e);const r=[];return Object.keys(e).forEach((t=>{r.push(a(t)+" = "+u(e[t],!1))})),"{ "+r.join(", ")+(r.length>0?" ":"")+"}"}(r);default:throw e(i)}}function l(e){return(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,"_")}return hasRequiredStringify||(hasRequiredStringify=1,stringify.exports=function(r){if(null===r)throw e("null");if(void 0===r)throw e("undefined");if("object"!=typeof r)throw e(typeof r);if("function"==typeof r.toJSON&&(r=r.toJSON()),null==r)return null;const t=n(r);if("table"!==t)throw e(t);return i("","",r)},stringify.exports.value=c),stringify.exports}function requireToml(){return hasRequiredToml||(hasRequiredToml=1,toml.parse=requireParse(),toml.stringify=requireStringify()),toml}function createSymlinkInFolder(e,r,t,i=!1){const s