"use strict";exports.id=2750,exports.ids=[2750],exports.modules={52750:(a,b,c)=>{c.d(b,{M:()=>C,q:()=>D});let d=/^(?:( )+|\t+)/,e="space";function f(a,b){let c=new Map,f=0,g,h;for(let i of a.split(/\n/g)){if(!i)continue;let a=i.match(d);if(null===a)f=0,g="";else{let d=a[0].length,i=a[1]?e:"tab";if(b&&i===e&&1===d)continue;i!==g&&(f=0),g=i;let j=1,k=0,l=d-f;if(f=d,0===l)j=0,k=1;else{let a=Math.abs(l);if(b&&i===e&&1===a)continue;h=(i===e?"s":"t")+String(a)}let m=c.get(h);c.set(h,void 0===m?[1,0]:[m[0]+j,m[1]+k])}}return c}let g=Symbol.for("__confbox_fmt__"),h=/^(\s+)/,i=/(\s+)$/;var j=class extends Error{line;column;codeblock;constructor(a,b){let[c,d]=function(a,b){let c=a.slice(0,b).split(/\r\n|\n|\r/g);return[c.length,c.pop().length+1]}(b.toml,b.ptr),e=function(a,b,c){let d=a.split(/\r\n|\n|\r/g),e="",f=(0|Math.log10(b+1))+1;for(let a=b-1;a<=b+1;a++){let g=d[a-1];g&&(e+=a.toString().padEnd(f," "),e+=":  ",e+=g,e+=`
`,a===b&&(e+=" ".repeat(f+c+2),e+=`^
`))}return e}(b.toml,c,d);super(`Invalid TOML document: ${a}

${e}`,b),this.line=c,this.column=d,this.codeblock=e}};function k(a,b=0,c=a.length){let d=a.indexOf(`
`,b);return a[d-1]===`\r`&&d--,d<=c?d:-1}function l(a,b){for(let c=b;c<a.length;c++){let d=a[c];if(d===`
`)return c;if(d===`\r`&&a[c+1]===`
`)return c+1;if(d<" "&&"	"!==d||""===d)throw new j("control characters are not allowed in comments",{toml:a,ptr:b})}return a.length}function m(a,b,c,d){let e;for(;" "===(e=a[b])||"	"===e||!c&&(e===`
`||e===`\r`&&a[b+1]===`
`);)b++;return d||"#"!==e?b:m(a,l(a,b),c)}function n(a,b){let c=a[b],d=c===a[b+1]&&a[b+1]===a[b+2]?a.slice(b,b+3):c;b+=d.length-1;do b=a.indexOf(d,++b);while(b>-1&&"'"!==c&&function(a,b){let c=0;for(;"\\"===a[b-++c];);return--c&&c%2}(a,b));return b>-1&&(b+=d.length,d.length>1&&(a[b]===c&&b++,a[b]===c&&b++)),b}let o=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var p=class a extends Date{#a=!1;#b=!1;#c=null;constructor(a){let b=!0,c=!0,d="Z";if("string"==typeof a){let e=a.match(o);e?(e[1]||(b=!1,a=`0000-01-01T${a}`),(c=!!e[2])&&" "===a[10]&&(a=a.replace(" ","T")),e[2]&&+e[2]>23?a="":(d=e[3]||null,a=a.toUpperCase(),!d&&c&&(a+="Z"))):a=""}super(a),isNaN(this.getTime())||(this.#a=b,this.#b=c,this.#c=d)}isDateTime(){return this.#a&&this.#b}isLocal(){return!this.#a||!this.#b||!this.#c}isDate(){return this.#a&&!this.#b}isTime(){return this.#b&&!this.#a}isValid(){return this.#a||this.#b}toISOString(){let a=super.toISOString();if(this.isDate())return a.slice(0,10);if(this.isTime())return a.slice(11,23);if(null===this.#c)return a.slice(0,-1);if("Z"===this.#c)return a;let b=60*this.#c.slice(1,3)+ +this.#c.slice(4,6);return b="-"===this.#c[0]?b:-b,new Date(this.getTime()-6e4*b).toISOString().slice(0,-1)+this.#c}static wrapAsOffsetDateTime(b,c="Z"){let d=new a(b);return d.#c=c,d}static wrapAsLocalDateTime(b){let c=new a(b);return c.#c=null,c}static wrapAsLocalDate(b){let c=new a(b);return c.#b=!1,c.#c=null,c}static wrapAsLocalTime(b){let c=new a(b);return c.#a=!1,c.#c=null,c}};let q=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,r=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,s=/^[+-]?0[0-9_]/,t=/^[0-9a-f]{2,8}$/i,u={b:"\b",t:"	",n:`
`,f:"\f",r:`\r`,e:"\x1b",'"':'"',"\\":"\\"};function v(a,b=0,c=a.length){let d="'"===a[b],e=a[b++]===a[b]&&a[b]===a[b+1];e&&(c-=2,a[b+=2]===`\r`&&b++,a[b]===`
`&&b++);let f=0,g,h="",i=b;for(;b<c-1;){let c=a[b++];if(c===`
`||c===`\r`&&a[b]===`
`){if(!e)throw new j("newlines are not allowed in strings",{toml:a,ptr:b-1})}else if(c<" "&&"	"!==c||""===c)throw new j("control characters are not allowed in strings",{toml:a,ptr:b-1});if(g){if(g=!1,"x"===c||"u"===c||"U"===c){let d=a.slice(b,b+="x"===c?2:"u"===c?4:8);if(!t.test(d))throw new j("invalid unicode escape",{toml:a,ptr:f});try{h+=String.fromCodePoint(parseInt(d,16))}catch{throw new j("invalid unicode escape",{toml:a,ptr:f})}}else if(e&&(c===`
`||" "===c||"	"===c||c===`\r`)){if(b=m(a,b-1,!0),a[b]!==`
`&&a[b]!==`\r`)throw new j("invalid escape: only line-ending whitespace may be escaped",{toml:a,ptr:f});b=m(a,b)}else if(c in u)h+=u[c];else throw new j("unrecognized escape sequence",{toml:a,ptr:f});i=b}else d||"\\"!==c||(f=b-1,g=!0,h+=a.slice(i,f))}return h+a.slice(i,c-1)}let w=/^[a-zA-Z0-9-_]+[ \t]*$/;function x(a,b,c="="){let d=b-1,e=[],f=a.indexOf(c,b);if(f<0)throw new j("incomplete key-value: cannot find end of key",{toml:a,ptr:b});do{let g=a[b=++d];if(" "!==g&&"	"!==g)if('"'===g||"'"===g){if(g===a[b+1]&&g===a[b+2])throw new j("multiline strings are not allowed in keys",{toml:a,ptr:b});let h=n(a,b);if(h<0)throw new j("unfinished string encountered",{toml:a,ptr:b});d=a.indexOf(".",h);let i=a.slice(h,d<0||d>f?f:d),l=k(i);if(l>-1)throw new j("newlines are not allowed in keys",{toml:a,ptr:b+d+l});if(i.trimStart())throw new j("found extra tokens after the string part",{toml:a,ptr:h});if(f<h&&(f=a.indexOf(c,h))<0)throw new j("incomplete key-value: cannot find end of key",{toml:a,ptr:b});e.push(v(a,b,h))}else{d=a.indexOf(".",b);let c=a.slice(b,d<0||d>f?f:d);if(!w.test(c))throw new j("only letter, numbers, dashes and underscores are allowed in keys",{toml:a,ptr:b});e.push(c.trimEnd())}}while(d+1&&d<f);return[e,m(a,f+1,!0,!0)]}function y(a,b,c,d){let e=b,f=c,g,h=!1,i;for(let b=0;b<a.length;b++){if(b){if(e=h?e[g]:e[g]={},f=(i=f[g]).c,0===d&&(1===i.t||2===i.t))return null;if(2===i.t){let a=e.length-1;e=e[a],f=f[a].c}}if((h=Object.hasOwn(e,g=a[b]))&&f[g]?.t===0&&f[g]?.d)return null;h||("__proto__"===g&&(Object.defineProperty(e,g,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(f,g,{enumerable:!0,configurable:!0,writable:!0})),f[g]={t:b<a.length-1&&2===d?3:d,d:!1,i:0,c:{}})}if((i=f[g]).t!==d&&(1!==d||3!==i.t)||(2===d&&(i.d||(i.d=!0,e[g]=[]),e[g].push(e={}),i.c[i.i++]=i={t:1,d:!1,i:0,c:{}}),i.d))return null;if(i.d=!0,1===d)e=h?e[g]:e[g]={};else if(0===d&&h)return null;return[g,e,i.c]}let z=/^[a-z0-9-_]+$/i;function A(a){let b=typeof a;if("object"===b){if(Array.isArray(a))return"array";if(a instanceof Date)return"date"}return b}function B(a){return JSON.stringify(a).replace(/\x7f/g,"\\u007f")}function C(a){var b;let c=function(a,{maxDepth:b=1e3,integersAsBigInt:c}={}){let d={},e={},f=d,g=e;for(let h=m(a,0);h<a.length;){if("["===a[h]){let b="["===a[++h],c=x(a,h+=+b,"]");if(b){if("]"!==a[c[1]-1])throw new j("expected end of table declaration",{toml:a,ptr:c[1]-1});c[1]++}let i=y(c[0],d,e,b?2:1);if(!i)throw new j("trying to redefine an already defined table or value",{toml:a,ptr:h});g=i[2],f=i[1],h=c[1]}else{let d=x(a,h),e=y(d[0],f,g,0);if(!e)throw new j("trying to redefine an already defined table or value",{toml:a,ptr:h});let i=function a(b,c,d,e,f){var g;let h,i,o;if(0===e)throw new j("document contains excessively nested structures. aborting.",{toml:b,ptr:c});let t=b[c];if("["===t||"{"===t){let[g,h]="["===t?function(b,c,d,e){let f=[],g;for(c++;"]"!==(g=b[c++])&&g;)if(","===g)throw new j("expected value, found comma",{toml:b,ptr:c-1});else if("#"===g)c=l(b,c);else if(" "!==g&&"	"!==g&&g!==`
`&&g!==`\r`){let g=a(b,c-1,"]",d-1,e);f.push(g[0]),c=g[1]}if(!g)throw new j("unfinished array encountered",{toml:b,ptr:c});return[f,c]}(b,c,e,f):function(b,c,d,e){let f={},g=new Set,h;for(c++;"}"!==(h=b[c++])&&h;)if(","===h)throw new j("expected value, found comma",{toml:b,ptr:c-1});else if("#"===h)c=l(b,c);else if(" "!==h&&"	"!==h&&h!==`
`&&h!==`\r`){let h,i=f,k=!1,[l,m]=x(b,c-1);for(let a=0;a<l.length;a++){if(a&&(i=k?i[h]:i[h]={}),(k=Object.hasOwn(i,h=l[a]))&&("object"!=typeof i[h]||g.has(i[h])))throw new j("trying to redefine an already defined value",{toml:b,ptr:c});k||"__proto__"!==h||Object.defineProperty(i,h,{enumerable:!0,configurable:!0,writable:!0})}if(k)throw new j("trying to redefine an already defined value",{toml:b,ptr:c});let[n,o]=a(b,m,"}",d-1,e);g.add(n),i[h]=n,c=o}if(!h)throw new j("unfinished table encountered",{toml:b,ptr:c});return[f,c]}(b,c,e,f);if(d){if(h=m(b,h),","===b[h])h++;else if(b[h]!==d)throw new j("expected comma or end of structure",{toml:b,ptr:h})}return[g,h]}if('"'===t||"'"===t){h=n(b,c);let a=v(b,c,h);if(d){if(h=m(b,h),b[h]&&","!==b[h]&&b[h]!==d&&b[h]!==`
`&&b[h]!==`\r`)throw new j("unexpected character encountered",{toml:b,ptr:h});h+=+(","===b[h])}return[a,h]}h=function(a,b,c,d=!1){if(!c)return(b=k(a,b))<0?a.length:b;for(let e=b;e<a.length;e++){let b=a[e];if("#"===b)e=k(a,e);else if(","===b)return e+1;else if(b===c||d&&(b===`
`||b===`\r`&&a[e+1]===`
`))return e}throw new j("cannot find end of structure",{toml:a,ptr:b})}(b,c,d);let u=(g=h-(","===b[h-1]),(o=(i=b.slice(c,g)).indexOf("#"))>-1&&(l(b,o),i=i.slice(0,o)),[i.trimEnd(),o]);if(!u[0])throw new j("incomplete key-value declaration: no value specified",{toml:b,ptr:c});return d&&u[1]>-1&&(h=m(b,c+u[1]),h+=+(","===b[h])),[function(a,b,c,d){if("true"===a)return!0;if("false"===a)return!1;if("-inf"===a)return-1/0;if("inf"===a||"+inf"===a)return 1/0;if("nan"===a||"+nan"===a||"-nan"===a)return NaN;if("-0"===a)return d?0n:0;let e=q.test(a);if(e||r.test(a)){if(s.test(a))throw new j("leading zeroes are not allowed",{toml:b,ptr:c});let f=+(a=a.replace(/_/g,""));if(isNaN(f))throw new j("invalid number",{toml:b,ptr:c});if(e){if((e=!Number.isSafeInteger(f))&&!d)throw new j("integer value cannot be represented losslessly",{toml:b,ptr:c});(e||!0===d)&&(f=BigInt(a))}return f}let f=new p(a);if(!f.isValid())throw new j("invalid value",{toml:b,ptr:c});return f}(u[0],b,c,f),h]}(a,d[1],void 0,b,c);e[1][e[0]]=i[0],h=i[1]}if(h=m(a,h,!0),a[h]&&a[h]!==`
`&&a[h]!==`\r`)throw new j("each key-value declaration must be followed by an end-of-line",{toml:a,ptr:h});h=m(a,h)}return d}(a);return b={preserveIndentation:!1},c&&"object"==typeof c&&Object.defineProperty(c,g,{enumerable:!1,configurable:!0,writable:!0,value:function(a,b={}){return{sample:void 0===b.indent&&!1!==b.preserveIndentation&&a.slice(0,b?.sampleSize||1024),whiteSpace:!1===b.preserveWhitespace?void 0:{start:h.exec(a)?.[0]||"",end:i.exec(a)?.[0]||""}}}(a,b)}),c}function D(a){let b=function(a,b){if(!a||"object"!=typeof a||!(g in a))return{indent:b?.indent??2,whitespace:{start:"",end:""}};let c=a[g];return{indent:b?.indent||function(a){var b,c;if("string"!=typeof a)throw TypeError("Expected a string");let d=f(a,!0);0===d.size&&(d=f(a,!1));let g=function(a){let b,c=0,d=0;for(let[e,[f,g]]of a)(f>c||f===c&&g>d)&&(c=f,d=g,b=e);return b}(d),h,i=0,j="";return void 0!==g&&({type:h,amount:i}={type:"s"===g[0]?e:"tab",amount:Number(g.slice(1))},b=h,c=i,j=(b===e?" ":"	").repeat(c)),{amount:i,type:h,indent:j}}(c.sample||"").indent,whitespace:c.whiteSpace||{start:"",end:""}}}(a,{preserveIndentation:!1}),c=function(a,{maxDepth:b=1e3,numbersAsFloat:c=!1}={}){if("object"!==A(a))throw TypeError("stringify can only be called with an object");let d=function a(b,c,d,e,f){if(0===e)throw Error("Could not stringify the object: maximum object depth exceeded");let g="",h="",i=Object.keys(c);for(let b=0;b<i.length;b++){let j=i[b];if(null!==c[j]&&void 0!==c[j]){let b=A(c[j]);if("symbol"===b||"function"===b)throw TypeError(`cannot serialize values of type '${b}'`);let i=z.test(j)?j:B(j);if("array"===b&&function(a){for(let b=0;b<a.length;b++)if("object"!==A(a[b]))return!1;return 0!=a.length}(c[j]))h+=(h&&`
`)+function(b,c,d,e){if(0===d)throw Error("Could not stringify the object: maximum object depth exceeded");let f="";for(let g=0;g<b.length;g++)f+=`${f&&`
`}[[${c}]]
`,f+=a(0,b[g],c,d,e);return f}(c[j],d?`${d}.${i}`:i,e-1,f);else if("object"===b){let b=d?`${d}.${i}`:i;h+=(h&&`
`)+a(b,c[j],b,e-1,f)}else g+=i,g+=" = ",g+=function a(b,c,d,e){if(0===d)throw Error("Could not stringify the object: maximum object depth exceeded");if("number"===c)return isNaN(b)?"nan":b===1/0?"inf":b===-1/0?"-inf":e&&Number.isInteger(b)?b.toFixed(1):b.toString();if("bigint"===c||"boolean"===c)return b.toString();if("string"===c)return B(b);if("date"===c){if(isNaN(b.getTime()))throw TypeError("cannot serialize invalid date");return b.toISOString()}return"object"===c?function(b,c,d){let e=Object.keys(b);if(0===e.length)return"{}";let f="{ ";for(let g=0;g<e.length;g++){let h=e[g];g&&(f+=", "),f+=z.test(h)?h:B(h),f+=" = ",f+=a(b[h],A(b[h]),c-1,d)}return f+" }"}(b,d,e):"array"===c?function(b,c,d){if(0===b.length)return"[]";let e="[ ";for(let f=0;f<b.length;f++){if(f&&(e+=", "),null===b[f]||void 0===b[f])throw TypeError("arrays cannot contain null or undefined values");e+=a(b[f],A(b[f]),c-1,d)}return e+" ]"}(b,d,e):void 0}(c[j],b,e,f),g+=`
`}}return b&&(g||!h)&&(g=g?`[${b}]
${g}`:`[${b}]`),g&&h?`${g}
${h}`:g||h}(0,a,"",b,c);return d[d.length-1]===`
`?d:d+`
`}(a);return b.whitespace.start+c+b.whitespace.end}}};