diff --git a/package.json b/package.json index fdbcb9e..c0679a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jsonic/toml", - "version": "0.4.4", + "version": "0.5.0", "description": "This plugin allows the [Jsonic](https://jsonic.senecajs.org) JSON parser to support toml syntax.", "main": "toml.js", "type": "commonjs", @@ -42,17 +42,17 @@ "LICENSE" ], "devDependencies": { - "@types/jest": "^29.5.3", - "browserify": "^17.0.0", + "@types/jest": "^29.5.14", + "browserify": "^17.0.1", "es-jest": "^2.1.0", - "esbuild": "^0.19.1", - "jest": "^29.6.2", - "prettier": "^3.0.1", + "esbuild": "^0.24.0", + "jest": "^29.7.0", + "prettier": "^3.3.3", "tinyify": "^4.0.0", - "typescript": "^5.1.6", - "@jsonic/jsonic-next": ">=2.12.1" + "typescript": "^5.6.3", + "@jsonic/jsonic-next": ">=2.13.0" }, "peerDependencies": { - "@jsonic/jsonic-next": ">=2.12.1" + "@jsonic/jsonic-next": ">=2.13.0" } } diff --git a/toml.min.js b/toml.min.js index 5392b45..5299403 100644 --- a/toml.min.js +++ b/toml.min.js @@ -1 +1 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JsonicToml=e()}}((function(){var e={exports:{}};(function(t){(function(){!function(n){"object"==typeof e.exports?e.exports=n():("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Jsonic=n()}((function(){var e=function(e){var t;return function(n){return t||e(t={exports:{},parent:n},t.exports),t.exports}},t=e((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modlist=t.findTokenSet=t.values=t.keys=t.omap=t.str=t.prop=t.parserwrap=t.trimstk=t.tokenize=t.srcfmt=t.snip=t.regexp=t.mesc=t.makelog=t.isarr=t.filterRules=t.extract=t.escre=t.errinject=t.errdesc=t.entries=t.defprop=t.deep=t.configure=t.clone=t.clean=t.charset=t.badlex=t.assign=t.S=t.JsonicError=void 0;const l=n({}),i=e=>null==e?[]:Object.keys(e);t.keys=i;const o=e=>null==e?[]:Object.values(e);t.values=o;const s=e=>null==e?[]:Object.entries(e);t.entries=s;const a=(e,...t)=>Object.assign(null==e?{}:e,...t);t.assign=a,t.isarr=e=>Array.isArray(e);const c=Object.defineProperty;t.defprop=c;const u=(e,t)=>Object.entries(e||{}).reduce((e,n)=>{let r=t?t(n):n;void 0===r[0]?delete e[n[0]]:e[r[0]]=r[1];let l=2;for(;void 0!==r[l];)e[r[l]]=r[l+1],l+=2;return e},{});t.omap=u;const d={indent:". ",logindent:" ",space:" ",gap:" ",Object:"Object",Array:"Array",object:"object",string:"string",function:"function",unexpected:"unexpected",map:"map",list:"list",elem:"elem",pair:"pair",val:"val",node:"node",no_re_flags:r.EMPTY,unprintable:"unprintable",invalid_ascii:"invalid_ascii",invalid_unicode:"invalid_unicode",invalid_lex_state:"invalid_lex_state",unterminated_string:"unterminated_string",unterminated_comment:"unterminated_comment",lex:"lex",parse:"parse",error:"error",none:"none",imp_map:"imp,map",imp_list:"imp,list",imp_null:"imp,null",end:"end",open:"open",close:"close",rule:"rule",stack:"stack",nUll:"null",name:"name",make:"make",colon:":"};t.S=d;class p extends SyntaxError{constructor(e,t,n,r,l){let i=x(e,t=g({},t),n,r,l);super(i.message),a(this,i),v(this)}toJSON(){return{...this,__error:!0,name:this.name,message:this.message,stack:this.stack}}}function m(e,t,n){let l=t.t,i=l[e];return null==i&&r.STRING===typeof e&&(i=t.tI++,l[i]=e,l[e]=i,l[e.substring(1)]=i,null!=n&&a(n.token,t.t)),i}function h(e,...t){return new RegExp(t.map(e=>e.esc?f(e.toString()):e).join(r.EMPTY),null==e?"":e)}function f(e){return null==e?"":e.replace(/[-\\|\]{}()[^$+*?.!=]/g,"\\$&").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function g(e,...t){let n=d.function===typeof e,r=null!=e&&(d.object===typeof e||n);for(let l of t){let t,i=d.function===typeof l,o=null!=l&&(d.object===typeof l||i);if(r&&o&&!i&&Array.isArray(e)===Array.isArray(l))for(let n in l)e[n]=g(e[n],l[n]);else e=void 0===l?e:i?l:o?d.function===typeof(t=l.constructor)&&d.Object!==t.name&&d.Array!==t.name?l:g(Array.isArray(l)?[]:{},l):l,n=d.function===typeof e,r=null!=e&&(d.object===typeof e||n)}return e}function k(e,t,n,r,l,i){let o={code:t,details:n,token:r,rule:l,ctx:i};return null==e?"":e.replace(/\$(\{?)([\w_0-9]+)(\}?)/g,(e,t,s,a)=>{let c=null!=o[s]?o[s]:null!=n[s]?n[s]:i.meta&&null!=i.meta[s]?i.meta[s]:null!=r[s]?r[s]:null!=l[s]?l[s]:null!=i.opts[s]?i.opts[s]:null!=i.cfg[s]?i.cfg[s]:null!=i[s]?i[s]:"$"+s,u=t&&a?c:JSON.stringify(c);return u=null==u?"":u,u.replace(/\n/g,"\n ")})}function v(e){e.stack&&(e.stack=e.stack.split("\n").filter(e=>!e.includes("jsonic/jsonic")).map(e=>e.replace(/ at /,"at ")).join("\n"))}function b(e,t,n){let l=0"\x1b[34m"+(r.EMPTY+d++).padStart(u," ")+" | \x1b[0m"+(null==e?r.EMPTY:e),m=a.length;return[2null!=e).join("\n")}function x(e,t,n,r,l){var i,o,s;try{let a=l.cfg,c=l.meta,u=k(a.error[e]||(null===(i=null==t?void 0:t.use)||void 0===i?void 0:i.err)&&(t.use.err.code||t.use.err.message)||a.error.unknown,e,t,n,r,l);d.function===typeof a.hint&&(a.hint={...a.hint(),...a.hint});let p=["\x1b[31m[jsonic/"+e+"]:\x1b[0m "+u," \x1b[34m--\x3e\x1b[0m "+(c&&c.fileName||"")+":"+n.rI+":"+n.cI,b(l.src(),u,n),"",k((a.hint[e]||(null===(s=null===(o=t.use)||void 0===o?void 0:o.err)||void 0===s?void 0:s.message)||a.hint.unknown||"").trim().split("\n").map(e=>" "+e).join("\n"),e,t,n,r,l),""," \x1b[2mhttps://jsonic.senecajs.org\x1b[0m"," \x1b[2m--internal: rule="+r.name+"~"+r.state+"; token="+m(n.tin,l.cfg)+(null==n.why?"":"~"+n.why)+"; plugins="+l.plgn().map(e=>e.name).join(",")+"--\x1b[0m\n"].join("\n"),h={internal:{token:n,ctx:l}};return h={...Object.create(h),message:p,code:e,details:t,meta:c,fileName:c?c.fileName:void 0,lineNumber:n.rI,columnNumber:n.cI},h}catch(a){return console.log(a),{}}}function y(e){return"function"==typeof e.debug.print.src?e.debug.print.src:t=>{let n=null==t?r.EMPTY:Array.isArray(t)?JSON.stringify(t).replace(/]$/,s(t).filter(e=>isNaN(e[0])).map((e,t)=>(0===t?", ":"")+e[0]+": "+JSON.stringify(e[1]))+"]"):JSON.stringify(t);return n=n.substring(0,e.debug.maxlen)+(e.debug.maxlen!1!==e).map(e=>"object"==typeof e?i(e).join(r.EMPTY):e).join(r.EMPTY).split(r.EMPTY).reduce((e,t)=>(e[t]=t.charCodeAt(0),e),{})}function O(e){for(let t in e)null==e[t]&&delete e[t];return e}t.JsonicError=p,t.configure=function(e,t,n){var r,l,c,d,p,g,k,v,b,x,y,S,j,E,T,N,M,P,_,C,w,R,A,L,Y,$,F,U,J,B,D,K,V,z,Z,G,H,W,q,X,Q,ee,te,ne,re,le,ie,oe,se,ae;const ce=t||{};ce.t=ce.t||{},ce.tI=ce.tI||1;const ue=e=>m(e,ce);!1!==n.standard$&&(ue("#BD"),ue("#ZZ"),ue("#UK"),ue("#AA"),ue("#SP"),ue("#LN"),ue("#CM"),ue("#NR"),ue("#ST"),ue("#TX"),ue("#VL")),ce.safe={key:!1!==(null===(r=n.safe)||void 0===r?void 0:r.key)},ce.fixed={lex:!!(null===(l=n.fixed)||void 0===l?void 0:l.lex),token:n.fixed?u(O(n.fixed.token),([e,t])=>[t,m(e,ce)]):{},ref:void 0,check:null===(c=n.fixed)||void 0===c?void 0:c.check},ce.fixed.ref=u(ce.fixed.token,([e,t])=>[e,t]),ce.fixed.ref=Object.assign(ce.fixed.ref,u(ce.fixed.ref,([e,t])=>[t,e])),ce.match={lex:!!(null===(d=n.match)||void 0===d?void 0:d.lex),value:n.match?u(O(n.match.value),([e,t])=>[e,t]):{},token:n.match?u(O(n.match.token),([e,t])=>[m(e,ce),t]):{},check:null===(p=n.match)||void 0===p?void 0:p.check},u(ce.match.token,([e,t])=>[e,(t.tin$=+e,t)]);const de=n.tokenSet?Object.keys(n.tokenSet).reduce((e,t)=>(e[t]=n.tokenSet[t].filter(e=>null!=e).map(e=>ue(e)),e),{}):{};ce.tokenSet=ce.tokenSet||{},s(de).map(e=>{let t=e[0],n=e[1];ce.tokenSet[t]?(ce.tokenSet[t].length=0,ce.tokenSet[t].push(...n)):ce.tokenSet[t]=n}),ce.tokenSetTins=s(ce.tokenSet).reduce((e,t)=>(e[t[0]]=e[t[0]]||{},t[1].map(n=>e[t[0]][n]=!0),e),{}),ce.tokenSetTins.IGNORE=ce.tokenSetTins.IGNORE||{},ce.space={lex:!!(null===(g=n.space)||void 0===g?void 0:g.lex),chars:I(null===(k=n.space)||void 0===k?void 0:k.chars),check:null===(v=n.space)||void 0===v?void 0:v.check},ce.line={lex:!!(null===(b=n.line)||void 0===b?void 0:b.lex),chars:I(null===(x=n.line)||void 0===x?void 0:x.chars),rowChars:I(null===(y=n.line)||void 0===y?void 0:y.rowChars),single:!!(null===(S=n.line)||void 0===S?void 0:S.single),check:null===(j=n.line)||void 0===j?void 0:j.check},ce.text={lex:!!(null===(E=n.text)||void 0===E?void 0:E.lex),modify:((null===(T=ce.text)||void 0===T?void 0:T.modify)||[]).concat(([null===(N=n.text)||void 0===N?void 0:N.modify]||[]).flat()).filter(e=>null!=e),check:null===(M=n.text)||void 0===M?void 0:M.check},ce.number={lex:!!(null===(P=n.number)||void 0===P?void 0:P.lex),hex:!!(null===(_=n.number)||void 0===_?void 0:_.hex),oct:!!(null===(C=n.number)||void 0===C?void 0:C.oct),bin:!!(null===(w=n.number)||void 0===w?void 0:w.bin),sep:null!=(null===(R=n.number)||void 0===R?void 0:R.sep)&&""!==n.number.sep,exclude:null===(A=n.number)||void 0===A?void 0:A.exclude,sepChar:null===(L=n.number)||void 0===L?void 0:L.sep,check:null===(Y=n.number)||void 0===Y?void 0:Y.check},ce.value={lex:!!(null===($=n.value)||void 0===$?void 0:$.lex),def:s((null===(F=n.value)||void 0===F?void 0:F.def)||{}).reduce((e,t)=>(null==t[1]||!1===t[1]||t[1].match||(e[t[0]]=t[1]),e),{}),defre:s((null===(U=n.value)||void 0===U?void 0:U.def)||{}).reduce((e,t)=>(t[1]&&t[1].match&&(e[t[0]]=t[1],e[t[0]].consume=!!e[t[0]].consume),e),{})},ce.rule={start:null==(null===(J=n.rule)||void 0===J?void 0:J.start)?"val":n.rule.start,maxmul:null==(null===(B=n.rule)||void 0===B?void 0:B.maxmul)?3:n.rule.maxmul,finish:!!(null===(D=n.rule)||void 0===D?void 0:D.finish),include:(null===(K=n.rule)||void 0===K?void 0:K.include)?n.rule.include.split(/\s*,+\s*/).filter(e=>""!==e):[],exclude:(null===(V=n.rule)||void 0===V?void 0:V.exclude)?n.rule.exclude.split(/\s*,+\s*/).filter(e=>""!==e):[]},ce.map={extend:!!(null===(z=n.map)||void 0===z?void 0:z.extend),merge:null===(Z=n.map)||void 0===Z?void 0:Z.merge},ce.list={property:!!(null===(G=n.list)||void 0===G?void 0:G.property)};let pe=Object.keys(ce.fixed.token).sort((e,t)=>t.length-e.length).map(e=>f(e)).join("|"),me=(null===(H=n.comment)||void 0===H?void 0:H.lex)?(n.comment.def?o(n.comment.def):[]).filter(e=>e&&e.lex).map(e=>f(e.start)).join("|"):"",he=["([",f(i(I(ce.space.lex&&ce.space.chars,ce.line.lex&&ce.line.chars)).join("")),"]",("string"==typeof n.ender?n.ender.split(""):Array.isArray(n.ender)?n.ender:[]).map(e=>"|"+f(e)).join(""),""===pe?"":"|",pe,""===me?"":"|",me,"|$)"];return ce.rePart={fixed:pe,ender:he,commentStart:me},ce.re={ender:h(null,...he),rowChars:h(null,f(null===(W=n.line)||void 0===W?void 0:W.rowChars)),columns:h(null,"["+f(null===(q=n.line)||void 0===q?void 0:q.chars)+"]","(.*)$")},ce.lex={empty:!!(null===(X=n.lex)||void 0===X?void 0:X.empty),emptyResult:null===(Q=n.lex)||void 0===Q?void 0:Q.emptyResult,match:(null===(ee=n.lex)||void 0===ee?void 0:ee.match)?s(n.lex.match).reduce((e,t)=>{let r=t[0],l=t[1];if(l){let t=l.make(ce,n);t&&(t.matcher=r,t.make=l.make,t.order=l.order),e.push(t)}return e},[]).filter(e=>null!=e&&!1!==e&&-1<+e.order).sort((e,t)=>e.order-t.order):[]},ce.parse={prepare:o(null===(te=n.parse)||void 0===te?void 0:te.prepare)},ce.debug={get_console:(null===(ne=n.debug)||void 0===ne?void 0:ne.get_console)||(()=>console),maxlen:null==(null===(re=n.debug)||void 0===re?void 0:re.maxlen)?99:n.debug.maxlen,print:{config:!!(null===(ie=null===(le=n.debug)||void 0===le?void 0:le.print)||void 0===ie?void 0:ie.config),src:null===(se=null===(oe=n.debug)||void 0===oe?void 0:oe.print)||void 0===se?void 0:se.src}},ce.error=n.error||{},ce.hint=n.hint||{},(null===(ae=n.config)||void 0===ae?void 0:ae.modify)&&i(n.config.modify).forEach(e=>n.config.modify[e](ce,n)),ce.debug.print.config&&ce.debug.get_console().dir(ce,{depth:null}),ce.result={fail:[]},n.result&&(ce.result.fail=[...n.result.fail]),a(e.options,n),a(e.token,ce.t),a(e.tokenSet,ce.tokenSet),a(e.fixed,ce.fixed.ref),ce},t.tokenize=m,t.findTokenSet=function(e,t){return t.tokenSet[e]},t.mesc=function(e,t){return(t=new String(e)).esc=!0,t},t.regexp=h,t.escre=f,t.deep=g,t.errinject=k,t.trimstk=v,t.extract=b,t.errdesc=x,t.badlex=function(e,t,n){let r=e.next.bind(e);return e.next=(e,l,i,o)=>{let s=r(e,l,i,o);if(t===s.tin){let t={};throw null!=s.use&&(t.use=s.use),new p(s.why||d.unexpected,t,s,e,n)}return s},e},t.makelog=function(e,t){var n,r,l;let i=null===(l=null===(r=null===(n=e.opts)||void 0===n?void 0:n.plugin)||void 0===r?void 0:r.debug)||void 0===l?void 0:l.trace;if(t||i)if("number"==typeof(null==t?void 0:t.log)||i){let n=!1,r=null==t?void 0:t.log;(-1===r||i)&&(r=1,n=!0),e.log=(...t)=>{if(n){let n=t.filter(e=>d.object!=typeof e).map(e=>d.function==typeof e?e.name:e).join(d.gap);e.cfg.debug.get_console().log(n)}else e.cfg.debug.get_console().dir(t,{depth:r})}}else"function"==typeof t.log&&(e.log=t.log);return e.log},t.srcfmt=y,t.str=S,t.snip=j,t.clone=function(e){return g(Object.create(Object.getPrototypeOf(e)),e)},t.charset=I,t.clean=O,t.filterRules=function(e,t){let n=["open","close"];for(let r of n)e.def[r]=e.def[r].map(e=>(e.g="string"==typeof e.g?(e.g||"").split(/\s*,+\s*/):e.g||[],e)).filter(e=>t.rule.include.reduce((t,n)=>t||null!=e.g&&-1!==e.g.indexOf(n),0===t.rule.include.length)).filter(e=>t.rule.exclude.reduce((t,n)=>t&&(null==e.g||-1===e.g.indexOf(n)),!0));return e},t.prop=function(e,t,n){let r=e;try{let r,l=t.split(".");for(let t=0;tnull!=e);n.length!==e.length&&(e.length=0,e.push(...n))}if(t.custom){let n=t.custom(e);null!=n&&(e=n)}}return e},t.parserwrap=function(e){return{start:function(t,n,i,o){try{return e.start(t,n,i,o)}catch(s){if("SyntaxError"===s.name){let o=0,a=0,c=0,u=r.EMPTY,d=s.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);if(d){u=d[1],o=parseInt(d[2]),a=t.substring(0,o).replace(/[^\n]/g,r.EMPTY).length;let e=o-1;for(;-1t,root:()=>{},plgn:()=>n.internal().plugins,inst:()=>n,rule:{name:"no-rule"},sub:{},xs:-1,v2:h,v1:h,t0:h,t1:h,tC:-1,kI:-1,rs:[],rsI:0,rsm:{},n:{},log:i?i.log:void 0,F:y(n.internal().config),u:{},NORULE:{name:"no-rule"},NOTOKEN:{name:"no-token"}})}throw s}}}}})),n=e((function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.makeTextMatcher=n.makeNumberMatcher=n.makeCommentMatcher=n.makeStringMatcher=n.makeLineMatcher=n.makeSpaceMatcher=n.makeFixedMatcher=n.makeMatchMatcher=n.makeToken=n.makePoint=n.makeLex=n.makeNoToken=void 0;const l=t({});class i{constructor(e,t,n,r){this.len=-1,this.sI=0,this.rI=1,this.cI=1,this.token=[],this.len=e,null!=t&&(this.sI=t),null!=n&&(this.rI=n),null!=r&&(this.cI=r)}toString(){return"Point["+[this.sI+"/"+this.len,this.rI,this.cI]+(0new i(...e);n.makePoint=o;class s{constructor(e,t,n,l,i,o,s){this.isToken=!0,this.name=r.EMPTY,this.tin=-1,this.val=void 0,this.src=r.EMPTY,this.sI=-1,this.rI=-1,this.cI=-1,this.len=-1,this.name=e,this.tin=t,this.src=l,this.val=n,this.sI=i.sI,this.rI=i.rI,this.cI=i.cI,this.use=o,this.why=s,this.len=null==l?0:l.length}resolveVal(e,t){return"function"==typeof this.val?this.val(e,t):this.val}bad(e,t){return this.err=e,null!=t&&(this.use=(0,l.deep)(this.use||{},t)),this}toString(){return"Token["+this.name+"="+this.tin+" "+(0,l.snip)(this.src)+(void 0===this.val||"#ST"===this.name||"#TX"===this.name?"":"="+(0,l.snip)(this.val))+" "+[this.sI,this.rI,this.cI]+(null==this.use?"":" "+(0,l.snip)(""+JSON.stringify(this.use).replace(/"/g,""),22))+(null==this.err?"":" "+this.err)+(null==this.why?"":" "+(0,l.snip)(""+this.why,22))+"]"}[r.INSPECT](){return this.toString()}}const a=(...e)=>new s(...e);function c(e,t,n){let r=e.pnt,l=t;if(e.cfg.fixed.lex&&null!=n&&0a("",-1,void 0,r.EMPTY,o(-1)),n.makeFixedMatcher=(e,t)=>{let n=(0,l.regexp)(null,"^(",e.rePart.fixed,")");return function(t){let r=e.fixed;if(!r.lex)return;if(e.fixed.check){let n=e.fixed.check(t);if(n&&n.done)return n.token}let l=t.pnt,i=t.src.substring(l.sI).match(n);if(i){let e=i[1],n=e.length;if(0{let n=(0,l.values)(e.match.value),r=(0,l.values)(e.match.token);return 0===n.length&&0===r.length?null:function(t,l,i=0){if(!e.match.lex)return;if(e.match.check){let n=e.match.check(t);if(n&&n.done)return n.token}let o=t.pnt,s=t.src.substring(o.sI),a="o"===l.state?0:1;for(let e of n)if(e.match instanceof RegExp){let n=s.match(e.match);if(n){let r=n[0],l=r.length;if(0{let n=t.comment;e.comment={lex:!!n&&!!n.lex,def:((null==n?void 0:n.def)?(0,l.entries)(n.def):[]).reduce((e,[t,n])=>{if(null==n||!1===n)return e;let r={name:t,start:n.start,end:n.end,line:!!n.line,lex:!!n.lex,eatline:!!n.eatline};return e[t]=r,e},{})};let r=e.comment.lex?(0,l.values)(e.comment.def).filter(e=>e.lex&&e.line):[],i=e.comment.lex?(0,l.values)(e.comment.def).filter(e=>e.lex&&!e.line):[];return function(t,n){if(!e.comment.lex)return;if(e.comment.check){let n=e.comment.check(t);if(n&&n.done)return n.token}let o=t.pnt,s=t.src.substring(o.sI),a=o.rI,c=o.cI;for(let l of r)if(s.startsWith(l.start)){let n=s.length,r=l.start.length;for(c+=l.start.length;r{let n=(0,l.regexp)(e.line.lex?null:"s","^(.*?)",...e.rePart.ender);return function(r){if(e.text.check){let t=e.text.check(r);if(t&&t.done)return t.token}let l=e.text,i=r.pnt,o=r.src.substring(i.sI),s=e.value.def,a=e.value.defre,u=o.match(n);if(u){let n,d=u[1],p=u[2];if(null!=d){let t=d.length;if(0{let n=e.number,r=(0,l.regexp)(null,["^([-+]?(0(",[n.hex?"x[0-9a-fA-F_]+":null,n.oct?"o[0-7_]+":null,n.bin?"b[01_]+":null].filter(e=>null!=e).join("|"),")|\\.?[0-9]+([0-9_]*[0-9])?)","(\\.[0-9]?([0-9_]*[0-9])?)?","([eE][-+]?[0-9]+([0-9_]*[0-9])?)?"].join("").replace(/_/g,n.sep?(0,l.escre)(n.sepChar):""),")",...e.rePart.ender),i=n.sep?(0,l.regexp)("g",(0,l.escre)(n.sepChar)):void 0;return function(t){if(n=e.number,!n.lex)return;if(e.number.check){let n=e.number.check(t);if(n&&n.done)return n.token}let l=t.pnt,o=t.src.substring(l.sI),s=e.value.def,a=o.match(r);if(a){let n,r=a[1],o=a[9],u=!0;if(null!=r&&(u=!e.number.exclude||!r.match(e.number.exclude))){let o=r.length;if(0{let n=t.string||{};return e.string=e.string||{},e.string=(0,l.deep)(e.string,{lex:!!(null==n?void 0:n.lex),quoteMap:(0,l.charset)(n.chars),multiChars:(0,l.charset)(n.multiChars),escMap:{...n.escape},escChar:n.escapeChar,escCharCode:null==n.escapeChar?void 0:n.escapeChar.charCodeAt(0),allowUnknown:!!n.allowUnknown,replaceCodeMap:(0,l.omap)((0,l.clean)({...n.replace}),([e,t])=>[e.charCodeAt(0),t]),hasReplace:!1,abandon:!!n.abandon}),e.string.escMap=(0,l.clean)(e.string.escMap),e.string.hasReplace=0<(0,l.keys)(e.string.replaceCodeMap).length,function(t){let n=e.string;if(!n.lex)return;if(e.string.check){let n=e.string.check(t);if(n&&n.done)return n.token}let{quoteMap:i,escMap:o,escChar:s,escCharCode:a,multiChars:c,allowUnknown:u,replaceCodeMap:d,hasReplace:p}=n,{pnt:m,src:h}=t,{sI:f,rI:g,cI:k}=m,v=h.length;if(i[h[f]]){const i=h[f],b=f,x=g,y=c[i];++f,++k;let S,j=[];for(;ffunction(t){if(!e.line.lex)return;if(e.line.check){let n=e.line.check(t);if(n&&n.done)return n.token}let n,{chars:r,rowChars:l}=e.line,{pnt:i,src:o}=t,{sI:s,rI:a}=i,c=e.line.single;for(c&&(n={});r[o[s]]&&!(n&&(n[o[s]]=(n[o[s]]||0)+1,c&&1function(t){if(!e.space.lex)return;if(e.space.check){let n=e.space.check(t);if(n&&n.done)return n.token}let{chars:n}=e.space,{pnt:r,src:l}=t,{sI:i,cI:o}=r;for(;n[l[i]];)i++,o++;if(r.sIt(i,e,this.ctx)),i}tokenize(e){return(0,l.tokenize)(e,this.cfg)}bad(e,t,n){return this.token("#BD",void 0,0<=t&&t<=n?this.src.substring(t,n):this.src[this.pnt.sI],void 0,void 0,e)}}n.makeLex=(...e)=>new u(...e)})),r={};Object.defineProperty(r,"__esModule",{value:!0}),r.STRING=r.INSPECT=r.EMPTY=r.AFTER=r.BEFORE=r.CLOSE=r.OPEN=void 0,r.OPEN="o",r.CLOSE="c",r.BEFORE="b",r.AFTER="a",r.EMPTY="",r.INSPECT=Symbol.for("nodejs.util.inspect.custom"),r.STRING="string";var l={};Object.defineProperty(l,"__esModule",{value:!0}),l.defaults=void 0;const i=n({}),o={safe:{key:!0},tag:"-",fixed:{lex:!0,token:{"#OB":"{","#CB":"}","#OS":"[","#CS":"]","#CL":":","#CA":","}},match:{lex:!0,token:{}},tokenSet:{IGNORE:["#SP","#LN","#CM"],VAL:["#TX","#NR","#ST","#VL"],KEY:["#TX","#NR","#ST","#VL"]},space:{lex:!0,chars:" \t"},line:{lex:!0,chars:"\r\n",rowChars:"\n",single:!1},text:{lex:!0},number:{lex:!0,hex:!0,oct:!0,bin:!0,sep:"_",exclude:void 0},comment:{lex:!0,def:{hash:{line:!0,start:"#",lex:!0,eatline:!1},slash:{line:!0,start:"//",lex:!0,eatline:!1},multi:{line:!1,start:"/*",end:"*/",lex:!0,eatline:!1}}},string:{lex:!0,chars:"'\"`",multiChars:"`",escapeChar:"\\",escape:{b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",'"':'"',"'":"'","`":"`","\\":"\\","/":"/"},allowUnknown:!0,abandon:!1},map:{extend:!0,merge:void 0},list:{property:!0},value:{lex:!0,def:{true:{val:!0},false:{val:!1},null:{val:null}}},ender:[],plugin:{},debug:{get_console:()=>console,maxlen:99,print:{config:!1,src:void 0}},error:{unknown:"unknown error: $code",unexpected:"unexpected character(s): $src",invalid_unicode:"invalid unicode escape: $src",invalid_ascii:"invalid ascii escape: $src",unprintable:"unprintable character: $src",unterminated_string:"unterminated string: $src",unterminated_comment:"unterminated comment: $src",unknown_rule:"unknown rule: $rulename"},hint:function(e=((e,t="replace")=>e[t](/[A-Z]/g,e=>" "+e.toLowerCase())[t](/[~%][a-z]/g,e=>("~"==e[0]?" ":"")+e[1].toUpperCase())),t="~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")){return"unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((n,r,l)=>(n[r]=e(t[l]),n),{})},lex:{match:{match:{order:1e6,make:i.makeMatchMatcher},fixed:{order:2e6,make:i.makeFixedMatcher},space:{order:3e6,make:i.makeSpaceMatcher},line:{order:4e6,make:i.makeLineMatcher},string:{order:5e6,make:i.makeStringMatcher},comment:{order:6e6,make:i.makeCommentMatcher},number:{order:7e6,make:i.makeNumberMatcher},text:{order:8e6,make:i.makeTextMatcher}},empty:!0,emptyResult:void 0},parse:{prepare:{}},rule:{start:"val",finish:!0,maxmul:3,include:"",exclude:""},result:{fail:[]},config:{modify:{}},parser:{start:void 0}};l.defaults=o;var s={};Object.defineProperty(s,"__esModule",{value:!0}),s.makeRuleSpec=s.makeNoRule=s.makeRule=void 0;const a=t({});class c{constructor(e,t,n){this.i=-1,this.name=r.EMPTY,this.node=null,this.state=r.OPEN,this.n=Object.create(null),this.d=-1,this.u=Object.create(null),this.k=Object.create(null),this.bo=!1,this.ao=!1,this.bc=!1,this.ac=!1,this.os=0,this.cs=0,this.need=0,this.i=t.uI++,this.name=e.name,this.spec=e,this.child=t.NORULE,this.parent=t.NORULE,this.prev=t.NORULE,this.o0=t.NOTOKEN,this.o1=t.NOTOKEN,this.c0=t.NOTOKEN,this.c1=t.NOTOKEN,this.node=n,this.d=t.rsI,this.bo=null!=e.def.bo,this.ao=null!=e.def.ao,this.bc=null!=e.def.bc,this.ac=null!=e.def.ac}process(e,t){return this.spec.process(this,e,t,this.state)}eq(e,t=0){let n=this.n[e];return null==n||n===t}lt(e,t=0){let n=this.n[e];return null==n||nt}lte(e,t=0){let n=this.n[e];return null==n||n<=t}gte(e,t=0){let n=this.n[e];return null==n||n>=t}toString(){return"[Rule "+this.name+"~"+this.i+"]"}}const u=(...e)=>new c(...e);s.makeRule=u,s.makeNoRule=e=>u(g(e.cfg,{}),e);class d{constructor(){this.p=r.EMPTY,this.r=r.EMPTY,this.b=0}}const p=(...e)=>new d(...e),m=p(),h=p();class f{constructor(e,t){this.name=r.EMPTY,this.def={open:[],close:[],bo:[],bc:[],ao:[],ac:[],tcol:[]},this.cfg=e,this.def=Object.assign(this.def,t),this.def.open=(this.def.open||[]).filter(e=>null!=e),this.def.close=(this.def.close||[]).filter(e=>null!=e);for(let n of[...this.def.open,...this.def.close])k(n)}tin(e){return(0,a.tokenize)(e,this.cfg)}add(e,t,n){let r=(null==n?void 0:n.append)?"push":"unshift",l=((0,a.isarr)(t)?t:[t]).filter(e=>null!=e&&"object"==typeof e).map(e=>k(e)),i="o"===e?"open":"close",o=this.def[i];return o[r](...l),o=this.def[i]=(0,a.modlist)(o,n),(0,a.filterRules)(this,this.cfg),this.norm(),this}open(e,t){return this.add("o",e,t)}close(e,t){return this.add("c",e,t)}action(e,t,n,r){let l=this.def[t+n];return e?l.push(r):l.unshift(r),this}bo(e,t){return this.action(!t||!!e,r.BEFORE,r.OPEN,t||e)}ao(e,t){return this.action(!t||!!e,r.AFTER,r.OPEN,t||e)}bc(e,t){return this.action(!t||!!e,r.BEFORE,r.CLOSE,t||e)}ac(e,t){return this.action(!t||!!e,r.AFTER,r.CLOSE,t||e)}clear(){return this.def.open.length=0,this.def.close.length=0,this.def.bo.length=0,this.def.ao.length=0,this.def.bc.length=0,this.def.ac.length=0,this}norm(){this.def.open.map(e=>k(e)),this.def.close.map(e=>k(e));const e=[];function t(e,t,n){return n[e]=n[e]||[],[function(e,n){if(n.s&&n.s[t]){let r=[...new Set(e.concat(n.s[t]))];e.length=0,e.push(...r)}return e},n[e][t]=n[e][t]||[]]}return this.def.open.reduce(...t(0,0,e)),this.def.open.reduce(...t(0,1,e)),this.def.close.reduce(...t(1,0,e)),this.def.close.reduce(...t(1,1,e)),this.def.tcol=e,this}process(e,t,n,l){t.log&&t.log(a.S.rule,t,e,n);let i="o"===l,o=i?e:t.NORULE,s=i?"O":"C",c=this.def,d=i?c.open:c.close,p=i?e.bo?c.bo:null:e.bc?c.bc:null;if(p){let n;for(let r=0;rnew f(...e);function k(e){if(r.STRING===typeof e.g?e.g=e.g.split(/\s*,\s*/):null==e.g&&(e.g=[]),e.g=e.g.sort(),e.s&&0!==e.s.length){const t=e=>e.flat().filter(e=>"number"==typeof e),n=(e,t)=>e.filter(e=>31*t<=e&&e<31*(t+1)),r=(e,t)=>e.reduce((e,n)=>1<1+e/31|0))).fill(null).map((e,t)=>t).map(e=>r(n(l,e),e)):null,o.S1=01+e/31|0))).fill(null).map((e,t)=>t).map(e=>r(n(i,e),e)):null}else e.s=null;return e.p||(e.p=null),e.r||(e.r=null),e.b||(e.b=null),e}s.makeRuleSpec=g;var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.makeParser=v.makeRuleSpec=v.makeRule=void 0;const b=t({}),x=n({});Object.defineProperty(v,"makeRule",{enumerable:!0,get:function(){return s.makeRule}}),Object.defineProperty(v,"makeRuleSpec",{enumerable:!0,get:function(){return s.makeRuleSpec}});class y{constructor(e,t){this.rsm={},this.options=e,this.cfg=t}rule(e,t){if(null==e)return this.rsm;let n=this.rsm[e];if(null===t)delete this.rsm[e];else if(void 0!==t)return n=this.rsm[e]=this.rsm[e]||(0,s.makeRuleSpec)(this.cfg,{}),n=this.rsm[e]=t(this.rsm[e],this)||this.rsm[e],void(n.name=e);return n}start(e,t,n,l){let i,o=(0,x.makeToken)("#ZZ",(0,b.tokenize)("#ZZ",this.cfg),void 0,r.EMPTY,(0,x.makePoint)(-1)),a=(0,x.makeNoToken)(),c={uI:0,opts:this.options,cfg:this.cfg,meta:n||{},src:()=>e,root:()=>i,plgn:()=>t.internal().plugins,inst:()=>t,rule:{},sub:t.internal().sub,xs:-1,v2:o,v1:o,t0:a,t1:a,tC:-2,kI:-1,rs:[],rsI:0,rsm:this.rsm,log:void 0,F:(0,b.srcfmt)(this.cfg),u:{},NOTOKEN:a,NORULE:{}};c=(0,b.deep)(c,l);let u=(0,s.makeNoRule)(c);if(c.NORULE=u,c.rule=u,n&&b.S.function===typeof n.log&&(c.log=n.log),this.cfg.parse.prepare.forEach(e=>e(t,c,n)),""===e){if(this.cfg.lex.empty)return this.cfg.lex.emptyResult;throw new b.JsonicError(b.S.unexpected,{src:e},c.t0,u,c)}let d=(0,b.badlex)((0,x.makeLex)(c),(0,b.tokenize)("#BD",this.cfg),c),p=this.rsm[this.cfg.rule.start];if(null==p)return;let m=(0,s.makeRule)(p,c);i=m;let h=2*(0,b.keys)(this.rsm).length*d.src.length*2*c.cfg.rule.maxmul,f=0;for(;u!==m&&fe(m,c)),m=m.process(c,d),c.log&&c.log(b.S.stack,c,m,d),f++;if(o.tin!==d.next(m).tin)throw new b.JsonicError(b.S.unexpected,{},c.t0,u,c);const g=c.root().node;if(this.cfg.result.fail.includes(g))throw new b.JsonicError(b.S.unexpected,{},c.t0,u,c);return g}clone(e,t){let n=new y(e,t);return n.rsm=Object.keys(this.rsm).reduce((e,t)=>(e[t]=(0,b.filterRules)(this.rsm[t],this.cfg),e),{}),n.norm(),n}norm(){(0,b.values)(this.rsm).map(e=>e.norm())}}v.makeParser=(...e)=>new y(...e);var S={};function j(e){const{deep:t}=e.util,{OB:n,CB:r,OS:l,CS:i,CL:o,CA:s,TX:a,ST:c,ZZ:u}=e.token,{VAL:d,KEY:p}=e.tokenSet,m=(e,t)=>{if(!t.cfg.rule.finish)return t.t0.src="END_OF_SOURCE",t.t0},h=e=>{const t=e.o0,n=c===t.tin||a===t.tin?t.val:t.src;e.u.key=n};e.rule("val",e=>{e.bo(e=>e.node=void 0).open([{s:[n],p:"map",b:1,g:"map,json"},{s:[l],p:"list",b:1,g:"list,json"},{s:[d],g:"val,json"}]).close([{s:[u],g:"end,json"},{b:1,g:"more,json"}]).bc((e,t)=>{e.node=void 0===e.node?void 0===e.child.node?0===e.os?void 0:e.o0.resolveVal(e,t):e.child.node:e.node})}),e.rule("map",e=>{e.bo(e=>{e.node=Object.create(null)}).open([{s:[n,r],b:1,n:{pk:0},g:"map,json"},{s:[n],p:"pair",n:{pk:0},g:"map,json,pair"}]).close([{s:[r],g:"end,json"}])}),e.rule("list",e=>{e.bo(e=>{e.node=[]}).open([{s:[l,i],b:1,g:"list,json"},{s:[l],p:"elem",g:"list,elem,json"}]).close([{s:[i],g:"end,json"}])}),e.rule("pair",e=>{e.open([{s:[p,o],p:"val",u:{pair:!0},a:h,g:"map,pair,key,json"}]).bc((e,t)=>{e.u.pair&&(e.u.prev=e.node[e.u.key],e.node[e.u.key]=e.child.node)}).close([{s:[s],r:"pair",g:"map,pair,json"},{s:[r],b:1,g:"map,pair,json"}])}),e.rule("elem",e=>{e.open([{p:"val",g:"list,elem,val,json"}]).bc(e=>{!0!==e.u.done&&e.node.push(e.child.node)}).close([{s:[s],r:"elem",g:"list,elem,json"},{s:[i],b:1,g:"list,elem,json"}])});const f=(e,n)=>{let r=e.u.key,l=e.child.node;const i=e.u.prev;l=void 0===l?null:l,e.u.list&&n.cfg.safe.key&&("__proto__"===r||"constructor"===r)||(e.node[r]=null==i?l:n.cfg.map.merge?n.cfg.map.merge(i,l,e,n):n.cfg.map.extend?t(i,l):l)};e.rule("val",e=>{e.open([{s:[p,o],p:"map",b:2,n:{pk:1},g:"pair,jsonic"},{s:[d],g:"val,json"},{s:[[r,i]],b:1,c:e=>00===e.d,p:"list",b:1,g:"list,imp,jsonic"},{s:[s],b:1,g:"list,val,imp,null,jsonic"},{s:[u],g:"jsonic"}],{append:!0,delete:[2]}).close([{s:[[r,i]],b:1,g:"val,json,close",e:(e,t)=>0===e.d?t.t0:void 0},{s:[s],c:e=>e.lte("dlist")&&e.lte("dmap"),r:"list",u:{implist:!0},g:"list,val,imp,comma,jsonic"},{c:e=>e.lte("dlist")&&e.lte("dmap"),r:"list",u:{implist:!0},g:"list,val,imp,space,jsonic",b:1},{s:[u],g:"jsonic"}],{append:!0,move:[1,-1]})}),e.rule("map",e=>{e.bo(e=>{e.n.dmap=1+(e.n.dmap?e.n.dmap:0)}).open([{s:[n,u],b:1,e:m,g:"end,jsonic"}]).open([{s:[p,o],p:"pair",b:2,g:"pair,list,val,imp,jsonic"}],{append:!0}).close([{s:[r],c:e=>e.lte("pk"),g:"end,json"},{s:[r],b:1,g:"path,jsonic"},{s:[[s,i,...d]],b:1,g:"end,path,jsonic"},{s:[u],e:m,g:"end,jsonic"}],{append:!0,delete:[0]})}),e.rule("list",e=>{e.bo(e=>{e.n.dlist=1+(e.n.dlist?e.n.dlist:0),e.prev.u.implist&&(e.node.push(e.prev.node),e.prev.node=e.node)}).open({c:e=>e.prev.u.implist,p:"elem"}).open([{s:[s],p:"elem",b:1,g:"list,elem,val,imp,jsonic"},{p:"elem",g:"list,elem.jsonic"}],{append:!0}).close([{s:[u],e:m,g:"end,jsonic"}],{append:!0})}),e.rule("pair",(e,t)=>{e.open([{s:[s],g:"map,pair,comma,jsonic"}],{append:!0}).bc((e,t)=>{e.u.pair&&f(e,t)}).close([{s:[r],c:e=>e.lte("pk"),b:1,g:"map,pair,json"},{s:[s,r],c:e=>e.lte("pk"),b:1,g:"map,pair,comma,jsonic"},{s:[s,u],g:"end,jsonic"},{s:[s],c:e=>e.lte("pk"),r:"pair",g:"map,pair,json"},{s:[s],c:e=>e.lte("dmap",1),r:"pair",g:"map,pair,jsonic"},{s:[p],c:e=>e.lte("dmap",1),r:"pair",b:1,g:"map,pair,imp,jsonic"},{s:[[r,s,i,...p]],c:e=>0e.c0,g:"end,jsonic"},{s:[u],e:m,g:"map,pair,json"},{r:"pair",b:1,g:"map,pair,imp,jsonic"}],{append:!0,delete:[0,1]})}),e.rule("elem",(e,t)=>{e.open([{s:[s,s],b:2,u:{done:!0},a:e=>e.node.push(null),g:"list,elem,imp,null,jsonic"},{s:[s],u:{done:!0},a:e=>e.node.push(null),g:"list,elem,imp,null,jsonic"},{s:[p,o],e:t.cfg.list.property?void 0:(e,t)=>t.t0,p:"val",n:{pk:1,dmap:1},u:{done:!0,pair:!0,list:!0},a:h,g:"elem,pair,jsonic"}]).bc((e,t)=>{!0===e.u.pair&&(e.u.prev=e.node[e.u.key],f(e,t))}).close([{s:[s,[i,u]],b:1,g:"list,elem,comma,jsonic"},{s:[s],r:"elem",g:"list,elem,json"},{s:[i],b:1,g:"list,elem,json"},{s:[u],e:m,g:"list,elem,json"},{s:[r],e:e=>e.c0,g:"end,jsonic"},{r:"elem",b:1,g:"list,elem,imp,jsonic"}],{delete:[-1,-2]})})}Object.defineProperty(S,"__esModule",{value:!0}),S.makeJSON=S.grammar=void 0,S.grammar=j,S.makeJSON=function(e){let t=e.make({grammar$:!1,text:{lex:!1},number:{hex:!1,oct:!1,bin:!1,sep:null,exclude:/^00+/},string:{chars:'"',multiChars:"",allowUnknown:!1,escape:{v:null}},comment:{lex:!1},map:{extend:!1},lex:{empty:!1},rule:{finish:!1,include:"json"},result:{fail:[void 0,NaN]},tokenSet:{KEY:["#ST",null,null,null]}});return j(t),t};var I={exports:{}};Object.defineProperty(I.exports,"__esModule",{value:!0}),I.exports.root=I.exports.S=I.exports.EMPTY=I.exports.AFTER=I.exports.BEFORE=I.exports.CLOSE=I.exports.OPEN=I.exports.makeTextMatcher=I.exports.makeNumberMatcher=I.exports.makeCommentMatcher=I.exports.makeStringMatcher=I.exports.makeLineMatcher=I.exports.makeSpaceMatcher=I.exports.makeFixedMatcher=I.exports.makeParser=I.exports.makeLex=I.exports.makeRuleSpec=I.exports.makeRule=I.exports.makePoint=I.exports.makeToken=I.exports.make=I.exports.util=I.exports.JsonicError=I.exports.Jsonic=void 0,Object.defineProperty(I.exports,"OPEN",{enumerable:!0,get:function(){return r.OPEN}}),Object.defineProperty(I.exports,"CLOSE",{enumerable:!0,get:function(){return r.CLOSE}}),Object.defineProperty(I.exports,"BEFORE",{enumerable:!0,get:function(){return r.BEFORE}}),Object.defineProperty(I.exports,"AFTER",{enumerable:!0,get:function(){return r.AFTER}}),Object.defineProperty(I.exports,"EMPTY",{enumerable:!0,get:function(){return r.EMPTY}});const O=t({});Object.defineProperty(I.exports,"JsonicError",{enumerable:!0,get:function(){return O.JsonicError}}),Object.defineProperty(I.exports,"S",{enumerable:!0,get:function(){return O.S}});const E=n({});Object.defineProperty(I.exports,"makePoint",{enumerable:!0,get:function(){return E.makePoint}}),Object.defineProperty(I.exports,"makeToken",{enumerable:!0,get:function(){return E.makeToken}}),Object.defineProperty(I.exports,"makeLex",{enumerable:!0,get:function(){return E.makeLex}}),Object.defineProperty(I.exports,"makeFixedMatcher",{enumerable:!0,get:function(){return E.makeFixedMatcher}}),Object.defineProperty(I.exports,"makeSpaceMatcher",{enumerable:!0,get:function(){return E.makeSpaceMatcher}}),Object.defineProperty(I.exports,"makeLineMatcher",{enumerable:!0,get:function(){return E.makeLineMatcher}}),Object.defineProperty(I.exports,"makeStringMatcher",{enumerable:!0,get:function(){return E.makeStringMatcher}}),Object.defineProperty(I.exports,"makeCommentMatcher",{enumerable:!0,get:function(){return E.makeCommentMatcher}}),Object.defineProperty(I.exports,"makeNumberMatcher",{enumerable:!0,get:function(){return E.makeNumberMatcher}}),Object.defineProperty(I.exports,"makeTextMatcher",{enumerable:!0,get:function(){return E.makeTextMatcher}}),Object.defineProperty(I.exports,"makeRule",{enumerable:!0,get:function(){return v.makeRule}}),Object.defineProperty(I.exports,"makeRuleSpec",{enumerable:!0,get:function(){return v.makeRuleSpec}}),Object.defineProperty(I.exports,"makeParser",{enumerable:!0,get:function(){return v.makeParser}});const T={tokenize:O.tokenize,srcfmt:O.srcfmt,clone:O.clone,charset:O.charset,trimstk:O.trimstk,makelog:O.makelog,badlex:O.badlex,extract:O.extract,errinject:O.errinject,errdesc:O.errdesc,configure:O.configure,parserwrap:O.parserwrap,mesc:O.mesc,escre:O.escre,regexp:O.regexp,prop:O.prop,str:O.str,clean:O.clean,deep:O.deep,omap:O.omap,keys:O.keys,values:O.values,entries:O.entries};function N(e,t){let n=!0;if("jsonic"===e)n=!1;else if("json"===e)return(0,S.makeJSON)(M);e="string"==typeof e?{}:e;let r={parser:null,config:null,plugins:[],sub:{lex:void 0,rule:void 0},mark:Math.random()},i=(0,O.deep)({},t?{...t.options}:!1===(null==e?void 0:e.defaults$)?{}:l.defaults,e||{}),o=function(e,t,n){var r;if(O.S.string===typeof e){let l=o.internal();return((null===(r=s.parser)||void 0===r?void 0:r.start)?(0,O.parserwrap)(s.parser):l.parser).start(e,o,t,n)}return e},s=e=>{if(null!=e&&O.S.object===typeof e){(0,O.deep)(i,e),(0,O.configure)(o,r.config,i);let t=o.internal().parser;r.parser=t.clone(i,r.config)}return{...o.options}},a={token:e=>(0,O.tokenize)(e,r.config,o),tokenSet:e=>(0,O.findTokenSet)(e,r.config),fixed:e=>r.config.fixed.ref[e],options:(0,O.deep)(s,i),config:()=>(0,O.deep)(r.config),parse:o,use:function(e,t){if(O.S.function!==typeof e)throw new Error("Jsonic.use: the first argument must be a function defining a plugin. See https://jsonic.senecajs.org/plugin");const n=e.name.toLowerCase(),r=(0,O.deep)({},e.defaults||{},t||{});o.options({plugin:{[n]:r}});let l=o.options.plugin[n];return o.internal().plugins.push(e),e.options=l,e(o,l)||o},rule:(e,t)=>o.internal().parser.rule(e,t)||o,make:e=>N(e,o),empty:e=>N({defaults$:!1,standard$:!1,grammar$:!1,...e||{}}),id:"Jsonic/"+Date.now()+"/"+(""+Math.random()).substring(2,8).padEnd(6,"0")+(null==s.tag?"":"/"+s.tag),toString:()=>a.id,sub:e=>(e.lex&&(r.sub.lex=r.sub.lex||[],r.sub.lex.push(e.lex)),e.rule&&(r.sub.rule=r.sub.rule||[],r.sub.rule.push(e.rule)),o),util:T};if((0,O.defprop)(a.make,O.S.name,{value:O.S.make}),n?(0,O.assign)(o,a):(0,O.assign)(o,{empty:a.empty,parse:a.parse,sub:a.sub,id:a.id,toString:a.toString}),(0,O.defprop)(o,"internal",{value:()=>r}),t){for(let n in t)void 0===o[n]&&(o[n]=t[n]);o.parent=t;let e=t.internal();r.config=(0,O.deep)({},e.config),(0,O.configure)(o,r.config,i),(0,O.assign)(o.token,r.config.t),r.plugins=[...e.plugins],r.parser=e.parser.clone(i,r.config)}else{let e={...o,...a};r.config=(0,O.configure)(e,void 0,i),r.plugins=[],r.parser=(0,v.makeParser)(i,r.config),!1!==i.grammar$&&(0,S.grammar)(e)}return o}let M;I.exports.util=T,I.exports.make=N,I.exports.root=M;let P=I.exports.root=M=N("jsonic");return I.exports.Jsonic=P,M.Jsonic=M,M.JsonicError=O.JsonicError,M.makeLex=E.makeLex,M.makeParser=v.makeParser,M.makeToken=E.makeToken,M.makePoint=E.makePoint,M.makeRule=v.makeRule,M.makeRuleSpec=v.makeRuleSpec,M.makeFixedMatcher=E.makeFixedMatcher,M.makeSpaceMatcher=E.makeSpaceMatcher,M.makeLineMatcher=E.makeLineMatcher,M.makeStringMatcher=E.makeStringMatcher,M.makeCommentMatcher=E.makeCommentMatcher,M.makeNumberMatcher=E.makeNumberMatcher,M.makeTextMatcher=E.makeTextMatcher,M.OPEN=r.OPEN,M.CLOSE=r.CLOSE,M.BEFORE=r.BEFORE,M.AFTER=r.AFTER,M.EMPTY=r.EMPTY,M.util=T,M.make=N,M.S=O.S,I.exports.default=P,I.exports=P,I.exports}))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),e=e.exports;var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.Toml=t.isHexadecimal=void 0;const n=(e,t)=>{let n={rule:{start:"toml",exclude:"jsonic"},lex:{emptyResult:{},match:{string:{make:r}}},fixed:{token:{"#CL":"=","#DOT":"."}},match:{token:{"#ID":/^[a-zA-Z0-9_-]+/},value:{isodate:{match:/^\d\d\d\d-\d\d-\d\d([Tt ]\d\d:\d\d(:\d\d(\.\d+)?)?([Zz]|[-+]\d\d:\d\d)?)?/,val:e=>{let t=new Date(e[0]);return t.__toml__={kind:(null==e[4]?"local":"offset")+"-date"+(null==e[1]?"":"-time"),src:e[0]},t}},localtime:{match:/^\d\d:\d\d(:\d\d(\.\d+)?)?/,val:e=>{let t=new Date(36e5+new Date("1970-01-01 "+e[0]).getTime());return t.__toml__={kind:"local-time",src:e[0]},t}}}},value:{def:{nan:{val:NaN},"+nan":{val:NaN},"-nan":{val:NaN},inf:{val:1/0},"+inf":{val:1/0},"-inf":{val:-1/0}}},tokenSet:{KEY:["#ST","#ID",null,null],VAL:[,,,,]},comment:{def:{slash:null,multi:null}}};e.options(n);const{ZZ:l,ST:i,NR:o,OS:s,CS:a,CL:c,DOT:u,ID:d,CA:p,OB:m,CB:h}=e.token,f=[i,o,d];e.rule("toml",e=>{e.bo(e=>{e.node={}}).open([{s:[f,c],p:"table",b:2},{s:[s,f],p:"table",b:2},{s:[s,s],p:"table",b:2},{s:[f,u],p:"table",b:2},{s:[l]}])}),e.rule("table",e=>{e.bo(e=>{e.node=e.parent.node}).open([{s:[f,c],p:"map",b:2},{s:[s,f],r:"table",b:1},{s:[s,s],r:"table",n:{table_array:1}},{s:[f,u],c:e=>1===e.d&&"table"!==e.prev.name,p:"dive",b:2,u:{top_dive:!0}},{s:[f,u],r:"table",c:e=>e.lte("table_dive"),n:{table_dive:1},a:e=>{let t=e.o0.val;if(e.n.table_array&&Array.isArray(e.parent.node[t])){let n=e.parent.node[t],r=n[n.length-1];e.node=r||(n.push({}),n[n.length-1])}else e.node=e.parent.node[t]=e.parent.node[t]||{}},g:"dive,start"},{s:[f,u],r:"table",n:{table_dive:1},a:e=>{let t=e.o0.val;if(Array.isArray(e.prev.node)){let n=e.prev.node,r=n[n.length-1];r=r||(n.push({}),n[n.length-1]),e.node=r[t]=r[t]||{}}else e.node=e.prev.node[t]=e.prev.node[t]||{}},g:"dive"},{s:[f,a],c:e=>e.lte("table_dive"),p:e=>!e.n.table_array&&"map",r:e=>e.n.table_array&&"table",a:e=>{let t=e.o0.val;e.parent.node[t]=e.node=e.parent.node[t]||(e.n.table_array?[]:{})}},{s:[f,a],p:e=>!e.n.table_array&&"map",r:e=>e.n.table_array&&"table",a:e=>{let t=e.o0.val;if(Array.isArray(e.prev.node)){let n=e.prev.node,r=n[n.length-1];r=r||(n.push({}),n[n.length-1]),e.node=r[t]=r[t]||{}}else e.node=e.prev.node[t]=e.prev.node[t]||(e.n.table_array?[]:{})},g:"dive,end"},{s:[a],p:"map",c:e=>e.lte("table_array",1),a:e=>{e.prev.node.push(e.node={})}}]).bc(e=>{e.u.top_dive||Object.assign(e.node,e.child.node)}).close([{s:[s,s],r:"table",b:2},{s:[s,f],r:"table",b:1},{s:[l]}]).ac((e,t,n)=>{n.n.table_dive=0,n.n.table_array=0})}),e.rule("map",e=>{e.open([{s:[s],b:1},{s:[f,c],c:e=>"table"===e.parent.name,p:"pair",b:2},{s:[m,f],b:1,p:"pair"},{s:[f,u],p:"dive",b:2},{s:[l]}]).close([{s:[s],b:1},{s:[l]}])}),e.rule("pair",e=>{e.open([{s:[f,c],p:"val",u:{pair:!0},a:e=>e.u.key=e.o0.val},{s:[f,u],p:"dive",b:2}]).close([{s:[f],b:1,r:"pair"},{s:[p,f],b:1,r:"pair"},{s:[s],b:1},{s:[p,h],c:e=>e.lte("pk"),b:1}])}),e.rule("val",e=>{e.close([{s:[f],b:1},{s:[s],b:1}])}),e.rule("elem",e=>{e.close([{s:[p,a],b:1,g:"comma"}])}),e.rule("dive",e=>{e.open([{s:[f,u],p:"dive",n:{dive_key:1},a:e=>{e.parent.node[e.o0.val]=e.node=e.parent.node[e.o0.val]||{}}},{s:[f,c],p:"val",n:{dive_key:1},u:{dive_end:!0}}]).bc(e=>{e.u.dive_end&&(e.node[e.o0.val]=e.child.node)}).close([{s:[f,u],b:2,r:"dive",c:e=>e.lte("dive_key",1),n:{dive_key:0}},{}])})};function r(){return function(n){let{pnt:r,src:c}=n,{sI:u,rI:d,cI:p}=r,m=c.length,h=!1,f=u,g=c[u];if("'"!==g&&'"'!==g)return;if(g===c[u+1]){if(g!==c[u+2])return r.sI=u+2,r.cI=p+2,n.token("#ST",e.EMPTY,e.EMPTY,r);u+=2,p+=2,h=!0}h&&"\n"===c[u+1]&&(++u,p=0);let k="";for(;u=m)return n.bad("unterminated_string",f,u);if(!o(e)||s(e))return n.bad("unprintable",u,u+1);switch(g){case"'":k+=e;continue;case'"':if("\\"===e){const e=c[(++p,++u)];if(i(e)){k+=l[e];continue}if("x"===e){u++;let e=parseInt(c.substring(u,u+2),16);if(isNaN(e))return u-=2,p-=2,r.sI=u,r.cI=p,n.bad("invalid_ascii",u,u+4);k+=String.fromCharCode(e),u+=1,p+=2;continue}if("u"===e||"U"===e){let r=u;const l="u"===e?4:8;let i="";for(let e=0;e=m||!(0,t.isHexadecimal)(e))return n.bad("invalid_unicode",r,u);i+=e}const s=String.fromCodePoint(parseInt(i,16));if(!o(s))return n.bad("invalid_unicode",r,u);k+=s;continue}if(h&&(a(e)||"\n"===e||"\r"===e)){for(;" "===c[u+1]&&++p||"\t"===c[u+1]&&++p||"\n"===c[u+1]&&(p=0,++d)||"\r"===c[u+1]&&"\n"===c[u+2]&&(p=0,++u,++d);)u++;continue}k+="\x1b";continue}k+=e;continue}}break}return r.sI=u,r.cI=p,r.rI=d,n.token("#ST",k,c.substring(f,u),r)}}t.Toml=n;const l={b:"\b",t:"\t",n:"\n",f:"\f",r:"\r",'"':'"',"\\":"\\"},i=e=>e in l,o=e=>e<="\udbff\udfff",s=e=>(e=>"\0"<=e&&e<" "||"\x7f"===e)(e)&&"\t"!==e;t.isHexadecimal=e=>"A"<=e&&e<="Z"||"a"<=e&&e<="z"||"0"<=e&&e<="9";const a=e=>" "===e||"\t"===e;return n.defaults={},t})); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JsonicToml=e()}}((function(){var e={exports:{}};(function(t){(function(){!function(n){"object"==typeof e.exports?e.exports=n():("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Jsonic=n()}((function(){var e=function(e){var t;return function(n){return t||e(t={exports:{},parent:n},t.exports),t.exports}},t=e((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.values=t.keys=t.omap=t.isarr=t.entries=t.defprop=t.assign=t.S=t.JsonicError=void 0,t.badlex=function(e,t,n){let r=e.next.bind(e);return e.next=(e,i,l,o)=>{let s=r(e,i,l,o);if(t===s.tin){let t={};throw null!=s.use&&(t.use=s.use),new p(s.why||d.unexpected,t,s,e,n)}return s},e},t.charset=O,t.clean=I,t.clone=function(e){return g(Object.create(Object.getPrototypeOf(e)),e)},t.configure=function(e,t,n){var r,i,c,d,p,g,v,b,k,x,y,S,j,E,T,M,N,_,P,w,C,R,A,L,Y,F,J,K,B,U,$,D,Z,z,V,q,G,X,H,W,Q,ee,te,ne,re,ie,le,oe,se,ae;const ce=t||{};ce.t=ce.t||{},ce.tI=ce.tI||1;const ue=e=>m(e,ce);!1!==n.standard$&&(ue("#BD"),ue("#ZZ"),ue("#UK"),ue("#AA"),ue("#SP"),ue("#LN"),ue("#CM"),ue("#NR"),ue("#ST"),ue("#TX"),ue("#VL")),ce.safe={key:!1!==(null===(r=n.safe)||void 0===r?void 0:r.key)},ce.fixed={lex:!!(null===(i=n.fixed)||void 0===i?void 0:i.lex),token:n.fixed?u(I(n.fixed.token),([e,t])=>[t,m(e,ce)]):{},ref:void 0,check:null===(c=n.fixed)||void 0===c?void 0:c.check},ce.fixed.ref=u(ce.fixed.token,([e,t])=>[e,t]),ce.fixed.ref=Object.assign(ce.fixed.ref,u(ce.fixed.ref,([e,t])=>[t,e])),ce.match={lex:!!(null===(d=n.match)||void 0===d?void 0:d.lex),value:n.match?u(I(n.match.value),([e,t])=>[e,t]):{},token:n.match?u(I(n.match.token),([e,t])=>[m(e,ce),t]):{},check:null===(p=n.match)||void 0===p?void 0:p.check},u(ce.match.token,([e,t])=>[e,(t.tin$=+e,t)]);const de=n.tokenSet?Object.keys(n.tokenSet).reduce((e,t)=>(e[t]=n.tokenSet[t].filter(e=>null!=e).map(e=>ue(e)),e),{}):{};ce.tokenSet=ce.tokenSet||{},s(de).map(e=>{let t=e[0],n=e[1];ce.tokenSet[t]?(ce.tokenSet[t].length=0,ce.tokenSet[t].push(...n)):ce.tokenSet[t]=n}),ce.tokenSetTins=s(ce.tokenSet).reduce((e,t)=>(e[t[0]]=e[t[0]]||{},t[1].map(n=>e[t[0]][n]=!0),e),{}),ce.tokenSetTins.IGNORE=ce.tokenSetTins.IGNORE||{},ce.space={lex:!!(null===(g=n.space)||void 0===g?void 0:g.lex),chars:O(null===(v=n.space)||void 0===v?void 0:v.chars),check:null===(b=n.space)||void 0===b?void 0:b.check},ce.line={lex:!!(null===(k=n.line)||void 0===k?void 0:k.lex),chars:O(null===(x=n.line)||void 0===x?void 0:x.chars),rowChars:O(null===(y=n.line)||void 0===y?void 0:y.rowChars),single:!!(null===(S=n.line)||void 0===S?void 0:S.single),check:null===(j=n.line)||void 0===j?void 0:j.check},ce.text={lex:!!(null===(E=n.text)||void 0===E?void 0:E.lex),modify:((null===(T=ce.text)||void 0===T?void 0:T.modify)||[]).concat(((null===(M=n.text)||void 0===M?void 0:M.modify)?[n.text.modify]:[]).flat()).filter(e=>null!=e),check:null===(N=n.text)||void 0===N?void 0:N.check},ce.number={lex:!!(null===(_=n.number)||void 0===_?void 0:_.lex),hex:!!(null===(P=n.number)||void 0===P?void 0:P.hex),oct:!!(null===(w=n.number)||void 0===w?void 0:w.oct),bin:!!(null===(C=n.number)||void 0===C?void 0:C.bin),sep:null!=(null===(R=n.number)||void 0===R?void 0:R.sep)&&""!==n.number.sep,exclude:null===(A=n.number)||void 0===A?void 0:A.exclude,sepChar:null===(L=n.number)||void 0===L?void 0:L.sep,check:null===(Y=n.number)||void 0===Y?void 0:Y.check},ce.value={lex:!!(null===(F=n.value)||void 0===F?void 0:F.lex),def:s((null===(J=n.value)||void 0===J?void 0:J.def)||{}).reduce((e,t)=>(null==t[1]||!1===t[1]||t[1].match||(e[t[0]]=t[1]),e),{}),defre:s((null===(K=n.value)||void 0===K?void 0:K.def)||{}).reduce((e,t)=>(t[1]&&t[1].match&&(e[t[0]]=t[1],e[t[0]].consume=!!e[t[0]].consume),e),{})},ce.rule={start:null==(null===(B=n.rule)||void 0===B?void 0:B.start)?"val":n.rule.start,maxmul:null==(null===(U=n.rule)||void 0===U?void 0:U.maxmul)?3:n.rule.maxmul,finish:!!(null===($=n.rule)||void 0===$?void 0:$.finish),include:(null===(D=n.rule)||void 0===D?void 0:D.include)?n.rule.include.split(/\s*,+\s*/).filter(e=>""!==e):[],exclude:(null===(Z=n.rule)||void 0===Z?void 0:Z.exclude)?n.rule.exclude.split(/\s*,+\s*/).filter(e=>""!==e):[]},ce.map={extend:!!(null===(z=n.map)||void 0===z?void 0:z.extend),merge:null===(V=n.map)||void 0===V?void 0:V.merge},ce.list={property:!!(null===(q=n.list)||void 0===q?void 0:q.property)};let pe=Object.keys(ce.fixed.token).sort((e,t)=>t.length-e.length).map(e=>f(e)).join("|"),me=(null===(G=n.comment)||void 0===G?void 0:G.lex)?(n.comment.def?o(n.comment.def):[]).filter(e=>e&&e.lex).map(e=>f(e.start)).join("|"):"",he=["([",f(l(O(ce.space.lex&&ce.space.chars,ce.line.lex&&ce.line.chars)).join("")),"]",("string"==typeof n.ender?n.ender.split(""):Array.isArray(n.ender)?n.ender:[]).map(e=>"|"+f(e)).join(""),""===pe?"":"|",pe,""===me?"":"|",me,"|$)"];return ce.rePart={fixed:pe,ender:he,commentStart:me},ce.re={ender:h(null,...he),rowChars:h(null,f(null===(X=n.line)||void 0===X?void 0:X.rowChars)),columns:h(null,"["+f(null===(H=n.line)||void 0===H?void 0:H.chars)+"]","(.*)$")},ce.lex={empty:!!(null===(W=n.lex)||void 0===W?void 0:W.empty),emptyResult:null===(Q=n.lex)||void 0===Q?void 0:Q.emptyResult,match:(null===(ee=n.lex)||void 0===ee?void 0:ee.match)?s(n.lex.match).reduce((e,t)=>{let r=t[0],i=t[1];if(i){let t=i.make(ce,n);t&&(t.matcher=r,t.make=i.make,t.order=i.order),e.push(t)}return e},[]).filter(e=>null!=e&&!1!==e&&-1<+e.order).sort((e,t)=>e.order-t.order):[]},ce.parse={prepare:o(null===(te=n.parse)||void 0===te?void 0:te.prepare)},ce.debug={get_console:(null===(ne=n.debug)||void 0===ne?void 0:ne.get_console)||(()=>console),maxlen:null==(null===(re=n.debug)||void 0===re?void 0:re.maxlen)?99:n.debug.maxlen,print:{config:!!(null===(le=null===(ie=n.debug)||void 0===ie?void 0:ie.print)||void 0===le?void 0:le.config),src:null===(se=null===(oe=n.debug)||void 0===oe?void 0:oe.print)||void 0===se?void 0:se.src}},ce.error=n.error||{},ce.hint=n.hint||{},(null===(ae=n.config)||void 0===ae?void 0:ae.modify)&&l(n.config.modify).forEach(e=>n.config.modify[e](ce,n)),ce.debug.print.config&&ce.debug.get_console().dir(ce,{depth:null}),ce.result={fail:[]},n.result&&(ce.result.fail=[...n.result.fail]),a(e.options,n),a(e.token,ce.t),a(e.tokenSet,ce.tokenSet),a(e.fixed,ce.fixed.ref),ce},t.deep=g,t.errdesc=x,t.errinject=v,t.escre=f,t.extract=k,t.filterRules=function(e,t){let n=["open","close"];for(let r of n)e.def[r]=e.def[r].map(e=>(e.g="string"==typeof e.g?(e.g||"").split(/\s*,+\s*/):e.g||[],e)).filter(e=>t.rule.include.reduce((t,n)=>t||null!=e.g&&-1!==e.g.indexOf(n),0===t.rule.include.length)).filter(e=>t.rule.exclude.reduce((t,n)=>t&&(null==e.g||-1===e.g.indexOf(n)),!0));return e},t.makelog=function(e,t){var n,r,i;let l=null===(i=null===(r=null===(n=e.opts)||void 0===n?void 0:n.plugin)||void 0===r?void 0:r.debug)||void 0===i?void 0:i.trace;if(t||l)if("number"==typeof(null==t?void 0:t.log)||l){let n=!1,r=null==t?void 0:t.log;(-1===r||l)&&(r=1,n=!0),e.log=(...t)=>{if(n){let n=t.filter(e=>d.object!=typeof e).map(e=>d.function==typeof e?e.name:e).join(d.gap);e.cfg.debug.get_console().log(n)}else e.cfg.debug.get_console().dir(t,{depth:r})}}else"function"==typeof t.log&&(e.log=t.log);return e.log},t.mesc=function(e,t){return(t=new String(e)).esc=!0,t},t.regexp=h,t.snip=j,t.srcfmt=y,t.tokenize=m,t.trimstk=b,t.parserwrap=function(e){return{start:function(t,n,l,o){try{return e.start(t,n,l,o)}catch(s){if("SyntaxError"===s.name){let o=0,a=0,c=0,u=r.EMPTY,d=s.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);if(d){u=d[1],o=parseInt(d[2]),a=t.substring(0,o).replace(/[^\n]/g,r.EMPTY).length;let e=o-1;for(;-1t,root:()=>{},plgn:()=>n.internal().plugins,inst:()=>n,rule:{name:"no-rule"},sub:{},xs:-1,v2:h,v1:h,t0:h,t1:h,tC:-1,kI:-1,rs:[],rsI:0,rsm:{},n:{},log:l?l.log:void 0,F:y(n.internal().config),u:{},NORULE:{name:"no-rule"},NOTOKEN:{name:"no-token"}})}throw s}}}},t.prop=E,t.str=S,t.findTokenSet=function(e,t){return t.tokenSet[e]},t.modlist=function(e,t){if(t&&e){if(0null!=e);n.length!==e.length&&(e.length=0,e.push(...n))}if(t.custom){let n=t.custom(e);null!=n&&(e=n)}}return e};const i=n({}),l=e=>null==e?[]:Object.keys(e);t.keys=l;const o=e=>null==e?[]:Object.values(e);t.values=o;const s=e=>null==e?[]:Object.entries(e);t.entries=s;const a=(e,...t)=>Object.assign(null==e?{}:e,...t);t.assign=a,t.isarr=e=>Array.isArray(e);const c=Object.defineProperty;t.defprop=c;const u=(e,t)=>Object.entries(e||{}).reduce((e,n)=>{let r=t?t(n):n;void 0===r[0]?delete e[n[0]]:e[r[0]]=r[1];let i=2;for(;void 0!==r[i];)e[r[i]]=r[i+1],i+=2;return e},{});t.omap=u;const d={indent:". ",logindent:" ",space:" ",gap:" ",Object:"Object",Array:"Array",object:"object",string:"string",function:"function",unexpected:"unexpected",map:"map",list:"list",elem:"elem",pair:"pair",val:"val",node:"node",no_re_flags:r.EMPTY,unprintable:"unprintable",invalid_ascii:"invalid_ascii",invalid_unicode:"invalid_unicode",invalid_lex_state:"invalid_lex_state",unterminated_string:"unterminated_string",unterminated_comment:"unterminated_comment",lex:"lex",parse:"parse",error:"error",none:"none",imp_map:"imp,map",imp_list:"imp,list",imp_null:"imp,null",end:"end",open:"open",close:"close",rule:"rule",stack:"stack",nUll:"null",name:"name",make:"make",colon:":"};t.S=d;class p extends SyntaxError{constructor(e,t,n,r,i){let l=x(e,t=g({},t),n,r,i);super(l.message),a(this,l),b(this)}toJSON(){return{...this,__error:!0,name:this.name,message:this.message,stack:this.stack}}}function m(e,t,n){let i=t.t,l=i[e];return null==l&&r.STRING===typeof e&&(l=t.tI++,i[l]=e,i[e]=l,i[e.substring(1)]=l,null!=n&&a(n.token,t.t)),l}function h(e,...t){return new RegExp(t.map(e=>e.esc?f(e.toString()):e).join(r.EMPTY),null==e?"":e)}function f(e){return null==e?"":e.replace(/[-\\|\]{}()[^$+*?.!=]/g,"\\$&").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function g(e,...t){let n=d.function===typeof e,r=null!=e&&(d.object===typeof e||n);for(let i of t){let t,l=d.function===typeof i,o=null!=i&&(d.object===typeof i||l);if(r&&o&&!l&&Array.isArray(e)===Array.isArray(i))for(let n in i)e[n]=g(e[n],i[n]);else e=void 0===i?e:l?i:o?d.function===typeof(t=i.constructor)&&d.Object!==t.name&&d.Array!==t.name?i:g(Array.isArray(i)?[]:{},i):i,n=d.function===typeof e,r=null!=e&&(d.object===typeof e||n)}return e}function v(e,t,n,r,i,l){return function(e,t,n){return t=null==t?{}:t,(e=null==e?"":e).replace(/\{([\w_0-9.]+)}/g,(e,r)=>{var i;let l=E(t,r);if(l=void 0===l?e:l,"object"==typeof l){let e=null===(i=null==l?void 0:l.constructor)||void 0===i?void 0:i.name;l="Object"===e||"Array"===e?JSON.stringify(l).replace(/([^"])"/g,"$1"):l.toString()}else l=""+l;return n&&"string"==typeof n.indent&&(l=l.replace(/\n/g,"\n"+n.indent)),l})}(e,{...l||{},...l.cfg||{},...l.opts||{},...r||{},...i||{},...l.meta||{},...n||{},code:t,details:n,token:r,rule:i,ctx:l},{indent:" "})}function b(e){e.stack&&(e.stack=e.stack.split("\n").filter(e=>!e.includes("jsonic/jsonic")).map(e=>e.replace(/ at /,"at ")).join("\n"))}function k(e,t,n){let i=0"\x1b[34m"+(r.EMPTY+d++).padStart(u," ")+" | \x1b[0m"+(null==e?r.EMPTY:e),m=a.length;return[2null!=e).join("\n")}function x(e,t,n,r,i){var l,o,s;try{let a=i.cfg,c=i.meta,u=v(a.error[e]||(null===(l=null==t?void 0:t.use)||void 0===l?void 0:l.err)&&(t.use.err.code||t.use.err.message)||a.error.unknown,e,t,n,r,i);d.function===typeof a.hint&&(a.hint={...a.hint(),...a.hint});let p=["\x1b[31m[jsonic/"+e+"]:\x1b[0m "+u," \x1b[34m--\x3e\x1b[0m "+(c&&c.fileName||"")+":"+n.rI+":"+n.cI,k(i.src(),u,n),"",v((a.hint[e]||(null===(s=null===(o=t.use)||void 0===o?void 0:o.err)||void 0===s?void 0:s.message)||a.hint.unknown||"").trim().split("\n").map(e=>" "+e).join("\n"),e,t,n,r,i),""," \x1b[2mhttps://jsonic.senecajs.org\x1b[0m"," \x1b[2m--internal: tag="+(i.opts.tag||"")+"; rule="+r.name+"~"+r.state+"; token="+m(n.tin,i.cfg)+(null==n.why?"":"~"+n.why)+"; plugins="+i.plgn().map(e=>e.name).join(",")+"--\x1b[0m\n"].join("\n"),h={internal:{token:n,ctx:i}};return h={...Object.create(h),message:p,code:e,details:t,meta:c,fileName:c?c.fileName:void 0,lineNumber:n.rI,columnNumber:n.cI},h}catch(a){return console.log(a),{}}}function y(e){return"function"==typeof e.debug.print.src?e.debug.print.src:t=>{let n=null==t?r.EMPTY:Array.isArray(t)?JSON.stringify(t).replace(/]$/,s(t).filter(e=>isNaN(e[0])).map((e,t)=>(0===t?", ":"")+e[0]+": "+JSON.stringify(e[1]))+"]"):JSON.stringify(t);return n=n.substring(0,e.debug.maxlen)+(e.debug.maxlen!1!==e).map(e=>"object"==typeof e?l(e).join(r.EMPTY):e).join(r.EMPTY).split(r.EMPTY).reduce((e,t)=>(e[t]=t.charCodeAt(0),e),{})}function I(e){for(let t in e)null==e[t]&&delete e[t];return e}function E(e,t,n){let r=e;try{let r,i=t.split(".");for(let t=0;tnew l(...e);n.makePoint=o;class s{constructor(e,t,n,i,l,o,s){this.isToken=!0,this.name=r.EMPTY,this.tin=-1,this.val=void 0,this.src=r.EMPTY,this.sI=-1,this.rI=-1,this.cI=-1,this.len=-1,this.name=e,this.tin=t,this.src=i,this.val=n,this.sI=l.sI,this.rI=l.rI,this.cI=l.cI,this.use=o,this.why=s,this.len=null==i?0:i.length}resolveVal(e,t){return"function"==typeof this.val?this.val(e,t):this.val}bad(e,t){return this.err=e,null!=t&&(this.use=(0,i.deep)(this.use||{},t)),this}toString(){return"Token["+this.name+"="+this.tin+" "+(0,i.snip)(this.src)+(void 0===this.val||"#ST"===this.name||"#TX"===this.name?"":"="+(0,i.snip)(this.val))+" "+[this.sI,this.rI,this.cI]+(null==this.use?"":" "+(0,i.snip)(""+JSON.stringify(this.use).replace(/"/g,""),22))+(null==this.err?"":" "+this.err)+(null==this.why?"":" "+(0,i.snip)(""+this.why,22))+"]"}[r.INSPECT](){return this.toString()}}const a=(...e)=>new s(...e);function c(e,t,n){let r=e.pnt,i=t;if(e.cfg.fixed.lex&&null!=n&&0a("",-1,void 0,r.EMPTY,o(-1)),n.makeFixedMatcher=(e,t)=>{let n=(0,i.regexp)(null,"^(",e.rePart.fixed,")");return function(t){let r=e.fixed;if(!r.lex)return;if(e.fixed.check){let n=e.fixed.check(t);if(n&&n.done)return n.token}let i=t.pnt,l=t.src.substring(i.sI).match(n);if(l){let e=l[1],n=e.length;if(0{let n=(0,i.values)(e.match.value),r=(0,i.values)(e.match.token);return 0===n.length&&0===r.length?null:function(t,i,l=0){if(!e.match.lex)return;if(e.match.check){let n=e.match.check(t);if(n&&n.done)return n.token}let o=t.pnt,s=t.src.substring(o.sI),a="o"===i.state?0:1;for(let e of n)if(e.match instanceof RegExp){let n=s.match(e.match);if(n){let r=n[0],i=r.length;if(0{let n=t.comment;e.comment={lex:!!n&&!!n.lex,def:((null==n?void 0:n.def)?(0,i.entries)(n.def):[]).reduce((e,[t,n])=>{if(null==n||!1===n)return e;let r={name:t,start:n.start,end:n.end,line:!!n.line,lex:!!n.lex,eatline:!!n.eatline};return e[t]=r,e},{})};let r=e.comment.lex?(0,i.values)(e.comment.def).filter(e=>e.lex&&e.line):[],l=e.comment.lex?(0,i.values)(e.comment.def).filter(e=>e.lex&&!e.line):[];return function(t,n){if(!e.comment.lex)return;if(e.comment.check){let n=e.comment.check(t);if(n&&n.done)return n.token}let o=t.pnt,s=t.src.substring(o.sI),a=o.rI,c=o.cI;for(let i of r)if(s.startsWith(i.start)){let n=s.length,r=i.start.length;for(c+=i.start.length;r{let n=(0,i.regexp)(e.line.lex?null:"s","^(.*?)",...e.rePart.ender);return function(r){if(e.text.check){let t=e.text.check(r);if(t&&t.done)return t.token}let i=e.text,l=r.pnt,o=r.src.substring(l.sI),s=e.value.def,a=e.value.defre,u=o.match(n);if(u){let n,d=u[1],p=u[2];if(null!=d){let t=d.length;if(0{let n=e.number,r=(0,i.regexp)(null,["^([-+]?(0(",[n.hex?"x[0-9a-fA-F_]+":null,n.oct?"o[0-7_]+":null,n.bin?"b[01_]+":null].filter(e=>null!=e).join("|"),")|\\.?[0-9]+([0-9_]*[0-9])?)","(\\.[0-9]?([0-9_]*[0-9])?)?","([eE][-+]?[0-9]+([0-9_]*[0-9])?)?"].join("").replace(/_/g,n.sep?(0,i.escre)(n.sepChar):""),")",...e.rePart.ender),l=n.sep?(0,i.regexp)("g",(0,i.escre)(n.sepChar)):void 0;return function(t){if(n=e.number,!n.lex)return;if(e.number.check){let n=e.number.check(t);if(n&&n.done)return n.token}let i=t.pnt,o=t.src.substring(i.sI),s=e.value.def,a=o.match(r);if(a){let n,r=a[1],o=a[9],u=!0;if(null!=r&&(u=!e.number.exclude||!r.match(e.number.exclude))){let o=r.length;if(0{let n=t.string||{};return e.string=e.string||{},e.string=(0,i.deep)(e.string,{lex:!!(null==n?void 0:n.lex),quoteMap:(0,i.charset)(n.chars),multiChars:(0,i.charset)(n.multiChars),escMap:{...n.escape},escChar:n.escapeChar,escCharCode:null==n.escapeChar?void 0:n.escapeChar.charCodeAt(0),allowUnknown:!!n.allowUnknown,replaceCodeMap:(0,i.omap)((0,i.clean)({...n.replace}),([e,t])=>[e.charCodeAt(0),t]),hasReplace:!1,abandon:!!n.abandon}),e.string.escMap=(0,i.clean)(e.string.escMap),e.string.hasReplace=0<(0,i.keys)(e.string.replaceCodeMap).length,function(t){let n=e.string;if(!n.lex)return;if(e.string.check){let n=e.string.check(t);if(n&&n.done)return n.token}let{quoteMap:l,escMap:o,escChar:s,escCharCode:a,multiChars:c,allowUnknown:u,replaceCodeMap:d,hasReplace:p}=n,{pnt:m,src:h}=t,{sI:f,rI:g,cI:v}=m,b=h.length;if(l[h[f]]){const l=h[f],k=f,x=g,y=c[l];++f,++v;let S,j=[];for(;ffunction(t){if(!e.line.lex)return;if(e.line.check){let n=e.line.check(t);if(n&&n.done)return n.token}let n,{chars:r,rowChars:i}=e.line,{pnt:l,src:o}=t,{sI:s,rI:a}=l,c=e.line.single;for(c&&(n={});r[o[s]]&&!(n&&(n[o[s]]=(n[o[s]]||0)+1,c&&1function(t){if(!e.space.lex)return;if(e.space.check){let n=e.space.check(t);if(n&&n.done)return n.token}let{chars:n}=e.space,{pnt:r,src:i}=t,{sI:l,cI:o}=r;for(;n[i[l]];)l++,o++;if(r.sIt(l,e,this.ctx)),l}tokenize(e){return(0,i.tokenize)(e,this.cfg)}bad(e,t,n){return this.token("#BD",void 0,0<=t&&t<=n?this.src.substring(t,n):this.src[this.pnt.sI],void 0,void 0,e)}}n.makeLex=(...e)=>new u(...e)})),r={};Object.defineProperty(r,"__esModule",{value:!0}),r.STRING=r.INSPECT=r.EMPTY=r.AFTER=r.BEFORE=r.CLOSE=r.OPEN=void 0,r.OPEN="o",r.CLOSE="c",r.BEFORE="b",r.AFTER="a",r.EMPTY="",r.INSPECT=Symbol.for("nodejs.util.inspect.custom"),r.STRING="string";var i={};Object.defineProperty(i,"__esModule",{value:!0}),i.defaults=void 0;const l=n({}),o={safe:{key:!0},tag:"-",fixed:{lex:!0,token:{"#OB":"{","#CB":"}","#OS":"[","#CS":"]","#CL":":","#CA":","}},match:{lex:!0,token:{}},tokenSet:{IGNORE:["#SP","#LN","#CM"],VAL:["#TX","#NR","#ST","#VL"],KEY:["#TX","#NR","#ST","#VL"]},space:{lex:!0,chars:" \t"},line:{lex:!0,chars:"\r\n",rowChars:"\n",single:!1},text:{lex:!0},number:{lex:!0,hex:!0,oct:!0,bin:!0,sep:"_",exclude:void 0},comment:{lex:!0,def:{hash:{line:!0,start:"#",lex:!0,eatline:!1},slash:{line:!0,start:"//",lex:!0,eatline:!1},multi:{line:!1,start:"/*",end:"*/",lex:!0,eatline:!1}}},string:{lex:!0,chars:"'\"`",multiChars:"`",escapeChar:"\\",escape:{b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",'"':'"',"'":"'","`":"`","\\":"\\","/":"/"},allowUnknown:!0,abandon:!1},map:{extend:!0,merge:void 0},list:{property:!0},value:{lex:!0,def:{true:{val:!0},false:{val:!1},null:{val:null}}},ender:[],plugin:{},debug:{get_console:()=>console,maxlen:99,print:{config:!1,src:void 0}},error:{unknown:"unknown error: {code}",unexpected:"unexpected character(s): {src}",invalid_unicode:"invalid unicode escape: {src}",invalid_ascii:"invalid ascii escape: {src}",unprintable:"unprintable character: {src}",unterminated_string:"unterminated string: {src}",unterminated_comment:"unterminated comment: {src}",unknown_rule:"unknown rule: {rulename}",end_of_source:"unexpected end of source"},hint:{unknown:" Since the error is unknown, this is probably a bug inside jsonic\nitself, or a plugin. Please consider posting a github issue - thanks!\n\nCode: {code}, Details: \n{details}",unexpected:" The character(s) {src} were not expected at this point as they do not\nmatch the expected syntax, even under the relaxed jsonic rules. If it\nis not obviously wrong, the actual syntax error may be elsewhere. Try\ncommenting out larger areas around this point until you get no errors,\nthen remove the comments in small sections until you find the\noffending syntax. NOTE: Also check if any plugins you are using\nexpect different syntax in this case.",invalid_unicode:" The escape sequence {src} does not encode a valid unicode code point\nnumber. You may need to validate your string data manually using test\ncode to see how JavaScript will interpret it. Also consider that your\ndata may have become corrupted, or the escape sequence has not been\ngenerated correctly.",invalid_ascii:" The escape sequence {src} does not encode a valid ASCII character. You\nmay need to validate your string data manually using test code to see\nhow JavaScript will interpret it. Also consider that your data may\nhave become corrupted, or the escape sequence has not been generated\ncorrectly.",unprintable:" String values cannot contain unprintable characters (character codes\nbelow 32). The character {src} is unprintable. You may need to remove\nthese characters from your source data. Also check that it has not\nbecome corrupted.",unterminated_string:" This string has no end quote.",unterminated_comment:" This comment is never closed.",unknown_rule:" No rule named $rulename is defined. This is probably an error in the\ngrammar of a plugin.",end_of_source:" Unexpected end of source."},lex:{match:{match:{order:1e6,make:l.makeMatchMatcher},fixed:{order:2e6,make:l.makeFixedMatcher},space:{order:3e6,make:l.makeSpaceMatcher},line:{order:4e6,make:l.makeLineMatcher},string:{order:5e6,make:l.makeStringMatcher},comment:{order:6e6,make:l.makeCommentMatcher},number:{order:7e6,make:l.makeNumberMatcher},text:{order:8e6,make:l.makeTextMatcher}},empty:!0,emptyResult:void 0},parse:{prepare:{}},rule:{start:"val",finish:!0,maxmul:3,include:"",exclude:""},result:{fail:[]},config:{modify:{}},parser:{start:void 0}};i.defaults=o;var s={};Object.defineProperty(s,"__esModule",{value:!0}),s.makeRuleSpec=s.makeNoRule=s.makeRule=void 0;const a=t({});class c{constructor(e,t,n){this.i=-1,this.name=r.EMPTY,this.node=null,this.state=r.OPEN,this.n=Object.create(null),this.d=-1,this.u=Object.create(null),this.k=Object.create(null),this.bo=!1,this.ao=!1,this.bc=!1,this.ac=!1,this.os=0,this.cs=0,this.need=0,this.i=t.uI++,this.name=e.name,this.spec=e,this.child=t.NORULE,this.parent=t.NORULE,this.prev=t.NORULE,this.o0=t.NOTOKEN,this.o1=t.NOTOKEN,this.c0=t.NOTOKEN,this.c1=t.NOTOKEN,this.node=n,this.d=t.rsI,this.bo=null!=e.def.bo,this.ao=null!=e.def.ao,this.bc=null!=e.def.bc,this.ac=null!=e.def.ac}process(e,t){return this.spec.process(this,e,t,this.state)}eq(e,t=0){let n=this.n[e];return null==n||n===t}lt(e,t=0){let n=this.n[e];return null==n||nt}lte(e,t=0){let n=this.n[e];return null==n||n<=t}gte(e,t=0){let n=this.n[e];return null==n||n>=t}toString(){return"[Rule "+this.name+"~"+this.i+"]"}}const u=(...e)=>new c(...e);s.makeRule=u,s.makeNoRule=e=>u(g(e.cfg,{}),e);class d{constructor(){this.p=r.EMPTY,this.r=r.EMPTY,this.b=0}}const p=(...e)=>new d(...e),m=p(),h=p();class f{constructor(e,t){this.name=r.EMPTY,this.def={open:[],close:[],bo:[],bc:[],ao:[],ac:[],tcol:[]},this.cfg=e,this.def=Object.assign(this.def,t),this.def.open=(this.def.open||[]).filter(e=>null!=e),this.def.close=(this.def.close||[]).filter(e=>null!=e);for(let n of[...this.def.open,...this.def.close])v(n)}tin(e){return(0,a.tokenize)(e,this.cfg)}add(e,t,n){let r=(null==n?void 0:n.append)?"push":"unshift",i=((0,a.isarr)(t)?t:[t]).filter(e=>null!=e&&"object"==typeof e).map(e=>v(e)),l="o"===e?"open":"close",o=this.def[l];return o[r](...i),o=this.def[l]=(0,a.modlist)(o,n),(0,a.filterRules)(this,this.cfg),this.norm(),this}open(e,t){return this.add("o",e,t)}close(e,t){return this.add("c",e,t)}action(e,t,n,r){let i=this.def[t+n];return e?i.push(r):i.unshift(r),this}bo(e,t){return this.action(!t||!!e,r.BEFORE,r.OPEN,t||e)}ao(e,t){return this.action(!t||!!e,r.AFTER,r.OPEN,t||e)}bc(e,t){return this.action(!t||!!e,r.BEFORE,r.CLOSE,t||e)}ac(e,t){return this.action(!t||!!e,r.AFTER,r.CLOSE,t||e)}clear(){return this.def.open.length=0,this.def.close.length=0,this.def.bo.length=0,this.def.ao.length=0,this.def.bc.length=0,this.def.ac.length=0,this}norm(){this.def.open.map(e=>v(e)),this.def.close.map(e=>v(e));const e=[];function t(e,t,n){return n[e]=n[e]||[],[function(e,n){if(n.s&&n.s[t]){let r=[...new Set(e.concat(n.s[t]))];e.length=0,e.push(...r)}return e},n[e][t]=n[e][t]||[]]}return this.def.open.reduce(...t(0,0,e)),this.def.open.reduce(...t(0,1,e)),this.def.close.reduce(...t(1,0,e)),this.def.close.reduce(...t(1,1,e)),this.def.tcol=e,this}process(e,t,n,i){t.log&&t.log(a.S.rule,t,e,n);let l="o"===i,o=l?e:t.NORULE,s=l?"O":"C",c=this.def,d=l?c.open:c.close,p=l?e.bo?c.bo:null:e.bc?c.bc:null;if(p){let n;for(let r=0;rnew f(...e);function v(e){if(r.STRING===typeof e.g?e.g=e.g.split(/\s*,\s*/):null==e.g&&(e.g=[]),e.g=e.g.sort(),e.s&&0!==e.s.length){const t=e=>e.flat().filter(e=>"number"==typeof e),n=(e,t)=>e.filter(e=>31*t<=e&&e<31*(t+1)),r=(e,t)=>e.reduce((e,n)=>1<1+e/31|0))).fill(null).map((e,t)=>t).map(e=>r(n(i,e),e)):null,o.S1=01+e/31|0))).fill(null).map((e,t)=>t).map(e=>r(n(l,e),e)):null}else e.s=null;return e.p||(e.p=null),e.r||(e.r=null),e.b||(e.b=null),e}s.makeRuleSpec=g;var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.makeParser=b.makeRuleSpec=b.makeRule=void 0;const k=t({}),x=n({});Object.defineProperty(b,"makeRule",{enumerable:!0,get:function(){return s.makeRule}}),Object.defineProperty(b,"makeRuleSpec",{enumerable:!0,get:function(){return s.makeRuleSpec}});class y{constructor(e,t){this.rsm={},this.options=e,this.cfg=t}rule(e,t){if(null==e)return this.rsm;let n=this.rsm[e];if(null===t)delete this.rsm[e];else if(void 0!==t)return n=this.rsm[e]=this.rsm[e]||(0,s.makeRuleSpec)(this.cfg,{}),n=this.rsm[e]=t(this.rsm[e],this)||this.rsm[e],void(n.name=e);return n}start(e,t,n,i){let l,o=(0,x.makeToken)("#ZZ",(0,k.tokenize)("#ZZ",this.cfg),void 0,r.EMPTY,(0,x.makePoint)(-1)),a=(0,x.makeNoToken)(),c={uI:0,opts:this.options,cfg:this.cfg,meta:n||{},src:()=>e,root:()=>l,plgn:()=>t.internal().plugins,inst:()=>t,rule:{},sub:t.internal().sub,xs:-1,v2:o,v1:o,t0:a,t1:a,tC:-2,kI:-1,rs:[],rsI:0,rsm:this.rsm,log:void 0,F:(0,k.srcfmt)(this.cfg),u:{},NOTOKEN:a,NORULE:{}};c=(0,k.deep)(c,i);let u=(0,s.makeNoRule)(c);if(c.NORULE=u,c.rule=u,n&&k.S.function===typeof n.log&&(c.log=n.log),this.cfg.parse.prepare.forEach(e=>e(t,c,n)),""===e){if(this.cfg.lex.empty)return this.cfg.lex.emptyResult;throw new k.JsonicError(k.S.unexpected,{src:e},c.t0,u,c)}let d=(0,k.badlex)((0,x.makeLex)(c),(0,k.tokenize)("#BD",this.cfg),c),p=this.rsm[this.cfg.rule.start];if(null==p)return;let m=(0,s.makeRule)(p,c);l=m;let h=2*(0,k.keys)(this.rsm).length*d.src.length*2*c.cfg.rule.maxmul,f=0;for(;u!==m&&fe(m,c)),m=m.process(c,d),c.log&&c.log(k.S.stack,c,m,d),f++;if(o.tin!==d.next(m).tin)throw new k.JsonicError(k.S.unexpected,{},c.t0,u,c);const g=c.root().node;if(this.cfg.result.fail.includes(g))throw new k.JsonicError(k.S.unexpected,{},c.t0,u,c);return g}clone(e,t){let n=new y(e,t);return n.rsm=Object.keys(this.rsm).reduce((e,t)=>(e[t]=(0,k.filterRules)(this.rsm[t],this.cfg),e),{}),n.norm(),n}norm(){(0,k.values)(this.rsm).map(e=>e.norm())}}b.makeParser=(...e)=>new y(...e);var S={};function j(e){const{deep:t}=e.util,{OB:n,CB:r,OS:i,CS:l,CL:o,CA:s,TX:a,ST:c,ZZ:u}=e.token,{VAL:d,KEY:p}=e.tokenSet,m=(e,t)=>{if(!t.cfg.rule.finish)return t.t0.err="end_of_source",t.t0},h=e=>{const t=e.o0,n=c===t.tin||a===t.tin?t.val:t.src;e.u.key=n};e.rule("val",e=>{e.bo(e=>e.node=void 0).open([{s:[n],p:"map",b:1,g:"map,json"},{s:[i],p:"list",b:1,g:"list,json"},{s:[d],g:"val,json"}]).close([{s:[u],g:"end,json"},{b:1,g:"more,json"}]).bc((e,t)=>{e.node=void 0===e.node?void 0===e.child.node?0===e.os?void 0:e.o0.resolveVal(e,t):e.child.node:e.node})}),e.rule("map",e=>{e.bo(e=>{e.node=Object.create(null)}).open([{s:[n,r],b:1,n:{pk:0},g:"map,json"},{s:[n],p:"pair",n:{pk:0},g:"map,json,pair"}]).close([{s:[r],g:"end,json"}])}),e.rule("list",e=>{e.bo(e=>{e.node=[]}).open([{s:[i,l],b:1,g:"list,json"},{s:[i],p:"elem",g:"list,elem,json"}]).close([{s:[l],g:"end,json"}])}),e.rule("pair",e=>{e.open([{s:[p,o],p:"val",u:{pair:!0},a:h,g:"map,pair,key,json"}]).bc((e,t)=>{e.u.pair&&(e.u.prev=e.node[e.u.key],e.node[e.u.key]=e.child.node)}).close([{s:[s],r:"pair",g:"map,pair,json"},{s:[r],b:1,g:"map,pair,json"}])}),e.rule("elem",e=>{e.open([{p:"val",g:"list,elem,val,json"}]).bc(e=>{!0!==e.u.done&&e.node.push(e.child.node)}).close([{s:[s],r:"elem",g:"list,elem,json"},{s:[l],b:1,g:"list,elem,json"}])});const f=(e,n)=>{let r=e.u.key,i=e.child.node;const l=e.u.prev;i=void 0===i?null:i,e.u.list&&n.cfg.safe.key&&("__proto__"===r||"constructor"===r)||(e.node[r]=null==l?i:n.cfg.map.merge?n.cfg.map.merge(l,i,e,n):n.cfg.map.extend?t(l,i):i)};e.rule("val",e=>{e.open([{s:[p,o],p:"map",b:2,n:{pk:1},g:"pair,jsonic"},{s:[d],g:"val,json"},{s:[[r,l]],b:1,c:e=>00===e.d,p:"list",b:1,g:"list,imp,jsonic"},{s:[s],b:1,g:"list,val,imp,null,jsonic"},{s:[u],g:"jsonic"}],{append:!0,delete:[2]}).close([{s:[[r,l]],b:1,g:"val,json,close",e:(e,t)=>0===e.d?t.t0:void 0},{s:[s],c:e=>e.lte("dlist")&&e.lte("dmap"),r:"list",u:{implist:!0},g:"list,val,imp,comma,jsonic"},{c:e=>e.lte("dlist")&&e.lte("dmap"),r:"list",u:{implist:!0},g:"list,val,imp,space,jsonic",b:1},{s:[u],g:"jsonic"}],{append:!0,move:[1,-1]})}),e.rule("map",e=>{e.bo(e=>{e.n.dmap=1+(e.n.dmap?e.n.dmap:0)}).open([{s:[n,u],b:1,e:m,g:"end,jsonic"}]).open([{s:[p,o],p:"pair",b:2,g:"pair,list,val,imp,jsonic"}],{append:!0}).close([{s:[r],c:e=>e.lte("pk"),g:"end,json"},{s:[r],b:1,g:"path,jsonic"},{s:[[s,l,...d]],b:1,g:"end,path,jsonic"},{s:[u],e:m,g:"end,jsonic"}],{append:!0,delete:[0]})}),e.rule("list",e=>{e.bo(e=>{e.n.dlist=1+(e.n.dlist?e.n.dlist:0),e.prev.u.implist&&(e.node.push(e.prev.node),e.prev.node=e.node)}).open({c:e=>e.prev.u.implist,p:"elem"}).open([{s:[s],p:"elem",b:1,g:"list,elem,val,imp,jsonic"},{p:"elem",g:"list,elem.jsonic"}],{append:!0}).close([{s:[u],e:m,g:"end,jsonic"}],{append:!0})}),e.rule("pair",(e,t)=>{e.open([{s:[s],g:"map,pair,comma,jsonic"}],{append:!0}).bc((e,t)=>{e.u.pair&&f(e,t)}).close([{s:[r],c:e=>e.lte("pk"),b:1,g:"map,pair,json"},{s:[s,r],c:e=>e.lte("pk"),b:1,g:"map,pair,comma,jsonic"},{s:[s,u],g:"end,jsonic"},{s:[s],c:e=>e.lte("pk"),r:"pair",g:"map,pair,json"},{s:[s],c:e=>e.lte("dmap",1),r:"pair",g:"map,pair,jsonic"},{s:[p],c:e=>e.lte("dmap",1),r:"pair",b:1,g:"map,pair,imp,jsonic"},{s:[[r,s,l,...p]],c:e=>0e.c0,g:"end,jsonic"},{s:[u],e:m,g:"map,pair,json"},{r:"pair",b:1,g:"map,pair,imp,jsonic"}],{append:!0,delete:[0,1]})}),e.rule("elem",(e,t)=>{e.open([{s:[s,s],b:2,u:{done:!0},a:e=>e.node.push(null),g:"list,elem,imp,null,jsonic"},{s:[s],u:{done:!0},a:e=>e.node.push(null),g:"list,elem,imp,null,jsonic"},{s:[p,o],e:t.cfg.list.property?void 0:(e,t)=>t.t0,p:"val",n:{pk:1,dmap:1},u:{done:!0,pair:!0,list:!0},a:h,g:"elem,pair,jsonic"}]).bc((e,t)=>{!0===e.u.pair&&(e.u.prev=e.node[e.u.key],f(e,t))}).close([{s:[s,[l,u]],b:1,g:"list,elem,comma,jsonic"},{s:[s],r:"elem",g:"list,elem,json"},{s:[l],b:1,g:"list,elem,json"},{s:[u],e:m,g:"list,elem,json"},{s:[r],e:e=>e.c0,g:"end,jsonic"},{r:"elem",b:1,g:"list,elem,imp,jsonic"}],{delete:[-1,-2]})})}Object.defineProperty(S,"__esModule",{value:!0}),S.grammar=j,S.makeJSON=function(e){let t=e.make({grammar$:!1,text:{lex:!1},number:{hex:!1,oct:!1,bin:!1,sep:null,exclude:/^00+/},string:{chars:'"',multiChars:"",allowUnknown:!1,escape:{v:null}},comment:{lex:!1},map:{extend:!1},lex:{empty:!1},rule:{finish:!1,include:"json"},result:{fail:[void 0,NaN]},tokenSet:{KEY:["#ST",null,null,null]}});return j(t),t};var O={exports:{}};Object.defineProperty(O.exports,"__esModule",{value:!0}),O.exports.root=O.exports.S=O.exports.EMPTY=O.exports.AFTER=O.exports.BEFORE=O.exports.CLOSE=O.exports.OPEN=O.exports.makeTextMatcher=O.exports.makeNumberMatcher=O.exports.makeCommentMatcher=O.exports.makeStringMatcher=O.exports.makeLineMatcher=O.exports.makeSpaceMatcher=O.exports.makeFixedMatcher=O.exports.makeParser=O.exports.makeLex=O.exports.makeRuleSpec=O.exports.makeRule=O.exports.makePoint=O.exports.makeToken=O.exports.util=O.exports.JsonicError=O.exports.Jsonic=void 0,O.exports.make=M,Object.defineProperty(O.exports,"OPEN",{enumerable:!0,get:function(){return r.OPEN}}),Object.defineProperty(O.exports,"CLOSE",{enumerable:!0,get:function(){return r.CLOSE}}),Object.defineProperty(O.exports,"BEFORE",{enumerable:!0,get:function(){return r.BEFORE}}),Object.defineProperty(O.exports,"AFTER",{enumerable:!0,get:function(){return r.AFTER}}),Object.defineProperty(O.exports,"EMPTY",{enumerable:!0,get:function(){return r.EMPTY}});const I=t({});Object.defineProperty(O.exports,"JsonicError",{enumerable:!0,get:function(){return I.JsonicError}}),Object.defineProperty(O.exports,"S",{enumerable:!0,get:function(){return I.S}});const E=n({});Object.defineProperty(O.exports,"makePoint",{enumerable:!0,get:function(){return E.makePoint}}),Object.defineProperty(O.exports,"makeToken",{enumerable:!0,get:function(){return E.makeToken}}),Object.defineProperty(O.exports,"makeLex",{enumerable:!0,get:function(){return E.makeLex}}),Object.defineProperty(O.exports,"makeFixedMatcher",{enumerable:!0,get:function(){return E.makeFixedMatcher}}),Object.defineProperty(O.exports,"makeSpaceMatcher",{enumerable:!0,get:function(){return E.makeSpaceMatcher}}),Object.defineProperty(O.exports,"makeLineMatcher",{enumerable:!0,get:function(){return E.makeLineMatcher}}),Object.defineProperty(O.exports,"makeStringMatcher",{enumerable:!0,get:function(){return E.makeStringMatcher}}),Object.defineProperty(O.exports,"makeCommentMatcher",{enumerable:!0,get:function(){return E.makeCommentMatcher}}),Object.defineProperty(O.exports,"makeNumberMatcher",{enumerable:!0,get:function(){return E.makeNumberMatcher}}),Object.defineProperty(O.exports,"makeTextMatcher",{enumerable:!0,get:function(){return E.makeTextMatcher}}),Object.defineProperty(O.exports,"makeRule",{enumerable:!0,get:function(){return b.makeRule}}),Object.defineProperty(O.exports,"makeRuleSpec",{enumerable:!0,get:function(){return b.makeRuleSpec}}),Object.defineProperty(O.exports,"makeParser",{enumerable:!0,get:function(){return b.makeParser}});const T={tokenize:I.tokenize,srcfmt:I.srcfmt,clone:I.clone,charset:I.charset,trimstk:I.trimstk,makelog:I.makelog,badlex:I.badlex,extract:I.extract,errinject:I.errinject,errdesc:I.errdesc,configure:I.configure,parserwrap:I.parserwrap,mesc:I.mesc,escre:I.escre,regexp:I.regexp,prop:I.prop,str:I.str,clean:I.clean,deep:I.deep,omap:I.omap,keys:I.keys,values:I.values,entries:I.entries};function M(e,t){let n=!0;if("jsonic"===e)n=!1;else if("json"===e)return(0,S.makeJSON)(N);e="string"==typeof e?{}:e;let r={parser:null,config:null,plugins:[],sub:{lex:void 0,rule:void 0},mark:Math.random()},l=(0,I.deep)({},t?{...t.options}:!1===(null==e?void 0:e.defaults$)?{}:i.defaults,e||{}),o=function(e,t,n){var r;if(I.S.string===typeof e){let i=o.internal();return((null===(r=s.parser)||void 0===r?void 0:r.start)?(0,I.parserwrap)(s.parser):i.parser).start(e,o,t,n)}return e},s=e=>{if(null!=e&&I.S.object===typeof e){(0,I.deep)(l,e),(0,I.configure)(o,r.config,l);let t=o.internal().parser;r.parser=t.clone(l,r.config)}return{...o.options}},a={token:e=>(0,I.tokenize)(e,r.config,o),tokenSet:e=>(0,I.findTokenSet)(e,r.config),fixed:e=>r.config.fixed.ref[e],options:(0,I.deep)(s,l),config:()=>(0,I.deep)(r.config),parse:o,use:function(e,t){if(I.S.function!==typeof e)throw new Error("Jsonic.use: the first argument must be a function defining a plugin. See https://jsonic.senecajs.org/plugin");const n=e.name.toLowerCase(),r=(0,I.deep)({},e.defaults||{},t||{});o.options({plugin:{[n]:r}});let i=o.options.plugin[n];return o.internal().plugins.push(e),e.options=i,e(o,i)||o},rule:(e,t)=>o.internal().parser.rule(e,t)||o,make:e=>M(e,o),empty:e=>M({defaults$:!1,standard$:!1,grammar$:!1,...e||{}}),id:"Jsonic/"+Date.now()+"/"+(""+Math.random()).substring(2,8).padEnd(6,"0")+(null==s.tag?"":"/"+s.tag),toString:()=>a.id,sub:e=>(e.lex&&(r.sub.lex=r.sub.lex||[],r.sub.lex.push(e.lex)),e.rule&&(r.sub.rule=r.sub.rule||[],r.sub.rule.push(e.rule)),o),util:T};if((0,I.defprop)(a.make,I.S.name,{value:I.S.make}),n?(0,I.assign)(o,a):(0,I.assign)(o,{empty:a.empty,parse:a.parse,sub:a.sub,id:a.id,toString:a.toString}),(0,I.defprop)(o,"internal",{value:()=>r}),t){for(let n in t)void 0===o[n]&&(o[n]=t[n]);o.parent=t;let e=t.internal();r.config=(0,I.deep)({},e.config),(0,I.configure)(o,r.config,l),(0,I.assign)(o.token,r.config.t),r.plugins=[...e.plugins],r.parser=e.parser.clone(l,r.config)}else{let e={...o,...a};r.config=(0,I.configure)(e,void 0,l),r.plugins=[],r.parser=(0,b.makeParser)(l,r.config),!1!==l.grammar$&&(0,S.grammar)(e)}return o}let N;O.exports.util=T,O.exports.root=N;let _=O.exports.root=N=M("jsonic");return O.exports.Jsonic=_,N.Jsonic=N,N.JsonicError=I.JsonicError,N.makeLex=E.makeLex,N.makeParser=b.makeParser,N.makeToken=E.makeToken,N.makePoint=E.makePoint,N.makeRule=b.makeRule,N.makeRuleSpec=b.makeRuleSpec,N.makeFixedMatcher=E.makeFixedMatcher,N.makeSpaceMatcher=E.makeSpaceMatcher,N.makeLineMatcher=E.makeLineMatcher,N.makeStringMatcher=E.makeStringMatcher,N.makeCommentMatcher=E.makeCommentMatcher,N.makeNumberMatcher=E.makeNumberMatcher,N.makeTextMatcher=E.makeTextMatcher,N.OPEN=r.OPEN,N.CLOSE=r.CLOSE,N.BEFORE=r.BEFORE,N.AFTER=r.AFTER,N.EMPTY=r.EMPTY,N.util=T,N.make=M,N.S=I.S,O.exports.default=_,O.exports=_,O.exports}))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),e=e.exports;var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.Toml=t.isHexadecimal=void 0;const n=(e,t)=>{let n={rule:{start:"toml",exclude:"jsonic"},lex:{emptyResult:{},match:{string:{make:r}}},fixed:{token:{"#CL":"=","#DOT":"."}},match:{token:{"#ID":/^[a-zA-Z0-9_-]+/},value:{isodate:{match:/^\d\d\d\d-\d\d-\d\d([Tt ]\d\d:\d\d(:\d\d(\.\d+)?)?([Zz]|[-+]\d\d:\d\d)?)?/,val:e=>{let t=new Date(e[0]);return t.__toml__={kind:(null==e[4]?"local":"offset")+"-date"+(null==e[1]?"":"-time"),src:e[0]},t}},localtime:{match:/^\d\d:\d\d(:\d\d(\.\d+)?)?/,val:e=>{let t=new Date(36e5+new Date("1970-01-01 "+e[0]).getTime());return t.__toml__={kind:"local-time",src:e[0]},t}}}},value:{def:{nan:{val:NaN},"+nan":{val:NaN},"-nan":{val:NaN},inf:{val:1/0},"+inf":{val:1/0},"-inf":{val:-1/0}}},tokenSet:{KEY:["#ST","#ID",null,null],VAL:[,,,,]},comment:{def:{slash:null,multi:null}}};e.options(n);const{ZZ:i,ST:l,NR:o,OS:s,CS:a,CL:c,DOT:u,ID:d,CA:p,OB:m,CB:h}=e.token,f=[l,o,d];e.rule("toml",e=>{e.bo(e=>{e.node={}}).open([{s:[f,c],p:"table",b:2},{s:[s,f],p:"table",b:2},{s:[s,s],p:"table",b:2},{s:[f,u],p:"table",b:2},{s:[i]}])}),e.rule("table",e=>{e.bo(e=>{e.node=e.parent.node}).open([{s:[f,c],p:"map",b:2},{s:[s,f],r:"table",b:1},{s:[s,s],r:"table",n:{table_array:1}},{s:[f,u],c:e=>1===e.d&&"table"!==e.prev.name,p:"dive",b:2,u:{top_dive:!0}},{s:[f,u],r:"table",c:e=>e.lte("table_dive"),n:{table_dive:1},a:e=>{let t=e.o0.val;if(e.n.table_array&&Array.isArray(e.parent.node[t])){let n=e.parent.node[t],r=n[n.length-1];e.node=r||(n.push({}),n[n.length-1])}else e.node=e.parent.node[t]=e.parent.node[t]||{}},g:"dive,start"},{s:[f,u],r:"table",n:{table_dive:1},a:e=>{let t=e.o0.val;if(Array.isArray(e.prev.node)){let n=e.prev.node,r=n[n.length-1];r=r||(n.push({}),n[n.length-1]),e.node=r[t]=r[t]||{}}else e.node=e.prev.node[t]=e.prev.node[t]||{}},g:"dive"},{s:[f,a],c:e=>e.lte("table_dive"),p:e=>!e.n.table_array&&"map",r:e=>e.n.table_array&&"table",a:e=>{let t=e.o0.val;e.parent.node[t]=e.node=e.parent.node[t]||(e.n.table_array?[]:{})}},{s:[f,a],p:e=>!e.n.table_array&&"map",r:e=>e.n.table_array&&"table",a:e=>{let t=e.o0.val;if(Array.isArray(e.prev.node)){let n=e.prev.node,r=n[n.length-1];r=r||(n.push({}),n[n.length-1]),e.node=r[t]=r[t]||{}}else e.node=e.prev.node[t]=e.prev.node[t]||(e.n.table_array?[]:{})},g:"dive,end"},{s:[a],p:"map",c:e=>e.lte("table_array",1),a:e=>{e.prev.node.push(e.node={})}}]).bc(e=>{e.u.top_dive||Object.assign(e.node,e.child.node)}).close([{s:[s,s],r:"table",b:2},{s:[s,f],r:"table",b:1},{s:[i]}]).ac((e,t,n)=>{n.n.table_dive=0,n.n.table_array=0})}),e.rule("map",e=>{e.open([{s:[s],b:1},{s:[f,c],c:e=>"table"===e.parent.name,p:"pair",b:2},{s:[m,f],b:1,p:"pair"},{s:[f,u],p:"dive",b:2},{s:[i]}]).close([{s:[s],b:1},{s:[i]}])}),e.rule("pair",e=>{e.open([{s:[f,c],p:"val",u:{pair:!0},a:e=>e.u.key=e.o0.val},{s:[f,u],p:"dive",b:2}]).close([{s:[f],b:1,r:"pair"},{s:[p,f],b:1,r:"pair"},{s:[s],b:1},{s:[p,h],c:e=>e.lte("pk"),b:1}])}),e.rule("val",e=>{e.close([{s:[f],b:1},{s:[s],b:1}])}),e.rule("elem",e=>{e.close([{s:[p,a],b:1,g:"comma"}])}),e.rule("dive",e=>{e.open([{s:[f,u],p:"dive",n:{dive_key:1},a:e=>{e.parent.node[e.o0.val]=e.node=e.parent.node[e.o0.val]||{}}},{s:[f,c],p:"val",n:{dive_key:1},u:{dive_end:!0}}]).bc(e=>{e.u.dive_end&&(e.node[e.o0.val]=e.child.node)}).close([{s:[f,u],b:2,r:"dive",c:e=>e.lte("dive_key",1),n:{dive_key:0}},{}])})};function r(){return function(n){let{pnt:r,src:c}=n,{sI:u,rI:d,cI:p}=r,m=c.length,h=!1,f=u,g=c[u];if("'"!==g&&'"'!==g)return;if(g===c[u+1]){if(g!==c[u+2])return r.sI=u+2,r.cI=p+2,n.token("#ST",e.EMPTY,e.EMPTY,r);u+=2,p+=2,h=!0}h&&"\n"===c[u+1]&&(++u,p=0);let v="";for(;u=m)return n.bad("unterminated_string",f,u);if(!o(e)||s(e))return n.bad("unprintable",u,u+1);switch(g){case"'":v+=e;continue;case'"':if("\\"===e){const e=c[(++p,++u)];if(l(e)){v+=i[e];continue}if("x"===e){u++;let e=parseInt(c.substring(u,u+2),16);if(isNaN(e))return u-=2,p-=2,r.sI=u,r.cI=p,n.bad("invalid_ascii",u,u+4);v+=String.fromCharCode(e),u+=1,p+=2;continue}if("u"===e||"U"===e){let r=u;const i="u"===e?4:8;let l="";for(let e=0;e=m||!(0,t.isHexadecimal)(e))return n.bad("invalid_unicode",r,u);l+=e}const s=String.fromCodePoint(parseInt(l,16));if(!o(s))return n.bad("invalid_unicode",r,u);v+=s;continue}if(h&&(a(e)||"\n"===e||"\r"===e)){for(;" "===c[u+1]&&++p||"\t"===c[u+1]&&++p||"\n"===c[u+1]&&(p=0,++d)||"\r"===c[u+1]&&"\n"===c[u+2]&&(p=0,++u,++d);)u++;continue}v+="\x1b";continue}v+=e;continue}}break}return r.sI=u,r.cI=p,r.rI=d,n.token("#ST",v,c.substring(f,u),r)}}t.Toml=n;const i={b:"\b",t:"\t",n:"\n",f:"\f",r:"\r",'"':'"',"\\":"\\"},l=e=>e in i,o=e=>e<="\udbff\udfff",s=e=>(e=>"\0"<=e&&e<" "||"\x7f"===e)(e)&&"\t"!==e;t.isHexadecimal=e=>"A"<=e&&e<="Z"||"a"<=e&&e<="z"||"0"<=e&&e<="9";const a=e=>" "===e||"\t"===e;return n.defaults={},t})); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 15bf65b..6070411 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "isolatedModules": true, "esModuleInterop": true, - "module": "commonjs", + "module": "nodenext", "moduleResolution": "nodenext", "noEmitOnError": true, "noImplicitAny": true,