From f5a0340ad329d189eb653e34bdfabfc8c4a33291 Mon Sep 17 00:00:00 2001 From: Richard Rodger Date: Fri, 8 Nov 2024 14:57:50 +0000 Subject: [PATCH] v0.5.0 --- README.md | 1 - hoover.js | 4 ++-- hoover.js.map | 2 +- hoover.min.js | 2 +- package.json | 6 +++--- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fe426b4..33e2268 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ parser to support various extended string formats. ## Options * _lex_ * _order_: `number` (default: 4500000) - order - diff --git a/hoover.js b/hoover.js index 9a592f4..a46faf0 100644 --- a/hoover.js +++ b/hoover.js @@ -1,7 +1,8 @@ "use strict"; /* Copyright (c) 2021-2023 Richard Rodger, MIT License */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.Hoover = exports.parseToEnd = void 0; +exports.Hoover = void 0; +exports.parseToEnd = parseToEnd; /* support regexp indent removal @@ -253,7 +254,6 @@ function parseToEnd(lex, hvpnt, block, cfg) { val, }; } -exports.parseToEnd = parseToEnd; Hoover.defaults = { block: { // // TODO: normalize with defaults diff --git a/hoover.js.map b/hoover.js.map index 50a5dda..625afe4 100644 --- a/hoover.js.map +++ b/hoover.js.map @@ -1 +1 @@ -{"version":3,"file":"hoover.js","sourceRoot":"","sources":["hoover.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAEzD;;;;EAIE;AAEF,sFAAsF;AAEtF,qDAe4B;AA4B5B,MAAM,MAAM,GAAW,CAAC,MAAc,EAAE,OAAsB,EAAE,EAAE;;IAChE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,IAAI,CAAA;IAE/B,IAAI,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC;QACzD,kBAAkB,EAAE,IAAI;QACxB,kBAAkB,EAAE,KAAK;QACzB,KAAK,EAAE,KAAK;QACZ,GAAG,KAAK,CA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EAAE,KAAK,EAAE,wBAAwB;KACvC;CACe,CAAA"} \ No newline at end of file diff --git a/hoover.min.js b/hoover.min.js index 37e93a8..6e856d8 100644 --- a/hoover.min.js +++ b/hoover.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).JsonicHoover=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,s)=>{let o=r(e,i,l,s);if(t===o.tin){let t={};throw null!=o.use&&(t.use=o.use),new p(o.why||d.unexpected,t,o,e,n)}return o},e},t.charset=S,t.clean=O,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,k,v,b,x,y,j,I,E,T,M,N,P,w,C,_,R,A,L,Y,F,J,K,U,B,$,V,z,Z,q,G,D,X,H,W,Q,ee,te,ne,re,ie,le,se,oe,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(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||{},o(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=o(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:S(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:S(null===(x=n.line)||void 0===x?void 0:x.chars),rowChars:S(null===(y=n.line)||void 0===y?void 0:y.rowChars),single:!!(null===(j=n.line)||void 0===j?void 0:j.single),check:null===(I=n.line)||void 0===I?void 0:I.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===(P=n.number)||void 0===P?void 0:P.lex),hex:!!(null===(w=n.number)||void 0===w?void 0:w.hex),oct:!!(null===(C=n.number)||void 0===C?void 0:C.oct),bin:!!(null===(_=n.number)||void 0===_?void 0:_.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:o((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:o((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===(U=n.rule)||void 0===U?void 0:U.start)?"val":n.rule.start,maxmul:null==(null===(B=n.rule)||void 0===B?void 0:B.maxmul)?3:n.rule.maxmul,finish:!!(null===($=n.rule)||void 0===$?void 0:$.finish),include:(null===(V=n.rule)||void 0===V?void 0:V.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===(q=n.map)||void 0===q?void 0:q.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===(D=n.comment)||void 0===D?void 0:D.lex)?(n.comment.def?s(n.comment.def):[]).filter(e=>e&&e.lex).map(e=>f(e.start)).join("|"):"",he=["([",f(l(S(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)?o(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:s(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===(oe=null===(se=n.debug)||void 0===se?void 0:se.print)||void 0===oe?void 0:oe.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=k,t.escre=f,t.extract=b,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=I,t.srcfmt=y,t.tokenize=m,t.trimstk=v,t.parserwrap=function(e){return{start:function(t,n,l,s){try{return e.start(t,n,l,s)}catch(o){if("SyntaxError"===o.name){let s=0,a=0,c=0,u=r.EMPTY,d=o.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);if(d){u=d[1],s=parseInt(d[2]),a=t.substring(0,s).replace(/[^\n]/g,r.EMPTY).length;let e=s-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 o}}}},t.prop=E,t.str=j,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 s=e=>null==e?[]:Object.values(e);t.values=s;const o=e=>null==e?[]:Object.entries(e);t.entries=o;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),v(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,s=null!=i&&(d.object===typeof i||l);if(r&&s&&!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:s?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 k(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 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 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,s,o;try{let a=i.cfg,c=i.meta,u=k(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,b(i.src(),u,n),"",k((a.hint[e]||(null===(o=null===(s=t.use)||void 0===s?void 0:s.err)||void 0===o?void 0:o.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(/]$/,o(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 O(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=s;class o{constructor(e,t,n,i,l,s,o){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=s,this.why=o,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 o(...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,s(-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 s=t.pnt,o=t.src.substring(s.sI),a="o"===i.state?0:1;for(let e of n)if(e.match instanceof RegExp){let n=o.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 s=t.pnt,o=t.src.substring(s.sI),a=s.rI,c=s.cI;for(let i of r)if(o.startsWith(i.start)){let n=o.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,s=r.src.substring(l.sI),o=e.value.def,a=e.value.defre,u=s.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,s=t.src.substring(i.sI),o=e.value.def,a=s.match(r);if(a){let n,r=a[1],s=a[9],u=!0;if(null!=r&&(u=!e.number.exclude||!r.match(e.number.exclude))){let s=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:s,escChar:o,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(l[h[f]]){const l=h[f],b=f,x=g,y=c[l];++f,++k;let j,I=[];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:s}=t,{sI:o,rI:a}=l,c=e.line.single;for(c&&(n={});r[s[o]]&&!(n&&(n[s[o]]=(n[s[o]]||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:s}=r;for(;n[i[l]];)l++,s++;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({}),s={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=s;var o={};Object.defineProperty(o,"__esModule",{value:!0}),o.makeRuleSpec=o.makeNoRule=o.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);o.makeRule=u,o.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",i=((0,a.isarr)(t)?t:[t]).filter(e=>null!=e&&"object"==typeof e).map(e=>k(e)),l="o"===e?"open":"close",s=this.def[l];return s[r](...i),s=this.def[l]=(0,a.modlist)(s,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=>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,i){t.log&&t.log(a.S.rule,t,e,n);let l="o"===i,s=l?e:t.NORULE,o=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 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(i,e),e)):null,s.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}o.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 o.makeRule}}),Object.defineProperty(v,"makeRuleSpec",{enumerable:!0,get:function(){return o.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,o.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,s=(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:()=>l,plgn:()=>t.internal().plugins,inst:()=>t,rule:{},sub:t.internal().sub,xs:-1,v2:s,v1:s,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,i);let u=(0,o.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,o.makeRule)(p,c);l=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(s.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 j={};function I(e){const{deep:t}=e.util,{OB:n,CB:r,OS:i,CS:l,CL:s,CA:o,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,s],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:[o],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:[o],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,s],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:[o],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:[o],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,s],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:[[o,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:[o],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:[o],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:[o,r],c:e=>e.lte("pk"),b:1,g:"map,pair,comma,jsonic"},{s:[o,u],g:"end,jsonic"},{s:[o],c:e=>e.lte("pk"),r:"pair",g:"map,pair,json"},{s:[o],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,o,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:[o,o],b:2,u:{done:!0},a:e=>e.node.push(null),g:"list,elem,imp,null,jsonic"},{s:[o],u:{done:!0},a:e=>e.node.push(null),g:"list,elem,imp,null,jsonic"},{s:[p,s],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:[o,[l,u]],b:1,g:"list,elem,comma,jsonic"},{s:[o],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(j,"__esModule",{value:!0}),j.grammar=I,j.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 I(t),t};var S={exports:{}};Object.defineProperty(S.exports,"__esModule",{value:!0}),S.exports.root=S.exports.S=S.exports.EMPTY=S.exports.AFTER=S.exports.BEFORE=S.exports.CLOSE=S.exports.OPEN=S.exports.makeTextMatcher=S.exports.makeNumberMatcher=S.exports.makeCommentMatcher=S.exports.makeStringMatcher=S.exports.makeLineMatcher=S.exports.makeSpaceMatcher=S.exports.makeFixedMatcher=S.exports.makeParser=S.exports.makeLex=S.exports.makeRuleSpec=S.exports.makeRule=S.exports.makePoint=S.exports.makeToken=S.exports.util=S.exports.JsonicError=S.exports.Jsonic=void 0,S.exports.make=M,Object.defineProperty(S.exports,"OPEN",{enumerable:!0,get:function(){return r.OPEN}}),Object.defineProperty(S.exports,"CLOSE",{enumerable:!0,get:function(){return r.CLOSE}}),Object.defineProperty(S.exports,"BEFORE",{enumerable:!0,get:function(){return r.BEFORE}}),Object.defineProperty(S.exports,"AFTER",{enumerable:!0,get:function(){return r.AFTER}}),Object.defineProperty(S.exports,"EMPTY",{enumerable:!0,get:function(){return r.EMPTY}});const O=t({});Object.defineProperty(S.exports,"JsonicError",{enumerable:!0,get:function(){return O.JsonicError}}),Object.defineProperty(S.exports,"S",{enumerable:!0,get:function(){return O.S}});const E=n({});Object.defineProperty(S.exports,"makePoint",{enumerable:!0,get:function(){return E.makePoint}}),Object.defineProperty(S.exports,"makeToken",{enumerable:!0,get:function(){return E.makeToken}}),Object.defineProperty(S.exports,"makeLex",{enumerable:!0,get:function(){return E.makeLex}}),Object.defineProperty(S.exports,"makeFixedMatcher",{enumerable:!0,get:function(){return E.makeFixedMatcher}}),Object.defineProperty(S.exports,"makeSpaceMatcher",{enumerable:!0,get:function(){return E.makeSpaceMatcher}}),Object.defineProperty(S.exports,"makeLineMatcher",{enumerable:!0,get:function(){return E.makeLineMatcher}}),Object.defineProperty(S.exports,"makeStringMatcher",{enumerable:!0,get:function(){return E.makeStringMatcher}}),Object.defineProperty(S.exports,"makeCommentMatcher",{enumerable:!0,get:function(){return E.makeCommentMatcher}}),Object.defineProperty(S.exports,"makeNumberMatcher",{enumerable:!0,get:function(){return E.makeNumberMatcher}}),Object.defineProperty(S.exports,"makeTextMatcher",{enumerable:!0,get:function(){return E.makeTextMatcher}}),Object.defineProperty(S.exports,"makeRule",{enumerable:!0,get:function(){return v.makeRule}}),Object.defineProperty(S.exports,"makeRuleSpec",{enumerable:!0,get:function(){return v.makeRuleSpec}}),Object.defineProperty(S.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 M(e,t){let n=!0;if("jsonic"===e)n=!1;else if("json"===e)return(0,j.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,O.deep)({},t?{...t.options}:!1===(null==e?void 0:e.defaults$)?{}:i.defaults,e||{}),s=function(e,t,n){var r;if(O.S.string===typeof e){let i=s.internal();return((null===(r=o.parser)||void 0===r?void 0:r.start)?(0,O.parserwrap)(o.parser):i.parser).start(e,s,t,n)}return e},o=e=>{if(null!=e&&O.S.object===typeof e){(0,O.deep)(l,e),(0,O.configure)(s,r.config,l);let t=s.internal().parser;r.parser=t.clone(l,r.config)}return{...s.options}},a={token:e=>(0,O.tokenize)(e,r.config,s),tokenSet:e=>(0,O.findTokenSet)(e,r.config),fixed:e=>r.config.fixed.ref[e],options:(0,O.deep)(o,l),config:()=>(0,O.deep)(r.config),parse:s,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||{});s.options({plugin:{[n]:r}});let i=s.options.plugin[n];return s.internal().plugins.push(e),e.options=i,e(s,i)||s},rule:(e,t)=>s.internal().parser.rule(e,t)||s,make:e=>M(e,s),empty:e=>M({defaults$:!1,standard$:!1,grammar$:!1,...e||{}}),id:"Jsonic/"+Date.now()+"/"+(""+Math.random()).substring(2,8).padEnd(6,"0")+(null==o.tag?"":"/"+o.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)),s),util:T};if((0,O.defprop)(a.make,O.S.name,{value:O.S.make}),n?(0,O.assign)(s,a):(0,O.assign)(s,{empty:a.empty,parse:a.parse,sub:a.sub,id:a.id,toString:a.toString}),(0,O.defprop)(s,"internal",{value:()=>r}),t){for(let n in t)void 0===s[n]&&(s[n]=t[n]);s.parent=t;let e=t.internal();r.config=(0,O.deep)({},e.config),(0,O.configure)(s,r.config,l),(0,O.assign)(s.token,r.config.t),r.plugins=[...e.plugins],r.parser=e.parser.clone(l,r.config)}else{let e={...s,...a};r.config=(0,O.configure)(e,void 0,l),r.plugins=[],r.parser=(0,v.makeParser)(l,r.config),!1!==l.grammar$&&(0,j.grammar)(e)}return s}let N;S.exports.util=T,S.exports.root=N;let P=S.exports.root=N=M("jsonic");return S.exports.Jsonic=P,N.Jsonic=N,N.JsonicError=O.JsonicError,N.makeLex=E.makeLex,N.makeParser=v.makeParser,N.makeToken=E.makeToken,N.makePoint=E.makePoint,N.makeRule=v.makeRule,N.makeRuleSpec=v.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=O.S,S.exports.default=P,S.exports=P,S.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.Hoover=t.parseToEnd=void 0;const n=(t,n)=>{var l;const{entries:s}=t.util;let o=s(n.block).map(e=>({allowUnknownEscape:!0,preserveEscapeChar:!1,token:"#HV",...e[1],name:e[0]})),a={};for(let e of o)e.TOKEN=t.token(e.token),a[e.token]||t.rule("val",t=>{t.open({s:[e.TOKEN],a:n.action})}),a[e.token]=e.TOKEN;t.options({lex:{match:{hoover:{order:null===(l=n.lex)||void 0===l?void 0:l.order,make:(t,n)=>function(n){for(let l of o){const s=(0,e.makePoint)(n.pnt.len,n.pnt.sI,n.pnt.rI,n.pnt.cI);if(r(n,s,l).match){let e=i(n,s,l,t);if(e.done){let t=n.token(l.TOKEN,e.val,n.src.substring(n.pnt.sI,s.sI),s);return t.use={block:l.name},n.pnt.sI=s.sI,n.pnt.rI=s.rI,n.pnt.cI=s.cI,t}return e.bad||n.bad("invalid_text",n.pnt.sI,s.sI)}}}}}}})};function r(e,t,n){let r=e.src,i=t.sI,l=t.rI,s=t.cI,o=n.start||{},a=o.rule||{},c=null;a.parent&&(a.parent.include&&(c=a.parent.include.includes(e.ctx.rule.parent.name)&&(null===c||c)),a.parent.exclude&&(c=!a.parent.exclude.includes(e.ctx.rule.parent.name)&&(null===c||c))),a.current&&(a.current.include&&(c=a.current.include.includes(e.ctx.rule.name)&&(null===c||c)),a.current.exclude&&(c=!a.current.exclude.includes(e.ctx.rule.name)&&(null===c||c)));let u=""===a.state?"":a.state||"o";u&&(c=u.includes(e.ctx.rule.state)&&(null===c||c));let d=!0,p=o.fixed;if(c&&null!=p){d=!1,p=Array.isArray(p)?p:[p];for(let e=0;!d&&ee[0]),c=o.map(e=>e.substring(1)),u=n.escapeChar,d=t.sI,p=t.rI,m=t.cI,h=!1,f="",g=d,k=0;e:do{if(f=l[d],-1<(k=a.indexOf(f))){let e=c[k];if(void 0===e||""===e){g=d+1,h=!0;break e}if("string"==typeof e&&e===l.substring(d+1,d+1+e.length)){g=d+1+e.length,h=!0;break e}}if(u===f){let t=n.escape[l[d+1]];if(null!=t)f=t,d++,m++;else{if(!n.allowUnknownEscape)return{done:!1,val:"",bad:e.bad("invalid_escape",d,d+1)};f=n.preserveEscapeChar?l.substring(d,d+2):l[d+1],d++}}i.push(f),d++,m++,"\n"===f&&(p++,m=0)}while(d<=l.length);if(h){if(!1!==s.consume){let e=l.substring(d,g);if(!Array.isArray(s.consume)||s.consume.includes(e)){let e=d;for(;e{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.charset=S,t.clean=O,t.clone=function(e){return g(Object.create(Object.getPrototypeOf(e)),e)},t.configure=function(e,t,n){var r,l,c,d,p,g,k,v,b,x,y,j,I,E,M,T,N,w,P,_,C,R,A,L,Y,F,J,K,U,B,$,V,z,Z,q,G,D,X,H,W,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=>f(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,f(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])=>[f(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:S(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:S(null===(x=n.line)||void 0===x?void 0:x.chars),rowChars:S(null===(y=n.line)||void 0===y?void 0:y.rowChars),single:!!(null===(j=n.line)||void 0===j?void 0:j.single),check:null===(I=n.line)||void 0===I?void 0:I.check},ce.text={lex:!!(null===(E=n.text)||void 0===E?void 0:E.lex),modify:((null===(M=ce.text)||void 0===M?void 0:M.modify)||[]).concat(((null===(T=n.text)||void 0===T?void 0:T.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===(w=n.number)||void 0===w?void 0:w.lex),hex:!!(null===(P=n.number)||void 0===P?void 0:P.hex),oct:!!(null===(_=n.number)||void 0===_?void 0:_.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===(U=n.rule)||void 0===U?void 0:U.start)?"val":n.rule.start,maxmul:null==(null===(B=n.rule)||void 0===B?void 0:B.maxmul)?3:n.rule.maxmul,finish:!!(null===($=n.rule)||void 0===$?void 0:$.finish),include:(null===(V=n.rule)||void 0===V?void 0:V.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===(q=n.map)||void 0===q?void 0:q.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=>h(e)).join("|"),fe=(null===(D=n.comment)||void 0===D?void 0:D.lex)?(n.comment.def?o(n.comment.def):[]).filter(e=>e&&e.lex).map(e=>h(e.start)).join("|"):"",me=["([",h(i(S(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=>"|"+h(e)).join(""),""===pe?"":"|",pe,""===fe?"":"|",fe,"|$)"];return ce.rePart={fixed:pe,ender:me,commentStart:fe},ce.re={ender:m(null,...me),rowChars:m(null,h(null===(X=n.line)||void 0===X?void 0:X.rowChars)),columns:m(null,"["+h(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],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.deep=g,t.errdesc=x,t.errinject=k,t.escre=h,t.errsite=v,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,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.mesc=function(e,t){return(t=new String(e)).esc=!0,t},t.regexp=m,t.snip=I,t.srcfmt=y,t.tokenize=f,t.trimstk=function(e){e.stack&&(e.stack=e.stack.split("\n").filter(e=>!e.includes("jsonic/jsonic")).map(e=>e.replace(/ at /,"at ")).join("\n"))},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:m,v1:m,t0:m,t1:m,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}}}},t.prop=E,t.str=j,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},t.errmsg=b;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)}}function f(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 m(e,...t){return new RegExp(t.map(e=>e.esc?h(e.toString()):e).join(r.EMPTY),null==e?"":e)}function h(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){return function(e,t,n){let r=typeof e,l=Array.isArray(e)?"array":null==e?"string":"object"===r?r:"string",i="object"===l?e:"array"===l?e.reduce((e,t,n)=>(e[n]=t,e),{}):{_:e},o=null==t?{}:t;return Object.entries(i).map(e=>i[e[0]]=null==e[1]?"":(""+e[1]).replace(/\{([\w_0-9.]+)}/g,(e,t)=>{var r;let l=E(o,t);if(l=void 0===l?e:l,"object"==typeof l){let e=null===(r=null==l?void 0:l.constructor)||void 0===r?void 0:r.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})),"string"===l?i._:"array"===l?Object.values(i):i}(e,{...i||{},...i.cfg||{},...i.opts||{},...r||{},...l||{},...i.meta||{},...n||{},code:t,details:n,token:r,rule:l,ctx:i},{indent:" "})}function v(e){let{src:t,sub:n,msg:l,cline:i,row:o,col:s,pos:a}=e;o=null!=o&&0e+(n(null==i?"":i)+(r.EMPTY+f++).padStart(p," ")+" | "+(null==i?"":"\x1b[0m")+(null==e?r.EMPTY:e),h=u.length;return[2null!=e).join("\n")}function b(e){const t=null!=e.color&&"object"==typeof e.color?e.color:void 0,n=!0===e.color||t,r={reset:n?"\x1b[0m":"",hi:n?"\x1b[91m":"",lo:n?"\x1b[2m":"",line:n?"\x1b[34m":"",...t||{}};return[null==e.prefix?null:"function"==typeof e.prefix?e.prefix(r,e):""+e.prefix,(null==e.code?"":r.hi+"["+(null==e.name?"":e.name+"/")+e.code+"]:")+r.reset+" "+(null==e.msg?"":e.msg),null!=e.row&&null!=e.col||null!=e.file?" "+r.line+"--\x3e"+r.reset+" "+(null==e.file?"":e.file)+(null==e.row||null==e.col?"":":"+e.row+":"+e.col):null,null==e.src?"":v({src:e.src,sub:e.sub,msg:e.smsg||e.msg,cline:r.line,row:e.row,col:e.col,pos:e.pos})+"\n",null==e.hint?null:e.hint,null==e.suffix?null:"function"==typeof e.suffix?e.suffix(r,e):""+e.suffix].filter(e=>null!=e).join("\n")}function x(e,t,n,r,l){var i,o,s;try{let a=l.cfg,c=l.meta,u=k({msg: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,hint:(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),d=b({code:e,name:"jsonic",msg:u.msg,hint:u.hint,src:l.src(),file:c?c.fileName:void 0,row:n.rI,col:n.cI,pos:n.sI,sub:n.src,color:!0,suffix:e=>[""," "+e.lo+"https://jsonic.senecajs.org"+e.reset," "+e.lo+"--internal: tag="+(l.opts.tag||"")+"; rule="+r.name+"~"+r.state+"; token="+f(n.tin,l.cfg)+(null==n.why?"":"~"+n.why)+"; plugins="+l.plgn().map(e=>e.name).join(",")+"--"+e.reset].join("\n")}),p={internal:{token:n,ctx:l}};return p={...Object.create(p),message:d,code:e,details:t,meta:c,fileName:c?c.fileName:void 0,lineNumber:n.rI,columnNumber:n.cI},p}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}function E(e,t,n){let r=e;try{let r,l=t.split(".");for(let t=0;tnew 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:f,src:m}=t,{sI:h,rI:g,cI:k}=f,v=m.length;if(i[m[h]]){const i=m[h],b=h,x=g,y=c[i];++h,++k;let j,I=[];for(;hfunction(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}",end_of_source:"unexpected end of source"},hint:{unknown:"\nSince 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:"\nThe 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:"\nThe 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:"\nThe 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:"\nString 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:"\nThis string has no end quote.",unterminated_comment:"\nThis comment is never closed.",unknown_rule:"\nNo rule named $rulename is defined. This is probably an error in the\ngrammar of a plugin.",end_of_source:"\nUnexpected end of source."},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),f=p(),m=p();class h{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 h(...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 f=(0,s.makeRule)(p,c);i=f;let m=2*(0,b.keys)(this.rsm).length*d.src.length*2*c.cfg.rule.maxmul,h=0;for(;u!==f&&he(f,c)),f=f.process(c,d),c.log&&c.log(b.S.stack,c,f,d),h++;if(o.tin!==d.next(f).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 j={};function I(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,f=(e,t)=>{if(!t.cfg.rule.finish)return t.t0.err="end_of_source",t.t0},m=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:m,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 h=(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:f,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:f,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:f,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&&h(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:f,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:m,g:"elem,pair,jsonic"}]).bc((e,t)=>{!0===e.u.pair&&(e.u.prev=e.node[e.u.key],h(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:f,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(j,"__esModule",{value:!0}),j.grammar=I,j.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 I(t),t};var S={exports:{}};Object.defineProperty(S.exports,"__esModule",{value:!0}),S.exports.root=S.exports.S=S.exports.EMPTY=S.exports.AFTER=S.exports.BEFORE=S.exports.CLOSE=S.exports.OPEN=S.exports.makeTextMatcher=S.exports.makeNumberMatcher=S.exports.makeCommentMatcher=S.exports.makeStringMatcher=S.exports.makeLineMatcher=S.exports.makeSpaceMatcher=S.exports.makeFixedMatcher=S.exports.makeParser=S.exports.makeLex=S.exports.makeRuleSpec=S.exports.makeRule=S.exports.makePoint=S.exports.makeToken=S.exports.util=S.exports.JsonicError=S.exports.Jsonic=void 0,S.exports.make=T,Object.defineProperty(S.exports,"OPEN",{enumerable:!0,get:function(){return r.OPEN}}),Object.defineProperty(S.exports,"CLOSE",{enumerable:!0,get:function(){return r.CLOSE}}),Object.defineProperty(S.exports,"BEFORE",{enumerable:!0,get:function(){return r.BEFORE}}),Object.defineProperty(S.exports,"AFTER",{enumerable:!0,get:function(){return r.AFTER}}),Object.defineProperty(S.exports,"EMPTY",{enumerable:!0,get:function(){return r.EMPTY}});const O=t({});Object.defineProperty(S.exports,"JsonicError",{enumerable:!0,get:function(){return O.JsonicError}}),Object.defineProperty(S.exports,"S",{enumerable:!0,get:function(){return O.S}});const E=n({});Object.defineProperty(S.exports,"makePoint",{enumerable:!0,get:function(){return E.makePoint}}),Object.defineProperty(S.exports,"makeToken",{enumerable:!0,get:function(){return E.makeToken}}),Object.defineProperty(S.exports,"makeLex",{enumerable:!0,get:function(){return E.makeLex}}),Object.defineProperty(S.exports,"makeFixedMatcher",{enumerable:!0,get:function(){return E.makeFixedMatcher}}),Object.defineProperty(S.exports,"makeSpaceMatcher",{enumerable:!0,get:function(){return E.makeSpaceMatcher}}),Object.defineProperty(S.exports,"makeLineMatcher",{enumerable:!0,get:function(){return E.makeLineMatcher}}),Object.defineProperty(S.exports,"makeStringMatcher",{enumerable:!0,get:function(){return E.makeStringMatcher}}),Object.defineProperty(S.exports,"makeCommentMatcher",{enumerable:!0,get:function(){return E.makeCommentMatcher}}),Object.defineProperty(S.exports,"makeNumberMatcher",{enumerable:!0,get:function(){return E.makeNumberMatcher}}),Object.defineProperty(S.exports,"makeTextMatcher",{enumerable:!0,get:function(){return E.makeTextMatcher}}),Object.defineProperty(S.exports,"makeRule",{enumerable:!0,get:function(){return v.makeRule}}),Object.defineProperty(S.exports,"makeRuleSpec",{enumerable:!0,get:function(){return v.makeRuleSpec}}),Object.defineProperty(S.exports,"makeParser",{enumerable:!0,get:function(){return v.makeParser}});const M={tokenize:O.tokenize,srcfmt:O.srcfmt,clone:O.clone,charset:O.charset,trimstk:O.trimstk,makelog:O.makelog,badlex:O.badlex,errsite:O.errsite,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,errmsg:O.errmsg,deep:O.deep,omap:O.omap,keys:O.keys,values:O.values,entries:O.entries};function T(e,t){let n=!0;if("jsonic"===e)n=!1;else if("json"===e)return(0,j.makeJSON)(N);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=>T(e,o),empty:e=>T({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:M};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,j.grammar)(e)}return o}let N;S.exports.util=M,S.exports.root=N;let w=S.exports.root=N=T("jsonic");return S.exports.Jsonic=w,N.Jsonic=N,N.JsonicError=O.JsonicError,N.makeLex=E.makeLex,N.makeParser=v.makeParser,N.makeToken=E.makeToken,N.makePoint=E.makePoint,N.makeRule=v.makeRule,N.makeRuleSpec=v.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=M,N.make=T,N.S=O.S,S.exports.default=w,S.exports=w,S.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.Hoover=void 0,t.parseToEnd=l;const n=(t,n)=>{var i;const{entries:o}=t.util;let s=o(n.block).map(e=>({allowUnknownEscape:!0,preserveEscapeChar:!1,token:"#HV",...e[1],name:e[0]})),a={};for(let e of s)e.TOKEN=t.token(e.token),a[e.token]||t.rule("val",t=>{t.open({s:[e.TOKEN],a:n.action})}),a[e.token]=e.TOKEN;t.options({lex:{match:{hoover:{order:null===(i=n.lex)||void 0===i?void 0:i.order,make:(t,n)=>function(n){for(let i of s){const o=(0,e.makePoint)(n.pnt.len,n.pnt.sI,n.pnt.rI,n.pnt.cI);if(r(n,o,i).match){let e=l(n,o,i,t);if(e.done){let t=n.token(i.TOKEN,e.val,n.src.substring(n.pnt.sI,o.sI),o);return t.use={block:i.name},n.pnt.sI=o.sI,n.pnt.rI=o.rI,n.pnt.cI=o.cI,t}return e.bad||n.bad("invalid_text",n.pnt.sI,o.sI)}}}}}}})};function r(e,t,n){let r=e.src,l=t.sI,i=t.rI,o=t.cI,s=n.start||{},a=s.rule||{},c=null;a.parent&&(a.parent.include&&(c=a.parent.include.includes(e.ctx.rule.parent.name)&&(null===c||c)),a.parent.exclude&&(c=!a.parent.exclude.includes(e.ctx.rule.parent.name)&&(null===c||c))),a.current&&(a.current.include&&(c=a.current.include.includes(e.ctx.rule.name)&&(null===c||c)),a.current.exclude&&(c=!a.current.exclude.includes(e.ctx.rule.name)&&(null===c||c)));let u=""===a.state?"":a.state||"o";u&&(c=u.includes(e.ctx.rule.state)&&(null===c||c));let d=!0,p=s.fixed;if(c&&null!=p){d=!1,p=Array.isArray(p)?p:[p];for(let e=0;!d&&ee[0]),c=s.map(e=>e.substring(1)),u=n.escapeChar,d=t.sI,p=t.rI,f=t.cI,m=!1,h="",g=d,k=0;e:do{if(h=i[d],-1<(k=a.indexOf(h))){let e=c[k];if(void 0===e||""===e){g=d+1,m=!0;break e}if("string"==typeof e&&e===i.substring(d+1,d+1+e.length)){g=d+1+e.length,m=!0;break e}}if(u===h){let t=n.escape[i[d+1]];if(null!=t)h=t,d++,f++;else{if(!n.allowUnknownEscape)return{done:!1,val:"",bad:e.bad("invalid_escape",d,d+1)};h=n.preserveEscapeChar?i.substring(d,d+2):i[d+1],d++}}l.push(h),d++,f++,"\n"===h&&(p++,f=0)}while(d<=i.length);if(m){if(!1!==o.consume){let e=i.substring(d,g);if(!Array.isArray(o.consume)||o.consume.includes(e)){let e=d;for(;e=2.13.0", + "@jsonic/jsonic-next": ">=2.14.0", "@types/jest": "^29.5.14", "browserify": "^17.0.1", "es-jest": "^2.1.0", @@ -53,6 +53,6 @@ "typescript": "^5.6.3" }, "peerDependencies": { - "@jsonic/jsonic-next": ">=2.13.0" + "@jsonic/jsonic-next": ">=2.14.0" } }