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

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

//# sourceMappingURL=node_modules_confbox_dist_toml_mjs_01s7bxb._.js.map