@opencode/console 0.1.2 → 0.1.3
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/chunk-0752rr1w.js +1 -0
- package/chunk-11wqcgnn.js +2 -0
- package/{chunk-b02r286p.js → chunk-1z17cm3w.js} +2 -2
- package/chunk-38zs2jre.js +1 -0
- package/chunk-3p7x3f0s.js +1 -0
- package/chunk-5a8bvcgq.js +15 -0
- package/chunk-6fqhbptf.js +1 -0
- package/chunk-6hmr86q5.js +3 -0
- package/{chunk-wd4mfvqy.js → chunk-6xs4y82y.js} +2 -2
- package/{chunk-rx6cjbq2.js → chunk-7qa618ad.js} +55 -55
- package/chunk-82p6vmpy.js +1 -0
- package/chunk-9dgq3xc0.js +32 -0
- package/chunk-9zpe1ry1.js +2 -0
- package/chunk-b4fde357.js +2 -0
- package/chunk-b6azftzw.js +254 -0
- package/chunk-bcmj4f7y.js +2 -0
- package/chunk-cd4h496v.js +2 -0
- package/chunk-g9f1r3v3.js +1 -0
- package/chunk-gcqbk8bn.js +149 -0
- package/chunk-ghvsrvdw.js +1 -0
- package/chunk-jpqmm6pm.js +2 -0
- package/chunk-jxh84gfh.js +1 -0
- package/chunk-kd1hjfpe.js +1 -0
- package/{chunk-dnepb5ke.js → chunk-m3m5harb.js} +2 -2
- package/chunk-mnjk01tj.js +1 -0
- package/chunk-nqk8n93s.js +1 -0
- package/chunk-qp7a49b3.js +1 -0
- package/chunk-r1adn0ka.js +11 -0
- package/chunk-tamzaefd.js +1 -0
- package/chunk-x65p26st.js +2 -0
- package/chunk-yb3fn5r1.js +2 -0
- package/{chunk-jem7z938.js → chunk-z5mqjw9r.js} +2 -2
- package/dsh-plugin.js +1 -1
- package/index.js +50 -50
- package/package.json +1 -1
- package/pi-extension.js +2 -2
- package/chunk-0067hzw7.js +0 -11
- package/chunk-0trayd9n.js +0 -2
- package/chunk-37whdg3n.js +0 -1
- package/chunk-6bc9ezw6.js +0 -1
- package/chunk-71rwyxw2.js +0 -2
- package/chunk-78cwb109.js +0 -162
- package/chunk-7k3ymrp6.js +0 -254
- package/chunk-83pr45e8.js +0 -1
- package/chunk-96f5c0tj.js +0 -2
- package/chunk-ak1n0cs7.js +0 -2
- package/chunk-cdc5arvh.js +0 -1
- package/chunk-et9y1sb5.js +0 -2
- package/chunk-g9bke322.js +0 -1
- package/chunk-gvywgb0d.js +0 -1
- package/chunk-gxedprvk.js +0 -32
- package/chunk-kpp48ne0.js +0 -1
- package/chunk-ktx666b5.js +0 -2
- package/chunk-m3n97pxp.js +0 -1
- package/chunk-n5bt7jzp.js +0 -3
- package/chunk-px1nqkzb.js +0 -2
- package/chunk-sbkpkav3.js +0 -1
- package/chunk-t8p1svd4.js +0 -1
- package/chunk-tx5wws16.js +0 -2
- package/chunk-vy3ahcaj.js +0 -2
- package/chunk-w6kmmxmz.js +0 -1
- package/chunk-wkrya350.js +0 -1
- package/chunk-ysgtje2z.js +0 -1
- package/chunk-zgcspk2g.js +0 -1
package/chunk-78cwb109.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import{Is,Ts}from"./chunk-0trayd9n.js";import{J,W}from"./chunk-wd4mfvqy.js";import{m,k,tt,He,F,Ce,r,G,L,g,Ge,Ie,D,z,S,j,e,n,x,u,Z}from"./chunk-gxedprvk.js";var M=m(function(uo){var ls=Symbol.for("yaml.alias"),xn=Symbol.for("yaml.document"),dt=Symbol.for("yaml.map"),Dn=Symbol.for("yaml.pair"),cs=Symbol.for("yaml.scalar"),pt=Symbol.for("yaml.seq"),ne=Symbol.for("yaml.node.type"),to=(t)=>!!t&&typeof t==="object"&&t[ne]===ls,so=(t)=>!!t&&typeof t==="object"&&t[ne]===xn,no=(t)=>!!t&&typeof t==="object"&&t[ne]===dt,io=(t)=>!!t&&typeof t==="object"&&t[ne]===Dn,Bn=(t)=>!!t&&typeof t==="object"&&t[ne]===cs,ao=(t)=>!!t&&typeof t==="object"&&t[ne]===pt;function Kn(t){if(t&&typeof t==="object")switch(t[ne]){case dt:case pt:return!0}return!1}function lo(t){if(t&&typeof t==="object")switch(t[ne]){case ls:case dt:case cs:case pt:return!0}return!1}var co=(t)=>(Bn(t)||Kn(t))&&!!t.anchor;uo.ALIAS=ls;uo.DOC=xn;uo.MAP=dt;uo.NODE_TYPE=ne;uo.PAIR=Dn;uo.SCALAR=cs;uo.SEQ=pt;uo.hasAnchor=co;uo.isAlias=to;uo.isCollection=Kn;uo.isDocument=so;uo.isMap=no;uo.isNode=lo;uo.isPair=io;uo.isScalar=Bn;uo.isSeq=ao});var xe=m(function(Lo){var Y=M(),V=Symbol("break visit"),jn=Symbol("skip children"),te=Symbol("remove node");function mt(t,s){let i=Rn(s);if(Y.isDocument(t)){if(Ne(null,t.contents,i,Object.freeze([t]))===te)t.contents=null}else Ne(null,t,i,Object.freeze([]))}mt.BREAK=V;mt.SKIP=jn;mt.REMOVE=te;function Ne(t,s,i,o){let a=Fn(t,s,i,o);if(Y.isNode(a)||Y.isPair(a))return Un(t,o,a),Ne(t,a,i,o);if(typeof a!=="symbol"){if(Y.isCollection(s)){o=Object.freeze(o.concat(s));for(let l=0;l<s.items.length;++l){let c=Ne(l,s.items[l],i,o);if(typeof c==="number")l=c-1;else if(c===V)return V;else if(c===te)s.items.splice(l,1),l-=1}}else if(Y.isPair(s)){o=Object.freeze(o.concat(s));let l=Ne("key",s.key,i,o);if(l===V)return V;else if(l===te)s.key=null;let c=Ne("value",s.value,i,o);if(c===V)return V;else if(c===te)s.value=null}}return a}async function gt(t,s){let i=Rn(s);if(Y.isDocument(t)){if(await Ae(null,t.contents,i,Object.freeze([t]))===te)t.contents=null}else await Ae(null,t,i,Object.freeze([]))}gt.BREAK=V;gt.SKIP=jn;gt.REMOVE=te;async function Ae(t,s,i,o){let a=await Fn(t,s,i,o);if(Y.isNode(a)||Y.isPair(a))return Un(t,o,a),Ae(t,a,i,o);if(typeof a!=="symbol"){if(Y.isCollection(s)){o=Object.freeze(o.concat(s));for(let l=0;l<s.items.length;++l){let c=await Ae(l,s.items[l],i,o);if(typeof c==="number")l=c-1;else if(c===V)return V;else if(c===te)s.items.splice(l,1),l-=1}}else if(Y.isPair(s)){o=Object.freeze(o.concat(s));let l=await Ae("key",s.key,i,o);if(l===V)return V;else if(l===te)s.key=null;let c=await Ae("value",s.value,i,o);if(c===V)return V;else if(c===te)s.value=null}}return a}function Rn(t){if(typeof t==="object"&&(t.Collection||t.Node||t.Value))return Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t);return t}function Fn(t,s,i,o){if(typeof i==="function")return i(t,s,o);if(Y.isMap(s))return i.Map?.(t,s,o);if(Y.isSeq(s))return i.Seq?.(t,s,o);if(Y.isPair(s))return i.Pair?.(t,s,o);if(Y.isScalar(s))return i.Scalar?.(t,s,o);if(Y.isAlias(s))return i.Alias?.(t,s,o);return}function Un(t,s,i){let o=s[s.length-1];if(Y.isCollection(o))o.items[t]=i;else if(Y.isPair(o))if(t==="key")o.key=i;else o.value=i;else if(Y.isDocument(o))o.contents=i;else{let a=Y.isAlias(o)?"alias":"scalar";throw Error(`Cannot replace node with ${a} parent`)}}Lo.visit=mt;Lo.visitAsync=gt});var us=m(function(_o){var Yn=M(),Io=xe(),Po={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Mo=(t)=>t.replace(/[!,[\]{}]/g,(s)=>Po[s]);class Q{constructor(t,s){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Q.defaultYaml,t),this.tags=Object.assign({},Q.defaultTags,s)}clone(){let t=new Q(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new Q(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Q.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Q.defaultTags);break}return t}add(t,s){if(this.atNextDocument)this.yaml={explicit:Q.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Q.defaultTags),this.atNextDocument=!1;let i=t.trim().split(/[ \t]+/),o=i.shift();switch(o){case"%TAG":{if(i.length!==2){if(s(0,"%TAG directive should contain exactly two parts"),i.length<2)return!1}let[a,l]=i;return this.tags[a]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;let[a]=i;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;else{let l=/^\d+\.\d+$/.test(a);return s(6,`Unsupported YAML version ${a}`,l),!1}}default:return s(0,`Unknown directive ${o}`,!0),!1}}tagName(t,s){if(t==="!")return"!";if(t[0]!=="!")return s(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let l=t.slice(2,-1);if(l==="!"||l==="!!")return s(`Verbatim tags aren't resolved, so ${t} is invalid.`),null;if(t[t.length-1]!==">")s("Verbatim tags must end with a >");return l}let[,i,o]=t.match(/^(.*!)([^!]*)$/s);if(!o)s(`The ${t} tag has no suffix`);let a=this.tags[i];if(a)try{return a+decodeURIComponent(o)}catch(l){return s(String(l)),null}if(i==="!")return t;return s(`Could not resolve tag: ${t}`),null}tagString(t){for(let[s,i]of Object.entries(this.tags))if(t.startsWith(i))return s+Mo(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),o;if(t&&i.length>0&&Yn.isNode(t.contents)){let a={};Io.visit(t.contents,(l,c)=>{if(Yn.isNode(c)&&c.tag)a[c.tag]=!0}),o=Object.keys(a)}else o=[];for(let[a,l]of i){if(a==="!!"&&l==="tag:yaml.org,2002:")continue;if(!t||o.some((c)=>c.startsWith(l)))s.push(`%TAG ${a} ${l}`)}return s.join(`
|
|
2
|
-
`)}}Q.defaultYaml={explicit:!1,version:"1.2"};Q.defaultTags={"!!":"tag:yaml.org,2002:"};_o.Directives=Q});var St=m(function(Ko){var Jn=M(),xo=xe();function Do(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw Error(i)}return!0}function Vn(t){let s=new Set;return xo.visit(t,{Value(i,o){if(o.anchor)s.add(o.anchor)}}),s}function Wn(t,s){for(let i=1;;++i){let o=`${t}${i}`;if(!s.has(o))return o}}function Bo(t,s){let i=[],o=new Map,a=null;return{onAnchor:(l)=>{i.push(l),a??(a=Vn(t));let c=Wn(s,a);return a.add(c),c},setAnchors:()=>{for(let l of i){let c=o.get(l);if(typeof c==="object"&&c.anchor&&(Jn.isScalar(c.node)||Jn.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:o}}Ko.anchorIsValid=Do;Ko.anchorNames=Vn;Ko.createNodeAnchors=Bo;Ko.findNewAnchor=Wn});var fs=m(function(Yo){function De(t,s,i,o){if(o&&typeof o==="object")if(Array.isArray(o))for(let a=0,l=o.length;a<l;++a){let c=o[a],f=De(t,o,String(a),c);if(f===void 0)delete o[a];else if(f!==c)o[a]=f}else if(o instanceof Map)for(let a of Array.from(o.keys())){let l=o.get(a),c=De(t,o,a,l);if(c===void 0)o.delete(a);else if(c!==l)o.set(a,c)}else if(o instanceof Set)for(let a of Array.from(o)){let l=De(t,o,a,a);if(l===void 0)o.delete(a);else if(l!==a)o.delete(a),o.add(l)}else for(let[a,l]of Object.entries(o)){let c=De(t,o,a,l);if(c===void 0)delete o[a];else if(c!==l)o[a]=c}return t.call(s,i,o)}Yo.applyReviver=De});var oe=m(function(Wo){var Vo=M();function Qn(t,s,i){if(Array.isArray(t))return t.map((o,a)=>Qn(o,String(a),i));if(t&&typeof t.toJSON==="function"){if(!i||!Vo.hasAnchor(t))return t.toJSON(s,i);let o={aliasCount:0,count:1,res:void 0};i.anchors.set(t,o),i.onCreate=(l)=>{o.res=l,delete i.onCreate};let a=t.toJSON(s,i);if(i.onCreate)i.onCreate(a);return a}if(typeof t==="bigint"&&!i?.keep)return Number(t);return t}Wo.toJS=Qn});var wt=m(function(Xo){var Go=fs(),Gn=M(),Ho=oe();class Hn{constructor(t){Object.defineProperty(this,Gn.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)t.range=this.range.slice();return t}toJS(t,{mapAsMap:s,maxAliasCount:i,onAnchor:o,reviver:a}={}){if(!Gn.isDocument(t))throw TypeError("A document argument is required");let l={anchors:new Map,doc:t,keep:!0,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof i==="number"?i:100},c=Ho.toJS(this,"",l);if(typeof o==="function")for(let{count:f,res:h}of l.anchors.values())o(h,f);return typeof a==="function"?Go.applyReviver(a,{"":c},"",c):c}}Xo.NodeBase=Hn});var Be=m(function(na){var Zo=St(),ea=xe(),Oe=M(),ta=wt(),sa=oe();class Xn extends ta.NodeBase{constructor(t){super(Oe.ALIAS);this.source=t,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(t,s){if(s?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let i;if(s?.aliasResolveCache)i=s.aliasResolveCache;else if(i=[],ea.visit(t,{Node:(a,l)=>{if(Oe.isAlias(l)||Oe.hasAnchor(l))i.push(l)}}),s)s.aliasResolveCache=i;let o=void 0;for(let a of i){if(a===this)break;if(a.anchor===this.source)o=a}return o}toJSON(t,s){if(!s)return{source:this.source};let{anchors:i,doc:o,maxAliasCount:a}=s,l=this.resolve(o,s);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)sa.toJS(l,null,s),c=i.get(l);if(c?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(a>=0){if(c.count+=1,c.aliasCount===0)c.aliasCount=vt(o,l,i);if(c.count*c.aliasCount>a)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(t,s,i){let o=`*${this.source}`;if(t){if(Zo.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(a)}if(t.implicitKey)return`${o} `}return o}}function vt(t,s,i){if(Oe.isAlias(s)){let o=s.resolve(t),a=i&&o&&i.get(o);return a?a.count*a.aliasCount:0}else if(Oe.isCollection(s)){let o=0;for(let a of s.items){let l=vt(t,a,i);if(l>o)o=l}return o}else if(Oe.isPair(s)){let o=vt(t,s.key,i),a=vt(t,s.value,i);return Math.max(o,a)}return 1}na.Alias=Xn});var K=m(function(ca){var ra=M(),oa=wt(),aa=oe(),la=(t)=>!t||typeof t!=="function"&&typeof t!=="object";class me extends oa.NodeBase{constructor(t){super(ra.SCALAR);this.value=t}toJSON(t,s){return s?.keep?this.value:aa.toJS(this.value,t,s)}toString(){return String(this.value)}}me.BLOCK_FOLDED="BLOCK_FOLDED";me.BLOCK_LITERAL="BLOCK_LITERAL";me.PLAIN="PLAIN";me.QUOTE_DOUBLE="QUOTE_DOUBLE";me.QUOTE_SINGLE="QUOTE_SINGLE";ca.Scalar=me;ca.isScalarValue=la});var Ke=m(function(ga){var ha=Be(),ge=M(),zn=K(),da="tag:yaml.org,2002:";function pa(t,s,i){if(s){let o=i.filter((l)=>l.tag===s),a=o.find((l)=>!l.format)??o[0];if(!a)throw Error(`Tag ${s} not found`);return a}return i.find((o)=>o.identify?.(t)&&!o.format)}function ma(t,s,i){if(ge.isDocument(t))t=t.contents;if(ge.isNode(t))return t;if(ge.isPair(t)){let p=i.schema[ge.MAP].createNode?.(i.schema,null,i);return p.items.push(t),p}if(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)t=t.valueOf();let{aliasDuplicateObjects:o,onAnchor:a,onTagObj:l,schema:c,sourceObjects:f}=i,h=void 0;if(o&&t&&typeof t==="object")if(h=f.get(t),h)return h.anchor??(h.anchor=a(t)),new ha.Alias(h.anchor);else h={anchor:null,node:null},f.set(t,h);if(s?.startsWith("!!"))s=da+s.slice(2);let d=pa(t,s,c.tags);if(!d){if(t&&typeof t.toJSON==="function")t=t.toJSON();if(!t||typeof t!=="object"){let p=new zn.Scalar(t);if(h)h.node=p;return p}d=t instanceof Map?c[ge.MAP]:(Symbol.iterator in Object(t))?c[ge.SEQ]:c[ge.MAP]}if(l)l(d),delete i.onTagObj;let w=d?.createNode?d.createNode(i.schema,t,i):typeof d?.nodeClass?.from==="function"?d.nodeClass.from(i.schema,t,i):new zn.Scalar(t);if(s)w.tag=s;else if(!d.default)w.tag=d.tag;if(h)h.node=w;return w}ga.createNode=ma});var kt=m(function(wa){var ba=Ke(),se=M(),Sa=wt();function ps(t,s,i){let o=i;for(let a=s.length-1;a>=0;--a){let l=s[a];if(typeof l==="number"&&Number.isInteger(l)&&l>=0){let c=[];c[l]=o,o=c}else o=new Map([[l,o]])}return ba.createNode(o,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var Zn=(t)=>t==null||typeof t==="object"&&!!t[Symbol.iterator]().next().done;class ei extends Sa.NodeBase{constructor(t,s){super(t);Object.defineProperty(this,"schema",{value:s,configurable:!0,enumerable:!1,writable:!0})}clone(t){let s=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(t)s.schema=t;if(s.items=s.items.map((i)=>se.isNode(i)||se.isPair(i)?i.clone(t):i),this.range)s.range=this.range.slice();return s}addIn(t,s){if(Zn(t))this.add(s);else{let[i,...o]=t,a=this.get(i,!0);if(se.isCollection(a))a.addIn(o,s);else if(a===void 0&&this.schema)this.set(i,ps(this.schema,o,s));else throw Error(`Expected YAML collection at ${i}. Remaining path: ${o}`)}}deleteIn(t){let[s,...i]=t;if(i.length===0)return this.delete(s);let o=this.get(s,!0);if(se.isCollection(o))return o.deleteIn(i);else throw Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}getIn(t,s){let[i,...o]=t,a=this.get(i,!0);if(o.length===0)return!s&&se.isScalar(a)?a.value:a;else return se.isCollection(a)?a.getIn(o,s):void 0}hasAllNullValues(t){return this.items.every((s)=>{if(!se.isPair(s))return!1;let i=s.value;return i==null||t&&se.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){let[s,...i]=t;if(i.length===0)return this.has(s);let o=this.get(s,!0);return se.isCollection(o)?o.hasIn(i):!1}setIn(t,s){let[i,...o]=t;if(o.length===0)this.set(i,s);else{let a=this.get(i,!0);if(se.isCollection(a))a.setIn(o,s);else if(a===void 0&&this.schema)this.set(i,ps(this.schema,o,s));else throw Error(`Expected YAML collection at ${i}. Remaining path: ${o}`)}}}wa.Collection=ei;wa.collectionFromPath=ps;wa.isEmptyPath=Zn});var Re=m(function(qa){var Aa=(t)=>t.replace(/^(?!$)(?: $)?/gm,"#");function gs(t,s){if(/^\n+$/.test(t))return t.substring(1);return s?t.replace(/^(?! *$)/gm,s):t}var Oa=(t,s,i)=>t.endsWith(`
|
|
3
|
-
`)?gs(i,s):i.includes(`
|
|
4
|
-
`)?`
|
|
5
|
-
`+gs(i,s):(t.endsWith(" ")?"":" ")+i;qa.indentComment=gs;qa.lineComment=Oa;qa.stringifyComment=Aa});var si=m(function(Ia){function Ta(t,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:l=20,onFold:c,onOverflow:f}={}){if(!a||a<0)return t;if(a<l)l=0;let h=Math.max(1+l,1+a-s.length);if(t.length<=h)return t;let d=[],w={},p=a-s.length;if(typeof o==="number")if(o>a-Math.max(2,l))d.push(0);else p=a-o;let y=void 0,N=void 0,A=!1,b=-1,v=-1,q=-1;if(i==="block"){if(b=ti(t,b,s.length),b!==-1)p=b+h}for(let C;C=t[b+=1];){if(i==="quoted"&&C==="\\"){switch(v=b,t[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}q=b}if(C===`
|
|
6
|
-
`){if(i==="block")b=ti(t,b,s.length);p=b+s.length+h,y=void 0}else{if(C===" "&&N&&N!==" "&&N!==`
|
|
7
|
-
`&&N!=="\t"){let T=t[b+1];if(T&&T!==" "&&T!==`
|
|
8
|
-
`&&T!=="\t")y=b}if(b>=p)if(y)d.push(y),p=y+h,y=void 0;else if(i==="quoted"){while(N===" "||N==="\t")N=C,C=t[b+=1],A=!0;let T=b>q+1?b-2:v-1;if(w[T])return t;d.push(T),w[T]=!0,p=T+h,y=void 0}else A=!0}N=C}if(A&&f)f();if(d.length===0)return t;if(c)c();let E=t.slice(0,d[0]);for(let C=0;C<d.length;++C){let T=d[C],I=d[C+1]||t.length;if(T===0)E=`
|
|
9
|
-
${s}${t.slice(0,I)}`;else{if(i==="quoted"&&w[T])E+=`${t[T]}\\`;E+=`
|
|
10
|
-
${s}${t.slice(T+1,I)}`}}return E}function ti(t,s,i){let o=s,a=s+1,l=t[a];while(l===" "||l==="\t")if(s<a+i)l=t[++s];else{do l=t[++s];while(l&&l!==`
|
|
11
|
-
`);o=s,a=s+1,l=t[a]}return o}Ia.FOLD_BLOCK="block";Ia.FOLD_FLOW="flow";Ia.FOLD_QUOTED="quoted";Ia.foldFlowLines=Ta});var Ue=m(function(Ka){var X=K(),ae=si(),Ot=(t,s)=>({indentAtStart:s?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),qt=(t)=>/^(%|---|\.\.\.)/m.test(t);function xa(t,s,i){if(!s||s<0)return!1;let o=s-i,a=t.length;if(a<=o)return!1;for(let l=0,c=0;l<a;++l)if(t[l]===`
|
|
12
|
-
`){if(l-c>o)return!0;if(c=l+1,a-c<=o)return!1}return!0}function Fe(t,s){let i=JSON.stringify(t);if(s.options.doubleQuotedAsJSON)return i;let{implicitKey:o}=s,a=s.options.doubleQuotedMinMultiLineLength,l=s.indent||(qt(t)?" ":""),c="",f=0;for(let h=0,d=i[h];d;d=i[++h]){if(d===" "&&i[h+1]==="\\"&&i[h+2]==="n")c+=i.slice(f,h)+"\\ ",h+=1,f=h,d="\\";if(d==="\\")switch(i[h+1]){case"u":{c+=i.slice(f,h);let w=i.substr(h+2,4);switch(w){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(w.substr(0,2)==="00")c+="\\x"+w.substr(2);else c+=i.substr(h,6)}h+=5,f=h+1}break;case"n":if(o||i[h+2]==='"'||i.length<a)h+=1;else{c+=i.slice(f,h)+`
|
|
13
|
-
|
|
14
|
-
`;while(i[h+2]==="\\"&&i[h+3]==="n"&&i[h+4]!=='"')c+=`
|
|
15
|
-
`,h+=2;if(c+=l,i[h+2]===" ")c+="\\";h+=1,f=h+1}break;default:h+=1}}return c=f?c+i.slice(f):i,o?c:ae.foldFlowLines(c,l,ae.FOLD_QUOTED,Ot(s,!1))}function ys(t,s){if(s.options.singleQuote===!1||s.implicitKey&&t.includes(`
|
|
16
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return Fe(t,s);let i=s.indent||(qt(t)?" ":""),o="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
17
|
-
${i}`)+"'";return s.implicitKey?o:ae.foldFlowLines(o,i,ae.FOLD_FLOW,Ot(s,!1))}function qe(t,s){let{singleQuote:i}=s.options,o;if(i===!1)o=Fe;else{let a=t.includes('"'),l=t.includes("'");if(a&&!l)o=ys;else if(l&&!a)o=Fe;else o=i?ys:Fe}return o(t,s)}var bs;try{bs=new RegExp(`(^|(?<!
|
|
18
|
-
))
|
|
19
|
-
+(?!
|
|
20
|
-
|$)`,"g")}catch{bs=/\n+(?!\n|$)/g}function Nt({comment:t,type:s,value:i},o,a,l){let{blockQuote:c,commentString:f,lineWidth:h}=o.options;if(!c||/\n[\t ]+$/.test(i))return qe(i,o);let d=o.indent||(o.forceBlockIndent||qt(i)?" ":""),w=c==="literal"?!0:c==="folded"||s===X.Scalar.BLOCK_FOLDED?!1:s===X.Scalar.BLOCK_LITERAL?!0:!xa(i,h,d.length);if(!i)return w?`|
|
|
21
|
-
`:`>
|
|
22
|
-
`;let p,y;for(y=i.length;y>0;--y){let I=i[y-1];if(I!==`
|
|
23
|
-
`&&I!=="\t"&&I!==" ")break}let N=i.substring(y),A=N.indexOf(`
|
|
24
|
-
`);if(A===-1)p="-";else if(i===N||A!==N.length-1){if(p="+",l)l()}else p="";if(N){if(i=i.slice(0,-N.length),N[N.length-1]===`
|
|
25
|
-
`)N=N.slice(0,-1);N=N.replace(bs,`$&${d}`)}let b=!1,v,q=-1;for(v=0;v<i.length;++v){let I=i[v];if(I===" ")b=!0;else if(I===`
|
|
26
|
-
`)q=v;else break}let E=i.substring(0,q<v?q+1:v);if(E)i=i.substring(E.length),E=E.replace(/\n+/g,`$&${d}`);let T=(b?d?"2":"1":"")+p;if(t){if(T+=" "+f(t.replace(/ ?[\r\n]+/g," ")),a)a()}if(!w){let I=i.replace(/\n+/g,`
|
|
27
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`),P=!1,B=Ot(o,!0);if(c!=="folded"&&s!==X.Scalar.BLOCK_FOLDED)B.onOverflow=()=>{P=!0};let O=ae.foldFlowLines(`${E}${I}${N}`,d,ae.FOLD_BLOCK,B);if(!P)return`>${T}
|
|
28
|
-
${d}${O}`}return i=i.replace(/\n+/g,`$&${d}`),`|${T}
|
|
29
|
-
${d}${E}${i}${N}`}function Da(t,s,i,o){let{type:a,value:l}=t,{actualString:c,implicitKey:f,indent:h,indentStep:d,inFlow:w}=s;if(f&&l.includes(`
|
|
30
|
-
`)||w&&/[[\]{},]/.test(l))return qe(l,s);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return f||w||!l.includes(`
|
|
31
|
-
`)?qe(l,s):Nt(t,s,i,o);if(!f&&!w&&a!==X.Scalar.PLAIN&&l.includes(`
|
|
32
|
-
`))return Nt(t,s,i,o);if(qt(l)){if(h==="")return s.forceBlockIndent=!0,Nt(t,s,i,o);else if(f&&h===d)return qe(l,s)}let p=l.replace(/\n+/g,`$&
|
|
33
|
-
${h}`);if(c){let y=(b)=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(p),{compat:N,tags:A}=s.doc.schema;if(A.some(y)||N?.some(y))return qe(l,s)}return f?p:ae.foldFlowLines(p,h,ae.FOLD_FLOW,Ot(s,!1))}function Ba(t,s,i,o){let{implicitKey:a,inFlow:l}=s,c=typeof t.value==="string"?t:Object.assign({},t,{value:String(t.value)}),{type:f}=t;if(f!==X.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value))f=X.Scalar.QUOTE_DOUBLE}let h=(w)=>{switch(w){case X.Scalar.BLOCK_FOLDED:case X.Scalar.BLOCK_LITERAL:return a||l?qe(c.value,s):Nt(c,s,i,o);case X.Scalar.QUOTE_DOUBLE:return Fe(c.value,s);case X.Scalar.QUOTE_SINGLE:return ys(c.value,s);case X.Scalar.PLAIN:return Da(c,s,i,o);default:return null}},d=h(f);if(d===null){let{defaultKeyType:w,defaultStringType:p}=s.options,y=a&&w||p;if(d=h(y),d===null)throw Error(`Unsupported default string type ${y}`)}return d}Ka.stringifyString=Ba});var Ye=m(function(Qa){var Ra=St(),le=M(),Fa=Re(),Ua=Ue();function Ya(t,s){let i=Object.assign({blockQuote:!0,commentString:Fa.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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,s),o;switch(i.collectionStyle){case"block":o=!1;break;case"flow":o=!0;break;default:o=null}return{anchors:new Set,doc:t,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent==="number"?" ".repeat(i.indent):" ",inFlow:o,options:i}}function Ja(t,s){if(s.tag){let a=t.filter((l)=>l.tag===s.tag);if(a.length>0)return a.find((l)=>l.format===s.format)??a[0]}let i=void 0,o;if(le.isScalar(s)){o=s.value;let a=t.filter((l)=>l.identify?.(o));if(a.length>1){let l=a.filter((c)=>c.test);if(l.length>0)a=l}i=a.find((l)=>l.format===s.format)??a.find((l)=>!l.format)}else o=s,i=t.find((a)=>a.nodeClass&&o instanceof a.nodeClass);if(!i){let a=o?.constructor?.name??(o===null?"null":typeof o);throw Error(`Tag not resolved for ${a} value`)}return i}function Va(t,s,{anchors:i,doc:o}){if(!o.directives)return"";let a=[],l=(le.isScalar(t)||le.isCollection(t))&&t.anchor;if(l&&Ra.anchorIsValid(l))i.add(l),a.push(`&${l}`);let c=t.tag??(s.default?null:s.tag);if(c)a.push(o.directives.tagString(c));return a.join(" ")}function Wa(t,s,i,o){if(le.isPair(t))return t.toString(s,i,o);if(le.isAlias(t)){if(s.doc.directives)return t.toString(s);if(s.resolvedAliases?.has(t))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(s.resolvedAliases)s.resolvedAliases.add(t);else s.resolvedAliases=new Set([t]);t=t.resolve(s.doc)}}let a=void 0,l=le.isNode(t)?t:s.doc.createNode(t,{onTagObj:(h)=>a=h});a??(a=Ja(s.doc.schema.tags,l));let c=Va(l,a,s);if(c.length>0)s.indentAtStart=(s.indentAtStart??0)+c.length+1;let f=typeof a.stringify==="function"?a.stringify(l,s,i,o):le.isScalar(l)?Ua.stringifyString(l,s,i,o):l.toString(s,i,o);if(!c)return f;return le.isScalar(l)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
|
|
34
|
-
${s.indent}${f}`}Qa.createStringifyContext=Ya;Qa.stringify=Wa});var ri=m(function(za){var ie=M(),ni=K(),ii=Ye(),Je=Re();function Xa({key:t,value:s},i,o,a){let{allNullValues:l,doc:c,indent:f,indentStep:h,options:{commentString:d,indentSeq:w,simpleKeys:p}}=i,y=ie.isNode(t)&&t.comment||null;if(p){if(y)throw Error("With simple keys, key nodes cannot have comments");if(ie.isCollection(t)||!ie.isNode(t)&&typeof t==="object")throw Error("With simple keys, collection cannot be used as a key value")}let N=!p&&(!t||y&&s==null&&!i.inFlow||ie.isCollection(t)||(ie.isScalar(t)?t.type===ni.Scalar.BLOCK_FOLDED||t.type===ni.Scalar.BLOCK_LITERAL:typeof t==="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!N&&(p||!l),indent:f+h});let A=!1,b=!1,v=ii.stringify(t,i,()=>A=!0,()=>b=!0);if(!N&&!i.inFlow&&v.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");N=!0}if(i.inFlow){if(l||s==null){if(A&&o)o();return v===""?"?":N?`? ${v}`:v}}else if(l&&!p||s==null&&N){if(v=`? ${v}`,y&&!A)v+=Je.lineComment(v,i.indent,d(y));else if(b&&a)a();return v}if(A)y=null;if(N){if(y)v+=Je.lineComment(v,i.indent,d(y));v=`? ${v}
|
|
35
|
-
${f}:`}else if(v=`${v}:`,y)v+=Je.lineComment(v,i.indent,d(y));let q,E,C;if(ie.isNode(s))q=!!s.spaceBefore,E=s.commentBefore,C=s.comment;else if(q=!1,E=null,C=null,s&&typeof s==="object")s=c.createNode(s);if(i.implicitKey=!1,!N&&!y&&ie.isScalar(s))i.indentAtStart=v.length+1;if(b=!1,!w&&h.length>=2&&!i.inFlow&&!N&&ie.isSeq(s)&&!s.flow&&!s.tag&&!s.anchor)i.indent=i.indent.substring(2);let T=!1,I=ii.stringify(s,i,()=>T=!0,()=>b=!0),P=" ";if(y||q||E){if(P=q?`
|
|
36
|
-
`:"",E){let B=d(E);P+=`
|
|
37
|
-
${Je.indentComment(B,i.indent)}`}if(I===""&&!i.inFlow){if(P===`
|
|
38
|
-
`&&C)P=`
|
|
39
|
-
|
|
40
|
-
`}else P+=`
|
|
41
|
-
${i.indent}`}else if(!N&&ie.isCollection(s)){let B=I[0],O=I.indexOf(`
|
|
42
|
-
`),R=O!==-1,re=i.inFlow??s.flow??s.items.length===0;if(R||!re){let ke=!1;if(R&&(B==="&"||B==="!")){let U=I.indexOf(" ");if(B==="&"&&U!==-1&&U<O&&I[U+1]==="!")U=I.indexOf(" ",U+1);if(U===-1||O<U)ke=!0}if(!ke)P=`
|
|
43
|
-
${i.indent}`}}else if(I===""||I[0]===`
|
|
44
|
-
`)P="";if(v+=P+I,i.inFlow){if(T&&o)o()}else if(C&&!T)v+=Je.lineComment(v,i.indent,d(C));else if(b&&a)a();return v}za.stringifyPair=Xa});var Ss=m(function(sl){var oi=tt("process");function el(t,...s){if(t==="debug")console.log(...s)}function tl(t,s){if(t==="debug"||t==="warn")if(typeof oi.emitWarning==="function")oi.emitWarning(s);else console.warn(s)}sl.debug=el;sl.warn=tl});var Pt=m(function(ol){var Ct=M(),ai=K(),Et="<<",Lt={identify:(t)=>t===Et||typeof t==="symbol"&&t.description===Et,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ai.Scalar(Symbol(Et)),{addToJSMap:li}),stringify:()=>Et},rl=(t,s)=>(Lt.identify(s)||Ct.isScalar(s)&&(!s.type||s.type===ai.Scalar.PLAIN)&&Lt.identify(s.value))&&t?.doc.schema.tags.some((i)=>i.tag===Lt.tag&&i.default);function li(t,s,i){let o=ci(t,i);if(Ct.isSeq(o))for(let a of o.items)ws(t,s,a);else if(Array.isArray(o))for(let a of o)ws(t,s,a);else ws(t,s,o)}function ws(t,s,i){let o=ci(t,i);if(!Ct.isMap(o))throw Error("Merge sources must be maps or map aliases");let a=o.toJSON(null,t,Map);for(let[l,c]of a)if(s instanceof Map){if(!s.has(l))s.set(l,c)}else if(s instanceof Set)s.add(l);else if(!Object.prototype.hasOwnProperty.call(s,l))Object.defineProperty(s,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return s}function ci(t,s){return t&&Ct.isAlias(s)?s.resolve(t.doc,t):s}ol.addMergeToJSMap=li;ol.isMergeKey=rl;ol.merge=Lt});var ks=m(function(pl){var ul=Ss(),ui=Pt(),fl=Ye(),fi=M(),vs=oe();function hl(t,s,{key:i,value:o}){if(fi.isNode(i)&&i.addToJSMap)i.addToJSMap(t,s,o);else if(ui.isMergeKey(t,i))ui.addMergeToJSMap(t,s,o);else{let a=vs.toJS(i,"",t);if(s instanceof Map)s.set(a,vs.toJS(o,a,t));else if(s instanceof Set)s.add(a);else{let l=dl(i,a,t),c=vs.toJS(o,l,t);if(l in s)Object.defineProperty(s,l,{value:c,writable:!0,enumerable:!0,configurable:!0});else s[l]=c}}return s}function dl(t,s,i){if(s===null)return"";if(typeof s!=="object")return String(s);if(fi.isNode(t)&&i?.doc){let o=fl.createStringifyContext(i.doc,{});o.anchors=new Set;for(let l of i.anchors.keys())o.anchors.add(l.anchor);o.inFlow=!0,o.inStringifyKey=!0;let a=t.toString(o);if(!i.mapKeyWarned){let l=JSON.stringify(a);if(l.length>40)l=l.substring(0,36)+'..."';ul.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 a}return JSON.stringify(s)}pl.addPairToJSMap=hl});var ce=m(function(Sl){var di=Ke(),gl=ri(),yl=ks(),Mt=M();function bl(t,s,i){let o=di.createNode(t,void 0,i),a=di.createNode(s,void 0,i);return new _t(o,a)}class _t{constructor(t,s=null){Object.defineProperty(this,Mt.NODE_TYPE,{value:Mt.PAIR}),this.key=t,this.value=s}clone(t){let{key:s,value:i}=this;if(Mt.isNode(s))s=s.clone(t);if(Mt.isNode(i))i=i.clone(t);return new _t(s,i)}toJSON(t,s){let i=s?.mapAsMap?new Map:{};return yl.addPairToJSMap(s,i,this)}toString(t,s,i){return t?.doc?gl.stringifyPair(this,t,s,i):JSON.stringify(this)}}Sl.Pair=_t;Sl.createPair=bl});var Ns=m(function(Ol){var ye=M(),pi=Ye(),$t=Re();function kl(t,s,i){return(s.inFlow??t.flow?Al:Nl)(t,s,i)}function Nl({comment:t,items:s},i,{blockItemPrefix:o,flowChars:a,itemIndent:l,onChompKeep:c,onComment:f}){let{indent:h,options:{commentString:d}}=i,w=Object.assign({},i,{indent:l,type:null}),p=!1,y=[];for(let A=0;A<s.length;++A){let b=s[A],v=null;if(ye.isNode(b)){if(!p&&b.spaceBefore)y.push("");if(xt(i,y,b.commentBefore,p),b.comment)v=b.comment}else if(ye.isPair(b)){let E=ye.isNode(b.key)?b.key:null;if(E){if(!p&&E.spaceBefore)y.push("");xt(i,y,E.commentBefore,p)}}p=!1;let q=pi.stringify(b,w,()=>v=null,()=>p=!0);if(v)q+=$t.lineComment(q,l,d(v));if(p&&v)p=!1;y.push(o+q)}let N;if(y.length===0)N=a.start+a.end;else{N=y[0];for(let A=1;A<y.length;++A){let b=y[A];N+=b?`
|
|
45
|
-
${h}${b}`:`
|
|
46
|
-
`}}if(t){if(N+=`
|
|
47
|
-
`+$t.indentComment(d(t),h),f)f()}else if(p&&c)c();return N}function Al({items:t},s,{flowChars:i,itemIndent:o}){let{indent:a,indentStep:l,flowCollectionPadding:c,options:{commentString:f}}=s;o+=l;let h=Object.assign({},s,{indent:o,inFlow:!0,type:null}),d=!1,w=0,p=[];for(let A=0;A<t.length;++A){let b=t[A],v=null;if(ye.isNode(b)){if(b.spaceBefore)p.push("");if(xt(s,p,b.commentBefore,!1),b.comment)v=b.comment}else if(ye.isPair(b)){let E=ye.isNode(b.key)?b.key:null;if(E){if(E.spaceBefore)p.push("");if(xt(s,p,E.commentBefore,!1),E.comment)d=!0}let C=ye.isNode(b.value)?b.value:null;if(C){if(C.comment)v=C.comment;if(C.commentBefore)d=!0}else if(b.value==null&&E?.comment)v=E.comment}if(v)d=!0;let q=pi.stringify(b,h,()=>v=null);if(d||(d=p.length>w||q.includes(`
|
|
48
|
-
`)),A<t.length-1)q+=",";else if(s.options.trailingComma){if(s.options.lineWidth>0)d||(d=p.reduce((E,C)=>E+C.length+2,2)+(q.length+2)>s.options.lineWidth);if(d)q+=","}if(v)q+=$t.lineComment(q,o,f(v));p.push(q),w=p.length}let{start:y,end:N}=i;if(p.length===0)return y+N;else{if(!d){let A=p.reduce((b,v)=>b+v.length+2,2);d=s.options.lineWidth>0&&A>s.options.lineWidth}if(d){let A=y;for(let b of p)A+=b?`
|
|
49
|
-
${l}${a}${b}`:`
|
|
50
|
-
`;return`${A}
|
|
51
|
-
${a}${N}`}else return`${y}${c}${p.join(" ")}${c}${N}`}}function xt({indent:t,options:{commentString:s}},i,o,a){if(o&&a)o=o.replace(/^\n+/,"");if(o){let l=$t.indentComment(s(o),t);i.push(l.trimStart())}}Ol.stringifyCollection=kl});var fe=m(function(Il){var El=Ns(),Ll=ks(),Cl=kt(),ue=M(),Dt=ce(),Tl=K();function Ve(t,s){let i=ue.isScalar(s)?s.value:s;for(let o of t)if(ue.isPair(o)){if(o.key===s||o.key===i)return o;if(ue.isScalar(o.key)&&o.key.value===i)return o}return}class yi extends Cl.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(ue.MAP,t);this.items=[]}static from(t,s,i){let{keepUndefined:o,replacer:a}=i,l=new this(t),c=(f,h)=>{if(typeof a==="function")h=a.call(s,f,h);else if(Array.isArray(a)&&!a.includes(f))return;if(h!==void 0||o)l.items.push(Dt.createPair(f,h,i))};if(s instanceof Map)for(let[f,h]of s)c(f,h);else if(s&&typeof s==="object")for(let f of Object.keys(s))c(f,s[f]);if(typeof t.sortMapEntries==="function")l.items.sort(t.sortMapEntries);return l}add(t,s){let i;if(ue.isPair(t))i=t;else if(!t||typeof t!=="object"||!("key"in t))i=new Dt.Pair(t,t?.value);else i=new Dt.Pair(t.key,t.value);let o=Ve(this.items,i.key),a=this.schema?.sortMapEntries;if(o){if(!s)throw Error(`Key ${i.key} already set`);if(ue.isScalar(o.value)&&Tl.isScalarValue(i.value))o.value.value=i.value;else o.value=i.value}else if(a){let l=this.items.findIndex((c)=>a(i,c)<0);if(l===-1)this.items.push(i);else this.items.splice(l,0,i)}else this.items.push(i)}delete(t){let s=Ve(this.items,t);if(!s)return!1;return this.items.splice(this.items.indexOf(s),1).length>0}get(t,s){let o=Ve(this.items,t)?.value;return(!s&&ue.isScalar(o)?o.value:o)??void 0}has(t){return!!Ve(this.items,t)}set(t,s){this.add(new Dt.Pair(t,s),!0)}toJSON(t,s,i){let o=i?new i:s?.mapAsMap?new Map:{};if(s?.onCreate)s.onCreate(o);for(let a of this.items)Ll.addPairToJSMap(s,o,a);return o}toString(t,s,i){if(!t)return JSON.stringify(this);for(let o of this.items)if(!ue.isPair(o))throw Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);if(!t.allNullValues&&this.hasAllNullValues(!1))t=Object.assign({},t,{allNullValues:!0});return El.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:s})}}Il.YAMLMap=yi;Il.findPair=Ve});var Ee=m(function(xl){var _l=M(),bi=fe(),$l={collection:"map",default:!0,nodeClass:bi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,s){if(!_l.isMap(t))s("Expected a mapping for this tag");return t},createNode:(t,s,i)=>bi.YAMLMap.from(t,s,i)};xl.map=$l});var he=m(function(Ul){var Bl=Ke(),Kl=Ns(),jl=kt(),Kt=M(),Rl=K(),Fl=oe();class Si extends jl.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Kt.SEQ,t);this.items=[]}add(t){this.items.push(t)}delete(t){let s=Bt(t);if(typeof s!=="number")return!1;return this.items.splice(s,1).length>0}get(t,s){let i=Bt(t);if(typeof i!=="number")return;let o=this.items[i];return!s&&Kt.isScalar(o)?o.value:o}has(t){let s=Bt(t);return typeof s==="number"&&s<this.items.length}set(t,s){let i=Bt(t);if(typeof i!=="number")throw Error(`Expected a valid index, not ${t}.`);let o=this.items[i];if(Kt.isScalar(o)&&Rl.isScalarValue(s))o.value=s;else this.items[i]=s}toJSON(t,s){let i=[];if(s?.onCreate)s.onCreate(i);let o=0;for(let a of this.items)i.push(Fl.toJS(a,String(o++),s));return i}toString(t,s,i){if(!t)return JSON.stringify(this);return Kl.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:s})}static from(t,s,i){let{replacer:o}=i,a=new this(t);if(s&&Symbol.iterator in Object(s)){let l=0;for(let c of s){if(typeof o==="function"){let f=s instanceof Set?c:String(l++);c=o.call(s,f,c)}a.items.push(Bl.createNode(c,void 0,i))}}return a}}function Bt(t){let s=Kt.isScalar(t)?t.value:t;if(s&&typeof s==="string")s=Number(s);return typeof s==="number"&&Number.isInteger(s)&&s>=0?s:null}Ul.YAMLSeq=Si});var Le=m(function(Wl){var Jl=M(),wi=he(),Vl={collection:"seq",default:!0,nodeClass:wi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,s){if(!Jl.isSeq(t))s("Expected a sequence for this tag");return t},createNode:(t,s,i)=>wi.YAMLSeq.from(t,s,i)};Wl.seq=Vl});var We=m(function(Xl){var Gl=Ue(),Hl={identify:(t)=>typeof t==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(t)=>t,stringify(t,s,i,o){return s=Object.assign({actualString:!0},s),Gl.stringifyString(t,s,i,o)}};Xl.string=Hl});var jt=m(function(Zl){var vi=K(),ki={identify:(t)=>t==null,createNode:()=>new vi.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new vi.Scalar(null),stringify:({source:t},s)=>typeof t==="string"&&ki.test.test(t)?t:s.options.nullStr};Zl.nullTag=ki});var As=m(function(sc){var tc=K(),Ni={identify:(t)=>typeof t==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(t)=>new tc.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:s},i){if(t&&Ni.test.test(t)){let o=t[0]==="t"||t[0]==="T";if(s===o)return t}return s?i.options.trueStr:i.options.falseStr}};sc.boolTag=Ni});var Te=m(function(rc){function ic({format:t,minFractionDigits:s,tag:i,value:o}){if(typeof o==="bigint")return String(o);let a=typeof o==="number"?o:Number(o);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let l=Object.is(o,-0)?"-0":JSON.stringify(o);if(!t&&s&&(!i||i==="tag:yaml.org,2002:float")&&/^-?\d/.test(l)&&!l.includes("e")){let c=l.indexOf(".");if(c<0)c=l.length,l+=".";let f=s-(l.length-c-1);while(f-- >0)l+="0"}return l}rc.stringifyNumber=ic});var qs=m(function(fc){var ac=K(),Os=Te(),lc={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(t)=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Os.stringifyNumber},cc={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(t)=>parseFloat(t),stringify(t){let s=Number(t.value);return isFinite(s)?s.toExponential():Os.stringifyNumber(t)}},uc={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let s=new ac.Scalar(parseFloat(t)),i=t.indexOf(".");if(i!==-1&&t[t.length-1]==="0")s.minFractionDigits=t.length-i-1;return s},stringify:Os.stringifyNumber};fc.float=uc;fc.floatExp=cc;fc.floatNaN=lc});var Ls=m(function(bc){var Ai=Te(),Rt=(t)=>typeof t==="bigint"||Number.isInteger(t),Es=(t,s,i,{intAsBigInt:o})=>o?BigInt(t):parseInt(t.substring(s),i);function Oi(t,s,i){let{value:o}=t;if(Rt(o)&&o>=0)return i+o.toString(s);return Ai.stringifyNumber(t)}var mc={identify:(t)=>Rt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,s,i)=>Es(t,2,8,i),stringify:(t)=>Oi(t,8,"0o")},gc={identify:Rt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,s,i)=>Es(t,0,10,i),stringify:Ai.stringifyNumber},yc={identify:(t)=>Rt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,s,i)=>Es(t,2,16,i),stringify:(t)=>Oi(t,16,"0x")};bc.int=gc;bc.intHex=yc;bc.intOct=mc});var qi=m(function(Lc){var kc=Ee(),Nc=jt(),Ac=Le(),Oc=We(),qc=As(),Cs=qs(),Ps=Ls(),Ec=[kc.map,Ac.seq,Oc.string,Nc.nullTag,qc.boolTag,Ps.intOct,Ps.int,Ps.intHex,Cs.floatNaN,Cs.floatExp,Cs.float];Lc.schema=Ec});var Li=m(function(xc){var Tc=K(),Ic=Ee(),Pc=Le();function Ei(t){return typeof t==="bigint"||Number.isInteger(t)}var Ft=({value:t})=>JSON.stringify(t),Mc=[{identify:(t)=>typeof t==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(t)=>t,stringify:Ft},{identify:(t)=>t==null,createNode:()=>new Tc.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ft},{identify:(t)=>typeof t==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(t)=>t==="true",stringify:Ft},{identify:Ei,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,s,{intAsBigInt:i})=>i?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ei(t)?t.toString():JSON.stringify(t)},{identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(t)=>parseFloat(t),stringify:Ft}],_c={default:!0,tag:"",test:/^/,resolve(t,s){return s(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},$c=[Ic.map,Pc.seq].concat(Mc,_c);xc.schema=$c});var _s=m(function(jc){var ze=tt("buffer"),Ms=K(),Bc=Ue(),Kc={identify:(t)=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,s){if(typeof ze.Buffer==="function")return ze.Buffer.from(t,"base64");else if(typeof atob==="function"){let i=atob(t.replace(/[\n\r]/g,"")),o=new Uint8Array(i.length);for(let a=0;a<i.length;++a)o[a]=i.charCodeAt(a);return o}else return s("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:s,value:i},o,a,l){if(!i)return"";let c=i,f;if(typeof ze.Buffer==="function")f=c instanceof ze.Buffer?c.toString("base64"):ze.Buffer.from(c.buffer).toString("base64");else if(typeof btoa==="function"){let h="";for(let d=0;d<c.length;++d)h+=String.fromCharCode(c[d]);f=btoa(h)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(s??(s=Ms.Scalar.BLOCK_LITERAL),s!==Ms.Scalar.QUOTE_DOUBLE){let h=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),d=Math.ceil(f.length/h),w=Array(d);for(let p=0,y=0;p<d;++p,y+=h)w[p]=f.substr(y,h);f=w.join(s===Ms.Scalar.BLOCK_LITERAL?`
|
|
52
|
-
`:" ")}return Bc.stringifyString({comment:t,type:s,value:f},o,a,l)}};jc.binary=Kc});var Yt=m(function(Jc){var Ut=M(),$s=ce(),Fc=K(),Uc=he();function Ci(t,s){if(Ut.isSeq(t))for(let i=0;i<t.items.length;++i){let o=t.items[i];if(Ut.isPair(o))continue;else if(Ut.isMap(o)){if(o.items.length>1)s("Each pair must have its own sequence indicator");let a=o.items[0]||new $s.Pair(new Fc.Scalar(null));if(o.commentBefore)a.key.commentBefore=a.key.commentBefore?`${o.commentBefore}
|
|
53
|
-
${a.key.commentBefore}`:o.commentBefore;if(o.comment){let l=a.value??a.key;l.comment=l.comment?`${o.comment}
|
|
54
|
-
${l.comment}`:o.comment}o=a}t.items[i]=Ut.isPair(o)?o:new $s.Pair(o)}else s("Expected a sequence for this tag");return t}function Ti(t,s,i){let{replacer:o}=i,a=new Uc.YAMLSeq(t);a.tag="tag:yaml.org,2002:pairs";let l=0;if(s&&Symbol.iterator in Object(s))for(let c of s){if(typeof o==="function")c=o.call(s,String(l++),c);let f,h;if(Array.isArray(c))if(c.length===2)f=c[0],h=c[1];else throw TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){let d=Object.keys(c);if(d.length===1)f=d[0],h=c[f];else throw TypeError(`Expected tuple with one key, not ${d.length} keys`)}else f=c;a.items.push($s.createPair(f,h,i))}return a}var Yc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ci,createNode:Ti};Jc.createPairs=Ti;Jc.pairs=Yc;Jc.resolvePairs=Ci});var Ds=m(function(Xc){var Ii=M(),xs=oe(),Ze=fe(),Gc=he(),Pi=Yt();class be extends Gc.YAMLSeq{constructor(){super();this.add=Ze.YAMLMap.prototype.add.bind(this),this.delete=Ze.YAMLMap.prototype.delete.bind(this),this.get=Ze.YAMLMap.prototype.get.bind(this),this.has=Ze.YAMLMap.prototype.has.bind(this),this.set=Ze.YAMLMap.prototype.set.bind(this),this.tag=be.tag}toJSON(t,s){if(!s)return super.toJSON(t);let i=new Map;if(s?.onCreate)s.onCreate(i);for(let o of this.items){let a,l;if(Ii.isPair(o))a=xs.toJS(o.key,"",s),l=xs.toJS(o.value,a,s);else a=xs.toJS(o,"",s);if(i.has(a))throw Error("Ordered maps must not include duplicate keys");i.set(a,l)}return i}static from(t,s,i){let o=Pi.createPairs(t,s,i),a=new this;return a.items=o.items,a}}be.tag="tag:yaml.org,2002:omap";var Hc={collection:"seq",identify:(t)=>t instanceof Map,nodeClass:be,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,s){let i=Pi.resolvePairs(t,s),o=[];for(let{key:a}of i.items)if(Ii.isScalar(a))if(o.includes(a.value))s(`Ordered maps must not include duplicate keys: ${a.value}`);else o.push(a.value);return Object.assign(new be,i)},createNode:(t,s,i)=>be.from(t,s,i)};Xc.YAMLOMap=be;Xc.omap=Hc});var Di=m(function(eu){var Mi=K();function _i({value:t,source:s},i){if(s&&(t?$i:xi).test.test(s))return s;return t?i.options.trueStr:i.options.falseStr}var $i={identify:(t)=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Mi.Scalar(!0),stringify:_i},xi={identify:(t)=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Mi.Scalar(!1),stringify:_i};eu.falseTag=xi;eu.trueTag=$i});var Bi=m(function(au){var nu=K(),Bs=Te(),iu={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(t)=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Bs.stringifyNumber},ru={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(t)=>parseFloat(t.replace(/_/g,"")),stringify(t){let s=Number(t.value);return isFinite(s)?s.toExponential():Bs.stringifyNumber(t)}},ou={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let s=new nu.Scalar(parseFloat(t.replace(/_/g,""))),i=t.indexOf(".");if(i!==-1){let o=t.substring(i+1).replace(/_/g,"");if(o[o.length-1]==="0")s.minFractionDigits=o.length}return s},stringify:Bs.stringifyNumber};au.float=ou;au.floatExp=ru;au.floatNaN=iu});var ji=m(function(mu){var Ki=Te(),et=(t)=>typeof t==="bigint"||Number.isInteger(t);function Jt(t,s,i,{intAsBigInt:o}){let a=t[0];if(a==="-"||a==="+")s+=1;if(t=t.substring(s).replace(/_/g,""),o){switch(i){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let c=BigInt(t);return a==="-"?BigInt(-1)*c:c}let l=parseInt(t,i);return a==="-"?-1*l:l}function Ks(t,s,i){let{value:o}=t;if(et(o)){let a=o.toString(s);return o<0?"-"+i+a.substr(1):i+a}return Ki.stringifyNumber(t)}var fu={identify:et,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,s,i)=>Jt(t,2,2,i),stringify:(t)=>Ks(t,2,"0b")},hu={identify:et,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,s,i)=>Jt(t,1,8,i),stringify:(t)=>Ks(t,8,"0")},du={identify:et,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,s,i)=>Jt(t,0,10,i),stringify:Ki.stringifyNumber},pu={identify:et,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,s,i)=>Jt(t,2,16,i),stringify:(t)=>Ks(t,16,"0x")};mu.int=du;mu.intBin=fu;mu.intHex=pu;mu.intOct=hu});var js=m(function(vu){var Qt=M(),Vt=ce(),Wt=fe();class Se extends Wt.YAMLMap{constructor(t){super(t);this.tag=Se.tag}add(t){let s;if(Qt.isPair(t))s=t;else if(t&&typeof t==="object"&&"key"in t&&"value"in t&&t.value===null)s=new Vt.Pair(t.key,null);else s=new Vt.Pair(t,null);if(!Wt.findPair(this.items,s.key))this.items.push(s)}get(t,s){let i=Wt.findPair(this.items,t);return!s&&Qt.isPair(i)?Qt.isScalar(i.key)?i.key.value:i.key:i}set(t,s){if(typeof s!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof s}`);let i=Wt.findPair(this.items,t);if(i&&!s)this.items.splice(this.items.indexOf(i),1);else if(!i&&s)this.items.push(new Vt.Pair(t))}toJSON(t,s){return super.toJSON(t,s,Set)}toString(t,s,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),s,i);else throw Error("Set items must all have null values")}static from(t,s,i){let{replacer:o}=i,a=new this(t);if(s&&Symbol.iterator in Object(s))for(let l of s){if(typeof o==="function")l=o.call(s,l,l);a.items.push(Vt.createPair(l,null,i))}return a}}Se.tag="tag:yaml.org,2002:set";var wu={collection:"map",identify:(t)=>t instanceof Set,nodeClass:Se,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,s,i)=>Se.from(t,s,i),resolve(t,s){if(Qt.isMap(t))if(t.hasAllNullValues(!0))return Object.assign(new Se,t);else s("Set items must all have null values");else s("Expected a mapping for this tag");return t}};vu.YAMLSet=Se;vu.set=wu});var Fs=m(function(Eu){var Au=Te();function Rs(t,s){let i=t[0],o=i==="-"||i==="+"?t.substring(1):t,a=(c)=>s?BigInt(c):Number(c),l=o.replace(/_/g,"").split(":").reduce((c,f)=>c*a(60)+a(f),a(0));return i==="-"?a(-1)*l:l}function Ri(t){let{value:s}=t,i=(c)=>c;if(typeof s==="bigint")i=(c)=>BigInt(c);else if(isNaN(s)||!isFinite(s))return Au.stringifyNumber(t);let o="";if(s<0)o="-",s*=i(-1);let a=i(60),l=[s%a];if(s<60)l.unshift(0);else if(s=(s-l[0])/a,l.unshift(s%a),s>=60)s=(s-l[0])/a,l.unshift(s);return o+l.map((c)=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Ou={identify:(t)=>typeof t==="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,s,{intAsBigInt:i})=>Rs(t,i),stringify:Ri},qu={identify:(t)=>typeof t==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(t)=>Rs(t,!1),stringify:Ri},Fi={identify:(t)=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let s=t.match(Fi.test);if(!s)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,i,o,a,l,c,f]=s.map(Number),h=s[7]?Number((s[7]+"00").substr(1,3)):0,d=Date.UTC(i,o-1,a,l||0,c||0,f||0,h),w=s[8];if(w&&w!=="Z"){let p=Rs(w,!1);if(Math.abs(p)<30)p*=60;d-=60000*p}return new Date(d)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Eu.floatTime=qu;Eu.intTime=Ou;Eu.timestamp=Fi});var Yi=m(function(Ru){var Iu=Ee(),Pu=jt(),Mu=Le(),_u=We(),$u=_s(),Ui=Di(),Us=Bi(),Gt=ji(),xu=Pt(),Du=Ds(),Bu=Yt(),Ku=js(),Ys=Fs(),ju=[Iu.map,Mu.seq,_u.string,Pu.nullTag,Ui.trueTag,Ui.falseTag,Gt.intBin,Gt.intOct,Gt.int,Gt.intHex,Us.floatNaN,Us.floatExp,Us.float,$u.binary,xu.merge,Du.omap,Bu.pairs,Ku.set,Ys.intTime,Ys.floatTime,Ys.timestamp];Ru.schema=ju});var er=m(function(Hu){var Qi=Ee(),Uu=jt(),Gi=Le(),Yu=We(),Ju=As(),Js=qs(),Vs=Ls(),Vu=qi(),Wu=Li(),Hi=_s(),st=Pt(),Xi=Ds(),zi=Yt(),Ji=Yi(),Zi=js(),Ht=Fs(),Vi=new Map([["core",Vu.schema],["failsafe",[Qi.map,Gi.seq,Yu.string]],["json",Wu.schema],["yaml11",Ji.schema],["yaml-1.1",Ji.schema]]),Wi={binary:Hi.binary,bool:Ju.boolTag,float:Js.float,floatExp:Js.floatExp,floatNaN:Js.floatNaN,floatTime:Ht.floatTime,int:Vs.int,intHex:Vs.intHex,intOct:Vs.intOct,intTime:Ht.intTime,map:Qi.map,merge:st.merge,null:Uu.nullTag,omap:Xi.omap,pairs:zi.pairs,seq:Gi.seq,set:Zi.set,timestamp:Ht.timestamp},Qu={"tag:yaml.org,2002:binary":Hi.binary,"tag:yaml.org,2002:merge":st.merge,"tag:yaml.org,2002:omap":Xi.omap,"tag:yaml.org,2002:pairs":zi.pairs,"tag:yaml.org,2002:set":Zi.set,"tag:yaml.org,2002:timestamp":Ht.timestamp};function Gu(t,s,i){let o=Vi.get(s);if(o&&!t)return i&&!o.includes(st.merge)?o.concat(st.merge):o.slice();let a=o;if(!a)if(Array.isArray(t))a=[];else{let l=Array.from(Vi.keys()).filter((c)=>c!=="yaml11").map((c)=>JSON.stringify(c)).join(", ");throw Error(`Unknown schema "${s}"; use one of ${l} or define customTags array`)}if(Array.isArray(t))for(let l of t)a=a.concat(l);else if(typeof t==="function")a=t(a.slice());if(i)a=a.concat(st.merge);return a.reduce((l,c)=>{let f=typeof c==="string"?Wi[c]:c;if(!f){let h=JSON.stringify(c),d=Object.keys(Wi).map((w)=>JSON.stringify(w)).join(", ");throw Error(`Unknown custom tag ${h}; use one of ${d}`)}if(!l.includes(f))l.push(f);return l},[])}Hu.coreKnownTags=Qu;Hu.getTags=Gu});var Gs=m(function(nf){var Ws=M(),Zu=Ee(),ef=Le(),tf=We(),Xt=er(),sf=(t,s)=>t.key<s.key?-1:t.key>s.key?1:0;class Qs{constructor({compat:t,customTags:s,merge:i,resolveKnownTags:o,schema:a,sortMapEntries:l,toStringDefaults:c}){this.compat=Array.isArray(t)?Xt.getTags(t,"compat"):t?Xt.getTags(null,t):null,this.name=typeof a==="string"&&a||"core",this.knownTags=o?Xt.coreKnownTags:{},this.tags=Xt.getTags(s,this.name,i),this.toStringOptions=c??null,Object.defineProperty(this,Ws.MAP,{value:Zu.map}),Object.defineProperty(this,Ws.SCALAR,{value:tf.string}),Object.defineProperty(this,Ws.SEQ,{value:ef.seq}),this.sortMapEntries=typeof l==="function"?l:l===!0?sf:null}clone(){let t=Object.create(Qs.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}nf.Schema=Qs});var tr=m(function(lf){var of=M(),Hs=Ye(),nt=Re();function af(t,s){let i=[],o=s.directives===!0;if(s.directives!==!1&&t.directives){let h=t.directives.toString(t);if(h)i.push(h),o=!0;else if(t.directives.docStart)o=!0}if(o)i.push("---");let a=Hs.createStringifyContext(t,s),{commentString:l}=a.options;if(t.commentBefore){if(i.length!==1)i.unshift("");let h=l(t.commentBefore);i.unshift(nt.indentComment(h,""))}let c=!1,f=null;if(t.contents){if(of.isNode(t.contents)){if(t.contents.spaceBefore&&o)i.push("");if(t.contents.commentBefore){let w=l(t.contents.commentBefore);i.push(nt.indentComment(w,""))}a.forceBlockIndent=!!t.comment,f=t.contents.comment}let h=f?void 0:()=>c=!0,d=Hs.stringify(t.contents,a,()=>f=null,h);if(f)d+=nt.lineComment(d,"",l(f));if((d[0]==="|"||d[0]===">")&&i[i.length-1]==="---")i[i.length-1]=`--- ${d}`;else i.push(d)}else i.push(Hs.stringify(t.contents,a));if(t.directives?.docEnd)if(t.comment){let h=l(t.comment);if(h.includes(`
|
|
55
|
-
`))i.push("..."),i.push(nt.indentComment(h,""));else i.push(`... ${h}`)}else i.push("...");else{let h=t.comment;if(h&&c)h=h.replace(/^\n+/,"");if(h){if((!c||f)&&i[i.length-1]!=="")i.push("");i.push(nt.indentComment(l(h),""))}}return i.join(`
|
|
56
|
-
`)+`
|
|
57
|
-
`}lf.stringifyDocument=af});var it=m(function(yf){var uf=Be(),Pe=kt(),H=M(),ff=ce(),hf=oe(),df=Gs(),pf=tr(),Xs=St(),mf=fs(),gf=Ke(),zs=us();class Zs{constructor(t,s,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,H.NODE_TYPE,{value:H.DOC});let o=null;if(typeof s==="function"||Array.isArray(s))o=s;else if(i===void 0&&s)i=s,s=void 0;let a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=a;let{version:l}=a;if(i?._directives){if(this.directives=i._directives.atDocument(),this.directives.yaml.explicit)l=this.directives.yaml.version}else this.directives=new zs.Directives({version:l});this.setSchema(l,i),this.contents=t===void 0?null:this.createNode(t,o,i)}clone(){let t=Object.create(Zs.prototype,{[H.NODE_TYPE]:{value:H.DOC}});if(t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives)t.directives=this.directives.clone();if(t.schema=this.schema.clone(),t.contents=H.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range)t.range=this.range.slice();return t}add(t){if(Me(this.contents))this.contents.add(t)}addIn(t,s){if(Me(this.contents))this.contents.addIn(t,s)}createAlias(t,s){if(!t.anchor){let i=Xs.anchorNames(this);t.anchor=!s||i.has(s)?Xs.findNewAnchor(s||"a",i):s}return new uf.Alias(t.anchor)}createNode(t,s,i){let o=void 0;if(typeof s==="function")t=s.call({"":t},"",t),o=s;else if(Array.isArray(s)){let b=(q)=>typeof q==="number"||q instanceof String||q instanceof Number,v=s.filter(b).map(String);if(v.length>0)s=s.concat(v);o=s}else if(i===void 0&&s)i=s,s=void 0;let{aliasDuplicateObjects:a,anchorPrefix:l,flow:c,keepUndefined:f,onTagObj:h,tag:d}=i??{},{onAnchor:w,setAnchors:p,sourceObjects:y}=Xs.createNodeAnchors(this,l||"a"),N={aliasDuplicateObjects:a??!0,keepUndefined:f??!1,onAnchor:w,onTagObj:h,replacer:o,schema:this.schema,sourceObjects:y},A=gf.createNode(t,d,N);if(c&&H.isCollection(A))A.flow=!0;return p(),A}createPair(t,s,i={}){let o=this.createNode(t,null,i),a=this.createNode(s,null,i);return new ff.Pair(o,a)}delete(t){return Me(this.contents)?this.contents.delete(t):!1}deleteIn(t){if(Pe.isEmptyPath(t)){if(this.contents==null)return!1;return this.contents=null,!0}return Me(this.contents)?this.contents.deleteIn(t):!1}get(t,s){return H.isCollection(this.contents)?this.contents.get(t,s):void 0}getIn(t,s){if(Pe.isEmptyPath(t))return!s&&H.isScalar(this.contents)?this.contents.value:this.contents;return H.isCollection(this.contents)?this.contents.getIn(t,s):void 0}has(t){return H.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){if(Pe.isEmptyPath(t))return this.contents!==void 0;return H.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,s){if(this.contents==null)this.contents=Pe.collectionFromPath(this.schema,[t],s);else if(Me(this.contents))this.contents.set(t,s)}setIn(t,s){if(Pe.isEmptyPath(t))this.contents=s;else if(this.contents==null)this.contents=Pe.collectionFromPath(this.schema,Array.from(t),s);else if(Me(this.contents))this.contents.setIn(t,s)}setSchema(t,s={}){if(typeof t==="number")t=String(t);let i;switch(t){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new zs.Directives({version:"1.1"});i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=t;else this.directives=new zs.Directives({version:t});i={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;i=null;break;default:{let o=JSON.stringify(t);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(s.schema instanceof Object)this.schema=s.schema;else if(i)this.schema=new df.Schema(Object.assign(i,s));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:s,mapAsMap:i,maxAliasCount:o,onAnchor:a,reviver:l}={}){let c={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof o==="number"?o:100},f=hf.toJS(this.contents,s??"",c);if(typeof a==="function")for(let{count:h,res:d}of c.anchors.values())a(d,h);return typeof l==="function"?mf.applyReviver(l,{"":f},"",f):f}toJSON(t,s){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:s})}toString(t={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let s=JSON.stringify(t.indent);throw Error(`"indent" option must be a positive integer, not ${s}`)}return pf.stringifyDocument(this,t)}}function Me(t){if(H.isCollection(t))return!0;throw Error("Expected a YAML collection as document contents")}yf.Document=Zs});var rt=m(function(wf){class zt extends Error{constructor(t,s,i,o){super();this.name=t,this.code=i,this.message=o,this.pos=s}}class sr extends zt{constructor(t,s,i){super("YAMLParseError",t,s,i)}}class nr extends zt{constructor(t,s,i){super("YAMLWarning",t,s,i)}}var Sf=(t,s)=>(i)=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map((f)=>s.linePos(f));let{line:o,col:a}=i.linePos[0];i.message+=` at line ${o}, column ${a}`;let l=a-1,c=t.substring(s.lineStarts[o-1],s.lineStarts[o]).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(o>1&&/^ *$/.test(c.substring(0,l))){let f=t.substring(s.lineStarts[o-2],s.lineStarts[o-1]);if(f.length>80)f=f.substring(0,79)+`…
|
|
58
|
-
`;c=f+c}if(/[^ ]/.test(c)){let f=1,h=i.linePos[1];if(h?.line===o&&h.col>a)f=Math.max(1,Math.min(h.col-a,80-l));let d=" ".repeat(l)+"^".repeat(f);i.message+=`:
|
|
59
|
-
|
|
60
|
-
${c}
|
|
61
|
-
${d}
|
|
62
|
-
`}};wf.YAMLError=zt;wf.YAMLParseError=sr;wf.YAMLWarning=nr;wf.prettifyError=Sf});var ot=m(function(qf){function Of(t,{flow:s,indicator:i,next:o,offset:a,onError:l,parentIndent:c,startOnNewline:f}){let h=!1,d=f,w=f,p="",y="",N=!1,A=!1,b=null,v=null,q=null,E=null,C=null,T=null,I=null;for(let O of t){if(A){if(O.type!=="space"&&O.type!=="newline"&&O.type!=="comma")l(O.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");A=!1}if(b){if(d&&O.type!=="comment"&&O.type!=="newline")l(b,"TAB_AS_INDENT","Tabs are not allowed as indentation");b=null}switch(O.type){case"space":if(!s&&(i!=="doc-start"||o?.type!=="flow-collection")&&O.source.includes("\t"))b=O;w=!0;break;case"comment":{if(!w)l(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let R=O.source.substring(1)||" ";if(!p)p=R;else p+=y+R;y="",d=!1;break}case"newline":if(d){if(p)p+=O.source;else if(!T||i!=="seq-item-ind")h=!0}else y+=O.source;if(d=!0,N=!0,v||q)E=O;w=!0;break;case"anchor":if(v)l(O,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(O.source.endsWith(":"))l(O.offset+O.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);v=O,I??(I=O.offset),d=!1,w=!1,A=!0;break;case"tag":{if(q)l(O,"MULTIPLE_TAGS","A node can have at most one tag");q=O,I??(I=O.offset),d=!1,w=!1,A=!0;break}case i:if(v||q)l(O,"BAD_PROP_ORDER",`Anchors and tags must be after the ${O.source} indicator`);if(T)l(O,"UNEXPECTED_TOKEN",`Unexpected ${O.source} in ${s??"collection"}`);T=O,d=i==="seq-item-ind"||i==="explicit-key-ind",w=!1;break;case"comma":if(s){if(C)l(O,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);C=O,d=!1,w=!1;break}default:l(O,"UNEXPECTED_TOKEN",`Unexpected ${O.type} token`),d=!1,w=!1}}let P=t[t.length-1],B=P?P.offset+P.source.length:a;if(A&&o&&o.type!=="space"&&o.type!=="newline"&&o.type!=="comma"&&(o.type!=="scalar"||o.source!==""))l(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(b&&(d&&b.indent<=c||o?.type==="block-map"||o?.type==="block-seq"))l(b,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:C,found:T,spaceBefore:h,comment:p,hasNewline:N,anchor:v,tag:q,newlineAfterProp:E,end:B,start:I??B}}qf.resolveProps=Of});var Zt=m(function(Lf){function en(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
63
|
-
`))return!0;if(t.end){for(let s of t.end)if(s.type==="newline")return!0}return!1;case"flow-collection":for(let s of t.items){for(let i of s.start)if(i.type==="newline")return!0;if(s.sep){for(let i of s.sep)if(i.type==="newline")return!0}if(en(s.key)||en(s.value))return!0}return!1;default:return!0}}Lf.containsNewline=en});var tn=m(function(Pf){var Tf=Zt();function If(t,s,i){if(s?.type==="flow-collection"){let o=s.end[0];if(o.indent===t&&(o.source==="]"||o.source==="}")&&Tf.containsNewline(s))i(o,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Pf.flowIndentCheck=If});var sn=m(function($f){var ir=M();function _f(t,s,i){let{uniqueKeys:o}=t.options;if(o===!1)return!1;let a=typeof o==="function"?o:(l,c)=>l===c||ir.isScalar(l)&&ir.isScalar(c)&&l.value===c.value;return s.some((l)=>a(l.key,i))}$f.mapIncludes=_f});var cr=m(function(Rf){var rr=ce(),Df=fe(),or=ot(),Bf=Zt(),ar=tn(),Kf=sn(),lr="All mapping items must start at the same column";function jf({composeNode:t,composeEmptyNode:s},i,o,a,l){let f=new(l?.nodeClass??Df.YAMLMap)(i.schema);if(i.atRoot)i.atRoot=!1;let h=o.offset,d=null;for(let w of o.items){let{start:p,key:y,sep:N,value:A}=w,b=or.resolveProps(p,{indicator:"explicit-key-ind",next:y??N?.[0],offset:h,onError:a,parentIndent:o.indent,startOnNewline:!0}),v=!b.found;if(v){if(y){if(y.type==="block-seq")a(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in y&&y.indent!==o.indent)a(h,"BAD_INDENT",lr)}if(!b.anchor&&!b.tag&&!N){if(d=b.end,b.comment)if(f.comment)f.comment+=`
|
|
64
|
-
`+b.comment;else f.comment=b.comment;continue}if(b.newlineAfterProp||Bf.containsNewline(y))a(y??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(b.found?.indent!==o.indent)a(h,"BAD_INDENT",lr);i.atKey=!0;let q=b.end,E=y?t(i,y,b,a):s(i,q,p,null,b,a);if(i.schema.compat)ar.flowIndentCheck(o.indent,y,a);if(i.atKey=!1,Kf.mapIncludes(i,f.items,E))a(q,"DUPLICATE_KEY","Map keys must be unique");let C=or.resolveProps(N??[],{indicator:"map-value-ind",next:A,offset:E.range[2],onError:a,parentIndent:o.indent,startOnNewline:!y||y.type==="block-scalar"});if(h=C.end,C.found){if(v){if(A?.type==="block-map"&&!C.hasNewline)a(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(i.options.strict&&b.start<C.found.offset-1024)a(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let T=A?t(i,A,C,a):s(i,h,N,null,C,a);if(i.schema.compat)ar.flowIndentCheck(o.indent,A,a);h=T.range[2];let I=new rr.Pair(E,T);if(i.options.keepSourceTokens)I.srcToken=w;f.items.push(I)}else{if(v)a(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(C.comment)if(E.comment)E.comment+=`
|
|
65
|
-
`+C.comment;else E.comment=C.comment;let T=new rr.Pair(E);if(i.options.keepSourceTokens)T.srcToken=w;f.items.push(T)}}if(d&&d<h)a(d,"IMPOSSIBLE","Map comment with trailing content");return f.range=[o.offset,h,d??h],f}Rf.resolveBlockMap=jf});var hr=m(function(Wf){var Uf=he(),Yf=ot(),Jf=tn();function Vf({composeNode:t,composeEmptyNode:s},i,o,a,l){let f=new(l?.nodeClass??Uf.YAMLSeq)(i.schema);if(i.atRoot)i.atRoot=!1;if(i.atKey)i.atKey=!1;let h=o.offset,d=null;for(let{start:w,value:p}of o.items){let y=Yf.resolveProps(w,{indicator:"seq-item-ind",next:p,offset:h,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!y.found)if(y.anchor||y.tag||p)if(p?.type==="block-seq")a(y.end,"BAD_INDENT","All sequence items must start at the same column");else a(h,"MISSING_CHAR","Sequence item without - indicator");else{if(d=y.end,y.comment)f.comment=y.comment;continue}let N=p?t(i,p,y,a):s(i,y.end,w,null,y,a);if(i.schema.compat)Jf.flowIndentCheck(o.indent,p,a);h=N.range[2],f.items.push(N)}return f.range=[o.offset,h,d??h],f}Wf.resolveBlockSeq=Vf});var _e=m(function(Hf){function Gf(t,s,i,o){let a="";if(t){let l=!1,c="";for(let f of t){let{source:h,type:d}=f;switch(d){case"space":l=!0;break;case"comment":{if(i&&!l)o(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let w=h.substring(1)||" ";if(!a)a=w;else a+=c+w;c="";break}case"newline":if(a)c+=h;l=!0;break;default:o(f,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}s+=h.length}}return{comment:a,offset:s}}Hf.resolveEnd=Gf});var yr=m(function(rh){var zf=M(),Zf=ce(),mr=fe(),eh=he(),th=_e(),gr=ot(),sh=Zt(),nh=sn(),nn="Block collections are not allowed within flow collections",rn=(t)=>t&&(t.type==="block-map"||t.type==="block-seq");function ih({composeNode:t,composeEmptyNode:s},i,o,a,l){let c=o.start.source==="{",f=c?"flow map":"flow sequence",d=new(l?.nodeClass??(c?mr.YAMLMap:eh.YAMLSeq))(i.schema);d.flow=!0;let w=i.atRoot;if(w)i.atRoot=!1;if(i.atKey)i.atKey=!1;let p=o.offset+o.start.source.length;for(let v=0;v<o.items.length;++v){let q=o.items[v],{start:E,key:C,sep:T,value:I}=q,P=gr.resolveProps(E,{flow:f,indicator:"explicit-key-ind",next:C??T?.[0],offset:p,onError:a,parentIndent:o.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!T&&!I){if(v===0&&P.comma)a(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(v<o.items.length-1)a(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`);if(P.comment)if(d.comment)d.comment+=`
|
|
66
|
-
`+P.comment;else d.comment=P.comment;p=P.end;continue}if(!c&&i.options.strict&&sh.containsNewline(C))a(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0){if(P.comma)a(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`)}else{if(!P.comma)a(P.start,"MISSING_CHAR",`Missing , between ${f} items`);if(P.comment){let B="";e:for(let O of E)switch(O.type){case"comma":case"space":break;case"comment":B=O.source.substring(1);break e;default:break e}if(B){let O=d.items[d.items.length-1];if(zf.isPair(O))O=O.value??O.key;if(O.comment)O.comment+=`
|
|
67
|
-
`+B;else O.comment=B;P.comment=P.comment.substring(B.length+1)}}}if(!c&&!T&&!P.found){let B=I?t(i,I,P,a):s(i,P.end,T,null,P,a);if(d.items.push(B),p=B.range[2],rn(I))a(B.range,"BLOCK_IN_FLOW",nn)}else{i.atKey=!0;let B=P.end,O=C?t(i,C,P,a):s(i,B,E,null,P,a);if(rn(C))a(O.range,"BLOCK_IN_FLOW",nn);i.atKey=!1;let R=gr.resolveProps(T??[],{flow:f,indicator:"map-value-ind",next:I,offset:O.range[2],onError:a,parentIndent:o.indent,startOnNewline:!1});if(R.found){if(!c&&!P.found&&i.options.strict){if(T)for(let U of T){if(U===R.found)break;if(U.type==="newline"){a(U,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(P.start<R.found.offset-1024)a(R.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(I)if("source"in I&&I.source?.[0]===":")a(I,"MISSING_CHAR",`Missing space after : in ${f}`);else a(R.start,"MISSING_CHAR",`Missing , or : between ${f} items`);let re=I?t(i,I,R,a):R.found?s(i,R.end,T,null,R,a):null;if(re){if(rn(I))a(re.range,"BLOCK_IN_FLOW",nn)}else if(R.comment)if(O.comment)O.comment+=`
|
|
68
|
-
`+R.comment;else O.comment=R.comment;let ke=new Zf.Pair(O,re);if(i.options.keepSourceTokens)ke.srcToken=q;if(c){let U=d;if(nh.mapIncludes(i,U.items,O))a(B,"DUPLICATE_KEY","Map keys must be unique");U.items.push(ke)}else{let U=new mr.YAMLMap(i.schema);U.flow=!0,U.items.push(ke);let _n=(re??O).range;U.range=[O.range[0],_n[1],_n[2]],d.items.push(U)}p=re?re.range[2]:R.end}}let y=c?"}":"]",[N,...A]=o.end,b=p;if(N?.source===y)b=N.offset+N.source.length;else{let v=f[0].toUpperCase()+f.substring(1),q=w?`${v} must end with a ${y}`:`${v} in block collection must be sufficiently indented and end with a ${y}`;if(a(p,w?"MISSING_CHAR":"BAD_INDENT",q),N&&N.source.length!==1)A.unshift(N)}if(A.length>0){let v=th.resolveEnd(A,b,i.options.strict,a);if(v.comment)if(d.comment)d.comment+=`
|
|
69
|
-
`+v.comment;else d.comment=v.comment;d.range=[o.offset,b,v.offset]}else d.range=[o.offset,b,b];return d}rh.resolveFlowCollection=ih});var br=m(function(mh){var ah=M(),lh=K(),ch=fe(),uh=he(),fh=cr(),hh=hr(),dh=yr();function on(t,s,i,o,a,l){let c=i.type==="block-map"?fh.resolveBlockMap(t,s,i,o,l):i.type==="block-seq"?hh.resolveBlockSeq(t,s,i,o,l):dh.resolveFlowCollection(t,s,i,o,l),f=c.constructor;if(a==="!"||a===f.tagName)return c.tag=f.tagName,c;if(a)c.tag=a;return c}function ph(t,s,i,o,a){let l=o.tag,c=!l?null:s.directives.tagName(l.source,(y)=>a(l,"TAG_RESOLVE_FAILED",y));if(i.type==="block-seq"){let{anchor:y,newlineAfterProp:N}=o,A=y&&l?y.offset>l.offset?y:l:y??l;if(A&&(!N||N.offset<A.offset))a(A,"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===ch.YAMLMap.tagName&&f==="map"||c===uh.YAMLSeq.tagName&&f==="seq")return on(t,s,i,a,c);let h=s.schema.tags.find((y)=>y.tag===c&&y.collection===f);if(!h){let y=s.schema.knownTags[c];if(y?.collection===f)s.schema.tags.push(Object.assign({},y,{default:!1})),h=y;else{if(y)a(l,"BAD_COLLECTION_TYPE",`${y.tag} used for ${f} collection, but expects ${y.collection??"scalar"}`,!0);else a(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0);return on(t,s,i,a,c)}}let d=on(t,s,i,a,c,h),w=h.resolve?.(d,(y)=>a(l,"TAG_RESOLVE_FAILED",y),s.options)??d,p=ah.isNode(w)?w:new lh.Scalar(w);if(p.range=d.range,p.tag=c,h?.format)p.format=h.format;return p}mh.composeCollection=ph});var ln=m(function(wh){var an=K();function yh(t,s,i){let o=s.offset,a=bh(s,t.options.strict,i);if(!a)return{value:"",type:null,comment:"",range:[o,o,o]};let l=a.mode===">"?an.Scalar.BLOCK_FOLDED:an.Scalar.BLOCK_LITERAL,c=s.source?Sh(s.source):[],f=c.length;for(let b=c.length-1;b>=0;--b){let v=c[b][1];if(v===""||v==="\r")f=b;else break}if(f===0){let b=a.chomp==="+"&&c.length>0?`
|
|
70
|
-
`.repeat(Math.max(1,c.length-1)):"",v=o+a.length;if(s.source)v+=s.source.length;return{value:b,type:l,comment:a.comment,range:[o,v,v]}}let h=s.indent+a.indent,d=s.offset+a.length,w=0;for(let b=0;b<f;++b){let[v,q]=c[b];if(q===""||q==="\r"){if(a.indent===0&&v.length>h)h=v.length}else{if(v.length<h)i(d+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(a.indent===0)h=v.length;if(w=b,h===0&&!t.atRoot)i(d,"BAD_INDENT","Block scalar values in collections must be indented");break}d+=v.length+q.length+1}for(let b=c.length-1;b>=f;--b)if(c[b][0].length>h)f=b+1;let p="",y="",N=!1;for(let b=0;b<w;++b)p+=c[b][0].slice(h)+`
|
|
71
|
-
`;for(let b=w;b<f;++b){let[v,q]=c[b];d+=v.length+q.length+1;let E=q[q.length-1]==="\r";if(E)q=q.slice(0,-1);if(q&&v.length<h){let T=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;i(d-q.length-(E?2:1),"BAD_INDENT",T),v=""}if(l===an.Scalar.BLOCK_LITERAL)p+=y+v.slice(h)+q,y=`
|
|
72
|
-
`;else if(v.length>h||q[0]==="\t"){if(y===" ")y=`
|
|
73
|
-
`;else if(!N&&y===`
|
|
74
|
-
`)y=`
|
|
75
|
-
|
|
76
|
-
`;p+=y+v.slice(h)+q,y=`
|
|
77
|
-
`,N=!0}else if(q==="")if(y===`
|
|
78
|
-
`)p+=`
|
|
79
|
-
`;else y=`
|
|
80
|
-
`;else p+=y+q,y=" ",N=!1}switch(a.chomp){case"-":break;case"+":for(let b=f;b<c.length;++b)p+=`
|
|
81
|
-
`+c[b][0].slice(h);if(p[p.length-1]!==`
|
|
82
|
-
`)p+=`
|
|
83
|
-
`;break;default:p+=`
|
|
84
|
-
`}let A=o+a.length+s.source.length;return{value:p,type:l,comment:a.comment,range:[o,A,A]}}function bh({offset:t,props:s},i,o){if(s[0].type!=="block-scalar-header")return o(s[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:a}=s[0],l=a[0],c=0,f="",h=-1;for(let y=1;y<a.length;++y){let N=a[y];if(!f&&(N==="-"||N==="+"))f=N;else{let A=Number(N);if(!c&&A)c=A;else if(h===-1)h=t+y}}if(h!==-1)o(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let d=!1,w="",p=a.length;for(let y=1;y<s.length;++y){let N=s[y];switch(N.type){case"space":d=!0;case"newline":p+=N.source.length;break;case"comment":if(i&&!d)o(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");p+=N.source.length,w=N.source.substring(1);break;case"error":o(N,"UNEXPECTED_TOKEN",N.message),p+=N.source.length;break;default:{let A=`Unexpected token in block scalar header: ${N.type}`;o(N,"UNEXPECTED_TOKEN",A);let b=N.source;if(b&&typeof b==="string")p+=b.length}}}return{mode:l,indent:c,chomp:f,comment:w,length:p}}function Sh(t){let s=t.split(/\n( *)/),i=s[0],o=i.match(/^( *)/),l=[o?.[1]?[o[1],i.slice(o[1].length)]:["",i]];for(let c=1;c<s.length;c+=2)l.push([s[c],s[c+1]]);return l}wh.resolveBlockScalar=yh});var un=m(function(Th){var cn=K(),kh=_e();function Nh(t,s,i){let{offset:o,type:a,source:l,end:c}=t,f,h,d=(y,N,A)=>i(o+y,N,A);switch(a){case"scalar":f=cn.Scalar.PLAIN,h=Ah(l,d);break;case"single-quoted-scalar":f=cn.Scalar.QUOTE_SINGLE,h=Oh(l,d);break;case"double-quoted-scalar":f=cn.Scalar.QUOTE_DOUBLE,h=qh(l,d);break;default:return i(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[o,o+l.length,o+l.length]}}let w=o+l.length,p=kh.resolveEnd(c,w,s,i);return{value:h,type:f,comment:p.comment,range:[o,w,p.offset]}}function Ah(t,s){let i="";switch(t[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 ${t[0]}`;break}case"@":case"`":{i=`reserved character ${t[0]}`;break}}if(i)s(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`);return Sr(t)}function Oh(t,s){if(t[t.length-1]!=="'"||t.length===1)s(t.length,"MISSING_CHAR","Missing closing 'quote");return Sr(t.slice(1,-1)).replace(/''/g,"'")}function Sr(t){let s,i;try{s=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
85
|
-
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
86
|
-
`,"sy")}catch{s=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let o=s.exec(t);if(!o)return t;let a=o[1],l=" ",c=s.lastIndex;i.lastIndex=c;while(o=i.exec(t)){if(o[1]==="")if(l===`
|
|
87
|
-
`)a+=l;else l=`
|
|
88
|
-
`;else a+=l+o[1],l=" ";c=i.lastIndex}let f=/[ \t]*(.*)/sy;return f.lastIndex=c,o=f.exec(t),a+l+(o?.[1]??"")}function qh(t,s){let i="";for(let o=1;o<t.length-1;++o){let a=t[o];if(a==="\r"&&t[o+1]===`
|
|
89
|
-
`)continue;if(a===`
|
|
90
|
-
`){let{fold:l,offset:c}=Eh(t,o);i+=l,o=c}else if(a==="\\"){let l=t[++o],c=Lh[l];if(c)i+=c;else if(l===`
|
|
91
|
-
`){l=t[o+1];while(l===" "||l==="\t")l=t[++o+1]}else if(l==="\r"&&t[o+1]===`
|
|
92
|
-
`){l=t[++o+1];while(l===" "||l==="\t")l=t[++o+1]}else if(l==="x"||l==="u"||l==="U"){let f=l==="x"?2:l==="u"?4:8;i+=Ch(t,o+1,f,s),o+=f}else{let f=t.substr(o-1,2);s(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(a===" "||a==="\t"){let l=o,c=t[o+1];while(c===" "||c==="\t")c=t[++o+1];if(c!==`
|
|
93
|
-
`&&!(c==="\r"&&t[o+2]===`
|
|
94
|
-
`))i+=o>l?t.slice(l,o+1):a}else i+=a}if(t[t.length-1]!=='"'||t.length===1)s(t.length,"MISSING_CHAR",'Missing closing "quote');return i}function Eh(t,s){let i="",o=t[s+1];while(o===" "||o==="\t"||o===`
|
|
95
|
-
`||o==="\r"){if(o==="\r"&&t[s+2]!==`
|
|
96
|
-
`)break;if(o===`
|
|
97
|
-
`)i+=`
|
|
98
|
-
`;s+=1,o=t[s+1]}if(!i)i=" ";return{fold:i,offset:s}}var Lh={"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 Ch(t,s,i,o){let a=t.substr(s,i),c=a.length===i&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;try{return String.fromCodePoint(c)}catch{let f=t.substr(s-2,i+2);return o(s-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}}Th.resolveFlowScalar=Nh});var vr=m(function(Dh){var we=M(),wr=K(),Ph=ln(),Mh=un();function _h(t,s,i,o){let{value:a,type:l,comment:c,range:f}=s.type==="block-scalar"?Ph.resolveBlockScalar(t,s,o):Mh.resolveFlowScalar(s,t.options.strict,o),h=i?t.directives.tagName(i.source,(p)=>o(i,"TAG_RESOLVE_FAILED",p)):null,d;if(t.options.stringKeys&&t.atKey)d=t.schema[we.SCALAR];else if(h)d=$h(t.schema,a,h,i,o);else if(s.type==="scalar")d=xh(t,a,s,o);else d=t.schema[we.SCALAR];let w;try{let p=d.resolve(a,(y)=>o(i??s,"TAG_RESOLVE_FAILED",y),t.options);w=we.isScalar(p)?p:new wr.Scalar(p)}catch(p){let y=p instanceof Error?p.message:String(p);o(i??s,"TAG_RESOLVE_FAILED",y),w=new wr.Scalar(a)}if(w.range=f,w.source=a,l)w.type=l;if(h)w.tag=h;if(d.format)w.format=d.format;if(c)w.comment=c;return w}function $h(t,s,i,o,a){if(i==="!")return t[we.SCALAR];let l=[];for(let f of t.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(s))return f;let c=t.knownTags[i];if(c&&!c.collection)return t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c;return a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),t[we.SCALAR]}function xh({atKey:t,directives:s,schema:i},o,a,l){let c=i.tags.find((f)=>(f.default===!0||t&&f.default==="key")&&f.test?.test(o))||i[we.SCALAR];if(i.compat){let f=i.compat.find((h)=>h.default&&h.test?.test(o))??i[we.SCALAR];if(c.tag!==f.tag){let h=s.tagString(c.tag),d=s.tagString(f.tag),w=`Value may be parsed as either ${h} or ${d}`;l(a,"TAG_RESOLVE_FAILED",w,!0)}}return c}Dh.composeScalar=_h});var kr=m(function(jh){function Kh(t,s,i){if(s){i??(i=s.length);for(let o=i-1;o>=0;--o){let a=s[o];switch(a.type){case"space":case"comment":case"newline":t-=a.source.length;continue}a=s[++o];while(a?.type==="space")t+=a.source.length,a=s[++o];break}}return t}jh.emptyScalarPosition=Kh});var Or=m(function(Gh){var Fh=Be(),Uh=M(),Yh=br(),Nr=vr(),Jh=_e(),Vh=kr(),Wh={composeNode:Ar,composeEmptyNode:hn};function Ar(t,s,i,o){let a=t.atKey,{spaceBefore:l,comment:c,anchor:f,tag:h}=i,d,w=!0;switch(s.type){case"alias":if(d=Qh(t,s,o),f||h)o(s,"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(d=Nr.composeScalar(t,s,h,o),f)d.anchor=f.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(d=Yh.composeCollection(Wh,t,s,i,o),f)d.anchor=f.source.substring(1)}catch(p){let y=p instanceof Error?p.message:String(p);o(s,"RESOURCE_EXHAUSTION",y)}break;default:{let p=s.type==="error"?s.message:`Unsupported token (type: ${s.type})`;o(s,"UNEXPECTED_TOKEN",p),w=!1}}if(d??(d=hn(t,s.offset,void 0,null,i,o)),f&&d.anchor==="")o(f,"BAD_ALIAS","Anchor cannot be an empty string");if(a&&t.options.stringKeys&&(!Uh.isScalar(d)||typeof d.value!=="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str"))o(h??s,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(l)d.spaceBefore=!0;if(c)if(s.type==="scalar"&&s.source==="")d.comment=c;else d.commentBefore=c;if(t.options.keepSourceTokens&&w)d.srcToken=s;return d}function hn(t,s,i,o,{spaceBefore:a,comment:l,anchor:c,tag:f,end:h},d){let w={type:"scalar",offset:Vh.emptyScalarPosition(s,i,o),indent:-1,source:""},p=Nr.composeScalar(t,w,f,d);if(c){if(p.anchor=c.source.substring(1),p.anchor==="")d(c,"BAD_ALIAS","Anchor cannot be an empty string")}if(a)p.spaceBefore=!0;if(l)p.comment=l,p.range[2]=h;return p}function Qh({options:t},{offset:s,source:i,end:o},a){let l=new Fh.Alias(i.substring(1));if(l.source==="")a(s,"BAD_ALIAS","Alias cannot be an empty string");if(l.source.endsWith(":"))a(s+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let c=s+i.length,f=Jh.resolveEnd(o,c,t.strict,a);if(l.range=[s,c,f.offset],f.comment)l.comment=f.comment;return l}Gh.composeEmptyNode=hn;Gh.composeNode=Ar});var Er=m(function(sd){var zh=it(),qr=Or(),Zh=_e(),ed=ot();function td(t,s,{offset:i,start:o,value:a,end:l},c){let f=Object.assign({_directives:s},t),h=new zh.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},w=ed.resolveProps(o,{indicator:"doc-start",next:a??l?.[0],offset:i,onError:c,parentIndent:0,startOnNewline:!0});if(w.found){if(h.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!w.hasNewline)c(w.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}h.contents=a?qr.composeNode(d,a,w,c):qr.composeEmptyNode(d,w.end,o,null,w,c);let p=h.contents.range[2],y=Zh.resolveEnd(l,p,!1,c);if(y.comment)h.comment=y.comment;return h.range=[i,p,y.offset],h}sd.composeDoc=td});var pn=m(function(cd){var id=tt("process"),rd=us(),od=it(),lt=rt(),Lr=M(),ad=Er(),ld=_e();function ct(t){if(typeof t==="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:s,source:i}=t;return[s,s+(typeof i==="string"?i.length:1)]}function Cr(t){let s="",i=!1,o=!1;for(let a=0;a<t.length;++a){let l=t[a];switch(l[0]){case"#":s+=(s===""?"":o?`
|
|
100
|
-
|
|
101
|
-
`:`
|
|
102
|
-
`)+(l.substring(1)||" "),i=!0,o=!1;break;case"%":if(t[a+1]?.[0]!=="#")a+=1;i=!1;break;default:if(!i)o=!0;i=!1}}return{comment:s,afterEmptyLine:o}}class Tr{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(s,i,o,a)=>{let l=ct(s);if(a)this.warnings.push(new lt.YAMLWarning(l,i,o));else this.errors.push(new lt.YAMLParseError(l,i,o))},this.directives=new rd.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,s){let{comment:i,afterEmptyLine:o}=Cr(this.prelude);if(i){let a=t.contents;if(s)t.comment=t.comment?`${t.comment}
|
|
103
|
-
${i}`:i;else if(o||t.directives.docStart||!a)t.commentBefore=i;else if(Lr.isCollection(a)&&!a.flow&&a.items.length>0){let l=a.items[0];if(Lr.isPair(l))l=l.key;let c=l.commentBefore;l.commentBefore=c?`${i}
|
|
104
|
-
${c}`:i}else{let l=a.commentBefore;a.commentBefore=l?`${i}
|
|
105
|
-
${l}`:i}}if(s){for(let a=0;a<this.errors.length;++a)t.errors.push(this.errors[a]);for(let a=0;a<this.warnings.length;++a)t.warnings.push(this.warnings[a])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Cr(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,s=!1,i=-1){for(let o of t)yield*this.next(o);yield*this.end(s,i)}*next(t){if(id.env.LOG_STREAM)console.dir(t,{depth:null});switch(t.type){case"directive":this.directives.add(t.source,(s,i,o)=>{let a=ct(t);a[0]+=s,this.onError(a,"BAD_DIRECTIVE",i,o)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let s=ad.composeDoc(this.options,this.directives,t,this.onError);if(this.atDirectives&&!s.directives.docStart)this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(s,!1),this.doc)yield this.doc;this.doc=s,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let s=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new lt.YAMLParseError(ct(t),"UNEXPECTED_TOKEN",s);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 lt.YAMLParseError(ct(t),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let s=ld.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),s.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
106
|
-
${s.comment}`:s.comment}this.doc.range[2]=s.offset;break}default:this.errors.push(new lt.YAMLParseError(ct(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,s=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let i=Object.assign({_directives:this.directives},this.options),o=new od.Document(void 0,i);if(this.atDirectives)this.onError(s,"MISSING_CHAR","Missing directives-end indicator line");o.range=[0,s,s],this.decorate(o,!1),yield o}}}cd.Composer=Tr});var Mr=m(function(bd){var fd=ln(),hd=un(),dd=rt(),Ir=Ue();function pd(t,s=!0,i){if(t){let o=(a,l,c)=>{let f=typeof a==="number"?a:Array.isArray(a)?a[0]:a.offset;if(i)i(f,l,c);else throw new dd.YAMLParseError([f,f+1],l,c)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return hd.resolveFlowScalar(t,s,o);case"block-scalar":return fd.resolveBlockScalar({options:{strict:s}},t,o)}}return null}function md(t,s){let{implicitKey:i=!1,indent:o,inFlow:a=!1,offset:l=-1,type:c="PLAIN"}=s,f=Ir.stringifyString({type:c,value:t},{implicitKey:i,indent:o>0?" ".repeat(o):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),h=s.end??[{type:"newline",offset:-1,indent:o,source:`
|
|
107
|
-
`}];switch(f[0]){case"|":case">":{let d=f.indexOf(`
|
|
108
|
-
`),w=f.substring(0,d),p=f.substring(d+1)+`
|
|
109
|
-
`,y=[{type:"block-scalar-header",offset:l,indent:o,source:w}];if(!Pr(y,h))y.push({type:"newline",offset:-1,indent:o,source:`
|
|
110
|
-
`});return{type:"block-scalar",offset:l,indent:o,props:y,source:p}}case'"':return{type:"double-quoted-scalar",offset:l,indent:o,source:f,end:h};case"'":return{type:"single-quoted-scalar",offset:l,indent:o,source:f,end:h};default:return{type:"scalar",offset:l,indent:o,source:f,end:h}}}function gd(t,s,i={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:l=!1,type:c}=i,f="indent"in t?t.indent:null;if(o&&typeof f==="number")f+=2;if(!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let d=t.props[0];if(d.type!=="block-scalar-header")throw Error("Invalid block scalar header");c=d.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let h=Ir.stringifyString({type:c,value:s},{implicitKey:a||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":yd(t,h);break;case'"':mn(t,h,"double-quoted-scalar");break;case"'":mn(t,h,"single-quoted-scalar");break;default:mn(t,h,"scalar")}}function yd(t,s){let i=s.indexOf(`
|
|
111
|
-
`),o=s.substring(0,i),a=s.substring(i+1)+`
|
|
112
|
-
`;if(t.type==="block-scalar"){let l=t.props[0];if(l.type!=="block-scalar-header")throw Error("Invalid block scalar header");l.source=o,t.source=a}else{let{offset:l}=t,c="indent"in t?t.indent:-1,f=[{type:"block-scalar-header",offset:l,indent:c,source:o}];if(!Pr(f,"end"in t?t.end:void 0))f.push({type:"newline",offset:-1,indent:c,source:`
|
|
113
|
-
`});for(let h of Object.keys(t))if(h!=="type"&&h!=="offset")delete t[h];Object.assign(t,{type:"block-scalar",indent:c,props:f,source:a})}}function Pr(t,s){if(s)for(let i of s)switch(i.type){case"space":case"comment":t.push(i);break;case"newline":return t.push(i),!0}return!1}function mn(t,s,i){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=i,t.source=s;break;case"block-scalar":{let o=t.props.slice(1),a=s.length;if(t.props[0].type==="block-scalar-header")a-=t.props[0].source.length;for(let l of o)l.offset+=a;delete t.props,Object.assign(t,{type:i,source:s,end:o});break}case"block-map":case"block-seq":{let a={type:"newline",offset:t.offset+s.length,indent:t.indent,source:`
|
|
114
|
-
`};delete t.items,Object.assign(t,{type:i,source:s,end:[a]});break}default:{let o="indent"in t?t.indent:-1,a="end"in t&&Array.isArray(t.end)?t.end.filter((l)=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(let l of Object.keys(t))if(l!=="type"&&l!=="offset")delete t[l];Object.assign(t,{type:i,indent:o,source:s,end:a})}}}bd.createScalarToken=md;bd.resolveAsScalar=pd;bd.setScalarValue=gd});var _r=m(function(Nd){var kd=(t)=>("type"in t)?ts(t):es(t);function ts(t){switch(t.type){case"block-scalar":{let s="";for(let i of t.props)s+=ts(i);return s+t.source}case"block-map":case"block-seq":{let s="";for(let i of t.items)s+=es(i);return s}case"flow-collection":{let s=t.start.source;for(let i of t.items)s+=es(i);for(let i of t.end)s+=i.source;return s}case"document":{let s=es(t);if(t.end)for(let i of t.end)s+=i.source;return s}default:{let s=t.source;if("end"in t&&t.end)for(let i of t.end)s+=i.source;return s}}}function es({start:t,key:s,sep:i,value:o}){let a="";for(let l of t)a+=l.source;if(s)a+=ts(s);if(i)for(let l of i)a+=l.source;if(o)a+=ts(o);return a}Nd.stringify=kd});var Dr=m(function(qd){var gn=Symbol("break visit"),Od=Symbol("skip children"),$r=Symbol("remove item");function ve(t,s){if("type"in t&&t.type==="document")t={start:t.start,value:t.value};xr(Object.freeze([]),t,s)}ve.BREAK=gn;ve.SKIP=Od;ve.REMOVE=$r;ve.itemAtPath=(t,s)=>{let i=t;for(let[o,a]of s){let l=i?.[o];if(l&&"items"in l)i=l.items[a];else return}return i};ve.parentCollection=(t,s)=>{let i=ve.itemAtPath(t,s.slice(0,-1)),o=s[s.length-1][0],a=i?.[o];if(a&&"items"in a)return a;throw Error("Parent collection not found")};function xr(t,s,i){let o=i(s,t);if(typeof o==="symbol")return o;for(let a of["key","value"]){let l=s[a];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){let f=xr(Object.freeze(t.concat([[a,c]])),l.items[c],i);if(typeof f==="number")c=f-1;else if(f===gn)return gn;else if(f===$r)l.items.splice(c,1),c-=1}if(typeof o==="function"&&a==="key")o=o(s,t)}}return typeof o==="function"?o(s,t):o}qd.visit=ve});var ss=m(function(_d){var yn=Mr(),Ld=_r(),Cd=Dr(),bn="\uFEFF",Sn="\x02",wn="\x18",vn="\x1F",Td=(t)=>!!t&&("items"in t),Id=(t)=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function Pd(t){switch(t){case bn:return"<BOM>";case Sn:return"<DOC>";case wn:return"<FLOW_END>";case vn:return"<SCALAR>";default:return JSON.stringify(t)}}function Md(t){switch(t){case bn:return"byte-order-mark";case Sn:return"doc-mode";case wn:return"flow-error-end";case vn: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(t[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}_d.createScalarToken=yn.createScalarToken;_d.resolveAsScalar=yn.resolveAsScalar;_d.setScalarValue=yn.setScalarValue;_d.stringify=Ld.stringify;_d.visit=Cd.visit;_d.BOM=bn;_d.DOCUMENT=Sn;_d.FLOW_END=wn;_d.SCALAR=vn;_d.isCollection=Td;_d.isScalar=Id;_d.prettyToken=Pd;_d.tokenType=Md});var Nn=m(function(Hd){var ut=ss();function ee(t){switch(t){case void 0:case" ":case`
|
|
117
|
-
`:case"\r":case"\t":return!0;default:return!1}}var Br=new Set("0123456789ABCDEFabcdef"),Qd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ns=new Set(",[]{}"),Gd=new Set(` ,[]{}
|
|
118
|
-
\r `),kn=(t)=>!t||Gd.has(t);class Kr{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(t,s=!1){if(t){if(typeof t!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!s;let i=this.next??"stream";while(i&&(s||this.hasChars(1)))i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,s=this.buffer[t];while(s===" "||s==="\t")s=this.buffer[++t];if(!s||s==="#"||s===`
|
|
119
|
-
`)return!0;if(s==="\r")return this.buffer[t+1]===`
|
|
120
|
-
`;return!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let s=this.buffer[t];if(this.indentNext>0){let i=0;while(s===" ")s=this.buffer[++i+t];if(s==="\r"){let o=this.buffer[i+t+1];if(o===`
|
|
121
|
-
`||!o&&!this.atEnd)return t+i+1}return s===`
|
|
122
|
-
`||i>=this.indentNext||!s&&!this.atEnd?t+i:-1}if(s==="-"||s==="."){let i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&ee(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;if(typeof t!=="number"||t!==-1&&t<this.pos)t=this.buffer.indexOf(`
|
|
123
|
-
`,this.pos),this.lineEndPos=t;if(t===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[t-1]==="\r")t-=1;return this.buffer.substring(this.pos,t)}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){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 t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===ut.BOM)yield*this.pushCount(1),t=t.substring(1);if(t[0]==="%"){let s=t.length,i=t.indexOf("#");while(i!==-1){let a=t[i-1];if(a===" "||a==="\t"){s=i-1;break}else i=t.indexOf("#",i+1)}while(!0){let a=t[s-1];if(a===" "||a==="\t")s-=1;else break}let o=(yield*this.pushCount(s))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){let s=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-s),yield*this.pushNewline(),"stream"}return yield ut.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let s=this.peek(3);if((s==="---"||s==="...")&&ee(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,s==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ee(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[t,s]=this.peek(2);if(!s&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&ee(s)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let s=yield*this.pushIndicators();switch(t[s]){case"#":yield*this.pushCount(t.length-s);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(kn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return s+=yield*this.parseBlockScalarHeader(),s+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-s),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,s,i=-1;do{if(t=yield*this.pushNewline(),t>0)s=yield*this.pushSpaces(!1),this.indentValue=i=s;else s=0;s+=yield*this.pushSpaces(!0)}while(t+s>0);let o=this.getLine();if(o===null)return this.setNext("flow");if(i!==-1&&i<this.indentNext&&o[0]!=="#"||i===0&&(o.startsWith("---")||o.startsWith("..."))&&ee(o[3])){if(!(i===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield ut.FLOW_END,yield*this.parseLineStart()}let a=0;while(o[a]===",")a+=yield*this.pushCount(1),a+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(a+=yield*this.pushIndicators(),o[a]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-a),"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(kn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let l=this.charAt(1);if(this.flowKey||ee(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 t=this.charAt(0),s=this.buffer.indexOf(t,this.pos+1);if(t==="'")while(s!==-1&&this.buffer[s+1]==="'")s=this.buffer.indexOf("'",s+2);else while(s!==-1){let a=0;while(this.buffer[s-1-a]==="\\")a+=1;if(a%2===0)break;s=this.buffer.indexOf('"',s+1)}let i=this.buffer.substring(0,s),o=i.indexOf(`
|
|
124
|
-
`,this.pos);if(o!==-1){while(o!==-1){let a=this.continueScalar(o+1);if(a===-1)break;o=i.indexOf(`
|
|
125
|
-
`,a)}if(o!==-1)s=o-(i[o-1]==="\r"?2:1)}if(s===-1){if(!this.atEnd)return this.setNext("quoted-scalar");s=this.buffer.length}return yield*this.pushToIndex(s+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;while(!0){let s=this.buffer[++t];if(s==="+")this.blockScalarKeep=!0;else if(s>"0"&&s<="9")this.blockScalarIndent=Number(s)-1;else if(s!=="-")break}return yield*this.pushUntil((s)=>ee(s)||s==="#")}*parseBlockScalar(){let t=this.pos-1,s=0,i;e:for(let a=this.pos;i=this.buffer[a];++a)switch(i){case" ":s+=1;break;case`
|
|
126
|
-
`:t=a,s=0;break;case"\r":{let l=this.buffer[a+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(s>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=s;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let a=this.continueScalar(t+1);if(a===-1)break;t=this.buffer.indexOf(`
|
|
128
|
-
`,a)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let o=t+1;i=this.buffer[o];while(i===" ")i=this.buffer[++o];if(i==="\t"){while(i==="\t"||i===" "||i==="\r"||i===`
|
|
129
|
-
`)i=this.buffer[++o];t=o-1}else if(!this.blockScalarKeep)do{let a=t-1,l=this.buffer[a];if(l==="\r")l=this.buffer[--a];let c=a;while(l===" ")l=this.buffer[--a];if(l===`
|
|
130
|
-
`&&a>=this.pos&&a+1+s>c)t=a;else break}while(!0);return yield ut.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,s=this.pos-1,i=this.pos-1,o;while(o=this.buffer[++i])if(o===":"){let a=this.buffer[i+1];if(ee(a)||t&&ns.has(a))break;s=i}else if(ee(o)){let a=this.buffer[i+1];if(o==="\r")if(a===`
|
|
131
|
-
`)i+=1,o=`
|
|
132
|
-
`,a=this.buffer[i+1];else s=i;if(a==="#"||t&&ns.has(a))break;if(o===`
|
|
133
|
-
`){let l=this.continueScalar(i+1);if(l===-1)break;i=Math.max(i,l-2)}}else{if(t&&ns.has(o))break;s=i}if(!o&&!this.atEnd)return this.setNext("plain-scalar");return yield ut.SCALAR,yield*this.pushToIndex(s+1,!0),t?"flow":"doc"}*pushCount(t){if(t>0)return yield this.buffer.substr(this.pos,t),this.pos+=t,t;return 0}*pushToIndex(t,s){let i=this.buffer.slice(this.pos,t);if(i)return yield i,this.pos+=i.length,i.length;else if(s)yield"";return 0}*pushIndicators(){let t=0;e:while(!0){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(kn),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let s=this.flowLevel>0,i=this.charAt(1);if(ee(i)||s&&ns.has(i)){if(!s)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,s=this.buffer[t];while(!ee(s)&&s!==">")s=this.buffer[++t];return yield*this.pushToIndex(s===">"?t+1:t,!1)}else{let t=this.pos+1,s=this.buffer[t];while(s)if(Qd.has(s))s=this.buffer[++t];else if(s==="%"&&Br.has(this.buffer[t+1])&&Br.has(this.buffer[t+2]))s=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];if(t===`
|
|
134
|
-
`)return yield*this.pushCount(1);else if(t==="\r"&&this.charAt(1)===`
|
|
135
|
-
`)return yield*this.pushCount(2);else return 0}*pushSpaces(t){let s=this.pos-1,i;do i=this.buffer[++s];while(i===" "||t&&i==="\t");let o=s-this.pos;if(o>0)yield this.buffer.substr(this.pos,o),this.pos=s;return o}*pushUntil(t){let s=this.pos,i=this.buffer[s];while(!t(i))i=this.buffer[++s];return yield*this.pushToIndex(s,!1)}}Hd.Lexer=Kr});var An=m(function(zd){class jr{constructor(){this.lineStarts=[],this.addNewLine=(t)=>this.lineStarts.push(t),this.linePos=(t)=>{let s=0,i=this.lineStarts.length;while(s<i){let a=s+i>>1;if(this.lineStarts[a]<t)s=a+1;else i=a}if(this.lineStarts[s]===t)return{line:s+1,col:1};if(s===0)return{line:0,col:t};let o=this.lineStarts[s-1];return{line:s,col:t-o+1}}}}zd.LineCounter=jr});var On=m(function(sp){var ep=tt("process"),Rr=ss(),tp=Nn();function de(t,s){for(let i=0;i<t.length;++i)if(t[i].type===s)return!0;return!1}function Fr(t){for(let s=0;s<t.length;++s)switch(t[s].type){case"space":case"comment":case"newline":break;default:return s}return-1}function Yr(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function is(t){switch(t.type){case"document":return t.start;case"block-map":{let s=t.items[t.items.length-1];return s.sep??s.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function $e(t){if(t.length===0)return[];let s=t.length;e:while(--s>=0)switch(t[s].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(t[++s]?.type==="space");return t.splice(s,t.length)}function rs(t,s){if(s.length<1e5)Array.prototype.push.apply(t,s);else for(let i=0;i<s.length;++i)t.push(s[i])}function Ur(t){if(t.start.type==="flow-seq-start"){for(let s of t.items)if(s.sep&&!s.value&&!de(s.start,"explicit-key-ind")&&!de(s.sep,"map-value-ind")){if(s.key)s.value=s.key;if(delete s.key,Yr(s.value))if(s.value.end)rs(s.value.end,s.sep);else s.value.end=s.sep;else rs(s.start,s.sep);delete s.sep}}}class Jr{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new tp.Lexer,this.onNewLine=t}*parse(t,s=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let i of this.lexer.lex(t,s))yield*this.next(i);if(!s)yield*this.end()}*next(t){if(this.source=t,ep.env.LOG_TOKENS)console.log("|",Rr.prettyToken(t));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let s=Rr.tokenType(t);if(!s){let i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}else if(s==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=s,yield*this.step(),s){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+t.length);break;case"space":if(this.atNewLine&&t[0]===" ")this.indent+=t.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=t.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&t?.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let s=t??this.stack.pop();if(!s)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield s;else{let i=this.peek(1);if(s.type==="block-scalar")s.indent="indent"in i?i.indent:0;else if(s.type==="flow-collection"&&i.type==="document")s.indent=0;if(s.type==="flow-collection")Ur(s);switch(i.type){case"document":i.value=s;break;case"block-scalar":i.props.push(s);break;case"block-map":{let o=i.items[i.items.length-1];if(o.value){i.items.push({start:[],key:s,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=s;else{Object.assign(o,{key:s,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{let o=i.items[i.items.length-1];if(o.value)i.items.push({start:[],value:s});else o.value=s;break}case"flow-collection":{let o=i.items[i.items.length-1];if(!o||o.value)i.items.push({start:[],key:s,sep:[]});else if(o.sep)o.value=s;else Object.assign(o,{key:s,sep:[]});return}default:yield*this.pop(),yield*this.pop(s)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(s.type==="block-map"||s.type==="block-seq")){let o=s.items[s.items.length-1];if(o&&!o.sep&&!o.value&&o.start.length>0&&Fr(o.start)===-1&&(s.indent===0||o.start.every((a)=>a.type!=="comment"||a.indent<s.indent))){if(i.type==="document")i.end=o.start;else i.items.push({start:o.start});s.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 t={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")t.start.push(this.sourceToken);this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{if(Fr(t.start)!==-1)yield*this.pop(),yield*this.step();else t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let s=this.startBlockValue(t);if(s)this.stack.push(s);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let s=is(this.peek(2)),i=$e(s),o;if(t.end)o=t.end,o.push(this.sourceToken),delete t.end;else o=[this.sourceToken];let a={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let s=this.source.indexOf(`
|
|
136
|
-
`)+1;while(s!==0)this.onNewLine(this.offset+s),s=this.source.indexOf(`
|
|
137
|
-
`,s)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let s=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,s.value){let i="end"in s.value?s.value.end:void 0;if((Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment")i?.push(this.sourceToken);else t.items.push({start:[this.sourceToken]})}else if(s.sep)s.sep.push(this.sourceToken);else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)t.items.push({start:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else{if(this.atIndentedComment(s.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){rs(o,s.start),o.push(this.sourceToken),t.items.pop();return}}s.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let i=!this.onKeyLine&&this.indent===t.indent,o=i&&(s.sep||s.explicitKey)&&this.type!=="seq-item-ind",a=[];if(o&&s.sep&&!s.value){let l=[];for(let c=0;c<s.sep.length;++c){let f=s.sep[c];switch(f.type){case"newline":l.push(c);break;case"space":break;case"comment":if(f.indent>t.indent)l.length=0;break;default:l.length=0}}if(l.length>=2)a=s.sep.splice(l[1])}switch(this.type){case"anchor":case"tag":if(o||s.value)a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0;else if(s.sep)s.sep.push(this.sourceToken);else s.start.push(this.sourceToken);return;case"explicit-key-ind":if(!s.sep&&!s.explicitKey)s.start.push(this.sourceToken),s.explicitKey=!0;else if(o||s.value)a.push(this.sourceToken),t.items.push({start:a,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(s.explicitKey)if(!s.sep)if(de(s.start,"newline"))Object.assign(s,{key:null,sep:[this.sourceToken]});else{let l=$e(s.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else if(s.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(de(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(Yr(s.key)&&!de(s.sep,"newline")){let l=$e(s.start),{key:c,sep:f}=s;f.push(this.sourceToken),delete s.key,delete s.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:c,sep:f}]})}else if(a.length>0)s.sep=s.sep.concat(a,this.sourceToken);else s.sep.push(this.sourceToken);else if(!s.sep)Object.assign(s,{key:null,sep:[this.sourceToken]});else if(s.value||o)t.items.push({start:a,key:null,sep:[this.sourceToken]});else if(de(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else s.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(o||s.value)t.items.push({start:a,key:l,sep:[]}),this.onKeyLine=!0;else if(s.sep)this.stack.push(l);else Object.assign(s,{key:l,sep:[]}),this.onKeyLine=!0;return}default:{let l=this.startBlockValue(t);if(l){if(l.type==="block-seq"){if(!s.explicitKey&&s.sep&&!de(s.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)t.items.push({start:a});this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let s=t.items[t.items.length-1];switch(this.type){case"newline":if(s.value){let i="end"in s.value?s.value.end:void 0;if((Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment")i?.push(this.sourceToken);else t.items.push({start:[this.sourceToken]})}else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(s.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){rs(o,s.start),o.push(this.sourceToken),t.items.pop();return}}s.start.push(this.sourceToken)}return;case"anchor":case"tag":if(s.value||this.indent<=t.indent)break;s.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;if(s.value||de(s.start,"seq-item-ind"))t.items.push({start:[this.sourceToken]});else s.start.push(this.sourceToken);return}if(this.indent>t.indent){let i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let s=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!s||s.sep)t.items.push({start:[this.sourceToken]});else s.start.push(this.sourceToken);return;case"map-value-ind":if(!s||s.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else Object.assign(s,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!s||s.value)t.items.push({start:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else s.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);if(!s||s.value)t.items.push({start:[],key:o,sep:[]});else if(s.sep)this.stack.push(o);else Object.assign(s,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let i=this.startBlockValue(t);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===t.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 o=is(i),a=$e(o);Ur(t);let l=t.end.splice(1,t.end.length);l.push(this.sourceToken);let c={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let s=this.source.indexOf(`
|
|
138
|
-
`)+1;while(s!==0)this.onNewLine(this.offset+s),s=this.source.indexOf(`
|
|
139
|
-
`,s)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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 s=is(t),i=$e(s);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 s=is(t),i=$e(s);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,s){if(this.type!=="comment")return!1;if(this.indent<=s)return!1;return t.every((i)=>i.type==="newline"||i.type==="space")}*documentEnd(t){if(this.type!=="doc-mode"){if(t.end)t.end.push(this.sourceToken);else t.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(t){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(t.end)t.end.push(this.sourceToken);else t.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}sp.Parser=Jr});var Hr=m(function(fp){var Vr=pn(),ip=it(),ft=rt(),rp=Ss(),op=M(),ap=An(),Wr=On();function Qr(t){let s=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||s&&new ap.LineCounter||null,prettyErrors:s}}function lp(t,s={}){let{lineCounter:i,prettyErrors:o}=Qr(s),a=new Wr.Parser(i?.addNewLine),l=new Vr.Composer(s),c=Array.from(l.compose(a.parse(t)));if(o&&i)for(let f of c)f.errors.forEach(ft.prettifyError(t,i)),f.warnings.forEach(ft.prettifyError(t,i));if(c.length>0)return c;return Object.assign([],{empty:!0},l.streamInfo())}function Gr(t,s={}){let{lineCounter:i,prettyErrors:o}=Qr(s),a=new Wr.Parser(i?.addNewLine),l=new Vr.Composer(s),c=null;for(let f of l.compose(a.parse(t),!0,t.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new ft.YAMLParseError(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(o&&i)c.errors.forEach(ft.prettifyError(t,i)),c.warnings.forEach(ft.prettifyError(t,i));return c}function cp(t,s,i){let o=void 0;if(typeof s==="function")o=s;else if(i===void 0&&s&&typeof s==="object")i=s;let a=Gr(t,i);if(!a)return null;if(a.warnings.forEach((l)=>rp.warn(a.options.logLevel,l)),a.errors.length>0)if(a.options.logLevel!=="silent")throw a.errors[0];else a.errors=[];return a.toJS(Object.assign({reviver:o},i))}function up(t,s,i){let o=null;if(typeof s==="function"||Array.isArray(s))o=s;else if(i===void 0&&s)i=s;if(typeof i==="string")i=i.length;if(typeof i==="number"){let a=Math.round(i);i=a<1?void 0:a>8?{indent:8}:{indent:a}}if(t===void 0){let{keepUndefined:a}=i??s??{};if(!a)return}if(op.isDocument(t)&&!o)return t.toString(i);return new ip.Document(t,o,i).toString(i)}fp.parse=cp;fp.parseAllDocuments=lp;fp.parseDocument=Gr;fp.stringify=up});var hs={};k(hs,{Library:()=>hs,fetchChanged:()=>It,library:()=>je,namedSkillMarkdown:()=>gi,prompt:()=>dr,servers:()=>Xe,skillMarkdown:()=>hi,write:()=>Tt,writeInstructions:()=>dn});import{randomUUID as Zr}from"node:crypto";import{existsSync as Mn,mkdirSync as um,renameSync as eo,rmSync as Pn}from"node:fs";import ht from"node:path";var gp=pn(),yp=it(),bp=Gs(),qn=rt(),Sp=Be(),pe=M(),wp=ce(),vp=K(),kp=fe(),Np=he(),Pg=ss(),Ap=Nn(),Op=An(),qp=On(),os=Hr(),Xr=xe();var Ep=gp.Composer,Lp=yp.Document,Cp=bp.Schema,{YAMLError:Tp,YAMLParseError:Ip,YAMLWarning:Pp}=qn,Mp=Sp.Alias,{isAlias:_p,isCollection:$p,isDocument:xp,isMap:Dp,isNode:Bp,isPair:Kp,isScalar:jp,isSeq:ds}=pe,Rp=wp.Pair,Fp=vp.Scalar,Up=kp.YAMLMap,Yp=Np.YAMLSeq;var Jp=Ap.Lexer,Vp=Op.LineCounter,Wp=qp.Parser,{parse:En,parseAllDocuments:Qp,parseDocument:ro,stringify:Ln}=os,{visit:Gp,visitAsync:Hp}=Xr;import{randomUUID as em}from"node:crypto";import{chmodSync as tm,copyFileSync as sm,existsSync as Cn,mkdirSync as nm,renameSync as im,rmSync as rm,statSync as om,writeFileSync as am}from"node:fs";import lm from"node:path";var ur={originals:x(e,n({value:S(j)})),written:x(e,j)};function yt(t){let s=J(t);if(s===void 0||s.trim()==="")return;let i=F(z(Z(j))(s));if(typeof i!=="object"||i===null||Array.isArray(i))throw Error(`${t} isn't valid JSON, so it was left alone. Fix it and run setup again.`);return{...i}}function bt(t,s,i){let o=`${JSON.stringify(s,null,2)}
|
|
140
|
-
`;if(J(t)===o)return;At(t,o,i)}function pr(t,s,i,o){let a={...i?.originals},l={...i?.written};return Object.keys(a).filter((c)=>!(c in s)).forEach((c)=>{$n(t,c,{originals:a,written:l}),delete a[c],delete l[c]}),Object.entries(s).forEach(([c,f])=>{if(c in l&&JSON.stringify(oo(t,c))!==JSON.stringify(l[c])&&!o)return;if(!(c in a))a[c]=cm(t,c);ms(t,c,f),l[c]=f}),{originals:a,written:l}}function $n(t,s,i){if(JSON.stringify(oo(t,s))!==JSON.stringify(i.written[s]))return;let o=i.originals[s];if(o&&"value"in o&&o.value!==void 0)ms(t,s,o.value);else mi(t,s)}function oo(t,s){let[i,o]=Tn(s);return o===void 0?t[i]:_(t[i])[o]}function ms(t,s,i){let[o,a]=Tn(s);if(a===void 0)t[o]=i;else t[o]={..._(t[o]),[a]:i}}function mi(t,s){let[i,o]=Tn(s);if(o===void 0){delete t[i];return}let a=_(t[i]);if(delete a[o],Object.keys(a).length===0)delete t[i];else t[i]=a}var Qe=(t)=>`${t}.opencode-console.bak`;function fn(t){if(!Cn(t)||Cn(Qe(t)))return;sm(t,Qe(t)),tm(Qe(t),384)}function At(t,s,i=420){nm(lm.dirname(t),{recursive:!0});let o=`${t}.${em()}.tmp`;am(o,s,{mode:Cn(t)?om(t).mode&511:i,flag:"wx"});try{im(o,t)}catch(a){throw rm(o,{force:!0}),a}}function _(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)?{...t}:{}}function at(t){return typeof t==="string"&&t!==""?t:void 0}function cm(t,s){let i=oo(t,s);return i===void 0?{}:{value:i}}function Tn(t){let s=t.indexOf(".");return s===-1?[t,void 0]:[t.slice(0,s),t.slice(s+1)]}function fr(t){return t.map((s)=>process.platform==="win32"?`"${s.replaceAll('"','""')}"`:/^[\w@%+=:,./-]+$/.test(s)?s:`'${s.replaceAll("'",`'"'"'`)}'`).join(" ")}var fm=n({instructions:S(u(n({name:e,content:e}))),skills:S(u(n({slug:e,version:e})))}),hm=n({servers:x(e,n({type:e,url:S(e),headers:S(x(e,e))}))});function je(t){let s=F(z(fm)(t.library));return{instructions:s?.instructions??[],skills:(s?.skills??[]).filter((i)=>pm(i.slug))}}function dr(t){if(t.length===0)return;return t.map((s)=>`## ${s.name}
|
|
141
|
-
|
|
142
|
-
${s.content.trim()}`).join(`
|
|
143
|
-
|
|
144
|
-
`)}function Xe(t){let s=He(z(hm)(t.mcp),()=>({servers:{}})).servers;return Object.fromEntries(Object.entries(s).flatMap(([i,o])=>o.type==="remote"&&o.url!==void 0?[[i,{url:o.url,headers:o.headers}]]:[]))}var It=D("Library.fetchChanged")(function*(t,s,i,o){return yield*Ce(i.filter((a)=>{let l=Mn(ht.join(s,a.slug));if(l&&!(a.slug in o))return!1;return o[a.slug]!==a.version||!l}),(a)=>G(function*(){let l=yield*Is(t,a.slug),c=yield*Ce(l.files,(f)=>f.kind==="text"?r({path:f.path,content:f.content}):Ts(t,a.slug,f.sha256).pipe(g((h)=>({path:f.path,content:h}))),{concurrency:4});return{slug:a.slug,version:a.version,files:c}}),{concurrency:2})});function Tt(t,s,i,o,a={}){let l={},c=[];return Object.keys(o).filter((f)=>!s.some((h)=>h.slug===f)).forEach((f)=>Pn(ht.join(t,f),{recursive:!0,force:!0})),s.forEach((f)=>{let h=ht.join(t,f.slug);if(Mn(h)&&!(f.slug in o)){c.push(`/${f.slug}`);return}let d=i.find((w)=>w.slug===f.slug);if(d)dm(h,d.files,a.named?f.slug:void 0);l[f.slug]=d?.version??o[f.slug]??f.version}),{skills:l,skipped:c}}function dm(t,s,i){let o=`${t}.${Zr()}.tmp`,a=`${t}.${Zr()}.old`;um(o,{recursive:!0});try{if(s.forEach((l)=>{let c=l.path.split(/[\\/]/);if(l.path===""||ht.isAbsolute(l.path)||c.some((h)=>h===".."||h===""))return;let f=l.path==="SKILL.md"&&typeof l.content==="string"?i===void 0?hi(l.content):gi(l.content,i):l.content;At(ht.join(o,l.path),f)}),Mn(t))eo(t,a);eo(o,t)}finally{Pn(o,{recursive:!0,force:!0}),Pn(a,{recursive:!0,force:!0})}}var as="<!-- opencode-console:start -->",In="<!-- opencode-console:end -->";function dn(t,s,i,o){if(i.length===0&&!s?.includes(as))return o;let a=(s??"").replace(new RegExp(`\\n*${as}[\\s\\S]*?${In}\\n?`),`
|
|
145
|
-
`).trim(),l=(d)=>d.replaceAll(as,"<!-- opencode-console start -->").replaceAll(In,"<!-- opencode-console end -->"),c=i.length===0?"":[as,"# Workspace instructions from OpenCode Console",...i.map((d)=>`## ${l(d.name)}
|
|
146
|
-
|
|
147
|
-
${l(d.content.trim())}`),In].join(`
|
|
148
|
-
|
|
149
|
-
`),f=[a,c].filter((d)=>d!=="").join(`
|
|
150
|
-
|
|
151
|
-
`),h=o||s===void 0&&c!=="";if(f===""&&h)return W(t),!1;if(`${f}
|
|
152
|
-
`!==s)At(t,`${f}
|
|
153
|
-
`);return h}function hi(t){let s=t.match(/^---\n([\s\S]*?)\n---\n/);if(!s)return t;let i=s[1].split(`
|
|
154
|
-
`),o=i.some((f)=>/^\s*"?opencode\/autoinvoke"?:\s*false\s*$/.test(f)),l=[...i.filter((f,h)=>{if(f.startsWith("name:"))return!1;if(/^metadata:\s*$/.test(f))return i[h+1]?.trim().startsWith('"opencode/autoinvoke"')!==!0;return!/^\s+"opencode\/autoinvoke":/.test(f)}),...o?["disable-model-invocation: true"]:[]],c=t.slice(s[0].length);return l.length===0?c.replace(/^\n/,""):`---
|
|
155
|
-
${l.join(`
|
|
156
|
-
`)}
|
|
157
|
-
---
|
|
158
|
-
${c}`}function gi(t,s){let i=t.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/),o=i?.[1],a=_(o===void 0?void 0:Ie(L(()=>En(o)).pipe(Ge(()=>{return})))),l=_(a.metadata),c=l["opencode/autoinvoke"]===!1||a["opencode/autoinvoke"]===!1;delete l["opencode/autoinvoke"];let f=Object.fromEntries(Object.entries(a).filter(([p])=>!["name","description","metadata","opencode/autoinvoke"].includes(p))),h=(p)=>at(typeof p==="string"?p.trim():void 0),d={name:s,description:h(a.description)??h(a.name)??s,...f,...Object.keys(l).length>0?{metadata:l}:{},...c?{"disable-model-invocation":!0}:{}},w=i?t.slice(i[0].length):t;return`---
|
|
159
|
-
${Ln(d).trimEnd()}
|
|
160
|
-
---
|
|
161
|
-
${w}`}function pm(t){return/^[a-z0-9][a-z0-9._-]*$/i.test(t)&&t.toLowerCase()!=="synced"}
|
|
162
|
-
export{ds,ro,ur,yt,bt,pr,$n,oo,ms,mi,Qe,fn,At,_,at,fr,je,dr,Xe,It,Tt,dn,hi,gi,hs};
|