@uibot/skills 0.13.0 → 0.15.0

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -23
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- var Vl=Object.create;var{getPrototypeOf:Ul,defineProperty:ai,getOwnPropertyNames:Kl}=Object;var li=Object.prototype.hasOwnProperty;function Yl(e){return this[e]}var Hl,Gl,Wl=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?Hl??=new WeakMap:Gl??=new WeakMap,o=i.get(e);if(o)return o}r=e!=null?Vl(Ul(e)):{};let s=t||!e||!e.__esModule||!li.call(e,"default")?ai(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Kl(e))if(!li.call(s,a))ai(s,a,{get:Yl.bind(e,a),enumerable:!0})}if(n)i.set(e,s);return s};var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var gt=import.meta.require;var R=m(function(oc){var Rr=Symbol.for("yaml.alias"),ci=Symbol.for("yaml.document"),mt=Symbol.for("yaml.map"),ui=Symbol.for("yaml.pair"),Ar=Symbol.for("yaml.scalar"),ht=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),Ql=(e)=>!!e&&typeof e==="object"&&e[Q]===Rr,Zl=(e)=>!!e&&typeof e==="object"&&e[Q]===ci,ec=(e)=>!!e&&typeof e==="object"&&e[Q]===mt,tc=(e)=>!!e&&typeof e==="object"&&e[Q]===ui,di=(e)=>!!e&&typeof e==="object"&&e[Q]===Ar,rc=(e)=>!!e&&typeof e==="object"&&e[Q]===ht;function pi(e){if(e&&typeof e==="object")switch(e[Q]){case mt:case ht:return!0}return!1}function nc(e){if(e&&typeof e==="object")switch(e[Q]){case Rr:case mt:case Ar:case ht:return!0}return!1}var ic=(e)=>(di(e)||pi(e))&&!!e.anchor;oc.ALIAS=Rr;oc.DOC=ci;oc.MAP=mt;oc.NODE_TYPE=Q;oc.PAIR=ui;oc.SCALAR=Ar;oc.SEQ=ht;oc.hasAnchor=ic;oc.isAlias=Ql;oc.isCollection=pi;oc.isDocument=Zl;oc.isMap=ec;oc.isNode=nc;oc.isPair=tc;oc.isScalar=di;oc.isSeq=rc});var _e=m(function(wc){var q=R(),j=Symbol("break visit"),fi=Symbol("skip children"),J=Symbol("remove node");function yt(e,t){let r=gi(t);if(q.isDocument(e)){if(we(null,e.contents,r,Object.freeze([e]))===J)e.contents=null}else we(null,e,r,Object.freeze([]))}yt.BREAK=j;yt.SKIP=fi;yt.REMOVE=J;function we(e,t,r,n){let i=mi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return hi(e,n,i),we(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=we(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===J)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=we("key",t.key,r,n);if(o===j)return j;else if(o===J)t.key=null;let s=we("value",t.value,r,n);if(s===j)return j;else if(s===J)t.value=null}}return i}async function bt(e,t){let r=gi(t);if(q.isDocument(e)){if(await xe(null,e.contents,r,Object.freeze([e]))===J)e.contents=null}else await xe(null,e,r,Object.freeze([]))}bt.BREAK=j;bt.SKIP=fi;bt.REMOVE=J;async function xe(e,t,r,n){let i=await mi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return hi(e,n,i),xe(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=await xe(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===J)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=await xe("key",t.key,r,n);if(o===j)return j;else if(o===J)t.key=null;let s=await xe("value",t.value,r,n);if(s===j)return j;else if(s===J)t.value=null}}return i}function gi(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}function mi(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(q.isMap(t))return r.Map?.(e,t,n);if(q.isSeq(t))return r.Seq?.(e,t,n);if(q.isPair(t))return r.Pair?.(e,t,n);if(q.isScalar(t))return r.Scalar?.(e,t,n);if(q.isAlias(t))return r.Alias?.(e,t,n);return}function hi(e,t,r){let n=t[t.length-1];if(q.isCollection(n))n.items[e]=r;else if(q.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(q.isDocument(n))n.contents=r;else{let i=q.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}wc.visit=yt;wc.visitAsync=bt});var Tr=m(function(Rc){var yi=R(),vc=_e(),Ic={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ec=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Ic[t]);class V{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},V.defaultYaml,e),this.tags=Object.assign({},V.defaultTags,t)}clone(){let e=new V(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=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 e}add(e,t){if(this.atNextDocument)this.yaml={explicit:V.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},V.defaultTags),this.atNextDocument=!1;let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),r.length<2)return!1}let[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;else{let o=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,o),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);if(o==="!"||o==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return o}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(o){return t(String(o)),null}if(r==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+Ec(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&yi.isNode(e.contents)){let i={};vc.visit(e.contents,(o,s)=>{if(yi.isNode(s)&&s.tag)i[s.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,o]of r){if(i==="!!"&&o==="tag:yaml.org,2002:")continue;if(!e||n.some((s)=>s.startsWith(o)))t.push(`%TAG ${i} ${o}`)}return t.join(`
3
- `)}}V.defaultYaml={explicit:!1,version:"1.2"};V.defaultTags={"!!":"tag:yaml.org,2002:"};Rc.Directives=V});var Ct=m(function(Lc){var bi=R(),Tc=_e();function Nc(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(r)}return!0}function Ci(e){let t=new Set;return Tc.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function Si(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function Oc(e,t){let r=[],n=new Map,i=null;return{onAnchor:(o)=>{r.push(o),i??(i=Ci(e));let s=Si(t,i);return i.add(s),s},setAnchors:()=>{for(let o of r){let s=n.get(o);if(typeof s==="object"&&s.anchor&&(bi.isScalar(s.node)||bi.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:n}}Lc.anchorIsValid=Nc;Lc.anchorNames=Ci;Lc.createNodeAnchors=Oc;Lc.findNewAnchor=Si});var Nr=m(function(Mc){function Fe(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,o=n.length;i<o;++i){let s=n[i],a=Fe(e,n,String(i),s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let o=n.get(i),s=Fe(e,n,i,o);if(s===void 0)n.delete(i);else if(s!==o)n.set(i,s)}else if(n instanceof Set)for(let i of Array.from(n)){let o=Fe(e,n,i,i);if(o===void 0)n.delete(i);else if(o!==i)n.delete(i),n.add(o)}else for(let[i,o]of Object.entries(n)){let s=Fe(e,n,i,o);if(s===void 0)delete n[i];else if(s!==o)n[i]=s}return e.call(t,r,n)}Mc.applyReviver=Fe});var re=m(function(jc){var Bc=R();function ki(e,t,r){if(Array.isArray(e))return e.map((n,i)=>ki(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Bc.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(o)=>{n.res=o,delete r.onCreate};let i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}jc.toJS=ki});var St=m(function(Yc){var Uc=Nr(),wi=R(),Kc=re();class xi{constructor(e){Object.defineProperty(this,wi.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!wi.isDocument(e))throw TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},s=Kc.toJS(this,"",o);if(typeof n==="function")for(let{count:a,res:l}of o.anchors.values())n(l,a);return typeof i==="function"?Uc.applyReviver(i,{"":s},"",s):s}}Yc.NodeBase=xi});var Me=m(function(Xc){var Gc=Ct(),Wc=_e(),Pe=R(),Jc=St(),zc=re();class Pi extends Jc.NodeBase{constructor(e){super(Pe.ALIAS);this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let r;if(t?.aliasResolveCache)r=t.aliasResolveCache;else if(r=[],Wc.visit(e,{Node:(i,o)=>{if(Pe.isAlias(o)||Pe.hasAnchor(o))r.push(o)}}),t)t.aliasResolveCache=r;let n=void 0;for(let i of r){if(i===this)break;if(i.anchor===this.source)n=i}if(n&&t){let{anchors:i,doc:o,maxAliasCount:s}=t,a=i.get(n);if(!a)zc.toJS(n,null,t),a=i.get(n);if(a?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(s>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=kt(o,n,i);if(a.count*a.aliasCount>s)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}}return n}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(n)}return t.anchors.get(r).res}toString(e,t,r){let n=`*${this.source}`;if(e){if(Gc.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(i)}if(e.implicitKey)return`${n} `}return n}}function kt(e,t,r){if(Pe.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Pe.isCollection(t)){let n=0;for(let i of t.items){let o=kt(e,i,r);if(o>n)n=o}return n}else if(Pe.isPair(t)){let n=kt(e,t.key,r),i=kt(e,t.value,r);return Math.max(n,i)}return 1}Xc.Alias=Pi});var O=m(function(nu){var Zc=R(),eu=St(),tu=re(),ru=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class ge extends eu.NodeBase{constructor(e){super(Zc.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:tu.toJS(this.value,e,t)}toString(){return String(this.value)}}ge.BLOCK_FOLDED="BLOCK_FOLDED";ge.BLOCK_LITERAL="BLOCK_LITERAL";ge.PLAIN="PLAIN";ge.QUOTE_DOUBLE="QUOTE_DOUBLE";ge.QUOTE_SINGLE="QUOTE_SINGLE";nu.Scalar=ge;nu.isScalarValue=ru});var $e=m(function(uu){var su=Me(),me=R(),vi=O(),au="tag:yaml.org,2002:";function lu(e,t,r){if(t){let n=r.filter((o)=>o.tag===t),i=n.find((o)=>!o.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function cu(e,t,r){if(me.isDocument(e))e=e.contents;if(me.isNode(e))return e;if(me.isPair(e)){let u=r.schema[me.MAP].createNode?.(r.schema,null,r);return u.items.push(e),u}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)e=e.valueOf();let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=r,l=void 0;if(n&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new su.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=au+t.slice(2);let c=lu(e,t,s.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let u=new vi.Scalar(e);if(l)l.node=u;return u}c=e instanceof Map?s[me.MAP]:(Symbol.iterator in Object(e))?s[me.SEQ]:s[me.MAP]}if(o)o(c),delete r.onTagObj;let p=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new vi.Scalar(e);if(t)p.tag=t;else if(!c.default)p.tag=c.tag;if(l)l.node=p;return p}uu.createNode=cu});var wt=m(function(gu){var pu=$e(),z=R(),fu=St();function Or(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let o=t[i];if(typeof o==="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=n,n=s}else n=new Map([[o,n]])}return pu.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Ii=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Ei extends fu.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;if(t.items=t.items.map((r)=>z.isNode(r)||z.isPair(r)?r.clone(e):r),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Ii(e))this.add(t);else{let[r,...n]=e,i=this.get(r,!0);if(z.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(r,Or(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if(z.isCollection(n))return n.deleteIn(r);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,i=this.get(r,!0);if(n.length===0)return!t&&z.isScalar(i)?i.value:i;else return z.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!z.isPair(t))return!1;let r=t.value;return r==null||e&&z.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return z.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let i=this.get(r,!0);if(z.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(r,Or(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}gu.Collection=Ei;gu.collectionFromPath=Or;gu.isEmptyPath=Ii});var Be=m(function(Su){var bu=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Lr(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var Cu=(e,t,r)=>e.endsWith(`
2
+ var Vl=Object.create;var{getPrototypeOf:Ul,defineProperty:ai,getOwnPropertyNames:Kl}=Object;var li=Object.prototype.hasOwnProperty;function Yl(e){return this[e]}var Gl,Hl,Wl=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?Gl??=new WeakMap:Hl??=new WeakMap,o=i.get(e);if(o)return o}r=e!=null?Vl(Ul(e)):{};let s=t||!e||!e.__esModule||!li.call(e,"default")?ai(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Kl(e))if(!li.call(s,a))ai(s,a,{get:Yl.bind(e,a),enumerable:!0})}if(n)i.set(e,s);return s};var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var gt=import.meta.require;var R=m(function(oc){var Rr=Symbol.for("yaml.alias"),ci=Symbol.for("yaml.document"),mt=Symbol.for("yaml.map"),ui=Symbol.for("yaml.pair"),Ar=Symbol.for("yaml.scalar"),ht=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),Ql=(e)=>!!e&&typeof e==="object"&&e[Q]===Rr,Zl=(e)=>!!e&&typeof e==="object"&&e[Q]===ci,ec=(e)=>!!e&&typeof e==="object"&&e[Q]===mt,tc=(e)=>!!e&&typeof e==="object"&&e[Q]===ui,di=(e)=>!!e&&typeof e==="object"&&e[Q]===Ar,rc=(e)=>!!e&&typeof e==="object"&&e[Q]===ht;function pi(e){if(e&&typeof e==="object")switch(e[Q]){case mt:case ht:return!0}return!1}function nc(e){if(e&&typeof e==="object")switch(e[Q]){case Rr:case mt:case Ar:case ht:return!0}return!1}var ic=(e)=>(di(e)||pi(e))&&!!e.anchor;oc.ALIAS=Rr;oc.DOC=ci;oc.MAP=mt;oc.NODE_TYPE=Q;oc.PAIR=ui;oc.SCALAR=Ar;oc.SEQ=ht;oc.hasAnchor=ic;oc.isAlias=Ql;oc.isCollection=pi;oc.isDocument=Zl;oc.isMap=ec;oc.isNode=nc;oc.isPair=tc;oc.isScalar=di;oc.isSeq=rc});var _e=m(function(wc){var q=R(),j=Symbol("break visit"),fi=Symbol("skip children"),J=Symbol("remove node");function yt(e,t){let r=gi(t);if(q.isDocument(e)){if(we(null,e.contents,r,Object.freeze([e]))===J)e.contents=null}else we(null,e,r,Object.freeze([]))}yt.BREAK=j;yt.SKIP=fi;yt.REMOVE=J;function we(e,t,r,n){let i=mi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return hi(e,n,i),we(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=we(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===J)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=we("key",t.key,r,n);if(o===j)return j;else if(o===J)t.key=null;let s=we("value",t.value,r,n);if(s===j)return j;else if(s===J)t.value=null}}return i}async function bt(e,t){let r=gi(t);if(q.isDocument(e)){if(await xe(null,e.contents,r,Object.freeze([e]))===J)e.contents=null}else await xe(null,e,r,Object.freeze([]))}bt.BREAK=j;bt.SKIP=fi;bt.REMOVE=J;async function xe(e,t,r,n){let i=await mi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return hi(e,n,i),xe(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=await xe(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===J)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=await xe("key",t.key,r,n);if(o===j)return j;else if(o===J)t.key=null;let s=await xe("value",t.value,r,n);if(s===j)return j;else if(s===J)t.value=null}}return i}function gi(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}function mi(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(q.isMap(t))return r.Map?.(e,t,n);if(q.isSeq(t))return r.Seq?.(e,t,n);if(q.isPair(t))return r.Pair?.(e,t,n);if(q.isScalar(t))return r.Scalar?.(e,t,n);if(q.isAlias(t))return r.Alias?.(e,t,n);return}function hi(e,t,r){let n=t[t.length-1];if(q.isCollection(n))n.items[e]=r;else if(q.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(q.isDocument(n))n.contents=r;else{let i=q.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}wc.visit=yt;wc.visitAsync=bt});var Tr=m(function(Rc){var yi=R(),vc=_e(),Ic={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ec=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Ic[t]);class V{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},V.defaultYaml,e),this.tags=Object.assign({},V.defaultTags,t)}clone(){let e=new V(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=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 e}add(e,t){if(this.atNextDocument)this.yaml={explicit:V.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},V.defaultTags),this.atNextDocument=!1;let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),r.length<2)return!1}let[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;else{let o=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,o),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);if(o==="!"||o==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return o}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(o){return t(String(o)),null}if(r==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+Ec(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&yi.isNode(e.contents)){let i={};vc.visit(e.contents,(o,s)=>{if(yi.isNode(s)&&s.tag)i[s.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,o]of r){if(i==="!!"&&o==="tag:yaml.org,2002:")continue;if(!e||n.some((s)=>s.startsWith(o)))t.push(`%TAG ${i} ${o}`)}return t.join(`
3
+ `)}}V.defaultYaml={explicit:!1,version:"1.2"};V.defaultTags={"!!":"tag:yaml.org,2002:"};Rc.Directives=V});var Ct=m(function(Lc){var bi=R(),Tc=_e();function Nc(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(r)}return!0}function Ci(e){let t=new Set;return Tc.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function Si(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function Oc(e,t){let r=[],n=new Map,i=null;return{onAnchor:(o)=>{r.push(o),i??(i=Ci(e));let s=Si(t,i);return i.add(s),s},setAnchors:()=>{for(let o of r){let s=n.get(o);if(typeof s==="object"&&s.anchor&&(bi.isScalar(s.node)||bi.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:n}}Lc.anchorIsValid=Nc;Lc.anchorNames=Ci;Lc.createNodeAnchors=Oc;Lc.findNewAnchor=Si});var Nr=m(function(Mc){function Fe(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,o=n.length;i<o;++i){let s=n[i],a=Fe(e,n,String(i),s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let o=n.get(i),s=Fe(e,n,i,o);if(s===void 0)n.delete(i);else if(s!==o)n.set(i,s)}else if(n instanceof Set)for(let i of Array.from(n)){let o=Fe(e,n,i,i);if(o===void 0)n.delete(i);else if(o!==i)n.delete(i),n.add(o)}else for(let[i,o]of Object.entries(n)){let s=Fe(e,n,i,o);if(s===void 0)delete n[i];else if(s!==o)n[i]=s}return e.call(t,r,n)}Mc.applyReviver=Fe});var re=m(function(jc){var Bc=R();function ki(e,t,r){if(Array.isArray(e))return e.map((n,i)=>ki(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Bc.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(o)=>{n.res=o,delete r.onCreate};let i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}jc.toJS=ki});var St=m(function(Yc){var Uc=Nr(),wi=R(),Kc=re();class xi{constructor(e){Object.defineProperty(this,wi.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!wi.isDocument(e))throw TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},s=Kc.toJS(this,"",o);if(typeof n==="function")for(let{count:a,res:l}of o.anchors.values())n(l,a);return typeof i==="function"?Uc.applyReviver(i,{"":s},"",s):s}}Yc.NodeBase=xi});var Me=m(function(Xc){var Hc=Ct(),Wc=_e(),Pe=R(),Jc=St(),zc=re();class Pi extends Jc.NodeBase{constructor(e){super(Pe.ALIAS);this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let r;if(t?.aliasResolveCache)r=t.aliasResolveCache;else if(r=[],Wc.visit(e,{Node:(i,o)=>{if(Pe.isAlias(o)||Pe.hasAnchor(o))r.push(o)}}),t)t.aliasResolveCache=r;let n=void 0;for(let i of r){if(i===this)break;if(i.anchor===this.source)n=i}if(n&&t){let{anchors:i,doc:o,maxAliasCount:s}=t,a=i.get(n);if(!a)zc.toJS(n,null,t),a=i.get(n);if(a?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(s>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=kt(o,n,i);if(a.count*a.aliasCount>s)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}}return n}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(n)}return t.anchors.get(r).res}toString(e,t,r){let n=`*${this.source}`;if(e){if(Hc.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(i)}if(e.implicitKey)return`${n} `}return n}}function kt(e,t,r){if(Pe.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Pe.isCollection(t)){let n=0;for(let i of t.items){let o=kt(e,i,r);if(o>n)n=o}return n}else if(Pe.isPair(t)){let n=kt(e,t.key,r),i=kt(e,t.value,r);return Math.max(n,i)}return 1}Xc.Alias=Pi});var O=m(function(nu){var Zc=R(),eu=St(),tu=re(),ru=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class ge extends eu.NodeBase{constructor(e){super(Zc.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:tu.toJS(this.value,e,t)}toString(){return String(this.value)}}ge.BLOCK_FOLDED="BLOCK_FOLDED";ge.BLOCK_LITERAL="BLOCK_LITERAL";ge.PLAIN="PLAIN";ge.QUOTE_DOUBLE="QUOTE_DOUBLE";ge.QUOTE_SINGLE="QUOTE_SINGLE";nu.Scalar=ge;nu.isScalarValue=ru});var $e=m(function(uu){var su=Me(),me=R(),vi=O(),au="tag:yaml.org,2002:";function lu(e,t,r){if(t){let n=r.filter((o)=>o.tag===t),i=n.find((o)=>!o.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function cu(e,t,r){if(me.isDocument(e))e=e.contents;if(me.isNode(e))return e;if(me.isPair(e)){let u=r.schema[me.MAP].createNode?.(r.schema,null,r);return u.items.push(e),u}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)e=e.valueOf();let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=r,l=void 0;if(n&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new su.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=au+t.slice(2);let c=lu(e,t,s.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let u=new vi.Scalar(e);if(l)l.node=u;return u}c=e instanceof Map?s[me.MAP]:(Symbol.iterator in Object(e))?s[me.SEQ]:s[me.MAP]}if(o)o(c),delete r.onTagObj;let p=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new vi.Scalar(e);if(t)p.tag=t;else if(!c.default)p.tag=c.tag;if(l)l.node=p;return p}uu.createNode=cu});var wt=m(function(gu){var pu=$e(),z=R(),fu=St();function Or(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let o=t[i];if(typeof o==="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=n,n=s}else n=new Map([[o,n]])}return pu.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Ii=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Ei extends fu.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;if(t.items=t.items.map((r)=>z.isNode(r)||z.isPair(r)?r.clone(e):r),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Ii(e))this.add(t);else{let[r,...n]=e,i=this.get(r,!0);if(z.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(r,Or(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if(z.isCollection(n))return n.deleteIn(r);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,i=this.get(r,!0);if(n.length===0)return!t&&z.isScalar(i)?i.value:i;else return z.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!z.isPair(t))return!1;let r=t.value;return r==null||e&&z.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return z.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let i=this.get(r,!0);if(z.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(r,Or(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}gu.Collection=Ei;gu.collectionFromPath=Or;gu.isEmptyPath=Ii});var Be=m(function(Su){var bu=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Lr(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var Cu=(e,t,r)=>e.endsWith(`
4
4
  `)?Lr(r,t):r.includes(`
5
5
  `)?`
6
6
  `+Lr(r,t):(e.endsWith(" ")?"":" ")+r;Su.indentComment=Lr;Su.lineComment=Cu;Su.stringifyComment=bu});var Ai=m(function(vu){function Pu(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return e;if(i<o)o=0;let l=Math.max(1+o,1+i-t.length);if(e.length<=l)return e;let c=[],p={},u=i-t.length;if(typeof n==="number")if(n>i-Math.max(2,o))c.push(0);else u=i-n;let d=void 0,f=void 0,y=!1,g=-1,h=-1,b=-1;if(r==="block"){if(g=Ri(e,g,t.length),g!==-1)u=g+l}for(let w;w=e[g+=1];){if(r==="quoted"&&w==="\\"){switch(h=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if(w===`
@@ -9,7 +9,7 @@ var Vl=Object.create;var{getPrototypeOf:Ul,defineProperty:ai,getOwnPropertyNames
9
9
  `&&P!=="\t")d=g}if(g>=u)if(d)c.push(d),u=d+l,d=void 0;else if(r==="quoted"){while(f===" "||f==="\t")f=w,w=e[g+=1],y=!0;let P=g>b+1?g-2:h-1;if(p[P])return e;c.push(P),p[P]=!0,u=P+l,d=void 0}else y=!0}f=w}if(y&&a)a();if(c.length===0)return e;if(s)s();let k=e.slice(0,c[0]);for(let w=0;w<c.length;++w){let P=c[w],I=c[w+1]||e.length;if(P===0)k=`
10
10
  ${t}${e.slice(0,I)}`;else{if(r==="quoted"&&p[P])k+=`${e[P]}\\`;k+=`
11
11
  ${t}${e.slice(P+1,I)}`}}return k}function Ri(e,t,r){let n=t,i=t+1,o=e[i];while(o===" "||o==="\t")if(t<i+r)o=e[++t];else{do o=e[++t];while(o&&o!==`
12
- `);n=t,i=t+1,o=e[i]}return n}vu.FOLD_BLOCK="block";vu.FOLD_FLOW="flow";vu.FOLD_QUOTED="quoted";vu.foldFlowLines=Pu});var Ve=m(function(Lu){var H=O(),ne=Ai(),Pt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),vt=(e)=>/^(%|---|\.\.\.)/m.test(e);function Tu(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let o=0,s=0;o<i;++o)if(e[o]===`
12
+ `);n=t,i=t+1,o=e[i]}return n}vu.FOLD_BLOCK="block";vu.FOLD_FLOW="flow";vu.FOLD_QUOTED="quoted";vu.foldFlowLines=Pu});var Ve=m(function(Lu){var G=O(),ne=Ai(),Pt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),vt=(e)=>/^(%|---|\.\.\.)/m.test(e);function Tu(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let o=0,s=0;o<i;++o)if(e[o]===`
13
13
  `){if(o-s>n)return!0;if(s=o+1,i-s<=n)return!1}return!0}function je(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(vt(e)?" ":""),s="",a=0;for(let l=0,c=r[l];c;c=r[++l]){if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n")s+=r.slice(a,l)+"\\ ",l+=1,a=l,c="\\";if(c==="\\")switch(r[l+1]){case"u":{s+=r.slice(a,l);let p=r.substr(l+2,4);switch(p){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:if(p.substr(0,2)==="00")s+="\\x"+p.substr(2);else s+=r.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||r[l+2]==='"'||r.length<i)l+=1;else{s+=r.slice(a,l)+`
14
14
 
15
15
  `;while(r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"')s+=`
@@ -18,21 +18,21 @@ ${t}${e.slice(P+1,I)}`}}return k}function Ri(e,t,r){let n=t,i=t+1,o=e[i];while(o
18
18
  ${r}`)+"'";return t.implicitKey?n:ne.foldFlowLines(n,r,ne.FOLD_FLOW,Pt(t,!1))}function ve(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=je;else{let i=e.includes('"'),o=e.includes("'");if(i&&!o)n=Dr;else if(o&&!i)n=je;else n=r?Dr:je}return n(e,t)}var qr;try{qr=new RegExp(`(^|(?<!
19
19
  ))
20
20
  +(?!
21
- |$)`,"g")}catch{qr=/\n+(?!\n|$)/g}function xt({comment:e,type:t,value:r},n,i,o){let{blockQuote:s,commentString:a,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ve(r,n);let c=n.indent||(n.forceBlockIndent||vt(r)?" ":""),p=s==="literal"?!0:s==="folded"||t===H.Scalar.BLOCK_FOLDED?!1:t===H.Scalar.BLOCK_LITERAL?!0:!Tu(r,l,c.length);if(!r)return p?`|
21
+ |$)`,"g")}catch{qr=/\n+(?!\n|$)/g}function xt({comment:e,type:t,value:r},n,i,o){let{blockQuote:s,commentString:a,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ve(r,n);let c=n.indent||(n.forceBlockIndent||vt(r)?" ":""),p=s==="literal"?!0:s==="folded"||t===G.Scalar.BLOCK_FOLDED?!1:t===G.Scalar.BLOCK_LITERAL?!0:!Tu(r,l,c.length);if(!r)return p?`|
22
22
  `:`>
23
23
  `;let u,d;for(d=r.length;d>0;--d){let I=r[d-1];if(I!==`
24
24
  `&&I!=="\t"&&I!==" ")break}let f=r.substring(d),y=f.indexOf(`
25
25
  `);if(y===-1)u="-";else if(r===f||y!==f.length-1){if(u="+",o)o()}else u="";if(f){if(r=r.slice(0,-f.length),f[f.length-1]===`
26
26
  `)f=f.slice(0,-1);f=f.replace(qr,`$&${c}`)}let g=!1,h,b=-1;for(h=0;h<r.length;++h){let I=r[h];if(I===" ")g=!0;else if(I===`
27
27
  `)b=h;else break}let k=r.substring(0,b<h?b+1:h);if(k)r=r.substring(k.length),k=k.replace(/\n+/g,`$&${c}`);let P=(g?c?"2":"1":"")+u;if(e){if(P+=" "+a(e.replace(/ ?[\r\n]+/g," ")),i)i()}if(!p){let I=r.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),v=!1,A=Pt(n,!0);if(s!=="folded"&&t!==H.Scalar.BLOCK_FOLDED)A.onOverflow=()=>{v=!0};let x=ne.foldFlowLines(`${k}${I}${f}`,c,ne.FOLD_BLOCK,A);if(!v)return`>${P}
28
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),v=!1,A=Pt(n,!0);if(s!=="folded"&&t!==G.Scalar.BLOCK_FOLDED)A.onOverflow=()=>{v=!0};let x=ne.foldFlowLines(`${k}${I}${f}`,c,ne.FOLD_BLOCK,A);if(!v)return`>${P}
29
29
  ${c}${x}`}return r=r.replace(/\n+/g,`$&${c}`),`|${P}
30
30
  ${c}${k}${r}${f}`}function Nu(e,t,r,n){let{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:c,inFlow:p}=t;if(a&&o.includes(`
31
31
  `)||p&&/[[\]{},]/.test(o))return ve(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||p||!o.includes(`
32
- `)?ve(o,t):xt(e,t,r,n);if(!a&&!p&&i!==H.Scalar.PLAIN&&o.includes(`
32
+ `)?ve(o,t):xt(e,t,r,n);if(!a&&!p&&i!==G.Scalar.PLAIN&&o.includes(`
33
33
  `))return xt(e,t,r,n);if(vt(o)){if(l==="")return t.forceBlockIndent=!0,xt(e,t,r,n);else if(a&&l===c)return ve(o,t)}let u=o.replace(/\n+/g,`$&
34
- ${l}`);if(s){let d=(g)=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(u),{compat:f,tags:y}=t.doc.schema;if(y.some(d)||f?.some(d))return ve(o,t)}return a?u:ne.foldFlowLines(u,l,ne.FOLD_FLOW,Pt(t,!1))}function Ou(e,t,r,n){let{implicitKey:i,inFlow:o}=t,s=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==H.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value))a=H.Scalar.QUOTE_DOUBLE}let l=(p)=>{switch(p){case H.Scalar.BLOCK_FOLDED:case H.Scalar.BLOCK_LITERAL:return i||o?ve(s.value,t):xt(s,t,r,n);case H.Scalar.QUOTE_DOUBLE:return je(s.value,t);case H.Scalar.QUOTE_SINGLE:return Dr(s.value,t);case H.Scalar.PLAIN:return Nu(s,t,r,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:p,defaultStringType:u}=t.options,d=i&&p||u;if(c=l(d),c===null)throw Error(`Unsupported default string type ${d}`)}return c}Lu.stringifyString=Ou});var Ue=m(function(Vu){var qu=Ct(),ie=R(),_u=Be(),Fu=Ve();function Mu(e,t){let r=Object.assign({blockQuote:!0,commentString:_u.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function $u(e,t){if(t.tag){let i=e.filter((o)=>o.tag===t.tag);if(i.length>0)return i.find((o)=>o.format===t.format)??i[0]}let r=void 0,n;if(ie.isScalar(t)){n=t.value;let i=e.filter((o)=>o.identify?.(n));if(i.length>1){let o=i.filter((s)=>s.test);if(o.length>0)i=o}r=i.find((o)=>o.format===t.format)??i.find((o)=>!o.format)}else n=t,r=e.find((i)=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw Error(`Tag not resolved for ${i} value`)}return r}function Bu(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],o=(ie.isScalar(e)||ie.isCollection(e))&&e.anchor;if(o&&qu.anchorIsValid(o))r.add(o),i.push(`&${o}`);let s=e.tag??(t.default?null:t.tag);if(s)i.push(n.directives.tagString(s));return i.join(" ")}function ju(e,t,r,n){if(ie.isPair(e))return e.toString(t,r,n);if(ie.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let i=void 0,o=ie.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>i=l});i??(i=$u(t.doc.schema.tags,o));let s=Bu(o,i,t);if(s.length>0)t.indentAtStart=(t.indentAtStart??0)+s.length+1;let a=typeof i.stringify==="function"?i.stringify(o,t,r,n):ie.isScalar(o)?Fu.stringifyString(o,t,r,n):o.toString(t,r,n);if(!s)return a;return ie.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
35
- ${t.indent}${a}`}Vu.createStringifyContext=Mu;Vu.stringify=ju});var Oi=m(function(Hu){var Z=R(),Ti=O(),Ni=Ue(),Ke=Be();function Yu({key:e,value:t},r,n,i){let{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:c,indentSeq:p,simpleKeys:u}}=r,d=Z.isNode(e)&&e.comment||null;if(u){if(d)throw Error("With simple keys, key nodes cannot have comments");if(Z.isCollection(e)||!Z.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let f=!u&&(!e||d&&t==null&&!r.inFlow||Z.isCollection(e)||(Z.isScalar(e)?e.type===Ti.Scalar.BLOCK_FOLDED||e.type===Ti.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!o),indent:a+l});let y=!1,g=!1,h=Ni.stringify(e,r,()=>y=!0,()=>g=!0);if(!f&&!r.inFlow&&h.length>1024){if(u)throw Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||t==null){if(y&&n)n();return h===""?"?":f?`? ${h}`:h}}else if(o&&!u||t==null&&f){if(h=`? ${h}`,d&&!y)h+=Ke.lineComment(h,r.indent,c(d));else if(g&&i)i();return h}if(y)d=null;if(f){if(d)h+=Ke.lineComment(h,r.indent,c(d));h=`? ${h}
34
+ ${l}`);if(s){let d=(g)=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(u),{compat:f,tags:y}=t.doc.schema;if(y.some(d)||f?.some(d))return ve(o,t)}return a?u:ne.foldFlowLines(u,l,ne.FOLD_FLOW,Pt(t,!1))}function Ou(e,t,r,n){let{implicitKey:i,inFlow:o}=t,s=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==G.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value))a=G.Scalar.QUOTE_DOUBLE}let l=(p)=>{switch(p){case G.Scalar.BLOCK_FOLDED:case G.Scalar.BLOCK_LITERAL:return i||o?ve(s.value,t):xt(s,t,r,n);case G.Scalar.QUOTE_DOUBLE:return je(s.value,t);case G.Scalar.QUOTE_SINGLE:return Dr(s.value,t);case G.Scalar.PLAIN:return Nu(s,t,r,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:p,defaultStringType:u}=t.options,d=i&&p||u;if(c=l(d),c===null)throw Error(`Unsupported default string type ${d}`)}return c}Lu.stringifyString=Ou});var Ue=m(function(Vu){var qu=Ct(),ie=R(),_u=Be(),Fu=Ve();function Mu(e,t){let r=Object.assign({blockQuote:!0,commentString:_u.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function $u(e,t){if(t.tag){let i=e.filter((o)=>o.tag===t.tag);if(i.length>0)return i.find((o)=>o.format===t.format)??i[0]}let r=void 0,n;if(ie.isScalar(t)){n=t.value;let i=e.filter((o)=>o.identify?.(n));if(i.length>1){let o=i.filter((s)=>s.test);if(o.length>0)i=o}r=i.find((o)=>o.format===t.format)??i.find((o)=>!o.format)}else n=t,r=e.find((i)=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw Error(`Tag not resolved for ${i} value`)}return r}function Bu(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],o=(ie.isScalar(e)||ie.isCollection(e))&&e.anchor;if(o&&qu.anchorIsValid(o))r.add(o),i.push(`&${o}`);let s=e.tag??(t.default?null:t.tag);if(s)i.push(n.directives.tagString(s));return i.join(" ")}function ju(e,t,r,n){if(ie.isPair(e))return e.toString(t,r,n);if(ie.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let i=void 0,o=ie.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>i=l});i??(i=$u(t.doc.schema.tags,o));let s=Bu(o,i,t);if(s.length>0)t.indentAtStart=(t.indentAtStart??0)+s.length+1;let a=typeof i.stringify==="function"?i.stringify(o,t,r,n):ie.isScalar(o)?Fu.stringifyString(o,t,r,n):o.toString(t,r,n);if(!s)return a;return ie.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
35
+ ${t.indent}${a}`}Vu.createStringifyContext=Mu;Vu.stringify=ju});var Oi=m(function(Gu){var Z=R(),Ti=O(),Ni=Ue(),Ke=Be();function Yu({key:e,value:t},r,n,i){let{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:c,indentSeq:p,simpleKeys:u}}=r,d=Z.isNode(e)&&e.comment||null;if(u){if(d)throw Error("With simple keys, key nodes cannot have comments");if(Z.isCollection(e)||!Z.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let f=!u&&(!e||d&&t==null&&!r.inFlow||Z.isCollection(e)||(Z.isScalar(e)?e.type===Ti.Scalar.BLOCK_FOLDED||e.type===Ti.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!o),indent:a+l});let y=!1,g=!1,h=Ni.stringify(e,r,()=>y=!0,()=>g=!0);if(!f&&!r.inFlow&&h.length>1024){if(u)throw Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||t==null){if(y&&n)n();return h===""?"?":f?`? ${h}`:h}}else if(o&&!u||t==null&&f){if(h=`? ${h}`,d&&!y)h+=Ke.lineComment(h,r.indent,c(d));else if(g&&i)i();return h}if(y)d=null;if(f){if(d)h+=Ke.lineComment(h,r.indent,c(d));h=`? ${h}
36
36
  ${a}:`}else if(h=`${h}:`,d)h+=Ke.lineComment(h,r.indent,c(d));let b,k,w;if(Z.isNode(t))b=!!t.spaceBefore,k=t.commentBefore,w=t.comment;else if(b=!1,k=null,w=null,t&&typeof t==="object")t=s.createNode(t);if(r.implicitKey=!1,!f&&!d&&Z.isScalar(t))r.indentAtStart=h.length+1;if(g=!1,!p&&l.length>=2&&!r.inFlow&&!f&&Z.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)r.indent=r.indent.substring(2);let P=!1,I=Ni.stringify(t,r,()=>P=!0,()=>g=!0),v=" ";if(d||b||k){if(v=b?`
37
37
  `:"",k){let A=c(k);v+=`
38
38
  ${Ke.indentComment(A,r.indent)}`}if(I===""&&!r.inFlow){if(v===`
@@ -42,17 +42,17 @@ ${Ke.indentComment(A,r.indent)}`}if(I===""&&!r.inFlow){if(v===`
42
42
  ${r.indent}`}else if(!f&&Z.isCollection(t)){let A=I[0],x=I.indexOf(`
43
43
  `),L=x!==-1,te=r.inFlow??t.flow??t.items.length===0;if(L||!te){let ke=!1;if(L&&(A==="&"||A==="!")){let D=I.indexOf(" ");if(A==="&"&&D!==-1&&D<x&&I[D+1]==="!")D=I.indexOf(" ",D+1);if(D===-1||x<D)ke=!0}if(!ke)v=`
44
44
  ${r.indent}`}}else if(I===""||I[0]===`
45
- `)v="";if(h+=v+I,r.inFlow){if(P&&n)n()}else if(w&&!P)h+=Ke.lineComment(h,r.indent,c(w));else if(g&&i)i();return h}Hu.stringifyPair=Yu});var _r=m(function(zu){var Li=gt("process");function Wu(e,...t){if(e==="debug")console.log(...t)}function Ju(e,t){if(e==="debug"||e==="warn")if(typeof Li.emitWarning==="function")Li.emitWarning(t);else console.warn(t)}zu.debug=Wu;zu.warn=Ju});var At=m(function(ed){var Rt=R(),Di=O(),It="<<",Et={identify:(e)=>e===It||typeof e==="symbol"&&e.description===It,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Di.Scalar(Symbol(It)),{addToJSMap:qi}),stringify:()=>It},Zu=(e,t)=>(Et.identify(t)||Rt.isScalar(t)&&(!t.type||t.type===Di.Scalar.PLAIN)&&Et.identify(t.value))&&e?.doc.schema.tags.some((r)=>r.tag===Et.tag&&r.default);function qi(e,t,r){let n=_i(e,r);if(Rt.isSeq(n))for(let i of n.items)Fr(e,t,i);else if(Array.isArray(n))for(let i of n)Fr(e,t,i);else Fr(e,t,n)}function Fr(e,t,r){let n=_i(e,r);if(!Rt.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[o,s]of i)if(t instanceof Map){if(!t.has(o))t.set(o,s)}else if(t instanceof Set)t.add(o);else if(!Object.prototype.hasOwnProperty.call(t,o))Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function _i(e,t){return e&&Rt.isAlias(t)?t.resolve(e.doc,e):t}ed.addMergeToJSMap=qi;ed.isMergeKey=Zu;ed.merge=Et});var $r=m(function(ld){var id=_r(),Fi=At(),od=Ue(),Mi=R(),Mr=re();function sd(e,t,{key:r,value:n}){if(Mi.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(Fi.isMergeKey(e,r))Fi.addMergeToJSMap(e,t,n);else{let i=Mr.toJS(r,"",e);if(t instanceof Map)t.set(i,Mr.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let o=ad(r,i,e),s=Mr.toJS(n,o,e);if(o in t)Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});else t[o]=s}}return t}function ad(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(Mi.isNode(e)&&r?.doc){let n=od.createStringifyContext(r.doc,{});n.anchors=new Set;for(let o of r.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let o=JSON.stringify(i);if(o.length>40)o=o.substring(0,36)+'..."';id.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}ld.addPairToJSMap=sd});var oe=m(function(fd){var $i=$e(),ud=Oi(),dd=$r(),Tt=R();function pd(e,t,r){let n=$i.createNode(e,void 0,r),i=$i.createNode(t,void 0,r);return new Nt(n,i)}class Nt{constructor(e,t=null){Object.defineProperty(this,Tt.NODE_TYPE,{value:Tt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;if(Tt.isNode(t))t=t.clone(e);if(Tt.isNode(r))r=r.clone(e);return new Nt(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return dd.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?ud.stringifyPair(this,e,t,r):JSON.stringify(this)}}fd.Pair=Nt;fd.createPair=pd});var Br=m(function(Cd){var he=R(),Bi=Ue(),Ot=Be();function hd(e,t,r){return(t.inFlow??e.flow?bd:yd)(e,t,r)}function yd({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:l,options:{commentString:c}}=r,p=Object.assign({},r,{indent:o,type:null}),u=!1,d=[];for(let y=0;y<t.length;++y){let g=t[y],h=null;if(he.isNode(g)){if(!u&&g.spaceBefore)d.push("");if(Lt(r,d,g.commentBefore,u),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(!u&&k.spaceBefore)d.push("");Lt(r,d,k.commentBefore,u)}}u=!1;let b=Bi.stringify(g,p,()=>h=null,()=>u=!0);if(h)b+=Ot.lineComment(b,o,c(h));if(u&&h)u=!1;d.push(n+b)}let f;if(d.length===0)f=i.start+i.end;else{f=d[0];for(let y=1;y<d.length;++y){let g=d[y];f+=g?`
45
+ `)v="";if(h+=v+I,r.inFlow){if(P&&n)n()}else if(w&&!P)h+=Ke.lineComment(h,r.indent,c(w));else if(g&&i)i();return h}Gu.stringifyPair=Yu});var _r=m(function(zu){var Li=gt("process");function Wu(e,...t){if(e==="debug")console.log(...t)}function Ju(e,t){if(e==="debug"||e==="warn")if(typeof Li.emitWarning==="function")Li.emitWarning(t);else console.warn(t)}zu.debug=Wu;zu.warn=Ju});var At=m(function(ed){var Rt=R(),Di=O(),It="<<",Et={identify:(e)=>e===It||typeof e==="symbol"&&e.description===It,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Di.Scalar(Symbol(It)),{addToJSMap:qi}),stringify:()=>It},Zu=(e,t)=>(Et.identify(t)||Rt.isScalar(t)&&(!t.type||t.type===Di.Scalar.PLAIN)&&Et.identify(t.value))&&e?.doc.schema.tags.some((r)=>r.tag===Et.tag&&r.default);function qi(e,t,r){let n=_i(e,r);if(Rt.isSeq(n))for(let i of n.items)Fr(e,t,i);else if(Array.isArray(n))for(let i of n)Fr(e,t,i);else Fr(e,t,n)}function Fr(e,t,r){let n=_i(e,r);if(!Rt.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[o,s]of i)if(t instanceof Map){if(!t.has(o))t.set(o,s)}else if(t instanceof Set)t.add(o);else if(!Object.prototype.hasOwnProperty.call(t,o))Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function _i(e,t){return e&&Rt.isAlias(t)?t.resolve(e.doc,e):t}ed.addMergeToJSMap=qi;ed.isMergeKey=Zu;ed.merge=Et});var $r=m(function(ld){var id=_r(),Fi=At(),od=Ue(),Mi=R(),Mr=re();function sd(e,t,{key:r,value:n}){if(Mi.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(Fi.isMergeKey(e,r))Fi.addMergeToJSMap(e,t,n);else{let i=Mr.toJS(r,"",e);if(t instanceof Map)t.set(i,Mr.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let o=ad(r,i,e),s=Mr.toJS(n,o,e);if(o in t)Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});else t[o]=s}}return t}function ad(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(Mi.isNode(e)&&r?.doc){let n=od.createStringifyContext(r.doc,{});n.anchors=new Set;for(let o of r.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let o=JSON.stringify(i);if(o.length>40)o=o.substring(0,36)+'..."';id.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}ld.addPairToJSMap=sd});var oe=m(function(fd){var $i=$e(),ud=Oi(),dd=$r(),Tt=R();function pd(e,t,r){let n=$i.createNode(e,void 0,r),i=$i.createNode(t,void 0,r);return new Nt(n,i)}class Nt{constructor(e,t=null){Object.defineProperty(this,Tt.NODE_TYPE,{value:Tt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;if(Tt.isNode(t))t=t.clone(e);if(Tt.isNode(r))r=r.clone(e);return new Nt(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return dd.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?ud.stringifyPair(this,e,t,r):JSON.stringify(this)}}fd.Pair=Nt;fd.createPair=pd});var Br=m(function(Cd){var he=R(),Bi=Ue(),Ot=Be();function hd(e,t,r){return(t.inFlow??e.flow?bd:yd)(e,t,r)}function yd({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:l,options:{commentString:c}}=r,p=Object.assign({},r,{indent:o,type:null}),u=!1,d=[];for(let y=0;y<t.length;++y){let g=t[y],h=null;if(he.isNode(g)){if(!u&&g.spaceBefore)d.push("");if(Lt(r,d,g.commentBefore,u),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(!u&&k.spaceBefore)d.push("");Lt(r,d,k.commentBefore,u)}}u=!1;let b=Bi.stringify(g,p,()=>h=null,()=>u=!0);if(h)b+=Ot.lineComment(b,o,c(h));if(u&&h)u=!1;d.push(n+b)}let f;if(d.length===0)f=i.start+i.end;else{f=d[0];for(let y=1;y<d.length;++y){let g=d[y];f+=g?`
46
46
  ${l}${g}`:`
47
47
  `}}if(e){if(f+=`
48
48
  `+Ot.indentComment(c(e),l),a)a()}else if(u&&s)s();return f}function bd({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t;n+=o;let l=Object.assign({},t,{indent:n,inFlow:!0,type:null}),c=!1,p=0,u=[];for(let y=0;y<e.length;++y){let g=e[y],h=null;if(he.isNode(g)){if(g.spaceBefore)u.push("");if(Lt(t,u,g.commentBefore,!1),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(k.spaceBefore)u.push("");if(Lt(t,u,k.commentBefore,!1),k.comment)c=!0}let w=he.isNode(g.value)?g.value:null;if(w){if(w.comment)h=w.comment;if(w.commentBefore)c=!0}else if(g.value==null&&k?.comment)h=k.comment}if(h)c=!0;let b=Bi.stringify(g,l,()=>h=null);if(c||(c=u.length>p||b.includes(`
49
49
  `)),y<e.length-1)b+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)c||(c=u.reduce((k,w)=>k+w.length+2,2)+(b.length+2)>t.options.lineWidth);if(c)b+=","}if(h)b+=Ot.lineComment(b,n,a(h));u.push(b),p=u.length}let{start:d,end:f}=r;if(u.length===0)return d+f;else{if(!c){let y=u.reduce((g,h)=>g+h.length+2,2);c=t.options.lineWidth>0&&y>t.options.lineWidth}if(c){let y=d;for(let g of u)y+=g?`
50
50
  ${o}${i}${g}`:`
51
51
  `;return`${y}
52
- ${i}${f}`}else return`${d}${s}${u.join(" ")}${s}${f}`}}function Lt({indent:e,options:{commentString:t}},r,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let o=Ot.indentComment(t(n),e);r.push(o.trimStart())}}Cd.stringifyCollection=hd});var ae=m(function(vd){var kd=Br(),wd=$r(),xd=wt(),se=R(),Dt=oe(),Pd=O();function Ye(e,t){let r=se.isScalar(t)?t.value:t;for(let n of e)if(se.isPair(n)){if(n.key===t||n.key===r)return n;if(se.isScalar(n.key)&&n.key.value===r)return n}return}class ji extends xd.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(se.MAP,e);this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:i}=r,o=new this(e),s=(a,l)=>{if(typeof i==="function")l=i.call(t,a,l);else if(Array.isArray(i)&&!i.includes(a))return;if(l!==void 0||n)o.items.push(Dt.createPair(a,l,r))};if(t instanceof Map)for(let[a,l]of t)s(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))s(a,t[a]);if(typeof e.sortMapEntries==="function")o.items.sort(e.sortMapEntries);return o}add(e,t){let r;if(se.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e))r=new Dt.Pair(e,e?.value);else r=new Dt.Pair(e.key,e.value);let n=Ye(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);if(se.isScalar(n.value)&&Pd.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(i){let o=this.items.findIndex((s)=>i(r,s)<0);if(o===-1)this.items.push(r);else this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let t=Ye(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=Ye(this.items,e)?.value;return(!t&&se.isScalar(n)?n.value:n)??void 0}has(e){return!!Ye(this.items,e)}set(e,t){this.add(new Dt.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(let i of this.items)wd.addPairToJSMap(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!se.isPair(n))throw Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);if(!e.allNullValues&&this.hasAllNullValues(!1))e=Object.assign({},e,{allNullValues:!0});return kd.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}vd.YAMLMap=ji;vd.findPair=Ye});var Ie=m(function(Td){var Rd=R(),Vi=ae(),Ad={collection:"map",default:!0,nodeClass:Vi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Rd.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>Vi.YAMLMap.from(e,t,r)};Td.map=Ad});var le=m(function(Fd){var Od=$e(),Ld=Br(),Dd=wt(),_t=R(),qd=O(),_d=re();class Ui extends Dd.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(_t.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=qt(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let r=qt(e);if(typeof r!=="number")return;let n=this.items[r];return!t&&_t.isScalar(n)?n.value:n}has(e){let t=qt(e);return typeof t==="number"&&t<this.items.length}set(e,t){let r=qt(e);if(typeof r!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[r];if(_t.isScalar(n)&&qd.isScalarValue(t))n.value=t;else this.items[r]=t}toJSON(e,t){let r=[];if(t?.onCreate)t.onCreate(r);let n=0;for(let i of this.items)r.push(_d.toJS(i,String(n++),t));return r}toString(e,t,r){if(!e)return JSON.stringify(this);return Ld.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t})}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let s of t){if(typeof n==="function"){let a=t instanceof Set?s:String(o++);s=n.call(t,a,s)}i.items.push(Od.createNode(s,void 0,r))}}return i}}function qt(e){let t=_t.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Fd.YAMLSeq=Ui});var Ee=m(function(jd){var $d=R(),Ki=le(),Bd={collection:"seq",default:!0,nodeClass:Ki.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!$d.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>Ki.YAMLSeq.from(e,t,r)};jd.seq=Bd});var He=m(function(Yd){var Ud=Ve(),Kd={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),Ud.stringifyString(e,t,r,n)}};Yd.string=Kd});var Ft=m(function(Gd){var Yi=O(),Hi={identify:(e)=>e==null,createNode:()=>new Yi.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Yi.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&Hi.test.test(e)?e:t.options.nullStr};Gd.nullTag=Hi});var jr=m(function(zd){var Jd=O(),Gi={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new Jd.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Gi.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};zd.boolTag=Gi});var Re=m(function(Zd){function Qd({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);let i=typeof n==="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");if(s<0)s=o.length,o+=".";let a=t-(o.length-s-1);while(a-- >0)o+="0"}return o}Zd.stringifyNumber=Qd});var Ur=m(function(op){var tp=O(),Vr=Re(),rp={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vr.stringifyNumber},np={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Vr.stringifyNumber(e)}},ip={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new tp.Scalar(parseFloat(e)),r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:Vr.stringifyNumber};op.float=ip;op.floatExp=np;op.floatNaN=rp});var Yr=m(function(pp){var Wi=Re(),Mt=(e)=>typeof e==="bigint"||Number.isInteger(e),Kr=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Ji(e,t,r){let{value:n}=e;if(Mt(n)&&n>=0)return r+n.toString(t);return Wi.stringifyNumber(e)}var cp={identify:(e)=>Mt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Kr(e,2,8,r),stringify:(e)=>Ji(e,8,"0o")},up={identify:Mt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Kr(e,0,10,r),stringify:Wi.stringifyNumber},dp={identify:(e)=>Mt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Kr(e,2,16,r),stringify:(e)=>Ji(e,16,"0x")};pp.int=up;pp.intHex=dp;pp.intOct=cp});var zi=m(function(wp){var hp=Ie(),yp=Ft(),bp=Ee(),Cp=He(),Sp=jr(),Hr=Ur(),Gr=Yr(),kp=[hp.map,bp.seq,Cp.string,yp.nullTag,Sp.boolTag,Gr.intOct,Gr.int,Gr.intHex,Hr.floatNaN,Hr.floatExp,Hr.float];wp.schema=kp});var Qi=m(function(Tp){var Pp=O(),vp=Ie(),Ip=Ee();function Xi(e){return typeof e==="bigint"||Number.isInteger(e)}var $t=({value:e})=>JSON.stringify(e),Ep=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:$t},{identify:(e)=>e==null,createNode:()=>new Pp.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$t},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:$t},{identify:Xi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Xi(e)?e.toString():JSON.stringify(e)},{identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(e)=>parseFloat(e),stringify:$t}],Rp={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Ap=[vp.map,Ip.seq].concat(Ep,Rp);Tp.schema=Ap});var Jr=m(function(Dp){var Ge=gt("buffer"),Wr=O(),Op=Ve(),Lp={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ge.Buffer==="function")return Ge.Buffer.from(e,"base64");else if(typeof atob==="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,i,o){if(!r)return"";let s=r,a;if(typeof Ge.Buffer==="function")a=s instanceof Ge.Buffer?s.toString("base64"):Ge.Buffer.from(s.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Wr.Scalar.BLOCK_LITERAL),t!==Wr.Scalar.QUOTE_DOUBLE){let l=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/l),p=Array(c);for(let u=0,d=0;u<c;++u,d+=l)p[u]=a.substr(d,l);a=p.join(t===Wr.Scalar.BLOCK_LITERAL?`
52
+ ${i}${f}`}else return`${d}${s}${u.join(" ")}${s}${f}`}}function Lt({indent:e,options:{commentString:t}},r,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let o=Ot.indentComment(t(n),e);r.push(o.trimStart())}}Cd.stringifyCollection=hd});var ae=m(function(vd){var kd=Br(),wd=$r(),xd=wt(),se=R(),Dt=oe(),Pd=O();function Ye(e,t){let r=se.isScalar(t)?t.value:t;for(let n of e)if(se.isPair(n)){if(n.key===t||n.key===r)return n;if(se.isScalar(n.key)&&n.key.value===r)return n}return}class ji extends xd.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(se.MAP,e);this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:i}=r,o=new this(e),s=(a,l)=>{if(typeof i==="function")l=i.call(t,a,l);else if(Array.isArray(i)&&!i.includes(a))return;if(l!==void 0||n)o.items.push(Dt.createPair(a,l,r))};if(t instanceof Map)for(let[a,l]of t)s(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))s(a,t[a]);if(typeof e.sortMapEntries==="function")o.items.sort(e.sortMapEntries);return o}add(e,t){let r;if(se.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e))r=new Dt.Pair(e,e?.value);else r=new Dt.Pair(e.key,e.value);let n=Ye(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);if(se.isScalar(n.value)&&Pd.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(i){let o=this.items.findIndex((s)=>i(r,s)<0);if(o===-1)this.items.push(r);else this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let t=Ye(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=Ye(this.items,e)?.value;return(!t&&se.isScalar(n)?n.value:n)??void 0}has(e){return!!Ye(this.items,e)}set(e,t){this.add(new Dt.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(let i of this.items)wd.addPairToJSMap(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!se.isPair(n))throw Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);if(!e.allNullValues&&this.hasAllNullValues(!1))e=Object.assign({},e,{allNullValues:!0});return kd.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}vd.YAMLMap=ji;vd.findPair=Ye});var Ie=m(function(Td){var Rd=R(),Vi=ae(),Ad={collection:"map",default:!0,nodeClass:Vi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Rd.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>Vi.YAMLMap.from(e,t,r)};Td.map=Ad});var le=m(function(Fd){var Od=$e(),Ld=Br(),Dd=wt(),_t=R(),qd=O(),_d=re();class Ui extends Dd.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(_t.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=qt(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let r=qt(e);if(typeof r!=="number")return;let n=this.items[r];return!t&&_t.isScalar(n)?n.value:n}has(e){let t=qt(e);return typeof t==="number"&&t<this.items.length}set(e,t){let r=qt(e);if(typeof r!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[r];if(_t.isScalar(n)&&qd.isScalarValue(t))n.value=t;else this.items[r]=t}toJSON(e,t){let r=[];if(t?.onCreate)t.onCreate(r);let n=0;for(let i of this.items)r.push(_d.toJS(i,String(n++),t));return r}toString(e,t,r){if(!e)return JSON.stringify(this);return Ld.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t})}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let s of t){if(typeof n==="function"){let a=t instanceof Set?s:String(o++);s=n.call(t,a,s)}i.items.push(Od.createNode(s,void 0,r))}}return i}}function qt(e){let t=_t.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Fd.YAMLSeq=Ui});var Ee=m(function(jd){var $d=R(),Ki=le(),Bd={collection:"seq",default:!0,nodeClass:Ki.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!$d.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>Ki.YAMLSeq.from(e,t,r)};jd.seq=Bd});var Ge=m(function(Yd){var Ud=Ve(),Kd={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),Ud.stringifyString(e,t,r,n)}};Yd.string=Kd});var Ft=m(function(Hd){var Yi=O(),Gi={identify:(e)=>e==null,createNode:()=>new Yi.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Yi.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&Gi.test.test(e)?e:t.options.nullStr};Hd.nullTag=Gi});var jr=m(function(zd){var Jd=O(),Hi={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new Jd.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Hi.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};zd.boolTag=Hi});var Re=m(function(Zd){function Qd({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);let i=typeof n==="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");if(s<0)s=o.length,o+=".";let a=t-(o.length-s-1);while(a-- >0)o+="0"}return o}Zd.stringifyNumber=Qd});var Ur=m(function(op){var tp=O(),Vr=Re(),rp={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vr.stringifyNumber},np={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Vr.stringifyNumber(e)}},ip={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new tp.Scalar(parseFloat(e)),r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:Vr.stringifyNumber};op.float=ip;op.floatExp=np;op.floatNaN=rp});var Yr=m(function(pp){var Wi=Re(),Mt=(e)=>typeof e==="bigint"||Number.isInteger(e),Kr=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Ji(e,t,r){let{value:n}=e;if(Mt(n)&&n>=0)return r+n.toString(t);return Wi.stringifyNumber(e)}var cp={identify:(e)=>Mt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Kr(e,2,8,r),stringify:(e)=>Ji(e,8,"0o")},up={identify:Mt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Kr(e,0,10,r),stringify:Wi.stringifyNumber},dp={identify:(e)=>Mt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Kr(e,2,16,r),stringify:(e)=>Ji(e,16,"0x")};pp.int=up;pp.intHex=dp;pp.intOct=cp});var zi=m(function(wp){var hp=Ie(),yp=Ft(),bp=Ee(),Cp=Ge(),Sp=jr(),Gr=Ur(),Hr=Yr(),kp=[hp.map,bp.seq,Cp.string,yp.nullTag,Sp.boolTag,Hr.intOct,Hr.int,Hr.intHex,Gr.floatNaN,Gr.floatExp,Gr.float];wp.schema=kp});var Qi=m(function(Tp){var Pp=O(),vp=Ie(),Ip=Ee();function Xi(e){return typeof e==="bigint"||Number.isInteger(e)}var $t=({value:e})=>JSON.stringify(e),Ep=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:$t},{identify:(e)=>e==null,createNode:()=>new Pp.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$t},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:$t},{identify:Xi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Xi(e)?e.toString():JSON.stringify(e)},{identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(e)=>parseFloat(e),stringify:$t}],Rp={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Ap=[vp.map,Ip.seq].concat(Ep,Rp);Tp.schema=Ap});var Jr=m(function(Dp){var He=gt("buffer"),Wr=O(),Op=Ve(),Lp={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof He.Buffer==="function")return He.Buffer.from(e,"base64");else if(typeof atob==="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,i,o){if(!r)return"";let s=r,a;if(typeof He.Buffer==="function")a=s instanceof He.Buffer?s.toString("base64"):He.Buffer.from(s.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Wr.Scalar.BLOCK_LITERAL),t!==Wr.Scalar.QUOTE_DOUBLE){let l=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/l),p=Array(c);for(let u=0,d=0;u<c;++u,d+=l)p[u]=a.substr(d,l);a=p.join(t===Wr.Scalar.BLOCK_LITERAL?`
53
53
  `:" ")}return Op.stringifyString({comment:e,type:t,value:a},n,i,o)}};Dp.binary=Lp});var jt=m(function($p){var Bt=R(),zr=oe(),_p=O(),Fp=le();function Zi(e,t){if(Bt.isSeq(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(Bt.isPair(n))continue;else if(Bt.isMap(n)){if(n.items.length>1)t("Each pair must have its own sequence indicator");let i=n.items[0]||new zr.Pair(new _p.Scalar(null));if(n.commentBefore)i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
54
54
  ${i.key.commentBefore}`:n.commentBefore;if(n.comment){let o=i.value??i.key;o.comment=o.comment?`${n.comment}
55
- ${o.comment}`:n.comment}n=i}e.items[r]=Bt.isPair(n)?n:new zr.Pair(n)}else t("Expected a sequence for this tag");return e}function eo(e,t,r){let{replacer:n}=r,i=new Fp.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){if(typeof n==="function")s=n.call(t,String(o++),s);let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)a=c[0],l=s[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=s;i.items.push(zr.createPair(a,l,r))}return i}var Mp={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zi,createNode:eo};$p.createPairs=eo;$p.pairs=Mp;$p.resolvePairs=Zi});var Qr=m(function(Yp){var to=R(),Xr=re(),We=ae(),Up=le(),ro=jt();class ye extends Up.YAMLSeq{constructor(){super();this.add=We.YAMLMap.prototype.add.bind(this),this.delete=We.YAMLMap.prototype.delete.bind(this),this.get=We.YAMLMap.prototype.get.bind(this),this.has=We.YAMLMap.prototype.has.bind(this),this.set=We.YAMLMap.prototype.set.bind(this),this.tag=ye.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;if(t?.onCreate)t.onCreate(r);for(let n of this.items){let i,o;if(to.isPair(n))i=Xr.toJS(n.key,"",t),o=Xr.toJS(n.value,i,t);else i=Xr.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,t,r){let n=ro.createPairs(e,t,r),i=new this;return i.items=n.items,i}}ye.tag="tag:yaml.org,2002:omap";var Kp={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ye,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=ro.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(to.isScalar(i))if(n.includes(i.value))t(`Ordered maps must not include duplicate keys: ${i.value}`);else n.push(i.value);return Object.assign(new ye,r)},createNode:(e,t,r)=>ye.from(e,t,r)};Yp.YAMLOMap=ye;Yp.omap=Kp});var ao=m(function(Wp){var no=O();function io({value:e,source:t},r){if(t&&(e?oo:so).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var oo={identify:(e)=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new no.Scalar(!0),stringify:io},so={identify:(e)=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new no.Scalar(!1),stringify:io};Wp.falseTag=so;Wp.trueTag=oo});var lo=m(function(tf){var Xp=O(),Zr=Re(),Qp={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Zr.stringifyNumber},Zp={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Zr.stringifyNumber(e)}},ef={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Xp.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:Zr.stringifyNumber};tf.float=ef;tf.floatExp=Zp;tf.floatNaN=Qp});var uo=m(function(uf){var co=Re(),Je=(e)=>typeof e==="bigint"||Number.isInteger(e);function Vt(e,t,r,{intAsBigInt:n}){let i=e[0];if(i==="-"||i==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let s=BigInt(e);return i==="-"?BigInt(-1)*s:s}let o=parseInt(e,r);return i==="-"?-1*o:o}function en(e,t,r){let{value:n}=e;if(Je(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return co.stringifyNumber(e)}var sf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Vt(e,2,2,r),stringify:(e)=>en(e,2,"0b")},af={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Vt(e,1,8,r),stringify:(e)=>en(e,8,"0")},lf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Vt(e,0,10,r),stringify:co.stringifyNumber},cf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Vt(e,2,16,r),stringify:(e)=>en(e,16,"0x")};uf.int=lf;uf.intBin=sf;uf.intHex=cf;uf.intOct=af});var tn=m(function(hf){var Yt=R(),Ut=oe(),Kt=ae();class be extends Kt.YAMLMap{constructor(e){super(e);this.tag=be.tag}add(e){let t;if(Yt.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new Ut.Pair(e.key,null);else t=new Ut.Pair(e,null);if(!Kt.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Kt.findPair(this.items,e);return!t&&Yt.isPair(r)?Yt.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Kt.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Ut.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);else throw Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,o,o);i.items.push(Ut.createPair(o,null,r))}return i}}be.tag="tag:yaml.org,2002:set";var mf={collection:"map",identify:(e)=>e instanceof Set,nodeClass:be,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>be.from(e,t,r),resolve(e,t){if(Yt.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new be,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};hf.YAMLSet=be;hf.set=mf});var nn=m(function(wf){var Cf=Re();function rn(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(s)=>t?BigInt(s):Number(s),o=n.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return r==="-"?i(-1)*o:o}function po(e){let{value:t}=e,r=(s)=>s;if(typeof t==="bigint")r=(s)=>BigInt(s);else if(isNaN(t)||!isFinite(t))return Cf.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),o=[t%i];if(t<60)o.unshift(0);else if(t=(t-o[0])/i,o.unshift(t%i),t>=60)t=(t-o[0])/i,o.unshift(t);return n+o.map((s)=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Sf={identify:(e)=>typeof e==="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>rn(e,r),stringify:po},kf={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(e)=>rn(e,!1),stringify:po},fo={identify:(e)=>e 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(e){let t=e.match(fo.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,o,s,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(r,n-1,i,o||0,s||0,a||0,l),p=t[8];if(p&&p!=="Z"){let u=rn(p,!1);if(Math.abs(u)<30)u*=60;c-=60000*u}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};wf.floatTime=kf;wf.intTime=Sf;wf.timestamp=fo});var mo=m(function(_f){var If=Ie(),Ef=Ft(),Rf=Ee(),Af=He(),Tf=Jr(),go=ao(),on=lo(),Ht=uo(),Nf=At(),Of=Qr(),Lf=jt(),Df=tn(),sn=nn(),qf=[If.map,Rf.seq,Af.string,Ef.nullTag,go.trueTag,go.falseTag,Ht.intBin,Ht.intOct,Ht.int,Ht.intHex,on.floatNaN,on.floatExp,on.float,Tf.binary,Nf.merge,Of.omap,Lf.pairs,Df.set,sn.intTime,sn.floatTime,sn.timestamp];_f.schema=qf});var vo=m(function(Yf){var Co=Ie(),Mf=Ft(),So=Ee(),$f=He(),Bf=jr(),an=Ur(),ln=Yr(),jf=zi(),Vf=Qi(),ko=Jr(),ze=At(),wo=Qr(),xo=jt(),ho=mo(),Po=tn(),Gt=nn(),yo=new Map([["core",jf.schema],["failsafe",[Co.map,So.seq,$f.string]],["json",Vf.schema],["yaml11",ho.schema],["yaml-1.1",ho.schema]]),bo={binary:ko.binary,bool:Bf.boolTag,float:an.float,floatExp:an.floatExp,floatNaN:an.floatNaN,floatTime:Gt.floatTime,int:ln.int,intHex:ln.intHex,intOct:ln.intOct,intTime:Gt.intTime,map:Co.map,merge:ze.merge,null:Mf.nullTag,omap:wo.omap,pairs:xo.pairs,seq:So.seq,set:Po.set,timestamp:Gt.timestamp},Uf={"tag:yaml.org,2002:binary":ko.binary,"tag:yaml.org,2002:merge":ze.merge,"tag:yaml.org,2002:omap":wo.omap,"tag:yaml.org,2002:pairs":xo.pairs,"tag:yaml.org,2002:set":Po.set,"tag:yaml.org,2002:timestamp":Gt.timestamp};function Kf(e,t,r){let n=yo.get(t);if(n&&!e)return r&&!n.includes(ze.merge)?n.concat(ze.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let o=Array.from(yo.keys()).filter((s)=>s!=="yaml11").map((s)=>JSON.stringify(s)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)i=i.concat(o);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(ze.merge);return i.reduce((o,s)=>{let a=typeof s==="string"?bo[s]:s;if(!a){let l=JSON.stringify(s),c=Object.keys(bo).map((p)=>JSON.stringify(p)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!o.includes(a))o.push(a);return o},[])}Yf.coreKnownTags=Uf;Yf.getTags=Kf});var dn=m(function(Qf){var cn=R(),Wf=Ie(),Jf=Ee(),zf=He(),Wt=vo(),Xf=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class un{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Wt.getTags(e,"compat"):e?Wt.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?Wt.coreKnownTags:{},this.tags=Wt.getTags(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,cn.MAP,{value:Wf.map}),Object.defineProperty(this,cn.SCALAR,{value:zf.string}),Object.defineProperty(this,cn.SEQ,{value:Jf.seq}),this.sortMapEntries=typeof o==="function"?o:o===!0?Xf:null}clone(){let e=Object.create(un.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}Qf.Schema=un});var Io=m(function(rg){var eg=R(),pn=Ue(),Xe=Be();function tg(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)r.push(l),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=pn.createStringifyContext(e,t),{commentString:o}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let l=o(e.commentBefore);r.unshift(Xe.indentComment(l,""))}let s=!1,a=null;if(e.contents){if(eg.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let p=o(e.contents.commentBefore);r.push(Xe.indentComment(p,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>s=!0,c=pn.stringify(e.contents,i,()=>a=null,l);if(a)c+=Xe.lineComment(c,"",o(a));if((c[0]==="|"||c[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${c}`;else r.push(c)}else r.push(pn.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let l=o(e.comment);if(l.includes(`
55
+ ${o.comment}`:n.comment}n=i}e.items[r]=Bt.isPair(n)?n:new zr.Pair(n)}else t("Expected a sequence for this tag");return e}function eo(e,t,r){let{replacer:n}=r,i=new Fp.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){if(typeof n==="function")s=n.call(t,String(o++),s);let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)a=c[0],l=s[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=s;i.items.push(zr.createPair(a,l,r))}return i}var Mp={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zi,createNode:eo};$p.createPairs=eo;$p.pairs=Mp;$p.resolvePairs=Zi});var Qr=m(function(Yp){var to=R(),Xr=re(),We=ae(),Up=le(),ro=jt();class ye extends Up.YAMLSeq{constructor(){super();this.add=We.YAMLMap.prototype.add.bind(this),this.delete=We.YAMLMap.prototype.delete.bind(this),this.get=We.YAMLMap.prototype.get.bind(this),this.has=We.YAMLMap.prototype.has.bind(this),this.set=We.YAMLMap.prototype.set.bind(this),this.tag=ye.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;if(t?.onCreate)t.onCreate(r);for(let n of this.items){let i,o;if(to.isPair(n))i=Xr.toJS(n.key,"",t),o=Xr.toJS(n.value,i,t);else i=Xr.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,t,r){let n=ro.createPairs(e,t,r),i=new this;return i.items=n.items,i}}ye.tag="tag:yaml.org,2002:omap";var Kp={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ye,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=ro.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(to.isScalar(i))if(n.includes(i.value))t(`Ordered maps must not include duplicate keys: ${i.value}`);else n.push(i.value);return Object.assign(new ye,r)},createNode:(e,t,r)=>ye.from(e,t,r)};Yp.YAMLOMap=ye;Yp.omap=Kp});var ao=m(function(Wp){var no=O();function io({value:e,source:t},r){if(t&&(e?oo:so).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var oo={identify:(e)=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new no.Scalar(!0),stringify:io},so={identify:(e)=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new no.Scalar(!1),stringify:io};Wp.falseTag=so;Wp.trueTag=oo});var lo=m(function(tf){var Xp=O(),Zr=Re(),Qp={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Zr.stringifyNumber},Zp={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Zr.stringifyNumber(e)}},ef={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Xp.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:Zr.stringifyNumber};tf.float=ef;tf.floatExp=Zp;tf.floatNaN=Qp});var uo=m(function(uf){var co=Re(),Je=(e)=>typeof e==="bigint"||Number.isInteger(e);function Vt(e,t,r,{intAsBigInt:n}){let i=e[0];if(i==="-"||i==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let s=BigInt(e);return i==="-"?BigInt(-1)*s:s}let o=parseInt(e,r);return i==="-"?-1*o:o}function en(e,t,r){let{value:n}=e;if(Je(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return co.stringifyNumber(e)}var sf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Vt(e,2,2,r),stringify:(e)=>en(e,2,"0b")},af={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Vt(e,1,8,r),stringify:(e)=>en(e,8,"0")},lf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Vt(e,0,10,r),stringify:co.stringifyNumber},cf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Vt(e,2,16,r),stringify:(e)=>en(e,16,"0x")};uf.int=lf;uf.intBin=sf;uf.intHex=cf;uf.intOct=af});var tn=m(function(hf){var Yt=R(),Ut=oe(),Kt=ae();class be extends Kt.YAMLMap{constructor(e){super(e);this.tag=be.tag}add(e){let t;if(Yt.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new Ut.Pair(e.key,null);else t=new Ut.Pair(e,null);if(!Kt.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Kt.findPair(this.items,e);return!t&&Yt.isPair(r)?Yt.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Kt.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Ut.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);else throw Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,o,o);i.items.push(Ut.createPair(o,null,r))}return i}}be.tag="tag:yaml.org,2002:set";var mf={collection:"map",identify:(e)=>e instanceof Set,nodeClass:be,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>be.from(e,t,r),resolve(e,t){if(Yt.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new be,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};hf.YAMLSet=be;hf.set=mf});var nn=m(function(wf){var Cf=Re();function rn(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(s)=>t?BigInt(s):Number(s),o=n.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return r==="-"?i(-1)*o:o}function po(e){let{value:t}=e,r=(s)=>s;if(typeof t==="bigint")r=(s)=>BigInt(s);else if(isNaN(t)||!isFinite(t))return Cf.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),o=[t%i];if(t<60)o.unshift(0);else if(t=(t-o[0])/i,o.unshift(t%i),t>=60)t=(t-o[0])/i,o.unshift(t);return n+o.map((s)=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Sf={identify:(e)=>typeof e==="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>rn(e,r),stringify:po},kf={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(e)=>rn(e,!1),stringify:po},fo={identify:(e)=>e 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(e){let t=e.match(fo.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,o,s,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(r,n-1,i,o||0,s||0,a||0,l),p=t[8];if(p&&p!=="Z"){let u=rn(p,!1);if(Math.abs(u)<30)u*=60;c-=60000*u}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};wf.floatTime=kf;wf.intTime=Sf;wf.timestamp=fo});var mo=m(function(_f){var If=Ie(),Ef=Ft(),Rf=Ee(),Af=Ge(),Tf=Jr(),go=ao(),on=lo(),Gt=uo(),Nf=At(),Of=Qr(),Lf=jt(),Df=tn(),sn=nn(),qf=[If.map,Rf.seq,Af.string,Ef.nullTag,go.trueTag,go.falseTag,Gt.intBin,Gt.intOct,Gt.int,Gt.intHex,on.floatNaN,on.floatExp,on.float,Tf.binary,Nf.merge,Of.omap,Lf.pairs,Df.set,sn.intTime,sn.floatTime,sn.timestamp];_f.schema=qf});var vo=m(function(Yf){var Co=Ie(),Mf=Ft(),So=Ee(),$f=Ge(),Bf=jr(),an=Ur(),ln=Yr(),jf=zi(),Vf=Qi(),ko=Jr(),ze=At(),wo=Qr(),xo=jt(),ho=mo(),Po=tn(),Ht=nn(),yo=new Map([["core",jf.schema],["failsafe",[Co.map,So.seq,$f.string]],["json",Vf.schema],["yaml11",ho.schema],["yaml-1.1",ho.schema]]),bo={binary:ko.binary,bool:Bf.boolTag,float:an.float,floatExp:an.floatExp,floatNaN:an.floatNaN,floatTime:Ht.floatTime,int:ln.int,intHex:ln.intHex,intOct:ln.intOct,intTime:Ht.intTime,map:Co.map,merge:ze.merge,null:Mf.nullTag,omap:wo.omap,pairs:xo.pairs,seq:So.seq,set:Po.set,timestamp:Ht.timestamp},Uf={"tag:yaml.org,2002:binary":ko.binary,"tag:yaml.org,2002:merge":ze.merge,"tag:yaml.org,2002:omap":wo.omap,"tag:yaml.org,2002:pairs":xo.pairs,"tag:yaml.org,2002:set":Po.set,"tag:yaml.org,2002:timestamp":Ht.timestamp};function Kf(e,t,r){let n=yo.get(t);if(n&&!e)return r&&!n.includes(ze.merge)?n.concat(ze.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let o=Array.from(yo.keys()).filter((s)=>s!=="yaml11").map((s)=>JSON.stringify(s)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)i=i.concat(o);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(ze.merge);return i.reduce((o,s)=>{let a=typeof s==="string"?bo[s]:s;if(!a){let l=JSON.stringify(s),c=Object.keys(bo).map((p)=>JSON.stringify(p)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!o.includes(a))o.push(a);return o},[])}Yf.coreKnownTags=Uf;Yf.getTags=Kf});var dn=m(function(Qf){var cn=R(),Wf=Ie(),Jf=Ee(),zf=Ge(),Wt=vo(),Xf=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class un{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Wt.getTags(e,"compat"):e?Wt.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?Wt.coreKnownTags:{},this.tags=Wt.getTags(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,cn.MAP,{value:Wf.map}),Object.defineProperty(this,cn.SCALAR,{value:zf.string}),Object.defineProperty(this,cn.SEQ,{value:Jf.seq}),this.sortMapEntries=typeof o==="function"?o:o===!0?Xf:null}clone(){let e=Object.create(un.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}Qf.Schema=un});var Io=m(function(rg){var eg=R(),pn=Ue(),Xe=Be();function tg(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)r.push(l),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=pn.createStringifyContext(e,t),{commentString:o}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let l=o(e.commentBefore);r.unshift(Xe.indentComment(l,""))}let s=!1,a=null;if(e.contents){if(eg.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let p=o(e.contents.commentBefore);r.push(Xe.indentComment(p,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>s=!0,c=pn.stringify(e.contents,i,()=>a=null,l);if(a)c+=Xe.lineComment(c,"",o(a));if((c[0]==="|"||c[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${c}`;else r.push(c)}else r.push(pn.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let l=o(e.comment);if(l.includes(`
56
56
  `))r.push("..."),r.push(Xe.indentComment(l,""));else r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;if(l&&s)l=l.replace(/^\n+/,"");if(l){if((!s||a)&&r[r.length-1]!=="")r.push("");r.push(Xe.indentComment(o(l),""))}}return r.join(`
57
57
  `)+`
58
58
  `}rg.stringifyDocument=tg});var Qe=m(function(dg){var ig=Me(),Ae=wt(),U=R(),og=oe(),sg=re(),ag=dn(),lg=Io(),fn=Ct(),cg=Nr(),ug=$e(),gn=Tr();class mn{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,U.NODE_TYPE,{value:U.DOC});let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t,t=void 0;let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;if(r?._directives){if(this.directives=r._directives.atDocument(),this.directives.yaml.explicit)o=this.directives.yaml.version}else this.directives=new gn.Directives({version:o});this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(mn.prototype,{[U.NODE_TYPE]:{value:U.DOC}});if(e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives)e.directives=this.directives.clone();if(e.schema=this.schema.clone(),e.contents=U.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(Te(this.contents))this.contents.add(e)}addIn(e,t){if(Te(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=fn.anchorNames(this);e.anchor=!t||r.has(t)?fn.findNewAnchor(t||"a",r):t}return new ig.Alias(e.anchor)}createNode(e,t,r){let n=void 0;if(typeof t==="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let g=(b)=>typeof b==="number"||b instanceof String||b instanceof Number,h=t.filter(g).map(String);if(h.length>0)t=t.concat(h);n=t}else if(r===void 0&&t)r=t,t=void 0;let{aliasDuplicateObjects:i,anchorPrefix:o,flow:s,keepUndefined:a,onTagObj:l,tag:c}=r??{},{onAnchor:p,setAnchors:u,sourceObjects:d}=fn.createNodeAnchors(this,o||"a"),f={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:p,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:d},y=ug.createNode(e,c,f);if(s&&U.isCollection(y))y.flow=!0;return u(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new og.Pair(n,i)}delete(e){return Te(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(Ae.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return Te(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return U.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(Ae.isEmptyPath(e))return!t&&U.isScalar(this.contents)?this.contents.value:this.contents;return U.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return U.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(Ae.isEmptyPath(e))return this.contents!==void 0;return U.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=Ae.collectionFromPath(this.schema,[e],t);else if(Te(this.contents))this.contents.set(e,t)}setIn(e,t){if(Ae.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=Ae.collectionFromPath(this.schema,Array.from(e),t);else if(Te(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let r;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new gn.Directives({version:"1.1"});r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new gn.Directives({version:e});r={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;r=null;break;default:{let n=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new ag.Schema(Object.assign(r,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},a=sg.toJS(this.contents,t??"",s);if(typeof i==="function")for(let{count:l,res:c}of s.anchors.values())i(c,l);return typeof o==="function"?cg.applyReviver(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return lg.stringifyDocument(this,e)}}function Te(e){if(U.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}dg.Document=mn});var Ze=m(function(gg){class Jt extends Error{constructor(e,t,r,n){super();this.name=e,this.code=r,this.message=n,this.pos=t}}class Eo extends Jt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Ro extends Jt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}var fg=(e,t)=>(r)=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map((a)=>t.linePos(a));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80)s=s.substring(0,79)+"\u2026";if(n>1&&/^ *$/.test(s.substring(0,o))){let a=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
@@ -63,10 +63,10 @@ ${c}
63
63
  `}};gg.YAMLError=Jt;gg.YAMLParseError=Eo;gg.YAMLWarning=Ro;gg.prettifyError=fg});var et=m(function(Sg){function Cg(e,{flow:t,indicator:r,next:n,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let l=!1,c=a,p=a,u="",d="",f=!1,y=!1,g=null,h=null,b=null,k=null,w=null,P=null,I=null;for(let x of e){if(y){if(x.type!=="space"&&x.type!=="newline"&&x.type!=="comma")o(x.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=!1}if(g){if(c&&x.type!=="comment"&&x.type!=="newline")o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");g=null}switch(x.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&x.source.includes("\t"))g=x;p=!0;break;case"comment":{if(!p)o(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let L=x.source.substring(1)||" ";if(!u)u=L;else u+=d+L;d="",c=!1;break}case"newline":if(c){if(u)u+=x.source;else if(!P||r!=="seq-item-ind")l=!0}else d+=x.source;if(c=!0,f=!0,h||b)k=x;p=!0;break;case"anchor":if(h)o(x,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(x.source.endsWith(":"))o(x.offset+x.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);h=x,I??(I=x.offset),c=!1,p=!1,y=!0;break;case"tag":{if(b)o(x,"MULTIPLE_TAGS","A node can have at most one tag");b=x,I??(I=x.offset),c=!1,p=!1,y=!0;break}case r:if(h||b)o(x,"BAD_PROP_ORDER",`Anchors and tags must be after the ${x.source} indicator`);if(P)o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.source} in ${t??"collection"}`);P=x,c=r==="seq-item-ind"||r==="explicit-key-ind",p=!1;break;case"comma":if(t){if(w)o(x,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);w=x,c=!1,p=!1;break}default:o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.type} token`),c=!1,p=!1}}let v=e[e.length-1],A=v?v.offset+v.source.length:i;if(y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!==""))o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(g&&(c&&g.indent<=s||n?.type==="block-map"||n?.type==="block-seq"))o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:w,found:P,spaceBefore:l,comment:u,hasNewline:f,anchor:h,tag:b,newlineAfterProp:k,end:A,start:I??A}}Sg.resolveProps=Cg});var zt=m(function(wg){function hn(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
64
64
  `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(hn(t.key)||hn(t.value))return!0}return!1;default:return!0}}wg.containsNewline=hn});var yn=m(function(Ig){var Pg=zt();function vg(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];if(n.indent===e&&(n.source==="]"||n.source==="}")&&Pg.containsNewline(t))r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Ig.flowIndentCheck=vg});var bn=m(function(Ag){var Ao=R();function Rg(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n==="function"?n:(o,s)=>o===s||Ao.isScalar(o)&&Ao.isScalar(s)&&o.value===s.value;return t.some((o)=>i(o.key,r))}Ag.mapIncludes=Rg});var Do=m(function(qg){var To=oe(),Ng=ae(),No=et(),Og=zt(),Oo=yn(),Lg=bn(),Lo="All mapping items must start at the same column";function Dg({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??Ng.YAMLMap)(r.schema);if(r.atRoot)r.atRoot=!1;let l=n.offset,c=null;for(let p of n.items){let{start:u,key:d,sep:f,value:y}=p,g=No.resolveProps(u,{indicator:"explicit-key-ind",next:d??f?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!g.found;if(h){if(d){if(d.type==="block-seq")i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in d&&d.indent!==n.indent)i(l,"BAD_INDENT",Lo)}if(!g.anchor&&!g.tag&&!f){if(c=g.end,g.comment)if(a.comment)a.comment+=`
65
65
  `+g.comment;else a.comment=g.comment;continue}if(g.newlineAfterProp||Og.containsNewline(d))i(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(g.found?.indent!==n.indent)i(l,"BAD_INDENT",Lo);r.atKey=!0;let b=g.end,k=d?e(r,d,g,i):t(r,b,u,null,g,i);if(r.schema.compat)Oo.flowIndentCheck(n.indent,d,i);if(r.atKey=!1,Lg.mapIncludes(r,a.items,k))i(b,"DUPLICATE_KEY","Map keys must be unique");let w=No.resolveProps(f??[],{indicator:"map-value-ind",next:y,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=w.end,w.found){if(h){if(y?.type==="block-map"&&!w.hasNewline)i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&g.start<w.found.offset-1024)i(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let P=y?e(r,y,w,i):t(r,l,f,null,w,i);if(r.schema.compat)Oo.flowIndentCheck(n.indent,y,i);l=P.range[2];let I=new To.Pair(k,P);if(r.options.keepSourceTokens)I.srcToken=p;a.items.push(I)}else{if(h)i(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(w.comment)if(k.comment)k.comment+=`
66
- `+w.comment;else k.comment=w.comment;let P=new To.Pair(k);if(r.options.keepSourceTokens)P.srcToken=p;a.items.push(P)}}if(c&&c<l)i(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,l,c??l],a}qg.resolveBlockMap=Dg});var qo=m(function(jg){var Fg=le(),Mg=et(),$g=yn();function Bg({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??Fg.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let l=n.offset,c=null;for(let{start:p,value:u}of n.items){let d=Mg.resolveProps(p,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)if(u?.type==="block-seq")i(d.end,"BAD_INDENT","All sequence items must start at the same column");else i(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=d.end,d.comment)a.comment=d.comment;continue}let f=u?e(r,u,d,i):t(r,d.end,p,null,d,i);if(r.schema.compat)$g.flowIndentCheck(n.indent,u,i);l=f.range[2],a.items.push(f)}return a.range=[n.offset,l,c??l],a}jg.resolveBlockSeq=Bg});var Ne=m(function(Kg){function Ug(e,t,r,n){let i="";if(e){let o=!1,s="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{if(r&&!o)n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=l.substring(1)||" ";if(!i)i=p;else i+=s+p;s="";break}case"newline":if(i)s+=l;o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:i,offset:t}}Kg.resolveEnd=Ug});var Mo=m(function(Zg){var Hg=R(),Gg=oe(),_o=ae(),Wg=le(),Jg=Ne(),Fo=et(),zg=zt(),Xg=bn(),Cn="Block collections are not allowed within flow collections",Sn=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function Qg({composeNode:e,composeEmptyNode:t},r,n,i,o){let s=n.start.source==="{",a=s?"flow map":"flow sequence",c=new(o?.nodeClass??(s?_o.YAMLMap:Wg.YAMLSeq))(r.schema);c.flow=!0;let p=r.atRoot;if(p)r.atRoot=!1;if(r.atKey)r.atKey=!1;let u=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let b=n.items[h],{start:k,key:w,sep:P,value:I}=b,v=Fo.resolveProps(k,{flow:a,indicator:"explicit-key-ind",next:w??P?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!v.found){if(!v.anchor&&!v.tag&&!P&&!I){if(h===0&&v.comma)i(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(h<n.items.length-1)i(v.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(v.comment)if(c.comment)c.comment+=`
67
- `+v.comment;else c.comment=v.comment;u=v.end;continue}if(!s&&r.options.strict&&zg.containsNewline(w))i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(v.comma)i(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!v.comma)i(v.start,"MISSING_CHAR",`Missing , between ${a} items`);if(v.comment){let A="";e:for(let x of k)switch(x.type){case"comma":case"space":break;case"comment":A=x.source.substring(1);break e;default:break e}if(A){let x=c.items[c.items.length-1];if(Hg.isPair(x))x=x.value??x.key;if(x.comment)x.comment+=`
66
+ `+w.comment;else k.comment=w.comment;let P=new To.Pair(k);if(r.options.keepSourceTokens)P.srcToken=p;a.items.push(P)}}if(c&&c<l)i(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,l,c??l],a}qg.resolveBlockMap=Dg});var qo=m(function(jg){var Fg=le(),Mg=et(),$g=yn();function Bg({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??Fg.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let l=n.offset,c=null;for(let{start:p,value:u}of n.items){let d=Mg.resolveProps(p,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)if(u?.type==="block-seq")i(d.end,"BAD_INDENT","All sequence items must start at the same column");else i(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=d.end,d.comment)a.comment=d.comment;continue}let f=u?e(r,u,d,i):t(r,d.end,p,null,d,i);if(r.schema.compat)$g.flowIndentCheck(n.indent,u,i);l=f.range[2],a.items.push(f)}return a.range=[n.offset,l,c??l],a}jg.resolveBlockSeq=Bg});var Ne=m(function(Kg){function Ug(e,t,r,n){let i="";if(e){let o=!1,s="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{if(r&&!o)n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=l.substring(1)||" ";if(!i)i=p;else i+=s+p;s="";break}case"newline":if(i)s+=l;o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:i,offset:t}}Kg.resolveEnd=Ug});var Mo=m(function(Zg){var Gg=R(),Hg=oe(),_o=ae(),Wg=le(),Jg=Ne(),Fo=et(),zg=zt(),Xg=bn(),Cn="Block collections are not allowed within flow collections",Sn=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function Qg({composeNode:e,composeEmptyNode:t},r,n,i,o){let s=n.start.source==="{",a=s?"flow map":"flow sequence",c=new(o?.nodeClass??(s?_o.YAMLMap:Wg.YAMLSeq))(r.schema);c.flow=!0;let p=r.atRoot;if(p)r.atRoot=!1;if(r.atKey)r.atKey=!1;let u=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let b=n.items[h],{start:k,key:w,sep:P,value:I}=b,v=Fo.resolveProps(k,{flow:a,indicator:"explicit-key-ind",next:w??P?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!v.found){if(!v.anchor&&!v.tag&&!P&&!I){if(h===0&&v.comma)i(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(h<n.items.length-1)i(v.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(v.comment)if(c.comment)c.comment+=`
67
+ `+v.comment;else c.comment=v.comment;u=v.end;continue}if(!s&&r.options.strict&&zg.containsNewline(w))i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(v.comma)i(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!v.comma)i(v.start,"MISSING_CHAR",`Missing , between ${a} items`);if(v.comment){let A="";e:for(let x of k)switch(x.type){case"comma":case"space":break;case"comment":A=x.source.substring(1);break e;default:break e}if(A){let x=c.items[c.items.length-1];if(Gg.isPair(x))x=x.value??x.key;if(x.comment)x.comment+=`
68
68
  `+A;else x.comment=A;v.comment=v.comment.substring(A.length+1)}}}if(!s&&!P&&!v.found){let A=I?e(r,I,v,i):t(r,v.end,P,null,v,i);if(c.items.push(A),u=A.range[2],Sn(I))i(A.range,"BLOCK_IN_FLOW",Cn)}else{r.atKey=!0;let A=v.end,x=w?e(r,w,v,i):t(r,A,k,null,v,i);if(Sn(w))i(x.range,"BLOCK_IN_FLOW",Cn);r.atKey=!1;let L=Fo.resolveProps(P??[],{flow:a,indicator:"map-value-ind",next:I,offset:x.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(L.found){if(!s&&!v.found&&r.options.strict){if(P)for(let D of P){if(D===L.found)break;if(D.type==="newline"){i(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(v.start<L.found.offset-1024)i(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(I)if("source"in I&&I.source?.[0]===":")i(I,"MISSING_CHAR",`Missing space after : in ${a}`);else i(L.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let te=I?e(r,I,L,i):L.found?t(r,L.end,P,null,L,i):null;if(te){if(Sn(I))i(te.range,"BLOCK_IN_FLOW",Cn)}else if(L.comment)if(x.comment)x.comment+=`
69
- `+L.comment;else x.comment=L.comment;let ke=new Gg.Pair(x,te);if(r.options.keepSourceTokens)ke.srcToken=b;if(s){let D=c;if(Xg.mapIncludes(r,D.items,x))i(A,"DUPLICATE_KEY","Map keys must be unique");D.items.push(ke)}else{let D=new _o.YAMLMap(r.schema);D.flow=!0,D.items.push(ke);let si=(te??x).range;D.range=[x.range[0],si[1],si[2]],c.items.push(D)}u=te?te.range[2]:L.end}}let d=s?"}":"]",[f,...y]=n.end,g=u;if(f?.source===d)g=f.offset+f.source.length;else{let h=a[0].toUpperCase()+a.substring(1),b=p?`${h} must end with a ${d}`:`${h} in block collection must be sufficiently indented and end with a ${d}`;if(i(u,p?"MISSING_CHAR":"BAD_INDENT",b),f&&f.source.length!==1)y.unshift(f)}if(y.length>0){let h=Jg.resolveEnd(y,g,r.options.strict,i);if(h.comment)if(c.comment)c.comment+=`
69
+ `+L.comment;else x.comment=L.comment;let ke=new Hg.Pair(x,te);if(r.options.keepSourceTokens)ke.srcToken=b;if(s){let D=c;if(Xg.mapIncludes(r,D.items,x))i(A,"DUPLICATE_KEY","Map keys must be unique");D.items.push(ke)}else{let D=new _o.YAMLMap(r.schema);D.flow=!0,D.items.push(ke);let si=(te??x).range;D.range=[x.range[0],si[1],si[2]],c.items.push(D)}u=te?te.range[2]:L.end}}let d=s?"}":"]",[f,...y]=n.end,g=u;if(f?.source===d)g=f.offset+f.source.length;else{let h=a[0].toUpperCase()+a.substring(1),b=p?`${h} must end with a ${d}`:`${h} in block collection must be sufficiently indented and end with a ${d}`;if(i(u,p?"MISSING_CHAR":"BAD_INDENT",b),f&&f.source.length!==1)y.unshift(f)}if(y.length>0){let h=Jg.resolveEnd(y,g,r.options.strict,i);if(h.comment)if(c.comment)c.comment+=`
70
70
  `+h.comment;else c.comment=h.comment;c.range=[n.offset,g,h.offset]}else c.range=[n.offset,g,g];return c}Zg.resolveFlowCollection=Qg});var $o=m(function(cm){var tm=R(),rm=O(),nm=ae(),im=le(),om=Do(),sm=qo(),am=Mo();function kn(e,t,r,n,i,o){let s=r.type==="block-map"?om.resolveBlockMap(e,t,r,n,o):r.type==="block-seq"?sm.resolveBlockSeq(e,t,r,n,o):am.resolveFlowCollection(e,t,r,n,o),a=s.constructor;if(i==="!"||i===a.tagName)return s.tag=a.tagName,s;if(i)s.tag=i;return s}function lm(e,t,r,n,i){let o=n.tag,s=!o?null:t.directives.tagName(o.source,(d)=>i(o,"TAG_RESOLVE_FAILED",d));if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:f}=n,y=d&&o?d.offset>o.offset?d:o:d??o;if(y&&(!f||f.offset<y.offset))i(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===nm.YAMLMap.tagName&&a==="map"||s===im.YAMLSeq.tagName&&a==="seq")return kn(e,t,r,i,s);let l=t.schema.tags.find((d)=>d.tag===s&&d.collection===a);if(!l){let d=t.schema.knownTags[s];if(d?.collection===a)t.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else{if(d)i(o,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0);else i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0);return kn(e,t,r,i,s)}}let c=kn(e,t,r,i,s,l),p=l.resolve?.(c,(d)=>i(o,"TAG_RESOLVE_FAILED",d),t.options)??c,u=tm.isNode(p)?p:new rm.Scalar(p);if(u.range=c.range,u.tag=s,l?.format)u.format=l.format;return u}cm.composeCollection=lm});var xn=m(function(gm){var wn=O();function dm(e,t,r){let n=t.offset,i=pm(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let o=i.mode===">"?wn.Scalar.BLOCK_FOLDED:wn.Scalar.BLOCK_LITERAL,s=t.source?fm(t.source):[],a=s.length;for(let g=s.length-1;g>=0;--g){let h=s[g][1];if(h===""||h==="\r")a=g;else break}if(a===0){let g=i.chomp==="+"&&s.length>0?`
71
71
  `.repeat(Math.max(1,s.length-1)):"",h=n+i.length;if(t.source)h+=t.source.length;return{value:g,type:o,comment:i.comment,range:[n,h,h]}}let l=t.indent+i.indent,c=t.offset+i.length,p=0;for(let g=0;g<a;++g){let[h,b]=s[g];if(b===""||b==="\r"){if(i.indent===0&&h.length>l)l=h.length}else{if(h.length<l)r(c+h.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(i.indent===0)l=h.length;if(p=g,l===0&&!e.atRoot)r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=h.length+b.length+1}for(let g=s.length-1;g>=a;--g)if(s[g][0].length>l)a=g+1;let u="",d="",f=!1;for(let g=0;g<p;++g)u+=s[g][0].slice(l)+`
72
72
  `;for(let g=p;g<a;++g){let[h,b]=s[g];c+=h.length+b.length+1;let k=b[b.length-1]==="\r";if(k)b=b.slice(0,-1);if(b&&h.length<l){let P=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(c-b.length-(k?2:1),"BAD_INDENT",P),h=""}if(o===wn.Scalar.BLOCK_LITERAL)u+=d+h.slice(l)+b,d=`
@@ -95,7 +95,7 @@ ${c}
95
95
  `)break;if(n===`
96
96
  `)r+=`
97
97
  `;t+=1,n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}var wm={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
98
- `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function xm(e,t,r,n){let i=e.substr(t,r),s=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(s)}catch{let a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}Pm.resolveFlowScalar=ym});var Vo=m(function(Nm){var Ce=R(),jo=O(),Im=xn(),Em=vn();function Rm(e,t,r,n){let{value:i,type:o,comment:s,range:a}=t.type==="block-scalar"?Im.resolveBlockScalar(e,t,n):Em.resolveFlowScalar(t,e.options.strict,n),l=r?e.directives.tagName(r.source,(u)=>n(r,"TAG_RESOLVE_FAILED",u)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[Ce.SCALAR];else if(l)c=Am(e.schema,i,l,r,n);else if(t.type==="scalar")c=Tm(e,i,t,n);else c=e.schema[Ce.SCALAR];let p;try{let u=c.resolve(i,(d)=>n(r??t,"TAG_RESOLVE_FAILED",d),e.options);p=Ce.isScalar(u)?u:new jo.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);n(r??t,"TAG_RESOLVE_FAILED",d),p=new jo.Scalar(i)}if(p.range=a,p.source=i,o)p.type=o;if(l)p.tag=l;if(c.format)p.format=c.format;if(s)p.comment=s;return p}function Am(e,t,r,n,i){if(r==="!")return e[Ce.SCALAR];let o=[];for(let a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(t))return a;let s=e.knownTags[r];if(s&&!s.collection)return e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Ce.SCALAR]}function Tm({atKey:e,directives:t,schema:r},n,i,o){let s=r.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(n))||r[Ce.SCALAR];if(r.compat){let a=r.compat.find((l)=>l.default&&l.test?.test(n))??r[Ce.SCALAR];if(s.tag!==a.tag){let l=t.tagString(s.tag),c=t.tagString(a.tag),p=`Value may be parsed as either ${l} or ${c}`;o(i,"TAG_RESOLVE_FAILED",p,!0)}}return s}Nm.composeScalar=Rm});var Uo=m(function(Dm){function Lm(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}i=t[++n];while(i?.type==="space")e+=i.source.length,i=t[++n];break}}return e}Dm.emptyScalarPosition=Lm});var Ho=m(function(Um){var _m=Me(),Fm=R(),Mm=$o(),Ko=Vo(),$m=Ne(),Bm=Uo(),jm={composeNode:Yo,composeEmptyNode:In};function Yo(e,t,r,n){let i=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:l}=r,c,p=!0;switch(t.type){case"alias":if(c=Vm(e,t,n),a||l)n(t,"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(c=Ko.composeScalar(e,t,l,n),a)c.anchor=a.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(c=Mm.composeCollection(jm,e,t,r,n),a)c.anchor=a.source.substring(1)}catch(u){let d=u instanceof Error?u.message:String(u);n(t,"RESOURCE_EXHAUSTION",d)}break;default:{let u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",u),p=!1}}if(c??(c=In(e,t.offset,void 0,null,r,n)),a&&c.anchor==="")n(a,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!Fm.isScalar(c)||typeof c.value!=="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str"))n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(o)c.spaceBefore=!0;if(s)if(t.type==="scalar"&&t.source==="")c.comment=s;else c.commentBefore=s;if(e.options.keepSourceTokens&&p)c.srcToken=t;return c}function In(e,t,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){let p={type:"scalar",offset:Bm.emptyScalarPosition(t,r,n),indent:-1,source:""},u=Ko.composeScalar(e,p,a,c);if(s){if(u.anchor=s.source.substring(1),u.anchor==="")c(s,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)u.spaceBefore=!0;if(o)u.comment=o,u.range[2]=l;return u}function Vm({options:e},{offset:t,source:r,end:n},i){let o=new _m.Alias(r.substring(1));if(o.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(o.source.endsWith(":"))i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+r.length,a=$m.resolveEnd(n,s,e.strict,i);if(o.range=[t,s,a.offset],a.comment)o.comment=a.comment;return o}Um.composeEmptyNode=In;Um.composeNode=Yo});var Wo=m(function(zm){var Hm=Qe(),Go=Ho(),Gm=Ne(),Wm=et();function Jm(e,t,{offset:r,start:n,value:i,end:o},s){let a=Object.assign({_directives:t},e),l=new Hm.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},p=Wm.resolveProps(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});if(p.found){if(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!p.hasNewline)s(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=i?Go.composeNode(c,i,p,s):Go.composeEmptyNode(c,p.end,n,null,p,s);let u=l.contents.range[2],d=Gm.resolveEnd(o,u,!1,s);if(d.comment)l.comment=d.comment;return l.range=[r,u,d.offset],l}zm.composeDoc=Jm});var En=m(function(nh){var Qm=gt("process"),Zm=Tr(),eh=Qe(),tt=Ze(),Jo=R(),th=Wo(),rh=Ne();function rt(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function zo(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let o=e[i];switch(o[0]){case"#":t+=(t===""?"":n?`
98
+ `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function xm(e,t,r,n){let i=e.substr(t,r),s=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(s)}catch{let a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}Pm.resolveFlowScalar=ym});var Vo=m(function(Nm){var Ce=R(),jo=O(),Im=xn(),Em=vn();function Rm(e,t,r,n){let{value:i,type:o,comment:s,range:a}=t.type==="block-scalar"?Im.resolveBlockScalar(e,t,n):Em.resolveFlowScalar(t,e.options.strict,n),l=r?e.directives.tagName(r.source,(u)=>n(r,"TAG_RESOLVE_FAILED",u)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[Ce.SCALAR];else if(l)c=Am(e.schema,i,l,r,n);else if(t.type==="scalar")c=Tm(e,i,t,n);else c=e.schema[Ce.SCALAR];let p;try{let u=c.resolve(i,(d)=>n(r??t,"TAG_RESOLVE_FAILED",d),e.options);p=Ce.isScalar(u)?u:new jo.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);n(r??t,"TAG_RESOLVE_FAILED",d),p=new jo.Scalar(i)}if(p.range=a,p.source=i,o)p.type=o;if(l)p.tag=l;if(c.format)p.format=c.format;if(s)p.comment=s;return p}function Am(e,t,r,n,i){if(r==="!")return e[Ce.SCALAR];let o=[];for(let a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(t))return a;let s=e.knownTags[r];if(s&&!s.collection)return e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Ce.SCALAR]}function Tm({atKey:e,directives:t,schema:r},n,i,o){let s=r.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(n))||r[Ce.SCALAR];if(r.compat){let a=r.compat.find((l)=>l.default&&l.test?.test(n))??r[Ce.SCALAR];if(s.tag!==a.tag){let l=t.tagString(s.tag),c=t.tagString(a.tag),p=`Value may be parsed as either ${l} or ${c}`;o(i,"TAG_RESOLVE_FAILED",p,!0)}}return s}Nm.composeScalar=Rm});var Uo=m(function(Dm){function Lm(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}i=t[++n];while(i?.type==="space")e+=i.source.length,i=t[++n];break}}return e}Dm.emptyScalarPosition=Lm});var Go=m(function(Um){var _m=Me(),Fm=R(),Mm=$o(),Ko=Vo(),$m=Ne(),Bm=Uo(),jm={composeNode:Yo,composeEmptyNode:In};function Yo(e,t,r,n){let i=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:l}=r,c,p=!0;switch(t.type){case"alias":if(c=Vm(e,t,n),a||l)n(t,"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(c=Ko.composeScalar(e,t,l,n),a)c.anchor=a.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(c=Mm.composeCollection(jm,e,t,r,n),a)c.anchor=a.source.substring(1)}catch(u){let d=u instanceof Error?u.message:String(u);n(t,"RESOURCE_EXHAUSTION",d)}break;default:{let u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",u),p=!1}}if(c??(c=In(e,t.offset,void 0,null,r,n)),a&&c.anchor==="")n(a,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!Fm.isScalar(c)||typeof c.value!=="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str"))n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(o)c.spaceBefore=!0;if(s)if(t.type==="scalar"&&t.source==="")c.comment=s;else c.commentBefore=s;if(e.options.keepSourceTokens&&p)c.srcToken=t;return c}function In(e,t,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){let p={type:"scalar",offset:Bm.emptyScalarPosition(t,r,n),indent:-1,source:""},u=Ko.composeScalar(e,p,a,c);if(s){if(u.anchor=s.source.substring(1),u.anchor==="")c(s,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)u.spaceBefore=!0;if(o)u.comment=o,u.range[2]=l;return u}function Vm({options:e},{offset:t,source:r,end:n},i){let o=new _m.Alias(r.substring(1));if(o.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(o.source.endsWith(":"))i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+r.length,a=$m.resolveEnd(n,s,e.strict,i);if(o.range=[t,s,a.offset],a.comment)o.comment=a.comment;return o}Um.composeEmptyNode=In;Um.composeNode=Yo});var Wo=m(function(zm){var Gm=Qe(),Ho=Go(),Hm=Ne(),Wm=et();function Jm(e,t,{offset:r,start:n,value:i,end:o},s){let a=Object.assign({_directives:t},e),l=new Gm.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},p=Wm.resolveProps(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});if(p.found){if(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!p.hasNewline)s(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=i?Ho.composeNode(c,i,p,s):Ho.composeEmptyNode(c,p.end,n,null,p,s);let u=l.contents.range[2],d=Hm.resolveEnd(o,u,!1,s);if(d.comment)l.comment=d.comment;return l.range=[r,u,d.offset],l}zm.composeDoc=Jm});var En=m(function(nh){var Qm=gt("process"),Zm=Tr(),eh=Qe(),tt=Ze(),Jo=R(),th=Wo(),rh=Ne();function rt(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function zo(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let o=e[i];switch(o[0]){case"#":t+=(t===""?"":n?`
99
99
 
100
100
  `:`
101
101
  `)+(o.substring(1)||" "),r=!0,n=!1;break;case"%":if(e[i+1]?.[0]!=="#")i+=1;r=!1;break;default:if(!r)n=!0;r=!1}}return{comment:t,afterEmptyLine:n}}class Xo{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,i)=>{let o=rt(t);if(i)this.warnings.push(new tt.YAMLWarning(o,r,n));else this.errors.push(new tt.YAMLParseError(o,r,n))},this.directives=new Zm.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=zo(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
@@ -112,30 +112,30 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
112
112
  `});for(let l of Object.keys(e))if(l!=="type"&&l!=="offset")delete e[l];Object.assign(e,{type:"block-scalar",indent:s,props:a,source:i})}}function Zo(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function Rn(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),i=t.length;if(e.props[0].type==="block-scalar-header")i-=e.props[0].source.length;for(let o of n)o.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
113
113
  `};delete e.items,Object.assign(e,{type:r,source:t,end:[i]});break}default:{let n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((o)=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(e))if(o!=="type"&&o!=="offset")delete e[o];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}ph.createScalarToken=ch;ph.resolveAsScalar=lh;ph.setScalarValue=uh});var ts=m(function(yh){var hh=(e)=>("type"in e)?Qt(e):Xt(e);function Qt(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=Qt(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=Xt(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=Xt(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=Xt(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function Xt({start:e,key:t,sep:r,value:n}){let i="";for(let o of e)i+=o.source;if(t)i+=Qt(t);if(r)for(let o of r)i+=o.source;if(n)i+=Qt(n);return i}yh.stringify=hh});var is=m(function(Sh){var An=Symbol("break visit"),Ch=Symbol("skip children"),rs=Symbol("remove item");function Se(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};ns(Object.freeze([]),e,t)}Se.BREAK=An;Se.SKIP=Ch;Se.REMOVE=rs;Se.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let o=r?.[n];if(o&&"items"in o)r=o.items[i];else return}return r};Se.parentCollection=(e,t)=>{let r=Se.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw Error("Parent collection not found")};function ns(e,t,r){let n=r(t,e);if(typeof n==="symbol")return n;for(let i of["key","value"]){let o=t[i];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=ns(Object.freeze(e.concat([[i,s]])),o.items[s],r);if(typeof a==="number")s=a-1;else if(a===An)return An;else if(a===rs)o.items.splice(s,1),s-=1}if(typeof n==="function"&&i==="key")n=n(t,e)}}return typeof n==="function"?n(t,e):n}Sh.visit=Se});var Zt=m(function(Rh){var Tn=es(),wh=ts(),xh=is(),Nn="\uFEFF",On="\x02",Ln="\x18",Dn="\x1F",Ph=(e)=>!!e&&("items"in e),vh=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Ih(e){switch(e){case Nn:return"<BOM>";case On:return"<DOC>";case Ln:return"<FLOW_END>";case Dn:return"<SCALAR>";default:return JSON.stringify(e)}}function Eh(e){switch(e){case Nn:return"byte-order-mark";case On:return"doc-mode";case Ln:return"flow-error-end";case Dn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
114
114
  `:case`\r
115
- `: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(e[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}Rh.createScalarToken=Tn.createScalarToken;Rh.resolveAsScalar=Tn.resolveAsScalar;Rh.setScalarValue=Tn.setScalarValue;Rh.stringify=wh.stringify;Rh.visit=xh.visit;Rh.BOM=Nn;Rh.DOCUMENT=On;Rh.FLOW_END=Ln;Rh.SCALAR=Dn;Rh.isCollection=Ph;Rh.isScalar=vh;Rh.prettyToken=Ih;Rh.tokenType=Eh});var _n=m(function(Kh){var nt=Zt();function G(e){switch(e){case void 0:case" ":case`
115
+ `: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(e[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}Rh.createScalarToken=Tn.createScalarToken;Rh.resolveAsScalar=Tn.resolveAsScalar;Rh.setScalarValue=Tn.setScalarValue;Rh.stringify=wh.stringify;Rh.visit=xh.visit;Rh.BOM=Nn;Rh.DOCUMENT=On;Rh.FLOW_END=Ln;Rh.SCALAR=Dn;Rh.isCollection=Ph;Rh.isScalar=vh;Rh.prettyToken=Ih;Rh.tokenType=Eh});var _n=m(function(Kh){var nt=Zt();function H(e){switch(e){case void 0:case" ":case`
116
116
  `:case"\r":case"\t":return!0;default:return!1}}var os=new Set("0123456789ABCDEFabcdef"),Vh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),er=new Set(",[]{}"),Uh=new Set(` ,[]{}
117
117
  \r `),qn=(e)=>!e||Uh.has(e);class ss{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";while(r&&(t||this.hasChars(1)))r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
118
118
  `)return!0;if(t==="\r")return this.buffer[e+1]===`
119
119
  `;return!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;while(t===" ")t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
120
120
  `||!n&&!this.atEnd)return e+r+1}return t===`
121
- `||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&G(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos)e=this.buffer.indexOf(`
122
- `,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===nt.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,r=e.indexOf("#");while(r!==-1){let i=e[r-1];if(i===" "||i==="\t"){t=r-1;break}else r=e.indexOf("#",r+1)}while(!0){let i=e[t-1];if(i===" "||i==="\t")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield nt.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&G(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!G(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&G(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(qn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=r=t;else t=0;t+=yield*this.pushSpaces(!0)}while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if(r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&G(n[3])){if(!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield nt.FLOW_END,yield*this.parseLineStart()}let i=0;while(n[i]===",")i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),n[i]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(qn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||G(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2);else while(t!==-1){let i=0;while(this.buffer[t-1-i]==="\\")i+=1;if(i%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf(`
121
+ `||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&H(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos)e=this.buffer.indexOf(`
122
+ `,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===nt.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,r=e.indexOf("#");while(r!==-1){let i=e[r-1];if(i===" "||i==="\t"){t=r-1;break}else r=e.indexOf("#",r+1)}while(!0){let i=e[t-1];if(i===" "||i==="\t")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield nt.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&H(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!H(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&H(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(qn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=r=t;else t=0;t+=yield*this.pushSpaces(!0)}while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if(r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&H(n[3])){if(!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield nt.FLOW_END,yield*this.parseLineStart()}let i=0;while(n[i]===",")i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),n[i]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(qn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||H(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2);else while(t!==-1){let i=0;while(this.buffer[t-1-i]==="\\")i+=1;if(i%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf(`
123
123
  `,this.pos);if(n!==-1){while(n!==-1){let i=this.continueScalar(n+1);if(i===-1)break;n=r.indexOf(`
124
- `,i)}if(n!==-1)t=n-(r[n-1]==="\r"?2:1)}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;while(!0){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((t)=>G(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":t+=1;break;case`
124
+ `,i)}if(n!==-1)t=n-(r[n-1]==="\r"?2:1)}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;while(!0){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((t)=>H(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":t+=1;break;case`
125
125
  `:e=i,t=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
126
126
  `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
127
127
  `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;r=this.buffer[n];while(r===" ")r=this.buffer[++n];if(r==="\t"){while(r==="\t"||r===" "||r==="\r"||r===`
128
128
  `)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];if(o==="\r")o=this.buffer[--i];let s=i;while(o===" ")o=this.buffer[--i];if(o===`
129
- `&&i>=this.pos&&i+1+t>s)e=i;else break}while(!0);return yield nt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;while(n=this.buffer[++r])if(n===":"){let i=this.buffer[r+1];if(G(i)||e&&er.has(i))break;t=r}else if(G(n)){let i=this.buffer[r+1];if(n==="\r")if(i===`
129
+ `&&i>=this.pos&&i+1+t>s)e=i;else break}while(!0);return yield nt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;while(n=this.buffer[++r])if(n===":"){let i=this.buffer[r+1];if(H(i)||e&&er.has(i))break;t=r}else if(H(n)){let i=this.buffer[r+1];if(n==="\r")if(i===`
130
130
  `)r+=1,n=`
131
131
  `,i=this.buffer[r+1];else t=r;if(i==="#"||e&&er.has(i))break;if(n===`
132
- `){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&er.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield nt.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc"}*pushCount(e){if(e>0)return yield this.buffer.substr(this.pos,e),this.pos+=e,e;return 0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);if(r)return yield r,this.pos+=r.length,r.length;else if(t)yield"";return 0}*pushIndicators(){let e=0;e:while(!0){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(qn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(G(r)||t&&er.has(r)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];while(!G(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];while(t)if(Vh.has(t))t=this.buffer[++e];else if(t==="%"&&os.has(this.buffer[e+1])&&os.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];if(e===`
132
+ `){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&er.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield nt.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc"}*pushCount(e){if(e>0)return yield this.buffer.substr(this.pos,e),this.pos+=e,e;return 0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);if(r)return yield r,this.pos+=r.length,r.length;else if(t)yield"";return 0}*pushIndicators(){let e=0;e:while(!0){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(qn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(H(r)||t&&er.has(r)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];while(!H(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];while(t)if(Vh.has(t))t=this.buffer[++e];else if(t==="%"&&os.has(this.buffer[e+1])&&os.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];if(e===`
133
133
  `)return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)===`
134
- `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="\t");let n=t-this.pos;if(n>0)yield this.buffer.substr(this.pos,n),this.pos=t;return n}*pushUntil(e){let t=this.pos,r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}Kh.Lexer=ss});var Fn=m(function(Hh){class as{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,r=this.lineStarts.length;while(t<r){let i=t+r>>1;if(this.lineStarts[i]<e)t=i+1;else r=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}Hh.LineCounter=as});var Mn=m(function(zh){var Wh=gt("process"),ls=Zt(),Jh=_n();function ce(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function cs(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function ds(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function tr(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Oe(e){if(e.length===0)return[];let t=e.length;e:while(--t>=0)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(e[++t]?.type==="space");return e.splice(t,e.length)}function rr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function us(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!ce(t.start,"explicit-key-ind")&&!ce(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,ds(t.value))if(t.value.end)rr(t.value.end,t.sep);else t.value.end=t.sep;else rr(t.start,t.sep);delete t.sep}}}class ps{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Jh.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){if(this.source=e,Wh.env.LOG_TOKENS)console.log("|",ls.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ls.tokenType(e);if(!t){let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}else if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.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 e=this.peek(1);if(this.type==="doc-end"&&e?.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(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in r?r.indent:0;else if(t.type==="flow-collection"&&r.type==="document")t.indent=0;if(t.type==="flow-collection")us(t);switch(r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];if(n.value)r.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];if(!n||n.value)r.items.push({start:[],key:t,sep:[]});else if(n.sep)n.value=t;else Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&cs(n.start)===-1&&(t.indent===0||n.start.every((i)=>i.type!=="comment"||i.indent<t.indent))){if(r.type==="document")r.end=n.start;else r.items.push({start:n.start});t.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")e.start.push(this.sourceToken);this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{if(cs(e.start)!==-1)yield*this.pop(),yield*this.step();else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);if(t)this.stack.push(t);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=tr(this.peek(2)),r=Oe(t),n;if(e.end)n=e.end,n.push(this.sourceToken),delete e.end;else n=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
134
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="\t");let n=t-this.pos;if(n>0)yield this.buffer.substr(this.pos,n),this.pos=t;return n}*pushUntil(e){let t=this.pos,r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}Kh.Lexer=ss});var Fn=m(function(Gh){class as{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,r=this.lineStarts.length;while(t<r){let i=t+r>>1;if(this.lineStarts[i]<e)t=i+1;else r=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}Gh.LineCounter=as});var Mn=m(function(zh){var Wh=gt("process"),ls=Zt(),Jh=_n();function ce(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function cs(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function ds(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function tr(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Oe(e){if(e.length===0)return[];let t=e.length;e:while(--t>=0)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(e[++t]?.type==="space");return e.splice(t,e.length)}function rr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function us(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!ce(t.start,"explicit-key-ind")&&!ce(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,ds(t.value))if(t.value.end)rr(t.value.end,t.sep);else t.value.end=t.sep;else rr(t.start,t.sep);delete t.sep}}}class ps{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Jh.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){if(this.source=e,Wh.env.LOG_TOKENS)console.log("|",ls.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ls.tokenType(e);if(!t){let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}else if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.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 e=this.peek(1);if(this.type==="doc-end"&&e?.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(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in r?r.indent:0;else if(t.type==="flow-collection"&&r.type==="document")t.indent=0;if(t.type==="flow-collection")us(t);switch(r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];if(n.value)r.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];if(!n||n.value)r.items.push({start:[],key:t,sep:[]});else if(n.sep)n.value=t;else Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&cs(n.start)===-1&&(t.indent===0||n.start.every((i)=>i.type!=="comment"||i.indent<t.indent))){if(r.type==="document")r.end=n.start;else r.items.push({start:n.start});t.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")e.start.push(this.sourceToken);this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{if(cs(e.start)!==-1)yield*this.pop(),yield*this.step();else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);if(t)this.stack.push(t);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=tr(this.peek(2)),r=Oe(t),n;if(e.end)n=e.end,n.push(this.sourceToken),delete e.end;else n=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
135
135
  `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
136
136
  `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){rr(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",i=[];if(n&&t.sep&&!t.value){let o=[];for(let s=0;s<t.sep.length;++s){let a=t.sep[s];switch(a.type){case"newline":o.push(s);break;case"space":break;case"comment":if(a.indent>e.indent)o.length=0;break;default:o.length=0}}if(o.length>=2)i=t.sep.splice(o[1])}switch(this.type){case"anchor":case"tag":if(n||t.value)i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0;else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey)t.start.push(this.sourceToken),t.explicitKey=!0;else if(n||t.value)i.push(this.sourceToken),e.items.push({start:i,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(t.explicitKey)if(!t.sep)if(ce(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Oe(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(ds(t.key)&&!ce(t.sep,"newline")){let o=Oe(t.start),{key:s,sep:a}=t;a.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:s,sep:a}]})}else if(i.length>0)t.sep=t.sep.concat(i,this.sourceToken);else t.sep.push(this.sourceToken);else if(!t.sep)Object.assign(t,{key:null,sep:[this.sourceToken]});else if(t.value||n)e.items.push({start:i,key:null,sep:[this.sourceToken]});else if(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else t.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);if(n||t.value)e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(o);else Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0;return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ce(t.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(r)e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){rr(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||ce(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:n,sep:[]});else if(t.sep)this.stack.push(n);else Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);if(r)this.stack.push(r);else yield*this.pop(),yield*this.step()}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=tr(r),i=Oe(n);us(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
137
137
  `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
138
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=tr(e),r=Oe(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=tr(e),r=Oe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return!1;if(this.indent<=t)return!1;return e.every((r)=>r.type==="newline"||r.type==="space")}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}zh.Parser=ps});var ys=m(function(oy){var fs=En(),Qh=Qe(),it=Ze(),Zh=_r(),ey=R(),ty=Fn(),gs=Mn();function ms(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new ty.LineCounter||null,prettyErrors:t}}function ry(e,t={}){let{lineCounter:r,prettyErrors:n}=ms(t),i=new gs.Parser(r?.addNewLine),o=new fs.Composer(t),s=Array.from(o.compose(i.parse(e)));if(n&&r)for(let a of s)a.errors.forEach(it.prettifyError(e,r)),a.warnings.forEach(it.prettifyError(e,r));if(s.length>0)return s;return Object.assign([],{empty:!0},o.streamInfo())}function hs(e,t={}){let{lineCounter:r,prettyErrors:n}=ms(t),i=new gs.Parser(r?.addNewLine),o=new fs.Composer(t),s=null;for(let a of o.compose(i.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new it.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)s.errors.forEach(it.prettifyError(e,r)),s.warnings.forEach(it.prettifyError(e,r));return s}function ny(e,t,r){let n=void 0;if(typeof t==="function")n=t;else if(r===void 0&&t&&typeof t==="object")r=t;let i=hs(e,r);if(!i)return null;if(i.warnings.forEach((o)=>Zh.warn(i.options.logLevel,o)),i.errors.length>0)if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},r))}function iy(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t;if(typeof r==="string")r=r.length;if(typeof r==="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=r??t??{};if(!i)return}if(ey.isDocument(e)&&!n)return e.toString(r);return new Qh.Document(e,n,r).toString(r)}oy.parse=ny;oy.parseAllDocuments=ry;oy.parseDocument=hs;oy.stringify=iy});var De=m(function(Pv,Us){var Cb=Number.MAX_SAFE_INTEGER||9007199254740991,Sb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Us.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Cb,RELEASE_TYPES:Sb,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var at=m(function(vv,Ks){var kb=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Ks.exports=kb});var qe=m(function(X,Ys){var{MAX_SAFE_COMPONENT_LENGTH:Kn,MAX_SAFE_BUILD_LENGTH:wb,MAX_LENGTH:xb}=De(),Pb=at();X=Ys.exports={};var vb=X.re=[],Ib=X.safeRe=[],C=X.src=[],Eb=X.safeSrc=[],S=X.t={},Rb=0,Yn="[a-zA-Z0-9-]",Ab=[["\\s",1],["\\d",xb],[Yn,wb]],Tb=(e)=>{for(let[t,r]of Ab)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},E=(e,t,r)=>{let n=Tb(t),i=Rb++;Pb(e,i,t),S[e]=i,C[i]=t,Eb[i]=n,vb[i]=new RegExp(t,r?"g":void 0),Ib[i]=new RegExp(n,r?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*");E("NUMERICIDENTIFIERLOOSE","\\d+");E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Yn}*`);E("MAINVERSION",`(${C[S.NUMERICIDENTIFIER]})\\.(${C[S.NUMERICIDENTIFIER]})\\.(${C[S.NUMERICIDENTIFIER]})`);E("MAINVERSIONLOOSE",`(${C[S.NUMERICIDENTIFIERLOOSE]})\\.(${C[S.NUMERICIDENTIFIERLOOSE]})\\.(${C[S.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASEIDENTIFIER",`(?:${C[S.NONNUMERICIDENTIFIER]}|${C[S.NUMERICIDENTIFIER]})`);E("PRERELEASEIDENTIFIERLOOSE",`(?:${C[S.NONNUMERICIDENTIFIER]}|${C[S.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASE",`(?:-(${C[S.PRERELEASEIDENTIFIER]}(?:\\.${C[S.PRERELEASEIDENTIFIER]})*))`);E("PRERELEASELOOSE",`(?:-?(${C[S.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[S.PRERELEASEIDENTIFIERLOOSE]})*))`);E("BUILDIDENTIFIER",`${Yn}+`);E("BUILD",`(?:\\+(${C[S.BUILDIDENTIFIER]}(?:\\.${C[S.BUILDIDENTIFIER]})*))`);E("FULLPLAIN",`v?${C[S.MAINVERSION]}${C[S.PRERELEASE]}?${C[S.BUILD]}?`);E("FULL",`^${C[S.FULLPLAIN]}$`);E("LOOSEPLAIN",`[v=\\s]*${C[S.MAINVERSIONLOOSE]}${C[S.PRERELEASELOOSE]}?${C[S.BUILD]}?`);E("LOOSE",`^${C[S.LOOSEPLAIN]}$`);E("GTLT","((?:<|>)?=?)");E("XRANGEIDENTIFIERLOOSE",`${C[S.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);E("XRANGEIDENTIFIER",`${C[S.NUMERICIDENTIFIER]}|x|X|\\*`);E("XRANGEPLAIN",`[v=\\s]*(${C[S.XRANGEIDENTIFIER]})(?:\\.(${C[S.XRANGEIDENTIFIER]})(?:\\.(${C[S.XRANGEIDENTIFIER]})(?:${C[S.PRERELEASE]})?${C[S.BUILD]}?)?)?`);E("XRANGEPLAINLOOSE",`[v=\\s]*(${C[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[S.XRANGEIDENTIFIERLOOSE]})(?:${C[S.PRERELEASELOOSE]})?${C[S.BUILD]}?)?)?`);E("XRANGE",`^${C[S.GTLT]}\\s*${C[S.XRANGEPLAIN]}$`);E("XRANGELOOSE",`^${C[S.GTLT]}\\s*${C[S.XRANGEPLAINLOOSE]}$`);E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Kn}})(?:\\.(\\d{1,${Kn}}))?(?:\\.(\\d{1,${Kn}}))?`);E("COERCE",`${C[S.COERCEPLAIN]}(?:$|[^\\d])`);E("COERCEFULL",C[S.COERCEPLAIN]+`(?:${C[S.PRERELEASE]})?(?:${C[S.BUILD]})?(?:$|[^\\d])`);E("COERCERTL",C[S.COERCE],!0);E("COERCERTLFULL",C[S.COERCEFULL],!0);E("LONETILDE","(?:~>?)");E("TILDETRIM",`(\\s*)${C[S.LONETILDE]}\\s+`,!0);X.tildeTrimReplace="$1~";E("TILDE",`^${C[S.LONETILDE]}${C[S.XRANGEPLAIN]}$`);E("TILDELOOSE",`^${C[S.LONETILDE]}${C[S.XRANGEPLAINLOOSE]}$`);E("LONECARET","(?:\\^)");E("CARETTRIM",`(\\s*)${C[S.LONECARET]}\\s+`,!0);X.caretTrimReplace="$1^";E("CARET",`^${C[S.LONECARET]}${C[S.XRANGEPLAIN]}$`);E("CARETLOOSE",`^${C[S.LONECARET]}${C[S.XRANGEPLAINLOOSE]}$`);E("COMPARATORLOOSE",`^${C[S.GTLT]}\\s*(${C[S.LOOSEPLAIN]})$|^$`);E("COMPARATOR",`^${C[S.GTLT]}\\s*(${C[S.FULLPLAIN]})$|^$`);E("COMPARATORTRIM",`(\\s*)${C[S.GTLT]}\\s*(${C[S.LOOSEPLAIN]}|${C[S.XRANGEPLAIN]})`,!0);X.comparatorTrimReplace="$1$2$3";E("HYPHENRANGE",`^\\s*(${C[S.XRANGEPLAIN]})\\s+-\\s+(${C[S.XRANGEPLAIN]})\\s*$`);E("HYPHENRANGELOOSE",`^\\s*(${C[S.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[S.XRANGEPLAINLOOSE]})\\s*$`);E("STAR","(<|>)?=?\\s*\\*");E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var gr=m(function(Iv,Hs){var Nb=Object.freeze({loose:!0}),Ob=Object.freeze({}),Lb=(e)=>{if(!e)return Ob;if(typeof e!=="object")return Nb;return e};Hs.exports=Lb});var Hn=m(function(Ev,Js){var Gs=/^[0-9]+$/,Ws=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=Gs.test(e),n=Gs.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Db=(e,t)=>Ws(t,e);Js.exports={compareIdentifiers:Ws,rcompareIdentifiers:Db}});var F=m(function(Rv,Xs){var mr=at(),{MAX_LENGTH:zs,MAX_SAFE_INTEGER:hr}=De(),{safeRe:yr,t:br}=qe(),qb=gr(),{compareIdentifiers:Gn}=Hn(),_b=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(Gn(e[n],r[n])!==0)return!1;return!0};class W{constructor(e,t){if(t=qb(t),e instanceof W)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>zs)throw TypeError(`version is longer than ${zs} characters`);mr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?yr[br.LOOSE]:yr[br.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>hr||this.major<0)throw TypeError("Invalid major version");if(this.minor>hr||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>hr||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<hr)return i}return n});this.build=r[5]?r[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(mr("SemVer.compare",this.version,this.options,e),!(e instanceof W)){if(typeof e==="string"&&e===this.version)return 0;e=new W(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof W))e=new W(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof W))e=new W(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(mr("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Gn(r,n)}while(++t)}compareBuild(e){if(!(e instanceof W))e=new W(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(mr("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Gn(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?yr[br.PRERELEASELOOSE]:yr[br.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if(_b(this.prerelease,t)){let o=this.prerelease[t.split(".").length];if(isNaN(o))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Xs.exports=W});var fe=m(function(Av,Zs){var Qs=F(),Fb=(e,t,r=!1)=>{if(e instanceof Qs)return e;try{return new Qs(e,t)}catch(n){if(!r)return null;throw n}};Zs.exports=Fb});var ta=m(function(Tv,ea){var Mb=fe(),$b=(e,t)=>{let r=Mb(e,t);return r?r.version:null};ea.exports=$b});var na=m(function(Nv,ra){var Bb=fe(),jb=(e,t)=>{let r=Bb(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};ra.exports=jb});var sa=m(function(Ov,oa){var ia=F(),Vb=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new ia(e instanceof ia?e.version:e,r).inc(t,n,i).version}catch(o){return null}};oa.exports=Vb});var ca=m(function(Lv,la){var aa=fe(),Ub=(e,t)=>{let r=aa(e,null,!0),n=aa(t,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,a=o?n:r,l=!!s.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let p=l?"pre":"";if(r.major!==n.major)return p+"major";if(r.minor!==n.minor)return p+"minor";if(r.patch!==n.patch)return p+"patch";return"prerelease"};la.exports=Ub});var da=m(function(Dv,ua){var Kb=F(),Yb=(e,t)=>new Kb(e,t).major;ua.exports=Yb});var fa=m(function(qv,pa){var Hb=F(),Gb=(e,t)=>new Hb(e,t).minor;pa.exports=Gb});var ma=m(function(_v,ga){var Wb=F(),Jb=(e,t)=>new Wb(e,t).patch;ga.exports=Jb});var ya=m(function(Fv,ha){var zb=fe(),Xb=(e,t)=>{let r=zb(e,t);return r&&r.prerelease.length?r.prerelease:null};ha.exports=Xb});var K=m(function(Mv,Ca){var ba=F(),Qb=(e,t,r)=>new ba(e,r).compare(new ba(t,r));Ca.exports=Qb});var ka=m(function($v,Sa){var Zb=K(),eC=(e,t,r)=>Zb(t,e,r);Sa.exports=eC});var xa=m(function(Bv,wa){var tC=K(),rC=(e,t)=>tC(e,t,!0);wa.exports=rC});var Cr=m(function(jv,va){var Pa=F(),nC=(e,t,r)=>{let n=new Pa(e,r),i=new Pa(t,r);return n.compare(i)||n.compareBuild(i)};va.exports=nC});var Ea=m(function(Vv,Ia){var iC=Cr(),oC=(e,t)=>e.sort((r,n)=>iC(r,n,t));Ia.exports=oC});var Aa=m(function(Uv,Ra){var sC=Cr(),aC=(e,t)=>e.sort((r,n)=>sC(n,r,t));Ra.exports=aC});var lt=m(function(Kv,Ta){var lC=K(),cC=(e,t,r)=>lC(e,t,r)>0;Ta.exports=cC});var Sr=m(function(Yv,Na){var uC=K(),dC=(e,t,r)=>uC(e,t,r)<0;Na.exports=dC});var Wn=m(function(Hv,Oa){var pC=K(),fC=(e,t,r)=>pC(e,t,r)===0;Oa.exports=fC});var Jn=m(function(Gv,La){var gC=K(),mC=(e,t,r)=>gC(e,t,r)!==0;La.exports=mC});var kr=m(function(Wv,Da){var hC=K(),yC=(e,t,r)=>hC(e,t,r)>=0;Da.exports=yC});var wr=m(function(Jv,qa){var bC=K(),CC=(e,t,r)=>bC(e,t,r)<=0;qa.exports=CC});var zn=m(function(zv,_a){var SC=Wn(),kC=Jn(),wC=lt(),xC=kr(),PC=Sr(),vC=wr(),IC=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return SC(e,r,n);case"!=":return kC(e,r,n);case">":return wC(e,r,n);case">=":return xC(e,r,n);case"<":return PC(e,r,n);case"<=":return vC(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};_a.exports=IC});var Ma=m(function(Xv,Fa){var EC=F(),RC=fe(),{safeRe:xr,t:Pr}=qe(),AC=(e,t)=>{if(e instanceof EC)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?xr[Pr.COERCEFULL]:xr[Pr.COERCE]);else{let l=t.includePrerelease?xr[Pr.COERCERTLFULL]:xr[Pr.COERCERTL],c;while((c=l.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||c.index+c[0].length!==r.index+r[0].length)r=c;l.lastIndex=c.index+c[1].length+c[2].length}l.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return RC(`${n}.${i}.${o}${s}${a}`,t)};Fa.exports=AC});var Ba=m(function(Qv,$a){var TC=fe(),NC=De(),OC=F(),LC=(e,t,r)=>{if(!NC.RELEASE_TYPES.includes(t))return null;let n=DC(e,r);return n&&qC(n,t)},DC=(e,t)=>{let r=e instanceof OC?e.version:e;return TC(r,t)},qC=(e,t)=>{if(_C(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},_C=(e)=>e.startsWith("pre");$a.exports=LC});var Ua=m(function(Zv,Va){class ja{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}Va.exports=ja});var Y=m(function(eI,Ga){var FC=/\s+/g;class ct{constructor(e,t){if(t=$C(t),e instanceof ct)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new ct(e.raw,t);if(e instanceof Xn)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(FC," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!Ya(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&WC(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(GC,"");let r=((this.options.includePrerelease&&YC)|(this.options.loose&&HC))+":"+e,n=Ka.get(r);if(n)return n;let i=this.options.loose,o=i?B[M.HYPHENRANGELOOSE]:B[M.HYPHENRANGE];e=e.replace(o,oS(this.options.includePrerelease)),T("hyphen replace",e),e=e.replace(B[M.COMPARATORTRIM],VC),T("comparator trim",e),e=e.replace(B[M.TILDETRIM],UC),T("tilde trim",e),e=e.replace(B[M.CARETTRIM],KC),T("caret trim",e);let s=e.split(" ").map((p)=>JC(p,this.options)).join(" ").split(/\s+/).map((p)=>iS(p,this.options));if(i)s=s.filter((p)=>(T("loose invalid filter",p,this.options),!!p.match(B[M.COMPARATORLOOSE])));T("range list",s);let a=new Map,l=s.map((p)=>new Xn(p,this.options));for(let p of l){if(Ya(p))return[p];a.set(p.value,p)}if(a.size>1&&a.has(""))a.delete("");let c=[...a.values()];return Ka.set(r,c),c}intersects(e,t){if(!(e instanceof ct))throw TypeError("a Range is required");return this.set.some((r)=>Ha(r,t)&&e.set.some((n)=>Ha(n,t)&&r.every((i)=>n.every((o)=>i.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new BC(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(sS(this.set[t],e,this.options))return!0;return!1}}Ga.exports=ct;var MC=Ua(),Ka=new MC,$C=gr(),Xn=ut(),T=at(),BC=F(),{safeRe:B,src:jC,t:M,comparatorTrimReplace:VC,tildeTrimReplace:UC,caretTrimReplace:KC}=qe(),{FLAG_INCLUDE_PRERELEASE:YC,FLAG_LOOSE:HC}=De(),GC=new RegExp(jC[M.BUILD],"g"),Ya=(e)=>e.value==="<0.0.0-0",WC=(e)=>e.value==="",Ha=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((o)=>i.intersects(o,t)),i=n.pop();return r},JC=(e,t)=>(e=e.replace(B[M.BUILD],""),T("comp",e,t),e=ZC(e,t),T("caret",e),e=XC(e,t),T("tildes",e),e=tS(e,t),T("xrange",e),e=nS(e,t),T("stars",e),e),_=(e)=>!e||e.toLowerCase()==="x"||e==="*",zC=(e,t,r)=>_(e)&&!_(t)||_(t)&&r&&!_(r),XC=(e,t)=>e.trim().split(/\s+/).map((r)=>QC(r,t)).join(" "),QC=(e,t)=>{let r=t.loose?B[M.TILDELOOSE]:B[M.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{T("tilde",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else if(l)T("replaceTilde pr",l),c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;return T("tilde return",c),c})},ZC=(e,t)=>e.trim().split(/\s+/).map((r)=>eS(r,t)).join(" "),eS=(e,t)=>{T("caret",e,t);let r=t.loose?B[M.CARETLOOSE]:B[M.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{T("caret",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))if(o==="0")c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`;else if(l)if(T("replaceCaret pr",l),o==="0")if(s==="0")c=`>=${o}.${s}.${a}-${l} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a}-${l} <${+o+1}.0.0-0`;else if(T("no pr"),o==="0")if(s==="0")c=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`;return T("caret return",c),c})},tS=(e,t)=>(T("replaceXRanges",e,t),e.split(/\s+/).map((r)=>rS(r,t)).join(" ")),rS=(e,t)=>{e=e.trim();let r=t.loose?B[M.XRANGELOOSE]:B[M.XRANGE];return e.replace(r,(n,i,o,s,a,l)=>{if(T("xRange",e,n,i,o,s,a,l),zC(o,s,a))return e;let c=_(o),p=c||_(s),u=p||_(a),d=u;if(i==="="&&d)i="";if(l=t.includePrerelease?"-0":"",c)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&d){if(p)s=0;if(a=0,i===">")if(i=">=",p)o=+o+1,s=0,a=0;else s=+s+1,a=0;else if(i==="<=")if(i="<",p)o=+o+1;else s=+s+1;if(i==="<")l="-0";n=`${i+o}.${s}.${a}${l}`}else if(p)n=`>=${o}.0.0${l} <${+o+1}.0.0-0`;else if(u)n=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`;return T("xRange return",n),n})},nS=(e,t)=>(T("replaceStars",e,t),e.trim().replace(B[M.STAR],"")),iS=(e,t)=>(T("replaceGTE0",e,t),e.trim().replace(B[t.includePrerelease?M.GTE0PRE:M.GTE0],"")),oS=(e)=>(t,r,n,i,o,s,a,l,c,p,u,d)=>{if(_(n))r="";else if(_(i))r=`>=${n}.0.0${e?"-0":""}`;else if(_(o))r=`>=${n}.${i}.0${e?"-0":""}`;else if(s)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(_(c))l="";else if(_(p))l=`<${+c+1}.0.0-0`;else if(_(u))l=`<${c}.${+p+1}.0-0`;else if(d)l=`<=${c}.${p}.${u}-${d}`;else if(e)l=`<${c}.${p}.${+u+1}-0`;else l=`<=${l}`;return`${r} ${l}`.trim()},sS=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(T(e[n].semver),e[n].semver===Xn.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var ut=m(function(tI,Za){var dt=Symbol("SemVer ANY");class vr{static get ANY(){return dt}constructor(e,t){if(t=Wa(t),e instanceof vr)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),Zn("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===dt)this.value="";else this.value=this.operator+this.semver.version;Zn("comp",this)}parse(e){let t=this.options.loose?Ja[za.COMPARATORLOOSE]:Ja[za.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=dt;else this.semver=new Xa(r[2],this.options.loose)}toString(){return this.value}test(e){if(Zn("Comparator.test",e,this.options.loose),this.semver===dt||e===dt)return!0;if(typeof e==="string")try{e=new Xa(e,this.options)}catch(t){return!1}return Qn(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof vr))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new Qa(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new Qa(this.value,t).test(e.semver)}if(t=Wa(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(Qn(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(Qn(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}Za.exports=vr;var Wa=gr(),{safeRe:Ja,t:za}=qe(),Qn=zn(),Zn=at(),Xa=F(),Qa=Y()});var pt=m(function(rI,el){var aS=Y(),lS=(e,t,r)=>{try{t=new aS(t,r)}catch(n){return!1}return t.test(e)};el.exports=lS});var rl=m(function(nI,tl){var cS=Y(),uS=(e,t)=>new cS(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));tl.exports=uS});var il=m(function(iI,nl){var dS=F(),pS=Y(),fS=(e,t,r)=>{let n=null,i=null,o=null;try{o=new pS(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===-1)n=s,i=new dS(n,r)}}),n};nl.exports=fS});var sl=m(function(oI,ol){var gS=F(),mS=Y(),hS=(e,t,r)=>{let n=null,i=null,o=null;try{o=new mS(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===1)n=s,i=new gS(n,r)}}),n};ol.exports=hS});var cl=m(function(sI,ll){var ei=F(),yS=Y(),al=lt(),bS=(e,t)=>{e=new yS(e,t);let r=new ei("0.0.0");if(e.test(r))return r;if(r=new ei("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],o=null;if(i.forEach((s)=>{let a=new ei(s.semver.version);switch(s.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!o||al(a,o))o=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||al(r,o)))r=o}if(r&&e.test(r))return r;return null};ll.exports=bS});var dl=m(function(aI,ul){var CS=Y(),SS=(e,t)=>{try{return new CS(e,t).range||"*"}catch(r){return null}};ul.exports=SS});var Ir=m(function(lI,ml){var kS=F(),gl=ut(),{ANY:wS}=gl,xS=Y(),PS=pt(),pl=lt(),fl=Sr(),vS=wr(),IS=kr(),ES=(e,t,r,n)=>{e=new kS(e,n),t=new xS(t,n);let i,o,s,a,l;switch(r){case">":i=pl,o=vS,s=fl,a=">",l=">=";break;case"<":i=fl,o=IS,s=pl,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(PS(e,t,n))return!1;for(let c=0;c<t.set.length;++c){let p=t.set[c],u=null,d=null;if(p.forEach((f)=>{if(f.semver===wS)f=new gl(">=0.0.0");if(u=u||f,d=d||f,i(f.semver,u.semver,n))u=f;else if(s(f.semver,d.semver,n))d=f}),u.operator===a||u.operator===l)return!1;if((!d.operator||d.operator===a)&&o(e,d.semver))return!1;else if(d.operator===l&&s(e,d.semver))return!1}return!0};ml.exports=ES});var yl=m(function(cI,hl){var RS=Ir(),AS=(e,t,r)=>RS(e,t,">",r);hl.exports=AS});var Cl=m(function(uI,bl){var TS=Ir(),NS=(e,t,r)=>TS(e,t,"<",r);bl.exports=NS});var wl=m(function(dI,kl){var Sl=Y(),OS=(e,t,r)=>(e=new Sl(e,r),t=new Sl(t,r),e.intersects(t,r));kl.exports=OS});var Pl=m(function(pI,xl){var LS=pt(),DS=K();xl.exports=(e,t,r)=>{let n=[],i=null,o=null,s=e.sort((p,u)=>DS(p,u,r));for(let p of s)if(LS(p,t,r)){if(o=p,!i)i=p}else{if(o)n.push([i,o]);o=null,i=null}if(i)n.push([i,null]);let a=[];for(let[p,u]of n)if(p===u)a.push(p);else if(!u&&p===s[0])a.push("*");else if(!u)a.push(`>=${p}`);else if(p===s[0])a.push(`<=${u}`);else a.push(`${p} - ${u}`);let l=a.join(" || "),c=typeof t.raw==="string"?t.raw:String(t);return l.length<c.length?l:t}});var Tl=m(function(fI,Al){var vl=Y(),ni=ut(),{ANY:ti}=ni,ri=pt(),ii=K(),qS=(e,t,r={})=>{if(e===t)return!0;e=new vl(e,r),t=new vl(t,r);let n=!1;e:for(let i of e.set){for(let o of t.set){let s=FS(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},_S=[new ni(">=0.0.0-0")],Il=[new ni(">=0.0.0")],FS=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ti)if(t.length===1&&t[0].semver===ti)return!0;else if(r.includePrerelease)e=_S;else e=Il;if(t.length===1&&t[0].semver===ti)if(r.includePrerelease)return!0;else t=Il;let n=new Set,i,o;for(let f of e)if(f.operator===">"||f.operator===">=")i=El(i,f,r);else if(f.operator==="<"||f.operator==="<=")o=Rl(o,f,r);else n.add(f.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ii(i.semver,o.semver,r),s>0)return null;else if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(i&&!ri(f,String(i),r))return null;if(o&&!ri(f,String(o),r))return null;for(let y of t)if(!ri(f,String(y),r))return!1;return!0}let a,l,c,p,u=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(u&&u.prerelease.length===1&&o.operator==="<"&&u.prerelease[0]===0)u=!1;for(let f of t){if(p=p||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",i){if(d){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch)d=!1}if(f.operator===">"||f.operator===">="){if(a=El(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!f.test(i.semver))return!1}if(o){if(u){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch)u=!1}if(f.operator==="<"||f.operator==="<="){if(l=Rl(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||i)&&s!==0)return!1}if(i&&c&&!o&&s!==0)return!1;if(o&&p&&!i&&s!==0)return!1;if(d||u)return!1;return!0},El=(e,t,r)=>{if(!e)return t;let n=ii(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},Rl=(e,t,r)=>{if(!e)return t;let n=ii(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};Al.exports=qS});var Dl=m(function(gI,Ll){var oi=qe(),Nl=De(),MS=F(),Ol=Hn(),$S=fe(),BS=ta(),jS=na(),VS=sa(),US=ca(),KS=da(),YS=fa(),HS=ma(),GS=ya(),WS=K(),JS=ka(),zS=xa(),XS=Cr(),QS=Ea(),ZS=Aa(),ek=lt(),tk=Sr(),rk=Wn(),nk=Jn(),ik=kr(),ok=wr(),sk=zn(),ak=Ma(),lk=Ba(),ck=ut(),uk=Y(),dk=pt(),pk=rl(),fk=il(),gk=sl(),mk=cl(),hk=dl(),yk=Ir(),bk=yl(),Ck=Cl(),Sk=wl(),kk=Pl(),wk=Tl();Ll.exports={parse:$S,valid:BS,clean:jS,inc:VS,diff:US,major:KS,minor:YS,patch:HS,prerelease:GS,compare:WS,rcompare:JS,compareLoose:zS,compareBuild:XS,sort:QS,rsort:ZS,gt:ek,lt:tk,eq:rk,neq:nk,gte:ik,lte:ok,cmp:sk,coerce:ak,truncate:lk,Comparator:ck,Range:uk,satisfies:dk,toComparators:pk,maxSatisfying:fk,minSatisfying:gk,minVersion:mk,validRange:hk,outside:yk,gtr:bk,ltr:Ck,intersects:Sk,simplifyRange:kk,subset:wk,SemVer:MS,re:oi.re,src:oi.src,tokens:oi.t,SEMVER_SPEC_VERSION:Nl.SEMVER_SPEC_VERSION,RELEASE_TYPES:Nl.RELEASE_TYPES,compareIdentifiers:Ol.compareIdentifiers,rcompareIdentifiers:Ol.rcompareIdentifiers}});var Er=["contract","page-recipe","html-artifact","design-system"];var Xl={spec:["html","markdown","zip"],prototype:["html","zip"],deck:["html","pptx","zip"],poster:["html","zip"]},vw=Array.from(new Set(Object.values(Xl).flat()));var Rw=Object.freeze([Object.freeze({name:"manifest",summary:"Describe query operations and list the derived resource index.",positionals:Object.freeze([]),options:Object.freeze([])}),Object.freeze({name:"search",summary:"Search resources with deterministic bilingual ranking and reasons.",positionals:Object.freeze([Object.freeze({name:"text",property:"text",type:"string",required:!1})]),options:Object.freeze([Object.freeze({name:"kind",property:"kinds",type:"resource-kind",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"tag",property:"tags",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"category",property:"categories",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"capability",property:"capabilities",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"maturity",property:"maturities",type:"resource-maturity",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"limit",property:"limit",type:"positive-integer"})])}),Object.freeze({name:"get",summary:"Resolve one canonical resource id or unambiguous alias.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([])}),Object.freeze({name:"build",summary:"Plan dependency closure and gaps without writing or installing.",positionals:Object.freeze([Object.freeze({name:"root",property:"roots",type:"string",required:!0,variadic:!0})]),options:Object.freeze([])})]);var uy=En(),dy=Qe(),py=dn(),$n=Ze(),fy=Me(),ue=R(),gy=oe(),my=O(),hy=ae(),yy=le(),WP=Zt(),by=_n(),Cy=Fn(),Sy=Mn(),nr=ys(),bs=_e();var ky=uy.Composer,wy=dy.Document,xy=py.Schema,{YAMLError:Py,YAMLParseError:vy,YAMLWarning:Iy}=$n,Ey=fy.Alias,{isAlias:Ry,isCollection:Ay,isDocument:Ty,isMap:Ny,isNode:Oy,isPair:Ly,isScalar:Dy,isSeq:qy}=ue,_y=gy.Pair,Fy=my.Scalar,My=hy.YAMLMap,$y=yy.YAMLSeq;var By=by.Lexer,jy=Cy.LineCounter,Vy=Sy.Parser,{parse:Bn,parseAllDocuments:Uy,parseDocument:Ky,stringify:Yy}=nr,{visit:Hy,visitAsync:Gy}=bs;function ir(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{meta:"",body:e.trim()};return{meta:(t[1]??"").trim(),body:(t[2]??"").trim()}}function jn(e){let{meta:t}=ir(e);if(!t)throw Error("SKILL.md is missing YAML frontmatter");let r=Bn(t);if(!r||typeof r!=="object")throw Error("SKILL.md frontmatter must be a YAML object");let n=N(r.id)??N(r.name);if(!n)throw Error("SKILL.md frontmatter must include a non-empty 'id' or 'name' field");let i=N(r.title)??N(r.name)??n,o=N(r.version)??"0.1.0",s=pe(r.triggers);if(s.length===0)s.push(n,i);let a={id:n,title:i,version:o,triggers:s,tags:pe(r.tags)},l=N(r.category);if(l)if(Er.includes(l))a.category=l;else console.warn(`[skills] ${n}: unknown category "${l}" (expected ${Er.join(" | ")}); ignoring`);if(Array.isArray(r.allowedCapabilities))a.allowedCapabilities=r.allowedCapabilities;if(Array.isArray(r.authors))a.authors=r.authors;let c=Jy(r);if(c)a.artifact=c;return a}function N(e){return typeof e==="string"&&e.trim()?e.trim():void 0}function pe(e){return Array.isArray(e)?e.filter((t)=>typeof t==="string"&&t.trim().length>0):[]}function Wy(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function ot(e){return typeof e==="boolean"?e:void 0}function de(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:void 0}function Cs(e){if(!Array.isArray(e))return[];return e.map((t)=>{if(typeof t==="string")return t;let r=de(t);return r?N(r.name):void 0}).filter((t)=>Boolean(t))}function Jy(e){let t=de(e.artifact),r=de(e.od),n=t??r;if(!n)return;let i=de(n.preview),o=de(n.outputs),s=de(n.design_system)??de(n.designSystem),a=de(n.craft),l={},c=N(n.mode);if(c)l.mode=c;let p=N(n.surface);if(p)l.surface=p;let u=N(n.scenario);if(u)l.scenario=u;if(i)l.preview={...N(i.type)?{type:N(i.type)}:{},...N(i.entry)?{entry:N(i.entry)}:{},...N(i.reload)?{reload:N(i.reload)}:{}};if(o)l.outputs={...N(o.primary)?{primary:N(o.primary)}:{},...pe(o.secondary).length>0?{secondary:pe(o.secondary)}:{}};let d=ot(n.designSystemRequired)??ot(s?.requires);if(d!==void 0)l.designSystemRequired=d;let f=pe(s?.sections);if(f.length>0)l.designSystemSections=f;let y=pe(a?.requires);if(y.length>0)l.craftRequires=y;let g=Cs(n.inputs);if(g.length>0)l.inputNames=g;let h=Cs(n.parameters);if(h.length>0)l.parameterNames=h;let b=pe(n.capabilities_required);if(b.length===0)b.push(...pe(n.requiredCapabilities));if(b.length>0)l.requiredCapabilities=b;let k=ot(n.speakerNotes)??ot(n.speaker_notes);if(k!==void 0)l.speakerNotes=k;let w=ot(n.animations);if(w!==void 0)l.animations=w;let P=N(n.examplePrompt)??N(n.example_prompt);if(P)l.examplePrompt=P;let I=N(n.upstream);if(I)l.upstream=I;let v=Wy(n.featured);if(v!==void 0)l.featured=v;return Object.keys(l).length>0?l:void 0}import{readFileSync as zy}from"fs";class or extends Error{filePath;constructor(e,t){super(e);this.filePath=t;this.name="SkillLoadError"}}function Vn(e){let t;try{t=zy(e,"utf-8")}catch(r){throw new or(`Failed to read file: ${r.message}`,e)}try{let{body:r}=ir(t);return{frontmatter:jn(t),body:r,filePath:e}}catch(r){throw new or(`Failed to parse SKILL.md: ${r.message}`,e)}}class sr{skills=new Map;register(e){this.skills.set(e.frontmatter.id,e)}list(){return[...this.skills.values()]}get(e){return this.skills.get(e)}addAll(e){for(let t of e)this.register(t)}size(){return this.skills.size}}import{existsSync as Ss,readdirSync as Xy,statSync as Qy}from"fs";import{join as Un}from"path";function ar(e){let t=Un(e,".uibot","skills");if(!Ss(t))return[];let r=[],n;try{n=Xy(t)}catch(i){return console.warn(`[skills] failed to read skills directory ${t}: ${i.message}`),[]}for(let i of n){let o=Un(t,i);try{if(!Qy(o).isDirectory())continue}catch{continue}let s=Un(o,"SKILL.md");if(!Ss(s)){console.warn(`[skills] no SKILL.md found in ${o}, skipping`);continue}try{r.push(Vn(s))}catch(a){console.warn(`[skills] skipping ${s}: ${a.message}`)}}return r}function Zy(e,t){let r=ar(e);t.addAll(r)}import{createHash as eb}from"crypto";import{cpSync as lr,existsSync as Le,mkdirSync as ks,readFileSync as xs,readdirSync as Ps,statSync as vs,writeFileSync as tb}from"fs";import{fileURLToPath as rb}from"url";import{join as ee}from"path";var Is=rb(new URL("../content",import.meta.url)),Es=["skills","agents","craft"],nb="builtin-pack.json";function ib(e){return vs(e).isDirectory()?Ps(e).sort():[""]}function ws(e,t){let r=eb("sha256");for(let n of t){let i=n?ee(e,n):e;if(!Le(i))return null;r.update(`${n}\x00`).update(xs(i))}return r.digest("hex")}function ob(e){try{let t=JSON.parse(xs(e,"utf8"));return t.entries&&typeof t.entries==="object"?t.entries:{}}catch{return{}}}function sb(e,t=Is,r={}){let n={seeded:[],kept:[],upgraded:[],modified:[],legacy:[],replaced:[]},i=new Set(r.replace??[]);if(!Le(t))return n;let o=ee(e,".uibot",nb),s=ob(o),a=!1;for(let l of Es){let c=ee(t,l);if(!Le(c))continue;let p=ee(e,".uibot",l);for(let u of Ps(c).sort()){if(u.startsWith("."))continue;let d=ee(c,u),f=ee(p,u),y=`${l}/${u}`,g=vs(d).isDirectory(),h=ib(d),b=ws(d,h);if(!b)continue;if(!(g&&l==="skills"?Le(ee(f,"SKILL.md")):Le(f))){ks(p,{recursive:!0}),lr(d,f,{recursive:g,force:!1,errorOnExist:!1}),s[y]=b,a=!0,n.seeded.push(y);continue}let w=ws(f,h);if(w===b){if(s[y]!==b)s[y]=b,a=!0;n.kept.push(y);continue}let P=s[y];if(i.has(y)||P===void 0&&i.has("legacy")){let v=g?ee(f,"SKILL.md"):f;if(Le(v))lr(v,`${v}.pre-upgrade`,{force:!0});lr(d,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.replaced.push(y)}else if(P===void 0)n.legacy.push(y);else if(w===P)lr(d,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.upgraded.push(y);else if(P!==b)n.modified.push(y);else n.kept.push(y)}}if(a)ks(ee(e,".uibot"),{recursive:!0}),tb(o,`${JSON.stringify({version:1,entries:s},null,2)}
138
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=tr(e),r=Oe(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=tr(e),r=Oe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return!1;if(this.indent<=t)return!1;return e.every((r)=>r.type==="newline"||r.type==="space")}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}zh.Parser=ps});var ys=m(function(oy){var fs=En(),Qh=Qe(),it=Ze(),Zh=_r(),ey=R(),ty=Fn(),gs=Mn();function ms(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new ty.LineCounter||null,prettyErrors:t}}function ry(e,t={}){let{lineCounter:r,prettyErrors:n}=ms(t),i=new gs.Parser(r?.addNewLine),o=new fs.Composer(t),s=Array.from(o.compose(i.parse(e)));if(n&&r)for(let a of s)a.errors.forEach(it.prettifyError(e,r)),a.warnings.forEach(it.prettifyError(e,r));if(s.length>0)return s;return Object.assign([],{empty:!0},o.streamInfo())}function hs(e,t={}){let{lineCounter:r,prettyErrors:n}=ms(t),i=new gs.Parser(r?.addNewLine),o=new fs.Composer(t),s=null;for(let a of o.compose(i.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new it.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)s.errors.forEach(it.prettifyError(e,r)),s.warnings.forEach(it.prettifyError(e,r));return s}function ny(e,t,r){let n=void 0;if(typeof t==="function")n=t;else if(r===void 0&&t&&typeof t==="object")r=t;let i=hs(e,r);if(!i)return null;if(i.warnings.forEach((o)=>Zh.warn(i.options.logLevel,o)),i.errors.length>0)if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},r))}function iy(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t;if(typeof r==="string")r=r.length;if(typeof r==="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=r??t??{};if(!i)return}if(ey.isDocument(e)&&!n)return e.toString(r);return new Qh.Document(e,n,r).toString(r)}oy.parse=ny;oy.parseAllDocuments=ry;oy.parseDocument=hs;oy.stringify=iy});var De=m(function(Pv,Us){var Cb=Number.MAX_SAFE_INTEGER||9007199254740991,Sb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Us.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Cb,RELEASE_TYPES:Sb,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var at=m(function(vv,Ks){var kb=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Ks.exports=kb});var qe=m(function(X,Ys){var{MAX_SAFE_COMPONENT_LENGTH:Kn,MAX_SAFE_BUILD_LENGTH:wb,MAX_LENGTH:xb}=De(),Pb=at();X=Ys.exports={};var vb=X.re=[],Ib=X.safeRe=[],C=X.src=[],Eb=X.safeSrc=[],S=X.t={},Rb=0,Yn="[a-zA-Z0-9-]",Ab=[["\\s",1],["\\d",xb],[Yn,wb]],Tb=(e)=>{for(let[t,r]of Ab)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},E=(e,t,r)=>{let n=Tb(t),i=Rb++;Pb(e,i,t),S[e]=i,C[i]=t,Eb[i]=n,vb[i]=new RegExp(t,r?"g":void 0),Ib[i]=new RegExp(n,r?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*");E("NUMERICIDENTIFIERLOOSE","\\d+");E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Yn}*`);E("MAINVERSION",`(${C[S.NUMERICIDENTIFIER]})\\.(${C[S.NUMERICIDENTIFIER]})\\.(${C[S.NUMERICIDENTIFIER]})`);E("MAINVERSIONLOOSE",`(${C[S.NUMERICIDENTIFIERLOOSE]})\\.(${C[S.NUMERICIDENTIFIERLOOSE]})\\.(${C[S.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASEIDENTIFIER",`(?:${C[S.NONNUMERICIDENTIFIER]}|${C[S.NUMERICIDENTIFIER]})`);E("PRERELEASEIDENTIFIERLOOSE",`(?:${C[S.NONNUMERICIDENTIFIER]}|${C[S.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASE",`(?:-(${C[S.PRERELEASEIDENTIFIER]}(?:\\.${C[S.PRERELEASEIDENTIFIER]})*))`);E("PRERELEASELOOSE",`(?:-?(${C[S.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[S.PRERELEASEIDENTIFIERLOOSE]})*))`);E("BUILDIDENTIFIER",`${Yn}+`);E("BUILD",`(?:\\+(${C[S.BUILDIDENTIFIER]}(?:\\.${C[S.BUILDIDENTIFIER]})*))`);E("FULLPLAIN",`v?${C[S.MAINVERSION]}${C[S.PRERELEASE]}?${C[S.BUILD]}?`);E("FULL",`^${C[S.FULLPLAIN]}$`);E("LOOSEPLAIN",`[v=\\s]*${C[S.MAINVERSIONLOOSE]}${C[S.PRERELEASELOOSE]}?${C[S.BUILD]}?`);E("LOOSE",`^${C[S.LOOSEPLAIN]}$`);E("GTLT","((?:<|>)?=?)");E("XRANGEIDENTIFIERLOOSE",`${C[S.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);E("XRANGEIDENTIFIER",`${C[S.NUMERICIDENTIFIER]}|x|X|\\*`);E("XRANGEPLAIN",`[v=\\s]*(${C[S.XRANGEIDENTIFIER]})(?:\\.(${C[S.XRANGEIDENTIFIER]})(?:\\.(${C[S.XRANGEIDENTIFIER]})(?:${C[S.PRERELEASE]})?${C[S.BUILD]}?)?)?`);E("XRANGEPLAINLOOSE",`[v=\\s]*(${C[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[S.XRANGEIDENTIFIERLOOSE]})(?:${C[S.PRERELEASELOOSE]})?${C[S.BUILD]}?)?)?`);E("XRANGE",`^${C[S.GTLT]}\\s*${C[S.XRANGEPLAIN]}$`);E("XRANGELOOSE",`^${C[S.GTLT]}\\s*${C[S.XRANGEPLAINLOOSE]}$`);E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Kn}})(?:\\.(\\d{1,${Kn}}))?(?:\\.(\\d{1,${Kn}}))?`);E("COERCE",`${C[S.COERCEPLAIN]}(?:$|[^\\d])`);E("COERCEFULL",C[S.COERCEPLAIN]+`(?:${C[S.PRERELEASE]})?(?:${C[S.BUILD]})?(?:$|[^\\d])`);E("COERCERTL",C[S.COERCE],!0);E("COERCERTLFULL",C[S.COERCEFULL],!0);E("LONETILDE","(?:~>?)");E("TILDETRIM",`(\\s*)${C[S.LONETILDE]}\\s+`,!0);X.tildeTrimReplace="$1~";E("TILDE",`^${C[S.LONETILDE]}${C[S.XRANGEPLAIN]}$`);E("TILDELOOSE",`^${C[S.LONETILDE]}${C[S.XRANGEPLAINLOOSE]}$`);E("LONECARET","(?:\\^)");E("CARETTRIM",`(\\s*)${C[S.LONECARET]}\\s+`,!0);X.caretTrimReplace="$1^";E("CARET",`^${C[S.LONECARET]}${C[S.XRANGEPLAIN]}$`);E("CARETLOOSE",`^${C[S.LONECARET]}${C[S.XRANGEPLAINLOOSE]}$`);E("COMPARATORLOOSE",`^${C[S.GTLT]}\\s*(${C[S.LOOSEPLAIN]})$|^$`);E("COMPARATOR",`^${C[S.GTLT]}\\s*(${C[S.FULLPLAIN]})$|^$`);E("COMPARATORTRIM",`(\\s*)${C[S.GTLT]}\\s*(${C[S.LOOSEPLAIN]}|${C[S.XRANGEPLAIN]})`,!0);X.comparatorTrimReplace="$1$2$3";E("HYPHENRANGE",`^\\s*(${C[S.XRANGEPLAIN]})\\s+-\\s+(${C[S.XRANGEPLAIN]})\\s*$`);E("HYPHENRANGELOOSE",`^\\s*(${C[S.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[S.XRANGEPLAINLOOSE]})\\s*$`);E("STAR","(<|>)?=?\\s*\\*");E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var gr=m(function(Iv,Gs){var Nb=Object.freeze({loose:!0}),Ob=Object.freeze({}),Lb=(e)=>{if(!e)return Ob;if(typeof e!=="object")return Nb;return e};Gs.exports=Lb});var Gn=m(function(Ev,Js){var Hs=/^[0-9]+$/,Ws=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=Hs.test(e),n=Hs.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Db=(e,t)=>Ws(t,e);Js.exports={compareIdentifiers:Ws,rcompareIdentifiers:Db}});var F=m(function(Rv,Xs){var mr=at(),{MAX_LENGTH:zs,MAX_SAFE_INTEGER:hr}=De(),{safeRe:yr,t:br}=qe(),qb=gr(),{compareIdentifiers:Hn}=Gn(),_b=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(Hn(e[n],r[n])!==0)return!1;return!0};class W{constructor(e,t){if(t=qb(t),e instanceof W)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>zs)throw TypeError(`version is longer than ${zs} characters`);mr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?yr[br.LOOSE]:yr[br.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>hr||this.major<0)throw TypeError("Invalid major version");if(this.minor>hr||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>hr||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<hr)return i}return n});this.build=r[5]?r[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(mr("SemVer.compare",this.version,this.options,e),!(e instanceof W)){if(typeof e==="string"&&e===this.version)return 0;e=new W(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof W))e=new W(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof W))e=new W(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(mr("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Hn(r,n)}while(++t)}compareBuild(e){if(!(e instanceof W))e=new W(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(mr("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Hn(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?yr[br.PRERELEASELOOSE]:yr[br.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if(_b(this.prerelease,t)){let o=this.prerelease[t.split(".").length];if(isNaN(o))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Xs.exports=W});var fe=m(function(Av,Zs){var Qs=F(),Fb=(e,t,r=!1)=>{if(e instanceof Qs)return e;try{return new Qs(e,t)}catch(n){if(!r)return null;throw n}};Zs.exports=Fb});var ta=m(function(Tv,ea){var Mb=fe(),$b=(e,t)=>{let r=Mb(e,t);return r?r.version:null};ea.exports=$b});var na=m(function(Nv,ra){var Bb=fe(),jb=(e,t)=>{let r=Bb(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};ra.exports=jb});var sa=m(function(Ov,oa){var ia=F(),Vb=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new ia(e instanceof ia?e.version:e,r).inc(t,n,i).version}catch(o){return null}};oa.exports=Vb});var ca=m(function(Lv,la){var aa=fe(),Ub=(e,t)=>{let r=aa(e,null,!0),n=aa(t,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,a=o?n:r,l=!!s.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let p=l?"pre":"";if(r.major!==n.major)return p+"major";if(r.minor!==n.minor)return p+"minor";if(r.patch!==n.patch)return p+"patch";return"prerelease"};la.exports=Ub});var da=m(function(Dv,ua){var Kb=F(),Yb=(e,t)=>new Kb(e,t).major;ua.exports=Yb});var fa=m(function(qv,pa){var Gb=F(),Hb=(e,t)=>new Gb(e,t).minor;pa.exports=Hb});var ma=m(function(_v,ga){var Wb=F(),Jb=(e,t)=>new Wb(e,t).patch;ga.exports=Jb});var ya=m(function(Fv,ha){var zb=fe(),Xb=(e,t)=>{let r=zb(e,t);return r&&r.prerelease.length?r.prerelease:null};ha.exports=Xb});var K=m(function(Mv,Ca){var ba=F(),Qb=(e,t,r)=>new ba(e,r).compare(new ba(t,r));Ca.exports=Qb});var ka=m(function($v,Sa){var Zb=K(),eC=(e,t,r)=>Zb(t,e,r);Sa.exports=eC});var xa=m(function(Bv,wa){var tC=K(),rC=(e,t)=>tC(e,t,!0);wa.exports=rC});var Cr=m(function(jv,va){var Pa=F(),nC=(e,t,r)=>{let n=new Pa(e,r),i=new Pa(t,r);return n.compare(i)||n.compareBuild(i)};va.exports=nC});var Ea=m(function(Vv,Ia){var iC=Cr(),oC=(e,t)=>e.sort((r,n)=>iC(r,n,t));Ia.exports=oC});var Aa=m(function(Uv,Ra){var sC=Cr(),aC=(e,t)=>e.sort((r,n)=>sC(n,r,t));Ra.exports=aC});var lt=m(function(Kv,Ta){var lC=K(),cC=(e,t,r)=>lC(e,t,r)>0;Ta.exports=cC});var Sr=m(function(Yv,Na){var uC=K(),dC=(e,t,r)=>uC(e,t,r)<0;Na.exports=dC});var Wn=m(function(Gv,Oa){var pC=K(),fC=(e,t,r)=>pC(e,t,r)===0;Oa.exports=fC});var Jn=m(function(Hv,La){var gC=K(),mC=(e,t,r)=>gC(e,t,r)!==0;La.exports=mC});var kr=m(function(Wv,Da){var hC=K(),yC=(e,t,r)=>hC(e,t,r)>=0;Da.exports=yC});var wr=m(function(Jv,qa){var bC=K(),CC=(e,t,r)=>bC(e,t,r)<=0;qa.exports=CC});var zn=m(function(zv,_a){var SC=Wn(),kC=Jn(),wC=lt(),xC=kr(),PC=Sr(),vC=wr(),IC=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return SC(e,r,n);case"!=":return kC(e,r,n);case">":return wC(e,r,n);case">=":return xC(e,r,n);case"<":return PC(e,r,n);case"<=":return vC(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};_a.exports=IC});var Ma=m(function(Xv,Fa){var EC=F(),RC=fe(),{safeRe:xr,t:Pr}=qe(),AC=(e,t)=>{if(e instanceof EC)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?xr[Pr.COERCEFULL]:xr[Pr.COERCE]);else{let l=t.includePrerelease?xr[Pr.COERCERTLFULL]:xr[Pr.COERCERTL],c;while((c=l.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||c.index+c[0].length!==r.index+r[0].length)r=c;l.lastIndex=c.index+c[1].length+c[2].length}l.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return RC(`${n}.${i}.${o}${s}${a}`,t)};Fa.exports=AC});var Ba=m(function(Qv,$a){var TC=fe(),NC=De(),OC=F(),LC=(e,t,r)=>{if(!NC.RELEASE_TYPES.includes(t))return null;let n=DC(e,r);return n&&qC(n,t)},DC=(e,t)=>{let r=e instanceof OC?e.version:e;return TC(r,t)},qC=(e,t)=>{if(_C(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},_C=(e)=>e.startsWith("pre");$a.exports=LC});var Ua=m(function(Zv,Va){class ja{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}Va.exports=ja});var Y=m(function(eI,Ha){var FC=/\s+/g;class ct{constructor(e,t){if(t=$C(t),e instanceof ct)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new ct(e.raw,t);if(e instanceof Xn)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(FC," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!Ya(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&WC(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(HC,"");let r=((this.options.includePrerelease&&YC)|(this.options.loose&&GC))+":"+e,n=Ka.get(r);if(n)return n;let i=this.options.loose,o=i?B[M.HYPHENRANGELOOSE]:B[M.HYPHENRANGE];e=e.replace(o,oS(this.options.includePrerelease)),T("hyphen replace",e),e=e.replace(B[M.COMPARATORTRIM],VC),T("comparator trim",e),e=e.replace(B[M.TILDETRIM],UC),T("tilde trim",e),e=e.replace(B[M.CARETTRIM],KC),T("caret trim",e);let s=e.split(" ").map((p)=>JC(p,this.options)).join(" ").split(/\s+/).map((p)=>iS(p,this.options));if(i)s=s.filter((p)=>(T("loose invalid filter",p,this.options),!!p.match(B[M.COMPARATORLOOSE])));T("range list",s);let a=new Map,l=s.map((p)=>new Xn(p,this.options));for(let p of l){if(Ya(p))return[p];a.set(p.value,p)}if(a.size>1&&a.has(""))a.delete("");let c=[...a.values()];return Ka.set(r,c),c}intersects(e,t){if(!(e instanceof ct))throw TypeError("a Range is required");return this.set.some((r)=>Ga(r,t)&&e.set.some((n)=>Ga(n,t)&&r.every((i)=>n.every((o)=>i.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new BC(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(sS(this.set[t],e,this.options))return!0;return!1}}Ha.exports=ct;var MC=Ua(),Ka=new MC,$C=gr(),Xn=ut(),T=at(),BC=F(),{safeRe:B,src:jC,t:M,comparatorTrimReplace:VC,tildeTrimReplace:UC,caretTrimReplace:KC}=qe(),{FLAG_INCLUDE_PRERELEASE:YC,FLAG_LOOSE:GC}=De(),HC=new RegExp(jC[M.BUILD],"g"),Ya=(e)=>e.value==="<0.0.0-0",WC=(e)=>e.value==="",Ga=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((o)=>i.intersects(o,t)),i=n.pop();return r},JC=(e,t)=>(e=e.replace(B[M.BUILD],""),T("comp",e,t),e=ZC(e,t),T("caret",e),e=XC(e,t),T("tildes",e),e=tS(e,t),T("xrange",e),e=nS(e,t),T("stars",e),e),_=(e)=>!e||e.toLowerCase()==="x"||e==="*",zC=(e,t,r)=>_(e)&&!_(t)||_(t)&&r&&!_(r),XC=(e,t)=>e.trim().split(/\s+/).map((r)=>QC(r,t)).join(" "),QC=(e,t)=>{let r=t.loose?B[M.TILDELOOSE]:B[M.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{T("tilde",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else if(l)T("replaceTilde pr",l),c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;return T("tilde return",c),c})},ZC=(e,t)=>e.trim().split(/\s+/).map((r)=>eS(r,t)).join(" "),eS=(e,t)=>{T("caret",e,t);let r=t.loose?B[M.CARETLOOSE]:B[M.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{T("caret",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))if(o==="0")c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`;else if(l)if(T("replaceCaret pr",l),o==="0")if(s==="0")c=`>=${o}.${s}.${a}-${l} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a}-${l} <${+o+1}.0.0-0`;else if(T("no pr"),o==="0")if(s==="0")c=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`;return T("caret return",c),c})},tS=(e,t)=>(T("replaceXRanges",e,t),e.split(/\s+/).map((r)=>rS(r,t)).join(" ")),rS=(e,t)=>{e=e.trim();let r=t.loose?B[M.XRANGELOOSE]:B[M.XRANGE];return e.replace(r,(n,i,o,s,a,l)=>{if(T("xRange",e,n,i,o,s,a,l),zC(o,s,a))return e;let c=_(o),p=c||_(s),u=p||_(a),d=u;if(i==="="&&d)i="";if(l=t.includePrerelease?"-0":"",c)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&d){if(p)s=0;if(a=0,i===">")if(i=">=",p)o=+o+1,s=0,a=0;else s=+s+1,a=0;else if(i==="<=")if(i="<",p)o=+o+1;else s=+s+1;if(i==="<")l="-0";n=`${i+o}.${s}.${a}${l}`}else if(p)n=`>=${o}.0.0${l} <${+o+1}.0.0-0`;else if(u)n=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`;return T("xRange return",n),n})},nS=(e,t)=>(T("replaceStars",e,t),e.trim().replace(B[M.STAR],"")),iS=(e,t)=>(T("replaceGTE0",e,t),e.trim().replace(B[t.includePrerelease?M.GTE0PRE:M.GTE0],"")),oS=(e)=>(t,r,n,i,o,s,a,l,c,p,u,d)=>{if(_(n))r="";else if(_(i))r=`>=${n}.0.0${e?"-0":""}`;else if(_(o))r=`>=${n}.${i}.0${e?"-0":""}`;else if(s)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(_(c))l="";else if(_(p))l=`<${+c+1}.0.0-0`;else if(_(u))l=`<${c}.${+p+1}.0-0`;else if(d)l=`<=${c}.${p}.${u}-${d}`;else if(e)l=`<${c}.${p}.${+u+1}-0`;else l=`<=${l}`;return`${r} ${l}`.trim()},sS=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(T(e[n].semver),e[n].semver===Xn.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var ut=m(function(tI,Za){var dt=Symbol("SemVer ANY");class vr{static get ANY(){return dt}constructor(e,t){if(t=Wa(t),e instanceof vr)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),Zn("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===dt)this.value="";else this.value=this.operator+this.semver.version;Zn("comp",this)}parse(e){let t=this.options.loose?Ja[za.COMPARATORLOOSE]:Ja[za.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=dt;else this.semver=new Xa(r[2],this.options.loose)}toString(){return this.value}test(e){if(Zn("Comparator.test",e,this.options.loose),this.semver===dt||e===dt)return!0;if(typeof e==="string")try{e=new Xa(e,this.options)}catch(t){return!1}return Qn(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof vr))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new Qa(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new Qa(this.value,t).test(e.semver)}if(t=Wa(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(Qn(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(Qn(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}Za.exports=vr;var Wa=gr(),{safeRe:Ja,t:za}=qe(),Qn=zn(),Zn=at(),Xa=F(),Qa=Y()});var pt=m(function(rI,el){var aS=Y(),lS=(e,t,r)=>{try{t=new aS(t,r)}catch(n){return!1}return t.test(e)};el.exports=lS});var rl=m(function(nI,tl){var cS=Y(),uS=(e,t)=>new cS(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));tl.exports=uS});var il=m(function(iI,nl){var dS=F(),pS=Y(),fS=(e,t,r)=>{let n=null,i=null,o=null;try{o=new pS(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===-1)n=s,i=new dS(n,r)}}),n};nl.exports=fS});var sl=m(function(oI,ol){var gS=F(),mS=Y(),hS=(e,t,r)=>{let n=null,i=null,o=null;try{o=new mS(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===1)n=s,i=new gS(n,r)}}),n};ol.exports=hS});var cl=m(function(sI,ll){var ei=F(),yS=Y(),al=lt(),bS=(e,t)=>{e=new yS(e,t);let r=new ei("0.0.0");if(e.test(r))return r;if(r=new ei("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],o=null;if(i.forEach((s)=>{let a=new ei(s.semver.version);switch(s.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!o||al(a,o))o=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||al(r,o)))r=o}if(r&&e.test(r))return r;return null};ll.exports=bS});var dl=m(function(aI,ul){var CS=Y(),SS=(e,t)=>{try{return new CS(e,t).range||"*"}catch(r){return null}};ul.exports=SS});var Ir=m(function(lI,ml){var kS=F(),gl=ut(),{ANY:wS}=gl,xS=Y(),PS=pt(),pl=lt(),fl=Sr(),vS=wr(),IS=kr(),ES=(e,t,r,n)=>{e=new kS(e,n),t=new xS(t,n);let i,o,s,a,l;switch(r){case">":i=pl,o=vS,s=fl,a=">",l=">=";break;case"<":i=fl,o=IS,s=pl,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(PS(e,t,n))return!1;for(let c=0;c<t.set.length;++c){let p=t.set[c],u=null,d=null;if(p.forEach((f)=>{if(f.semver===wS)f=new gl(">=0.0.0");if(u=u||f,d=d||f,i(f.semver,u.semver,n))u=f;else if(s(f.semver,d.semver,n))d=f}),u.operator===a||u.operator===l)return!1;if((!d.operator||d.operator===a)&&o(e,d.semver))return!1;else if(d.operator===l&&s(e,d.semver))return!1}return!0};ml.exports=ES});var yl=m(function(cI,hl){var RS=Ir(),AS=(e,t,r)=>RS(e,t,">",r);hl.exports=AS});var Cl=m(function(uI,bl){var TS=Ir(),NS=(e,t,r)=>TS(e,t,"<",r);bl.exports=NS});var wl=m(function(dI,kl){var Sl=Y(),OS=(e,t,r)=>(e=new Sl(e,r),t=new Sl(t,r),e.intersects(t,r));kl.exports=OS});var Pl=m(function(pI,xl){var LS=pt(),DS=K();xl.exports=(e,t,r)=>{let n=[],i=null,o=null,s=e.sort((p,u)=>DS(p,u,r));for(let p of s)if(LS(p,t,r)){if(o=p,!i)i=p}else{if(o)n.push([i,o]);o=null,i=null}if(i)n.push([i,null]);let a=[];for(let[p,u]of n)if(p===u)a.push(p);else if(!u&&p===s[0])a.push("*");else if(!u)a.push(`>=${p}`);else if(p===s[0])a.push(`<=${u}`);else a.push(`${p} - ${u}`);let l=a.join(" || "),c=typeof t.raw==="string"?t.raw:String(t);return l.length<c.length?l:t}});var Tl=m(function(fI,Al){var vl=Y(),ni=ut(),{ANY:ti}=ni,ri=pt(),ii=K(),qS=(e,t,r={})=>{if(e===t)return!0;e=new vl(e,r),t=new vl(t,r);let n=!1;e:for(let i of e.set){for(let o of t.set){let s=FS(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},_S=[new ni(">=0.0.0-0")],Il=[new ni(">=0.0.0")],FS=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ti)if(t.length===1&&t[0].semver===ti)return!0;else if(r.includePrerelease)e=_S;else e=Il;if(t.length===1&&t[0].semver===ti)if(r.includePrerelease)return!0;else t=Il;let n=new Set,i,o;for(let f of e)if(f.operator===">"||f.operator===">=")i=El(i,f,r);else if(f.operator==="<"||f.operator==="<=")o=Rl(o,f,r);else n.add(f.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ii(i.semver,o.semver,r),s>0)return null;else if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(i&&!ri(f,String(i),r))return null;if(o&&!ri(f,String(o),r))return null;for(let y of t)if(!ri(f,String(y),r))return!1;return!0}let a,l,c,p,u=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(u&&u.prerelease.length===1&&o.operator==="<"&&u.prerelease[0]===0)u=!1;for(let f of t){if(p=p||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",i){if(d){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch)d=!1}if(f.operator===">"||f.operator===">="){if(a=El(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!f.test(i.semver))return!1}if(o){if(u){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch)u=!1}if(f.operator==="<"||f.operator==="<="){if(l=Rl(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||i)&&s!==0)return!1}if(i&&c&&!o&&s!==0)return!1;if(o&&p&&!i&&s!==0)return!1;if(d||u)return!1;return!0},El=(e,t,r)=>{if(!e)return t;let n=ii(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},Rl=(e,t,r)=>{if(!e)return t;let n=ii(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};Al.exports=qS});var Dl=m(function(gI,Ll){var oi=qe(),Nl=De(),MS=F(),Ol=Gn(),$S=fe(),BS=ta(),jS=na(),VS=sa(),US=ca(),KS=da(),YS=fa(),GS=ma(),HS=ya(),WS=K(),JS=ka(),zS=xa(),XS=Cr(),QS=Ea(),ZS=Aa(),ek=lt(),tk=Sr(),rk=Wn(),nk=Jn(),ik=kr(),ok=wr(),sk=zn(),ak=Ma(),lk=Ba(),ck=ut(),uk=Y(),dk=pt(),pk=rl(),fk=il(),gk=sl(),mk=cl(),hk=dl(),yk=Ir(),bk=yl(),Ck=Cl(),Sk=wl(),kk=Pl(),wk=Tl();Ll.exports={parse:$S,valid:BS,clean:jS,inc:VS,diff:US,major:KS,minor:YS,patch:GS,prerelease:HS,compare:WS,rcompare:JS,compareLoose:zS,compareBuild:XS,sort:QS,rsort:ZS,gt:ek,lt:tk,eq:rk,neq:nk,gte:ik,lte:ok,cmp:sk,coerce:ak,truncate:lk,Comparator:ck,Range:uk,satisfies:dk,toComparators:pk,maxSatisfying:fk,minSatisfying:gk,minVersion:mk,validRange:hk,outside:yk,gtr:bk,ltr:Ck,intersects:Sk,simplifyRange:kk,subset:wk,SemVer:MS,re:oi.re,src:oi.src,tokens:oi.t,SEMVER_SPEC_VERSION:Nl.SEMVER_SPEC_VERSION,RELEASE_TYPES:Nl.RELEASE_TYPES,compareIdentifiers:Ol.compareIdentifiers,rcompareIdentifiers:Ol.rcompareIdentifiers}});var Er=["contract","page-recipe","html-artifact","design-system"];var Xl={spec:["html","markdown","zip"],prototype:["html","zip"],deck:["html","pptx","zip"],poster:["html","zip"]},vw=Array.from(new Set(Object.values(Xl).flat()));var Rw=Object.freeze([Object.freeze({name:"manifest",summary:"Describe query operations and list the derived resource index.",positionals:Object.freeze([]),options:Object.freeze([])}),Object.freeze({name:"search",summary:"Search resources with deterministic bilingual ranking and reasons.",positionals:Object.freeze([Object.freeze({name:"text",property:"text",type:"string",required:!1})]),options:Object.freeze([Object.freeze({name:"kind",property:"kinds",type:"resource-kind",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"tag",property:"tags",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"category",property:"categories",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"capability",property:"capabilities",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"maturity",property:"maturities",type:"resource-maturity",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"limit",property:"limit",type:"positive-integer"})])}),Object.freeze({name:"get",summary:"Resolve one canonical resource id or unambiguous alias.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([])}),Object.freeze({name:"build",summary:"Plan dependency closure and gaps without writing or installing.",positionals:Object.freeze([Object.freeze({name:"root",property:"roots",type:"string",required:!0,variadic:!0})]),options:Object.freeze([])})]);var uy=En(),dy=Qe(),py=dn(),$n=Ze(),fy=Me(),ue=R(),gy=oe(),my=O(),hy=ae(),yy=le(),WP=Zt(),by=_n(),Cy=Fn(),Sy=Mn(),nr=ys(),bs=_e();var ky=uy.Composer,wy=dy.Document,xy=py.Schema,{YAMLError:Py,YAMLParseError:vy,YAMLWarning:Iy}=$n,Ey=fy.Alias,{isAlias:Ry,isCollection:Ay,isDocument:Ty,isMap:Ny,isNode:Oy,isPair:Ly,isScalar:Dy,isSeq:qy}=ue,_y=gy.Pair,Fy=my.Scalar,My=hy.YAMLMap,$y=yy.YAMLSeq;var By=by.Lexer,jy=Cy.LineCounter,Vy=Sy.Parser,{parse:Bn,parseAllDocuments:Uy,parseDocument:Ky,stringify:Yy}=nr,{visit:Gy,visitAsync:Hy}=bs;function ir(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{meta:"",body:e.trim()};return{meta:(t[1]??"").trim(),body:(t[2]??"").trim()}}function jn(e){let{meta:t}=ir(e);if(!t)throw Error("SKILL.md is missing YAML frontmatter");let r=Bn(t);if(!r||typeof r!=="object")throw Error("SKILL.md frontmatter must be a YAML object");let n=N(r.id)??N(r.name);if(!n)throw Error("SKILL.md frontmatter must include a non-empty 'id' or 'name' field");let i=N(r.title)??N(r.name)??n,o=N(r.version)??"0.1.0",s=pe(r.triggers);if(s.length===0)s.push(n,i);let a={id:n,title:i,version:o,triggers:s,tags:pe(r.tags)},l=N(r.category);if(l)if(Er.includes(l))a.category=l;else console.warn(`[skills] ${n}: unknown category "${l}" (expected ${Er.join(" | ")}); ignoring`);if(Array.isArray(r.allowedCapabilities))a.allowedCapabilities=r.allowedCapabilities;if(Array.isArray(r.authors))a.authors=r.authors;let c=Jy(r);if(c)a.artifact=c;return a}function N(e){return typeof e==="string"&&e.trim()?e.trim():void 0}function pe(e){return Array.isArray(e)?e.filter((t)=>typeof t==="string"&&t.trim().length>0):[]}function Wy(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function ot(e){return typeof e==="boolean"?e:void 0}function de(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:void 0}function Cs(e){if(!Array.isArray(e))return[];return e.map((t)=>{if(typeof t==="string")return t;let r=de(t);return r?N(r.name):void 0}).filter((t)=>Boolean(t))}function Jy(e){let t=de(e.artifact),r=de(e.od),n=t??r;if(!n)return;let i=de(n.preview),o=de(n.outputs),s=de(n.design_system)??de(n.designSystem),a=de(n.craft),l={},c=N(n.mode);if(c)l.mode=c;let p=N(n.surface);if(p)l.surface=p;let u=N(n.scenario);if(u)l.scenario=u;if(i)l.preview={...N(i.type)?{type:N(i.type)}:{},...N(i.entry)?{entry:N(i.entry)}:{},...N(i.reload)?{reload:N(i.reload)}:{}};if(o)l.outputs={...N(o.primary)?{primary:N(o.primary)}:{},...pe(o.secondary).length>0?{secondary:pe(o.secondary)}:{}};let d=ot(n.designSystemRequired)??ot(s?.requires);if(d!==void 0)l.designSystemRequired=d;let f=pe(s?.sections);if(f.length>0)l.designSystemSections=f;let y=pe(a?.requires);if(y.length>0)l.craftRequires=y;let g=Cs(n.inputs);if(g.length>0)l.inputNames=g;let h=Cs(n.parameters);if(h.length>0)l.parameterNames=h;let b=pe(n.capabilities_required);if(b.length===0)b.push(...pe(n.requiredCapabilities));if(b.length>0)l.requiredCapabilities=b;let k=ot(n.speakerNotes)??ot(n.speaker_notes);if(k!==void 0)l.speakerNotes=k;let w=ot(n.animations);if(w!==void 0)l.animations=w;let P=N(n.examplePrompt)??N(n.example_prompt);if(P)l.examplePrompt=P;let I=N(n.upstream);if(I)l.upstream=I;let v=Wy(n.featured);if(v!==void 0)l.featured=v;return Object.keys(l).length>0?l:void 0}import{readFileSync as zy}from"fs";class or extends Error{filePath;constructor(e,t){super(e);this.filePath=t;this.name="SkillLoadError"}}function Vn(e){let t;try{t=zy(e,"utf-8")}catch(r){throw new or(`Failed to read file: ${r.message}`,e)}try{let{body:r}=ir(t);return{frontmatter:jn(t),body:r,filePath:e}}catch(r){throw new or(`Failed to parse SKILL.md: ${r.message}`,e)}}class sr{skills=new Map;register(e){this.skills.set(e.frontmatter.id,e)}list(){return[...this.skills.values()]}get(e){return this.skills.get(e)}addAll(e){for(let t of e)this.register(t)}size(){return this.skills.size}}import{existsSync as Ss,readdirSync as Xy,statSync as Qy}from"fs";import{join as Un}from"path";function ar(e){let t=Un(e,".uibot","skills");if(!Ss(t))return[];let r=[],n;try{n=Xy(t)}catch(i){return console.warn(`[skills] failed to read skills directory ${t}: ${i.message}`),[]}for(let i of n){let o=Un(t,i);try{if(!Qy(o).isDirectory())continue}catch{continue}let s=Un(o,"SKILL.md");if(!Ss(s)){console.warn(`[skills] no SKILL.md found in ${o}, skipping`);continue}try{r.push(Vn(s))}catch(a){console.warn(`[skills] skipping ${s}: ${a.message}`)}}return r}function Zy(e,t){let r=ar(e);t.addAll(r)}import{createHash as eb}from"crypto";import{cpSync as lr,existsSync as Le,mkdirSync as ks,readFileSync as xs,readdirSync as Ps,statSync as vs,writeFileSync as tb}from"fs";import{fileURLToPath as rb}from"url";import{join as ee}from"path";var Is=rb(new URL("../content",import.meta.url)),Es=["skills","agents","craft"],nb="builtin-pack.json";function ib(e){return vs(e).isDirectory()?Ps(e).sort():[""]}function ws(e,t){let r=eb("sha256");for(let n of t){let i=n?ee(e,n):e;if(!Le(i))return null;r.update(`${n}\x00`).update(xs(i))}return r.digest("hex")}function ob(e){try{let t=JSON.parse(xs(e,"utf8"));return t.entries&&typeof t.entries==="object"?t.entries:{}}catch{return{}}}function sb(e,t=Is,r={}){let n={seeded:[],kept:[],upgraded:[],modified:[],legacy:[],replaced:[]},i=new Set(r.replace??[]);if(!Le(t))return n;let o=ee(e,".uibot",nb),s=ob(o),a=!1;for(let l of Es){let c=ee(t,l);if(!Le(c))continue;let p=ee(e,".uibot",l);for(let u of Ps(c).sort()){if(u.startsWith("."))continue;let d=ee(c,u),f=ee(p,u),y=`${l}/${u}`,g=vs(d).isDirectory(),h=ib(d),b=ws(d,h);if(!b)continue;if(!(g&&l==="skills"?Le(ee(f,"SKILL.md")):Le(f))){ks(p,{recursive:!0}),lr(d,f,{recursive:g,force:!1,errorOnExist:!1}),s[y]=b,a=!0,n.seeded.push(y);continue}let w=ws(f,h);if(w===b){if(s[y]!==b)s[y]=b,a=!0;n.kept.push(y);continue}let P=s[y];if(i.has(y)||P===void 0&&i.has("legacy")){let v=g?ee(f,"SKILL.md"):f;if(Le(v))lr(v,`${v}.pre-upgrade`,{force:!0});lr(d,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.replaced.push(y)}else if(P===void 0)n.legacy.push(y);else if(w===P)lr(d,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.upgraded.push(y);else if(P!==b)n.modified.push(y);else n.kept.push(y)}}if(a)ks(ee(e,".uibot"),{recursive:!0}),tb(o,`${JSON.stringify({version:1,entries:s},null,2)}
139
139
  `);return n}var ab=/[\u0080-\uffff]/;function lb(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rs(e,t){let r=t.trim().toLowerCase();if(!r)return!1;if(ab.test(r))return e.includes(r);return new RegExp(`(?<![a-z0-9])${lb(r)}(?![a-z0-9])`).test(e)}function cr(e,t){let r=t.toLowerCase(),n=0;for(let i of e.frontmatter.triggers)if(Rs(r,i))n+=1+Math.min(i.trim().length,12)/12;return n}function cb(e){return Math.ceil(e.length/4)}class ur{registry;constructor(e){this.registry=e}select(e){let{intent:t,tags:r,categories:n,maxTokens:i}=e,o=this.registry.list().map((c)=>({skill:c,score:cr(c,t)})).filter(({score:c})=>c>0).sort((c,p)=>p.score-c.score).map(({skill:c})=>c);if(r&&r.length>0){let c=new Set(r.map((p)=>p.toLowerCase()));o=o.filter((p)=>(p.frontmatter.tags??[]).some((d)=>c.has(d.toLowerCase())))}if(n&&n.length>0){let c=new Set(n);o=o.filter((p)=>p.frontmatter.category&&c.has(p.frontmatter.category))}let s=!1;if(o=o.filter((c)=>{if(c.frontmatter.category!=="html-artifact")return!0;if(s)return!1;return s=!0,!0}),i===void 0)return o;let a=[],l=0;for(let c of o){let p=cb(c.body);if(l+p>i)continue;a.push(c),l+=p}return a}score(e){return this.registry.list().map((t)=>({skill:t,score:cr(t,e)})).sort((t,r)=>r.score-t.score).map(({skill:t})=>t)}}import{appendFileSync as ub,existsSync as dr,mkdirSync as As,readFileSync as Ts,writeFileSync as db}from"fs";import{join as st}from"path";var pb="1.0.0";function pr(e,t){return st(e,".uibot","skills",t)}function Ns(e){return{skillId:e,version:pb,usageCount:0,successCount:0,failureCount:0,avgScore:0.5,lastUpdated:new Date().toISOString()}}class Os{options;constructor(e){this.options=e}recordInvocation(e,t){let r=pr(this.options.rootDir,e);if(!dr(r))As(r,{recursive:!0});let n=st(r,"usage.jsonl");ub(n,JSON.stringify(t)+`
140
140
  `,"utf-8")}updateScoring(e,t){let r=pr(this.options.rootDir,e);if(!dr(r))As(r,{recursive:!0});let n=this.getScoring(e);if(n.usageCount+=1,t==="render-ok"||t==="user-thumb-up")n.successCount+=1;else n.failureCount+=1;n.avgScore=(n.successCount+1)/(n.usageCount+2),n.lastUpdated=new Date().toISOString();let i=st(r,"scoring.json");db(i,JSON.stringify(n,null,2)+`
141
141
  `,"utf-8")}recentScores(e,t=30){let r=st(pr(this.options.rootDir,e),"usage.jsonl");if(!dr(r))return[];try{let n=Ts(r,"utf-8").split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uibot/skills",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@uibot/contracts": "^0.13.0",
32
- "@uibot/plugin-sdk": "^0.13.0",
31
+ "@uibot/contracts": "^0.15.0",
32
+ "@uibot/plugin-sdk": "^0.15.0",
33
33
  "yaml": "2.9.1"
34
34
  },
35
35
  "scripts": {