@hallohuman/hightea 0.1.30 → 0.1.32
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.
- package/LICENSE +5 -0
- package/dist/bin.js +30 -362
- package/dist/chunk-3emak1d3.js +2 -0
- package/dist/chunk-55a0ndzw.js +5 -0
- package/dist/chunk-5hvk5pvs.js +9 -0
- package/dist/chunk-749gsvce.js +139 -0
- package/dist/chunk-7mgx0krk.js +5 -0
- package/dist/chunk-ah99zytf.js +58 -0
- package/dist/chunk-c7atktnb.js +5 -0
- package/dist/chunk-dvsftn8z.js +5 -0
- package/dist/chunk-dzr0pvfa.js +1 -0
- package/dist/chunk-gbwfgq6g.js +1 -0
- package/dist/chunk-h9f45p57.js +4 -0
- package/dist/chunk-hrtxeg8j.js +1 -0
- package/dist/chunk-nfmmht3j.js +2 -0
- package/dist/chunk-pdnrwmme.js +1 -0
- package/dist/chunk-pexgyagn.js +2 -0
- package/dist/chunk-v221hgba.js +2 -0
- package/dist/chunk-vr4rsfaf.js +13 -0
- package/dist/chunk-w2f84aab.js +1 -0
- package/dist/chunk-wyzpk81n.js +13 -0
- package/dist/plugin/plugin.json +4 -1
- package/dist/plugin/plugin.mjs +51 -15364
- package/package.json +2 -1
- package/dist/chunk-0ab6h39c.js +0 -402
- package/dist/chunk-0r70ekxd.js +0 -8
- package/dist/chunk-13tpn1g6.js +0 -465
- package/dist/chunk-3rgfnt23.js +0 -16
- package/dist/chunk-5mezgvms.js +0 -139
- package/dist/chunk-9e325ntw.js +0 -89
- package/dist/chunk-cx3yvvkz.js +0 -7295
- package/dist/chunk-d5h204vj.js +0 -14
- package/dist/chunk-dvnzt54t.js +0 -7168
- package/dist/chunk-dvt4hb8z.js +0 -1491
- package/dist/chunk-gk8tyqac.js +0 -184
- package/dist/chunk-h8pdqn31.js +0 -157
- package/dist/chunk-ph04jess.js +0 -17
- package/dist/chunk-sbqmqp8e.js +0 -123
- package/dist/chunk-w0ebwtch.js +0 -161
- package/dist/chunk-y5r2yxx1.js +0 -347
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import{a}from"./chunk-pexgyagn.js";import"./chunk-dvsftn8z.js";import{t,e}from"./chunk-55a0ndzw.js";import{y,b,k,T}from"./chunk-v221hgba.js";import{createRequire as ur}from"node:module";var v=(s,n)=>()=>(n||s((n={exports:{}}).exports,n),n.exports);var We=ur(import.meta.url);var I=v(function(wr){var Mt=Symbol.for("yaml.alias"),Qs=Symbol.for("yaml.document"),Qe=Symbol.for("yaml.map"),Hs=Symbol.for("yaml.pair"),xt=Symbol.for("yaml.scalar"),He=Symbol.for("yaml.seq"),V=Symbol.for("yaml.node.type"),hr=(s)=>!!s&&typeof s==="object"&&s[V]===Mt,dr=(s)=>!!s&&typeof s==="object"&&s[V]===Qs,pr=(s)=>!!s&&typeof s==="object"&&s[V]===Qe,mr=(s)=>!!s&&typeof s==="object"&&s[V]===Hs,Gs=(s)=>!!s&&typeof s==="object"&&s[V]===xt,yr=(s)=>!!s&&typeof s==="object"&&s[V]===He;function Xs(s){if(s&&typeof s==="object")switch(s[V]){case Qe:case He:return!0}return!1}function gr(s){if(s&&typeof s==="object")switch(s[V]){case Mt:case Qe:case xt:case He:return!0}return!1}var br=(s)=>(Gs(s)||Xs(s))&&!!s.anchor;wr.ALIAS=Mt;wr.DOC=Qs;wr.MAP=Qe;wr.NODE_TYPE=V;wr.PAIR=Hs;wr.SCALAR=xt;wr.SEQ=He;wr.hasAnchor=br;wr.isAlias=hr;wr.isCollection=Xs;wr.isDocument=dr;wr.isMap=pr;wr.isNode=gr;wr.isPair=mr;wr.isScalar=Gs;wr.isSeq=yr});var Ne=v(function(xr){var B=I(),j=Symbol("break visit"),zs=Symbol("skip children"),Y=Symbol("remove node");function Ge(s,n){let i=Zs(n);if(B.isDocument(s)){if(he(null,s.contents,i,Object.freeze([s]))===Y)s.contents=null}else he(null,s,i,Object.freeze([]))}Ge.BREAK=j;Ge.SKIP=zs;Ge.REMOVE=Y;function he(s,n,i,r){let o=en(s,n,i,r);if(B.isNode(o)||B.isPair(o))return tn(s,r,o),he(s,o,i,r);if(typeof o!=="symbol"){if(B.isCollection(n)){r=Object.freeze(r.concat(n));for(let l=0;l<n.items.length;++l){let c=he(l,n.items[l],i,r);if(typeof c==="number")l=c-1;else if(c===j)return j;else if(c===Y)n.items.splice(l,1),l-=1}}else if(B.isPair(n)){r=Object.freeze(r.concat(n));let l=he("key",n.key,i,r);if(l===j)return j;else if(l===Y)n.key=null;let c=he("value",n.value,i,r);if(c===j)return j;else if(c===Y)n.value=null}}return o}async function Xe(s,n){let i=Zs(n);if(B.isDocument(s)){if(await de(null,s.contents,i,Object.freeze([s]))===Y)s.contents=null}else await de(null,s,i,Object.freeze([]))}Xe.BREAK=j;Xe.SKIP=zs;Xe.REMOVE=Y;async function de(s,n,i,r){let o=await en(s,n,i,r);if(B.isNode(o)||B.isPair(o))return tn(s,r,o),de(s,o,i,r);if(typeof o!=="symbol"){if(B.isCollection(n)){r=Object.freeze(r.concat(n));for(let l=0;l<n.items.length;++l){let c=await de(l,n.items[l],i,r);if(typeof c==="number")l=c-1;else if(c===j)return j;else if(c===Y)n.items.splice(l,1),l-=1}}else if(B.isPair(n)){r=Object.freeze(r.concat(n));let l=await de("key",n.key,i,r);if(l===j)return j;else if(l===Y)n.key=null;let c=await de("value",n.value,i,r);if(c===j)return j;else if(c===Y)n.value=null}}return o}function Zs(s){if(typeof s==="object"&&(s.Collection||s.Node||s.Value))return Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s);return s}function en(s,n,i,r){if(typeof i==="function")return i(s,n,r);if(B.isMap(n))return i.Map?.(s,n,r);if(B.isSeq(n))return i.Seq?.(s,n,r);if(B.isPair(n))return i.Pair?.(s,n,r);if(B.isScalar(n))return i.Scalar?.(s,n,r);if(B.isAlias(n))return i.Alias?.(s,n,r);return}function tn(s,n,i){let r=n[n.length-1];if(B.isCollection(r))r.items[s]=i;else if(B.isPair(r))if(s==="key")r.key=i;else r.value=i;else if(B.isDocument(r))r.contents=i;else{let o=B.isAlias(r)?"alias":"scalar";throw Error(`Cannot replace node with ${o} parent`)}}xr.visit=Ge;xr.visitAsync=Xe});var Dt=v(function(Fr){var sn=I(),jr=Ne(),Kr={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Rr=(s)=>s.replace(/[!,[\]{}]/g,(n)=>Kr[n]);class K{constructor(s,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},K.defaultYaml,s),this.tags=Object.assign({},K.defaultTags,n)}clone(){let s=new K(this.yaml,this.tags);return s.docStart=this.docStart,s}atDocument(){let s=new K(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:K.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},K.defaultTags);break}return s}add(s,n){if(this.atNextDocument)this.yaml={explicit:K.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},K.defaultTags),this.atNextDocument=!1;let i=s.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2){if(n(0,"%TAG directive should contain exactly two parts"),i.length<2)return!1}let[o,l]=i;return this.tags[o]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;else{let l=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,l),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(s,n){if(s==="!")return"!";if(s[0]!=="!")return n(`Not a valid tag: ${s}`),null;if(s[1]==="<"){let l=s.slice(2,-1);if(l==="!"||l==="!!")return n(`Verbatim tags aren't resolved, so ${s} is invalid.`),null;if(s[s.length-1]!==">")n("Verbatim tags must end with a >");return l}let[,i,r]=s.match(/^(.*!)([^!]*)$/s);if(!r)n(`The ${s} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(r)}catch(l){return n(String(l)),null}if(i==="!")return s;return n(`Could not resolve tag: ${s}`),null}tagString(s){for(let[n,i]of Object.entries(this.tags))if(s.startsWith(i))return n+Rr(s.substring(i.length));return s[0]==="!"?s:`!<${s}>`}toString(s){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),r;if(s&&i.length>0&&sn.isNode(s.contents)){let o={};jr.visit(s.contents,(l,c)=>{if(sn.isNode(c)&&c.tag)o[c.tag]=!0}),r=Object.keys(o)}else r=[];for(let[o,l]of i){if(o==="!!"&&l==="tag:yaml.org,2002:")continue;if(!s||r.some((c)=>c.startsWith(l)))n.push(`%TAG ${o} ${l}`)}return n.join(`
|
|
2
|
+
`)}}K.defaultYaml={explicit:!1,version:"1.2"};K.defaultTags={"!!":"tag:yaml.org,2002:"};Fr.Directives=K});var ze=v(function(Wr){var nn=I(),Yr=Ne();function Jr(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw Error(i)}return!0}function rn(s){let n=new Set;return Yr.visit(s,{Value(i,r){if(r.anchor)n.add(r.anchor)}}),n}function on(s,n){for(let i=1;;++i){let r=`${s}${i}`;if(!n.has(r))return r}}function Vr(s,n){let i=[],r=new Map,o=null;return{onAnchor:(l)=>{i.push(l),o??(o=rn(s));let c=on(n,o);return o.add(c),c},setAnchors:()=>{for(let l of i){let c=r.get(l);if(typeof c==="object"&&c.anchor&&(nn.isScalar(c.node)||nn.isCollection(c.node)))c.node.anchor=c.anchor;else{let f=Error("Failed to resolve repeated object (this should not happen)");throw f.source=l,f}}},sourceObjects:r}}Wr.anchorIsValid=Jr;Wr.anchorNames=rn;Wr.createNodeAnchors=Vr;Wr.findNewAnchor=on});var Bt=v(function(zr){function Ae(s,n,i,r){if(r&&typeof r==="object")if(Array.isArray(r))for(let o=0,l=r.length;o<l;++o){let c=r[o],f=Ae(s,r,String(o),c);if(f===void 0)delete r[o];else if(f!==c)r[o]=f}else if(r instanceof Map)for(let o of Array.from(r.keys())){let l=r.get(o),c=Ae(s,r,o,l);if(c===void 0)r.delete(o);else if(c!==l)r.set(o,c)}else if(r instanceof Set)for(let o of Array.from(r)){let l=Ae(s,r,o,o);if(l===void 0)r.delete(o);else if(l!==o)r.delete(o),r.add(l)}else for(let[o,l]of Object.entries(r)){let c=Ae(s,r,o,l);if(c===void 0)delete r[o];else if(c!==l)r[o]=c}return s.call(n,i,r)}zr.applyReviver=Ae});var H=v(function(to){var eo=I();function an(s,n,i){if(Array.isArray(s))return s.map((r,o)=>an(r,String(o),i));if(s&&typeof s.toJSON==="function"){if(!i||!eo.hasAnchor(s))return s.toJSON(n,i);let r={aliasCount:0,count:1,res:void 0};i.anchors.set(s,r),i.onCreate=(l)=>{r.res=l,delete i.onCreate};let o=s.toJSON(n,i);if(i.onCreate)i.onCreate(o);return o}if(typeof s==="bigint"&&!i?.keep)return Number(s);return s}to.toJS=an});var Ze=v(function(ro){var no=Bt(),ln=I(),io=H();class cn{constructor(s){Object.defineProperty(this,ln.NODE_TYPE,{value:s})}clone(){let s=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)s.range=this.range.slice();return s}toJS(s,{mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){if(!ln.isDocument(s))throw TypeError("A document argument is required");let l={anchors:new Map,doc:s,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i==="number"?i:100},c=io.toJS(this,"",l);if(typeof r==="function")for(let{count:f,res:u}of l.anchors.values())r(u,f);return typeof o==="function"?no.applyReviver(o,{"":c},"",c):c}}ro.NodeBase=cn});var Oe=v(function(uo){var ao=ze(),lo=Ne(),pe=I(),co=Ze(),fo=H();class fn extends co.NodeBase{constructor(s){super(pe.ALIAS);this.source=s,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(s,n){let i;if(n?.aliasResolveCache)i=n.aliasResolveCache;else if(i=[],lo.visit(s,{Node:(o,l)=>{if(pe.isAlias(l)||pe.hasAnchor(l))i.push(l)}}),n)n.aliasResolveCache=i;let r=void 0;for(let o of i){if(o===this)break;if(o.anchor===this.source)r=o}return r}toJSON(s,n){if(!n)return{source:this.source};let{anchors:i,doc:r,maxAliasCount:o}=n,l=this.resolve(r,n);if(!l){let f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(f)}let c=i.get(l);if(!c)fo.toJS(l,null,n),c=i.get(l);if(!c||c.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0){if(c.count+=1,c.aliasCount===0)c.aliasCount=et(r,l,i);if(c.count*c.aliasCount>o)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(s,n,i){let r=`*${this.source}`;if(s){if(ao.anchorIsValid(this.source),s.options.verifyAliasOrder&&!s.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(o)}if(s.implicitKey)return`${r} `}return r}}function et(s,n,i){if(pe.isAlias(n)){let r=n.resolve(s),o=i&&r&&i.get(r);return o?o.count*o.aliasCount:0}else if(pe.isCollection(n)){let r=0;for(let o of n.items){let l=et(s,o,i);if(l>r)r=l}return r}else if(pe.isPair(n)){let r=et(s,n.key,i),o=et(s,n.value,i);return Math.max(r,o)}return 1}uo.Alias=fn});var M=v(function(bo){var po=I(),mo=Ze(),yo=H(),go=(s)=>!s||typeof s!=="function"&&typeof s!=="object";class ie extends mo.NodeBase{constructor(s){super(po.SCALAR);this.value=s}toJSON(s,n){return n?.keep?this.value:yo.toJS(this.value,s,n)}toString(){return String(this.value)}}ie.BLOCK_FOLDED="BLOCK_FOLDED";ie.BLOCK_LITERAL="BLOCK_LITERAL";ie.PLAIN="PLAIN";ie.QUOTE_DOUBLE="QUOTE_DOUBLE";ie.QUOTE_SINGLE="QUOTE_SINGLE";bo.Scalar=ie;bo.isScalarValue=go});var qe=v(function(Oo){var vo=Oe(),re=I(),un=M(),ko="tag:yaml.org,2002:";function No(s,n,i){if(n){let r=i.filter((l)=>l.tag===n),o=r.find((l)=>!l.format)??r[0];if(!o)throw Error(`Tag ${n} not found`);return o}return i.find((r)=>r.identify?.(s)&&!r.format)}function Ao(s,n,i){if(re.isDocument(s))s=s.contents;if(re.isNode(s))return s;if(re.isPair(s)){let d=i.schema[re.MAP].createNode?.(i.schema,null,i);return d.items.push(s),d}if(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)s=s.valueOf();let{aliasDuplicateObjects:r,onAnchor:o,onTagObj:l,schema:c,sourceObjects:f}=i,u=void 0;if(r&&s&&typeof s==="object")if(u=f.get(s),u)return u.anchor??(u.anchor=o(s)),new vo.Alias(u.anchor);else u={anchor:null,node:null},f.set(s,u);if(n?.startsWith("!!"))n=ko+n.slice(2);let h=No(s,n,c.tags);if(!h){if(s&&typeof s.toJSON==="function")s=s.toJSON();if(!s||typeof s!=="object"){let d=new un.Scalar(s);if(u)u.node=d;return d}h=s instanceof Map?c[re.MAP]:(Symbol.iterator in Object(s))?c[re.SEQ]:c[re.MAP]}if(l)l(h),delete i.onTagObj;let g=h?.createNode?h.createNode(i.schema,s,i):typeof h?.nodeClass?.from==="function"?h.nodeClass.from(i.schema,s,i):new un.Scalar(s);if(n)g.tag=n;else if(!h.default)g.tag=h.tag;if(u)u.node=g;return g}Oo.createNode=Ao});var tt=v(function(To){var Eo=qe(),J=I(),Lo=Ze();function jt(s,n,i){let r=i;for(let o=n.length-1;o>=0;--o){let l=n[o];if(typeof l==="number"&&Number.isInteger(l)&&l>=0){let c=[];c[l]=r,r=c}else r=new Map([[l,r]])}return Eo.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var hn=(s)=>s==null||typeof s==="object"&&!!s[Symbol.iterator]().next().done;class dn extends Lo.NodeBase{constructor(s,n){super(s);Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(s){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(s)n.schema=s;if(n.items=n.items.map((i)=>J.isNode(i)||J.isPair(i)?i.clone(s):i),this.range)n.range=this.range.slice();return n}addIn(s,n){if(hn(s))this.add(n);else{let[i,...r]=s,o=this.get(i,!0);if(J.isCollection(o))o.addIn(r,n);else if(o===void 0&&this.schema)this.set(i,jt(this.schema,r,n));else throw Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(s){let[n,...i]=s;if(i.length===0)return this.delete(n);let r=this.get(n,!0);if(J.isCollection(r))return r.deleteIn(i);else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(s,n){let[i,...r]=s,o=this.get(i,!0);if(r.length===0)return!n&&J.isScalar(o)?o.value:o;else return J.isCollection(o)?o.getIn(r,n):void 0}hasAllNullValues(s){return this.items.every((n)=>{if(!J.isPair(n))return!1;let i=n.value;return i==null||s&&J.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(s){let[n,...i]=s;if(i.length===0)return this.has(n);let r=this.get(n,!0);return J.isCollection(r)?r.hasIn(i):!1}setIn(s,n){let[i,...r]=s;if(r.length===0)this.set(i,n);else{let o=this.get(i,!0);if(J.isCollection(o))o.setIn(r,n);else if(o===void 0&&this.schema)this.set(i,jt(this.schema,r,n));else throw Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}}To.Collection=dn;To.collectionFromPath=jt;To.isEmptyPath=hn});var Ee=v(function(Mo){var Po=(s)=>s.replace(/^(?!$)(?: $)?/gm,"#");function Kt(s,n){if(/^\n+$/.test(s))return s.substring(1);return n?s.replace(/^(?! *$)/gm,n):s}var $o=(s,n,i)=>s.endsWith(`
|
|
3
|
+
`)?Kt(i,n):i.includes(`
|
|
4
|
+
`)?`
|
|
5
|
+
`+Kt(i,n):(s.endsWith(" ")?"":" ")+i;Mo.indentComment=Kt;Mo.lineComment=$o;Mo.stringifyComment=Po});var mn=v(function(Ko){function jo(s,n,i="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:l=20,onFold:c,onOverflow:f}={}){if(!o||o<0)return s;if(o<l)l=0;let u=Math.max(1+l,1+o-n.length);if(s.length<=u)return s;let h=[],g={},d=o-n.length;if(typeof r==="number")if(r>o-Math.max(2,l))h.push(0);else d=o-r;let p=void 0,S=void 0,N=!1,m=-1,w=-1,O=-1;if(i==="block"){if(m=pn(s,m,n.length),m!==-1)d=m+u}for(let E;E=s[m+=1];){if(i==="quoted"&&E==="\\"){switch(w=m,s[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}O=m}if(E===`
|
|
6
|
+
`){if(i==="block")m=pn(s,m,n.length);d=m+n.length+u,p=void 0}else{if(E===" "&&S&&S!==" "&&S!==`
|
|
7
|
+
`&&S!=="\t"){let L=s[m+1];if(L&&L!==" "&&L!==`
|
|
8
|
+
`&&L!=="\t")p=m}if(m>=d)if(p)h.push(p),d=p+u,p=void 0;else if(i==="quoted"){while(S===" "||S==="\t")S=E,E=s[m+=1],N=!0;let L=m>O+1?m-2:w-1;if(g[L])return s;h.push(L),g[L]=!0,d=L+u,p=void 0}else N=!0}S=E}if(N&&f)f();if(h.length===0)return s;if(c)c();let q=s.slice(0,h[0]);for(let E=0;E<h.length;++E){let L=h[E],C=h[E+1]||s.length;if(L===0)q=`
|
|
9
|
+
${n}${s.slice(0,C)}`;else{if(i==="quoted"&&g[L])q+=`${s[L]}\\`;q+=`
|
|
10
|
+
${n}${s.slice(L+1,C)}`}}return q}function pn(s,n,i){let r=n,o=n+1,l=s[o];while(l===" "||l==="\t")if(n<o+i)l=s[++n];else{do l=s[++n];while(l&&l!==`
|
|
11
|
+
`);r=n,o=n+1,l=s[o]}return r}Ko.FOLD_BLOCK="block";Ko.FOLD_FLOW="flow";Ko.FOLD_QUOTED="quoted";Ko.foldFlowLines=jo});var Te=v(function(Qo){var F=M(),G=mn(),nt=(s,n)=>({indentAtStart:n?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),it=(s)=>/^(%|---|\.\.\.)/m.test(s);function Jo(s,n,i){if(!n||n<0)return!1;let r=n-i,o=s.length;if(o<=r)return!1;for(let l=0,c=0;l<o;++l)if(s[l]===`
|
|
12
|
+
`){if(l-c>r)return!0;if(c=l+1,o-c<=r)return!1}return!0}function Le(s,n){let i=JSON.stringify(s);if(n.options.doubleQuotedAsJSON)return i;let{implicitKey:r}=n,o=n.options.doubleQuotedMinMultiLineLength,l=n.indent||(it(s)?" ":""),c="",f=0;for(let u=0,h=i[u];h;h=i[++u]){if(h===" "&&i[u+1]==="\\"&&i[u+2]==="n")c+=i.slice(f,u)+"\\ ",u+=1,f=u,h="\\";if(h==="\\")switch(i[u+1]){case"u":{c+=i.slice(f,u);let g=i.substr(u+2,4);switch(g){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:if(g.substr(0,2)==="00")c+="\\x"+g.substr(2);else c+=i.substr(u,6)}u+=5,f=u+1}break;case"n":if(r||i[u+2]==='"'||i.length<o)u+=1;else{c+=i.slice(f,u)+`
|
|
13
|
+
|
|
14
|
+
`;while(i[u+2]==="\\"&&i[u+3]==="n"&&i[u+4]!=='"')c+=`
|
|
15
|
+
`,u+=2;if(c+=l,i[u+2]===" ")c+="\\";u+=1,f=u+1}break;default:u+=1}}return c=f?c+i.slice(f):i,r?c:G.foldFlowLines(c,l,G.FOLD_QUOTED,nt(n,!1))}function Rt(s,n){if(n.options.singleQuote===!1||n.implicitKey&&s.includes(`
|
|
16
|
+
`)||/[ \t]\n|\n[ \t]/.test(s))return Le(s,n);let i=n.indent||(it(s)?" ":""),r="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
17
|
+
${i}`)+"'";return n.implicitKey?r:G.foldFlowLines(r,i,G.FOLD_FLOW,nt(n,!1))}function me(s,n){let{singleQuote:i}=n.options,r;if(i===!1)r=Le;else{let o=s.includes('"'),l=s.includes("'");if(o&&!l)r=Rt;else if(l&&!o)r=Le;else r=i?Rt:Le}return r(s,n)}var Ft;try{Ft=new RegExp(`(^|(?<!
|
|
18
|
+
))
|
|
19
|
+
+(?!
|
|
20
|
+
|$)`,"g")}catch{Ft=/\n+(?!\n|$)/g}function st({comment:s,type:n,value:i},r,o,l){let{blockQuote:c,commentString:f,lineWidth:u}=r.options;if(!c||/\n[\t ]+$/.test(i))return me(i,r);let h=r.indent||(r.forceBlockIndent||it(i)?" ":""),g=c==="literal"?!0:c==="folded"||n===F.Scalar.BLOCK_FOLDED?!1:n===F.Scalar.BLOCK_LITERAL?!0:!Jo(i,u,h.length);if(!i)return g?`|
|
|
21
|
+
`:`>
|
|
22
|
+
`;let d,p;for(p=i.length;p>0;--p){let C=i[p-1];if(C!==`
|
|
23
|
+
`&&C!=="\t"&&C!==" ")break}let S=i.substring(p),N=S.indexOf(`
|
|
24
|
+
`);if(N===-1)d="-";else if(i===S||N!==S.length-1){if(d="+",l)l()}else d="";if(S){if(i=i.slice(0,-S.length),S[S.length-1]===`
|
|
25
|
+
`)S=S.slice(0,-1);S=S.replace(Ft,`$&${h}`)}let m=!1,w,O=-1;for(w=0;w<i.length;++w){let C=i[w];if(C===" ")m=!0;else if(C===`
|
|
26
|
+
`)O=w;else break}let q=i.substring(0,O<w?O+1:w);if(q)i=i.substring(q.length),q=q.replace(/\n+/g,`$&${h}`);let L=(m?h?"2":"1":"")+d;if(s){if(L+=" "+f(s.replace(/ ?[\r\n]+/g," ")),o)o()}if(!g){let C=i.replace(/\n+/g,`
|
|
27
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`),_=!1,P=nt(r,!0);if(c!=="folded"&&n!==F.Scalar.BLOCK_FOLDED)P.onOverflow=()=>{_=!0};let A=G.foldFlowLines(`${q}${C}${S}`,h,G.FOLD_BLOCK,P);if(!_)return`>${L}
|
|
28
|
+
${h}${A}`}return i=i.replace(/\n+/g,`$&${h}`),`|${L}
|
|
29
|
+
${h}${q}${i}${S}`}function Vo(s,n,i,r){let{type:o,value:l}=s,{actualString:c,implicitKey:f,indent:u,indentStep:h,inFlow:g}=n;if(f&&l.includes(`
|
|
30
|
+
`)||g&&/[[\]{},]/.test(l))return me(l,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return f||g||!l.includes(`
|
|
31
|
+
`)?me(l,n):st(s,n,i,r);if(!f&&!g&&o!==F.Scalar.PLAIN&&l.includes(`
|
|
32
|
+
`))return st(s,n,i,r);if(it(l)){if(u==="")return n.forceBlockIndent=!0,st(s,n,i,r);else if(f&&u===h)return me(l,n)}let d=l.replace(/\n+/g,`$&
|
|
33
|
+
${u}`);if(c){let p=(m)=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(d),{compat:S,tags:N}=n.doc.schema;if(N.some(p)||S?.some(p))return me(l,n)}return f?d:G.foldFlowLines(d,u,G.FOLD_FLOW,nt(n,!1))}function Wo(s,n,i,r){let{implicitKey:o,inFlow:l}=n,c=typeof s.value==="string"?s:Object.assign({},s,{value:String(s.value)}),{type:f}=s;if(f!==F.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value))f=F.Scalar.QUOTE_DOUBLE}let u=(g)=>{switch(g){case F.Scalar.BLOCK_FOLDED:case F.Scalar.BLOCK_LITERAL:return o||l?me(c.value,n):st(c,n,i,r);case F.Scalar.QUOTE_DOUBLE:return Le(c.value,n);case F.Scalar.QUOTE_SINGLE:return Rt(c.value,n);case F.Scalar.PLAIN:return Vo(c,n,i,r);default:return null}},h=u(f);if(h===null){let{defaultKeyType:g,defaultStringType:d}=n.options,p=o&&g||d;if(h=u(p),h===null)throw Error(`Unsupported default string type ${p}`)}return h}Qo.stringifyString=Wo});var Ce=v(function(na){var Go=ze(),X=I(),Xo=Ee(),zo=Te();function Zo(s,n){let i=Object.assign({blockQuote:!0,commentString:Xo.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},s.schema.toStringOptions,n),r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:s,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent==="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function ea(s,n){if(n.tag){let o=s.filter((l)=>l.tag===n.tag);if(o.length>0)return o.find((l)=>l.format===n.format)??o[0]}let i=void 0,r;if(X.isScalar(n)){r=n.value;let o=s.filter((l)=>l.identify?.(r));if(o.length>1){let l=o.filter((c)=>c.test);if(l.length>0)o=l}i=o.find((l)=>l.format===n.format)??o.find((l)=>!l.format)}else r=n,i=s.find((o)=>o.nodeClass&&r instanceof o.nodeClass);if(!i){let o=r?.constructor?.name??(r===null?"null":typeof r);throw Error(`Tag not resolved for ${o} value`)}return i}function ta(s,n,{anchors:i,doc:r}){if(!r.directives)return"";let o=[],l=(X.isScalar(s)||X.isCollection(s))&&s.anchor;if(l&&Go.anchorIsValid(l))i.add(l),o.push(`&${l}`);let c=s.tag??(n.default?null:n.tag);if(c)o.push(r.directives.tagString(c));return o.join(" ")}function sa(s,n,i,r){if(X.isPair(s))return s.toString(n,i,r);if(X.isAlias(s)){if(n.doc.directives)return s.toString(n);if(n.resolvedAliases?.has(s))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(n.resolvedAliases)n.resolvedAliases.add(s);else n.resolvedAliases=new Set([s]);s=s.resolve(n.doc)}}let o=void 0,l=X.isNode(s)?s:n.doc.createNode(s,{onTagObj:(u)=>o=u});o??(o=ea(n.doc.schema.tags,l));let c=ta(l,o,n);if(c.length>0)n.indentAtStart=(n.indentAtStart??0)+c.length+1;let f=typeof o.stringify==="function"?o.stringify(l,n,i,r):X.isScalar(l)?zo.stringifyString(l,n,i,r):l.toString(n,i,r);if(!c)return f;return X.isScalar(l)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
|
|
34
|
+
${n.indent}${f}`}na.createStringifyContext=Zo;na.stringify=sa});var bn=v(function(aa){var W=I(),yn=M(),gn=Ce(),_e=Ee();function oa({key:s,value:n},i,r,o){let{allNullValues:l,doc:c,indent:f,indentStep:u,options:{commentString:h,indentSeq:g,simpleKeys:d}}=i,p=W.isNode(s)&&s.comment||null;if(d){if(p)throw Error("With simple keys, key nodes cannot have comments");if(W.isCollection(s)||!W.isNode(s)&&typeof s==="object")throw Error("With simple keys, collection cannot be used as a key value")}let S=!d&&(!s||p&&n==null&&!i.inFlow||W.isCollection(s)||(W.isScalar(s)?s.type===yn.Scalar.BLOCK_FOLDED||s.type===yn.Scalar.BLOCK_LITERAL:typeof s==="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!S&&(d||!l),indent:f+u});let N=!1,m=!1,w=gn.stringify(s,i,()=>N=!0,()=>m=!0);if(!S&&!i.inFlow&&w.length>1024){if(d)throw Error("With simple keys, single line scalar must not span more than 1024 characters");S=!0}if(i.inFlow){if(l||n==null){if(N&&r)r();return w===""?"?":S?`? ${w}`:w}}else if(l&&!d||n==null&&S){if(w=`? ${w}`,p&&!N)w+=_e.lineComment(w,i.indent,h(p));else if(m&&o)o();return w}if(N)p=null;if(S){if(p)w+=_e.lineComment(w,i.indent,h(p));w=`? ${w}
|
|
35
|
+
${f}:`}else if(w=`${w}:`,p)w+=_e.lineComment(w,i.indent,h(p));let O,q,E;if(W.isNode(n))O=!!n.spaceBefore,q=n.commentBefore,E=n.comment;else if(O=!1,q=null,E=null,n&&typeof n==="object")n=c.createNode(n);if(i.implicitKey=!1,!S&&!p&&W.isScalar(n))i.indentAtStart=w.length+1;if(m=!1,!g&&u.length>=2&&!i.inFlow&&!S&&W.isSeq(n)&&!n.flow&&!n.tag&&!n.anchor)i.indent=i.indent.substring(2);let L=!1,C=gn.stringify(n,i,()=>L=!0,()=>m=!0),_=" ";if(p||O||q){if(_=O?`
|
|
36
|
+
`:"",q){let P=h(q);_+=`
|
|
37
|
+
${_e.indentComment(P,i.indent)}`}if(C===""&&!i.inFlow){if(_===`
|
|
38
|
+
`)_=`
|
|
39
|
+
|
|
40
|
+
`}else _+=`
|
|
41
|
+
${i.indent}`}else if(!S&&W.isCollection(n)){let P=C[0],A=C.indexOf(`
|
|
42
|
+
`),x=A!==-1,Q=i.inFlow??n.flow??n.items.length===0;if(x||!Q){let ue=!1;if(x&&(P==="&"||P==="!")){let D=C.indexOf(" ");if(P==="&"&&D!==-1&&D<A&&C[D+1]==="!")D=C.indexOf(" ",D+1);if(D===-1||A<D)ue=!0}if(!ue)_=`
|
|
43
|
+
${i.indent}`}}else if(C===""||C[0]===`
|
|
44
|
+
`)_="";if(w+=_+C,i.inFlow){if(L&&r)r()}else if(E&&!L)w+=_e.lineComment(w,i.indent,h(E));else if(m&&o)o();return w}aa.stringifyPair=oa});var Ut=v(function(ua){var wn=We("process");function ca(s,...n){if(s==="debug")console.log(...n)}function fa(s,n){if(s==="debug"||s==="warn")if(typeof wn.emitWarning==="function")wn.emitWarning(n);else console.warn(n)}ua.debug=ca;ua.warn=fa});var at=v(function(ma){var Ie=I(),Sn=M(),rt="<<",ot={identify:(s)=>s===rt||typeof s==="symbol"&&s.description===rt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Sn.Scalar(Symbol(rt)),{addToJSMap:vn}),stringify:()=>rt},pa=(s,n)=>(ot.identify(n)||Ie.isScalar(n)&&(!n.type||n.type===Sn.Scalar.PLAIN)&&ot.identify(n.value))&&s?.doc.schema.tags.some((i)=>i.tag===ot.tag&&i.default);function vn(s,n,i){if(i=s&&Ie.isAlias(i)?i.resolve(s.doc):i,Ie.isSeq(i))for(let r of i.items)Yt(s,n,r);else if(Array.isArray(i))for(let r of i)Yt(s,n,r);else Yt(s,n,i)}function Yt(s,n,i){let r=s&&Ie.isAlias(i)?i.resolve(s.doc):i;if(!Ie.isMap(r))throw Error("Merge sources must be maps or map aliases");let o=r.toJSON(null,s,Map);for(let[l,c]of o)if(n instanceof Map){if(!n.has(l))n.set(l,c)}else if(n instanceof Set)n.add(l);else if(!Object.prototype.hasOwnProperty.call(n,l))Object.defineProperty(n,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return n}ma.addMergeToJSMap=vn;ma.isMergeKey=pa;ma.merge=ot});var Vt=v(function(Na){var wa=Ut(),kn=at(),Sa=Ce(),Nn=I(),Jt=H();function va(s,n,{key:i,value:r}){if(Nn.isNode(i)&&i.addToJSMap)i.addToJSMap(s,n,r);else if(kn.isMergeKey(s,i))kn.addMergeToJSMap(s,n,r);else{let o=Jt.toJS(i,"",s);if(n instanceof Map)n.set(o,Jt.toJS(r,o,s));else if(n instanceof Set)n.add(o);else{let l=ka(i,o,s),c=Jt.toJS(r,l,s);if(l in n)Object.defineProperty(n,l,{value:c,writable:!0,enumerable:!0,configurable:!0});else n[l]=c}}return n}function ka(s,n,i){if(n===null)return"";if(typeof n!=="object")return String(n);if(Nn.isNode(s)&&i?.doc){let r=Sa.createStringifyContext(i.doc,{});r.anchors=new Set;for(let l of i.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;let o=s.toString(r);if(!i.mapKeyWarned){let l=JSON.stringify(o);if(l.length>40)l=l.substring(0,36)+'..."';wa.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return o}return JSON.stringify(n)}Na.addPairToJSMap=va});var z=v(function(La){var An=qe(),Oa=bn(),qa=Vt(),lt=I();function Ea(s,n,i){let r=An.createNode(s,void 0,i),o=An.createNode(n,void 0,i);return new ct(r,o)}class ct{constructor(s,n=null){Object.defineProperty(this,lt.NODE_TYPE,{value:lt.PAIR}),this.key=s,this.value=n}clone(s){let{key:n,value:i}=this;if(lt.isNode(n))n=n.clone(s);if(lt.isNode(i))i=i.clone(s);return new ct(n,i)}toJSON(s,n){let i=n?.mapAsMap?new Map:{};return qa.addPairToJSMap(n,i,this)}toString(s,n,i){return s?.doc?Oa.stringifyPair(this,s,n,i):JSON.stringify(this)}}La.Pair=ct;La.createPair=Ea});var Wt=v(function($a){var oe=I(),On=Ce(),ft=Ee();function _a(s,n,i){return(n.inFlow??s.flow?Pa:Ia)(s,n,i)}function Ia({comment:s,items:n},i,{blockItemPrefix:r,flowChars:o,itemIndent:l,onChompKeep:c,onComment:f}){let{indent:u,options:{commentString:h}}=i,g=Object.assign({},i,{indent:l,type:null}),d=!1,p=[];for(let N=0;N<n.length;++N){let m=n[N],w=null;if(oe.isNode(m)){if(!d&&m.spaceBefore)p.push("");if(ut(i,p,m.commentBefore,d),m.comment)w=m.comment}else if(oe.isPair(m)){let q=oe.isNode(m.key)?m.key:null;if(q){if(!d&&q.spaceBefore)p.push("");ut(i,p,q.commentBefore,d)}}d=!1;let O=On.stringify(m,g,()=>w=null,()=>d=!0);if(w)O+=ft.lineComment(O,l,h(w));if(d&&w)d=!1;p.push(r+O)}let S;if(p.length===0)S=o.start+o.end;else{S=p[0];for(let N=1;N<p.length;++N){let m=p[N];S+=m?`
|
|
45
|
+
${u}${m}`:`
|
|
46
|
+
`}}if(s){if(S+=`
|
|
47
|
+
`+ft.indentComment(h(s),u),f)f()}else if(d&&c)c();return S}function Pa({items:s},n,{flowChars:i,itemIndent:r}){let{indent:o,indentStep:l,flowCollectionPadding:c,options:{commentString:f}}=n;r+=l;let u=Object.assign({},n,{indent:r,inFlow:!0,type:null}),h=!1,g=0,d=[];for(let N=0;N<s.length;++N){let m=s[N],w=null;if(oe.isNode(m)){if(m.spaceBefore)d.push("");if(ut(n,d,m.commentBefore,!1),m.comment)w=m.comment}else if(oe.isPair(m)){let q=oe.isNode(m.key)?m.key:null;if(q){if(q.spaceBefore)d.push("");if(ut(n,d,q.commentBefore,!1),q.comment)h=!0}let E=oe.isNode(m.value)?m.value:null;if(E){if(E.comment)w=E.comment;if(E.commentBefore)h=!0}else if(m.value==null&&q?.comment)w=q.comment}if(w)h=!0;let O=On.stringify(m,u,()=>w=null);if(N<s.length-1)O+=",";if(w)O+=ft.lineComment(O,r,f(w));if(!h&&(d.length>g||O.includes(`
|
|
48
|
+
`)))h=!0;d.push(O),g=d.length}let{start:p,end:S}=i;if(d.length===0)return p+S;else{if(!h){let N=d.reduce((m,w)=>m+w.length+2,2);h=n.options.lineWidth>0&&N>n.options.lineWidth}if(h){let N=p;for(let m of d)N+=m?`
|
|
49
|
+
${l}${o}${m}`:`
|
|
50
|
+
`;return`${N}
|
|
51
|
+
${o}${S}`}else return`${p}${c}${d.join(" ")}${c}${S}`}}function ut({indent:s,options:{commentString:n}},i,r,o){if(r&&o)r=r.replace(/^\n+/,"");if(r){let l=ft.indentComment(n(r),s);i.push(l.trimStart())}}$a.stringifyCollection=_a});var ee=v(function(Ka){var xa=Wt(),Da=Vt(),Ba=tt(),Z=I(),ht=z(),ja=M();function Pe(s,n){let i=Z.isScalar(n)?n.value:n;for(let r of s)if(Z.isPair(r)){if(r.key===n||r.key===i)return r;if(Z.isScalar(r.key)&&r.key.value===i)return r}return}class qn extends Ba.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(s){super(Z.MAP,s);this.items=[]}static from(s,n,i){let{keepUndefined:r,replacer:o}=i,l=new this(s),c=(f,u)=>{if(typeof o==="function")u=o.call(n,f,u);else if(Array.isArray(o)&&!o.includes(f))return;if(u!==void 0||r)l.items.push(ht.createPair(f,u,i))};if(n instanceof Map)for(let[f,u]of n)c(f,u);else if(n&&typeof n==="object")for(let f of Object.keys(n))c(f,n[f]);if(typeof s.sortMapEntries==="function")l.items.sort(s.sortMapEntries);return l}add(s,n){let i;if(Z.isPair(s))i=s;else if(!s||typeof s!=="object"||!("key"in s))i=new ht.Pair(s,s?.value);else i=new ht.Pair(s.key,s.value);let r=Pe(this.items,i.key),o=this.schema?.sortMapEntries;if(r){if(!n)throw Error(`Key ${i.key} already set`);if(Z.isScalar(r.value)&&ja.isScalarValue(i.value))r.value.value=i.value;else r.value=i.value}else if(o){let l=this.items.findIndex((c)=>o(i,c)<0);if(l===-1)this.items.push(i);else this.items.splice(l,0,i)}else this.items.push(i)}delete(s){let n=Pe(this.items,s);if(!n)return!1;return this.items.splice(this.items.indexOf(n),1).length>0}get(s,n){let r=Pe(this.items,s)?.value;return(!n&&Z.isScalar(r)?r.value:r)??void 0}has(s){return!!Pe(this.items,s)}set(s,n){this.add(new ht.Pair(s,n),!0)}toJSON(s,n,i){let r=i?new i:n?.mapAsMap?new Map:{};if(n?.onCreate)n.onCreate(r);for(let o of this.items)Da.addPairToJSMap(n,r,o);return r}toString(s,n,i){if(!s)return JSON.stringify(this);for(let r of this.items)if(!Z.isPair(r))throw Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);if(!s.allNullValues&&this.hasAllNullValues(!1))s=Object.assign({},s,{allNullValues:!0});return xa.stringifyCollection(this,s,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:s.indent||"",onChompKeep:i,onComment:n})}}Ka.YAMLMap=qn;Ka.findPair=Pe});var ye=v(function(Ja){var Ua=I(),En=ee(),Ya={collection:"map",default:!0,nodeClass:En.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,n){if(!Ua.isMap(s))n("Expected a mapping for this tag");return s},createNode:(s,n,i)=>En.YAMLMap.from(s,n,i)};Ja.map=Ya});var te=v(function(za){var Wa=qe(),Qa=Wt(),Ha=tt(),pt=I(),Ga=M(),Xa=H();class Ln extends Ha.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(s){super(pt.SEQ,s);this.items=[]}add(s){this.items.push(s)}delete(s){let n=dt(s);if(typeof n!=="number")return!1;return this.items.splice(n,1).length>0}get(s,n){let i=dt(s);if(typeof i!=="number")return;let r=this.items[i];return!n&&pt.isScalar(r)?r.value:r}has(s){let n=dt(s);return typeof n==="number"&&n<this.items.length}set(s,n){let i=dt(s);if(typeof i!=="number")throw Error(`Expected a valid index, not ${s}.`);let r=this.items[i];if(pt.isScalar(r)&&Ga.isScalarValue(n))r.value=n;else this.items[i]=n}toJSON(s,n){let i=[];if(n?.onCreate)n.onCreate(i);let r=0;for(let o of this.items)i.push(Xa.toJS(o,String(r++),n));return i}toString(s,n,i){if(!s)return JSON.stringify(this);return Qa.stringifyCollection(this,s,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(s.indent||"")+" ",onChompKeep:i,onComment:n})}static from(s,n,i){let{replacer:r}=i,o=new this(s);if(n&&Symbol.iterator in Object(n)){let l=0;for(let c of n){if(typeof r==="function"){let f=n instanceof Set?c:String(l++);c=r.call(n,f,c)}o.items.push(Wa.createNode(c,void 0,i))}}return o}}function dt(s){let n=pt.isScalar(s)?s.value:s;if(n&&typeof n==="string")n=Number(n);return typeof n==="number"&&Number.isInteger(n)&&n>=0?n:null}za.YAMLSeq=Ln});var ge=v(function(sl){var el=I(),Tn=te(),tl={collection:"seq",default:!0,nodeClass:Tn.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,n){if(!el.isSeq(s))n("Expected a sequence for this tag");return s},createNode:(s,n,i)=>Tn.YAMLSeq.from(s,n,i)};sl.seq=tl});var $e=v(function(ol){var il=Te(),rl={identify:(s)=>typeof s==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(s)=>s,stringify(s,n,i,r){return n=Object.assign({actualString:!0},n),il.stringifyString(s,n,i,r)}};ol.string=rl});var mt=v(function(ll){var Cn=M(),_n={identify:(s)=>s==null,createNode:()=>new Cn.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Cn.Scalar(null),stringify:({source:s},n)=>typeof s==="string"&&_n.test.test(s)?s:n.options.nullStr};ll.nullTag=_n});var Qt=v(function(ul){var fl=M(),In={identify:(s)=>typeof s==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(s)=>new fl.Scalar(s[0]==="t"||s[0]==="T"),stringify({source:s,value:n},i){if(s&&In.test.test(s)){let r=s[0]==="t"||s[0]==="T";if(n===r)return s}return n?i.options.trueStr:i.options.falseStr}};ul.boolTag=In});var be=v(function(pl){function dl({format:s,minFractionDigits:n,tag:i,value:r}){if(typeof r==="bigint")return String(r);let o=typeof r==="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(r);if(!s&&n&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");if(c<0)c=l.length,l+=".";let f=n-(l.length-c-1);while(f-- >0)l+="0"}return l}pl.stringifyNumber=dl});var Gt=v(function(Sl){var yl=M(),Ht=be(),gl={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(s)=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ht.stringifyNumber},bl={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(s)=>parseFloat(s),stringify(s){let n=Number(s.value);return isFinite(n)?n.toExponential():Ht.stringifyNumber(s)}},wl={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let n=new yl.Scalar(parseFloat(s)),i=s.indexOf(".");if(i!==-1&&s[s.length-1]==="0")n.minFractionDigits=s.length-i-1;return n},stringify:Ht.stringifyNumber};Sl.float=wl;Sl.floatExp=bl;Sl.floatNaN=gl});var zt=v(function(El){var Pn=be(),yt=(s)=>typeof s==="bigint"||Number.isInteger(s),Xt=(s,n,i,{intAsBigInt:r})=>r?BigInt(s):parseInt(s.substring(n),i);function $n(s,n,i){let{value:r}=s;if(yt(r)&&r>=0)return i+r.toString(n);return Pn.stringifyNumber(s)}var Al={identify:(s)=>yt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,n,i)=>Xt(s,2,8,i),stringify:(s)=>$n(s,8,"0o")},Ol={identify:yt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,n,i)=>Xt(s,0,10,i),stringify:Pn.stringifyNumber},ql={identify:(s)=>yt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,n,i)=>Xt(s,2,16,i),stringify:(s)=>$n(s,16,"0x")};El.int=Ol;El.intHex=ql;El.intOct=Al});var Mn=v(function(Dl){var _l=ye(),Il=mt(),Pl=ge(),$l=$e(),Ml=Qt(),Zt=Gt(),es=zt(),xl=[_l.map,Pl.seq,$l.string,Il.nullTag,Ml.boolTag,es.intOct,es.int,es.intHex,Zt.floatNaN,Zt.floatExp,Zt.float];Dl.schema=xl});var Dn=v(function(Jl){var jl=M(),Kl=ye(),Rl=ge();function xn(s){return typeof s==="bigint"||Number.isInteger(s)}var gt=({value:s})=>JSON.stringify(s),Fl=[{identify:(s)=>typeof s==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(s)=>s,stringify:gt},{identify:(s)=>s==null,createNode:()=>new jl.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:gt},{identify:(s)=>typeof s==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(s)=>s==="true",stringify:gt},{identify:xn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,n,{intAsBigInt:i})=>i?BigInt(s):parseInt(s,10),stringify:({value:s})=>xn(s)?s.toString():JSON.stringify(s)},{identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(s)=>parseFloat(s),stringify:gt}],Ul={default:!0,tag:"",test:/^/,resolve(s,n){return n(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},Yl=[Kl.map,Rl.seq].concat(Fl,Ul);Jl.schema=Yl});var ss=v(function(Hl){var Me=We("buffer"),ts=M(),Wl=Te(),Ql={identify:(s)=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,n){if(typeof Me.Buffer==="function")return Me.Buffer.from(s,"base64");else if(typeof atob==="function"){let i=atob(s.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let o=0;o<i.length;++o)r[o]=i.charCodeAt(o);return r}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:n,value:i},r,o,l){if(!i)return"";let c=i,f;if(typeof Me.Buffer==="function")f=c instanceof Me.Buffer?c.toString("base64"):Me.Buffer.from(c.buffer).toString("base64");else if(typeof btoa==="function"){let u="";for(let h=0;h<c.length;++h)u+=String.fromCharCode(c[h]);f=btoa(u)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ts.Scalar.BLOCK_LITERAL),n!==ts.Scalar.QUOTE_DOUBLE){let u=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),h=Math.ceil(f.length/u),g=Array(h);for(let d=0,p=0;d<h;++d,p+=u)g[d]=f.substr(p,u);f=g.join(n===ts.Scalar.BLOCK_LITERAL?`
|
|
52
|
+
`:" ")}return Wl.stringifyString({comment:s,type:n,value:f},r,o,l)}};Hl.binary=Ql});var wt=v(function(ec){var bt=I(),ns=z(),Xl=M(),zl=te();function Bn(s,n){if(bt.isSeq(s))for(let i=0;i<s.items.length;++i){let r=s.items[i];if(bt.isPair(r))continue;else if(bt.isMap(r)){if(r.items.length>1)n("Each pair must have its own sequence indicator");let o=r.items[0]||new ns.Pair(new Xl.Scalar(null));if(r.commentBefore)o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
|
|
53
|
+
${o.key.commentBefore}`:r.commentBefore;if(r.comment){let l=o.value??o.key;l.comment=l.comment?`${r.comment}
|
|
54
|
+
${l.comment}`:r.comment}r=o}s.items[i]=bt.isPair(r)?r:new ns.Pair(r)}else n("Expected a sequence for this tag");return s}function jn(s,n,i){let{replacer:r}=i,o=new zl.YAMLSeq(s);o.tag="tag:yaml.org,2002:pairs";let l=0;if(n&&Symbol.iterator in Object(n))for(let c of n){if(typeof r==="function")c=r.call(n,String(l++),c);let f,u;if(Array.isArray(c))if(c.length===2)f=c[0],u=c[1];else throw TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){let h=Object.keys(c);if(h.length===1)f=h[0],u=c[f];else throw TypeError(`Expected tuple with one key, not ${h.length} keys`)}else f=c;o.items.push(ns.createPair(f,u,i))}return o}var Zl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Bn,createNode:jn};ec.createPairs=jn;ec.pairs=Zl;ec.resolvePairs=Bn});var rs=v(function(oc){var Kn=I(),is=H(),xe=ee(),ic=te(),Rn=wt();class ae extends ic.YAMLSeq{constructor(){super();this.add=xe.YAMLMap.prototype.add.bind(this),this.delete=xe.YAMLMap.prototype.delete.bind(this),this.get=xe.YAMLMap.prototype.get.bind(this),this.has=xe.YAMLMap.prototype.has.bind(this),this.set=xe.YAMLMap.prototype.set.bind(this),this.tag=ae.tag}toJSON(s,n){if(!n)return super.toJSON(s);let i=new Map;if(n?.onCreate)n.onCreate(i);for(let r of this.items){let o,l;if(Kn.isPair(r))o=is.toJS(r.key,"",n),l=is.toJS(r.value,o,n);else o=is.toJS(r,"",n);if(i.has(o))throw Error("Ordered maps must not include duplicate keys");i.set(o,l)}return i}static from(s,n,i){let r=Rn.createPairs(s,n,i),o=new this;return o.items=r.items,o}}ae.tag="tag:yaml.org,2002:omap";var rc={collection:"seq",identify:(s)=>s instanceof Map,nodeClass:ae,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,n){let i=Rn.resolvePairs(s,n),r=[];for(let{key:o}of i.items)if(Kn.isScalar(o))if(r.includes(o.value))n(`Ordered maps must not include duplicate keys: ${o.value}`);else r.push(o.value);return Object.assign(new ae,i)},createNode:(s,n,i)=>ae.from(s,n,i)};oc.YAMLOMap=ae;oc.omap=rc});var Vn=v(function(cc){var Fn=M();function Un({value:s,source:n},i){if(n&&(s?Yn:Jn).test.test(n))return n;return s?i.options.trueStr:i.options.falseStr}var Yn={identify:(s)=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Fn.Scalar(!0),stringify:Un},Jn={identify:(s)=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Fn.Scalar(!1),stringify:Un};cc.falseTag=Jn;cc.trueTag=Yn});var Wn=v(function(yc){var hc=M(),os=be(),dc={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(s)=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:os.stringifyNumber},pc={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(s)=>parseFloat(s.replace(/_/g,"")),stringify(s){let n=Number(s.value);return isFinite(n)?n.toExponential():os.stringifyNumber(s)}},mc={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let n=new hc.Scalar(parseFloat(s.replace(/_/g,""))),i=s.indexOf(".");if(i!==-1){let r=s.substring(i+1).replace(/_/g,"");if(r[r.length-1]==="0")n.minFractionDigits=r.length}return n},stringify:os.stringifyNumber};yc.float=mc;yc.floatExp=pc;yc.floatNaN=dc});var Hn=v(function(Ac){var Qn=be(),De=(s)=>typeof s==="bigint"||Number.isInteger(s);function St(s,n,i,{intAsBigInt:r}){let o=s[0];if(o==="-"||o==="+")n+=1;if(s=s.substring(n).replace(/_/g,""),r){switch(i){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let c=BigInt(s);return o==="-"?BigInt(-1)*c:c}let l=parseInt(s,i);return o==="-"?-1*l:l}function as(s,n,i){let{value:r}=s;if(De(r)){let o=r.toString(n);return r<0?"-"+i+o.substr(1):i+o}return Qn.stringifyNumber(s)}var Sc={identify:De,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,n,i)=>St(s,2,2,i),stringify:(s)=>as(s,2,"0b")},vc={identify:De,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,n,i)=>St(s,1,8,i),stringify:(s)=>as(s,8,"0")},kc={identify:De,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,n,i)=>St(s,0,10,i),stringify:Qn.stringifyNumber},Nc={identify:De,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,n,i)=>St(s,2,16,i),stringify:(s)=>as(s,16,"0x")};Ac.int=kc;Ac.intBin=Sc;Ac.intHex=Nc;Ac.intOct=vc});var ls=v(function(Cc){var Nt=I(),vt=z(),kt=ee();class le extends kt.YAMLMap{constructor(s){super(s);this.tag=le.tag}add(s){let n;if(Nt.isPair(s))n=s;else if(s&&typeof s==="object"&&"key"in s&&"value"in s&&s.value===null)n=new vt.Pair(s.key,null);else n=new vt.Pair(s,null);if(!kt.findPair(this.items,n.key))this.items.push(n)}get(s,n){let i=kt.findPair(this.items,s);return!n&&Nt.isPair(i)?Nt.isScalar(i.key)?i.key.value:i.key:i}set(s,n){if(typeof n!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let i=kt.findPair(this.items,s);if(i&&!n)this.items.splice(this.items.indexOf(i),1);else if(!i&&n)this.items.push(new vt.Pair(s))}toJSON(s,n){return super.toJSON(s,n,Set)}toString(s,n,i){if(!s)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},s,{allNullValues:!0}),n,i);else throw Error("Set items must all have null values")}static from(s,n,i){let{replacer:r}=i,o=new this(s);if(n&&Symbol.iterator in Object(n))for(let l of n){if(typeof r==="function")l=r.call(n,l,l);o.items.push(vt.createPair(l,null,i))}return o}}le.tag="tag:yaml.org,2002:set";var Tc={collection:"map",identify:(s)=>s instanceof Set,nodeClass:le,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,n,i)=>le.from(s,n,i),resolve(s,n){if(Nt.isMap(s))if(s.hasAllNullValues(!0))return Object.assign(new le,s);else n("Set items must all have null values");else n("Expected a mapping for this tag");return s}};Cc.YAMLSet=le;Cc.set=Tc});var fs=v(function(xc){var Pc=be();function cs(s,n){let i=s[0],r=i==="-"||i==="+"?s.substring(1):s,o=(c)=>n?BigInt(c):Number(c),l=r.replace(/_/g,"").split(":").reduce((c,f)=>c*o(60)+o(f),o(0));return i==="-"?o(-1)*l:l}function Gn(s){let{value:n}=s,i=(c)=>c;if(typeof n==="bigint")i=(c)=>BigInt(c);else if(isNaN(n)||!isFinite(n))return Pc.stringifyNumber(s);let r="";if(n<0)r="-",n*=i(-1);let o=i(60),l=[n%o];if(n<60)l.unshift(0);else if(n=(n-l[0])/o,l.unshift(n%o),n>=60)n=(n-l[0])/o,l.unshift(n);return r+l.map((c)=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var $c={identify:(s)=>typeof s==="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,n,{intAsBigInt:i})=>cs(s,i),stringify:Gn},Mc={identify:(s)=>typeof s==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(s)=>cs(s,!1),stringify:Gn},Xn={identify:(s)=>s 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(s){let n=s.match(Xn.test);if(!n)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,i,r,o,l,c,f]=n.map(Number),u=n[7]?Number((n[7]+"00").substr(1,3)):0,h=Date.UTC(i,r-1,o,l||0,c||0,f||0,u),g=n[8];if(g&&g!=="Z"){let d=cs(g,!1);if(Math.abs(d)<30)d*=60;h-=60000*d}return new Date(h)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};xc.floatTime=Mc;xc.intTime=$c;xc.timestamp=Xn});var Zn=v(function(Gc){var Kc=ye(),Rc=mt(),Fc=ge(),Uc=$e(),Yc=ss(),zn=Vn(),us=Wn(),At=Hn(),Jc=at(),Vc=rs(),Wc=wt(),Qc=ls(),hs=fs(),Hc=[Kc.map,Fc.seq,Uc.string,Rc.nullTag,zn.trueTag,zn.falseTag,At.intBin,At.intOct,At.int,At.intHex,us.floatNaN,us.floatExp,us.float,Yc.binary,Jc.merge,Vc.omap,Wc.pairs,Qc.set,hs.intTime,hs.floatTime,hs.timestamp];Gc.schema=Hc});var ci=v(function(of){var ni=ye(),zc=mt(),ii=ge(),Zc=$e(),ef=Qt(),ds=Gt(),ps=zt(),tf=Mn(),sf=Dn(),ri=ss(),Be=at(),oi=rs(),ai=wt(),ei=Zn(),li=ls(),Ot=fs(),ti=new Map([["core",tf.schema],["failsafe",[ni.map,ii.seq,Zc.string]],["json",sf.schema],["yaml11",ei.schema],["yaml-1.1",ei.schema]]),si={binary:ri.binary,bool:ef.boolTag,float:ds.float,floatExp:ds.floatExp,floatNaN:ds.floatNaN,floatTime:Ot.floatTime,int:ps.int,intHex:ps.intHex,intOct:ps.intOct,intTime:Ot.intTime,map:ni.map,merge:Be.merge,null:zc.nullTag,omap:oi.omap,pairs:ai.pairs,seq:ii.seq,set:li.set,timestamp:Ot.timestamp},nf={"tag:yaml.org,2002:binary":ri.binary,"tag:yaml.org,2002:merge":Be.merge,"tag:yaml.org,2002:omap":oi.omap,"tag:yaml.org,2002:pairs":ai.pairs,"tag:yaml.org,2002:set":li.set,"tag:yaml.org,2002:timestamp":Ot.timestamp};function rf(s,n,i){let r=ti.get(n);if(r&&!s)return i&&!r.includes(Be.merge)?r.concat(Be.merge):r.slice();let o=r;if(!o)if(Array.isArray(s))o=[];else{let l=Array.from(ti.keys()).filter((c)=>c!=="yaml11").map((c)=>JSON.stringify(c)).join(", ");throw Error(`Unknown schema "${n}"; use one of ${l} or define customTags array`)}if(Array.isArray(s))for(let l of s)o=o.concat(l);else if(typeof s==="function")o=s(o.slice());if(i)o=o.concat(Be.merge);return o.reduce((l,c)=>{let f=typeof c==="string"?si[c]:c;if(!f){let u=JSON.stringify(c),h=Object.keys(si).map((g)=>JSON.stringify(g)).join(", ");throw Error(`Unknown custom tag ${u}; use one of ${h}`)}if(!l.includes(f))l.push(f);return l},[])}of.coreKnownTags=nf;of.getTags=rf});var gs=v(function(df){var ms=I(),cf=ye(),ff=ge(),uf=$e(),qt=ci(),hf=(s,n)=>s.key<n.key?-1:s.key>n.key?1:0;class ys{constructor({compat:s,customTags:n,merge:i,resolveKnownTags:r,schema:o,sortMapEntries:l,toStringDefaults:c}){this.compat=Array.isArray(s)?qt.getTags(s,"compat"):s?qt.getTags(null,s):null,this.name=typeof o==="string"&&o||"core",this.knownTags=r?qt.coreKnownTags:{},this.tags=qt.getTags(n,this.name,i),this.toStringOptions=c??null,Object.defineProperty(this,ms.MAP,{value:cf.map}),Object.defineProperty(this,ms.SCALAR,{value:uf.string}),Object.defineProperty(this,ms.SEQ,{value:ff.seq}),this.sortMapEntries=typeof l==="function"?l:l===!0?hf:null}clone(){let s=Object.create(ys.prototype,Object.getOwnPropertyDescriptors(this));return s.tags=this.tags.slice(),s}}df.Schema=ys});var fi=v(function(gf){var mf=I(),bs=Ce(),je=Ee();function yf(s,n){let i=[],r=n.directives===!0;if(n.directives!==!1&&s.directives){let u=s.directives.toString(s);if(u)i.push(u),r=!0;else if(s.directives.docStart)r=!0}if(r)i.push("---");let o=bs.createStringifyContext(s,n),{commentString:l}=o.options;if(s.commentBefore){if(i.length!==1)i.unshift("");let u=l(s.commentBefore);i.unshift(je.indentComment(u,""))}let c=!1,f=null;if(s.contents){if(mf.isNode(s.contents)){if(s.contents.spaceBefore&&r)i.push("");if(s.contents.commentBefore){let g=l(s.contents.commentBefore);i.push(je.indentComment(g,""))}o.forceBlockIndent=!!s.comment,f=s.contents.comment}let u=f?void 0:()=>c=!0,h=bs.stringify(s.contents,o,()=>f=null,u);if(f)h+=je.lineComment(h,"",l(f));if((h[0]==="|"||h[0]===">")&&i[i.length-1]==="---")i[i.length-1]=`--- ${h}`;else i.push(h)}else i.push(bs.stringify(s.contents,o));if(s.directives?.docEnd)if(s.comment){let u=l(s.comment);if(u.includes(`
|
|
55
|
+
`))i.push("..."),i.push(je.indentComment(u,""));else i.push(`... ${u}`)}else i.push("...");else{let u=s.comment;if(u&&c)u=u.replace(/^\n+/,"");if(u){if((!c||f)&&i[i.length-1]!=="")i.push("");i.push(je.indentComment(l(u),""))}}return i.join(`
|
|
56
|
+
`)+`
|
|
57
|
+
`}gf.stringifyDocument=yf});var Ke=v(function(qf){var wf=Oe(),we=tt(),R=I(),Sf=z(),vf=H(),kf=gs(),Nf=fi(),ws=ze(),Af=Bt(),Of=qe(),Ss=Dt();class vs{constructor(s,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,R.NODE_TYPE,{value:R.DOC});let r=null;if(typeof n==="function"||Array.isArray(n))r=n;else if(i===void 0&&n)i=n,n=void 0;let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:l}=o;if(i?._directives){if(this.directives=i._directives.atDocument(),this.directives.yaml.explicit)l=this.directives.yaml.version}else this.directives=new Ss.Directives({version:l});this.setSchema(l,i),this.contents=s===void 0?null:this.createNode(s,r,i)}clone(){let s=Object.create(vs.prototype,{[R.NODE_TYPE]:{value:R.DOC}});if(s.commentBefore=this.commentBefore,s.comment=this.comment,s.errors=this.errors.slice(),s.warnings=this.warnings.slice(),s.options=Object.assign({},this.options),this.directives)s.directives=this.directives.clone();if(s.schema=this.schema.clone(),s.contents=R.isNode(this.contents)?this.contents.clone(s.schema):this.contents,this.range)s.range=this.range.slice();return s}add(s){if(Se(this.contents))this.contents.add(s)}addIn(s,n){if(Se(this.contents))this.contents.addIn(s,n)}createAlias(s,n){if(!s.anchor){let i=ws.anchorNames(this);s.anchor=!n||i.has(n)?ws.findNewAnchor(n||"a",i):n}return new wf.Alias(s.anchor)}createNode(s,n,i){let r=void 0;if(typeof n==="function")s=n.call({"":s},"",s),r=n;else if(Array.isArray(n)){let m=(O)=>typeof O==="number"||O instanceof String||O instanceof Number,w=n.filter(m).map(String);if(w.length>0)n=n.concat(w);r=n}else if(i===void 0&&n)i=n,n=void 0;let{aliasDuplicateObjects:o,anchorPrefix:l,flow:c,keepUndefined:f,onTagObj:u,tag:h}=i??{},{onAnchor:g,setAnchors:d,sourceObjects:p}=ws.createNodeAnchors(this,l||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:f??!1,onAnchor:g,onTagObj:u,replacer:r,schema:this.schema,sourceObjects:p},N=Of.createNode(s,h,S);if(c&&R.isCollection(N))N.flow=!0;return d(),N}createPair(s,n,i={}){let r=this.createNode(s,null,i),o=this.createNode(n,null,i);return new Sf.Pair(r,o)}delete(s){return Se(this.contents)?this.contents.delete(s):!1}deleteIn(s){if(we.isEmptyPath(s)){if(this.contents==null)return!1;return this.contents=null,!0}return Se(this.contents)?this.contents.deleteIn(s):!1}get(s,n){return R.isCollection(this.contents)?this.contents.get(s,n):void 0}getIn(s,n){if(we.isEmptyPath(s))return!n&&R.isScalar(this.contents)?this.contents.value:this.contents;return R.isCollection(this.contents)?this.contents.getIn(s,n):void 0}has(s){return R.isCollection(this.contents)?this.contents.has(s):!1}hasIn(s){if(we.isEmptyPath(s))return this.contents!==void 0;return R.isCollection(this.contents)?this.contents.hasIn(s):!1}set(s,n){if(this.contents==null)this.contents=we.collectionFromPath(this.schema,[s],n);else if(Se(this.contents))this.contents.set(s,n)}setIn(s,n){if(we.isEmptyPath(s))this.contents=n;else if(this.contents==null)this.contents=we.collectionFromPath(this.schema,Array.from(s),n);else if(Se(this.contents))this.contents.setIn(s,n)}setSchema(s,n={}){if(typeof s==="number")s=String(s);let i;switch(s){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Ss.Directives({version:"1.1"});i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=s;else this.directives=new Ss.Directives({version:s});i={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;i=null;break;default:{let r=JSON.stringify(s);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new kf.Schema(Object.assign(i,n));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:s,jsonArg:n,mapAsMap:i,maxAliasCount:r,onAnchor:o,reviver:l}={}){let c={anchors:new Map,doc:this,keep:!s,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},f=vf.toJS(this.contents,n??"",c);if(typeof o==="function")for(let{count:u,res:h}of c.anchors.values())o(h,u);return typeof l==="function"?Af.applyReviver(l,{"":f},"",f):f}toJSON(s,n){return this.toJS({json:!0,jsonArg:s,mapAsMap:!1,onAnchor:n})}toString(s={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in s&&(!Number.isInteger(s.indent)||Number(s.indent)<=0)){let n=JSON.stringify(s.indent);throw Error(`"indent" option must be a positive integer, not ${n}`)}return Nf.stringifyDocument(this,s)}}function Se(s){if(R.isCollection(s))return!0;throw Error("Expected a YAML collection as document contents")}qf.Document=vs});var Re=v(function(Tf){class Et extends Error{constructor(s,n,i,r){super();this.name=s,this.code=i,this.message=r,this.pos=n}}class ui extends Et{constructor(s,n,i){super("YAMLParseError",s,n,i)}}class hi extends Et{constructor(s,n,i){super("YAMLWarning",s,n,i)}}var Lf=(s,n)=>(i)=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map((f)=>n.linePos(f));let{line:r,col:o}=i.linePos[0];i.message+=` at line ${r}, column ${o}`;let l=o-1,c=s.substring(n.lineStarts[r-1],n.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){let f=Math.min(l-39,c.length-79);c="…"+c.substring(f),l-=f-1}if(c.length>80)c=c.substring(0,79)+"…";if(r>1&&/^ *$/.test(c.substring(0,l))){let f=s.substring(n.lineStarts[r-2],n.lineStarts[r-1]);if(f.length>80)f=f.substring(0,79)+`…
|
|
58
|
+
`;c=f+c}if(/[^ ]/.test(c)){let f=1,u=i.linePos[1];if(u&&u.line===r&&u.col>o)f=Math.max(1,Math.min(u.col-o,80-l));let h=" ".repeat(l)+"^".repeat(f);i.message+=`:
|
|
59
|
+
|
|
60
|
+
${c}
|
|
61
|
+
${h}
|
|
62
|
+
`}};Tf.YAMLError=Et;Tf.YAMLParseError=ui;Tf.YAMLWarning=hi;Tf.prettifyError=Lf});var Fe=v(function(Mf){function $f(s,{flow:n,indicator:i,next:r,offset:o,onError:l,parentIndent:c,startOnNewline:f}){let u=!1,h=f,g=f,d="",p="",S=!1,N=!1,m=null,w=null,O=null,q=null,E=null,L=null,C=null;for(let A of s){if(N){if(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma")l(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");N=!1}if(m){if(h&&A.type!=="comment"&&A.type!=="newline")l(m,"TAB_AS_INDENT","Tabs are not allowed as indentation");m=null}switch(A.type){case"space":if(!n&&(i!=="doc-start"||r?.type!=="flow-collection")&&A.source.includes("\t"))m=A;g=!0;break;case"comment":{if(!g)l(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let x=A.source.substring(1)||" ";if(!d)d=x;else d+=p+x;p="",h=!1;break}case"newline":if(h){if(d)d+=A.source;else if(!L||i!=="seq-item-ind")u=!0}else p+=A.source;if(h=!0,S=!0,w||O)q=A;g=!0;break;case"anchor":if(w)l(A,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(A.source.endsWith(":"))l(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);w=A,C??(C=A.offset),h=!1,g=!1,N=!0;break;case"tag":{if(O)l(A,"MULTIPLE_TAGS","A node can have at most one tag");O=A,C??(C=A.offset),h=!1,g=!1,N=!0;break}case i:if(w||O)l(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`);if(L)l(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${n??"collection"}`);L=A,h=i==="seq-item-ind"||i==="explicit-key-ind",g=!1;break;case"comma":if(n){if(E)l(A,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`);E=A,h=!1,g=!1;break}default:l(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),h=!1,g=!1}}let _=s[s.length-1],P=_?_.offset+_.source.length:o;if(N&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!==""))l(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(m&&(h&&m.indent<=c||r?.type==="block-map"||r?.type==="block-seq"))l(m,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:E,found:L,spaceBefore:u,comment:d,hasNewline:S,anchor:w,tag:O,newlineAfterProp:q,end:P,start:C??P}}Mf.resolveProps=$f});var Lt=v(function(Df){function ks(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
63
|
+
`))return!0;if(s.end){for(let n of s.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(let n of s.items){for(let i of n.start)if(i.type==="newline")return!0;if(n.sep){for(let i of n.sep)if(i.type==="newline")return!0}if(ks(n.key)||ks(n.value))return!0}return!1;default:return!0}}Df.containsNewline=ks});var Ns=v(function(Rf){var jf=Lt();function Kf(s,n,i){if(n?.type==="flow-collection"){let r=n.end[0];if(r.indent===s&&(r.source==="]"||r.source==="}")&&jf.containsNewline(n))i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Rf.flowIndentCheck=Kf});var As=v(function(Yf){var di=I();function Uf(s,n,i){let{uniqueKeys:r}=s.options;if(r===!1)return!1;let o=typeof r==="function"?r:(l,c)=>l===c||di.isScalar(l)&&di.isScalar(c)&&l.value===c.value;return n.some((l)=>o(l.key,i))}Yf.mapIncludes=Uf});var bi=v(function(Gf){var pi=z(),Vf=ee(),mi=Fe(),Wf=Lt(),yi=Ns(),Qf=As(),gi="All mapping items must start at the same column";function Hf({composeNode:s,composeEmptyNode:n},i,r,o,l){let f=new(l?.nodeClass??Vf.YAMLMap)(i.schema);if(i.atRoot)i.atRoot=!1;let u=r.offset,h=null;for(let g of r.items){let{start:d,key:p,sep:S,value:N}=g,m=mi.resolveProps(d,{indicator:"explicit-key-ind",next:p??S?.[0],offset:u,onError:o,parentIndent:r.indent,startOnNewline:!0}),w=!m.found;if(w){if(p){if(p.type==="block-seq")o(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in p&&p.indent!==r.indent)o(u,"BAD_INDENT",gi)}if(!m.anchor&&!m.tag&&!S){if(h=m.end,m.comment)if(f.comment)f.comment+=`
|
|
64
|
+
`+m.comment;else f.comment=m.comment;continue}if(m.newlineAfterProp||Wf.containsNewline(p))o(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(m.found?.indent!==r.indent)o(u,"BAD_INDENT",gi);i.atKey=!0;let O=m.end,q=p?s(i,p,m,o):n(i,O,d,null,m,o);if(i.schema.compat)yi.flowIndentCheck(r.indent,p,o);if(i.atKey=!1,Qf.mapIncludes(i,f.items,q))o(O,"DUPLICATE_KEY","Map keys must be unique");let E=mi.resolveProps(S??[],{indicator:"map-value-ind",next:N,offset:q.range[2],onError:o,parentIndent:r.indent,startOnNewline:!p||p.type==="block-scalar"});if(u=E.end,E.found){if(w){if(N?.type==="block-map"&&!E.hasNewline)o(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(i.options.strict&&m.start<E.found.offset-1024)o(q.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let L=N?s(i,N,E,o):n(i,u,S,null,E,o);if(i.schema.compat)yi.flowIndentCheck(r.indent,N,o);u=L.range[2];let C=new pi.Pair(q,L);if(i.options.keepSourceTokens)C.srcToken=g;f.items.push(C)}else{if(w)o(q.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(E.comment)if(q.comment)q.comment+=`
|
|
65
|
+
`+E.comment;else q.comment=E.comment;let L=new pi.Pair(q);if(i.options.keepSourceTokens)L.srcToken=g;f.items.push(L)}}if(h&&h<u)o(h,"IMPOSSIBLE","Map comment with trailing content");return f.range=[r.offset,u,h??u],f}Gf.resolveBlockMap=Hf});var wi=v(function(su){var zf=te(),Zf=Fe(),eu=Ns();function tu({composeNode:s,composeEmptyNode:n},i,r,o,l){let f=new(l?.nodeClass??zf.YAMLSeq)(i.schema);if(i.atRoot)i.atRoot=!1;if(i.atKey)i.atKey=!1;let u=r.offset,h=null;for(let{start:g,value:d}of r.items){let p=Zf.resolveProps(g,{indicator:"seq-item-ind",next:d,offset:u,onError:o,parentIndent:r.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)if(d&&d.type==="block-seq")o(p.end,"BAD_INDENT","All sequence items must start at the same column");else o(u,"MISSING_CHAR","Sequence item without - indicator");else{if(h=p.end,p.comment)f.comment=p.comment;continue}let S=d?s(i,d,p,o):n(i,p.end,g,null,p,o);if(i.schema.compat)eu.flowIndentCheck(r.indent,d,o);u=S.range[2],f.items.push(S)}return f.range=[r.offset,u,h??u],f}su.resolveBlockSeq=tu});var ve=v(function(ru){function iu(s,n,i,r){let o="";if(s){let l=!1,c="";for(let f of s){let{source:u,type:h}=f;switch(h){case"space":l=!0;break;case"comment":{if(i&&!l)r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let g=u.substring(1)||" ";if(!o)o=g;else o+=c+g;c="";break}case"newline":if(o)c+=u;l=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}n+=u.length}}return{comment:o,offset:n}}ru.resolveEnd=iu});var ki=v(function(pu){var au=I(),lu=z(),Si=ee(),cu=te(),fu=ve(),vi=Fe(),uu=Lt(),hu=As(),Os="Block collections are not allowed within flow collections",qs=(s)=>s&&(s.type==="block-map"||s.type==="block-seq");function du({composeNode:s,composeEmptyNode:n},i,r,o,l){let c=r.start.source==="{",f=c?"flow map":"flow sequence",h=new(l?.nodeClass??(c?Si.YAMLMap:cu.YAMLSeq))(i.schema);h.flow=!0;let g=i.atRoot;if(g)i.atRoot=!1;if(i.atKey)i.atKey=!1;let d=r.offset+r.start.source.length;for(let w=0;w<r.items.length;++w){let O=r.items[w],{start:q,key:E,sep:L,value:C}=O,_=vi.resolveProps(q,{flow:f,indicator:"explicit-key-ind",next:E??L?.[0],offset:d,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!_.found){if(!_.anchor&&!_.tag&&!L&&!C){if(w===0&&_.comma)o(_.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(w<r.items.length-1)o(_.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`);if(_.comment)if(h.comment)h.comment+=`
|
|
66
|
+
`+_.comment;else h.comment=_.comment;d=_.end;continue}if(!c&&i.options.strict&&uu.containsNewline(E))o(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(w===0){if(_.comma)o(_.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`)}else{if(!_.comma)o(_.start,"MISSING_CHAR",`Missing , between ${f} items`);if(_.comment){let P="";e:for(let A of q)switch(A.type){case"comma":case"space":break;case"comment":P=A.source.substring(1);break e;default:break e}if(P){let A=h.items[h.items.length-1];if(au.isPair(A))A=A.value??A.key;if(A.comment)A.comment+=`
|
|
67
|
+
`+P;else A.comment=P;_.comment=_.comment.substring(P.length+1)}}}if(!c&&!L&&!_.found){let P=C?s(i,C,_,o):n(i,_.end,L,null,_,o);if(h.items.push(P),d=P.range[2],qs(C))o(P.range,"BLOCK_IN_FLOW",Os)}else{i.atKey=!0;let P=_.end,A=E?s(i,E,_,o):n(i,P,q,null,_,o);if(qs(E))o(A.range,"BLOCK_IN_FLOW",Os);i.atKey=!1;let x=vi.resolveProps(L??[],{flow:f,indicator:"map-value-ind",next:C,offset:A.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(x.found){if(!c&&!_.found&&i.options.strict){if(L)for(let D of L){if(D===x.found)break;if(D.type==="newline"){o(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(_.start<x.found.offset-1024)o(x.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(C)if("source"in C&&C.source&&C.source[0]===":")o(C,"MISSING_CHAR",`Missing space after : in ${f}`);else o(x.start,"MISSING_CHAR",`Missing , or : between ${f} items`);let Q=C?s(i,C,x,o):x.found?n(i,x.end,L,null,x,o):null;if(Q){if(qs(C))o(Q.range,"BLOCK_IN_FLOW",Os)}else if(x.comment)if(A.comment)A.comment+=`
|
|
68
|
+
`+x.comment;else A.comment=x.comment;let ue=new lu.Pair(A,Q);if(i.options.keepSourceTokens)ue.srcToken=O;if(c){let D=h;if(hu.mapIncludes(i,D.items,A))o(P,"DUPLICATE_KEY","Map keys must be unique");D.items.push(ue)}else{let D=new Si.YAMLMap(i.schema);D.flow=!0,D.items.push(ue);let Ws=(Q??A).range;D.range=[A.range[0],Ws[1],Ws[2]],h.items.push(D)}d=Q?Q.range[2]:x.end}}let p=c?"}":"]",[S,...N]=r.end,m=d;if(S&&S.source===p)m=S.offset+S.source.length;else{let w=f[0].toUpperCase()+f.substring(1),O=g?`${w} must end with a ${p}`:`${w} in block collection must be sufficiently indented and end with a ${p}`;if(o(d,g?"MISSING_CHAR":"BAD_INDENT",O),S&&S.source.length!==1)N.unshift(S)}if(N.length>0){let w=fu.resolveEnd(N,m,i.options.strict,o);if(w.comment)if(h.comment)h.comment+=`
|
|
69
|
+
`+w.comment;else h.comment=w.comment;h.range=[r.offset,m,w.offset]}else h.range=[r.offset,m,m];return h}pu.resolveFlowCollection=du});var Ni=v(function(Au){var yu=I(),gu=M(),bu=ee(),wu=te(),Su=bi(),vu=wi(),ku=ki();function Es(s,n,i,r,o,l){let c=i.type==="block-map"?Su.resolveBlockMap(s,n,i,r,l):i.type==="block-seq"?vu.resolveBlockSeq(s,n,i,r,l):ku.resolveFlowCollection(s,n,i,r,l),f=c.constructor;if(o==="!"||o===f.tagName)return c.tag=f.tagName,c;if(o)c.tag=o;return c}function Nu(s,n,i,r,o){let l=r.tag,c=!l?null:n.directives.tagName(l.source,(p)=>o(l,"TAG_RESOLVE_FAILED",p));if(i.type==="block-seq"){let{anchor:p,newlineAfterProp:S}=r,N=p&&l?p.offset>l.offset?p:l:p??l;if(N&&(!S||S.offset<N.offset))o(N,"MISSING_CHAR","Missing newline after block sequence props")}let f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===bu.YAMLMap.tagName&&f==="map"||c===wu.YAMLSeq.tagName&&f==="seq")return Es(s,n,i,o,c);let u=n.schema.tags.find((p)=>p.tag===c&&p.collection===f);if(!u){let p=n.schema.knownTags[c];if(p&&p.collection===f)n.schema.tags.push(Object.assign({},p,{default:!1})),u=p;else{if(p)o(l,"BAD_COLLECTION_TYPE",`${p.tag} used for ${f} collection, but expects ${p.collection??"scalar"}`,!0);else o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0);return Es(s,n,i,o,c)}}let h=Es(s,n,i,o,c,u),g=u.resolve?.(h,(p)=>o(l,"TAG_RESOLVE_FAILED",p),n.options)??h,d=yu.isNode(g)?g:new gu.Scalar(g);if(d.range=h.range,d.tag=c,u?.format)d.format=u.format;return d}Au.composeCollection=Nu});var Ts=v(function(Tu){var Ls=M();function qu(s,n,i){let r=n.offset,o=Eu(n,s.options.strict,i);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};let l=o.mode===">"?Ls.Scalar.BLOCK_FOLDED:Ls.Scalar.BLOCK_LITERAL,c=n.source?Lu(n.source):[],f=c.length;for(let m=c.length-1;m>=0;--m){let w=c[m][1];if(w===""||w==="\r")f=m;else break}if(f===0){let m=o.chomp==="+"&&c.length>0?`
|
|
70
|
+
`.repeat(Math.max(1,c.length-1)):"",w=r+o.length;if(n.source)w+=n.source.length;return{value:m,type:l,comment:o.comment,range:[r,w,w]}}let u=n.indent+o.indent,h=n.offset+o.length,g=0;for(let m=0;m<f;++m){let[w,O]=c[m];if(O===""||O==="\r"){if(o.indent===0&&w.length>u)u=w.length}else{if(w.length<u)i(h+w.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(o.indent===0)u=w.length;if(g=m,u===0&&!s.atRoot)i(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=w.length+O.length+1}for(let m=c.length-1;m>=f;--m)if(c[m][0].length>u)f=m+1;let d="",p="",S=!1;for(let m=0;m<g;++m)d+=c[m][0].slice(u)+`
|
|
71
|
+
`;for(let m=g;m<f;++m){let[w,O]=c[m];h+=w.length+O.length+1;let q=O[O.length-1]==="\r";if(q)O=O.slice(0,-1);if(O&&w.length<u){let L=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;i(h-O.length-(q?2:1),"BAD_INDENT",L),w=""}if(l===Ls.Scalar.BLOCK_LITERAL)d+=p+w.slice(u)+O,p=`
|
|
72
|
+
`;else if(w.length>u||O[0]==="\t"){if(p===" ")p=`
|
|
73
|
+
`;else if(!S&&p===`
|
|
74
|
+
`)p=`
|
|
75
|
+
|
|
76
|
+
`;d+=p+w.slice(u)+O,p=`
|
|
77
|
+
`,S=!0}else if(O==="")if(p===`
|
|
78
|
+
`)d+=`
|
|
79
|
+
`;else p=`
|
|
80
|
+
`;else d+=p+O,p=" ",S=!1}switch(o.chomp){case"-":break;case"+":for(let m=f;m<c.length;++m)d+=`
|
|
81
|
+
`+c[m][0].slice(u);if(d[d.length-1]!==`
|
|
82
|
+
`)d+=`
|
|
83
|
+
`;break;default:d+=`
|
|
84
|
+
`}let N=r+o.length+n.source.length;return{value:d,type:l,comment:o.comment,range:[r,N,N]}}function Eu({offset:s,props:n},i,r){if(n[0].type!=="block-scalar-header")return r(n[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:o}=n[0],l=o[0],c=0,f="",u=-1;for(let p=1;p<o.length;++p){let S=o[p];if(!f&&(S==="-"||S==="+"))f=S;else{let N=Number(S);if(!c&&N)c=N;else if(u===-1)u=s+p}}if(u!==-1)r(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let h=!1,g="",d=o.length;for(let p=1;p<n.length;++p){let S=n[p];switch(S.type){case"space":h=!0;case"newline":d+=S.source.length;break;case"comment":if(i&&!h)r(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");d+=S.source.length,g=S.source.substring(1);break;case"error":r(S,"UNEXPECTED_TOKEN",S.message),d+=S.source.length;break;default:{let N=`Unexpected token in block scalar header: ${S.type}`;r(S,"UNEXPECTED_TOKEN",N);let m=S.source;if(m&&typeof m==="string")d+=m.length}}}return{mode:l,indent:c,chomp:f,comment:g,length:d}}function Lu(s){let n=s.split(/\n( *)/),i=n[0],r=i.match(/^( *)/),l=[r?.[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let c=1;c<n.length;c+=2)l.push([n[c],n[c+1]]);return l}Tu.resolveBlockScalar=qu});var _s=v(function(ju){var Cs=M(),_u=ve();function Iu(s,n,i){let{offset:r,type:o,source:l,end:c}=s,f,u,h=(p,S,N)=>i(r+p,S,N);switch(o){case"scalar":f=Cs.Scalar.PLAIN,u=Pu(l,h);break;case"single-quoted-scalar":f=Cs.Scalar.QUOTE_SINGLE,u=$u(l,h);break;case"double-quoted-scalar":f=Cs.Scalar.QUOTE_DOUBLE,u=Mu(l,h);break;default:return i(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}let g=r+l.length,d=_u.resolveEnd(c,g,n,i);return{value:u,type:f,comment:d.comment,range:[r,g,d.offset]}}function Pu(s,n){let i="";switch(s[0]){case"\t":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${s[0]}`;break}case"@":case"`":{i=`reserved character ${s[0]}`;break}}if(i)n(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`);return Ai(s)}function $u(s,n){if(s[s.length-1]!=="'"||s.length===1)n(s.length,"MISSING_CHAR","Missing closing 'quote");return Ai(s.slice(1,-1)).replace(/''/g,"'")}function Ai(s){let n,i;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
85
|
+
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
86
|
+
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=n.exec(s);if(!r)return s;let o=r[1],l=" ",c=n.lastIndex;i.lastIndex=c;while(r=i.exec(s)){if(r[1]==="")if(l===`
|
|
87
|
+
`)o+=l;else l=`
|
|
88
|
+
`;else o+=l+r[1],l=" ";c=i.lastIndex}let f=/[ \t]*(.*)/sy;return f.lastIndex=c,r=f.exec(s),o+l+(r?.[1]??"")}function Mu(s,n){let i="";for(let r=1;r<s.length-1;++r){let o=s[r];if(o==="\r"&&s[r+1]===`
|
|
89
|
+
`)continue;if(o===`
|
|
90
|
+
`){let{fold:l,offset:c}=xu(s,r);i+=l,r=c}else if(o==="\\"){let l=s[++r],c=Du[l];if(c)i+=c;else if(l===`
|
|
91
|
+
`){l=s[r+1];while(l===" "||l==="\t")l=s[++r+1]}else if(l==="\r"&&s[r+1]===`
|
|
92
|
+
`){l=s[++r+1];while(l===" "||l==="\t")l=s[++r+1]}else if(l==="x"||l==="u"||l==="U"){let f={x:2,u:4,U:8}[l];i+=Bu(s,r+1,f,n),r+=f}else{let f=s.substr(r-1,2);n(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(o===" "||o==="\t"){let l=r,c=s[r+1];while(c===" "||c==="\t")c=s[++r+1];if(c!==`
|
|
93
|
+
`&&!(c==="\r"&&s[r+2]===`
|
|
94
|
+
`))i+=r>l?s.slice(l,r+1):o}else i+=o}if(s[s.length-1]!=='"'||s.length===1)n(s.length,"MISSING_CHAR",'Missing closing "quote');return i}function xu(s,n){let i="",r=s[n+1];while(r===" "||r==="\t"||r===`
|
|
95
|
+
`||r==="\r"){if(r==="\r"&&s[n+2]!==`
|
|
96
|
+
`)break;if(r===`
|
|
97
|
+
`)i+=`
|
|
98
|
+
`;n+=1,r=s[n+1]}if(!i)i=" ";return{fold:i,offset:n}}var Du={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
99
|
+
`,r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Bu(s,n,i,r){let o=s.substr(n,i),c=o.length===i&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){let f=s.substr(n-2,i+2);return r(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}ju.resolveFlowScalar=Iu});var qi=v(function(Vu){var ce=I(),Oi=M(),Ru=Ts(),Fu=_s();function Uu(s,n,i,r){let{value:o,type:l,comment:c,range:f}=n.type==="block-scalar"?Ru.resolveBlockScalar(s,n,r):Fu.resolveFlowScalar(n,s.options.strict,r),u=i?s.directives.tagName(i.source,(d)=>r(i,"TAG_RESOLVE_FAILED",d)):null,h;if(s.options.stringKeys&&s.atKey)h=s.schema[ce.SCALAR];else if(u)h=Yu(s.schema,o,u,i,r);else if(n.type==="scalar")h=Ju(s,o,n,r);else h=s.schema[ce.SCALAR];let g;try{let d=h.resolve(o,(p)=>r(i??n,"TAG_RESOLVE_FAILED",p),s.options);g=ce.isScalar(d)?d:new Oi.Scalar(d)}catch(d){let p=d instanceof Error?d.message:String(d);r(i??n,"TAG_RESOLVE_FAILED",p),g=new Oi.Scalar(o)}if(g.range=f,g.source=o,l)g.type=l;if(u)g.tag=u;if(h.format)g.format=h.format;if(c)g.comment=c;return g}function Yu(s,n,i,r,o){if(i==="!")return s[ce.SCALAR];let l=[];for(let f of s.tags)if(!f.collection&&f.tag===i)if(f.default&&f.test)l.push(f);else return f;for(let f of l)if(f.test?.test(n))return f;let c=s.knownTags[i];if(c&&!c.collection)return s.tags.push(Object.assign({},c,{default:!1,test:void 0})),c;return o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),s[ce.SCALAR]}function Ju({atKey:s,directives:n,schema:i},r,o,l){let c=i.tags.find((f)=>(f.default===!0||s&&f.default==="key")&&f.test?.test(r))||i[ce.SCALAR];if(i.compat){let f=i.compat.find((u)=>u.default&&u.test?.test(r))??i[ce.SCALAR];if(c.tag!==f.tag){let u=n.tagString(c.tag),h=n.tagString(f.tag),g=`Value may be parsed as either ${u} or ${h}`;l(o,"TAG_RESOLVE_FAILED",g,!0)}}return c}Vu.composeScalar=Uu});var Ei=v(function(Hu){function Qu(s,n,i){if(n){i??(i=n.length);for(let r=i-1;r>=0;--r){let o=n[r];switch(o.type){case"space":case"comment":case"newline":s-=o.source.length;continue}o=n[++r];while(o?.type==="space")s+=o.source.length,o=n[++r];break}}return s}Hu.emptyScalarPosition=Qu});var Ci=v(function(ih){var Xu=Oe(),zu=I(),Zu=Ni(),Li=qi(),eh=ve(),th=Ei(),sh={composeNode:Ti,composeEmptyNode:Is};function Ti(s,n,i,r){let o=s.atKey,{spaceBefore:l,comment:c,anchor:f,tag:u}=i,h,g=!0;switch(n.type){case"alias":if(h=nh(s,n,r),f||u)r(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(h=Li.composeScalar(s,n,u,r),f)h.anchor=f.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(h=Zu.composeCollection(sh,s,n,i,r),f)h.anchor=f.source.substring(1);break;default:{let d=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;r(n,"UNEXPECTED_TOKEN",d),h=Is(s,n.offset,void 0,null,i,r),g=!1}}if(f&&h.anchor==="")r(f,"BAD_ALIAS","Anchor cannot be an empty string");if(o&&s.options.stringKeys&&(!zu.isScalar(h)||typeof h.value!=="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str"))r(u??n,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(l)h.spaceBefore=!0;if(c)if(n.type==="scalar"&&n.source==="")h.comment=c;else h.commentBefore=c;if(s.options.keepSourceTokens&&g)h.srcToken=n;return h}function Is(s,n,i,r,{spaceBefore:o,comment:l,anchor:c,tag:f,end:u},h){let g={type:"scalar",offset:th.emptyScalarPosition(n,i,r),indent:-1,source:""},d=Li.composeScalar(s,g,f,h);if(c){if(d.anchor=c.source.substring(1),d.anchor==="")h(c,"BAD_ALIAS","Anchor cannot be an empty string")}if(o)d.spaceBefore=!0;if(l)d.comment=l,d.range[2]=u;return d}function nh({options:s},{offset:n,source:i,end:r},o){let l=new Xu.Alias(i.substring(1));if(l.source==="")o(n,"BAD_ALIAS","Alias cannot be an empty string");if(l.source.endsWith(":"))o(n+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let c=n+i.length,f=eh.resolveEnd(r,c,s.strict,o);if(l.range=[n,c,f.offset],f.comment)l.comment=f.comment;return l}ih.composeEmptyNode=Is;ih.composeNode=Ti});var Ii=v(function(uh){var ah=Ke(),_i=Ci(),lh=ve(),ch=Fe();function fh(s,n,{offset:i,start:r,value:o,end:l},c){let f=Object.assign({_directives:n},s),u=new ah.Document(void 0,f),h={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},g=ch.resolveProps(r,{indicator:"doc-start",next:o??l?.[0],offset:i,onError:c,parentIndent:0,startOnNewline:!0});if(g.found){if(u.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!g.hasNewline)c(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}u.contents=o?_i.composeNode(h,o,g,c):_i.composeEmptyNode(h,g.end,r,null,g,c);let d=u.contents.range[2],p=lh.resolveEnd(l,d,!1,c);if(p.comment)u.comment=p.comment;return u.range=[i,d,p.offset],u}uh.composeDoc=fh});var Ps=v(function(bh){var dh=We("process"),ph=Dt(),mh=Ke(),Ue=Re(),Pi=I(),yh=Ii(),gh=ve();function Ye(s){if(typeof s==="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:n,source:i}=s;return[n,n+(typeof i==="string"?i.length:1)]}function $i(s){let n="",i=!1,r=!1;for(let o=0;o<s.length;++o){let l=s[o];switch(l[0]){case"#":n+=(n===""?"":r?`
|
|
100
|
+
|
|
101
|
+
`:`
|
|
102
|
+
`)+(l.substring(1)||" "),i=!0,r=!1;break;case"%":if(s[o+1]?.[0]!=="#")o+=1;i=!1;break;default:if(!i)r=!0;i=!1}}return{comment:n,afterEmptyLine:r}}class Mi{constructor(s={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,i,r,o)=>{let l=Ye(n);if(o)this.warnings.push(new Ue.YAMLWarning(l,i,r));else this.errors.push(new Ue.YAMLParseError(l,i,r))},this.directives=new ph.Directives({version:s.version||"1.2"}),this.options=s}decorate(s,n){let{comment:i,afterEmptyLine:r}=$i(this.prelude);if(i){let o=s.contents;if(n)s.comment=s.comment?`${s.comment}
|
|
103
|
+
${i}`:i;else if(r||s.directives.docStart||!o)s.commentBefore=i;else if(Pi.isCollection(o)&&!o.flow&&o.items.length>0){let l=o.items[0];if(Pi.isPair(l))l=l.key;let c=l.commentBefore;l.commentBefore=c?`${i}
|
|
104
|
+
${c}`:i}else{let l=o.commentBefore;o.commentBefore=l?`${i}
|
|
105
|
+
${l}`:i}}if(n)Array.prototype.push.apply(s.errors,this.errors),Array.prototype.push.apply(s.warnings,this.warnings);else s.errors=this.errors,s.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:$i(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(s,n=!1,i=-1){for(let r of s)yield*this.next(r);yield*this.end(n,i)}*next(s){if(dh.env.LOG_STREAM)console.dir(s,{depth:null});switch(s.type){case"directive":this.directives.add(s.source,(n,i,r)=>{let o=Ye(s);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",i,r)}),this.prelude.push(s.source),this.atDirectives=!0;break;case"document":{let n=yh.composeDoc(this.options,this.directives,s,this.onError);if(this.atDirectives&&!n.directives.docStart)this.onError(s,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(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(s.source);break;case"error":{let n=s.source?`${s.message}: ${JSON.stringify(s.source)}`:s.message,i=new Ue.YAMLParseError(Ye(s),"UNEXPECTED_TOKEN",n);if(this.atDirectives||!this.doc)this.errors.push(i);else this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){this.errors.push(new Ue.YAMLParseError(Ye(s),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let n=gh.resolveEnd(s.end,s.offset+s.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
106
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ue.YAMLParseError(Ye(s),"UNEXPECTED_TOKEN",`Unsupported token ${s.type}`))}}*end(s=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(s){let i=Object.assign({_directives:this.directives},this.options),r=new mh.Document(void 0,i);if(this.atDirectives)this.onError(n,"MISSING_CHAR","Missing directives-end indicator line");r.range=[0,n,n],this.decorate(r,!1),yield r}}}bh.Composer=Mi});var Bi=v(function(Eh){var Sh=Ts(),vh=_s(),kh=Re(),xi=Te();function Nh(s,n=!0,i){if(s){let r=(o,l,c)=>{let f=typeof o==="number"?o:Array.isArray(o)?o[0]:o.offset;if(i)i(f,l,c);else throw new kh.YAMLParseError([f,f+1],l,c)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return vh.resolveFlowScalar(s,n,r);case"block-scalar":return Sh.resolveBlockScalar({options:{strict:n}},s,r)}}return null}function Ah(s,n){let{implicitKey:i=!1,indent:r,inFlow:o=!1,offset:l=-1,type:c="PLAIN"}=n,f=xi.stringifyString({type:c,value:s},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),u=n.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
107
|
+
`}];switch(f[0]){case"|":case">":{let h=f.indexOf(`
|
|
108
|
+
`),g=f.substring(0,h),d=f.substring(h+1)+`
|
|
109
|
+
`,p=[{type:"block-scalar-header",offset:l,indent:r,source:g}];if(!Di(p,u))p.push({type:"newline",offset:-1,indent:r,source:`
|
|
110
|
+
`});return{type:"block-scalar",offset:l,indent:r,props:p,source:d}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:f,end:u};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:f,end:u};default:return{type:"scalar",offset:l,indent:r,source:f,end:u}}}function Oh(s,n,i={}){let{afterKey:r=!1,implicitKey:o=!1,inFlow:l=!1,type:c}=i,f="indent"in s?s.indent:null;if(r&&typeof f==="number")f+=2;if(!c)switch(s.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let h=s.props[0];if(h.type!=="block-scalar-header")throw Error("Invalid block scalar header");c=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let u=xi.stringifyString({type:c,value:n},{implicitKey:o||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(u[0]){case"|":case">":qh(s,u);break;case'"':$s(s,u,"double-quoted-scalar");break;case"'":$s(s,u,"single-quoted-scalar");break;default:$s(s,u,"scalar")}}function qh(s,n){let i=n.indexOf(`
|
|
111
|
+
`),r=n.substring(0,i),o=n.substring(i+1)+`
|
|
112
|
+
`;if(s.type==="block-scalar"){let l=s.props[0];if(l.type!=="block-scalar-header")throw Error("Invalid block scalar header");l.source=r,s.source=o}else{let{offset:l}=s,c="indent"in s?s.indent:-1,f=[{type:"block-scalar-header",offset:l,indent:c,source:r}];if(!Di(f,"end"in s?s.end:void 0))f.push({type:"newline",offset:-1,indent:c,source:`
|
|
113
|
+
`});for(let u of Object.keys(s))if(u!=="type"&&u!=="offset")delete s[u];Object.assign(s,{type:"block-scalar",indent:c,props:f,source:o})}}function Di(s,n){if(n)for(let i of n)switch(i.type){case"space":case"comment":s.push(i);break;case"newline":return s.push(i),!0}return!1}function $s(s,n,i){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=i,s.source=n;break;case"block-scalar":{let r=s.props.slice(1),o=n.length;if(s.props[0].type==="block-scalar-header")o-=s.props[0].source.length;for(let l of r)l.offset+=o;delete s.props,Object.assign(s,{type:i,source:n,end:r});break}case"block-map":case"block-seq":{let o={type:"newline",offset:s.offset+n.length,indent:s.indent,source:`
|
|
114
|
+
`};delete s.items,Object.assign(s,{type:i,source:n,end:[o]});break}default:{let r="indent"in s?s.indent:-1,o="end"in s&&Array.isArray(s.end)?s.end.filter((l)=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(let l of Object.keys(s))if(l!=="type"&&l!=="offset")delete s[l];Object.assign(s,{type:i,indent:r,source:n,end:o})}}}Eh.createScalarToken=Ah;Eh.resolveAsScalar=Nh;Eh.setScalarValue=Oh});var ji=v(function(Ih){var _h=(s)=>("type"in s)?Ct(s):Tt(s);function Ct(s){switch(s.type){case"block-scalar":{let n="";for(let i of s.props)n+=Ct(i);return n+s.source}case"block-map":case"block-seq":{let n="";for(let i of s.items)n+=Tt(i);return n}case"flow-collection":{let n=s.start.source;for(let i of s.items)n+=Tt(i);for(let i of s.end)n+=i.source;return n}case"document":{let n=Tt(s);if(s.end)for(let i of s.end)n+=i.source;return n}default:{let n=s.source;if("end"in s&&s.end)for(let i of s.end)n+=i.source;return n}}}function Tt({start:s,key:n,sep:i,value:r}){let o="";for(let l of s)o+=l.source;if(n)o+=Ct(n);if(i)for(let l of i)o+=l.source;if(r)o+=Ct(r);return o}Ih.stringify=_h});var Fi=v(function(Mh){var Ms=Symbol("break visit"),$h=Symbol("skip children"),Ki=Symbol("remove item");function fe(s,n){if("type"in s&&s.type==="document")s={start:s.start,value:s.value};Ri(Object.freeze([]),s,n)}fe.BREAK=Ms;fe.SKIP=$h;fe.REMOVE=Ki;fe.itemAtPath=(s,n)=>{let i=s;for(let[r,o]of n){let l=i?.[r];if(l&&"items"in l)i=l.items[o];else return}return i};fe.parentCollection=(s,n)=>{let i=fe.itemAtPath(s,n.slice(0,-1)),r=n[n.length-1][0],o=i?.[r];if(o&&"items"in o)return o;throw Error("Parent collection not found")};function Ri(s,n,i){let r=i(n,s);if(typeof r==="symbol")return r;for(let o of["key","value"]){let l=n[o];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){let f=Ri(Object.freeze(s.concat([[o,c]])),l.items[c],i);if(typeof f==="number")c=f-1;else if(f===Ms)return Ms;else if(f===Ki)l.items.splice(c,1),c-=1}if(typeof r==="function"&&o==="key")r=r(n,s)}}return typeof r==="function"?r(n,s):r}Mh.visit=fe});var _t=v(function(Uh){var xs=Bi(),Dh=ji(),Bh=Fi(),Ds="\uFEFF",Bs="\x02",js="\x18",Ks="\x1F",jh=(s)=>!!s&&("items"in s),Kh=(s)=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Rh(s){switch(s){case Ds:return"<BOM>";case Bs:return"<DOC>";case js:return"<FLOW_END>";case Ks:return"<SCALAR>";default:return JSON.stringify(s)}}function Fh(s){switch(s){case Ds:return"byte-order-mark";case Bs:return"doc-mode";case js:return"flow-error-end";case Ks:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
115
|
+
`:case`\r
|
|
116
|
+
`: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(s[0]){case" ":case"\t":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}Uh.createScalarToken=xs.createScalarToken;Uh.resolveAsScalar=xs.resolveAsScalar;Uh.setScalarValue=xs.setScalarValue;Uh.stringify=Dh.stringify;Uh.visit=Bh.visit;Uh.BOM=Ds;Uh.DOCUMENT=Bs;Uh.FLOW_END=js;Uh.SCALAR=Ks;Uh.isCollection=jh;Uh.isScalar=Kh;Uh.prettyToken=Rh;Uh.tokenType=Fh});var Fs=v(function(rd){var Je=_t();function U(s){switch(s){case void 0:case" ":case`
|
|
117
|
+
`:case"\r":case"\t":return!0;default:return!1}}var Ui=new Set("0123456789ABCDEFabcdef"),nd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),It=new Set(",[]{}"),id=new Set(` ,[]{}
|
|
118
|
+
\r `),Rs=(s)=>!s||id.has(s);class Yi{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(s,n=!1){if(s){if(typeof s!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+s:s,this.lineEndPos=null}this.atEnd=!n;let i=this.next??"stream";while(i&&(n||this.hasChars(1)))i=yield*this.parseNext(i)}atLineEnd(){let s=this.pos,n=this.buffer[s];while(n===" "||n==="\t")n=this.buffer[++s];if(!n||n==="#"||n===`
|
|
119
|
+
`)return!0;if(n==="\r")return this.buffer[s+1]===`
|
|
120
|
+
`;return!1}charAt(s){return this.buffer[this.pos+s]}continueScalar(s){let n=this.buffer[s];if(this.indentNext>0){let i=0;while(n===" ")n=this.buffer[++i+s];if(n==="\r"){let r=this.buffer[i+s+1];if(r===`
|
|
121
|
+
`||!r&&!this.atEnd)return s+i+1}return n===`
|
|
122
|
+
`||i>=this.indentNext||!n&&!this.atEnd?s+i:-1}if(n==="-"||n==="."){let i=this.buffer.substr(s,3);if((i==="---"||i==="...")&&U(this.buffer[s+3]))return-1}return s}getLine(){let s=this.lineEndPos;if(typeof s!=="number"||s!==-1&&s<this.pos)s=this.buffer.indexOf(`
|
|
123
|
+
`,this.pos),this.lineEndPos=s;if(s===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[s-1]==="\r")s-=1;return this.buffer.substring(this.pos,s)}hasChars(s){return this.pos+s<=this.buffer.length}setNext(s){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=s,null}peek(s){return this.buffer.substr(this.pos,s)}*parseNext(s){switch(s){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 s=this.getLine();if(s===null)return this.setNext("stream");if(s[0]===Je.BOM)yield*this.pushCount(1),s=s.substring(1);if(s[0]==="%"){let n=s.length,i=s.indexOf("#");while(i!==-1){let o=s[i-1];if(o===" "||o==="\t"){n=i-1;break}else i=s.indexOf("#",i+1)}while(!0){let o=s[n-1];if(o===" "||o==="\t")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(s.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(s.length-n),yield*this.pushNewline(),"stream"}return yield Je.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let s=this.charAt(0);if(!s&&!this.atEnd)return this.setNext("line-start");if(s==="-"||s==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&U(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!U(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[s,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((s==="-"||s==="?"||s===":")&&U(n)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let s=this.getLine();if(s===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(s[n]){case"#":yield*this.pushCount(s.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(Rs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(s.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let s,n,i=-1;do{if(s=yield*this.pushNewline(),s>0)n=yield*this.pushSpaces(!1),this.indentValue=i=n;else n=0;n+=yield*this.pushSpaces(!0)}while(s+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if(i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&U(r[3])){if(!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Je.FLOW_END,yield*this.parseLineStart()}let o=0;while(r[o]===",")o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),r[o]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-o),"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(Rs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let l=this.charAt(1);if(this.flowKey||U(l)||l===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let s=this.charAt(0),n=this.buffer.indexOf(s,this.pos+1);if(s==="'")while(n!==-1&&this.buffer[n+1]==="'")n=this.buffer.indexOf("'",n+2);else while(n!==-1){let o=0;while(this.buffer[n-1-o]==="\\")o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}let i=this.buffer.substring(0,n),r=i.indexOf(`
|
|
124
|
+
`,this.pos);if(r!==-1){while(r!==-1){let o=this.continueScalar(r+1);if(o===-1)break;r=i.indexOf(`
|
|
125
|
+
`,o)}if(r!==-1)n=r-(i[r-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 s=this.pos;while(!0){let n=this.buffer[++s];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)=>U(n)||n==="#")}*parseBlockScalar(){let s=this.pos-1,n=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":n+=1;break;case`
|
|
126
|
+
`:s=o,n=0;break;case"\r":{let l=this.buffer[o+1];if(!l&&!this.atEnd)return this.setNext("block-scalar");if(l===`
|
|
127
|
+
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=n;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(s+1);if(o===-1)break;s=this.buffer.indexOf(`
|
|
128
|
+
`,o)}while(s!==-1);if(s===-1){if(!this.atEnd)return this.setNext("block-scalar");s=this.buffer.length}}let r=s+1;i=this.buffer[r];while(i===" ")i=this.buffer[++r];if(i==="\t"){while(i==="\t"||i===" "||i==="\r"||i===`
|
|
129
|
+
`)i=this.buffer[++r];s=r-1}else if(!this.blockScalarKeep)do{let o=s-1,l=this.buffer[o];if(l==="\r")l=this.buffer[--o];let c=o;while(l===" ")l=this.buffer[--o];if(l===`
|
|
130
|
+
`&&o>=this.pos&&o+1+n>c)s=o;else break}while(!0);return yield Je.SCALAR,yield*this.pushToIndex(s+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let s=this.flowLevel>0,n=this.pos-1,i=this.pos-1,r;while(r=this.buffer[++i])if(r===":"){let o=this.buffer[i+1];if(U(o)||s&&It.has(o))break;n=i}else if(U(r)){let o=this.buffer[i+1];if(r==="\r")if(o===`
|
|
131
|
+
`)i+=1,r=`
|
|
132
|
+
`,o=this.buffer[i+1];else n=i;if(o==="#"||s&&It.has(o))break;if(r===`
|
|
133
|
+
`){let l=this.continueScalar(i+1);if(l===-1)break;i=Math.max(i,l-2)}}else{if(s&&It.has(r))break;n=i}if(!r&&!this.atEnd)return this.setNext("plain-scalar");return yield Je.SCALAR,yield*this.pushToIndex(n+1,!0),s?"flow":"doc"}*pushCount(s){if(s>0)return yield this.buffer.substr(this.pos,s),this.pos+=s,s;return 0}*pushToIndex(s,n){let i=this.buffer.slice(this.pos,s);if(i)return yield i,this.pos+=i.length,i.length;else if(n)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Rs))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let s=this.flowLevel>0,n=this.charAt(1);if(U(n)||s&&It.has(n)){if(!s)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let s=this.pos+2,n=this.buffer[s];while(!U(n)&&n!==">")n=this.buffer[++s];return yield*this.pushToIndex(n===">"?s+1:s,!1)}else{let s=this.pos+1,n=this.buffer[s];while(n)if(nd.has(n))n=this.buffer[++s];else if(n==="%"&&Ui.has(this.buffer[s+1])&&Ui.has(this.buffer[s+2]))n=this.buffer[s+=3];else break;return yield*this.pushToIndex(s,!1)}}*pushNewline(){let s=this.buffer[this.pos];if(s===`
|
|
134
|
+
`)return yield*this.pushCount(1);else if(s==="\r"&&this.charAt(1)===`
|
|
135
|
+
`)return yield*this.pushCount(2);else return 0}*pushSpaces(s){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||s&&i==="\t");let r=n-this.pos;if(r>0)yield this.buffer.substr(this.pos,r),this.pos=n;return r}*pushUntil(s){let n=this.pos,i=this.buffer[n];while(!s(i))i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}rd.Lexer=Yi});var Us=v(function(ad){class Ji{constructor(){this.lineStarts=[],this.addNewLine=(s)=>this.lineStarts.push(s),this.linePos=(s)=>{let n=0,i=this.lineStarts.length;while(n<i){let o=n+i>>1;if(this.lineStarts[o]<s)n=o+1;else i=o}if(this.lineStarts[n]===s)return{line:n+1,col:1};if(n===0)return{line:0,col:s};let r=this.lineStarts[n-1];return{line:n,col:s-r+1}}}}ad.LineCounter=Ji});var Ys=v(function(ud){var cd=We("process"),Vi=_t(),fd=Fs();function se(s,n){for(let i=0;i<s.length;++i)if(s[i].type===n)return!0;return!1}function Wi(s){for(let n=0;n<s.length;++n)switch(s[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Hi(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Pt(s){switch(s.type){case"document":return s.start;case"block-map":{let n=s.items[s.items.length-1];return n.sep??n.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function ke(s){if(s.length===0)return[];let n=s.length;e:while(--n>=0)switch(s[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(s[++n]?.type==="space");return s.splice(n,s.length)}function Qi(s){if(s.start.type==="flow-seq-start"){for(let n of s.items)if(n.sep&&!n.value&&!se(n.start,"explicit-key-ind")&&!se(n.sep,"map-value-ind")){if(n.key)n.value=n.key;if(delete n.key,Hi(n.value))if(n.value.end)Array.prototype.push.apply(n.value.end,n.sep);else n.value.end=n.sep;else Array.prototype.push.apply(n.start,n.sep);delete n.sep}}}class Gi{constructor(s){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new fd.Lexer,this.onNewLine=s}*parse(s,n=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let i of this.lexer.lex(s,n))yield*this.next(i);if(!n)yield*this.end()}*next(s){if(this.source=s,cd.env.LOG_TOKENS)console.log("|",Vi.prettyToken(s));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=s.length;return}let n=Vi.tokenType(s);if(!n){let i=`Not a YAML token: ${s}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:s}),this.offset+=s.length}else if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+s.length);break;case"space":if(this.atNewLine&&s[0]===" ")this.indent+=s.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=s.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=s.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let s=this.peek(1);if(this.type==="doc-end"&&(!s||s.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!s)return yield*this.stream();switch(s.type){case"document":return yield*this.document(s);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(s);case"block-scalar":return yield*this.blockScalar(s);case"block-map":return yield*this.blockMap(s);case"block-seq":return yield*this.blockSequence(s);case"flow-collection":return yield*this.flowCollection(s);case"doc-end":return yield*this.documentEnd(s)}yield*this.pop()}peek(s){return this.stack[this.stack.length-s]}*pop(s){let n=s??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 i=this.peek(1);if(n.type==="block-scalar")n.indent="indent"in i?i.indent:0;else if(n.type==="flow-collection"&&i.type==="document")n.indent=0;if(n.type==="flow-collection")Qi(n);switch(i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{let r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=i.items[i.items.length-1];if(r.value)i.items.push({start:[],value:n});else r.value=n;break}case"flow-collection":{let r=i.items[i.items.length-1];if(!r||r.value)i.items.push({start:[],key:n,sep:[]});else if(r.sep)r.value=n;else Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];if(r&&!r.sep&&!r.value&&r.start.length>0&&Wi(r.start)===-1&&(n.indent===0||r.start.every((o)=>o.type!=="comment"||o.indent<n.indent))){if(i.type==="document")i.end=r.start;else i.items.push({start:r.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 s={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")s.start.push(this.sourceToken);this.stack.push(s);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(s){if(s.value)return yield*this.lineEnd(s);switch(this.type){case"doc-start":{if(Wi(s.start)!==-1)yield*this.pop(),yield*this.step();else s.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":s.start.push(this.sourceToken);return}let n=this.startBlockValue(s);if(n)this.stack.push(n);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(s){if(this.type==="map-value-ind"){let n=Pt(this.peek(2)),i=ke(n),r;if(s.end)r=s.end,r.push(this.sourceToken),delete s.end;else r=[this.sourceToken];let o={type:"block-map",offset:s.offset,indent:s.indent,items:[{start:i,key:s,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(s)}*blockScalar(s){switch(this.type){case"space":case"comment":case"newline":s.props.push(this.sourceToken);return;case"scalar":if(s.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
136
|
+
`)+1;while(n!==0)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
137
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(s){let n=s.items[s.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let i="end"in n.value?n.value.end:void 0;if((Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment")i?.push(this.sourceToken);else s.items.push({start:[this.sourceToken]})}else if(n.sep)n.sep.push(this.sourceToken);else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)s.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,s.indent)){let r=s.items[s.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,n.start),r.push(this.sourceToken),s.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=s.indent){let i=!this.onKeyLine&&this.indent===s.indent,r=i&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",o=[];if(r&&n.sep&&!n.value){let l=[];for(let c=0;c<n.sep.length;++c){let f=n.sep[c];switch(f.type){case"newline":l.push(c);break;case"space":break;case"comment":if(f.indent>s.indent)l.length=0;break;default:l.length=0}}if(l.length>=2)o=n.sep.splice(l[1])}switch(this.type){case"anchor":case"tag":if(r||n.value)o.push(this.sourceToken),s.items.push({start:o}),this.onKeyLine=!0;else if(n.sep)n.sep.push(this.sourceToken);else n.start.push(this.sourceToken);return;case"explicit-key-ind":if(!n.sep&&!n.explicitKey)n.start.push(this.sourceToken),n.explicitKey=!0;else if(r||n.value)o.push(this.sourceToken),s.items.push({start:o,explicitKey:!0});else 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(se(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let l=ke(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else if(n.value)s.items.push({start:[],key:null,sep:[this.sourceToken]});else if(se(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Hi(n.key)&&!se(n.sep,"newline")){let l=ke(n.start),{key:c,sep:f}=n;f.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:c,sep:f}]})}else if(o.length>0)n.sep=n.sep.concat(o,this.sourceToken);else n.sep.push(this.sourceToken);else if(!n.sep)Object.assign(n,{key:null,sep:[this.sourceToken]});else if(n.value||r)s.items.push({start:o,key:null,sep:[this.sourceToken]});else if(se(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else n.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let l=this.flowScalar(this.type);if(r||n.value)s.items.push({start:o,key:l,sep:[]}),this.onKeyLine=!0;else if(n.sep)this.stack.push(l);else Object.assign(n,{key:l,sep:[]}),this.onKeyLine=!0;return}default:{let l=this.startBlockValue(s);if(l){if(l.type==="block-seq"){if(!n.explicitKey&&n.sep&&!se(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 if(i)s.items.push({start:o});this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(s){let n=s.items[s.items.length-1];switch(this.type){case"newline":if(n.value){let i="end"in n.value?n.value.end:void 0;if((Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment")i?.push(this.sourceToken);else s.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)s.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,s.indent)){let r=s.items[s.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,n.start),r.push(this.sourceToken),s.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=s.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==s.indent)break;if(n.value||se(n.start,"seq-item-ind"))s.items.push({start:[this.sourceToken]});else n.start.push(this.sourceToken);return}if(this.indent>s.indent){let i=this.startBlockValue(s);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(s){let n=s.items[s.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(s.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!n||n.sep)s.items.push({start:[this.sourceToken]});else n.start.push(this.sourceToken);return;case"map-value-ind":if(!n||n.value)s.items.push({start:[],key:null,sep:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!n||n.value)s.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);if(!n||n.value)s.items.push({start:[],key:r,sep:[]});else if(n.sep)this.stack.push(r);else Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":s.end.push(this.sourceToken);return}let i=this.startBlockValue(s);if(i)this.stack.push(i);else yield*this.pop(),yield*this.step()}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===s.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let r=Pt(i),o=ke(r);Qi(s);let l=s.end.splice(1,s.end.length);l.push(this.sourceToken);let c={type:"block-map",offset:s.offset,indent:s.indent,items:[{start:o,key:s,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(s)}}flowScalar(s){if(this.onNewLine){let n=this.source.indexOf(`
|
|
138
|
+
`)+1;while(n!==0)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
139
|
+
`,n)+1}return{type:s,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(s){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=Pt(s),i=ke(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=Pt(s),i=ke(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(s,n){if(this.type!=="comment")return!1;if(this.indent<=n)return!1;return s.every((i)=>i.type==="newline"||i.type==="space")}*documentEnd(s){if(this.type!=="doc-mode"){if(s.end)s.end.push(this.sourceToken);else s.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(s){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;case"space":case"comment":default:if(s.end)s.end.push(this.sourceToken);else s.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}ud.Parser=Gi});var tr=v(function(Sd){var Xi=Ps(),dd=Ke(),Ve=Re(),pd=Ut(),md=I(),yd=Us(),zi=Ys();function Zi(s){let n=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||n&&new yd.LineCounter||null,prettyErrors:n}}function gd(s,n={}){let{lineCounter:i,prettyErrors:r}=Zi(n),o=new zi.Parser(i?.addNewLine),l=new Xi.Composer(n),c=Array.from(l.compose(o.parse(s)));if(r&&i)for(let f of c)f.errors.forEach(Ve.prettifyError(s,i)),f.warnings.forEach(Ve.prettifyError(s,i));if(c.length>0)return c;return Object.assign([],{empty:!0},l.streamInfo())}function er(s,n={}){let{lineCounter:i,prettyErrors:r}=Zi(n),o=new zi.Parser(i?.addNewLine),l=new Xi.Composer(n),c=null;for(let f of l.compose(o.parse(s),!0,s.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new Ve.YAMLParseError(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(r&&i)c.errors.forEach(Ve.prettifyError(s,i)),c.warnings.forEach(Ve.prettifyError(s,i));return c}function bd(s,n,i){let r=void 0;if(typeof n==="function")r=n;else if(i===void 0&&n&&typeof n==="object")i=n;let o=er(s,i);if(!o)return null;if(o.warnings.forEach((l)=>pd.warn(o.options.logLevel,l)),o.errors.length>0)if(o.options.logLevel!=="silent")throw o.errors[0];else o.errors=[];return o.toJS(Object.assign({reviver:r},i))}function wd(s,n,i){let r=null;if(typeof n==="function"||Array.isArray(n))r=n;else if(i===void 0&&n)i=n;if(typeof i==="string")i=i.length;if(typeof i==="number"){let o=Math.round(i);i=o<1?void 0:o>8?{indent:8}:{indent:o}}if(s===void 0){let{keepUndefined:o}=i??n??{};if(!o)return}if(md.isDocument(s)&&!r)return s.toString(i);return new dd.Document(s,r,i).toString(i)}Sd.parse=bd;Sd.parseAllDocuments=gd;Sd.parseDocument=er;Sd.stringify=wd});import{execFileSync as yp}from"node:child_process";import{readFile as gp}from"node:fs/promises";import{basename as bp,dirname as wp,extname as cr,resolve as Sp}from"node:path";import{pathToFileURL as vp}from"node:url";var Od=Ps(),qd=Ke(),Ed=gs(),Js=Re(),Ld=Oe(),ne=I(),Td=z(),Cd=M(),_d=ee(),Id=te(),Vm=_t(),Pd=Fs(),$d=Us(),Md=Ys(),$t=tr(),sr=Ne();var xd=Od.Composer,Dd=qd.Document,Bd=Ed.Schema,{YAMLError:jd,YAMLParseError:Kd,YAMLWarning:Rd}=Js,Fd=Ld.Alias,{isAlias:Ud,isCollection:Yd,isDocument:Jd,isMap:Vd,isNode:Wd,isPair:Qd,isScalar:Hd,isSeq:Gd}=ne,Xd=Td.Pair,zd=Cd.Scalar,Zd=_d.YAMLMap,ep=Id.YAMLSeq;var tp=Pd.Lexer,sp=$d.LineCounter,np=Md.Parser,{parse:Vs,parseAllDocuments:ip,parseDocument:rp,stringify:op}=$t,{visit:ap,visitAsync:lp}=sr;var nr=["process_started","process_healthy","process_completed","process_completed_successfully","process_log_ready"],ir=["always","on_failure","exit_on_failure","no"],cp=(s)=>/^[A-Za-z0-9_@%+=:,./-]+$/u.test(s)?s:`'${s.replaceAll("'","'\\''")}'`,or=(s,n)=>{if(typeof n==="string"&&n.trim()!=="")return n;if(Array.isArray(n)&&n.length>0&&n.every((i)=>typeof i==="string"))return n.map(cp).join(" ");throw Error(`${s}: no command`)},fp=(s,n)=>{if(n===void 0)return;if(Array.isArray(n)){if(n.length===0)return;throw Error(`${s}: an environment list cannot say which values are secret references; use a map of name to {"$secret": "<name>"}`)}if(n===null||typeof n!=="object")throw Error(`${s}: environment must be a map`);let i={};for(let[r,o]of Object.entries(n)){let l=o!==null&&typeof o==="object"?o.$secret:void 0;if(typeof l!=="string"||l.length===0)throw Error(`${s}: env ${r} is a literal value; the neutral record carries only {"$secret": "<name>"}`);i[r]={$secret:l}}return i},up=(s)=>{let n=s.schedule??s,i=typeof n.cron==="string"?n.cron:void 0,r=typeof n.interval==="string"?n.interval:void 0,o=typeof s.timezone==="string"?s.timezone:void 0,l=typeof s.run_on_start==="boolean"?s.run_on_start:void 0;if(i===void 0&&r===void 0&&o===void 0&&l===void 0)return;return{...i!==void 0?{cron:i}:{},...r!==void 0?{interval:r}:{},...o!==void 0?{timezone:o}:{},...l!==void 0?{run_on_start:l}:{}}},hp=(s,n)=>{let i=n.restart??n.restart_policy;if(i===void 0)return;let r=i!==null&&typeof i==="object"?i:void 0,o=r===void 0?i:r.policy;if(typeof o!=="string"||!ir.includes(o))throw Error(`${s}: restart policy ${JSON.stringify(o)} is not one of ${ir.join(", ")}`);let l=r!==void 0&&typeof r.backoff_seconds==="number"?r.backoff_seconds:void 0,c=r!==void 0&&typeof r.max_restarts==="number"?r.max_restarts:void 0;return{policy:o,...l!==void 0?{backoff_seconds:l}:{},...c!==void 0?{max_restarts:c}:{}}},dp=(s,n)=>{let i=n.depends_on;if(i===void 0)return;let r=(o,l)=>{if(l===void 0)return{name:o,condition:"process_started"};if(typeof l!=="string"||!nr.includes(l))throw Error(`${s}: depends_on ${o} condition ${JSON.stringify(l)} is not one of ${nr.join(", ")}`);return{name:o,condition:l}};if(Array.isArray(i))return i.map((o)=>{if(typeof o!=="string")throw Error(`${s}: depends_on must name services`);return r(o,void 0)});if(i!==null&&typeof i==="object")return Object.entries(i).map(([o,l])=>{let c=l!==null&&typeof l==="object"?l.condition:void 0;return r(o,c)});throw Error(`${s}: depends_on must be a list or a map`)},pp=(s,n)=>{let i=n.readiness_probe??n.liveness_probe;if(i===void 0)return;if(i===null||typeof i!=="object")throw Error(`${s}: the health probe must be a map`);let r=i;if(r.exec?.command!==void 0)return{exec:or(`${s} health`,r.exec.command)};let o=r.http_get;if(o!==void 0&&typeof o.path==="string"&&typeof o.port==="number"){let l=typeof o.host==="string"?o.host:void 0,c=o.scheme==="https"||o.scheme==="http"?o.scheme:void 0;return{http:{port:o.port,...l!==void 0?{host:l}:{},path:o.path,...c!==void 0?{scheme:c}:{}}}}throw Error(`${s}: the health probe is neither exec.command nor http_get with path and port`)},ar=[{keys:["command"],to:["command"],read:(s,n)=>({command:or(s,n.command)})},{keys:["working_dir"],to:["cwd"],read:(s,n)=>typeof n.working_dir==="string"?{cwd:n.working_dir}:{}},{keys:["environment"],to:["env"],read:(s,n)=>{let i=fp(s,n.environment);return i===void 0?{}:{env:i}}},{keys:["schedule","cron","interval","timezone","run_on_start"],to:["schedule"],read:(s,n)=>{let i=up(n);return i===void 0?{}:{schedule:i}}},{keys:["restart","restart_policy"],to:["restart"],read:(s,n)=>{let i=hp(s,n);return i===void 0?{}:{restart:i}}},{keys:["depends_on"],to:["depends_on"],read:(s,n)=>{let i=dp(s,n);return i===void 0?{}:{depends_on:i}}},{keys:["readiness_probe","liveness_probe"],to:["health"],read:(s,n)=>{let i=pp(s,n);return i===void 0?{}:{health:i}}}],rr=new Set(ar.flatMap((s)=>s.keys));function mp(s,n){for(let i of Object.keys(n))if(!rr.has(i))throw Error(`${s}: ${i} is not a field this client carries, and the driver's record cannot hold it (carried: ${[...rr].join(", ")})`);return Object.assign({},...ar.map((i)=>i.read(s,n)))}function lr(s,n){let i;try{i=Vs(s.text)}catch(l){throw Error(`${s.path}: ${l.message}`)}if(i===null||typeof i!=="object")throw Error(`${s.path}: not a process-compose document`);let r=i.processes;if(r===void 0)throw Error(`${s.path}: no processes map; this is not a process-compose file`);if(r===null||typeof r!=="object")throw Error(`${s.path}: processes must be a map`);let o=[];for(let[l,c]of Object.entries(r)){if(c===null||typeof c!=="object")throw Error(`${l}: an entry must be a map`);let f=c;if(f.extends!==void 0)throw Error(`${l}: extends is not representable; the machine lists it read-only`);o.push({name:l,source:n,...mp(l,f)})}if(o.length===0)throw Error(`${s.path}: processes is empty; nothing to apply`);return o}var fr=new Set([".ts",".mts",".js",".mjs"]),kp=(s)=>s!==null&&typeof s==="object";async function Np(s,n){if(fr.has(cr(s))){let r=await import(vp(s).href);if(r.default===void 0)throw Error(`${s}: the program has no default export`);let o=typeof r.default==="function"?await r.default():r.default;if(!kp(o))throw Error(`${s}: the default export is not a plan object`);return o}let i=await gp(s,"utf8");return{services:lr({path:s,text:i},n)}}async function Ap(s){if(fr.has(cr(s)))return y("program",bp(s));let n;try{n=yp("git",["-C",wp(s),"rev-parse","--short=12","HEAD"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{n="no-commit"}return y("file",`${s}@${n}`)}function Op(s){if(s.origin.trim().length===0||s.workspace.trim().length===0)return;let n={origin:s.origin.trim(),workspace:s.workspace.trim(),sessionFile:s.sessionFile,json:s.json},i=t();return{async mintHostJoin(r){let o=await e(n,i,{method:"POST",path:"/join-links",body:{purpose:"host",agentMemberIds:[...r]},what:"mint a host join link",label:"HOST_JOIN"});if("error"in o)throw Error(o.error);let l=o.answer;if(typeof l.id!=="string"||typeof l.code!=="string"||typeof l.expiresAt!=="string")throw Error(`HOST_JOIN_ANSWER_INVALID: the workspace minted a link without id, code and expiresAt (${JSON.stringify(o.answer).slice(0,300)})`);return{id:l.id,code:l.code,url:typeof l.url==="string"?l.url:"",expiresAt:l.expiresAt}}}}var qp=(s,n,i)=>{if(s.json){console.log(JSON.stringify(n,null,2));return}console.log(`machine ${s.machine}; source ${i.kind}:${i.id}`);for(let l of T(n))console.log(l);let r=n.agents;if(n.create.length+n.change.length+n.remove.length+(r===void 0?0:r.create.length+r.change.length+r.remove.length)+(n.hosts?.pending.length??0)===0)console.log("nothing to do")};async function iy(s,n){let i;try{if(n.stop&&n.keep)throw Error("--stop and --keep answer the same question differently; pass one");let r=Sp(s),o=await Ap(r),l=await Np(r,o);if((l.services!==void 0||l.agents!==void 0)&&n.machine.length===0)throw Error("--machine <url> is required: the machine's ahpd WebSocket endpoint");if(n.machine.length>0)i=await a(n.machine,{token:n.token,clientId:"hightea-apply"});let f=i??{call:async()=>{throw Error("this plan names no services or agents, so no ahpd channel is read")}},u=n.stop?"stop":n.keep?"keep":void 0,h=Op(n),g=await b(l,f,{source:o,prune:n.prune,...u===void 0?{}:{removal:u},...h===void 0?{}:{hostJoin:h}});if(qp(n,g,o),!n.yes){if(!n.json)console.log("nothing sent; run again with --yes to apply");return 0}let d=await k(g,f,h);if(n.json)console.log(JSON.stringify(d,null,2));else{let p=d.written.length===0?"nothing":d.written.join(", "),S=d.removed.length===0?"nothing":d.removed.join(", "),N=d.kept.length===0?"":`; kept ${d.kept.join(", ")}`,m=d.hostLinks===void 0||d.hostLinks.length===0?"":`; minted ${d.hostLinks.length} host ${d.hostLinks.length===1?"link":"links"}`;if(console.log(`wrote ${p}; removed ${S}${N}${m}`),d.hostNote!==void 0)console.log(`note: ${d.hostNote}`);for(let w of d.hostLinks??[])console.log(`host ${w.name}: join with ${w.link.url||w.link.code} (single use; expires ${w.link.expiresAt})`)}return 0}catch(r){return console.error(r.message),1}finally{i?.close()}}export{iy as applyFile};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import"./chunk-dvsftn8z.js";import{t,e}from"./chunk-55a0ndzw.js";var c=`hightea host list --origin https://your-deployment --workspace SLUG [--session-file FILE] [--json]
|
|
2
|
+
hightea host remove --origin https://your-deployment --workspace SLUG --host HOST [--remove-agents] [--session-file FILE] [--json]`;async function g(s,n=t()){if(s.workspace.trim().length===0||s.host.trim().length===0)return n.err(`HOST_REMOVE_INPUT: --workspace and --host are required.
|
|
3
|
+
${c}`),1;let r=s.host.trim(),i=s.removeAgents===!0?"?removeAgents=1":"",o=await e(s,n,{method:"DELETE",path:`/hosts/${encodeURIComponent(r)}${i}`,what:"remove",label:"HOST_REMOVE"});if("error"in o)return n.err(o.error),o.exit;if(s.json)return n.out(JSON.stringify(o.answer)),0;let a=o.answer.host??{},d=typeof a.endedDeliveries==="number"?a.endedDeliveries:0,u=String(a.hostId??r);if(a.alreadyRevoked===!0)return n.out(`host ${u} was already removed; nothing was left running`),0;n.out(`removed host ${u}: revoked, ${d} ${d===1?"delivery":"deliveries"} ended`);let h=Array.isArray(o.answer.agentsKeptUnrouted)?o.answer.agentsKeptUnrouted.length:0;return n.out(h===0?"Its agents have no host until they join again with a new join code.":`Its ${h===1?"agent is":`${String(h)} agents are`} still a member, now with no computer; a new join code routes ${h===1?"it":"them"} again. (--remove-agents deletes them with the computer.)`),0}function l(s){let n=(d)=>s[d]===null||s[d]===void 0?"none":String(s[d]),r=Array.isArray(s.agentMemberIds)&&s.agentMemberIds.length>0?s.agentMemberIds.join(","):"none",i=n("status")==="revoked"?`revoked ${n("revokedAt")}`:`last seen ${n("lastSeenAt")}`,o=typeof s.initializeNote==="string"?` ${s.initializeNote}`:"",a=n("link")==="attaching"?`connected, never initialized${n("attachedAt")==="none"?"":` since ${n("attachedAt")}`}`:s.connected===!0||n("link")==="ready"?"connected":"not connected";return`${n("hostId")} ${n("status")} ${a} plugin ${n("pluginVersion")} agents ${r} owner ${n("ownerAccountId")} ${i}${o}`}async function p(s,n=t()){if(s.workspace.trim().length===0)return n.err(`HOST_LIST_INPUT: --workspace is required.
|
|
4
|
+
${c}`),1;let r=await e(s,n,{method:"GET",path:"/hosts",what:"list",label:"HOST_LIST"});if("error"in r)return n.err(r.error),r.exit;if(s.json)return n.out(JSON.stringify(r.answer)),0;let i=Array.isArray(r.answer.hosts)?r.answer.hosts:[];if(i.length===0)return n.out(`no hosts in workspace ${s.workspace.trim()} that your account can see (a workspace owner sees every host)`),0;if(n.out(i.map(l).join(`
|
|
5
|
+
`)),i.some((a)=>a.status==="active"))n.out("A host you no longer use: `hightea host remove --workspace "+s.workspace.trim()+" --host <id>`.");m(n,r.answer);let o=r.answer.wakeCarrier;if(typeof o?.active!=="number"||typeof o.unsigned!=="number")n.err("WAKE_CARRIER_UNKNOWN: this workspace answered no wakeCarrier census (active, unsigned), so whether any host lacks signed envelopes, and so cannot be woken, is unknown. The workspace build and this CLI disagree; the list above is not evidence that every host can be woken.");else if(o.unsigned===0)n.out("every active host advertises signed envelopes and can be woken");else n.out(`${o.unsigned} of ${o.active} active hosts lack signed envelopes and cannot be woken until upgraded: \`hightea host update\` on each, or remove it`);return 0}function m(s,n){if(n.oldNames===null){s.out("the release census is readable by the workspace owner only: ask them to run `hightea host list`");return}let r=n.oldNames;if(typeof r?.mustReport!=="number"||!Array.isArray(r.behind)||!Array.isArray(r.excluded)){s.err("OLD_NAMES_UNKNOWN: this workspace answered no oldNames census (mustReport, behind, excluded), so whether the old x-hightea/* names can be deleted yet is unknown. The workspace build and this CLI disagree; the list above is not evidence that every host that must be reached reads the current frames.");return}let{behind:i,excluded:o}=r;if(i.length===0&&r.mustReport===0)s.out("0 hosts had to be checked, so nothing was decided: join the host that must read the current frames, or read this from the workspace owner");else if(i.length===0)s.out(`every host that must read the current frames does (${r.mustReport} checked): the old x-hightea/* names can be deleted`);else s.out(`${i.length} of ${r.mustReport} hosts that must read the current frames are behind: `+i.map((a)=>`${String(a.hostId)} (missing ${Array.isArray(a.missingCapabilities)?a.missingCapabilities.map(String).join(", "):"unknown"})`).join(", ")+" — `hightea host update` on each");for(let a of o)s.out(`excluded ${String(a.hostId)} (${String(a.pluginVersion)}) last seen ${String(a.lastSeenAt)}: ${String(a.reason)}`)}export{p as hostList,g as hostRemove};
|