agent-skill-manager 1.7.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,155 +1,158 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{a as T0,c as X0,d as s1,e as J2,f as n1,g as r1,h as H2,i as o1,j as T,k as v1,l as t1,m as Y2,n as e1,o as q4,p as $4,q as U0,r as B2,s as Z4,u as U4,v as X4,w as V2}from"./chunk-ghqb5qqv.js";import{A as c1,B as v,C as a1,D as G2,E as cq,F as x,G as i1,x as d,y as F,z as y}from"./chunk-wdjcav1v.js";var P=F((S4)=>{var iq=Symbol.for("yaml.alias"),P2=Symbol.for("yaml.document"),Zq=Symbol.for("yaml.map"),N2=Symbol.for("yaml.pair"),sq=Symbol.for("yaml.scalar"),Uq=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),D4=(q)=>!!q&&typeof q==="object"&&q[c]===iq,w4=(q)=>!!q&&typeof q==="object"&&q[c]===P2,P4=(q)=>!!q&&typeof q==="object"&&q[c]===Zq,N4=(q)=>!!q&&typeof q==="object"&&q[c]===N2,j2=(q)=>!!q&&typeof q==="object"&&q[c]===sq,j4=(q)=>!!q&&typeof q==="object"&&q[c]===Uq;function C2(q){if(q&&typeof q==="object")switch(q[c]){case Zq:case Uq:return!0}return!1}function C4(q){if(q&&typeof q==="object")switch(q[c]){case iq:case Zq:case sq:case Uq:return!0}return!1}var b4=(q)=>(j2(q)||C2(q))&&!!q.anchor;S4.ALIAS=iq;S4.DOC=P2;S4.MAP=Zq;S4.NODE_TYPE=c;S4.PAIR=N2;S4.SCALAR=sq;S4.SEQ=Uq;S4.hasAnchor=b4;S4.isAlias=D4;S4.isCollection=C2;S4.isDocument=w4;S4.isMap=P4;S4.isNode=C4;S4.isPair=N4;S4.isScalar=j2;S4.isSeq=j4});var P0=F((s4)=>{var E=P(),f=Symbol("break visit"),b2=Symbol("skip children"),m=Symbol("remove node");function Xq(q,$){let Z=S2($);if(E.isDocument(q)){if(O0(null,q.contents,Z,Object.freeze([q]))===m)q.contents=null}else O0(null,q,Z,Object.freeze([]))}Xq.BREAK=f;Xq.SKIP=b2;Xq.REMOVE=m;function O0(q,$,Z,U){let X=E2(q,$,Z,U);if(E.isNode(X)||E.isPair(X))return f2(q,U,X),O0(q,X,Z,U);if(typeof X!=="symbol"){if(E.isCollection($)){U=Object.freeze(U.concat($));for(let Q=0;Q<$.items.length;++Q){let z=O0(Q,$.items[Q],Z,U);if(typeof z==="number")Q=z-1;else if(z===f)return f;else if(z===m)$.items.splice(Q,1),Q-=1}}else if(E.isPair($)){U=Object.freeze(U.concat($));let Q=O0("key",$.key,Z,U);if(Q===f)return f;else if(Q===m)$.key=null;let z=O0("value",$.value,Z,U);if(z===f)return f;else if(z===m)$.value=null}}return X}async function Qq(q,$){let Z=S2($);if(E.isDocument(q)){if(await _0(null,q.contents,Z,Object.freeze([q]))===m)q.contents=null}else await _0(null,q,Z,Object.freeze([]))}Qq.BREAK=f;Qq.SKIP=b2;Qq.REMOVE=m;async function _0(q,$,Z,U){let X=await E2(q,$,Z,U);if(E.isNode(X)||E.isPair(X))return f2(q,U,X),_0(q,X,Z,U);if(typeof X!=="symbol"){if(E.isCollection($)){U=Object.freeze(U.concat($));for(let Q=0;Q<$.items.length;++Q){let z=await _0(Q,$.items[Q],Z,U);if(typeof z==="number")Q=z-1;else if(z===f)return f;else if(z===m)$.items.splice(Q,1),Q-=1}}else if(E.isPair($)){U=Object.freeze(U.concat($));let Q=await _0("key",$.key,Z,U);if(Q===f)return f;else if(Q===m)$.key=null;let z=await _0("value",$.value,Z,U);if(z===f)return f;else if(z===m)$.value=null}}return X}function S2(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function E2(q,$,Z,U){if(typeof Z==="function")return Z(q,$,U);if(E.isMap($))return Z.Map?.(q,$,U);if(E.isSeq($))return Z.Seq?.(q,$,U);if(E.isPair($))return Z.Pair?.(q,$,U);if(E.isScalar($))return Z.Scalar?.(q,$,U);if(E.isAlias($))return Z.Alias?.(q,$,U);return}function f2(q,$,Z){let U=$[$.length-1];if(E.isCollection(U))U.items[q]=Z;else if(E.isPair(U))if(q==="key")U.key=Z;else U.value=Z;else if(E.isDocument(U))U.contents=Z;else{let X=E.isAlias(U)?"alias":"scalar";throw Error(`Cannot replace node with ${X} parent`)}}s4.visit=Xq;s4.visitAsync=Qq});var nq=F((q8)=>{var y2=P(),o4=P0(),t4={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},e4=(q)=>q.replace(/[!,[\]{}]/g,($)=>t4[$]);class g{constructor(q,$){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},g.defaultYaml,q),this.tags=Object.assign({},g.defaultTags,$)}clone(){let q=new g(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new g(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:g.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},g.defaultTags);break}return q}add(q,$){if(this.atNextDocument)this.yaml={explicit:g.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},g.defaultTags),this.atNextDocument=!1;let Z=q.trim().split(/[ \t]+/),U=Z.shift();switch(U){case"%TAG":{if(Z.length!==2){if($(0,"%TAG directive should contain exactly two parts"),Z.length<2)return!1}let[X,Q]=Z;return this.tags[X]=Q,!0}case"%YAML":{if(this.yaml.explicit=!0,Z.length!==1)return $(0,"%YAML directive should contain exactly one part"),!1;let[X]=Z;if(X==="1.1"||X==="1.2")return this.yaml.version=X,!0;else{let Q=/^\d+\.\d+$/.test(X);return $(6,`Unsupported YAML version ${X}`,Q),!1}}default:return $(0,`Unknown directive ${U}`,!0),!1}}tagName(q,$){if(q==="!")return"!";if(q[0]!=="!")return $(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let Q=q.slice(2,-1);if(Q==="!"||Q==="!!")return $(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")$("Verbatim tags must end with a >");return Q}let[,Z,U]=q.match(/^(.*!)([^!]*)$/s);if(!U)$(`The ${q} tag has no suffix`);let X=this.tags[Z];if(X)try{return X+decodeURIComponent(U)}catch(Q){return $(String(Q)),null}if(Z==="!")return q;return $(`Could not resolve tag: ${q}`),null}tagString(q){for(let[$,Z]of Object.entries(this.tags))if(q.startsWith(Z))return $+e4(q.substring(Z.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let $=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Z=Object.entries(this.tags),U;if(q&&Z.length>0&&y2.isNode(q.contents)){let X={};o4.visit(q.contents,(Q,z)=>{if(y2.isNode(z)&&z.tag)X[z.tag]=!0}),U=Object.keys(X)}else U=[];for(let[X,Q]of Z){if(X==="!!"&&Q==="tag:yaml.org,2002:")continue;if(!q||U.some((z)=>z.startsWith(Q)))$.push(`%TAG ${X} ${Q}`)}return $.join(`
4
- `)}}g.defaultYaml={explicit:!1,version:"1.2"};g.defaultTags={"!!":"tag:yaml.org,2002:"};q8.Directives=g});var zq=F((Q8)=>{var x2=P(),Z8=P0();function U8(q){if(/[\x00-\x19\s,[\]{}]/.test(q)){let Z=`Anchor must not contain whitespace or control characters: ${JSON.stringify(q)}`;throw Error(Z)}return!0}function g2(q){let $=new Set;return Z8.visit(q,{Value(Z,U){if(U.anchor)$.add(U.anchor)}}),$}function h2(q,$){for(let Z=1;;++Z){let U=`${q}${Z}`;if(!$.has(U))return U}}function X8(q,$){let Z=[],U=new Map,X=null;return{onAnchor:(Q)=>{Z.push(Q),X??(X=g2(q));let z=h2($,X);return X.add(z),z},setAnchors:()=>{for(let Q of Z){let z=U.get(Q);if(typeof z==="object"&&z.anchor&&(x2.isScalar(z.node)||x2.isCollection(z.node)))z.node.anchor=z.anchor;else{let G=Error("Failed to resolve repeated object (this should not happen)");throw G.source=Q,G}}},sourceObjects:U}}Q8.anchorIsValid=U8;Q8.anchorNames=g2;Q8.createNodeAnchors=X8;Q8.findNewAnchor=h2});var rq=F((Y8)=>{function N0(q,$,Z,U){if(U&&typeof U==="object")if(Array.isArray(U))for(let X=0,Q=U.length;X<Q;++X){let z=U[X],G=N0(q,U,String(X),z);if(G===void 0)delete U[X];else if(G!==z)U[X]=G}else if(U instanceof Map)for(let X of Array.from(U.keys())){let Q=U.get(X),z=N0(q,U,X,Q);if(z===void 0)U.delete(X);else if(z!==Q)U.set(X,z)}else if(U instanceof Set)for(let X of Array.from(U)){let Q=N0(q,U,X,X);if(Q===void 0)U.delete(X);else if(Q!==X)U.delete(X),U.add(Q)}else for(let[X,Q]of Object.entries(U)){let z=N0(q,U,X,Q);if(z===void 0)delete U[X];else if(z!==Q)U[X]=z}return q.call($,Z,U)}Y8.applyReviver=N0});var s=F((W8)=>{var V8=P();function k2(q,$,Z){if(Array.isArray(q))return q.map((U,X)=>k2(U,String(X),Z));if(q&&typeof q.toJSON==="function"){if(!Z||!V8.hasAnchor(q))return q.toJSON($,Z);let U={aliasCount:0,count:1,res:void 0};Z.anchors.set(q,U),Z.onCreate=(Q)=>{U.res=Q,delete Z.onCreate};let X=q.toJSON($,Z);if(Z.onCreate)Z.onCreate(X);return X}if(typeof q==="bigint"&&!Z?.keep)return Number(q);return q}W8.toJS=k2});var Gq=F((I8)=>{var O8=rq(),u2=P(),_8=s();class v2{constructor(q){Object.defineProperty(this,u2.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:$,maxAliasCount:Z,onAnchor:U,reviver:X}={}){if(!u2.isDocument(q))throw TypeError("A document argument is required");let Q={anchors:new Map,doc:q,keep:!0,mapAsMap:$===!0,mapKeyWarned:!1,maxAliasCount:typeof Z==="number"?Z:100},z=_8.toJS(this,"",Q);if(typeof U==="function")for(let{count:G,res:J}of Q.anchors.values())U(J,G);return typeof X==="function"?O8.applyReviver(X,{"":z},"",z):z}}I8.NodeBase=v2});var j0=F((K8)=>{var F8=zq(),R8=P0(),I0=P(),A8=Gq(),M8=s();class m2 extends A8.NodeBase{constructor(q){super(I0.ALIAS);this.source=q,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(q,$){let Z;if($?.aliasResolveCache)Z=$.aliasResolveCache;else if(Z=[],R8.visit(q,{Node:(X,Q)=>{if(I0.isAlias(Q)||I0.hasAnchor(Q))Z.push(Q)}}),$)$.aliasResolveCache=Z;let U=void 0;for(let X of Z){if(X===this)break;if(X.anchor===this.source)U=X}return U}toJSON(q,$){if(!$)return{source:this.source};let{anchors:Z,doc:U,maxAliasCount:X}=$,Q=this.resolve(U,$);if(!Q){let G=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(G)}let z=Z.get(Q);if(!z)M8.toJS(Q,null,$),z=Z.get(Q);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(X>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=Jq(U,Q,Z);if(z.count*z.aliasCount>X)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString(q,$,Z){let U=`*${this.source}`;if(q){if(F8.anchorIsValid(this.source),q.options.verifyAliasOrder&&!q.anchors.has(this.source)){let X=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(X)}if(q.implicitKey)return`${U} `}return U}}function Jq(q,$,Z){if(I0.isAlias($)){let U=$.resolve(q),X=Z&&U&&Z.get(U);return X?X.count*X.aliasCount:0}else if(I0.isCollection($)){let U=0;for(let X of $.items){let Q=Jq(q,X,Z);if(Q>U)U=Q}return U}else if(I0.isPair($)){let U=Jq(q,$.key,Z),X=Jq(q,$.value,Z);return Math.max(U,X)}return 1}K8.Alias=m2});var C=F((C8)=>{var w8=P(),P8=Gq(),N8=s(),j8=(q)=>!q||typeof q!=="function"&&typeof q!=="object";class Q0 extends P8.NodeBase{constructor(q){super(w8.SCALAR);this.value=q}toJSON(q,$){return $?.keep?this.value:N8.toJS(this.value,q,$)}toString(){return String(this.value)}}Q0.BLOCK_FOLDED="BLOCK_FOLDED";Q0.BLOCK_LITERAL="BLOCK_LITERAL";Q0.PLAIN="PLAIN";Q0.QUOTE_DOUBLE="QUOTE_DOUBLE";Q0.QUOTE_SINGLE="QUOTE_SINGLE";C8.Scalar=Q0;C8.isScalarValue=j8});var C0=F((g8)=>{var E8=j0(),z0=P(),p2=C(),f8="tag:yaml.org,2002:";function y8(q,$,Z){if($){let U=Z.filter((Q)=>Q.tag===$),X=U.find((Q)=>!Q.format)??U[0];if(!X)throw Error(`Tag ${$} not found`);return X}return Z.find((U)=>U.identify?.(q)&&!U.format)}function x8(q,$,Z){if(z0.isDocument(q))q=q.contents;if(z0.isNode(q))return q;if(z0.isPair(q)){let Y=Z.schema[z0.MAP].createNode?.(Z.schema,null,Z);return Y.items.push(q),Y}if(q instanceof String||q instanceof Number||q instanceof Boolean||typeof BigInt<"u"&&q instanceof BigInt)q=q.valueOf();let{aliasDuplicateObjects:U,onAnchor:X,onTagObj:Q,schema:z,sourceObjects:G}=Z,J=void 0;if(U&&q&&typeof q==="object")if(J=G.get(q),J)return J.anchor??(J.anchor=X(q)),new E8.Alias(J.anchor);else J={anchor:null,node:null},G.set(q,J);if($?.startsWith("!!"))$=f8+$.slice(2);let H=y8(q,$,z.tags);if(!H){if(q&&typeof q.toJSON==="function")q=q.toJSON();if(!q||typeof q!=="object"){let Y=new p2.Scalar(q);if(J)J.node=Y;return Y}H=q instanceof Map?z[z0.MAP]:(Symbol.iterator in Object(q))?z[z0.SEQ]:z[z0.MAP]}if(Q)Q(H),delete Z.onTagObj;let W=H?.createNode?H.createNode(Z.schema,q,Z):typeof H?.nodeClass?.from==="function"?H.nodeClass.from(Z.schema,q,Z):new p2.Scalar(q);if($)W.tag=$;else if(!H.default)W.tag=H.tag;if(J)J.node=W;return W}g8.createNode=x8});var Hq=F((v8)=>{var k8=C0(),p=P(),u8=Gq();function oq(q,$,Z){let U=Z;for(let X=$.length-1;X>=0;--X){let Q=$[X];if(typeof Q==="number"&&Number.isInteger(Q)&&Q>=0){let z=[];z[Q]=U,U=z}else U=new Map([[Q,U]])}return k8.createNode(U,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:q,sourceObjects:new Map})}var d2=(q)=>q==null||typeof q==="object"&&!!q[Symbol.iterator]().next().done;class l2 extends u8.NodeBase{constructor(q,$){super(q);Object.defineProperty(this,"schema",{value:$,configurable:!0,enumerable:!1,writable:!0})}clone(q){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(q)$.schema=q;if($.items=$.items.map((Z)=>p.isNode(Z)||p.isPair(Z)?Z.clone(q):Z),this.range)$.range=this.range.slice();return $}addIn(q,$){if(d2(q))this.add($);else{let[Z,...U]=q,X=this.get(Z,!0);if(p.isCollection(X))X.addIn(U,$);else if(X===void 0&&this.schema)this.set(Z,oq(this.schema,U,$));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${U}`)}}deleteIn(q){let[$,...Z]=q;if(Z.length===0)return this.delete($);let U=this.get($,!0);if(p.isCollection(U))return U.deleteIn(Z);else throw Error(`Expected YAML collection at ${$}. Remaining path: ${Z}`)}getIn(q,$){let[Z,...U]=q,X=this.get(Z,!0);if(U.length===0)return!$&&p.isScalar(X)?X.value:X;else return p.isCollection(X)?X.getIn(U,$):void 0}hasAllNullValues(q){return this.items.every(($)=>{if(!p.isPair($))return!1;let Z=$.value;return Z==null||q&&p.isScalar(Z)&&Z.value==null&&!Z.commentBefore&&!Z.comment&&!Z.tag})}hasIn(q){let[$,...Z]=q;if(Z.length===0)return this.has($);let U=this.get($,!0);return p.isCollection(U)?U.hasIn(Z):!1}setIn(q,$){let[Z,...U]=q;if(U.length===0)this.set(Z,$);else{let X=this.get(Z,!0);if(p.isCollection(X))X.setIn(U,$);else if(X===void 0&&this.schema)this.set(Z,oq(this.schema,U,$));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${U}`)}}}v8.Collection=l2;v8.collectionFromPath=oq;v8.isEmptyPath=d2});var b0=F((a8)=>{var l8=(q)=>q.replace(/^(?!$)(?: $)?/gm,"#");function tq(q,$){if(/^\n+$/.test(q))return q.substring(1);return $?q.replace(/^(?! *$)/gm,$):q}var c8=(q,$,Z)=>q.endsWith(`
5
- `)?tq(Z,$):Z.includes(`
3
+ import{a as I0,c as a,d as V4,e as w2,f as B4,g as W4,h as P2,i as _4,j as B,k as e9,l as F4,m as N2,n as T4,o as L4,p as O4,q as G0,r as j2,s as I4,u as R4,v as A4,w as b2}from"./chunk-6q3wqv6v.js";import{A as G4,B as x,C as H4,D as D2,E as Z$,F as g,G as Y4,x as i,y as I,z as h}from"./chunk-wdjcav1v.js";var N=I((q5)=>{var G$=Symbol.for("yaml.alias"),u2=Symbol.for("yaml.document"),Gq=Symbol.for("yaml.map"),v2=Symbol.for("yaml.pair"),H$=Symbol.for("yaml.scalar"),Hq=Symbol.for("yaml.seq"),o=Symbol.for("yaml.node.type"),a4=(q)=>!!q&&typeof q==="object"&&q[o]===G$,s4=(q)=>!!q&&typeof q==="object"&&q[o]===u2,n4=(q)=>!!q&&typeof q==="object"&&q[o]===Gq,o4=(q)=>!!q&&typeof q==="object"&&q[o]===v2,m2=(q)=>!!q&&typeof q==="object"&&q[o]===H$,r4=(q)=>!!q&&typeof q==="object"&&q[o]===Hq;function d2(q){if(q&&typeof q==="object")switch(q[o]){case Gq:case Hq:return!0}return!1}function t4(q){if(q&&typeof q==="object")switch(q[o]){case G$:case Gq:case H$:case Hq:return!0}return!1}var e4=(q)=>(m2(q)||d2(q))&&!!q.anchor;q5.ALIAS=G$;q5.DOC=u2;q5.MAP=Gq;q5.NODE_TYPE=o;q5.PAIR=v2;q5.SCALAR=H$;q5.SEQ=Hq;q5.hasAnchor=e4;q5.isAlias=a4;q5.isCollection=d2;q5.isDocument=s4;q5.isMap=n4;q5.isNode=t4;q5.isPair=o4;q5.isScalar=m2;q5.isSeq=r4});var f0=I((L5)=>{var y=N(),k=Symbol("break visit"),p2=Symbol("skip children"),l=Symbol("remove node");function Yq(q,$){let Z=l2($);if(y.isDocument(q)){if(R0(null,q.contents,Z,Object.freeze([q]))===l)q.contents=null}else R0(null,q,Z,Object.freeze([]))}Yq.BREAK=k;Yq.SKIP=p2;Yq.REMOVE=l;function R0(q,$,Z,X){let z=c2(q,$,Z,X);if(y.isNode(z)||y.isPair(z))return i2(q,X,z),R0(q,z,Z,X);if(typeof z!=="symbol"){if(y.isCollection($)){X=Object.freeze(X.concat($));for(let U=0;U<$.items.length;++U){let Q=R0(U,$.items[U],Z,X);if(typeof Q==="number")U=Q-1;else if(Q===k)return k;else if(Q===l)$.items.splice(U,1),U-=1}}else if(y.isPair($)){X=Object.freeze(X.concat($));let U=R0("key",$.key,Z,X);if(U===k)return k;else if(U===l)$.key=null;let Q=R0("value",$.value,Z,X);if(Q===k)return k;else if(Q===l)$.value=null}}return z}async function Vq(q,$){let Z=l2($);if(y.isDocument(q)){if(await A0(null,q.contents,Z,Object.freeze([q]))===l)q.contents=null}else await A0(null,q,Z,Object.freeze([]))}Vq.BREAK=k;Vq.SKIP=p2;Vq.REMOVE=l;async function A0(q,$,Z,X){let z=await c2(q,$,Z,X);if(y.isNode(z)||y.isPair(z))return i2(q,X,z),A0(q,z,Z,X);if(typeof z!=="symbol"){if(y.isCollection($)){X=Object.freeze(X.concat($));for(let U=0;U<$.items.length;++U){let Q=await A0(U,$.items[U],Z,X);if(typeof Q==="number")U=Q-1;else if(Q===k)return k;else if(Q===l)$.items.splice(U,1),U-=1}}else if(y.isPair($)){X=Object.freeze(X.concat($));let U=await A0("key",$.key,Z,X);if(U===k)return k;else if(U===l)$.key=null;let Q=await A0("value",$.value,Z,X);if(Q===k)return k;else if(Q===l)$.value=null}}return z}function l2(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function c2(q,$,Z,X){if(typeof Z==="function")return Z(q,$,X);if(y.isMap($))return Z.Map?.(q,$,X);if(y.isSeq($))return Z.Seq?.(q,$,X);if(y.isPair($))return Z.Pair?.(q,$,X);if(y.isScalar($))return Z.Scalar?.(q,$,X);if(y.isAlias($))return Z.Alias?.(q,$,X);return}function i2(q,$,Z){let X=$[$.length-1];if(y.isCollection(X))X.items[q]=Z;else if(y.isPair(X))if(q==="key")X.key=Z;else X.value=Z;else if(y.isDocument(X))X.contents=Z;else{let z=y.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${z} parent`)}}L5.visit=Yq;L5.visitAsync=Vq});var Y$=I((M5)=>{var a2=N(),R5=f0(),A5={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},K5=(q)=>q.replace(/[!,[\]{}]/g,($)=>A5[$]);class v{constructor(q,$){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},v.defaultYaml,q),this.tags=Object.assign({},v.defaultTags,$)}clone(){let q=new v(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new v(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:v.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},v.defaultTags);break}return q}add(q,$){if(this.atNextDocument)this.yaml={explicit:v.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},v.defaultTags),this.atNextDocument=!1;let Z=q.trim().split(/[ \t]+/),X=Z.shift();switch(X){case"%TAG":{if(Z.length!==2){if($(0,"%TAG directive should contain exactly two parts"),Z.length<2)return!1}let[z,U]=Z;return this.tags[z]=U,!0}case"%YAML":{if(this.yaml.explicit=!0,Z.length!==1)return $(0,"%YAML directive should contain exactly one part"),!1;let[z]=Z;if(z==="1.1"||z==="1.2")return this.yaml.version=z,!0;else{let U=/^\d+\.\d+$/.test(z);return $(6,`Unsupported YAML version ${z}`,U),!1}}default:return $(0,`Unknown directive ${X}`,!0),!1}}tagName(q,$){if(q==="!")return"!";if(q[0]!=="!")return $(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let U=q.slice(2,-1);if(U==="!"||U==="!!")return $(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")$("Verbatim tags must end with a >");return U}let[,Z,X]=q.match(/^(.*!)([^!]*)$/s);if(!X)$(`The ${q} tag has no suffix`);let z=this.tags[Z];if(z)try{return z+decodeURIComponent(X)}catch(U){return $(String(U)),null}if(Z==="!")return q;return $(`Could not resolve tag: ${q}`),null}tagString(q){for(let[$,Z]of Object.entries(this.tags))if(q.startsWith(Z))return $+K5(q.substring(Z.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let $=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Z=Object.entries(this.tags),X;if(q&&Z.length>0&&a2.isNode(q.contents)){let z={};R5.visit(q.contents,(U,Q)=>{if(a2.isNode(Q)&&Q.tag)z[Q.tag]=!0}),X=Object.keys(z)}else X=[];for(let[z,U]of Z){if(z==="!!"&&U==="tag:yaml.org,2002:")continue;if(!q||X.some((Q)=>Q.startsWith(U)))$.push(`%TAG ${z} ${U}`)}return $.join(`
4
+ `)}}v.defaultYaml={explicit:!1,version:"1.2"};v.defaultTags={"!!":"tag:yaml.org,2002:"};M5.Directives=v});var Bq=I((j5)=>{var s2=N(),w5=f0();function P5(q){if(/[\x00-\x19\s,[\]{}]/.test(q)){let Z=`Anchor must not contain whitespace or control characters: ${JSON.stringify(q)}`;throw Error(Z)}return!0}function n2(q){let $=new Set;return w5.visit(q,{Value(Z,X){if(X.anchor)$.add(X.anchor)}}),$}function o2(q,$){for(let Z=1;;++Z){let X=`${q}${Z}`;if(!$.has(X))return X}}function N5(q,$){let Z=[],X=new Map,z=null;return{onAnchor:(U)=>{Z.push(U),z??(z=n2(q));let Q=o2($,z);return z.add(Q),Q},setAnchors:()=>{for(let U of Z){let Q=X.get(U);if(typeof Q==="object"&&Q.anchor&&(s2.isScalar(Q.node)||s2.isCollection(Q.node)))Q.node.anchor=Q.anchor;else{let J=Error("Failed to resolve repeated object (this should not happen)");throw J.source=U,J}}},sourceObjects:X}}j5.anchorIsValid=P5;j5.anchorNames=n2;j5.createNodeAnchors=N5;j5.findNewAnchor=o2});var V$=I((f5)=>{function y0(q,$,Z,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let z=0,U=X.length;z<U;++z){let Q=X[z],J=y0(q,X,String(z),Q);if(J===void 0)delete X[z];else if(J!==Q)X[z]=J}else if(X instanceof Map)for(let z of Array.from(X.keys())){let U=X.get(z),Q=y0(q,X,z,U);if(Q===void 0)X.delete(z);else if(Q!==U)X.set(z,Q)}else if(X instanceof Set)for(let z of Array.from(X)){let U=y0(q,X,z,z);if(U===void 0)X.delete(z);else if(U!==z)X.delete(z),X.add(U)}else for(let[z,U]of Object.entries(X)){let Q=y0(q,X,z,U);if(Q===void 0)delete X[z];else if(Q!==U)X[z]=Q}return q.call($,Z,X)}f5.applyReviver=y0});var e=I((g5)=>{var x5=N();function r2(q,$,Z){if(Array.isArray(q))return q.map((X,z)=>r2(X,String(z),Z));if(q&&typeof q.toJSON==="function"){if(!Z||!x5.hasAnchor(q))return q.toJSON($,Z);let X={aliasCount:0,count:1,res:void 0};Z.anchors.set(q,X),Z.onCreate=(U)=>{X.res=U,delete Z.onCreate};let z=q.toJSON($,Z);if(Z.onCreate)Z.onCreate(z);return z}if(typeof q==="bigint"&&!Z?.keep)return Number(q);return q}g5.toJS=r2});var Wq=I((v5)=>{var h5=V$(),t2=N(),u5=e();class e2{constructor(q){Object.defineProperty(this,t2.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:$,maxAliasCount:Z,onAnchor:X,reviver:z}={}){if(!t2.isDocument(q))throw TypeError("A document argument is required");let U={anchors:new Map,doc:q,keep:!0,mapAsMap:$===!0,mapKeyWarned:!1,maxAliasCount:typeof Z==="number"?Z:100},Q=u5.toJS(this,"",U);if(typeof X==="function")for(let{count:J,res:G}of U.anchors.values())X(G,J);return typeof z==="function"?h5.applyReviver(z,{"":Q},"",Q):Q}}v5.NodeBase=e2});var x0=I((i5)=>{var d5=Bq(),p5=f0(),K0=N(),l5=Wq(),c5=e();class q1 extends l5.NodeBase{constructor(q){super(K0.ALIAS);this.source=q,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(q,$){let Z;if($?.aliasResolveCache)Z=$.aliasResolveCache;else if(Z=[],p5.visit(q,{Node:(z,U)=>{if(K0.isAlias(U)||K0.hasAnchor(U))Z.push(U)}}),$)$.aliasResolveCache=Z;let X=void 0;for(let z of Z){if(z===this)break;if(z.anchor===this.source)X=z}return X}toJSON(q,$){if(!$)return{source:this.source};let{anchors:Z,doc:X,maxAliasCount:z}=$,U=this.resolve(X,$);if(!U){let J=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(J)}let Q=Z.get(U);if(!Q)c5.toJS(U,null,$),Q=Z.get(U);if(Q?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(z>=0){if(Q.count+=1,Q.aliasCount===0)Q.aliasCount=_q(X,U,Z);if(Q.count*Q.aliasCount>z)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return Q.res}toString(q,$,Z){let X=`*${this.source}`;if(q){if(d5.anchorIsValid(this.source),q.options.verifyAliasOrder&&!q.anchors.has(this.source)){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(z)}if(q.implicitKey)return`${X} `}return X}}function _q(q,$,Z){if(K0.isAlias($)){let X=$.resolve(q),z=Z&&X&&Z.get(X);return z?z.count*z.aliasCount:0}else if(K0.isCollection($)){let X=0;for(let z of $.items){let U=_q(q,z,Z);if(U>X)X=U}return X}else if(K0.isPair($)){let X=_q(q,$.key,Z),z=_q(q,$.value,Z);return Math.max(X,z)}return 1}i5.Alias=q1});var f=I((t5)=>{var s5=N(),n5=Wq(),o5=e(),r5=(q)=>!q||typeof q!=="function"&&typeof q!=="object";class H0 extends n5.NodeBase{constructor(q){super(s5.SCALAR);this.value=q}toJSON(q,$){return $?.keep?this.value:o5.toJS(this.value,q,$)}toString(){return String(this.value)}}H0.BLOCK_FOLDED="BLOCK_FOLDED";H0.BLOCK_LITERAL="BLOCK_LITERAL";H0.PLAIN="PLAIN";H0.QUOTE_DOUBLE="QUOTE_DOUBLE";H0.QUOTE_SINGLE="QUOTE_SINGLE";t5.Scalar=H0;t5.isScalarValue=r5});var g0=I((U8)=>{var $8=x0(),Y0=N(),$1=f(),Z8="tag:yaml.org,2002:";function X8(q,$,Z){if($){let X=Z.filter((U)=>U.tag===$),z=X.find((U)=>!U.format)??X[0];if(!z)throw Error(`Tag ${$} not found`);return z}return Z.find((X)=>X.identify?.(q)&&!X.format)}function z8(q,$,Z){if(Y0.isDocument(q))q=q.contents;if(Y0.isNode(q))return q;if(Y0.isPair(q)){let Y=Z.schema[Y0.MAP].createNode?.(Z.schema,null,Z);return Y.items.push(q),Y}if(q instanceof String||q instanceof Number||q instanceof Boolean||typeof BigInt<"u"&&q instanceof BigInt)q=q.valueOf();let{aliasDuplicateObjects:X,onAnchor:z,onTagObj:U,schema:Q,sourceObjects:J}=Z,G=void 0;if(X&&q&&typeof q==="object")if(G=J.get(q),G)return G.anchor??(G.anchor=z(q)),new $8.Alias(G.anchor);else G={anchor:null,node:null},J.set(q,G);if($?.startsWith("!!"))$=Z8+$.slice(2);let H=X8(q,$,Q.tags);if(!H){if(q&&typeof q.toJSON==="function")q=q.toJSON();if(!q||typeof q!=="object"){let Y=new $1.Scalar(q);if(G)G.node=Y;return Y}H=q instanceof Map?Q[Y0.MAP]:(Symbol.iterator in Object(q))?Q[Y0.SEQ]:Q[Y0.MAP]}if(U)U(H),delete Z.onTagObj;let W=H?.createNode?H.createNode(Z.schema,q,Z):typeof H?.nodeClass?.from==="function"?H.nodeClass.from(Z.schema,q,Z):new $1.Scalar(q);if($)W.tag=$;else if(!H.default)W.tag=H.tag;if(G)G.node=W;return W}U8.createNode=z8});var Fq=I((H8)=>{var J8=g0(),c=N(),G8=Wq();function B$(q,$,Z){let X=Z;for(let z=$.length-1;z>=0;--z){let U=$[z];if(typeof U==="number"&&Number.isInteger(U)&&U>=0){let Q=[];Q[U]=X,X=Q}else X=new Map([[U,X]])}return J8.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:q,sourceObjects:new Map})}var Z1=(q)=>q==null||typeof q==="object"&&!!q[Symbol.iterator]().next().done;class X1 extends G8.NodeBase{constructor(q,$){super(q);Object.defineProperty(this,"schema",{value:$,configurable:!0,enumerable:!1,writable:!0})}clone(q){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(q)$.schema=q;if($.items=$.items.map((Z)=>c.isNode(Z)||c.isPair(Z)?Z.clone(q):Z),this.range)$.range=this.range.slice();return $}addIn(q,$){if(Z1(q))this.add($);else{let[Z,...X]=q,z=this.get(Z,!0);if(c.isCollection(z))z.addIn(X,$);else if(z===void 0&&this.schema)this.set(Z,B$(this.schema,X,$));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}}deleteIn(q){let[$,...Z]=q;if(Z.length===0)return this.delete($);let X=this.get($,!0);if(c.isCollection(X))return X.deleteIn(Z);else throw Error(`Expected YAML collection at ${$}. Remaining path: ${Z}`)}getIn(q,$){let[Z,...X]=q,z=this.get(Z,!0);if(X.length===0)return!$&&c.isScalar(z)?z.value:z;else return c.isCollection(z)?z.getIn(X,$):void 0}hasAllNullValues(q){return this.items.every(($)=>{if(!c.isPair($))return!1;let Z=$.value;return Z==null||q&&c.isScalar(Z)&&Z.value==null&&!Z.commentBefore&&!Z.comment&&!Z.tag})}hasIn(q){let[$,...Z]=q;if(Z.length===0)return this.has($);let X=this.get($,!0);return c.isCollection(X)?X.hasIn(Z):!1}setIn(q,$){let[Z,...X]=q;if(X.length===0)this.set(Z,$);else{let z=this.get(Z,!0);if(c.isCollection(z))z.setIn(X,$);else if(z===void 0&&this.schema)this.set(Z,B$(this.schema,X,$));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}}}H8.Collection=X1;H8.collectionFromPath=B$;H8.isEmptyPath=Z1});var k0=I((F8)=>{var W8=(q)=>q.replace(/^(?!$)(?: $)?/gm,"#");function W$(q,$){if(/^\n+$/.test(q))return q.substring(1);return $?q.replace(/^(?! *$)/gm,$):q}var _8=(q,$,Z)=>q.endsWith(`
5
+ `)?W$(Z,$):Z.includes(`
6
6
  `)?`
7
- `+tq(Z,$):(q.endsWith(" ")?"":" ")+Z;a8.indentComment=tq;a8.lineComment=c8;a8.stringifyComment=l8});var a2=F((o8)=>{function r8(q,$,Z="flow",{indentAtStart:U,lineWidth:X=80,minContentWidth:Q=20,onFold:z,onOverflow:G}={}){if(!X||X<0)return q;if(X<Q)Q=0;let J=Math.max(1+Q,1+X-$.length);if(q.length<=J)return q;let H=[],W={},Y=X-$.length;if(typeof U==="number")if(U>X-Math.max(2,Q))H.push(0);else Y=X-U;let B=void 0,_=void 0,O=!1,V=-1,I=-1,L=-1;if(Z==="block"){if(V=c2(q,V,$.length),V!==-1)Y=V+J}for(let M;M=q[V+=1];){if(Z==="quoted"&&M==="\\"){switch(I=V,q[V+1]){case"x":V+=3;break;case"u":V+=5;break;case"U":V+=9;break;default:V+=1}L=V}if(M===`
8
- `){if(Z==="block")V=c2(q,V,$.length);Y=V+$.length+J,B=void 0}else{if(M===" "&&_&&_!==" "&&_!==`
9
- `&&_!=="\t"){let K=q[V+1];if(K&&K!==" "&&K!==`
10
- `&&K!=="\t")B=V}if(V>=Y)if(B)H.push(B),Y=B+J,B=void 0;else if(Z==="quoted"){while(_===" "||_==="\t")_=M,M=q[V+=1],O=!0;let K=V>L+1?V-2:I-1;if(W[K])return q;H.push(K),W[K]=!0,Y=K+J,B=void 0}else O=!0}_=M}if(O&&G)G();if(H.length===0)return q;if(z)z();let A=q.slice(0,H[0]);for(let M=0;M<H.length;++M){let K=H[M],D=H[M+1]||q.length;if(K===0)A=`
11
- ${$}${q.slice(0,D)}`;else{if(Z==="quoted"&&W[K])A+=`${q[K]}\\`;A+=`
12
- ${$}${q.slice(K+1,D)}`}}return A}function c2(q,$,Z){let U=$,X=$+1,Q=q[X];while(Q===" "||Q==="\t")if($<X+Z)Q=q[++$];else{do Q=q[++$];while(Q&&Q!==`
13
- `);U=$,X=$+1,Q=q[X]}return U}o8.FOLD_BLOCK="block";o8.FOLD_FLOW="flow";o8.FOLD_QUOTED="quoted";o8.foldFlowLines=r8});var E0=F((QZ)=>{var k=C(),n=a2(),Bq=(q,$)=>({indentAtStart:$?q.indent.length:q.indentAtStart,lineWidth:q.options.lineWidth,minContentWidth:q.options.minContentWidth}),Vq=(q)=>/^(%|---|\.\.\.)/m.test(q);function ZZ(q,$,Z){if(!$||$<0)return!1;let U=$-Z,X=q.length;if(X<=U)return!1;for(let Q=0,z=0;Q<X;++Q)if(q[Q]===`
14
- `){if(Q-z>U)return!0;if(z=Q+1,X-z<=U)return!1}return!0}function S0(q,$){let Z=JSON.stringify(q);if($.options.doubleQuotedAsJSON)return Z;let{implicitKey:U}=$,X=$.options.doubleQuotedMinMultiLineLength,Q=$.indent||(Vq(q)?" ":""),z="",G=0;for(let J=0,H=Z[J];H;H=Z[++J]){if(H===" "&&Z[J+1]==="\\"&&Z[J+2]==="n")z+=Z.slice(G,J)+"\\ ",J+=1,G=J,H="\\";if(H==="\\")switch(Z[J+1]){case"u":{z+=Z.slice(G,J);let W=Z.substr(J+2,4);switch(W){case"0000":z+="\\0";break;case"0007":z+="\\a";break;case"000b":z+="\\v";break;case"001b":z+="\\e";break;case"0085":z+="\\N";break;case"00a0":z+="\\_";break;case"2028":z+="\\L";break;case"2029":z+="\\P";break;default:if(W.substr(0,2)==="00")z+="\\x"+W.substr(2);else z+=Z.substr(J,6)}J+=5,G=J+1}break;case"n":if(U||Z[J+2]==='"'||Z.length<X)J+=1;else{z+=Z.slice(G,J)+`
15
-
16
- `;while(Z[J+2]==="\\"&&Z[J+3]==="n"&&Z[J+4]!=='"')z+=`
17
- `,J+=2;if(z+=Q,Z[J+2]===" ")z+="\\";J+=1,G=J+1}break;default:J+=1}}return z=G?z+Z.slice(G):Z,U?z:n.foldFlowLines(z,Q,n.FOLD_QUOTED,Bq($,!1))}function eq(q,$){if($.options.singleQuote===!1||$.implicitKey&&q.includes(`
18
- `)||/[ \t]\n|\n[ \t]/.test(q))return S0(q,$);let Z=$.indent||(Vq(q)?" ":""),U="'"+q.replace(/'/g,"''").replace(/\n+/g,`$&
19
- ${Z}`)+"'";return $.implicitKey?U:n.foldFlowLines(U,Z,n.FOLD_FLOW,Bq($,!1))}function L0(q,$){let{singleQuote:Z}=$.options,U;if(Z===!1)U=S0;else{let X=q.includes('"'),Q=q.includes("'");if(X&&!Q)U=eq;else if(Q&&!X)U=S0;else U=Z?eq:S0}return U(q,$)}var q$;try{q$=new RegExp(`(^|(?<!
7
+ `+W$(Z,$):(q.endsWith(" ")?"":" ")+Z;F8.indentComment=W$;F8.lineComment=_8;F8.stringifyComment=W8});var U1=I((R8)=>{function I8(q,$,Z="flow",{indentAtStart:X,lineWidth:z=80,minContentWidth:U=20,onFold:Q,onOverflow:J}={}){if(!z||z<0)return q;if(z<U)U=0;let G=Math.max(1+U,1+z-$.length);if(q.length<=G)return q;let H=[],W={},Y=z-$.length;if(typeof X==="number")if(X>z-Math.max(2,U))H.push(0);else Y=z-X;let V=void 0,T=void 0,L=!1,F=-1,_=-1,O=-1;if(Z==="block"){if(F=z1(q,F,$.length),F!==-1)Y=F+G}for(let R;R=q[F+=1];){if(Z==="quoted"&&R==="\\"){switch(_=F,q[F+1]){case"x":F+=3;break;case"u":F+=5;break;case"U":F+=9;break;default:F+=1}O=F}if(R===`
8
+ `){if(Z==="block")F=z1(q,F,$.length);Y=F+$.length+G,V=void 0}else{if(R===" "&&T&&T!==" "&&T!==`
9
+ `&&T!=="\t"){let M=q[F+1];if(M&&M!==" "&&M!==`
10
+ `&&M!=="\t")V=F}if(F>=Y)if(V)H.push(V),Y=V+G,V=void 0;else if(Z==="quoted"){while(T===" "||T==="\t")T=R,R=q[F+=1],L=!0;let M=F>O+1?F-2:_-1;if(W[M])return q;H.push(M),W[M]=!0,Y=M+G,V=void 0}else L=!0}T=R}if(L&&J)J();if(H.length===0)return q;if(Q)Q();let A=q.slice(0,H[0]);for(let R=0;R<H.length;++R){let M=H[R],w=H[R+1]||q.length;if(M===0)A=`
11
+ ${$}${q.slice(0,w)}`;else{if(Z==="quoted"&&W[M])A+=`${q[M]}\\`;A+=`
12
+ ${$}${q.slice(M+1,w)}`}}return A}function z1(q,$,Z){let X=$,z=$+1,U=q[z];while(U===" "||U==="\t")if($<z+Z)U=q[++$];else{do U=q[++$];while(U&&U!==`
13
+ `);X=$,z=$+1,U=q[z]}return X}R8.FOLD_BLOCK="block";R8.FOLD_FLOW="flow";R8.FOLD_QUOTED="quoted";R8.foldFlowLines=I8});var u0=I((j8)=>{var d=f(),q0=U1(),Lq=(q,$)=>({indentAtStart:$?q.indent.length:q.indentAtStart,lineWidth:q.options.lineWidth,minContentWidth:q.options.minContentWidth}),Oq=(q)=>/^(%|---|\.\.\.)/m.test(q);function w8(q,$,Z){if(!$||$<0)return!1;let X=$-Z,z=q.length;if(z<=X)return!1;for(let U=0,Q=0;U<z;++U)if(q[U]===`
14
+ `){if(U-Q>X)return!0;if(Q=U+1,z-Q<=X)return!1}return!0}function h0(q,$){let Z=JSON.stringify(q);if($.options.doubleQuotedAsJSON)return Z;let{implicitKey:X}=$,z=$.options.doubleQuotedMinMultiLineLength,U=$.indent||(Oq(q)?" ":""),Q="",J=0;for(let G=0,H=Z[G];H;H=Z[++G]){if(H===" "&&Z[G+1]==="\\"&&Z[G+2]==="n")Q+=Z.slice(J,G)+"\\ ",G+=1,J=G,H="\\";if(H==="\\")switch(Z[G+1]){case"u":{Q+=Z.slice(J,G);let W=Z.substr(G+2,4);switch(W){case"0000":Q+="\\0";break;case"0007":Q+="\\a";break;case"000b":Q+="\\v";break;case"001b":Q+="\\e";break;case"0085":Q+="\\N";break;case"00a0":Q+="\\_";break;case"2028":Q+="\\L";break;case"2029":Q+="\\P";break;default:if(W.substr(0,2)==="00")Q+="\\x"+W.substr(2);else Q+=Z.substr(G,6)}G+=5,J=G+1}break;case"n":if(X||Z[G+2]==='"'||Z.length<z)G+=1;else{Q+=Z.slice(J,G)+`
15
+
16
+ `;while(Z[G+2]==="\\"&&Z[G+3]==="n"&&Z[G+4]!=='"')Q+=`
17
+ `,G+=2;if(Q+=U,Z[G+2]===" ")Q+="\\";G+=1,J=G+1}break;default:G+=1}}return Q=J?Q+Z.slice(J):Z,X?Q:q0.foldFlowLines(Q,U,q0.FOLD_QUOTED,Lq($,!1))}function _$(q,$){if($.options.singleQuote===!1||$.implicitKey&&q.includes(`
18
+ `)||/[ \t]\n|\n[ \t]/.test(q))return h0(q,$);let Z=$.indent||(Oq(q)?" ":""),X="'"+q.replace(/'/g,"''").replace(/\n+/g,`$&
19
+ ${Z}`)+"'";return $.implicitKey?X:q0.foldFlowLines(X,Z,q0.FOLD_FLOW,Lq($,!1))}function M0(q,$){let{singleQuote:Z}=$.options,X;if(Z===!1)X=h0;else{let z=q.includes('"'),U=q.includes("'");if(z&&!U)X=_$;else if(U&&!z)X=h0;else X=Z?_$:h0}return X(q,$)}var F$;try{F$=new RegExp(`(^|(?<!
20
20
  ))
21
21
  +(?!
22
- |$)`,"g")}catch{q$=/\n+(?!\n|$)/g}function Yq({comment:q,type:$,value:Z},U,X,Q){let{blockQuote:z,commentString:G,lineWidth:J}=U.options;if(!z||/\n[\t ]+$/.test(Z))return L0(Z,U);let H=U.indent||(U.forceBlockIndent||Vq(Z)?" ":""),W=z==="literal"?!0:z==="folded"||$===k.Scalar.BLOCK_FOLDED?!1:$===k.Scalar.BLOCK_LITERAL?!0:!ZZ(Z,J,H.length);if(!Z)return W?`|
22
+ |$)`,"g")}catch{F$=/\n+(?!\n|$)/g}function Tq({comment:q,type:$,value:Z},X,z,U){let{blockQuote:Q,commentString:J,lineWidth:G}=X.options;if(!Q||/\n[\t ]+$/.test(Z))return M0(Z,X);let H=X.indent||(X.forceBlockIndent||Oq(Z)?" ":""),W=Q==="literal"?!0:Q==="folded"||$===d.Scalar.BLOCK_FOLDED?!1:$===d.Scalar.BLOCK_LITERAL?!0:!w8(Z,G,H.length);if(!Z)return W?`|
23
23
  `:`>
24
- `;let Y,B;for(B=Z.length;B>0;--B){let D=Z[B-1];if(D!==`
25
- `&&D!=="\t"&&D!==" ")break}let _=Z.substring(B),O=_.indexOf(`
26
- `);if(O===-1)Y="-";else if(Z===_||O!==_.length-1){if(Y="+",Q)Q()}else Y="";if(_){if(Z=Z.slice(0,-_.length),_[_.length-1]===`
27
- `)_=_.slice(0,-1);_=_.replace(q$,`$&${H}`)}let V=!1,I,L=-1;for(I=0;I<Z.length;++I){let D=Z[I];if(D===" ")V=!0;else if(D===`
28
- `)L=I;else break}let A=Z.substring(0,L<I?L+1:I);if(A)Z=Z.substring(A.length),A=A.replace(/\n+/g,`$&${H}`);let K=(V?H?"2":"1":"")+Y;if(q){if(K+=" "+G(q.replace(/ ?[\r\n]+/g," ")),X)X()}if(!W){let D=Z.replace(/\n+/g,`
29
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${H}`),w=!1,N=Bq(U,!0);if(z!=="folded"&&$!==k.Scalar.BLOCK_FOLDED)N.onOverflow=()=>{w=!0};let R=n.foldFlowLines(`${A}${D}${_}`,H,n.FOLD_BLOCK,N);if(!w)return`>${K}
30
- ${H}${R}`}return Z=Z.replace(/\n+/g,`$&${H}`),`|${K}
31
- ${H}${A}${Z}${_}`}function UZ(q,$,Z,U){let{type:X,value:Q}=q,{actualString:z,implicitKey:G,indent:J,indentStep:H,inFlow:W}=$;if(G&&Q.includes(`
32
- `)||W&&/[[\]{},]/.test(Q))return L0(Q,$);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(Q))return G||W||!Q.includes(`
33
- `)?L0(Q,$):Yq(q,$,Z,U);if(!G&&!W&&X!==k.Scalar.PLAIN&&Q.includes(`
34
- `))return Yq(q,$,Z,U);if(Vq(Q)){if(J==="")return $.forceBlockIndent=!0,Yq(q,$,Z,U);else if(G&&J===H)return L0(Q,$)}let Y=Q.replace(/\n+/g,`$&
35
- ${J}`);if(z){let B=(V)=>V.default&&V.tag!=="tag:yaml.org,2002:str"&&V.test?.test(Y),{compat:_,tags:O}=$.doc.schema;if(O.some(B)||_?.some(B))return L0(Q,$)}return G?Y:n.foldFlowLines(Y,J,n.FOLD_FLOW,Bq($,!1))}function XZ(q,$,Z,U){let{implicitKey:X,inFlow:Q}=$,z=typeof q.value==="string"?q:Object.assign({},q,{value:String(q.value)}),{type:G}=q;if(G!==k.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))G=k.Scalar.QUOTE_DOUBLE}let J=(W)=>{switch(W){case k.Scalar.BLOCK_FOLDED:case k.Scalar.BLOCK_LITERAL:return X||Q?L0(z.value,$):Yq(z,$,Z,U);case k.Scalar.QUOTE_DOUBLE:return S0(z.value,$);case k.Scalar.QUOTE_SINGLE:return eq(z.value,$);case k.Scalar.PLAIN:return UZ(z,$,Z,U);default:return null}},H=J(G);if(H===null){let{defaultKeyType:W,defaultStringType:Y}=$.options,B=X&&W||Y;if(H=J(B),H===null)throw Error(`Unsupported default string type ${B}`)}return H}QZ.stringifyString=XZ});var f0=F((TZ)=>{var GZ=zq(),r=P(),JZ=b0(),HZ=E0();function YZ(q,$){let Z=Object.assign({blockQuote:!0,commentString:JZ.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},q.schema.toStringOptions,$),U;switch(Z.collectionStyle){case"block":U=!1;break;case"flow":U=!0;break;default:U=null}return{anchors:new Set,doc:q,flowCollectionPadding:Z.flowCollectionPadding?" ":"",indent:"",indentStep:typeof Z.indent==="number"?" ".repeat(Z.indent):" ",inFlow:U,options:Z}}function BZ(q,$){if($.tag){let X=q.filter((Q)=>Q.tag===$.tag);if(X.length>0)return X.find((Q)=>Q.format===$.format)??X[0]}let Z=void 0,U;if(r.isScalar($)){U=$.value;let X=q.filter((Q)=>Q.identify?.(U));if(X.length>1){let Q=X.filter((z)=>z.test);if(Q.length>0)X=Q}Z=X.find((Q)=>Q.format===$.format)??X.find((Q)=>!Q.format)}else U=$,Z=q.find((X)=>X.nodeClass&&U instanceof X.nodeClass);if(!Z){let X=U?.constructor?.name??(U===null?"null":typeof U);throw Error(`Tag not resolved for ${X} value`)}return Z}function VZ(q,$,{anchors:Z,doc:U}){if(!U.directives)return"";let X=[],Q=(r.isScalar(q)||r.isCollection(q))&&q.anchor;if(Q&&GZ.anchorIsValid(Q))Z.add(Q),X.push(`&${Q}`);let z=q.tag??($.default?null:$.tag);if(z)X.push(U.directives.tagString(z));return X.join(" ")}function WZ(q,$,Z,U){if(r.isPair(q))return q.toString($,Z,U);if(r.isAlias(q)){if($.doc.directives)return q.toString($);if($.resolvedAliases?.has(q))throw TypeError("Cannot stringify circular structure without alias nodes");else{if($.resolvedAliases)$.resolvedAliases.add(q);else $.resolvedAliases=new Set([q]);q=q.resolve($.doc)}}let X=void 0,Q=r.isNode(q)?q:$.doc.createNode(q,{onTagObj:(J)=>X=J});X??(X=BZ($.doc.schema.tags,Q));let z=VZ(Q,X,$);if(z.length>0)$.indentAtStart=($.indentAtStart??0)+z.length+1;let G=typeof X.stringify==="function"?X.stringify(Q,$,Z,U):r.isScalar(Q)?HZ.stringifyString(Q,$,Z,U):Q.toString($,Z,U);if(!z)return G;return r.isScalar(Q)||G[0]==="{"||G[0]==="["?`${z} ${G}`:`${z}
36
- ${$.indent}${G}`}TZ.createStringifyContext=YZ;TZ.stringify=WZ});var n2=F((LZ)=>{var a=P(),i2=C(),s2=f0(),y0=b0();function IZ({key:q,value:$},Z,U,X){let{allNullValues:Q,doc:z,indent:G,indentStep:J,options:{commentString:H,indentSeq:W,simpleKeys:Y}}=Z,B=a.isNode(q)&&q.comment||null;if(Y){if(B)throw Error("With simple keys, key nodes cannot have comments");if(a.isCollection(q)||!a.isNode(q)&&typeof q==="object")throw Error("With simple keys, collection cannot be used as a key value")}let _=!Y&&(!q||B&&$==null&&!Z.inFlow||a.isCollection(q)||(a.isScalar(q)?q.type===i2.Scalar.BLOCK_FOLDED||q.type===i2.Scalar.BLOCK_LITERAL:typeof q==="object"));Z=Object.assign({},Z,{allNullValues:!1,implicitKey:!_&&(Y||!Q),indent:G+J});let O=!1,V=!1,I=s2.stringify(q,Z,()=>O=!0,()=>V=!0);if(!_&&!Z.inFlow&&I.length>1024){if(Y)throw Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(Z.inFlow){if(Q||$==null){if(O&&U)U();return I===""?"?":_?`? ${I}`:I}}else if(Q&&!Y||$==null&&_){if(I=`? ${I}`,B&&!O)I+=y0.lineComment(I,Z.indent,H(B));else if(V&&X)X();return I}if(O)B=null;if(_){if(B)I+=y0.lineComment(I,Z.indent,H(B));I=`? ${I}
37
- ${G}:`}else if(I=`${I}:`,B)I+=y0.lineComment(I,Z.indent,H(B));let L,A,M;if(a.isNode($))L=!!$.spaceBefore,A=$.commentBefore,M=$.comment;else if(L=!1,A=null,M=null,$&&typeof $==="object")$=z.createNode($);if(Z.implicitKey=!1,!_&&!B&&a.isScalar($))Z.indentAtStart=I.length+1;if(V=!1,!W&&J.length>=2&&!Z.inFlow&&!_&&a.isSeq($)&&!$.flow&&!$.tag&&!$.anchor)Z.indent=Z.indent.substring(2);let K=!1,D=s2.stringify($,Z,()=>K=!0,()=>V=!0),w=" ";if(B||L||A){if(w=L?`
38
- `:"",A){let N=H(A);w+=`
39
- ${y0.indentComment(N,Z.indent)}`}if(D===""&&!Z.inFlow){if(w===`
40
- `&&M)w=`
41
-
42
- `}else w+=`
43
- ${Z.indent}`}else if(!_&&a.isCollection($)){let N=D[0],R=D.indexOf(`
44
- `),b=R!==-1,i=Z.inFlow??$.flow??$.items.length===0;if(b||!i){let W0=!1;if(b&&(N==="&"||N==="!")){let S=D.indexOf(" ");if(N==="&"&&S!==-1&&S<R&&D[S+1]==="!")S=D.indexOf(" ",S+1);if(S===-1||R<S)W0=!0}if(!W0)w=`
45
- ${Z.indent}`}}else if(D===""||D[0]===`
46
- `)w="";if(I+=w+D,Z.inFlow){if(K&&U)U()}else if(M&&!K)I+=y0.lineComment(I,Z.indent,H(M));else if(V&&X)X();return I}LZ.stringifyPair=IZ});var $$=F((MZ)=>{var r2=y("process");function RZ(q,...$){if(q==="debug")console.log(...$)}function AZ(q,$){if(q==="debug"||q==="warn")if(typeof r2.emitWarning==="function")r2.emitWarning($);else console.warn($)}MZ.debug=RZ;MZ.warn=AZ});var Oq=F((PZ)=>{var x0=P(),o2=C(),Wq="<<",Tq={identify:(q)=>q===Wq||typeof q==="symbol"&&q.description===Wq,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new o2.Scalar(Symbol(Wq)),{addToJSMap:t2}),stringify:()=>Wq},wZ=(q,$)=>(Tq.identify($)||x0.isScalar($)&&(!$.type||$.type===o2.Scalar.PLAIN)&&Tq.identify($.value))&&q?.doc.schema.tags.some((Z)=>Z.tag===Tq.tag&&Z.default);function t2(q,$,Z){if(Z=q&&x0.isAlias(Z)?Z.resolve(q.doc):Z,x0.isSeq(Z))for(let U of Z.items)Z$(q,$,U);else if(Array.isArray(Z))for(let U of Z)Z$(q,$,U);else Z$(q,$,Z)}function Z$(q,$,Z){let U=q&&x0.isAlias(Z)?Z.resolve(q.doc):Z;if(!x0.isMap(U))throw Error("Merge sources must be maps or map aliases");let X=U.toJSON(null,q,Map);for(let[Q,z]of X)if($ instanceof Map){if(!$.has(Q))$.set(Q,z)}else if($ instanceof Set)$.add(Q);else if(!Object.prototype.hasOwnProperty.call($,Q))Object.defineProperty($,Q,{value:z,writable:!0,enumerable:!0,configurable:!0});return $}PZ.addMergeToJSMap=t2;PZ.isMergeKey=wZ;PZ.merge=Tq});var X$=F((yZ)=>{var bZ=$$(),e2=Oq(),SZ=f0(),q9=P(),U$=s();function EZ(q,$,{key:Z,value:U}){if(q9.isNode(Z)&&Z.addToJSMap)Z.addToJSMap(q,$,U);else if(e2.isMergeKey(q,Z))e2.addMergeToJSMap(q,$,U);else{let X=U$.toJS(Z,"",q);if($ instanceof Map)$.set(X,U$.toJS(U,X,q));else if($ instanceof Set)$.add(X);else{let Q=fZ(Z,X,q),z=U$.toJS(U,Q,q);if(Q in $)Object.defineProperty($,Q,{value:z,writable:!0,enumerable:!0,configurable:!0});else $[Q]=z}}return $}function fZ(q,$,Z){if($===null)return"";if(typeof $!=="object")return String($);if(q9.isNode(q)&&Z?.doc){let U=SZ.createStringifyContext(Z.doc,{});U.anchors=new Set;for(let Q of Z.anchors.keys())U.anchors.add(Q.anchor);U.inFlow=!0,U.inStringifyKey=!0;let X=q.toString(U);if(!Z.mapKeyWarned){let Q=JSON.stringify(X);if(Q.length>40)Q=Q.substring(0,36)+'..."';bZ.warn(Z.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${Q}. Set mapAsMap: true to use object keys.`),Z.mapKeyWarned=!0}return X}return JSON.stringify($)}yZ.addPairToJSMap=EZ});var o=F((uZ)=>{var $9=C0(),gZ=n2(),hZ=X$(),_q=P();function kZ(q,$,Z){let U=$9.createNode(q,void 0,Z),X=$9.createNode($,void 0,Z);return new Iq(U,X)}class Iq{constructor(q,$=null){Object.defineProperty(this,_q.NODE_TYPE,{value:_q.PAIR}),this.key=q,this.value=$}clone(q){let{key:$,value:Z}=this;if(_q.isNode($))$=$.clone(q);if(_q.isNode(Z))Z=Z.clone(q);return new Iq($,Z)}toJSON(q,$){let Z=$?.mapAsMap?new Map:{};return hZ.addPairToJSMap($,Z,this)}toString(q,$,Z){return q?.doc?gZ.stringifyPair(this,q,$,Z):JSON.stringify(this)}}uZ.Pair=Iq;uZ.createPair=kZ});var Q$=F((cZ)=>{var G0=P(),Z9=f0(),Lq=b0();function pZ(q,$,Z){return($.inFlow??q.flow?lZ:dZ)(q,$,Z)}function dZ({comment:q,items:$},Z,{blockItemPrefix:U,flowChars:X,itemIndent:Q,onChompKeep:z,onComment:G}){let{indent:J,options:{commentString:H}}=Z,W=Object.assign({},Z,{indent:Q,type:null}),Y=!1,B=[];for(let O=0;O<$.length;++O){let V=$[O],I=null;if(G0.isNode(V)){if(!Y&&V.spaceBefore)B.push("");if(Fq(Z,B,V.commentBefore,Y),V.comment)I=V.comment}else if(G0.isPair(V)){let A=G0.isNode(V.key)?V.key:null;if(A){if(!Y&&A.spaceBefore)B.push("");Fq(Z,B,A.commentBefore,Y)}}Y=!1;let L=Z9.stringify(V,W,()=>I=null,()=>Y=!0);if(I)L+=Lq.lineComment(L,Q,H(I));if(Y&&I)Y=!1;B.push(U+L)}let _;if(B.length===0)_=X.start+X.end;else{_=B[0];for(let O=1;O<B.length;++O){let V=B[O];_+=V?`
47
- ${J}${V}`:`
48
- `}}if(q){if(_+=`
49
- `+Lq.indentComment(H(q),J),G)G()}else if(Y&&z)z();return _}function lZ({items:q},$,{flowChars:Z,itemIndent:U}){let{indent:X,indentStep:Q,flowCollectionPadding:z,options:{commentString:G}}=$;U+=Q;let J=Object.assign({},$,{indent:U,inFlow:!0,type:null}),H=!1,W=0,Y=[];for(let O=0;O<q.length;++O){let V=q[O],I=null;if(G0.isNode(V)){if(V.spaceBefore)Y.push("");if(Fq($,Y,V.commentBefore,!1),V.comment)I=V.comment}else if(G0.isPair(V)){let A=G0.isNode(V.key)?V.key:null;if(A){if(A.spaceBefore)Y.push("");if(Fq($,Y,A.commentBefore,!1),A.comment)H=!0}let M=G0.isNode(V.value)?V.value:null;if(M){if(M.comment)I=M.comment;if(M.commentBefore)H=!0}else if(V.value==null&&A?.comment)I=A.comment}if(I)H=!0;let L=Z9.stringify(V,J,()=>I=null);if(O<q.length-1)L+=",";if(I)L+=Lq.lineComment(L,U,G(I));if(!H&&(Y.length>W||L.includes(`
50
- `)))H=!0;Y.push(L),W=Y.length}let{start:B,end:_}=Z;if(Y.length===0)return B+_;else{if(!H){let O=Y.reduce((V,I)=>V+I.length+2,2);H=$.options.lineWidth>0&&O>$.options.lineWidth}if(H){let O=B;for(let V of Y)O+=V?`
51
- ${Q}${X}${V}`:`
52
- `;return`${O}
53
- ${X}${_}`}else return`${B}${z}${Y.join(" ")}${z}${_}`}}function Fq({indent:q,options:{commentString:$}},Z,U,X){if(U&&X)U=U.replace(/^\n+/,"");if(U){let Q=Lq.indentComment($(U),q);Z.push(Q.trimStart())}}cZ.stringifyCollection=pZ});var e=F((oZ)=>{var iZ=Q$(),sZ=X$(),nZ=Hq(),t=P(),Rq=o(),rZ=C();function g0(q,$){let Z=t.isScalar($)?$.value:$;for(let U of q)if(t.isPair(U)){if(U.key===$||U.key===Z)return U;if(t.isScalar(U.key)&&U.key.value===Z)return U}return}class U9 extends nZ.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(q){super(t.MAP,q);this.items=[]}static from(q,$,Z){let{keepUndefined:U,replacer:X}=Z,Q=new this(q),z=(G,J)=>{if(typeof X==="function")J=X.call($,G,J);else if(Array.isArray(X)&&!X.includes(G))return;if(J!==void 0||U)Q.items.push(Rq.createPair(G,J,Z))};if($ instanceof Map)for(let[G,J]of $)z(G,J);else if($&&typeof $==="object")for(let G of Object.keys($))z(G,$[G]);if(typeof q.sortMapEntries==="function")Q.items.sort(q.sortMapEntries);return Q}add(q,$){let Z;if(t.isPair(q))Z=q;else if(!q||typeof q!=="object"||!("key"in q))Z=new Rq.Pair(q,q?.value);else Z=new Rq.Pair(q.key,q.value);let U=g0(this.items,Z.key),X=this.schema?.sortMapEntries;if(U){if(!$)throw Error(`Key ${Z.key} already set`);if(t.isScalar(U.value)&&rZ.isScalarValue(Z.value))U.value.value=Z.value;else U.value=Z.value}else if(X){let Q=this.items.findIndex((z)=>X(Z,z)<0);if(Q===-1)this.items.push(Z);else this.items.splice(Q,0,Z)}else this.items.push(Z)}delete(q){let $=g0(this.items,q);if(!$)return!1;return this.items.splice(this.items.indexOf($),1).length>0}get(q,$){let U=g0(this.items,q)?.value;return(!$&&t.isScalar(U)?U.value:U)??void 0}has(q){return!!g0(this.items,q)}set(q,$){this.add(new Rq.Pair(q,$),!0)}toJSON(q,$,Z){let U=Z?new Z:$?.mapAsMap?new Map:{};if($?.onCreate)$.onCreate(U);for(let X of this.items)sZ.addPairToJSMap($,U,X);return U}toString(q,$,Z){if(!q)return JSON.stringify(this);for(let U of this.items)if(!t.isPair(U))throw Error(`Map items must all be pairs; found ${JSON.stringify(U)} instead`);if(!q.allNullValues&&this.hasAllNullValues(!1))q=Object.assign({},q,{allNullValues:!0});return iZ.stringifyCollection(this,q,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:q.indent||"",onChompKeep:Z,onComment:$})}}oZ.YAMLMap=U9;oZ.findPair=g0});var F0=F((Z5)=>{var q5=P(),X9=e(),$5={collection:"map",default:!0,nodeClass:X9.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(q,$){if(!q5.isMap(q))$("Expected a mapping for this tag");return q},createNode:(q,$,Z)=>X9.YAMLMap.from(q,$,Z)};Z5.map=$5});var q0=F((H5)=>{var X5=C0(),Q5=Q$(),z5=Hq(),Mq=P(),G5=C(),J5=s();class Q9 extends z5.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(q){super(Mq.SEQ,q);this.items=[]}add(q){this.items.push(q)}delete(q){let $=Aq(q);if(typeof $!=="number")return!1;return this.items.splice($,1).length>0}get(q,$){let Z=Aq(q);if(typeof Z!=="number")return;let U=this.items[Z];return!$&&Mq.isScalar(U)?U.value:U}has(q){let $=Aq(q);return typeof $==="number"&&$<this.items.length}set(q,$){let Z=Aq(q);if(typeof Z!=="number")throw Error(`Expected a valid index, not ${q}.`);let U=this.items[Z];if(Mq.isScalar(U)&&G5.isScalarValue($))U.value=$;else this.items[Z]=$}toJSON(q,$){let Z=[];if($?.onCreate)$.onCreate(Z);let U=0;for(let X of this.items)Z.push(J5.toJS(X,String(U++),$));return Z}toString(q,$,Z){if(!q)return JSON.stringify(this);return Q5.stringifyCollection(this,q,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(q.indent||"")+" ",onChompKeep:Z,onComment:$})}static from(q,$,Z){let{replacer:U}=Z,X=new this(q);if($&&Symbol.iterator in Object($)){let Q=0;for(let z of $){if(typeof U==="function"){let G=$ instanceof Set?z:String(Q++);z=U.call($,G,z)}X.items.push(X5.createNode(z,void 0,Z))}}return X}}function Aq(q){let $=Mq.isScalar(q)?q.value:q;if($&&typeof $==="string")$=Number($);return typeof $==="number"&&Number.isInteger($)&&$>=0?$:null}H5.YAMLSeq=Q9});var R0=F((W5)=>{var B5=P(),z9=q0(),V5={collection:"seq",default:!0,nodeClass:z9.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(q,$){if(!B5.isSeq(q))$("Expected a sequence for this tag");return q},createNode:(q,$,Z)=>z9.YAMLSeq.from(q,$,Z)};W5.seq=V5});var h0=F((I5)=>{var O5=E0(),_5={identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify(q,$,Z,U){return $=Object.assign({actualString:!0},$),O5.stringifyString(q,$,Z,U)}};I5.string=_5});var Kq=F((F5)=>{var G9=C(),J9={identify:(q)=>q==null,createNode:()=>new G9.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new G9.Scalar(null),stringify:({source:q},$)=>typeof q==="string"&&J9.test.test(q)?q:$.options.nullStr};F5.nullTag=J9});var z$=F((M5)=>{var A5=C(),H9={identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(q)=>new A5.Scalar(q[0]==="t"||q[0]==="T"),stringify({source:q,value:$},Z){if(q&&H9.test.test(q)){let U=q[0]==="t"||q[0]==="T";if($===U)return q}return $?Z.options.trueStr:Z.options.falseStr}};M5.boolTag=H9});var A0=F((w5)=>{function D5({format:q,minFractionDigits:$,tag:Z,value:U}){if(typeof U==="bigint")return String(U);let X=typeof U==="number"?U:Number(U);if(!isFinite(X))return isNaN(X)?".nan":X<0?"-.inf":".inf";let Q=Object.is(U,-0)?"-0":JSON.stringify(U);if(!q&&$&&(!Z||Z==="tag:yaml.org,2002:float")&&/^\d/.test(Q)){let z=Q.indexOf(".");if(z<0)z=Q.length,Q+=".";let G=$-(Q.length-z-1);while(G-- >0)Q+="0"}return Q}w5.stringifyNumber=D5});var J$=F((S5)=>{var N5=C(),G$=A0(),j5={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:G$.stringifyNumber},C5={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q),stringify(q){let $=Number(q.value);return isFinite($)?$.toExponential():G$.stringifyNumber(q)}},b5={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(q){let $=new N5.Scalar(parseFloat(q)),Z=q.indexOf(".");if(Z!==-1&&q[q.length-1]==="0")$.minFractionDigits=q.length-Z-1;return $},stringify:G$.stringifyNumber};S5.float=b5;S5.floatExp=C5;S5.floatNaN=j5});var Y$=F((k5)=>{var Y9=A0(),Dq=(q)=>typeof q==="bigint"||Number.isInteger(q),H$=(q,$,Z,{intAsBigInt:U})=>U?BigInt(q):parseInt(q.substring($),Z);function B9(q,$,Z){let{value:U}=q;if(Dq(U)&&U>=0)return Z+U.toString($);return Y9.stringifyNumber(q)}var x5={identify:(q)=>Dq(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(q,$,Z)=>H$(q,2,8,Z),stringify:(q)=>B9(q,8,"0o")},g5={identify:Dq,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(q,$,Z)=>H$(q,0,10,Z),stringify:Y9.stringifyNumber},h5={identify:(q)=>Dq(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(q,$,Z)=>H$(q,2,16,Z),stringify:(q)=>B9(q,16,"0x")};k5.int=g5;k5.intHex=h5;k5.intOct=x5});var V9=F((s5)=>{var p5=F0(),d5=Kq(),l5=R0(),c5=h0(),a5=z$(),B$=J$(),V$=Y$(),i5=[p5.map,l5.seq,c5.string,d5.nullTag,a5.boolTag,V$.intOct,V$.int,V$.intHex,B$.floatNaN,B$.floatExp,B$.float];s5.schema=i5});var T9=F((Z6)=>{var r5=C(),o5=F0(),t5=R0();function W9(q){return typeof q==="bigint"||Number.isInteger(q)}var wq=({value:q})=>JSON.stringify(q),e5=[{identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify:wq},{identify:(q)=>q==null,createNode:()=>new r5.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:wq},{identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(q)=>q==="true",stringify:wq},{identify:W9,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(q,$,{intAsBigInt:Z})=>Z?BigInt(q):parseInt(q,10),stringify:({value:q})=>W9(q)?q.toString():JSON.stringify(q)},{identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(q)=>parseFloat(q),stringify:wq}],q6={default:!0,tag:"",test:/^/,resolve(q,$){return $(`Unresolved plain scalar ${JSON.stringify(q)}`),q}},$6=[o5.map,t5.seq].concat(e5,q6);Z6.schema=$6});var T$=F((z6)=>{var k0=y("buffer"),W$=C(),X6=E0(),Q6={identify:(q)=>q instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(q,$){if(typeof k0.Buffer==="function")return k0.Buffer.from(q,"base64");else if(typeof atob==="function"){let Z=atob(q.replace(/[\n\r]/g,"")),U=new Uint8Array(Z.length);for(let X=0;X<Z.length;++X)U[X]=Z.charCodeAt(X);return U}else return $("This environment does not support reading binary tags; either Buffer or atob is required"),q},stringify({comment:q,type:$,value:Z},U,X,Q){if(!Z)return"";let z=Z,G;if(typeof k0.Buffer==="function")G=z instanceof k0.Buffer?z.toString("base64"):k0.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let J="";for(let H=0;H<z.length;++H)J+=String.fromCharCode(z[H]);G=btoa(J)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if($??($=W$.Scalar.BLOCK_LITERAL),$!==W$.Scalar.QUOTE_DOUBLE){let J=Math.max(U.options.lineWidth-U.indent.length,U.options.minContentWidth),H=Math.ceil(G.length/J),W=Array(H);for(let Y=0,B=0;Y<H;++Y,B+=J)W[Y]=G.substr(B,J);G=W.join($===W$.Scalar.BLOCK_LITERAL?`
54
- `:" ")}return X6.stringifyString({comment:q,type:$,value:G},U,X,Q)}};z6.binary=Q6});var Nq=F((B6)=>{var Pq=P(),O$=o(),J6=C(),H6=q0();function O9(q,$){if(Pq.isSeq(q))for(let Z=0;Z<q.items.length;++Z){let U=q.items[Z];if(Pq.isPair(U))continue;else if(Pq.isMap(U)){if(U.items.length>1)$("Each pair must have its own sequence indicator");let X=U.items[0]||new O$.Pair(new J6.Scalar(null));if(U.commentBefore)X.key.commentBefore=X.key.commentBefore?`${U.commentBefore}
55
- ${X.key.commentBefore}`:U.commentBefore;if(U.comment){let Q=X.value??X.key;Q.comment=Q.comment?`${U.comment}
56
- ${Q.comment}`:U.comment}U=X}q.items[Z]=Pq.isPair(U)?U:new O$.Pair(U)}else $("Expected a sequence for this tag");return q}function _9(q,$,Z){let{replacer:U}=Z,X=new H6.YAMLSeq(q);X.tag="tag:yaml.org,2002:pairs";let Q=0;if($&&Symbol.iterator in Object($))for(let z of $){if(typeof U==="function")z=U.call($,String(Q++),z);let G,J;if(Array.isArray(z))if(z.length===2)G=z[0],J=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let H=Object.keys(z);if(H.length===1)G=H[0],J=z[G];else throw TypeError(`Expected tuple with one key, not ${H.length} keys`)}else G=z;X.items.push(O$.createPair(G,J,Z))}return X}var Y6={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:O9,createNode:_9};B6.createPairs=_9;B6.pairs=Y6;B6.resolvePairs=O9});var I$=F((I6)=>{var I9=P(),_$=s(),u0=e(),O6=q0(),L9=Nq();class J0 extends O6.YAMLSeq{constructor(){super();this.add=u0.YAMLMap.prototype.add.bind(this),this.delete=u0.YAMLMap.prototype.delete.bind(this),this.get=u0.YAMLMap.prototype.get.bind(this),this.has=u0.YAMLMap.prototype.has.bind(this),this.set=u0.YAMLMap.prototype.set.bind(this),this.tag=J0.tag}toJSON(q,$){if(!$)return super.toJSON(q);let Z=new Map;if($?.onCreate)$.onCreate(Z);for(let U of this.items){let X,Q;if(I9.isPair(U))X=_$.toJS(U.key,"",$),Q=_$.toJS(U.value,X,$);else X=_$.toJS(U,"",$);if(Z.has(X))throw Error("Ordered maps must not include duplicate keys");Z.set(X,Q)}return Z}static from(q,$,Z){let U=L9.createPairs(q,$,Z),X=new this;return X.items=U.items,X}}J0.tag="tag:yaml.org,2002:omap";var _6={collection:"seq",identify:(q)=>q instanceof Map,nodeClass:J0,default:!1,tag:"tag:yaml.org,2002:omap",resolve(q,$){let Z=L9.resolvePairs(q,$),U=[];for(let{key:X}of Z.items)if(I9.isScalar(X))if(U.includes(X.value))$(`Ordered maps must not include duplicate keys: ${X.value}`);else U.push(X.value);return Object.assign(new J0,Z)},createNode:(q,$,Z)=>J0.from(q,$,Z)};I6.YAMLOMap=J0;I6.omap=_6});var K9=F((R6)=>{var F9=C();function R9({value:q,source:$},Z){if($&&(q?A9:M9).test.test($))return $;return q?Z.options.trueStr:Z.options.falseStr}var A9={identify:(q)=>q===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new F9.Scalar(!0),stringify:R9},M9={identify:(q)=>q===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new F9.Scalar(!1),stringify:R9};R6.falseTag=M9;R6.trueTag=A9});var D9=F((N6)=>{var K6=C(),L$=A0(),D6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:L$.stringifyNumber},w6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q.replace(/_/g,"")),stringify(q){let $=Number(q.value);return isFinite($)?$.toExponential():L$.stringifyNumber(q)}},P6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(q){let $=new K6.Scalar(parseFloat(q.replace(/_/g,""))),Z=q.indexOf(".");if(Z!==-1){let U=q.substring(Z+1).replace(/_/g,"");if(U[U.length-1]==="0")$.minFractionDigits=U.length}return $},stringify:L$.stringifyNumber};N6.float=P6;N6.floatExp=w6;N6.floatNaN=D6});var P9=F((x6)=>{var w9=A0(),v0=(q)=>typeof q==="bigint"||Number.isInteger(q);function jq(q,$,Z,{intAsBigInt:U}){let X=q[0];if(X==="-"||X==="+")$+=1;if(q=q.substring($).replace(/_/g,""),U){switch(Z){case 2:q=`0b${q}`;break;case 8:q=`0o${q}`;break;case 16:q=`0x${q}`;break}let z=BigInt(q);return X==="-"?BigInt(-1)*z:z}let Q=parseInt(q,Z);return X==="-"?-1*Q:Q}function F$(q,$,Z){let{value:U}=q;if(v0(U)){let X=U.toString($);return U<0?"-"+Z+X.substr(1):Z+X}return w9.stringifyNumber(q)}var S6={identify:v0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(q,$,Z)=>jq(q,2,2,Z),stringify:(q)=>F$(q,2,"0b")},E6={identify:v0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(q,$,Z)=>jq(q,1,8,Z),stringify:(q)=>F$(q,8,"0")},f6={identify:v0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(q,$,Z)=>jq(q,0,10,Z),stringify:w9.stringifyNumber},y6={identify:v0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(q,$,Z)=>jq(q,2,16,Z),stringify:(q)=>F$(q,16,"0x")};x6.int=f6;x6.intBin=S6;x6.intHex=y6;x6.intOct=E6});var R$=F((m6)=>{var Sq=P(),Cq=o(),bq=e();class H0 extends bq.YAMLMap{constructor(q){super(q);this.tag=H0.tag}add(q){let $;if(Sq.isPair(q))$=q;else if(q&&typeof q==="object"&&"key"in q&&"value"in q&&q.value===null)$=new Cq.Pair(q.key,null);else $=new Cq.Pair(q,null);if(!bq.findPair(this.items,$.key))this.items.push($)}get(q,$){let Z=bq.findPair(this.items,q);return!$&&Sq.isPair(Z)?Sq.isScalar(Z.key)?Z.key.value:Z.key:Z}set(q,$){if(typeof $!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof $}`);let Z=bq.findPair(this.items,q);if(Z&&!$)this.items.splice(this.items.indexOf(Z),1);else if(!Z&&$)this.items.push(new Cq.Pair(q))}toJSON(q,$){return super.toJSON(q,$,Set)}toString(q,$,Z){if(!q)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},q,{allNullValues:!0}),$,Z);else throw Error("Set items must all have null values")}static from(q,$,Z){let{replacer:U}=Z,X=new this(q);if($&&Symbol.iterator in Object($))for(let Q of $){if(typeof U==="function")Q=U.call($,Q,Q);X.items.push(Cq.createPair(Q,null,Z))}return X}}H0.tag="tag:yaml.org,2002:set";var v6={collection:"map",identify:(q)=>q instanceof Set,nodeClass:H0,default:!1,tag:"tag:yaml.org,2002:set",createNode:(q,$,Z)=>H0.from(q,$,Z),resolve(q,$){if(Sq.isMap(q))if(q.hasAllNullValues(!0))return Object.assign(new H0,q);else $("Set items must all have null values");else $("Expected a mapping for this tag");return q}};m6.YAMLSet=H0;m6.set=v6});var M$=F((i6)=>{var l6=A0();function A$(q,$){let Z=q[0],U=Z==="-"||Z==="+"?q.substring(1):q,X=(z)=>$?BigInt(z):Number(z),Q=U.replace(/_/g,"").split(":").reduce((z,G)=>z*X(60)+X(G),X(0));return Z==="-"?X(-1)*Q:Q}function N9(q){let{value:$}=q,Z=(z)=>z;if(typeof $==="bigint")Z=(z)=>BigInt(z);else if(isNaN($)||!isFinite($))return l6.stringifyNumber(q);let U="";if($<0)U="-",$*=Z(-1);let X=Z(60),Q=[$%X];if($<60)Q.unshift(0);else if($=($-Q[0])/X,Q.unshift($%X),$>=60)$=($-Q[0])/X,Q.unshift($);return U+Q.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var c6={identify:(q)=>typeof q==="bigint"||Number.isInteger(q),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(q,$,{intAsBigInt:Z})=>A$(q,Z),stringify:N9},a6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(q)=>A$(q,!1),stringify:N9},j9={identify:(q)=>q 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(q){let $=q.match(j9.test);if(!$)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,Z,U,X,Q,z,G]=$.map(Number),J=$[7]?Number(($[7]+"00").substr(1,3)):0,H=Date.UTC(Z,U-1,X,Q||0,z||0,G||0,J),W=$[8];if(W&&W!=="Z"){let Y=A$(W,!1);if(Math.abs(Y)<30)Y*=60;H-=60000*Y}return new Date(H)},stringify:({value:q})=>q?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};i6.floatTime=a6;i6.intTime=c6;i6.timestamp=j9});var b9=F((GU)=>{var o6=F0(),t6=Kq(),e6=R0(),qU=h0(),$U=T$(),C9=K9(),K$=D9(),Eq=P9(),ZU=Oq(),UU=I$(),XU=Nq(),QU=R$(),D$=M$(),zU=[o6.map,e6.seq,qU.string,t6.nullTag,C9.trueTag,C9.falseTag,Eq.intBin,Eq.intOct,Eq.int,Eq.intHex,K$.floatNaN,K$.floatExp,K$.float,$U.binary,ZU.merge,UU.omap,XU.pairs,QU.set,D$.intTime,D$.floatTime,D$.timestamp];GU.schema=zU});var v9=F((_U)=>{var y9=F0(),HU=Kq(),x9=R0(),YU=h0(),BU=z$(),w$=J$(),P$=Y$(),VU=V9(),WU=T9(),g9=T$(),m0=Oq(),h9=I$(),k9=Nq(),S9=b9(),u9=R$(),fq=M$(),E9=new Map([["core",VU.schema],["failsafe",[y9.map,x9.seq,YU.string]],["json",WU.schema],["yaml11",S9.schema],["yaml-1.1",S9.schema]]),f9={binary:g9.binary,bool:BU.boolTag,float:w$.float,floatExp:w$.floatExp,floatNaN:w$.floatNaN,floatTime:fq.floatTime,int:P$.int,intHex:P$.intHex,intOct:P$.intOct,intTime:fq.intTime,map:y9.map,merge:m0.merge,null:HU.nullTag,omap:h9.omap,pairs:k9.pairs,seq:x9.seq,set:u9.set,timestamp:fq.timestamp},TU={"tag:yaml.org,2002:binary":g9.binary,"tag:yaml.org,2002:merge":m0.merge,"tag:yaml.org,2002:omap":h9.omap,"tag:yaml.org,2002:pairs":k9.pairs,"tag:yaml.org,2002:set":u9.set,"tag:yaml.org,2002:timestamp":fq.timestamp};function OU(q,$,Z){let U=E9.get($);if(U&&!q)return Z&&!U.includes(m0.merge)?U.concat(m0.merge):U.slice();let X=U;if(!X)if(Array.isArray(q))X=[];else{let Q=Array.from(E9.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${$}"; use one of ${Q} or define customTags array`)}if(Array.isArray(q))for(let Q of q)X=X.concat(Q);else if(typeof q==="function")X=q(X.slice());if(Z)X=X.concat(m0.merge);return X.reduce((Q,z)=>{let G=typeof z==="string"?f9[z]:z;if(!G){let J=JSON.stringify(z),H=Object.keys(f9).map((W)=>JSON.stringify(W)).join(", ");throw Error(`Unknown custom tag ${J}; use one of ${H}`)}if(!Q.includes(G))Q.push(G);return Q},[])}_U.coreKnownTags=TU;_U.getTags=OU});var C$=F((KU)=>{var N$=P(),FU=F0(),RU=R0(),AU=h0(),yq=v9(),MU=(q,$)=>q.key<$.key?-1:q.key>$.key?1:0;class j${constructor({compat:q,customTags:$,merge:Z,resolveKnownTags:U,schema:X,sortMapEntries:Q,toStringDefaults:z}){this.compat=Array.isArray(q)?yq.getTags(q,"compat"):q?yq.getTags(null,q):null,this.name=typeof X==="string"&&X||"core",this.knownTags=U?yq.coreKnownTags:{},this.tags=yq.getTags($,this.name,Z),this.toStringOptions=z??null,Object.defineProperty(this,N$.MAP,{value:FU.map}),Object.defineProperty(this,N$.SCALAR,{value:AU.string}),Object.defineProperty(this,N$.SEQ,{value:RU.seq}),this.sortMapEntries=typeof Q==="function"?Q:Q===!0?MU:null}clone(){let q=Object.create(j$.prototype,Object.getOwnPropertyDescriptors(this));return q.tags=this.tags.slice(),q}}KU.Schema=j$});var m9=F((NU)=>{var wU=P(),b$=f0(),p0=b0();function PU(q,$){let Z=[],U=$.directives===!0;if($.directives!==!1&&q.directives){let J=q.directives.toString(q);if(J)Z.push(J),U=!0;else if(q.directives.docStart)U=!0}if(U)Z.push("---");let X=b$.createStringifyContext(q,$),{commentString:Q}=X.options;if(q.commentBefore){if(Z.length!==1)Z.unshift("");let J=Q(q.commentBefore);Z.unshift(p0.indentComment(J,""))}let z=!1,G=null;if(q.contents){if(wU.isNode(q.contents)){if(q.contents.spaceBefore&&U)Z.push("");if(q.contents.commentBefore){let W=Q(q.contents.commentBefore);Z.push(p0.indentComment(W,""))}X.forceBlockIndent=!!q.comment,G=q.contents.comment}let J=G?void 0:()=>z=!0,H=b$.stringify(q.contents,X,()=>G=null,J);if(G)H+=p0.lineComment(H,"",Q(G));if((H[0]==="|"||H[0]===">")&&Z[Z.length-1]==="---")Z[Z.length-1]=`--- ${H}`;else Z.push(H)}else Z.push(b$.stringify(q.contents,X));if(q.directives?.docEnd)if(q.comment){let J=Q(q.comment);if(J.includes(`
57
- `))Z.push("..."),Z.push(p0.indentComment(J,""));else Z.push(`... ${J}`)}else Z.push("...");else{let J=q.comment;if(J&&z)J=J.replace(/^\n+/,"");if(J){if((!z||G)&&Z[Z.length-1]!=="")Z.push("");Z.push(p0.indentComment(Q(J),""))}}return Z.join(`
24
+ `;let Y,V;for(V=Z.length;V>0;--V){let w=Z[V-1];if(w!==`
25
+ `&&w!=="\t"&&w!==" ")break}let T=Z.substring(V),L=T.indexOf(`
26
+ `);if(L===-1)Y="-";else if(Z===T||L!==T.length-1){if(Y="+",U)U()}else Y="";if(T){if(Z=Z.slice(0,-T.length),T[T.length-1]===`
27
+ `)T=T.slice(0,-1);T=T.replace(F$,`$&${H}`)}let F=!1,_,O=-1;for(_=0;_<Z.length;++_){let w=Z[_];if(w===" ")F=!0;else if(w===`
28
+ `)O=_;else break}let A=Z.substring(0,O<_?O+1:_);if(A)Z=Z.substring(A.length),A=A.replace(/\n+/g,`$&${H}`);let M=(F?H?"2":"1":"")+Y;if(q){if(M+=" "+J(q.replace(/ ?[\r\n]+/g," ")),z)z()}if(!W){let w=Z.replace(/\n+/g,`
29
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${H}`),P=!1,j=Lq(X,!0);if(Q!=="folded"&&$!==d.Scalar.BLOCK_FOLDED)j.onOverflow=()=>{P=!0};let K=q0.foldFlowLines(`${A}${w}${T}`,H,q0.FOLD_BLOCK,j);if(!P)return`>${M}
30
+ ${H}${K}`}return Z=Z.replace(/\n+/g,`$&${H}`),`|${M}
31
+ ${H}${A}${Z}${T}`}function P8(q,$,Z,X){let{type:z,value:U}=q,{actualString:Q,implicitKey:J,indent:G,indentStep:H,inFlow:W}=$;if(J&&U.includes(`
32
+ `)||W&&/[[\]{},]/.test(U))return M0(U,$);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(U))return J||W||!U.includes(`
33
+ `)?M0(U,$):Tq(q,$,Z,X);if(!J&&!W&&z!==d.Scalar.PLAIN&&U.includes(`
34
+ `))return Tq(q,$,Z,X);if(Oq(U)){if(G==="")return $.forceBlockIndent=!0,Tq(q,$,Z,X);else if(J&&G===H)return M0(U,$)}let Y=U.replace(/\n+/g,`$&
35
+ ${G}`);if(Q){let V=(F)=>F.default&&F.tag!=="tag:yaml.org,2002:str"&&F.test?.test(Y),{compat:T,tags:L}=$.doc.schema;if(L.some(V)||T?.some(V))return M0(U,$)}return J?Y:q0.foldFlowLines(Y,G,q0.FOLD_FLOW,Lq($,!1))}function N8(q,$,Z,X){let{implicitKey:z,inFlow:U}=$,Q=typeof q.value==="string"?q:Object.assign({},q,{value:String(q.value)}),{type:J}=q;if(J!==d.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(Q.value))J=d.Scalar.QUOTE_DOUBLE}let G=(W)=>{switch(W){case d.Scalar.BLOCK_FOLDED:case d.Scalar.BLOCK_LITERAL:return z||U?M0(Q.value,$):Tq(Q,$,Z,X);case d.Scalar.QUOTE_DOUBLE:return h0(Q.value,$);case d.Scalar.QUOTE_SINGLE:return _$(Q.value,$);case d.Scalar.PLAIN:return P8(Q,$,Z,X);default:return null}},H=G(J);if(H===null){let{defaultKeyType:W,defaultStringType:Y}=$.options,V=z&&W||Y;if(H=G(V),H===null)throw Error(`Unsupported default string type ${V}`)}return H}j8.stringifyString=N8});var v0=I((k8)=>{var C8=Bq(),$0=N(),S8=k0(),E8=u0();function f8(q,$){let Z=Object.assign({blockQuote:!0,commentString:S8.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},q.schema.toStringOptions,$),X;switch(Z.collectionStyle){case"block":X=!1;break;case"flow":X=!0;break;default:X=null}return{anchors:new Set,doc:q,flowCollectionPadding:Z.flowCollectionPadding?" ":"",indent:"",indentStep:typeof Z.indent==="number"?" ".repeat(Z.indent):" ",inFlow:X,options:Z}}function y8(q,$){if($.tag){let z=q.filter((U)=>U.tag===$.tag);if(z.length>0)return z.find((U)=>U.format===$.format)??z[0]}let Z=void 0,X;if($0.isScalar($)){X=$.value;let z=q.filter((U)=>U.identify?.(X));if(z.length>1){let U=z.filter((Q)=>Q.test);if(U.length>0)z=U}Z=z.find((U)=>U.format===$.format)??z.find((U)=>!U.format)}else X=$,Z=q.find((z)=>z.nodeClass&&X instanceof z.nodeClass);if(!Z){let z=X?.constructor?.name??(X===null?"null":typeof X);throw Error(`Tag not resolved for ${z} value`)}return Z}function x8(q,$,{anchors:Z,doc:X}){if(!X.directives)return"";let z=[],U=($0.isScalar(q)||$0.isCollection(q))&&q.anchor;if(U&&C8.anchorIsValid(U))Z.add(U),z.push(`&${U}`);let Q=q.tag??($.default?null:$.tag);if(Q)z.push(X.directives.tagString(Q));return z.join(" ")}function g8(q,$,Z,X){if($0.isPair(q))return q.toString($,Z,X);if($0.isAlias(q)){if($.doc.directives)return q.toString($);if($.resolvedAliases?.has(q))throw TypeError("Cannot stringify circular structure without alias nodes");else{if($.resolvedAliases)$.resolvedAliases.add(q);else $.resolvedAliases=new Set([q]);q=q.resolve($.doc)}}let z=void 0,U=$0.isNode(q)?q:$.doc.createNode(q,{onTagObj:(G)=>z=G});z??(z=y8($.doc.schema.tags,U));let Q=x8(U,z,$);if(Q.length>0)$.indentAtStart=($.indentAtStart??0)+Q.length+1;let J=typeof z.stringify==="function"?z.stringify(U,$,Z,X):$0.isScalar(U)?E8.stringifyString(U,$,Z,X):U.toString($,Z,X);if(!Q)return J;return $0.isScalar(U)||J[0]==="{"||J[0]==="["?`${Q} ${J}`:`${Q}
36
+ ${$.indent}${J}`}k8.createStringifyContext=f8;k8.stringify=g8});var G1=I((m8)=>{var r=N(),Q1=f(),J1=v0(),m0=k0();function v8({key:q,value:$},Z,X,z){let{allNullValues:U,doc:Q,indent:J,indentStep:G,options:{commentString:H,indentSeq:W,simpleKeys:Y}}=Z,V=r.isNode(q)&&q.comment||null;if(Y){if(V)throw Error("With simple keys, key nodes cannot have comments");if(r.isCollection(q)||!r.isNode(q)&&typeof q==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!Y&&(!q||V&&$==null&&!Z.inFlow||r.isCollection(q)||(r.isScalar(q)?q.type===Q1.Scalar.BLOCK_FOLDED||q.type===Q1.Scalar.BLOCK_LITERAL:typeof q==="object"));Z=Object.assign({},Z,{allNullValues:!1,implicitKey:!T&&(Y||!U),indent:J+G});let L=!1,F=!1,_=J1.stringify(q,Z,()=>L=!0,()=>F=!0);if(!T&&!Z.inFlow&&_.length>1024){if(Y)throw Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(Z.inFlow){if(U||$==null){if(L&&X)X();return _===""?"?":T?`? ${_}`:_}}else if(U&&!Y||$==null&&T){if(_=`? ${_}`,V&&!L)_+=m0.lineComment(_,Z.indent,H(V));else if(F&&z)z();return _}if(L)V=null;if(T){if(V)_+=m0.lineComment(_,Z.indent,H(V));_=`? ${_}
37
+ ${J}:`}else if(_=`${_}:`,V)_+=m0.lineComment(_,Z.indent,H(V));let O,A,R;if(r.isNode($))O=!!$.spaceBefore,A=$.commentBefore,R=$.comment;else if(O=!1,A=null,R=null,$&&typeof $==="object")$=Q.createNode($);if(Z.implicitKey=!1,!T&&!V&&r.isScalar($))Z.indentAtStart=_.length+1;if(F=!1,!W&&G.length>=2&&!Z.inFlow&&!T&&r.isSeq($)&&!$.flow&&!$.tag&&!$.anchor)Z.indent=Z.indent.substring(2);let M=!1,w=J1.stringify($,Z,()=>M=!0,()=>F=!0),P=" ";if(V||O||A){if(P=O?`
38
+ `:"",A){let j=H(A);P+=`
39
+ ${m0.indentComment(j,Z.indent)}`}if(w===""&&!Z.inFlow){if(P===`
40
+ `&&R)P=`
41
+
42
+ `}else P+=`
43
+ ${Z.indent}`}else if(!T&&r.isCollection($)){let j=w[0],K=w.indexOf(`
44
+ `),E=K!==-1,b=Z.inFlow??$.flow??$.items.length===0;if(E||!b){let u=!1;if(E&&(j==="&"||j==="!")){let C=w.indexOf(" ");if(j==="&"&&C!==-1&&C<K&&w[C+1]==="!")C=w.indexOf(" ",C+1);if(C===-1||K<C)u=!0}if(!u)P=`
45
+ ${Z.indent}`}}else if(w===""||w[0]===`
46
+ `)P="";if(_+=P+w,Z.inFlow){if(M&&X)X()}else if(R&&!M)_+=m0.lineComment(_,Z.indent,H(R));else if(F&&z)z();return _}m8.stringifyPair=v8});var T$=I((c8)=>{var H1=h("process");function p8(q,...$){if(q==="debug")console.log(...$)}function l8(q,$){if(q==="debug"||q==="warn")if(typeof H1.emitWarning==="function")H1.emitWarning($);else console.warn($)}c8.debug=p8;c8.warn=l8});var Aq=I((n8)=>{var d0=N(),Y1=f(),Iq="<<",Rq={identify:(q)=>q===Iq||typeof q==="symbol"&&q.description===Iq,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Y1.Scalar(Symbol(Iq)),{addToJSMap:V1}),stringify:()=>Iq},s8=(q,$)=>(Rq.identify($)||d0.isScalar($)&&(!$.type||$.type===Y1.Scalar.PLAIN)&&Rq.identify($.value))&&q?.doc.schema.tags.some((Z)=>Z.tag===Rq.tag&&Z.default);function V1(q,$,Z){if(Z=q&&d0.isAlias(Z)?Z.resolve(q.doc):Z,d0.isSeq(Z))for(let X of Z.items)L$(q,$,X);else if(Array.isArray(Z))for(let X of Z)L$(q,$,X);else L$(q,$,Z)}function L$(q,$,Z){let X=q&&d0.isAlias(Z)?Z.resolve(q.doc):Z;if(!d0.isMap(X))throw Error("Merge sources must be maps or map aliases");let z=X.toJSON(null,q,Map);for(let[U,Q]of z)if($ instanceof Map){if(!$.has(U))$.set(U,Q)}else if($ instanceof Set)$.add(U);else if(!Object.prototype.hasOwnProperty.call($,U))Object.defineProperty($,U,{value:Q,writable:!0,enumerable:!0,configurable:!0});return $}n8.addMergeToJSMap=V1;n8.isMergeKey=s8;n8.merge=Rq});var I$=I((XZ)=>{var e8=T$(),B1=Aq(),qZ=v0(),W1=N(),O$=e();function $Z(q,$,{key:Z,value:X}){if(W1.isNode(Z)&&Z.addToJSMap)Z.addToJSMap(q,$,X);else if(B1.isMergeKey(q,Z))B1.addMergeToJSMap(q,$,X);else{let z=O$.toJS(Z,"",q);if($ instanceof Map)$.set(z,O$.toJS(X,z,q));else if($ instanceof Set)$.add(z);else{let U=ZZ(Z,z,q),Q=O$.toJS(X,U,q);if(U in $)Object.defineProperty($,U,{value:Q,writable:!0,enumerable:!0,configurable:!0});else $[U]=Q}}return $}function ZZ(q,$,Z){if($===null)return"";if(typeof $!=="object")return String($);if(W1.isNode(q)&&Z?.doc){let X=qZ.createStringifyContext(Z.doc,{});X.anchors=new Set;for(let U of Z.anchors.keys())X.anchors.add(U.anchor);X.inFlow=!0,X.inStringifyKey=!0;let z=q.toString(X);if(!Z.mapKeyWarned){let U=JSON.stringify(z);if(U.length>40)U=U.substring(0,36)+'..."';e8.warn(Z.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${U}. Set mapAsMap: true to use object keys.`),Z.mapKeyWarned=!0}return z}return JSON.stringify($)}XZ.addPairToJSMap=$Z});var Z0=I((GZ)=>{var _1=g0(),UZ=G1(),QZ=I$(),Kq=N();function JZ(q,$,Z){let X=_1.createNode(q,void 0,Z),z=_1.createNode($,void 0,Z);return new Mq(X,z)}class Mq{constructor(q,$=null){Object.defineProperty(this,Kq.NODE_TYPE,{value:Kq.PAIR}),this.key=q,this.value=$}clone(q){let{key:$,value:Z}=this;if(Kq.isNode($))$=$.clone(q);if(Kq.isNode(Z))Z=Z.clone(q);return new Mq($,Z)}toJSON(q,$){let Z=$?.mapAsMap?new Map:{};return QZ.addPairToJSMap($,Z,this)}toString(q,$,Z){return q?.doc?UZ.stringifyPair(this,q,$,Z):JSON.stringify(this)}}GZ.Pair=Mq;GZ.createPair=JZ});var R$=I((_Z)=>{var V0=N(),F1=v0(),Dq=k0();function VZ(q,$,Z){return($.inFlow??q.flow?WZ:BZ)(q,$,Z)}function BZ({comment:q,items:$},Z,{blockItemPrefix:X,flowChars:z,itemIndent:U,onChompKeep:Q,onComment:J}){let{indent:G,options:{commentString:H}}=Z,W=Object.assign({},Z,{indent:U,type:null}),Y=!1,V=[];for(let L=0;L<$.length;++L){let F=$[L],_=null;if(V0.isNode(F)){if(!Y&&F.spaceBefore)V.push("");if(wq(Z,V,F.commentBefore,Y),F.comment)_=F.comment}else if(V0.isPair(F)){let A=V0.isNode(F.key)?F.key:null;if(A){if(!Y&&A.spaceBefore)V.push("");wq(Z,V,A.commentBefore,Y)}}Y=!1;let O=F1.stringify(F,W,()=>_=null,()=>Y=!0);if(_)O+=Dq.lineComment(O,U,H(_));if(Y&&_)Y=!1;V.push(X+O)}let T;if(V.length===0)T=z.start+z.end;else{T=V[0];for(let L=1;L<V.length;++L){let F=V[L];T+=F?`
47
+ ${G}${F}`:`
48
+ `}}if(q){if(T+=`
49
+ `+Dq.indentComment(H(q),G),J)J()}else if(Y&&Q)Q();return T}function WZ({items:q},$,{flowChars:Z,itemIndent:X}){let{indent:z,indentStep:U,flowCollectionPadding:Q,options:{commentString:J}}=$;X+=U;let G=Object.assign({},$,{indent:X,inFlow:!0,type:null}),H=!1,W=0,Y=[];for(let L=0;L<q.length;++L){let F=q[L],_=null;if(V0.isNode(F)){if(F.spaceBefore)Y.push("");if(wq($,Y,F.commentBefore,!1),F.comment)_=F.comment}else if(V0.isPair(F)){let A=V0.isNode(F.key)?F.key:null;if(A){if(A.spaceBefore)Y.push("");if(wq($,Y,A.commentBefore,!1),A.comment)H=!0}let R=V0.isNode(F.value)?F.value:null;if(R){if(R.comment)_=R.comment;if(R.commentBefore)H=!0}else if(F.value==null&&A?.comment)_=A.comment}if(_)H=!0;let O=F1.stringify(F,G,()=>_=null);if(L<q.length-1)O+=",";if(_)O+=Dq.lineComment(O,X,J(_));if(!H&&(Y.length>W||O.includes(`
50
+ `)))H=!0;Y.push(O),W=Y.length}let{start:V,end:T}=Z;if(Y.length===0)return V+T;else{if(!H){let L=Y.reduce((F,_)=>F+_.length+2,2);H=$.options.lineWidth>0&&L>$.options.lineWidth}if(H){let L=V;for(let F of Y)L+=F?`
51
+ ${U}${z}${F}`:`
52
+ `;return`${L}
53
+ ${z}${T}`}else return`${V}${Q}${Y.join(" ")}${Q}${T}`}}function wq({indent:q,options:{commentString:$}},Z,X,z){if(X&&z)X=X.replace(/^\n+/,"");if(X){let U=Dq.indentComment($(X),q);Z.push(U.trimStart())}}_Z.stringifyCollection=VZ});var z0=I((RZ)=>{var TZ=R$(),LZ=I$(),OZ=Fq(),X0=N(),Pq=Z0(),IZ=f();function p0(q,$){let Z=X0.isScalar($)?$.value:$;for(let X of q)if(X0.isPair(X)){if(X.key===$||X.key===Z)return X;if(X0.isScalar(X.key)&&X.key.value===Z)return X}return}class T1 extends OZ.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(q){super(X0.MAP,q);this.items=[]}static from(q,$,Z){let{keepUndefined:X,replacer:z}=Z,U=new this(q),Q=(J,G)=>{if(typeof z==="function")G=z.call($,J,G);else if(Array.isArray(z)&&!z.includes(J))return;if(G!==void 0||X)U.items.push(Pq.createPair(J,G,Z))};if($ instanceof Map)for(let[J,G]of $)Q(J,G);else if($&&typeof $==="object")for(let J of Object.keys($))Q(J,$[J]);if(typeof q.sortMapEntries==="function")U.items.sort(q.sortMapEntries);return U}add(q,$){let Z;if(X0.isPair(q))Z=q;else if(!q||typeof q!=="object"||!("key"in q))Z=new Pq.Pair(q,q?.value);else Z=new Pq.Pair(q.key,q.value);let X=p0(this.items,Z.key),z=this.schema?.sortMapEntries;if(X){if(!$)throw Error(`Key ${Z.key} already set`);if(X0.isScalar(X.value)&&IZ.isScalarValue(Z.value))X.value.value=Z.value;else X.value=Z.value}else if(z){let U=this.items.findIndex((Q)=>z(Z,Q)<0);if(U===-1)this.items.push(Z);else this.items.splice(U,0,Z)}else this.items.push(Z)}delete(q){let $=p0(this.items,q);if(!$)return!1;return this.items.splice(this.items.indexOf($),1).length>0}get(q,$){let X=p0(this.items,q)?.value;return(!$&&X0.isScalar(X)?X.value:X)??void 0}has(q){return!!p0(this.items,q)}set(q,$){this.add(new Pq.Pair(q,$),!0)}toJSON(q,$,Z){let X=Z?new Z:$?.mapAsMap?new Map:{};if($?.onCreate)$.onCreate(X);for(let z of this.items)LZ.addPairToJSMap($,X,z);return X}toString(q,$,Z){if(!q)return JSON.stringify(this);for(let X of this.items)if(!X0.isPair(X))throw Error(`Map items must all be pairs; found ${JSON.stringify(X)} instead`);if(!q.allNullValues&&this.hasAllNullValues(!1))q=Object.assign({},q,{allNullValues:!0});return TZ.stringifyCollection(this,q,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:q.indent||"",onChompKeep:Z,onComment:$})}}RZ.YAMLMap=T1;RZ.findPair=p0});var D0=I((wZ)=>{var MZ=N(),L1=z0(),DZ={collection:"map",default:!0,nodeClass:L1.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(q,$){if(!MZ.isMap(q))$("Expected a mapping for this tag");return q},createNode:(q,$,Z)=>L1.YAMLMap.from(q,$,Z)};wZ.map=DZ});var U0=I((EZ)=>{var NZ=g0(),jZ=R$(),bZ=Fq(),jq=N(),CZ=f(),SZ=e();class O1 extends bZ.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(q){super(jq.SEQ,q);this.items=[]}add(q){this.items.push(q)}delete(q){let $=Nq(q);if(typeof $!=="number")return!1;return this.items.splice($,1).length>0}get(q,$){let Z=Nq(q);if(typeof Z!=="number")return;let X=this.items[Z];return!$&&jq.isScalar(X)?X.value:X}has(q){let $=Nq(q);return typeof $==="number"&&$<this.items.length}set(q,$){let Z=Nq(q);if(typeof Z!=="number")throw Error(`Expected a valid index, not ${q}.`);let X=this.items[Z];if(jq.isScalar(X)&&CZ.isScalarValue($))X.value=$;else this.items[Z]=$}toJSON(q,$){let Z=[];if($?.onCreate)$.onCreate(Z);let X=0;for(let z of this.items)Z.push(SZ.toJS(z,String(X++),$));return Z}toString(q,$,Z){if(!q)return JSON.stringify(this);return jZ.stringifyCollection(this,q,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(q.indent||"")+" ",onChompKeep:Z,onComment:$})}static from(q,$,Z){let{replacer:X}=Z,z=new this(q);if($&&Symbol.iterator in Object($)){let U=0;for(let Q of $){if(typeof X==="function"){let J=$ instanceof Set?Q:String(U++);Q=X.call($,J,Q)}z.items.push(NZ.createNode(Q,void 0,Z))}}return z}}function Nq(q){let $=jq.isScalar(q)?q.value:q;if($&&typeof $==="string")$=Number($);return typeof $==="number"&&Number.isInteger($)&&$>=0?$:null}EZ.YAMLSeq=O1});var w0=I((gZ)=>{var yZ=N(),I1=U0(),xZ={collection:"seq",default:!0,nodeClass:I1.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(q,$){if(!yZ.isSeq(q))$("Expected a sequence for this tag");return q},createNode:(q,$,Z)=>I1.YAMLSeq.from(q,$,Z)};gZ.seq=xZ});var l0=I((vZ)=>{var hZ=u0(),uZ={identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify(q,$,Z,X){return $=Object.assign({actualString:!0},$),hZ.stringifyString(q,$,Z,X)}};vZ.string=uZ});var bq=I((dZ)=>{var R1=f(),A1={identify:(q)=>q==null,createNode:()=>new R1.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new R1.Scalar(null),stringify:({source:q},$)=>typeof q==="string"&&A1.test.test(q)?q:$.options.nullStr};dZ.nullTag=A1});var A$=I((cZ)=>{var lZ=f(),K1={identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(q)=>new lZ.Scalar(q[0]==="t"||q[0]==="T"),stringify({source:q,value:$},Z){if(q&&K1.test.test(q)){let X=q[0]==="t"||q[0]==="T";if($===X)return q}return $?Z.options.trueStr:Z.options.falseStr}};cZ.boolTag=K1});var P0=I((sZ)=>{function aZ({format:q,minFractionDigits:$,tag:Z,value:X}){if(typeof X==="bigint")return String(X);let z=typeof X==="number"?X:Number(X);if(!isFinite(z))return isNaN(z)?".nan":z<0?"-.inf":".inf";let U=Object.is(X,-0)?"-0":JSON.stringify(X);if(!q&&$&&(!Z||Z==="tag:yaml.org,2002:float")&&/^\d/.test(U)){let Q=U.indexOf(".");if(Q<0)Q=U.length,U+=".";let J=$-(U.length-Q-1);while(J-- >0)U+="0"}return U}sZ.stringifyNumber=aZ});var M$=I((q6)=>{var oZ=f(),K$=P0(),rZ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:K$.stringifyNumber},tZ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q),stringify(q){let $=Number(q.value);return isFinite($)?$.toExponential():K$.stringifyNumber(q)}},eZ={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(q){let $=new oZ.Scalar(parseFloat(q)),Z=q.indexOf(".");if(Z!==-1&&q[q.length-1]==="0")$.minFractionDigits=q.length-Z-1;return $},stringify:K$.stringifyNumber};q6.float=eZ;q6.floatExp=tZ;q6.floatNaN=rZ});var w$=I((J6)=>{var M1=P0(),Cq=(q)=>typeof q==="bigint"||Number.isInteger(q),D$=(q,$,Z,{intAsBigInt:X})=>X?BigInt(q):parseInt(q.substring($),Z);function D1(q,$,Z){let{value:X}=q;if(Cq(X)&&X>=0)return Z+X.toString($);return M1.stringifyNumber(q)}var z6={identify:(q)=>Cq(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(q,$,Z)=>D$(q,2,8,Z),stringify:(q)=>D1(q,8,"0o")},U6={identify:Cq,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(q,$,Z)=>D$(q,0,10,Z),stringify:M1.stringifyNumber},Q6={identify:(q)=>Cq(q)&&q>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(q,$,Z)=>D$(q,2,16,Z),stringify:(q)=>D1(q,16,"0x")};J6.int=U6;J6.intHex=Q6;J6.intOct=z6});var w1=I((L6)=>{var V6=D0(),B6=bq(),W6=w0(),_6=l0(),F6=A$(),P$=M$(),N$=w$(),T6=[V6.map,W6.seq,_6.string,B6.nullTag,F6.boolTag,N$.intOct,N$.int,N$.intHex,P$.floatNaN,P$.floatExp,P$.float];L6.schema=T6});var N1=I((w6)=>{var I6=f(),R6=D0(),A6=w0();function P1(q){return typeof q==="bigint"||Number.isInteger(q)}var Sq=({value:q})=>JSON.stringify(q),K6=[{identify:(q)=>typeof q==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(q)=>q,stringify:Sq},{identify:(q)=>q==null,createNode:()=>new I6.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Sq},{identify:(q)=>typeof q==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(q)=>q==="true",stringify:Sq},{identify:P1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(q,$,{intAsBigInt:Z})=>Z?BigInt(q):parseInt(q,10),stringify:({value:q})=>P1(q)?q.toString():JSON.stringify(q)},{identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(q)=>parseFloat(q),stringify:Sq}],M6={default:!0,tag:"",test:/^/,resolve(q,$){return $(`Unresolved plain scalar ${JSON.stringify(q)}`),q}},D6=[R6.map,A6.seq].concat(K6,M6);w6.schema=D6});var b$=I((b6)=>{var c0=h("buffer"),j$=f(),N6=u0(),j6={identify:(q)=>q instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(q,$){if(typeof c0.Buffer==="function")return c0.Buffer.from(q,"base64");else if(typeof atob==="function"){let Z=atob(q.replace(/[\n\r]/g,"")),X=new Uint8Array(Z.length);for(let z=0;z<Z.length;++z)X[z]=Z.charCodeAt(z);return X}else return $("This environment does not support reading binary tags; either Buffer or atob is required"),q},stringify({comment:q,type:$,value:Z},X,z,U){if(!Z)return"";let Q=Z,J;if(typeof c0.Buffer==="function")J=Q instanceof c0.Buffer?Q.toString("base64"):c0.Buffer.from(Q.buffer).toString("base64");else if(typeof btoa==="function"){let G="";for(let H=0;H<Q.length;++H)G+=String.fromCharCode(Q[H]);J=btoa(G)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if($??($=j$.Scalar.BLOCK_LITERAL),$!==j$.Scalar.QUOTE_DOUBLE){let G=Math.max(X.options.lineWidth-X.indent.length,X.options.minContentWidth),H=Math.ceil(J.length/G),W=Array(H);for(let Y=0,V=0;Y<H;++Y,V+=G)W[Y]=J.substr(V,G);J=W.join($===j$.Scalar.BLOCK_LITERAL?`
54
+ `:" ")}return N6.stringifyString({comment:q,type:$,value:J},X,z,U)}};b6.binary=j6});var fq=I((y6)=>{var Eq=N(),C$=Z0(),S6=f(),E6=U0();function j1(q,$){if(Eq.isSeq(q))for(let Z=0;Z<q.items.length;++Z){let X=q.items[Z];if(Eq.isPair(X))continue;else if(Eq.isMap(X)){if(X.items.length>1)$("Each pair must have its own sequence indicator");let z=X.items[0]||new C$.Pair(new S6.Scalar(null));if(X.commentBefore)z.key.commentBefore=z.key.commentBefore?`${X.commentBefore}
55
+ ${z.key.commentBefore}`:X.commentBefore;if(X.comment){let U=z.value??z.key;U.comment=U.comment?`${X.comment}
56
+ ${U.comment}`:X.comment}X=z}q.items[Z]=Eq.isPair(X)?X:new C$.Pair(X)}else $("Expected a sequence for this tag");return q}function b1(q,$,Z){let{replacer:X}=Z,z=new E6.YAMLSeq(q);z.tag="tag:yaml.org,2002:pairs";let U=0;if($&&Symbol.iterator in Object($))for(let Q of $){if(typeof X==="function")Q=X.call($,String(U++),Q);let J,G;if(Array.isArray(Q))if(Q.length===2)J=Q[0],G=Q[1];else throw TypeError(`Expected [key, value] tuple: ${Q}`);else if(Q&&Q instanceof Object){let H=Object.keys(Q);if(H.length===1)J=H[0],G=Q[J];else throw TypeError(`Expected tuple with one key, not ${H.length} keys`)}else J=Q;z.items.push(C$.createPair(J,G,Z))}return z}var f6={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:j1,createNode:b1};y6.createPairs=b1;y6.pairs=f6;y6.resolvePairs=j1});var E$=I((v6)=>{var C1=N(),S$=e(),i0=z0(),h6=U0(),S1=fq();class B0 extends h6.YAMLSeq{constructor(){super();this.add=i0.YAMLMap.prototype.add.bind(this),this.delete=i0.YAMLMap.prototype.delete.bind(this),this.get=i0.YAMLMap.prototype.get.bind(this),this.has=i0.YAMLMap.prototype.has.bind(this),this.set=i0.YAMLMap.prototype.set.bind(this),this.tag=B0.tag}toJSON(q,$){if(!$)return super.toJSON(q);let Z=new Map;if($?.onCreate)$.onCreate(Z);for(let X of this.items){let z,U;if(C1.isPair(X))z=S$.toJS(X.key,"",$),U=S$.toJS(X.value,z,$);else z=S$.toJS(X,"",$);if(Z.has(z))throw Error("Ordered maps must not include duplicate keys");Z.set(z,U)}return Z}static from(q,$,Z){let X=S1.createPairs(q,$,Z),z=new this;return z.items=X.items,z}}B0.tag="tag:yaml.org,2002:omap";var u6={collection:"seq",identify:(q)=>q instanceof Map,nodeClass:B0,default:!1,tag:"tag:yaml.org,2002:omap",resolve(q,$){let Z=S1.resolvePairs(q,$),X=[];for(let{key:z}of Z.items)if(C1.isScalar(z))if(X.includes(z.value))$(`Ordered maps must not include duplicate keys: ${z.value}`);else X.push(z.value);return Object.assign(new B0,Z)},createNode:(q,$,Z)=>B0.from(q,$,Z)};v6.YAMLOMap=B0;v6.omap=u6});var g1=I((p6)=>{var E1=f();function f1({value:q,source:$},Z){if($&&(q?y1:x1).test.test($))return $;return q?Z.options.trueStr:Z.options.falseStr}var y1={identify:(q)=>q===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new E1.Scalar(!0),stringify:f1},x1={identify:(q)=>q===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new E1.Scalar(!1),stringify:f1};p6.falseTag=x1;p6.trueTag=y1});var k1=I((o6)=>{var i6=f(),f$=P0(),a6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(q)=>q.slice(-3).toLowerCase()==="nan"?NaN:q[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f$.stringifyNumber},s6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(q)=>parseFloat(q.replace(/_/g,"")),stringify(q){let $=Number(q.value);return isFinite($)?$.toExponential():f$.stringifyNumber(q)}},n6={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(q){let $=new i6.Scalar(parseFloat(q.replace(/_/g,""))),Z=q.indexOf(".");if(Z!==-1){let X=q.substring(Z+1).replace(/_/g,"");if(X[X.length-1]==="0")$.minFractionDigits=X.length}return $},stringify:f$.stringifyNumber};o6.float=n6;o6.floatExp=s6;o6.floatNaN=a6});var u1=I((z3)=>{var h1=P0(),a0=(q)=>typeof q==="bigint"||Number.isInteger(q);function yq(q,$,Z,{intAsBigInt:X}){let z=q[0];if(z==="-"||z==="+")$+=1;if(q=q.substring($).replace(/_/g,""),X){switch(Z){case 2:q=`0b${q}`;break;case 8:q=`0o${q}`;break;case 16:q=`0x${q}`;break}let Q=BigInt(q);return z==="-"?BigInt(-1)*Q:Q}let U=parseInt(q,Z);return z==="-"?-1*U:U}function y$(q,$,Z){let{value:X}=q;if(a0(X)){let z=X.toString($);return X<0?"-"+Z+z.substr(1):Z+z}return h1.stringifyNumber(q)}var q3={identify:a0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(q,$,Z)=>yq(q,2,2,Z),stringify:(q)=>y$(q,2,"0b")},$3={identify:a0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(q,$,Z)=>yq(q,1,8,Z),stringify:(q)=>y$(q,8,"0")},Z3={identify:a0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(q,$,Z)=>yq(q,0,10,Z),stringify:h1.stringifyNumber},X3={identify:a0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(q,$,Z)=>yq(q,2,16,Z),stringify:(q)=>y$(q,16,"0x")};z3.int=Z3;z3.intBin=q3;z3.intHex=X3;z3.intOct=$3});var x$=I((Y3)=>{var kq=N(),xq=Z0(),gq=z0();class W0 extends gq.YAMLMap{constructor(q){super(q);this.tag=W0.tag}add(q){let $;if(kq.isPair(q))$=q;else if(q&&typeof q==="object"&&"key"in q&&"value"in q&&q.value===null)$=new xq.Pair(q.key,null);else $=new xq.Pair(q,null);if(!gq.findPair(this.items,$.key))this.items.push($)}get(q,$){let Z=gq.findPair(this.items,q);return!$&&kq.isPair(Z)?kq.isScalar(Z.key)?Z.key.value:Z.key:Z}set(q,$){if(typeof $!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof $}`);let Z=gq.findPair(this.items,q);if(Z&&!$)this.items.splice(this.items.indexOf(Z),1);else if(!Z&&$)this.items.push(new xq.Pair(q))}toJSON(q,$){return super.toJSON(q,$,Set)}toString(q,$,Z){if(!q)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},q,{allNullValues:!0}),$,Z);else throw Error("Set items must all have null values")}static from(q,$,Z){let{replacer:X}=Z,z=new this(q);if($&&Symbol.iterator in Object($))for(let U of $){if(typeof X==="function")U=X.call($,U,U);z.items.push(xq.createPair(U,null,Z))}return z}}W0.tag="tag:yaml.org,2002:set";var H3={collection:"map",identify:(q)=>q instanceof Set,nodeClass:W0,default:!1,tag:"tag:yaml.org,2002:set",createNode:(q,$,Z)=>W0.from(q,$,Z),resolve(q,$){if(kq.isMap(q))if(q.hasAllNullValues(!0))return Object.assign(new W0,q);else $("Set items must all have null values");else $("Expected a mapping for this tag");return q}};Y3.YAMLSet=W0;Y3.set=H3});var k$=I((T3)=>{var W3=P0();function g$(q,$){let Z=q[0],X=Z==="-"||Z==="+"?q.substring(1):q,z=(Q)=>$?BigInt(Q):Number(Q),U=X.replace(/_/g,"").split(":").reduce((Q,J)=>Q*z(60)+z(J),z(0));return Z==="-"?z(-1)*U:U}function v1(q){let{value:$}=q,Z=(Q)=>Q;if(typeof $==="bigint")Z=(Q)=>BigInt(Q);else if(isNaN($)||!isFinite($))return W3.stringifyNumber(q);let X="";if($<0)X="-",$*=Z(-1);let z=Z(60),U=[$%z];if($<60)U.unshift(0);else if($=($-U[0])/z,U.unshift($%z),$>=60)$=($-U[0])/z,U.unshift($);return X+U.map((Q)=>String(Q).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var _3={identify:(q)=>typeof q==="bigint"||Number.isInteger(q),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(q,$,{intAsBigInt:Z})=>g$(q,Z),stringify:v1},F3={identify:(q)=>typeof q==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(q)=>g$(q,!1),stringify:v1},m1={identify:(q)=>q 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(q){let $=q.match(m1.test);if(!$)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,Z,X,z,U,Q,J]=$.map(Number),G=$[7]?Number(($[7]+"00").substr(1,3)):0,H=Date.UTC(Z,X-1,z,U||0,Q||0,J||0,G),W=$[8];if(W&&W!=="Z"){let Y=g$(W,!1);if(Math.abs(Y)<30)Y*=60;H-=60000*Y}return new Date(H)},stringify:({value:q})=>q?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};T3.floatTime=F3;T3.intTime=_3;T3.timestamp=m1});var p1=I((C3)=>{var R3=D0(),A3=bq(),K3=w0(),M3=l0(),D3=b$(),d1=g1(),h$=k1(),hq=u1(),w3=Aq(),P3=E$(),N3=fq(),j3=x$(),u$=k$(),b3=[R3.map,K3.seq,M3.string,A3.nullTag,d1.trueTag,d1.falseTag,hq.intBin,hq.intOct,hq.int,hq.intHex,h$.floatNaN,h$.floatExp,h$.float,D3.binary,w3.merge,P3.omap,N3.pairs,j3.set,u$.intTime,u$.floatTime,u$.timestamp];C3.schema=b3});var e1=I((u3)=>{var a1=D0(),E3=bq(),s1=w0(),f3=l0(),y3=A$(),v$=M$(),m$=w$(),x3=w1(),g3=N1(),n1=b$(),s0=Aq(),o1=E$(),r1=fq(),l1=p1(),t1=x$(),uq=k$(),c1=new Map([["core",x3.schema],["failsafe",[a1.map,s1.seq,f3.string]],["json",g3.schema],["yaml11",l1.schema],["yaml-1.1",l1.schema]]),i1={binary:n1.binary,bool:y3.boolTag,float:v$.float,floatExp:v$.floatExp,floatNaN:v$.floatNaN,floatTime:uq.floatTime,int:m$.int,intHex:m$.intHex,intOct:m$.intOct,intTime:uq.intTime,map:a1.map,merge:s0.merge,null:E3.nullTag,omap:o1.omap,pairs:r1.pairs,seq:s1.seq,set:t1.set,timestamp:uq.timestamp},k3={"tag:yaml.org,2002:binary":n1.binary,"tag:yaml.org,2002:merge":s0.merge,"tag:yaml.org,2002:omap":o1.omap,"tag:yaml.org,2002:pairs":r1.pairs,"tag:yaml.org,2002:set":t1.set,"tag:yaml.org,2002:timestamp":uq.timestamp};function h3(q,$,Z){let X=c1.get($);if(X&&!q)return Z&&!X.includes(s0.merge)?X.concat(s0.merge):X.slice();let z=X;if(!z)if(Array.isArray(q))z=[];else{let U=Array.from(c1.keys()).filter((Q)=>Q!=="yaml11").map((Q)=>JSON.stringify(Q)).join(", ");throw Error(`Unknown schema "${$}"; use one of ${U} or define customTags array`)}if(Array.isArray(q))for(let U of q)z=z.concat(U);else if(typeof q==="function")z=q(z.slice());if(Z)z=z.concat(s0.merge);return z.reduce((U,Q)=>{let J=typeof Q==="string"?i1[Q]:Q;if(!J){let G=JSON.stringify(Q),H=Object.keys(i1).map((W)=>JSON.stringify(W)).join(", ");throw Error(`Unknown custom tag ${G}; use one of ${H}`)}if(!U.includes(J))U.push(J);return U},[])}u3.coreKnownTags=k3;u3.getTags=h3});var l$=I((i3)=>{var d$=N(),d3=D0(),p3=w0(),l3=l0(),vq=e1(),c3=(q,$)=>q.key<$.key?-1:q.key>$.key?1:0;class p${constructor({compat:q,customTags:$,merge:Z,resolveKnownTags:X,schema:z,sortMapEntries:U,toStringDefaults:Q}){this.compat=Array.isArray(q)?vq.getTags(q,"compat"):q?vq.getTags(null,q):null,this.name=typeof z==="string"&&z||"core",this.knownTags=X?vq.coreKnownTags:{},this.tags=vq.getTags($,this.name,Z),this.toStringOptions=Q??null,Object.defineProperty(this,d$.MAP,{value:d3.map}),Object.defineProperty(this,d$.SCALAR,{value:l3.string}),Object.defineProperty(this,d$.SEQ,{value:p3.seq}),this.sortMapEntries=typeof U==="function"?U:U===!0?c3:null}clone(){let q=Object.create(p$.prototype,Object.getOwnPropertyDescriptors(this));return q.tags=this.tags.slice(),q}}i3.Schema=p$});var q9=I((o3)=>{var s3=N(),c$=v0(),n0=k0();function n3(q,$){let Z=[],X=$.directives===!0;if($.directives!==!1&&q.directives){let G=q.directives.toString(q);if(G)Z.push(G),X=!0;else if(q.directives.docStart)X=!0}if(X)Z.push("---");let z=c$.createStringifyContext(q,$),{commentString:U}=z.options;if(q.commentBefore){if(Z.length!==1)Z.unshift("");let G=U(q.commentBefore);Z.unshift(n0.indentComment(G,""))}let Q=!1,J=null;if(q.contents){if(s3.isNode(q.contents)){if(q.contents.spaceBefore&&X)Z.push("");if(q.contents.commentBefore){let W=U(q.contents.commentBefore);Z.push(n0.indentComment(W,""))}z.forceBlockIndent=!!q.comment,J=q.contents.comment}let G=J?void 0:()=>Q=!0,H=c$.stringify(q.contents,z,()=>J=null,G);if(J)H+=n0.lineComment(H,"",U(J));if((H[0]==="|"||H[0]===">")&&Z[Z.length-1]==="---")Z[Z.length-1]=`--- ${H}`;else Z.push(H)}else Z.push(c$.stringify(q.contents,z));if(q.directives?.docEnd)if(q.comment){let G=U(q.comment);if(G.includes(`
57
+ `))Z.push("..."),Z.push(n0.indentComment(G,""));else Z.push(`... ${G}`)}else Z.push("...");else{let G=q.comment;if(G&&Q)G=G.replace(/^\n+/,"");if(G){if((!Q||J)&&Z[Z.length-1]!=="")Z.push("");Z.push(n0.indentComment(U(G),""))}}return Z.join(`
58
58
  `)+`
59
- `}NU.stringifyDocument=PU});var d0=F((gU)=>{var CU=j0(),M0=Hq(),h=P(),bU=o(),SU=s(),EU=C$(),fU=m9(),S$=zq(),yU=rq(),xU=C0(),E$=nq();class f${constructor(q,$,Z){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,h.NODE_TYPE,{value:h.DOC});let U=null;if(typeof $==="function"||Array.isArray($))U=$;else if(Z===void 0&&$)Z=$,$=void 0;let X=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},Z);this.options=X;let{version:Q}=X;if(Z?._directives){if(this.directives=Z._directives.atDocument(),this.directives.yaml.explicit)Q=this.directives.yaml.version}else this.directives=new E$.Directives({version:Q});this.setSchema(Q,Z),this.contents=q===void 0?null:this.createNode(q,U,Z)}clone(){let q=Object.create(f$.prototype,{[h.NODE_TYPE]:{value:h.DOC}});if(q.commentBefore=this.commentBefore,q.comment=this.comment,q.errors=this.errors.slice(),q.warnings=this.warnings.slice(),q.options=Object.assign({},this.options),this.directives)q.directives=this.directives.clone();if(q.schema=this.schema.clone(),q.contents=h.isNode(this.contents)?this.contents.clone(q.schema):this.contents,this.range)q.range=this.range.slice();return q}add(q){if(K0(this.contents))this.contents.add(q)}addIn(q,$){if(K0(this.contents))this.contents.addIn(q,$)}createAlias(q,$){if(!q.anchor){let Z=S$.anchorNames(this);q.anchor=!$||Z.has($)?S$.findNewAnchor($||"a",Z):$}return new CU.Alias(q.anchor)}createNode(q,$,Z){let U=void 0;if(typeof $==="function")q=$.call({"":q},"",q),U=$;else if(Array.isArray($)){let V=(L)=>typeof L==="number"||L instanceof String||L instanceof Number,I=$.filter(V).map(String);if(I.length>0)$=$.concat(I);U=$}else if(Z===void 0&&$)Z=$,$=void 0;let{aliasDuplicateObjects:X,anchorPrefix:Q,flow:z,keepUndefined:G,onTagObj:J,tag:H}=Z??{},{onAnchor:W,setAnchors:Y,sourceObjects:B}=S$.createNodeAnchors(this,Q||"a"),_={aliasDuplicateObjects:X??!0,keepUndefined:G??!1,onAnchor:W,onTagObj:J,replacer:U,schema:this.schema,sourceObjects:B},O=xU.createNode(q,H,_);if(z&&h.isCollection(O))O.flow=!0;return Y(),O}createPair(q,$,Z={}){let U=this.createNode(q,null,Z),X=this.createNode($,null,Z);return new bU.Pair(U,X)}delete(q){return K0(this.contents)?this.contents.delete(q):!1}deleteIn(q){if(M0.isEmptyPath(q)){if(this.contents==null)return!1;return this.contents=null,!0}return K0(this.contents)?this.contents.deleteIn(q):!1}get(q,$){return h.isCollection(this.contents)?this.contents.get(q,$):void 0}getIn(q,$){if(M0.isEmptyPath(q))return!$&&h.isScalar(this.contents)?this.contents.value:this.contents;return h.isCollection(this.contents)?this.contents.getIn(q,$):void 0}has(q){return h.isCollection(this.contents)?this.contents.has(q):!1}hasIn(q){if(M0.isEmptyPath(q))return this.contents!==void 0;return h.isCollection(this.contents)?this.contents.hasIn(q):!1}set(q,$){if(this.contents==null)this.contents=M0.collectionFromPath(this.schema,[q],$);else if(K0(this.contents))this.contents.set(q,$)}setIn(q,$){if(M0.isEmptyPath(q))this.contents=$;else if(this.contents==null)this.contents=M0.collectionFromPath(this.schema,Array.from(q),$);else if(K0(this.contents))this.contents.setIn(q,$)}setSchema(q,$={}){if(typeof q==="number")q=String(q);let Z;switch(q){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new E$.Directives({version:"1.1"});Z={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=q;else this.directives=new E$.Directives({version:q});Z={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;Z=null;break;default:{let U=JSON.stringify(q);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${U}`)}}if($.schema instanceof Object)this.schema=$.schema;else if(Z)this.schema=new EU.Schema(Object.assign(Z,$));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:q,jsonArg:$,mapAsMap:Z,maxAliasCount:U,onAnchor:X,reviver:Q}={}){let z={anchors:new Map,doc:this,keep:!q,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},G=SU.toJS(this.contents,$??"",z);if(typeof X==="function")for(let{count:J,res:H}of z.anchors.values())X(H,J);return typeof Q==="function"?yU.applyReviver(Q,{"":G},"",G):G}toJSON(q,$){return this.toJS({json:!0,jsonArg:q,mapAsMap:!1,onAnchor:$})}toString(q={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in q&&(!Number.isInteger(q.indent)||Number(q.indent)<=0)){let $=JSON.stringify(q.indent);throw Error(`"indent" option must be a positive integer, not ${$}`)}return fU.stringifyDocument(this,q)}}function K0(q){if(h.isCollection(q))return!0;throw Error("Expected a YAML collection as document contents")}gU.Document=f$});var l0=F((uU)=>{class xq extends Error{constructor(q,$,Z,U){super();this.name=q,this.code=Z,this.message=U,this.pos=$}}class p9 extends xq{constructor(q,$,Z){super("YAMLParseError",q,$,Z)}}class d9 extends xq{constructor(q,$,Z){super("YAMLWarning",q,$,Z)}}var kU=(q,$)=>(Z)=>{if(Z.pos[0]===-1)return;Z.linePos=Z.pos.map((G)=>$.linePos(G));let{line:U,col:X}=Z.linePos[0];Z.message+=` at line ${U}, column ${X}`;let Q=X-1,z=q.substring($.lineStarts[U-1],$.lineStarts[U]).replace(/[\n\r]+$/,"");if(Q>=60&&z.length>80){let G=Math.min(Q-39,z.length-79);z="…"+z.substring(G),Q-=G-1}if(z.length>80)z=z.substring(0,79)+"…";if(U>1&&/^ *$/.test(z.substring(0,Q))){let G=q.substring($.lineStarts[U-2],$.lineStarts[U-1]);if(G.length>80)G=G.substring(0,79)+`…
60
- `;z=G+z}if(/[^ ]/.test(z)){let G=1,J=Z.linePos[1];if(J?.line===U&&J.col>X)G=Math.max(1,Math.min(J.col-X,80-Q));let H=" ".repeat(Q)+"^".repeat(G);Z.message+=`:
59
+ `}o3.stringifyDocument=n3});var o0=I((U7)=>{var t3=x0(),N0=Fq(),m=N(),e3=Z0(),q7=e(),$7=l$(),Z7=q9(),i$=Bq(),X7=V$(),z7=g0(),a$=Y$();class s${constructor(q,$,Z){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,m.NODE_TYPE,{value:m.DOC});let X=null;if(typeof $==="function"||Array.isArray($))X=$;else if(Z===void 0&&$)Z=$,$=void 0;let z=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},Z);this.options=z;let{version:U}=z;if(Z?._directives){if(this.directives=Z._directives.atDocument(),this.directives.yaml.explicit)U=this.directives.yaml.version}else this.directives=new a$.Directives({version:U});this.setSchema(U,Z),this.contents=q===void 0?null:this.createNode(q,X,Z)}clone(){let q=Object.create(s$.prototype,{[m.NODE_TYPE]:{value:m.DOC}});if(q.commentBefore=this.commentBefore,q.comment=this.comment,q.errors=this.errors.slice(),q.warnings=this.warnings.slice(),q.options=Object.assign({},this.options),this.directives)q.directives=this.directives.clone();if(q.schema=this.schema.clone(),q.contents=m.isNode(this.contents)?this.contents.clone(q.schema):this.contents,this.range)q.range=this.range.slice();return q}add(q){if(j0(this.contents))this.contents.add(q)}addIn(q,$){if(j0(this.contents))this.contents.addIn(q,$)}createAlias(q,$){if(!q.anchor){let Z=i$.anchorNames(this);q.anchor=!$||Z.has($)?i$.findNewAnchor($||"a",Z):$}return new t3.Alias(q.anchor)}createNode(q,$,Z){let X=void 0;if(typeof $==="function")q=$.call({"":q},"",q),X=$;else if(Array.isArray($)){let F=(O)=>typeof O==="number"||O instanceof String||O instanceof Number,_=$.filter(F).map(String);if(_.length>0)$=$.concat(_);X=$}else if(Z===void 0&&$)Z=$,$=void 0;let{aliasDuplicateObjects:z,anchorPrefix:U,flow:Q,keepUndefined:J,onTagObj:G,tag:H}=Z??{},{onAnchor:W,setAnchors:Y,sourceObjects:V}=i$.createNodeAnchors(this,U||"a"),T={aliasDuplicateObjects:z??!0,keepUndefined:J??!1,onAnchor:W,onTagObj:G,replacer:X,schema:this.schema,sourceObjects:V},L=z7.createNode(q,H,T);if(Q&&m.isCollection(L))L.flow=!0;return Y(),L}createPair(q,$,Z={}){let X=this.createNode(q,null,Z),z=this.createNode($,null,Z);return new e3.Pair(X,z)}delete(q){return j0(this.contents)?this.contents.delete(q):!1}deleteIn(q){if(N0.isEmptyPath(q)){if(this.contents==null)return!1;return this.contents=null,!0}return j0(this.contents)?this.contents.deleteIn(q):!1}get(q,$){return m.isCollection(this.contents)?this.contents.get(q,$):void 0}getIn(q,$){if(N0.isEmptyPath(q))return!$&&m.isScalar(this.contents)?this.contents.value:this.contents;return m.isCollection(this.contents)?this.contents.getIn(q,$):void 0}has(q){return m.isCollection(this.contents)?this.contents.has(q):!1}hasIn(q){if(N0.isEmptyPath(q))return this.contents!==void 0;return m.isCollection(this.contents)?this.contents.hasIn(q):!1}set(q,$){if(this.contents==null)this.contents=N0.collectionFromPath(this.schema,[q],$);else if(j0(this.contents))this.contents.set(q,$)}setIn(q,$){if(N0.isEmptyPath(q))this.contents=$;else if(this.contents==null)this.contents=N0.collectionFromPath(this.schema,Array.from(q),$);else if(j0(this.contents))this.contents.setIn(q,$)}setSchema(q,$={}){if(typeof q==="number")q=String(q);let Z;switch(q){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new a$.Directives({version:"1.1"});Z={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=q;else this.directives=new a$.Directives({version:q});Z={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;Z=null;break;default:{let X=JSON.stringify(q);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${X}`)}}if($.schema instanceof Object)this.schema=$.schema;else if(Z)this.schema=new $7.Schema(Object.assign(Z,$));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:q,jsonArg:$,mapAsMap:Z,maxAliasCount:X,onAnchor:z,reviver:U}={}){let Q={anchors:new Map,doc:this,keep:!q,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},J=q7.toJS(this.contents,$??"",Q);if(typeof z==="function")for(let{count:G,res:H}of Q.anchors.values())z(H,G);return typeof U==="function"?X7.applyReviver(U,{"":J},"",J):J}toJSON(q,$){return this.toJS({json:!0,jsonArg:q,mapAsMap:!1,onAnchor:$})}toString(q={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in q&&(!Number.isInteger(q.indent)||Number(q.indent)<=0)){let $=JSON.stringify(q.indent);throw Error(`"indent" option must be a positive integer, not ${$}`)}return Z7.stringifyDocument(this,q)}}function j0(q){if(m.isCollection(q))return!0;throw Error("Expected a YAML collection as document contents")}U7.Document=s$});var r0=I((G7)=>{class mq extends Error{constructor(q,$,Z,X){super();this.name=q,this.code=Z,this.message=X,this.pos=$}}class $9 extends mq{constructor(q,$,Z){super("YAMLParseError",q,$,Z)}}class Z9 extends mq{constructor(q,$,Z){super("YAMLWarning",q,$,Z)}}var J7=(q,$)=>(Z)=>{if(Z.pos[0]===-1)return;Z.linePos=Z.pos.map((J)=>$.linePos(J));let{line:X,col:z}=Z.linePos[0];Z.message+=` at line ${X}, column ${z}`;let U=z-1,Q=q.substring($.lineStarts[X-1],$.lineStarts[X]).replace(/[\n\r]+$/,"");if(U>=60&&Q.length>80){let J=Math.min(U-39,Q.length-79);Q="…"+Q.substring(J),U-=J-1}if(Q.length>80)Q=Q.substring(0,79)+"…";if(X>1&&/^ *$/.test(Q.substring(0,U))){let J=q.substring($.lineStarts[X-2],$.lineStarts[X-1]);if(J.length>80)J=J.substring(0,79)+`…
60
+ `;Q=J+Q}if(/[^ ]/.test(Q)){let J=1,G=Z.linePos[1];if(G?.line===X&&G.col>z)J=Math.max(1,Math.min(G.col-z,80-U));let H=" ".repeat(U)+"^".repeat(J);Z.message+=`:
61
61
 
62
- ${z}
62
+ ${Q}
63
63
  ${H}
64
- `}};uU.YAMLError=xq;uU.YAMLParseError=p9;uU.YAMLWarning=d9;uU.prettifyError=kU});var c0=F((cU)=>{function lU(q,{flow:$,indicator:Z,next:U,offset:X,onError:Q,parentIndent:z,startOnNewline:G}){let J=!1,H=G,W=G,Y="",B="",_=!1,O=!1,V=null,I=null,L=null,A=null,M=null,K=null,D=null;for(let R of q){if(O){if(R.type!=="space"&&R.type!=="newline"&&R.type!=="comma")Q(R.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");O=!1}if(V){if(H&&R.type!=="comment"&&R.type!=="newline")Q(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");V=null}switch(R.type){case"space":if(!$&&(Z!=="doc-start"||U?.type!=="flow-collection")&&R.source.includes("\t"))V=R;W=!0;break;case"comment":{if(!W)Q(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let b=R.source.substring(1)||" ";if(!Y)Y=b;else Y+=B+b;B="",H=!1;break}case"newline":if(H){if(Y)Y+=R.source;else if(!K||Z!=="seq-item-ind")J=!0}else B+=R.source;if(H=!0,_=!0,I||L)A=R;W=!0;break;case"anchor":if(I)Q(R,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(R.source.endsWith(":"))Q(R.offset+R.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);I=R,D??(D=R.offset),H=!1,W=!1,O=!0;break;case"tag":{if(L)Q(R,"MULTIPLE_TAGS","A node can have at most one tag");L=R,D??(D=R.offset),H=!1,W=!1,O=!0;break}case Z:if(I||L)Q(R,"BAD_PROP_ORDER",`Anchors and tags must be after the ${R.source} indicator`);if(K)Q(R,"UNEXPECTED_TOKEN",`Unexpected ${R.source} in ${$??"collection"}`);K=R,H=Z==="seq-item-ind"||Z==="explicit-key-ind",W=!1;break;case"comma":if($){if(M)Q(R,"UNEXPECTED_TOKEN",`Unexpected , in ${$}`);M=R,H=!1,W=!1;break}default:Q(R,"UNEXPECTED_TOKEN",`Unexpected ${R.type} token`),H=!1,W=!1}}let w=q[q.length-1],N=w?w.offset+w.source.length:X;if(O&&U&&U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&(U.type!=="scalar"||U.source!==""))Q(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(V&&(H&&V.indent<=z||U?.type==="block-map"||U?.type==="block-seq"))Q(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:M,found:K,spaceBefore:J,comment:Y,hasNewline:_,anchor:I,tag:L,newlineAfterProp:A,end:N,start:D??N}}cU.resolveProps=lU});var gq=F((iU)=>{function y$(q){if(!q)return null;switch(q.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(q.source.includes(`
65
- `))return!0;if(q.end){for(let $ of q.end)if($.type==="newline")return!0}return!1;case"flow-collection":for(let $ of q.items){for(let Z of $.start)if(Z.type==="newline")return!0;if($.sep){for(let Z of $.sep)if(Z.type==="newline")return!0}if(y$($.key)||y$($.value))return!0}return!1;default:return!0}}iU.containsNewline=y$});var x$=F((oU)=>{var nU=gq();function rU(q,$,Z){if($?.type==="flow-collection"){let U=$.end[0];if(U.indent===q&&(U.source==="]"||U.source==="}")&&nU.containsNewline($))Z(U,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}oU.flowIndentCheck=rU});var g$=F((qX)=>{var l9=P();function eU(q,$,Z){let{uniqueKeys:U}=q.options;if(U===!1)return!1;let X=typeof U==="function"?U:(Q,z)=>Q===z||l9.isScalar(Q)&&l9.isScalar(z)&&Q.value===z.value;return $.some((Q)=>X(Q.key,Z))}qX.mapIncludes=eU});var n9=F((zX)=>{var c9=o(),ZX=e(),a9=c0(),UX=gq(),i9=x$(),XX=g$(),s9="All mapping items must start at the same column";function QX({composeNode:q,composeEmptyNode:$},Z,U,X,Q){let G=new(Q?.nodeClass??ZX.YAMLMap)(Z.schema);if(Z.atRoot)Z.atRoot=!1;let J=U.offset,H=null;for(let W of U.items){let{start:Y,key:B,sep:_,value:O}=W,V=a9.resolveProps(Y,{indicator:"explicit-key-ind",next:B??_?.[0],offset:J,onError:X,parentIndent:U.indent,startOnNewline:!0}),I=!V.found;if(I){if(B){if(B.type==="block-seq")X(J,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in B&&B.indent!==U.indent)X(J,"BAD_INDENT",s9)}if(!V.anchor&&!V.tag&&!_){if(H=V.end,V.comment)if(G.comment)G.comment+=`
66
- `+V.comment;else G.comment=V.comment;continue}if(V.newlineAfterProp||UX.containsNewline(B))X(B??Y[Y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(V.found?.indent!==U.indent)X(J,"BAD_INDENT",s9);Z.atKey=!0;let L=V.end,A=B?q(Z,B,V,X):$(Z,L,Y,null,V,X);if(Z.schema.compat)i9.flowIndentCheck(U.indent,B,X);if(Z.atKey=!1,XX.mapIncludes(Z,G.items,A))X(L,"DUPLICATE_KEY","Map keys must be unique");let M=a9.resolveProps(_??[],{indicator:"map-value-ind",next:O,offset:A.range[2],onError:X,parentIndent:U.indent,startOnNewline:!B||B.type==="block-scalar"});if(J=M.end,M.found){if(I){if(O?.type==="block-map"&&!M.hasNewline)X(J,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(Z.options.strict&&V.start<M.found.offset-1024)X(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let K=O?q(Z,O,M,X):$(Z,J,_,null,M,X);if(Z.schema.compat)i9.flowIndentCheck(U.indent,O,X);J=K.range[2];let D=new c9.Pair(A,K);if(Z.options.keepSourceTokens)D.srcToken=W;G.items.push(D)}else{if(I)X(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(M.comment)if(A.comment)A.comment+=`
67
- `+M.comment;else A.comment=M.comment;let K=new c9.Pair(A);if(Z.options.keepSourceTokens)K.srcToken=W;G.items.push(K)}}if(H&&H<J)X(H,"IMPOSSIBLE","Map comment with trailing content");return G.range=[U.offset,J,H??J],G}zX.resolveBlockMap=QX});var r9=F((VX)=>{var JX=q0(),HX=c0(),YX=x$();function BX({composeNode:q,composeEmptyNode:$},Z,U,X,Q){let G=new(Q?.nodeClass??JX.YAMLSeq)(Z.schema);if(Z.atRoot)Z.atRoot=!1;if(Z.atKey)Z.atKey=!1;let J=U.offset,H=null;for(let{start:W,value:Y}of U.items){let B=HX.resolveProps(W,{indicator:"seq-item-ind",next:Y,offset:J,onError:X,parentIndent:U.indent,startOnNewline:!0});if(!B.found)if(B.anchor||B.tag||Y)if(Y?.type==="block-seq")X(B.end,"BAD_INDENT","All sequence items must start at the same column");else X(J,"MISSING_CHAR","Sequence item without - indicator");else{if(H=B.end,B.comment)G.comment=B.comment;continue}let _=Y?q(Z,Y,B,X):$(Z,B.end,W,null,B,X);if(Z.schema.compat)YX.flowIndentCheck(U.indent,Y,X);J=_.range[2],G.items.push(_)}return G.range=[U.offset,J,H??J],G}VX.resolveBlockSeq=BX});var D0=F((OX)=>{function TX(q,$,Z,U){let X="";if(q){let Q=!1,z="";for(let G of q){let{source:J,type:H}=G;switch(H){case"space":Q=!0;break;case"comment":{if(Z&&!Q)U(G,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let W=J.substring(1)||" ";if(!X)X=W;else X+=z+W;z="";break}case"newline":if(X)z+=J;Q=!0;break;default:U(G,"UNEXPECTED_TOKEN",`Unexpected ${H} at node end`)}$+=J.length}}return{comment:X,offset:$}}OX.resolveEnd=TX});var e9=F((DX)=>{var IX=P(),LX=o(),o9=e(),FX=q0(),RX=D0(),t9=c0(),AX=gq(),MX=g$(),h$="Block collections are not allowed within flow collections",k$=(q)=>q&&(q.type==="block-map"||q.type==="block-seq");function KX({composeNode:q,composeEmptyNode:$},Z,U,X,Q){let z=U.start.source==="{",G=z?"flow map":"flow sequence",H=new(Q?.nodeClass??(z?o9.YAMLMap:FX.YAMLSeq))(Z.schema);H.flow=!0;let W=Z.atRoot;if(W)Z.atRoot=!1;if(Z.atKey)Z.atKey=!1;let Y=U.offset+U.start.source.length;for(let I=0;I<U.items.length;++I){let L=U.items[I],{start:A,key:M,sep:K,value:D}=L,w=t9.resolveProps(A,{flow:G,indicator:"explicit-key-ind",next:M??K?.[0],offset:Y,onError:X,parentIndent:U.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!K&&!D){if(I===0&&w.comma)X(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${G}`);else if(I<U.items.length-1)X(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${G}`);if(w.comment)if(H.comment)H.comment+=`
68
- `+w.comment;else H.comment=w.comment;Y=w.end;continue}if(!z&&Z.options.strict&&AX.containsNewline(M))X(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(I===0){if(w.comma)X(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${G}`)}else{if(!w.comma)X(w.start,"MISSING_CHAR",`Missing , between ${G} items`);if(w.comment){let N="";q:for(let R of A)switch(R.type){case"comma":case"space":break;case"comment":N=R.source.substring(1);break q;default:break q}if(N){let R=H.items[H.items.length-1];if(IX.isPair(R))R=R.value??R.key;if(R.comment)R.comment+=`
69
- `+N;else R.comment=N;w.comment=w.comment.substring(N.length+1)}}}if(!z&&!K&&!w.found){let N=D?q(Z,D,w,X):$(Z,w.end,K,null,w,X);if(H.items.push(N),Y=N.range[2],k$(D))X(N.range,"BLOCK_IN_FLOW",h$)}else{Z.atKey=!0;let N=w.end,R=M?q(Z,M,w,X):$(Z,N,A,null,w,X);if(k$(M))X(R.range,"BLOCK_IN_FLOW",h$);Z.atKey=!1;let b=t9.resolveProps(K??[],{flow:G,indicator:"map-value-ind",next:D,offset:R.range[2],onError:X,parentIndent:U.indent,startOnNewline:!1});if(b.found){if(!z&&!w.found&&Z.options.strict){if(K)for(let S of K){if(S===b.found)break;if(S.type==="newline"){X(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(w.start<b.found.offset-1024)X(b.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(D)if("source"in D&&D.source?.[0]===":")X(D,"MISSING_CHAR",`Missing space after : in ${G}`);else X(b.start,"MISSING_CHAR",`Missing , or : between ${G} items`);let i=D?q(Z,D,b,X):b.found?$(Z,b.end,K,null,b,X):null;if(i){if(k$(D))X(i.range,"BLOCK_IN_FLOW",h$)}else if(b.comment)if(R.comment)R.comment+=`
70
- `+b.comment;else R.comment=b.comment;let W0=new LX.Pair(R,i);if(Z.options.keepSourceTokens)W0.srcToken=L;if(z){let S=H;if(MX.mapIncludes(Z,S.items,R))X(N,"DUPLICATE_KEY","Map keys must be unique");S.items.push(W0)}else{let S=new o9.YAMLMap(Z.schema);S.flow=!0,S.items.push(W0);let W2=(i??R).range;S.range=[R.range[0],W2[1],W2[2]],H.items.push(S)}Y=i?i.range[2]:b.end}}let B=z?"}":"]",[_,...O]=U.end,V=Y;if(_?.source===B)V=_.offset+_.source.length;else{let I=G[0].toUpperCase()+G.substring(1),L=W?`${I} must end with a ${B}`:`${I} in block collection must be sufficiently indented and end with a ${B}`;if(X(Y,W?"MISSING_CHAR":"BAD_INDENT",L),_&&_.source.length!==1)O.unshift(_)}if(O.length>0){let I=RX.resolveEnd(O,V,Z.options.strict,X);if(I.comment)if(H.comment)H.comment+=`
71
- `+I.comment;else H.comment=I.comment;H.range=[U.offset,V,I.offset]}else H.range=[U.offset,V,V];return H}DX.resolveFlowCollection=KX});var q1=F((yX)=>{var PX=P(),NX=C(),jX=e(),CX=q0(),bX=n9(),SX=r9(),EX=e9();function u$(q,$,Z,U,X,Q){let z=Z.type==="block-map"?bX.resolveBlockMap(q,$,Z,U,Q):Z.type==="block-seq"?SX.resolveBlockSeq(q,$,Z,U,Q):EX.resolveFlowCollection(q,$,Z,U,Q),G=z.constructor;if(X==="!"||X===G.tagName)return z.tag=G.tagName,z;if(X)z.tag=X;return z}function fX(q,$,Z,U,X){let Q=U.tag,z=!Q?null:$.directives.tagName(Q.source,(B)=>X(Q,"TAG_RESOLVE_FAILED",B));if(Z.type==="block-seq"){let{anchor:B,newlineAfterProp:_}=U,O=B&&Q?B.offset>Q.offset?B:Q:B??Q;if(O&&(!_||_.offset<O.offset))X(O,"MISSING_CHAR","Missing newline after block sequence props")}let G=Z.type==="block-map"?"map":Z.type==="block-seq"?"seq":Z.start.source==="{"?"map":"seq";if(!Q||!z||z==="!"||z===jX.YAMLMap.tagName&&G==="map"||z===CX.YAMLSeq.tagName&&G==="seq")return u$(q,$,Z,X,z);let J=$.schema.tags.find((B)=>B.tag===z&&B.collection===G);if(!J){let B=$.schema.knownTags[z];if(B?.collection===G)$.schema.tags.push(Object.assign({},B,{default:!1})),J=B;else{if(B)X(Q,"BAD_COLLECTION_TYPE",`${B.tag} used for ${G} collection, but expects ${B.collection??"scalar"}`,!0);else X(Q,"TAG_RESOLVE_FAILED",`Unresolved tag: ${z}`,!0);return u$(q,$,Z,X,z)}}let H=u$(q,$,Z,X,z,J),W=J.resolve?.(H,(B)=>X(Q,"TAG_RESOLVE_FAILED",B),$.options)??H,Y=PX.isNode(W)?W:new NX.Scalar(W);if(Y.range=H.range,Y.tag=z,J?.format)Y.format=J.format;return Y}yX.composeCollection=fX});var m$=F((uX)=>{var v$=C();function gX(q,$,Z){let U=$.offset,X=hX($,q.options.strict,Z);if(!X)return{value:"",type:null,comment:"",range:[U,U,U]};let Q=X.mode===">"?v$.Scalar.BLOCK_FOLDED:v$.Scalar.BLOCK_LITERAL,z=$.source?kX($.source):[],G=z.length;for(let V=z.length-1;V>=0;--V){let I=z[V][1];if(I===""||I==="\r")G=V;else break}if(G===0){let V=X.chomp==="+"&&z.length>0?`
72
- `.repeat(Math.max(1,z.length-1)):"",I=U+X.length;if($.source)I+=$.source.length;return{value:V,type:Q,comment:X.comment,range:[U,I,I]}}let J=$.indent+X.indent,H=$.offset+X.length,W=0;for(let V=0;V<G;++V){let[I,L]=z[V];if(L===""||L==="\r"){if(X.indent===0&&I.length>J)J=I.length}else{if(I.length<J)Z(H+I.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(X.indent===0)J=I.length;if(W=V,J===0&&!q.atRoot)Z(H,"BAD_INDENT","Block scalar values in collections must be indented");break}H+=I.length+L.length+1}for(let V=z.length-1;V>=G;--V)if(z[V][0].length>J)G=V+1;let Y="",B="",_=!1;for(let V=0;V<W;++V)Y+=z[V][0].slice(J)+`
73
- `;for(let V=W;V<G;++V){let[I,L]=z[V];H+=I.length+L.length+1;let A=L[L.length-1]==="\r";if(A)L=L.slice(0,-1);if(L&&I.length<J){let K=`Block scalar lines must not be less indented than their ${X.indent?"explicit indentation indicator":"first line"}`;Z(H-L.length-(A?2:1),"BAD_INDENT",K),I=""}if(Q===v$.Scalar.BLOCK_LITERAL)Y+=B+I.slice(J)+L,B=`
74
- `;else if(I.length>J||L[0]==="\t"){if(B===" ")B=`
75
- `;else if(!_&&B===`
76
- `)B=`
77
-
78
- `;Y+=B+I.slice(J)+L,B=`
79
- `,_=!0}else if(L==="")if(B===`
64
+ `}};G7.YAMLError=mq;G7.YAMLParseError=$9;G7.YAMLWarning=Z9;G7.prettifyError=J7});var t0=I((_7)=>{function W7(q,{flow:$,indicator:Z,next:X,offset:z,onError:U,parentIndent:Q,startOnNewline:J}){let G=!1,H=J,W=J,Y="",V="",T=!1,L=!1,F=null,_=null,O=null,A=null,R=null,M=null,w=null;for(let K of q){if(L){if(K.type!=="space"&&K.type!=="newline"&&K.type!=="comma")U(K.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");L=!1}if(F){if(H&&K.type!=="comment"&&K.type!=="newline")U(F,"TAB_AS_INDENT","Tabs are not allowed as indentation");F=null}switch(K.type){case"space":if(!$&&(Z!=="doc-start"||X?.type!=="flow-collection")&&K.source.includes("\t"))F=K;W=!0;break;case"comment":{if(!W)U(K,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let E=K.source.substring(1)||" ";if(!Y)Y=E;else Y+=V+E;V="",H=!1;break}case"newline":if(H){if(Y)Y+=K.source;else if(!M||Z!=="seq-item-ind")G=!0}else V+=K.source;if(H=!0,T=!0,_||O)A=K;W=!0;break;case"anchor":if(_)U(K,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(K.source.endsWith(":"))U(K.offset+K.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);_=K,w??(w=K.offset),H=!1,W=!1,L=!0;break;case"tag":{if(O)U(K,"MULTIPLE_TAGS","A node can have at most one tag");O=K,w??(w=K.offset),H=!1,W=!1,L=!0;break}case Z:if(_||O)U(K,"BAD_PROP_ORDER",`Anchors and tags must be after the ${K.source} indicator`);if(M)U(K,"UNEXPECTED_TOKEN",`Unexpected ${K.source} in ${$??"collection"}`);M=K,H=Z==="seq-item-ind"||Z==="explicit-key-ind",W=!1;break;case"comma":if($){if(R)U(K,"UNEXPECTED_TOKEN",`Unexpected , in ${$}`);R=K,H=!1,W=!1;break}default:U(K,"UNEXPECTED_TOKEN",`Unexpected ${K.type} token`),H=!1,W=!1}}let P=q[q.length-1],j=P?P.offset+P.source.length:z;if(L&&X&&X.type!=="space"&&X.type!=="newline"&&X.type!=="comma"&&(X.type!=="scalar"||X.source!==""))U(X.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(F&&(H&&F.indent<=Q||X?.type==="block-map"||X?.type==="block-seq"))U(F,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:R,found:M,spaceBefore:G,comment:Y,hasNewline:T,anchor:_,tag:O,newlineAfterProp:A,end:j,start:w??j}}_7.resolveProps=W7});var dq=I((T7)=>{function n$(q){if(!q)return null;switch(q.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(q.source.includes(`
65
+ `))return!0;if(q.end){for(let $ of q.end)if($.type==="newline")return!0}return!1;case"flow-collection":for(let $ of q.items){for(let Z of $.start)if(Z.type==="newline")return!0;if($.sep){for(let Z of $.sep)if(Z.type==="newline")return!0}if(n$($.key)||n$($.value))return!0}return!1;default:return!0}}T7.containsNewline=n$});var o$=I((R7)=>{var O7=dq();function I7(q,$,Z){if($?.type==="flow-collection"){let X=$.end[0];if(X.indent===q&&(X.source==="]"||X.source==="}")&&O7.containsNewline($))Z(X,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}R7.flowIndentCheck=I7});var r$=I((M7)=>{var X9=N();function K7(q,$,Z){let{uniqueKeys:X}=q.options;if(X===!1)return!1;let z=typeof X==="function"?X:(U,Q)=>U===Q||X9.isScalar(U)&&X9.isScalar(Q)&&U.value===Q.value;return $.some((U)=>z(U.key,Z))}M7.mapIncludes=K7});var G9=I((b7)=>{var z9=Z0(),w7=z0(),U9=t0(),P7=dq(),Q9=o$(),N7=r$(),J9="All mapping items must start at the same column";function j7({composeNode:q,composeEmptyNode:$},Z,X,z,U){let J=new(U?.nodeClass??w7.YAMLMap)(Z.schema);if(Z.atRoot)Z.atRoot=!1;let G=X.offset,H=null;for(let W of X.items){let{start:Y,key:V,sep:T,value:L}=W,F=U9.resolveProps(Y,{indicator:"explicit-key-ind",next:V??T?.[0],offset:G,onError:z,parentIndent:X.indent,startOnNewline:!0}),_=!F.found;if(_){if(V){if(V.type==="block-seq")z(G,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in V&&V.indent!==X.indent)z(G,"BAD_INDENT",J9)}if(!F.anchor&&!F.tag&&!T){if(H=F.end,F.comment)if(J.comment)J.comment+=`
66
+ `+F.comment;else J.comment=F.comment;continue}if(F.newlineAfterProp||P7.containsNewline(V))z(V??Y[Y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(F.found?.indent!==X.indent)z(G,"BAD_INDENT",J9);Z.atKey=!0;let O=F.end,A=V?q(Z,V,F,z):$(Z,O,Y,null,F,z);if(Z.schema.compat)Q9.flowIndentCheck(X.indent,V,z);if(Z.atKey=!1,N7.mapIncludes(Z,J.items,A))z(O,"DUPLICATE_KEY","Map keys must be unique");let R=U9.resolveProps(T??[],{indicator:"map-value-ind",next:L,offset:A.range[2],onError:z,parentIndent:X.indent,startOnNewline:!V||V.type==="block-scalar"});if(G=R.end,R.found){if(_){if(L?.type==="block-map"&&!R.hasNewline)z(G,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(Z.options.strict&&F.start<R.found.offset-1024)z(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let M=L?q(Z,L,R,z):$(Z,G,T,null,R,z);if(Z.schema.compat)Q9.flowIndentCheck(X.indent,L,z);G=M.range[2];let w=new z9.Pair(A,M);if(Z.options.keepSourceTokens)w.srcToken=W;J.items.push(w)}else{if(_)z(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(R.comment)if(A.comment)A.comment+=`
67
+ `+R.comment;else A.comment=R.comment;let M=new z9.Pair(A);if(Z.options.keepSourceTokens)M.srcToken=W;J.items.push(M)}}if(H&&H<G)z(H,"IMPOSSIBLE","Map comment with trailing content");return J.range=[X.offset,G,H??G],J}b7.resolveBlockMap=j7});var H9=I((x7)=>{var S7=U0(),E7=t0(),f7=o$();function y7({composeNode:q,composeEmptyNode:$},Z,X,z,U){let J=new(U?.nodeClass??S7.YAMLSeq)(Z.schema);if(Z.atRoot)Z.atRoot=!1;if(Z.atKey)Z.atKey=!1;let G=X.offset,H=null;for(let{start:W,value:Y}of X.items){let V=E7.resolveProps(W,{indicator:"seq-item-ind",next:Y,offset:G,onError:z,parentIndent:X.indent,startOnNewline:!0});if(!V.found)if(V.anchor||V.tag||Y)if(Y?.type==="block-seq")z(V.end,"BAD_INDENT","All sequence items must start at the same column");else z(G,"MISSING_CHAR","Sequence item without - indicator");else{if(H=V.end,V.comment)J.comment=V.comment;continue}let T=Y?q(Z,Y,V,z):$(Z,V.end,W,null,V,z);if(Z.schema.compat)f7.flowIndentCheck(X.indent,Y,z);G=T.range[2],J.items.push(T)}return J.range=[X.offset,G,H??G],J}x7.resolveBlockSeq=y7});var b0=I((h7)=>{function k7(q,$,Z,X){let z="";if(q){let U=!1,Q="";for(let J of q){let{source:G,type:H}=J;switch(H){case"space":U=!0;break;case"comment":{if(Z&&!U)X(J,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let W=G.substring(1)||" ";if(!z)z=W;else z+=Q+W;Q="";break}case"newline":if(z)Q+=G;U=!0;break;default:X(J,"UNEXPECTED_TOKEN",`Unexpected ${H} at node end`)}$+=G.length}}return{comment:z,offset:$}}h7.resolveEnd=k7});var B9=I((a7)=>{var v7=N(),m7=Z0(),Y9=z0(),d7=U0(),p7=b0(),V9=t0(),l7=dq(),c7=r$(),t$="Block collections are not allowed within flow collections",e$=(q)=>q&&(q.type==="block-map"||q.type==="block-seq");function i7({composeNode:q,composeEmptyNode:$},Z,X,z,U){let Q=X.start.source==="{",J=Q?"flow map":"flow sequence",H=new(U?.nodeClass??(Q?Y9.YAMLMap:d7.YAMLSeq))(Z.schema);H.flow=!0;let W=Z.atRoot;if(W)Z.atRoot=!1;if(Z.atKey)Z.atKey=!1;let Y=X.offset+X.start.source.length;for(let _=0;_<X.items.length;++_){let O=X.items[_],{start:A,key:R,sep:M,value:w}=O,P=V9.resolveProps(A,{flow:J,indicator:"explicit-key-ind",next:R??M?.[0],offset:Y,onError:z,parentIndent:X.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!M&&!w){if(_===0&&P.comma)z(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${J}`);else if(_<X.items.length-1)z(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${J}`);if(P.comment)if(H.comment)H.comment+=`
68
+ `+P.comment;else H.comment=P.comment;Y=P.end;continue}if(!Q&&Z.options.strict&&l7.containsNewline(R))z(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0){if(P.comma)z(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${J}`)}else{if(!P.comma)z(P.start,"MISSING_CHAR",`Missing , between ${J} items`);if(P.comment){let j="";q:for(let K of A)switch(K.type){case"comma":case"space":break;case"comment":j=K.source.substring(1);break q;default:break q}if(j){let K=H.items[H.items.length-1];if(v7.isPair(K))K=K.value??K.key;if(K.comment)K.comment+=`
69
+ `+j;else K.comment=j;P.comment=P.comment.substring(j.length+1)}}}if(!Q&&!M&&!P.found){let j=w?q(Z,w,P,z):$(Z,P.end,M,null,P,z);if(H.items.push(j),Y=j.range[2],e$(w))z(j.range,"BLOCK_IN_FLOW",t$)}else{Z.atKey=!0;let j=P.end,K=R?q(Z,R,P,z):$(Z,j,A,null,P,z);if(e$(R))z(K.range,"BLOCK_IN_FLOW",t$);Z.atKey=!1;let E=V9.resolveProps(M??[],{flow:J,indicator:"map-value-ind",next:w,offset:K.range[2],onError:z,parentIndent:X.indent,startOnNewline:!1});if(E.found){if(!Q&&!P.found&&Z.options.strict){if(M)for(let C of M){if(C===E.found)break;if(C.type==="newline"){z(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(P.start<E.found.offset-1024)z(E.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(w)if("source"in w&&w.source?.[0]===":")z(w,"MISSING_CHAR",`Missing space after : in ${J}`);else z(E.start,"MISSING_CHAR",`Missing , or : between ${J} items`);let b=w?q(Z,w,E,z):E.found?$(Z,E.end,M,null,E,z):null;if(b){if(e$(w))z(b.range,"BLOCK_IN_FLOW",t$)}else if(E.comment)if(K.comment)K.comment+=`
70
+ `+E.comment;else K.comment=E.comment;let u=new m7.Pair(K,b);if(Z.options.keepSourceTokens)u.srcToken=O;if(Q){let C=H;if(c7.mapIncludes(Z,C.items,K))z(j,"DUPLICATE_KEY","Map keys must be unique");C.items.push(u)}else{let C=new Y9.YAMLMap(Z.schema);C.flow=!0,C.items.push(u);let s=(b??K).range;C.range=[K.range[0],s[1],s[2]],H.items.push(C)}Y=b?b.range[2]:E.end}}let V=Q?"}":"]",[T,...L]=X.end,F=Y;if(T?.source===V)F=T.offset+T.source.length;else{let _=J[0].toUpperCase()+J.substring(1),O=W?`${_} must end with a ${V}`:`${_} in block collection must be sufficiently indented and end with a ${V}`;if(z(Y,W?"MISSING_CHAR":"BAD_INDENT",O),T&&T.source.length!==1)L.unshift(T)}if(L.length>0){let _=p7.resolveEnd(L,F,Z.options.strict,z);if(_.comment)if(H.comment)H.comment+=`
71
+ `+_.comment;else H.comment=_.comment;H.range=[X.offset,F,_.offset]}else H.range=[X.offset,F,F];return H}a7.resolveFlowCollection=i7});var W9=I((XX)=>{var n7=N(),o7=f(),r7=z0(),t7=U0(),e7=G9(),qX=H9(),$X=B9();function q2(q,$,Z,X,z,U){let Q=Z.type==="block-map"?e7.resolveBlockMap(q,$,Z,X,U):Z.type==="block-seq"?qX.resolveBlockSeq(q,$,Z,X,U):$X.resolveFlowCollection(q,$,Z,X,U),J=Q.constructor;if(z==="!"||z===J.tagName)return Q.tag=J.tagName,Q;if(z)Q.tag=z;return Q}function ZX(q,$,Z,X,z){let U=X.tag,Q=!U?null:$.directives.tagName(U.source,(V)=>z(U,"TAG_RESOLVE_FAILED",V));if(Z.type==="block-seq"){let{anchor:V,newlineAfterProp:T}=X,L=V&&U?V.offset>U.offset?V:U:V??U;if(L&&(!T||T.offset<L.offset))z(L,"MISSING_CHAR","Missing newline after block sequence props")}let J=Z.type==="block-map"?"map":Z.type==="block-seq"?"seq":Z.start.source==="{"?"map":"seq";if(!U||!Q||Q==="!"||Q===r7.YAMLMap.tagName&&J==="map"||Q===t7.YAMLSeq.tagName&&J==="seq")return q2(q,$,Z,z,Q);let G=$.schema.tags.find((V)=>V.tag===Q&&V.collection===J);if(!G){let V=$.schema.knownTags[Q];if(V?.collection===J)$.schema.tags.push(Object.assign({},V,{default:!1})),G=V;else{if(V)z(U,"BAD_COLLECTION_TYPE",`${V.tag} used for ${J} collection, but expects ${V.collection??"scalar"}`,!0);else z(U,"TAG_RESOLVE_FAILED",`Unresolved tag: ${Q}`,!0);return q2(q,$,Z,z,Q)}}let H=q2(q,$,Z,z,Q,G),W=G.resolve?.(H,(V)=>z(U,"TAG_RESOLVE_FAILED",V),$.options)??H,Y=n7.isNode(W)?W:new o7.Scalar(W);if(Y.range=H.range,Y.tag=Q,G?.format)Y.format=G.format;return Y}XX.composeCollection=ZX});var Z2=I((GX)=>{var $2=f();function UX(q,$,Z){let X=$.offset,z=QX($,q.options.strict,Z);if(!z)return{value:"",type:null,comment:"",range:[X,X,X]};let U=z.mode===">"?$2.Scalar.BLOCK_FOLDED:$2.Scalar.BLOCK_LITERAL,Q=$.source?JX($.source):[],J=Q.length;for(let F=Q.length-1;F>=0;--F){let _=Q[F][1];if(_===""||_==="\r")J=F;else break}if(J===0){let F=z.chomp==="+"&&Q.length>0?`
72
+ `.repeat(Math.max(1,Q.length-1)):"",_=X+z.length;if($.source)_+=$.source.length;return{value:F,type:U,comment:z.comment,range:[X,_,_]}}let G=$.indent+z.indent,H=$.offset+z.length,W=0;for(let F=0;F<J;++F){let[_,O]=Q[F];if(O===""||O==="\r"){if(z.indent===0&&_.length>G)G=_.length}else{if(_.length<G)Z(H+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(z.indent===0)G=_.length;if(W=F,G===0&&!q.atRoot)Z(H,"BAD_INDENT","Block scalar values in collections must be indented");break}H+=_.length+O.length+1}for(let F=Q.length-1;F>=J;--F)if(Q[F][0].length>G)J=F+1;let Y="",V="",T=!1;for(let F=0;F<W;++F)Y+=Q[F][0].slice(G)+`
73
+ `;for(let F=W;F<J;++F){let[_,O]=Q[F];H+=_.length+O.length+1;let A=O[O.length-1]==="\r";if(A)O=O.slice(0,-1);if(O&&_.length<G){let M=`Block scalar lines must not be less indented than their ${z.indent?"explicit indentation indicator":"first line"}`;Z(H-O.length-(A?2:1),"BAD_INDENT",M),_=""}if(U===$2.Scalar.BLOCK_LITERAL)Y+=V+_.slice(G)+O,V=`
74
+ `;else if(_.length>G||O[0]==="\t"){if(V===" ")V=`
75
+ `;else if(!T&&V===`
76
+ `)V=`
77
+
78
+ `;Y+=V+_.slice(G)+O,V=`
79
+ `,T=!0}else if(O==="")if(V===`
80
80
  `)Y+=`
81
- `;else B=`
82
- `;else Y+=B+L,B=" ",_=!1}switch(X.chomp){case"-":break;case"+":for(let V=G;V<z.length;++V)Y+=`
83
- `+z[V][0].slice(J);if(Y[Y.length-1]!==`
81
+ `;else V=`
82
+ `;else Y+=V+O,V=" ",T=!1}switch(z.chomp){case"-":break;case"+":for(let F=J;F<Q.length;++F)Y+=`
83
+ `+Q[F][0].slice(G);if(Y[Y.length-1]!==`
84
84
  `)Y+=`
85
85
  `;break;default:Y+=`
86
- `}let O=U+X.length+$.source.length;return{value:Y,type:Q,comment:X.comment,range:[U,O,O]}}function hX({offset:q,props:$},Z,U){if($[0].type!=="block-scalar-header")return U($[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:X}=$[0],Q=X[0],z=0,G="",J=-1;for(let B=1;B<X.length;++B){let _=X[B];if(!G&&(_==="-"||_==="+"))G=_;else{let O=Number(_);if(!z&&O)z=O;else if(J===-1)J=q+B}}if(J!==-1)U(J,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${X}`);let H=!1,W="",Y=X.length;for(let B=1;B<$.length;++B){let _=$[B];switch(_.type){case"space":H=!0;case"newline":Y+=_.source.length;break;case"comment":if(Z&&!H)U(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");Y+=_.source.length,W=_.source.substring(1);break;case"error":U(_,"UNEXPECTED_TOKEN",_.message),Y+=_.source.length;break;default:{let O=`Unexpected token in block scalar header: ${_.type}`;U(_,"UNEXPECTED_TOKEN",O);let V=_.source;if(V&&typeof V==="string")Y+=V.length}}}return{mode:Q,indent:z,chomp:G,comment:W,length:Y}}function kX(q){let $=q.split(/\n( *)/),Z=$[0],U=Z.match(/^( *)/),Q=[U?.[1]?[U[1],Z.slice(U[1].length)]:["",Z]];for(let z=1;z<$.length;z+=2)Q.push([$[z],$[z+1]]);return Q}uX.resolveBlockScalar=gX});var d$=F((nX)=>{var p$=C(),mX=D0();function pX(q,$,Z){let{offset:U,type:X,source:Q,end:z}=q,G,J,H=(B,_,O)=>Z(U+B,_,O);switch(X){case"scalar":G=p$.Scalar.PLAIN,J=dX(Q,H);break;case"single-quoted-scalar":G=p$.Scalar.QUOTE_SINGLE,J=lX(Q,H);break;case"double-quoted-scalar":G=p$.Scalar.QUOTE_DOUBLE,J=cX(Q,H);break;default:return Z(q,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${X}`),{value:"",type:null,comment:"",range:[U,U+Q.length,U+Q.length]}}let W=U+Q.length,Y=mX.resolveEnd(z,W,$,Z);return{value:J,type:G,comment:Y.comment,range:[U,W,Y.offset]}}function dX(q,$){let Z="";switch(q[0]){case"\t":Z="a tab character";break;case",":Z="flow indicator character ,";break;case"%":Z="directive indicator character %";break;case"|":case">":{Z=`block scalar indicator ${q[0]}`;break}case"@":case"`":{Z=`reserved character ${q[0]}`;break}}if(Z)$(0,"BAD_SCALAR_START",`Plain value cannot start with ${Z}`);return $1(q)}function lX(q,$){if(q[q.length-1]!=="'"||q.length===1)$(q.length,"MISSING_CHAR","Missing closing 'quote");return $1(q.slice(1,-1)).replace(/''/g,"'")}function $1(q){let $,Z;try{$=new RegExp(`(.*?)(?<![ ])[ ]*\r?
86
+ `}let L=X+z.length+$.source.length;return{value:Y,type:U,comment:z.comment,range:[X,L,L]}}function QX({offset:q,props:$},Z,X){if($[0].type!=="block-scalar-header")return X($[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:z}=$[0],U=z[0],Q=0,J="",G=-1;for(let V=1;V<z.length;++V){let T=z[V];if(!J&&(T==="-"||T==="+"))J=T;else{let L=Number(T);if(!Q&&L)Q=L;else if(G===-1)G=q+V}}if(G!==-1)X(G,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${z}`);let H=!1,W="",Y=z.length;for(let V=1;V<$.length;++V){let T=$[V];switch(T.type){case"space":H=!0;case"newline":Y+=T.source.length;break;case"comment":if(Z&&!H)X(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");Y+=T.source.length,W=T.source.substring(1);break;case"error":X(T,"UNEXPECTED_TOKEN",T.message),Y+=T.source.length;break;default:{let L=`Unexpected token in block scalar header: ${T.type}`;X(T,"UNEXPECTED_TOKEN",L);let F=T.source;if(F&&typeof F==="string")Y+=F.length}}}return{mode:U,indent:Q,chomp:J,comment:W,length:Y}}function JX(q){let $=q.split(/\n( *)/),Z=$[0],X=Z.match(/^( *)/),U=[X?.[1]?[X[1],Z.slice(X[1].length)]:["",Z]];for(let Q=1;Q<$.length;Q+=2)U.push([$[Q],$[Q+1]]);return U}GX.resolveBlockScalar=UX});var z2=I((OX)=>{var X2=f(),YX=b0();function VX(q,$,Z){let{offset:X,type:z,source:U,end:Q}=q,J,G,H=(V,T,L)=>Z(X+V,T,L);switch(z){case"scalar":J=X2.Scalar.PLAIN,G=BX(U,H);break;case"single-quoted-scalar":J=X2.Scalar.QUOTE_SINGLE,G=WX(U,H);break;case"double-quoted-scalar":J=X2.Scalar.QUOTE_DOUBLE,G=_X(U,H);break;default:return Z(q,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${z}`),{value:"",type:null,comment:"",range:[X,X+U.length,X+U.length]}}let W=X+U.length,Y=YX.resolveEnd(Q,W,$,Z);return{value:G,type:J,comment:Y.comment,range:[X,W,Y.offset]}}function BX(q,$){let Z="";switch(q[0]){case"\t":Z="a tab character";break;case",":Z="flow indicator character ,";break;case"%":Z="directive indicator character %";break;case"|":case">":{Z=`block scalar indicator ${q[0]}`;break}case"@":case"`":{Z=`reserved character ${q[0]}`;break}}if(Z)$(0,"BAD_SCALAR_START",`Plain value cannot start with ${Z}`);return _9(q)}function WX(q,$){if(q[q.length-1]!=="'"||q.length===1)$(q.length,"MISSING_CHAR","Missing closing 'quote");return _9(q.slice(1,-1)).replace(/''/g,"'")}function _9(q){let $,Z;try{$=new RegExp(`(.*?)(?<![ ])[ ]*\r?
87
87
  `,"sy"),Z=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
88
- `,"sy")}catch{$=/(.*?)[ \t]*\r?\n/sy,Z=/[ \t]*(.*?)[ \t]*\r?\n/sy}let U=$.exec(q);if(!U)return q;let X=U[1],Q=" ",z=$.lastIndex;Z.lastIndex=z;while(U=Z.exec(q)){if(U[1]==="")if(Q===`
89
- `)X+=Q;else Q=`
90
- `;else X+=Q+U[1],Q=" ";z=Z.lastIndex}let G=/[ \t]*(.*)/sy;return G.lastIndex=z,U=G.exec(q),X+Q+(U?.[1]??"")}function cX(q,$){let Z="";for(let U=1;U<q.length-1;++U){let X=q[U];if(X==="\r"&&q[U+1]===`
91
- `)continue;if(X===`
92
- `){let{fold:Q,offset:z}=aX(q,U);Z+=Q,U=z}else if(X==="\\"){let Q=q[++U],z=iX[Q];if(z)Z+=z;else if(Q===`
93
- `){Q=q[U+1];while(Q===" "||Q==="\t")Q=q[++U+1]}else if(Q==="\r"&&q[U+1]===`
94
- `){Q=q[++U+1];while(Q===" "||Q==="\t")Q=q[++U+1]}else if(Q==="x"||Q==="u"||Q==="U"){let G={x:2,u:4,U:8}[Q];Z+=sX(q,U+1,G,$),U+=G}else{let G=q.substr(U-1,2);$(U-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${G}`),Z+=G}}else if(X===" "||X==="\t"){let Q=U,z=q[U+1];while(z===" "||z==="\t")z=q[++U+1];if(z!==`
95
- `&&!(z==="\r"&&q[U+2]===`
96
- `))Z+=U>Q?q.slice(Q,U+1):X}else Z+=X}if(q[q.length-1]!=='"'||q.length===1)$(q.length,"MISSING_CHAR",'Missing closing "quote');return Z}function aX(q,$){let Z="",U=q[$+1];while(U===" "||U==="\t"||U===`
97
- `||U==="\r"){if(U==="\r"&&q[$+2]!==`
98
- `)break;if(U===`
88
+ `,"sy")}catch{$=/(.*?)[ \t]*\r?\n/sy,Z=/[ \t]*(.*?)[ \t]*\r?\n/sy}let X=$.exec(q);if(!X)return q;let z=X[1],U=" ",Q=$.lastIndex;Z.lastIndex=Q;while(X=Z.exec(q)){if(X[1]==="")if(U===`
89
+ `)z+=U;else U=`
90
+ `;else z+=U+X[1],U=" ";Q=Z.lastIndex}let J=/[ \t]*(.*)/sy;return J.lastIndex=Q,X=J.exec(q),z+U+(X?.[1]??"")}function _X(q,$){let Z="";for(let X=1;X<q.length-1;++X){let z=q[X];if(z==="\r"&&q[X+1]===`
91
+ `)continue;if(z===`
92
+ `){let{fold:U,offset:Q}=FX(q,X);Z+=U,X=Q}else if(z==="\\"){let U=q[++X],Q=TX[U];if(Q)Z+=Q;else if(U===`
93
+ `){U=q[X+1];while(U===" "||U==="\t")U=q[++X+1]}else if(U==="\r"&&q[X+1]===`
94
+ `){U=q[++X+1];while(U===" "||U==="\t")U=q[++X+1]}else if(U==="x"||U==="u"||U==="U"){let J={x:2,u:4,U:8}[U];Z+=LX(q,X+1,J,$),X+=J}else{let J=q.substr(X-1,2);$(X-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${J}`),Z+=J}}else if(z===" "||z==="\t"){let U=X,Q=q[X+1];while(Q===" "||Q==="\t")Q=q[++X+1];if(Q!==`
95
+ `&&!(Q==="\r"&&q[X+2]===`
96
+ `))Z+=X>U?q.slice(U,X+1):z}else Z+=z}if(q[q.length-1]!=='"'||q.length===1)$(q.length,"MISSING_CHAR",'Missing closing "quote');return Z}function FX(q,$){let Z="",X=q[$+1];while(X===" "||X==="\t"||X===`
97
+ `||X==="\r"){if(X==="\r"&&q[$+2]!==`
98
+ `)break;if(X===`
99
99
  `)Z+=`
100
- `;$+=1,U=q[$+1]}if(!Z)Z=" ";return{fold:Z,offset:$}}var iX={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
101
- `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function sX(q,$,Z,U){let X=q.substr($,Z),z=X.length===Z&&/^[0-9a-fA-F]+$/.test(X)?parseInt(X,16):NaN;if(isNaN(z)){let G=q.substr($-2,Z+2);return U($-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${G}`),G}return String.fromCodePoint(z)}nX.resolveFlowScalar=pX});var U1=F((Z3)=>{var Y0=P(),Z1=C(),oX=m$(),tX=d$();function eX(q,$,Z,U){let{value:X,type:Q,comment:z,range:G}=$.type==="block-scalar"?oX.resolveBlockScalar(q,$,U):tX.resolveFlowScalar($,q.options.strict,U),J=Z?q.directives.tagName(Z.source,(Y)=>U(Z,"TAG_RESOLVE_FAILED",Y)):null,H;if(q.options.stringKeys&&q.atKey)H=q.schema[Y0.SCALAR];else if(J)H=q3(q.schema,X,J,Z,U);else if($.type==="scalar")H=$3(q,X,$,U);else H=q.schema[Y0.SCALAR];let W;try{let Y=H.resolve(X,(B)=>U(Z??$,"TAG_RESOLVE_FAILED",B),q.options);W=Y0.isScalar(Y)?Y:new Z1.Scalar(Y)}catch(Y){let B=Y instanceof Error?Y.message:String(Y);U(Z??$,"TAG_RESOLVE_FAILED",B),W=new Z1.Scalar(X)}if(W.range=G,W.source=X,Q)W.type=Q;if(J)W.tag=J;if(H.format)W.format=H.format;if(z)W.comment=z;return W}function q3(q,$,Z,U,X){if(Z==="!")return q[Y0.SCALAR];let Q=[];for(let G of q.tags)if(!G.collection&&G.tag===Z)if(G.default&&G.test)Q.push(G);else return G;for(let G of Q)if(G.test?.test($))return G;let z=q.knownTags[Z];if(z&&!z.collection)return q.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return X(U,"TAG_RESOLVE_FAILED",`Unresolved tag: ${Z}`,Z!=="tag:yaml.org,2002:str"),q[Y0.SCALAR]}function $3({atKey:q,directives:$,schema:Z},U,X,Q){let z=Z.tags.find((G)=>(G.default===!0||q&&G.default==="key")&&G.test?.test(U))||Z[Y0.SCALAR];if(Z.compat){let G=Z.compat.find((J)=>J.default&&J.test?.test(U))??Z[Y0.SCALAR];if(z.tag!==G.tag){let J=$.tagString(z.tag),H=$.tagString(G.tag),W=`Value may be parsed as either ${J} or ${H}`;Q(X,"TAG_RESOLVE_FAILED",W,!0)}}return z}Z3.composeScalar=eX});var X1=F((Q3)=>{function X3(q,$,Z){if($){Z??(Z=$.length);for(let U=Z-1;U>=0;--U){let X=$[U];switch(X.type){case"space":case"comment":case"newline":q-=X.source.length;continue}X=$[++U];while(X?.type==="space")q+=X.source.length,X=$[++U];break}}return q}Q3.emptyScalarPosition=X3});var G1=F((T3)=>{var G3=j0(),J3=P(),H3=q1(),Q1=U1(),Y3=D0(),B3=X1(),V3={composeNode:z1,composeEmptyNode:l$};function z1(q,$,Z,U){let X=q.atKey,{spaceBefore:Q,comment:z,anchor:G,tag:J}=Z,H,W=!0;switch($.type){case"alias":if(H=W3(q,$,U),G||J)U($,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(H=Q1.composeScalar(q,$,J,U),G)H.anchor=G.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(H=H3.composeCollection(V3,q,$,Z,U),G)H.anchor=G.source.substring(1);break;default:{let Y=$.type==="error"?$.message:`Unsupported token (type: ${$.type})`;U($,"UNEXPECTED_TOKEN",Y),H=l$(q,$.offset,void 0,null,Z,U),W=!1}}if(G&&H.anchor==="")U(G,"BAD_ALIAS","Anchor cannot be an empty string");if(X&&q.options.stringKeys&&(!J3.isScalar(H)||typeof H.value!=="string"||H.tag&&H.tag!=="tag:yaml.org,2002:str"))U(J??$,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(Q)H.spaceBefore=!0;if(z)if($.type==="scalar"&&$.source==="")H.comment=z;else H.commentBefore=z;if(q.options.keepSourceTokens&&W)H.srcToken=$;return H}function l$(q,$,Z,U,{spaceBefore:X,comment:Q,anchor:z,tag:G,end:J},H){let W={type:"scalar",offset:B3.emptyScalarPosition($,Z,U),indent:-1,source:""},Y=Q1.composeScalar(q,W,G,H);if(z){if(Y.anchor=z.source.substring(1),Y.anchor==="")H(z,"BAD_ALIAS","Anchor cannot be an empty string")}if(X)Y.spaceBefore=!0;if(Q)Y.comment=Q,Y.range[2]=J;return Y}function W3({options:q},{offset:$,source:Z,end:U},X){let Q=new G3.Alias(Z.substring(1));if(Q.source==="")X($,"BAD_ALIAS","Alias cannot be an empty string");if(Q.source.endsWith(":"))X($+Z.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=$+Z.length,G=Y3.resolveEnd(U,z,q.strict,X);if(Q.range=[$,z,G.offset],G.comment)Q.comment=G.comment;return Q}T3.composeEmptyNode=l$;T3.composeNode=z1});var H1=F((A3)=>{var I3=d0(),J1=G1(),L3=D0(),F3=c0();function R3(q,$,{offset:Z,start:U,value:X,end:Q},z){let G=Object.assign({_directives:$},q),J=new I3.Document(void 0,G),H={atKey:!1,atRoot:!0,directives:J.directives,options:J.options,schema:J.schema},W=F3.resolveProps(U,{indicator:"doc-start",next:X??Q?.[0],offset:Z,onError:z,parentIndent:0,startOnNewline:!0});if(W.found){if(J.directives.docStart=!0,X&&(X.type==="block-map"||X.type==="block-seq")&&!W.hasNewline)z(W.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}J.contents=X?J1.composeNode(H,X,W,z):J1.composeEmptyNode(H,W.end,U,null,W,z);let Y=J.contents.range[2],B=L3.resolveEnd(Q,Y,!1,z);if(B.comment)J.comment=B.comment;return J.range=[Z,Y,B.offset],J}A3.composeDoc=R3});var c$=F((j3)=>{var K3=y("process"),D3=nq(),w3=d0(),a0=l0(),Y1=P(),P3=H1(),N3=D0();function i0(q){if(typeof q==="number")return[q,q+1];if(Array.isArray(q))return q.length===2?q:[q[0],q[1]];let{offset:$,source:Z}=q;return[$,$+(typeof Z==="string"?Z.length:1)]}function B1(q){let $="",Z=!1,U=!1;for(let X=0;X<q.length;++X){let Q=q[X];switch(Q[0]){case"#":$+=($===""?"":U?`
100
+ `;$+=1,X=q[$+1]}if(!Z)Z=" ";return{fold:Z,offset:$}}var TX={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
101
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function LX(q,$,Z,X){let z=q.substr($,Z),Q=z.length===Z&&/^[0-9a-fA-F]+$/.test(z)?parseInt(z,16):NaN;if(isNaN(Q)){let J=q.substr($-2,Z+2);return X($-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${J}`),J}return String.fromCodePoint(Q)}OX.resolveFlowScalar=VX});var T9=I((wX)=>{var _0=N(),F9=f(),RX=Z2(),AX=z2();function KX(q,$,Z,X){let{value:z,type:U,comment:Q,range:J}=$.type==="block-scalar"?RX.resolveBlockScalar(q,$,X):AX.resolveFlowScalar($,q.options.strict,X),G=Z?q.directives.tagName(Z.source,(Y)=>X(Z,"TAG_RESOLVE_FAILED",Y)):null,H;if(q.options.stringKeys&&q.atKey)H=q.schema[_0.SCALAR];else if(G)H=MX(q.schema,z,G,Z,X);else if($.type==="scalar")H=DX(q,z,$,X);else H=q.schema[_0.SCALAR];let W;try{let Y=H.resolve(z,(V)=>X(Z??$,"TAG_RESOLVE_FAILED",V),q.options);W=_0.isScalar(Y)?Y:new F9.Scalar(Y)}catch(Y){let V=Y instanceof Error?Y.message:String(Y);X(Z??$,"TAG_RESOLVE_FAILED",V),W=new F9.Scalar(z)}if(W.range=J,W.source=z,U)W.type=U;if(G)W.tag=G;if(H.format)W.format=H.format;if(Q)W.comment=Q;return W}function MX(q,$,Z,X,z){if(Z==="!")return q[_0.SCALAR];let U=[];for(let J of q.tags)if(!J.collection&&J.tag===Z)if(J.default&&J.test)U.push(J);else return J;for(let J of U)if(J.test?.test($))return J;let Q=q.knownTags[Z];if(Q&&!Q.collection)return q.tags.push(Object.assign({},Q,{default:!1,test:void 0})),Q;return z(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${Z}`,Z!=="tag:yaml.org,2002:str"),q[_0.SCALAR]}function DX({atKey:q,directives:$,schema:Z},X,z,U){let Q=Z.tags.find((J)=>(J.default===!0||q&&J.default==="key")&&J.test?.test(X))||Z[_0.SCALAR];if(Z.compat){let J=Z.compat.find((G)=>G.default&&G.test?.test(X))??Z[_0.SCALAR];if(Q.tag!==J.tag){let G=$.tagString(Q.tag),H=$.tagString(J.tag),W=`Value may be parsed as either ${G} or ${H}`;U(z,"TAG_RESOLVE_FAILED",W,!0)}}return Q}wX.composeScalar=KX});var L9=I((jX)=>{function NX(q,$,Z){if($){Z??(Z=$.length);for(let X=Z-1;X>=0;--X){let z=$[X];switch(z.type){case"space":case"comment":case"newline":q-=z.source.length;continue}z=$[++X];while(z?.type==="space")q+=z.source.length,z=$[++X];break}}return q}jX.emptyScalarPosition=NX});var R9=I((kX)=>{var CX=x0(),SX=N(),EX=W9(),O9=T9(),fX=b0(),yX=L9(),xX={composeNode:I9,composeEmptyNode:U2};function I9(q,$,Z,X){let z=q.atKey,{spaceBefore:U,comment:Q,anchor:J,tag:G}=Z,H,W=!0;switch($.type){case"alias":if(H=gX(q,$,X),J||G)X($,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(H=O9.composeScalar(q,$,G,X),J)H.anchor=J.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(H=EX.composeCollection(xX,q,$,Z,X),J)H.anchor=J.source.substring(1);break;default:{let Y=$.type==="error"?$.message:`Unsupported token (type: ${$.type})`;X($,"UNEXPECTED_TOKEN",Y),H=U2(q,$.offset,void 0,null,Z,X),W=!1}}if(J&&H.anchor==="")X(J,"BAD_ALIAS","Anchor cannot be an empty string");if(z&&q.options.stringKeys&&(!SX.isScalar(H)||typeof H.value!=="string"||H.tag&&H.tag!=="tag:yaml.org,2002:str"))X(G??$,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(U)H.spaceBefore=!0;if(Q)if($.type==="scalar"&&$.source==="")H.comment=Q;else H.commentBefore=Q;if(q.options.keepSourceTokens&&W)H.srcToken=$;return H}function U2(q,$,Z,X,{spaceBefore:z,comment:U,anchor:Q,tag:J,end:G},H){let W={type:"scalar",offset:yX.emptyScalarPosition($,Z,X),indent:-1,source:""},Y=O9.composeScalar(q,W,J,H);if(Q){if(Y.anchor=Q.source.substring(1),Y.anchor==="")H(Q,"BAD_ALIAS","Anchor cannot be an empty string")}if(z)Y.spaceBefore=!0;if(U)Y.comment=U,Y.range[2]=G;return Y}function gX({options:q},{offset:$,source:Z,end:X},z){let U=new CX.Alias(Z.substring(1));if(U.source==="")z($,"BAD_ALIAS","Alias cannot be an empty string");if(U.source.endsWith(":"))z($+Z.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let Q=$+Z.length,J=fX.resolveEnd(X,Q,q.strict,z);if(U.range=[$,Q,J.offset],J.comment)U.comment=J.comment;return U}kX.composeEmptyNode=U2;kX.composeNode=I9});var K9=I((lX)=>{var vX=o0(),A9=R9(),mX=b0(),dX=t0();function pX(q,$,{offset:Z,start:X,value:z,end:U},Q){let J=Object.assign({_directives:$},q),G=new vX.Document(void 0,J),H={atKey:!1,atRoot:!0,directives:G.directives,options:G.options,schema:G.schema},W=dX.resolveProps(X,{indicator:"doc-start",next:z??U?.[0],offset:Z,onError:Q,parentIndent:0,startOnNewline:!0});if(W.found){if(G.directives.docStart=!0,z&&(z.type==="block-map"||z.type==="block-seq")&&!W.hasNewline)Q(W.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}G.contents=z?A9.composeNode(H,z,W,Q):A9.composeEmptyNode(H,W.end,X,null,W,Q);let Y=G.contents.range[2],V=mX.resolveEnd(U,Y,!1,Q);if(V.comment)G.comment=V.comment;return G.range=[Z,Y,V.offset],G}lX.composeDoc=pX});var Q2=I((rX)=>{var iX=h("process"),aX=Y$(),sX=o0(),e0=r0(),M9=N(),nX=K9(),oX=b0();function qq(q){if(typeof q==="number")return[q,q+1];if(Array.isArray(q))return q.length===2?q:[q[0],q[1]];let{offset:$,source:Z}=q;return[$,$+(typeof Z==="string"?Z.length:1)]}function D9(q){let $="",Z=!1,X=!1;for(let z=0;z<q.length;++z){let U=q[z];switch(U[0]){case"#":$+=($===""?"":X?`
102
102
 
103
103
  `:`
104
- `)+(Q.substring(1)||" "),Z=!0,U=!1;break;case"%":if(q[X+1]?.[0]!=="#")X+=1;Z=!1;break;default:if(!Z)U=!0;Z=!1}}return{comment:$,afterEmptyLine:U}}class V1{constructor(q={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=($,Z,U,X)=>{let Q=i0($);if(X)this.warnings.push(new a0.YAMLWarning(Q,Z,U));else this.errors.push(new a0.YAMLParseError(Q,Z,U))},this.directives=new D3.Directives({version:q.version||"1.2"}),this.options=q}decorate(q,$){let{comment:Z,afterEmptyLine:U}=B1(this.prelude);if(Z){let X=q.contents;if($)q.comment=q.comment?`${q.comment}
105
- ${Z}`:Z;else if(U||q.directives.docStart||!X)q.commentBefore=Z;else if(Y1.isCollection(X)&&!X.flow&&X.items.length>0){let Q=X.items[0];if(Y1.isPair(Q))Q=Q.key;let z=Q.commentBefore;Q.commentBefore=z?`${Z}
106
- ${z}`:Z}else{let Q=X.commentBefore;X.commentBefore=Q?`${Z}
107
- ${Q}`:Z}}if($)Array.prototype.push.apply(q.errors,this.errors),Array.prototype.push.apply(q.warnings,this.warnings);else q.errors=this.errors,q.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:B1(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(q,$=!1,Z=-1){for(let U of q)yield*this.next(U);yield*this.end($,Z)}*next(q){if(K3.env.LOG_STREAM)console.dir(q,{depth:null});switch(q.type){case"directive":this.directives.add(q.source,($,Z,U)=>{let X=i0(q);X[0]+=$,this.onError(X,"BAD_DIRECTIVE",Z,U)}),this.prelude.push(q.source),this.atDirectives=!0;break;case"document":{let $=P3.composeDoc(this.options,this.directives,q,this.onError);if(this.atDirectives&&!$.directives.docStart)this.onError(q,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate($,!1),this.doc)yield this.doc;this.doc=$,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(q.source);break;case"error":{let $=q.source?`${q.message}: ${JSON.stringify(q.source)}`:q.message,Z=new a0.YAMLParseError(i0(q),"UNEXPECTED_TOKEN",$);if(this.atDirectives||!this.doc)this.errors.push(Z);else this.doc.errors.push(Z);break}case"doc-end":{if(!this.doc){this.errors.push(new a0.YAMLParseError(i0(q),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let $=N3.resolveEnd(q.end,q.offset+q.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),$.comment){let Z=this.doc.comment;this.doc.comment=Z?`${Z}
108
- ${$.comment}`:$.comment}this.doc.range[2]=$.offset;break}default:this.errors.push(new a0.YAMLParseError(i0(q),"UNEXPECTED_TOKEN",`Unsupported token ${q.type}`))}}*end(q=!1,$=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(q){let Z=Object.assign({_directives:this.directives},this.options),U=new w3.Document(void 0,Z);if(this.atDirectives)this.onError($,"MISSING_CHAR","Missing directives-end indicator line");U.range=[0,$,$],this.decorate(U,!1),yield U}}}j3.Composer=V1});var O1=F((h3)=>{var b3=m$(),S3=d$(),E3=l0(),W1=E0();function f3(q,$=!0,Z){if(q){let U=(X,Q,z)=>{let G=typeof X==="number"?X:Array.isArray(X)?X[0]:X.offset;if(Z)Z(G,Q,z);else throw new E3.YAMLParseError([G,G+1],Q,z)};switch(q.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return S3.resolveFlowScalar(q,$,U);case"block-scalar":return b3.resolveBlockScalar({options:{strict:$}},q,U)}}return null}function y3(q,$){let{implicitKey:Z=!1,indent:U,inFlow:X=!1,offset:Q=-1,type:z="PLAIN"}=$,G=W1.stringifyString({type:z,value:q},{implicitKey:Z,indent:U>0?" ".repeat(U):"",inFlow:X,options:{blockQuote:!0,lineWidth:-1}}),J=$.end??[{type:"newline",offset:-1,indent:U,source:`
109
- `}];switch(G[0]){case"|":case">":{let H=G.indexOf(`
110
- `),W=G.substring(0,H),Y=G.substring(H+1)+`
111
- `,B=[{type:"block-scalar-header",offset:Q,indent:U,source:W}];if(!T1(B,J))B.push({type:"newline",offset:-1,indent:U,source:`
112
- `});return{type:"block-scalar",offset:Q,indent:U,props:B,source:Y}}case'"':return{type:"double-quoted-scalar",offset:Q,indent:U,source:G,end:J};case"'":return{type:"single-quoted-scalar",offset:Q,indent:U,source:G,end:J};default:return{type:"scalar",offset:Q,indent:U,source:G,end:J}}}function x3(q,$,Z={}){let{afterKey:U=!1,implicitKey:X=!1,inFlow:Q=!1,type:z}=Z,G="indent"in q?q.indent:null;if(U&&typeof G==="number")G+=2;if(!z)switch(q.type){case"single-quoted-scalar":z="QUOTE_SINGLE";break;case"double-quoted-scalar":z="QUOTE_DOUBLE";break;case"block-scalar":{let H=q.props[0];if(H.type!=="block-scalar-header")throw Error("Invalid block scalar header");z=H.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:z="PLAIN"}let J=W1.stringifyString({type:z,value:$},{implicitKey:X||G===null,indent:G!==null&&G>0?" ".repeat(G):"",inFlow:Q,options:{blockQuote:!0,lineWidth:-1}});switch(J[0]){case"|":case">":g3(q,J);break;case'"':a$(q,J,"double-quoted-scalar");break;case"'":a$(q,J,"single-quoted-scalar");break;default:a$(q,J,"scalar")}}function g3(q,$){let Z=$.indexOf(`
113
- `),U=$.substring(0,Z),X=$.substring(Z+1)+`
114
- `;if(q.type==="block-scalar"){let Q=q.props[0];if(Q.type!=="block-scalar-header")throw Error("Invalid block scalar header");Q.source=U,q.source=X}else{let{offset:Q}=q,z="indent"in q?q.indent:-1,G=[{type:"block-scalar-header",offset:Q,indent:z,source:U}];if(!T1(G,"end"in q?q.end:void 0))G.push({type:"newline",offset:-1,indent:z,source:`
115
- `});for(let J of Object.keys(q))if(J!=="type"&&J!=="offset")delete q[J];Object.assign(q,{type:"block-scalar",indent:z,props:G,source:X})}}function T1(q,$){if($)for(let Z of $)switch(Z.type){case"space":case"comment":q.push(Z);break;case"newline":return q.push(Z),!0}return!1}function a$(q,$,Z){switch(q.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":q.type=Z,q.source=$;break;case"block-scalar":{let U=q.props.slice(1),X=$.length;if(q.props[0].type==="block-scalar-header")X-=q.props[0].source.length;for(let Q of U)Q.offset+=X;delete q.props,Object.assign(q,{type:Z,source:$,end:U});break}case"block-map":case"block-seq":{let X={type:"newline",offset:q.offset+$.length,indent:q.indent,source:`
116
- `};delete q.items,Object.assign(q,{type:Z,source:$,end:[X]});break}default:{let U="indent"in q?q.indent:-1,X="end"in q&&Array.isArray(q.end)?q.end.filter((Q)=>Q.type==="space"||Q.type==="comment"||Q.type==="newline"):[];for(let Q of Object.keys(q))if(Q!=="type"&&Q!=="offset")delete q[Q];Object.assign(q,{type:Z,indent:U,source:$,end:X})}}}h3.createScalarToken=y3;h3.resolveAsScalar=f3;h3.setScalarValue=x3});var _1=F((p3)=>{var m3=(q)=>("type"in q)?kq(q):hq(q);function kq(q){switch(q.type){case"block-scalar":{let $="";for(let Z of q.props)$+=kq(Z);return $+q.source}case"block-map":case"block-seq":{let $="";for(let Z of q.items)$+=hq(Z);return $}case"flow-collection":{let $=q.start.source;for(let Z of q.items)$+=hq(Z);for(let Z of q.end)$+=Z.source;return $}case"document":{let $=hq(q);if(q.end)for(let Z of q.end)$+=Z.source;return $}default:{let $=q.source;if("end"in q&&q.end)for(let Z of q.end)$+=Z.source;return $}}}function hq({start:q,key:$,sep:Z,value:U}){let X="";for(let Q of q)X+=Q.source;if($)X+=kq($);if(Z)for(let Q of Z)X+=Q.source;if(U)X+=kq(U);return X}p3.stringify=m3});var F1=F((c3)=>{var i$=Symbol("break visit"),l3=Symbol("skip children"),I1=Symbol("remove item");function B0(q,$){if("type"in q&&q.type==="document")q={start:q.start,value:q.value};L1(Object.freeze([]),q,$)}B0.BREAK=i$;B0.SKIP=l3;B0.REMOVE=I1;B0.itemAtPath=(q,$)=>{let Z=q;for(let[U,X]of $){let Q=Z?.[U];if(Q&&"items"in Q)Z=Q.items[X];else return}return Z};B0.parentCollection=(q,$)=>{let Z=B0.itemAtPath(q,$.slice(0,-1)),U=$[$.length-1][0],X=Z?.[U];if(X&&"items"in X)return X;throw Error("Parent collection not found")};function L1(q,$,Z){let U=Z($,q);if(typeof U==="symbol")return U;for(let X of["key","value"]){let Q=$[X];if(Q&&"items"in Q){for(let z=0;z<Q.items.length;++z){let G=L1(Object.freeze(q.concat([[X,z]])),Q.items[z],Z);if(typeof G==="number")z=G-1;else if(G===i$)return i$;else if(G===I1)Q.items.splice(z,1),z-=1}if(typeof U==="function"&&X==="key")U=U($,q)}}return typeof U==="function"?U($,q):U}c3.visit=B0});var uq=F((e3)=>{var s$=O1(),i3=_1(),s3=F1(),n$="\uFEFF",r$="\x02",o$="\x18",t$="\x1F",n3=(q)=>!!q&&("items"in q),r3=(q)=>!!q&&(q.type==="scalar"||q.type==="single-quoted-scalar"||q.type==="double-quoted-scalar"||q.type==="block-scalar");function o3(q){switch(q){case n$:return"<BOM>";case r$:return"<DOC>";case o$:return"<FLOW_END>";case t$:return"<SCALAR>";default:return JSON.stringify(q)}}function t3(q){switch(q){case n$:return"byte-order-mark";case r$:return"doc-mode";case o$:return"flow-error-end";case t$:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
104
+ `)+(U.substring(1)||" "),Z=!0,X=!1;break;case"%":if(q[z+1]?.[0]!=="#")z+=1;Z=!1;break;default:if(!Z)X=!0;Z=!1}}return{comment:$,afterEmptyLine:X}}class w9{constructor(q={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=($,Z,X,z)=>{let U=qq($);if(z)this.warnings.push(new e0.YAMLWarning(U,Z,X));else this.errors.push(new e0.YAMLParseError(U,Z,X))},this.directives=new aX.Directives({version:q.version||"1.2"}),this.options=q}decorate(q,$){let{comment:Z,afterEmptyLine:X}=D9(this.prelude);if(Z){let z=q.contents;if($)q.comment=q.comment?`${q.comment}
105
+ ${Z}`:Z;else if(X||q.directives.docStart||!z)q.commentBefore=Z;else if(M9.isCollection(z)&&!z.flow&&z.items.length>0){let U=z.items[0];if(M9.isPair(U))U=U.key;let Q=U.commentBefore;U.commentBefore=Q?`${Z}
106
+ ${Q}`:Z}else{let U=z.commentBefore;z.commentBefore=U?`${Z}
107
+ ${U}`:Z}}if($)Array.prototype.push.apply(q.errors,this.errors),Array.prototype.push.apply(q.warnings,this.warnings);else q.errors=this.errors,q.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:D9(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(q,$=!1,Z=-1){for(let X of q)yield*this.next(X);yield*this.end($,Z)}*next(q){if(iX.env.LOG_STREAM)console.dir(q,{depth:null});switch(q.type){case"directive":this.directives.add(q.source,($,Z,X)=>{let z=qq(q);z[0]+=$,this.onError(z,"BAD_DIRECTIVE",Z,X)}),this.prelude.push(q.source),this.atDirectives=!0;break;case"document":{let $=nX.composeDoc(this.options,this.directives,q,this.onError);if(this.atDirectives&&!$.directives.docStart)this.onError(q,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate($,!1),this.doc)yield this.doc;this.doc=$,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(q.source);break;case"error":{let $=q.source?`${q.message}: ${JSON.stringify(q.source)}`:q.message,Z=new e0.YAMLParseError(qq(q),"UNEXPECTED_TOKEN",$);if(this.atDirectives||!this.doc)this.errors.push(Z);else this.doc.errors.push(Z);break}case"doc-end":{if(!this.doc){this.errors.push(new e0.YAMLParseError(qq(q),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let $=oX.resolveEnd(q.end,q.offset+q.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),$.comment){let Z=this.doc.comment;this.doc.comment=Z?`${Z}
108
+ ${$.comment}`:$.comment}this.doc.range[2]=$.offset;break}default:this.errors.push(new e0.YAMLParseError(qq(q),"UNEXPECTED_TOKEN",`Unsupported token ${q.type}`))}}*end(q=!1,$=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(q){let Z=Object.assign({_directives:this.directives},this.options),X=new sX.Document(void 0,Z);if(this.atDirectives)this.onError($,"MISSING_CHAR","Missing directives-end indicator line");X.range=[0,$,$],this.decorate(X,!1),yield X}}}rX.Composer=w9});var j9=I((Qz)=>{var eX=Z2(),qz=z2(),$z=r0(),P9=u0();function Zz(q,$=!0,Z){if(q){let X=(z,U,Q)=>{let J=typeof z==="number"?z:Array.isArray(z)?z[0]:z.offset;if(Z)Z(J,U,Q);else throw new $z.YAMLParseError([J,J+1],U,Q)};switch(q.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return qz.resolveFlowScalar(q,$,X);case"block-scalar":return eX.resolveBlockScalar({options:{strict:$}},q,X)}}return null}function Xz(q,$){let{implicitKey:Z=!1,indent:X,inFlow:z=!1,offset:U=-1,type:Q="PLAIN"}=$,J=P9.stringifyString({type:Q,value:q},{implicitKey:Z,indent:X>0?" ".repeat(X):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}}),G=$.end??[{type:"newline",offset:-1,indent:X,source:`
109
+ `}];switch(J[0]){case"|":case">":{let H=J.indexOf(`
110
+ `),W=J.substring(0,H),Y=J.substring(H+1)+`
111
+ `,V=[{type:"block-scalar-header",offset:U,indent:X,source:W}];if(!N9(V,G))V.push({type:"newline",offset:-1,indent:X,source:`
112
+ `});return{type:"block-scalar",offset:U,indent:X,props:V,source:Y}}case'"':return{type:"double-quoted-scalar",offset:U,indent:X,source:J,end:G};case"'":return{type:"single-quoted-scalar",offset:U,indent:X,source:J,end:G};default:return{type:"scalar",offset:U,indent:X,source:J,end:G}}}function zz(q,$,Z={}){let{afterKey:X=!1,implicitKey:z=!1,inFlow:U=!1,type:Q}=Z,J="indent"in q?q.indent:null;if(X&&typeof J==="number")J+=2;if(!Q)switch(q.type){case"single-quoted-scalar":Q="QUOTE_SINGLE";break;case"double-quoted-scalar":Q="QUOTE_DOUBLE";break;case"block-scalar":{let H=q.props[0];if(H.type!=="block-scalar-header")throw Error("Invalid block scalar header");Q=H.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:Q="PLAIN"}let G=P9.stringifyString({type:Q,value:$},{implicitKey:z||J===null,indent:J!==null&&J>0?" ".repeat(J):"",inFlow:U,options:{blockQuote:!0,lineWidth:-1}});switch(G[0]){case"|":case">":Uz(q,G);break;case'"':J2(q,G,"double-quoted-scalar");break;case"'":J2(q,G,"single-quoted-scalar");break;default:J2(q,G,"scalar")}}function Uz(q,$){let Z=$.indexOf(`
113
+ `),X=$.substring(0,Z),z=$.substring(Z+1)+`
114
+ `;if(q.type==="block-scalar"){let U=q.props[0];if(U.type!=="block-scalar-header")throw Error("Invalid block scalar header");U.source=X,q.source=z}else{let{offset:U}=q,Q="indent"in q?q.indent:-1,J=[{type:"block-scalar-header",offset:U,indent:Q,source:X}];if(!N9(J,"end"in q?q.end:void 0))J.push({type:"newline",offset:-1,indent:Q,source:`
115
+ `});for(let G of Object.keys(q))if(G!=="type"&&G!=="offset")delete q[G];Object.assign(q,{type:"block-scalar",indent:Q,props:J,source:z})}}function N9(q,$){if($)for(let Z of $)switch(Z.type){case"space":case"comment":q.push(Z);break;case"newline":return q.push(Z),!0}return!1}function J2(q,$,Z){switch(q.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":q.type=Z,q.source=$;break;case"block-scalar":{let X=q.props.slice(1),z=$.length;if(q.props[0].type==="block-scalar-header")z-=q.props[0].source.length;for(let U of X)U.offset+=z;delete q.props,Object.assign(q,{type:Z,source:$,end:X});break}case"block-map":case"block-seq":{let z={type:"newline",offset:q.offset+$.length,indent:q.indent,source:`
116
+ `};delete q.items,Object.assign(q,{type:Z,source:$,end:[z]});break}default:{let X="indent"in q?q.indent:-1,z="end"in q&&Array.isArray(q.end)?q.end.filter((U)=>U.type==="space"||U.type==="comment"||U.type==="newline"):[];for(let U of Object.keys(q))if(U!=="type"&&U!=="offset")delete q[U];Object.assign(q,{type:Z,indent:X,source:$,end:z})}}}Qz.createScalarToken=Xz;Qz.resolveAsScalar=Zz;Qz.setScalarValue=zz});var b9=I((Vz)=>{var Yz=(q)=>("type"in q)?lq(q):pq(q);function lq(q){switch(q.type){case"block-scalar":{let $="";for(let Z of q.props)$+=lq(Z);return $+q.source}case"block-map":case"block-seq":{let $="";for(let Z of q.items)$+=pq(Z);return $}case"flow-collection":{let $=q.start.source;for(let Z of q.items)$+=pq(Z);for(let Z of q.end)$+=Z.source;return $}case"document":{let $=pq(q);if(q.end)for(let Z of q.end)$+=Z.source;return $}default:{let $=q.source;if("end"in q&&q.end)for(let Z of q.end)$+=Z.source;return $}}}function pq({start:q,key:$,sep:Z,value:X}){let z="";for(let U of q)z+=U.source;if($)z+=lq($);if(Z)for(let U of Z)z+=U.source;if(X)z+=lq(X);return z}Vz.stringify=Yz});var E9=I((_z)=>{var G2=Symbol("break visit"),Wz=Symbol("skip children"),C9=Symbol("remove item");function F0(q,$){if("type"in q&&q.type==="document")q={start:q.start,value:q.value};S9(Object.freeze([]),q,$)}F0.BREAK=G2;F0.SKIP=Wz;F0.REMOVE=C9;F0.itemAtPath=(q,$)=>{let Z=q;for(let[X,z]of $){let U=Z?.[X];if(U&&"items"in U)Z=U.items[z];else return}return Z};F0.parentCollection=(q,$)=>{let Z=F0.itemAtPath(q,$.slice(0,-1)),X=$[$.length-1][0],z=Z?.[X];if(z&&"items"in z)return z;throw Error("Parent collection not found")};function S9(q,$,Z){let X=Z($,q);if(typeof X==="symbol")return X;for(let z of["key","value"]){let U=$[z];if(U&&"items"in U){for(let Q=0;Q<U.items.length;++Q){let J=S9(Object.freeze(q.concat([[z,Q]])),U.items[Q],Z);if(typeof J==="number")Q=J-1;else if(J===G2)return G2;else if(J===C9)U.items.splice(Q,1),Q-=1}if(typeof X==="function"&&z==="key")X=X($,q)}}return typeof X==="function"?X($,q):X}_z.visit=F0});var cq=I((Kz)=>{var H2=j9(),Tz=b9(),Lz=E9(),Y2="\uFEFF",V2="\x02",B2="\x18",W2="\x1F",Oz=(q)=>!!q&&("items"in q),Iz=(q)=>!!q&&(q.type==="scalar"||q.type==="single-quoted-scalar"||q.type==="double-quoted-scalar"||q.type==="block-scalar");function Rz(q){switch(q){case Y2:return"<BOM>";case V2:return"<DOC>";case B2:return"<FLOW_END>";case W2:return"<SCALAR>";default:return JSON.stringify(q)}}function Az(q){switch(q){case Y2:return"byte-order-mark";case V2:return"doc-mode";case B2:return"flow-error-end";case W2:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
117
117
  `:case`\r
118
- `: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(q[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}e3.createScalarToken=s$.createScalarToken;e3.resolveAsScalar=s$.resolveAsScalar;e3.setScalarValue=s$.setScalarValue;e3.stringify=i3.stringify;e3.visit=s3.visit;e3.BOM=n$;e3.DOCUMENT=r$;e3.FLOW_END=o$;e3.SCALAR=t$;e3.isCollection=n3;e3.isScalar=r3;e3.prettyToken=o3;e3.tokenType=t3});var q2=F((O7)=>{var s0=uq();function u(q){switch(q){case void 0:case" ":case`
119
- `:case"\r":case"\t":return!0;default:return!1}}var R1=new Set("0123456789ABCDEFabcdef"),W7=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),vq=new Set(",[]{}"),T7=new Set(` ,[]{}
120
- \r `),e$=(q)=>!q||T7.has(q);class A1{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(q,$=!1){if(q){if(typeof q!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+q:q,this.lineEndPos=null}this.atEnd=!$;let Z=this.next??"stream";while(Z&&($||this.hasChars(1)))Z=yield*this.parseNext(Z)}atLineEnd(){let q=this.pos,$=this.buffer[q];while($===" "||$==="\t")$=this.buffer[++q];if(!$||$==="#"||$===`
118
+ `: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(q[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}Kz.createScalarToken=H2.createScalarToken;Kz.resolveAsScalar=H2.resolveAsScalar;Kz.setScalarValue=H2.setScalarValue;Kz.stringify=Tz.stringify;Kz.visit=Lz.visit;Kz.BOM=Y2;Kz.DOCUMENT=V2;Kz.FLOW_END=B2;Kz.SCALAR=W2;Kz.isCollection=Oz;Kz.isScalar=Iz;Kz.prettyToken=Rz;Kz.tokenType=Az});var F2=I((hz)=>{var $q=cq();function p(q){switch(q){case void 0:case" ":case`
119
+ `:case"\r":case"\t":return!0;default:return!1}}var f9=new Set("0123456789ABCDEFabcdef"),gz=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),iq=new Set(",[]{}"),kz=new Set(` ,[]{}
120
+ \r `),_2=(q)=>!q||kz.has(q);class y9{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(q,$=!1){if(q){if(typeof q!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+q:q,this.lineEndPos=null}this.atEnd=!$;let Z=this.next??"stream";while(Z&&($||this.hasChars(1)))Z=yield*this.parseNext(Z)}atLineEnd(){let q=this.pos,$=this.buffer[q];while($===" "||$==="\t")$=this.buffer[++q];if(!$||$==="#"||$===`
121
121
  `)return!0;if($==="\r")return this.buffer[q+1]===`
122
- `;return!1}charAt(q){return this.buffer[this.pos+q]}continueScalar(q){let $=this.buffer[q];if(this.indentNext>0){let Z=0;while($===" ")$=this.buffer[++Z+q];if($==="\r"){let U=this.buffer[Z+q+1];if(U===`
123
- `||!U&&!this.atEnd)return q+Z+1}return $===`
124
- `||Z>=this.indentNext||!$&&!this.atEnd?q+Z:-1}if($==="-"||$==="."){let Z=this.buffer.substr(q,3);if((Z==="---"||Z==="...")&&u(this.buffer[q+3]))return-1}return q}getLine(){let q=this.lineEndPos;if(typeof q!=="number"||q!==-1&&q<this.pos)q=this.buffer.indexOf(`
125
- `,this.pos),this.lineEndPos=q;if(q===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[q-1]==="\r")q-=1;return this.buffer.substring(this.pos,q)}hasChars(q){return this.pos+q<=this.buffer.length}setNext(q){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=q,null}peek(q){return this.buffer.substr(this.pos,q)}*parseNext(q){switch(q){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 q=this.getLine();if(q===null)return this.setNext("stream");if(q[0]===s0.BOM)yield*this.pushCount(1),q=q.substring(1);if(q[0]==="%"){let $=q.length,Z=q.indexOf("#");while(Z!==-1){let X=q[Z-1];if(X===" "||X==="\t"){$=Z-1;break}else Z=q.indexOf("#",Z+1)}while(!0){let X=q[$-1];if(X===" "||X==="\t")$-=1;else break}let U=(yield*this.pushCount($))+(yield*this.pushSpaces(!0));return yield*this.pushCount(q.length-U),this.pushNewline(),"stream"}if(this.atLineEnd()){let $=yield*this.pushSpaces(!0);return yield*this.pushCount(q.length-$),yield*this.pushNewline(),"stream"}return yield s0.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let q=this.charAt(0);if(!q&&!this.atEnd)return this.setNext("line-start");if(q==="-"||q==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let $=this.peek(3);if(($==="---"||$==="...")&&u(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,$==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!u(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[q,$]=this.peek(2);if(!$&&!this.atEnd)return this.setNext("block-start");if((q==="-"||q==="?"||q===":")&&u($)){let Z=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=Z,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let q=this.getLine();if(q===null)return this.setNext("doc");let $=yield*this.pushIndicators();switch(q[$]){case"#":yield*this.pushCount(q.length-$);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(e$),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return $+=yield*this.parseBlockScalarHeader(),$+=yield*this.pushSpaces(!0),yield*this.pushCount(q.length-$),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let q,$,Z=-1;do{if(q=yield*this.pushNewline(),q>0)$=yield*this.pushSpaces(!1),this.indentValue=Z=$;else $=0;$+=yield*this.pushSpaces(!0)}while(q+$>0);let U=this.getLine();if(U===null)return this.setNext("flow");if(Z!==-1&&Z<this.indentNext&&U[0]!=="#"||Z===0&&(U.startsWith("---")||U.startsWith("..."))&&u(U[3])){if(!(Z===this.indentNext-1&&this.flowLevel===1&&(U[0]==="]"||U[0]==="}")))return this.flowLevel=0,yield s0.FLOW_END,yield*this.parseLineStart()}let X=0;while(U[X]===",")X+=yield*this.pushCount(1),X+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(X+=yield*this.pushIndicators(),U[X]){case void 0:return"flow";case"#":return yield*this.pushCount(U.length-X),"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(e$),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let Q=this.charAt(1);if(this.flowKey||u(Q)||Q===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let q=this.charAt(0),$=this.buffer.indexOf(q,this.pos+1);if(q==="'")while($!==-1&&this.buffer[$+1]==="'")$=this.buffer.indexOf("'",$+2);else while($!==-1){let X=0;while(this.buffer[$-1-X]==="\\")X+=1;if(X%2===0)break;$=this.buffer.indexOf('"',$+1)}let Z=this.buffer.substring(0,$),U=Z.indexOf(`
126
- `,this.pos);if(U!==-1){while(U!==-1){let X=this.continueScalar(U+1);if(X===-1)break;U=Z.indexOf(`
127
- `,X)}if(U!==-1)$=U-(Z[U-1]==="\r"?2:1)}if($===-1){if(!this.atEnd)return this.setNext("quoted-scalar");$=this.buffer.length}return yield*this.pushToIndex($+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let q=this.pos;while(!0){let $=this.buffer[++q];if($==="+")this.blockScalarKeep=!0;else if($>"0"&&$<="9")this.blockScalarIndent=Number($)-1;else if($!=="-")break}return yield*this.pushUntil(($)=>u($)||$==="#")}*parseBlockScalar(){let q=this.pos-1,$=0,Z;q:for(let X=this.pos;Z=this.buffer[X];++X)switch(Z){case" ":$+=1;break;case`
128
- `:q=X,$=0;break;case"\r":{let Q=this.buffer[X+1];if(!Q&&!this.atEnd)return this.setNext("block-scalar");if(Q===`
129
- `)break}default:break q}if(!Z&&!this.atEnd)return this.setNext("block-scalar");if($>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=$;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let X=this.continueScalar(q+1);if(X===-1)break;q=this.buffer.indexOf(`
130
- `,X)}while(q!==-1);if(q===-1){if(!this.atEnd)return this.setNext("block-scalar");q=this.buffer.length}}let U=q+1;Z=this.buffer[U];while(Z===" ")Z=this.buffer[++U];if(Z==="\t"){while(Z==="\t"||Z===" "||Z==="\r"||Z===`
131
- `)Z=this.buffer[++U];q=U-1}else if(!this.blockScalarKeep)do{let X=q-1,Q=this.buffer[X];if(Q==="\r")Q=this.buffer[--X];let z=X;while(Q===" ")Q=this.buffer[--X];if(Q===`
132
- `&&X>=this.pos&&X+1+$>z)q=X;else break}while(!0);return yield s0.SCALAR,yield*this.pushToIndex(q+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let q=this.flowLevel>0,$=this.pos-1,Z=this.pos-1,U;while(U=this.buffer[++Z])if(U===":"){let X=this.buffer[Z+1];if(u(X)||q&&vq.has(X))break;$=Z}else if(u(U)){let X=this.buffer[Z+1];if(U==="\r")if(X===`
133
- `)Z+=1,U=`
134
- `,X=this.buffer[Z+1];else $=Z;if(X==="#"||q&&vq.has(X))break;if(U===`
135
- `){let Q=this.continueScalar(Z+1);if(Q===-1)break;Z=Math.max(Z,Q-2)}}else{if(q&&vq.has(U))break;$=Z}if(!U&&!this.atEnd)return this.setNext("plain-scalar");return yield s0.SCALAR,yield*this.pushToIndex($+1,!0),q?"flow":"doc"}*pushCount(q){if(q>0)return yield this.buffer.substr(this.pos,q),this.pos+=q,q;return 0}*pushToIndex(q,$){let Z=this.buffer.slice(this.pos,q);if(Z)return yield Z,this.pos+=Z.length,Z.length;else if($)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(e$))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let q=this.flowLevel>0,$=this.charAt(1);if(u($)||q&&vq.has($)){if(!q)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let q=this.pos+2,$=this.buffer[q];while(!u($)&&$!==">")$=this.buffer[++q];return yield*this.pushToIndex($===">"?q+1:q,!1)}else{let q=this.pos+1,$=this.buffer[q];while($)if(W7.has($))$=this.buffer[++q];else if($==="%"&&R1.has(this.buffer[q+1])&&R1.has(this.buffer[q+2]))$=this.buffer[q+=3];else break;return yield*this.pushToIndex(q,!1)}}*pushNewline(){let q=this.buffer[this.pos];if(q===`
122
+ `;return!1}charAt(q){return this.buffer[this.pos+q]}continueScalar(q){let $=this.buffer[q];if(this.indentNext>0){let Z=0;while($===" ")$=this.buffer[++Z+q];if($==="\r"){let X=this.buffer[Z+q+1];if(X===`
123
+ `||!X&&!this.atEnd)return q+Z+1}return $===`
124
+ `||Z>=this.indentNext||!$&&!this.atEnd?q+Z:-1}if($==="-"||$==="."){let Z=this.buffer.substr(q,3);if((Z==="---"||Z==="...")&&p(this.buffer[q+3]))return-1}return q}getLine(){let q=this.lineEndPos;if(typeof q!=="number"||q!==-1&&q<this.pos)q=this.buffer.indexOf(`
125
+ `,this.pos),this.lineEndPos=q;if(q===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[q-1]==="\r")q-=1;return this.buffer.substring(this.pos,q)}hasChars(q){return this.pos+q<=this.buffer.length}setNext(q){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=q,null}peek(q){return this.buffer.substr(this.pos,q)}*parseNext(q){switch(q){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 q=this.getLine();if(q===null)return this.setNext("stream");if(q[0]===$q.BOM)yield*this.pushCount(1),q=q.substring(1);if(q[0]==="%"){let $=q.length,Z=q.indexOf("#");while(Z!==-1){let z=q[Z-1];if(z===" "||z==="\t"){$=Z-1;break}else Z=q.indexOf("#",Z+1)}while(!0){let z=q[$-1];if(z===" "||z==="\t")$-=1;else break}let X=(yield*this.pushCount($))+(yield*this.pushSpaces(!0));return yield*this.pushCount(q.length-X),this.pushNewline(),"stream"}if(this.atLineEnd()){let $=yield*this.pushSpaces(!0);return yield*this.pushCount(q.length-$),yield*this.pushNewline(),"stream"}return yield $q.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let q=this.charAt(0);if(!q&&!this.atEnd)return this.setNext("line-start");if(q==="-"||q==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let $=this.peek(3);if(($==="---"||$==="...")&&p(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,$==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!p(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[q,$]=this.peek(2);if(!$&&!this.atEnd)return this.setNext("block-start");if((q==="-"||q==="?"||q===":")&&p($)){let Z=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=Z,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let q=this.getLine();if(q===null)return this.setNext("doc");let $=yield*this.pushIndicators();switch(q[$]){case"#":yield*this.pushCount(q.length-$);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(_2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return $+=yield*this.parseBlockScalarHeader(),$+=yield*this.pushSpaces(!0),yield*this.pushCount(q.length-$),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let q,$,Z=-1;do{if(q=yield*this.pushNewline(),q>0)$=yield*this.pushSpaces(!1),this.indentValue=Z=$;else $=0;$+=yield*this.pushSpaces(!0)}while(q+$>0);let X=this.getLine();if(X===null)return this.setNext("flow");if(Z!==-1&&Z<this.indentNext&&X[0]!=="#"||Z===0&&(X.startsWith("---")||X.startsWith("..."))&&p(X[3])){if(!(Z===this.indentNext-1&&this.flowLevel===1&&(X[0]==="]"||X[0]==="}")))return this.flowLevel=0,yield $q.FLOW_END,yield*this.parseLineStart()}let z=0;while(X[z]===",")z+=yield*this.pushCount(1),z+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(z+=yield*this.pushIndicators(),X[z]){case void 0:return"flow";case"#":return yield*this.pushCount(X.length-z),"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(_2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let U=this.charAt(1);if(this.flowKey||p(U)||U===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let q=this.charAt(0),$=this.buffer.indexOf(q,this.pos+1);if(q==="'")while($!==-1&&this.buffer[$+1]==="'")$=this.buffer.indexOf("'",$+2);else while($!==-1){let z=0;while(this.buffer[$-1-z]==="\\")z+=1;if(z%2===0)break;$=this.buffer.indexOf('"',$+1)}let Z=this.buffer.substring(0,$),X=Z.indexOf(`
126
+ `,this.pos);if(X!==-1){while(X!==-1){let z=this.continueScalar(X+1);if(z===-1)break;X=Z.indexOf(`
127
+ `,z)}if(X!==-1)$=X-(Z[X-1]==="\r"?2:1)}if($===-1){if(!this.atEnd)return this.setNext("quoted-scalar");$=this.buffer.length}return yield*this.pushToIndex($+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let q=this.pos;while(!0){let $=this.buffer[++q];if($==="+")this.blockScalarKeep=!0;else if($>"0"&&$<="9")this.blockScalarIndent=Number($)-1;else if($!=="-")break}return yield*this.pushUntil(($)=>p($)||$==="#")}*parseBlockScalar(){let q=this.pos-1,$=0,Z;q:for(let z=this.pos;Z=this.buffer[z];++z)switch(Z){case" ":$+=1;break;case`
128
+ `:q=z,$=0;break;case"\r":{let U=this.buffer[z+1];if(!U&&!this.atEnd)return this.setNext("block-scalar");if(U===`
129
+ `)break}default:break q}if(!Z&&!this.atEnd)return this.setNext("block-scalar");if($>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=$;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let z=this.continueScalar(q+1);if(z===-1)break;q=this.buffer.indexOf(`
130
+ `,z)}while(q!==-1);if(q===-1){if(!this.atEnd)return this.setNext("block-scalar");q=this.buffer.length}}let X=q+1;Z=this.buffer[X];while(Z===" ")Z=this.buffer[++X];if(Z==="\t"){while(Z==="\t"||Z===" "||Z==="\r"||Z===`
131
+ `)Z=this.buffer[++X];q=X-1}else if(!this.blockScalarKeep)do{let z=q-1,U=this.buffer[z];if(U==="\r")U=this.buffer[--z];let Q=z;while(U===" ")U=this.buffer[--z];if(U===`
132
+ `&&z>=this.pos&&z+1+$>Q)q=z;else break}while(!0);return yield $q.SCALAR,yield*this.pushToIndex(q+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let q=this.flowLevel>0,$=this.pos-1,Z=this.pos-1,X;while(X=this.buffer[++Z])if(X===":"){let z=this.buffer[Z+1];if(p(z)||q&&iq.has(z))break;$=Z}else if(p(X)){let z=this.buffer[Z+1];if(X==="\r")if(z===`
133
+ `)Z+=1,X=`
134
+ `,z=this.buffer[Z+1];else $=Z;if(z==="#"||q&&iq.has(z))break;if(X===`
135
+ `){let U=this.continueScalar(Z+1);if(U===-1)break;Z=Math.max(Z,U-2)}}else{if(q&&iq.has(X))break;$=Z}if(!X&&!this.atEnd)return this.setNext("plain-scalar");return yield $q.SCALAR,yield*this.pushToIndex($+1,!0),q?"flow":"doc"}*pushCount(q){if(q>0)return yield this.buffer.substr(this.pos,q),this.pos+=q,q;return 0}*pushToIndex(q,$){let Z=this.buffer.slice(this.pos,q);if(Z)return yield Z,this.pos+=Z.length,Z.length;else if($)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(_2))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let q=this.flowLevel>0,$=this.charAt(1);if(p($)||q&&iq.has($)){if(!q)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let q=this.pos+2,$=this.buffer[q];while(!p($)&&$!==">")$=this.buffer[++q];return yield*this.pushToIndex($===">"?q+1:q,!1)}else{let q=this.pos+1,$=this.buffer[q];while($)if(gz.has($))$=this.buffer[++q];else if($==="%"&&f9.has(this.buffer[q+1])&&f9.has(this.buffer[q+2]))$=this.buffer[q+=3];else break;return yield*this.pushToIndex(q,!1)}}*pushNewline(){let q=this.buffer[this.pos];if(q===`
136
136
  `)return yield*this.pushCount(1);else if(q==="\r"&&this.charAt(1)===`
137
- `)return yield*this.pushCount(2);else return 0}*pushSpaces(q){let $=this.pos-1,Z;do Z=this.buffer[++$];while(Z===" "||q&&Z==="\t");let U=$-this.pos;if(U>0)yield this.buffer.substr(this.pos,U),this.pos=$;return U}*pushUntil(q){let $=this.pos,Z=this.buffer[$];while(!q(Z))Z=this.buffer[++$];return yield*this.pushToIndex($,!1)}}O7.Lexer=A1});var $2=F((I7)=>{class M1{constructor(){this.lineStarts=[],this.addNewLine=(q)=>this.lineStarts.push(q),this.linePos=(q)=>{let $=0,Z=this.lineStarts.length;while($<Z){let X=$+Z>>1;if(this.lineStarts[X]<q)$=X+1;else Z=X}if(this.lineStarts[$]===q)return{line:$+1,col:1};if($===0)return{line:0,col:q};let U=this.lineStarts[$-1];return{line:$,col:q-U+1}}}}I7.LineCounter=M1});var Z2=F((A7)=>{var F7=y("process"),K1=uq(),R7=q2();function $0(q,$){for(let Z=0;Z<q.length;++Z)if(q[Z].type===$)return!0;return!1}function D1(q){for(let $=0;$<q.length;++$)switch(q[$].type){case"space":case"comment":case"newline":break;default:return $}return-1}function P1(q){switch(q?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function mq(q){switch(q.type){case"document":return q.start;case"block-map":{let $=q.items[q.items.length-1];return $.sep??$.start}case"block-seq":return q.items[q.items.length-1].start;default:return[]}}function w0(q){if(q.length===0)return[];let $=q.length;q:while(--$>=0)switch(q[$].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break q}while(q[++$]?.type==="space");return q.splice($,q.length)}function w1(q){if(q.start.type==="flow-seq-start"){for(let $ of q.items)if($.sep&&!$.value&&!$0($.start,"explicit-key-ind")&&!$0($.sep,"map-value-ind")){if($.key)$.value=$.key;if(delete $.key,P1($.value))if($.value.end)Array.prototype.push.apply($.value.end,$.sep);else $.value.end=$.sep;else Array.prototype.push.apply($.start,$.sep);delete $.sep}}}class N1{constructor(q){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new R7.Lexer,this.onNewLine=q}*parse(q,$=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let Z of this.lexer.lex(q,$))yield*this.next(Z);if(!$)yield*this.end()}*next(q){if(this.source=q,F7.env.LOG_TOKENS)console.log("|",K1.prettyToken(q));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=q.length;return}let $=K1.tokenType(q);if(!$){let Z=`Not a YAML token: ${q}`;yield*this.pop({type:"error",offset:this.offset,message:Z,source:q}),this.offset+=q.length}else if($==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=$,yield*this.step(),$){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+q.length);break;case"space":if(this.atNewLine&&q[0]===" ")this.indent+=q.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=q.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=q.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 q=this.peek(1);if(this.type==="doc-end"&&q?.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(!q)return yield*this.stream();switch(q.type){case"document":return yield*this.document(q);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(q);case"block-scalar":return yield*this.blockScalar(q);case"block-map":return yield*this.blockMap(q);case"block-seq":return yield*this.blockSequence(q);case"flow-collection":return yield*this.flowCollection(q);case"doc-end":return yield*this.documentEnd(q)}yield*this.pop()}peek(q){return this.stack[this.stack.length-q]}*pop(q){let $=q??this.stack.pop();if(!$)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield $;else{let Z=this.peek(1);if($.type==="block-scalar")$.indent="indent"in Z?Z.indent:0;else if($.type==="flow-collection"&&Z.type==="document")$.indent=0;if($.type==="flow-collection")w1($);switch(Z.type){case"document":Z.value=$;break;case"block-scalar":Z.props.push($);break;case"block-map":{let U=Z.items[Z.items.length-1];if(U.value){Z.items.push({start:[],key:$,sep:[]}),this.onKeyLine=!0;return}else if(U.sep)U.value=$;else{Object.assign(U,{key:$,sep:[]}),this.onKeyLine=!U.explicitKey;return}break}case"block-seq":{let U=Z.items[Z.items.length-1];if(U.value)Z.items.push({start:[],value:$});else U.value=$;break}case"flow-collection":{let U=Z.items[Z.items.length-1];if(!U||U.value)Z.items.push({start:[],key:$,sep:[]});else if(U.sep)U.value=$;else Object.assign(U,{key:$,sep:[]});return}default:yield*this.pop(),yield*this.pop($)}if((Z.type==="document"||Z.type==="block-map"||Z.type==="block-seq")&&($.type==="block-map"||$.type==="block-seq")){let U=$.items[$.items.length-1];if(U&&!U.sep&&!U.value&&U.start.length>0&&D1(U.start)===-1&&($.indent===0||U.start.every((X)=>X.type!=="comment"||X.indent<$.indent))){if(Z.type==="document")Z.end=U.start;else Z.items.push({start:U.start});$.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 q={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")q.start.push(this.sourceToken);this.stack.push(q);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(q){if(q.value)return yield*this.lineEnd(q);switch(this.type){case"doc-start":{if(D1(q.start)!==-1)yield*this.pop(),yield*this.step();else q.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":q.start.push(this.sourceToken);return}let $=this.startBlockValue(q);if($)this.stack.push($);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(q){if(this.type==="map-value-ind"){let $=mq(this.peek(2)),Z=w0($),U;if(q.end)U=q.end,U.push(this.sourceToken),delete q.end;else U=[this.sourceToken];let X={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:Z,key:q,sep:U}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=X}else yield*this.lineEnd(q)}*blockScalar(q){switch(this.type){case"space":case"comment":case"newline":q.props.push(this.sourceToken);return;case"scalar":if(q.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let $=this.source.indexOf(`
137
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces(q){let $=this.pos-1,Z;do Z=this.buffer[++$];while(Z===" "||q&&Z==="\t");let X=$-this.pos;if(X>0)yield this.buffer.substr(this.pos,X),this.pos=$;return X}*pushUntil(q){let $=this.pos,Z=this.buffer[$];while(!q(Z))Z=this.buffer[++$];return yield*this.pushToIndex($,!1)}}hz.Lexer=y9});var T2=I((vz)=>{class x9{constructor(){this.lineStarts=[],this.addNewLine=(q)=>this.lineStarts.push(q),this.linePos=(q)=>{let $=0,Z=this.lineStarts.length;while($<Z){let z=$+Z>>1;if(this.lineStarts[z]<q)$=z+1;else Z=z}if(this.lineStarts[$]===q)return{line:$+1,col:1};if($===0)return{line:0,col:q};let X=this.lineStarts[$-1];return{line:$,col:q-X+1}}}}vz.LineCounter=x9});var L2=I((lz)=>{var dz=h("process"),g9=cq(),pz=F2();function Q0(q,$){for(let Z=0;Z<q.length;++Z)if(q[Z].type===$)return!0;return!1}function k9(q){for(let $=0;$<q.length;++$)switch(q[$].type){case"space":case"comment":case"newline":break;default:return $}return-1}function u9(q){switch(q?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function aq(q){switch(q.type){case"document":return q.start;case"block-map":{let $=q.items[q.items.length-1];return $.sep??$.start}case"block-seq":return q.items[q.items.length-1].start;default:return[]}}function C0(q){if(q.length===0)return[];let $=q.length;q:while(--$>=0)switch(q[$].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break q}while(q[++$]?.type==="space");return q.splice($,q.length)}function h9(q){if(q.start.type==="flow-seq-start"){for(let $ of q.items)if($.sep&&!$.value&&!Q0($.start,"explicit-key-ind")&&!Q0($.sep,"map-value-ind")){if($.key)$.value=$.key;if(delete $.key,u9($.value))if($.value.end)Array.prototype.push.apply($.value.end,$.sep);else $.value.end=$.sep;else Array.prototype.push.apply($.start,$.sep);delete $.sep}}}class v9{constructor(q){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new pz.Lexer,this.onNewLine=q}*parse(q,$=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let Z of this.lexer.lex(q,$))yield*this.next(Z);if(!$)yield*this.end()}*next(q){if(this.source=q,dz.env.LOG_TOKENS)console.log("|",g9.prettyToken(q));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=q.length;return}let $=g9.tokenType(q);if(!$){let Z=`Not a YAML token: ${q}`;yield*this.pop({type:"error",offset:this.offset,message:Z,source:q}),this.offset+=q.length}else if($==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=$,yield*this.step(),$){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+q.length);break;case"space":if(this.atNewLine&&q[0]===" ")this.indent+=q.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=q.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=q.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 q=this.peek(1);if(this.type==="doc-end"&&q?.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(!q)return yield*this.stream();switch(q.type){case"document":return yield*this.document(q);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(q);case"block-scalar":return yield*this.blockScalar(q);case"block-map":return yield*this.blockMap(q);case"block-seq":return yield*this.blockSequence(q);case"flow-collection":return yield*this.flowCollection(q);case"doc-end":return yield*this.documentEnd(q)}yield*this.pop()}peek(q){return this.stack[this.stack.length-q]}*pop(q){let $=q??this.stack.pop();if(!$)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield $;else{let Z=this.peek(1);if($.type==="block-scalar")$.indent="indent"in Z?Z.indent:0;else if($.type==="flow-collection"&&Z.type==="document")$.indent=0;if($.type==="flow-collection")h9($);switch(Z.type){case"document":Z.value=$;break;case"block-scalar":Z.props.push($);break;case"block-map":{let X=Z.items[Z.items.length-1];if(X.value){Z.items.push({start:[],key:$,sep:[]}),this.onKeyLine=!0;return}else if(X.sep)X.value=$;else{Object.assign(X,{key:$,sep:[]}),this.onKeyLine=!X.explicitKey;return}break}case"block-seq":{let X=Z.items[Z.items.length-1];if(X.value)Z.items.push({start:[],value:$});else X.value=$;break}case"flow-collection":{let X=Z.items[Z.items.length-1];if(!X||X.value)Z.items.push({start:[],key:$,sep:[]});else if(X.sep)X.value=$;else Object.assign(X,{key:$,sep:[]});return}default:yield*this.pop(),yield*this.pop($)}if((Z.type==="document"||Z.type==="block-map"||Z.type==="block-seq")&&($.type==="block-map"||$.type==="block-seq")){let X=$.items[$.items.length-1];if(X&&!X.sep&&!X.value&&X.start.length>0&&k9(X.start)===-1&&($.indent===0||X.start.every((z)=>z.type!=="comment"||z.indent<$.indent))){if(Z.type==="document")Z.end=X.start;else Z.items.push({start:X.start});$.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 q={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")q.start.push(this.sourceToken);this.stack.push(q);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(q){if(q.value)return yield*this.lineEnd(q);switch(this.type){case"doc-start":{if(k9(q.start)!==-1)yield*this.pop(),yield*this.step();else q.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":q.start.push(this.sourceToken);return}let $=this.startBlockValue(q);if($)this.stack.push($);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(q){if(this.type==="map-value-ind"){let $=aq(this.peek(2)),Z=C0($),X;if(q.end)X=q.end,X.push(this.sourceToken),delete q.end;else X=[this.sourceToken];let z={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:Z,key:q,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd(q)}*blockScalar(q){switch(this.type){case"space":case"comment":case"newline":q.props.push(this.sourceToken);return;case"scalar":if(q.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let $=this.source.indexOf(`
138
138
  `)+1;while($!==0)this.onNewLine(this.offset+$),$=this.source.indexOf(`
139
- `,$)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,$.value){let Z="end"in $.value?$.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else{if(this.atIndentedComment($.start,q.indent)){let U=q.items[q.items.length-2]?.value?.end;if(Array.isArray(U)){Array.prototype.push.apply(U,$.start),U.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return}if(this.indent>=q.indent){let Z=!this.onKeyLine&&this.indent===q.indent,U=Z&&($.sep||$.explicitKey)&&this.type!=="seq-item-ind",X=[];if(U&&$.sep&&!$.value){let Q=[];for(let z=0;z<$.sep.length;++z){let G=$.sep[z];switch(G.type){case"newline":Q.push(z);break;case"space":break;case"comment":if(G.indent>q.indent)Q.length=0;break;default:Q.length=0}}if(Q.length>=2)X=$.sep.splice(Q[1])}switch(this.type){case"anchor":case"tag":if(U||$.value)X.push(this.sourceToken),q.items.push({start:X}),this.onKeyLine=!0;else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"explicit-key-ind":if(!$.sep&&!$.explicitKey)$.start.push(this.sourceToken),$.explicitKey=!0;else if(U||$.value)X.push(this.sourceToken),q.items.push({start:X,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($.explicitKey)if(!$.sep)if($0($.start,"newline"))Object.assign($,{key:null,sep:[this.sourceToken]});else{let Q=w0($.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]})}else if($.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if($0($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]});else if(P1($.key)&&!$0($.sep,"newline")){let Q=w0($.start),z=$.key,G=$.sep;G.push(this.sourceToken),delete $.key,delete $.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:z,sep:G}]})}else if(X.length>0)$.sep=$.sep.concat(X,this.sourceToken);else $.sep.push(this.sourceToken);else if(!$.sep)Object.assign($,{key:null,sep:[this.sourceToken]});else if($.value||U)q.items.push({start:X,key:null,sep:[this.sourceToken]});else if($0($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else $.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Q=this.flowScalar(this.type);if(U||$.value)q.items.push({start:X,key:Q,sep:[]}),this.onKeyLine=!0;else if($.sep)this.stack.push(Q);else Object.assign($,{key:Q,sep:[]}),this.onKeyLine=!0;return}default:{let Q=this.startBlockValue(q);if(Q){if(Q.type==="block-seq"){if(!$.explicitKey&&$.sep&&!$0($.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(Z)q.items.push({start:X});this.stack.push(Q);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if($.value){let Z="end"in $.value?$.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment($.start,q.indent)){let U=q.items[q.items.length-2]?.value?.end;if(Array.isArray(U)){Array.prototype.push.apply(U,$.start),U.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return;case"anchor":case"tag":if($.value||this.indent<=q.indent)break;$.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==q.indent)break;if($.value||$0($.start,"seq-item-ind"))q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return}if(this.indent>q.indent){let Z=this.startBlockValue(q);if(Z){this.stack.push(Z);return}}yield*this.pop(),yield*this.step()}*flowCollection(q){let $=q.items[q.items.length-1];if(this.type==="flow-error-end"){let Z;do yield*this.pop(),Z=this.peek(1);while(Z?.type==="flow-collection")}else if(q.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!$||$.sep)q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return;case"map-value-ind":if(!$||$.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else Object.assign($,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!$||$.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let U=this.flowScalar(this.type);if(!$||$.value)q.items.push({start:[],key:U,sep:[]});else if($.sep)this.stack.push(U);else Object.assign($,{key:U,sep:[]});return}case"flow-map-end":case"flow-seq-end":q.end.push(this.sourceToken);return}let Z=this.startBlockValue(q);if(Z)this.stack.push(Z);else yield*this.pop(),yield*this.step()}else{let Z=this.peek(2);if(Z.type==="block-map"&&(this.type==="map-value-ind"&&Z.indent===q.indent||this.type==="newline"&&!Z.items[Z.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&Z.type!=="flow-collection"){let U=mq(Z),X=w0(U);w1(q);let Q=q.end.splice(1,q.end.length);Q.push(this.sourceToken);let z={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:X,key:q,sep:Q}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd(q)}}flowScalar(q){if(this.onNewLine){let $=this.source.indexOf(`
139
+ `,$)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,$.value){let Z="end"in $.value?$.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else{if(this.atIndentedComment($.start,q.indent)){let X=q.items[q.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,$.start),X.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return}if(this.indent>=q.indent){let Z=!this.onKeyLine&&this.indent===q.indent,X=Z&&($.sep||$.explicitKey)&&this.type!=="seq-item-ind",z=[];if(X&&$.sep&&!$.value){let U=[];for(let Q=0;Q<$.sep.length;++Q){let J=$.sep[Q];switch(J.type){case"newline":U.push(Q);break;case"space":break;case"comment":if(J.indent>q.indent)U.length=0;break;default:U.length=0}}if(U.length>=2)z=$.sep.splice(U[1])}switch(this.type){case"anchor":case"tag":if(X||$.value)z.push(this.sourceToken),q.items.push({start:z}),this.onKeyLine=!0;else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"explicit-key-ind":if(!$.sep&&!$.explicitKey)$.start.push(this.sourceToken),$.explicitKey=!0;else if(X||$.value)z.push(this.sourceToken),q.items.push({start:z,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($.explicitKey)if(!$.sep)if(Q0($.start,"newline"))Object.assign($,{key:null,sep:[this.sourceToken]});else{let U=C0($.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]})}else if($.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Q0($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]});else if(u9($.key)&&!Q0($.sep,"newline")){let U=C0($.start),Q=$.key,J=$.sep;J.push(this.sourceToken),delete $.key,delete $.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:Q,sep:J}]})}else if(z.length>0)$.sep=$.sep.concat(z,this.sourceToken);else $.sep.push(this.sourceToken);else if(!$.sep)Object.assign($,{key:null,sep:[this.sourceToken]});else if($.value||X)q.items.push({start:z,key:null,sep:[this.sourceToken]});else if(Q0($.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else $.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let U=this.flowScalar(this.type);if(X||$.value)q.items.push({start:z,key:U,sep:[]}),this.onKeyLine=!0;else if($.sep)this.stack.push(U);else Object.assign($,{key:U,sep:[]}),this.onKeyLine=!0;return}default:{let U=this.startBlockValue(q);if(U){if(U.type==="block-seq"){if(!$.explicitKey&&$.sep&&!Q0($.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(Z)q.items.push({start:z});this.stack.push(U);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(q){let $=q.items[q.items.length-1];switch(this.type){case"newline":if($.value){let Z="end"in $.value?$.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else q.items.push({start:[this.sourceToken]})}else $.start.push(this.sourceToken);return;case"space":case"comment":if($.value)q.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment($.start,q.indent)){let X=q.items[q.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,$.start),X.push(this.sourceToken),q.items.pop();return}}$.start.push(this.sourceToken)}return;case"anchor":case"tag":if($.value||this.indent<=q.indent)break;$.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==q.indent)break;if($.value||Q0($.start,"seq-item-ind"))q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return}if(this.indent>q.indent){let Z=this.startBlockValue(q);if(Z){this.stack.push(Z);return}}yield*this.pop(),yield*this.step()}*flowCollection(q){let $=q.items[q.items.length-1];if(this.type==="flow-error-end"){let Z;do yield*this.pop(),Z=this.peek(1);while(Z?.type==="flow-collection")}else if(q.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!$||$.sep)q.items.push({start:[this.sourceToken]});else $.start.push(this.sourceToken);return;case"map-value-ind":if(!$||$.value)q.items.push({start:[],key:null,sep:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else Object.assign($,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!$||$.value)q.items.push({start:[this.sourceToken]});else if($.sep)$.sep.push(this.sourceToken);else $.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(!$||$.value)q.items.push({start:[],key:X,sep:[]});else if($.sep)this.stack.push(X);else Object.assign($,{key:X,sep:[]});return}case"flow-map-end":case"flow-seq-end":q.end.push(this.sourceToken);return}let Z=this.startBlockValue(q);if(Z)this.stack.push(Z);else yield*this.pop(),yield*this.step()}else{let Z=this.peek(2);if(Z.type==="block-map"&&(this.type==="map-value-ind"&&Z.indent===q.indent||this.type==="newline"&&!Z.items[Z.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&Z.type!=="flow-collection"){let X=aq(Z),z=C0(X);h9(q);let U=q.end.splice(1,q.end.length);U.push(this.sourceToken);let Q={type:"block-map",offset:q.offset,indent:q.indent,items:[{start:z,key:q,sep:U}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=Q}else yield*this.lineEnd(q)}}flowScalar(q){if(this.onNewLine){let $=this.source.indexOf(`
140
140
  `)+1;while($!==0)this.onNewLine(this.offset+$),$=this.source.indexOf(`
141
- `,$)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){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 $=mq(q),Z=w0($);return Z.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let $=mq(q),Z=w0($);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,$){if(this.type!=="comment")return!1;if(this.indent<=$)return!1;return q.every((Z)=>Z.type==="newline"||Z.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){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(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}A7.Parser=N1});var E1=F((b7)=>{var j1=c$(),K7=d0(),n0=l0(),D7=$$(),w7=P(),P7=$2(),C1=Z2();function b1(q){let $=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||$&&new P7.LineCounter||null,prettyErrors:$}}function N7(q,$={}){let{lineCounter:Z,prettyErrors:U}=b1($),X=new C1.Parser(Z?.addNewLine),Q=new j1.Composer($),z=Array.from(Q.compose(X.parse(q)));if(U&&Z)for(let G of z)G.errors.forEach(n0.prettifyError(q,Z)),G.warnings.forEach(n0.prettifyError(q,Z));if(z.length>0)return z;return Object.assign([],{empty:!0},Q.streamInfo())}function S1(q,$={}){let{lineCounter:Z,prettyErrors:U}=b1($),X=new C1.Parser(Z?.addNewLine),Q=new j1.Composer($),z=null;for(let G of Q.compose(X.parse(q),!0,q.length))if(!z)z=G;else if(z.options.logLevel!=="silent"){z.errors.push(new n0.YAMLParseError(G.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(U&&Z)z.errors.forEach(n0.prettifyError(q,Z)),z.warnings.forEach(n0.prettifyError(q,Z));return z}function j7(q,$,Z){let U=void 0;if(typeof $==="function")U=$;else if(Z===void 0&&$&&typeof $==="object")Z=$;let X=S1(q,Z);if(!X)return null;if(X.warnings.forEach((Q)=>D7.warn(X.options.logLevel,Q)),X.errors.length>0)if(X.options.logLevel!=="silent")throw X.errors[0];else X.errors=[];return X.toJS(Object.assign({reviver:U},Z))}function C7(q,$,Z){let U=null;if(typeof $==="function"||Array.isArray($))U=$;else if(Z===void 0&&$)Z=$;if(typeof Z==="string")Z=Z.length;if(typeof Z==="number"){let X=Math.round(Z);Z=X<1?void 0:X>8?{indent:8}:{indent:X}}if(q===void 0){let{keepUndefined:X}=Z??$??{};if(!X)return}if(w7.isDocument(q)&&!U)return q.toString(Z);return new K7.Document(q,U,Z).toString(Z)}b7.parse=j7;b7.parseAllDocuments=N7;b7.parseDocument=S1;b7.stringify=C7});import{execFile as J4}from"child_process";import{promisify as H4}from"util";import{mkdtemp as Y4,readdir as O2,readFile as o0,rm as r0,cp as B4,access as lq,stat as _2,lstat as V4,symlink as W4,mkdir as T4}from"fs/promises";import{join as l,relative as O4}from"path";import{tmpdir as _4}from"os";var I2=H4(J4),I4=/^[a-zA-Z0-9_-]+$/,L4=/^[a-zA-Z0-9._-]+$/,F4=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/,T2=128,R4=/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\/tree\/(.+))?\/?$/;function L2(q){let $=R4.exec(q);if($){let[,W,Y,B]=$,_=Y.endsWith(".git")?Y.slice(0,-4):Y;q=`github:${W}/${_}${B?`#${B}`:""}`}if(!q.startsWith("github:"))throw Error(`Invalid source format. Got: "${q}"
141
+ `,$)+1}return{type:q,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(q){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 $=aq(q),Z=C0($);return Z.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let $=aq(q),Z=C0($);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(q,$){if(this.type!=="comment")return!1;if(this.indent<=$)return!1;return q.every((Z)=>Z.type==="newline"||Z.type==="space")}*documentEnd(q){if(this.type!=="doc-mode"){if(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(q){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(q.end)q.end.push(this.sourceToken);else q.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}lz.Parser=v9});var c9=I((ez)=>{var m9=Q2(),iz=o0(),Zq=r0(),az=T$(),sz=N(),nz=T2(),d9=L2();function p9(q){let $=q.prettyErrors!==!1;return{lineCounter:q.lineCounter||$&&new nz.LineCounter||null,prettyErrors:$}}function oz(q,$={}){let{lineCounter:Z,prettyErrors:X}=p9($),z=new d9.Parser(Z?.addNewLine),U=new m9.Composer($),Q=Array.from(U.compose(z.parse(q)));if(X&&Z)for(let J of Q)J.errors.forEach(Zq.prettifyError(q,Z)),J.warnings.forEach(Zq.prettifyError(q,Z));if(Q.length>0)return Q;return Object.assign([],{empty:!0},U.streamInfo())}function l9(q,$={}){let{lineCounter:Z,prettyErrors:X}=p9($),z=new d9.Parser(Z?.addNewLine),U=new m9.Composer($),Q=null;for(let J of U.compose(z.parse(q),!0,q.length))if(!Q)Q=J;else if(Q.options.logLevel!=="silent"){Q.errors.push(new Zq.YAMLParseError(J.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(X&&Z)Q.errors.forEach(Zq.prettifyError(q,Z)),Q.warnings.forEach(Zq.prettifyError(q,Z));return Q}function rz(q,$,Z){let X=void 0;if(typeof $==="function")X=$;else if(Z===void 0&&$&&typeof $==="object")Z=$;let z=l9(q,Z);if(!z)return null;if(z.warnings.forEach((U)=>az.warn(z.options.logLevel,U)),z.errors.length>0)if(z.options.logLevel!=="silent")throw z.errors[0];else z.errors=[];return z.toJS(Object.assign({reviver:X},Z))}function tz(q,$,Z){let X=null;if(typeof $==="function"||Array.isArray($))X=$;else if(Z===void 0&&$)Z=$;if(typeof Z==="string")Z=Z.length;if(typeof Z==="number"){let z=Math.round(Z);Z=z<1?void 0:z>8?{indent:8}:{indent:z}}if(q===void 0){let{keepUndefined:z}=Z??$??{};if(!z)return}if(sz.isDocument(q)&&!X)return q.toString(Z);return new iz.Document(q,X,Z).toString(Z)}ez.parse=rz;ez.parseAllDocuments=oz;ez.parseDocument=l9;ez.stringify=tz});import{execFile as E4}from"child_process";import{promisify as f4}from"util";import{mkdtemp as C2,readdir as y4,readFile as X$,rm as Uq,cp as x4,access as $$,stat as g4,lstat as k4,symlink as h4,mkdir as u4}from"fs/promises";import{join as n,relative as v4}from"path";import{tmpdir as S2}from"os";import{readdir as P4,readFile as N4,stat as j4}from"fs/promises";import{join as b4}from"path";var C4=new Set([".png",".jpg",".jpeg",".gif",".ico",".bmp",".webp",".mp3",".mp4",".wav",".avi",".mov",".zip",".tar",".gz",".bz2",".7z",".exe",".dll",".so",".dylib",".woff",".woff2",".ttf",".eot",".pdf",".doc",".docx"]),S4=524288;async function Xq(q){let $=[];async function Z(X,z){let U;try{U=await P4(X)}catch{return}for(let Q of U){if(Q===".git"||Q==="node_modules")continue;let J=b4(X,Q),G=z?`${z}/${Q}`:Q;try{let H=await j4(J);if(H.isDirectory())await Z(J,G);else if(H.isFile()){let W=Q.includes(".")?`.${Q.split(".").pop().toLowerCase()}`:"";if(C4.has(W))continue;if(H.size>S4)continue;try{let Y=await N4(J,"utf-8");$.push({relPath:G,content:Y,lineCount:Y.split(`
142
+ `).length})}catch{}}}catch{continue}}}return await Z(q,""),$}var f2=f4(E4),m4=/^[a-zA-Z0-9_-]+$/,d4=/^[a-zA-Z0-9._-]+$/,p4=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/,E2=128,l4=/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\/tree\/(.+))?\/?$/;function z$(q){let $=l4.exec(q);if($){let[,W,Y,V]=$,T=Y.endsWith(".git")?Y.slice(0,-4):Y;q=`github:${W}/${T}${V?`#${V}`:""}`}if(!q.startsWith("github:"))throw Error(`Invalid source format. Got: "${q}"
142
143
  Supported formats:
143
144
  github:owner/repo[#ref]
144
- https://github.com/owner/repo`);let Z=q.slice(7),U=Z.indexOf("#"),X,Q=null;if(U!==-1){if(X=Z.slice(0,U),Q=Z.slice(U+1),!Q)throw Error("Invalid source: ref cannot be empty after #")}else X=Z;let z=X.indexOf("/");if(z===-1)throw Error(`Invalid source: format must be github:owner/repo. Got: "${q}"`);let G=X.slice(0,z),J=X.slice(z+1);if(!G)throw Error("Invalid source: owner cannot be empty");if(!J)throw Error("Invalid source: repo cannot be empty");if(!I4.test(G))throw Error(`Invalid source: owner contains invalid characters: "${G}". Allowed: [a-zA-Z0-9_-]`);if(!L4.test(J))throw Error(`Invalid source: repo contains invalid characters: "${J}". Allowed: [a-zA-Z0-9._-]`);let H={owner:G,repo:J,ref:Q,cloneUrl:`https://github.com/${G}/${J}.git`};return v(`install: parsed source -> owner=${G} repo=${J} ref=${Q}`),H}function t0(q){if(!q)throw Error("Invalid skill name: name cannot be empty");if(q.includes("\x00"))throw Error("Invalid skill name: contains unsafe characters (null byte)");if(q.includes(".."))throw Error("Invalid skill name: contains unsafe characters (..)");if(q.includes("/")||q.includes("\\"))throw Error("Invalid skill name: contains unsafe characters (path separator)");if(q.startsWith("."))throw Error("Invalid skill name: must not start with a dot");if(q.length>T2)throw Error(`Invalid skill name: exceeds maximum length of ${T2} characters`);if(!F4.test(q))throw Error(`Invalid skill name: "${q}" does not match allowed pattern [a-zA-Z0-9][a-zA-Z0-9._-]*`);return q}async function F2(){try{await I2("git",["--version"]),v("install: git available")}catch{throw Error("git is required for installing skills. Install git from https://git-scm.com")}}async function R2(q){v(`install: cloning ${q.cloneUrl}${q.ref?` (ref: ${q.ref})`:""}`);let $=await Y4(l(_4(),"asm-install-")),Z=["clone","--depth","1"];if(q.ref)Z.push("--branch",q.ref);Z.push(q.cloneUrl,$);try{await I2("git",Z,{timeout:60000})}catch(U){await qq($);let X=U.killed?"Clone timed out after 60 seconds":`Clone failed: ${U.stderr||U.message}`;throw Error(X)}return $}async function e0(q){let $=l(q,"SKILL.md"),Z;try{Z=await o0($,"utf-8")}catch{throw Error("Not a valid skill: SKILL.md not found in repository root")}let U=T0(Z),X=q.split("/").pop()||"unknown",Q=U.name||X,z=U.version||"0.0.0";return v(`install: validated skill "${Q}" v${z}`),{name:Q,version:z,description:(U.description||"").replace(/\s*\n\s*/g," ").trim()}}async function A2(q,$=3){let Z=[];async function U(X,Q,z){let G;try{G=await O2(X)}catch{return}for(let J of G){if(J===".git"||J==="node_modules")continue;let H=l(X,J);try{if(!(await _2(H)).isDirectory())continue}catch{continue}let W=Q?`${Q}/${J}`:J,Y=z+1,B=l(H,"SKILL.md");try{let _=await o0(B,"utf-8"),O=T0(_);Z.push({relPath:W,name:O.name||J,version:O.version||"0.0.0",description:(O.description||"").replace(/\s*\n\s*/g," ").trim()})}catch{if(Y<$)await U(H,W,Y)}}}return await U(q,"",0),Z.sort((X,Q)=>X.name.localeCompare(Q.name)),Z}var A4=[{category:"Shell commands",pattern:/\b(bash|sh\s+-c)\b/},{category:"Shell commands",pattern:/\bexec\(/},{category:"Shell commands",pattern:/\bchild_process\b/},{category:"Shell commands",pattern:/\bBun\.spawn\b/},{category:"Code execution",pattern:/\beval\(/},{category:"Code execution",pattern:/\bFunction\(/},{category:"Code execution",pattern:/\bnew\s+Function\b/},{category:"Credentials",pattern:/\b(API_KEY|SECRET|TOKEN|PASSWORD)\s*[=:]/},{category:"External URLs",pattern:/https?:\/\//}],M4=new Set([".png",".jpg",".jpeg",".gif",".ico",".bmp",".webp",".mp3",".mp4",".wav",".avi",".mov",".zip",".tar",".gz",".bz2",".7z",".exe",".dll",".so",".dylib",".woff",".woff2",".ttf",".eot",".pdf",".doc",".docx"]);async function K4(q){let $=[];async function Z(U,X){let Q;try{Q=await O2(U)}catch{return}for(let z of Q){if(z===".git")continue;if(z==="node_modules")continue;let G=l(U,z),J=X?`${X}/${z}`:z;try{let H=await _2(G);if(H.isDirectory())await Z(G,J);else if(H.isFile()){let W=z.includes(".")?`.${z.split(".").pop().toLowerCase()}`:"";if(M4.has(W))continue;if(H.size>524288)continue;try{let Y=await o0(G,"utf-8");$.push({relPath:J,content:Y})}catch{}}}catch{continue}}}return await Z(q,""),$}async function M2(q){let $=[],Z=await K4(q);for(let{relPath:U,content:X}of Z){let Q=X.split(`
145
- `);for(let z=0;z<Q.length;z++)for(let{category:G,pattern:J}of A4)if(J.test(Q[z])){let H=Q[z].trim();$.push({category:G,file:U,line:z+1,match:H.length>100?H.slice(0,100)+"…":H})}}return $}async function aq(q){let $=`github:${q.source.owner}/${q.source.repo}${q.source.ref?`#${q.source.ref}`:""}`;if(q.force)try{await lq(q.targetDir),await r0(q.targetDir,{recursive:!0,force:!0})}catch{}let Z=q.sourceDir;try{await B4(Z,q.targetDir,{recursive:!0})}catch(G){throw Error(`Failed to install: ${G.message}`)}let U=l(q.targetDir,".git");try{await r0(U,{recursive:!0,force:!0})}catch{}v(`install: copied files to ${q.targetDir}`);let X=l(q.targetDir,"SKILL.md");try{await lq(X)}catch{throw Error("Installation verification failed: SKILL.md not found at target")}let Q=await o0(X,"utf-8"),z=T0(Q);return{success:!0,path:q.targetDir,name:z.name||q.skillName,version:z.version||"0.0.0",provider:q.providerLabel,source:$}}async function K2(q,$){let Z=await aq(q);for(let U of $){if(U.name===q.providerName)continue;let X=cq(U.global),Q=l(X,q.skillName);await T4(X,{recursive:!0});try{if((await V4(Q)).isSymbolicLink())await r0(Q);else{v(`install: skipping ${Q} — existing non-symlink directory`);continue}}catch{}let z=O4(X,q.targetDir);await W4(z,Q,"dir"),v(`install: symlinked ${Q} -> ${z}`)}return Z.provider=`All (${$.map((U)=>U.label).join(", ")})`,Z}async function qq(q){try{await r0(q,{recursive:!0,force:!0})}catch{}}async function $q(q,$,Z){let U=q.providers.filter((z)=>z.enabled);if(U.length===0)throw Error("No providers are enabled. Enable a provider in your config.");if($==="all")return{provider:U.find((G)=>G.name==="agents")||U[0],allProviders:U};if($){let z=q.providers.find((G)=>G.name===$);if(!z){let G=q.providers.map((J)=>J.name).join(", ");throw Error(`Unknown provider: "${$}". Valid providers: ${G}, all`)}if(!z.enabled)throw Error(`Provider "${$}" is disabled. Enable it in your config or choose another provider.`);return{provider:z,allProviders:null}}if(U.length===1)return{provider:U[0],allProviders:null};if(!Z){let z=U.map((G)=>G.name).join(", ");throw Error(`--provider is required in non-interactive mode. Available: ${z}, all`)}console.error(`
146
- Select a provider:`);for(let z=0;z<U.length;z++)console.error(` ${z+1}) ${U[z].label} (${U[z].name})`);console.error(` ${U.length+1}) All providers (shared .agents/skills/ + symlinks)`),process.stderr.write(`
147
- Enter number: `);let X=await new Promise((z)=>{let G="";process.stdin.setEncoding("utf-8"),process.stdin.on("data",(J)=>{if(G+=J,G.includes(`
148
- `))process.stdin.removeAllListeners("data"),process.stdin.pause(),z(G.trim())}),process.stdin.resume()}),Q=parseInt(X,10)-1;if(Q===U.length)return{provider:U.find((G)=>G.name==="agents")||U[0],allProviders:U};if(isNaN(Q)||Q<0||Q>=U.length)throw Error("Invalid selection. Aborting.");return{provider:U[Q],allProviders:null}}function D2(q,$,Z,U,X,Q){let z=cq(X.global),G=l(z,U);return{source:q,tempDir:$,sourceDir:Z,targetDir:G,skillName:U,force:Q,providerName:X.name,providerLabel:X.label}}async function w2(q,$){try{if(await lq(q),v(`install: target ${q} conflict (exists)${$?", force overwrite":""}`),!$)throw Error(`Skill already exists at: ${q}
149
- Use --force to overwrite.`)}catch(Z){if(Z.message?.includes("--force"))throw Z;v(`install: target ${q} — no conflict`)}}import{readFile as FQ}from"fs/promises";import{join as RQ}from"path";var x7=c$(),g7=d0(),h7=C$(),U2=l0(),k7=j0(),Z0=P(),u7=o(),v7=C(),m7=e(),p7=q0(),hG=uq(),d7=q2(),l7=$2(),c7=Z2(),pq=E1(),f1=P0();var a7=x7.Composer,i7=g7.Document,s7=h7.Schema,n7=U2.YAMLError,r7=U2.YAMLParseError,o7=U2.YAMLWarning,t7=k7.Alias,e7=Z0.isAlias,qQ=Z0.isCollection,$Q=Z0.isDocument,ZQ=Z0.isMap,UQ=Z0.isNode,XQ=Z0.isPair,QQ=Z0.isScalar,zQ=Z0.isSeq,GQ=u7.Pair,JQ=v7.Scalar,HQ=m7.YAMLMap,YQ=p7.YAMLSeq;var BQ=d7.Lexer,VQ=l7.LineCounter,WQ=c7.Parser,X2=pq.parse,TQ=pq.parseAllDocuments,OQ=pq.parseDocument,_Q=pq.stringify,IQ=f1.visit,LQ=f1.visitAsync;var y1=500;function AQ(q){let $=q.split(`
150
- `),Z=!1,U=!1;for(let X of $){if(X.trim()==="---")if(!Z){Z=!0;continue}else{U=!0;continue}if(U&&X.trim().length>0)return!0}return!1}function MQ(q){let $=q.split(`
151
- `),Z=-1;for(let U=0;U<$.length;U++)if($[U].trim()==="---")if(Z===-1)Z=U+1;else return $.slice(Z,U).join(`
152
- `);return null}function KQ(q){let $=MQ(q);if($===null)return null;try{return X2($),null}catch(Z){return Z.message||"invalid YAML"}}async function x1(q){let $=[];if(!q.description||q.description.trim()==="")$.push({category:"missing-description",message:"Skill has no description in SKILL.md frontmatter"});if(!q.version||q.version==="0.0.0")$.push({category:"missing-version",message:"Skill has no version (or default 0.0.0) in SKILL.md frontmatter"});try{let U=RQ(q.path,"SKILL.md"),X=await FQ(U,"utf-8");if(!AQ(X))$.push({category:"empty-body",message:"SKILL.md contains only frontmatter with no body content"});let Q=KQ(X);if(Q)$.push({category:"invalid-yaml",message:`SKILL.md has invalid YAML frontmatter: ${Q}`})}catch{}let Z=q.fileCount;if(Z!==void 0&&Z>y1)$.push({category:"high-file-count",message:`Skill has ${Z} files (threshold: ${y1})`});return $}function g1(q){let $=q.map((Z)=>({name:Z.name,version:Z.version,dirName:Z.dirName,provider:Z.provider,scope:Z.scope,path:Z.path,isSymlink:Z.isSymlink,symlinkTarget:Z.symlinkTarget}));return{version:1,exportedAt:new Date().toISOString(),skills:$}}import{mkdir as DQ,writeFile as wQ,access as PQ}from"fs/promises";import{join as NQ}from"path";function jQ(q){return`---
145
+ https://github.com/owner/repo`);let Z=q.slice(7),X=Z.indexOf("#"),z,U=null;if(X!==-1){if(z=Z.slice(0,X),U=Z.slice(X+1),!U)throw Error("Invalid source: ref cannot be empty after #")}else z=Z;let Q=z.indexOf("/");if(Q===-1)throw Error(`Invalid source: format must be github:owner/repo. Got: "${q}"`);let J=z.slice(0,Q),G=z.slice(Q+1);if(!J)throw Error("Invalid source: owner cannot be empty");if(!G)throw Error("Invalid source: repo cannot be empty");if(!m4.test(J))throw Error(`Invalid source: owner contains invalid characters: "${J}". Allowed: [a-zA-Z0-9_-]`);if(!d4.test(G))throw Error(`Invalid source: repo contains invalid characters: "${G}". Allowed: [a-zA-Z0-9._-]`);let H={owner:J,repo:G,ref:U,cloneUrl:`https://github.com/${J}/${G}.git`,sshCloneUrl:`git@github.com:${J}/${G}.git`};return x(`install: parsed source -> owner=${J} repo=${G} ref=${U}`),H}function Qq(q){if(!q)throw Error("Invalid skill name: name cannot be empty");if(q.includes("\x00"))throw Error("Invalid skill name: contains unsafe characters (null byte)");if(q.includes(".."))throw Error("Invalid skill name: contains unsafe characters (..)");if(q.includes("/")||q.includes("\\"))throw Error("Invalid skill name: contains unsafe characters (path separator)");if(q.startsWith("."))throw Error("Invalid skill name: must not start with a dot");if(q.length>E2)throw Error(`Invalid skill name: exceeds maximum length of ${E2} characters`);if(!p4.test(q))throw Error(`Invalid skill name: "${q}" does not match allowed pattern [a-zA-Z0-9][a-zA-Z0-9._-]*`);return q}async function U$(){try{await f2("git",["--version"]),x("install: git available")}catch{throw Error("git is required for installing skills. Install git from https://git-scm.com")}}function c4(q){if(q.killed)return!1;let $=(q.stderr||q.message||"").toLowerCase();return $.includes("authentication failed")||$.includes("could not read username")||$.includes("repository not found")||$.includes("returned error: 403")||$.includes("returned error: 401")||$.includes("terminal prompts disabled")||$.includes("permission denied")}function zq(q){return q.killed?"Clone timed out after 60 seconds":`Clone failed: ${q.stderr||q.message}`}async function q$(q,$,Z){let X=["clone","--depth","1"];if($)X.push("--branch",$);return X.push(q,Z),await f2("git",X,{timeout:60000}),Z}async function Q$(q,$="auto"){x(`install: cloning ${q.owner}/${q.repo}${q.ref?` (ref: ${q.ref})`:""} (transport: ${$})`);let Z=await C2(n(S2(),"asm-install-"));if($==="ssh"||$==="https"){let X=$==="ssh"?q.sshCloneUrl:q.cloneUrl;try{return await q$(X,q.ref,Z)}catch(z){throw await t(Z),Error(zq(z))}}try{return await q$(q.cloneUrl,q.ref,Z)}catch(X){if(!c4(X))throw await t(Z),Error(zq(X));x("install: HTTPS clone failed with auth error, retrying with SSH..."),await t(Z);let z=await C2(n(S2(),"asm-install-"));try{return await q$(q.sshCloneUrl,q.ref,z)}catch(U){throw await t(z),Error(`Clone failed with both transports:
146
+ HTTPS: ${zq(X)}
147
+ SSH: ${zq(U)}`)}}}async function E0(q){let $=n(q,"SKILL.md"),Z;try{Z=await X$($,"utf-8")}catch{throw Error("Not a valid skill: SKILL.md not found in repository root")}let X=I0(Z),z=q.split("/").pop()||"unknown",U=X.name||z,Q=X.version||"0.0.0";return x(`install: validated skill "${U}" v${Q}`),{name:U,version:Q,description:(X.description||"").replace(/\s*\n\s*/g," ").trim()}}async function y2(q,$=3){let Z=[];async function X(z,U,Q){let J;try{J=await y4(z)}catch{return}for(let G of J){if(G===".git"||G==="node_modules")continue;let H=n(z,G);try{if(!(await g4(H)).isDirectory())continue}catch{continue}let W=U?`${U}/${G}`:G,Y=Q+1,V=n(H,"SKILL.md");try{let T=await X$(V,"utf-8"),L=I0(T);Z.push({relPath:W,name:L.name||G,version:L.version||"0.0.0",description:(L.description||"").replace(/\s*\n\s*/g," ").trim()})}catch{if(Y<$)await X(H,W,Y)}}}return await X(q,"",0),Z.sort((z,U)=>z.name.localeCompare(U.name)),Z}var i4=[{category:"Shell commands",pattern:/\b(bash|sh\s+-c)\b/},{category:"Shell commands",pattern:/\bexec\(/},{category:"Shell commands",pattern:/\bchild_process\b/},{category:"Shell commands",pattern:/\bBun\.spawn\b/},{category:"Code execution",pattern:/\beval\(/},{category:"Code execution",pattern:/\bFunction\(/},{category:"Code execution",pattern:/\bnew\s+Function\b/},{category:"Credentials",pattern:/\b(API_KEY|SECRET|TOKEN|PASSWORD)\s*[=:]/},{category:"External URLs",pattern:/https?:\/\//}];async function x2(q){let $=[],Z=await Xq(q);for(let{relPath:X,content:z}of Z){let U=z.split(`
148
+ `);for(let Q=0;Q<U.length;Q++)for(let{category:J,pattern:G}of i4)if(G.test(U[Q])){let H=U[Q].trim();$.push({category:J,file:X,line:Q+1,match:H.length>100?H.slice(0,100)+"…":H})}}return $}async function J$(q){let $=`github:${q.source.owner}/${q.source.repo}${q.source.ref?`#${q.source.ref}`:""}`;if(q.force)try{await $$(q.targetDir),await Uq(q.targetDir,{recursive:!0,force:!0})}catch{}let Z=q.sourceDir;try{await x4(Z,q.targetDir,{recursive:!0})}catch(J){throw Error(`Failed to install: ${J.message}`)}let X=n(q.targetDir,".git");try{await Uq(X,{recursive:!0,force:!0})}catch{}x(`install: copied files to ${q.targetDir}`);let z=n(q.targetDir,"SKILL.md");try{await $$(z)}catch{throw Error("Installation verification failed: SKILL.md not found at target")}let U=await X$(z,"utf-8"),Q=I0(U);return{success:!0,path:q.targetDir,name:Q.name||q.skillName,version:Q.version||"0.0.0",provider:q.providerLabel,source:$}}async function g2(q,$){let Z=await J$(q);for(let X of $){if(X.name===q.providerName)continue;let z=Z$(X.global),U=n(z,q.skillName);await u4(z,{recursive:!0});try{if((await k4(U)).isSymbolicLink())await Uq(U);else{x(`install: skipping ${U} — existing non-symlink directory`);continue}}catch{}let Q=v4(z,q.targetDir);await h4(Q,U,"dir"),x(`install: symlinked ${U} -> ${Q}`)}return Z.provider=`All (${$.map((X)=>X.label).join(", ")})`,Z}async function t(q){try{await Uq(q,{recursive:!0,force:!0})}catch{}}async function Jq(q,$,Z){let X=q.providers.filter((Q)=>Q.enabled);if(X.length===0)throw Error("No providers are enabled. Enable a provider in your config.");if($==="all")return{provider:X.find((J)=>J.name==="agents")||X[0],allProviders:X};if($){let Q=q.providers.find((J)=>J.name===$);if(!Q){let J=q.providers.map((G)=>G.name).join(", ");throw Error(`Unknown provider: "${$}". Valid providers: ${J}, all`)}if(!Q.enabled)throw Error(`Provider "${$}" is disabled. Enable it in your config or choose another provider.`);return{provider:Q,allProviders:null}}if(X.length===1)return{provider:X[0],allProviders:null};if(!Z){let Q=X.map((J)=>J.name).join(", ");throw Error(`--provider is required in non-interactive mode. Available: ${Q}, all`)}console.error(`
149
+ Select a provider:`);for(let Q=0;Q<X.length;Q++)console.error(` ${Q+1}) ${X[Q].label} (${X[Q].name})`);console.error(` ${X.length+1}) All providers (shared .agents/skills/ + symlinks)`),process.stderr.write(`
150
+ Enter number: `);let z=await new Promise((Q)=>{let J="";process.stdin.setEncoding("utf-8"),process.stdin.on("data",(G)=>{if(J+=G,J.includes(`
151
+ `))process.stdin.removeAllListeners("data"),process.stdin.pause(),Q(J.trim())}),process.stdin.resume()}),U=parseInt(z,10)-1;if(U===X.length)return{provider:X.find((J)=>J.name==="agents")||X[0],allProviders:X};if(isNaN(U)||U<0||U>=X.length)throw Error("Invalid selection. Aborting.");return{provider:X[U],allProviders:null}}function k2(q,$,Z,X,z,U){let Q=Z$(z.global),J=n(Q,X);return{source:q,tempDir:$,sourceDir:Z,targetDir:J,skillName:X,force:U,providerName:z.name,providerLabel:z.label}}async function h2(q,$){try{if(await $$(q),x(`install: target ${q} — conflict (exists)${$?", force overwrite":""}`),!$)throw Error(`Skill already exists at: ${q}
152
+ Use --force to overwrite.`)}catch(Z){if(Z.message?.includes("--force"))throw Z;x(`install: target ${q} — no conflict`)}}import{readFile as dU}from"fs/promises";import{join as pU}from"path";var zU=Q2(),UU=o0(),QU=l$(),O2=r0(),JU=x0(),J0=N(),GU=Z0(),HU=f(),YU=z0(),VU=U0(),MG=cq(),BU=F2(),WU=T2(),_U=L2(),sq=c9(),i9=f0();var FU=zU.Composer,TU=UU.Document,LU=QU.Schema,OU=O2.YAMLError,IU=O2.YAMLParseError,RU=O2.YAMLWarning,AU=JU.Alias,KU=J0.isAlias,MU=J0.isCollection,DU=J0.isDocument,wU=J0.isMap,PU=J0.isNode,NU=J0.isPair,jU=J0.isScalar,bU=J0.isSeq,CU=GU.Pair,SU=HU.Scalar,EU=YU.YAMLMap,fU=VU.YAMLSeq;var yU=BU.Lexer,xU=WU.LineCounter,gU=_U.Parser,I2=sq.parse,kU=sq.parseAllDocuments,hU=sq.parseDocument,uU=sq.stringify,vU=i9.visit,mU=i9.visitAsync;var a9=500;function lU(q){let $=q.split(`
153
+ `),Z=!1,X=!1;for(let z of $){if(z.trim()==="---")if(!Z){Z=!0;continue}else{X=!0;continue}if(X&&z.trim().length>0)return!0}return!1}function cU(q){let $=q.split(`
154
+ `),Z=-1;for(let X=0;X<$.length;X++)if($[X].trim()==="---")if(Z===-1)Z=X+1;else return $.slice(Z,X).join(`
155
+ `);return null}function iU(q){let $=cU(q);if($===null)return null;try{return I2($),null}catch(Z){return Z.message||"invalid YAML"}}async function s9(q){let $=[];if(!q.description||q.description.trim()==="")$.push({category:"missing-description",message:"Skill has no description in SKILL.md frontmatter"});if(!q.version||q.version==="0.0.0")$.push({category:"missing-version",message:"Skill has no version (or default 0.0.0) in SKILL.md frontmatter"});try{let X=pU(q.path,"SKILL.md"),z=await dU(X,"utf-8");if(!lU(z))$.push({category:"empty-body",message:"SKILL.md contains only frontmatter with no body content"});let U=iU(z);if(U)$.push({category:"invalid-yaml",message:`SKILL.md has invalid YAML frontmatter: ${U}`})}catch{}let Z=q.fileCount;if(Z!==void 0&&Z>a9)$.push({category:"high-file-count",message:`Skill has ${Z} files (threshold: ${a9})`});return $}function n9(q){let $=q.map((Z)=>({name:Z.name,version:Z.version,dirName:Z.dirName,provider:Z.provider,scope:Z.scope,path:Z.path,isSymlink:Z.isSymlink,symlinkTarget:Z.symlinkTarget}));return{version:1,exportedAt:new Date().toISOString(),skills:$}}import{mkdir as aU,writeFile as sU,access as nU}from"fs/promises";import{join as oU}from"path";function rU(q){return`---
153
156
  name: ${q}
154
157
  version: 0.1.0
155
158
  description: ""
@@ -167,22 +170,25 @@ as instructions for when and how to use this skill.
167
170
  ## Instructions
168
171
 
169
172
  - Step-by-step instructions for the agent
170
- `}async function h1(q,$){await DQ($,{recursive:!0});let Z=NQ($,"SKILL.md"),U=jQ(q);await wQ(Z,U,"utf-8")}async function k1(q){try{return await PQ(q),!0}catch{return!1}}import{readdir as CQ,stat as bQ}from"fs/promises";import{join as SQ}from"path";async function EQ(q){let $=0;try{let U=(await CQ(q,{recursive:!0})).map(async(Q)=>{try{let z=await bQ(SQ(q,Q));if(z.isFile())return z.size}catch{}return 0});$=(await Promise.all(U)).reduce((Q,z)=>Q+z,0)}catch{}return $}async function m1(q,$){let Z={},U={global:0,project:0},X={},Q=q.map(async(J)=>{Z[J.provider]=(Z[J.provider]||0)+1,U[J.scope]++;let H=await EQ(J.path);return X[J.path]=H,H}),G=(await Promise.all(Q)).reduce((J,H)=>J+H,0);return{totalSkills:q.length,byProvider:Z,byScope:U,totalDiskBytes:G,perSkillDiskBytes:X,duplicateGroups:$.duplicateGroups.length,duplicateInstances:$.totalDuplicateInstances}}function fQ(q){if(q<1024)return`${q} B`;if(q<1048576)return`${(q/1024).toFixed(1)} KB`;if(q<1073741824)return`${(q/1048576).toFixed(1)} MB`;return`${(q/1073741824).toFixed(1)} GB`}function Q2(q,$,Z=20){let U=Math.round(q/$*Z),X=Z-U;return T.green("#".repeat(U))+T.dim("-".repeat(X))}var u1={claude:"Claude Code",codex:"Codex",openclaw:"OpenClaw",agents:"Agents"};function p1(q){let $=[];$.push(""),$.push(T.blueBold(" Skill Statistics")),$.push(T.dim(" "+"-".repeat(20))),$.push(""),$.push(` ${T.bold("Total:")} ${T.cyan(String(q.totalSkills))} skills`),$.push(` ${T.bold("Disk:")} ${T.cyan(fQ(q.totalDiskBytes))}`),$.push(""),$.push(T.bold(" By Provider"));let Z=Object.entries(q.byProvider).sort((J,H)=>H[1]-J[1]),U=Math.max(...Z.map(([,J])=>J)),X=Math.max(...Z.map(([J])=>(u1[J]||J).length));for(let[J,H]of Z){let W=u1[J]||J,Y=v1(J,W.padEnd(X)),B=String(H).padStart(4);$.push(` ${Y} ${B} ${Q2(H,U)}`)}$.push(""),$.push(T.bold(" By Scope"));let Q=Math.max(q.byScope.global,q.byScope.project),z=String(q.byScope.global).padStart(4),G=String(q.byScope.project).padStart(4);if($.push(` ${"global ".padEnd(X)} ${z} ${Q2(q.byScope.global,Q)}`),$.push(` ${"project".padEnd(X)} ${G} ${Q2(q.byScope.project,Q)}`),$.push(""),$.push(T.bold(" Duplicates")),q.duplicateGroups>0)$.push(` ${T.yellow(`${q.duplicateGroups} group(s), ${q.duplicateInstances} total instance(s)`)}`),$.push(T.dim(` Run ${T.bold("asm audit")} to review`));else $.push(` ${T.green("None")}`);return $.push(""),$.join(`
171
- `)}import{access as yQ,lstat as xQ,readFile as gQ,rm as hQ,symlink as kQ}from"fs/promises";import{join as d1}from"path";async function l1(q){let $;try{$=await xQ(q)}catch{throw Error(`Path does not exist: ${q}`)}if(!$.isDirectory())throw Error(`Path is not a directory: ${q}`);let Z=d1(q,"SKILL.md"),U;try{U=await gQ(Z,"utf-8")}catch{throw Error(`No SKILL.md found in ${q}`)}let X=T0(U);if(!X.name)throw Error(`Invalid SKILL.md in ${q}: missing "name" in frontmatter`);return{name:X.name,version:X.version||"0.0.0"}}async function dq(q,$,Z,U){let X=d1($,Z),Q=!1;try{await yQ(X),Q=!0}catch{}if(Q){if(!U)throw Error(`Target already exists: ${X}. Use --force to overwrite.`);await hQ(X,{recursive:!0,force:!0})}await kQ(q,X,"dir")}function uQ(q){let $=q.slice(2),Z={command:null,subcommand:null,positional:[],flags:{help:!1,version:!1,json:!1,yes:!1,noColor:!1,scope:"both",sort:"name",provider:null,name:null,force:!1,path:null,all:!1,verbose:!1,flat:!1}},U=0;while(U<$.length){let X=$[U];if(X==="--help"||X==="-h")Z.flags.help=!0;else if(X==="--version"||X==="-v")Z.flags.version=!0;else if(X==="--json")Z.flags.json=!0;else if(X==="--yes"||X==="-y")Z.flags.yes=!0;else if(X==="--no-color")Z.flags.noColor=!0;else if(X==="--scope"||X==="-s"){U++;let Q=$[U];if(Q==="global"||Q==="project"||Q==="both")Z.flags.scope=Q;else j(`Invalid scope: "${Q}". Must be global, project, or both.`),process.exit(2)}else if(X==="--sort"){U++;let Q=$[U];if(Q==="name"||Q==="version"||Q==="location")Z.flags.sort=Q;else j(`Invalid sort: "${Q}". Must be name, version, or location.`),process.exit(2)}else if(X==="--provider"||X==="-p")U++,Z.flags.provider=$[U]||null;else if(X==="--name")U++,Z.flags.name=$[U]||null;else if(X==="--force"||X==="-f")Z.flags.force=!0;else if(X==="--path")U++,Z.flags.path=$[U]||null;else if(X==="--all")Z.flags.all=!0;else if(X==="--verbose"||X==="-V")Z.flags.verbose=!0;else if(X==="--flat")Z.flags.flat=!0;else if(X.startsWith("-"))j(`Unknown option: ${X}`),console.error('Run "asm --help" for usage.'),process.exit(2);else if(!Z.command)Z.command=X;else if(!Z.subcommand)Z.subcommand=X;else Z.positional.push(X);U++}return Z}function j(q){console.error(T.red(`Error: ${q}`))}function vQ(){console.log(`${T.blueBold("agent-skill-manager")} (${T.bold("asm")}) ${V2}
173
+ `}async function o9(q,$){await aU($,{recursive:!0});let Z=oU($,"SKILL.md"),X=rU(q);await sU(Z,X,"utf-8")}async function r9(q){try{return await nU(q),!0}catch{return!1}}import{readdir as tU,stat as eU}from"fs/promises";import{join as qQ}from"path";async function $Q(q){let $=0;try{let X=(await tU(q,{recursive:!0})).map(async(U)=>{try{let Q=await eU(qQ(q,U));if(Q.isFile())return Q.size}catch{}return 0});$=(await Promise.all(X)).reduce((U,Q)=>U+Q,0)}catch{}return $}async function q4(q,$){let Z={},X={global:0,project:0},z={},U=q.map(async(G)=>{Z[G.provider]=(Z[G.provider]||0)+1,X[G.scope]++;let H=await $Q(G.path);return z[G.path]=H,H}),J=(await Promise.all(U)).reduce((G,H)=>G+H,0);return{totalSkills:q.length,byProvider:Z,byScope:X,totalDiskBytes:J,perSkillDiskBytes:z,duplicateGroups:$.duplicateGroups.length,duplicateInstances:$.totalDuplicateInstances}}function ZQ(q){if(q<1024)return`${q} B`;if(q<1048576)return`${(q/1024).toFixed(1)} KB`;if(q<1073741824)return`${(q/1048576).toFixed(1)} MB`;return`${(q/1073741824).toFixed(1)} GB`}function R2(q,$,Z=20){let X=Math.round(q/$*Z),z=Z-X;return B.green("#".repeat(X))+B.dim("-".repeat(z))}var t9={claude:"Claude Code",codex:"Codex",openclaw:"OpenClaw",agents:"Agents"};function $4(q){let $=[];$.push(""),$.push(B.blueBold(" Skill Statistics")),$.push(B.dim(" "+"-".repeat(20))),$.push(""),$.push(` ${B.bold("Total:")} ${B.cyan(String(q.totalSkills))} skills`),$.push(` ${B.bold("Disk:")} ${B.cyan(ZQ(q.totalDiskBytes))}`),$.push(""),$.push(B.bold(" By Provider"));let Z=Object.entries(q.byProvider).sort((G,H)=>H[1]-G[1]),X=Math.max(...Z.map(([,G])=>G)),z=Math.max(...Z.map(([G])=>(t9[G]||G).length));for(let[G,H]of Z){let W=t9[G]||G,Y=e9(G,W.padEnd(z)),V=String(H).padStart(4);$.push(` ${Y} ${V} ${R2(H,X)}`)}$.push(""),$.push(B.bold(" By Scope"));let U=Math.max(q.byScope.global,q.byScope.project),Q=String(q.byScope.global).padStart(4),J=String(q.byScope.project).padStart(4);if($.push(` ${"global ".padEnd(z)} ${Q} ${R2(q.byScope.global,U)}`),$.push(` ${"project".padEnd(z)} ${J} ${R2(q.byScope.project,U)}`),$.push(""),$.push(B.bold(" Duplicates")),q.duplicateGroups>0)$.push(` ${B.yellow(`${q.duplicateGroups} group(s), ${q.duplicateInstances} total instance(s)`)}`),$.push(B.dim(` Run ${B.bold("asm audit")} to review`));else $.push(` ${B.green("None")}`);return $.push(""),$.join(`
174
+ `)}import{access as XQ,lstat as zQ,readFile as UQ,rm as QQ,symlink as JQ}from"fs/promises";import{join as Z4}from"path";async function X4(q){let $;try{$=await zQ(q)}catch{throw Error(`Path does not exist: ${q}`)}if(!$.isDirectory())throw Error(`Path is not a directory: ${q}`);let Z=Z4(q,"SKILL.md"),X;try{X=await UQ(Z,"utf-8")}catch{throw Error(`No SKILL.md found in ${q}`)}let z=I0(X);if(!z.name)throw Error(`Invalid SKILL.md in ${q}: missing "name" in frontmatter`);return{name:z.name,version:z.version||"0.0.0"}}async function nq(q,$,Z,X){let z=Z4($,Z),U=!1;try{await XQ(z),U=!0}catch{}if(U){if(!X)throw Error(`Target already exists: ${z}. Use --force to overwrite.`);await QQ(z,{recursive:!0,force:!0})}await JQ(q,z,"dir")}var Q4=[{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bcurl\b/,severity:"critical",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bwget\b/,severity:"critical",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bfetch\s*\(/,severity:"warning",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\baxios\b/,severity:"warning",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bhttp\.request\b/,severity:"warning",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bXMLHttpRequest\b/,severity:"warning",permissionType:"network"},{category:"External URLs",description:"Hardcoded URLs that may indicate data exfiltration or remote payload loading",pattern:/https?:\/\/(?!github\.com|localhost|127\.0\.0\.1|example\.com)/,severity:"warning",permissionType:"network"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bexec\s*\(/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bexecSync\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bchild_process\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bspawn\s*\(/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bBun\.spawn\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bshelljs\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\b(?:bash|sh|zsh)\s+-c\b/,severity:"critical",permissionType:"shell"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\beval\s*\(/,severity:"critical",permissionType:"code-execution"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\bnew\s+Function\b/,severity:"critical",permissionType:"code-execution"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\bFunction\s*\(/,severity:"critical",permissionType:"code-execution"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\bimport\s*\(\s*[^'"]/,severity:"warning",permissionType:"code-execution"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\bfs\.(?:write|append|unlink|rm|mkdir|rename)\b/,severity:"warning",permissionType:"filesystem"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\bwriteFile(?:Sync)?\b/,severity:"warning",permissionType:"filesystem"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\brm\s+-rf?\b/,severity:"critical",permissionType:"filesystem"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\bchmod\b/,severity:"warning",permissionType:"filesystem"},{category:"Embedded credentials",description:"Hardcoded secrets, API keys, tokens, or passwords",pattern:/\b(?:API_KEY|SECRET_KEY|ACCESS_TOKEN|PRIVATE_KEY)\s*[=:]/,severity:"critical"},{category:"Embedded credentials",description:"Hardcoded secrets, API keys, tokens, or passwords",pattern:/\bPASSWORD\s*[=:]/,severity:"critical"},{category:"Embedded credentials",description:"Hardcoded secrets, API keys, tokens, or passwords",pattern:/(?:sk|pk)[-_](?:live|test)[-_][a-zA-Z0-9]{20,}/,severity:"critical"},{category:"Environment variable access",description:"Reading environment variables which may contain secrets or configuration",pattern:/\bprocess\.env\b/,severity:"info",permissionType:"environment"},{category:"Environment variable access",description:"Reading environment variables which may contain secrets or configuration",pattern:/\bBun\.env\b/,severity:"info",permissionType:"environment"},{category:"Obfuscation patterns",description:"Base64 encoding, hex strings, or other obfuscation techniques",pattern:/\batob\s*\(/,severity:"warning"},{category:"Obfuscation patterns",description:"Base64 encoding, hex strings, or other obfuscation techniques",pattern:/\bBuffer\.from\s*\([^,]+,\s*['"]base64['"]\)/,severity:"warning"},{category:"Obfuscation patterns",description:"Base64 encoding, hex strings, or other obfuscation techniques",pattern:/\\x[0-9a-fA-F]{2}(?:\\x[0-9a-fA-F]{2}){5,}/,severity:"warning"}];async function GQ(q,$){let Z={owner:q,repo:$,profileUrl:`https://github.com/${q}`,reposUrl:`https://github.com/${q}?tab=repositories`,isOrganization:null,publicRepos:null,accountAge:null,fetchError:null};try{let X=await fetch(`https://api.github.com/users/${q}`,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":"agent-skill-manager"},signal:AbortSignal.timeout(1e4)});if(!X.ok)return Z.fetchError=`GitHub API returned ${X.status}`,Z;let z=await X.json();if(Z.isOrganization=z.type==="Organization",Z.publicRepos=typeof z.public_repos==="number"?z.public_repos:null,typeof z.created_at==="string"){let U=new Date(z.created_at),Q=new Date,J=Math.floor((Q.getTime()-U.getTime())/31557600000),G=Math.floor((Q.getTime()-U.getTime())%31557600000/2630016000.0000005);Z.accountAge=J>0?`${J}y ${G}m`:`${G}m`}x(`security-audit: source analysis for ${q} -> repos=${Z.publicRepos}, org=${Z.isOrganization}, age=${Z.accountAge}`)}catch(X){Z.fetchError=X.message||"Failed to fetch GitHub profile",x(`security-audit: source analysis failed -> ${Z.fetchError}`)}return Z}function HQ(q){let $=new Map;for(let{relPath:z,content:U}of q){let Q=U.split(`
175
+ `);for(let J=0;J<Q.length;J++){let G=Q[J],H=G.trim();for(let W of Q4)if(W.pattern.test(G)){let Y=W.category;if(!$.has(Y))$.set(Y,{description:W.description,matches:[]});let V=H.length>120?H.slice(0,120)+"...":H;$.get(Y).matches.push({file:z,line:J+1,match:V,severity:W.severity})}}}let Z=[];for(let[z,U]of $)Z.push({category:z,description:U.description,matches:U.matches});let X={critical:0,warning:1,info:2};return Z.sort((z,U)=>{let Q=Math.min(...z.matches.map((G)=>X[G.severity])),J=Math.min(...U.matches.map((G)=>X[G.severity]));return Q-J}),Z}function YQ(q){let $=new Map;for(let U of q)for(let Q of U.matches)for(let J of Q4)if(J.permissionType&&J.category===U.category&&J.pattern.test(Q.match)){let G=J.permissionType;if(!$.has(G))$.set(G,{evidence:[],categories:new Set});let H=$.get(G);H.evidence.push({file:Q.file,line:Q.line,match:Q.match}),H.categories.add(U.category);break}let Z={filesystem:"Skill reads, writes, or modifies files on disk. Verify it only accesses intended paths.",shell:"Skill executes shell commands or spawns processes. This allows arbitrary system access.",network:"Skill makes network requests or downloads external content. Data may be sent to remote servers.","code-execution":"Skill dynamically constructs and executes code. This can bypass static analysis.",environment:"Skill reads environment variables, which may contain secrets or API keys."},X=[];for(let[U,Q]of $)X.push({type:U,evidence:Q.evidence,reason:Z[U]});let z={shell:0,"code-execution":1,network:2,filesystem:3,environment:4};return X.sort((U,Q)=>(z[U.type]??99)-(z[Q.type]??99)),X}function VQ(q,$,Z){let X=0,z=0;for(let G of q)for(let H of G.matches){if(H.severity==="critical")X++;if(H.severity==="warning")z++}let U=$.some((G)=>G.type==="shell"),Q=$.some((G)=>G.type==="code-execution"),J=$.some((G)=>G.type==="network");if(U&&J)return{verdict:"dangerous",reason:"Skill has both shell execution and network access -- potential data exfiltration risk."};if(Q&&J)return{verdict:"dangerous",reason:"Skill has dynamic code execution and network access -- potential remote code execution risk."};if(X>=10)return{verdict:"dangerous",reason:`${X} critical findings detected. High concentration of risky patterns.`};if(U||Q)return{verdict:"warning",reason:U?"Skill executes shell commands. Review commands carefully before installing.":"Skill uses dynamic code execution. Review usage carefully."};if(X>0)return{verdict:"warning",reason:`${X} critical finding${X>1?"s":""} detected. Manual review recommended.`};if(z>0)return{verdict:"caution",reason:`${z} warning${z>1?"s":""} found. Generally acceptable but worth reviewing.`};if(Z&&Z.publicRepos!==null&&Z.publicRepos<3)return{verdict:"caution",reason:"No code issues found, but the author has very few public repositories."};return{verdict:"safe",reason:"No suspicious patterns detected."}}async function rq(q,$,Z,X){x(`security-audit: scanning ${q}`);let z=await Xq(q),U=z.reduce((Y,V)=>Y+V.lineCount,0),Q=null;if(Z&&X)Q=await GQ(Z,X);let J=HQ(z),G=YQ(J),{verdict:H,reason:W}=VQ(J,G,Q);return{scannedAt:new Date().toISOString(),skillName:$,skillPath:q,source:Q,codeScans:J,permissions:G,totalFiles:z.length,totalLines:U,verdict:H,verdictReason:W}}var D=B,T0=56,BQ={"Shell execution":"shell","Dynamic code execution":"code-execution","Network requests":"network","External URLs":"network","File system access":"filesystem","Environment variable access":"environment","Embedded credentials":"credentials","Obfuscation patterns":"obfuscation"},z4={critical:0,warning:1,info:2};function WQ(q){switch(q){case"safe":return D.bgGreen(" SAFE ");case"caution":return D.bgCyan(" CAUTION ");case"warning":return D.bgYellow(" WARNING ");case"dangerous":return D.bgRed(" DANGEROUS ")}}function _Q(q){switch(q){case"safe":return D.green;case"caution":return D.cyan;case"warning":return D.yellow;case"dangerous":return D.red}}function S0(q){switch(q){case"critical":return D.red("!!");case"warning":return D.yellow(" !");case"info":return D.dim(" i")}}function A2(q,$){return q.length>$?q.slice(0,$-3)+"...":q}function oq(q){return q.toLocaleString("en-US")}function J4(q){return q.replace(/\x1b\[[0-9;]*m/g,"")}function U4(q){return J4(q).length}function FQ(q){let $=new Map;for(let Z of q){let X=`${Z.file}:${Z.line}`,z=$.get(X);if(!z||z4[Z.severity]<z4[z.severity])$.set(X,Z)}return Array.from($.values())}function TQ(q){let $=new Map;for(let Z of q){let X=$.get(Z.file);if(!X)X={file:Z.file,entries:[]},$.set(Z.file,X);X.entries.push({line:Z.line,match:Z.match,severity:Z.severity})}return Array.from($.values())}function tq(q){let $=[],Z=WQ(q.verdict),X=J4(Z),z=` ${D.bold(q.skillName)}`,U=` ${q.skillName}`,Q=T0-4,J=Math.max(1,Q-U.length-X.length);if($.push(""),$.push(D.dim(" ┌─ ")+D.bold("Security Audit")+D.dim(" "+"─".repeat(T0-19)+"┐")),$.push(D.dim(" │")+z+" ".repeat(J)+Z+D.dim("│")),$.push(D.dim(" │")+D.dim(` ${oq(q.totalFiles)} files · ${oq(q.totalLines)} lines`)+" ".repeat(Math.max(1,Q-` ${oq(q.totalFiles)} files · ${oq(q.totalLines)} lines`.length))+D.dim("│")),$.push(D.dim(" └"+"─".repeat(T0-2)+"┘")),q.source){let Y=q.source;if(Y.fetchError)$.push(` ${D.yellow("!")} Could not fetch profile: ${Y.fetchError}`);else{let V=[];if(V.push(`${Y.owner} ${Y.isOrganization?D.cyan("(org)"):D.dim("(user)")}`),Y.publicRepos!==null){let T=Y.publicRepos,L=T<3?D.yellow(`${T} repos`):T<10?D.cyan(`${T} repos`):D.green(`${T} repos`);V.push(L)}if(Y.accountAge)V.push(Y.accountAge);$.push(` ${D.dim("Author:")} ${V.join(D.dim(" · "))}`)}}if($.push(""),q.codeScans.length===0)$.push(` ${D.green("✓")} ${D.green("No suspicious patterns detected.")}`);else{let Y=_Q(q.verdict),V=q.verdict==="dangerous"||q.verdict==="warning"?S0("critical"):q.verdict==="caution"?S0("warning"):S0("info");$.push(` ${V} ${Y(q.verdictReason)}`);let T=0,L=0,F=0;for(let R of q.codeScans)for(let M of R.matches)if(M.severity==="critical")T++;else if(M.severity==="warning")L++;else F++;let _=[];if(T>0)_.push(D.red(`${T} critical`));if(L>0)_.push(D.yellow(`${L} warning`));if(F>0)_.push(D.dim(`${F} info`));let O=q.permissions.map((R)=>R.type),A=O.length>0?D.dim(`Perms: ${O.join(", ")}`):"";$.push(` ${_.join(D.dim(" · "))} ${A}`)}if($.push(""),q.codeScans.length>0){$.push(` ${D.bold("Findings")}`),$.push(D.dim(" "+"━".repeat(T0-2)));for(let Y of q.codeScans){let V=FQ(Y.matches),T=V.filter((b)=>b.severity==="critical").length,L=V.filter((b)=>b.severity==="warning").length,F=V.filter((b)=>b.severity==="info").length,_=T>0?S0("critical"):L>0?S0("warning"):S0("info"),O=[];if(T>0)O.push(D.red(`${T} critical`));if(L>0)O.push(D.yellow(`${L} warning`));if(F>0)O.push(D.dim(`${F} info`));let A=BQ[Y.category],R=A?D.dim(`PERM: ${A}`):"",M=` ${_} ${D.bold(Y.category)} (${O.join(", ")})`;if(R){let b=U4(M),u=U4(R),C=Math.max(2,T0-b-u);$.push(M+" ".repeat(C)+R)}else $.push(M);let w=TQ(V),P=Math.min(24,Math.max(...w.map((b)=>b.file.length))),j=0,K=3;for(let b of w){if(j>=K)break;let u=A2(b.file,24),C=D.dim(u.padEnd(P));if(b.entries.length===1){let s=b.entries[0],O0=A2(s.match,50);$.push(` ${C} :${s.line} ${D.dim("--")} ${s.severity==="critical"?O0:D.dim(O0)}`),j++}else if(b.entries.length<=3){let s=b.entries.map((eq)=>`:${eq.line}`).join(", "),O0=A2(b.entries[0].match,40);$.push(` ${C} ${s} ${D.dim("--")} ${D.dim(O0)}`),j++}else{let O0=b.entries.slice(0,3).map((w4)=>`:${w4.line}`).join(", "),eq=b.entries.length-3;$.push(` ${C} ${O0} ${D.dim(`(+${eq} more)`)}`),j++}}let E=w.length-Math.min(w.length,K);if(E>0){let b=V.length-w.slice(0,K).reduce((u,C)=>u+C.entries.length,0);if(b>0)$.push(` ${D.dim(`... ${b} more in ${E} file${E>1?"s":""}`)}`)}$.push("")}}$.push(D.dim(" "+"━".repeat(T0-2)));let G=new Date(q.scannedAt),H=`${G.getFullYear()}-${String(G.getMonth()+1).padStart(2,"0")}-${String(G.getDate()).padStart(2,"0")} ${String(G.getHours()).padStart(2,"0")}:${String(G.getMinutes()).padStart(2,"0")}`,W=q.source&&!q.source.fetchError?`github.com/${q.source.owner}`:"";if(W){let Y=Math.max(2,T0-2-H.length-W.length);$.push(D.dim(` ${H}${" ".repeat(Y)}${W}`))}else $.push(D.dim(` ${H}`));return $.push(""),$.join(`
176
+ `)}function K2(q){return JSON.stringify(q,null,2)}function LQ(q){let $=q.slice(2),Z={command:null,subcommand:null,positional:[],flags:{help:!1,version:!1,json:!1,yes:!1,noColor:!1,scope:"both",sort:"name",provider:null,name:null,force:!1,path:null,all:!1,verbose:!1,flat:!1,transport:"auto"}},X=0;while(X<$.length){let z=$[X];if(z==="--help"||z==="-h")Z.flags.help=!0;else if(z==="--version"||z==="-v")Z.flags.version=!0;else if(z==="--json")Z.flags.json=!0;else if(z==="--yes"||z==="-y")Z.flags.yes=!0;else if(z==="--no-color")Z.flags.noColor=!0;else if(z==="--scope"||z==="-s"){X++;let U=$[X];if(U==="global"||U==="project"||U==="both")Z.flags.scope=U;else S(`Invalid scope: "${U}". Must be global, project, or both.`),process.exit(2)}else if(z==="--sort"){X++;let U=$[X];if(U==="name"||U==="version"||U==="location")Z.flags.sort=U;else S(`Invalid sort: "${U}". Must be name, version, or location.`),process.exit(2)}else if(z==="--provider"||z==="-p")X++,Z.flags.provider=$[X]||null;else if(z==="--name")X++,Z.flags.name=$[X]||null;else if(z==="--force"||z==="-f")Z.flags.force=!0;else if(z==="--path")X++,Z.flags.path=$[X]||null;else if(z==="--all")Z.flags.all=!0;else if(z==="--verbose"||z==="-V")Z.flags.verbose=!0;else if(z==="--flat")Z.flags.flat=!0;else if(z==="--transport"||z==="-t"){X++;let U=$[X];if(U==="https"||U==="ssh"||U==="auto")Z.flags.transport=U;else S(`Invalid transport: "${U}". Must be https, ssh, or auto.`),process.exit(2)}else if(z.startsWith("-"))S(`Unknown option: ${z}`),console.error('Run "asm --help" for usage.'),process.exit(2);else if(!Z.command)Z.command=z;else if(!Z.subcommand)Z.subcommand=z;else Z.positional.push(z);X++}return Z}function S(q){console.error(B.red(`Error: ${q}`))}function OQ(){console.log(`${B.blueBold("agent-skill-manager")} (${B.bold("asm")}) ${b2}
172
177
 
173
178
  Interactive TUI and CLI for managing installed skills for AI coding agents.
174
179
 
175
- ${T.bold("Usage:")}
180
+ ${B.bold("Usage:")}
176
181
  asm Launch interactive TUI
177
182
  asm <command> [options] Run a CLI command
178
183
 
179
- ${T.bold("Commands:")}
184
+ ${B.bold("Commands:")}
180
185
  list List all discovered skills
181
186
  search <query> Search skills by name/description/provider
182
187
  inspect <skill-name> Show detailed info for a skill
183
188
  uninstall <skill-name> Remove a skill (with confirmation)
184
189
  install <source> Install a skill from GitHub
185
190
  audit Detect duplicate skills across providers
191
+ audit security <name> Run security audit on a skill (or GitHub source)
186
192
  export Export skill inventory as JSON manifest
187
193
  init <name> Scaffold a new skill with SKILL.md template
188
194
  stats Show aggregate skill metrics dashboard
@@ -192,7 +198,7 @@ ${T.bold("Commands:")}
192
198
  config reset Reset config to defaults
193
199
  config edit Open config in $EDITOR
194
200
 
195
- ${T.bold("Global Options:")}
201
+ ${B.bold("Global Options:")}
196
202
  -h, --help Show help for any command
197
203
  -v, --version Print version and exit
198
204
  --json Output as JSON (list, search, inspect)
@@ -202,12 +208,12 @@ ${T.bold("Global Options:")}
202
208
  --sort <field> Sort by: name, version, or location (default: name)
203
209
  --flat Show one row per provider instance (list, search)
204
210
  -y, --yes Skip confirmation prompts
205
- -V, --verbose Show debug output`)}function mQ(){console.log(`${T.bold("Usage:")} asm list [options]
211
+ -V, --verbose Show debug output`)}function IQ(){console.log(`${B.bold("Usage:")} asm list [options]
206
212
 
207
213
  List all discovered skills. By default, skills installed across multiple
208
214
  providers are grouped into a single row with provider badges.
209
215
 
210
- ${T.bold("Options:")}
216
+ ${B.bold("Options:")}
211
217
  --sort <field> Sort by: name, version, or location (default: name)
212
218
  -s, --scope <s> Filter: global, project, or both (default: both)
213
219
  -p, --provider <p> Filter by provider (claude, codex, openclaw, agents)
@@ -216,18 +222,18 @@ ${T.bold("Options:")}
216
222
  --no-color Disable ANSI colors
217
223
  -V, --verbose Show debug output
218
224
 
219
- ${T.bold("Examples:")}
220
- asm list ${T.dim("List all skills (grouped)")}
221
- asm list --flat ${T.dim("One row per provider instance")}
222
- asm list -p claude ${T.dim("Only Claude Code skills")}
223
- asm list -s project ${T.dim("Only project-scoped skills")}
224
- asm list --sort version ${T.dim("Sort by version")}
225
- asm list --json ${T.dim("Output as JSON")}`)}function pQ(){console.log(`${T.bold("Usage:")} asm search <query> [options]
225
+ ${B.bold("Examples:")}
226
+ asm list ${B.dim("List all skills (grouped)")}
227
+ asm list --flat ${B.dim("One row per provider instance")}
228
+ asm list -p claude ${B.dim("Only Claude Code skills")}
229
+ asm list -s project ${B.dim("Only project-scoped skills")}
230
+ asm list --sort version ${B.dim("Sort by version")}
231
+ asm list --json ${B.dim("Output as JSON")}`)}function RQ(){console.log(`${B.bold("Usage:")} asm search <query> [options]
226
232
 
227
233
  Search skills by name, description, or provider. Matching terms are
228
234
  highlighted in the output.
229
235
 
230
- ${T.bold("Options:")}
236
+ ${B.bold("Options:")}
231
237
  --sort <field> Sort by: name, version, or location (default: name)
232
238
  -s, --scope <s> Filter: global, project, or both (default: both)
233
239
  -p, --provider <p> Filter by provider (claude, codex, openclaw, agents)
@@ -236,174 +242,186 @@ ${T.bold("Options:")}
236
242
  --no-color Disable ANSI colors
237
243
  -V, --verbose Show debug output
238
244
 
239
- ${T.bold("Examples:")}
240
- asm search code ${T.dim("Search for 'code' in all fields")}
241
- asm search review -p claude ${T.dim("Search within Claude Code only")}
242
- asm search "test" -s global ${T.dim("Search global skills only")}
243
- asm search openspec --json ${T.dim("Output matches as JSON")}`)}function dQ(){console.log(`${T.bold("Usage:")} asm inspect <skill-name> [options]
245
+ ${B.bold("Examples:")}
246
+ asm search code ${B.dim("Search for 'code' in all fields")}
247
+ asm search review -p claude ${B.dim("Search within Claude Code only")}
248
+ asm search "test" -s global ${B.dim("Search global skills only")}
249
+ asm search openspec --json ${B.dim("Output matches as JSON")}`)}function AQ(){console.log(`${B.bold("Usage:")} asm inspect <skill-name> [options]
244
250
 
245
251
  Show detailed information for a skill. The <skill-name> is the directory name.
246
252
  Shows version, description, file count, and all provider installations.
247
253
 
248
- ${T.bold("Options:")}
254
+ ${B.bold("Options:")}
249
255
  -s, --scope <s> Filter: global, project, or both (default: both)
250
256
  --json Output as JSON object
251
257
  --no-color Disable ANSI colors
252
258
  -V, --verbose Show debug output
253
259
 
254
- ${T.bold("Examples:")}
255
- asm inspect code-review ${T.dim("Show details for code-review")}
256
- asm inspect code-review --json ${T.dim("Output as JSON")}
257
- asm inspect code-review -s global ${T.dim("Global installations only")}`)}function lQ(){console.log(`${T.bold("Usage:")} asm uninstall <skill-name> [options]
260
+ ${B.bold("Examples:")}
261
+ asm inspect code-review ${B.dim("Show details for code-review")}
262
+ asm inspect code-review --json ${B.dim("Output as JSON")}
263
+ asm inspect code-review -s global ${B.dim("Global installations only")}`)}function KQ(){console.log(`${B.bold("Usage:")} asm uninstall <skill-name> [options]
258
264
 
259
265
  Remove a skill and its associated rule files. Shows a removal plan
260
266
  before proceeding and asks for confirmation.
261
267
 
262
- ${T.bold("Options:")}
268
+ ${B.bold("Options:")}
263
269
  -y, --yes Skip confirmation prompt
264
270
  -s, --scope <s> Filter: global, project, or both (default: both)
265
271
  --no-color Disable ANSI colors
266
272
  -V, --verbose Show debug output
267
273
 
268
- ${T.bold("Examples:")}
269
- asm uninstall code-review ${T.dim("Remove with confirmation")}
270
- asm uninstall code-review -y ${T.dim("Remove without confirmation")}
271
- asm uninstall code-review -s project ${T.dim("Remove project copy only")}`)}function cQ(){console.log(`${T.bold("Usage:")} asm audit [subcommand] [options]
274
+ ${B.bold("Examples:")}
275
+ asm uninstall code-review ${B.dim("Remove with confirmation")}
276
+ asm uninstall code-review -y ${B.dim("Remove without confirmation")}
277
+ asm uninstall code-review -s project ${B.dim("Remove project copy only")}`)}function MQ(){console.log(`${B.bold("Usage:")} asm audit [subcommand] [options]
272
278
 
273
- Detect and optionally remove duplicate skills. Duplicate detection
274
- considers both directory names and SKILL.md frontmatter names.
279
+ Detect duplicate skills or run security audits on installed/remote skills.
275
280
 
276
- ${T.bold("Subcommands:")}
277
- duplicates Find duplicate skills (default)
281
+ ${B.bold("Subcommands:")}
282
+ duplicates Find duplicate skills (default)
283
+ security <name|source> Run security audit on an installed skill or GitHub source
278
284
 
279
- ${T.bold("Options:")}
285
+ ${B.bold("Options:")}
280
286
  --json Output as JSON
281
287
  -y, --yes Auto-remove duplicates, keeping one instance per group
288
+ -s, --scope <s> Filter: global, project, or both (default: both)
282
289
  --no-color Disable ANSI colors
283
290
  -V, --verbose Show debug output
284
291
 
285
- ${T.bold("Examples:")}
286
- asm audit ${T.dim("Find duplicates")}
287
- asm audit -y ${T.dim("Auto-remove duplicates")}
288
- asm audit --json ${T.dim("Output as JSON")}`)}function aQ(){console.log(`${T.bold("Usage:")} asm config <subcommand>
292
+ ${B.bold("Examples:")}
293
+ asm audit ${B.dim("Find duplicates")}
294
+ asm audit -y ${B.dim("Auto-remove duplicates")}
295
+ asm audit --json ${B.dim("Output as JSON")}
296
+ asm audit security code-review ${B.dim("Audit an installed skill")}
297
+ asm audit security github:user/repo ${B.dim("Audit a remote skill before installing")}
298
+ asm audit security --all ${B.dim("Audit all installed skills")}
299
+ asm audit security code-review --json ${B.dim("Output audit as JSON")}`)}function DQ(){console.log(`${B.bold("Usage:")} asm config <subcommand>
289
300
 
290
301
  Manage configuration. Config is stored at ~/.config/agent-skill-manager/.
291
302
 
292
- ${T.bold("Subcommands:")}
303
+ ${B.bold("Subcommands:")}
293
304
  show Print current config as JSON
294
305
  path Print config file path
295
306
  reset Reset config to defaults (with confirmation)
296
307
  edit Open config in $EDITOR
297
308
 
298
- ${T.bold("Options:")}
309
+ ${B.bold("Options:")}
299
310
  -V, --verbose Show debug output
300
311
 
301
- ${T.bold("Examples:")}
302
- asm config show ${T.dim("View current config")}
303
- asm config edit ${T.dim("Edit in $EDITOR")}
304
- asm config reset -y ${T.dim("Reset without confirmation")}`)}async function Q4(q){for(let $ of q)$.warnings=await x1($)}async function iQ(q){if(q.flags.help){mQ();return}let $=await x(),Z=await X0($,q.flags.scope);if(q.flags.provider&&q.command==="list")Z=Z.filter((X)=>X.provider===q.flags.provider);await Q4(Z);let U=J2(Z,q.flags.sort);if(q.flags.json)console.log(U0(U));else if(q.flags.flat){let X=Y2(U),Q=U.filter((z)=>z.warnings&&z.warnings.length>0);if(Q.length>0)X+=`
305
- ${T.yellow(`${Q.length} skill${Q.length===1?"":"s"} with warnings -- use --json for details`)}`;console.log(X)}else console.log(e1(U))}async function sQ(q){if(q.flags.help){pQ();return}let $=q.subcommand;if(!$)j("Missing required argument: <query>"),console.error('Run "asm search --help" for usage.'),process.exit(2);let Z=await x(),U=await X0(Z,q.flags.scope);if(q.flags.provider)U=U.filter((z)=>z.provider===q.flags.provider);let X=s1(U,$),Q=J2(X,q.flags.sort);if(q.flags.json)console.log(U0(Q));else if(q.flags.flat)console.log(Y2(Q));else console.log(q4(Q,$))}async function nQ(q){if(q.flags.help){dQ();return}let $=q.subcommand;if(!$)j("Missing required argument: <skill-name>"),console.error('Run "asm inspect --help" for usage.'),process.exit(2);let Z=await x(),X=(await X0(Z,q.flags.scope)).filter((Q)=>Q.dirName===$);if(X.length===0)j(`Skill "${$}" not found.`),console.error(T.dim(`Try ${T.bold("asm list")} to see all skills or ${T.bold(`asm search "${$}"`)} to search.`)),process.exit(1);if(await Q4(X),q.flags.json)console.log(U0(X.length===1?X[0]:X));else console.log(await $4(X))}async function rQ(q){if(q.flags.help){lQ();return}let $=q.subcommand;if(!$)j("Missing required argument: <skill-name>"),console.error('Run "asm uninstall --help" for usage.'),process.exit(2);let Z=await x(),U=await X0(Z,q.flags.scope),X=r1($,U,Z),Q=await o1(X);if(Q.length===0)j(`Skill "${$}" not found or nothing to remove.`),process.exit(1);console.error(T.bold("Removal plan:"));for(let G of Q)console.error(` ${T.red("•")} ${t1(G)}`);if(!q.flags.yes){if(!process.stdin.isTTY)j("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
306
- ${T.bold("Proceed with removal?")} [y/N] `);let G=await V0();if(G.toLowerCase()!=="y"&&G.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let z=await H2(X);for(let G of z)console.error(G);console.error(T.green(`
307
- Done.`))}function V0(){return new Promise((q)=>{let $="",Z=!1;function U(){process.stdin.removeListener("data",Q),process.stdin.removeListener("end",z),process.stdin.pause(),clearTimeout(G)}function X(J){if(Z)return;Z=!0,U(),q(J)}function Q(J){if($+=J,$.includes(`
308
- `))X($.trim())}function z(){X($.trim())}let G=setTimeout(()=>{X($.trim())},30000);process.stdin.setEncoding("utf-8"),process.stdin.on("data",Q),process.stdin.on("end",z),process.stdin.resume()})}async function oQ(q){if(q.flags.help){cQ();return}let $=q.subcommand??"duplicates";if($!=="duplicates")j(`Unknown audit subcommand: "${$}". Use: duplicates`),process.exit(2);let Z=await x(),U=await X0(Z,"both"),X=B2(U);if(q.flags.json){console.log(X4(X));return}if(console.log(U4(X)),q.flags.yes&&X.duplicateGroups.length>0){console.error(T.bold(`
309
- Auto-removing duplicates...`));for(let Q of X.duplicateGroups){let z=Z4(Q.instances);for(let G=1;G<z.length;G++){let J=z[G],H=n1(J,Z),W=await H2(H);for(let Y of W)console.error(Y)}}console.error(T.green(`
310
- Done.`))}}async function tQ(q){if(q.flags.help){aQ();return}let $=q.subcommand;if(!$)j("Missing subcommand. Use: show, path, reset, or edit."),console.error('Run "asm config --help" for usage.'),process.exit(2);switch($){case"show":{let Z=await x();console.log(U0(Z));break}case"path":{console.log(G2());break}case"reset":{if(!q.flags.yes){if(!process.stdin.isTTY)j("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`${T.bold("Reset config to defaults?")} [y/N] `);let U=await V0();if(U.toLowerCase()!=="y"&&U.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let Z=a1();await i1(Z),console.error(T.green("Config reset to defaults."));break}case"edit":{let Z=process.env.VISUAL||process.env.EDITOR||"vi",U=G2();await x();let{spawn:X}=await import("child_process");await new Promise((Q,z)=>{let G=X(Z,[U],{stdio:"inherit"});G.on("close",()=>Q()),G.on("error",z)});break}default:j(`Unknown config subcommand: "${$}". Use: show, path, reset, or edit.`),process.exit(2)}}function eQ(){console.log(`${T.bold("Usage:")} asm install <source> [options]
312
+ ${B.bold("Examples:")}
313
+ asm config show ${B.dim("View current config")}
314
+ asm config edit ${B.dim("Edit in $EDITOR")}
315
+ asm config reset -y ${B.dim("Reset without confirmation")}`)}async function K4(q){for(let $ of q)$.warnings=await s9($)}async function wQ(q){if(q.flags.help){IQ();return}let $=await g(),Z=await a($,q.flags.scope);if(q.flags.provider&&q.command==="list")Z=Z.filter((z)=>z.provider===q.flags.provider);await K4(Z);let X=w2(Z,q.flags.sort);if(q.flags.json)console.log(G0(X));else if(q.flags.flat){let z=N2(X),U=X.filter((Q)=>Q.warnings&&Q.warnings.length>0);if(U.length>0)z+=`
316
+ ${B.yellow(`${U.length} skill${U.length===1?"":"s"} with warnings -- use --json for details`)}`;console.log(z)}else console.log(T4(X))}async function PQ(q){if(q.flags.help){RQ();return}let $=q.subcommand;if(!$)S("Missing required argument: <query>"),console.error('Run "asm search --help" for usage.'),process.exit(2);let Z=await g(),X=await a(Z,q.flags.scope);if(q.flags.provider)X=X.filter((Q)=>Q.provider===q.flags.provider);let z=V4(X,$),U=w2(z,q.flags.sort);if(q.flags.json)console.log(G0(U));else if(q.flags.flat)console.log(N2(U));else console.log(L4(U,$))}async function NQ(q){if(q.flags.help){AQ();return}let $=q.subcommand;if(!$)S("Missing required argument: <skill-name>"),console.error('Run "asm inspect --help" for usage.'),process.exit(2);let Z=await g(),z=(await a(Z,q.flags.scope)).filter((U)=>U.dirName===$);if(z.length===0)S(`Skill "${$}" not found.`),console.error(B.dim(`Try ${B.bold("asm list")} to see all skills or ${B.bold(`asm search "${$}"`)} to search.`)),process.exit(1);if(await K4(z),q.flags.json)console.log(G0(z.length===1?z[0]:z));else console.log(await O4(z))}async function jQ(q){if(q.flags.help){KQ();return}let $=q.subcommand;if(!$)S("Missing required argument: <skill-name>"),console.error('Run "asm uninstall --help" for usage.'),process.exit(2);let Z=await g(),X=await a(Z,q.flags.scope),z=W4($,X,Z),U=await _4(z);if(U.length===0)S(`Skill "${$}" not found or nothing to remove.`),process.exit(1);console.error(B.bold("Removal plan:"));for(let J of U)console.error(` ${B.red("•")} ${F4(J)}`);if(!q.flags.yes){if(!process.stdin.isTTY)S("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
317
+ ${B.bold("Proceed with removal?")} [y/N] `);let J=await L0();if(J.toLowerCase()!=="y"&&J.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let Q=await P2(z);for(let J of Q)console.error(J);console.error(B.green(`
318
+ Done.`))}function L0(){return new Promise((q)=>{let $="",Z=!1;function X(){process.stdin.removeListener("data",U),process.stdin.removeListener("end",Q),process.stdin.pause(),clearTimeout(J)}function z(G){if(Z)return;Z=!0,X(),q(G)}function U(G){if($+=G,$.includes(`
319
+ `))z($.trim())}function Q(){z($.trim())}let J=setTimeout(()=>{z($.trim())},30000);process.stdin.setEncoding("utf-8"),process.stdin.on("data",U),process.stdin.on("end",Q),process.stdin.resume()})}async function bQ(q){if(q.flags.help){MQ();return}let $=q.subcommand??"duplicates";if($==="security"){await CQ(q);return}if($!=="duplicates")S(`Unknown audit subcommand: "${$}". Use: duplicates, security`),process.exit(2);let Z=await g(),X=await a(Z,"both"),z=j2(X);if(q.flags.json){console.log(A4(z));return}if(console.log(R4(z)),q.flags.yes&&z.duplicateGroups.length>0){console.error(B.bold(`
320
+ Auto-removing duplicates...`));for(let U of z.duplicateGroups){let Q=I4(U.instances),J=Q[0].path;for(let G=1;G<Q.length;G++){let H=Q[G],W=B4(H,Z),Y=await P2(W,J);for(let V of Y)console.error(V)}}console.error(B.green(`
321
+ Done.`))}}async function CQ(q){let $=q.positional[0];if(q.flags.all)await SQ(q);else if(!$)S(`Missing target. Provide a skill name, GitHub source, or use --all.
322
+ Usage: asm audit security <name|github:owner/repo> [--all]`),process.exit(2);else if($.startsWith("github:")||$.startsWith("https://github.com/"))await EQ(q,$);else await fQ(q,$)}async function SQ(q){let $=await g(),Z=await a($,q.flags.scope);if(Z.length===0){console.log("No skills found to audit.");return}let X=new Set,z=Z.filter((Q)=>{if(X.has(Q.realPath))return!1;return X.add(Q.realPath),!0});console.error(`Auditing ${z.length} skill${z.length>1?"s":""}...
323
+ `);let U=[];for(let Q of z){console.error(` Scanning ${B.bold(Q.name)}...`);let J=await rq(Q.realPath,Q.name);U.push(J)}if(q.flags.json)console.log(JSON.stringify(U,null,2));else{for(let J of U)console.log(tq(J));let Q={safe:0,caution:0,warning:0,dangerous:0};for(let J of U)Q[J.verdict]++;if(console.log(B.bold(`
324
+ Summary:`)),Q.dangerous>0)console.log(` ${B.red(`${Q.dangerous} dangerous`)}`);if(Q.warning>0)console.log(` ${B.yellow(`${Q.warning} warning`)}`);if(Q.caution>0)console.log(` ${Q.caution} caution`);if(Q.safe>0)console.log(` ${B.green(`${Q.safe} safe`)}`);console.log("")}}async function EQ(q,$){let Z=null;try{let X=z$($);console.error(`Cloning ${$} for audit...`),await U$(),Z=await Q$(X,q.flags.transport);let{name:z}=await E0(Z),U=await rq(Z,z,X.owner,X.repo);if(q.flags.json)console.log(K2(U));else console.log(tq(U))}catch(X){S(X.message),process.exit(1)}finally{if(Z)await t(Z)}}async function fQ(q,$){let Z=await g(),z=(await a(Z,q.flags.scope)).filter((J)=>J.dirName===$);if(z.length===0)S(`Skill "${$}" not found. Use "asm list" to see installed skills.`),process.exit(1);let U=z[0];console.error(`Auditing installed skill: ${B.bold(U.name)}...
325
+ `);let Q=await rq(U.realPath,U.name);if(q.flags.json)console.log(K2(Q));else console.log(tq(Q))}async function yQ(q){if(q.flags.help){DQ();return}let $=q.subcommand;if(!$)S("Missing subcommand. Use: show, path, reset, or edit."),console.error('Run "asm config --help" for usage.'),process.exit(2);switch($){case"show":{let Z=await g();console.log(G0(Z));break}case"path":{console.log(D2());break}case"reset":{if(!q.flags.yes){if(!process.stdin.isTTY)S("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`${B.bold("Reset config to defaults?")} [y/N] `);let X=await L0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let Z=H4();await Y4(Z),console.error(B.green("Config reset to defaults."));break}case"edit":{let Z=process.env.VISUAL||process.env.EDITOR||"vi",X=D2();await g();let{spawn:z}=await import("child_process");await new Promise((U,Q)=>{let J=z(Z,[X],{stdio:"inherit"});J.on("close",()=>U()),J.on("error",Q)});break}default:S(`Unknown config subcommand: "${$}". Use: show, path, reset, or edit.`),process.exit(2)}}function xQ(){console.log(`${B.bold("Usage:")} asm install <source> [options]
311
326
 
312
327
  Install a skill from a GitHub repository.
313
328
 
314
- ${T.bold("Source Format:")}
329
+ ${B.bold("Source Format:")}
315
330
  github:owner/repo Install from default branch
316
331
  github:owner/repo#ref Install from specific branch or tag
317
332
  https://github.com/owner/repo Install via HTTPS URL
318
333
 
319
- ${T.bold("Options:")}
334
+ ${B.bold("Options:")}
320
335
  -p, --provider <name> Target provider (claude, codex, openclaw, agents, all)
321
336
  Use "all" to install to all providers (shared + symlinks)
322
337
  --name <name> Override skill directory name
323
338
  --path <subdir> Install skill from a subdirectory of the repo
324
339
  --all Install all skills found in the repo
340
+ -t, --transport <mode> Transport: https, ssh, or auto (default: auto)
341
+ auto tries HTTPS first, falls back to SSH on auth error
325
342
  -f, --force Overwrite if skill already exists
326
343
  -y, --yes Skip confirmation prompt
327
344
  --json Output result as JSON
328
345
  --no-color Disable ANSI colors
329
346
  -V, --verbose Show debug output
330
347
 
331
- ${T.bold("Single-skill repo:")}
348
+ ${B.bold("Single-skill repo:")}
332
349
  asm install github:user/my-skill
333
350
  asm install github:user/my-skill#v1.0.0 -p claude
334
351
  asm install https://github.com/user/my-skill
335
- asm install github:user/my-skill -p all ${T.dim("(install to all providers)")}
352
+ asm install github:user/my-skill -p all ${B.dim("(install to all providers)")}
353
+ asm install github:user/private-skill -t ssh ${B.dim("(clone via SSH)")}
336
354
 
337
- ${T.bold("Multi-skill repo:")}
355
+ ${B.bold("Multi-skill repo:")}
338
356
  asm install github:user/skills --path skills/code-review
339
357
  asm install github:user/skills --all -p claude -y
340
- asm install github:user/skills --all -p all -y ${T.dim("(all skills, all providers)")}
358
+ asm install github:user/skills --all -p all -y ${B.dim("(all skills, all providers)")}
341
359
  asm install https://github.com/user/skills --all
342
- asm install github:user/skills ${T.dim("(interactive picker)")}`)}async function z2(q,$,Z,U,X,Q,z,G,J,H){let W=await e0(X),Y=H!==void 0,B=await M2(X),_=X===U?null:X.split("/").pop(),O=Q||_||Z.repo,V=t0(O),I=D2(Z,U,X,V,G,q.flags.force);if(await w2(I.targetDir,I.force),Y){let L=`[${H.index}/${H.total}]`,A=B.length>0?` ${T.yellow(`(${B.length} warning${B.length>1?"s":""})`)}`:"";console.error(`${T.dim(L)} ${T.bold(W.name)} v${W.version}${A}`)}else{if(console.error(`Found skill: ${W.name} v${W.version}`),console.error(`
343
- ${T.bold("Install preview:")}`),console.error(` Name: ${W.name}`),console.error(` Version: ${W.version}`),W.description)console.error(` Description: ${W.description}`);if(console.error(` Source: ${$}`),J)console.error(` Provider: All (${J.map((L)=>L.label).join(", ")})`),console.error(` Primary: ${G.label} (${G.name})`),console.error(` Symlinks: ${J.filter((L)=>L.name!==G.name).map((L)=>L.label).join(", ")}`);else console.error(` Provider: ${G.label} (${G.name})`);if(console.error(` Target: ${I.targetDir}`),B.length>0){console.error(`
344
- ${T.yellow(T.bold("Security warnings:"))}`);let L=new Map;for(let A of B){let M=L.get(A.category)||[];M.push(A),L.set(A.category,M)}for(let[A,M]of L){console.error(`
345
- ${T.yellow(`[${A}]`)} (${M.length} match${M.length>1?"es":""})`);for(let K of M.slice(0,5))console.error(` ${T.dim(K.file)}:${K.line} -- ${K.match}`);if(M.length>5)console.error(` ... and ${M.length-5} more`)}}if(!q.flags.yes&&!q.flags.all){if(!process.stdin.isTTY)j("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
346
- ${T.bold("Proceed with installation?")} [y/N] `);let L=await V0();if(L.toLowerCase()!=="y"&&L.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}if(!Y)console.error(`
347
- Installing to ${I.targetDir}...`);if(J)return await K2(I,J);return await aq(I)}async function qz(q){if(q.flags.help){eQ();return}let $=q.subcommand;if(!$)j("Missing required argument: <source>"),console.error('Run "asm install --help" for usage.'),process.exit(2);let Z=null,U=()=>{if(Z)qq(Z).finally(()=>process.exit(1));else process.exit(1)};process.on("SIGINT",U),process.on("SIGTERM",U);try{let X=L2($);console.error(`Parsing source: ${$}`),await F2(),console.error(`Cloning ${X.cloneUrl}${X.ref?` (ref: ${X.ref})`:""}...`),Z=await R2(X);let Q=await x(),{provider:z,allProviders:G}=await $q(Q,q.flags.provider,!!process.stdin.isTTY),{join:J}=await import("path"),H=[];if(q.flags.path){let W=J(Z,q.flags.path);try{await e0(W)}catch{throw Error(`No SKILL.md found at path "${q.flags.path}" in the repository.`)}let Y=await z2(q,$,X,Z,W,q.flags.name,Q,z,G);H.push(Y)}else{let W=!1;try{await e0(Z),W=!0}catch{}if(W){let Y=await z2(q,$,X,Z,Z,q.flags.name,Q,z,G);H.push(Y)}else{console.error("No SKILL.md at repository root. Scanning for skills...");let Y=await A2(Z);if(Y.length===0)throw Error("No skills found in this repository. Skills must have a SKILL.md file.");console.error(`Found ${Y.length} skill(s):
348
- `);for(let O=0;O<Y.length;O++)if(console.error(` ${T.bold(`${O+1})`)} ${Y[O].name} v${Y[O].version} ${T.dim(`(${Y[O].relPath})`)}`),Y[O].description)console.error(` ${Y[O].description}`);let B;if(q.flags.all){if(B=Y.map((O)=>O.relPath),console.error(`
349
- Installing all ${B.length} skills...`),!q.flags.yes){if(!process.stdin.isTTY)j("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
350
- ${T.bold(`Install all ${B.length} skills?`)} [y/N] `);let O=await V0();if(O.toLowerCase()!=="y"&&O.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}else if(process.stdin.isTTY){process.stderr.write(`
351
- Enter skill number (or "all"): `);let O=await V0();if(O.toLowerCase()==="all")B=Y.map((V)=>V.relPath);else{let V=parseInt(O,10)-1;if(isNaN(V)||V<0||V>=Y.length)throw Error("Invalid selection. Aborting.");B=[Y[V].relPath]}}else j(`Repository contains ${Y.length} skills. Use --path <subdir> to pick one or --all to install all.
360
+ asm install github:user/skills ${B.dim("(interactive picker)")}`)}async function M2(q,$,Z,X,z,U,Q,J,G,H){let W=await E0(z),Y=H!==void 0,V=await x2(z),T=z===X?null:z.split("/").pop(),L=U||T||Z.repo,F=Qq(L),_=k2(Z,X,z,F,J,q.flags.force);if(await h2(_.targetDir,_.force),Y){let O=`[${H.index}/${H.total}]`,A=V.length>0?` ${B.yellow(`(${V.length} warning${V.length>1?"s":""})`)}`:"";console.error(`${B.dim(O)} ${B.bold(W.name)} v${W.version}${A}`)}else{if(console.error(`Found skill: ${W.name} v${W.version}`),console.error(`
361
+ ${B.bold("Install preview:")}`),console.error(` Name: ${W.name}`),console.error(` Version: ${W.version}`),W.description)console.error(` Description: ${W.description}`);if(console.error(` Source: ${$}`),G)console.error(` Provider: All (${G.map((O)=>O.label).join(", ")})`),console.error(` Primary: ${J.label} (${J.name})`),console.error(` Symlinks: ${G.filter((O)=>O.name!==J.name).map((O)=>O.label).join(", ")}`);else console.error(` Provider: ${J.label} (${J.name})`);if(console.error(` Target: ${_.targetDir}`),V.length>0){console.error(`
362
+ ${B.yellow(B.bold("Security warnings:"))}`);let O=new Map;for(let A of V){let R=O.get(A.category)||[];R.push(A),O.set(A.category,R)}for(let[A,R]of O){console.error(`
363
+ ${B.yellow(`[${A}]`)} (${R.length} match${R.length>1?"es":""})`);for(let M of R.slice(0,5))console.error(` ${B.dim(M.file)}:${M.line} -- ${M.match}`);if(R.length>5)console.error(` ... and ${R.length-5} more`)}}if(!q.flags.yes&&!q.flags.all){if(!process.stdin.isTTY)S("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
364
+ ${B.bold("Proceed with installation?")} [y/N] `);let O=await L0();if(O.toLowerCase()!=="y"&&O.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}if(!Y)console.error(`
365
+ Installing to ${_.targetDir}...`);if(G)return await g2(_,G);return await J$(_)}async function gQ(q){if(q.flags.help){xQ();return}let $=q.subcommand;if(!$)S("Missing required argument: <source>"),console.error('Run "asm install --help" for usage.'),process.exit(2);let Z=null,X=()=>{if(Z)t(Z).finally(()=>process.exit(1));else process.exit(1)};process.on("SIGINT",X),process.on("SIGTERM",X);try{let z=z$($);console.error(`Parsing source: ${$}`),await U$();let U=q.flags.transport,Q=U==="ssh"?z.sshCloneUrl:U==="https"?z.cloneUrl:`${z.cloneUrl} (auto)`;console.error(`Cloning ${Q}${z.ref?` (ref: ${z.ref})`:""}...`),Z=await Q$(z,U);let J=await g(),{provider:G,allProviders:H}=await Jq(J,q.flags.provider,!!process.stdin.isTTY),{join:W}=await import("path"),Y=[];if(q.flags.path){let V=W(Z,q.flags.path);try{await E0(V)}catch{throw Error(`No SKILL.md found at path "${q.flags.path}" in the repository.`)}let T=await M2(q,$,z,Z,V,q.flags.name,J,G,H);Y.push(T)}else{let V=!1;try{await E0(Z),V=!0}catch{}if(V){let T=await M2(q,$,z,Z,Z,q.flags.name,J,G,H);Y.push(T)}else{console.error("No SKILL.md at repository root. Scanning for skills...");let T=await y2(Z);if(T.length===0)throw Error("No skills found in this repository. Skills must have a SKILL.md file.");console.error(`Found ${T.length} skill(s):
366
+ `);for(let _=0;_<T.length;_++)if(console.error(` ${B.bold(`${_+1})`)} ${T[_].name} v${T[_].version} ${B.dim(`(${T[_].relPath})`)}`),T[_].description)console.error(` ${T[_].description}`);let L;if(q.flags.all){if(L=T.map((_)=>_.relPath),console.error(`
367
+ Installing all ${L.length} skills...`),!q.flags.yes){if(!process.stdin.isTTY)S("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
368
+ ${B.bold(`Install all ${L.length} skills?`)} [y/N] `);let _=await L0();if(_.toLowerCase()!=="y"&&_.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}else if(process.stdin.isTTY){process.stderr.write(`
369
+ Enter skill number (or "all"): `);let _=await L0();if(_.toLowerCase()==="all")L=T.map((O)=>O.relPath);else{let O=parseInt(_,10)-1;if(isNaN(O)||O<0||O>=T.length)throw Error("Invalid selection. Aborting.");L=[T[O].relPath]}}else S(`Repository contains ${T.length} skills. Use --path <subdir> to pick one or --all to install all.
352
370
  Available skills:
353
- ${Y.map((O)=>` --path ${O.relPath}`).join(`
354
- `)}`),process.exit(2);if(B.length>1){if(console.error(`
355
- ${T.bold("Install settings:")}`),console.error(` Source: ${$}`),G)console.error(` Provider: All (${G.map((O)=>O.label).join(", ")})`),console.error(` Primary: ${z.label} (${z.name})`),console.error(` Symlinks: ${G.filter((O)=>O.name!==z.name).map((O)=>O.label).join(", ")}`);else console.error(` Provider: ${z.label} (${z.name})`);console.error("")}let _=[];for(let O=0;O<B.length;O++){let V=B[O],I=J(Z,V);try{let L=await z2(q,$,X,Z,I,B.length===1?q.flags.name:null,Q,z,G,B.length>1?{index:O+1,total:B.length}:void 0);H.push(L)}catch(L){if(_.push(V),console.error(T.red(` x Failed: ${V} -- ${L.message}`)),B.length===1)throw L}}if(B.length>1&&_.length>0){console.error(`
356
- ${T.yellow(`${_.length} skill(s) failed to install:`)}`);for(let O of _)console.error(` - ${O}`)}}}if(process.removeListener("SIGINT",U),process.removeListener("SIGTERM",U),q.flags.json)console.log(JSON.stringify(H.length===1?H[0]:H,null,2));else if(H.length===1)console.error(T.green(`
357
- Done! Installed "${H[0].name}" to ${H[0].path}`));else console.error(`
358
- ${T.green(`Done! Installed ${H.length} skill(s) successfully.`)}`)}catch(X){if(process.removeListener("SIGINT",U),process.removeListener("SIGTERM",U),q.flags.json)console.log(JSON.stringify({success:!1,error:X.message},null,2));else j(X.message);process.exit(1)}finally{if(Z)await qq(Z)}}function $z(){console.log(`${T.bold("Usage:")} asm export [options]
371
+ ${T.map((_)=>` --path ${_.relPath}`).join(`
372
+ `)}`),process.exit(2);if(L.length>1){if(console.error(`
373
+ ${B.bold("Install settings:")}`),console.error(` Source: ${$}`),H)console.error(` Provider: All (${H.map((_)=>_.label).join(", ")})`),console.error(` Primary: ${G.label} (${G.name})`),console.error(` Symlinks: ${H.filter((_)=>_.name!==G.name).map((_)=>_.label).join(", ")}`);else console.error(` Provider: ${G.label} (${G.name})`);console.error("")}let F=[];for(let _=0;_<L.length;_++){let O=L[_],A=W(Z,O);try{let R=await M2(q,$,z,Z,A,L.length===1?q.flags.name:null,J,G,H,L.length>1?{index:_+1,total:L.length}:void 0);Y.push(R)}catch(R){if(F.push(O),console.error(B.red(` x Failed: ${O} -- ${R.message}`)),L.length===1)throw R}}if(L.length>1&&F.length>0){console.error(`
374
+ ${B.yellow(`${F.length} skill(s) failed to install:`)}`);for(let _ of F)console.error(` - ${_}`)}}}if(process.removeListener("SIGINT",X),process.removeListener("SIGTERM",X),q.flags.json)console.log(JSON.stringify(Y.length===1?Y[0]:Y,null,2));else if(Y.length===1)console.error(B.green(`
375
+ Done! Installed "${Y[0].name}" to ${Y[0].path}`));else console.error(`
376
+ ${B.green(`Done! Installed ${Y.length} skill(s) successfully.`)}`)}catch(z){if(process.removeListener("SIGINT",X),process.removeListener("SIGTERM",X),q.flags.json)console.log(JSON.stringify({success:!1,error:z.message},null,2));else S(z.message);process.exit(1)}finally{if(Z)await t(Z)}}function kQ(){console.log(`${B.bold("Usage:")} asm export [options]
359
377
 
360
378
  Export skill inventory as a portable JSON manifest. Useful for backup,
361
379
  sharing, or scripting.
362
380
 
363
- ${T.bold("Options:")}
381
+ ${B.bold("Options:")}
364
382
  -s, --scope <s> Filter: global, project, or both (default: both)
365
383
  --no-color Disable ANSI colors
366
384
  -V, --verbose Show debug output
367
385
 
368
- ${T.bold("Examples:")}
369
- asm export ${T.dim("Export all skills")}
370
- asm export -s global ${T.dim("Export global skills only")}
371
- asm export > skills.json ${T.dim("Save to file")}`)}async function Zz(q){if(q.flags.help){$z();return}let $=await x(),Z=await X0($,q.flags.scope),U=g1(Z);console.log(JSON.stringify(U,null,2))}function Uz(){console.log(`${T.bold("Usage:")} asm init <name> [options]
386
+ ${B.bold("Examples:")}
387
+ asm export ${B.dim("Export all skills")}
388
+ asm export -s global ${B.dim("Export global skills only")}
389
+ asm export > skills.json ${B.dim("Save to file")}`)}async function hQ(q){if(q.flags.help){kQ();return}let $=await g(),Z=await a($,q.flags.scope),X=n9(Z);console.log(JSON.stringify(X,null,2))}function uQ(){console.log(`${B.bold("Usage:")} asm init <name> [options]
372
390
 
373
391
  Scaffold a new skill directory with a SKILL.md template. Creates a
374
392
  ready-to-edit skill in the target provider's skill folder.
375
393
 
376
- ${T.bold("Options:")}
394
+ ${B.bold("Options:")}
377
395
  -p, --provider <name> Target provider (claude, codex, openclaw, agents)
378
396
  --path <dir> Scaffold in specified directory instead of provider path
379
397
  -f, --force Overwrite if skill already exists
380
398
  --no-color Disable ANSI colors
381
399
  -V, --verbose Show debug output
382
400
 
383
- ${T.bold("Examples:")}
384
- asm init my-skill ${T.dim("Scaffold (interactive provider)")}
385
- asm init my-skill -p claude ${T.dim("Scaffold in Claude Code")}
386
- asm init my-skill --path ./skills ${T.dim("Scaffold in custom directory")}`)}async function Xz(q){if(q.flags.help){Uz();return}let $=q.subcommand;if(!$)j("Missing required argument: <name>"),console.error('Run "asm init --help" for usage.'),process.exit(2);let Z=t0($),U;if(q.flags.path){let{resolve:X}=await import("path");U=X(q.flags.path)}else{let X=await x(),{provider:Q}=await $q(X,q.flags.provider,!!process.stdin.isTTY),{join:z}=await import("path"),{resolveProviderPath:G}=await import("./chunk-wdjcav1v.js"),J=G(X.providers.find((H)=>H.name===Q.name).global);U=z(J,Z)}if(await k1(U)){if(!q.flags.force){if(!process.stdin.isTTY)j(`Directory already exists: ${U}. Use --force to overwrite.`),process.exit(2);process.stderr.write(`${T.yellow(`Directory already exists: ${U}`)}
387
- ${T.bold("Overwrite?")} [y/N] `);let X=await V0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}await h1(Z,U),console.error(T.green(`Done! Created skill "${Z}" at ${U}`))}function Qz(){console.log(`${T.bold("Usage:")} asm stats [options]
401
+ ${B.bold("Examples:")}
402
+ asm init my-skill ${B.dim("Scaffold (interactive provider)")}
403
+ asm init my-skill -p claude ${B.dim("Scaffold in Claude Code")}
404
+ asm init my-skill --path ./skills ${B.dim("Scaffold in custom directory")}`)}async function vQ(q){if(q.flags.help){uQ();return}let $=q.subcommand;if(!$)S("Missing required argument: <name>"),console.error('Run "asm init --help" for usage.'),process.exit(2);let Z=Qq($),X;if(q.flags.path){let{resolve:z}=await import("path");X=z(q.flags.path)}else{let z=await g(),{provider:U}=await Jq(z,q.flags.provider,!!process.stdin.isTTY),{join:Q}=await import("path"),{resolveProviderPath:J}=await import("./chunk-wdjcav1v.js"),G=J(z.providers.find((H)=>H.name===U.name).global);X=Q(G,Z)}if(await r9(X)){if(!q.flags.force){if(!process.stdin.isTTY)S(`Directory already exists: ${X}. Use --force to overwrite.`),process.exit(2);process.stderr.write(`${B.yellow(`Directory already exists: ${X}`)}
405
+ ${B.bold("Overwrite?")} [y/N] `);let z=await L0();if(z.toLowerCase()!=="y"&&z.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}await o9(Z,X),console.error(B.green(`Done! Created skill "${Z}" at ${X}`))}function mQ(){console.log(`${B.bold("Usage:")} asm stats [options]
388
406
 
389
407
  Show aggregate skill metrics with provider distribution charts,
390
408
  scope breakdown, disk usage, and duplicate summary.
391
409
 
392
- ${T.bold("Options:")}
410
+ ${B.bold("Options:")}
393
411
  --json Output as JSON
394
412
  -s, --scope <s> Filter: global, project, or both (default: both)
395
413
  --no-color Disable ANSI colors
396
414
  -V, --verbose Show debug output
397
415
 
398
- ${T.bold("Examples:")}
399
- asm stats ${T.dim("Show full dashboard")}
400
- asm stats -s global ${T.dim("Global skills only")}
401
- asm stats --json ${T.dim("Output raw data as JSON")}`)}async function zz(q){if(q.flags.help){Qz();return}let $=await x(),Z=await X0($,q.flags.scope);if(Z.length===0){console.log("No skills found.");return}let U=B2(Z),X=await m1(Z,U);if(q.flags.json)if(!q.flags.verbose){let{perSkillDiskBytes:Q,...z}=X;console.log(U0(z))}else console.log(U0(X));else console.log(p1(X))}function Gz(){console.log(`${T.bold("Usage:")} asm link <path> [options]
416
+ ${B.bold("Examples:")}
417
+ asm stats ${B.dim("Show full dashboard")}
418
+ asm stats -s global ${B.dim("Global skills only")}
419
+ asm stats --json ${B.dim("Output raw data as JSON")}`)}async function dQ(q){if(q.flags.help){mQ();return}let $=await g(),Z=await a($,q.flags.scope);if(Z.length===0){console.log("No skills found.");return}let X=j2(Z),z=await q4(Z,X);if(q.flags.json)if(!q.flags.verbose){let{perSkillDiskBytes:U,...Q}=z;console.log(G0(Q))}else console.log(G0(z));else console.log($4(z))}function pQ(){console.log(`${B.bold("Usage:")} asm link <path> [options]
402
420
 
403
421
  Symlink a local skill directory into an agent's skill folder. Useful
404
422
  for local development — changes to the source are reflected immediately.
405
423
 
406
- ${T.bold("Options:")}
424
+ ${B.bold("Options:")}
407
425
  -p, --provider <name> Target provider (claude, codex, openclaw, agents)
408
426
  --name <name> Override symlink name (default: directory basename)
409
427
  -f, --force Overwrite if target already exists
@@ -411,8 +429,8 @@ ${T.bold("Options:")}
411
429
  --no-color Disable ANSI colors
412
430
  -V, --verbose Show debug output
413
431
 
414
- ${T.bold("Examples:")}
415
- asm link ./my-skill ${T.dim("Link (interactive provider)")}
416
- asm link ./my-skill -p claude ${T.dim("Link to Claude Code")}
417
- asm link ./my-skill --name alias ${T.dim("Link with custom name")}`)}async function Jz(q){if(q.flags.help){Gz();return}let $=q.subcommand;if(!$)j("Missing required argument: <path>"),console.error('Run "asm link --help" for usage.'),process.exit(2);let{resolve:Z,basename:U}=await import("path"),X=Z($),Q=await l1(X),z=q.flags.name?t0(q.flags.name):U(X),G=await x(),{provider:J}=await $q(G,q.flags.provider,!!process.stdin.isTTY),{resolveProviderPath:H}=await import("./chunk-wdjcav1v.js"),W=H(G.providers.find((_)=>_.name===J.name).global),{join:Y}=await import("path"),B=Y(W,z);if(!q.flags.force){let _=!1;try{let{access:O}=await import("fs/promises");await O(B),_=!0}catch{}if(_){if(!process.stdin.isTTY)j(`Target already exists: ${B}. Use --force to overwrite.`),process.exit(2);process.stderr.write(`${T.yellow(`Target already exists: ${B}`)}
418
- ${T.bold("Overwrite?")} [y/N] `);let O=await V0();if(O.toLowerCase()!=="y"&&O.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0);await dq(X,W,z,!0)}else await dq(X,W,z,!1)}else await dq(X,W,z,!0);if(q.flags.json)console.log(U0({success:!0,name:z,symlinkPath:B,targetPath:X}));else console.error(T.green(`Done! Linked "${z}" -> ${X}`)),console.error(` Symlink: ${B}`),console.error(T.dim(` If you move or delete the source, run "asm uninstall ${z}" to clean up.`))}async function z4(q){let $=uQ(q);if($.flags.noColor)globalThis.__CLI_NO_COLOR=!0;if($.flags.verbose)c1(!0);if($.flags.version){console.log(`asm ${V2}`);return}if(!$.command&&$.flags.help){vQ();return}if(!$.command)return;switch($.command){case"list":await iQ($);break;case"search":await sQ($);break;case"inspect":await nQ($);break;case"uninstall":await rQ($);break;case"audit":await oQ($);break;case"install":await qz($);break;case"config":await tQ($);break;case"export":await Zz($);break;case"init":await Xz($);break;case"stats":await zz($);break;case"link":await Jz($);break;default:j(`Unknown command: "${$.command}"`),console.error('Run "asm --help" for usage.'),process.exit(2)}}function G4(q){let $=q.slice(2);if($.length===0)return!1;let Z=["list","search","inspect","uninstall","audit","config","install","export","init","stats","link"],U=$[0];if(Z.includes(U))return!0;if(U==="--help"||U==="-h")return!0;if(U==="--version"||U==="-v")return!0;if(U.startsWith("-")||U.length>0)return!0;return!1}if(G4(process.argv))await z4(process.argv);else await import("./chunk-bgkcwkcs.js");
432
+ ${B.bold("Examples:")}
433
+ asm link ./my-skill ${B.dim("Link (interactive provider)")}
434
+ asm link ./my-skill -p claude ${B.dim("Link to Claude Code")}
435
+ asm link ./my-skill --name alias ${B.dim("Link with custom name")}`)}async function lQ(q){if(q.flags.help){pQ();return}let $=q.subcommand;if(!$)S("Missing required argument: <path>"),console.error('Run "asm link --help" for usage.'),process.exit(2);let{resolve:Z,basename:X}=await import("path"),z=Z($),U=await X4(z),Q=q.flags.name?Qq(q.flags.name):X(z),J=await g(),{provider:G}=await Jq(J,q.flags.provider,!!process.stdin.isTTY),{resolveProviderPath:H}=await import("./chunk-wdjcav1v.js"),W=H(J.providers.find((T)=>T.name===G.name).global),{join:Y}=await import("path"),V=Y(W,Q);if(!q.flags.force){let T=!1;try{let{access:L}=await import("fs/promises");await L(V),T=!0}catch{}if(T){if(!process.stdin.isTTY)S(`Target already exists: ${V}. Use --force to overwrite.`),process.exit(2);process.stderr.write(`${B.yellow(`Target already exists: ${V}`)}
436
+ ${B.bold("Overwrite?")} [y/N] `);let L=await L0();if(L.toLowerCase()!=="y"&&L.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0);await nq(z,W,Q,!0)}else await nq(z,W,Q,!1)}else await nq(z,W,Q,!0);if(q.flags.json)console.log(G0({success:!0,name:Q,symlinkPath:V,targetPath:z}));else console.error(B.green(`Done! Linked "${Q}" -> ${z}`)),console.error(` Symlink: ${V}`),console.error(B.dim(` If you move or delete the source, run "asm uninstall ${Q}" to clean up.`))}async function M4(q){let $=LQ(q);if($.flags.noColor)globalThis.__CLI_NO_COLOR=!0;if($.flags.verbose)G4(!0);if($.flags.version){console.log(`asm ${b2}`);return}if(!$.command&&$.flags.help){OQ();return}if(!$.command)return;switch($.command){case"list":await wQ($);break;case"search":await PQ($);break;case"inspect":await NQ($);break;case"uninstall":await jQ($);break;case"audit":await bQ($);break;case"install":await gQ($);break;case"config":await yQ($);break;case"export":await hQ($);break;case"init":await vQ($);break;case"stats":await dQ($);break;case"link":await lQ($);break;default:S(`Unknown command: "${$.command}"`),console.error('Run "asm --help" for usage.'),process.exit(2)}}function D4(q){let $=q.slice(2);if($.length===0)return!1;let Z=["list","search","inspect","uninstall","audit","config","install","export","init","stats","link"],X=$[0];if(Z.includes(X))return!0;if(X==="--help"||X==="-h")return!0;if(X==="--version"||X==="-v")return!0;if(X.startsWith("-")||X.length>0)return!0;return!1}if(D4(process.argv))await M4(process.argv);else await import("./chunk-dp2yw2bk.js");