@uibot/cli 0.2.1 → 0.5.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.
- package/dist/cli.js +25 -25
- package/dist/index.js +40 -40
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Dl=Object.create;var{getPrototypeOf:Ol,defineProperty:qi,getOwnPropertyNames:Nl}=Object;var Fi=Object.prototype.hasOwnProperty;function Ll(e){return this[e]}var Ml,$l,_l=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?Ml??=new WeakMap:$l??=new WeakMap,s=i.get(e);if(s)return s}r=e!=null?Dl(Ol(e)):{};let o=t||!e||!e.__esModule||!Fi.call(e,"default")?qi(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Nl(e))if(!Fi.call(o,a))qi(o,a,{get:Ll.bind(e,a),enumerable:!0})}if(n)i.set(e,o);return o};var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var U=(e,t,r)=>()=>{if(e)try{t=e(e=0)}catch(n){r=[n]}if(r)throw r[0];return t};var Pt=import.meta.require;var Ne=y(function(wE,gs){var id=Number.MAX_SAFE_INTEGER||9007199254740991,sd=["major","premajor","minor","preminor","patch","prepatch","prerelease"];gs.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:id,RELEASE_TYPES:sd,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Je=y(function(kE,ms){var od=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};ms.exports=od});var Le=y(function(ee,hs){var{MAX_SAFE_COMPONENT_LENGTH:rn,MAX_SAFE_BUILD_LENGTH:ad,MAX_LENGTH:cd}=Ne(),ld=Je();ee=hs.exports={};var ud=ee.re=[],dd=ee.safeRe=[],b=ee.src=[],pd=ee.safeSrc=[],C=ee.t={},fd=0,nn="[a-zA-Z0-9-]",gd=[["\\s",1],["\\d",cd],[nn,ad]],md=(e)=>{for(let[t,r]of gd)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},E=(e,t,r)=>{let n=md(t),i=fd++;ld(e,i,t),C[e]=i,b[i]=t,pd[i]=n,ud[i]=new RegExp(t,r?"g":void 0),dd[i]=new RegExp(n,r?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*");E("NUMERICIDENTIFIERLOOSE","\\d+");E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${nn}*`);E("MAINVERSION",`(${b[C.NUMERICIDENTIFIER]})\\.(${b[C.NUMERICIDENTIFIER]})\\.(${b[C.NUMERICIDENTIFIER]})`);E("MAINVERSIONLOOSE",`(${b[C.NUMERICIDENTIFIERLOOSE]})\\.(${b[C.NUMERICIDENTIFIERLOOSE]})\\.(${b[C.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASEIDENTIFIER",`(?:${b[C.NONNUMERICIDENTIFIER]}|${b[C.NUMERICIDENTIFIER]})`);E("PRERELEASEIDENTIFIERLOOSE",`(?:${b[C.NONNUMERICIDENTIFIER]}|${b[C.NUMERICIDENTIFIERLOOSE]})`);E("PRERELEASE",`(?:-(${b[C.PRERELEASEIDENTIFIER]}(?:\\.${b[C.PRERELEASEIDENTIFIER]})*))`);E("PRERELEASELOOSE",`(?:-?(${b[C.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[C.PRERELEASEIDENTIFIERLOOSE]})*))`);E("BUILDIDENTIFIER",`${nn}+`);E("BUILD",`(?:\\+(${b[C.BUILDIDENTIFIER]}(?:\\.${b[C.BUILDIDENTIFIER]})*))`);E("FULLPLAIN",`v?${b[C.MAINVERSION]}${b[C.PRERELEASE]}?${b[C.BUILD]}?`);E("FULL",`^${b[C.FULLPLAIN]}$`);E("LOOSEPLAIN",`[v=\\s]*${b[C.MAINVERSIONLOOSE]}${b[C.PRERELEASELOOSE]}?${b[C.BUILD]}?`);E("LOOSE",`^${b[C.LOOSEPLAIN]}$`);E("GTLT","((?:<|>)?=?)");E("XRANGEIDENTIFIERLOOSE",`${b[C.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);E("XRANGEIDENTIFIER",`${b[C.NUMERICIDENTIFIER]}|x|X|\\*`);E("XRANGEPLAIN",`[v=\\s]*(${b[C.XRANGEIDENTIFIER]})(?:\\.(${b[C.XRANGEIDENTIFIER]})(?:\\.(${b[C.XRANGEIDENTIFIER]})(?:${b[C.PRERELEASE]})?${b[C.BUILD]}?)?)?`);E("XRANGEPLAINLOOSE",`[v=\\s]*(${b[C.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[C.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[C.XRANGEIDENTIFIERLOOSE]})(?:${b[C.PRERELEASELOOSE]})?${b[C.BUILD]}?)?)?`);E("XRANGE",`^${b[C.GTLT]}\\s*${b[C.XRANGEPLAIN]}$`);E("XRANGELOOSE",`^${b[C.GTLT]}\\s*${b[C.XRANGEPLAINLOOSE]}$`);E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${rn}})(?:\\.(\\d{1,${rn}}))?(?:\\.(\\d{1,${rn}}))?`);E("COERCE",`${b[C.COERCEPLAIN]}(?:$|[^\\d])`);E("COERCEFULL",b[C.COERCEPLAIN]+`(?:${b[C.PRERELEASE]})?(?:${b[C.BUILD]})?(?:$|[^\\d])`);E("COERCERTL",b[C.COERCE],!0);E("COERCERTLFULL",b[C.COERCEFULL],!0);E("LONETILDE","(?:~>?)");E("TILDETRIM",`(\\s*)${b[C.LONETILDE]}\\s+`,!0);ee.tildeTrimReplace="$1~";E("TILDE",`^${b[C.LONETILDE]}${b[C.XRANGEPLAIN]}$`);E("TILDELOOSE",`^${b[C.LONETILDE]}${b[C.XRANGEPLAINLOOSE]}$`);E("LONECARET","(?:\\^)");E("CARETTRIM",`(\\s*)${b[C.LONECARET]}\\s+`,!0);ee.caretTrimReplace="$1^";E("CARET",`^${b[C.LONECARET]}${b[C.XRANGEPLAIN]}$`);E("CARETLOOSE",`^${b[C.LONECARET]}${b[C.XRANGEPLAINLOOSE]}$`);E("COMPARATORLOOSE",`^${b[C.GTLT]}\\s*(${b[C.LOOSEPLAIN]})$|^$`);E("COMPARATOR",`^${b[C.GTLT]}\\s*(${b[C.FULLPLAIN]})$|^$`);E("COMPARATORTRIM",`(\\s*)${b[C.GTLT]}\\s*(${b[C.LOOSEPLAIN]}|${b[C.XRANGEPLAIN]})`,!0);ee.comparatorTrimReplace="$1$2$3";E("HYPHENRANGE",`^\\s*(${b[C.XRANGEPLAIN]})\\s+-\\s+(${b[C.XRANGEPLAIN]})\\s*$`);E("HYPHENRANGELOOSE",`^\\s*(${b[C.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[C.XRANGEPLAINLOOSE]})\\s*$`);E("STAR","(<|>)?=?\\s*\\*");E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Nt=y(function(vE,ys){var hd=Object.freeze({loose:!0}),yd=Object.freeze({}),bd=(e)=>{if(!e)return yd;if(typeof e!=="object")return hd;return e};ys.exports=bd});var sn=y(function(EE,Rs){var bs=/^[0-9]+$/,Cs=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=bs.test(e),n=bs.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Cd=(e,t)=>Cs(t,e);Rs.exports={compareIdentifiers:Cs,rcompareIdentifiers:Cd}});var q=y(function(IE,xs){var Lt=Je(),{MAX_LENGTH:Ss,MAX_SAFE_INTEGER:Mt}=Ne(),{safeRe:$t,t:_t}=Le(),Rd=Nt(),{compareIdentifiers:on}=sn(),Sd=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(on(e[n],r[n])!==0)return!1;return!0};class Q{constructor(e,t){if(t=Rd(t),e instanceof Q)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>Ss)throw TypeError(`version is longer than ${Ss} characters`);Lt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?$t[_t.LOOSE]:$t[_t.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>Mt||this.major<0)throw TypeError("Invalid major version");if(this.minor>Mt||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>Mt||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<Mt)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(Lt("SemVer.compare",this.version,this.options,e),!(e instanceof Q)){if(typeof e==="string"&&e===this.version)return 0;e=new Q(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof Q))e=new Q(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 Q))e=new Q(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(Lt("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 on(r,n)}while(++t)}compareBuild(e){if(!(e instanceof Q))e=new Q(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(Lt("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 on(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?$t[_t.PRERELEASELOOSE]:$t[_t.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(Sd(this.prerelease,t)){let s=this.prerelease[t.split(".").length];if(isNaN(s))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=Q});var le=y(function(AE,ks){var ws=q(),xd=(e,t,r=!1)=>{if(e instanceof ws)return e;try{return new ws(e,t)}catch(n){if(!r)return null;throw n}};ks.exports=xd});var Es=y(function(PE,vs){var wd=le(),kd=(e,t)=>{let r=wd(e,t);return r?r.version:null};vs.exports=kd});var As=y(function(TE,Is){var vd=le(),Ed=(e,t)=>{let r=vd(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Is.exports=Ed});var Ds=y(function(DE,Ts){var Ps=q(),Id=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new Ps(e instanceof Ps?e.version:e,r).inc(t,n,i).version}catch(s){return null}};Ts.exports=Id});var Ls=y(function(OE,Ns){var Os=le(),Ad=(e,t)=>{let r=Os(e,null,!0),n=Os(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let f=c?"pre":"";if(r.major!==n.major)return f+"major";if(r.minor!==n.minor)return f+"minor";if(r.patch!==n.patch)return f+"patch";return"prerelease"};Ns.exports=Ad});var $s=y(function(NE,Ms){var Pd=q(),Td=(e,t)=>new Pd(e,t).major;Ms.exports=Td});var qs=y(function(LE,_s){var Dd=q(),Od=(e,t)=>new Dd(e,t).minor;_s.exports=Od});var Bs=y(function(ME,Fs){var Nd=q(),Ld=(e,t)=>new Nd(e,t).patch;Fs.exports=Ld});var Us=y(function($E,js){var Md=le(),$d=(e,t)=>{let r=Md(e,t);return r&&r.prerelease.length?r.prerelease:null};js.exports=$d});var Y=y(function(_E,Ks){var Vs=q(),_d=(e,t,r)=>new Vs(e,r).compare(new Vs(t,r));Ks.exports=_d});var Ys=y(function(qE,Gs){var qd=Y(),Fd=(e,t,r)=>qd(t,e,r);Gs.exports=Fd});var zs=y(function(FE,Hs){var Bd=Y(),jd=(e,t)=>Bd(e,t,!0);Hs.exports=jd});var qt=y(function(BE,Js){var Ws=q(),Ud=(e,t,r)=>{let n=new Ws(e,r),i=new Ws(t,r);return n.compare(i)||n.compareBuild(i)};Js.exports=Ud});var Xs=y(function(jE,Qs){var Vd=qt(),Kd=(e,t)=>e.sort((r,n)=>Vd(r,n,t));Qs.exports=Kd});var eo=y(function(UE,Zs){var Gd=qt(),Yd=(e,t)=>e.sort((r,n)=>Gd(n,r,t));Zs.exports=Yd});var Qe=y(function(VE,to){var Hd=Y(),zd=(e,t,r)=>Hd(e,t,r)>0;to.exports=zd});var Ft=y(function(KE,ro){var Wd=Y(),Jd=(e,t,r)=>Wd(e,t,r)<0;ro.exports=Jd});var an=y(function(GE,no){var Qd=Y(),Xd=(e,t,r)=>Qd(e,t,r)===0;no.exports=Xd});var cn=y(function(YE,io){var Zd=Y(),ep=(e,t,r)=>Zd(e,t,r)!==0;io.exports=ep});var Bt=y(function(HE,so){var tp=Y(),rp=(e,t,r)=>tp(e,t,r)>=0;so.exports=rp});var jt=y(function(zE,oo){var np=Y(),ip=(e,t,r)=>np(e,t,r)<=0;oo.exports=ip});var ln=y(function(WE,ao){var sp=an(),op=cn(),ap=Qe(),cp=Bt(),lp=Ft(),up=jt(),dp=(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 sp(e,r,n);case"!=":return op(e,r,n);case">":return ap(e,r,n);case">=":return cp(e,r,n);case"<":return lp(e,r,n);case"<=":return up(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};ao.exports=dp});var lo=y(function(JE,co){var pp=q(),fp=le(),{safeRe:Ut,t:Vt}=Le(),gp=(e,t)=>{if(e instanceof pp)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?Ut[Vt.COERCEFULL]:Ut[Vt.COERCE]);else{let c=t.includePrerelease?Ut[Vt.COERCERTLFULL]:Ut[Vt.COERCERTL],l;while((l=c.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||l.index+l[0].length!==r.index+r[0].length)r=l;c.lastIndex=l.index+l[1].length+l[2].length}c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return fp(`${n}.${i}.${s}${o}${a}`,t)};co.exports=gp});var po=y(function(QE,uo){var mp=le(),hp=Ne(),yp=q(),bp=(e,t,r)=>{if(!hp.RELEASE_TYPES.includes(t))return null;let n=Cp(e,r);return n&&Rp(n,t)},Cp=(e,t)=>{let r=e instanceof yp?e.version:e;return mp(r,t)},Rp=(e,t)=>{if(Sp(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()},Sp=(e)=>e.startsWith("pre");uo.exports=bp});var mo=y(function(XE,go){class fo{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}}go.exports=fo});var H=y(function(ZE,Co){var xp=/\s+/g;class Xe{constructor(e,t){if(t=kp(t),e instanceof Xe)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new Xe(e.raw,t);if(e instanceof un)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(xp," "),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)=>!yo(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&&Np(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(Op,"");let r=((this.options.includePrerelease&&Tp)|(this.options.loose&&Dp))+":"+e,n=ho.get(r);if(n)return n;let i=this.options.loose,s=i?B[F.HYPHENRANGELOOSE]:B[F.HYPHENRANGE];e=e.replace(s,Kp(this.options.includePrerelease)),T("hyphen replace",e),e=e.replace(B[F.COMPARATORTRIM],Ip),T("comparator trim",e),e=e.replace(B[F.TILDETRIM],Ap),T("tilde trim",e),e=e.replace(B[F.CARETTRIM],Pp),T("caret trim",e);let o=e.split(" ").map((f)=>Lp(f,this.options)).join(" ").split(/\s+/).map((f)=>Vp(f,this.options));if(i)o=o.filter((f)=>(T("loose invalid filter",f,this.options),!!f.match(B[F.COMPARATORLOOSE])));T("range list",o);let a=new Map,c=o.map((f)=>new un(f,this.options));for(let f of c){if(yo(f))return[f];a.set(f.value,f)}if(a.size>1&&a.has(""))a.delete("");let l=[...a.values()];return ho.set(r,l),l}intersects(e,t){if(!(e instanceof Xe))throw TypeError("a Range is required");return this.set.some((r)=>bo(r,t)&&e.set.some((n)=>bo(n,t)&&r.every((i)=>n.every((s)=>i.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new vp(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(Gp(this.set[t],e,this.options))return!0;return!1}}Co.exports=Xe;var wp=mo(),ho=new wp,kp=Nt(),un=Ze(),T=Je(),vp=q(),{safeRe:B,src:Ep,t:F,comparatorTrimReplace:Ip,tildeTrimReplace:Ap,caretTrimReplace:Pp}=Le(),{FLAG_INCLUDE_PRERELEASE:Tp,FLAG_LOOSE:Dp}=Ne(),Op=new RegExp(Ep[F.BUILD],"g"),yo=(e)=>e.value==="<0.0.0-0",Np=(e)=>e.value==="",bo=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((s)=>i.intersects(s,t)),i=n.pop();return r},Lp=(e,t)=>(e=e.replace(B[F.BUILD],""),T("comp",e,t),e=qp(e,t),T("caret",e),e=$p(e,t),T("tildes",e),e=Bp(e,t),T("xrange",e),e=Up(e,t),T("stars",e),e),M=(e)=>!e||e.toLowerCase()==="x"||e==="*",Mp=(e,t,r)=>M(e)&&!M(t)||M(t)&&r&&!M(r),$p=(e,t)=>e.trim().split(/\s+/).map((r)=>_p(r,t)).join(" "),_p=(e,t)=>{let r=t.loose?B[F.TILDELOOSE]:B[F.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,c)=>{T("tilde",e,i,s,o,a,c);let l;if(M(s))l="";else if(M(o))l=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(M(a))l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else if(c)T("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`;return T("tilde return",l),l})},qp=(e,t)=>e.trim().split(/\s+/).map((r)=>Fp(r,t)).join(" "),Fp=(e,t)=>{T("caret",e,t);let r=t.loose?B[F.CARETLOOSE]:B[F.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,c)=>{T("caret",e,i,s,o,a,c);let l;if(M(s))l="";else if(M(o))l=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(M(a))if(s==="0")l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`;else if(c)if(T("replaceCaret pr",c),s==="0")if(o==="0")l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`;else if(T("no pr"),s==="0")if(o==="0")l=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`;return T("caret return",l),l})},Bp=(e,t)=>(T("replaceXRanges",e,t),e.split(/\s+/).map((r)=>jp(r,t)).join(" ")),jp=(e,t)=>{e=e.trim();let r=t.loose?B[F.XRANGELOOSE]:B[F.XRANGE];return e.replace(r,(n,i,s,o,a,c)=>{if(T("xRange",e,n,i,s,o,a,c),Mp(s,o,a))return e;let l=M(s),f=l||M(o),p=f||M(a),d=p;if(i==="="&&d)i="";if(c=t.includePrerelease?"-0":"",l)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&d){if(f)o=0;if(a=0,i===">")if(i=">=",f)s=+s+1,o=0,a=0;else o=+o+1,a=0;else if(i==="<=")if(i="<",f)s=+s+1;else o=+o+1;if(i==="<")c="-0";n=`${i+s}.${o}.${a}${c}`}else if(f)n=`>=${s}.0.0${c} <${+s+1}.0.0-0`;else if(p)n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`;return T("xRange return",n),n})},Up=(e,t)=>(T("replaceStars",e,t),e.trim().replace(B[F.STAR],"")),Vp=(e,t)=>(T("replaceGTE0",e,t),e.trim().replace(B[t.includePrerelease?F.GTE0PRE:F.GTE0],"")),Kp=(e)=>(t,r,n,i,s,o,a,c,l,f,p,d)=>{if(M(n))r="";else if(M(i))r=`>=${n}.0.0${e?"-0":""}`;else if(M(s))r=`>=${n}.${i}.0${e?"-0":""}`;else if(o)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(M(l))c="";else if(M(f))c=`<${+l+1}.0.0-0`;else if(M(p))c=`<${l}.${+f+1}.0-0`;else if(d)c=`<=${l}.${f}.${p}-${d}`;else if(e)c=`<${l}.${f}.${+p+1}-0`;else c=`<=${c}`;return`${r} ${c}`.trim()},Gp=(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===un.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 Ze=y(function(eI,vo){var et=Symbol("SemVer ANY");class Kt{static get ANY(){return et}constructor(e,t){if(t=Ro(t),e instanceof Kt)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),pn("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===et)this.value="";else this.value=this.operator+this.semver.version;pn("comp",this)}parse(e){let t=this.options.loose?So[xo.COMPARATORLOOSE]:So[xo.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=et;else this.semver=new wo(r[2],this.options.loose)}toString(){return this.value}test(e){if(pn("Comparator.test",e,this.options.loose),this.semver===et||e===et)return!0;if(typeof e==="string")try{e=new wo(e,this.options)}catch(t){return!1}return dn(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Kt))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new ko(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new ko(this.value,t).test(e.semver)}if(t=Ro(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(dn(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(dn(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}vo.exports=Kt;var Ro=Nt(),{safeRe:So,t:xo}=Le(),dn=ln(),pn=Je(),wo=q(),ko=H()});var tt=y(function(tI,Eo){var Yp=H(),Hp=(e,t,r)=>{try{t=new Yp(t,r)}catch(n){return!1}return t.test(e)};Eo.exports=Hp});var Ao=y(function(rI,Io){var zp=H(),Wp=(e,t)=>new zp(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));Io.exports=Wp});var To=y(function(nI,Po){var Jp=q(),Qp=H(),Xp=(e,t,r)=>{let n=null,i=null,s=null;try{s=new Qp(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===-1)n=o,i=new Jp(n,r)}}),n};Po.exports=Xp});var Oo=y(function(iI,Do){var Zp=q(),ef=H(),tf=(e,t,r)=>{let n=null,i=null,s=null;try{s=new ef(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===1)n=o,i=new Zp(n,r)}}),n};Do.exports=tf});var Mo=y(function(sI,Lo){var fn=q(),rf=H(),No=Qe(),nf=(e,t)=>{e=new rf(e,t);let r=new fn("0.0.0");if(e.test(r))return r;if(r=new fn("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],s=null;if(i.forEach((o)=>{let a=new fn(o.semver.version);switch(o.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!s||No(a,s))s=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||No(r,s)))r=s}if(r&&e.test(r))return r;return null};Lo.exports=nf});var _o=y(function(oI,$o){var sf=H(),of=(e,t)=>{try{return new sf(e,t).range||"*"}catch(r){return null}};$o.exports=of});var Gt=y(function(aI,jo){var af=q(),Bo=Ze(),{ANY:cf}=Bo,lf=H(),uf=tt(),qo=Qe(),Fo=Ft(),df=jt(),pf=Bt(),ff=(e,t,r,n)=>{e=new af(e,n),t=new lf(t,n);let i,s,o,a,c;switch(r){case">":i=qo,s=df,o=Fo,a=">",c=">=";break;case"<":i=Fo,s=pf,o=qo,a="<",c="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(uf(e,t,n))return!1;for(let l=0;l<t.set.length;++l){let f=t.set[l],p=null,d=null;if(f.forEach((u)=>{if(u.semver===cf)u=new Bo(">=0.0.0");if(p=p||u,d=d||u,i(u.semver,p.semver,n))p=u;else if(o(u.semver,d.semver,n))d=u}),p.operator===a||p.operator===c)return!1;if((!d.operator||d.operator===a)&&s(e,d.semver))return!1;else if(d.operator===c&&o(e,d.semver))return!1}return!0};jo.exports=ff});var Vo=y(function(cI,Uo){var gf=Gt(),mf=(e,t,r)=>gf(e,t,">",r);Uo.exports=mf});var Go=y(function(lI,Ko){var hf=Gt(),yf=(e,t,r)=>hf(e,t,"<",r);Ko.exports=yf});var zo=y(function(uI,Ho){var Yo=H(),bf=(e,t,r)=>(e=new Yo(e,r),t=new Yo(t,r),e.intersects(t,r));Ho.exports=bf});var Jo=y(function(dI,Wo){var Cf=tt(),Rf=Y();Wo.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((f,p)=>Rf(f,p,r));for(let f of o)if(Cf(f,t,r)){if(s=f,!i)i=f}else{if(s)n.push([i,s]);s=null,i=null}if(i)n.push([i,null]);let a=[];for(let[f,p]of n)if(f===p)a.push(f);else if(!p&&f===o[0])a.push("*");else if(!p)a.push(`>=${f}`);else if(f===o[0])a.push(`<=${p}`);else a.push(`${f} - ${p}`);let c=a.join(" || "),l=typeof t.raw==="string"?t.raw:String(t);return c.length<l.length?c:t}});var ra=y(function(pI,ta){var Qo=H(),hn=Ze(),{ANY:gn}=hn,mn=tt(),yn=Y(),Sf=(e,t,r={})=>{if(e===t)return!0;e=new Qo(e,r),t=new Qo(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=wf(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},xf=[new hn(">=0.0.0-0")],Xo=[new hn(">=0.0.0")],wf=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===gn)if(t.length===1&&t[0].semver===gn)return!0;else if(r.includePrerelease)e=xf;else e=Xo;if(t.length===1&&t[0].semver===gn)if(r.includePrerelease)return!0;else t=Xo;let n=new Set,i,s;for(let u of e)if(u.operator===">"||u.operator===">=")i=Zo(i,u,r);else if(u.operator==="<"||u.operator==="<=")s=ea(s,u,r);else n.add(u.semver);if(n.size>1)return null;let o;if(i&&s){if(o=yn(i.semver,s.semver,r),o>0)return null;else if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let u of n){if(i&&!mn(u,String(i),r))return null;if(s&&!mn(u,String(s),r))return null;for(let m of t)if(!mn(u,String(m),r))return!1;return!0}let a,c,l,f,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0)p=!1;for(let u of t){if(f=f||u.operator===">"||u.operator===">=",l=l||u.operator==="<"||u.operator==="<=",i){if(d){if(u.semver.prerelease&&u.semver.prerelease.length&&u.semver.major===d.major&&u.semver.minor===d.minor&&u.semver.patch===d.patch)d=!1}if(u.operator===">"||u.operator===">="){if(a=Zo(i,u,r),a===u&&a!==i)return!1}else if(i.operator===">="&&!u.test(i.semver))return!1}if(s){if(p){if(u.semver.prerelease&&u.semver.prerelease.length&&u.semver.major===p.major&&u.semver.minor===p.minor&&u.semver.patch===p.patch)p=!1}if(u.operator==="<"||u.operator==="<="){if(c=ea(s,u,r),c===u&&c!==s)return!1}else if(s.operator==="<="&&!u.test(s.semver))return!1}if(!u.operator&&(s||i)&&o!==0)return!1}if(i&&l&&!s&&o!==0)return!1;if(s&&f&&!i&&o!==0)return!1;if(d||p)return!1;return!0},Zo=(e,t,r)=>{if(!e)return t;let n=yn(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},ea=(e,t,r)=>{if(!e)return t;let n=yn(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};ta.exports=Sf});var oa=y(function(fI,sa){var bn=Le(),na=Ne(),kf=q(),ia=sn(),vf=le(),Ef=Es(),If=As(),Af=Ds(),Pf=Ls(),Tf=$s(),Df=qs(),Of=Bs(),Nf=Us(),Lf=Y(),Mf=Ys(),$f=zs(),_f=qt(),qf=Xs(),Ff=eo(),Bf=Qe(),jf=Ft(),Uf=an(),Vf=cn(),Kf=Bt(),Gf=jt(),Yf=ln(),Hf=lo(),zf=po(),Wf=Ze(),Jf=H(),Qf=tt(),Xf=Ao(),Zf=To(),eg=Oo(),tg=Mo(),rg=_o(),ng=Gt(),ig=Vo(),sg=Go(),og=zo(),ag=Jo(),cg=ra();sa.exports={parse:vf,valid:Ef,clean:If,inc:Af,diff:Pf,major:Tf,minor:Df,patch:Of,prerelease:Nf,compare:Lf,rcompare:Mf,compareLoose:$f,compareBuild:_f,sort:qf,rsort:Ff,gt:Bf,lt:jf,eq:Uf,neq:Vf,gte:Kf,lte:Gf,cmp:Yf,coerce:Hf,truncate:zf,Comparator:Wf,Range:Jf,satisfies:Qf,toComparators:Xf,maxSatisfying:Zf,minSatisfying:eg,minVersion:tg,validRange:rg,outside:ng,gtr:ig,ltr:sg,intersects:og,simplifyRange:ag,subset:cg,SemVer:kf,re:bn.re,src:bn.src,tokens:bn.t,SEMVER_SPEC_VERSION:na.SEMVER_SPEC_VERSION,RELEASE_TYPES:na.RELEASE_TYPES,compareIdentifiers:ia.compareIdentifiers,rcompareIdentifiers:ia.rcompareIdentifiers}});var lg;var aa=U(()=>{lg=_l(oa(),1)});var A=y(function(yg){var Cn=Symbol.for("yaml.alias"),ca=Symbol.for("yaml.document"),Yt=Symbol.for("yaml.map"),la=Symbol.for("yaml.pair"),Rn=Symbol.for("yaml.scalar"),Ht=Symbol.for("yaml.seq"),oe=Symbol.for("yaml.node.type"),ug=(e)=>!!e&&typeof e==="object"&&e[oe]===Cn,dg=(e)=>!!e&&typeof e==="object"&&e[oe]===ca,pg=(e)=>!!e&&typeof e==="object"&&e[oe]===Yt,fg=(e)=>!!e&&typeof e==="object"&&e[oe]===la,ua=(e)=>!!e&&typeof e==="object"&&e[oe]===Rn,gg=(e)=>!!e&&typeof e==="object"&&e[oe]===Ht;function da(e){if(e&&typeof e==="object")switch(e[oe]){case Yt:case Ht:return!0}return!1}function mg(e){if(e&&typeof e==="object")switch(e[oe]){case Cn:case Yt:case Rn:case Ht:return!0}return!1}var hg=(e)=>(ua(e)||da(e))&&!!e.anchor;yg.ALIAS=Cn;yg.DOC=ca;yg.MAP=Yt;yg.NODE_TYPE=oe;yg.PAIR=la;yg.SCALAR=Rn;yg.SEQ=Ht;yg.hasAnchor=hg;yg.isAlias=ug;yg.isCollection=da;yg.isDocument=dg;yg.isMap=pg;yg.isNode=mg;yg.isPair=fg;yg.isScalar=ua;yg.isSeq=gg});var rt=y(function(Lg){var _=A(),j=Symbol("break visit"),pa=Symbol("skip children"),te=Symbol("remove node");function zt(e,t){let r=fa(t);if(_.isDocument(e)){if(Me(null,e.contents,r,Object.freeze([e]))===te)e.contents=null}else Me(null,e,r,Object.freeze([]))}zt.BREAK=j;zt.SKIP=pa;zt.REMOVE=te;function Me(e,t,r,n){let i=ga(e,t,r,n);if(_.isNode(i)||_.isPair(i))return ma(e,n,i),Me(e,i,r,n);if(typeof i!=="symbol"){if(_.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){let o=Me(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===j)return j;else if(o===te)t.items.splice(s,1),s-=1}}else if(_.isPair(t)){n=Object.freeze(n.concat(t));let s=Me("key",t.key,r,n);if(s===j)return j;else if(s===te)t.key=null;let o=Me("value",t.value,r,n);if(o===j)return j;else if(o===te)t.value=null}}return i}async function Wt(e,t){let r=fa(t);if(_.isDocument(e)){if(await $e(null,e.contents,r,Object.freeze([e]))===te)e.contents=null}else await $e(null,e,r,Object.freeze([]))}Wt.BREAK=j;Wt.SKIP=pa;Wt.REMOVE=te;async function $e(e,t,r,n){let i=await ga(e,t,r,n);if(_.isNode(i)||_.isPair(i))return ma(e,n,i),$e(e,i,r,n);if(typeof i!=="symbol"){if(_.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){let o=await $e(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===j)return j;else if(o===te)t.items.splice(s,1),s-=1}}else if(_.isPair(t)){n=Object.freeze(n.concat(t));let s=await $e("key",t.key,r,n);if(s===j)return j;else if(s===te)t.key=null;let o=await $e("value",t.value,r,n);if(o===j)return j;else if(o===te)t.value=null}}return i}function fa(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 ga(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(_.isMap(t))return r.Map?.(e,t,n);if(_.isSeq(t))return r.Seq?.(e,t,n);if(_.isPair(t))return r.Pair?.(e,t,n);if(_.isScalar(t))return r.Scalar?.(e,t,n);if(_.isAlias(t))return r.Alias?.(e,t,n);return}function ma(e,t,r){let n=t[t.length-1];if(_.isCollection(n))n.items[e]=r;else if(_.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(_.isDocument(n))n.contents=r;else{let i=_.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}Lg.visit=zt;Lg.visitAsync=Wt});var Sn=y(function(Bg){var ha=A(),_g=rt(),qg={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Fg=(e)=>e.replace(/[!,[\]{}]/g,(t)=>qg[t]);class z{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},z.defaultYaml,e),this.tags=Object.assign({},z.defaultTags,t)}clone(){let e=new z(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new z(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:z.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},z.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:z.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},z.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,s]=r;return this.tags[i]=s,!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 s=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,s),!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 s=e.slice(2,-1);if(s==="!"||s==="!!")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 s}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(s){return t(String(s)),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+Fg(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&&ha.isNode(e.contents)){let i={};_g.visit(e.contents,(s,o)=>{if(ha.isNode(o)&&o.tag)i[o.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,s]of r){if(i==="!!"&&s==="tag:yaml.org,2002:")continue;if(!e||n.some((o)=>o.startsWith(s)))t.push(`%TAG ${i} ${s}`)}return t.join(`
|
|
3
|
-
`)}}z.defaultYaml={explicit:!1,version:"1.2"};z.defaultTags={"!!":"tag:yaml.org,2002:"};Bg.Directives=z});var Jt=y(function(Gg){var ya=A(),Ug=rt();function Vg(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 ba(e){let t=new Set;return Ug.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function Ca(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function Kg(e,t){let r=[],n=new Map,i=null;return{onAnchor:(s)=>{r.push(s),i??(i=ba(e));let o=Ca(t,i);return i.add(o),o},setAnchors:()=>{for(let s of r){let o=n.get(s);if(typeof o==="object"&&o.anchor&&(ya.isScalar(o.node)||ya.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:n}}Gg.anchorIsValid=Vg;Gg.anchorNames=ba;Gg.createNodeAnchors=Kg;Gg.findNewAnchor=Ca});var xn=y(function(Jg){function nt(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let o=n[i],a=nt(e,n,String(i),o);if(a===void 0)delete n[i];else if(a!==o)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),o=nt(e,n,i,s);if(o===void 0)n.delete(i);else if(o!==s)n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let s=nt(e,n,i,i);if(s===void 0)n.delete(i);else if(s!==i)n.delete(i),n.add(s)}else for(let[i,s]of Object.entries(n)){let o=nt(e,n,i,s);if(o===void 0)delete n[i];else if(o!==s)n[i]=o}return e.call(t,r,n)}Jg.applyReviver=nt});var ue=y(function(Zg){var Xg=A();function Ra(e,t,r){if(Array.isArray(e))return e.map((n,i)=>Ra(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Xg.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(s)=>{n.res=s,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}Zg.toJS=Ra});var Qt=y(function(nm){var tm=xn(),Sa=A(),rm=ue();class xa{constructor(e){Object.defineProperty(this,Sa.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(!Sa.isDocument(e))throw TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},o=rm.toJS(this,"",s);if(typeof n==="function")for(let{count:a,res:c}of s.anchors.values())n(c,a);return typeof i==="function"?tm.applyReviver(i,{"":o},"",o):o}}nm.NodeBase=xa});var it=y(function(lm){var sm=Jt(),om=rt(),_e=A(),am=Qt(),cm=ue();class wa extends am.NodeBase{constructor(e){super(_e.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=[],om.visit(e,{Node:(i,s)=>{if(_e.isAlias(s)||_e.hasAnchor(s))r.push(s)}}),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:s,maxAliasCount:o}=t,a=i.get(n);if(!a)cm.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(o>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=Xt(s,n,i);if(a.count*a.aliasCount>o)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(sm.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 Xt(e,t,r){if(_e.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(_e.isCollection(t)){let n=0;for(let i of t.items){let s=Xt(e,i,r);if(s>n)n=s}return n}else if(_e.isPair(t)){let n=Xt(e,t.key,r),i=Xt(e,t.value,r);return Math.max(n,i)}return 1}lm.Alias=wa});var D=y(function(mm){var dm=A(),pm=Qt(),fm=ue(),gm=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class Se extends pm.NodeBase{constructor(e){super(dm.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:fm.toJS(this.value,e,t)}toString(){return String(this.value)}}Se.BLOCK_FOLDED="BLOCK_FOLDED";Se.BLOCK_LITERAL="BLOCK_LITERAL";Se.PLAIN="PLAIN";Se.QUOTE_DOUBLE="QUOTE_DOUBLE";Se.QUOTE_SINGLE="QUOTE_SINGLE";mm.Scalar=Se;mm.isScalarValue=gm});var st=y(function(xm){var bm=it(),xe=A(),ka=D(),Cm="tag:yaml.org,2002:";function Rm(e,t,r){if(t){let n=r.filter((s)=>s.tag===t),i=n.find((s)=>!s.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function Sm(e,t,r){if(xe.isDocument(e))e=e.contents;if(xe.isNode(e))return e;if(xe.isPair(e)){let p=r.schema[xe.MAP].createNode?.(r.schema,null,r);return p.items.push(e),p}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:s,schema:o,sourceObjects:a}=r,c=void 0;if(n&&e&&typeof e==="object")if(c=a.get(e),c)return c.anchor??(c.anchor=i(e)),new bm.Alias(c.anchor);else c={anchor:null,node:null},a.set(e,c);if(t?.startsWith("!!"))t=Cm+t.slice(2);let l=Rm(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let p=new ka.Scalar(e);if(c)c.node=p;return p}l=e instanceof Map?o[xe.MAP]:(Symbol.iterator in Object(e))?o[xe.SEQ]:o[xe.MAP]}if(s)s(l),delete r.onTagObj;let f=l?.createNode?l.createNode(r.schema,e,r):typeof l?.nodeClass?.from==="function"?l.nodeClass.from(r.schema,e,r):new ka.Scalar(e);if(t)f.tag=t;else if(!l.default)f.tag=l.tag;if(c)c.node=f;return f}xm.createNode=Sm});var Zt=y(function(
|
|
2
|
+
var Dl=Object.create;var{getPrototypeOf:Ol,defineProperty:qi,getOwnPropertyNames:Nl}=Object;var Fi=Object.prototype.hasOwnProperty;function Ll(e){return this[e]}var Ml,$l,_l=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?Ml??=new WeakMap:$l??=new WeakMap,s=i.get(e);if(s)return s}r=e!=null?Dl(Ol(e)):{};let o=t||!e||!e.__esModule||!Fi.call(e,"default")?qi(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Nl(e))if(!Fi.call(o,a))qi(o,a,{get:Ll.bind(e,a),enumerable:!0})}if(n)i.set(e,o);return o};var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var U=(e,t,r)=>()=>{if(e)try{t=e(e=0)}catch(n){r=[n]}if(r)throw r[0];return t};var Pt=import.meta.require;var Ne=y(function(Ev,gs){var id=Number.MAX_SAFE_INTEGER||9007199254740991,sd=["major","premajor","minor","preminor","patch","prepatch","prerelease"];gs.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:id,RELEASE_TYPES:sd,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Je=y(function(vv,ms){var od=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};ms.exports=od});var Le=y(function(ee,hs){var{MAX_SAFE_COMPONENT_LENGTH:rn,MAX_SAFE_BUILD_LENGTH:ad,MAX_LENGTH:cd}=Ne(),ld=Je();ee=hs.exports={};var ud=ee.re=[],dd=ee.safeRe=[],b=ee.src=[],pd=ee.safeSrc=[],C=ee.t={},fd=0,nn="[a-zA-Z0-9-]",gd=[["\\s",1],["\\d",cd],[nn,ad]],md=(e)=>{for(let[t,r]of gd)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},v=(e,t,r)=>{let n=md(t),i=fd++;ld(e,i,t),C[e]=i,b[i]=t,pd[i]=n,ud[i]=new RegExp(t,r?"g":void 0),dd[i]=new RegExp(n,r?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*");v("NUMERICIDENTIFIERLOOSE","\\d+");v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${nn}*`);v("MAINVERSION",`(${b[C.NUMERICIDENTIFIER]})\\.(${b[C.NUMERICIDENTIFIER]})\\.(${b[C.NUMERICIDENTIFIER]})`);v("MAINVERSIONLOOSE",`(${b[C.NUMERICIDENTIFIERLOOSE]})\\.(${b[C.NUMERICIDENTIFIERLOOSE]})\\.(${b[C.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASEIDENTIFIER",`(?:${b[C.NONNUMERICIDENTIFIER]}|${b[C.NUMERICIDENTIFIER]})`);v("PRERELEASEIDENTIFIERLOOSE",`(?:${b[C.NONNUMERICIDENTIFIER]}|${b[C.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASE",`(?:-(${b[C.PRERELEASEIDENTIFIER]}(?:\\.${b[C.PRERELEASEIDENTIFIER]})*))`);v("PRERELEASELOOSE",`(?:-?(${b[C.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[C.PRERELEASEIDENTIFIERLOOSE]})*))`);v("BUILDIDENTIFIER",`${nn}+`);v("BUILD",`(?:\\+(${b[C.BUILDIDENTIFIER]}(?:\\.${b[C.BUILDIDENTIFIER]})*))`);v("FULLPLAIN",`v?${b[C.MAINVERSION]}${b[C.PRERELEASE]}?${b[C.BUILD]}?`);v("FULL",`^${b[C.FULLPLAIN]}$`);v("LOOSEPLAIN",`[v=\\s]*${b[C.MAINVERSIONLOOSE]}${b[C.PRERELEASELOOSE]}?${b[C.BUILD]}?`);v("LOOSE",`^${b[C.LOOSEPLAIN]}$`);v("GTLT","((?:<|>)?=?)");v("XRANGEIDENTIFIERLOOSE",`${b[C.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);v("XRANGEIDENTIFIER",`${b[C.NUMERICIDENTIFIER]}|x|X|\\*`);v("XRANGEPLAIN",`[v=\\s]*(${b[C.XRANGEIDENTIFIER]})(?:\\.(${b[C.XRANGEIDENTIFIER]})(?:\\.(${b[C.XRANGEIDENTIFIER]})(?:${b[C.PRERELEASE]})?${b[C.BUILD]}?)?)?`);v("XRANGEPLAINLOOSE",`[v=\\s]*(${b[C.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[C.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[C.XRANGEIDENTIFIERLOOSE]})(?:${b[C.PRERELEASELOOSE]})?${b[C.BUILD]}?)?)?`);v("XRANGE",`^${b[C.GTLT]}\\s*${b[C.XRANGEPLAIN]}$`);v("XRANGELOOSE",`^${b[C.GTLT]}\\s*${b[C.XRANGEPLAINLOOSE]}$`);v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${rn}})(?:\\.(\\d{1,${rn}}))?(?:\\.(\\d{1,${rn}}))?`);v("COERCE",`${b[C.COERCEPLAIN]}(?:$|[^\\d])`);v("COERCEFULL",b[C.COERCEPLAIN]+`(?:${b[C.PRERELEASE]})?(?:${b[C.BUILD]})?(?:$|[^\\d])`);v("COERCERTL",b[C.COERCE],!0);v("COERCERTLFULL",b[C.COERCEFULL],!0);v("LONETILDE","(?:~>?)");v("TILDETRIM",`(\\s*)${b[C.LONETILDE]}\\s+`,!0);ee.tildeTrimReplace="$1~";v("TILDE",`^${b[C.LONETILDE]}${b[C.XRANGEPLAIN]}$`);v("TILDELOOSE",`^${b[C.LONETILDE]}${b[C.XRANGEPLAINLOOSE]}$`);v("LONECARET","(?:\\^)");v("CARETTRIM",`(\\s*)${b[C.LONECARET]}\\s+`,!0);ee.caretTrimReplace="$1^";v("CARET",`^${b[C.LONECARET]}${b[C.XRANGEPLAIN]}$`);v("CARETLOOSE",`^${b[C.LONECARET]}${b[C.XRANGEPLAINLOOSE]}$`);v("COMPARATORLOOSE",`^${b[C.GTLT]}\\s*(${b[C.LOOSEPLAIN]})$|^$`);v("COMPARATOR",`^${b[C.GTLT]}\\s*(${b[C.FULLPLAIN]})$|^$`);v("COMPARATORTRIM",`(\\s*)${b[C.GTLT]}\\s*(${b[C.LOOSEPLAIN]}|${b[C.XRANGEPLAIN]})`,!0);ee.comparatorTrimReplace="$1$2$3";v("HYPHENRANGE",`^\\s*(${b[C.XRANGEPLAIN]})\\s+-\\s+(${b[C.XRANGEPLAIN]})\\s*$`);v("HYPHENRANGELOOSE",`^\\s*(${b[C.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[C.XRANGEPLAINLOOSE]})\\s*$`);v("STAR","(<|>)?=?\\s*\\*");v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Nt=y(function(Iv,ys){var hd=Object.freeze({loose:!0}),yd=Object.freeze({}),bd=(e)=>{if(!e)return yd;if(typeof e!=="object")return hd;return e};ys.exports=bd});var sn=y(function(Av,Rs){var bs=/^[0-9]+$/,Cs=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=bs.test(e),n=bs.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Cd=(e,t)=>Cs(t,e);Rs.exports={compareIdentifiers:Cs,rcompareIdentifiers:Cd}});var q=y(function(Pv,xs){var Lt=Je(),{MAX_LENGTH:Ss,MAX_SAFE_INTEGER:Mt}=Ne(),{safeRe:$t,t:_t}=Le(),Rd=Nt(),{compareIdentifiers:on}=sn(),Sd=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(on(e[n],r[n])!==0)return!1;return!0};class Q{constructor(e,t){if(t=Rd(t),e instanceof Q)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>Ss)throw TypeError(`version is longer than ${Ss} characters`);Lt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?$t[_t.LOOSE]:$t[_t.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>Mt||this.major<0)throw TypeError("Invalid major version");if(this.minor>Mt||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>Mt||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<Mt)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(Lt("SemVer.compare",this.version,this.options,e),!(e instanceof Q)){if(typeof e==="string"&&e===this.version)return 0;e=new Q(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof Q))e=new Q(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 Q))e=new Q(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(Lt("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 on(r,n)}while(++t)}compareBuild(e){if(!(e instanceof Q))e=new Q(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(Lt("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 on(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?$t[_t.PRERELEASELOOSE]:$t[_t.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(Sd(this.prerelease,t)){let s=this.prerelease[t.split(".").length];if(isNaN(s))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=Q});var le=y(function(Tv,ks){var ws=q(),xd=(e,t,r=!1)=>{if(e instanceof ws)return e;try{return new ws(e,t)}catch(n){if(!r)return null;throw n}};ks.exports=xd});var vs=y(function(Dv,Es){var wd=le(),kd=(e,t)=>{let r=wd(e,t);return r?r.version:null};Es.exports=kd});var As=y(function(Ov,Is){var Ed=le(),vd=(e,t)=>{let r=Ed(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Is.exports=vd});var Ds=y(function(Nv,Ts){var Ps=q(),Id=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new Ps(e instanceof Ps?e.version:e,r).inc(t,n,i).version}catch(s){return null}};Ts.exports=Id});var Ls=y(function(Lv,Ns){var Os=le(),Ad=(e,t)=>{let r=Os(e,null,!0),n=Os(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let f=c?"pre":"";if(r.major!==n.major)return f+"major";if(r.minor!==n.minor)return f+"minor";if(r.patch!==n.patch)return f+"patch";return"prerelease"};Ns.exports=Ad});var $s=y(function(Mv,Ms){var Pd=q(),Td=(e,t)=>new Pd(e,t).major;Ms.exports=Td});var qs=y(function($v,_s){var Dd=q(),Od=(e,t)=>new Dd(e,t).minor;_s.exports=Od});var Bs=y(function(_v,Fs){var Nd=q(),Ld=(e,t)=>new Nd(e,t).patch;Fs.exports=Ld});var Us=y(function(qv,js){var Md=le(),$d=(e,t)=>{let r=Md(e,t);return r&&r.prerelease.length?r.prerelease:null};js.exports=$d});var Y=y(function(Fv,Ks){var Vs=q(),_d=(e,t,r)=>new Vs(e,r).compare(new Vs(t,r));Ks.exports=_d});var Ys=y(function(Bv,Gs){var qd=Y(),Fd=(e,t,r)=>qd(t,e,r);Gs.exports=Fd});var zs=y(function(jv,Hs){var Bd=Y(),jd=(e,t)=>Bd(e,t,!0);Hs.exports=jd});var qt=y(function(Uv,Js){var Ws=q(),Ud=(e,t,r)=>{let n=new Ws(e,r),i=new Ws(t,r);return n.compare(i)||n.compareBuild(i)};Js.exports=Ud});var Xs=y(function(Vv,Qs){var Vd=qt(),Kd=(e,t)=>e.sort((r,n)=>Vd(r,n,t));Qs.exports=Kd});var eo=y(function(Kv,Zs){var Gd=qt(),Yd=(e,t)=>e.sort((r,n)=>Gd(n,r,t));Zs.exports=Yd});var Qe=y(function(Gv,to){var Hd=Y(),zd=(e,t,r)=>Hd(e,t,r)>0;to.exports=zd});var Ft=y(function(Yv,ro){var Wd=Y(),Jd=(e,t,r)=>Wd(e,t,r)<0;ro.exports=Jd});var an=y(function(Hv,no){var Qd=Y(),Xd=(e,t,r)=>Qd(e,t,r)===0;no.exports=Xd});var cn=y(function(zv,io){var Zd=Y(),ep=(e,t,r)=>Zd(e,t,r)!==0;io.exports=ep});var Bt=y(function(Wv,so){var tp=Y(),rp=(e,t,r)=>tp(e,t,r)>=0;so.exports=rp});var jt=y(function(Jv,oo){var np=Y(),ip=(e,t,r)=>np(e,t,r)<=0;oo.exports=ip});var ln=y(function(Qv,ao){var sp=an(),op=cn(),ap=Qe(),cp=Bt(),lp=Ft(),up=jt(),dp=(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 sp(e,r,n);case"!=":return op(e,r,n);case">":return ap(e,r,n);case">=":return cp(e,r,n);case"<":return lp(e,r,n);case"<=":return up(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};ao.exports=dp});var lo=y(function(Xv,co){var pp=q(),fp=le(),{safeRe:Ut,t:Vt}=Le(),gp=(e,t)=>{if(e instanceof pp)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?Ut[Vt.COERCEFULL]:Ut[Vt.COERCE]);else{let c=t.includePrerelease?Ut[Vt.COERCERTLFULL]:Ut[Vt.COERCERTL],l;while((l=c.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||l.index+l[0].length!==r.index+r[0].length)r=l;c.lastIndex=l.index+l[1].length+l[2].length}c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return fp(`${n}.${i}.${s}${o}${a}`,t)};co.exports=gp});var po=y(function(Zv,uo){var mp=le(),hp=Ne(),yp=q(),bp=(e,t,r)=>{if(!hp.RELEASE_TYPES.includes(t))return null;let n=Cp(e,r);return n&&Rp(n,t)},Cp=(e,t)=>{let r=e instanceof yp?e.version:e;return mp(r,t)},Rp=(e,t)=>{if(Sp(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()},Sp=(e)=>e.startsWith("pre");uo.exports=bp});var mo=y(function(eI,go){class fo{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}}go.exports=fo});var H=y(function(tI,Co){var xp=/\s+/g;class Xe{constructor(e,t){if(t=kp(t),e instanceof Xe)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new Xe(e.raw,t);if(e instanceof un)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(xp," "),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)=>!yo(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&&Np(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(Op,"");let r=((this.options.includePrerelease&&Tp)|(this.options.loose&&Dp))+":"+e,n=ho.get(r);if(n)return n;let i=this.options.loose,s=i?B[F.HYPHENRANGELOOSE]:B[F.HYPHENRANGE];e=e.replace(s,Kp(this.options.includePrerelease)),T("hyphen replace",e),e=e.replace(B[F.COMPARATORTRIM],Ip),T("comparator trim",e),e=e.replace(B[F.TILDETRIM],Ap),T("tilde trim",e),e=e.replace(B[F.CARETTRIM],Pp),T("caret trim",e);let o=e.split(" ").map((f)=>Lp(f,this.options)).join(" ").split(/\s+/).map((f)=>Vp(f,this.options));if(i)o=o.filter((f)=>(T("loose invalid filter",f,this.options),!!f.match(B[F.COMPARATORLOOSE])));T("range list",o);let a=new Map,c=o.map((f)=>new un(f,this.options));for(let f of c){if(yo(f))return[f];a.set(f.value,f)}if(a.size>1&&a.has(""))a.delete("");let l=[...a.values()];return ho.set(r,l),l}intersects(e,t){if(!(e instanceof Xe))throw TypeError("a Range is required");return this.set.some((r)=>bo(r,t)&&e.set.some((n)=>bo(n,t)&&r.every((i)=>n.every((s)=>i.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new Ep(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(Gp(this.set[t],e,this.options))return!0;return!1}}Co.exports=Xe;var wp=mo(),ho=new wp,kp=Nt(),un=Ze(),T=Je(),Ep=q(),{safeRe:B,src:vp,t:F,comparatorTrimReplace:Ip,tildeTrimReplace:Ap,caretTrimReplace:Pp}=Le(),{FLAG_INCLUDE_PRERELEASE:Tp,FLAG_LOOSE:Dp}=Ne(),Op=new RegExp(vp[F.BUILD],"g"),yo=(e)=>e.value==="<0.0.0-0",Np=(e)=>e.value==="",bo=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((s)=>i.intersects(s,t)),i=n.pop();return r},Lp=(e,t)=>(e=e.replace(B[F.BUILD],""),T("comp",e,t),e=qp(e,t),T("caret",e),e=$p(e,t),T("tildes",e),e=Bp(e,t),T("xrange",e),e=Up(e,t),T("stars",e),e),M=(e)=>!e||e.toLowerCase()==="x"||e==="*",Mp=(e,t,r)=>M(e)&&!M(t)||M(t)&&r&&!M(r),$p=(e,t)=>e.trim().split(/\s+/).map((r)=>_p(r,t)).join(" "),_p=(e,t)=>{let r=t.loose?B[F.TILDELOOSE]:B[F.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,c)=>{T("tilde",e,i,s,o,a,c);let l;if(M(s))l="";else if(M(o))l=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(M(a))l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else if(c)T("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`;return T("tilde return",l),l})},qp=(e,t)=>e.trim().split(/\s+/).map((r)=>Fp(r,t)).join(" "),Fp=(e,t)=>{T("caret",e,t);let r=t.loose?B[F.CARETLOOSE]:B[F.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,c)=>{T("caret",e,i,s,o,a,c);let l;if(M(s))l="";else if(M(o))l=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(M(a))if(s==="0")l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`;else if(c)if(T("replaceCaret pr",c),s==="0")if(o==="0")l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`;else if(T("no pr"),s==="0")if(o==="0")l=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`;return T("caret return",l),l})},Bp=(e,t)=>(T("replaceXRanges",e,t),e.split(/\s+/).map((r)=>jp(r,t)).join(" ")),jp=(e,t)=>{e=e.trim();let r=t.loose?B[F.XRANGELOOSE]:B[F.XRANGE];return e.replace(r,(n,i,s,o,a,c)=>{if(T("xRange",e,n,i,s,o,a,c),Mp(s,o,a))return e;let l=M(s),f=l||M(o),p=f||M(a),d=p;if(i==="="&&d)i="";if(c=t.includePrerelease?"-0":"",l)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&d){if(f)o=0;if(a=0,i===">")if(i=">=",f)s=+s+1,o=0,a=0;else o=+o+1,a=0;else if(i==="<=")if(i="<",f)s=+s+1;else o=+o+1;if(i==="<")c="-0";n=`${i+s}.${o}.${a}${c}`}else if(f)n=`>=${s}.0.0${c} <${+s+1}.0.0-0`;else if(p)n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`;return T("xRange return",n),n})},Up=(e,t)=>(T("replaceStars",e,t),e.trim().replace(B[F.STAR],"")),Vp=(e,t)=>(T("replaceGTE0",e,t),e.trim().replace(B[t.includePrerelease?F.GTE0PRE:F.GTE0],"")),Kp=(e)=>(t,r,n,i,s,o,a,c,l,f,p,d)=>{if(M(n))r="";else if(M(i))r=`>=${n}.0.0${e?"-0":""}`;else if(M(s))r=`>=${n}.${i}.0${e?"-0":""}`;else if(o)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(M(l))c="";else if(M(f))c=`<${+l+1}.0.0-0`;else if(M(p))c=`<${l}.${+f+1}.0-0`;else if(d)c=`<=${l}.${f}.${p}-${d}`;else if(e)c=`<${l}.${f}.${+p+1}-0`;else c=`<=${c}`;return`${r} ${c}`.trim()},Gp=(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===un.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 Ze=y(function(rI,Eo){var et=Symbol("SemVer ANY");class Kt{static get ANY(){return et}constructor(e,t){if(t=Ro(t),e instanceof Kt)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),pn("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===et)this.value="";else this.value=this.operator+this.semver.version;pn("comp",this)}parse(e){let t=this.options.loose?So[xo.COMPARATORLOOSE]:So[xo.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=et;else this.semver=new wo(r[2],this.options.loose)}toString(){return this.value}test(e){if(pn("Comparator.test",e,this.options.loose),this.semver===et||e===et)return!0;if(typeof e==="string")try{e=new wo(e,this.options)}catch(t){return!1}return dn(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Kt))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new ko(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new ko(this.value,t).test(e.semver)}if(t=Ro(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(dn(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(dn(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}Eo.exports=Kt;var Ro=Nt(),{safeRe:So,t:xo}=Le(),dn=ln(),pn=Je(),wo=q(),ko=H()});var tt=y(function(nI,vo){var Yp=H(),Hp=(e,t,r)=>{try{t=new Yp(t,r)}catch(n){return!1}return t.test(e)};vo.exports=Hp});var Ao=y(function(iI,Io){var zp=H(),Wp=(e,t)=>new zp(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));Io.exports=Wp});var To=y(function(sI,Po){var Jp=q(),Qp=H(),Xp=(e,t,r)=>{let n=null,i=null,s=null;try{s=new Qp(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===-1)n=o,i=new Jp(n,r)}}),n};Po.exports=Xp});var Oo=y(function(oI,Do){var Zp=q(),ef=H(),tf=(e,t,r)=>{let n=null,i=null,s=null;try{s=new ef(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===1)n=o,i=new Zp(n,r)}}),n};Do.exports=tf});var Mo=y(function(aI,Lo){var fn=q(),rf=H(),No=Qe(),nf=(e,t)=>{e=new rf(e,t);let r=new fn("0.0.0");if(e.test(r))return r;if(r=new fn("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],s=null;if(i.forEach((o)=>{let a=new fn(o.semver.version);switch(o.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!s||No(a,s))s=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||No(r,s)))r=s}if(r&&e.test(r))return r;return null};Lo.exports=nf});var _o=y(function(cI,$o){var sf=H(),of=(e,t)=>{try{return new sf(e,t).range||"*"}catch(r){return null}};$o.exports=of});var Gt=y(function(lI,jo){var af=q(),Bo=Ze(),{ANY:cf}=Bo,lf=H(),uf=tt(),qo=Qe(),Fo=Ft(),df=jt(),pf=Bt(),ff=(e,t,r,n)=>{e=new af(e,n),t=new lf(t,n);let i,s,o,a,c;switch(r){case">":i=qo,s=df,o=Fo,a=">",c=">=";break;case"<":i=Fo,s=pf,o=qo,a="<",c="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(uf(e,t,n))return!1;for(let l=0;l<t.set.length;++l){let f=t.set[l],p=null,d=null;if(f.forEach((u)=>{if(u.semver===cf)u=new Bo(">=0.0.0");if(p=p||u,d=d||u,i(u.semver,p.semver,n))p=u;else if(o(u.semver,d.semver,n))d=u}),p.operator===a||p.operator===c)return!1;if((!d.operator||d.operator===a)&&s(e,d.semver))return!1;else if(d.operator===c&&o(e,d.semver))return!1}return!0};jo.exports=ff});var Vo=y(function(uI,Uo){var gf=Gt(),mf=(e,t,r)=>gf(e,t,">",r);Uo.exports=mf});var Go=y(function(dI,Ko){var hf=Gt(),yf=(e,t,r)=>hf(e,t,"<",r);Ko.exports=yf});var zo=y(function(pI,Ho){var Yo=H(),bf=(e,t,r)=>(e=new Yo(e,r),t=new Yo(t,r),e.intersects(t,r));Ho.exports=bf});var Jo=y(function(fI,Wo){var Cf=tt(),Rf=Y();Wo.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((f,p)=>Rf(f,p,r));for(let f of o)if(Cf(f,t,r)){if(s=f,!i)i=f}else{if(s)n.push([i,s]);s=null,i=null}if(i)n.push([i,null]);let a=[];for(let[f,p]of n)if(f===p)a.push(f);else if(!p&&f===o[0])a.push("*");else if(!p)a.push(`>=${f}`);else if(f===o[0])a.push(`<=${p}`);else a.push(`${f} - ${p}`);let c=a.join(" || "),l=typeof t.raw==="string"?t.raw:String(t);return c.length<l.length?c:t}});var ra=y(function(gI,ta){var Qo=H(),hn=Ze(),{ANY:gn}=hn,mn=tt(),yn=Y(),Sf=(e,t,r={})=>{if(e===t)return!0;e=new Qo(e,r),t=new Qo(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=wf(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},xf=[new hn(">=0.0.0-0")],Xo=[new hn(">=0.0.0")],wf=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===gn)if(t.length===1&&t[0].semver===gn)return!0;else if(r.includePrerelease)e=xf;else e=Xo;if(t.length===1&&t[0].semver===gn)if(r.includePrerelease)return!0;else t=Xo;let n=new Set,i,s;for(let u of e)if(u.operator===">"||u.operator===">=")i=Zo(i,u,r);else if(u.operator==="<"||u.operator==="<=")s=ea(s,u,r);else n.add(u.semver);if(n.size>1)return null;let o;if(i&&s){if(o=yn(i.semver,s.semver,r),o>0)return null;else if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let u of n){if(i&&!mn(u,String(i),r))return null;if(s&&!mn(u,String(s),r))return null;for(let m of t)if(!mn(u,String(m),r))return!1;return!0}let a,c,l,f,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0)p=!1;for(let u of t){if(f=f||u.operator===">"||u.operator===">=",l=l||u.operator==="<"||u.operator==="<=",i){if(d){if(u.semver.prerelease&&u.semver.prerelease.length&&u.semver.major===d.major&&u.semver.minor===d.minor&&u.semver.patch===d.patch)d=!1}if(u.operator===">"||u.operator===">="){if(a=Zo(i,u,r),a===u&&a!==i)return!1}else if(i.operator===">="&&!u.test(i.semver))return!1}if(s){if(p){if(u.semver.prerelease&&u.semver.prerelease.length&&u.semver.major===p.major&&u.semver.minor===p.minor&&u.semver.patch===p.patch)p=!1}if(u.operator==="<"||u.operator==="<="){if(c=ea(s,u,r),c===u&&c!==s)return!1}else if(s.operator==="<="&&!u.test(s.semver))return!1}if(!u.operator&&(s||i)&&o!==0)return!1}if(i&&l&&!s&&o!==0)return!1;if(s&&f&&!i&&o!==0)return!1;if(d||p)return!1;return!0},Zo=(e,t,r)=>{if(!e)return t;let n=yn(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},ea=(e,t,r)=>{if(!e)return t;let n=yn(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};ta.exports=Sf});var oa=y(function(mI,sa){var bn=Le(),na=Ne(),kf=q(),ia=sn(),Ef=le(),vf=vs(),If=As(),Af=Ds(),Pf=Ls(),Tf=$s(),Df=qs(),Of=Bs(),Nf=Us(),Lf=Y(),Mf=Ys(),$f=zs(),_f=qt(),qf=Xs(),Ff=eo(),Bf=Qe(),jf=Ft(),Uf=an(),Vf=cn(),Kf=Bt(),Gf=jt(),Yf=ln(),Hf=lo(),zf=po(),Wf=Ze(),Jf=H(),Qf=tt(),Xf=Ao(),Zf=To(),eg=Oo(),tg=Mo(),rg=_o(),ng=Gt(),ig=Vo(),sg=Go(),og=zo(),ag=Jo(),cg=ra();sa.exports={parse:Ef,valid:vf,clean:If,inc:Af,diff:Pf,major:Tf,minor:Df,patch:Of,prerelease:Nf,compare:Lf,rcompare:Mf,compareLoose:$f,compareBuild:_f,sort:qf,rsort:Ff,gt:Bf,lt:jf,eq:Uf,neq:Vf,gte:Kf,lte:Gf,cmp:Yf,coerce:Hf,truncate:zf,Comparator:Wf,Range:Jf,satisfies:Qf,toComparators:Xf,maxSatisfying:Zf,minSatisfying:eg,minVersion:tg,validRange:rg,outside:ng,gtr:ig,ltr:sg,intersects:og,simplifyRange:ag,subset:cg,SemVer:kf,re:bn.re,src:bn.src,tokens:bn.t,SEMVER_SPEC_VERSION:na.SEMVER_SPEC_VERSION,RELEASE_TYPES:na.RELEASE_TYPES,compareIdentifiers:ia.compareIdentifiers,rcompareIdentifiers:ia.rcompareIdentifiers}});var lg;var aa=U(()=>{lg=_l(oa(),1)});var A=y(function(yg){var Cn=Symbol.for("yaml.alias"),ca=Symbol.for("yaml.document"),Yt=Symbol.for("yaml.map"),la=Symbol.for("yaml.pair"),Rn=Symbol.for("yaml.scalar"),Ht=Symbol.for("yaml.seq"),oe=Symbol.for("yaml.node.type"),ug=(e)=>!!e&&typeof e==="object"&&e[oe]===Cn,dg=(e)=>!!e&&typeof e==="object"&&e[oe]===ca,pg=(e)=>!!e&&typeof e==="object"&&e[oe]===Yt,fg=(e)=>!!e&&typeof e==="object"&&e[oe]===la,ua=(e)=>!!e&&typeof e==="object"&&e[oe]===Rn,gg=(e)=>!!e&&typeof e==="object"&&e[oe]===Ht;function da(e){if(e&&typeof e==="object")switch(e[oe]){case Yt:case Ht:return!0}return!1}function mg(e){if(e&&typeof e==="object")switch(e[oe]){case Cn:case Yt:case Rn:case Ht:return!0}return!1}var hg=(e)=>(ua(e)||da(e))&&!!e.anchor;yg.ALIAS=Cn;yg.DOC=ca;yg.MAP=Yt;yg.NODE_TYPE=oe;yg.PAIR=la;yg.SCALAR=Rn;yg.SEQ=Ht;yg.hasAnchor=hg;yg.isAlias=ug;yg.isCollection=da;yg.isDocument=dg;yg.isMap=pg;yg.isNode=mg;yg.isPair=fg;yg.isScalar=ua;yg.isSeq=gg});var rt=y(function(Lg){var _=A(),j=Symbol("break visit"),pa=Symbol("skip children"),te=Symbol("remove node");function zt(e,t){let r=fa(t);if(_.isDocument(e)){if(Me(null,e.contents,r,Object.freeze([e]))===te)e.contents=null}else Me(null,e,r,Object.freeze([]))}zt.BREAK=j;zt.SKIP=pa;zt.REMOVE=te;function Me(e,t,r,n){let i=ga(e,t,r,n);if(_.isNode(i)||_.isPair(i))return ma(e,n,i),Me(e,i,r,n);if(typeof i!=="symbol"){if(_.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){let o=Me(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===j)return j;else if(o===te)t.items.splice(s,1),s-=1}}else if(_.isPair(t)){n=Object.freeze(n.concat(t));let s=Me("key",t.key,r,n);if(s===j)return j;else if(s===te)t.key=null;let o=Me("value",t.value,r,n);if(o===j)return j;else if(o===te)t.value=null}}return i}async function Wt(e,t){let r=fa(t);if(_.isDocument(e)){if(await $e(null,e.contents,r,Object.freeze([e]))===te)e.contents=null}else await $e(null,e,r,Object.freeze([]))}Wt.BREAK=j;Wt.SKIP=pa;Wt.REMOVE=te;async function $e(e,t,r,n){let i=await ga(e,t,r,n);if(_.isNode(i)||_.isPair(i))return ma(e,n,i),$e(e,i,r,n);if(typeof i!=="symbol"){if(_.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){let o=await $e(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===j)return j;else if(o===te)t.items.splice(s,1),s-=1}}else if(_.isPair(t)){n=Object.freeze(n.concat(t));let s=await $e("key",t.key,r,n);if(s===j)return j;else if(s===te)t.key=null;let o=await $e("value",t.value,r,n);if(o===j)return j;else if(o===te)t.value=null}}return i}function fa(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 ga(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(_.isMap(t))return r.Map?.(e,t,n);if(_.isSeq(t))return r.Seq?.(e,t,n);if(_.isPair(t))return r.Pair?.(e,t,n);if(_.isScalar(t))return r.Scalar?.(e,t,n);if(_.isAlias(t))return r.Alias?.(e,t,n);return}function ma(e,t,r){let n=t[t.length-1];if(_.isCollection(n))n.items[e]=r;else if(_.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(_.isDocument(n))n.contents=r;else{let i=_.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}Lg.visit=zt;Lg.visitAsync=Wt});var Sn=y(function(Bg){var ha=A(),_g=rt(),qg={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Fg=(e)=>e.replace(/[!,[\]{}]/g,(t)=>qg[t]);class z{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},z.defaultYaml,e),this.tags=Object.assign({},z.defaultTags,t)}clone(){let e=new z(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new z(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:z.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},z.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:z.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},z.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,s]=r;return this.tags[i]=s,!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 s=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,s),!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 s=e.slice(2,-1);if(s==="!"||s==="!!")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 s}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(s){return t(String(s)),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+Fg(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&&ha.isNode(e.contents)){let i={};_g.visit(e.contents,(s,o)=>{if(ha.isNode(o)&&o.tag)i[o.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,s]of r){if(i==="!!"&&s==="tag:yaml.org,2002:")continue;if(!e||n.some((o)=>o.startsWith(s)))t.push(`%TAG ${i} ${s}`)}return t.join(`
|
|
3
|
+
`)}}z.defaultYaml={explicit:!1,version:"1.2"};z.defaultTags={"!!":"tag:yaml.org,2002:"};Bg.Directives=z});var Jt=y(function(Gg){var ya=A(),Ug=rt();function Vg(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 ba(e){let t=new Set;return Ug.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function Ca(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function Kg(e,t){let r=[],n=new Map,i=null;return{onAnchor:(s)=>{r.push(s),i??(i=ba(e));let o=Ca(t,i);return i.add(o),o},setAnchors:()=>{for(let s of r){let o=n.get(s);if(typeof o==="object"&&o.anchor&&(ya.isScalar(o.node)||ya.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:n}}Gg.anchorIsValid=Vg;Gg.anchorNames=ba;Gg.createNodeAnchors=Kg;Gg.findNewAnchor=Ca});var xn=y(function(Jg){function nt(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let o=n[i],a=nt(e,n,String(i),o);if(a===void 0)delete n[i];else if(a!==o)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),o=nt(e,n,i,s);if(o===void 0)n.delete(i);else if(o!==s)n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let s=nt(e,n,i,i);if(s===void 0)n.delete(i);else if(s!==i)n.delete(i),n.add(s)}else for(let[i,s]of Object.entries(n)){let o=nt(e,n,i,s);if(o===void 0)delete n[i];else if(o!==s)n[i]=o}return e.call(t,r,n)}Jg.applyReviver=nt});var ue=y(function(Zg){var Xg=A();function Ra(e,t,r){if(Array.isArray(e))return e.map((n,i)=>Ra(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Xg.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(s)=>{n.res=s,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}Zg.toJS=Ra});var Qt=y(function(nm){var tm=xn(),Sa=A(),rm=ue();class xa{constructor(e){Object.defineProperty(this,Sa.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(!Sa.isDocument(e))throw TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},o=rm.toJS(this,"",s);if(typeof n==="function")for(let{count:a,res:c}of s.anchors.values())n(c,a);return typeof i==="function"?tm.applyReviver(i,{"":o},"",o):o}}nm.NodeBase=xa});var it=y(function(lm){var sm=Jt(),om=rt(),_e=A(),am=Qt(),cm=ue();class wa extends am.NodeBase{constructor(e){super(_e.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=[],om.visit(e,{Node:(i,s)=>{if(_e.isAlias(s)||_e.hasAnchor(s))r.push(s)}}),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:s,maxAliasCount:o}=t,a=i.get(n);if(!a)cm.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(o>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=Xt(s,n,i);if(a.count*a.aliasCount>o)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(sm.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 Xt(e,t,r){if(_e.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(_e.isCollection(t)){let n=0;for(let i of t.items){let s=Xt(e,i,r);if(s>n)n=s}return n}else if(_e.isPair(t)){let n=Xt(e,t.key,r),i=Xt(e,t.value,r);return Math.max(n,i)}return 1}lm.Alias=wa});var D=y(function(mm){var dm=A(),pm=Qt(),fm=ue(),gm=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class Se extends pm.NodeBase{constructor(e){super(dm.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:fm.toJS(this.value,e,t)}toString(){return String(this.value)}}Se.BLOCK_FOLDED="BLOCK_FOLDED";Se.BLOCK_LITERAL="BLOCK_LITERAL";Se.PLAIN="PLAIN";Se.QUOTE_DOUBLE="QUOTE_DOUBLE";Se.QUOTE_SINGLE="QUOTE_SINGLE";mm.Scalar=Se;mm.isScalarValue=gm});var st=y(function(xm){var bm=it(),xe=A(),ka=D(),Cm="tag:yaml.org,2002:";function Rm(e,t,r){if(t){let n=r.filter((s)=>s.tag===t),i=n.find((s)=>!s.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function Sm(e,t,r){if(xe.isDocument(e))e=e.contents;if(xe.isNode(e))return e;if(xe.isPair(e)){let p=r.schema[xe.MAP].createNode?.(r.schema,null,r);return p.items.push(e),p}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:s,schema:o,sourceObjects:a}=r,c=void 0;if(n&&e&&typeof e==="object")if(c=a.get(e),c)return c.anchor??(c.anchor=i(e)),new bm.Alias(c.anchor);else c={anchor:null,node:null},a.set(e,c);if(t?.startsWith("!!"))t=Cm+t.slice(2);let l=Rm(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let p=new ka.Scalar(e);if(c)c.node=p;return p}l=e instanceof Map?o[xe.MAP]:(Symbol.iterator in Object(e))?o[xe.SEQ]:o[xe.MAP]}if(s)s(l),delete r.onTagObj;let f=l?.createNode?l.createNode(r.schema,e,r):typeof l?.nodeClass?.from==="function"?l.nodeClass.from(r.schema,e,r):new ka.Scalar(e);if(t)f.tag=t;else if(!l.default)f.tag=l.tag;if(c)c.node=f;return f}xm.createNode=Sm});var Zt=y(function(vm){var km=st(),re=A(),Em=Qt();function wn(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let s=t[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=n,n=o}else n=new Map([[s,n]])}return km.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 Ea=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class va extends Em.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)=>re.isNode(r)||re.isPair(r)?r.clone(e):r),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Ea(e))this.add(t);else{let[r,...n]=e,i=this.get(r,!0);if(re.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(r,wn(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(re.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&&re.isScalar(i)?i.value:i;else return re.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!re.isPair(t))return!1;let r=t.value;return r==null||e&&re.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 re.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(re.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(r,wn(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}vm.Collection=va;vm.collectionFromPath=wn;vm.isEmptyPath=Ea});var ot=y(function(Om){var Tm=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function kn(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var Dm=(e,t,r)=>e.endsWith(`
|
|
4
4
|
`)?kn(r,t):r.includes(`
|
|
5
5
|
`)?`
|
|
6
6
|
`+kn(r,t):(e.endsWith(" ")?"":" ")+r;Om.indentComment=kn;Om.lineComment=Dm;Om.stringifyComment=Tm});var Aa=y(function(_m){function $m(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return e;if(i<s)s=0;let c=Math.max(1+s,1+i-t.length);if(e.length<=c)return e;let l=[],f={},p=i-t.length;if(typeof n==="number")if(n>i-Math.max(2,s))l.push(0);else p=i-n;let d=void 0,u=void 0,m=!1,g=-1,h=-1,R=-1;if(r==="block"){if(g=Ia(e,g,t.length),g!==-1)p=g+c}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}R=g}if(w===`
|
|
7
7
|
`){if(r==="block")g=Ia(e,g,t.length);p=g+t.length+c,d=void 0}else{if(w===" "&&u&&u!==" "&&u!==`
|
|
8
8
|
`&&u!=="\t"){let k=e[g+1];if(k&&k!==" "&&k!==`
|
|
9
|
-
`&&k!=="\t")d=g}if(g>=p)if(d)l.push(d),p=d+c,d=void 0;else if(r==="quoted"){while(u===" "||u==="\t")u=w,w=e[g+=1],m=!0;let k=g>R+1?g-2:h-1;if(f[k])return e;l.push(k),f[k]=!0,p=k+c,d=void 0}else m=!0}u=w}if(m&&a)a();if(l.length===0)return e;if(o)o();let x=e.slice(0,l[0]);for(let w=0;w<l.length;++w){let k=l[w],
|
|
10
|
-
${t}${e.slice(0,
|
|
11
|
-
${t}${e.slice(k+1,
|
|
9
|
+
`&&k!=="\t")d=g}if(g>=p)if(d)l.push(d),p=d+c,d=void 0;else if(r==="quoted"){while(u===" "||u==="\t")u=w,w=e[g+=1],m=!0;let k=g>R+1?g-2:h-1;if(f[k])return e;l.push(k),f[k]=!0,p=k+c,d=void 0}else m=!0}u=w}if(m&&a)a();if(l.length===0)return e;if(o)o();let x=e.slice(0,l[0]);for(let w=0;w<l.length;++w){let k=l[w],E=l[w+1]||e.length;if(k===0)x=`
|
|
10
|
+
${t}${e.slice(0,E)}`;else{if(r==="quoted"&&f[k])x+=`${e[k]}\\`;x+=`
|
|
11
|
+
${t}${e.slice(k+1,E)}`}}return x}function Ia(e,t,r){let n=t,i=t+1,s=e[i];while(s===" "||s==="\t")if(t<i+r)s=e[++t];else{do s=e[++t];while(s&&s!==`
|
|
12
12
|
`);n=t,i=t+1,s=e[i]}return n}_m.FOLD_BLOCK="block";_m.FOLD_FLOW="flow";_m.FOLD_QUOTED="quoted";_m.foldFlowLines=$m});var ct=y(function(Gm){var X=D(),de=Aa(),tr=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),rr=(e)=>/^(%|---|\.\.\.)/m.test(e);function Um(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let s=0,o=0;s<i;++s)if(e[s]===`
|
|
13
13
|
`){if(s-o>n)return!0;if(o=s+1,i-o<=n)return!1}return!0}function at(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(rr(e)?" ":""),o="",a=0;for(let c=0,l=r[c];l;l=r[++c]){if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n")o+=r.slice(a,c)+"\\ ",c+=1,a=c,l="\\";if(l==="\\")switch(r[c+1]){case"u":{o+=r.slice(a,c);let f=r.substr(c+2,4);switch(f){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:if(f.substr(0,2)==="00")o+="\\x"+f.substr(2);else o+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(n||r[c+2]==='"'||r.length<i)c+=1;else{o+=r.slice(a,c)+`
|
|
14
14
|
|
|
15
15
|
`;while(r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"')o+=`
|
|
16
|
-
`,c+=2;if(o+=s,r[c+2]===" ")o+="\\";c+=1,a=c+1}break;default:c+=1}}return o=a?o+r.slice(a):r,n?o:de.foldFlowLines(o,s,de.FOLD_QUOTED,tr(t,!1))}function
|
|
16
|
+
`,c+=2;if(o+=s,r[c+2]===" ")o+="\\";c+=1,a=c+1}break;default:c+=1}}return o=a?o+r.slice(a):r,n?o:de.foldFlowLines(o,s,de.FOLD_QUOTED,tr(t,!1))}function En(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
17
17
|
`)||/[ \t]\n|\n[ \t]/.test(e))return at(e,t);let r=t.indent||(rr(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
18
|
-
${r}`)+"'";return t.implicitKey?n:de.foldFlowLines(n,r,de.FOLD_FLOW,tr(t,!1))}function qe(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=at;else{let i=e.includes('"'),s=e.includes("'");if(i&&!s)n=
|
|
18
|
+
${r}`)+"'";return t.implicitKey?n:de.foldFlowLines(n,r,de.FOLD_FLOW,tr(t,!1))}function qe(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=at;else{let i=e.includes('"'),s=e.includes("'");if(i&&!s)n=En;else if(s&&!i)n=at;else n=r?En:at}return n(e,t)}var vn;try{vn=new RegExp(`(^|(?<!
|
|
19
19
|
))
|
|
20
20
|
+(?!
|
|
21
|
-
|$)`,"g")}catch{
|
|
21
|
+
|$)`,"g")}catch{vn=/\n+(?!\n|$)/g}function er({comment:e,type:t,value:r},n,i,s){let{blockQuote:o,commentString:a,lineWidth:c}=n.options;if(!o||/\n[\t ]+$/.test(r))return qe(r,n);let l=n.indent||(n.forceBlockIndent||rr(r)?" ":""),f=o==="literal"?!0:o==="folded"||t===X.Scalar.BLOCK_FOLDED?!1:t===X.Scalar.BLOCK_LITERAL?!0:!Um(r,c,l.length);if(!r)return f?`|
|
|
22
22
|
`:`>
|
|
23
|
-
`;let p,d;for(d=r.length;d>0;--d){let
|
|
24
|
-
`&&
|
|
23
|
+
`;let p,d;for(d=r.length;d>0;--d){let E=r[d-1];if(E!==`
|
|
24
|
+
`&&E!=="\t"&&E!==" ")break}let u=r.substring(d),m=u.indexOf(`
|
|
25
25
|
`);if(m===-1)p="-";else if(r===u||m!==u.length-1){if(p="+",s)s()}else p="";if(u){if(r=r.slice(0,-u.length),u[u.length-1]===`
|
|
26
|
-
`)u=u.slice(0,-1);u=u.replace(
|
|
27
|
-
`)R=h;else break}let x=r.substring(0,R<h?R+1:h);if(x)r=r.substring(x.length),x=x.replace(/\n+/g,`$&${l}`);let k=(g?l?"2":"1":"")+p;if(e){if(k+=" "+a(e.replace(/ ?[\r\n]+/g," ")),i)i()}if(!f){let
|
|
28
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),I=!1,P=tr(n,!0);if(o!=="folded"&&t!==X.Scalar.BLOCK_FOLDED)P.onOverflow=()=>{I=!0};let S=de.foldFlowLines(`${x}${
|
|
26
|
+
`)u=u.slice(0,-1);u=u.replace(vn,`$&${l}`)}let g=!1,h,R=-1;for(h=0;h<r.length;++h){let E=r[h];if(E===" ")g=!0;else if(E===`
|
|
27
|
+
`)R=h;else break}let x=r.substring(0,R<h?R+1:h);if(x)r=r.substring(x.length),x=x.replace(/\n+/g,`$&${l}`);let k=(g?l?"2":"1":"")+p;if(e){if(k+=" "+a(e.replace(/ ?[\r\n]+/g," ")),i)i()}if(!f){let E=r.replace(/\n+/g,`
|
|
28
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),I=!1,P=tr(n,!0);if(o!=="folded"&&t!==X.Scalar.BLOCK_FOLDED)P.onOverflow=()=>{I=!0};let S=de.foldFlowLines(`${x}${E}${u}`,l,de.FOLD_BLOCK,P);if(!I)return`>${k}
|
|
29
29
|
${l}${S}`}return r=r.replace(/\n+/g,`$&${l}`),`|${k}
|
|
30
30
|
${l}${x}${r}${u}`}function Vm(e,t,r,n){let{type:i,value:s}=e,{actualString:o,implicitKey:a,indent:c,indentStep:l,inFlow:f}=t;if(a&&s.includes(`
|
|
31
31
|
`)||f&&/[[\]{},]/.test(s))return qe(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||f||!s.includes(`
|
|
32
32
|
`)?qe(s,t):er(e,t,r,n);if(!a&&!f&&i!==X.Scalar.PLAIN&&s.includes(`
|
|
33
33
|
`))return er(e,t,r,n);if(rr(s)){if(c==="")return t.forceBlockIndent=!0,er(e,t,r,n);else if(a&&c===l)return qe(s,t)}let p=s.replace(/\n+/g,`$&
|
|
34
|
-
${c}`);if(o){let d=(g)=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(p),{compat:u,tags:m}=t.doc.schema;if(m.some(d)||u?.some(d))return qe(s,t)}return a?p:de.foldFlowLines(p,c,de.FOLD_FLOW,tr(t,!1))}function Km(e,t,r,n){let{implicitKey:i,inFlow:s}=t,o=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==X.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value))a=X.Scalar.QUOTE_DOUBLE}let c=(f)=>{switch(f){case X.Scalar.BLOCK_FOLDED:case X.Scalar.BLOCK_LITERAL:return i||s?qe(o.value,t):er(o,t,r,n);case X.Scalar.QUOTE_DOUBLE:return at(o.value,t);case X.Scalar.QUOTE_SINGLE:return
|
|
34
|
+
${c}`);if(o){let d=(g)=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(p),{compat:u,tags:m}=t.doc.schema;if(m.some(d)||u?.some(d))return qe(s,t)}return a?p:de.foldFlowLines(p,c,de.FOLD_FLOW,tr(t,!1))}function Km(e,t,r,n){let{implicitKey:i,inFlow:s}=t,o=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==X.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value))a=X.Scalar.QUOTE_DOUBLE}let c=(f)=>{switch(f){case X.Scalar.BLOCK_FOLDED:case X.Scalar.BLOCK_LITERAL:return i||s?qe(o.value,t):er(o,t,r,n);case X.Scalar.QUOTE_DOUBLE:return at(o.value,t);case X.Scalar.QUOTE_SINGLE:return En(o.value,t);case X.Scalar.PLAIN:return Vm(o,t,r,n);default:return null}},l=c(a);if(l===null){let{defaultKeyType:f,defaultStringType:p}=t.options,d=i&&f||p;if(l=c(d),l===null)throw Error(`Unsupported default string type ${d}`)}return l}Gm.stringifyString=Km});var lt=y(function(eh){var Hm=Jt(),pe=A(),zm=ot(),Wm=ct();function Jm(e,t){let r=Object.assign({blockQuote:!0,commentString:zm.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 Qm(e,t){if(t.tag){let i=e.filter((s)=>s.tag===t.tag);if(i.length>0)return i.find((s)=>s.format===t.format)??i[0]}let r=void 0,n;if(pe.isScalar(t)){n=t.value;let i=e.filter((s)=>s.identify?.(n));if(i.length>1){let s=i.filter((o)=>o.test);if(s.length>0)i=s}r=i.find((s)=>s.format===t.format)??i.find((s)=>!s.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 Xm(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(pe.isScalar(e)||pe.isCollection(e))&&e.anchor;if(s&&Hm.anchorIsValid(s))r.add(s),i.push(`&${s}`);let o=e.tag??(t.default?null:t.tag);if(o)i.push(n.directives.tagString(o));return i.join(" ")}function Zm(e,t,r,n){if(pe.isPair(e))return e.toString(t,r,n);if(pe.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,s=pe.isNode(e)?e:t.doc.createNode(e,{onTagObj:(c)=>i=c});i??(i=Qm(t.doc.schema.tags,s));let o=Xm(s,i,t);if(o.length>0)t.indentAtStart=(t.indentAtStart??0)+o.length+1;let a=typeof i.stringify==="function"?i.stringify(s,t,r,n):pe.isScalar(s)?Wm.stringifyString(s,t,r,n):s.toString(t,r,n);if(!o)return a;return pe.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
35
35
|
${t.indent}${a}`}eh.createStringifyContext=Jm;eh.stringify=Zm});var Da=y(function(ih){var ae=A(),Pa=D(),Ta=lt(),ut=ot();function nh({key:e,value:t},r,n,i){let{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:p}}=r,d=ae.isNode(e)&&e.comment||null;if(p){if(d)throw Error("With simple keys, key nodes cannot have comments");if(ae.isCollection(e)||!ae.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let u=!p&&(!e||d&&t==null&&!r.inFlow||ae.isCollection(e)||(ae.isScalar(e)?e.type===Pa.Scalar.BLOCK_FOLDED||e.type===Pa.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!u&&(p||!s),indent:a+c});let m=!1,g=!1,h=Ta.stringify(e,r,()=>m=!0,()=>g=!0);if(!u&&!r.inFlow&&h.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");u=!0}if(r.inFlow){if(s||t==null){if(m&&n)n();return h===""?"?":u?`? ${h}`:h}}else if(s&&!p||t==null&&u){if(h=`? ${h}`,d&&!m)h+=ut.lineComment(h,r.indent,l(d));else if(g&&i)i();return h}if(m)d=null;if(u){if(d)h+=ut.lineComment(h,r.indent,l(d));h=`? ${h}
|
|
36
|
-
${a}:`}else if(h=`${h}:`,d)h+=ut.lineComment(h,r.indent,l(d));let R,x,w;if(ae.isNode(t))R=!!t.spaceBefore,x=t.commentBefore,w=t.comment;else if(R=!1,x=null,w=null,t&&typeof t==="object")t=o.createNode(t);if(r.implicitKey=!1,!u&&!d&&ae.isScalar(t))r.indentAtStart=h.length+1;if(g=!1,!f&&c.length>=2&&!r.inFlow&&!u&&ae.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)r.indent=r.indent.substring(2);let k=!1,
|
|
36
|
+
${a}:`}else if(h=`${h}:`,d)h+=ut.lineComment(h,r.indent,l(d));let R,x,w;if(ae.isNode(t))R=!!t.spaceBefore,x=t.commentBefore,w=t.comment;else if(R=!1,x=null,w=null,t&&typeof t==="object")t=o.createNode(t);if(r.implicitKey=!1,!u&&!d&&ae.isScalar(t))r.indentAtStart=h.length+1;if(g=!1,!f&&c.length>=2&&!r.inFlow&&!u&&ae.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)r.indent=r.indent.substring(2);let k=!1,E=Ta.stringify(t,r,()=>k=!0,()=>g=!0),I=" ";if(d||R||x){if(I=R?`
|
|
37
37
|
`:"",x){let P=l(x);I+=`
|
|
38
|
-
${ut.indentComment(P,r.indent)}`}if(
|
|
38
|
+
${ut.indentComment(P,r.indent)}`}if(E===""&&!r.inFlow){if(I===`
|
|
39
39
|
`&&w)I=`
|
|
40
40
|
|
|
41
41
|
`}else I+=`
|
|
42
|
-
${r.indent}`}else if(!u&&ae.isCollection(t)){let P=
|
|
43
|
-
`),O=S!==-1,ce=r.inFlow??t.flow??t.items.length===0;if(O||!ce){let Pe=!1;if(O&&(P==="&"||P==="!")){let N=
|
|
44
|
-
${r.indent}`}}else if(
|
|
45
|
-
`)I="";if(h+=I+
|
|
42
|
+
${r.indent}`}else if(!u&&ae.isCollection(t)){let P=E[0],S=E.indexOf(`
|
|
43
|
+
`),O=S!==-1,ce=r.inFlow??t.flow??t.items.length===0;if(O||!ce){let Pe=!1;if(O&&(P==="&"||P==="!")){let N=E.indexOf(" ");if(P==="&"&&N!==-1&&N<S&&E[N+1]==="!")N=E.indexOf(" ",N+1);if(N===-1||S<N)Pe=!0}if(!Pe)I=`
|
|
44
|
+
${r.indent}`}}else if(E===""||E[0]===`
|
|
45
|
+
`)I="";if(h+=I+E,r.inFlow){if(k&&n)n()}else if(w&&!k)h+=ut.lineComment(h,r.indent,l(w));else if(g&&i)i();return h}ih.stringifyPair=nh});var In=y(function(ch){var Oa=Pt("process");function oh(e,...t){if(e==="debug")console.log(...t)}function ah(e,t){if(e==="debug"||e==="warn")if(typeof Oa.emitWarning==="function")Oa.emitWarning(t);else console.warn(t)}ch.debug=oh;ch.warn=ah});var or=y(function(ph){var sr=A(),Na=D(),nr="<<",ir={identify:(e)=>e===nr||typeof e==="symbol"&&e.description===nr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Na.Scalar(Symbol(nr)),{addToJSMap:La}),stringify:()=>nr},dh=(e,t)=>(ir.identify(t)||sr.isScalar(t)&&(!t.type||t.type===Na.Scalar.PLAIN)&&ir.identify(t.value))&&e?.doc.schema.tags.some((r)=>r.tag===ir.tag&&r.default);function La(e,t,r){let n=Ma(e,r);if(sr.isSeq(n))for(let i of n.items)An(e,t,i);else if(Array.isArray(n))for(let i of n)An(e,t,i);else An(e,t,n)}function An(e,t,r){let n=Ma(e,r);if(!sr.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[s,o]of i)if(t instanceof Map){if(!t.has(s))t.set(s,o)}else if(t instanceof Set)t.add(s);else if(!Object.prototype.hasOwnProperty.call(t,s))Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function Ma(e,t){return e&&sr.isAlias(t)?t.resolve(e.doc,e):t}ph.addMergeToJSMap=La;ph.isMergeKey=dh;ph.merge=ir});var Tn=y(function(Rh){var hh=In(),$a=or(),yh=lt(),_a=A(),Pn=ue();function bh(e,t,{key:r,value:n}){if(_a.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if($a.isMergeKey(e,r))$a.addMergeToJSMap(e,t,n);else{let i=Pn.toJS(r,"",e);if(t instanceof Map)t.set(i,Pn.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let s=Ch(r,i,e),o=Pn.toJS(n,s,e);if(s in t)Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0});else t[s]=o}}return t}function Ch(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(_a.isNode(e)&&r?.doc){let n=yh.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);if(s.length>40)s=s.substring(0,36)+'..."';hh.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}Rh.addPairToJSMap=bh});var fe=y(function(Eh){var qa=st(),xh=Da(),wh=Tn(),ar=A();function kh(e,t,r){let n=qa.createNode(e,void 0,r),i=qa.createNode(t,void 0,r);return new cr(n,i)}class cr{constructor(e,t=null){Object.defineProperty(this,ar.NODE_TYPE,{value:ar.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;if(ar.isNode(t))t=t.clone(e);if(ar.isNode(r))r=r.clone(e);return new cr(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return wh.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?xh.stringifyPair(this,e,t,r):JSON.stringify(this)}}Eh.Pair=cr;Eh.createPair=kh});var Dn=y(function(Dh){var we=A(),Fa=lt(),lr=ot();function Ah(e,t,r){return(t.inFlow??e.flow?Th:Ph)(e,t,r)}function Ph({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:c,options:{commentString:l}}=r,f=Object.assign({},r,{indent:s,type:null}),p=!1,d=[];for(let m=0;m<t.length;++m){let g=t[m],h=null;if(we.isNode(g)){if(!p&&g.spaceBefore)d.push("");if(ur(r,d,g.commentBefore,p),g.comment)h=g.comment}else if(we.isPair(g)){let x=we.isNode(g.key)?g.key:null;if(x){if(!p&&x.spaceBefore)d.push("");ur(r,d,x.commentBefore,p)}}p=!1;let R=Fa.stringify(g,f,()=>h=null,()=>p=!0);if(h)R+=lr.lineComment(R,s,l(h));if(p&&h)p=!1;d.push(n+R)}let u;if(d.length===0)u=i.start+i.end;else{u=d[0];for(let m=1;m<d.length;++m){let g=d[m];u+=g?`
|
|
46
46
|
${c}${g}`:`
|
|
47
47
|
`}}if(e){if(u+=`
|
|
48
48
|
`+lr.indentComment(l(e),c),a)a()}else if(p&&o)o();return u}function Th({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=t;n+=s;let c=Object.assign({},t,{indent:n,inFlow:!0,type:null}),l=!1,f=0,p=[];for(let m=0;m<e.length;++m){let g=e[m],h=null;if(we.isNode(g)){if(g.spaceBefore)p.push("");if(ur(t,p,g.commentBefore,!1),g.comment)h=g.comment}else if(we.isPair(g)){let x=we.isNode(g.key)?g.key:null;if(x){if(x.spaceBefore)p.push("");if(ur(t,p,x.commentBefore,!1),x.comment)l=!0}let w=we.isNode(g.value)?g.value:null;if(w){if(w.comment)h=w.comment;if(w.commentBefore)l=!0}else if(g.value==null&&x?.comment)h=x.comment}if(h)l=!0;let R=Fa.stringify(g,c,()=>h=null);if(l||(l=p.length>f||R.includes(`
|
|
@@ -52,22 +52,22 @@ ${s}${i}${g}`:`
|
|
|
52
52
|
${i}${u}`}else return`${d}${o}${p.join(" ")}${o}${u}`}}function ur({indent:e,options:{commentString:t}},r,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let s=lr.indentComment(t(n),e);r.push(s.trimStart())}}Dh.stringifyCollection=Ah});var me=y(function(_h){var Nh=Dn(),Lh=Tn(),Mh=Zt(),ge=A(),dr=fe(),$h=D();function dt(e,t){let r=ge.isScalar(t)?t.value:t;for(let n of e)if(ge.isPair(n)){if(n.key===t||n.key===r)return n;if(ge.isScalar(n.key)&&n.key.value===r)return n}return}class Ba extends Mh.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ge.MAP,e);this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:i}=r,s=new this(e),o=(a,c)=>{if(typeof i==="function")c=i.call(t,a,c);else if(Array.isArray(i)&&!i.includes(a))return;if(c!==void 0||n)s.items.push(dr.createPair(a,c,r))};if(t instanceof Map)for(let[a,c]of t)o(a,c);else if(t&&typeof t==="object")for(let a of Object.keys(t))o(a,t[a]);if(typeof e.sortMapEntries==="function")s.items.sort(e.sortMapEntries);return s}add(e,t){let r;if(ge.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e))r=new dr.Pair(e,e?.value);else r=new dr.Pair(e.key,e.value);let n=dt(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);if(ge.isScalar(n.value)&&$h.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(i){let s=this.items.findIndex((o)=>i(r,o)<0);if(s===-1)this.items.push(r);else this.items.splice(s,0,r)}else this.items.push(r)}delete(e){let t=dt(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=dt(this.items,e)?.value;return(!t&&ge.isScalar(n)?n.value:n)??void 0}has(e){return!!dt(this.items,e)}set(e,t){this.add(new dr.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)Lh.addPairToJSMap(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!ge.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 Nh.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}_h.YAMLMap=Ba;_h.findPair=dt});var Fe=y(function(Uh){var Bh=A(),ja=me(),jh={collection:"map",default:!0,nodeClass:ja.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Bh.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>ja.YAMLMap.from(e,t,r)};Uh.map=jh});var he=y(function(Wh){var Kh=st(),Gh=Dn(),Yh=Zt(),fr=A(),Hh=D(),zh=ue();class Ua extends Yh.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(fr.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=pr(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let r=pr(e);if(typeof r!=="number")return;let n=this.items[r];return!t&&fr.isScalar(n)?n.value:n}has(e){let t=pr(e);return typeof t==="number"&&t<this.items.length}set(e,t){let r=pr(e);if(typeof r!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[r];if(fr.isScalar(n)&&Hh.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(zh.toJS(i,String(n++),t));return r}toString(e,t,r){if(!e)return JSON.stringify(this);return Gh.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 s=0;for(let o of t){if(typeof n==="function"){let a=t instanceof Set?o:String(s++);o=n.call(t,a,o)}i.items.push(Kh.createNode(o,void 0,r))}}return i}}function pr(e){let t=fr.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Wh.YAMLSeq=Ua});var Be=y(function(Zh){var Qh=A(),Va=he(),Xh={collection:"seq",default:!0,nodeClass:Va.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!Qh.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>Va.YAMLSeq.from(e,t,r)};Zh.seq=Xh});var pt=y(function(ny){var ty=ct(),ry={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),ty.stringifyString(e,t,r,n)}};ny.string=ry});var gr=y(function(sy){var Ka=D(),Ga={identify:(e)=>e==null,createNode:()=>new Ka.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ka.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&Ga.test.test(e)?e:t.options.nullStr};sy.nullTag=Ga});var On=y(function(cy){var ay=D(),Ya={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new ay.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Ya.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};cy.boolTag=Ya});var je=y(function(dy){function uy({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 s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let o=s.indexOf(".");if(o<0)o=s.length,s+=".";let a=t-(s.length-o-1);while(a-- >0)s+="0"}return s}dy.stringifyNumber=uy});var Ln=y(function(yy){var fy=D(),Nn=je(),gy={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:Nn.stringifyNumber},my={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():Nn.stringifyNumber(e)}},hy={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 fy.Scalar(parseFloat(e)),r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:Nn.stringifyNumber};yy.float=hy;yy.floatExp=my;yy.floatNaN=gy});var $n=y(function(ky){var Ha=je(),mr=(e)=>typeof e==="bigint"||Number.isInteger(e),Mn=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function za(e,t,r){let{value:n}=e;if(mr(n)&&n>=0)return r+n.toString(t);return Ha.stringifyNumber(e)}var Sy={identify:(e)=>mr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Mn(e,2,8,r),stringify:(e)=>za(e,8,"0o")},xy={identify:mr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Mn(e,0,10,r),stringify:Ha.stringifyNumber},wy={identify:(e)=>mr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Mn(e,2,16,r),stringify:(e)=>za(e,16,"0x")};ky.int=xy;ky.intHex=wy;ky.intOct=Sy});var Wa=y(function(Ly){var Ay=Fe(),Py=gr(),Ty=Be(),Dy=pt(),Oy=On(),_n=Ln(),qn=$n(),Ny=[Ay.map,Ty.seq,Dy.string,Py.nullTag,Oy.boolTag,qn.intOct,qn.int,qn.intHex,_n.floatNaN,_n.floatExp,_n.float];Ly.schema=Ny});var Qa=y(function(Uy){var $y=D(),_y=Fe(),qy=Be();function Ja(e){return typeof e==="bigint"||Number.isInteger(e)}var hr=({value:e})=>JSON.stringify(e),Fy=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:hr},{identify:(e)=>e==null,createNode:()=>new $y.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:hr},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:hr},{identify:Ja,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})=>Ja(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:hr}],By={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},jy=[_y.map,qy.seq].concat(Fy,By);Uy.schema=jy});var Bn=y(function(Yy){var ft=Pt("buffer"),Fn=D(),Ky=ct(),Gy={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof ft.Buffer==="function")return ft.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,s){if(!r)return"";let o=r,a;if(typeof ft.Buffer==="function")a=o instanceof ft.Buffer?o.toString("base64"):ft.Buffer.from(o.buffer).toString("base64");else if(typeof btoa==="function"){let c="";for(let l=0;l<o.length;++l)c+=String.fromCharCode(o[l]);a=btoa(c)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Fn.Scalar.BLOCK_LITERAL),t!==Fn.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),l=Math.ceil(a.length/c),f=Array(l);for(let p=0,d=0;p<l;++p,d+=c)f[p]=a.substr(d,c);a=f.join(t===Fn.Scalar.BLOCK_LITERAL?`
|
|
53
53
|
`:" ")}return Ky.stringifyString({comment:e,type:t,value:a},n,i,s)}};Yy.binary=Gy});var br=y(function(Qy){var yr=A(),jn=fe(),zy=D(),Wy=he();function Xa(e,t){if(yr.isSeq(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(yr.isPair(n))continue;else if(yr.isMap(n)){if(n.items.length>1)t("Each pair must have its own sequence indicator");let i=n.items[0]||new jn.Pair(new zy.Scalar(null));if(n.commentBefore)i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
|
|
54
54
|
${i.key.commentBefore}`:n.commentBefore;if(n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment}
|
|
55
|
-
${s.comment}`:n.comment}n=i}e.items[r]=yr.isPair(n)?n:new jn.Pair(n)}else t("Expected a sequence for this tag");return e}function Za(e,t,r){let{replacer:n}=r,i=new Wy.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,String(s++),o);let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)a=l[0],c=o[a];else throw TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=o;i.items.push(jn.createPair(a,c,r))}return i}var Jy={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Xa,createNode:Za};Qy.createPairs=Za;Qy.pairs=Jy;Qy.resolvePairs=Xa});var Vn=y(function(nb){var ec=A(),Un=ue(),gt=me(),tb=he(),tc=br();class ke extends tb.YAMLSeq{constructor(){super();this.add=gt.YAMLMap.prototype.add.bind(this),this.delete=gt.YAMLMap.prototype.delete.bind(this),this.get=gt.YAMLMap.prototype.get.bind(this),this.has=gt.YAMLMap.prototype.has.bind(this),this.set=gt.YAMLMap.prototype.set.bind(this),this.tag=ke.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,s;if(ec.isPair(n))i=Un.toJS(n.key,"",t),s=Un.toJS(n.value,i,t);else i=Un.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,s)}return r}static from(e,t,r){let n=tc.createPairs(e,t,r),i=new this;return i.items=n.items,i}}ke.tag="tag:yaml.org,2002:omap";var rb={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ke,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=tc.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(ec.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 ke,r)},createNode:(e,t,r)=>ke.from(e,t,r)};nb.YAMLOMap=ke;nb.omap=rb});var oc=y(function(ob){var rc=D();function nc({value:e,source:t},r){if(t&&(e?ic:sc).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var ic={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 rc.Scalar(!0),stringify:nc},sc={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 rc.Scalar(!1),stringify:nc};ob.falseTag=sc;ob.trueTag=ic});var ac=y(function(fb){var lb=D(),Kn=je(),ub={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:Kn.stringifyNumber},db={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():Kn.stringifyNumber(e)}},pb={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 lb.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:Kn.stringifyNumber};fb.float=pb;fb.floatExp=db;fb.floatNaN=ub});var lc=y(function(Sb){var cc=je(),mt=(e)=>typeof e==="bigint"||Number.isInteger(e);function Cr(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 o=BigInt(e);return i==="-"?BigInt(-1)*o:o}let s=parseInt(e,r);return i==="-"?-1*s:s}function Gn(e,t,r){let{value:n}=e;if(mt(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return cc.stringifyNumber(e)}var yb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Cr(e,2,2,r),stringify:(e)=>Gn(e,2,"0b")},bb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Cr(e,1,8,r),stringify:(e)=>Gn(e,8,"0")},Cb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Cr(e,0,10,r),stringify:cc.stringifyNumber},Rb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Cr(e,2,16,r),stringify:(e)=>Gn(e,16,"0x")};Sb.int=Cb;Sb.intBin=yb;Sb.intHex=Rb;Sb.intOct=bb});var Yn=y(function(Ib){var xr=A(),Rr=fe(),Sr=me();class ve extends Sr.YAMLMap{constructor(e){super(e);this.tag=ve.tag}add(e){let t;if(xr.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new Rr.Pair(e.key,null);else t=new Rr.Pair(e,null);if(!Sr.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Sr.findPair(this.items,e);return!t&&xr.isPair(r)?xr.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=Sr.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Rr.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 s of t){if(typeof n==="function")s=n.call(t,s,s);i.items.push(Rr.createPair(s,null,r))}return i}}ve.tag="tag:yaml.org,2002:set";var Eb={collection:"map",identify:(e)=>e instanceof Set,nodeClass:ve,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>ve.from(e,t,r),resolve(e,t){if(xr.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new ve,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};Ib.YAMLSet=ve;Ib.set=Eb});var zn=y(function(Nb){var Tb=je();function Hn(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(o)=>t?BigInt(o):Number(o),s=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return r==="-"?i(-1)*s:s}function uc(e){let{value:t}=e,r=(o)=>o;if(typeof t==="bigint")r=(o)=>BigInt(o);else if(isNaN(t)||!isFinite(t))return Tb.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),s=[t%i];if(t<60)s.unshift(0);else if(t=(t-s[0])/i,s.unshift(t%i),t>=60)t=(t-s[0])/i,s.unshift(t);return n+s.map((o)=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Db={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})=>Hn(e,r),stringify:uc},Ob={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)=>Hn(e,!1),stringify:uc},dc={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(dc.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,s,o,a]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,l=Date.UTC(r,n-1,i,s||0,o||0,a||0,c),f=t[8];if(f&&f!=="Z"){let p=Hn(f,!1);if(Math.abs(p)<30)p*=60;l-=60000*p}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Nb.floatTime=Ob;Nb.intTime=Db;Nb.timestamp=dc});var fc=y(function(Hb){var _b=Fe(),qb=gr(),Fb=Be(),Bb=pt(),jb=Bn(),pc=oc(),Wn=ac(),wr=lc(),Ub=or(),Vb=Vn(),Kb=br(),Gb=Yn(),Jn=zn(),Yb=[_b.map,Fb.seq,Bb.string,qb.nullTag,pc.trueTag,pc.falseTag,wr.intBin,wr.intOct,wr.int,wr.intHex,Wn.floatNaN,Wn.floatExp,Wn.float,jb.binary,Ub.merge,Vb.omap,Kb.pairs,Gb.set,Jn.intTime,Jn.floatTime,Jn.timestamp];Hb.schema=Yb});var wc=y(function(rC){var yc=Fe(),Wb=gr(),bc=Be(),Jb=pt(),Qb=On(),Qn=Ln(),Xn=$n(),Xb=Wa(),Zb=Qa(),Cc=Bn(),ht=or(),Rc=Vn(),Sc=br(),gc=fc(),xc=Yn(),kr=zn(),mc=new Map([["core",Xb.schema],["failsafe",[yc.map,bc.seq,Jb.string]],["json",Zb.schema],["yaml11",gc.schema],["yaml-1.1",gc.schema]]),hc={binary:Cc.binary,bool:Qb.boolTag,float:Qn.float,floatExp:Qn.floatExp,floatNaN:Qn.floatNaN,floatTime:kr.floatTime,int:Xn.int,intHex:Xn.intHex,intOct:Xn.intOct,intTime:kr.intTime,map:yc.map,merge:ht.merge,null:Wb.nullTag,omap:Rc.omap,pairs:Sc.pairs,seq:bc.seq,set:xc.set,timestamp:kr.timestamp},eC={"tag:yaml.org,2002:binary":Cc.binary,"tag:yaml.org,2002:merge":ht.merge,"tag:yaml.org,2002:omap":Rc.omap,"tag:yaml.org,2002:pairs":Sc.pairs,"tag:yaml.org,2002:set":xc.set,"tag:yaml.org,2002:timestamp":kr.timestamp};function tC(e,t,r){let n=mc.get(t);if(n&&!e)return r&&!n.includes(ht.merge)?n.concat(ht.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let s=Array.from(mc.keys()).filter((o)=>o!=="yaml11").map((o)=>JSON.stringify(o)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(let s of e)i=i.concat(s);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(ht.merge);return i.reduce((s,o)=>{let a=typeof o==="string"?hc[o]:o;if(!a){let c=JSON.stringify(o),l=Object.keys(hc).map((f)=>JSON.stringify(f)).join(", ");throw Error(`Unknown custom tag ${c}; use one of ${l}`)}if(!s.includes(a))s.push(a);return s},[])}rC.coreKnownTags=eC;rC.getTags=tC});var ti=y(function(lC){var Zn=A(),sC=Fe(),oC=Be(),aC=pt(),vr=wc(),cC=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class ei{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(e)?vr.getTags(e,"compat"):e?vr.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?vr.coreKnownTags:{},this.tags=vr.getTags(t,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Zn.MAP,{value:sC.map}),Object.defineProperty(this,Zn.SCALAR,{value:aC.string}),Object.defineProperty(this,Zn.SEQ,{value:oC.seq}),this.sortMapEntries=typeof s==="function"?s:s===!0?cC:null}clone(){let e=Object.create(ei.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}lC.Schema=ei});var kc=y(function(fC){var dC=A(),ri=lt(),yt=ot();function pC(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);if(c)r.push(c),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=ri.createStringifyContext(e,t),{commentString:s}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let c=s(e.commentBefore);r.unshift(yt.indentComment(c,""))}let o=!1,a=null;if(e.contents){if(dC.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let f=s(e.contents.commentBefore);r.push(yt.indentComment(f,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let c=a?void 0:()=>o=!0,l=ri.stringify(e.contents,i,()=>a=null,c);if(a)l+=yt.lineComment(l,"",s(a));if((l[0]==="|"||l[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${l}`;else r.push(l)}else r.push(ri.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let c=s(e.comment);if(c.includes(`
|
|
55
|
+
${s.comment}`:n.comment}n=i}e.items[r]=yr.isPair(n)?n:new jn.Pair(n)}else t("Expected a sequence for this tag");return e}function Za(e,t,r){let{replacer:n}=r,i=new Wy.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,String(s++),o);let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)a=l[0],c=o[a];else throw TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=o;i.items.push(jn.createPair(a,c,r))}return i}var Jy={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Xa,createNode:Za};Qy.createPairs=Za;Qy.pairs=Jy;Qy.resolvePairs=Xa});var Vn=y(function(nb){var ec=A(),Un=ue(),gt=me(),tb=he(),tc=br();class ke extends tb.YAMLSeq{constructor(){super();this.add=gt.YAMLMap.prototype.add.bind(this),this.delete=gt.YAMLMap.prototype.delete.bind(this),this.get=gt.YAMLMap.prototype.get.bind(this),this.has=gt.YAMLMap.prototype.has.bind(this),this.set=gt.YAMLMap.prototype.set.bind(this),this.tag=ke.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,s;if(ec.isPair(n))i=Un.toJS(n.key,"",t),s=Un.toJS(n.value,i,t);else i=Un.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,s)}return r}static from(e,t,r){let n=tc.createPairs(e,t,r),i=new this;return i.items=n.items,i}}ke.tag="tag:yaml.org,2002:omap";var rb={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ke,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=tc.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(ec.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 ke,r)},createNode:(e,t,r)=>ke.from(e,t,r)};nb.YAMLOMap=ke;nb.omap=rb});var oc=y(function(ob){var rc=D();function nc({value:e,source:t},r){if(t&&(e?ic:sc).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var ic={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 rc.Scalar(!0),stringify:nc},sc={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 rc.Scalar(!1),stringify:nc};ob.falseTag=sc;ob.trueTag=ic});var ac=y(function(fb){var lb=D(),Kn=je(),ub={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:Kn.stringifyNumber},db={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():Kn.stringifyNumber(e)}},pb={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 lb.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:Kn.stringifyNumber};fb.float=pb;fb.floatExp=db;fb.floatNaN=ub});var lc=y(function(Sb){var cc=je(),mt=(e)=>typeof e==="bigint"||Number.isInteger(e);function Cr(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 o=BigInt(e);return i==="-"?BigInt(-1)*o:o}let s=parseInt(e,r);return i==="-"?-1*s:s}function Gn(e,t,r){let{value:n}=e;if(mt(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return cc.stringifyNumber(e)}var yb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Cr(e,2,2,r),stringify:(e)=>Gn(e,2,"0b")},bb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Cr(e,1,8,r),stringify:(e)=>Gn(e,8,"0")},Cb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Cr(e,0,10,r),stringify:cc.stringifyNumber},Rb={identify:mt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Cr(e,2,16,r),stringify:(e)=>Gn(e,16,"0x")};Sb.int=Cb;Sb.intBin=yb;Sb.intHex=Rb;Sb.intOct=bb});var Yn=y(function(Ib){var xr=A(),Rr=fe(),Sr=me();class Ee extends Sr.YAMLMap{constructor(e){super(e);this.tag=Ee.tag}add(e){let t;if(xr.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new Rr.Pair(e.key,null);else t=new Rr.Pair(e,null);if(!Sr.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Sr.findPair(this.items,e);return!t&&xr.isPair(r)?xr.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=Sr.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Rr.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 s of t){if(typeof n==="function")s=n.call(t,s,s);i.items.push(Rr.createPair(s,null,r))}return i}}Ee.tag="tag:yaml.org,2002:set";var vb={collection:"map",identify:(e)=>e instanceof Set,nodeClass:Ee,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>Ee.from(e,t,r),resolve(e,t){if(xr.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new Ee,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};Ib.YAMLSet=Ee;Ib.set=vb});var zn=y(function(Nb){var Tb=je();function Hn(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(o)=>t?BigInt(o):Number(o),s=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return r==="-"?i(-1)*s:s}function uc(e){let{value:t}=e,r=(o)=>o;if(typeof t==="bigint")r=(o)=>BigInt(o);else if(isNaN(t)||!isFinite(t))return Tb.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),s=[t%i];if(t<60)s.unshift(0);else if(t=(t-s[0])/i,s.unshift(t%i),t>=60)t=(t-s[0])/i,s.unshift(t);return n+s.map((o)=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Db={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})=>Hn(e,r),stringify:uc},Ob={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)=>Hn(e,!1),stringify:uc},dc={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(dc.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,s,o,a]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,l=Date.UTC(r,n-1,i,s||0,o||0,a||0,c),f=t[8];if(f&&f!=="Z"){let p=Hn(f,!1);if(Math.abs(p)<30)p*=60;l-=60000*p}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Nb.floatTime=Ob;Nb.intTime=Db;Nb.timestamp=dc});var fc=y(function(Hb){var _b=Fe(),qb=gr(),Fb=Be(),Bb=pt(),jb=Bn(),pc=oc(),Wn=ac(),wr=lc(),Ub=or(),Vb=Vn(),Kb=br(),Gb=Yn(),Jn=zn(),Yb=[_b.map,Fb.seq,Bb.string,qb.nullTag,pc.trueTag,pc.falseTag,wr.intBin,wr.intOct,wr.int,wr.intHex,Wn.floatNaN,Wn.floatExp,Wn.float,jb.binary,Ub.merge,Vb.omap,Kb.pairs,Gb.set,Jn.intTime,Jn.floatTime,Jn.timestamp];Hb.schema=Yb});var wc=y(function(rC){var yc=Fe(),Wb=gr(),bc=Be(),Jb=pt(),Qb=On(),Qn=Ln(),Xn=$n(),Xb=Wa(),Zb=Qa(),Cc=Bn(),ht=or(),Rc=Vn(),Sc=br(),gc=fc(),xc=Yn(),kr=zn(),mc=new Map([["core",Xb.schema],["failsafe",[yc.map,bc.seq,Jb.string]],["json",Zb.schema],["yaml11",gc.schema],["yaml-1.1",gc.schema]]),hc={binary:Cc.binary,bool:Qb.boolTag,float:Qn.float,floatExp:Qn.floatExp,floatNaN:Qn.floatNaN,floatTime:kr.floatTime,int:Xn.int,intHex:Xn.intHex,intOct:Xn.intOct,intTime:kr.intTime,map:yc.map,merge:ht.merge,null:Wb.nullTag,omap:Rc.omap,pairs:Sc.pairs,seq:bc.seq,set:xc.set,timestamp:kr.timestamp},eC={"tag:yaml.org,2002:binary":Cc.binary,"tag:yaml.org,2002:merge":ht.merge,"tag:yaml.org,2002:omap":Rc.omap,"tag:yaml.org,2002:pairs":Sc.pairs,"tag:yaml.org,2002:set":xc.set,"tag:yaml.org,2002:timestamp":kr.timestamp};function tC(e,t,r){let n=mc.get(t);if(n&&!e)return r&&!n.includes(ht.merge)?n.concat(ht.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let s=Array.from(mc.keys()).filter((o)=>o!=="yaml11").map((o)=>JSON.stringify(o)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(let s of e)i=i.concat(s);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(ht.merge);return i.reduce((s,o)=>{let a=typeof o==="string"?hc[o]:o;if(!a){let c=JSON.stringify(o),l=Object.keys(hc).map((f)=>JSON.stringify(f)).join(", ");throw Error(`Unknown custom tag ${c}; use one of ${l}`)}if(!s.includes(a))s.push(a);return s},[])}rC.coreKnownTags=eC;rC.getTags=tC});var ti=y(function(lC){var Zn=A(),sC=Fe(),oC=Be(),aC=pt(),Er=wc(),cC=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class ei{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(e)?Er.getTags(e,"compat"):e?Er.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?Er.coreKnownTags:{},this.tags=Er.getTags(t,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Zn.MAP,{value:sC.map}),Object.defineProperty(this,Zn.SCALAR,{value:aC.string}),Object.defineProperty(this,Zn.SEQ,{value:oC.seq}),this.sortMapEntries=typeof s==="function"?s:s===!0?cC:null}clone(){let e=Object.create(ei.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}lC.Schema=ei});var kc=y(function(fC){var dC=A(),ri=lt(),yt=ot();function pC(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);if(c)r.push(c),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=ri.createStringifyContext(e,t),{commentString:s}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let c=s(e.commentBefore);r.unshift(yt.indentComment(c,""))}let o=!1,a=null;if(e.contents){if(dC.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let f=s(e.contents.commentBefore);r.push(yt.indentComment(f,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let c=a?void 0:()=>o=!0,l=ri.stringify(e.contents,i,()=>a=null,c);if(a)l+=yt.lineComment(l,"",s(a));if((l[0]==="|"||l[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${l}`;else r.push(l)}else r.push(ri.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let c=s(e.comment);if(c.includes(`
|
|
56
56
|
`))r.push("..."),r.push(yt.indentComment(c,""));else r.push(`... ${c}`)}else r.push("...");else{let c=e.comment;if(c&&o)c=c.replace(/^\n+/,"");if(c){if((!o||a)&&r[r.length-1]!=="")r.push("");r.push(yt.indentComment(s(c),""))}}return r.join(`
|
|
57
57
|
`)+`
|
|
58
|
-
`}fC.stringifyDocument=pC});var bt=y(function(xC){var mC=it(),Ue=Zt(),W=A(),hC=fe(),yC=ue(),bC=ti(),CC=kc(),ni=Jt(),RC=xn(),SC=st(),ii=Sn();class si{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,W.NODE_TYPE,{value:W.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:s}=i;if(r?._directives){if(this.directives=r._directives.atDocument(),this.directives.yaml.explicit)s=this.directives.yaml.version}else this.directives=new ii.Directives({version:s});this.setSchema(s,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(si.prototype,{[W.NODE_TYPE]:{value:W.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=W.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(Ve(this.contents))this.contents.add(e)}addIn(e,t){if(Ve(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=ni.anchorNames(this);e.anchor=!t||r.has(t)?ni.findNewAnchor(t||"a",r):t}return new mC.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=(R)=>typeof R==="number"||R instanceof String||R 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:s,flow:o,keepUndefined:a,onTagObj:c,tag:l}=r??{},{onAnchor:f,setAnchors:p,sourceObjects:d}=ni.createNodeAnchors(this,s||"a"),u={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:d},m=SC.createNode(e,l,u);if(o&&W.isCollection(m))m.flow=!0;return p(),m}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new hC.Pair(n,i)}delete(e){return Ve(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(Ue.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return Ve(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return W.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(Ue.isEmptyPath(e))return!t&&W.isScalar(this.contents)?this.contents.value:this.contents;return W.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return W.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(Ue.isEmptyPath(e))return this.contents!==void 0;return W.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=Ue.collectionFromPath(this.schema,[e],t);else if(Ve(this.contents))this.contents.set(e,t)}setIn(e,t){if(Ue.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=Ue.collectionFromPath(this.schema,Array.from(e),t);else if(Ve(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 ii.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 ii.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 bC.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:s}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},a=yC.toJS(this.contents,t??"",o);if(typeof i==="function")for(let{count:c,res:l}of o.anchors.values())i(l,c);return typeof s==="function"?RC.applyReviver(s,{"":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 CC.stringifyDocument(this,e)}}function Ve(e){if(W.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}xC.Document=si});var Ct=y(function(
|
|
58
|
+
`}fC.stringifyDocument=pC});var bt=y(function(xC){var mC=it(),Ue=Zt(),W=A(),hC=fe(),yC=ue(),bC=ti(),CC=kc(),ni=Jt(),RC=xn(),SC=st(),ii=Sn();class si{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,W.NODE_TYPE,{value:W.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:s}=i;if(r?._directives){if(this.directives=r._directives.atDocument(),this.directives.yaml.explicit)s=this.directives.yaml.version}else this.directives=new ii.Directives({version:s});this.setSchema(s,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(si.prototype,{[W.NODE_TYPE]:{value:W.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=W.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(Ve(this.contents))this.contents.add(e)}addIn(e,t){if(Ve(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=ni.anchorNames(this);e.anchor=!t||r.has(t)?ni.findNewAnchor(t||"a",r):t}return new mC.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=(R)=>typeof R==="number"||R instanceof String||R 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:s,flow:o,keepUndefined:a,onTagObj:c,tag:l}=r??{},{onAnchor:f,setAnchors:p,sourceObjects:d}=ni.createNodeAnchors(this,s||"a"),u={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:d},m=SC.createNode(e,l,u);if(o&&W.isCollection(m))m.flow=!0;return p(),m}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new hC.Pair(n,i)}delete(e){return Ve(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(Ue.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return Ve(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return W.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(Ue.isEmptyPath(e))return!t&&W.isScalar(this.contents)?this.contents.value:this.contents;return W.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return W.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(Ue.isEmptyPath(e))return this.contents!==void 0;return W.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=Ue.collectionFromPath(this.schema,[e],t);else if(Ve(this.contents))this.contents.set(e,t)}setIn(e,t){if(Ue.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=Ue.collectionFromPath(this.schema,Array.from(e),t);else if(Ve(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 ii.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 ii.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 bC.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:s}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},a=yC.toJS(this.contents,t??"",o);if(typeof i==="function")for(let{count:c,res:l}of o.anchors.values())i(l,c);return typeof s==="function"?RC.applyReviver(s,{"":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 CC.stringifyDocument(this,e)}}function Ve(e){if(W.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}xC.Document=si});var Ct=y(function(EC){class vr extends Error{constructor(e,t,r,n){super();this.name=e,this.code=r,this.message=n,this.pos=t}}class Ec extends vr{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class vc extends vr{constructor(e,t,r){super("YAMLWarning",e,t,r)}}var kC=(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 s=i-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="\u2026"+o.substring(a),s-=a-1}if(o.length>80)o=o.substring(0,79)+"\u2026";if(n>1&&/^ *$/.test(o.substring(0,s))){let a=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
|
|
59
59
|
`;o=a+o}if(/[^ ]/.test(o)){let a=1,c=r.linePos[1];if(c?.line===n&&c.col>i)a=Math.max(1,Math.min(c.col-i,80-s));let l=" ".repeat(s)+"^".repeat(a);r.message+=`:
|
|
60
60
|
|
|
61
61
|
${o}
|
|
62
62
|
${l}
|
|
63
|
-
`}};
|
|
63
|
+
`}};EC.YAMLError=vr;EC.YAMLParseError=Ec;EC.YAMLWarning=vc;EC.prettifyError=kC});var Rt=y(function(DC){function TC(e,{flow:t,indicator:r,next:n,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let c=!1,l=a,f=a,p="",d="",u=!1,m=!1,g=null,h=null,R=null,x=null,w=null,k=null,E=null;for(let S of e){if(m){if(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma")s(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");m=!1}if(g){if(l&&S.type!=="comment"&&S.type!=="newline")s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");g=null}switch(S.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&S.source.includes("\t"))g=S;f=!0;break;case"comment":{if(!f)s(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let O=S.source.substring(1)||" ";if(!p)p=O;else p+=d+O;d="",l=!1;break}case"newline":if(l){if(p)p+=S.source;else if(!k||r!=="seq-item-ind")c=!0}else d+=S.source;if(l=!0,u=!0,h||R)x=S;f=!0;break;case"anchor":if(h)s(S,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(S.source.endsWith(":"))s(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);h=S,E??(E=S.offset),l=!1,f=!1,m=!0;break;case"tag":{if(R)s(S,"MULTIPLE_TAGS","A node can have at most one tag");R=S,E??(E=S.offset),l=!1,f=!1,m=!0;break}case r:if(h||R)s(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`);if(k)s(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${t??"collection"}`);k=S,l=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(t){if(w)s(S,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);w=S,l=!1,f=!1;break}default:s(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),l=!1,f=!1}}let I=e[e.length-1],P=I?I.offset+I.source.length:i;if(m&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!==""))s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(g&&(l&&g.indent<=o||n?.type==="block-map"||n?.type==="block-seq"))s(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:w,found:k,spaceBefore:c,comment:p,hasNewline:u,anchor:h,tag:R,newlineAfterProp:x,end:P,start:E??P}}DC.resolveProps=TC});var Ir=y(function(NC){function oi(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(oi(t.key)||oi(t.value))return!0}return!1;default:return!0}}NC.containsNewline=oi});var ai=y(function(_C){var MC=Ir();function $C(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];if(n.indent===e&&(n.source==="]"||n.source==="}")&&MC.containsNewline(t))r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}_C.flowIndentCheck=$C});var ci=y(function(BC){var Ic=A();function FC(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n==="function"?n:(s,o)=>s===o||Ic.isScalar(s)&&Ic.isScalar(o)&&s.value===o.value;return t.some((s)=>i(s.key,r))}BC.mapIncludes=FC});var Oc=y(function(YC){var Ac=fe(),UC=me(),Pc=Rt(),VC=Ir(),Tc=ai(),KC=ci(),Dc="All mapping items must start at the same column";function GC({composeNode:e,composeEmptyNode:t},r,n,i,s){let a=new(s?.nodeClass??UC.YAMLMap)(r.schema);if(r.atRoot)r.atRoot=!1;let c=n.offset,l=null;for(let f of n.items){let{start:p,key:d,sep:u,value:m}=f,g=Pc.resolveProps(p,{indicator:"explicit-key-ind",next:d??u?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!g.found;if(h){if(d){if(d.type==="block-seq")i(c,"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(c,"BAD_INDENT",Dc)}if(!g.anchor&&!g.tag&&!u){if(l=g.end,g.comment)if(a.comment)a.comment+=`
|
|
65
|
-
`+g.comment;else a.comment=g.comment;continue}if(g.newlineAfterProp||VC.containsNewline(d))i(d??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(g.found?.indent!==n.indent)i(c,"BAD_INDENT",Dc);r.atKey=!0;let R=g.end,x=d?e(r,d,g,i):t(r,R,p,null,g,i);if(r.schema.compat)Tc.flowIndentCheck(n.indent,d,i);if(r.atKey=!1,KC.mapIncludes(r,a.items,x))i(R,"DUPLICATE_KEY","Map keys must be unique");let w=Pc.resolveProps(u??[],{indicator:"map-value-ind",next:m,offset:x.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=w.end,w.found){if(h){if(m?.type==="block-map"&&!w.hasNewline)i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&g.start<w.found.offset-1024)i(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let k=m?e(r,m,w,i):t(r,c,u,null,w,i);if(r.schema.compat)Tc.flowIndentCheck(n.indent,m,i);c=k.range[2];let
|
|
66
|
-
`+w.comment;else x.comment=w.comment;let k=new Ac.Pair(x);if(r.options.keepSourceTokens)k.srcToken=f;a.items.push(k)}}if(l&&l<c)i(l,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,c,l??c],a}YC.resolveBlockMap=GC});var Nc=y(function(XC){var zC=he(),WC=Rt(),JC=ai();function QC({composeNode:e,composeEmptyNode:t},r,n,i,s){let a=new(s?.nodeClass??zC.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let c=n.offset,l=null;for(let{start:f,value:p}of n.items){let d=WC.resolveProps(f,{indicator:"seq-item-ind",next:p,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||p)if(p?.type==="block-seq")i(d.end,"BAD_INDENT","All sequence items must start at the same column");else i(c,"MISSING_CHAR","Sequence item without - indicator");else{if(l=d.end,d.comment)a.comment=d.comment;continue}let u=p?e(r,p,d,i):t(r,d.end,f,null,d,i);if(r.schema.compat)JC.flowIndentCheck(n.indent,p,i);c=u.range[2],a.items.push(u)}return a.range=[n.offset,c,l??c],a}XC.resolveBlockSeq=QC});var Ke=y(function(tR){function eR(e,t,r,n){let i="";if(e){let s=!1,o="";for(let a of e){let{source:c,type:l}=a;switch(l){case"space":s=!0;break;case"comment":{if(r&&!s)n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";if(!i)i=f;else i+=o+f;o="";break}case"newline":if(i)o+=c;s=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=c.length}}return{comment:i,offset:t}}tR.resolveEnd=eR});var $c=y(function(uR){var nR=A(),iR=fe(),Lc=me(),sR=he(),oR=Ke(),Mc=Rt(),aR=Ir(),cR=ci(),li="Block collections are not allowed within flow collections",ui=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function lR({composeNode:e,composeEmptyNode:t},r,n,i,s){let o=n.start.source==="{",a=o?"flow map":"flow sequence",l=new(s?.nodeClass??(o?Lc.YAMLMap:sR.YAMLSeq))(r.schema);l.flow=!0;let f=r.atRoot;if(f)r.atRoot=!1;if(r.atKey)r.atKey=!1;let p=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let R=n.items[h],{start:x,key:w,sep:k,value:
|
|
65
|
+
`+g.comment;else a.comment=g.comment;continue}if(g.newlineAfterProp||VC.containsNewline(d))i(d??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(g.found?.indent!==n.indent)i(c,"BAD_INDENT",Dc);r.atKey=!0;let R=g.end,x=d?e(r,d,g,i):t(r,R,p,null,g,i);if(r.schema.compat)Tc.flowIndentCheck(n.indent,d,i);if(r.atKey=!1,KC.mapIncludes(r,a.items,x))i(R,"DUPLICATE_KEY","Map keys must be unique");let w=Pc.resolveProps(u??[],{indicator:"map-value-ind",next:m,offset:x.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=w.end,w.found){if(h){if(m?.type==="block-map"&&!w.hasNewline)i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&g.start<w.found.offset-1024)i(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let k=m?e(r,m,w,i):t(r,c,u,null,w,i);if(r.schema.compat)Tc.flowIndentCheck(n.indent,m,i);c=k.range[2];let E=new Ac.Pair(x,k);if(r.options.keepSourceTokens)E.srcToken=f;a.items.push(E)}else{if(h)i(x.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(w.comment)if(x.comment)x.comment+=`
|
|
66
|
+
`+w.comment;else x.comment=w.comment;let k=new Ac.Pair(x);if(r.options.keepSourceTokens)k.srcToken=f;a.items.push(k)}}if(l&&l<c)i(l,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,c,l??c],a}YC.resolveBlockMap=GC});var Nc=y(function(XC){var zC=he(),WC=Rt(),JC=ai();function QC({composeNode:e,composeEmptyNode:t},r,n,i,s){let a=new(s?.nodeClass??zC.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let c=n.offset,l=null;for(let{start:f,value:p}of n.items){let d=WC.resolveProps(f,{indicator:"seq-item-ind",next:p,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||p)if(p?.type==="block-seq")i(d.end,"BAD_INDENT","All sequence items must start at the same column");else i(c,"MISSING_CHAR","Sequence item without - indicator");else{if(l=d.end,d.comment)a.comment=d.comment;continue}let u=p?e(r,p,d,i):t(r,d.end,f,null,d,i);if(r.schema.compat)JC.flowIndentCheck(n.indent,p,i);c=u.range[2],a.items.push(u)}return a.range=[n.offset,c,l??c],a}XC.resolveBlockSeq=QC});var Ke=y(function(tR){function eR(e,t,r,n){let i="";if(e){let s=!1,o="";for(let a of e){let{source:c,type:l}=a;switch(l){case"space":s=!0;break;case"comment":{if(r&&!s)n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";if(!i)i=f;else i+=o+f;o="";break}case"newline":if(i)o+=c;s=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=c.length}}return{comment:i,offset:t}}tR.resolveEnd=eR});var $c=y(function(uR){var nR=A(),iR=fe(),Lc=me(),sR=he(),oR=Ke(),Mc=Rt(),aR=Ir(),cR=ci(),li="Block collections are not allowed within flow collections",ui=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function lR({composeNode:e,composeEmptyNode:t},r,n,i,s){let o=n.start.source==="{",a=o?"flow map":"flow sequence",l=new(s?.nodeClass??(o?Lc.YAMLMap:sR.YAMLSeq))(r.schema);l.flow=!0;let f=r.atRoot;if(f)r.atRoot=!1;if(r.atKey)r.atKey=!1;let p=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let R=n.items[h],{start:x,key:w,sep:k,value:E}=R,I=Mc.resolveProps(x,{flow:a,indicator:"explicit-key-ind",next:w??k?.[0],offset:p,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!k&&!E){if(h===0&&I.comma)i(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(h<n.items.length-1)i(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(I.comment)if(l.comment)l.comment+=`
|
|
67
67
|
`+I.comment;else l.comment=I.comment;p=I.end;continue}if(!o&&r.options.strict&&aR.containsNewline(w))i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(I.comma)i(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!I.comma)i(I.start,"MISSING_CHAR",`Missing , between ${a} items`);if(I.comment){let P="";e:for(let S of x)switch(S.type){case"comma":case"space":break;case"comment":P=S.source.substring(1);break e;default:break e}if(P){let S=l.items[l.items.length-1];if(nR.isPair(S))S=S.value??S.key;if(S.comment)S.comment+=`
|
|
68
|
-
`+P;else S.comment=P;I.comment=I.comment.substring(P.length+1)}}}if(!o&&!k&&!I.found){let P=
|
|
68
|
+
`+P;else S.comment=P;I.comment=I.comment.substring(P.length+1)}}}if(!o&&!k&&!I.found){let P=E?e(r,E,I,i):t(r,I.end,k,null,I,i);if(l.items.push(P),p=P.range[2],ui(E))i(P.range,"BLOCK_IN_FLOW",li)}else{r.atKey=!0;let P=I.end,S=w?e(r,w,I,i):t(r,P,x,null,I,i);if(ui(w))i(S.range,"BLOCK_IN_FLOW",li);r.atKey=!1;let O=Mc.resolveProps(k??[],{flow:a,indicator:"map-value-ind",next:E,offset:S.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(O.found){if(!o&&!I.found&&r.options.strict){if(k)for(let N of k){if(N===O.found)break;if(N.type==="newline"){i(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(I.start<O.found.offset-1024)i(O.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(E)if("source"in E&&E.source?.[0]===":")i(E,"MISSING_CHAR",`Missing space after : in ${a}`);else i(O.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let ce=E?e(r,E,O,i):O.found?t(r,O.end,k,null,O,i):null;if(ce){if(ui(E))i(ce.range,"BLOCK_IN_FLOW",li)}else if(O.comment)if(S.comment)S.comment+=`
|
|
69
69
|
`+O.comment;else S.comment=O.comment;let Pe=new iR.Pair(S,ce);if(r.options.keepSourceTokens)Pe.srcToken=R;if(o){let N=l;if(cR.mapIncludes(r,N.items,S))i(P,"DUPLICATE_KEY","Map keys must be unique");N.items.push(Pe)}else{let N=new Lc.YAMLMap(r.schema);N.flow=!0,N.items.push(Pe);let _i=(ce??S).range;N.range=[S.range[0],_i[1],_i[2]],l.items.push(N)}p=ce?ce.range[2]:O.end}}let d=o?"}":"]",[u,...m]=n.end,g=p;if(u?.source===d)g=u.offset+u.source.length;else{let h=a[0].toUpperCase()+a.substring(1),R=f?`${h} must end with a ${d}`:`${h} in block collection must be sufficiently indented and end with a ${d}`;if(i(p,f?"MISSING_CHAR":"BAD_INDENT",R),u&&u.source.length!==1)m.unshift(u)}if(m.length>0){let h=oR.resolveEnd(m,g,r.options.strict,i);if(h.comment)if(l.comment)l.comment+=`
|
|
70
|
-
`+h.comment;else l.comment=h.comment;l.range=[n.offset,g,h.offset]}else l.range=[n.offset,g,g];return l}uR.resolveFlowCollection=lR});var _c=y(function(RR){var pR=A(),fR=D(),gR=me(),mR=he(),hR=Oc(),yR=Nc(),bR=$c();function di(e,t,r,n,i,s){let o=r.type==="block-map"?hR.resolveBlockMap(e,t,r,n,s):r.type==="block-seq"?yR.resolveBlockSeq(e,t,r,n,s):bR.resolveFlowCollection(e,t,r,n,s),a=o.constructor;if(i==="!"||i===a.tagName)return o.tag=a.tagName,o;if(i)o.tag=i;return o}function CR(e,t,r,n,i){let s=n.tag,o=!s?null:t.directives.tagName(s.source,(d)=>i(s,"TAG_RESOLVE_FAILED",d));if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:u}=n,m=d&&s?d.offset>s.offset?d:s:d??s;if(m&&(!u||u.offset<m.offset))i(m,"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(!s||!o||o==="!"||o===gR.YAMLMap.tagName&&a==="map"||o===mR.YAMLSeq.tagName&&a==="seq")return di(e,t,r,i,o);let c=t.schema.tags.find((d)=>d.tag===o&&d.collection===a);if(!c){let d=t.schema.knownTags[o];if(d?.collection===a)t.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else{if(d)i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0);else i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0);return di(e,t,r,i,o)}}let l=di(e,t,r,i,o,c),f=c.resolve?.(l,(d)=>i(s,"TAG_RESOLVE_FAILED",d),t.options)??l,p=pR.isNode(f)?f:new fR.Scalar(f);if(p.range=l.range,p.tag=o,c?.format)p.format=c.format;return p}RR.composeCollection=CR});var fi=y(function(
|
|
70
|
+
`+h.comment;else l.comment=h.comment;l.range=[n.offset,g,h.offset]}else l.range=[n.offset,g,g];return l}uR.resolveFlowCollection=lR});var _c=y(function(RR){var pR=A(),fR=D(),gR=me(),mR=he(),hR=Oc(),yR=Nc(),bR=$c();function di(e,t,r,n,i,s){let o=r.type==="block-map"?hR.resolveBlockMap(e,t,r,n,s):r.type==="block-seq"?yR.resolveBlockSeq(e,t,r,n,s):bR.resolveFlowCollection(e,t,r,n,s),a=o.constructor;if(i==="!"||i===a.tagName)return o.tag=a.tagName,o;if(i)o.tag=i;return o}function CR(e,t,r,n,i){let s=n.tag,o=!s?null:t.directives.tagName(s.source,(d)=>i(s,"TAG_RESOLVE_FAILED",d));if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:u}=n,m=d&&s?d.offset>s.offset?d:s:d??s;if(m&&(!u||u.offset<m.offset))i(m,"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(!s||!o||o==="!"||o===gR.YAMLMap.tagName&&a==="map"||o===mR.YAMLSeq.tagName&&a==="seq")return di(e,t,r,i,o);let c=t.schema.tags.find((d)=>d.tag===o&&d.collection===a);if(!c){let d=t.schema.knownTags[o];if(d?.collection===a)t.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else{if(d)i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0);else i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0);return di(e,t,r,i,o)}}let l=di(e,t,r,i,o,c),f=c.resolve?.(l,(d)=>i(s,"TAG_RESOLVE_FAILED",d),t.options)??l,p=pR.isNode(f)?f:new fR.Scalar(f);if(p.range=l.range,p.tag=o,c?.format)p.format=c.format;return p}RR.composeCollection=CR});var fi=y(function(ER){var pi=D();function xR(e,t,r){let n=t.offset,i=wR(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?pi.Scalar.BLOCK_FOLDED:pi.Scalar.BLOCK_LITERAL,o=t.source?kR(t.source):[],a=o.length;for(let g=o.length-1;g>=0;--g){let h=o[g][1];if(h===""||h==="\r")a=g;else break}if(a===0){let g=i.chomp==="+"&&o.length>0?`
|
|
71
71
|
`.repeat(Math.max(1,o.length-1)):"",h=n+i.length;if(t.source)h+=t.source.length;return{value:g,type:s,comment:i.comment,range:[n,h,h]}}let c=t.indent+i.indent,l=t.offset+i.length,f=0;for(let g=0;g<a;++g){let[h,R]=o[g];if(R===""||R==="\r"){if(i.indent===0&&h.length>c)c=h.length}else{if(h.length<c)r(l+h.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(i.indent===0)c=h.length;if(f=g,c===0&&!e.atRoot)r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=h.length+R.length+1}for(let g=o.length-1;g>=a;--g)if(o[g][0].length>c)a=g+1;let p="",d="",u=!1;for(let g=0;g<f;++g)p+=o[g][0].slice(c)+`
|
|
72
72
|
`;for(let g=f;g<a;++g){let[h,R]=o[g];l+=h.length+R.length+1;let x=R[R.length-1]==="\r";if(x)R=R.slice(0,-1);if(R&&h.length<c){let k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(l-R.length-(x?2:1),"BAD_INDENT",k),h=""}if(s===pi.Scalar.BLOCK_LITERAL)p+=d+h.slice(c)+R,d=`
|
|
73
73
|
`;else if(h.length>c||R[0]==="\t"){if(d===" ")d=`
|
|
@@ -82,7 +82,7 @@ ${l}
|
|
|
82
82
|
`+o[g][0].slice(c);if(p[p.length-1]!==`
|
|
83
83
|
`)p+=`
|
|
84
84
|
`;break;default:p+=`
|
|
85
|
-
`}let m=n+i.length+t.source.length;return{value:p,type:s,comment:i.comment,range:[n,m,m]}}function wR({offset:e,props:t},r,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],s=i[0],o=0,a="",c=-1;for(let d=1;d<i.length;++d){let u=i[d];if(!a&&(u==="-"||u==="+"))a=u;else{let m=Number(u);if(!o&&m)o=m;else if(c===-1)c=e+d}}if(c!==-1)n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,f="",p=i.length;for(let d=1;d<t.length;++d){let u=t[d];switch(u.type){case"space":l=!0;case"newline":p+=u.source.length;break;case"comment":if(r&&!l)n(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");p+=u.source.length,f=u.source.substring(1);break;case"error":n(u,"UNEXPECTED_TOKEN",u.message),p+=u.source.length;break;default:{let m=`Unexpected token in block scalar header: ${u.type}`;n(u,"UNEXPECTED_TOKEN",m);let g=u.source;if(g&&typeof g==="string")p+=g.length}}}return{mode:s,indent:o,chomp:a,comment:f,length:p}}function kR(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let o=1;o<t.length;o+=2)s.push([t[o],t[o+1]]);return s}
|
|
85
|
+
`}let m=n+i.length+t.source.length;return{value:p,type:s,comment:i.comment,range:[n,m,m]}}function wR({offset:e,props:t},r,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],s=i[0],o=0,a="",c=-1;for(let d=1;d<i.length;++d){let u=i[d];if(!a&&(u==="-"||u==="+"))a=u;else{let m=Number(u);if(!o&&m)o=m;else if(c===-1)c=e+d}}if(c!==-1)n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,f="",p=i.length;for(let d=1;d<t.length;++d){let u=t[d];switch(u.type){case"space":l=!0;case"newline":p+=u.source.length;break;case"comment":if(r&&!l)n(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");p+=u.source.length,f=u.source.substring(1);break;case"error":n(u,"UNEXPECTED_TOKEN",u.message),p+=u.source.length;break;default:{let m=`Unexpected token in block scalar header: ${u.type}`;n(u,"UNEXPECTED_TOKEN",m);let g=u.source;if(g&&typeof g==="string")p+=g.length}}}return{mode:s,indent:o,chomp:a,comment:f,length:p}}function kR(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let o=1;o<t.length;o+=2)s.push([t[o],t[o+1]]);return s}ER.resolveBlockScalar=xR});var mi=y(function(MR){var gi=D(),IR=Ke();function AR(e,t,r){let{offset:n,type:i,source:s,end:o}=e,a,c,l=(d,u,m)=>r(n+d,u,m);switch(i){case"scalar":a=gi.Scalar.PLAIN,c=PR(s,l);break;case"single-quoted-scalar":a=gi.Scalar.QUOTE_SINGLE,c=TR(s,l);break;case"double-quoted-scalar":a=gi.Scalar.QUOTE_DOUBLE,c=DR(s,l);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let f=n+s.length,p=IR.resolveEnd(o,f,t,r);return{value:c,type:a,comment:p.comment,range:[n,f,p.offset]}}function PR(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}if(r)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return qc(e)}function TR(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return qc(e.slice(1,-1)).replace(/''/g,"'")}function qc(e){let t=/(.*?)\r?\n/sy,r=t.exec(e);if(!r)return e;let n,i;try{n=new RegExp("(?<![ \t])[ \t]+$"),i=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let s=r[1].replace(n,""),o=" ",a=t.lastIndex;while(r=t.exec(e)){let l=r[1].replace(i,"");if(l==="")if(o===`
|
|
86
86
|
`)s+=o;else o=`
|
|
87
87
|
`;else s+=o+l,o=" ";a=t.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=a,r=c.exec(e),s+o+(r?.[1]??"")}function DR(e,t){let r="";for(let n=1;n<e.length-1;++n){let i=e[n];if(i==="\r"&&e[n+1]===`
|
|
88
88
|
`)continue;if(i===`
|
|
@@ -95,7 +95,7 @@ ${l}
|
|
|
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 NR={"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 LR(e,t,r,n){let i=e.substr(t,r),o=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}MR.resolveFlowScalar=AR});var Bc=y(function(UR){var
|
|
98
|
+
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function LR(e,t,r,n){let i=e.substr(t,r),o=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}MR.resolveFlowScalar=AR});var Bc=y(function(UR){var ve=A(),Fc=D(),_R=fi(),qR=mi();function FR(e,t,r,n){let{value:i,type:s,comment:o,range:a}=t.type==="block-scalar"?_R.resolveBlockScalar(e,t,n):qR.resolveFlowScalar(t,e.options.strict,n),c=r?e.directives.tagName(r.source,(p)=>n(r,"TAG_RESOLVE_FAILED",p)):null,l;if(e.options.stringKeys&&e.atKey)l=e.schema[ve.SCALAR];else if(c)l=BR(e.schema,i,c,r,n);else if(t.type==="scalar")l=jR(e,i,t,n);else l=e.schema[ve.SCALAR];let f;try{let p=l.resolve(i,(d)=>n(r??t,"TAG_RESOLVE_FAILED",d),e.options);f=ve.isScalar(p)?p:new Fc.Scalar(p)}catch(p){let d=p instanceof Error?p.message:String(p);n(r??t,"TAG_RESOLVE_FAILED",d),f=new Fc.Scalar(i)}if(f.range=a,f.source=i,s)f.type=s;if(c)f.tag=c;if(l.format)f.format=l.format;if(o)f.comment=o;return f}function BR(e,t,r,n,i){if(r==="!")return e[ve.SCALAR];let s=[];for(let a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(t))return a;let o=e.knownTags[r];if(o&&!o.collection)return e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[ve.SCALAR]}function jR({atKey:e,directives:t,schema:r},n,i,s){let o=r.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(n))||r[ve.SCALAR];if(r.compat){let a=r.compat.find((c)=>c.default&&c.test?.test(n))??r[ve.SCALAR];if(o.tag!==a.tag){let c=t.tagString(o.tag),l=t.tagString(a.tag),f=`Value may be parsed as either ${c} or ${l}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return o}UR.composeScalar=FR});var jc=y(function(GR){function KR(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}GR.emptyScalarPosition=KR});var Kc=y(function(eS){var HR=it(),zR=A(),WR=_c(),Uc=Bc(),JR=Ke(),QR=jc(),XR={composeNode:Vc,composeEmptyNode:hi};function Vc(e,t,r,n){let i=e.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=r,l,f=!0;switch(t.type){case"alias":if(l=ZR(e,t,n),a||c)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(l=Uc.composeScalar(e,t,c,n),a)l.anchor=a.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(l=WR.composeCollection(XR,e,t,r,n),a)l.anchor=a.source.substring(1)}catch(p){let d=p instanceof Error?p.message:String(p);n(t,"RESOURCE_EXHAUSTION",d)}break;default:{let p=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",p),f=!1}}if(l??(l=hi(e,t.offset,void 0,null,r,n)),a&&l.anchor==="")n(a,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!zR.isScalar(l)||typeof l.value!=="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str"))n(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(s)l.spaceBefore=!0;if(o)if(t.type==="scalar"&&t.source==="")l.comment=o;else l.commentBefore=o;if(e.options.keepSourceTokens&&f)l.srcToken=t;return l}function hi(e,t,r,n,{spaceBefore:i,comment:s,anchor:o,tag:a,end:c},l){let f={type:"scalar",offset:QR.emptyScalarPosition(t,r,n),indent:-1,source:""},p=Uc.composeScalar(e,f,a,l);if(o){if(p.anchor=o.source.substring(1),p.anchor==="")l(o,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)p.spaceBefore=!0;if(s)p.comment=s,p.range[2]=c;return p}function ZR({options:e},{offset:t,source:r,end:n},i){let s=new HR.Alias(r.substring(1));if(s.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(s.source.endsWith(":"))i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+r.length,a=JR.resolveEnd(n,o,e.strict,i);if(s.range=[t,o,a.offset],a.comment)s.comment=a.comment;return s}eS.composeEmptyNode=hi;eS.composeNode=Vc});var Yc=y(function(aS){var nS=bt(),Gc=Kc(),iS=Ke(),sS=Rt();function oS(e,t,{offset:r,start:n,value:i,end:s},o){let a=Object.assign({_directives:t},e),c=new nS.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=sS.resolveProps(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:o,parentIndent:0,startOnNewline:!0});if(f.found){if(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline)o(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}c.contents=i?Gc.composeNode(l,i,f,o):Gc.composeEmptyNode(l,f.end,n,null,f,o);let p=c.contents.range[2],d=iS.resolveEnd(s,p,!1,o);if(d.comment)c.comment=d.comment;return c.range=[r,p,d.offset],c}aS.composeDoc=oS});var yi=y(function(gS){var lS=Pt("process"),uS=Sn(),dS=bt(),St=Ct(),Hc=A(),pS=Yc(),fS=Ke();function xt(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 zc(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let s=e[i];switch(s[0]){case"#":t+=(t===""?"":n?`
|
|
99
99
|
|
|
100
100
|
`:`
|
|
101
101
|
`)+(s.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 Wc{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,i)=>{let s=xt(t);if(i)this.warnings.push(new St.YAMLWarning(s,r,n));else this.errors.push(new St.YAMLParseError(s,r,n))},this.directives=new uS.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=zc(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
@@ -112,14 +112,14 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
112
112
|
`});for(let c of Object.keys(e))if(c!=="type"&&c!=="offset")delete e[c];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:i})}}function Qc(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 bi(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 s of n)s.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((s)=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(e))if(s!=="type"&&s!=="offset")delete e[s];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}wS.createScalarToken=RS;wS.resolveAsScalar=CS;wS.setScalarValue=SS});var Zc=y(function(AS){var IS=(e)=>("type"in e)?Pr(e):Ar(e);function Pr(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=Pr(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=Ar(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=Ar(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=Ar(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 Ar({start:e,key:t,sep:r,value:n}){let i="";for(let s of e)i+=s.source;if(t)i+=Pr(t);if(r)for(let s of r)i+=s.source;if(n)i+=Pr(n);return i}AS.stringify=IS});var rl=y(function(DS){var Ci=Symbol("break visit"),TS=Symbol("skip children"),el=Symbol("remove item");function Ie(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};tl(Object.freeze([]),e,t)}Ie.BREAK=Ci;Ie.SKIP=TS;Ie.REMOVE=el;Ie.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r};Ie.parentCollection=(e,t)=>{let r=Ie.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 tl(e,t,r){let n=r(t,e);if(typeof n==="symbol")return n;for(let i of["key","value"]){let s=t[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=tl(Object.freeze(e.concat([[i,o]])),s.items[o],r);if(typeof a==="number")o=a-1;else if(a===Ci)return Ci;else if(a===el)s.items.splice(o,1),o-=1}if(typeof n==="function"&&i==="key")n=n(t,e)}}return typeof n==="function"?n(t,e):n}DS.visit=Ie});var Tr=y(function(FS){var Ri=Xc(),NS=Zc(),LS=rl(),Si="\uFEFF",xi="\x02",wi="\x18",ki="\x1F",MS=(e)=>!!e&&("items"in e),$S=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function _S(e){switch(e){case Si:return"<BOM>";case xi:return"<DOC>";case wi:return"<FLOW_END>";case ki:return"<SCALAR>";default:return JSON.stringify(e)}}function qS(e){switch(e){case Si:return"byte-order-mark";case xi:return"doc-mode";case wi:return"flow-error-end";case ki: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}FS.createScalarToken=Ri.createScalarToken;FS.resolveAsScalar=Ri.resolveAsScalar;FS.setScalarValue=Ri.setScalarValue;FS.stringify=NS.stringify;FS.visit=LS.visit;FS.BOM=Si;FS.DOCUMENT=xi;FS.FLOW_END=wi;FS.SCALAR=ki;FS.isCollection=MS;FS.isScalar=$S;FS.prettyToken=_S;FS.tokenType=qS});var
|
|
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}FS.createScalarToken=Ri.createScalarToken;FS.resolveAsScalar=Ri.resolveAsScalar;FS.setScalarValue=Ri.setScalarValue;FS.stringify=NS.stringify;FS.visit=LS.visit;FS.BOM=Si;FS.DOCUMENT=xi;FS.FLOW_END=wi;FS.SCALAR=ki;FS.isCollection=MS;FS.isScalar=$S;FS.prettyToken=_S;FS.tokenType=qS});var vi=y(function(tx){var wt=Tr();function Z(e){switch(e){case void 0:case" ":case`
|
|
116
116
|
`:case"\r":case"\t":return!0;default:return!1}}var nl=new Set("0123456789ABCDEFabcdef"),ZS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Dr=new Set(",[]{}"),ex=new Set(` ,[]{}
|
|
117
|
-
\r `),
|
|
117
|
+
\r `),Ei=(e)=>!e||ex.has(e);class il{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
121
|
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&Z(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]===wt.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 wt.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==="...")&&Z(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&&!Z(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===":")&&Z(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(
|
|
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]===wt.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 wt.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==="...")&&Z(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&&!Z(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===":")&&Z(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(Ei),"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("..."))&&Z(n[3])){if(!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield wt.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(Ei),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let s=this.charAt(1);if(this.flowKey||Z(s)||s===",")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
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)=>Z(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 s=this.buffer[i+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
|
|
@@ -129,13 +129,13 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
129
129
|
`&&i>=this.pos&&i+1+t>o)e=i;else break}while(!0);return yield wt.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(Z(i)||e&&Dr.has(i))break;t=r}else if(Z(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&&Dr.has(i))break;if(n===`
|
|
132
|
-
`){let s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(e&&Dr.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield wt.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(
|
|
132
|
+
`){let s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(e&&Dr.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield wt.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(Ei),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(Z(r)||t&&Dr.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(!Z(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(ZS.has(t))t=this.buffer[++e];else if(t==="%"&&nl.has(this.buffer[e+1])&&nl.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)}}tx.Lexer=il});var Ii=y(function(nx){class sl{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}}}}nx.LineCounter=sl});var Ai=y(function(ax){var sx=Pt("process"),ol=Tr(),ox=
|
|
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)}}tx.Lexer=il});var Ii=y(function(nx){class sl{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}}}}nx.LineCounter=sl});var Ai=y(function(ax){var sx=Pt("process"),ol=Tr(),ox=vi();function ye(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function al(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 ll(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 Or(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 Ge(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 Nr(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 cl(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!ye(t.start,"explicit-key-ind")&&!ye(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,ll(t.value))if(t.value.end)Nr(t.value.end,t.sep);else t.value.end=t.sep;else Nr(t.start,t.sep);delete t.sep}}}class ul{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 ox.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,sx.env.LOG_TOKENS)console.log("|",ol.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ol.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")cl(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&&al(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(al(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=Or(this.peek(2)),r=Ge(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)){Nr(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 s=[];for(let o=0;o<t.sep.length;++o){let a=t.sep[o];switch(a.type){case"newline":s.push(o);break;case"space":break;case"comment":if(a.indent>e.indent)s.length=0;break;default:s.length=0}}if(s.length>=2)i=t.sep.splice(s[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(ye(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let s=Ge(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ye(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(ll(t.key)&&!ye(t.sep,"newline")){let s=Ge(t.start),{key:o,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:s,key:o,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(ye(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 s=this.flowScalar(this.type);if(n||t.value)e.items.push({start:i,key:s,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(s);else Object.assign(t,{key:s,sep:[]}),this.onKeyLine=!0;return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ye(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(s);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)){Nr(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||ye(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=Or(r),i=Ge(n);cl(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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=Or(e),r=Ge(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=Or(e),r=Ge(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()}}}ax.Parser=ul});var ml=y(function(hx){var dl=yi(),lx=bt(),kt=Ct(),ux=In(),dx=A(),px=Ii(),pl=Ai();function fl(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new px.LineCounter||null,prettyErrors:t}}function fx(e,t={}){let{lineCounter:r,prettyErrors:n}=fl(t),i=new pl.Parser(r?.addNewLine),s=new dl.Composer(t),o=Array.from(s.compose(i.parse(e)));if(n&&r)for(let a of o)a.errors.forEach(kt.prettifyError(e,r)),a.warnings.forEach(kt.prettifyError(e,r));if(o.length>0)return o;return Object.assign([],{empty:!0},s.streamInfo())}function gl(e,t={}){let{lineCounter:r,prettyErrors:n}=fl(t),i=new pl.Parser(r?.addNewLine),s=new dl.Composer(t),o=null;for(let a of s.compose(i.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new kt.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)o.errors.forEach(kt.prettifyError(e,r)),o.warnings.forEach(kt.prettifyError(e,r));return o}function gx(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=gl(e,r);if(!i)return null;if(i.warnings.forEach((s)=>ux.warn(i.options.logLevel,s)),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 mx(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(dx.isDocument(e)&&!n)return e.toString(r);return new lx.Document(e,n,r).toString(r)}hx.parse=gx;hx.parseAllDocuments=fx;hx.parseDocument=gl;hx.stringify=mx});var Sx,xx,wx,Pi,kx,be,vx,
|
|
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=Or(e),r=Ge(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=Or(e),r=Ge(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()}}}ax.Parser=ul});var ml=y(function(hx){var dl=yi(),lx=bt(),kt=Ct(),ux=In(),dx=A(),px=Ii(),pl=Ai();function fl(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new px.LineCounter||null,prettyErrors:t}}function fx(e,t={}){let{lineCounter:r,prettyErrors:n}=fl(t),i=new pl.Parser(r?.addNewLine),s=new dl.Composer(t),o=Array.from(s.compose(i.parse(e)));if(n&&r)for(let a of o)a.errors.forEach(kt.prettifyError(e,r)),a.warnings.forEach(kt.prettifyError(e,r));if(o.length>0)return o;return Object.assign([],{empty:!0},s.streamInfo())}function gl(e,t={}){let{lineCounter:r,prettyErrors:n}=fl(t),i=new pl.Parser(r?.addNewLine),s=new dl.Composer(t),o=null;for(let a of s.compose(i.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new kt.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)o.errors.forEach(kt.prettifyError(e,r)),o.warnings.forEach(kt.prettifyError(e,r));return o}function gx(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=gl(e,r);if(!i)return null;if(i.warnings.forEach((s)=>ux.warn(i.options.logLevel,s)),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 mx(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(dx.isDocument(e)&&!n)return e.toString(r);return new lx.Document(e,n,r).toString(r)}hx.parse=gx;hx.parseAllDocuments=fx;hx.parseDocument=gl;hx.stringify=mx});var Sx,xx,wx,Pi,kx,be,Ex,vx,Ix,Ax,LA,Px,Tx,Dx,Lr,hl,Ox,Nx,Lx,Mx,$x,_x,qx,Fx,Bx,jx,Ux,Vx,Kx,Gx,Yx,Hx,zx,Wx,Jx,Qx,Xx,Zx,Ti,ew,tw,rw,nw,iw;var yl=U(()=>{Sx=yi(),xx=bt(),wx=ti(),Pi=Ct(),kx=it(),be=A(),Ex=fe(),vx=D(),Ix=me(),Ax=he(),LA=Tr(),Px=vi(),Tx=Ii(),Dx=Ai(),Lr=ml(),hl=rt();Ox=Sx.Composer,Nx=xx.Document,Lx=wx.Schema,Mx=Pi.YAMLError,$x=Pi.YAMLParseError,_x=Pi.YAMLWarning,qx=kx.Alias,Fx=be.isAlias,Bx=be.isCollection,jx=be.isDocument,Ux=be.isMap,Vx=be.isNode,Kx=be.isPair,Gx=be.isScalar,Yx=be.isSeq,Hx=Ex.Pair,zx=vx.Scalar,Wx=Ix.YAMLMap,Jx=Ax.YAMLSeq,Qx=Px.Lexer,Xx=Tx.LineCounter,Zx=Dx.Parser,Ti=Lr.parse,ew=Lr.parseAllDocuments,tw=Lr.parseDocument,rw=Lr.stringify,nw=hl.visit,iw=hl.visitAsync});function Et(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 vt(e){let{meta:t}=Et(e);if(!t)throw Error("design-md file is missing YAML frontmatter");let r=Ti(t);if(!r||typeof r!=="object")throw Error("design-md frontmatter must be a YAML object");if(typeof r.id!=="string"||!r.id)throw Error("design-md frontmatter must include a non-empty 'id' field");let n=typeof r.title==="string"?r.title.trim():"",i=typeof r.name==="string"?r.name.trim():"",s=n||i;if(!s)throw Error("design-md frontmatter must include a non-empty 'title' or 'name' field");if(typeof r.category!=="string"||!r.category)throw Error("design-md frontmatter must include a non-empty 'category' field");let o={id:r.id,title:s,category:r.category,tags:Array.isArray(r.tags)?r.tags:[],origin:typeof r.origin==="string"?r.origin:"local"};if(i)o.name=i;if(typeof r.version==="string"&&r.version.trim())o.version=r.version.trim();if(typeof r.sourceUrl==="string")o.sourceUrl=r.sourceUrl;if(Array.isArray(r.exemptRules)){let a=r.exemptRules.filter((c)=>typeof c==="string"&&c.trim().length>0);if(a.length>0)o.exemptRules=a.map((c)=>c.trim())}if(Array.isArray(r.extractedTokens))o.extractedTokens=r.extractedTokens;if(typeof r.layer==="string")if(bl.includes(r.layer))o.layer=r.layer;else console.warn(`[design-md] ignoring invalid layer "${r.layer}" on id="${o.id}"; expected one of ${bl.join("|")}`);return o}var bl;var Mr=U(()=>{yl();bl=["auto","user","override"]});function Di(e){let t=new Set,r=[];for(let{pattern:n,group:i}of sw){let s=new RegExp(n.source,n.flags),o;while((o=s.exec(e))!==null){let a=(o[1]??"").trim(),c=(o[2]??"").trim(),l=`${a}:${c}`;if(!t.has(l))t.add(l),r.push({name:a,value:c,group:i})}}return r}var sw;var Oi=U(()=>{sw=[{pattern:/`?(--[\w-]+)`?\s*:\s*([#\w()%., ]+)/g,group:"css-var"},{pattern:/`?([\w-]+(?:Color|Bg|Text|Border|Shadow|Radius|Font|Size|Space))`?\s*[=:]\s*["']?([^"'\n,]+)["']?/gi,group:"token"}]});import{readFileSync as ow}from"fs";function It(e){let t=ow(e,"utf-8"),{body:r}=Et(t),n=vt(t),i=n.extractedTokens??Di(r),s={id:n.id,title:n.title,category:n.category,tags:n.tags??[],origin:n.origin??"local",body:r,filePath:e};if(n.sourceUrl)s.sourceUrl=n.sourceUrl;if(n.exemptRules)s.exemptRules=n.exemptRules;if(n.layer)s.layer=n.layer;if(i.length>0)s.extractedTokens=i;return s}var At=U(()=>{Mr();Oi()});var Ni=U(()=>{At()});var Li=()=>{};var Mi=()=>{};function aw(e){return`# ${e.trim()||"project"} DESIGN
|
|
139
139
|
|
|
140
140
|
Per-project visual contract. Owned by this consumer. UIBot house seeds
|
|
141
141
|
(\`frontend-principles\`, \`control-console\`) are generation defaults only;
|
|
@@ -192,7 +192,7 @@ Page title 20px. Body 14px. Helper \u2265 12px. No marketing display serif.
|
|
|
192
192
|
- No purple-gradient SaaS, ALL-CAPS chrome eyebrows, or emoji as icons.
|
|
193
193
|
- No unscoped \`html, body, *\` CSS. Scope tokens to the product root.
|
|
194
194
|
- No second design system beside this file.
|
|
195
|
-
`}var Cl=U(()=>{At()});import{fileURLToPath as cw}from"url";import{existsSync as lw,readdirSync as uw}from"fs";import{join as dw}from"path";function Sl(e=Rl){if(!lw(e))return[];let t=[];for(let r of uw(e).sort()){if(r.startsWith("_")||!r.endsWith(".design.md"))continue;try{t.push(It(dw(e,r)))}catch(n){console.warn(`[design-md] skipping seed ${r}: ${n.message}`)}}return t}var Rl;var xl=U(()=>{At();Rl=cw(new URL("../content",import.meta.url))});import{mkdirSync as wl,writeFileSync as pw}from"fs";import{dirname as fw,join as gw}from"path";async function kl(e,t=globalThis.fetch){let r=e.trim(),n=mw.exec(r);if(n){let i=n[1],s=n[2],o=(n[3]??"").replace(/^\/+|\/+$/g,""),a=`https://api.github.com/repos/${i}/${s}/contents`+(o?`/${o}`:""),c=await t(a,{headers:{accept:"application/vnd.github+json","user-agent":"uibot-design-md-sync"}});if(!c.ok)throw Error(`Failed to list github:${i}/${s}${o?"/"+o:""} (HTTP ${c.status})`);let l=await c.json(),f=Array.isArray(l)?l:[l],p=[];for(let d of f){if(!d||typeof d!=="object")continue;let u=d;if(u.type==="file"&&u.name&&
|
|
195
|
+
`}var Cl=U(()=>{At()});import{fileURLToPath as cw}from"url";import{existsSync as lw,readdirSync as uw}from"fs";import{join as dw}from"path";function Sl(e=Rl){if(!lw(e))return[];let t=[];for(let r of uw(e).sort()){if(r.startsWith("_")||!r.endsWith(".design.md"))continue;try{t.push(It(dw(e,r)))}catch(n){console.warn(`[design-md] skipping seed ${r}: ${n.message}`)}}return t}var Rl;var xl=U(()=>{At();Rl=cw(new URL("../content",import.meta.url))});import{mkdirSync as wl,writeFileSync as pw}from"fs";import{dirname as fw,join as gw}from"path";async function kl(e,t=globalThis.fetch){let r=e.trim(),n=mw.exec(r);if(n){let i=n[1],s=n[2],o=(n[3]??"").replace(/^\/+|\/+$/g,""),a=`https://api.github.com/repos/${i}/${s}/contents`+(o?`/${o}`:""),c=await t(a,{headers:{accept:"application/vnd.github+json","user-agent":"uibot-design-md-sync"}});if(!c.ok)throw Error(`Failed to list github:${i}/${s}${o?"/"+o:""} (HTTP ${c.status})`);let l=await c.json(),f=Array.isArray(l)?l:[l],p=[];for(let d of f){if(!d||typeof d!=="object")continue;let u=d;if(u.type==="file"&&u.name&&El(u.name)&&u.download_url)p.push(u.download_url)}if(p.length===0)throw Error(`No *.design.md / design markdown files found at github:${i}/${s}`+(o?`/${o}`:""));return{kind:"github",label:`github:${i}/${s}${o?"/"+o:""}`,fileUrls:p}}if(/^https?:\/\//i.test(r))return{kind:"url",label:r,fileUrls:[r]};throw Error(`Unsupported --from value "${e}". Use github:owner/repo[/path] or an https:// URL.`)}function El(e){let t=e.toLowerCase();return t.endsWith(".design.md")||t.endsWith(".md")&&!t.startsWith("readme")}function vl(e,t){let{meta:r,body:n}=Et(e);if(!r)return`---
|
|
196
196
|
sourceUrl: ${JSON.stringify(t.sourceUrl)}
|
|
197
197
|
license: ${JSON.stringify(t.license)}
|
|
198
198
|
---
|
|
@@ -202,9 +202,9 @@ ${i.join(`
|
|
|
202
202
|
---
|
|
203
203
|
${n?n+(n.endsWith(`
|
|
204
204
|
`)?"":`
|
|
205
|
-
`):""}`}async function hw(e){let t=e.fetchImpl??globalThis.fetch,r=e.defaultLicense??"UNKNOWN",n=[],i=0,s=0,o;try{o=await kl(e.from,t)}catch(a){return{ok:!1,written:0,skipped:0,files:[],error:a instanceof Error?a.message:String(a)}}if(!e.dryRun)wl(e.outDir,{recursive:!0});for(let a of o.fileUrls){let c;try{let m=await t(a,{headers:{"user-agent":"uibot-design-md-sync"}});if(!m.ok){s+=1,n.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`HTTP ${m.status}`});continue}c=await m.text()}catch(m){return{ok:!1,written:i,skipped:s,files:n,error:`Network failure fetching ${a}: ${m instanceof Error?m.message:String(m)}`}}let l=new TextEncoder().encode(c).byteLength;if(l>$i){s+=1,n.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`exceeds ${$i} bytes (${l})`});continue}let f=
|
|
206
|
-
`)}function Ce(e){if(/^[\w.-]+$/.test(e))return e;return JSON.stringify(e)}var Al=U(()=>{Mr()});var Pl=U(()=>{aa();Ni();Li();Mi();At();Cl();Ni();xl();Li();Mi();Oi();Il();Al()});import{lstatSync as wu,mkdirSync as is,readFileSync as ku,realpathSync as vu,writeFileSync as ss}from"fs";import{basename as Eu,dirname as Hr,isAbsolute as Iu,resolve as se,sep as rs}from"path";function ql(e){let t=e.lockfilePath??"uibot.artifacts.lock.json",r=e.manifest.items??[],n=new Map;for(let o of r)n.set(o.name,o);if(e.lockfile===null)return{ok:!1,lockfilePath:t,registryName:e.manifest.name,lockCount:0,manifestCount:r.length,drifts:[{name:"*",kind:"missing-in-lock",detail:"lockfile missing or unreadable"}]};let i=[],s=new Set;for(let o of e.lockfile.artifacts??[]){s.add(o.name);let a=n.get(o.name);if(!a){i.push({name:o.name,kind:"missing-in-manifest",lockVersion:o.version,detail:`locked ${o.name}@${o.version} not present in registry manifest`});continue}let c=Fl(a);if(c&&c!==o.version)i.push({name:o.name,kind:"version-mismatch",lockVersion:o.version,manifestVersion:c,detail:`${o.name}: lock ${o.version} \u2260 registry ${c}`})}return{ok:i.length===0,lockfilePath:t,registryName:e.manifest.name,lockCount:(e.lockfile.artifacts??[]).length,manifestCount:r.length,drifts:i}}function Fl(e){return e.artifact?.version??e.version}import{readFileSync as Bl,realpathSync as Bi}from"fs";import{resolve as Te,relative as jl,dirname as Ul,extname as Vl,sep as $r}from"path";function Kl(e){if(e.endsWith(".css"))return"style";if(e.endsWith(".tsx")||e.endsWith(".jsx"))return"component";if(/(^|\/)use-[^/]+\.ts$/.test(e))return"hook";return"lib"}function _r(e){let t=e.readFile??((c)=>Bl(c,"utf8")),r=new Map,n=(c,l=Te(e.sourceDir))=>{let f=jl(l,Te(c));if(f===".."||f.startsWith(`..${$r}`)||f.startsWith($r))throw Error(`Block dependency outside sourceDir: ${c}`);return f.replaceAll($r,"/")},i=(c)=>{if(n(Te(e.sourceDir,c)),!e.readFile)n(Bi(Te(e.sourceDir,c)),Bi(e.sourceDir));let l=r.get(c);if(l!==void 0)return l;let f=t(Te(e.sourceDir,c));return r.set(c,f),f},s=(c)=>{let l=new Map,f=(p)=>{if(l.has(p))return;let d=i(p);l.set(p,{path:p,type:Kl(p),content:d});let u=d.matchAll(/(?:\bfrom\s*|\bimport\s*)["'](\.[^"']+)["']/g);for(let m of u){let g=n(Te(e.sourceDir,Ul(p),m[1]??"")),h=Vl(g)?[g]:[`${g}.ts`,`${g}.tsx`,`${g}/index.ts`,`${g}/index.tsx`],R;for(let x of h)try{i(x),R=x;break}catch(w){if(w instanceof Error&&w.message.includes("outside sourceDir"))throw w}if(!R)throw Error(`Unresolved block dependency: ${p} -> ${m[1]}`);f(R)}};return f(c),[...l.values()]},o=(c)=>{let l=new Set;for(let f of c){if(typeof f.content!=="string")continue;for(let p of f.content.matchAll(/(?:\bfrom\s*|\bimport\s*)["']([^."'/][^"']*|@[^"']+)["']/g)){let d=p[1]??"";if(d.startsWith("node:"))continue;let u=d.startsWith("@")?d.split("/").slice(0,2).join("/"):d.split("/")[0]??"";if(u==="react"||u==="react-dom"||u.startsWith("@uibot/"))continue;l.add(u)}}return[...l].sort()},a=[];for(let c of Object.keys(e.catalog)){let l=e.blockFileMap[c];if(l===void 0)continue;let f=e.catalog[c];if(f===void 0)continue;let p=i(l),d=s(l),u=o(d);a.push({name:c,category:f.category,description:f.description,sourceCode:p,files:d,catalogEntry:f,...u.length>0?{dependencies:u}:{}})}return a}function Dw(e){return e.flatMap((t)=>_r(t))}import{readdirSync as Gl,readFileSync as Yl,statSync as Hl}from"fs";import{basename as zl,join as Wl}from"path";var Jl="0.1.0";function ji(e){let{dir:t}=e,r;try{r=Gl(t)}catch{return[]}let n=e.defaultVersion??Jl,i=e.defaultLevel??"L4",s=e.defaultCategory??"template",o=[];for(let a of r){if(!/\.ya?ml$/i.test(a))continue;let c=Wl(t,a);try{if(!Hl(c).isFile())continue}catch{continue}let l=Yl(c,"utf8");if(!l.trim())continue;let f=zl(a).replace(/\.ya?ml$/i,""),p=Ql(f),d=Xl(f),u=Zl(l)??`${d} template`;o.push({name:p,version:n,title:d,description:u,yaml:l,absolutePath:c,templateContract:{name:p,description:u,level:i,category:s,keywords:[p,f.toLowerCase(),"uibot-template",...e.extraKeywords??[]],composedFrom:eu(l)}})}return o.sort((a,c)=>a.name.localeCompare(c.name))}function qr(e){let t=new Map;for(let r of e)for(let n of ji(r)){let i=t.get(n.name);if(i)throw Error(`duplicate template source name "${n.name}": ${i.absolutePath} and ${n.absolutePath}`);t.set(n.name,n)}return[...t.values()].sort((r,n)=>r.name.localeCompare(n.name))}function Ui(e){return{kind:"template",name:e.name,version:e.version,files:[{path:`${e.name}.yaml`,type:"template",content:e.yaml,target:`${e.name}.yaml`}],templateContract:e.templateContract}}function Fr(e){return{name:e.name,kind:"template",title:e.title,description:e.description,artifact:Ui(e)}}function Ql(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"").toLowerCase()}function Xl(e){return e.replace(/[-_]+/g," ").replace(/\b\w/g,(t)=>t.toUpperCase())}function Zl(e){return(e.match(/^\s*title:\s*["']?(.+?)["']?\s*$/m)??e.match(/^\s*-\s*id:.*\n\s*path:.*\n\s*title:\s*["']?(.+?)["']?\s*$/m))?.[1]?.trim()}function eu(e){let t=new Set;for(let r of e.matchAll(/^\s*-\s*type:\s*["']?([^"'#\n]+?)["']?\s*$/gm)){let n=r[1]?.trim();if(n)t.add(n)}for(let r of e.matchAll(/^\s*template:\s*["']?([^"'#\n]+?)["']?\s*$/gm)){let n=r[1]?.trim();if(n)t.add(n)}return[...t].sort()}var tu="0.1.0";function ru(e,t={}){return{kind:"component",name:e.name,version:t.defaultVersion??tu,runtime:t.runtime??"react",files:e.files,...e.dependencies?{dependencies:e.dependencies}:{},...e.registryDependencies?{registryDependencies:e.registryDependencies}:{},...e.catalogEntry.tags?{tags:e.catalogEntry.tags}:{},catalogEntry:e.catalogEntry}}function nu(e,t={}){return{name:e.name,kind:"component",title:e.catalogEntry.name,description:e.description??e.catalogEntry.description,artifact:ru(e,t)}}function Vi(e,t){let r={...t.runtime?{runtime:t.runtime}:{},...t.defaultVersion?{defaultVersion:t.defaultVersion}:{}},n=e.map((s)=>nu(s,r)),i=(t.templates??[]).map((s)=>Fr(s));return{name:t.name,items:[...n,...i]}}var ou={spec:["html","markdown","zip"],prototype:["html","zip"],deck:["html","pptx","zip"],poster:["html","zip"]},kk=Array.from(new Set(Object.values(ou).flat()));var Ki=["component","template","design-guide","example","skill"],Br=["experimental","candidate","recommended"];var Gi=["missing","declared","verified","external-consumer"],Yi=["source","license","contract","states","accessibility","light-theme","dark-theme","responsive","dependency-closure","packed-install","typecheck","browser"],De=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 Nv=new Set(Yi),Lv=new Set(Gi);var au=/^(unknown|unlicensed|none|n\/?a)$/i;function jr(e){let t=e?.trim();if(!t||au.test(t))return;return t}var cu="uibot.resource.index.v1";class Oe extends Error{code;detail;constructor(e,t){super(`${e}: ${t}`);this.code=e;this.detail=t;this.name="ResourceIndexError"}}function V(e,t){return e<t?-1:e>t?1:0}function L(e){return e.normalize("NFKC").replace(/([\p{Lu}]+)([\p{Lu}][\p{Ll}])/gu,"$1 $2").replace(/([\p{Ll}\p{N}])([\p{Lu}])/gu,"$1 $2").toLowerCase().replace(/[^\p{L}\p{N}]+/gu," ").trim().replace(/\s+/g," ")}function lu(e){let t=L(e).replace(/ /g,"-");if(!t)throw new Oe("invalid-resource-source-id",e);return t}function ne(e,t){return`${e}:${lu(t)}`}function Tt(e){let t=new Map;for(let r of e){let n=r?.trim();if(!n)continue;let i=L(n);if(!i||t.has(i))continue;t.set(i,n)}return[...t.entries()].sort(([r],[n])=>V(r,n)).map(([,r])=>r)}function Ye(e){return{level:"declared",maturity:"experimental",checks:{source:"declared",license:e?"declared":"missing",contract:"declared",states:"missing",accessibility:"missing","light-theme":"missing","dark-theme":"missing",responsive:"missing","dependency-closure":"missing","packed-install":"missing",typecheck:"missing",browser:"missing"},evidence:[]}}function uu(e){let t=jr(e.license);return{type:e.type,id:e.id,...e.version?{version:e.version}:{},...e.url?{url:e.url}:{},...t?{license:t}:{}}}function He(e){return{id:e.id,kind:e.kind,title:e.title,description:e.description,...e.category?{category:e.category}:{},tags:Tt(e.tags),aliases:Tt(e.aliases),capabilities:Tt(e.capabilities),dependencies:[...new Set(e.dependencies)].sort(V),source:uu(e.source),receipt:e.receipt}}function du(e){return(e.body.split(/\r?\n/).map((r)=>r.replace(/^#+\s*/,"").trim()).find(Boolean)??e.title).slice(0,240)}function pu(e){return Object.freeze(e.tags),Object.freeze(e.aliases),Object.freeze(e.capabilities),Object.freeze(e.dependencies),Object.freeze(e.source),Object.freeze(e.receipt.checks),Object.freeze(e.receipt.evidence),Object.freeze(e.receipt),Object.freeze(e)}function fu(e){let t=new Map;for(let r of Object.keys(e).sort(V)){let n=e[r];if(!n)continue;let i=ne("component",r);for(let s of Tt([r,n.name])){let o=L(s),a=t.get(o)??[];if(!a.includes(i))a.push(i);t.set(o,a.sort(V))}}return t}function gu(e,t,r){let n=r.get(L(e))??[];if(n.length===0)throw new Oe("dangling-resource-dependency",`${t} -> ${ne("component",e)}`);if(n.length>1)throw new Oe("ambiguous-resource-dependency",`${t} -> ${e}: ${n.join(",")}`);return n[0]}function mu(e,t,r,n){let i=e.startsWith("template:")?e.slice(9):e;if(Object.hasOwn(n,i))return ne("template",i);return gu(e,t,r)}function ze(e,t,r){return jr(r?.[e]??t)}function Hi(e){return Object.entries(e).filter(([,t])=>t.level==="L4").sort(([t],[r])=>V(t,r)).map(([t,r])=>({id:`${t}-example`,title:`${r.name} Example`,description:r.description,category:r.category,tags:r.keywords,aliases:[`${t} example`,`${r.name} example`],capabilities:["example:template"],dependencies:[ne("template",t)]}))}function zi(e){let t=e.components??{},r=e.templates??{},n=e.designGuides??[],i=e.examples??[],s=e.skills??[],o=e.licenses,a=fu(t),c=[];for(let u of Object.keys(t).sort(V)){let m=t[u];if(!m)continue;let g=ne("component",u),h=ze(g,void 0,o);c.push(He({id:g,kind:"component",title:m.name,description:m.description,category:m.category,tags:m.tags??[],aliases:[u,m.name],capabilities:["catalog:component"],dependencies:[],source:{type:"catalog",id:u,...h?{license:h}:{}},receipt:Ye(Boolean(h))}))}for(let u of Object.keys(r).sort(V)){let m=r[u];if(!m)continue;let g=ne("template",u),h=ze(g,void 0,o);c.push(He({id:g,kind:"template",title:m.name,description:m.description,category:m.category,tags:m.keywords,aliases:[u,m.name],capabilities:[],dependencies:(m.composedFrom??[]).map((R)=>mu(R,g,a,r)),source:{type:"template-contract",id:u,...h?{license:h}:{}},receipt:Ye(Boolean(h))}))}for(let u of[...n].sort((m,g)=>V(m.id,g.id))){let m=ne("design-guide",u.id),g=ze(m,void 0,o);c.push(He({id:m,kind:"design-guide",title:u.title,description:du(u),category:u.category,tags:u.tags,aliases:[u.id,u.title],capabilities:["designMd:source"],dependencies:[],source:{type:"design-md",id:u.id,...u.sourceUrl?{url:u.sourceUrl}:{},...g?{license:g}:{}},receipt:Ye(Boolean(g))}))}for(let u of[...i].sort((m,g)=>V(m.id,g.id))){let m=ne("example",u.id),g=ze(m,u.license,o);c.push(He({id:m,kind:"example",title:u.title,description:u.description,...u.category?{category:u.category}:{},tags:u.tags??[],aliases:[u.id,u.title,...u.aliases??[]],capabilities:u.capabilities??[],dependencies:u.dependencies??[],source:{type:"example",id:u.id,...u.version?{version:u.version}:{},...u.sourceUrl?{url:u.sourceUrl}:{},...g?{license:g}:{}},receipt:Ye(Boolean(g))}))}for(let u of[...s].sort((m,g)=>V(m.id,g.id))){let m=ne("skill",u.id),g=ze(m,void 0,o);c.push(He({id:m,kind:"skill",title:u.title,description:u.description?.trim()||u.title,tags:[...u.tags??[],...u.triggers??[]],aliases:[u.id,u.title,...u.triggers??[]],capabilities:["skill:definition"],dependencies:[],source:{type:"skill",id:u.id,...u.version?{version:u.version}:{},...g?{license:g}:{}},receipt:Ye(Boolean(g))}))}c.sort((u,m)=>V(u.id,m.id));let l=new Set;for(let u of c){if(l.has(u.id))throw new Oe("duplicate-resource-id",u.id);l.add(u.id)}for(let u of c)for(let m of u.dependencies)if(!l.has(m))throw new Oe("dangling-resource-dependency",`${u.id} -> ${m}`);let f=new Map;for(let u of c)for(let m of u.aliases){let g=L(m);if(!g)continue;let h=f.get(g)??new Set;h.add(u.id),f.set(g,h)}let p=Object.freeze(Object.fromEntries([...f.entries()].sort(([u],[m])=>V(u,m)).map(([u,m])=>[u,Object.freeze([...m].sort(V))]))),d=Object.freeze(c.map(pu));return Object.freeze({schemaVersion:cu,resources:d,aliases:p})}var hu=[["data table","data grid","datatable","table","\u8868\u683C","\u6570\u636E\u8868","\u6570\u636E\u8868\u683C"],["button","action button","\u6309\u94AE","\u64CD\u4F5C\u6309\u94AE"],["dashboard","admin dashboard","\u4EEA\u8868\u76D8","\u540E\u53F0","\u7BA1\u7406\u540E\u53F0"],["kanban","kanban board","\u770B\u677F","\u4EFB\u52A1\u770B\u677F"],["form","input form","\u8868\u5355","\u8F93\u5165\u8868\u5355"],["navigation","nav","sidebar","\u5BFC\u822A","\u4FA7\u8FB9\u680F"]],yu=Object.freeze(hu.map((e)=>Object.freeze([...e]))),Wi=new Map;for(let e of yu){let t=Object.freeze([...new Set(e.map(L).filter(Boolean))].sort());for(let r of t)Wi.set(r,t)}function Ur(e){let t=L(e);return Wi.get(t)??Object.freeze([t])}class J extends Error{code;detail;constructor(e,t){super(`${e}: ${t}`);this.code=e;this.detail=t;this.name="ResourceQueryError"}}var Yr=Object.freeze({"exact-id":1000,"exact-title":900,alias:800,tag:600,capability:500,category:400,token:200,fuzzy:100}),bu=Object.freeze(Object.keys(Yr)),Ji=new Map(bu.map((e,t)=>[e,t])),Qi=new Map([["component",0],["template",1],["design-guide",2],["example",3],["skill",4]]);function K(e,t){return e<t?-1:e>t?1:0}function Xi(e){return new Set((e??[]).map(L).filter(Boolean))}function Vr(e,t){let r=Xi(t);if(r.size===0)return!0;let n=Xi(e);return[...r].some((i)=>n.has(i))}function Cu(e,t){if(t.kinds?.length&&!t.kinds.includes(e.kind))return!1;if(!Vr(e.tags,t.tags))return!1;if(!Vr(e.category?[e.category]:[],t.categories))return!1;if(!Vr(e.capabilities,t.capabilities))return!1;if(t.maturities?.length&&!t.maturities.includes(e.receipt.maturity))return!1;return!0}function Ru(e){return Boolean(e.kinds?.length||e.tags?.length||e.categories?.length||e.capabilities?.length||e.maturities?.length)}function ie(e,t,r,n=Yr[t]){if(e.some((i)=>i.code===t&&i.value===r))return;e.push({code:t,value:r,score:n})}function Kr(e,t){return e.find((r)=>L(r)===t)}function Gr(e){return[e.id,e.title,...e.aliases,...e.tags,...e.category?[e.category]:[],...e.capabilities]}function Su(e,t,r){if(Math.abs(e.length-t.length)>r)return r+1;let n=Array.from({length:t.length+1},(i,s)=>s);for(let i=1;i<=e.length;i+=1){let s=[i],o=i;for(let a=1;a<=t.length;a+=1){let c=(n[a-1]??r+1)+(e[i-1]===t[a-1]?0:1),l=Math.min((n[a]??r+1)+1,(s[a-1]??r+1)+1,c);s.push(l),o=Math.min(o,l)}if(o>r)return r+1;n=s}return n[t.length]??r+1}function xu(e,t){let r=L(t),n=[];if(L(e.id)===r)ie(n,"exact-id",e.id);if(L(e.title)===r)ie(n,"exact-title",e.title);let i=Kr(e.aliases,r);if(i)ie(n,"alias",i);let s=Kr(e.tags,r);if(s)ie(n,"tag",s);let o=Kr(e.capabilities,r);if(o)ie(n,"capability",o);if(e.category&&L(e.category)===r)ie(n,"category",e.category);if(!i){let l=Ur(r).filter((p)=>p!==r),f=new Set(Gr(e).map(L));if(l.some((p)=>f.has(p)))ie(n,"alias",t.trim())}let a=r.split(" ").filter(Boolean),c=L(Gr(e).join(" "));if(a.length>0&&a.every((l)=>c.includes(l)))ie(n,"token",t.trim());if(n.length===0&&r.length>=4){let l;for(let f of Gr(e)){let p=L(f);if(p.length<4)continue;let d=Su(r,p,2);if(d<=2&&(!l||d<l.distance||d===l.distance&&K(f,l.value)<0))l={value:f,distance:d}}if(l)ie(n,"fuzzy",l.value,Yr.fuzzy-l.distance)}return n.sort((l,f)=>{if(l.score!==f.score)return f.score-l.score;return(Ji.get(l.code)??99)-(Ji.get(f.code)??99)||K(l.value,f.value)})}function Zi(e,t,r){if(t.has(r))return[r];let n=L(r),i=e.aliases[n];if(i?.length)return[...i];let s=new Set;for(let o of Ur(n))for(let a of e.aliases[o]??[])s.add(a);return[...s].sort(K)}function es(e,t){return new J("resource-alias-ambiguous",`${e.trim()}: ${t.join(",")}`)}function ts(e){let t=new Map(e.resources.map((n)=>[n.id,n]));function r(n){let i=n.trim(),s=Zi(e,t,i);if(s.length===0)throw new J("resource-not-found",i);if(s.length>1)throw es(i,s);let o=s[0],a=o?t.get(o):void 0;if(!a)throw new J("resource-not-found",i);return a}return Object.freeze({manifest:()=>e,search(n){let i=n.text?.trim()??"";if(!i&&!Ru(n))throw new J("resource-query-empty","text or filter is required");if(n.limit!==void 0&&(!Number.isInteger(n.limit)||n.limit<=0))throw new J("resource-query-invalid-limit",String(n.limit));let s=e.resources.filter((o)=>Cu(o,n)).map((o)=>{let a=i?xu(o,i):[];return{resource:o,score:a.reduce((c,l)=>c+l.score,0),reasons:a}}).filter((o)=>!i||o.reasons.length>0).sort((o,a)=>a.score-o.score||K(o.resource.id,a.resource.id));return n.limit===void 0?s:s.slice(0,n.limit)},get:r,build(n){if(n.length===0||n.every((d)=>!d.trim()))throw new J("resource-query-empty","at least one build root is required");let i=[],s=new Set;for(let d of n){let u=d.trim(),m=Zi(e,t,u);if(m.length===0)i.push({id:u,reason:"missing-resource"});else if(m.length>1)throw es(u,m);else{let g=m[0];if(g)s.add(g)}}let o=new Set,a=new Set,c=new Set,l=[],f=[],p=(d,u)=>{if(o.has(d))return;if(a.has(d)){i.push({id:d,...u?{requiredBy:u}:{},reason:"dependency-cycle"});return}let m=t.get(d);if(!m){i.push({id:d,...u?{requiredBy:u}:{},reason:"missing-resource"});return}a.add(d),c.add(d);let g=[...m.dependencies].sort((h,R)=>{let x=t.get(h),w=t.get(R);return(Qi.get(x?.kind??"")??99)-(Qi.get(w?.kind??"")??99)||K(h,R)});for(let h of g)f.push({from:d,to:h,relation:"depends-on"}),p(h,d);a.delete(d),o.add(d),l.push(d)};for(let d of[...s].sort(K))p(d);return{roots:[...s].sort(K),nodes:[...c].sort(K).map((d)=>{let u=t.get(d);if(!u)throw new J("resource-not-found",d);return{id:d,kind:u.kind,maturity:u.receipt.maturity}}),edges:f.sort((d,u)=>K(d.from,u.from)||K(d.to,u.to)),order:l,gaps:i.sort((d,u)=>K(d.id,u.id)||K(d.requiredBy??"",u.requiredBy??"")||K(d.reason,u.reason))}}})}function Au(e){if(!e.name)throw Error("Artifact registry manifest requires a name");return e}async function Pu(e,t){let r=await fetch(e,t?{headers:t}:{});if(!r.ok)throw Error(`Failed to fetch ${e}: ${r.status} ${r.statusText}`);return await r.json()}async function zr(e,t){let r=e.endsWith("/registry.json")?e:`${e.replace(/\/$/,"")}/registry.json`,n=await Pu(r,t);return Au(n)}class Wr{options;id;priority;manifestPromise;constructor(e){this.options=e;this.id=e.id??e.registryUrl,this.priority=e.priority}getManifest(){return this.manifestPromise??=zr(this.options.registryUrl,this.options.headers),this.manifestPromise}async get(e){return(await this.getManifest()).items.find((r)=>r.name===e)}}class Jr{sources;constructor(e){this.sources=e}async resolve(e){let t=[...this.sources].sort((r,n)=>r.priority-n.priority);for(let r of t){let n=await r.get(e);if(n)return n}return}}var Tu="uibot.artifacts.lock.json";function Du(e){return se(e,"components","registry")}function Ou(e){return se(e,"templates","registry")}function Nu(e,t){if(e.kind==="component")return se(t.componentsDir??Du(t.workspaceRoot));return se(t.templatesDir??Ou(t.workspaceRoot))}function Lu(e){return se(e.workspaceRoot,e.lockfilePath??Tu)}function Mu(e){try{return JSON.parse(ku(e,"utf8"))}catch{return{version:1,artifacts:[]}}}function $u(e,t){is(Hr(e),{recursive:!0}),ss(e,`${JSON.stringify(t,null,2)}
|
|
207
|
-
`,"utf8")}function _u(e,t){return{version:1,artifacts:[...e.artifacts.filter((n)=>n.name!==t.name),t].sort((n,i)=>n.name.localeCompare(i.name))}}function qu(e){if(e.kind==="component")return{components:{[e.name]:e.catalogEntry}};return{templates:{[e.name]:e.templateContract}}}class Re extends Error{artifactName;offendingPath;baseDir;constructor(e,t,r){super(`Artifact "${e}" file path escapes workspace: "${t}" resolves outside "${r}"`);this.artifactName=e;this.offendingPath=t;this.baseDir=r;this.name="ArtifactContainmentError"}}function os(e,t){let r=t.endsWith(rs)?t:t+rs;return e===t||e.startsWith(r)}function ns(e){let t=se(e),r=[];while(!0)try{return wu(t),se(
|
|
205
|
+
`):""}`}async function hw(e){let t=e.fetchImpl??globalThis.fetch,r=e.defaultLicense??"UNKNOWN",n=[],i=0,s=0,o;try{o=await kl(e.from,t)}catch(a){return{ok:!1,written:0,skipped:0,files:[],error:a instanceof Error?a.message:String(a)}}if(!e.dryRun)wl(e.outDir,{recursive:!0});for(let a of o.fileUrls){let c;try{let m=await t(a,{headers:{"user-agent":"uibot-design-md-sync"}});if(!m.ok){s+=1,n.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`HTTP ${m.status}`});continue}c=await m.text()}catch(m){return{ok:!1,written:i,skipped:s,files:n,error:`Network failure fetching ${a}: ${m instanceof Error?m.message:String(m)}`}}let l=new TextEncoder().encode(c).byteLength;if(l>$i){s+=1,n.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`exceeds ${$i} bytes (${l})`});continue}let f=vl(c,{sourceUrl:a,license:r}),p;try{p=vt(f).id}catch(m){s+=1,n.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:m instanceof Error?m.message:"invalid frontmatter"});continue}let d=`${p}.design.md`,u=gw(e.outDir,d);if(e.dryRun){n.push({id:p,path:u,sourceUrl:a,status:"dry-run"}),i+=1;continue}wl(fw(u),{recursive:!0}),pw(u,f,"utf8"),i+=1,n.push({id:p,path:u,sourceUrl:a,status:"written"})}return{ok:!0,written:i,skipped:s,files:n}}var $i=65536,mw;var Il=U(()=>{Mr();mw=/^github:([^/]+)\/([^/@]+)(?:\/(.+))?$/i});function yw(e){let t=["---"];if(t.push(`id: ${Ce(e.id)}`),t.push(`title: ${Ce(e.title)}`),t.push(`category: ${Ce(e.category)}`),e.tags?.length)t.push(`tags: [${e.tags.map((r)=>Ce(r)).join(", ")}]`);if(e.origin)t.push(`origin: ${Ce(e.origin)}`);if(e.sourceUrl)t.push(`sourceUrl: ${Ce(e.sourceUrl)}`);if(e.exemptRules?.length)t.push(`exemptRules: [${e.exemptRules.map((r)=>Ce(r)).join(", ")}]`);if(e.layer)t.push(`layer: ${Ce(e.layer)}`);return t.push("---"),t.push(""),t.push(e.body?.trimEnd()??""),t.push(""),t.join(`
|
|
206
|
+
`)}function Ce(e){if(/^[\w.-]+$/.test(e))return e;return JSON.stringify(e)}var Al=U(()=>{Mr()});var Pl=U(()=>{aa();Ni();Li();Mi();At();Cl();Ni();xl();Li();Mi();Oi();Il();Al()});import{lstatSync as wu,mkdirSync as is,readFileSync as ku,realpathSync as Eu,writeFileSync as ss}from"fs";import{basename as vu,dirname as Hr,isAbsolute as Iu,resolve as se,sep as rs}from"path";function ql(e){let t=e.lockfilePath??"uibot.artifacts.lock.json",r=e.manifest.items??[],n=new Map;for(let o of r)n.set(o.name,o);if(e.lockfile===null)return{ok:!1,lockfilePath:t,registryName:e.manifest.name,lockCount:0,manifestCount:r.length,drifts:[{name:"*",kind:"missing-in-lock",detail:"lockfile missing or unreadable"}]};let i=[],s=new Set;for(let o of e.lockfile.artifacts??[]){s.add(o.name);let a=n.get(o.name);if(!a){i.push({name:o.name,kind:"missing-in-manifest",lockVersion:o.version,detail:`locked ${o.name}@${o.version} not present in registry manifest`});continue}let c=Fl(a);if(c&&c!==o.version)i.push({name:o.name,kind:"version-mismatch",lockVersion:o.version,manifestVersion:c,detail:`${o.name}: lock ${o.version} \u2260 registry ${c}`})}return{ok:i.length===0,lockfilePath:t,registryName:e.manifest.name,lockCount:(e.lockfile.artifacts??[]).length,manifestCount:r.length,drifts:i}}function Fl(e){return e.artifact?.version??e.version}import{readFileSync as Bl,realpathSync as Bi}from"fs";import{resolve as Te,relative as jl,dirname as Ul,extname as Vl,sep as $r}from"path";function Kl(e){if(e.endsWith(".css"))return"style";if(e.endsWith(".tsx")||e.endsWith(".jsx"))return"component";if(/(^|\/)use-[^/]+\.ts$/.test(e))return"hook";return"lib"}function _r(e){let t=e.readFile??((c)=>Bl(c,"utf8")),r=new Map,n=(c,l=Te(e.sourceDir))=>{let f=jl(l,Te(c));if(f===".."||f.startsWith(`..${$r}`)||f.startsWith($r))throw Error(`Block dependency outside sourceDir: ${c}`);return f.replaceAll($r,"/")},i=(c)=>{if(n(Te(e.sourceDir,c)),!e.readFile)n(Bi(Te(e.sourceDir,c)),Bi(e.sourceDir));let l=r.get(c);if(l!==void 0)return l;let f=t(Te(e.sourceDir,c));return r.set(c,f),f},s=(c)=>{let l=new Map,f=(p)=>{if(l.has(p))return;let d=i(p);l.set(p,{path:p,type:Kl(p),content:d});let u=d.matchAll(/(?:\bfrom\s*|\bimport\s*)["'](\.[^"']+)["']/g);for(let m of u){let g=n(Te(e.sourceDir,Ul(p),m[1]??"")),h=Vl(g)?[g]:[`${g}.ts`,`${g}.tsx`,`${g}/index.ts`,`${g}/index.tsx`],R;for(let x of h)try{i(x),R=x;break}catch(w){if(w instanceof Error&&w.message.includes("outside sourceDir"))throw w}if(!R)throw Error(`Unresolved block dependency: ${p} -> ${m[1]}`);f(R)}};return f(c),[...l.values()]},o=(c)=>{let l=new Set;for(let f of c){if(typeof f.content!=="string")continue;for(let p of f.content.matchAll(/(?:\bfrom\s*|\bimport\s*)["']([^."'/][^"']*|@[^"']+)["']/g)){let d=p[1]??"";if(d.startsWith("node:"))continue;let u=d.startsWith("@")?d.split("/").slice(0,2).join("/"):d.split("/")[0]??"";if(u==="react"||u==="react-dom"||u.startsWith("@uibot/"))continue;l.add(u)}}return[...l].sort()},a=[];for(let c of Object.keys(e.catalog)){let l=e.blockFileMap[c];if(l===void 0)continue;let f=e.catalog[c];if(f===void 0)continue;let p=i(l),d=s(l),u=o(d);a.push({name:c,category:f.category,description:f.description,sourceCode:p,files:d,catalogEntry:f,...u.length>0?{dependencies:u}:{}})}return a}function Dw(e){return e.flatMap((t)=>_r(t))}import{readdirSync as Gl,readFileSync as Yl,statSync as Hl}from"fs";import{basename as zl,join as Wl}from"path";var Jl="0.1.0";function ji(e){let{dir:t}=e,r;try{r=Gl(t)}catch{return[]}let n=e.defaultVersion??Jl,i=e.defaultLevel??"L4",s=e.defaultCategory??"template",o=[];for(let a of r){if(!/\.ya?ml$/i.test(a))continue;let c=Wl(t,a);try{if(!Hl(c).isFile())continue}catch{continue}let l=Yl(c,"utf8");if(!l.trim())continue;let f=zl(a).replace(/\.ya?ml$/i,""),p=Ql(f),d=Xl(f),u=Zl(l)??`${d} template`;o.push({name:p,version:n,title:d,description:u,yaml:l,absolutePath:c,templateContract:{name:p,description:u,level:i,category:s,keywords:[p,f.toLowerCase(),"uibot-template",...e.extraKeywords??[]],composedFrom:eu(l)}})}return o.sort((a,c)=>a.name.localeCompare(c.name))}function qr(e){let t=new Map;for(let r of e)for(let n of ji(r)){let i=t.get(n.name);if(i)throw Error(`duplicate template source name "${n.name}": ${i.absolutePath} and ${n.absolutePath}`);t.set(n.name,n)}return[...t.values()].sort((r,n)=>r.name.localeCompare(n.name))}function Ui(e){return{kind:"template",name:e.name,version:e.version,files:[{path:`${e.name}.yaml`,type:"template",content:e.yaml,target:`${e.name}.yaml`}],templateContract:e.templateContract}}function Fr(e){return{name:e.name,kind:"template",title:e.title,description:e.description,artifact:Ui(e)}}function Ql(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"").toLowerCase()}function Xl(e){return e.replace(/[-_]+/g," ").replace(/\b\w/g,(t)=>t.toUpperCase())}function Zl(e){return(e.match(/^\s*title:\s*["']?(.+?)["']?\s*$/m)??e.match(/^\s*-\s*id:.*\n\s*path:.*\n\s*title:\s*["']?(.+?)["']?\s*$/m))?.[1]?.trim()}function eu(e){let t=new Set;for(let r of e.matchAll(/^\s*-\s*type:\s*["']?([^"'#\n]+?)["']?\s*$/gm)){let n=r[1]?.trim();if(n)t.add(n)}for(let r of e.matchAll(/^\s*template:\s*["']?([^"'#\n]+?)["']?\s*$/gm)){let n=r[1]?.trim();if(n)t.add(n)}return[...t].sort()}var tu="0.1.0";function ru(e,t={}){return{kind:"component",name:e.name,version:t.defaultVersion??tu,runtime:t.runtime??"react",files:e.files,...e.dependencies?{dependencies:e.dependencies}:{},...e.registryDependencies?{registryDependencies:e.registryDependencies}:{},...e.catalogEntry.tags?{tags:e.catalogEntry.tags}:{},catalogEntry:e.catalogEntry}}function nu(e,t={}){return{name:e.name,kind:"component",title:e.catalogEntry.name,description:e.description??e.catalogEntry.description,artifact:ru(e,t)}}function Vi(e,t){let r={...t.runtime?{runtime:t.runtime}:{},...t.defaultVersion?{defaultVersion:t.defaultVersion}:{}},n=e.map((s)=>nu(s,r)),i=(t.templates??[]).map((s)=>Fr(s));return{name:t.name,items:[...n,...i]}}var ou={spec:["html","markdown","zip"],prototype:["html","zip"],deck:["html","pptx","zip"],poster:["html","zip"]},vk=Array.from(new Set(Object.values(ou).flat()));var Ki=["component","template","design-guide","example","skill"],Br=["experimental","candidate","recommended"];var Gi=["missing","declared","verified","external-consumer"],Yi=["source","license","contract","states","accessibility","light-theme","dark-theme","responsive","dependency-closure","packed-install","typecheck","browser"],De=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 ME=new Set(Yi),$E=new Set(Gi);var au=/^(unknown|unlicensed|none|n\/?a)$/i;function jr(e){let t=e?.trim();if(!t||au.test(t))return;return t}var cu="uibot.resource.index.v1";class Oe extends Error{code;detail;constructor(e,t){super(`${e}: ${t}`);this.code=e;this.detail=t;this.name="ResourceIndexError"}}function V(e,t){return e<t?-1:e>t?1:0}function L(e){return e.normalize("NFKC").replace(/([\p{Lu}]+)([\p{Lu}][\p{Ll}])/gu,"$1 $2").replace(/([\p{Ll}\p{N}])([\p{Lu}])/gu,"$1 $2").toLowerCase().replace(/[^\p{L}\p{N}]+/gu," ").trim().replace(/\s+/g," ")}function lu(e){let t=L(e).replace(/ /g,"-");if(!t)throw new Oe("invalid-resource-source-id",e);return t}function ne(e,t){return`${e}:${lu(t)}`}function Tt(e){let t=new Map;for(let r of e){let n=r?.trim();if(!n)continue;let i=L(n);if(!i||t.has(i))continue;t.set(i,n)}return[...t.entries()].sort(([r],[n])=>V(r,n)).map(([,r])=>r)}function Ye(e){return{level:"declared",maturity:"experimental",checks:{source:"declared",license:e?"declared":"missing",contract:"declared",states:"missing",accessibility:"missing","light-theme":"missing","dark-theme":"missing",responsive:"missing","dependency-closure":"missing","packed-install":"missing",typecheck:"missing",browser:"missing"},evidence:[]}}function uu(e){let t=jr(e.license);return{type:e.type,id:e.id,...e.version?{version:e.version}:{},...e.url?{url:e.url}:{},...t?{license:t}:{}}}function He(e){return{id:e.id,kind:e.kind,title:e.title,description:e.description,...e.category?{category:e.category}:{},tags:Tt(e.tags),aliases:Tt(e.aliases),capabilities:Tt(e.capabilities),dependencies:[...new Set(e.dependencies)].sort(V),source:uu(e.source),receipt:e.receipt}}function du(e){return(e.body.split(/\r?\n/).map((r)=>r.replace(/^#+\s*/,"").trim()).find(Boolean)??e.title).slice(0,240)}function pu(e){return Object.freeze(e.tags),Object.freeze(e.aliases),Object.freeze(e.capabilities),Object.freeze(e.dependencies),Object.freeze(e.source),Object.freeze(e.receipt.checks),Object.freeze(e.receipt.evidence),Object.freeze(e.receipt),Object.freeze(e)}function fu(e){let t=new Map;for(let r of Object.keys(e).sort(V)){let n=e[r];if(!n)continue;let i=ne("component",r);for(let s of Tt([r,n.name])){let o=L(s),a=t.get(o)??[];if(!a.includes(i))a.push(i);t.set(o,a.sort(V))}}return t}function gu(e,t,r){let n=r.get(L(e))??[];if(n.length===0)throw new Oe("dangling-resource-dependency",`${t} -> ${ne("component",e)}`);if(n.length>1)throw new Oe("ambiguous-resource-dependency",`${t} -> ${e}: ${n.join(",")}`);return n[0]}function mu(e,t,r,n){let i=e.startsWith("template:")?e.slice(9):e;if(Object.hasOwn(n,i))return ne("template",i);return gu(e,t,r)}function ze(e,t,r){return jr(r?.[e]??t)}function Hi(e){return Object.entries(e).filter(([,t])=>t.level==="L4").sort(([t],[r])=>V(t,r)).map(([t,r])=>({id:`${t}-example`,title:`${r.name} Example`,description:r.description,category:r.category,tags:r.keywords,aliases:[`${t} example`,`${r.name} example`],capabilities:["example:template"],dependencies:[ne("template",t)]}))}function zi(e){let t=e.components??{},r=e.templates??{},n=e.designGuides??[],i=e.examples??[],s=e.skills??[],o=e.licenses,a=fu(t),c=[];for(let u of Object.keys(t).sort(V)){let m=t[u];if(!m)continue;let g=ne("component",u),h=ze(g,void 0,o);c.push(He({id:g,kind:"component",title:m.name,description:m.description,category:m.category,tags:m.tags??[],aliases:[u,m.name],capabilities:["catalog:component"],dependencies:[],source:{type:"catalog",id:u,...h?{license:h}:{}},receipt:Ye(Boolean(h))}))}for(let u of Object.keys(r).sort(V)){let m=r[u];if(!m)continue;let g=ne("template",u),h=ze(g,void 0,o);c.push(He({id:g,kind:"template",title:m.name,description:m.description,category:m.category,tags:m.keywords,aliases:[u,m.name],capabilities:[],dependencies:(m.composedFrom??[]).map((R)=>mu(R,g,a,r)),source:{type:"template-contract",id:u,...h?{license:h}:{}},receipt:Ye(Boolean(h))}))}for(let u of[...n].sort((m,g)=>V(m.id,g.id))){let m=ne("design-guide",u.id),g=ze(m,void 0,o);c.push(He({id:m,kind:"design-guide",title:u.title,description:du(u),category:u.category,tags:u.tags,aliases:[u.id,u.title],capabilities:["designMd:source"],dependencies:[],source:{type:"design-md",id:u.id,...u.sourceUrl?{url:u.sourceUrl}:{},...g?{license:g}:{}},receipt:Ye(Boolean(g))}))}for(let u of[...i].sort((m,g)=>V(m.id,g.id))){let m=ne("example",u.id),g=ze(m,u.license,o);c.push(He({id:m,kind:"example",title:u.title,description:u.description,...u.category?{category:u.category}:{},tags:u.tags??[],aliases:[u.id,u.title,...u.aliases??[]],capabilities:u.capabilities??[],dependencies:u.dependencies??[],source:{type:"example",id:u.id,...u.version?{version:u.version}:{},...u.sourceUrl?{url:u.sourceUrl}:{},...g?{license:g}:{}},receipt:Ye(Boolean(g))}))}for(let u of[...s].sort((m,g)=>V(m.id,g.id))){let m=ne("skill",u.id),g=ze(m,void 0,o);c.push(He({id:m,kind:"skill",title:u.title,description:u.description?.trim()||u.title,tags:[...u.tags??[],...u.triggers??[]],aliases:[u.id,u.title,...u.triggers??[]],capabilities:["skill:definition"],dependencies:[],source:{type:"skill",id:u.id,...u.version?{version:u.version}:{},...g?{license:g}:{}},receipt:Ye(Boolean(g))}))}c.sort((u,m)=>V(u.id,m.id));let l=new Set;for(let u of c){if(l.has(u.id))throw new Oe("duplicate-resource-id",u.id);l.add(u.id)}for(let u of c)for(let m of u.dependencies)if(!l.has(m))throw new Oe("dangling-resource-dependency",`${u.id} -> ${m}`);let f=new Map;for(let u of c)for(let m of u.aliases){let g=L(m);if(!g)continue;let h=f.get(g)??new Set;h.add(u.id),f.set(g,h)}let p=Object.freeze(Object.fromEntries([...f.entries()].sort(([u],[m])=>V(u,m)).map(([u,m])=>[u,Object.freeze([...m].sort(V))]))),d=Object.freeze(c.map(pu));return Object.freeze({schemaVersion:cu,resources:d,aliases:p})}var hu=[["data table","data grid","datatable","table","\u8868\u683C","\u6570\u636E\u8868","\u6570\u636E\u8868\u683C"],["button","action button","\u6309\u94AE","\u64CD\u4F5C\u6309\u94AE"],["dashboard","admin dashboard","\u4EEA\u8868\u76D8","\u540E\u53F0","\u7BA1\u7406\u540E\u53F0"],["kanban","kanban board","\u770B\u677F","\u4EFB\u52A1\u770B\u677F"],["form","input form","\u8868\u5355","\u8F93\u5165\u8868\u5355"],["navigation","nav","sidebar","\u5BFC\u822A","\u4FA7\u8FB9\u680F"]],yu=Object.freeze(hu.map((e)=>Object.freeze([...e]))),Wi=new Map;for(let e of yu){let t=Object.freeze([...new Set(e.map(L).filter(Boolean))].sort());for(let r of t)Wi.set(r,t)}function Ur(e){let t=L(e);return Wi.get(t)??Object.freeze([t])}class J extends Error{code;detail;constructor(e,t){super(`${e}: ${t}`);this.code=e;this.detail=t;this.name="ResourceQueryError"}}var Yr=Object.freeze({"exact-id":1000,"exact-title":900,alias:800,tag:600,capability:500,category:400,token:200,fuzzy:100}),bu=Object.freeze(Object.keys(Yr)),Ji=new Map(bu.map((e,t)=>[e,t])),Qi=new Map([["component",0],["template",1],["design-guide",2],["example",3],["skill",4]]);function K(e,t){return e<t?-1:e>t?1:0}function Xi(e){return new Set((e??[]).map(L).filter(Boolean))}function Vr(e,t){let r=Xi(t);if(r.size===0)return!0;let n=Xi(e);return[...r].some((i)=>n.has(i))}function Cu(e,t){if(t.kinds?.length&&!t.kinds.includes(e.kind))return!1;if(!Vr(e.tags,t.tags))return!1;if(!Vr(e.category?[e.category]:[],t.categories))return!1;if(!Vr(e.capabilities,t.capabilities))return!1;if(t.maturities?.length&&!t.maturities.includes(e.receipt.maturity))return!1;return!0}function Ru(e){return Boolean(e.kinds?.length||e.tags?.length||e.categories?.length||e.capabilities?.length||e.maturities?.length)}function ie(e,t,r,n=Yr[t]){if(e.some((i)=>i.code===t&&i.value===r))return;e.push({code:t,value:r,score:n})}function Kr(e,t){return e.find((r)=>L(r)===t)}function Gr(e){return[e.id,e.title,...e.aliases,...e.tags,...e.category?[e.category]:[],...e.capabilities]}function Su(e,t,r){if(Math.abs(e.length-t.length)>r)return r+1;let n=Array.from({length:t.length+1},(i,s)=>s);for(let i=1;i<=e.length;i+=1){let s=[i],o=i;for(let a=1;a<=t.length;a+=1){let c=(n[a-1]??r+1)+(e[i-1]===t[a-1]?0:1),l=Math.min((n[a]??r+1)+1,(s[a-1]??r+1)+1,c);s.push(l),o=Math.min(o,l)}if(o>r)return r+1;n=s}return n[t.length]??r+1}function xu(e,t){let r=L(t),n=[];if(L(e.id)===r)ie(n,"exact-id",e.id);if(L(e.title)===r)ie(n,"exact-title",e.title);let i=Kr(e.aliases,r);if(i)ie(n,"alias",i);let s=Kr(e.tags,r);if(s)ie(n,"tag",s);let o=Kr(e.capabilities,r);if(o)ie(n,"capability",o);if(e.category&&L(e.category)===r)ie(n,"category",e.category);if(!i){let l=Ur(r).filter((p)=>p!==r),f=new Set(Gr(e).map(L));if(l.some((p)=>f.has(p)))ie(n,"alias",t.trim())}let a=r.split(" ").filter(Boolean),c=L(Gr(e).join(" "));if(a.length>0&&a.every((l)=>c.includes(l)))ie(n,"token",t.trim());if(n.length===0&&r.length>=4){let l;for(let f of Gr(e)){let p=L(f);if(p.length<4)continue;let d=Su(r,p,2);if(d<=2&&(!l||d<l.distance||d===l.distance&&K(f,l.value)<0))l={value:f,distance:d}}if(l)ie(n,"fuzzy",l.value,Yr.fuzzy-l.distance)}return n.sort((l,f)=>{if(l.score!==f.score)return f.score-l.score;return(Ji.get(l.code)??99)-(Ji.get(f.code)??99)||K(l.value,f.value)})}function Zi(e,t,r){if(t.has(r))return[r];let n=L(r),i=e.aliases[n];if(i?.length)return[...i];let s=new Set;for(let o of Ur(n))for(let a of e.aliases[o]??[])s.add(a);return[...s].sort(K)}function es(e,t){return new J("resource-alias-ambiguous",`${e.trim()}: ${t.join(",")}`)}function ts(e){let t=new Map(e.resources.map((n)=>[n.id,n]));function r(n){let i=n.trim(),s=Zi(e,t,i);if(s.length===0)throw new J("resource-not-found",i);if(s.length>1)throw es(i,s);let o=s[0],a=o?t.get(o):void 0;if(!a)throw new J("resource-not-found",i);return a}return Object.freeze({manifest:()=>e,search(n){let i=n.text?.trim()??"";if(!i&&!Ru(n))throw new J("resource-query-empty","text or filter is required");if(n.limit!==void 0&&(!Number.isInteger(n.limit)||n.limit<=0))throw new J("resource-query-invalid-limit",String(n.limit));let s=e.resources.filter((o)=>Cu(o,n)).map((o)=>{let a=i?xu(o,i):[];return{resource:o,score:a.reduce((c,l)=>c+l.score,0),reasons:a}}).filter((o)=>!i||o.reasons.length>0).sort((o,a)=>a.score-o.score||K(o.resource.id,a.resource.id));return n.limit===void 0?s:s.slice(0,n.limit)},get:r,build(n){if(n.length===0||n.every((d)=>!d.trim()))throw new J("resource-query-empty","at least one build root is required");let i=[],s=new Set;for(let d of n){let u=d.trim(),m=Zi(e,t,u);if(m.length===0)i.push({id:u,reason:"missing-resource"});else if(m.length>1)throw es(u,m);else{let g=m[0];if(g)s.add(g)}}let o=new Set,a=new Set,c=new Set,l=[],f=[],p=(d,u)=>{if(o.has(d))return;if(a.has(d)){i.push({id:d,...u?{requiredBy:u}:{},reason:"dependency-cycle"});return}let m=t.get(d);if(!m){i.push({id:d,...u?{requiredBy:u}:{},reason:"missing-resource"});return}a.add(d),c.add(d);let g=[...m.dependencies].sort((h,R)=>{let x=t.get(h),w=t.get(R);return(Qi.get(x?.kind??"")??99)-(Qi.get(w?.kind??"")??99)||K(h,R)});for(let h of g)f.push({from:d,to:h,relation:"depends-on"}),p(h,d);a.delete(d),o.add(d),l.push(d)};for(let d of[...s].sort(K))p(d);return{roots:[...s].sort(K),nodes:[...c].sort(K).map((d)=>{let u=t.get(d);if(!u)throw new J("resource-not-found",d);return{id:d,kind:u.kind,maturity:u.receipt.maturity}}),edges:f.sort((d,u)=>K(d.from,u.from)||K(d.to,u.to)),order:l,gaps:i.sort((d,u)=>K(d.id,u.id)||K(d.requiredBy??"",u.requiredBy??"")||K(d.reason,u.reason))}}})}function Au(e){if(!e.name)throw Error("Artifact registry manifest requires a name");return e}async function Pu(e,t){let r=await fetch(e,t?{headers:t}:{});if(!r.ok)throw Error(`Failed to fetch ${e}: ${r.status} ${r.statusText}`);return await r.json()}async function zr(e,t){let r=e.endsWith("/registry.json")?e:`${e.replace(/\/$/,"")}/registry.json`,n=await Pu(r,t);return Au(n)}class Wr{options;id;priority;manifestPromise;constructor(e){this.options=e;this.id=e.id??e.registryUrl,this.priority=e.priority}getManifest(){return this.manifestPromise??=zr(this.options.registryUrl,this.options.headers),this.manifestPromise}async get(e){return(await this.getManifest()).items.find((r)=>r.name===e)}}class Jr{sources;constructor(e){this.sources=e}async resolve(e){let t=[...this.sources].sort((r,n)=>r.priority-n.priority);for(let r of t){let n=await r.get(e);if(n)return n}return}}var Tu="uibot.artifacts.lock.json";function Du(e){return se(e,"components","registry")}function Ou(e){return se(e,"templates","registry")}function Nu(e,t){if(e.kind==="component")return se(t.componentsDir??Du(t.workspaceRoot));return se(t.templatesDir??Ou(t.workspaceRoot))}function Lu(e){return se(e.workspaceRoot,e.lockfilePath??Tu)}function Mu(e){try{return JSON.parse(ku(e,"utf8"))}catch{return{version:1,artifacts:[]}}}function $u(e,t){is(Hr(e),{recursive:!0}),ss(e,`${JSON.stringify(t,null,2)}
|
|
207
|
+
`,"utf8")}function _u(e,t){return{version:1,artifacts:[...e.artifacts.filter((n)=>n.name!==t.name),t].sort((n,i)=>n.name.localeCompare(i.name))}}function qu(e){if(e.kind==="component")return{components:{[e.name]:e.catalogEntry}};return{templates:{[e.name]:e.templateContract}}}class Re extends Error{artifactName;offendingPath;baseDir;constructor(e,t,r){super(`Artifact "${e}" file path escapes workspace: "${t}" resolves outside "${r}"`);this.artifactName=e;this.offendingPath=t;this.baseDir=r;this.name="ArtifactContainmentError"}}function os(e,t){let r=t.endsWith(rs)?t:t+rs;return e===t||e.startsWith(r)}function ns(e){let t=se(e),r=[];while(!0)try{return wu(t),se(Eu(t),...r)}catch(n){if(n.code!=="ENOENT")throw n;let i=Hr(t);if(i===t)throw n;r.unshift(vu(t)),t=i}}function as(e,t,r,n){try{let i=ns(t),s=ns(e);if(!os(s,i))throw new Re(r,n,t)}catch(i){if(i instanceof Re)throw i;throw new Re(r,n,t)}}function cs(e,t,r){if(e.includes("\x00"))throw new Re(r,e,t);if(Iu(e))throw new Re(r,e,t);let n=se(t,e);if(!os(n,t))throw new Re(r,e,t);return as(n,t,r,e),n}function Fu(e,t){let r=[];for(let n of e.files){let i=n.target??n.path;r.push(cs(i,t,e.name))}return r}function ls(e,t){let r=se(t.workspaceRoot),n=Nu(e,t);as(n,r,e.name,n);let i=cs(e.name,n,e.name),s=Fu(e,i),o=[];for(let p=0;p<e.files.length;p++){let d=e.files[p],u=s[p];is(Hr(u),{recursive:!0}),ss(u,d.content??"","utf8"),o.push(u)}let a={name:e.name,version:e.version,source:t.source??"registry",installedAt:new Date().toISOString()},c=Lu(t),l=Mu(c),f=_u(l,a);return $u(c,f),{artifactLock:a,catalogPatch:qu(e),writtenFiles:o}}var We="http://127.0.0.1:3202/api/registry";async function Bu(e,t){if(!e)throw Error("uibot add: missing artifact name");let r=t.registry??We,n=t.log??((l)=>console.log(l)),i=t.sources??[new Wr({registryUrl:r,priority:0})],s=new Jr(i),o=[],a=new Set,c=[e];while(c.length>0){let l=c.shift();if(a.has(l))continue;a.add(l);let f=await s.resolve(l);if(!f)throw Error(`Artifact '${l}' not found in ${r}`);let p=ls(f.artifact,{workspaceRoot:t.workspaceRoot,source:r});o.push({name:f.artifact.name,version:f.artifact.version,files:p.writtenFiles.length});let d=f.artifact.kind==="template"?"template":"component";n(`Installed ${d} ${f.artifact.name}@${f.artifact.version} \u2192 ${p.writtenFiles.length} files`);let u=f.artifact.kind==="component"?f.artifact.registryDependencies:void 0;for(let m of u??[])if(!a.has(m))c.push(m)}return{installed:o}}async function ju(e={}){let t=e.registry??We,r=e.fetchManifest??((s)=>zr(s)),n=e.log??((s)=>console.log(s)),i=await r(t);for(let s of i.items)n(`${s.name} ${s.kind} ${s.title??""}`);return i}import{mkdirSync as Uu,writeFileSync as us}from"fs";import{resolve as Qr}from"path";function Vu(e,t){let r=Qr(e,"artifacts");Uu(r,{recursive:!0});let n=[],i=Qr(e,"registry.json");us(i,`${JSON.stringify(t,null,2)}
|
|
208
208
|
`,"utf8"),n.push(i);for(let s of t.items){let o=Qr(r,`${s.name}.json`);us(o,`${JSON.stringify(s,null,2)}
|
|
209
209
|
`,"utf8"),n.push(o)}return n}async function Ku(e){let t=e.log??((s)=>console.log(s)),r=e.sources;if(!r){if(!e.blockFileMap||!e.catalog||!e.sourceDir)throw Error("uibot publish: provide either `sources` or `blockFileMap` + `catalog` + `sourceDir`");r=_r({sourceDir:e.sourceDir,blockFileMap:e.blockFileMap,catalog:e.catalog,...e.readFile?{readFile:e.readFile}:{}})}let n=Vi(r,{name:e.manifestName??"local",...e.templates?.length?{templates:e.templates}:{}}),i=[];if(e.writeArtifacts)e.writeArtifacts(e.out,n);else i.push(...Vu(e.out,n));return t(`Published ${n.items.length} artifacts \u2192 ${e.out}`),{manifest:n,writtenFiles:i}}function Xr(e){let t={_:[]};for(let r=0;r<e.length;r+=1){let n=e[r];if(!n.startsWith("--")){t._.push(n);continue}let i=n.slice(2),s=i.indexOf("=");if(s>=0){t[i.slice(0,s)]=i.slice(s+1);continue}let o=e[r+1];if(o!==void 0&&!o.startsWith("--"))t[i]=o,r+=1;else t[i]=!0}return t}function Dt(e,t){let r=e[t];return typeof r==="string"?r:void 0}var Gu={string:"value","positive-integer":"n","resource-kind":"kind","resource-maturity":"maturity"};function Yu(e){let t=e.positionals.map((n)=>{let i=`${n.name}${"variadic"in n&&n.variadic?"...":""}`;return n.required?`<${i}>`:`[${i}]`}),r=e.options.map((n)=>`[--${n.name} <${Gu[n.type]}${"cliEncoding"in n&&n.cliEncoding==="comma-separated"?",...":""}>]`);return[e.name,...t,...r,"[--mode <text|json>]","[--dense]"].join(" ")}var Hu=De.map((e)=>({name:e.name,usage:Yu(e),summary:e.summary,group:"resources"})),zu=[...Hu,{name:"list",usage:"list [--registry <url>]",summary:"List installable artifact registry entries.",group:"artifacts"},{name:"add",usage:"add <name> [--registry <url>] [--cwd <dir>]",summary:"Install an artifact and its registry dependencies.",group:"artifacts"},{name:"publish",usage:"publish [--out <dir>] [--name <manifest-name>]",summary:"Publish the built-in artifact registry to a directory.",group:"artifacts"},{name:"design-md sync",usage:"design-md sync --from <github:owner/repo|https-url> [--cwd <dir>] [--mode json]",summary:"Pull remote design-md with source and license stamps.",group:"design"},{name:"regressions reverify",usage:"regressions reverify [--cwd <dir>] [--skill <id>] [--mode json]",summary:"Re-run resolved regressions and reactivate failures.",group:"skills"},{name:"skills promote",usage:"skills promote <id> [--cwd <dir>] [--mode json]",summary:"Mark a skill promoted and append its usage receipt.",group:"skills"},{name:"skills rollback",usage:"skills rollback <id> [--cwd <dir>] [--mode json]",summary:"Roll back a promoted skill marker with a usage receipt.",group:"skills"},{name:"project export",usage:"project export <dir> [--cwd <dir>] [--mode json]",summary:"Copy project-local .uibot state to a directory.",group:"project"},{name:"link",usage:"link --spec-dir <relative-dir> [--source-dir <dir>] [--cwd <dir>] [--force] [--mode json]",summary:"Register consumer Spec dir + digest pin (L2 Linked).",group:"linked"},{name:"sync push",usage:"sync push [--from <dir>] [--cwd <dir>] [--mode json]",summary:"Copy YAML Spec + lock digest from sourceDir into consumer.",group:"linked"},{name:"sync pull",usage:"sync pull [--to <dir>] [--cwd <dir>] [--mode json]",summary:"Copy YAML Spec from consumer back to sourceDir.",group:"linked"},{name:"doctor",usage:"doctor [--cwd <dir>] [--registry <url>] [--mode json]",summary:"Compare the artifact lockfile with its registry.",group:"diagnostics"},{name:"init",usage:"init <dir> [--template <name>] | init --into <existing-app> [--force] [--mode json]",summary:"Scaffold a project, or L1 Embed recipe into an existing app.",group:"project"}],Zr=Object.freeze(zu.map((e)=>Object.freeze(e))),Wu=["--mode <text|json> Structured output mode for resource commands.","--dense Compact resource payloads without changing ids/order/codes.","--registry <url> Artifact registry base URL.","--cwd <dir> Workspace root (default: cwd).","--out <dir> Output directory for publish.","--from <src> Remote source for design-md sync, or local Spec source for sync push.","--to <dir> Local Spec destination for sync pull.","--spec-dir <dir> Relative consumer Spec directory for link.","--source-dir <dir> Local studio/CP Spec directory recorded by link.","--control-plane-url <url> Hosted CP base URL for remote Spec sync (no secrets).","--project-id <id> Remote Spec project id (default: default).","--force Overwrite existing .uibot/link.json or init --into files.","--into <dir> Existing app root for L1 Embed scaffold (requires package.json).","--spec-path <rel> Relative Spec YAML path for init --into (default: src/pages/home.uibot.yaml).","--mount-path <rel> Relative mount snippet path for init --into.","--template <name> Template name for greenfield init."];function Ju(){let e=Zr.map((n)=>` uibot ${n.usage}`).join(`
|
|
210
210
|
`),t=Zr.map((n)=>` ${n.name.padEnd(22)} ${n.summary}`).join(`
|
|
@@ -219,4 +219,4 @@ ${t}
|
|
|
219
219
|
|
|
220
220
|
Flags:
|
|
221
221
|
${r}
|
|
222
|
-
`}var tn="uibot.resource.envelope.v1",Qu=["resource-cli-invalid-mode","resource-cli-invalid-argument","resource-cli-internal-error"];class G extends Error{code;detail;constructor(e,t){super(`${e}: ${t}`);this.code=e;this.detail=t;this.name="ResourceCliError"}}function en(e){return{id:e.id,kind:e.kind,title:e.title,description:e.description,...e.category?{category:e.category}:{},...e.tags.length?{tags:e.tags}:{},...e.capabilities.length?{capabilities:e.capabilities}:{},...e.dependencies.length?{dependencies:e.dependencies}:{},source:e.source,maturity:e.receipt.maturity,receiptLevel:e.receipt.level,...e.receipt.evidence.length?{evidence:e.receipt.evidence}:{}}}function Xu(e){return{id:e.resource.id,score:e.score,reasons:e.reasons,resource:en(e.resource)}}function ps(){return typeof crypto.randomUUID==="function"?crypto.randomUUID():`resource-${Date.now().toString(36)}`}function fs(e,t){return{dense:t,encoding:t?"dense-v1":"full",resourceIndexSchemaVersion:e.manifest().schemaVersion}}function Zu(e,t,r,n){return{schemaVersion:tn,requestId:r.requestId??ps(),command:e,ok:!0,data:t,meta:fs(r.queryService,n)}}function ed(e,t,r,n){let i=t instanceof J||t instanceof G?t.code:"resource-cli-internal-error",s=t instanceof J||t instanceof G?t.detail:"resource command failed";return{schemaVersion:tn,requestId:r.requestId??ps(),command:e,ok:!1,error:{code:i,message:`${i}: ${s}`,detail:s},meta:fs(r.queryService,n)}}function Ot(e,t){let r=e[t];if(r===void 0)return;if(typeof r!=="string")throw new G("resource-cli-invalid-argument",`--${t} requires a value`);let n=r.split(",").map((i)=>i.trim()).filter(Boolean);if(n.length===0)throw new G("resource-cli-invalid-argument",`--${t} is empty`);return n}function ds(e,t,r){let n=Ot(e,t);if(!n)return;for(let i of n)if(!r.includes(i))throw new G("resource-cli-invalid-argument",`--${t}=${i}; expected one of ${r.join(",")}`);return n}function td(e){let t=ds(e,"kind",Ki),r=Ot(e,"tag"),n=Ot(e,"category"),i=Ot(e,"capability"),s=ds(e,"maturity",Br),o=Dt(e,"limit"),a;if(e.limit!==void 0){if(!o||!/^\d+$/.test(o)||Number(o)<=0)throw new G("resource-cli-invalid-argument",`--limit=${o??"<missing>"}; expected a positive integer`);a=Number(o)}let c=e._.join(" ").trim();return{...c?{text:c}:{},...t?{kinds:t}:{},...r?{tags:r}:{},...n?{categories:n}:{},...i?{capabilities:i}:{},...s?{maturities:s}:{},...a!==void 0?{limit:a}:{}}}function rd(e,t,r){if(e==="manifest"){let n=t;for(let i of n.index.resources)r(`${i.id} ${i.kind} ${i.receipt.maturity} ${i.title}`);return}if(e==="search"){let n=t;for(let i of n.matches)r(`${i.resource.id} ${i.score} ${i.reasons.map((s)=>s.code).join(",")} ${i.resource.title}`);return}r(JSON.stringify(t,null,2))}async function nd(e,t,r){let n=Xr(t),i=r.log??((f)=>console.log(f)),s=r.errorLog??((f)=>console.error(f)),o=n.dense,a=o===!0,c=Dt(n,"mode"),l=c??"text";try{let f=De.find((g)=>g.name===e),p=new Set(["mode","dense",...f.options.map((g)=>g.name)]),d=Object.keys(n).find((g)=>g!=="_"&&!p.has(g));if(d)throw new G("resource-cli-invalid-argument",`unsupported flag --${d} for ${e}`);if(n.mode!==void 0&&c===void 0)throw new G("resource-cli-invalid-mode","--mode requires text or json");if(l!=="text"&&l!=="json")throw new G("resource-cli-invalid-mode",`${l}; expected text or json`);if(o!==void 0&&o!==!0)throw new G("resource-cli-invalid-argument","--dense does not take a value");let u;switch(e){case"manifest":{if(n._.length>0)throw new G("resource-cli-invalid-argument","manifest does not accept positionals");let g=r.queryService.manifest();u={operations:De,index:a?{schemaVersion:g.schemaVersion,resources:g.resources.map(en),aliasLookup:Object.entries(g.aliases)}:g};break}case"search":{let g=r.queryService.search(td(n));u={matches:a?g.map(Xu):g};break}case"get":{if(n._.length!==1)throw new G("resource-cli-invalid-argument","get requires exactly one id or quoted alias");let g=r.queryService.get(n._[0]);u={resource:a?en(g):g};break}case"build":{u={plan:r.queryService.build(n._)};break}}let m=Zu(e,u,r,a);if(l==="json")i(JSON.stringify(m));else rd(e,u,i);return 0}catch(f){let p=f instanceof Error?f:Error(String(f)),d=ed(e,p,r,a);if(l==="json"||c!==void 0)i(JSON.stringify(d));else s(d.error.message);return 1}}import{existsSync as xw}from"fs";import{resolve as Ae}from"path";function Tl(e){for(let t of e)if(xw(t))return t;return null}function ww(e=process.cwd()){return Tl([Ae(e,"examples/templates"),Ae(import.meta.dir,"templates"),Ae(import.meta.dir,"../../../examples/templates")])}function kw(e=process.cwd()){return Tl([Ae(e,"examples/shells"),Ae(import.meta.dir,"shells"),Ae(import.meta.dir,"../../../examples/shells")])}function
|
|
222
|
+
`}var tn="uibot.resource.envelope.v1",Qu=["resource-cli-invalid-mode","resource-cli-invalid-argument","resource-cli-internal-error"];class G extends Error{code;detail;constructor(e,t){super(`${e}: ${t}`);this.code=e;this.detail=t;this.name="ResourceCliError"}}function en(e){return{id:e.id,kind:e.kind,title:e.title,description:e.description,...e.category?{category:e.category}:{},...e.tags.length?{tags:e.tags}:{},...e.capabilities.length?{capabilities:e.capabilities}:{},...e.dependencies.length?{dependencies:e.dependencies}:{},source:e.source,maturity:e.receipt.maturity,receiptLevel:e.receipt.level,...e.receipt.evidence.length?{evidence:e.receipt.evidence}:{}}}function Xu(e){return{id:e.resource.id,score:e.score,reasons:e.reasons,resource:en(e.resource)}}function ps(){return typeof crypto.randomUUID==="function"?crypto.randomUUID():`resource-${Date.now().toString(36)}`}function fs(e,t){return{dense:t,encoding:t?"dense-v1":"full",resourceIndexSchemaVersion:e.manifest().schemaVersion}}function Zu(e,t,r,n){return{schemaVersion:tn,requestId:r.requestId??ps(),command:e,ok:!0,data:t,meta:fs(r.queryService,n)}}function ed(e,t,r,n){let i=t instanceof J||t instanceof G?t.code:"resource-cli-internal-error",s=t instanceof J||t instanceof G?t.detail:"resource command failed";return{schemaVersion:tn,requestId:r.requestId??ps(),command:e,ok:!1,error:{code:i,message:`${i}: ${s}`,detail:s},meta:fs(r.queryService,n)}}function Ot(e,t){let r=e[t];if(r===void 0)return;if(typeof r!=="string")throw new G("resource-cli-invalid-argument",`--${t} requires a value`);let n=r.split(",").map((i)=>i.trim()).filter(Boolean);if(n.length===0)throw new G("resource-cli-invalid-argument",`--${t} is empty`);return n}function ds(e,t,r){let n=Ot(e,t);if(!n)return;for(let i of n)if(!r.includes(i))throw new G("resource-cli-invalid-argument",`--${t}=${i}; expected one of ${r.join(",")}`);return n}function td(e){let t=ds(e,"kind",Ki),r=Ot(e,"tag"),n=Ot(e,"category"),i=Ot(e,"capability"),s=ds(e,"maturity",Br),o=Dt(e,"limit"),a;if(e.limit!==void 0){if(!o||!/^\d+$/.test(o)||Number(o)<=0)throw new G("resource-cli-invalid-argument",`--limit=${o??"<missing>"}; expected a positive integer`);a=Number(o)}let c=e._.join(" ").trim();return{...c?{text:c}:{},...t?{kinds:t}:{},...r?{tags:r}:{},...n?{categories:n}:{},...i?{capabilities:i}:{},...s?{maturities:s}:{},...a!==void 0?{limit:a}:{}}}function rd(e,t,r){if(e==="manifest"){let n=t;for(let i of n.index.resources)r(`${i.id} ${i.kind} ${i.receipt.maturity} ${i.title}`);return}if(e==="search"){let n=t;for(let i of n.matches)r(`${i.resource.id} ${i.score} ${i.reasons.map((s)=>s.code).join(",")} ${i.resource.title}`);return}r(JSON.stringify(t,null,2))}async function nd(e,t,r){let n=Xr(t),i=r.log??((f)=>console.log(f)),s=r.errorLog??((f)=>console.error(f)),o=n.dense,a=o===!0,c=Dt(n,"mode"),l=c??"text";try{let f=De.find((g)=>g.name===e),p=new Set(["mode","dense",...f.options.map((g)=>g.name)]),d=Object.keys(n).find((g)=>g!=="_"&&!p.has(g));if(d)throw new G("resource-cli-invalid-argument",`unsupported flag --${d} for ${e}`);if(n.mode!==void 0&&c===void 0)throw new G("resource-cli-invalid-mode","--mode requires text or json");if(l!=="text"&&l!=="json")throw new G("resource-cli-invalid-mode",`${l}; expected text or json`);if(o!==void 0&&o!==!0)throw new G("resource-cli-invalid-argument","--dense does not take a value");let u;switch(e){case"manifest":{if(n._.length>0)throw new G("resource-cli-invalid-argument","manifest does not accept positionals");let g=r.queryService.manifest();u={operations:De,index:a?{schemaVersion:g.schemaVersion,resources:g.resources.map(en),aliasLookup:Object.entries(g.aliases)}:g};break}case"search":{let g=r.queryService.search(td(n));u={matches:a?g.map(Xu):g};break}case"get":{if(n._.length!==1)throw new G("resource-cli-invalid-argument","get requires exactly one id or quoted alias");let g=r.queryService.get(n._[0]);u={resource:a?en(g):g};break}case"build":{u={plan:r.queryService.build(n._)};break}}let m=Zu(e,u,r,a);if(l==="json")i(JSON.stringify(m));else rd(e,u,i);return 0}catch(f){let p=f instanceof Error?f:Error(String(f)),d=ed(e,p,r,a);if(l==="json"||c!==void 0)i(JSON.stringify(d));else s(d.error.message);return 1}}import{existsSync as xw}from"fs";import{resolve as Ae}from"path";function Tl(e){for(let t of e)if(xw(t))return t;return null}function ww(e=process.cwd()){return Tl([Ae(e,"examples/templates"),Ae(import.meta.dir,"templates"),Ae(import.meta.dir,"../../../examples/templates")])}function kw(e=process.cwd()){return Tl([Ae(e,"examples/shells"),Ae(import.meta.dir,"shells"),Ae(import.meta.dir,"../../../examples/shells")])}function Ew(e){let t={};for(let r of e)for(let[n,i]of Object.entries(r)){if(t[n])throw Error(`duplicate built-in catalog source id: ${n}`);t[n]=i}return t}async function vw(){let[e,t,r]=await Promise.all([import("@uibot/blocks-shadcn"),import("@uibot/blocks-studio"),Promise.resolve().then(() => (Pl(),{}))]),n=[],i=ww();if(i)n.push({dir:i});let s=kw();if(s)n.push({dir:s,defaultLevel:"L3",defaultCategory:"feature",extraKeywords:["sidebar","app-shell","shell"]});let o=qr(n),a=Object.fromEntries(o.map((c)=>[c.name,c.templateContract]));return ts(zi({components:Ew([e.CATALOG_ENTRIES,t.STUDIO_CATALOG_ENTRIES]),templates:a,designGuides:Sl(Ae(import.meta.dir,"../../design-md/content")),examples:Hi(a)}))}export{We as DEFAULT_REGISTRY,Qu as RESOURCE_CLI_ERROR_CODES,Zr as UIBOT_CLI_COMMAND_MANIFEST,tn as UIBOT_RESOURCE_ENVELOPE_SCHEMA_VERSION,vw as loadBuiltInResourceQueryService,Xr as parseFlags,Ju as renderCliUsage,Bu as runAdd,ju as runList,Ku as runPublish,nd as runResourceCommand,Dt as stringFlag};
|