@noormdev/cli 1.0.0-alpha.8 → 1.0.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,214 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as vn,c as v,e as jl}from"./chunk-UR6MHSHU.js";var T=v(Q=>{"use strict";var Cs=Symbol.for("yaml.alias"),Zu=Symbol.for("yaml.document"),Qn=Symbol.for("yaml.map"),eo=Symbol.for("yaml.pair"),Ss=Symbol.for("yaml.scalar"),Xn=Symbol.for("yaml.seq"),Oe=Symbol.for("yaml.node.type"),sh=t=>!!t&&typeof t=="object"&&t[Oe]===Cs,ih=t=>!!t&&typeof t=="object"&&t[Oe]===Zu,uh=t=>!!t&&typeof t=="object"&&t[Oe]===Qn,oh=t=>!!t&&typeof t=="object"&&t[Oe]===eo,to=t=>!!t&&typeof t=="object"&&t[Oe]===Ss,ah=t=>!!t&&typeof t=="object"&&t[Oe]===Xn;function no(t){if(t&&typeof t=="object")switch(t[Oe]){case Qn:case Xn:return!0}return!1}function ch(t){if(t&&typeof t=="object")switch(t[Oe]){case Cs:case Qn:case Ss:case Xn:return!0}return!1}var lh=t=>(to(t)||no(t))&&!!t.anchor;Q.ALIAS=Cs;Q.DOC=Zu;Q.MAP=Qn;Q.NODE_TYPE=Oe;Q.PAIR=eo;Q.SCALAR=Ss;Q.SEQ=Xn;Q.hasAnchor=lh;Q.isAlias=sh;Q.isCollection=no;Q.isDocument=ih;Q.isMap=uh;Q.isNode=ch;Q.isPair=oh;Q.isScalar=to;Q.isSeq=ah});var Ut=v(vs=>{"use strict";var J=T(),te=Symbol("break visit"),ro=Symbol("skip children"),Ee=Symbol("remove node");function Zn(t,e){let n=so(e);J.isDocument(t)?bt(null,t.contents,n,Object.freeze([t]))===Ee&&(t.contents=null):bt(null,t,n,Object.freeze([]))}Zn.BREAK=te;Zn.SKIP=ro;Zn.REMOVE=Ee;function bt(t,e,n,r){let s=io(t,e,n,r);if(J.isNode(s)||J.isPair(s))return uo(t,r,s),bt(t,s,n,r);if(typeof s!="symbol"){if(J.isCollection(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){let u=bt(i,e.items[i],n,r);if(typeof u=="number")i=u-1;else{if(u===te)return te;u===Ee&&(e.items.splice(i,1),i-=1)}}}else if(J.isPair(e)){r=Object.freeze(r.concat(e));let i=bt("key",e.key,n,r);if(i===te)return te;i===Ee&&(e.key=null);let u=bt("value",e.value,n,r);if(u===te)return te;u===Ee&&(e.value=null)}}return s}async function er(t,e){let n=so(e);J.isDocument(t)?await Et(null,t.contents,n,Object.freeze([t]))===Ee&&(t.contents=null):await Et(null,t,n,Object.freeze([]))}er.BREAK=te;er.SKIP=ro;er.REMOVE=Ee;async function Et(t,e,n,r){let s=await io(t,e,n,r);if(J.isNode(s)||J.isPair(s))return uo(t,r,s),Et(t,s,n,r);if(typeof s!="symbol"){if(J.isCollection(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){let u=await Et(i,e.items[i],n,r);if(typeof u=="number")i=u-1;else{if(u===te)return te;u===Ee&&(e.items.splice(i,1),i-=1)}}}else if(J.isPair(e)){r=Object.freeze(r.concat(e));let i=await Et("key",e.key,n,r);if(i===te)return te;i===Ee&&(e.key=null);let u=await Et("value",e.value,n,r);if(u===te)return te;u===Ee&&(e.value=null)}}return s}function so(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function io(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(J.isMap(e))return n.Map?.(t,e,r);if(J.isSeq(e))return n.Seq?.(t,e,r);if(J.isPair(e))return n.Pair?.(t,e,r);if(J.isScalar(e))return n.Scalar?.(t,e,r);if(J.isAlias(e))return n.Alias?.(t,e,r)}function uo(t,e,n){let r=e[e.length-1];if(J.isCollection(r))r.items[t]=n;else if(J.isPair(r))t==="key"?r.key=n:r.value=n;else if(J.isDocument(r))r.contents=n;else{let s=J.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}vs.visit=Zn;vs.visitAsync=er});var Fs=v(ao=>{"use strict";var oo=T(),fh=Ut(),hh={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},dh=t=>t.replace(/[!,[\]{}]/g,e=>hh[e]),Kt=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[i,u]=r;return this.tags[i]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let u=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,u),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let u=e.slice(2,-1);return u==="!"||u==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),u)}let[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(u){return n(String(u)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+dh(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(e&&r.length>0&&oo.isNode(e.contents)){let i={};fh.visit(e.contents,(u,o)=>{oo.isNode(o)&&o.tag&&(i[o.tag]=!0)}),s=Object.keys(i)}else s=[];for(let[i,u]of r)i==="!!"&&u==="tag:yaml.org,2002:"||(!e||s.some(o=>o.startsWith(u)))&&n.push(`%TAG ${i} ${u}`);return n.join(`
3
- `)}};Kt.defaultYaml={explicit:!1,version:"1.2"};Kt.defaultTags={"!!":"tag:yaml.org,2002:"};ao.Directives=Kt});var tr=v(Vt=>{"use strict";var co=T(),ph=Ut();function mh(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function lo(t){let e=new Set;return ph.visit(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function fo(t,e){for(let n=1;;++n){let r=`${t}${n}`;if(!e.has(r))return r}}function gh(t,e){let n=[],r=new Map,s=null;return{onAnchor:i=>{n.push(i),s??(s=lo(t));let u=fo(e,s);return s.add(u),u},setAnchors:()=>{for(let i of n){let u=r.get(i);if(typeof u=="object"&&u.anchor&&(co.isScalar(u.node)||co.isCollection(u.node)))u.node.anchor=u.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=i,o}}},sourceObjects:r}}Vt.anchorIsValid=mh;Vt.anchorNames=lo;Vt.createNodeAnchors=gh;Vt.findNewAnchor=fo});var _s=v(ho=>{"use strict";function zt(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){let u=r[s],o=zt(t,r,String(s),u);o===void 0?delete r[s]:o!==u&&(r[s]=o)}else if(r instanceof Map)for(let s of Array.from(r.keys())){let i=r.get(s),u=zt(t,r,s,i);u===void 0?r.delete(s):u!==i&&r.set(s,u)}else if(r instanceof Set)for(let s of Array.from(r)){let i=zt(t,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(let[s,i]of Object.entries(r)){let u=zt(t,r,s,i);u===void 0?delete r[s]:u!==i&&(r[s]=u)}return t.call(e,n,r)}ho.applyReviver=zt});var qe=v(mo=>{"use strict";var yh=T();function po(t,e,n){if(Array.isArray(t))return t.map((r,s)=>po(r,String(s),n));if(t&&typeof t.toJSON=="function"){if(!n||!yh.hasAnchor(t))return t.toJSON(e,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=i=>{r.res=i,delete n.onCreate};let s=t.toJSON(e,n);return n.onCreate&&n.onCreate(s),s}return typeof t=="bigint"&&!n?.keep?Number(t):t}mo.toJS=po});var nr=v(yo=>{"use strict";var Dh=_s(),go=T(),bh=qe(),xs=class{constructor(e){Object.defineProperty(this,go.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!go.isDocument(e))throw new TypeError("A document argument is required");let u={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=bh.toJS(this,"",u);if(typeof s=="function")for(let{count:a,res:c}of u.anchors.values())s(c,a);return typeof i=="function"?Dh.applyReviver(i,{"":o},"",o):o}};yo.NodeBase=xs});var Wt=v(Do=>{"use strict";var Eh=tr(),Ah=Ut(),At=T(),wh=nr(),Ch=qe(),Ns=class extends wh.NodeBase{constructor(e){super(At.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Ah.visit(e,{Node:(i,u)=>{(At.isAlias(u)||At.hasAnchor(u))&&r.push(u)}}),n&&(n.aliasResolveCache=r));let s;for(let i of r){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(e,n){if(!n)return{source:this.source};let{anchors:r,doc:s,maxAliasCount:i}=n,u=this.resolve(s,n);if(!u){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let o=r.get(u);if(o||(Ch.toJS(u,null,n),o=r.get(u)),o?.res===void 0){let a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=rr(s,u,r)),o.count*o.aliasCount>i)){let a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return o.res}toString(e,n,r){let s=`*${this.source}`;if(e){if(Eh.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${s} `}return s}};function rr(t,e,n){if(At.isAlias(e)){let r=e.resolve(t),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(At.isCollection(e)){let r=0;for(let s of e.items){let i=rr(t,s,n);i>r&&(r=i)}return r}else if(At.isPair(e)){let r=rr(t,e.key,n),s=rr(t,e.value,n);return Math.max(r,s)}return 1}Do.Alias=Ns});var W=v(Bs=>{"use strict";var Sh=T(),vh=nr(),Fh=qe(),_h=t=>!t||typeof t!="function"&&typeof t!="object",Me=class extends vh.NodeBase{constructor(e){super(Sh.SCALAR),this.value=e}toJSON(e,n){return n?.keep?this.value:Fh.toJS(this.value,e,n)}toString(){return String(this.value)}};Me.BLOCK_FOLDED="BLOCK_FOLDED";Me.BLOCK_LITERAL="BLOCK_LITERAL";Me.PLAIN="PLAIN";Me.QUOTE_DOUBLE="QUOTE_DOUBLE";Me.QUOTE_SINGLE="QUOTE_SINGLE";Bs.Scalar=Me;Bs.isScalarValue=_h});var Jt=v(Eo=>{"use strict";var xh=Wt(),st=T(),bo=W(),Nh="tag:yaml.org,2002:";function Bh(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>r.identify?.(t)&&!r.format)}function Oh(t,e,n){if(st.isDocument(t)&&(t=t.contents),st.isNode(t))return t;if(st.isPair(t)){let l=n.schema[st.MAP].createNode?.(n.schema,null,n);return l.items.push(t),l}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:u,sourceObjects:o}=n,a;if(r&&t&&typeof t=="object"){if(a=o.get(t),a)return a.anchor??(a.anchor=s(t)),new xh.Alias(a.anchor);a={anchor:null,node:null},o.set(t,a)}e?.startsWith("!!")&&(e=Nh+e.slice(2));let c=Bh(t,e,u.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let l=new bo.Scalar(t);return a&&(a.node=l),l}c=t instanceof Map?u[st.MAP]:Symbol.iterator in Object(t)?u[st.SEQ]:u[st.MAP]}i&&(i(c),delete n.onTagObj);let d=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new bo.Scalar(t);return e?d.tag=e:c.default||(d.tag=c.tag),a&&(a.node=d),d}Eo.createNode=Oh});var ir=v(sr=>{"use strict";var kh=Jt(),Ae=T(),Ih=nr();function Os(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let u=[];u[i]=r,r=u}else r=new Map([[i,r]])}return kh.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var Ao=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,ks=class extends Ih.NodeBase{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>Ae.isNode(r)||Ae.isPair(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Ao(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(Ae.isCollection(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Os(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(e){let[n,...r]=e;if(r.length===0)return this.delete(n);let s=this.get(n,!0);if(Ae.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){let[r,...s]=e,i=this.get(r,!0);return s.length===0?!n&&Ae.isScalar(i)?i.value:i:Ae.isCollection(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Ae.isPair(n))return!1;let r=n.value;return r==null||e&&Ae.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[n,...r]=e;if(r.length===0)return this.has(n);let s=this.get(n,!0);return Ae.isCollection(s)?s.hasIn(r):!1}setIn(e,n){let[r,...s]=e;if(s.length===0)this.set(r,n);else{let i=this.get(r,!0);if(Ae.isCollection(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,Os(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}};sr.Collection=ks;sr.collectionFromPath=Os;sr.isEmptyPath=Ao});var Yt=v(ur=>{"use strict";var Th=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Is(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Lh=(t,e,n)=>t.endsWith(`
4
- `)?Is(n,e):n.includes(`
5
- `)?`
6
- `+Is(n,e):(t.endsWith(" ")?"":" ")+n;ur.indentComment=Is;ur.lineComment=Lh;ur.stringifyComment=Th});var Co=v(Ht=>{"use strict";var Ph="flow",Ts="block",or="quoted";function Rh(t,e,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:u,onOverflow:o}={}){if(!s||s<0)return t;s<i&&(i=0);let a=Math.max(1+i,1+s-e.length);if(t.length<=a)return t;let c=[],d={},l=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?c.push(0):l=s-r);let f,m,y=!1,h=-1,p=-1,g=-1;n===Ts&&(h=wo(t,h,e.length),h!==-1&&(l=h+a));for(let E;E=t[h+=1];){if(n===or&&E==="\\"){switch(p=h,t[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}g=h}if(E===`
7
- `)n===Ts&&(h=wo(t,h,e.length)),l=h+e.length+a,f=void 0;else{if(E===" "&&m&&m!==" "&&m!==`
8
- `&&m!==" "){let A=t[h+1];A&&A!==" "&&A!==`
9
- `&&A!==" "&&(f=h)}if(h>=l)if(f)c.push(f),l=f+a,f=void 0;else if(n===or){for(;m===" "||m===" ";)m=E,E=t[h+=1],y=!0;let A=h>g+1?h-2:p-1;if(d[A])return t;c.push(A),d[A]=!0,l=A+a,f=void 0}else y=!0}m=E}if(y&&o&&o(),c.length===0)return t;u&&u();let D=t.slice(0,c[0]);for(let E=0;E<c.length;++E){let A=c[E],C=c[E+1]||t.length;A===0?D=`
10
- ${e}${t.slice(0,C)}`:(n===or&&d[A]&&(D+=`${t[A]}\\`),D+=`
11
- ${e}${t.slice(A+1,C)}`)}return D}function wo(t,e,n){let r=e,s=e+1,i=t[s];for(;i===" "||i===" ";)if(e<s+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
12
- `);r=e,s=e+1,i=t[s]}return r}Ht.FOLD_BLOCK=Ts;Ht.FOLD_FLOW=Ph;Ht.FOLD_QUOTED=or;Ht.foldFlowLines=Rh});var Qt=v(So=>{"use strict";var ye=W(),$e=Co(),cr=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),lr=t=>/^(%|---|\.\.\.)/m.test(t);function qh(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,u=0;i<s;++i)if(t[i]===`
13
- `){if(i-u>r)return!0;if(u=i+1,s-u<=r)return!1}return!0}function Gt(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(lr(t)?" ":""),u="",o=0;for(let a=0,c=n[a];c;c=n[++a])if(c===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(u+=n.slice(o,a)+"\\ ",a+=1,o=a,c="\\"),c==="\\")switch(n[a+1]){case"u":{u+=n.slice(o,a);let d=n.substr(a+2,4);switch(d){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:d.substr(0,2)==="00"?u+="\\x"+d.substr(2):u+=n.substr(a,6)}a+=5,o=a+1}break;case"n":if(r||n[a+2]==='"'||n.length<s)a+=1;else{for(u+=n.slice(o,a)+`
14
-
15
- `;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)u+=`
16
- `,a+=2;u+=i,n[a+2]===" "&&(u+="\\"),a+=1,o=a+1}break;default:a+=1}return u=o?u+n.slice(o):n,r?u:$e.foldFlowLines(u,i,$e.FOLD_QUOTED,cr(e,!1))}function Ls(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
17
- `)||/[ \t]\n|\n[ \t]/.test(t))return Gt(t,e);let n=e.indent||(lr(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
18
- ${n}`)+"'";return e.implicitKey?r:$e.foldFlowLines(r,n,$e.FOLD_FLOW,cr(e,!1))}function wt(t,e){let{singleQuote:n}=e.options,r;if(n===!1)r=Gt;else{let s=t.includes('"'),i=t.includes("'");s&&!i?r=Ls:i&&!s?r=Gt:r=n?Ls:Gt}return r(t,e)}var Ps;try{Ps=new RegExp(`(^|(?<!
19
- ))
20
- +(?!
21
- |$)`,"g")}catch{Ps=/\n+(?!\n|$)/g}function ar({comment:t,type:e,value:n},r,s,i){let{blockQuote:u,commentString:o,lineWidth:a}=r.options;if(!u||/\n[\t ]+$/.test(n))return wt(n,r);let c=r.indent||(r.forceBlockIndent||lr(n)?" ":""),d=u==="literal"?!0:u==="folded"||e===ye.Scalar.BLOCK_FOLDED?!1:e===ye.Scalar.BLOCK_LITERAL?!0:!qh(n,a,c.length);if(!n)return d?`|
22
- `:`>
23
- `;let l,f;for(f=n.length;f>0;--f){let C=n[f-1];if(C!==`
24
- `&&C!==" "&&C!==" ")break}let m=n.substring(f),y=m.indexOf(`
25
- `);y===-1?l="-":n===m||y!==m.length-1?(l="+",i&&i()):l="",m&&(n=n.slice(0,-m.length),m[m.length-1]===`
26
- `&&(m=m.slice(0,-1)),m=m.replace(Ps,`$&${c}`));let h=!1,p,g=-1;for(p=0;p<n.length;++p){let C=n[p];if(C===" ")h=!0;else if(C===`
27
- `)g=p;else break}let D=n.substring(0,g<p?g+1:p);D&&(n=n.substring(D.length),D=D.replace(/\n+/g,`$&${c}`));let A=(h?c?"2":"1":"")+l;if(t&&(A+=" "+o(t.replace(/ ?[\r\n]+/g," ")),s&&s()),!d){let C=n.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),_=!1,x=cr(r,!0);u!=="folded"&&e!==ye.Scalar.BLOCK_FOLDED&&(x.onOverflow=()=>{_=!0});let S=$e.foldFlowLines(`${D}${C}${m}`,c,$e.FOLD_BLOCK,x);if(!_)return`>${A}
29
- ${c}${S}`}return n=n.replace(/\n+/g,`$&${c}`),`|${A}
30
- ${c}${D}${n}${m}`}function Mh(t,e,n,r){let{type:s,value:i}=t,{actualString:u,implicitKey:o,indent:a,indentStep:c,inFlow:d}=e;if(o&&i.includes(`
31
- `)||d&&/[[\]{},]/.test(i))return wt(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||d||!i.includes(`
32
- `)?wt(i,e):ar(t,e,n,r);if(!o&&!d&&s!==ye.Scalar.PLAIN&&i.includes(`
33
- `))return ar(t,e,n,r);if(lr(i)){if(a==="")return e.forceBlockIndent=!0,ar(t,e,n,r);if(o&&a===c)return wt(i,e)}let l=i.replace(/\n+/g,`$&
34
- ${a}`);if(u){let f=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(l),{compat:m,tags:y}=e.doc.schema;if(y.some(f)||m?.some(f))return wt(i,e)}return o?l:$e.foldFlowLines(l,a,$e.FOLD_FLOW,cr(e,!1))}function $h(t,e,n,r){let{implicitKey:s,inFlow:i}=e,u=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:o}=t;o!==ye.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(o=ye.Scalar.QUOTE_DOUBLE);let a=d=>{switch(d){case ye.Scalar.BLOCK_FOLDED:case ye.Scalar.BLOCK_LITERAL:return s||i?wt(u.value,e):ar(u,e,n,r);case ye.Scalar.QUOTE_DOUBLE:return Gt(u.value,e);case ye.Scalar.QUOTE_SINGLE:return Ls(u.value,e);case ye.Scalar.PLAIN:return Mh(u,e,n,r);default:return null}},c=a(o);if(c===null){let{defaultKeyType:d,defaultStringType:l}=e.options,f=s&&d||l;if(c=a(f),c===null)throw new Error(`Unsupported default string type ${f}`)}return c}So.stringifyString=$h});var Xt=v(Rs=>{"use strict";var jh=tr(),je=T(),Uh=Yt(),Kh=Qt();function Vh(t,e){let n=Object.assign({blockQuote:!0,commentString:Uh.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function zh(t,e){if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)??s[0]}let n,r;if(je.isScalar(e)){r=e.value;let s=t.filter(i=>i.identify?.(r));if(s.length>1){let i=s.filter(u=>u.test);i.length>0&&(s=i)}n=s.find(i=>i.format===e.format)??s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function Wh(t,e,{anchors:n,doc:r}){if(!r.directives)return"";let s=[],i=(je.isScalar(t)||je.isCollection(t))&&t.anchor;i&&jh.anchorIsValid(i)&&(n.add(i),s.push(`&${i}`));let u=t.tag??(e.default?null:e.tag);return u&&s.push(r.directives.tagString(u)),s.join(" ")}function Jh(t,e,n,r){if(je.isPair(t))return t.toString(e,n,r);if(je.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s,i=je.isNode(t)?t:e.doc.createNode(t,{onTagObj:a=>s=a});s??(s=zh(e.doc.schema.tags,i));let u=Wh(i,s,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);let o=typeof s.stringify=="function"?s.stringify(i,e,n,r):je.isScalar(i)?Kh.stringifyString(i,e,n,r):i.toString(e,n,r);return u?je.isScalar(i)||o[0]==="{"||o[0]==="["?`${u} ${o}`:`${u}
35
- ${e.indent}${o}`:o}Rs.createStringifyContext=Vh;Rs.stringify=Jh});var xo=v(_o=>{"use strict";var ke=T(),vo=W(),Fo=Xt(),Zt=Yt();function Yh({key:t,value:e},n,r,s){let{allNullValues:i,doc:u,indent:o,indentStep:a,options:{commentString:c,indentSeq:d,simpleKeys:l}}=n,f=ke.isNode(t)&&t.comment||null;if(l){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(ke.isCollection(t)||!ke.isNode(t)&&typeof t=="object"){let x="With simple keys, collection cannot be used as a key value";throw new Error(x)}}let m=!l&&(!t||f&&e==null&&!n.inFlow||ke.isCollection(t)||(ke.isScalar(t)?t.type===vo.Scalar.BLOCK_FOLDED||t.type===vo.Scalar.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!m&&(l||!i),indent:o+a});let y=!1,h=!1,p=Fo.stringify(t,n,()=>y=!0,()=>h=!0);if(!m&&!n.inFlow&&p.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(n.inFlow){if(i||e==null)return y&&r&&r(),p===""?"?":m?`? ${p}`:p}else if(i&&!l||e==null&&m)return p=`? ${p}`,f&&!y?p+=Zt.lineComment(p,n.indent,c(f)):h&&s&&s(),p;y&&(f=null),m?(f&&(p+=Zt.lineComment(p,n.indent,c(f))),p=`? ${p}
36
- ${o}:`):(p=`${p}:`,f&&(p+=Zt.lineComment(p,n.indent,c(f))));let g,D,E;ke.isNode(e)?(g=!!e.spaceBefore,D=e.commentBefore,E=e.comment):(g=!1,D=null,E=null,e&&typeof e=="object"&&(e=u.createNode(e))),n.implicitKey=!1,!m&&!f&&ke.isScalar(e)&&(n.indentAtStart=p.length+1),h=!1,!d&&a.length>=2&&!n.inFlow&&!m&&ke.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let A=!1,C=Fo.stringify(e,n,()=>A=!0,()=>h=!0),_=" ";if(f||g||D){if(_=g?`
37
- `:"",D){let x=c(D);_+=`
38
- ${Zt.indentComment(x,n.indent)}`}C===""&&!n.inFlow?_===`
39
- `&&E&&(_=`
40
-
41
- `):_+=`
42
- ${n.indent}`}else if(!m&&ke.isCollection(e)){let x=C[0],S=C.indexOf(`
43
- `),R=S!==-1,H=n.inFlow??e.flow??e.items.length===0;if(R||!H){let k=!1;if(R&&(x==="&"||x==="!")){let q=C.indexOf(" ");x==="&"&&q!==-1&&q<S&&C[q+1]==="!"&&(q=C.indexOf(" ",q+1)),(q===-1||S<q)&&(k=!0)}k||(_=`
44
- ${n.indent}`)}}else(C===""||C[0]===`
45
- `)&&(_="");return p+=_+C,n.inFlow?A&&r&&r():E&&!A?p+=Zt.lineComment(p,n.indent,c(E)):h&&s&&s(),p}_o.stringifyPair=Yh});var Ms=v(qs=>{"use strict";var No=vn("process");function Hh(t,...e){t==="debug"&&console.log(...e)}function Gh(t,e){(t==="debug"||t==="warn")&&(typeof No.emitWarning=="function"?No.emitWarning(e):console.warn(e))}qs.debug=Hh;qs.warn=Gh});var pr=v(dr=>{"use strict";var en=T(),Bo=W(),fr="<<",hr={identify:t=>t===fr||typeof t=="symbol"&&t.description===fr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Bo.Scalar(Symbol(fr)),{addToJSMap:Oo}),stringify:()=>fr},Qh=(t,e)=>(hr.identify(e)||en.isScalar(e)&&(!e.type||e.type===Bo.Scalar.PLAIN)&&hr.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===hr.tag&&n.default);function Oo(t,e,n){if(n=t&&en.isAlias(n)?n.resolve(t.doc):n,en.isSeq(n))for(let r of n.items)$s(t,e,r);else if(Array.isArray(n))for(let r of n)$s(t,e,r);else $s(t,e,n)}function $s(t,e,n){let r=t&&en.isAlias(n)?n.resolve(t.doc):n;if(!en.isMap(r))throw new Error("Merge sources must be maps or map aliases");let s=r.toJSON(null,t,Map);for(let[i,u]of s)e instanceof Map?e.has(i)||e.set(i,u):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}dr.addMergeToJSMap=Oo;dr.isMergeKey=Qh;dr.merge=hr});var Us=v(To=>{"use strict";var Xh=Ms(),ko=pr(),Zh=Xt(),Io=T(),js=qe();function ed(t,e,{key:n,value:r}){if(Io.isNode(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(ko.isMergeKey(t,n))ko.addMergeToJSMap(t,e,r);else{let s=js.toJS(n,"",t);if(e instanceof Map)e.set(s,js.toJS(r,s,t));else if(e instanceof Set)e.add(s);else{let i=td(n,s,t),u=js.toJS(r,i,t);i in e?Object.defineProperty(e,i,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[i]=u}}return e}function td(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(Io.isNode(t)&&n?.doc){let r=Zh.createStringifyContext(n.doc,{});r.anchors=new Set;for(let i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;let s=t.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),Xh.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(e)}To.addPairToJSMap=ed});var Ue=v(Ks=>{"use strict";var Lo=Jt(),nd=xo(),rd=Us(),mr=T();function sd(t,e,n){let r=Lo.createNode(t,void 0,n),s=Lo.createNode(e,void 0,n);return new gr(r,s)}var gr=class t{constructor(e,n=null){Object.defineProperty(this,mr.NODE_TYPE,{value:mr.PAIR}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return mr.isNode(n)&&(n=n.clone(e)),mr.isNode(r)&&(r=r.clone(e)),new t(n,r)}toJSON(e,n){let r=n?.mapAsMap?new Map:{};return rd.addPairToJSMap(n,r,this)}toString(e,n,r){return e?.doc?nd.stringifyPair(this,e,n,r):JSON.stringify(this)}};Ks.Pair=gr;Ks.createPair=sd});var Vs=v(Ro=>{"use strict";var it=T(),Po=Xt(),yr=Yt();function id(t,e,n){return(e.inFlow??t.flow?od:ud)(t,e,n)}function ud({comment:t,items:e},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:u,onComment:o}){let{indent:a,options:{commentString:c}}=n,d=Object.assign({},n,{indent:i,type:null}),l=!1,f=[];for(let y=0;y<e.length;++y){let h=e[y],p=null;if(it.isNode(h))!l&&h.spaceBefore&&f.push(""),Dr(n,f,h.commentBefore,l),h.comment&&(p=h.comment);else if(it.isPair(h)){let D=it.isNode(h.key)?h.key:null;D&&(!l&&D.spaceBefore&&f.push(""),Dr(n,f,D.commentBefore,l))}l=!1;let g=Po.stringify(h,d,()=>p=null,()=>l=!0);p&&(g+=yr.lineComment(g,i,c(p))),l&&p&&(l=!1),f.push(r+g)}let m;if(f.length===0)m=s.start+s.end;else{m=f[0];for(let y=1;y<f.length;++y){let h=f[y];m+=h?`
46
- ${a}${h}`:`
47
- `}}return t?(m+=`
48
- `+yr.indentComment(c(t),a),o&&o()):l&&u&&u(),m}function od({items:t},e,{flowChars:n,itemIndent:r}){let{indent:s,indentStep:i,flowCollectionPadding:u,options:{commentString:o}}=e;r+=i;let a=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,d=0,l=[];for(let y=0;y<t.length;++y){let h=t[y],p=null;if(it.isNode(h))h.spaceBefore&&l.push(""),Dr(e,l,h.commentBefore,!1),h.comment&&(p=h.comment);else if(it.isPair(h)){let D=it.isNode(h.key)?h.key:null;D&&(D.spaceBefore&&l.push(""),Dr(e,l,D.commentBefore,!1),D.comment&&(c=!0));let E=it.isNode(h.value)?h.value:null;E?(E.comment&&(p=E.comment),E.commentBefore&&(c=!0)):h.value==null&&D?.comment&&(p=D.comment)}p&&(c=!0);let g=Po.stringify(h,a,()=>p=null);y<t.length-1&&(g+=","),p&&(g+=yr.lineComment(g,r,o(p))),!c&&(l.length>d||g.includes(`
49
- `))&&(c=!0),l.push(g),d=l.length}let{start:f,end:m}=n;if(l.length===0)return f+m;if(!c){let y=l.reduce((h,p)=>h+p.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=f;for(let h of l)y+=h?`
50
- ${i}${s}${h}`:`
51
- `;return`${y}
52
- ${s}${m}`}else return`${f}${u}${l.join(" ")}${u}${m}`}function Dr({indent:t,options:{commentString:e}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){let i=yr.indentComment(e(r),t);n.push(i.trimStart())}}Ro.stringifyCollection=id});var Ve=v(Ws=>{"use strict";var ad=Vs(),cd=Us(),ld=ir(),Ke=T(),br=Ue(),fd=W();function tn(t,e){let n=Ke.isScalar(e)?e.value:e;for(let r of t)if(Ke.isPair(r)&&(r.key===e||r.key===n||Ke.isScalar(r.key)&&r.key.value===n))return r}var zs=class extends ld.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ke.MAP,e),this.items=[]}static from(e,n,r){let{keepUndefined:s,replacer:i}=r,u=new this(e),o=(a,c)=>{if(typeof i=="function")c=i.call(n,a,c);else if(Array.isArray(i)&&!i.includes(a))return;(c!==void 0||s)&&u.items.push(br.createPair(a,c,r))};if(n instanceof Map)for(let[a,c]of n)o(a,c);else if(n&&typeof n=="object")for(let a of Object.keys(n))o(a,n[a]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,n){let r;Ke.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new br.Pair(e,e?.value):r=new br.Pair(e.key,e.value);let s=tn(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);Ke.isScalar(s.value)&&fd.isScalarValue(r.value)?s.value.value=r.value:s.value=r.value}else if(i){let u=this.items.findIndex(o=>i(r,o)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){let n=tn(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let s=tn(this.items,e)?.value;return(!n&&Ke.isScalar(s)?s.value:s)??void 0}has(e){return!!tn(this.items,e)}set(e,n){this.add(new br.Pair(e,n),!0)}toJSON(e,n,r){let s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(let i of this.items)cd.addPairToJSMap(n,s,i);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!Ke.isPair(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ad.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}};Ws.YAMLMap=zs;Ws.findPair=tn});var Ct=v(Mo=>{"use strict";var hd=T(),qo=Ve(),dd={collection:"map",default:!0,nodeClass:qo.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return hd.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>qo.YAMLMap.from(t,e,n)};Mo.map=dd});var ze=v($o=>{"use strict";var pd=Jt(),md=Vs(),gd=ir(),Ar=T(),yd=W(),Dd=qe(),Js=class extends gd.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ar.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=Er(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Er(e);if(typeof r!="number")return;let s=this.items[r];return!n&&Ar.isScalar(s)?s.value:s}has(e){let n=Er(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=Er(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let s=this.items[r];Ar.isScalar(s)&&yd.isScalarValue(n)?s.value=n:this.items[r]=n}toJSON(e,n){let r=[];n?.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(Dd.toJS(i,String(s++),n));return r}toString(e,n,r){return e?md.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){let{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n)){let u=0;for(let o of n){if(typeof s=="function"){let a=n instanceof Set?o:String(u++);o=s.call(n,a,o)}i.items.push(pd.createNode(o,void 0,r))}}return i}};function Er(t){let e=Ar.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}$o.YAMLSeq=Js});var St=v(Uo=>{"use strict";var bd=T(),jo=ze(),Ed={collection:"seq",default:!0,nodeClass:jo.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return bd.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>jo.YAMLSeq.from(t,e,n)};Uo.seq=Ed});var nn=v(Ko=>{"use strict";var Ad=Qt(),wd={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Ad.stringifyString(t,e,n,r)}};Ko.string=wd});var wr=v(Wo=>{"use strict";var Vo=W(),zo={identify:t=>t==null,createNode:()=>new Vo.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Vo.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&zo.test.test(t)?t:e.options.nullStr};Wo.nullTag=zo});var Ys=v(Yo=>{"use strict";var Cd=W(),Jo={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Cd.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Jo.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};Yo.boolTag=Jo});var vt=v(Ho=>{"use strict";function Sd({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);let s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let u=i.indexOf(".");u<0&&(u=i.length,i+=".");let o=e-(i.length-u-1);for(;o-- >0;)i+="0"}return i}Ho.stringifyNumber=Sd});var Gs=v(Cr=>{"use strict";var vd=W(),Hs=vt(),Fd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Hs.stringifyNumber},_d={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Hs.stringifyNumber(t)}},xd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new vd.Scalar(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Hs.stringifyNumber};Cr.float=xd;Cr.floatExp=_d;Cr.floatNaN=Fd});var Xs=v(vr=>{"use strict";var Go=vt(),Sr=t=>typeof t=="bigint"||Number.isInteger(t),Qs=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function Qo(t,e,n){let{value:r}=t;return Sr(r)&&r>=0?n+r.toString(e):Go.stringifyNumber(t)}var Nd={identify:t=>Sr(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Qs(t,2,8,n),stringify:t=>Qo(t,8,"0o")},Bd={identify:Sr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Qs(t,0,10,n),stringify:Go.stringifyNumber},Od={identify:t=>Sr(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Qs(t,2,16,n),stringify:t=>Qo(t,16,"0x")};vr.int=Bd;vr.intHex=Od;vr.intOct=Nd});var Zo=v(Xo=>{"use strict";var kd=Ct(),Id=wr(),Td=St(),Ld=nn(),Pd=Ys(),Zs=Gs(),ei=Xs(),Rd=[kd.map,Td.seq,Ld.string,Id.nullTag,Pd.boolTag,ei.intOct,ei.int,ei.intHex,Zs.floatNaN,Zs.floatExp,Zs.float];Xo.schema=Rd});var na=v(ta=>{"use strict";var qd=W(),Md=Ct(),$d=St();function ea(t){return typeof t=="bigint"||Number.isInteger(t)}var Fr=({value:t})=>JSON.stringify(t),jd=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Fr},{identify:t=>t==null,createNode:()=>new qd.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Fr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Fr},{identify:ea,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>ea(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Fr}],Ud={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Kd=[Md.map,$d.seq].concat(jd,Ud);ta.schema=Kd});var ni=v(ra=>{"use strict";var rn=vn("buffer"),ti=W(),Vd=Qt(),zd={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof rn.Buffer=="function")return rn.Buffer.from(t,"base64");if(typeof atob=="function"){let n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,s,i){if(!n)return"";let u=n,o;if(typeof rn.Buffer=="function")o=u instanceof rn.Buffer?u.toString("base64"):rn.Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<u.length;++c)a+=String.fromCharCode(u[c]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ti.Scalar.BLOCK_LITERAL),e!==ti.Scalar.QUOTE_DOUBLE){let a=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(o.length/a),d=new Array(c);for(let l=0,f=0;l<c;++l,f+=a)d[l]=o.substr(f,a);o=d.join(e===ti.Scalar.BLOCK_LITERAL?`
53
- `:" ")}return Vd.stringifyString({comment:t,type:e,value:o},r,s,i)}};ra.binary=zd});var Nr=v(xr=>{"use strict";var _r=T(),ri=Ue(),Wd=W(),Jd=ze();function sa(t,e){if(_r.isSeq(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!_r.isPair(r)){if(_r.isMap(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");let s=r.items[0]||new ri.Pair(new Wd.Scalar(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
54
- ${s.key.commentBefore}`:r.commentBefore),r.comment){let i=s.value??s.key;i.comment=i.comment?`${r.comment}
55
- ${i.comment}`:r.comment}r=s}t.items[n]=_r.isPair(r)?r:new ri.Pair(r)}}else e("Expected a sequence for this tag");return t}function ia(t,e,n){let{replacer:r}=n,s=new Jd.YAMLSeq(t);s.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof r=="function"&&(u=r.call(e,String(i++),u));let o,a;if(Array.isArray(u))if(u.length===2)o=u[0],a=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){let c=Object.keys(u);if(c.length===1)o=c[0],a=u[o];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=u;s.items.push(ri.createPair(o,a,n))}return s}var Yd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:sa,createNode:ia};xr.createPairs=ia;xr.pairs=Yd;xr.resolvePairs=sa});var ui=v(ii=>{"use strict";var ua=T(),si=qe(),sn=Ve(),Hd=ze(),oa=Nr(),ut=class t extends Hd.YAMLSeq{constructor(){super(),this.add=sn.YAMLMap.prototype.add.bind(this),this.delete=sn.YAMLMap.prototype.delete.bind(this),this.get=sn.YAMLMap.prototype.get.bind(this),this.has=sn.YAMLMap.prototype.has.bind(this),this.set=sn.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let r=new Map;n?.onCreate&&n.onCreate(r);for(let s of this.items){let i,u;if(ua.isPair(s)?(i=si.toJS(s.key,"",n),u=si.toJS(s.value,i,n)):i=si.toJS(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,u)}return r}static from(e,n,r){let s=oa.createPairs(e,n,r),i=new this;return i.items=s.items,i}};ut.tag="tag:yaml.org,2002:omap";var Gd={collection:"seq",identify:t=>t instanceof Map,nodeClass:ut,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=oa.resolvePairs(t,e),r=[];for(let{key:s}of n.items)ua.isScalar(s)&&(r.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new ut,n)},createNode:(t,e,n)=>ut.from(t,e,n)};ii.YAMLOMap=ut;ii.omap=Gd});var ha=v(oi=>{"use strict";var aa=W();function ca({value:t,source:e},n){return e&&(t?la:fa).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var la={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new aa.Scalar(!0),stringify:ca},fa={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new aa.Scalar(!1),stringify:ca};oi.falseTag=fa;oi.trueTag=la});var da=v(Br=>{"use strict";var Qd=W(),ai=vt(),Xd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ai.stringifyNumber},Zd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():ai.stringifyNumber(t)}},e0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Qd.Scalar(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:ai.stringifyNumber};Br.float=e0;Br.floatExp=Zd;Br.floatNaN=Xd});var ma=v(on=>{"use strict";var pa=vt(),un=t=>typeof t=="bigint"||Number.isInteger(t);function Or(t,e,n,{intAsBigInt:r}){let s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let u=BigInt(t);return s==="-"?BigInt(-1)*u:u}let i=parseInt(t,n);return s==="-"?-1*i:i}function ci(t,e,n){let{value:r}=t;if(un(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return pa.stringifyNumber(t)}var t0={identify:un,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Or(t,2,2,n),stringify:t=>ci(t,2,"0b")},n0={identify:un,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Or(t,1,8,n),stringify:t=>ci(t,8,"0")},r0={identify:un,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Or(t,0,10,n),stringify:pa.stringifyNumber},s0={identify:un,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Or(t,2,16,n),stringify:t=>ci(t,16,"0x")};on.int=r0;on.intBin=t0;on.intHex=s0;on.intOct=n0});var fi=v(li=>{"use strict";var Tr=T(),kr=Ue(),Ir=Ve(),ot=class t extends Ir.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let n;Tr.isPair(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new kr.Pair(e.key,null):n=new kr.Pair(e,null),Ir.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=Ir.findPair(this.items,e);return!n&&Tr.isPair(r)?Tr.isScalar(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=Ir.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new kr.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){let{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let u of n)typeof s=="function"&&(u=s.call(n,u,u)),i.items.push(kr.createPair(u,null,r));return i}};ot.tag="tag:yaml.org,2002:set";var i0={collection:"map",identify:t=>t instanceof Set,nodeClass:ot,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>ot.from(t,e,n),resolve(t,e){if(Tr.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new ot,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};li.YAMLSet=ot;li.set=i0});var di=v(Lr=>{"use strict";var u0=vt();function hi(t,e){let n=t[0],r=n==="-"||n==="+"?t.substring(1):t,s=u=>e?BigInt(u):Number(u),i=r.replace(/_/g,"").split(":").reduce((u,o)=>u*s(60)+s(o),s(0));return n==="-"?s(-1)*i:i}function ga(t){let{value:e}=t,n=u=>u;if(typeof e=="bigint")n=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return u0.stringifyNumber(t);let r="";e<0&&(r="-",e*=n(-1));let s=n(60),i=[e%s];return e<60?i.unshift(0):(e=(e-i[0])/s,i.unshift(e%s),e>=60&&(e=(e-i[0])/s,i.unshift(e))),r+i.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var o0={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>hi(t,n),stringify:ga},a0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>hi(t,!1),stringify:ga},ya={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(ya.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,s,i,u,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(n,r-1,s,i||0,u||0,o||0,a),d=e[8];if(d&&d!=="Z"){let l=hi(d,!1);Math.abs(l)<30&&(l*=60),c-=6e4*l}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Lr.floatTime=a0;Lr.intTime=o0;Lr.timestamp=ya});var Ea=v(ba=>{"use strict";var c0=Ct(),l0=wr(),f0=St(),h0=nn(),d0=ni(),Da=ha(),pi=da(),Pr=ma(),p0=pr(),m0=ui(),g0=Nr(),y0=fi(),mi=di(),D0=[c0.map,f0.seq,h0.string,l0.nullTag,Da.trueTag,Da.falseTag,Pr.intBin,Pr.intOct,Pr.int,Pr.intHex,pi.floatNaN,pi.floatExp,pi.float,d0.binary,p0.merge,m0.omap,g0.pairs,y0.set,mi.intTime,mi.floatTime,mi.timestamp];ba.schema=D0});var Ba=v(Di=>{"use strict";var Sa=Ct(),b0=wr(),va=St(),E0=nn(),A0=Ys(),gi=Gs(),yi=Xs(),w0=Zo(),C0=na(),Fa=ni(),an=pr(),_a=ui(),xa=Nr(),Aa=Ea(),Na=fi(),Rr=di(),wa=new Map([["core",w0.schema],["failsafe",[Sa.map,va.seq,E0.string]],["json",C0.schema],["yaml11",Aa.schema],["yaml-1.1",Aa.schema]]),Ca={binary:Fa.binary,bool:A0.boolTag,float:gi.float,floatExp:gi.floatExp,floatNaN:gi.floatNaN,floatTime:Rr.floatTime,int:yi.int,intHex:yi.intHex,intOct:yi.intOct,intTime:Rr.intTime,map:Sa.map,merge:an.merge,null:b0.nullTag,omap:_a.omap,pairs:xa.pairs,seq:va.seq,set:Na.set,timestamp:Rr.timestamp},S0={"tag:yaml.org,2002:binary":Fa.binary,"tag:yaml.org,2002:merge":an.merge,"tag:yaml.org,2002:omap":_a.omap,"tag:yaml.org,2002:pairs":xa.pairs,"tag:yaml.org,2002:set":Na.set,"tag:yaml.org,2002:timestamp":Rr.timestamp};function v0(t,e,n){let r=wa.get(e);if(r&&!t)return n&&!r.includes(an.merge)?r.concat(an.merge):r.slice();let s=r;if(!s)if(Array.isArray(t))s=[];else{let i=Array.from(wa.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(let i of t)s=s.concat(i);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(an.merge)),s.reduce((i,u)=>{let o=typeof u=="string"?Ca[u]:u;if(!o){let a=JSON.stringify(u),c=Object.keys(Ca).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return i.includes(o)||i.push(o),i},[])}Di.coreKnownTags=S0;Di.getTags=v0});var Ai=v(Oa=>{"use strict";var bi=T(),F0=Ct(),_0=St(),x0=nn(),qr=Ba(),N0=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,Ei=class t{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:u,toStringDefaults:o}){this.compat=Array.isArray(e)?qr.getTags(e,"compat"):e?qr.getTags(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?qr.coreKnownTags:{},this.tags=qr.getTags(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,bi.MAP,{value:F0.map}),Object.defineProperty(this,bi.SCALAR,{value:x0.string}),Object.defineProperty(this,bi.SEQ,{value:_0.seq}),this.sortMapEntries=typeof u=="function"?u:u===!0?N0:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Oa.Schema=Ei});var Ia=v(ka=>{"use strict";var B0=T(),wi=Xt(),cn=Yt();function O0(t,e){let n=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let a=t.directives.toString(t);a?(n.push(a),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");let s=wi.createStringifyContext(t,e),{commentString:i}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");let a=i(t.commentBefore);n.unshift(cn.indentComment(a,""))}let u=!1,o=null;if(t.contents){if(B0.isNode(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){let d=i(t.contents.commentBefore);n.push(cn.indentComment(d,""))}s.forceBlockIndent=!!t.comment,o=t.contents.comment}let a=o?void 0:()=>u=!0,c=wi.stringify(t.contents,s,()=>o=null,a);o&&(c+=cn.lineComment(c,"",i(o))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(wi.stringify(t.contents,s));if(t.directives?.docEnd)if(t.comment){let a=i(t.comment);a.includes(`
56
- `)?(n.push("..."),n.push(cn.indentComment(a,""))):n.push(`... ${a}`)}else n.push("...");else{let a=t.comment;a&&u&&(a=a.replace(/^\n+/,"")),a&&((!u||o)&&n[n.length-1]!==""&&n.push(""),n.push(cn.indentComment(i(a),"")))}return n.join(`
57
- `)+`
58
- `}ka.stringifyDocument=O0});var ln=v(Ta=>{"use strict";var k0=Wt(),Ft=ir(),le=T(),I0=Ue(),T0=qe(),L0=Ai(),P0=Ia(),Ci=tr(),R0=_s(),q0=Jt(),Si=Fs(),vi=class t{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,le.NODE_TYPE,{value:le.DOC});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:u}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new Si.Directives({version:u}),this.setSchema(u,r),this.contents=e===void 0?null:this.createNode(e,s,r)}clone(){let e=Object.create(t.prototype,{[le.NODE_TYPE]:{value:le.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=le.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){_t(this.contents)&&this.contents.add(e)}addIn(e,n){_t(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let r=Ci.anchorNames(this);e.anchor=!n||r.has(n)?Ci.findNewAnchor(n||"a",r):n}return new k0.Alias(e.anchor)}createNode(e,n,r){let s;if(typeof n=="function")e=n.call({"":e},"",e),s=n;else if(Array.isArray(n)){let p=D=>typeof D=="number"||D instanceof String||D instanceof Number,g=n.filter(p).map(String);g.length>0&&(n=n.concat(g)),s=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:i,anchorPrefix:u,flow:o,keepUndefined:a,onTagObj:c,tag:d}=r??{},{onAnchor:l,setAnchors:f,sourceObjects:m}=Ci.createNodeAnchors(this,u||"a"),y={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:l,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:m},h=q0.createNode(e,d,y);return o&&le.isCollection(h)&&(h.flow=!0),f(),h}createPair(e,n,r={}){let s=this.createNode(e,null,r),i=this.createNode(n,null,r);return new I0.Pair(s,i)}delete(e){return _t(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ft.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):_t(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return le.isCollection(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ft.isEmptyPath(e)?!n&&le.isScalar(this.contents)?this.contents.value:this.contents:le.isCollection(this.contents)?this.contents.getIn(e,n):void 0}has(e){return le.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Ft.isEmptyPath(e)?this.contents!==void 0:le.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Ft.collectionFromPath(this.schema,[e],n):_t(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ft.isEmptyPath(e)?this.contents=n:this.contents==null?this.contents=Ft.collectionFromPath(this.schema,Array.from(e),n):_t(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Si.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Si.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new L0.Schema(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:u}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=T0.toJS(this.contents,n??"",o);if(typeof i=="function")for(let{count:c,res:d}of o.anchors.values())i(d,c);return typeof u=="function"?R0.applyReviver(u,{"":a},"",a):a}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return P0.stringifyDocument(this,e)}};function _t(t){if(le.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}Ta.Document=vi});var dn=v(hn=>{"use strict";var fn=class extends Error{constructor(e,n,r,s){super(),this.name=e,this.code=r,this.message=s,this.pos=n}},Fi=class extends fn{constructor(e,n,r){super("YAMLParseError",e,n,r)}},_i=class extends fn{constructor(e,n,r){super("YAMLWarning",e,n,r)}},M0=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>e.linePos(o));let{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,u=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&u.length>80){let o=Math.min(i-39,u.length-79);u="\u2026"+u.substring(o),i-=o-1}if(u.length>80&&(u=u.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(u.substring(0,i))){let o=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
59
- `),u=o+u}if(/[^ ]/.test(u)){let o=1,a=n.linePos[1];a?.line===r&&a.col>s&&(o=Math.max(1,Math.min(a.col-s,80-i)));let c=" ".repeat(i)+"^".repeat(o);n.message+=`:
60
-
61
- ${u}
62
- ${c}
63
- `}};hn.YAMLError=fn;hn.YAMLParseError=Fi;hn.YAMLWarning=_i;hn.prettifyError=M0});var pn=v(La=>{"use strict";function $0(t,{flow:e,indicator:n,next:r,offset:s,onError:i,parentIndent:u,startOnNewline:o}){let a=!1,c=o,d=o,l="",f="",m=!1,y=!1,h=null,p=null,g=null,D=null,E=null,A=null,C=null;for(let S of t)switch(y&&(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma"&&i(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),h&&(c&&S.type!=="comment"&&S.type!=="newline"&&i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),S.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&S.source.includes(" ")&&(h=S),d=!0;break;case"comment":{d||i(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let R=S.source.substring(1)||" ";l?l+=f+R:l=R,f="",c=!1;break}case"newline":c?l?l+=S.source:(!A||n!=="seq-item-ind")&&(a=!0):f+=S.source,c=!0,m=!0,(p||g)&&(D=S),d=!0;break;case"anchor":p&&i(S,"MULTIPLE_ANCHORS","A node can have at most one anchor"),S.source.endsWith(":")&&i(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=S,C??(C=S.offset),c=!1,d=!1,y=!0;break;case"tag":{g&&i(S,"MULTIPLE_TAGS","A node can have at most one tag"),g=S,C??(C=S.offset),c=!1,d=!1,y=!0;break}case n:(p||g)&&i(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`),A&&i(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${e??"collection"}`),A=S,c=n==="seq-item-ind"||n==="explicit-key-ind",d=!1;break;case"comma":if(e){E&&i(S,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=S,c=!1,d=!1;break}default:i(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),c=!1,d=!1}let _=t[t.length-1],x=_?_.offset+_.source.length:s;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=u||r?.type==="block-map"||r?.type==="block-seq")&&i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:A,spaceBefore:a,comment:l,hasNewline:m,anchor:p,tag:g,newlineAfterProp:D,end:x,start:C??x}}La.resolveProps=$0});var Mr=v(Pa=>{"use strict";function xi(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
64
- `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(xi(e.key)||xi(e.value))return!0}return!1;default:return!0}}Pa.containsNewline=xi});var Ni=v(Ra=>{"use strict";var j0=Mr();function U0(t,e,n){if(e?.type==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&j0.containsNewline(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Ra.flowIndentCheck=U0});var Bi=v(Ma=>{"use strict";var qa=T();function K0(t,e,n){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let s=typeof r=="function"?r:(i,u)=>i===u||qa.isScalar(i)&&qa.isScalar(u)&&i.value===u.value;return e.some(i=>s(i.key,n))}Ma.mapIncludes=K0});var za=v(Va=>{"use strict";var $a=Ue(),V0=Ve(),ja=pn(),z0=Mr(),Ua=Ni(),W0=Bi(),Ka="All mapping items must start at the same column";function J0({composeNode:t,composeEmptyNode:e},n,r,s,i){let u=i?.nodeClass??V0.YAMLMap,o=new u(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,c=null;for(let d of r.items){let{start:l,key:f,sep:m,value:y}=d,h=ja.resolveProps(l,{indicator:"explicit-key-ind",next:f??m?.[0],offset:a,onError:s,parentIndent:r.indent,startOnNewline:!0}),p=!h.found;if(p){if(f&&(f.type==="block-seq"?s(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==r.indent&&s(a,"BAD_INDENT",Ka)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(o.comment?o.comment+=`
65
- `+h.comment:o.comment=h.comment);continue}(h.newlineAfterProp||z0.containsNewline(f))&&s(f??l[l.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==r.indent&&s(a,"BAD_INDENT",Ka);n.atKey=!0;let g=h.end,D=f?t(n,f,h,s):e(n,g,l,null,h,s);n.schema.compat&&Ua.flowIndentCheck(r.indent,f,s),n.atKey=!1,W0.mapIncludes(n,o.items,D)&&s(g,"DUPLICATE_KEY","Map keys must be unique");let E=ja.resolveProps(m??[],{indicator:"map-value-ind",next:y,offset:D.range[2],onError:s,parentIndent:r.indent,startOnNewline:!f||f.type==="block-scalar"});if(a=E.end,E.found){p&&(y?.type==="block-map"&&!E.hasNewline&&s(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&h.start<E.found.offset-1024&&s(D.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let A=y?t(n,y,E,s):e(n,a,m,null,E,s);n.schema.compat&&Ua.flowIndentCheck(r.indent,y,s),a=A.range[2];let C=new $a.Pair(D,A);n.options.keepSourceTokens&&(C.srcToken=d),o.items.push(C)}else{p&&s(D.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(D.comment?D.comment+=`
66
- `+E.comment:D.comment=E.comment);let A=new $a.Pair(D);n.options.keepSourceTokens&&(A.srcToken=d),o.items.push(A)}}return c&&c<a&&s(c,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,a,c??a],o}Va.resolveBlockMap=J0});var Ja=v(Wa=>{"use strict";var Y0=ze(),H0=pn(),G0=Ni();function Q0({composeNode:t,composeEmptyNode:e},n,r,s,i){let u=i?.nodeClass??Y0.YAMLSeq,o=new u(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let a=r.offset,c=null;for(let{start:d,value:l}of r.items){let f=H0.resolveProps(d,{indicator:"seq-item-ind",next:l,offset:a,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||l)l?.type==="block-seq"?s(f.end,"BAD_INDENT","All sequence items must start at the same column"):s(a,"MISSING_CHAR","Sequence item without - indicator");else{c=f.end,f.comment&&(o.comment=f.comment);continue}let m=l?t(n,l,f,s):e(n,f.end,d,null,f,s);n.schema.compat&&G0.flowIndentCheck(r.indent,l,s),a=m.range[2],o.items.push(m)}return o.range=[r.offset,a,c??a],o}Wa.resolveBlockSeq=Q0});var xt=v(Ya=>{"use strict";function X0(t,e,n,r){let s="";if(t){let i=!1,u="";for(let o of t){let{source:a,type:c}=o;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=a.substring(1)||" ";s?s+=u+d:s=d,u="";break}case"newline":s&&(u+=a),i=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=a.length}}return{comment:s,offset:e}}Ya.resolveEnd=X0});var Xa=v(Qa=>{"use strict";var Z0=T(),ep=Ue(),Ha=Ve(),tp=ze(),np=xt(),Ga=pn(),rp=Mr(),sp=Bi(),Oi="Block collections are not allowed within flow collections",ki=t=>t&&(t.type==="block-map"||t.type==="block-seq");function ip({composeNode:t,composeEmptyNode:e},n,r,s,i){let u=r.start.source==="{",o=u?"flow map":"flow sequence",a=i?.nodeClass??(u?Ha.YAMLMap:tp.YAMLSeq),c=new a(n.schema);c.flow=!0;let d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset+r.start.source.length;for(let p=0;p<r.items.length;++p){let g=r.items[p],{start:D,key:E,sep:A,value:C}=g,_=Ga.resolveProps(D,{flow:o,indicator:"explicit-key-ind",next:E??A?.[0],offset:l,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!_.found){if(!_.anchor&&!_.tag&&!A&&!C){p===0&&_.comma?s(_.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):p<r.items.length-1&&s(_.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),_.comment&&(c.comment?c.comment+=`
67
- `+_.comment:c.comment=_.comment),l=_.end;continue}!u&&n.options.strict&&rp.containsNewline(E)&&s(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)_.comma&&s(_.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(_.comma||s(_.start,"MISSING_CHAR",`Missing , between ${o} items`),_.comment){let x="";e:for(let S of D)switch(S.type){case"comma":case"space":break;case"comment":x=S.source.substring(1);break e;default:break e}if(x){let S=c.items[c.items.length-1];Z0.isPair(S)&&(S=S.value??S.key),S.comment?S.comment+=`
68
- `+x:S.comment=x,_.comment=_.comment.substring(x.length+1)}}if(!u&&!A&&!_.found){let x=C?t(n,C,_,s):e(n,_.end,A,null,_,s);c.items.push(x),l=x.range[2],ki(C)&&s(x.range,"BLOCK_IN_FLOW",Oi)}else{n.atKey=!0;let x=_.end,S=E?t(n,E,_,s):e(n,x,D,null,_,s);ki(E)&&s(S.range,"BLOCK_IN_FLOW",Oi),n.atKey=!1;let R=Ga.resolveProps(A??[],{flow:o,indicator:"map-value-ind",next:C,offset:S.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(R.found){if(!u&&!_.found&&n.options.strict){if(A)for(let q of A){if(q===R.found)break;if(q.type==="newline"){s(q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}_.start<R.found.offset-1024&&s(R.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?s(C,"MISSING_CHAR",`Missing space after : in ${o}`):s(R.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let H=C?t(n,C,R,s):R.found?e(n,R.end,A,null,R,s):null;H?ki(C)&&s(H.range,"BLOCK_IN_FLOW",Oi):R.comment&&(S.comment?S.comment+=`
69
- `+R.comment:S.comment=R.comment);let k=new ep.Pair(S,H);if(n.options.keepSourceTokens&&(k.srcToken=g),u){let q=c;sp.mapIncludes(n,q.items,S)&&s(x,"DUPLICATE_KEY","Map keys must be unique"),q.items.push(k)}else{let q=new Ha.YAMLMap(n.schema);q.flow=!0,q.items.push(k);let N=(H??S).range;q.range=[S.range[0],N[1],N[2]],c.items.push(q)}l=H?H.range[2]:R.end}}let f=u?"}":"]",[m,...y]=r.end,h=l;if(m?.source===f)h=m.offset+m.source.length;else{let p=o[0].toUpperCase()+o.substring(1),g=d?`${p} must end with a ${f}`:`${p} in block collection must be sufficiently indented and end with a ${f}`;s(l,d?"MISSING_CHAR":"BAD_INDENT",g),m&&m.source.length!==1&&y.unshift(m)}if(y.length>0){let p=np.resolveEnd(y,h,n.options.strict,s);p.comment&&(c.comment?c.comment+=`
70
- `+p.comment:c.comment=p.comment),c.range=[r.offset,h,p.offset]}else c.range=[r.offset,h,h];return c}Qa.resolveFlowCollection=ip});var ec=v(Za=>{"use strict";var up=T(),op=W(),ap=Ve(),cp=ze(),lp=za(),fp=Ja(),hp=Xa();function Ii(t,e,n,r,s,i){let u=n.type==="block-map"?lp.resolveBlockMap(t,e,n,r,i):n.type==="block-seq"?fp.resolveBlockSeq(t,e,n,r,i):hp.resolveFlowCollection(t,e,n,r,i),o=u.constructor;return s==="!"||s===o.tagName?(u.tag=o.tagName,u):(s&&(u.tag=s),u)}function dp(t,e,n,r,s){let i=r.tag,u=i?e.directives.tagName(i.source,f=>s(i,"TAG_RESOLVE_FAILED",f)):null;if(n.type==="block-seq"){let{anchor:f,newlineAfterProp:m}=r,y=f&&i?f.offset>i.offset?f:i:f??i;y&&(!m||m.offset<y.offset)&&s(y,"MISSING_CHAR","Missing newline after block sequence props")}let o=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!u||u==="!"||u===ap.YAMLMap.tagName&&o==="map"||u===cp.YAMLSeq.tagName&&o==="seq")return Ii(t,e,n,s,u);let a=e.schema.tags.find(f=>f.tag===u&&f.collection===o);if(!a){let f=e.schema.knownTags[u];if(f?.collection===o)e.schema.tags.push(Object.assign({},f,{default:!1})),a=f;else return f?s(i,"BAD_COLLECTION_TYPE",`${f.tag} used for ${o} collection, but expects ${f.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),Ii(t,e,n,s,u)}let c=Ii(t,e,n,s,u,a),d=a.resolve?.(c,f=>s(i,"TAG_RESOLVE_FAILED",f),e.options)??c,l=up.isNode(d)?d:new op.Scalar(d);return l.range=c.range,l.tag=u,a?.format&&(l.format=a.format),l}Za.composeCollection=dp});var Li=v(tc=>{"use strict";var Ti=W();function pp(t,e,n){let r=e.offset,s=mp(e,t.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};let i=s.mode===">"?Ti.Scalar.BLOCK_FOLDED:Ti.Scalar.BLOCK_LITERAL,u=e.source?gp(e.source):[],o=u.length;for(let h=u.length-1;h>=0;--h){let p=u[h][1];if(p===""||p==="\r")o=h;else break}if(o===0){let h=s.chomp==="+"&&u.length>0?`
71
- `.repeat(Math.max(1,u.length-1)):"",p=r+s.length;return e.source&&(p+=e.source.length),{value:h,type:i,comment:s.comment,range:[r,p,p]}}let a=e.indent+s.indent,c=e.offset+s.length,d=0;for(let h=0;h<o;++h){let[p,g]=u[h];if(g===""||g==="\r")s.indent===0&&p.length>a&&(a=p.length);else{p.length<a&&n(c+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(a=p.length),d=h,a===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=p.length+g.length+1}for(let h=u.length-1;h>=o;--h)u[h][0].length>a&&(o=h+1);let l="",f="",m=!1;for(let h=0;h<d;++h)l+=u[h][0].slice(a)+`
72
- `;for(let h=d;h<o;++h){let[p,g]=u[h];c+=p.length+g.length+1;let D=g[g.length-1]==="\r";if(D&&(g=g.slice(0,-1)),g&&p.length<a){let A=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(c-g.length-(D?2:1),"BAD_INDENT",A),p=""}i===Ti.Scalar.BLOCK_LITERAL?(l+=f+p.slice(a)+g,f=`
73
- `):p.length>a||g[0]===" "?(f===" "?f=`
74
- `:!m&&f===`
75
- `&&(f=`
76
-
77
- `),l+=f+p.slice(a)+g,f=`
78
- `,m=!0):g===""?f===`
79
- `?l+=`
80
- `:f=`
81
- `:(l+=f+g,f=" ",m=!1)}switch(s.chomp){case"-":break;case"+":for(let h=o;h<u.length;++h)l+=`
82
- `+u[h][0].slice(a);l[l.length-1]!==`
83
- `&&(l+=`
84
- `);break;default:l+=`
85
- `}let y=r+s.length+e.source.length;return{value:l,type:i,comment:s.comment,range:[r,y,y]}}function mp({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=e[0],i=s[0],u=0,o="",a=-1;for(let f=1;f<s.length;++f){let m=s[f];if(!o&&(m==="-"||m==="+"))o=m;else{let y=Number(m);!u&&y?u=y:a===-1&&(a=t+f)}}a!==-1&&r(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,d="",l=s.length;for(let f=1;f<e.length;++f){let m=e[f];switch(m.type){case"space":c=!0;case"newline":l+=m.source.length;break;case"comment":n&&!c&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),l+=m.source.length,d=m.source.substring(1);break;case"error":r(m,"UNEXPECTED_TOKEN",m.message),l+=m.source.length;break;default:{let y=`Unexpected token in block scalar header: ${m.type}`;r(m,"UNEXPECTED_TOKEN",y);let h=m.source;h&&typeof h=="string"&&(l+=h.length)}}}return{mode:i,indent:u,chomp:o,comment:d,length:l}}function gp(t){let e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let u=1;u<e.length;u+=2)i.push([e[u],e[u+1]]);return i}tc.resolveBlockScalar=pp});var Ri=v(rc=>{"use strict";var Pi=W(),yp=xt();function Dp(t,e,n){let{offset:r,type:s,source:i,end:u}=t,o,a,c=(f,m,y)=>n(r+f,m,y);switch(s){case"scalar":o=Pi.Scalar.PLAIN,a=bp(i,c);break;case"single-quoted-scalar":o=Pi.Scalar.QUOTE_SINGLE,a=Ep(i,c);break;case"double-quoted-scalar":o=Pi.Scalar.QUOTE_DOUBLE,a=Ap(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}let d=r+i.length,l=yp.resolveEnd(u,d,e,n);return{value:a,type:o,comment:l.comment,range:[r,d,l.offset]}}function bp(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),nc(t)}function Ep(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),nc(t.slice(1,-1)).replace(/''/g,"'")}function nc(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
86
- `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
87
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let s=r[1],i=" ",u=e.lastIndex;for(n.lastIndex=u;r=n.exec(t);)r[1]===""?i===`
88
- `?s+=i:i=`
89
- `:(s+=i+r[1],i=" "),u=n.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=u,r=o.exec(t),s+i+(r?.[1]??"")}function Ap(t,e){let n="";for(let r=1;r<t.length-1;++r){let s=t[r];if(!(s==="\r"&&t[r+1]===`
90
- `))if(s===`
91
- `){let{fold:i,offset:u}=wp(t,r);n+=i,r=u}else if(s==="\\"){let i=t[++r],u=Cp[i];if(u)n+=u;else if(i===`
92
- `)for(i=t[r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="\r"&&t[r+1]===`
93
- `)for(i=t[++r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="x"||i==="u"||i==="U"){let o={x:2,u:4,U:8}[i];n+=Sp(t,r+1,o,e),r+=o}else{let o=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(s===" "||s===" "){let i=r,u=t[r+1];for(;u===" "||u===" ";)u=t[++r+1];u!==`
94
- `&&!(u==="\r"&&t[r+2]===`
95
- `)&&(n+=r>i?t.slice(i,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function wp(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
96
- `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
97
- `);)r===`
98
- `&&(n+=`
99
- `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}var Cp={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
100
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Sp(t,e,n,r){let s=t.substr(e,n),u=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(u)){let o=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(u)}rc.resolveFlowScalar=Dp});var uc=v(ic=>{"use strict";var at=T(),sc=W(),vp=Li(),Fp=Ri();function _p(t,e,n,r){let{value:s,type:i,comment:u,range:o}=e.type==="block-scalar"?vp.resolveBlockScalar(t,e,r):Fp.resolveFlowScalar(e,t.options.strict,r),a=n?t.directives.tagName(n.source,l=>r(n,"TAG_RESOLVE_FAILED",l)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[at.SCALAR]:a?c=xp(t.schema,s,a,n,r):e.type==="scalar"?c=Np(t,s,e,r):c=t.schema[at.SCALAR];let d;try{let l=c.resolve(s,f=>r(n??e,"TAG_RESOLVE_FAILED",f),t.options);d=at.isScalar(l)?l:new sc.Scalar(l)}catch(l){let f=l instanceof Error?l.message:String(l);r(n??e,"TAG_RESOLVE_FAILED",f),d=new sc.Scalar(s)}return d.range=o,d.source=s,i&&(d.type=i),a&&(d.tag=a),c.format&&(d.format=c.format),u&&(d.comment=u),d}function xp(t,e,n,r,s){if(n==="!")return t[at.SCALAR];let i=[];for(let o of t.tags)if(!o.collection&&o.tag===n)if(o.default&&o.test)i.push(o);else return o;for(let o of i)if(o.test?.test(e))return o;let u=t.knownTags[n];return u&&!u.collection?(t.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[at.SCALAR])}function Np({atKey:t,directives:e,schema:n},r,s,i){let u=n.tags.find(o=>(o.default===!0||t&&o.default==="key")&&o.test?.test(r))||n[at.SCALAR];if(n.compat){let o=n.compat.find(a=>a.default&&a.test?.test(r))??n[at.SCALAR];if(u.tag!==o.tag){let a=e.tagString(u.tag),c=e.tagString(o.tag),d=`Value may be parsed as either ${a} or ${c}`;i(s,"TAG_RESOLVE_FAILED",d,!0)}}return u}ic.composeScalar=_p});var ac=v(oc=>{"use strict";function Bp(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let s=e[r];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++r];s?.type==="space";)t+=s.source.length,s=e[++r];break}}return t}oc.emptyScalarPosition=Bp});var fc=v(Mi=>{"use strict";var Op=Wt(),kp=T(),Ip=ec(),cc=uc(),Tp=xt(),Lp=ac(),Pp={composeNode:lc,composeEmptyNode:qi};function lc(t,e,n,r){let s=t.atKey,{spaceBefore:i,comment:u,anchor:o,tag:a}=n,c,d=!0;switch(e.type){case"alias":c=Rp(t,e,r),(o||a)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=cc.composeScalar(t,e,a,r),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Ip.composeCollection(Pp,t,e,n,r),o&&(c.anchor=o.source.substring(1));break;default:{let l=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",l),c=qi(t,e.offset,void 0,null,n,r),d=!1}}return o&&c.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!kp.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?c.comment=u:c.commentBefore=u),t.options.keepSourceTokens&&d&&(c.srcToken=e),c}function qi(t,e,n,r,{spaceBefore:s,comment:i,anchor:u,tag:o,end:a},c){let d={type:"scalar",offset:Lp.emptyScalarPosition(e,n,r),indent:-1,source:""},l=cc.composeScalar(t,d,o,c);return u&&(l.anchor=u.source.substring(1),l.anchor===""&&c(u,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(l.spaceBefore=!0),i&&(l.comment=i,l.range[2]=a),l}function Rp({options:t},{offset:e,source:n,end:r},s){let i=new Op.Alias(n.substring(1));i.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let u=e+n.length,o=Tp.resolveEnd(r,u,t.strict,s);return i.range=[e,u,o.offset],o.comment&&(i.comment=o.comment),i}Mi.composeEmptyNode=qi;Mi.composeNode=lc});var pc=v(dc=>{"use strict";var qp=ln(),hc=fc(),Mp=xt(),$p=pn();function jp(t,e,{offset:n,start:r,value:s,end:i},u){let o=Object.assign({_directives:e},t),a=new qp.Document(void 0,o),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},d=$p.resolveProps(r,{indicator:"doc-start",next:s??i?.[0],offset:n,onError:u,parentIndent:0,startOnNewline:!0});d.found&&(a.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!d.hasNewline&&u(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=s?hc.composeNode(c,s,d,u):hc.composeEmptyNode(c,d.end,r,null,d,u);let l=a.contents.range[2],f=Mp.resolveEnd(i,l,!1,u);return f.comment&&(a.comment=f.comment),a.range=[n,l,f.offset],a}dc.composeDoc=jp});var ji=v(yc=>{"use strict";var Up=vn("process"),Kp=Fs(),Vp=ln(),mn=dn(),mc=T(),zp=pc(),Wp=xt();function gn(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function gc(t){let e="",n=!1,r=!1;for(let s=0;s<t.length;++s){let i=t[s];switch(i[0]){case"#":e+=(e===""?"":r?`
101
-
102
- `:`
103
- `)+(i.substring(1)||" "),n=!0,r=!1;break;case"%":t[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}var $i=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,i)=>{let u=gn(n);i?this.warnings.push(new mn.YAMLWarning(u,r,s)):this.errors.push(new mn.YAMLParseError(u,r,s))},this.directives=new Kp.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:r,afterEmptyLine:s}=gc(this.prelude);if(r){let i=e.contents;if(n)e.comment=e.comment?`${e.comment}
104
- ${r}`:r;else if(s||e.directives.docStart||!i)e.commentBefore=r;else if(mc.isCollection(i)&&!i.flow&&i.items.length>0){let u=i.items[0];mc.isPair(u)&&(u=u.key);let o=u.commentBefore;u.commentBefore=o?`${r}
105
- ${o}`:r}else{let u=i.commentBefore;i.commentBefore=u?`${r}
106
- ${u}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:gc(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(let s of e)yield*this.next(s);yield*this.end(n,r)}*next(e){switch(Up.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(n,r,s)=>{let i=gn(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=zp.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new mn.YAMLParseError(gn(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new mn.YAMLParseError(gn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=Wp.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
107
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new mn.YAMLParseError(gn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),s=new Vp.Document(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}};yc.Composer=$i});var Ec=v($r=>{"use strict";var Jp=Li(),Yp=Ri(),Hp=dn(),Dc=Qt();function Gp(t,e=!0,n){if(t){let r=(s,i,u)=>{let o=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(o,i,u);else throw new Hp.YAMLParseError([o,o+1],i,u)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Yp.resolveFlowScalar(t,e,r);case"block-scalar":return Jp.resolveBlockScalar({options:{strict:e}},t,r)}}return null}function Qp(t,e){let{implicitKey:n=!1,indent:r,inFlow:s=!1,offset:i=-1,type:u="PLAIN"}=e,o=Dc.stringifyString({type:u,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:r,source:`
108
- `}];switch(o[0]){case"|":case">":{let c=o.indexOf(`
109
- `),d=o.substring(0,c),l=o.substring(c+1)+`
110
- `,f=[{type:"block-scalar-header",offset:i,indent:r,source:d}];return bc(f,a)||f.push({type:"newline",offset:-1,indent:r,source:`
111
- `}),{type:"block-scalar",offset:i,indent:r,props:f,source:l}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:o,end:a};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:o,end:a};default:return{type:"scalar",offset:i,indent:r,source:o,end:a}}}function Xp(t,e,n={}){let{afterKey:r=!1,implicitKey:s=!1,inFlow:i=!1,type:u}=n,o="indent"in t?t.indent:null;if(r&&typeof o=="number"&&(o+=2),!u)switch(t.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}let a=Dc.stringifyString({type:u,value:e},{implicitKey:s||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":Zp(t,a);break;case'"':Ui(t,a,"double-quoted-scalar");break;case"'":Ui(t,a,"single-quoted-scalar");break;default:Ui(t,a,"scalar")}}function Zp(t,e){let n=e.indexOf(`
112
- `),r=e.substring(0,n),s=e.substring(n+1)+`
113
- `;if(t.type==="block-scalar"){let i=t.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=r,t.source=s}else{let{offset:i}=t,u="indent"in t?t.indent:-1,o=[{type:"block-scalar-header",offset:i,indent:u,source:r}];bc(o,"end"in t?t.end:void 0)||o.push({type:"newline",offset:-1,indent:u,source:`
114
- `});for(let a of Object.keys(t))a!=="type"&&a!=="offset"&&delete t[a];Object.assign(t,{type:"block-scalar",indent:u,props:o,source:s})}}function bc(t,e){if(e)for(let n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Ui(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{let r=t.props.slice(1),s=e.length;t.props[0].type==="block-scalar-header"&&(s-=t.props[0].source.length);for(let i of r)i.offset+=s;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{let s={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
115
- `};delete t.items,Object.assign(t,{type:n,source:e,end:[s]});break}default:{let r="indent"in t?t.indent:-1,s="end"in t&&Array.isArray(t.end)?t.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(t))i!=="type"&&i!=="offset"&&delete t[i];Object.assign(t,{type:n,indent:r,source:e,end:s})}}}$r.createScalarToken=Qp;$r.resolveAsScalar=Gp;$r.setScalarValue=Xp});var wc=v(Ac=>{"use strict";var em=t=>"type"in t?Ur(t):jr(t);function Ur(t){switch(t.type){case"block-scalar":{let e="";for(let n of t.props)e+=Ur(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(let n of t.items)e+=jr(n);return e}case"flow-collection":{let e=t.start.source;for(let n of t.items)e+=jr(n);for(let n of t.end)e+=n.source;return e}case"document":{let e=jr(t);if(t.end)for(let n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let n of t.end)e+=n.source;return e}}}function jr({start:t,key:e,sep:n,value:r}){let s="";for(let i of t)s+=i.source;if(e&&(s+=Ur(e)),n)for(let i of n)s+=i.source;return r&&(s+=Ur(r)),s}Ac.stringify=em});var Fc=v(vc=>{"use strict";var Ki=Symbol("break visit"),tm=Symbol("skip children"),Cc=Symbol("remove item");function ct(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Sc(Object.freeze([]),t,e)}ct.BREAK=Ki;ct.SKIP=tm;ct.REMOVE=Cc;ct.itemAtPath=(t,e)=>{let n=t;for(let[r,s]of e){let i=n?.[r];if(i&&"items"in i)n=i.items[s];else return}return n};ct.parentCollection=(t,e)=>{let n=ct.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],s=n?.[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function Sc(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(let s of["key","value"]){let i=e[s];if(i&&"items"in i){for(let u=0;u<i.items.length;++u){let o=Sc(Object.freeze(t.concat([[s,u]])),i.items[u],n);if(typeof o=="number")u=o-1;else{if(o===Ki)return Ki;o===Cc&&(i.items.splice(u,1),u-=1)}}typeof r=="function"&&s==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}vc.visit=ct});var Kr=v(ne=>{"use strict";var Vi=Ec(),nm=wc(),rm=Fc(),zi="\uFEFF",Wi="",Ji="",Yi="",sm=t=>!!t&&"items"in t,im=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function um(t){switch(t){case zi:return"<BOM>";case Wi:return"<DOC>";case Ji:return"<FLOW_END>";case Yi:return"<SCALAR>";default:return JSON.stringify(t)}}function om(t){switch(t){case zi:return"byte-order-mark";case Wi:return"doc-mode";case Ji:return"flow-error-end";case Yi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
116
- `:case`\r
117
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}ne.createScalarToken=Vi.createScalarToken;ne.resolveAsScalar=Vi.resolveAsScalar;ne.setScalarValue=Vi.setScalarValue;ne.stringify=nm.stringify;ne.visit=rm.visit;ne.BOM=zi;ne.DOCUMENT=Wi;ne.FLOW_END=Ji;ne.SCALAR=Yi;ne.isCollection=sm;ne.isScalar=im;ne.prettyToken=um;ne.tokenType=om});var Qi=v(xc=>{"use strict";var yn=Kr();function De(t){switch(t){case void 0:case" ":case`
118
- `:case"\r":case" ":return!0;default:return!1}}var _c=new Set("0123456789ABCDEFabcdef"),am=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Vr=new Set(",[]{}"),cm=new Set(` ,[]{}
119
- \r `),Hi=t=>!t||cm.has(t),Gi=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
120
- `?!0:n==="\r"?this.buffer[e+1]===`
121
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){let s=this.buffer[r+e+1];if(s===`
122
- `||!s&&!this.atEnd)return e+r+1}return n===`
123
- `||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&De(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
124
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===yn.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){let i=e[r-1];if(i===" "||i===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let i=e[n-1];if(i===" "||i===" ")n-=1;else break}let s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield yn.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&De(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!De(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&De(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Hi),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&De(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield yn.FLOW_END,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Hi),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let u=this.charAt(1);if(this.flowKey||De(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),s=r.indexOf(`
125
- `,this.pos);if(s!==-1){for(;s!==-1;){let i=this.continueScalar(s+1);if(i===-1)break;s=r.indexOf(`
126
- `,i)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>De(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case`
127
- `:e=i,n=0;break;case"\r":{let u=this.buffer[i+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
128
- `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
129
- `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
130
- `;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,u=this.buffer[i];u==="\r"&&(u=this.buffer[--i]);let o=i;for(;u===" ";)u=this.buffer[--i];if(u===`
131
- `&&i>=this.pos&&i+1+n>o)e=i;else break}while(!0);return yield yn.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){let i=this.buffer[r+1];if(De(i)||e&&Vr.has(i))break;n=r}else if(De(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===`
132
- `?(r+=1,s=`
133
- `,i=this.buffer[r+1]):n=r),i==="#"||e&&Vr.has(i))break;if(s===`
134
- `){let u=this.continueScalar(r+1);if(u===-1)break;r=Math.max(r,u-2)}}else{if(e&&Vr.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield yn.SCALAR,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Hi))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,n=this.charAt(1);if(De(n)||e&&Vr.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!De(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(am.has(n))n=this.buffer[++e];else if(n==="%"&&_c.has(this.buffer[e+1])&&_c.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
135
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
136
- `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};xc.Lexer=Gi});var Zi=v(Nc=>{"use strict";var Xi=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){let i=n+r>>1;this.lineStarts[i]<e?n=i+1:r=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let s=this.lineStarts[n-1];return{line:n,col:e-s+1}}}};Nc.LineCounter=Xi});var tu=v(Tc=>{"use strict";var lm=vn("process"),Bc=Kr(),fm=Qi();function We(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Oc(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Ic(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function zr(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Nt(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function kc(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!We(e.start,"explicit-key-ind")&&!We(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ic(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var eu=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new fm.Lexer,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,lm.env.LOG_TOKENS&&console.log("|",Bc.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=Bc.tokenType(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&kc(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{let s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{let s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Oc(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Oc(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let n=zr(this.peek(2)),r=Nt(n),s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
137
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
138
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(s&&n.sep&&!n.value){let u=[];for(let o=0;o<n.sep.length;++o){let a=n.sep[o];switch(a.type){case"newline":u.push(o);break;case"space":break;case"comment":a.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(i=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(We(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Ic(n.key)&&!We(n.sep,"newline")){let u=Nt(n.start),o=n.key,a=n.sep;a.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:o,sep:a}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(We(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let u=Nt(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):We(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let u=this.flowScalar(this.type);s||n.value?(e.items.push({start:i,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{let u=this.startBlockValue(e);if(u){if(u.type==="block-seq"){if(!n.explicitKey&&n.sep&&!We(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:i});this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||We(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let s=zr(r),i=Nt(s);kc(e);let u=e.end.splice(1,e.end.length);u.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
139
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
140
- `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=zr(e),r=Nt(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=zr(e),r=Nt(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Tc.Parser=eu});var Mc=v(bn=>{"use strict";var Lc=ji(),hm=ln(),Dn=dn(),dm=Ms(),pm=T(),mm=Zi(),Pc=tu();function Rc(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new mm.LineCounter||null,prettyErrors:e}}function gm(t,e={}){let{lineCounter:n,prettyErrors:r}=Rc(e),s=new Pc.Parser(n?.addNewLine),i=new Lc.Composer(e),u=Array.from(i.compose(s.parse(t)));if(r&&n)for(let o of u)o.errors.forEach(Dn.prettifyError(t,n)),o.warnings.forEach(Dn.prettifyError(t,n));return u.length>0?u:Object.assign([],{empty:!0},i.streamInfo())}function qc(t,e={}){let{lineCounter:n,prettyErrors:r}=Rc(e),s=new Pc.Parser(n?.addNewLine),i=new Lc.Composer(e),u=null;for(let o of i.compose(s.parse(t),!0,t.length))if(!u)u=o;else if(u.options.logLevel!=="silent"){u.errors.push(new Dn.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(u.errors.forEach(Dn.prettifyError(t,n)),u.warnings.forEach(Dn.prettifyError(t,n))),u}function ym(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);let s=qc(t,n);if(!s)return null;if(s.warnings.forEach(i=>dm.warn(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}function Dm(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){let s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){let{keepUndefined:s}=n??e??{};if(!s)return}return pm.isDocument(t)&&!r?t.toString(n):new hm.Document(t,r,n).toString(n)}bn.parse=ym;bn.parseAllDocuments=gm;bn.parseDocument=qc;bn.stringify=Dm});var jc=v(P=>{"use strict";var bm=ji(),Em=ln(),Am=Ai(),nu=dn(),wm=Wt(),Je=T(),Cm=Ue(),Sm=W(),vm=Ve(),Fm=ze(),_m=Kr(),xm=Qi(),Nm=Zi(),Bm=tu(),Wr=Mc(),$c=Ut();P.Composer=bm.Composer;P.Document=Em.Document;P.Schema=Am.Schema;P.YAMLError=nu.YAMLError;P.YAMLParseError=nu.YAMLParseError;P.YAMLWarning=nu.YAMLWarning;P.Alias=wm.Alias;P.isAlias=Je.isAlias;P.isCollection=Je.isCollection;P.isDocument=Je.isDocument;P.isMap=Je.isMap;P.isNode=Je.isNode;P.isPair=Je.isPair;P.isScalar=Je.isScalar;P.isSeq=Je.isSeq;P.Pair=Cm.Pair;P.Scalar=Sm.Scalar;P.YAMLMap=vm.YAMLMap;P.YAMLSeq=Fm.YAMLSeq;P.CST=_m;P.Lexer=xm.Lexer;P.LineCounter=Nm.LineCounter;P.Parser=Bm.Parser;P.parse=Wr.parse;P.parseAllDocuments=Wr.parseAllDocuments;P.parseDocument=Wr.parseDocument;P.stringify=Wr.stringify;P.visit=$c.visit;P.visitAsync=$c.visitAsync});import{readFile as cD}from"fs/promises";import*as xu from"fs";import*as ae from"path";var Bn=class extends Error{constructor(t){super(t),this.name="Eta Error"}},Nu=class extends Bn{constructor(t){super(t),this.name="EtaParser Error"}},Ul=class extends Bn{constructor(t){super(t),this.name="EtaRuntime Error"}},rs=class extends Bn{constructor(t){super(t),this.name="EtaFileResolution Error"}},Kl=class extends Bn{constructor(t){super(t),this.name="EtaNameResolution Error"}};function It(t,e,n){let r=e.slice(0,n).split(/\n/),s=r.length,i=r[s-1].length+1;throw t+=" at line "+s+" col "+i+`:
141
-
142
- `+e.split(/\n/)[s-1]+`
143
- `+Array(i).join(" ")+"^",new Nu(t)}function Vl(t,e,n,r){let s=e.split(`
144
- `),i=Math.max(n-3,0),u=Math.min(s.length,n+3),o=r,a=s.slice(i,u).map((d,l)=>{let f=l+i+1;return(f===n?" >> ":" ")+f+"| "+d}).join(`
145
- `),c=new Ul((o?o+":"+n+`
146
- `:"line "+n+`
147
- `)+a+`
148
-
149
- `+t.message);throw c.name=t.name,c.cause=t,c}function zl(t){let e="";try{e=xu.readFileSync(t,"utf8")}catch(n){throw n?.code==="ENOENT"?new rs(`Could not find template: ${t}`):n}return e}function Wl(t,e){let n="",r=this.config.views;if(!r)throw new rs("Views directory is not defined");let s=e?.filepath,i=this.config.defaultExtension===void 0?".eta":this.config.defaultExtension,u=JSON.stringify({filename:s,path:t,views:this.config.views});if(t+=ae.extname(t)?"":i,s){if(this.config.cacheFilepaths&&this.filepathCache[u])return this.filepathCache[u];if(Yl.exec(t)?.length){let o=t.replace(/^\/*|^\\*/,"");n=ae.join(r,o)}else n=ae.join(ae.dirname(s),t)}else n=ae.join(r,t);if(Jl(r,n))return s&&this.config.cacheFilepaths&&(this.filepathCache[u]=n),n;throw new rs(`Template '${t}' is not in the views directory`)}function Jl(t,e){let n=ae.relative(t,e);return n&&!n.startsWith("..")&&!ae.isAbsolute(n)}var Yl=/^\\|^\//,Hl=(async()=>{}).constructor;function Gl(t,e){let n=this.config,r=e?.async?Hl:Function;try{return new r(n.varName,"options",this.compileToString.call(this,t,e))}catch(s){throw s instanceof SyntaxError?new Nu(`Bad template syntax
150
-
151
- `+s.message+`
152
- `+Array(s.message.length+1).join("=")+`
153
- `+this.compileToString.call(this,t,e)+`
154
- `):s}}function Ql(t,e){let n=this.config,r=e?.async,s=this.compileBody,i=this.parse.call(this,t),u=`${n.functionHeader}
155
- let include = (__eta_t, __eta_d) => this.render(__eta_t, {...${n.varName}, ...(__eta_d ?? {})}, options);
156
- let includeAsync = (__eta_t, __eta_d) => this.renderAsync(__eta_t, {...${n.varName}, ...(__eta_d ?? {})}, options);
157
-
158
- let __eta = {res: "", e: this.config.escapeFunction, f: this.config.filterFunction${n.debug?', line: 1, templateStr: "'+t.replace(/\\|"/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n")+'"':""}};
159
-
160
- function layout(path, data) {
161
- __eta.layout = path;
162
- __eta.layoutData = data;
163
- }${n.debug?"try {":""}${n.useWith?"with("+n.varName+"||{}){":""}
164
-
165
- function ${n.outputFunctionName}(s){__eta.res+=s;}
166
-
167
- ${s.call(this,i)}
168
- if (__eta.layout) {
169
- __eta.res = ${r?"await includeAsync":"include"} (__eta.layout, {...${n.varName}, body: __eta.res, ...__eta.layoutData});
170
- }
171
- ${n.useWith?"}":""}${n.debug?"} catch (e) { this.RuntimeErr(e, __eta.templateStr, __eta.line, options.filepath) }":""}
172
- return __eta.res;
173
- `;if(n.plugins)for(let o=0;o<n.plugins.length;o++){let a=n.plugins[o];a.processFnString&&(u=a.processFnString(u,n))}return u}function Xl(t){let e=this.config,n=0,r=t.length,s="";for(;n<r;n++){let i=t[n];if(typeof i=="string")s+="__eta.res+='"+i+`'
174
- `;else{let u=i.t,o=i.val||"";e.debug&&(s+="__eta.line="+i.lineNo+`
175
- `),u==="r"?(e.autoFilter&&(o="__eta.f("+o+")"),s+="__eta.res+="+o+`
176
- `):u==="i"?(e.autoFilter&&(o="__eta.f("+o+")"),e.autoEscape&&(o="__eta.e("+o+")"),s+="__eta.res+="+o+`
177
- `):u==="e"&&(s+=o+`
178
- `)}}return s}function Zl(t,e,n,r){let s,i;return Array.isArray(e.autoTrim)?(s=e.autoTrim[1],i=e.autoTrim[0]):s=i=e.autoTrim,(n||n===!1)&&(s=n),(r||r===!1)&&(i=r),!i&&!s?t:s==="slurp"&&i==="slurp"?t.trim():(s==="_"||s==="slurp"?t=t.trimStart():(s==="-"||s==="nl")&&(t=t.replace(/^(?:\r\n|\n|\r)/,"")),i==="_"||i==="slurp"?t=t.trimEnd():(i==="-"||i==="nl")&&(t=t.replace(/(?:\r\n|\n|\r)$/,"")),t)}var ef={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function tf(t){return ef[t]}function nf(t){let e=String(t);return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,tf):e}var Fu={autoEscape:!0,autoFilter:!1,autoTrim:[!1,"nl"],cache:!1,cacheFilepaths:!0,debug:!1,escapeFunction:nf,filterFunction:t=>String(t),outputFunctionName:"output",functionHeader:"",parse:{exec:"",interpolate:"=",raw:"~"},plugins:[],rmWhitespace:!1,tags:["<%","%>"],useWith:!1,varName:"it",defaultExtension:".eta"},Fn=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,_n=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,xn=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g;function Nn(t){return t.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function rf(t,e){return t.slice(0,e).split(`
179
- `).length}function sf(t){let e=this.config,n=[],r=!1,s=0,i=e.parse;if(e.plugins)for(let l=0;l<e.plugins.length;l++){let f=e.plugins[l];f.processTemplate&&(t=f.processTemplate(t,e))}e.rmWhitespace&&(t=t.replace(/[\r\n]+/g,`
180
- `).replace(/^\s+|\s+$/gm,"")),Fn.lastIndex=0,_n.lastIndex=0,xn.lastIndex=0;function u(l,f){l&&(l=Zl(l,e,r,f),l&&(l=l.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),n.push(l)))}let o=[i.exec,i.interpolate,i.raw].reduce((l,f)=>l&&f?l+"|"+Nn(f):f?Nn(f):l,""),a=new RegExp(Nn(e.tags[0])+"(-|_)?\\s*("+o+")?\\s*","g"),c=new RegExp("'|\"|`|\\/\\*|(\\s*(-|_)?"+Nn(e.tags[1])+")","g"),d;for(;d=a.exec(t);){let l=t.slice(s,d.index);s=d[0].length+d.index;let f=d[1],m=d[2]||"";u(l,f),c.lastIndex=s;let y,h=!1;for(;y=c.exec(t);)if(y[1]){let p=t.slice(s,y.index);a.lastIndex=s=c.lastIndex,r=y[2],h={t:m===i.exec?"e":m===i.raw?"r":m===i.interpolate?"i":"",val:p};break}else{let p=y[0];if(p==="/*"){let g=t.indexOf("*/",c.lastIndex);g===-1&&It("unclosed comment",t,y.index),c.lastIndex=g}else p==="'"?(_n.lastIndex=y.index,_n.exec(t)?c.lastIndex=_n.lastIndex:It("unclosed string",t,y.index)):p==='"'?(xn.lastIndex=y.index,xn.exec(t)?c.lastIndex=xn.lastIndex:It("unclosed string",t,y.index)):p==="`"&&(Fn.lastIndex=y.index,Fn.exec(t)?c.lastIndex=Fn.lastIndex:It("unclosed string",t,y.index))}h?(e.debug&&(h.lineNo=rf(t,d.index)),n.push(h)):It("unclosed tag",t,d.index)}if(u(t.slice(s,t.length),!1),e.plugins)for(let l=0;l<e.plugins.length;l++){let f=e.plugins[l];f.processAST&&(n=f.processAST(n,e))}return n}function Bu(t,e){let n=e?.async?this.templatesAsync:this.templatesSync;if(this.resolvePath&&this.readFile&&!t.startsWith("@")){let r=e.filepath,s=n.get(r);if(this.config.cache&&s)return s;{let i=this.readFile(r),u=this.compile(i,e);return this.config.cache&&n.define(r,u),u}}else{let r=n.get(t);if(r)return r;throw new Kl(`Failed to get template '${t}'`)}}function Ou(t,e,n){let r,s={...n,async:!1};return typeof t=="string"?(this.resolvePath&&this.readFile&&!t.startsWith("@")&&(s.filepath=this.resolvePath(t,s)),r=Bu.call(this,t,s)):r=t,r.call(this,e,s)}function ku(t,e,n){let r,s={...n,async:!0};typeof t=="string"?(this.resolvePath&&this.readFile&&!t.startsWith("@")&&(s.filepath=this.resolvePath(t,s)),r=Bu.call(this,t,s)):r=t;let i=r.call(this,e,s);return Promise.resolve(i)}function uf(t,e){let n=this.compile(t,{async:!1});return Ou.call(this,n,e)}function of(t,e){let n=this.compile(t,{async:!0});return ku.call(this,n,e)}var _u=class{constructor(t){this.cache=t}define(t,e){this.cache[t]=e}get(t){return this.cache[t]}remove(t){delete this.cache[t]}reset(){this.cache={}}load(t){this.cache={...this.cache,...t}}},af=class{constructor(t){t?this.config={...Fu,...t}:this.config={...Fu}}config;RuntimeErr=Vl;compile=Gl;compileToString=Ql;compileBody=Xl;parse=sf;render=Ou;renderAsync=ku;renderString=uf;renderStringAsync=of;filepathCache={};templatesSync=new _u({});templatesAsync=new _u({});resolvePath=null;readFile=null;configure(t){this.config={...this.config,...t}}withConfig(t){return{...this,config:{...this.config,...t}}}loadTemplate(t,e,n){if(typeof e=="string")(n?.async?this.templatesAsync:this.templatesSync).define(t,this.compile(e,n));else{let r=this.templatesSync;(e.constructor.name==="AsyncFunction"||n?.async)&&(r=this.templatesAsync),r.define(t,e)}}},Iu=class extends af{readFile=zl;resolvePath=Wl};var ss=class extends Error{listener;data;func;event;stack},cf=new RegExp(`(${["node_modules","node:internal","$spy","makeEventTracer","sendToSpy","Function.spy","Observable.Engine"].join("|")})`),Ge=class extends Error{event;listener;data;constructor(e,n){super(e),this.event=n?.event,this.listener=n?.listener,this.data=n?.data}};var is=(t,e,n)=>{let s=new Error().stack.split(`
181
- `);s.shift();let i=s.filter(c=>!cf.test(c)),u=`EventStack (${t} ${e.toString()}):`;i.unshift(u);let o=i.join(`
182
- `),a=new ss(u);return a.name=u,a.func=e,a.event=t,a.stack=o,a.listener=null,a.data=null,typeof n=="function"?a.listener=n:a.data=n,a},Tu=t=>{let e=t?.replace(/^\//,"").split("/"),n=e.pop(),r=e.join("/");return RegExp(r,n)},us=(t,e)=>{let n=[];for(let r of t)for(let s of e.get(r)||new Set)n.push({event:r,func:s});return n},de=(function(t){return t.on="on",t.off="off",t.emit="emit",t.clear="clear",t})({}),Se=class extends Event{type;data;constructor(e,n){super(e),this.data=n,this.type=e}},Tt=(t,e)=>{if(e.event===void 0||typeof e.event!="string"&&!(e.event instanceof RegExp))throw new Ge(`observer.${t}: Event must be a string or RegExp`,e)},os=(t,e)=>{if(e.listener!==void 0&&typeof e.listener!="function")throw new Ge(`observer.${t}: Listener must be a function`,e)};var On=(t,e,n=!1)=>{Object.entries(e).map(([r,s])=>{Object.defineProperty(t,r,{value:s,writable:!1,enumerable:!1,configurable:n})})};var as=(t,e)=>e.split(".").reduce((r,s)=>{if(r==null)return null;if(r instanceof Map)return r.get(s);if(r instanceof Set){let i=r.has(s),u=Array.from(r);return i?u[u.indexOf(s)]:u[s]}return r[s]},t),lf=(t,e,n)=>{F(typeof t=="object"&&t!==null,"obj must be a non-null object"),F(typeof e=="string"&&e.length>0,"path must be a non-empty string");let r=e.split("."),s=r[r.length-1],i=t;for(let u=0;u<r.length-1;u++){let o=r[u];if(i==null)throw new Error(`Cannot set property '${o}' on ${i} at path: ${r.slice(0,u).join(".")}`);if(typeof i!="object")throw new Error(`Cannot set property '${o}' on primitive value at path: ${r.slice(0,u).join(".")}`);o in i||(i[o]={}),i=i[o]}if(i==null)throw new Error(`Cannot set property '${s}' on ${i}`);if(typeof i!="object")throw new Error(`Cannot set property '${s}' on primitive value`);i[s]=n},Lu=(t,e)=>{F(typeof t=="object"&&t!==null,"obj must be a non-null object"),F(Array.isArray(e),"entries must be an array");for(let n=0;n<e.length;n++){let r=e[n];F(Array.isArray(r)&&r.length===2,`entry ${n} must be a [path, value] tuple`);let[s,i]=r;F(typeof s=="string"&&s.length>0,`entry ${n} must have a non-empty string path (received: ${typeof s})`),lf(t,s,i)}};var cs=class extends Error{};var kn=(t,e)=>t==null||(e instanceof Function?!!e(t):!!e),F=(t,e,n)=>{if((t instanceof Function?!!t():!!t)===!1)throw new(n||cs)(e||"assertion failed")};var X=(t,...e)=>{t!==void 0&&F(...e)};var ht=t=>t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint",Pe=t=>t==null,dt=(t,e)=>Pe(t)===!1&&Pe(e)===!1&&t.constructor===e.constructor;var $=t=>t instanceof Function,ls=t=>t instanceof Object,ff=new Set([Date,RegExp,Function,Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError,DOMException,Array,Set,Map,WeakMap,WeakSet,Promise,Proxy,Symbol,BigInt,WeakRef,FinalizationRegistry,DataView,ArrayBuffer,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array,FormData,URLSearchParams]),be=t=>!ht(t)&&ls(t)&&!ff.has(t.constructor);var hf=new Set(["true","yes",!0]),df=new Set(["false","no",!1]),Pu=t=>hf.has(t),Ru=t=>df.has(t);var se=new Map,pe=new Map;var pf=new Set(["__proto__","constructor","prototype"]),ve=t=>typeof t=="string"&&pf.has(t),In=t=>Object.keys(t).filter(e=>!ve(e));var mf=()=>{se.set(Array,(e,n)=>e.map(r=>Z(r,n))),se.set(Object,(e,n)=>{let r={},s=Object.keys(e);for(let i of s)ve(i)||(r[i]=Z(e[i],n));return r}),se.set(Map,(e,n)=>{let r=new Map;for(let s of e.entries()){let[i,u]=s;r.set(i,Z(u,n))}return r}),se.set(Set,(e,n)=>{let r=new Set;for(let s of e)r.add(Z(s,n));return r}),[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array].forEach(e=>{se.set(e,n=>new e(n))}),se.set(ArrayBuffer,e=>e.slice(0)),se.set(DataView,e=>{let n=e.buffer.slice(0);return new DataView(n,e.byteOffset,e.byteLength)}),se.set(Error,(e,n)=>{let r=typeof structuredClone=="function"?structuredClone(e):new e.constructor(e.message);e.name&&(r.name=e.name),e.stack&&(r.stack=e.stack);let s=Object.keys(e);for(let i of s)i!=="name"&&i!=="message"&&i!=="stack"&&!ve(i)&&(r[i]=Z(e[i],n));return r}),se.set(Date,e=>new Date(e.getTime())),se.set(RegExp,e=>new RegExp(e.source,e.flags))},qu=!1,gf=new Set([ArrayBuffer,DataView,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array,Error,Date,RegExp]),Z=(t,e=new WeakMap)=>{if(qu||(mf(),qu=!0),ht(t))return t;if(e.has(t))return e.get(t);if(t instanceof Error)return se.get(Error)(t,e);let n=Object.getPrototypeOf(t)?.constructor||t.constructor,r=se.get(n);if(!r)return t;if(gf.has(n))return r(t,e);let s;if(Array.isArray(t)){s=[],e.set(t,s);let u=r(t,e);return s.push(...u),s}if(t instanceof Map){s=new Map,e.set(t,s);let u=r(t,e);for(let[o,a]of u)s.set(o,a);return s}if(t instanceof Set){s=new Set,e.set(t,s);let u=r(t,e);for(let o of u)s.add(o);return s}s={},e.set(t,s);let i=r(t,e);return Object.assign(s,i),s};var yf=(t,e)=>{for(let n of e)t.push(n);return t},Df=(t,e)=>{for(let n of e)t.has(n)||t.add(n);return t},bf=(t,e)=>{t.length=0;for(let n of e)t.push(n);return t},Ef=(t,e)=>{t.clear();for(let n of e)t.add(n);return t},Af=()=>{pe.set(Array,(n,r,s)=>s?.mergeArrays?yf(n,r):bf(n,r)),pe.set(Set,(n,r,s)=>s?.mergeSets?Df(n,r):Ef(n,r)),pe.set(Object,(n,r,s)=>{let i=n,u=r,o=Object.keys(u);for(let a of o)if(!ve(a)){if(i[a]===void 0||Pe(i[a])||Pe(u[a])){i[a]=u[a];continue}if(dt(i[a],u[a])){i[a]=Lt(i[a],u[a],s);continue}i[a]=u[a]}return i}),pe.set(Map,(n,r,s)=>{let i=n,u=r;for(let[o,a]of u.entries()){if(!i.has(o)){i.set(o,a);continue}let c=i.get(o);if(Pe(c)||Pe(a)){i.set(o,a);continue}if(dt(a,c)){i.set(o,Lt(c,a,s));continue}i.set(o,a)}return i}),pe.set(Error,(n,r,s)=>{let i=n,u=r,o=In(u);for(let a of o){if(i[a]===void 0){i[a]=u[a];continue}if(dt(i[a],u[a])){i[a]=Lt(i[a],u[a],s);continue}i[a]=u[a]}return i}),[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array].forEach(n=>{pe.set(n,(r,s)=>new n(s))}),pe.set(ArrayBuffer,(n,r)=>r.slice(0)),pe.set(DataView,(n,r)=>{let s=r,i=s.buffer.slice(0);return new DataView(i,s.byteOffset,s.byteLength)}),[Error,TypeError,ReferenceError,SyntaxError,RangeError,EvalError,URIError].forEach(n=>{pe.set(n,(r,s)=>{let i=s,u=new i.constructor(i.message);i.name&&(u.name=i.name),i.stack&&(u.stack=i.stack);let o=Object.keys(i);for(let a of o)a!=="name"&&a!=="message"&&a!=="stack"&&!ve(a)&&(u[a]=i[a]);return u})})},Mu=!1,fs={mergeArrays:!0,mergeSets:!0},Lt=(t,e,n={})=>{if(Mu||(Af(),Mu=!0),n={...fs,...n},ht(e)||e instanceof Date)return e;if(dt(e,t)){let r=Object.getPrototypeOf(t)?.constructor||t.constructor,s=pe.get(r);return s?s(t,e,n):t}return e};var wf=(t,e)=>t.priority===e.priority?t.order-e.order:t.priority-e.priority,Cf=(t,e)=>t.priority===e.priority?e.order-t.order:t.priority-e.priority,pt=class t{heap=[];insertionCounter=0;compare;options;constructor(e={}){if(this.compare=e.lifo?Cf:wf,e.compare&&(this.compare=e.compare),e.maxHeap){let n=this.compare;this.compare=(r,s)=>-n(r,s)}this.options=e}push(e,n=0){let r={value:e,priority:n,order:this.insertionCounter++};this.heap.push(r),this.bubbleUp(this.heap.length-1)}pop(){if(this.heap.length===0)return null;let e=this.heap[0],n=this.heap.pop();return this.heap.length>0&&(this.heap[0]=n,this.bubbleDown(0)),e.value}popMany(e=1){let n=[];if(e===0)return n;e>this.heap.length&&(e=this.heap.length);for(let r=e;r>0;r--)n.push(this.pop());return n}peek(){return this.isEmpty()?null:this.heap[0].value}peekMany(e=1){return this.heap.slice(0,e).map(n=>n.value)}find(e){return this.heap.find(n=>e(n.value))?.value??null}heapify(e){this.heap=e.slice(0),this.insertionCounter=e.length;for(let n=Math.floor(this.heap.length/2);n>=0;n--)this.bubbleDown(n)}clone(){let e=new t(this.options);return e.heapify(this.heap),e}toSortedArray(){let e=this.clone(),n=[];for(;e.heap.length>0;)n.push(e.pop());return n}*[Symbol.iterator](){let e=this.clone();for(;e.heap.length>0;)yield e.pop()}size(){return this.heap.length}isEmpty(){return this.heap.length===0}clear(){this.heap=[],this.insertionCounter=0}bubbleUp(e){let n=e;for(;n>0;){let r=n-1>>1;if(this.compare(this.heap[n],this.heap[r])<0)this.swap(n,r),n=r;else break}}bubbleDown(e){let n=this.heap.length,r=e;for(;;){let s=(r<<1)+1,i=s+1,u=r;if(s<n&&this.compare(this.heap[s],this.heap[u])<0&&(u=s),i<n&&this.compare(this.heap[i],this.heap[u])<0&&(u=i),u===r)break;this.swap(r,u),r=u}}swap(e,n){[this.heap[e],this.heap[n]]=[this.heap[n],this.heap[e]]}};var G=async t=>{F($(t),"fn must be a function");try{return[await t(),null]}catch(e){return[null,e]}},ce=t=>{F($(t),"fn must be a function");try{return[t(),null]}catch(e){return[null,e]}};var Pt=class{promise;resolve;reject;constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}};typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>new Pt);var hs=class extends Promise{clear},me=(t,e=!0)=>{let n,r=new hs(s=>{n=setTimeout(()=>{n=null,s(e)},t)});return r.clear=()=>{n&&(clearTimeout(n),n=null)},r};if(typeof setImmediate!="function"){let t=0,e=new Map,n=new MessageChannel;n.port1.onmessage=async r=>{let s=r.data,i=e.get(s);if(!i)return;let[,u]=await G(i);u&&console.error("Error in setImmediate",u)},globalThis.setImmediate=(r,...s)=>{let i=t++;return e.set(i,()=>r(...s)),n.port2.postMessage(i),i},globalThis.clearImmediate=r=>{e.delete(r)}}var Ff={retry:new WeakMap,circuitBreaker:new WeakMap,rateLimit:new WeakMap,throttle:new WeakMap,debounce:new WeakMap,memoize:new WeakMap,withTimeout:new WeakMap,inflight:new WeakMap};var Tn=(t,e)=>{if(Ff[e].has(t))throw new Error(`Function is already wrapped with ${e}`)};var ds=class extends Error{constructor(e){super(e),this.name="RetryError"}};var _f=t=>{F(be(t),"opts must be an object"),X(t.retries,typeof t.retries=="number"&&t.retries>0,"retries must be a positive number"),X(t.delay,typeof t.delay=="number"&&t.delay>=0,"delay must be a positive number"),X(t.backoff,typeof t.backoff=="number"&&t.backoff>0,"backoff must be a positive number"),X(t.shouldRetry,$(t.shouldRetry),"shouldRetry must be a function"),X(t.signal,t.signal instanceof AbortSignal,"signal must be an AbortSignal")},y1=async(t,e)=>{F($(t),"fn must be a function"),Tn(t,"retry"),_f(e);let{delay:n=0,retries:r=3,backoff:s=1,jitterFactor:i=0,shouldRetry:u=()=>!0,signal:o}=e,a=0;for(;a<r;){o?.throwIfAborted();let[c,d]=await G(t);if(o?.throwIfAborted(),d===null)return c;if(d&&u(d)){await me(n*s*(1+i*Math.random())),a++,o?.throwIfAborted();continue}throw d}throw new ds("Max retries reached")};var Fe=()=>{},ms=()=>"_"+Math.random().toString(36).slice(2,9);var ps=new WeakMap,gt=t=>(ps.has(t)||ps.set(t,ms()),ps.get(t)),Ln=t=>{let e=new WeakSet,n=s=>{if(s===null)return"null";if(s===void 0)return"undefined";if(typeof s=="string")return`${s}`;if(typeof s=="number")return Object.is(s,-0)?"-0":String(s);if(typeof s=="boolean")return String(s);if(typeof s=="bigint")return`bi:${s}`;if(typeof s=="symbol")return`sym:${gt(s)}`;if(typeof s=="function")return`fn:${gt(s)}`;if(s instanceof Date)return`d:${s.getTime()}`;if(s instanceof RegExp)return`r:${s.toString()}`;if(s instanceof Error)return`e:${gt(s)}`;if(s instanceof WeakMap)return`wm:${gt(s)}`;if(s instanceof WeakSet)return`ws:${gt(s)}`;if(typeof s=="object"){if(e.has(s))return`circ:${gt(s)}`;if(e.add(s),s instanceof Map){let c=`map:${Array.from(s.entries()).map(([d,l])=>`${n(d)}:${n(l)}`).sort().join(",")}`;return e.delete(s),c}if(s instanceof Set){let c=`set:${Array.from(s).map(n).sort().join(",")}`;return e.delete(s),c}if(Array.isArray(s)){let a=`[${s.map(n).join(",")}]`;return e.delete(s),a}let o=`{${Object.keys(s).sort().map(a=>`"${a}":${n(s[a])}`).join(",")}}`;return e.delete(s),o}return`u:${String(s)}`};return t.map(n).join("|")||"0"};var Pn=t=>{if(t instanceof WeakRef){let e=t.deref();return[e,e===void 0]}return[t,!1]},Rn=(t,e,n,r,s)=>({value:r&&ls(t)&&t!==null?new WeakRef(t):t,createdAt:e,expiresAt:n,accessCount:1,lastAccessed:e,accessSequence:s}),yt=t=>Date.now()>=t.expiresAt;var gs=(t,e)=>{let n=Date.now();t.lastAccessed=n,t.accessCount=(t.accessCount??0)+1,t.accessSequence=e};var qn=t=>{let e=null,n=1/0,r=1/0;for(let[s,i]of t.entries()){let u=i.lastAccessed??0,o=i.accessSequence??0;(u<n||u===n&&o<r)&&(n=u,r=o,e=s)}return e&&t.delete(e),e};var ju=new WeakSet,Mn=(t,e={})=>{F($(t),"fn must be a function"),F(!ju.has(t),"Function is already wrapped by memoize");let{ttl:n=6e4,maxSize:r=1e3,generateKey:s,onError:i,cleanupInterval:u=6e4,useWeakRef:o=!1,shouldCache:a}=e,{staleIn:c,staleTimeout:d,adapter:l}=e;F(n>0,"ttl must be greater than 0"),F(r>0,"maxSize must be greater than 0"),F(kn(u,x=>typeof x=="number"&&x>=0),"cleanupInterval must be >= 0"),X(s,$(s),"generateKey must be a function"),X(i,$(i),"onError must be a function"),F(l===void 0,"memoizeSync does not support custom cache adapters (use memoize for async adapters like Redis)"),F(d===void 0,"memoizeSync does not support staleTimeout (sync functions execute instantly)"),F(c===void 0,"memoizeSync does not support staleIn (sync functions execute instantly, use ttl instead)");let f=new Map,m=0,y=0,h=0,p=0,g,D=()=>(m>=Number.MAX_SAFE_INTEGER-1&&(m=0),++m),E=()=>y++,A=()=>h++,C=()=>{let x=Date.now();for(let[S,R]of f.entries())x>=R.expiresAt&&f.delete(S)};u>0&&(g=setInterval(()=>C(),u),typeof g.unref=="function"&&g.unref());let _=function(...x){if(a){let[ue,Le]=ce(()=>a(...x));if(!Le&&!ue)return t(...x)}let[S,R]=ce(()=>s?s(...x):Ln(x));if(R)return i?.(R,x),A(),t(...x);let H=f.get(S);if(H&&!yt(H)){gs(H,D());let[ue,Le]=Pn(H.value);if(Le){f.delete(S),A();let[V,he]=ce(()=>t(...x));if(he)throw i?.(he,x),he;let oe=Date.now(),Ce=Rn(V,oe,oe+n,o,D());return f.size>=r&&(qn(f),p++),f.set(S,Ce),V}return E(),ue}A();let[k,q]=ce(()=>t(...x));if(q)throw i?.(q,x),q;let N=Date.now(),K=Rn(k,N,N+n,o,D());return f.size>=r&&(qn(f),p++),f.set(S,K),k};return _.cache={clear:()=>{f.clear(),y=0,h=0,p=0,m=0,g!==void 0&&(clearInterval(g),g=void 0)},delete:x=>f.delete(x),has:x=>{let S=f.get(x);return S?yt(S)?(f.delete(x),!1):!0:!1},get size(){return f.size},stats:()=>({hits:y,misses:h,evictions:p,hitRate:y+h>0?y/(y+h):0,size:f.size}),keys:()=>f.keys(),entries:()=>{let x=[];for(let[S,R]of f.entries())if(!yt(R)){let[H]=Pn(R.value);x.push([S,H])}return x}},ju.add(_),_};var $n=class{capacity;refillIntervalMs;#t;#r;#e;constructor(e,n){this.capacity=e,this.refillIntervalMs=n,this.#e={totalRequests:0,rejectedRequests:0,totalWaitTime:0,waitCount:0,createdAt:Date.now()},this.#t=e,this.#r=Date.now()}#n(){let e=Date.now(),n=e-this.#r,r=1/this.refillIntervalMs;if(n<0||n>this.refillIntervalMs*this.capacity*2){this.#r=e,this.#t=this.capacity;return}if(n>0){let s=n*r;this.#t=Math.min(this.capacity,this.#t+s),this.#r=e}}reset(){this.#t=this.capacity,this.#r=Date.now()}get tokens(){return Math.floor(this.#t)}consume(e=1){return this.#n(),this.#e.totalRequests++,this.#t>=e?(this.#t-=e,!0):(this.#e.rejectedRequests++,!1)}getWaitTimeMs(e=1){this.#n();let n=e-this.#t;if(n<=0)return 0;let r=1/this.refillIntervalMs;return Math.ceil(n/r)+1}getNextAvailable(e=1){return new Date(Date.now()+this.getWaitTimeMs(e))}get snapshot(){this.#n();let n=Date.now()-this.#e.createdAt;return{currentTokens:this.tokens,capacity:this.capacity,refillIntervalMs:this.refillIntervalMs,totalRequests:this.#e.totalRequests,rejectedRequests:this.#e.rejectedRequests,successfulRequests:this.#e.totalRequests-this.#e.rejectedRequests,rejectionRate:this.#e.totalRequests>0?this.#e.rejectedRequests/this.#e.totalRequests:0,totalWaitTime:this.#e.totalWaitTime,waitCount:this.#e.waitCount,averageWaitTime:this.#e.waitCount>0?this.#e.totalWaitTime/this.#e.waitCount:0,uptime:n,createdAt:this.#e.createdAt}}async waitForToken(e=1,n={}){let{onRateLimit:r,abortController:s,jitterFactor:i=0}=n;if(this.#n(),this.#t>=e)return;let u=Date.now();for(this.#e.waitCount++;this.#t<e;){if(s?.signal?.aborted)return;await r?.(new jn("Rate limit exceeded",this.capacity),this.getNextAvailable(e)),await me(this.getWaitTimeMs(e)+Math.random()*i),this.#n()}let o=Date.now();this.#e.totalWaitTime+=o-u}async waitAndConsume(e=1,n={}){let{onRateLimit:r,abortController:s,jitterFactor:i=0}=n;if(this.#n(),this.#e.totalRequests++,this.#t>=e)return this.#t-=e,!0;let u=Date.now();for(this.#e.waitCount++;this.#t<e;){if(s?.signal?.aborted)return this.#e.rejectedRequests++,!1;await r?.(new jn("Rate limit exceeded",this.capacity),this.getNextAvailable(e)),await me(this.getWaitTimeMs(e)+Math.random()*i),this.#n()}this.#t-=e;let o=Date.now();return this.#e.totalWaitTime+=o-u,!0}},jn=class extends Error{maxCalls;constructor(e,n){super(e),this.name="RateLimitError",this.maxCalls=n}};var Rt=class extends Error{constructor(e){super(e)}},Uu=t=>t?.constructor?.name===Rt.name;var Qe={sec:1e3,min:6e4,min15:9e5,min30:18e5,hour:36e5,hour2:72e5,hour4:144e5,hour8:288e5,hour12:432e5,day:864e5,week:6048e5,secs(t){return t*this.sec},mins(t){return t*this.min},hours(t){return t*this.hour},days(t){return t*this.day},weeks(t){return t*this.week},months(t){return Math.round(t*30.4*this.day)},years(t){return t*365*this.day}},Nf=t=>Qe.secs(t),Bf=t=>Qe.mins(t),Of=t=>Qe.hours(t),kf=t=>Qe.days(t),If=t=>Qe.weeks(t),Tf=t=>Qe.months(t),Lf=t=>Qe.years(t),Ku=t=>{let e=t.match(/^(\d+(?:\.\d+)?)\s*(s|sec|secs?|seconds?|m|min|mins?|minutes?|h|hr|hrs?|hour|hours?|d|day|days?|w|wk|wks?|week|weeks?|mo|mon|mons?|month|months?|y|yr|yrs?|year|years?)$/i);if(!e)throw new Error(`Invalid time duration: ${t}`);let[,n,r]=e,s=parseFloat(n),i=r.toLowerCase();if(i.startsWith("s"))return Nf(s);if(i.startsWith("m")&&!i.startsWith("mo"))return Bf(s);if(i.startsWith("h"))return Of(s);if(i.startsWith("d"))return kf(s);if(i.startsWith("w"))return If(s);if(i.startsWith("mo"))return Tf(s);if(i.startsWith("y"))return Lf(s);throw new Error(`Unknown unit: ${r}`)};var Un={kb:1024,mb:1048576,gb:1073741824,tb:1099511627776,kbs(t){return t*this.kb},mbs(t){return t*this.mb},gbs(t){return t*this.gb},tbs(t){return t*this.tb}},Pf=t=>Un.kbs(t),Rf=t=>Un.mbs(t),qf=t=>Un.gbs(t),Mf=t=>Un.tbs(t),Vu=t=>{let e=t.match(/^(\d+(?:\.\d+)?)\s*(kb|kbs?|kilobytes?|mb|mbs?|megabytes?|gb|gbs?|gigabytes?|tb|tbs?|terabytes?)$/i);if(!e)throw new Error(`Invalid byte size: ${t}`);let[,n,r]=e,s=parseFloat(n),i=r.toLowerCase();if(i.startsWith("k"))return Pf(s);if(i.startsWith("m"))return Rf(s);if(i.startsWith("g"))return qf(s);if(i.startsWith("t"))return Mf(s);throw new Error(`Unknown unit: ${r}`)};var $f=/^\d+$/,zu=(t,e={})=>{let{parseUnits:n=!1,skipConversion:r}=e;for(let s in t){let i=s,u=t[i];if(r?.(s,u))continue;if(typeof u=="object"&&u!==null){zu(u,e);continue}if(n&&typeof u=="string"){let[d,l]=ce(()=>Ku(u));if(!l&&typeof d=="number"){t[i]=d;continue}let[f,m]=ce(()=>Vu(u));if(!m&&typeof f=="number"){t[i]=f;continue}}let a=Pu(t[i]),c=Ru(t[i]);if(a||c){t[i]=a;continue}if(typeof u=="string"&&$f.test(u)){t[i]=Number(u);continue}}},nE=(t,e={})=>{F(typeof t=="object"&&t!==null,"flatConfig must be a non-null object"),F(typeof e=="object"&&e!==null,"opts must be a non-null object"),F(e.filter===void 0||typeof e.filter=="function","filter must be a function"),F(e.forceAllCapToLower===void 0||typeof e.forceAllCapToLower=="boolean","forceAllCapToLower must be a boolean"),F(e.separator===void 0||typeof e.separator=="string","separator must be a string"),F(e.stripPrefix===void 0||typeof e.stripPrefix=="string"||typeof e.stripPrefix=="number","stripPrefix must be a string or number"),F(e.parseUnits===void 0||typeof e.parseUnits=="boolean","parseUnits must be a boolean"),F(e.skipConversion===void 0||typeof e.skipConversion=="function","skipConversion must be a function"),F(e.memoizeOpts===void 0||typeof e.memoizeOpts=="object"||e.memoizeOpts===!1,"memoizeOpts must be an object or false");let{filter:n,forceAllCapToLower:r=!0,separator:s="_",stripPrefix:i,parseUnits:u=!1,skipConversion:o,memoizeOpts:a=!1}=e,c=m=>/^[A-Z0-9_]+$/.test(m),d=m=>{let y=m;return i!==void 0&&(typeof i=="number"?y=m.slice(i):y=m.startsWith(i)?m.slice(i.length):m),y.split(s).map(p=>c(p)&&r?p.toLowerCase():p).join(".")};function l(){let m=Z(t),y={},h=Object.entries(m).filter(([g,D])=>n?.(g,D)??!0).map(([g])=>g).sort(),[,p]=ce(()=>{Lu(y,h.map(g=>[d(g),m[g]])),zu(y,{parseUnits:u,skipConversion:o})});if(p instanceof Error&&p.message.includes("on primitive value")){let g=A=>A.split("_").join(s),D=(A,C)=>`${g(A)}=${C}`,E=["Failed to load flatmap variables.","You're likely trying to set a nested property on a non-object value.",`For example, if you have ${D("APP_DB_NAME","foo")}, and then you try to set`,`${D("APP_DB_NAME_TEST","bar")}, you'll get this error because ${g("APP_DB_NAME")} is a string.`,"The correct way is to designate each namespace (separated by underscores) as ",`an object. For example, ${D("APP_DB_NAME","foo")} becomes { db: { name: "foo" } }, and,`,`${D("APP_DB_NAME_TEST","bar")} becomes { db: { name: { test: "bar" } } }, but both cannot coexist.`,`
183
-
184
- You can either \`unset ${g("APP_PROBLEMATIC")}\` or scope all vars to \`${g("APP_NAMESPACE_NAME")}\` to`,"make it a nested object.",`
185
-
186
- `];console.error(E.join(" "))}if(p)throw p;return y}function f(m,y){let h=l(),p=as(h,m);return p??y}return a?{allConfigs:Mn(l,a),getConfig:Mn(f,a)}:{allConfigs:l,getConfig:f}};var Xe=class extends Pt{cleanup},qt=class{#t;#r;#e;#n=!1;#i=null;#o=null;#a=()=>{if(this.#n===!0)throw new Ge(`Event generator for ${this.#r.toString()} has been destroyed`,{event:this.#r,listener:this.#i,data:null})};cleanup;next;constructor(e,n,r){this.#t=e,this.#r=n,this.#e=new Xe,this.#e.promise.cleanup=this.cleanup,this.#e.promise.resolve=this.#e.resolve,this.#i=o=>{this.#o=o,this.#e.resolve(o),this.#e=new Xe,this.#e.promise.cleanup=this.cleanup,this.#e.promise.resolve=this.#e.resolve};let s=e.on(n,this.#i),i;this.next=()=>(this.#a(),this.#e.promise),this.cleanup=()=>{this.#n||(s(),this.#n=!0,this.#u.forEach(o=>{o.resolve?.(this.#o)}),this.#u.clear(),this.#o=null,i?.abort())};let u=r?.signal;if(u){if(u.aborted){this.#n=!0;return}i=new AbortController,u.addEventListener("abort",this.cleanup,{signal:i.signal})}}#u=new Set;async*[Symbol.asyncIterator](){for(;!this.#n;){let e=this.next();this.#u.add(e),yield await e,this.#u.delete(e)}return Promise.resolve(void 0)}get lastValue(){return this.#o}get done(){return this.#n}emit(e){this.#a(),this.#t.emit(this.#r,e)}};var Kn=class{status="stopped";#t={running:["paused","draining","stopped"],draining:["stopped","paused"],paused:["running","draining","stopped"],stopped:["running","draining"]};transition(e){F(this.#t[this.status].includes(e),`Invalid transition from ${this.status} to ${e}`),this.status=e}is(...e){return e.includes(this.status)}get state(){return this.status}};var Vn=class{observer;queueName;#t;#r;#e;#n;#i;#o;constructor(e,n){this.observer=e,this.queueName=n,this.#t=0,this.#r=0,this.#e=0,this.#n=0,this.#i=0,this.#o=0,this.observer.on(`queue:${this.queueName}:processing`,()=>{this.#t++}),this.observer.on(`queue:${this.queueName}:success`,r=>{this.#r++,this.#n++,this.#t--,this.#a(r.data.elapsed)}),this.observer.on(`queue:${this.queueName}:error`,()=>{this.#r++,this.#i++,this.#t--}),this.observer.on(`queue:${this.queueName}:rejected`,()=>this.#o++)}#a(e){this.#e=(this.#e*(this.#n-1)+e)/this.#n}get stats(){return{processed:this.#r,processing:this.#t,avgProcessingTime:this.#e,success:this.#n,error:this.#i,rejected:this.#o}}};var Ze=class{data;constructor(e){this.data=e}},Mt=(function(t){return t.full="Queue is full",t.notRunning="Queue is not running",t})({});var Dt=class{opts;#t;#r;#e;#n;#i;#o;#a;#u;#l;#c;#f;#d;#h;constructor(e){this.opts=e,this.#r=new Map,this.#e=Fe,this.#n=new Kn,this.#a=!0,this.#u=!1,this.#l=!1,this.#c=!1,this.#f=0,this.#d=0,this.#h=new Set;let{observer:n=new et,event:r,process:s,name:i,type:u="fifo",concurrency:o=1,pollIntervalMs:a=100,jitterFactor:c=0,rateLimitIntervalMs:d=1e3,processIntervalMs:l=0,taskTimeoutMs:f=0,autoStart:m=!0,debug:y=!1}=this.opts,{maxQueueSize:h=999999999,rateLimitCapacity:p=999999999}=this.opts;F(be(this.opts),"Options is required to be an object"),F($(n?.on),"ObserverEngine is required"),F(typeof r=="string"&&r.length>0||r instanceof RegExp,"Event is required to be a string or RegExp"),F($(s),"Process is required to be a function"),F(i&&typeof i=="string"&&i.length>0,"Name is required"),F(o>0,"Concurrency must be greater than 0"),F(a>0,"pollIntervalMs must be a number greater than 0"),F(c>=0&&c<=1,"Jitter must be a number greater than or equal to 0 and less than or equal to 1"),F(h>0,"MaxQueueSize must be a number greater than 0"),F(d>0,"rateLimitIntervalMs must be a number greater than 0"),F(p>0,"rateLimitCapacity must be a number greater than 0"),F(l>=0,"processIntervalMs must be a number greater than or equal to 0"),F(f>=0,"taskTimeoutMs must be a number greater than or equal to 0"),F(u==="fifo"||u==="lifo",'Type must be either "fifo" or "lifo"'),F(typeof m=="boolean","AutoStart must be a boolean"),h===1/0&&(h=999999999),p===1/0&&(p=999999999),Object.assign(this.opts,{observer:n,type:u,concurrency:o,maxQueueSize:h,pollIntervalMs:a,jitterFactor:c,processIntervalMs:l,taskTimeoutMs:f}),this.#c=y,this.#i=new Vn(n,i),this.#o=new $n(p,d),this.#t=new pt({lifo:u==="lifo"}),m&&this.start()}#p(){if(this.#l)return;this.#l=!0;let e=this.opts.observer.on(this.opts.event,n=>{if((n?.data??n)instanceof Ze)return;let s=n,i={data:s,_taskId:ms(),priority:this.#r.get(s)??0};if(this.#r.delete(s),this.#t.size()>=this.opts.maxQueueSize){this.#s("rejected",{...i,reason:Mt.full});return}this.#s("added",i),this.#a=!1,this.#t.push(i,i.priority)});this.#e=()=>{e(),this.#l=!1}}#s(e,n){if(this.#c){let r=[`[${this.name}] ${e}`,n?._taskId??"",n?.data??""];this.#c==="verbose"&&(r[1]=n),console.log(...r)}this.opts.observer.emit(`queue:${this.name}:${e}`,new Ze(n))}#g(){let e=++this.#f;for(let n=0;n<this.opts.concurrency;n++)this.#b(e,n)}async#b(e,n){let{pollIntervalMs:r,jitterFactor:s}=this.opts;for(this.#d++;this.#n.is("running")&&this.#f===e;){if(!this.pending){!this.#a&&!this.pending&&this.#h.size===0&&(this.#a=!0,this.#s("idle")),this.#u=!0,await me(r*(1+Math.random()*s)),this.#u=!1;continue}let i=this.#t.pop();i&&(this.#h.add(`${e}-${n}`),await this.#y(i),this.opts.processIntervalMs>0&&await me(this.opts.processIntervalMs),this.#h.delete(`${e}-${n}`))}this.#d--}async#y(e){if(!this.#n.is("running","draining")){this.#t.push(e);return}let n=!1;this.#n.is("draining")||await this.#o.waitAndConsume(1,{onRateLimit:()=>{this.#s("rate-limited",e),n=!0}});let r=Date.now();this.#s("processing",{...e,startedAt:r,rateLimited:n});let[,s]=await G(async()=>{if(this.opts.taskTimeoutMs===0)return this.opts.process(e.data);let u=await Promise.race([this.opts.process(e.data),me(this.opts.taskTimeoutMs,new Rt("Task timed out"))]);if(Uu(u))throw this.#s("timeout",{...e,error:u}),u;return u}),i=Date.now()-r;s?this.#s("error",{...e,error:s,rateLimited:n}):this.#s("success",{...e,startedAt:r,elapsed:i,rateLimited:n}),this.#t.size()===0&&this.#n.is("running")&&this.#s("empty")}start(){if(!this.#n.is("running"))return this.#p(),this.#n.transition("running"),this.#s("start"),this.#g(),this.#s("started"),Promise.resolve()}stop(){this.#n.is("stopped")||(this.#e(),this.#n.transition("stopped"),this.#s("stopped"))}pause(){if(!this.#n.is("paused"))return this.#n.transition("paused"),this.#s("paused"),Promise.resolve()}resume(){if(!this.#n.is("running"))return this.#p(),this.#n.transition("running"),this.#g(),this.#s("resumed"),Promise.resolve()}async#D(e=1/0,n,r){let s=e===1/0?this.#t.size():e,i=this.#t.popMany(s);if(s<i.length&&(s=i.length),n?.(s),s!==0)for(let u of i)await this.#y(u);return r?.(s),s}shutdown(e=!1){if(this.#n.is("draining","stopped"))return Promise.resolve(0);if(e){let n=this.purge();return this.stop(),this.#s("shutdown",{force:e,pending:n}),Promise.resolve(n)}return this.#D(1/0,n=>{this.pause(),this.#n.transition("draining"),this.#e(),this.#s("drain",{pending:n})},n=>{this.#s("drained",e?{pending:n}:{drained:n}),this.stop(),this.#s("shutdown",e?{force:e,pending:n}:{force:e})})}async flush(e=1/0){return this.#D(e,n=>this.#s("flush",{pending:n}),n=>this.#s("flushed",{flushed:n}))}purge(){let e=this.#t.size();return this.#t.clear(),this.#s("purged",{count:e}),e}add(e,n){return this.#n.is("running","paused")?this.#t.size()>=this.opts.maxQueueSize?(this.#s("rejected",{data:e,reason:Mt.full}),!1):(n&&this.#r.set(e,n),this.opts.observer.emit(this.opts.event,e),!0):(this.#s("rejected",{data:e,reason:Mt.notRunning}),!1)}debug(e=!1){this.#c=e}#m(){return this.opts.observer}on(e,n){return this.#m().on(`queue:${this.name}:${e}`,n)}once(e,n){return this.#m().once(`queue:${this.name}:${e}`,n)}off(e,n){return this.#m().off(`queue:${this.name}:${e}`,n)}get name(){return this.opts.name}get isWaiting(){return this.#u}get isIdle(){return this.#a&&this.#n.is("running")}get isRunning(){return this.#n.is("running")}get isPaused(){return this.#n.is("paused")}get isStopped(){return this.#n.is("stopped")}get isDraining(){return this.#n.is("draining")}get state(){return this.#n.state}get pending(){return this.#t.size()}get stats(){return Z(this.#i.stats)}get snapshot(){return{name:this.name,state:this.state,pending:this.pending,stats:this.stats,rateLimiter:this.#o.snapshot,activeRunners:this.#d,runningNodes:this.#h,isIdle:this.isIdle,isWaiting:this.isWaiting,isRunning:this.isRunning,isPaused:this.isPaused,isStopped:this.isStopped,isDraining:this.isDraining,isEmpty:this.pending===0}}};var et=class{#t=new Map;#r=new Map;#e=new EventTarget;#n;#i;#o;#a=new AbortController;#u;constructor(e){e&&(F(!e.name||typeof e.name=="string","Observable options.name must be a string",TypeError),F(!e.spy||typeof e.spy=="function","Observable options.spy must be a function",TypeError),F(!e.emitValidator||typeof e.emitValidator=="function","Observable options.emitValidator must be a function",TypeError),this.#i=e.spy),this.#u=this.#a.signal;let n=e?.signal,r=()=>this.clear();this.#u.addEventListener("abort",r,{once:!0}),n&&n.addEventListener("abort",r,{once:!0}),On(this,{on:this.on,once:this.once,emit:this.emit,off:this.off,observe:this.observe,debug:this.debug,$has:this.$has,$facts:this.$facts,$internals:this.$internals,name:e?.name||Math.random().toString(36).substring(7)}),this.#n=e?.emitValidator}name;$facts(){let e=[...this.#t.keys()],n=[...this.#r.keys()],r=Object.fromEntries([e.map(s=>[s,this.#t.get(s)?.size]),n.map(s=>[s,this.#r.get(s)?.size])].flat());return{listeners:e,rgxListeners:n,listenerCounts:r,hasSpy:!!this.#i}}$internals(){return{listenerMap:Z(this.#t),rgxListenerMap:Z(this.#r),internalListener:Z(this.#e),name:this.name,spy:this.#i}}$has(e){return e instanceof RegExp?this.#r.has(e.toString()):this.#t.has(e)||this.#r.has(e)}#l(...e){this.#i&&this.#i.apply(this,e)}debug(e=!0){let n=this.#i,r=s=>{let{event:i,fn:u,data:o,listener:a}=s;console.info(is(i,u,o||a)),n&&n(s)};if(e){this.#i=r,this.#o=n;return}this.#i=this.#o}spy(e,n=!1){F($(e),"spy must be a function",TypeError),F(n||this.#i===void 0,"you already have a spy function set",TypeError),this.#i=e}observe(e,n){let r=this,s=n?.signal;if(s?.aborted)return On(e,{on:Fe,once:Fe,off:Fe,emit:Fe,clear:Fe,cleanup:Fe}),e;let i=new Map,u=(p,g)=>{let D=i.get(p)||new Set;return D.add(g),i.set(p,D),g},o=()=>{for(let p of i.entries()){let[g,D]=p;[...D].forEach(E=>r.off(g,E)),i.set(g,new Set)}},a=p=>{let[g,D]=p.data;i.get(g)?.delete(D)};this.#e.addEventListener(de.off,a),this.#e.addEventListener(de.clear,o);let c=(p,g)=>r.on(p,u(p,g)),d=(p,g)=>r.once(p,u(p,g)),l=(p,g)=>{r.off(p,g)},f=(p,g)=>r.emit(p,g),m=()=>o(),y,h=()=>{o(),r.#e.removeEventListener(de.off,a),r.#e.removeEventListener(de.clear,o),y?.abort()};return s&&(y=new AbortController,AbortSignal.any([this.#u,s]).addEventListener("abort",h,{signal:y.signal})),On(e,{on:c,once:d,off:l,emit:f,clear:m,cleanup:h}),e}#c(e){let n=e.constructor===RegExp,r=e.toString();return{isRgx:n,eventName:r,rgx:e}}#f(e){return[...this.#t.keys()].filter(n=>e.test(n))}#d(e){return[...this.#r.keys()].filter(n=>Tu(n).test(e)).flat()}#h(e){let n=this.#f(e);return us(n,this.#t)}#p(e){let n=this.#d(e);return us(n,this.#r)}on(e,n,r){let s=typeof n=="function",i=s?n:void 0,u=s?r:n;if(u?.once||(Tt("on",{event:e,listener:i}),os("on",{event:e,listener:i})),i===void 0)return new qt(this,e,u);let o=u?.signal;if(o?.aborted)return()=>{};let{eventName:a,isRgx:c}=this.#c(e),d=c?this.#r:this.#t;this.#l({event:e,fn:u?.once?"once":"on",data:null,listener:i,context:this});let l=d.get(a)||new Set([i]);l&&!l.has(i)&&l.add(i),d.has(a)||d.set(a,l),this.#e.dispatchEvent(new Se(de.on,[e,i]));let f=!1,m=()=>{f||(f=!0,this.#l({event:e,fn:"cleanup",data:null,listener:i,context:this}),l.delete(i),l.size===0&&d.delete(a),this.#e.dispatchEvent(new Se(de.off,[e,i])))};if(o){let y=()=>{m(),this.#u.removeEventListener("abort",y)};o.addEventListener("abort",y,{once:!0}),this.#u.addEventListener("abort",y,{once:!0});let h=m;return()=>{h(),o.removeEventListener("abort",y),this.#u.removeEventListener("abort",y)}}return m}once(e,n,r){let s=typeof n=="function",i=s?n:void 0,u=s?r:n;if(Tt("once",{event:e,listener:i}),os("once",{event:e,listener:i}),!i){let c=new Xe,d=u?.signal;if(d?.aborted)return c.reject(d.reason??new DOMException("Aborted","AbortError")),c.promise.cleanup=()=>{},c.promise;let l,f=this.once(e,m=>{c.resolve(m),l?.abort()},u);return d&&(l=new AbortController,d.addEventListener("abort",()=>{f(),c.reject(d.reason??new DOMException("Aborted","AbortError"))},{signal:l.signal})),c.promise.cleanup=()=>{f(),l?.abort()},c.promise}let o=this,a=function(...c){let{eventName:d,isRgx:l}=o.#c(e),f=l?o.#r:o.#t,m=f.get(d);m&&(m.delete(a),m.size===0&&f.delete(d)),i.apply(o,c)};return this.on(e,a,{once:!0,...u})}off(e,n){Tt("off",{event:e,listener:n}),this.#l({event:e,fn:"off",data:null,listener:n,context:this});let{eventName:r,isRgx:s,rgx:i}=this.#c(e);(s?this.#f(i):[r]).forEach(o=>{let a=o;if(this.#e.dispatchEvent(new Se(de.off,[a,n])),n){let c=this.#t.get(a);c&&(c.delete(n),c.size===0&&this.#t.delete(a));return}this.#t.delete(a)})}emit(e,n){Tt("emit",{event:e,data:n}),this.#n&&this.#n(e,n,this),this.#l({event:e,fn:"emit",data:n,listener:null,context:this});let{eventName:r,isRgx:s,rgx:i}=this.#c(e);if(!s){let o=this.#t.get(r),a=this.#p(r);o&&o.forEach(c=>c.apply(this,[n,{event:e,listener:c}])),a&&a.forEach(({func:c})=>c.apply(this,[{data:n,event:e,listener:c}])),this.#e.dispatchEvent(new Se(de.emit,[r,n]));return}let u=this.#h(i);u&&u.forEach(({event:o,func:a})=>a.apply(this,[n,{event:o,listener:a}])),this.#f(i).forEach(o=>{this.#e.dispatchEvent(new Se(de.emit,[o,n]))})}clear(){this.#t.clear(),this.#r.clear(),this.#e.dispatchEvent(new Se(de.clear,["clear",null]))}queue(e,n,r){return new Dt({...r,event:e,process:n,observer:this})}};var _e=new et({name:"noorm",spy:process.env.NOORM_DEBUG?t=>console.error(`[noorm:${t.fn}] ${String(t.event)}`):void 0});var Wu=".tmpl",zn="$helpers",Ju=[".ts",".js",".mjs"];import ns from"path";import{readdir as uD}from"fs/promises";import Wn from"path";import{stat as Uf}from"fs/promises";import{pathToFileURL as jf}from"url";async function tt(t){let r=await import(`${jf(t).href}?t=${Date.now()}`);return r.default!==void 0?r.default:r}async function Kf(t,e){let n=[],r=Wn.resolve(t),s=Wn.resolve(e);for(;r.startsWith(s);){let i=await Vf(r);i&&n.unshift(i);let u=Wn.dirname(r);if(u===r)break;r=u}return n}async function Vf(t){for(let e of Ju){let n=Wn.join(t,`${zn}${e}`),[r]=await G(()=>Uf(n));if(r?.isFile())return n}return null}async function Yu(t,e){let n=await Kf(t,e),r={};for(let s of n){let[i,u]=await G(()=>tt(s));if(u){_e.emit("error",{source:"template",error:u,context:{filepath:s,operation:"load-helpers"}});continue}if(i&&typeof i=="object"){let o=i,a=Object.keys(o).length;Object.assign(r,o),_e.emit("template:helpers",{filepath:s,count:a})}}return r}import jm from"path";import{readFile as rh}from"fs/promises";var zf=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Wf=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Jf=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,ys={Space_Separator:zf,ID_Start:Wf,ID_Continue:Jf},z={isSpaceSeparator(t){return typeof t=="string"&&ys.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||ys.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||ys.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},bs,ee,Ne,Yn,Re,ge,Y,ws,jt,Yf=function(e,n){bs=String(e),ee="start",Ne=[],Yn=0,Re=1,ge=0,Y=void 0,ws=void 0,jt=void 0;do Y=Hf(),Xf[ee]();while(Y.type!=="eof");return typeof n=="function"?Es({"":jt},"",n):jt};function Es(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){let i=String(s),u=Es(r,i,n);u===void 0?delete r[i]:Object.defineProperty(r,i,{value:u,writable:!0,enumerable:!0,configurable:!0})}else for(let s in r){let i=Es(r,s,n);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return n.call(t,e,r)}var O,B,$t,xe,I;function Hf(){for(O="default",B="",$t=!1,xe=1;;){I=Be();let t=Gu[O]();if(t)return t}}function Be(){if(bs[Yn])return String.fromCodePoint(bs.codePointAt(Yn))}function b(){let t=Be();return t===`
187
- `?(Re++,ge=0):t?ge+=t.length:ge++,t&&(Yn+=t.length),t}var Gu={default(){switch(I){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
188
- `:case"\r":case"\u2028":case"\u2029":b();return;case"/":b(),O="comment";return;case void 0:return b(),j("eof")}if(z.isSpaceSeparator(I)){b();return}return Gu[ee]()},comment(){switch(I){case"*":b(),O="multiLineComment";return;case"/":b(),O="singleLineComment";return}throw U(b())},multiLineComment(){switch(I){case"*":b(),O="multiLineCommentAsterisk";return;case void 0:throw U(b())}b()},multiLineCommentAsterisk(){switch(I){case"*":b();return;case"/":b(),O="default";return;case void 0:throw U(b())}b(),O="multiLineComment"},singleLineComment(){switch(I){case`
189
- `:case"\r":case"\u2028":case"\u2029":b(),O="default";return;case void 0:return b(),j("eof")}b()},value(){switch(I){case"{":case"[":return j("punctuator",b());case"n":return b(),nt("ull"),j("null",null);case"t":return b(),nt("rue"),j("boolean",!0);case"f":return b(),nt("alse"),j("boolean",!1);case"-":case"+":b()==="-"&&(xe=-1),O="sign";return;case".":B=b(),O="decimalPointLeading";return;case"0":B=b(),O="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":B=b(),O="decimalInteger";return;case"I":return b(),nt("nfinity"),j("numeric",1/0);case"N":return b(),nt("aN"),j("numeric",NaN);case'"':case"'":$t=b()==='"',B="",O="string";return}throw U(b())},identifierNameStartEscape(){if(I!=="u")throw U(b());b();let t=As();switch(t){case"$":case"_":break;default:if(!z.isIdStartChar(t))throw Hu();break}B+=t,O="identifierName"},identifierName(){switch(I){case"$":case"_":case"\u200C":case"\u200D":B+=b();return;case"\\":b(),O="identifierNameEscape";return}if(z.isIdContinueChar(I)){B+=b();return}return j("identifier",B)},identifierNameEscape(){if(I!=="u")throw U(b());b();let t=As();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!z.isIdContinueChar(t))throw Hu();break}B+=t,O="identifierName"},sign(){switch(I){case".":B=b(),O="decimalPointLeading";return;case"0":B=b(),O="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":B=b(),O="decimalInteger";return;case"I":return b(),nt("nfinity"),j("numeric",xe*(1/0));case"N":return b(),nt("aN"),j("numeric",NaN)}throw U(b())},zero(){switch(I){case".":B+=b(),O="decimalPoint";return;case"e":case"E":B+=b(),O="decimalExponent";return;case"x":case"X":B+=b(),O="hexadecimal";return}return j("numeric",xe*0)},decimalInteger(){switch(I){case".":B+=b(),O="decimalPoint";return;case"e":case"E":B+=b(),O="decimalExponent";return}if(z.isDigit(I)){B+=b();return}return j("numeric",xe*Number(B))},decimalPointLeading(){if(z.isDigit(I)){B+=b(),O="decimalFraction";return}throw U(b())},decimalPoint(){switch(I){case"e":case"E":B+=b(),O="decimalExponent";return}if(z.isDigit(I)){B+=b(),O="decimalFraction";return}return j("numeric",xe*Number(B))},decimalFraction(){switch(I){case"e":case"E":B+=b(),O="decimalExponent";return}if(z.isDigit(I)){B+=b();return}return j("numeric",xe*Number(B))},decimalExponent(){switch(I){case"+":case"-":B+=b(),O="decimalExponentSign";return}if(z.isDigit(I)){B+=b(),O="decimalExponentInteger";return}throw U(b())},decimalExponentSign(){if(z.isDigit(I)){B+=b(),O="decimalExponentInteger";return}throw U(b())},decimalExponentInteger(){if(z.isDigit(I)){B+=b();return}return j("numeric",xe*Number(B))},hexadecimal(){if(z.isHexDigit(I)){B+=b(),O="hexadecimalInteger";return}throw U(b())},hexadecimalInteger(){if(z.isHexDigit(I)){B+=b();return}return j("numeric",xe*Number(B))},string(){switch(I){case"\\":b(),B+=Gf();return;case'"':if($t)return b(),j("string",B);B+=b();return;case"'":if(!$t)return b(),j("string",B);B+=b();return;case`
190
- `:case"\r":throw U(b());case"\u2028":case"\u2029":Zf(I);break;case void 0:throw U(b())}B+=b()},start(){switch(I){case"{":case"[":return j("punctuator",b())}O="value"},beforePropertyName(){switch(I){case"$":case"_":B=b(),O="identifierName";return;case"\\":b(),O="identifierNameStartEscape";return;case"}":return j("punctuator",b());case'"':case"'":$t=b()==='"',O="string";return}if(z.isIdStartChar(I)){B+=b(),O="identifierName";return}throw U(b())},afterPropertyName(){if(I===":")return j("punctuator",b());throw U(b())},beforePropertyValue(){O="value"},afterPropertyValue(){switch(I){case",":case"}":return j("punctuator",b())}throw U(b())},beforeArrayValue(){if(I==="]")return j("punctuator",b());O="value"},afterArrayValue(){switch(I){case",":case"]":return j("punctuator",b())}throw U(b())},end(){throw U(b())}};function j(t,e){return{type:t,value:e,line:Re,column:ge}}function nt(t){for(let e of t){if(Be()!==e)throw U(b());b()}}function Gf(){switch(Be()){case"b":return b(),"\b";case"f":return b(),"\f";case"n":return b(),`
191
- `;case"r":return b(),"\r";case"t":return b()," ";case"v":return b(),"\v";case"0":if(b(),z.isDigit(Be()))throw U(b());return"\0";case"x":return b(),Qf();case"u":return b(),As();case`
192
- `:case"\u2028":case"\u2029":return b(),"";case"\r":return b(),Be()===`
193
- `&&b(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw U(b());case void 0:throw U(b())}return b()}function Qf(){let t="",e=Be();if(!z.isHexDigit(e)||(t+=b(),e=Be(),!z.isHexDigit(e)))throw U(b());return t+=b(),String.fromCodePoint(parseInt(t,16))}function As(){let t="",e=4;for(;e-- >0;){let n=Be();if(!z.isHexDigit(n))throw U(b());t+=b()}return String.fromCodePoint(parseInt(t,16))}var Xf={start(){if(Y.type==="eof")throw rt();Ds()},beforePropertyName(){switch(Y.type){case"identifier":case"string":ws=Y.value,ee="afterPropertyName";return;case"punctuator":Jn();return;case"eof":throw rt()}},afterPropertyName(){if(Y.type==="eof")throw rt();ee="beforePropertyValue"},beforePropertyValue(){if(Y.type==="eof")throw rt();Ds()},beforeArrayValue(){if(Y.type==="eof")throw rt();if(Y.type==="punctuator"&&Y.value==="]"){Jn();return}Ds()},afterPropertyValue(){if(Y.type==="eof")throw rt();switch(Y.value){case",":ee="beforePropertyName";return;case"}":Jn()}},afterArrayValue(){if(Y.type==="eof")throw rt();switch(Y.value){case",":ee="beforeArrayValue";return;case"]":Jn()}},end(){}};function Ds(){let t;switch(Y.type){case"punctuator":switch(Y.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Y.value;break}if(jt===void 0)jt=t;else{let e=Ne[Ne.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,ws,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Ne.push(t),Array.isArray(t)?ee="beforeArrayValue":ee="beforePropertyName";else{let e=Ne[Ne.length-1];e==null?ee="end":Array.isArray(e)?ee="afterArrayValue":ee="afterPropertyValue"}}function Jn(){Ne.pop();let t=Ne[Ne.length-1];t==null?ee="end":Array.isArray(t)?ee="afterArrayValue":ee="afterPropertyValue"}function U(t){return Hn(t===void 0?`JSON5: invalid end of input at ${Re}:${ge}`:`JSON5: invalid character '${Qu(t)}' at ${Re}:${ge}`)}function rt(){return Hn(`JSON5: invalid end of input at ${Re}:${ge}`)}function Hu(){return ge-=5,Hn(`JSON5: invalid identifier character at ${Re}:${ge}`)}function Zf(t){console.warn(`JSON5: '${Qu(t)}' in strings is not valid ECMAScript; consider escaping`)}function Qu(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Hn(t){let e=new SyntaxError(t);return e.lineNumber=Re,e.columnNumber=ge,e}var eh=function(e,n,r){let s=[],i="",u,o,a="",c;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(r=n.space,c=n.quote,n=n.replacer),typeof n=="function")o=n;else if(Array.isArray(n)){u=[];for(let h of n){let p;typeof h=="string"?p=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(p=String(h)),p!==void 0&&u.indexOf(p)<0&&u.push(p)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),a=" ".substr(0,r)):typeof r=="string"&&(a=r.substr(0,10)),d("",{"":e});function d(h,p){let g=p[h];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(h):typeof g.toJSON=="function"&&(g=g.toJSON(h))),o&&(g=o.call(p,h,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return l(g,!1);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?y(g):f(g)}function l(h){let p={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},D="";for(let A=0;A<h.length;A++){let C=h[A];switch(C){case"'":case'"':p[C]++,D+=C;continue;case"\0":if(z.isDigit(h[A+1])){D+="\\x00";continue}}if(g[C]){D+=g[C];continue}if(C<" "){let _=C.charCodeAt(0).toString(16);D+="\\x"+("00"+_).substring(_.length);continue}D+=C}let E=c||Object.keys(p).reduce((A,C)=>p[A]<p[C]?A:C);return D=D.replace(new RegExp(E,"g"),g[E]),E+D+E}function f(h){if(s.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");s.push(h);let p=i;i=i+a;let g=u||Object.keys(h),D=[];for(let A of g){let C=d(A,h);if(C!==void 0){let _=m(A)+":";a!==""&&(_+=" "),_+=C,D.push(_)}}let E;if(D.length===0)E="{}";else{let A;if(a==="")A=D.join(","),E="{"+A+"}";else{let C=`,
194
- `+i;A=D.join(C),E=`{
195
- `+i+A+`,
196
- `+p+"}"}}return s.pop(),i=p,E}function m(h){if(h.length===0)return l(h,!0);let p=String.fromCodePoint(h.codePointAt(0));if(!z.isIdStartChar(p))return l(h,!0);for(let g=p.length;g<h.length;g++)if(!z.isIdContinueChar(String.fromCodePoint(h.codePointAt(g))))return l(h,!0);return h}function y(h){if(s.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");s.push(h);let p=i;i=i+a;let g=[];for(let E=0;E<h.length;E++){let A=d(String(E),h);g.push(A!==void 0?A:"null")}let D;if(g.length===0)D="[]";else if(a==="")D="["+g.join(",")+"]";else{let E=`,
197
- `+i,A=g.join(E);D=`[
198
- `+i+A+`,
199
- `+p+"]"}return s.pop(),i=p,D}},th={parse:Yf,stringify:eh},nh=th,Xu=nh;async function Gn(t){let e=await rh(t,"utf-8");return Xu.parse(e)}var Uc=jl(jc(),1);import{readFile as Om}from"fs/promises";async function Jr(t){let e=await Om(t,"utf-8");return(0,Uc.parse)(e)}import{readFile as Mm}from"fs/promises";var L=class t extends Error{constructor(e,n,r,...s){Array.isArray(n)&&(n=n.join(" ").trim()),super(n),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let i of s)for(let u in i){let o=i[u];this[u]=Buffer.isBuffer(o)?o.toString(r.encoding):o==null?o:JSON.parse(JSON.stringify(o))}}};var Kc=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var Yr=function(t){let e=[];for(let n=0,r=t.length;n<r;n++){let s=t[n];if(s==null||s===!1)e[n]={disabled:!0};else if(typeof s=="string")e[n]={name:s};else if(Kc(s)){if(typeof s.name!="string")throw new L("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${n}`,"when column is an object literal"]);e[n]=s}else throw new L("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(s)} at position ${n}`])}return e};var ru=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let n=this.length+e.length;if(n>=this.size&&(this.resize(),n>=this.size))throw Error("INVALID_BUFFER_STATE");let r=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),r.copy(this.buf,e.length),this.length+=e.length}else{let n=this.length++;n===this.size&&this.resize();let r=this.clone();this.buf[0]=e,r.copy(this.buf,1,0,n)}}append(e){let n=this.length++;n===this.size&&this.resize(),this.buf[n]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let n=Buffer.allocUnsafe(this.size);this.buf.copy(n,0,0,e),this.buf=n}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},su=ru;var km=12,Im=13,Tm=10,Lm=32,Pm=9,Vc=function(t){return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new su(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter.map(e=>e.length),t.quote!==null?t.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new su(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([Im],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Tm],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([km],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Lm],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Pm],"utf8").toString(),t.encoding)]}};var zc=function(t){return t.replace(/([A-Z])/g,function(e,n){return"_"+n.toLowerCase()})};var iu=function(t){let e={};for(let r in t)e[zc(r)]=t[r];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new L("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new L("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new L("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(r){let s=Date.parse(r);return isNaN(s)?r:new Date(s)};else if(typeof e.cast_date!="function")throw new L("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=Yr(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new L("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new L("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new L("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new L("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new L("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let n=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new L("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${n}`],e);if(e.delimiter=e.delimiter.map(function(r){if(r==null||r===!1)return Buffer.from(",",e.encoding);if(typeof r=="string"&&(r=Buffer.from(r,e.encoding)),!Buffer.isBuffer(r)||r.length===0)throw new L("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${n}`],e);return r}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(t.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new L("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new L("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new L("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(r,s){if(typeof r!="string"&&!Buffer.isBuffer(r))throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${s},`,`got ${JSON.stringify(r)}`],e);if(r.length===0)throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${s},`,`got ${JSON.stringify(r)}`],e);return typeof r=="string"&&(r=Buffer.from(r,e.encoding)),r}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e};var Wc=function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},Rm=13,qm=10,Bt={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},Jc=function(t={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},n=iu(t);return{info:e,original_options:t,options:n,state:Vc(n),__needMoreData:function(r,s,i){if(i)return!1;let{encoding:u,escape:o,quote:a}=this.options,{quoting:c,needMoreDataSize:d,recordDelimiterMaxLength:l}=this.state,f=s-r-1,m=Math.max(d,l===0?Buffer.from(`\r
200
- `,u).length:l,c?(o===null?0:o.length)+a.length:0,c?a.length+l:0);return f<m},parse:function(r,s,i,u){let{bom:o,comment_no_infix:a,encoding:c,from_line:d,ltrim:l,max_record_size:f,raw:m,relax_quotes:y,rtrim:h,skip_empty_lines:p,to:g,to_line:D}=this.options,{comment:E,escape:A,quote:C,record_delimiter:_}=this.options,{bomSkipped:x,previousBuf:S,rawBuffer:R,escapeIsQuote:H}=this.state,k;if(S===void 0)if(r===void 0){u();return}else k=r;else S!==void 0&&r===void 0?k=S:k=Buffer.concat([S,r]);if(x===!1)if(o===!1)this.state.bomSkipped=!0;else if(k.length<3){if(s===!1){this.state.previousBuf=k;return}}else{for(let K in Bt)if(Bt[K].compare(k,0,Bt[K].length)===0){let ue=Bt[K].length;this.state.bufBytesStart+=ue,k=k.slice(ue);let Le=iu({...this.original_options,encoding:K});for(let V in Le)this.options[V]=Le[V];({comment:E,escape:A,quote:C}=this.options);break}this.state.bomSkipped=!0}let q=k.length,N;for(N=0;N<q&&!this.__needMoreData(N,q,s);N++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),D!==-1&&this.info.lines>D){this.state.stop=!0,u();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,N)&&(_=this.options.record_delimiter);let K=k[N];if(m===!0&&R.append(K),(K===Rm||K===qm)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(A!==null&&this.state.quoting===!0&&this.__isEscape(k,N,K)&&N+A.length<q)if(H){if(this.__isQuote(k,N+A.length)){this.state.escaping=!0,N+=A.length-1;continue}}else{this.state.escaping=!0,N+=A.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,N))if(this.state.quoting===!0){let V=k[N+C.length],he=h&&this.__isCharTrimable(k,N+C.length),oe=E!==null&&this.__compareBytes(E,k,N+C.length,V),Ce=this.__isDelimiter(k,N+C.length,V),Sn=_.length===0?this.__autoDiscoverRecordDelimiter(k,N+C.length):this.__isRecordDelimiter(V,k,N+C.length);if(A!==null&&this.__isEscape(k,N,K)&&this.__isQuote(k,N+A.length))N+=A.length-1;else if(!V||Ce||Sn||oe||he){this.state.quoting=!1,this.state.wasQuoting=!0,N+=C.length-1;continue}else if(y===!1){let vu=this.__error(new L("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(V)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(vu!==void 0)return vu}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(C),N+=C.length-1}else if(this.state.field.length!==0){if(y===!1){let V=this.__infoField(),he=Object.keys(Bt).map(Ce=>Bt[Ce].equals(this.state.field.toString())?Ce:!1).filter(Boolean)[0],oe=this.__error(new L("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(V.column)} at line ${V.lines}, value is ${JSON.stringify(this.state.field.toString(c))}`,he?`(${he} bom)`:void 0],this.options,V,{field:this.state.field}));if(oe!==void 0)return oe}}else{this.state.quoting=!0,N+=C.length-1;continue}if(this.state.quoting===!1){let V=this.__isRecordDelimiter(K,k,N);if(V!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=d){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),N+=V-1;continue}if(p===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,N+=V-1;continue}this.info.bytes=this.state.bufBytesStart+N;let Ce=this.__onField();if(Ce!==void 0)return Ce;this.info.bytes=this.state.bufBytesStart+N+V;let Sn=this.__onRecord(i);if(Sn!==void 0)return Sn;if(g!==-1&&this.info.records>=g){this.state.stop=!0,u();return}}this.state.commenting=!1,N+=V-1;continue}if(this.state.commenting)continue;if(E!==null&&(a===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(E,k,N,K)!==0){this.state.commenting=!0;continue}let he=this.__isDelimiter(k,N,K);if(he!==0){this.info.bytes=this.state.bufBytesStart+N;let oe=this.__onField();if(oe!==void 0)return oe;N+=he-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new L("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${f}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let ue=l===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(k,N),Le=h===!1||this.state.wasQuoting===!1;if(ue===!0&&Le===!0)this.state.field.append(K);else{if(h===!0&&!this.__isCharTrimable(k,N))return this.__error(new L("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));ue===!1&&(N+=this.__isCharTrimable(k,N)-1);continue}}if(s===!0)if(this.state.quoting===!0){let K=this.__error(new L("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(K!==void 0)return K}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+N;let K=this.__onField();if(K!==void 0)return K;let ue=this.__onRecord(i);if(ue!==void 0)return ue}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=N,this.state.previousBuf=k.slice(N);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(r){let{columns:s,group_columns_by_name:i,encoding:u,info:o,from:a,relax_column_count:c,relax_column_count_less:d,relax_column_count_more:l,raw:f,skip_records_with_empty_values:m}=this.options,{enabled:y,record:h}=this.state;if(y===!1)return this.__resetRecord();let p=h.length;if(s===!0){if(m===!0&&Wc(h)){this.__resetRecord();return}return this.__firstLineToColumns(h)}if(s===!1&&this.info.records===0&&(this.state.expectedRecordLength=p),p!==this.state.expectedRecordLength){let g=s===!1?new L("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${p} on line ${this.info.lines}`],this.options,this.__infoField(),{record:h}):new L("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${s.length},`,`got ${p} on line ${this.info.lines}`],this.options,this.__infoField(),{record:h});if(c===!0||d===!0&&p<this.state.expectedRecordLength||l===!0&&p>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=g;else{let D=this.__error(g);if(D)return D}}if(m===!0&&Wc(h)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,a===1||this.info.records>=a){let{objname:g}=this.options;if(s!==!1){let D={};for(let E=0,A=h.length;E<A;E++)s[E]===void 0||s[E].disabled||(i===!0&&D[s[E].name]!==void 0?Array.isArray(D[s[E].name])?D[s[E].name]=D[s[E].name].concat(h[E]):D[s[E].name]=[D[s[E].name],h[E]]:D[s[E].name]=h[E]);if(f===!0||o===!0){let E=Object.assign({record:D},f===!0?{raw:this.state.rawBuffer.toString(u)}:{},o===!0?{info:this.__infoRecord()}:{}),A=this.__push(g===void 0?E:[D[g],E],r);if(A)return A}else{let E=this.__push(g===void 0?D:[D[g],D],r);if(E)return E}}else if(f===!0||o===!0){let D=Object.assign({record:h},f===!0?{raw:this.state.rawBuffer.toString(u)}:{},o===!0?{info:this.__infoRecord()}:{}),E=this.__push(g===void 0?D:[h[g],D],r);if(E)return E}else{let D=this.__push(g===void 0?h:[h[g],h],r);if(D)return D}}this.__resetRecord()},__firstLineToColumns:function(r){let{firstLineToHeaders:s}=this.state;try{let i=s===void 0?r:s.call(null,r);if(!Array.isArray(i))return this.__error(new L("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(i)}`],this.options,this.__infoField(),{headers:i}));let u=Yr(i);this.state.expectedRecordLength=u.length,this.options.columns=u,this.__resetRecord();return}catch(i){return i}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:r,encoding:s,rtrim:i,max_record_size:u}=this.options,{enabled:o,wasQuoting:a}=this.state;if(o===!1)return this.__resetField();let c=this.state.field.toString(s);if(i===!0&&a===!1&&(c=c.trimRight()),r===!0){let[d,l]=this.__cast(c);if(d!==void 0)return d;c=l}this.state.record.push(c),u!==0&&typeof c=="string"&&(this.state.record_length+=c.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(r,s){let{on_record:i}=this.options;if(i!==void 0){let u=this.__infoRecord();try{r=i.call(null,r,u)}catch(o){return o}if(r==null)return}s(r)},__cast:function(r){let{columns:s,relax_column_count:i}=this.options;if(Array.isArray(s)===!0&&i&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let o=this.__infoField();return[void 0,this.state.castField.call(null,r,o)]}catch(o){return[o]}if(this.__isFloat(r))return[void 0,parseFloat(r)];if(this.options.cast_date!==!1){let o=this.__infoField();return[void 0,this.options.cast_date.call(null,r,o)]}return[void 0,r]},__isCharTrimable:function(r,s){return((u,o)=>{let{timchars:a}=this.state;e:for(let c=0;c<a.length;c++){let d=a[c];for(let l=0;l<d.length;l++)if(d[l]!==u[o+l])continue e;return d.length}return 0})(r,s)},__isFloat:function(r){return r-parseFloat(r)+1>=0},__compareBytes:function(r,s,i,u){if(r[0]!==u)return 0;let o=r.length;for(let a=1;a<o;a++)if(r[a]!==s[i+a])return 0;return o},__isDelimiter:function(r,s,i){let{delimiter:u,ignore_last_delimiters:o}=this.options;if(o===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(o!==!1&&typeof o=="number"&&this.state.record.length===o-1)return 0;e:for(let a=0;a<u.length;a++){let c=u[a];if(c[0]===i){for(let d=1;d<c.length;d++)if(c[d]!==r[s+d])continue e;return c.length}}return 0},__isRecordDelimiter:function(r,s,i){let{record_delimiter:u}=this.options,o=u.length;e:for(let a=0;a<o;a++){let c=u[a],d=c.length;if(c[0]===r){for(let l=1;l<d;l++)if(c[l]!==s[i+l])continue e;return c.length}}return 0},__isEscape:function(r,s,i){let{escape:u}=this.options;if(u===null)return!1;let o=u.length;if(u[0]===i){for(let a=0;a<o;a++)if(u[a]!==r[s+a])return!1;return!0}return!1},__isQuote:function(r,s){let{quote:i}=this.options;if(i===null)return!1;let u=i.length;for(let o=0;o<u;o++)if(i[o]!==r[s+o])return!1;return!0},__autoDiscoverRecordDelimiter:function(r,s){let{encoding:i}=this.options,u=[Buffer.from(`\r
201
- `,i),Buffer.from(`
202
- `,i),Buffer.from("\r",i)];e:for(let o=0;o<u.length;o++){let a=u[o].length;for(let c=0;c<a;c++)if(u[o][c]!==r[s+c])continue e;return this.options.record_delimiter.push(u[o]),this.state.recordDelimiterMaxLength=u[o].length,u[o].length}return 0},__error:function(r){let{encoding:s,raw:i,skip_records_with_error:u}=this.options,o=typeof r=="string"?new Error(r):r;if(u){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(o,i?this.state.rawBuffer.toString(s):void 0)}catch(a){return a}return}else return o},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:r,raw:s,encoding:i}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:r===!0,index:this.state.record.length,raw:s?this.state.rawBuffer.toString(i):void 0}},__infoField:function(){let{columns:r}=this.options,s=Array.isArray(r);return{...this.__infoRecord(),column:s===!0?r.length>this.state.record.length?r[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var Yc=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let n=e&&e.objname?{}:[],r=Jc(e),s=o=>{r.options.objname===void 0?n.push(o):n[o[0]]=o[1]},i=()=>{},u=r.parse(t,!0,s,i);if(u!==void 0)throw u;return n};async function uu(t){let e=await Mm(t,"utf-8");return Yc(e,{columns:!0,skip_empty_lines:!0,trim:!0})}import{readFile as $m}from"fs/promises";async function ou(t){return $m(t,"utf-8")}var Hc={".json":Gn,".json5":Gn,".yaml":Jr,".yml":Jr,".csv":uu,".js":tt,".mjs":tt,".ts":tt,".sql":ou};function Gc(t){return t in Hc}function Um(t){return Hc[t]}async function au(t){let e=jm.extname(t).toLowerCase(),n=Um(e);if(!n)throw new Error(`No loader registered for extension: ${e}`);return n(t)}function lu(){return lu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lu.apply(this,arguments)}function Km(t,e){return Wm(t)||Ym(t,e)||Gm()}function Vm(t){return zm(t)||Jm(t)||Hm()}function zm(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function Wm(t){if(Array.isArray(t))return t}function Jm(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function Ym(t,e){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]"){var n=[],r=!0,s=!1,i=void 0;try{for(var u=t[Symbol.iterator](),o;!(r=(o=u.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(a){s=!0,i=a}finally{try{!r&&u.return!=null&&u.return()}finally{if(s)throw i}}return n}}function Hm(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Gm(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function M(t){return t==null}function rl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return M(t)?e:!!t}function wn(t){return typeof t=="string"}function w(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return M(t)?e:wn(t)?t:String(t)}function pu(t,e){var n=w(t),r=rl(e);return n===""?"":(r&&(n=n.toLowerCase()),n.substr(0,1).toUpperCase()+n.substr(1))}function Zr(t){var e=w(t,"");return e.toLowerCase()}var mu="\\d",es="\\s\\uFEFF\\xA0",Ye="\\uD800-\\uDBFF",He="\\uDC00-\\uDFFF",ft="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F",sl="\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF",gu=new RegExp("(["+sl+"]|["+Ye+"]["+He+"]|["+Ye+"](?!["+He+"])|(?:[^"+Ye+"]|^)["+He+"])(["+ft+"]+)","g"),il=new RegExp("(["+Ye+"])(["+He+"])","g"),fu=new RegExp("((?:["+sl+"]|["+Ye+"]["+He+"]|["+Ye+"](?!["+He+"])|(?:[^"+Ye+"]|^)["+He+"])(?:["+ft+"]+))|(["+Ye+"]["+He+"])|([\\n\\r\\u2028\\u2029])|(.)","g"),Qm=new RegExp("["+es+"]"),Xm=new RegExp("^["+es+"]+"),Zm=new RegExp("["+es+"]+$"),eg=new RegExp("^"+mu+"+$"),tg=/[-[\]{}()*+!<=:?./\\^$|#,]/g,ul=/[^A-Za-z0-9]/g,ng=/[<>&"'`]/g,rg=/(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g,sg=/\.?0+$/g,ig=/<([A-Za-z0-9]+)>/g,ug="\\u2000-\\u206F",og="\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7",ag="\\u2700-\\u27BF",Gr="a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F",Qr="\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e",yu=new RegExp("(?:["+Qr+"]["+ft+"]*)?(?:["+Gr+"]["+ft+"]*)+|(?:["+Qr+"]["+ft+"]*)+(?!["+Gr+"])|["+mu+"]+|["+ag+"]|[^"+og+ug+es+"]+","g"),Du=/[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g,cg=new RegExp("^(?:["+Gr+Qr+"]["+ft+"]*)+$"),lg=new RegExp("^((?:["+Gr+Qr+"]["+ft+"]*)|["+mu+"])+$"),bu=/^[\x01-\xFF]*$/;function kt(t,e){return t??e}function Ie(t){return M(t)?null:wn(t)?t:String(t)}function Cn(t,e,n){var r=w(t),s;if(M(e))s=bu.test(r)?Du:yu;else if(e instanceof RegExp)s=e;else{var i=Ie(kt(n,""));s=new RegExp(Ie(e),i)}return kt(r.match(s),[])}function fg(t,e){return e===0?Zr(t):pu(t,!0)}function hg(t){var e=w(t);return e===""?"":Cn(e).map(fg).join("")}function dg(t){var e=w(t);return e===""?"":e.substr(0,1).toLowerCase()+e.substr(1)}function ol(t){var e=w(t);return e===""?"":Cn(e).map(Zr).join("-")}function pg(t){var e=w(t);return e===""?"":Cn(e).map(Zr).join("_")}function mg(t){var e=w(t);return e.toUpperCase()}function gg(t){var e=w(t);return e.split("").reduce(yg,"")}function yg(t,e){var n=e.toLowerCase(),r=e.toUpperCase();return t+(e===n?r:n)}function Dg(t,e){var n=w(t),r=Array.isArray(e)?e:[],s=bu.test(n)?Du:yu;return n.replace(s,function(i,u){var o=u>0&&r.indexOf(n[u-1])>=0;return o?i.toLowerCase():pu(i,!0)})}function fe(t,e,n){return t<=e?e:t>=n?n:t}var we=9007199254740991;function re(t){return t===1/0?we:t===-1/0?-we:~~t}function al(t,e,n){var r=w(t),s=M(e)?r.length:fe(re(e),0,we),i=w(n,"...");return s>=r.length?r:r.substr(0,e-i.length)+i}function bg(t,e){var n=w(t);return n.charAt(e)}var cl=55296,Eg=56319,ll=56320,Ag=57343;function wg(t){return t>=cl&&t<=Eg}function Cg(t){return t>=ll&&t<=Ag}function Sg(t,e){return(t-cl)*1024+e-ll+65536}function Te(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return M(t)?e:typeof t=="number"?t:Number(t)}function fl(t,e){return t!==t?e:t}function hl(t,e){var n=w(t),r=n.length,s=Te(e);if(s=fl(s,0),!(s<0||s>=r)){var i=n.charCodeAt(s),u;return wg(i)&&r>s+1&&(u=n.charCodeAt(s+1),Cg(u))?Sg(i,u):i}}function vg(t,e){var n=w(t),r=M(e)?1:fe(re(e),0,we);return n.length<=r?n:n.substr(0,r)}function Fg(t,e){var n=w(t),r=Te(e),s,i=0;for(r=fl(r,0);(s=fu.exec(n))!==null;){if(i===r)return fu.lastIndex=0,s[0];i++}return""}function _g(t,e){var n=w(t),r=M(e)?1:fe(re(e),0,we);return n.length<=r?n:n.substr(n.length-r,r)}function xg(t,e,n){var r=w(t),s=M(e)?r.length:fe(re(e),0,we),i=w(n,"...");if(s>=r.length)return r;var u=bu.test(r)?Du:yu,o=0;return r.replace(u,function(a,c){var d=c+a.length;d<=s-i.length&&(o=d)}),r.substr(0,o)+i}function Ng(t,e,n){return w(t).slice(e,n)}function Bg(t,e,n){return w(t).substr(e,n)}function Og(t,e,n){return w(t).substring(e,n)}function kg(t){return w(t).length}function Ig(t){return w(t).replace(gu,"*").replace(il,"*").length}function Tg(t,e){var n=w(t),r=w(e),s=r.length,i=0,u=0;if(n===""||r==="")return i;do u=n.indexOf(r,u),u!==-1&&(i++,u+=s);while(u!==-1);return i}var Lg=Array.prototype.reduce;function Pg(t,e,n){var r=w(t);if(r===""||typeof e!="function")return 0;var s=e.bind(n);return Lg.call(r,function(i,u,o){return s(u,o,r)?i+1:i},0)}function Rg(t,e,n){return Cn(t,e,n).length}function ts(){this.index=0}ts.prototype.increment=function(){this.index++};ts.prototype.incrementOnEmptyPosition=function(t){M(t)&&this.increment()};ts.prototype.getIndexByPosition=function(t){return M(t)?this.index:t-1};var qg="i",dl="b",pl="c",Mg="d",ml="o",$g="u",gl="x",yl="X",Dl="e",bl="E",El="f",Al="g",Eu="G",jg="s",Ug="'",Qc="+",Kg="-",Vg="%%",zg=2,Wg=8,Xc=16;function wl(t,e){for(var n=w(t),r=M(e)?1:fe(re(e),0,we),s="";r;)r&1&&(s+=n),r>1&&(n+=n),r>>=1;return s}function Xr(t,e){var n=re(e/t.length),r=e%t.length;return wl(t,n+r).substr(0,e)}function Cl(t,e,n){var r=w(t),s=M(e)?0:fe(re(e),0,we),i=w(n," ");return s<=r.length?r:Xr(i,s-r.length)+r}function Sl(t,e,n){var r=w(t),s=M(e)?0:fe(re(e),0,we),i=w(n," ");return s<=r.length?r:r+Xr(i,s-r.length)}function Jg(t,e){var n=e.width;if(M(n)||t.length>=n)return t;var r=e.alignmentSpecifier===Kg?Sl:Cl;return r(t,n,e.getPaddingCharacter())}function vl(t,e,n){return n.signSpecifier===Qc&&t>=0&&(e=Qc+e),e}function Yg(t,e){var n=parseFloat(t),r;isNaN(n)&&(n=0);var s=Te(e.precision,6);switch(e.typeSpecifier){case El:r=n.toFixed(s);break;case Dl:r=n.toExponential(s);break;case bl:r=n.toExponential(s).toUpperCase();break;case Al:case Eu:r=Hg(n,s,e);break}return r=vl(n,r,e),w(r)}function Hg(t,e,n){if(t===0)return"0";var r=e===0?1:e,s=t.toPrecision(r).replace(sg,"");return n.typeSpecifier===Eu&&(s=s.toUpperCase()),s}function Gg(t,e){var n=parseInt(t);switch(isNaN(n)&&(n=0),n=n>>>0,e.typeSpecifier){case pl:n=String.fromCharCode(n);break;case dl:n=n.toString(zg);break;case ml:n=n.toString(Wg);break;case gl:n=n.toString(Xc);break;case yl:n=n.toString(Xc).toUpperCase();break}return w(n)}function Qg(t,e){var n=parseInt(t);return isNaN(n)&&(n=0),vl(n,Ie(n),e)}function Xg(t,e){var n=t,r=e.precision;return!M(r)&&n.length>r&&(n=al(n,r,"")),n}function Zg(t,e){var n;switch(e.typeSpecifier){case jg:n=Xg;break;case Mg:case qg:n=Qg;break;case pl:case dl:case ml:case gl:case yl:case $g:n=Gg;break;case El:case Dl:case bl:case Al:case Eu:n=Yg;break}var r=n(t,e);return Jg(r,e)}function Au(t){this.percent=t.percent,this.signSpecifier=t.signSpecifier,this.paddingSpecifier=t.paddingSpecifier,this.alignmentSpecifier=t.alignmentSpecifier,this.width=t.width,this.precision=t.precision,this.typeSpecifier=t.typeSpecifier}Au.prototype.isPercentLiteral=function(){return Vg===this.percent};Au.prototype.getPaddingCharacter=function(){var t=kt(this.paddingSpecifier," ");return t.length===2&&t[0]===Ug&&(t=t[1]),t};function ey(t,e,n){if(M(n.typeSpecifier))throw new Error("sprintf(): Unknown type specifier");if(t>e-1)throw new Error("sprintf(): Too few arguments");if(t<0)throw new Error("sprintf(): Argument number must be greater than zero")}function ty(t,e,n,r,s,i,u,o,a,c,d){var l=new Au({percent:r,signSpecifier:i,paddingSpecifier:u,alignmentSpecifier:o,width:Te(a,null),precision:Te(c,null),typeSpecifier:d});if(l.isPercentLiteral())return n.slice(1);var f=t.getIndexByPosition(s);return t.incrementOnEmptyPosition(s),ey(f,e.length,l),Zg(e[f],l)}function Fl(t){var e=w(t);if(e==="")return e;for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];var i=ty.bind(void 0,new ts,r);return e.replace(rg,i)}function ny(t,e){return Fl.apply(void 0,[t].concat(Vm(kt(e,[]))))}var ry={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function sy(t){return ry[t]}function iy(t){return w(t).replace(ng,sy)}function uy(t){return w(t).replace(tg,"\\$&")}var _l={"<":/(&lt;)|(&#x0*3c;)|(&#0*60;)/gi,">":/(&gt;)|(&#x0*3e;)|(&#0*62;)/gi,"&":/(&amp;)|(&#x0*26;)|(&#0*38;)/gi,'"':/(&quot;)|(&#x0*22;)|(&#0*34;)/gi,"'":/(&#x0*27;)|(&#0*39;)/gi,"`":/(&#x0*60;)|(&#0*96;)/gi},oy=Object.keys(_l);function ay(t,e){return t.replace(_l[e],e)}function cy(t){var e=w(t);return oy.reduce(ay,e)}function ly(t,e,n){var r=w(t);return r.indexOf(e,n)}function fy(t,e,n){var r=w(t);return r.lastIndexOf(e,n)}function hy(t,e,n){var r=w(t),s=M(n)?0:fe(re(n),0,r.length),i=r.substr(s).search(e);return i!==-1&&!isNaN(s)&&(i+=s),i}function dy(t,e,n){var r=w(t),s=w(e),i=Te(n);return i<0||i>r.length||s===""?r:r.slice(0,i)+s+r.slice(i)}var Zc={3:"\u039E\u03BE",8:"\u0398\u03B8",A:"A\xC0\xC1\xC2\xC3\xC4\xC5\u0100\u0102\u0104\u01CD\u01DE\u01E0\u01FA\u0200\u0202\u0226\u023A\u0386\u0391\u0410",B:"B\u0181\u0182\u0243\u0392\u0411",C:"C\xC7\u0106\u0108\u010A\u010C\u0187\u023B\u0426",D:"D\u010E\u0110\u0189\u018A\u018B\xD0\u0394\u0414",E:"E\xC8\xC9\xCA\xCB\u0112\u0114\u0116\u0118\u011A\u018E\u0190\u0204\u0206\u0228\u0388\u0395\u0415\u042D",F:"F\u0191\u03A6\u0424",G:"G\u011C\u011E\u0120\u0122\u0193\u01E4\u01E6\u01F4\u0393\u0413\u0490",H:"H\u0124\u0126\u021E\u0389\u0397\u0425",I:"I\xCC\xCD\xCE\xCF\u0128\u012A\u012C\u012E\u0130\u0197\u01CF\u0208\u020A\u038A\u0399\u03AA\u0406\u0418",J:"J\u0134\u0248\u0419",K:"K\u0136\u0198\u01E8\u039A\u041A",L:"L\u0139\u013B\u013D\u013F\u0141\u023D\u039B\u041B",M:"M\u019C\u039C\u041C",N:"N\xD1\u0143\u0145\u0147\u019D\u01F8\u0220\u039D\u041D",O:"O\xD2\xD3\xD4\xD5\xD6\xD8\u014C\u014E\u0150\u0186\u019F\u01A0\u01D1\u01EA\u01EC\u01FE\u020C\u020E\u022A\u022C\u022E\u0230\u038C\u039F\u041E",P:"P\u01A4\u03A0\u041F",Q:"Q\u024A",R:"R\u0154\u0156\u0158\u0210\u0212\u024C\u03A1\u0420",S:"S\u015A\u015C\u015E\u0160\u0218\u03A3\u0421",T:"T\u0162\u0164\u0166\u01AC\u01AE\u021A\u023E\u03A4\u0422",U:"U\xD9\xDA\xDB\xDC\u0168\u016A\u016C\u016E\u0170\u0172\u01AF\u01D3\u01D5\u01D7\u01D9\u01DB\u0214\u0216\u0244\u0423\u042A",V:"V\u01B2\u0245\u0412",W:"W\u0174\u038F\u03A9",X:"X\u03A7",Y:"Y\xDD\u0176\u0178\u01B3\u0232\u024E\u038E\u03A5\u03AB\u042B",Z:"Z\u0179\u017B\u017D\u01B5\u0224\u0396\u0417",a:"a\xE0\xE1\xE2\xE3\xE4\xE5\u0101\u0103\u0105\u01CE\u01DF\u01E1\u01FB\u0201\u0203\u0227\u0250\u03AC\u03B1\u0430",b:"b\u0180\u0183\u0253\u03B2\u0431",c:"c\xE7\u0107\u0109\u010B\u010D\u0188\u023C\u0446",d:"d\u010F\u0111\u018C\u0256\u0257\xF0\u03B4\u0434",e:"e\xE8\xE9\xEA\xEB\u0113\u0115\u0117\u0119\u011B\u01DD\u0205\u0207\u0229\u0247\u025B\u03AD\u03B5\u0435\u044D",f:"f\u0192\u03C6\u0444",g:"g\u011D\u011F\u0121\u0123\u01E5\u01E7\u01F5\u0260\u03B3\u0433\u0491",h:"h\u0125\u0127\u021F\u0265\u03AE\u03B7\u0445",i:"i\xEC\xED\xEE\xEF\u0129\u012B\u012D\u012F\u0131\u01D0\u0209\u020B\u0268\u0390\u03AF\u03B9\u03CA\u0438\u0456",j:"j\u0135\u01F0\u0249\u0439",k:"k\u0137\u0199\u01E9\u03BA\u043A",l:"l\u013A\u013C\u013E\u0140\u0142\u017F\u019A\u026B\u03BB\u043B",m:"m\u026F\u0271\u03BC\u043C",n:"n\xF1\u0144\u0146\u0148\u0149\u019E\u01F9\u0272\u03BD\u043D",o:"o\xF2\xF3\xF4\xF5\xF6\xF8\u014D\u014F\u0151\u01A1\u01D2\u01EB\u01ED\u01FF\u020D\u020F\u022B\u022D\u022F\u0231\u0254\u0275\u03BF\u03CC\u043E",p:"p\u01A5\u03C0\u043F",q:"q\u024B",r:"r\u0155\u0157\u0159\u0211\u0213\u024D\u027D\u03C1\u0440",s:"s\xDF\u015B\u015D\u015F\u0161\u0219\u023F\u03C2\u03C3\u0441",t:"t\u0163\u0165\u0167\u01AD\u021B\u0288\u03C4\u0442",u:"u\xF9\xFA\xFB\xFC\u0169\u016B\u016D\u016F\u0171\u0173\u01B0\u01D4\u01D6\u01D8\u01DA\u01DC\u0215\u0217\u0289\u0443\u044A",v:"v\u028B\u028C\u0432",w:"w\u0175\u03C9\u03CE",x:"x\u03C7",y:"y\xFD\xFF\u0177\u01B4\u0233\u024F\u03B0\u03C5\u03CB\u03CD\u044B",z:"z\u017A\u017C\u017E\u01B6\u0225\u0240\u03B6\u0437",OE:"\x8C\u0152",oe:"\x9C\u0153",AE:"\xC6\u01E2\u01FC",ae:"\xE6\u01E3\u01FD",hv:"\u0195",OI:"\u01A2",oi:"\u01A3",DZ:"\u01C4\u01F1",Dz:"\u01C5\u01F2",dz:"\u01C6\u01F3",LJ:"\u01C7",Lj:"\u01C8",lj:"\u01C9",NJ:"\u01CA",Nj:"\u01CB",nj:"\u01CC",OU:"\u0222",ou:"\u0223",TH:"\xDE",th:"\xFE",PS:"\u03A8",ps:"\u03C8",Yo:"\u0401",Ye:"\u0404",Yi:"\u0407",Zh:"\u0416",Ch:"\u0427",Sh:"\u0428\u0429","":"\u042A\u042C\u044C",Yu:"\u042E",Ya:"\u042F",zh:"\u0436",ch:"\u0447",sh:"\u0448\u0449",yu:"\u044E",ya:"\u044F",yo:"\u0451",ye:"\u0454",yi:"\u0457"},En=null;function py(){return En!==null||(En={},Object.keys(Zc).forEach(function(t){for(var e=Zc[t],n=0;n<e.length;n++){var r=e[n];En[r]=t}})),En}function my(t){var e=py()[t];return e||t}function gy(t,e){return e}function xl(t){var e=w(t);return e===""?"":e.replace(ul,my).replace(gu,gy)}function yy(t,e,n){var r=w(t),s=M(e)?0:fe(re(e),0,we),i=w(n," ");if(s<=r.length)return r;var u=s-r.length,o=re(u/2),a=u%2;return Xr(i,o)+r+Xr(i,o+a)}function Dy(t,e,n){var r=w(t);return r.replace(e,n)}function Nl(t,e,n){var r=w(t);if(e instanceof RegExp){if(e.flags.indexOf("g")===-1)throw new TypeError("search argument is a non-global regular expression");return r.replace(e,n)}var s=w(e),i=typeof n=="function";i||(n=w(n));var u=s.length;if(u===0)return Nl(t,/(?:)/g,n);for(var o=u>1?u:1,a=[],c=r.indexOf(s,0);c!==-1;)a.push(c),c=r.indexOf(s,c+o);for(var d=0,l="",f=0;f<a.length;f++){var m=a[f],y=n;i&&(y=w(n.call(void 0,s,m,r))),l+=r.slice(d,m)+y,d=m+u}return d<r.length&&(l+=r.slice(d)),l}function by(t){var e=w(t);return e.split("").reverse().join("")}function Bl(t){var e=w(t);e=e.replace(gu,function(s,i,u){return Bl(u)+i}).replace(il,"$2$1");for(var n="",r=e.length;r--;)n+=e.charAt(r);return n}function Ey(t){var e=w(t);if(e==="")return"";var n=xl(e).replace(ul,"-");return ol(n)}function Ay(t,e,n,r){var s=w(t),i=w(r),u=Te(e);u<0?(u=s.length+u,u<0&&(u=0)):u>s.length&&(u=s.length);var o=Te(n,s.length-u);return o<0&&(o=0),s.slice(0,u)+i+s.slice(u+o)}function wy(t,e,n){var r=w(t),s,i;if(wn(e)&&wn(n))s=e.split(""),i=n.split("");else{var u=Cy(kt(e,{})),o=Km(u,2);s=o[0],i=o[1]}var a=s.length;if(a===0)return r;for(var c="",d=i.length,l=0;l<r.length;l++){for(var f=!1,m=void 0,y=0;y<a&&y<d;y++){var h=s[y];if(r.substr(l,h.length)===h){f=!0,m=i[y],l=l+h.length-1;break}}c+=f?m:r[l]}return c}function Cy(t){var e=Object.keys(t),n=e.sort(Sy).map(function(r){return t[r]});return[e,n]}function Sy(t,e){return t.length===e.length?0:t.length<e.length?1:-1}function wu(t,e,n){var r=w(t),s=Ie(e);return s===null?!1:s===""?!0:(n=M(n)?0:fe(re(n),0,r.length),r.indexOf(s,n)!==-1)}var vy=Array.prototype.reduce;function Ol(t,e){var n=w(t);if(e===""||n==="")return n;var r=Ie(e);if(M(r))return n.replace(Xm,"");var s=!0;return vy.call(n,function(i,u){return s&&wu(r,u)?i:(s=!1,i+u)},"")}var Fy=Array.prototype.reduceRight;function kl(t,e){var n=w(t);if(e===""||n==="")return n;var r=Ie(e);if(M(r))return n.replace(Zm,"");var s=!0;return Fy.call(n,function(i,u){return s&&wu(r,u)?i:(s=!1,u+i)},"")}function _y(t,e){var n=w(t);if(e===""||n==="")return n;var r=Ie(e);return M(r)?n.trim():kl(Ol(n,r),r)}var xy="width",Ny="newLine",By="indent",Oy="cut";function ky(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=w(t),r=Iy(e),s=r.width,i=r.newLine,u=r.indent,o=r.cut;if(n===""||s<=0)return u;for(var a=n.length,c=n.substring.bind(n),d=0,l="";a-d>s;){if(n[d]===" "){d++;continue}var f=n.lastIndexOf(" ",s+d);f>=d?(l+=u+c(d,f)+i,d=f+1):o?(l+=u+c(d,s+d)+i,d+=s):(f=n.indexOf(" ",s+d),f>=0?(l+=u+c(d,f)+i,d=f+1):(l+=u+c(d),d=a))}return d<a&&(l+=u+c(d)),l}function Iy(t){return{width:Te(t[xy],75),newLine:w(t[Ny],`
203
- `),indent:w(t[By],""),cut:rl(t[Oy],!1)}}function Ty(t,e,n){if(M(e))return!1;var r=w(t),s=w(e);if(s==="")return!0;n=M(n)?r.length:fe(re(n),0,r.length),n-=s.length;var i=r.indexOf(s,n);return i!==-1&&i===n}function Cu(t){var e=w(t);return cg.test(e)}function Ly(t){var e=w(t);return lg.test(e)}function Py(t){var e=w(t);return e.trim().length===0}function Ry(t){var e=w(t);return eg.test(e)}function qy(t){var e=w(t);return e.length===0}function My(t){var e=w(t);return Cu(e)&&e.toLowerCase()===e}function $y(t){var e=typeof t=="object"&&!M(t)?Number(t):t;return(typeof e=="number"||typeof e=="string")&&!isNaN(e-parseFloat(e))}function jy(t){var e=w(t);return Cu(e)&&e.toUpperCase()===e}function Uy(t,e,n){var r=w(t),s=w(n),i;if(!(e instanceof RegExp)){if(i=Ie(e),i===null)return!1;e=new RegExp(i,s)}return e.test(r)}function Ky(t,e,n){var r=w(t),s=Ie(e);return s===null?!1:s===""?!0:(n=M(n)?0:fe(re(n),0,r.length),r.substr(n,s.length)===s)}function Vy(t){var e=w(t);return e.split("")}function zy(t){for(var e=w(t),n=e.length,r=[],s=0,i;s<n;)i=hl(e,s),r.push(i),s+=i>65535?2:1;return r}function Wy(t){var e=w(t);return kt(e.match(fu),[])}function Jy(t,e,n){var r=w(t);return r.split(e,n)}var Yy="\uFEFF";function Hy(t){var e=w(t);return e===""?"":e[0]===Yy?e.substring(1):e}function Gy(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=0;r&&(s=-e.length+1);var i=t.substr(n+s,e.length);return i.toLowerCase()===e}function Qy(t){for(var e=[],n;(n=ig.exec(t))!==null;)e.push(n[1]);return e}var el=0,tl=1,cu=2;function Xy(t){for(var e=el,n="",r=0;e!==cu;){var s=t[r++].toLowerCase();switch(s){case"<":break;case">":e=cu;break;default:Qm.test(s)?e===tl&&(e=cu):(e===el&&(e=tl),s!=="/"&&(n+=s));break}}return n}var An=0,lt=1,Hr=2,nl=3;function Zy(t,e,n){if(t=w(t),t==="")return"";if(!Array.isArray(e)){var r=w(e);e=r===""?[]:Qy(r)}for(var s=w(n),i=t.length,u=e.length>0,o=Gy.bind(null,t),a=An,c=0,d="",l="",f=null,m=0;m<i;m++){var y=t[m],h=!1;switch(y){case"<":if(f)break;if(o("< ",m,!1)){h=!0;break}if(a===An){h=!0,a=lt;break}if(a===lt){c++;break}h=!0;break;case"!":if(a===lt&&o("<!",m)){a=Hr;break}h=!0;break;case"-":if(a===Hr&&o("!--",m)){a=nl;break}h=!0;break;case'"':case"'":a===lt&&(f===y?f=null:f||(f=y)),h=!0;break;case"E":case"e":if(a===Hr&&o("doctype",m)){a=lt;break}h=!0;break;case">":if(c>0){c--;break}if(f)break;if(a===lt){if(f=null,a=An,u){l+=">";var p=Xy(l);e.indexOf(p.toLowerCase())!==-1?d+=l:d+=s,l=""}else d+=s;break}if(a===Hr||a===nl&&o("-->",m)){f=null,a=An,l="";break}h=!0;break;default:h=!0}if(h)switch(a){case An:d+=y;break;case lt:u&&(l+=y);break}}return d}var Ot=null;function eD(){return Ot!==null||(typeof global=="object"&&global.Object===Object?Ot=global:typeof self=="object"&&self.Object===Object?Ot=self:Ot=new Function("return this")()),Ot}var hu=eD(),tD=hu.v;function nD(){return this===hu.v&&(hu.v=tD),this}var rD="1.4.0",du={camelCase:hg,capitalize:pu,decapitalize:dg,kebabCase:ol,lowerCase:Zr,snakeCase:pg,swapCase:gg,titleCase:Dg,upperCase:mg,count:kg,countGraphemes:Ig,countSubstrings:Tg,countWhere:Pg,countWords:Rg,escapeHtml:iy,escapeRegExp:uy,unescapeHtml:cy,sprintf:Fl,vprintf:ny,indexOf:ly,lastIndexOf:fy,search:hy,charAt:bg,codePointAt:hl,first:vg,graphemeAt:Fg,last:_g,prune:xg,slice:Ng,substr:Bg,substring:Og,truncate:al,insert:dy,latinise:xl,pad:yy,padLeft:Cl,padRight:Sl,repeat:wl,replace:Dy,replaceAll:Nl,reverse:by,reverseGrapheme:Bl,slugify:Ey,splice:Ay,tr:wy,trim:_y,trimLeft:Ol,trimRight:kl,wordWrap:ky,endsWith:Ty,includes:wu,isAlpha:Cu,isAlphaDigit:Ly,isBlank:Py,isDigit:Ry,isEmpty:qy,isLowerCase:My,isNumeric:$y,isString:wn,isUpperCase:jy,matches:Uy,startsWith:Ky,chars:Vy,codePoints:zy,graphemes:Wy,split:Jy,words:Cn,stripBom:Hy,stripTags:Zy,noConflict:nD,version:rD};function ie(t,e){this._wrappedValue=t,this._explicitChain=e}ie.prototype.value=function(){return this._wrappedValue};ie.prototype.valueOf=function(){return this.value()};ie.prototype.toJSON=function(){return this.value()};ie.prototype.toString=function(){return String(this.value())};ie.prototype.chain=function(){return new ie(this._wrappedValue,!0)};ie.prototype.thru=function(t){return typeof t=="function"?new ie(t(this._wrappedValue),this._explicitChain):this};ie.prototype._explicitChain=!0;function sD(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var s=t.apply(void 0,[this._wrappedValue].concat(n));return this._explicitChain||typeof s=="string"?new ie(s,this._explicitChain):s}}Object.keys(du).forEach(function(t){ie.prototype[t]=sD(du[t])});function iD(t){return new ie(t,!0)}function Il(t){return new ie(t,!1)}lu(Il,du,{chain:iD});var Tl=Il;import Ll from"path";function Pl(t){let e=Ll.extname(t),n=Ll.basename(t,e);return Tl.camelCase(n)}function Su(t){return t.replace(/'/g,"''")}function Rl(t){return t===null?"NULL":`'${Su(String(t))}'`}function ql(){return crypto.randomUUID()}function Ml(){return new Date().toISOString()}async function $l(t,e={}){let n=ns.dirname(t),r=e.projectRoot??process.cwd(),s=await Yu(n,r),i=await oD(n),u="config"in i;return{...s,...i,...u?{}:{config:e.config},secrets:e.secrets??{},globalSecrets:e.globalSecrets??{},env:process.env,include:aD(n,r,e),escape:Su,quote:Rl,json:a=>JSON.stringify(a),now:Ml,uuid:ql}}async function oD(t){let e={},[n,r]=await G(()=>uD(t,{withFileTypes:!0}));if(r||!n)return _e.emit("error",{source:"template",error:r??new Error("Failed to read directory"),context:{dir:t,operation:"scan-data-files"}}),e;for(let s of n){if(!s.isFile()||s.name.startsWith(zn)||s.name.endsWith(".tmpl"))continue;let i=ns.extname(s.name).toLowerCase();if(!Gc(i)||i===".sql")continue;let u=ns.join(t,s.name),o=Pl(s.name),[a,c]=await G(()=>au(u));if(c){_e.emit("error",{source:"template",error:c,context:{filepath:u,operation:"load-data-file"}});continue}e[o]=a,_e.emit("template:load",{filepath:u,format:i})}return e}function aD(t,e,n){return async r=>{let s=ns.resolve(t,r);if(!s.startsWith(e))throw new Error(`Include path escapes project root: ${r}`);if(s.endsWith(".tmpl")){let{processFile:o}=await import("./engine-OB3KW3J3.js");return(await o(s,n)).sql}let[i,u]=await G(()=>au(s));if(u)throw new Error(`Failed to include '${r}': ${u.message}`);return typeof i=="string"?i:JSON.stringify(i)}}var lD=new Iu({tags:["{%","%}"],varName:"$",autoEscape:!1,useWith:!1,cache:!1});function fD(t){return t.endsWith(Wu)}async function hD(t,e){return lD.renderStringAsync(t,e)}async function dD(t,e={}){let n=await cD(t,"utf-8");if(!fD(t))return{sql:n,isTemplate:!1};let r=performance.now(),s=await $l(t,e),i=await hD(n,s),u=performance.now()-r;return _e.emit("template:render",{filepath:t,durationMs:u}),{sql:i,isTemplate:!0,durationMs:u}}async function xC(t,e={}){let n=[];for(let r of t){let s=await dD(r,e);n.push(s)}return n}export{Z as a,Lt as b,G as c,ce as d,me as e,y1 as f,nE as g,_e as h,jc as i,Tl as j,$l as k,lD as l,fD as m,hD as n,dD as o,xC as p};
204
- /*! Bundled license information:
205
-
206
- voca/es/index.js:
207
- (*!
208
- * Voca string library 1.4.1
209
- * https://vocajs.pages.dev
210
- *
211
- * Copyright Dmitri Pavlutin and other contributors
212
- * Released under the MIT license
213
- *)
214
- */