noskills 4.1.53 → 4.1.55
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/chunks/{approve-ZX62EG5U.js → approve-73ZFRV7E.js} +1 -1
- package/chunks/{block-ERQESYMH.js → block-5APPOQQK.js} +1 -1
- package/chunks/{cancel-FOVCYBQY.js → cancel-ZYRZPFRH.js} +1 -1
- package/chunks/chunk-D3IKJ7FF.js +1 -0
- package/chunks/{chunk-6YHWLEJ4.js → chunk-DZTBXXB3.js} +1 -1
- package/chunks/chunk-EKZXJCT7.js +5 -0
- package/chunks/{chunk-OVLGUKPG.js → chunk-O2NUECRA.js} +1 -1
- package/chunks/chunk-U5SHLIO4.js +3 -0
- package/chunks/{chunk-KYQ77E7T.js → chunk-VAP3TSYK.js} +1 -1
- package/chunks/chunk-XS5JHAC7.js +1 -0
- package/chunks/{chunk-5URW6X3N.js → chunk-XXBSEOQR.js} +16 -16
- package/chunks/{concern-2PON4VPG.js → concern-RB444PUE.js} +1 -1
- package/chunks/{delegate-VRPCGUT2.js → delegate-QBPFR44C.js} +1 -1
- package/chunks/{diagrams-D5CYTTWA.js → diagrams-H7NLJF7W.js} +1 -1
- package/chunks/done-Z2MFKQ45.js +1 -0
- package/chunks/{followup-Q3RLSNNM.js → followup-JR63B3JS.js} +1 -1
- package/chunks/{init-HTCNOWTZ.js → init-F7JCAPQS.js} +1 -1
- package/chunks/{invoke-hook-675IUCLN.js → invoke-hook-CGV6UHU7.js} +9 -9
- package/chunks/{learn-MWUFAR2G.js → learn-KIZTV5OH.js} +1 -1
- package/chunks/{manager-Q7DRXNNO.js → manager-R5KNPWLT.js} +1 -1
- package/chunks/next-J2YKXUKA.js +7 -0
- package/chunks/{pack-DXWS4PMA.js → pack-33LQ7SJT.js} +1 -1
- package/chunks/{purge-XZ5EOCFP.js → purge-G22VY6CI.js} +1 -1
- package/chunks/{reopen-VATALF56.js → reopen-JTFZBGHT.js} +1 -1
- package/chunks/{reset-BL73UVLM.js → reset-AW2IS3F6.js} +1 -1
- package/chunks/{review-VF6JOTLX.js → review-EESYDNMA.js} +1 -1
- package/chunks/{rule-ODX4WMCS.js → rule-XREVPB5P.js} +1 -1
- package/chunks/{run-J5Z6R4DP.js → run-K7FAF7RR.js} +1 -1
- package/chunks/{session-DFMI2GCC.js → session-HBP5GGI2.js} +1 -1
- package/chunks/{spec-3PAUTPIT.js → spec-5B3HC5PT.js} +1 -1
- package/chunks/{status-5JHFFTMD.js → status-CQ4U3KBF.js} +1 -1
- package/chunks/{sync-CVEZ4FMQ.js → sync-TJLHMISX.js} +1 -1
- package/chunks/{watch-I7Q3AEAQ.js → watch-WCX4YBL5.js} +1 -1
- package/chunks/{web-JOWEH622.js → web-PEDL6264.js} +1 -1
- package/chunks/{wontfix-CJMNFDCG.js → wontfix-7JMQAMWG.js} +1 -1
- package/noskills.js +1 -1
- package/package.json +1 -1
- package/chunks/chunk-DEIZVYT6.js +0 -1
- package/chunks/chunk-OKM4FE4G.js +0 -1
- package/chunks/chunk-RGGYSKJY.js +0 -5
- package/chunks/chunk-SVJVJDZR.js +0 -3
- package/chunks/done-WQDGQZ5D.js +0 -1
- package/chunks/next-7W4YVHSZ.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as O}from"./chunk-XNGHRJVK.js";import{a as st,c as m,e as $o}from"./chunk-OTRBRRIO.js";var q=m($=>{"use strict";var ss=Symbol.for("yaml.alias"),
|
|
1
|
+
import{i as O}from"./chunk-XNGHRJVK.js";import{a as st,c as m,e as $o}from"./chunk-OTRBRRIO.js";var q=m($=>{"use strict";var ss=Symbol.for("yaml.alias"),Rn=Symbol.for("yaml.document"),nt=Symbol.for("yaml.map"),jn=Symbol.for("yaml.pair"),ns=Symbol.for("yaml.scalar"),it=Symbol.for("yaml.seq"),x=Symbol.for("yaml.node.type"),Mo=s=>!!s&&typeof s=="object"&&s[x]===ss,_o=s=>!!s&&typeof s=="object"&&s[x]===Rn,Fo=s=>!!s&&typeof s=="object"&&s[x]===nt,Bo=s=>!!s&&typeof s=="object"&&s[x]===jn,Kn=s=>!!s&&typeof s=="object"&&s[x]===ns,Ro=s=>!!s&&typeof s=="object"&&s[x]===it;function xn(s){if(s&&typeof s=="object")switch(s[x]){case nt:case it:return!0}return!1}function jo(s){if(s&&typeof s=="object")switch(s[x]){case ss:case nt:case ns:case it:return!0}return!1}var Ko=s=>(Kn(s)||xn(s))&&!!s.anchor;$.ALIAS=ss;$.DOC=Rn;$.MAP=nt;$.NODE_TYPE=x;$.PAIR=jn;$.SCALAR=ns;$.SEQ=it;$.hasAnchor=Ko;$.isAlias=Mo;$.isCollection=xn;$.isDocument=_o;$.isMap=Fo;$.isNode=jo;$.isPair=Bo;$.isScalar=Kn;$.isSeq=Ro});var Ae=m(is=>{"use strict";var P=q(),D=Symbol("break visit"),Un=Symbol("skip children"),j=Symbol("remove node");function rt(s,e){let t=Yn(e);P.isDocument(s)?ue(null,s.contents,t,Object.freeze([s]))===j&&(s.contents=null):ue(null,s,t,Object.freeze([]))}rt.BREAK=D;rt.SKIP=Un;rt.REMOVE=j;function ue(s,e,t,n){let i=Jn(s,e,t,n);if(P.isNode(i)||P.isPair(i))return Vn(s,n,i),ue(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ue(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===D)return D;o===j&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){n=Object.freeze(n.concat(e));let r=ue("key",e.key,t,n);if(r===D)return D;r===j&&(e.key=null);let o=ue("value",e.value,t,n);if(o===D)return D;o===j&&(e.value=null)}}return i}async function ot(s,e){let t=Yn(e);P.isDocument(s)?await fe(null,s.contents,t,Object.freeze([s]))===j&&(s.contents=null):await fe(null,s,t,Object.freeze([]))}ot.BREAK=D;ot.SKIP=Un;ot.REMOVE=j;async function fe(s,e,t,n){let i=await Jn(s,e,t,n);if(P.isNode(i)||P.isPair(i))return Vn(s,n,i),fe(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await fe(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===D)return D;o===j&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){n=Object.freeze(n.concat(e));let r=await fe("key",e.key,t,n);if(r===D)return D;r===j&&(e.key=null);let o=await fe("value",e.value,t,n);if(o===D)return D;o===j&&(e.value=null)}}return i}function Yn(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function Jn(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(P.isMap(e))return t.Map?.(s,e,n);if(P.isSeq(e))return t.Seq?.(s,e,n);if(P.isPair(e))return t.Pair?.(s,e,n);if(P.isScalar(e))return t.Scalar?.(s,e,n);if(P.isAlias(e))return t.Alias?.(s,e,n)}function Vn(s,e,t){let n=e[e.length-1];if(P.isCollection(n))n.items[s]=t;else if(P.isPair(n))s==="key"?n.key=t:n.value=t;else if(P.isDocument(n))n.contents=t;else{let i=P.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}is.visit=rt;is.visitAsync=ot});var rs=m(Gn=>{"use strict";var Wn=q(),xo=Ae(),Uo={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Yo=s=>s.replace(/[!,[\]{}]/g,e=>Uo[e]),Ne=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Yo(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&Wn.isNode(e.contents)){let r={};xo.visit(e.contents,(o,a)=>{Wn.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
2
2
|
`)}};Ne.defaultYaml={explicit:!1,version:"1.2"};Ne.defaultTags={"!!":"tag:yaml.org,2002:"};Gn.Directives=Ne});var at=m(qe=>{"use strict";var Qn=q(),Jo=Ae();function Vo(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Hn(s){let e=new Set;return Jo.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Xn(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function Wo(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=Hn(s));let o=Xn(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(Qn.isScalar(o.node)||Qn.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}qe.anchorIsValid=Vo;qe.anchorNames=Hn;qe.createNodeAnchors=Wo;qe.findNewAnchor=Xn});var os=m(zn=>{"use strict";function Oe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=Oe(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Oe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Oe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Oe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}zn.applyReviver=Oe});var J=m(ei=>{"use strict";var Go=q();function Zn(s,e,t){if(Array.isArray(s))return s.map((n,i)=>Zn(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Go.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}ei.toJS=Zn});var lt=m(si=>{"use strict";var Qo=os(),ti=q(),Ho=J(),as=class{constructor(e){Object.defineProperty(this,ti.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!ti.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=Ho.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?Qo.applyReviver(r,{"":a},"",a):a}};si.NodeBase=as});var Ee=m(ni=>{"use strict";var Xo=at(),zo=Ae(),de=q(),Zo=lt(),ea=J(),ls=class extends Zo.NodeBase{constructor(e){super(de.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],zo.visit(e,{Node:(r,o)=>{(de.isAlias(o)||de.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(ea.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=ct(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(Xo.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function ct(s,e,t){if(de.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(de.isCollection(e)){let n=0;for(let i of e.items){let r=ct(s,i,t);r>n&&(n=r)}return n}else if(de.isPair(e)){let n=ct(s,e.key,t),i=ct(s,e.value,t);return Math.max(n,i)}return 1}ni.Alias=ls});var C=m(cs=>{"use strict";var ta=q(),sa=lt(),na=J(),ia=s=>!s||typeof s!="function"&&typeof s!="object",V=class extends sa.NodeBase{constructor(e){super(ta.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:na.toJS(this.value,e,t)}toString(){return String(this.value)}};V.BLOCK_FOLDED="BLOCK_FOLDED";V.BLOCK_LITERAL="BLOCK_LITERAL";V.PLAIN="PLAIN";V.QUOTE_DOUBLE="QUOTE_DOUBLE";V.QUOTE_SINGLE="QUOTE_SINGLE";cs.Scalar=V;cs.isScalarValue=ia});var Te=m(ri=>{"use strict";var ra=Ee(),te=q(),ii=C(),oa="tag:yaml.org,2002:";function aa(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function la(s,e,t){if(te.isDocument(s)&&(s=s.contents),te.isNode(s))return s;if(te.isPair(s)){let u=t.schema[te.MAP].createNode?.(t.schema,null,t);return u.items.push(s),u}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new ra.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=oa+e.slice(2));let c=aa(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let u=new ii.Scalar(s);return l&&(l.node=u),u}c=s instanceof Map?o[te.MAP]:Symbol.iterator in Object(s)?o[te.SEQ]:o[te.MAP]}r&&(r(c),delete t.onTagObj);let h=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new ii.Scalar(s);return e?h.tag=e:c.default||(h.tag=c.tag),l&&(l.node=h),h}ri.createNode=la});var ft=m(ut=>{"use strict";var ca=Te(),K=q(),ua=lt();function us(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return ca.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var oi=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,fs=class extends ua.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));return e&&(t.schema=e),t.items=t.items.map(n=>K.isNode(n)||K.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(oi(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(K.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,us(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(K.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&K.isScalar(r)?r.value:r:K.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!K.isPair(t))return!1;let n=t.value;return n==null||e&&K.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return K.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(K.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,us(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};ut.Collection=fs;ut.collectionFromPath=us;ut.isEmptyPath=oi});var Ce=m(dt=>{"use strict";var fa=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function ds(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var da=(s,e,t)=>s.endsWith(`
|
|
3
3
|
`)?ds(t,e):t.includes(`
|
|
4
4
|
`)?`
|
|
@@ -48,10 +48,10 @@ ${l}${d}`:`
|
|
|
48
48
|
`))&&(c=!0),u.push(S),h=u.length}let{start:f,end:y}=t;if(u.length===0)return f+y;if(!c){let g=u.reduce((d,p)=>d+p.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=f;for(let d of u)g+=d?`
|
|
49
49
|
${r}${i}${d}`:`
|
|
50
50
|
`;return`${g}
|
|
51
|
-
${i}${y}`}else return`${f}${o}${u.join(" ")}${o}${y}`}function Nt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=At.indentComment(e(n),s);t.push(r.trimStart())}}ki.stringifyCollection=_a});var X=m(qs=>{"use strict";var
|
|
51
|
+
${i}${y}`}else return`${f}${o}${u.join(" ")}${o}${y}`}function Nt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=At.indentComment(e(n),s);t.push(r.trimStart())}}ki.stringifyCollection=_a});var X=m(qs=>{"use strict";var Ra=As(),ja=vs(),Ka=ft(),H=q(),qt=Q(),xa=C();function _e(s,e){let t=H.isScalar(e)?e.value:e;for(let n of s)if(H.isPair(n)&&(n.key===e||n.key===t||H.isScalar(n.key)&&n.key.value===t))return n}var Ns=class extends Ka.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(H.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(t,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||i)&&o.items.push(qt.createPair(l,c,n))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;H.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new qt.Pair(e,e?.value):n=new qt.Pair(e.key,e.value);let i=_e(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);H.isScalar(i.value)&&xa.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(a=>r(n,a)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=_e(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=_e(this.items,e)?.value;return(!t&&H.isScalar(i)?i.value:i)??void 0}has(e){return!!_e(this.items,e)}set(e,t){this.add(new qt.Pair(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)ja.addPairToJSMap(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!H.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ra.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};qs.YAMLMap=Ns;qs.findPair=_e});var pe=m(Ni=>{"use strict";var Ua=q(),Ai=X(),Ya={collection:"map",default:!0,nodeClass:Ai.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return Ua.isMap(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>Ai.YAMLMap.from(s,e,t)};Ni.map=Ya});var z=m(qi=>{"use strict";var Ja=Te(),Va=As(),Wa=ft(),Et=q(),Ga=C(),Qa=J(),Os=class extends Wa.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Et.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Ot(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=Ot(e);if(typeof n!="number")return;let i=this.items[n];return!t&&Et.isScalar(i)?i.value:i}has(e){let t=Ot(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=Ot(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];Et.isScalar(i)&&Ga.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(Qa.toJS(r,String(i++),t));return n}toString(e,t,n){return e?Va.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){let l=t instanceof Set?a:String(o++);a=i.call(t,l,a)}r.items.push(Ja.createNode(a,void 0,n))}}return r}};function Ot(s){let e=Et.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}qi.YAMLSeq=Os});var ye=m(Ei=>{"use strict";var Ha=q(),Oi=z(),Xa={collection:"seq",default:!0,nodeClass:Oi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return Ha.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>Oi.YAMLSeq.from(s,e,t)};Ei.seq=Xa});var Fe=m(Ti=>{"use strict";var za=Pe(),Za={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),za.stringifyString(s,e,t,n)}};Ti.string=Za});var Tt=m(Ii=>{"use strict";var Ci=C(),Li={identify:s=>s==null,createNode:()=>new Ci.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ci.Scalar(null),stringify:({source:s},e)=>typeof s=="string"&&Li.test.test(s)?s:e.options.nullStr};Ii.nullTag=Li});var Es=m($i=>{"use strict";var el=C(),Pi={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new el.Scalar(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&Pi.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};$i.boolTag=Pi});var me=m(Di=>{"use strict";function tl({format:s,minFractionDigits:e,tag:t,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 r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}Di.stringifyNumber=tl});var Cs=m(Ct=>{"use strict";var sl=C(),Ts=me(),nl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ts.stringifyNumber},il={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Ts.stringifyNumber(s)}},rl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new sl.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:Ts.stringifyNumber};Ct.float=rl;Ct.floatExp=il;Ct.floatNaN=nl});var Is=m(It=>{"use strict";var Mi=me(),Lt=s=>typeof s=="bigint"||Number.isInteger(s),Ls=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function _i(s,e,t){let{value:n}=s;return Lt(n)&&n>=0?t+n.toString(e):Mi.stringifyNumber(s)}var ol={identify:s=>Lt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Ls(s,2,8,t),stringify:s=>_i(s,8,"0o")},al={identify:Lt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Ls(s,0,10,t),stringify:Mi.stringifyNumber},ll={identify:s=>Lt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Ls(s,2,16,t),stringify:s=>_i(s,16,"0x")};It.int=al;It.intHex=ll;It.intOct=ol});var Bi=m(Fi=>{"use strict";var cl=pe(),ul=Tt(),fl=ye(),dl=Fe(),hl=Es(),Ps=Cs(),$s=Is(),pl=[cl.map,fl.seq,dl.string,ul.nullTag,hl.boolTag,$s.intOct,$s.int,$s.intHex,Ps.floatNaN,Ps.floatExp,Ps.float];Fi.schema=pl});var Ki=m(ji=>{"use strict";var yl=C(),ml=pe(),gl=ye();function Ri(s){return typeof s=="bigint"||Number.isInteger(s)}var Pt=({value:s})=>JSON.stringify(s),bl=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:Pt},{identify:s=>s==null,createNode:()=>new yl.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Pt},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:Pt},{identify:Ri,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>Ri(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:Pt}],Sl={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},wl=[ml.map,gl.seq].concat(bl,Sl);ji.schema=wl});var Ms=m(xi=>{"use strict";var Be=st("buffer"),Ds=C(),vl=Pe(),kl={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Be.Buffer=="function")return Be.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";let o=t,a;if(typeof Be.Buffer=="function")a=o instanceof Be.Buffer?o.toString("base64"):Be.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Ds.Scalar.BLOCK_LITERAL),e!==Ds.Scalar.QUOTE_DOUBLE){let l=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/l),h=new Array(c);for(let u=0,f=0;u<c;++u,f+=l)h[u]=a.substr(f,l);a=h.join(e===Ds.Scalar.BLOCK_LITERAL?`
|
|
52
52
|
`:" ")}return vl.stringifyString({comment:s,type:e,value:a},n,i,r)}};xi.binary=kl});var Mt=m(Dt=>{"use strict";var $t=q(),_s=Q(),Al=C(),Nl=z();function Ui(s,e){if($t.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!$t.isPair(n)){if($t.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new _s.Pair(new Al.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
|
|
53
53
|
${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
|
|
54
|
-
${r.comment}`:n.comment}n=i}s.items[t]=$t.isPair(n)?n:new _s.Pair(n)}}else e("Expected a sequence for this tag");return s}function Yi(s,e,t){let{replacer:n}=t,i=new Nl.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(_s.createPair(a,l,t))}return i}var ql={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ui,createNode:Yi};Dt.createPairs=Yi;Dt.pairs=ql;Dt.resolvePairs=Ui});var js=m(Bs=>{"use strict";var Ji=q(),Fs=J(),je=X(),Ol=z(),Vi=Mt(),ne=class s extends Ol.YAMLSeq{constructor(){super(),this.add=je.YAMLMap.prototype.add.bind(this),this.delete=je.YAMLMap.prototype.delete.bind(this),this.get=je.YAMLMap.prototype.get.bind(this),this.has=je.YAMLMap.prototype.has.bind(this),this.set=je.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(Ji.isPair(i)?(r=Fs.toJS(i.key,"",t),o=Fs.toJS(i.value,r,t)):r=Fs.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=Vi.createPairs(e,t,n),r=new this;return r.items=i.items,r}};ne.tag="tag:yaml.org,2002:omap";var El={collection:"seq",identify:s=>s instanceof Map,nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Vi.resolvePairs(s,e),n=[];for(let{key:i}of t.items)Ji.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new ne,t)},createNode:(s,e,t)=>ne.from(s,e,t)};Bs.YAMLOMap=ne;Bs.omap=El});var Xi=m(Rs=>{"use strict";var Wi=C();function Gi({value:s,source:e},t){return e&&(s?Qi:Hi).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Qi={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Wi.Scalar(!0),stringify:Gi},Hi={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Wi.Scalar(!1),stringify:Gi};Rs.falseTag=Hi;Rs.trueTag=Qi});var zi=m(_t=>{"use strict";var Tl=C(),Ks=me(),Cl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ks.stringifyNumber},Ll={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Ks.stringifyNumber(s)}},Il={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new Tl.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Ks.stringifyNumber};_t.float=Il;_t.floatExp=Ll;_t.floatNaN=Cl});var er=m(Ke=>{"use strict";var Zi=me(),Re=s=>typeof s=="bigint"||Number.isInteger(s);function Ft(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}function xs(s,e,t){let{value:n}=s;if(Re(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return Zi.stringifyNumber(s)}var Pl={identify:Re,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>Ft(s,2,2,t),stringify:s=>xs(s,2,"0b")},$l={identify:Re,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>Ft(s,1,8,t),stringify:s=>xs(s,8,"0")},Dl={identify:Re,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>Ft(s,0,10,t),stringify:Zi.stringifyNumber},Ml={identify:Re,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>Ft(s,2,16,t),stringify:s=>xs(s,16,"0x")};Ke.int=Dl;Ke.intBin=Pl;Ke.intHex=Ml;Ke.intOct=$l});var Ys=m(Us=>{"use strict";var Rt=q(),Bt=Q(),jt=X(),ie=class s extends jt.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(e){let t;Rt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Bt.Pair(e.key,null):t=new Bt.Pair(e,null),jt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=jt.findPair(this.items,e);return!t&&Rt.isPair(n)?Rt.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=jt.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Bt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Bt.createPair(o,null,n));return r}};ie.tag="tag:yaml.org,2002:set";var _l={collection:"map",identify:s=>s instanceof Set,nodeClass:ie,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ie.from(s,e,t),resolve(s,e){if(Rt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ie,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Us.YAMLSet=ie;Us.set=_l});var Vs=m(Kt=>{"use strict";var Fl=me();function Js(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function tr(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Fl.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Bl={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Js(s,t),stringify:tr},jl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Js(s,!1),stringify:tr},sr={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){let e=s.match(sr.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,r||0,o||0,a||0,l),h=e[8];if(h&&h!=="Z"){let u=Js(h,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Kt.floatTime=jl;Kt.intTime=Bl;Kt.timestamp=sr});var rr=m(ir=>{"use strict";var Rl=pe(),Kl=Tt(),xl=ye(),Ul=Fe(),Yl=Ms(),nr=Xi(),Ws=zi(),xt=er(),Jl=wt(),Vl=js(),Wl=Mt(),Gl=Ys(),Gs=Vs(),Ql=[Rl.map,xl.seq,Ul.string,Kl.nullTag,nr.trueTag,nr.falseTag,xt.intBin,xt.intOct,xt.int,xt.intHex,Ws.floatNaN,Ws.floatExp,Ws.float,Yl.binary,Jl.merge,Vl.omap,Wl.pairs,Gl.set,Gs.intTime,Gs.floatTime,Gs.timestamp];ir.schema=Ql});var yr=m(Xs=>{"use strict";var cr=pe(),Hl=Tt(),ur=ye(),Xl=Fe(),zl=Es(),Qs=Cs(),Hs=Is(),Zl=Bi(),ec=Ki(),fr=Ms(),xe=wt(),dr=js(),hr=Mt(),or=rr(),pr=Ys(),Ut=Vs(),ar=new Map([["core",Zl.schema],["failsafe",[cr.map,ur.seq,Xl.string]],["json",ec.schema],["yaml11",or.schema],["yaml-1.1",or.schema]]),lr={binary:fr.binary,bool:zl.boolTag,float:Qs.float,floatExp:Qs.floatExp,floatNaN:Qs.floatNaN,floatTime:Ut.floatTime,int:Hs.int,intHex:Hs.intHex,intOct:Hs.intOct,intTime:Ut.intTime,map:cr.map,merge:xe.merge,null:Hl.nullTag,omap:dr.omap,pairs:hr.pairs,seq:ur.seq,set:pr.set,timestamp:Ut.timestamp},tc={"tag:yaml.org,2002:binary":fr.binary,"tag:yaml.org,2002:merge":xe.merge,"tag:yaml.org,2002:omap":dr.omap,"tag:yaml.org,2002:pairs":hr.pairs,"tag:yaml.org,2002:set":pr.set,"tag:yaml.org,2002:timestamp":Ut.timestamp};function sc(s,e,t){let n=ar.get(e);if(n&&!s)return t&&!n.includes(xe.merge)?n.concat(xe.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(ar.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(xe.merge)),i.reduce((r,o)=>{let a=typeof o=="string"?lr[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(lr).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(a)||r.push(a),r},[])}Xs.coreKnownTags=tc;Xs.getTags=sc});var en=m(mr=>{"use strict";var zs=q(),nc=pe(),ic=ye(),rc=Fe(),Yt=yr(),oc=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,Zs=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Yt.getTags(e,"compat"):e?Yt.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Yt.coreKnownTags:{},this.tags=Yt.getTags(t,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,zs.MAP,{value:nc.map}),Object.defineProperty(this,zs.SCALAR,{value:rc.string}),Object.defineProperty(this,zs.SEQ,{value:ic.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?oc:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};mr.Schema=Zs});var br=m(gr=>{"use strict";var ac=q(),tn=$e(),Ue=Ce();function lc(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=tn.createStringifyContext(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let l=r(s.commentBefore);t.unshift(Ue.indentComment(l,""))}let o=!1,a=null;if(s.contents){if(ac.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let h=r(s.contents.commentBefore);t.push(Ue.indentComment(h,""))}i.forceBlockIndent=!!s.comment,a=s.contents.comment}let l=a?void 0:()=>o=!0,c=tn.stringify(s.contents,i,()=>a=null,l);a&&(c+=Ue.lineComment(c,"",r(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(tn.stringify(s.contents,i));if(s.directives?.docEnd)if(s.comment){let l=r(s.comment);l.includes(`
|
|
54
|
+
${r.comment}`:n.comment}n=i}s.items[t]=$t.isPair(n)?n:new _s.Pair(n)}}else e("Expected a sequence for this tag");return s}function Yi(s,e,t){let{replacer:n}=t,i=new Nl.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(_s.createPair(a,l,t))}return i}var ql={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ui,createNode:Yi};Dt.createPairs=Yi;Dt.pairs=ql;Dt.resolvePairs=Ui});var Rs=m(Bs=>{"use strict";var Ji=q(),Fs=J(),Re=X(),Ol=z(),Vi=Mt(),ne=class s extends Ol.YAMLSeq{constructor(){super(),this.add=Re.YAMLMap.prototype.add.bind(this),this.delete=Re.YAMLMap.prototype.delete.bind(this),this.get=Re.YAMLMap.prototype.get.bind(this),this.has=Re.YAMLMap.prototype.has.bind(this),this.set=Re.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(Ji.isPair(i)?(r=Fs.toJS(i.key,"",t),o=Fs.toJS(i.value,r,t)):r=Fs.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=Vi.createPairs(e,t,n),r=new this;return r.items=i.items,r}};ne.tag="tag:yaml.org,2002:omap";var El={collection:"seq",identify:s=>s instanceof Map,nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Vi.resolvePairs(s,e),n=[];for(let{key:i}of t.items)Ji.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new ne,t)},createNode:(s,e,t)=>ne.from(s,e,t)};Bs.YAMLOMap=ne;Bs.omap=El});var Xi=m(js=>{"use strict";var Wi=C();function Gi({value:s,source:e},t){return e&&(s?Qi:Hi).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Qi={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Wi.Scalar(!0),stringify:Gi},Hi={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Wi.Scalar(!1),stringify:Gi};js.falseTag=Hi;js.trueTag=Qi});var zi=m(_t=>{"use strict";var Tl=C(),Ks=me(),Cl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ks.stringifyNumber},Ll={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Ks.stringifyNumber(s)}},Il={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new Tl.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Ks.stringifyNumber};_t.float=Il;_t.floatExp=Ll;_t.floatNaN=Cl});var er=m(Ke=>{"use strict";var Zi=me(),je=s=>typeof s=="bigint"||Number.isInteger(s);function Ft(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}function xs(s,e,t){let{value:n}=s;if(je(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return Zi.stringifyNumber(s)}var Pl={identify:je,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>Ft(s,2,2,t),stringify:s=>xs(s,2,"0b")},$l={identify:je,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>Ft(s,1,8,t),stringify:s=>xs(s,8,"0")},Dl={identify:je,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>Ft(s,0,10,t),stringify:Zi.stringifyNumber},Ml={identify:je,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>Ft(s,2,16,t),stringify:s=>xs(s,16,"0x")};Ke.int=Dl;Ke.intBin=Pl;Ke.intHex=Ml;Ke.intOct=$l});var Ys=m(Us=>{"use strict";var jt=q(),Bt=Q(),Rt=X(),ie=class s extends Rt.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(e){let t;jt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Bt.Pair(e.key,null):t=new Bt.Pair(e,null),Rt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=Rt.findPair(this.items,e);return!t&&jt.isPair(n)?jt.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Rt.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Bt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Bt.createPair(o,null,n));return r}};ie.tag="tag:yaml.org,2002:set";var _l={collection:"map",identify:s=>s instanceof Set,nodeClass:ie,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ie.from(s,e,t),resolve(s,e){if(jt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ie,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Us.YAMLSet=ie;Us.set=_l});var Vs=m(Kt=>{"use strict";var Fl=me();function Js(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function tr(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Fl.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Bl={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Js(s,t),stringify:tr},Rl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Js(s,!1),stringify:tr},sr={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){let e=s.match(sr.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,r||0,o||0,a||0,l),h=e[8];if(h&&h!=="Z"){let u=Js(h,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Kt.floatTime=Rl;Kt.intTime=Bl;Kt.timestamp=sr});var rr=m(ir=>{"use strict";var jl=pe(),Kl=Tt(),xl=ye(),Ul=Fe(),Yl=Ms(),nr=Xi(),Ws=zi(),xt=er(),Jl=wt(),Vl=Rs(),Wl=Mt(),Gl=Ys(),Gs=Vs(),Ql=[jl.map,xl.seq,Ul.string,Kl.nullTag,nr.trueTag,nr.falseTag,xt.intBin,xt.intOct,xt.int,xt.intHex,Ws.floatNaN,Ws.floatExp,Ws.float,Yl.binary,Jl.merge,Vl.omap,Wl.pairs,Gl.set,Gs.intTime,Gs.floatTime,Gs.timestamp];ir.schema=Ql});var yr=m(Xs=>{"use strict";var cr=pe(),Hl=Tt(),ur=ye(),Xl=Fe(),zl=Es(),Qs=Cs(),Hs=Is(),Zl=Bi(),ec=Ki(),fr=Ms(),xe=wt(),dr=Rs(),hr=Mt(),or=rr(),pr=Ys(),Ut=Vs(),ar=new Map([["core",Zl.schema],["failsafe",[cr.map,ur.seq,Xl.string]],["json",ec.schema],["yaml11",or.schema],["yaml-1.1",or.schema]]),lr={binary:fr.binary,bool:zl.boolTag,float:Qs.float,floatExp:Qs.floatExp,floatNaN:Qs.floatNaN,floatTime:Ut.floatTime,int:Hs.int,intHex:Hs.intHex,intOct:Hs.intOct,intTime:Ut.intTime,map:cr.map,merge:xe.merge,null:Hl.nullTag,omap:dr.omap,pairs:hr.pairs,seq:ur.seq,set:pr.set,timestamp:Ut.timestamp},tc={"tag:yaml.org,2002:binary":fr.binary,"tag:yaml.org,2002:merge":xe.merge,"tag:yaml.org,2002:omap":dr.omap,"tag:yaml.org,2002:pairs":hr.pairs,"tag:yaml.org,2002:set":pr.set,"tag:yaml.org,2002:timestamp":Ut.timestamp};function sc(s,e,t){let n=ar.get(e);if(n&&!s)return t&&!n.includes(xe.merge)?n.concat(xe.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(ar.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(xe.merge)),i.reduce((r,o)=>{let a=typeof o=="string"?lr[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(lr).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(a)||r.push(a),r},[])}Xs.coreKnownTags=tc;Xs.getTags=sc});var en=m(mr=>{"use strict";var zs=q(),nc=pe(),ic=ye(),rc=Fe(),Yt=yr(),oc=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,Zs=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Yt.getTags(e,"compat"):e?Yt.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Yt.coreKnownTags:{},this.tags=Yt.getTags(t,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,zs.MAP,{value:nc.map}),Object.defineProperty(this,zs.SCALAR,{value:rc.string}),Object.defineProperty(this,zs.SEQ,{value:ic.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?oc:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};mr.Schema=Zs});var br=m(gr=>{"use strict";var ac=q(),tn=$e(),Ue=Ce();function lc(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=tn.createStringifyContext(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let l=r(s.commentBefore);t.unshift(Ue.indentComment(l,""))}let o=!1,a=null;if(s.contents){if(ac.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let h=r(s.contents.commentBefore);t.push(Ue.indentComment(h,""))}i.forceBlockIndent=!!s.comment,a=s.contents.comment}let l=a?void 0:()=>o=!0,c=tn.stringify(s.contents,i,()=>a=null,l);a&&(c+=Ue.lineComment(c,"",r(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(tn.stringify(s.contents,i));if(s.directives?.docEnd)if(s.comment){let l=r(s.comment);l.includes(`
|
|
55
55
|
`)?(t.push("..."),t.push(Ue.indentComment(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=s.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Ue.indentComment(r(l),"")))}return t.join(`
|
|
56
56
|
`)+`
|
|
57
57
|
`}gr.stringifyDocument=lc});var Ye=m(Sr=>{"use strict";var cc=Ee(),ge=ft(),F=q(),uc=Q(),fc=J(),dc=en(),hc=br(),sn=at(),pc=os(),yc=Te(),nn=rs(),rn=class s{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,F.NODE_TYPE,{value:F.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new nn.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[F.NODE_TYPE]:{value:F.DOC}});return 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()),e.schema=this.schema.clone(),e.contents=F.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){be(this.contents)&&this.contents.add(e)}addIn(e,t){be(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=sn.anchorNames(this);e.anchor=!t||n.has(t)?sn.findNewAnchor(t||"a",n):t}return new cc.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let p=w=>typeof w=="number"||w instanceof String||w instanceof Number,S=t.filter(p).map(String);S.length>0&&(t=t.concat(S)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:h}=n??{},{onAnchor:u,setAnchors:f,sourceObjects:y}=sn.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:u,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:y},d=yc.createNode(e,h,g);return a&&F.isCollection(d)&&(d.flow=!0),f(),d}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new uc.Pair(i,r)}delete(e){return be(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ge.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):be(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return F.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ge.isEmptyPath(e)?!t&&F.isScalar(this.contents)?this.contents.value:this.contents:F.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return F.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return ge.isEmptyPath(e)?this.contents!==void 0:F.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ge.collectionFromPath(this.schema,[e],t):be(this.contents)&&this.contents.set(e,t)}setIn(e,t){ge.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=ge.collectionFromPath(this.schema,Array.from(e),t):be(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new nn.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new nn.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new dc.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=fc.toJS(this.contents,t??"",a);if(typeof r=="function")for(let{count:c,res:h}of a.anchors.values())r(h,c);return typeof o=="function"?pc.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new 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 new Error(`"indent" option must be a positive integer, not ${t}`)}return hc.stringifyDocument(this,e)}};function be(s){if(F.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}Sr.Document=rn});var We=m(Ve=>{"use strict";var Je=class extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},on=class extends Je{constructor(e,t,n){super("YAMLParseError",e,t,n)}},an=class extends Je{constructor(e,t,n){super("YAMLWarning",e,t,n)}},mc=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let a=Math.min(r-39,o.length-79);o="\u2026"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let a=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
@@ -66,7 +66,7 @@ ${c}
|
|
|
66
66
|
`+N.comment:c.comment=N.comment),u=N.end;continue}!o&&t.options.strict&&Dc.containsNewline(v)&&i(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)N.comma&&i(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(N.comma||i(N.start,"MISSING_CHAR",`Missing , between ${a} items`),N.comment){let T="";e:for(let b of w)switch(b.type){case"comma":case"space":break;case"comment":T=b.source.substring(1);break e;default:break e}if(T){let b=c.items[c.items.length-1];Lc.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
|
|
67
67
|
`+T:b.comment=T,N.comment=N.comment.substring(T.length+1)}}if(!o&&!k&&!N.found){let T=A?s(t,A,N,i):e(t,N.end,k,null,N,i);c.items.push(T),u=T.range[2],dn(A)&&i(T.range,"BLOCK_IN_FLOW",fn)}else{t.atKey=!0;let T=N.end,b=v?s(t,v,N,i):e(t,T,w,null,N,i);dn(v)&&i(b.range,"BLOCK_IN_FLOW",fn),t.atKey=!1;let L=Mr.resolveProps(k??[],{flow:a,indicator:"map-value-ind",next:A,offset:b.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(L.found){if(!o&&!N.found&&t.options.strict){if(k)for(let I of k){if(I===L.found)break;if(I.type==="newline"){i(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}N.start<L.found.offset-1024&&i(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?i(A,"MISSING_CHAR",`Missing space after : in ${a}`):i(L.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Y=A?s(t,A,L,i):L.found?e(t,L.end,k,null,L,i):null;Y?dn(A)&&i(Y.range,"BLOCK_IN_FLOW",fn):L.comment&&(b.comment?b.comment+=`
|
|
68
68
|
`+L.comment:b.comment=L.comment);let ce=new Ic.Pair(b,Y);if(t.options.keepSourceTokens&&(ce.srcToken=S),o){let I=c;Mc.mapIncludes(t,I.items,b)&&i(T,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(ce)}else{let I=new Dr.YAMLMap(t.schema);I.flow=!0,I.items.push(ce);let Bn=(Y??b).range;I.range=[b.range[0],Bn[1],Bn[2]],c.items.push(I)}u=Y?Y.range[2]:L.end}}let f=o?"}":"]",[y,...g]=n.end,d=u;if(y?.source===f)d=y.offset+y.source.length;else{let p=a[0].toUpperCase()+a.substring(1),S=h?`${p} must end with a ${f}`:`${p} in block collection must be sufficiently indented and end with a ${f}`;i(u,h?"MISSING_CHAR":"BAD_INDENT",S),y&&y.source.length!==1&&g.unshift(y)}if(g.length>0){let p=$c.resolveEnd(g,d,t.options.strict,i);p.comment&&(c.comment?c.comment+=`
|
|
69
|
-
`+p.comment:c.comment=p.comment),c.range=[n.offset,d,p.offset]}else c.range=[n.offset,d,d];return c}_r.resolveFlowCollection=_c});var
|
|
69
|
+
`+p.comment:c.comment=p.comment),c.range=[n.offset,d,p.offset]}else c.range=[n.offset,d,d];return c}_r.resolveFlowCollection=_c});var Rr=m(Br=>{"use strict";var Fc=q(),Bc=C(),Rc=X(),jc=z(),Kc=Lr(),xc=Pr(),Uc=Fr();function hn(s,e,t,n,i,r){let o=t.type==="block-map"?Kc.resolveBlockMap(s,e,t,n,r):t.type==="block-seq"?xc.resolveBlockSeq(s,e,t,n,r):Uc.resolveFlowCollection(s,e,t,n,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Yc(s,e,t,n,i){let r=n.tag,o=r?e.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f)):null;if(t.type==="block-seq"){let{anchor:f,newlineAfterProp:y}=n,g=f&&r?f.offset>r.offset?f:r:f??r;g&&(!y||y.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===Rc.YAMLMap.tagName&&a==="map"||o===jc.YAMLSeq.tagName&&a==="seq")return hn(s,e,t,i,o);let l=e.schema.tags.find(f=>f.tag===o&&f.collection===a);if(!l){let f=e.schema.knownTags[o];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?i(r,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),hn(s,e,t,i,o)}let c=hn(s,e,t,i,o,l),h=l.resolve?.(c,f=>i(r,"TAG_RESOLVE_FAILED",f),e.options)??c,u=Fc.isNode(h)?h:new Bc.Scalar(h);return u.range=c.range,u.tag=o,l?.format&&(u.format=l.format),u}Br.composeCollection=Yc});var yn=m(jr=>{"use strict";var pn=C();function Jc(s,e,t){let n=e.offset,i=Vc(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?pn.Scalar.BLOCK_FOLDED:pn.Scalar.BLOCK_LITERAL,o=e.source?Wc(e.source):[],a=o.length;for(let d=o.length-1;d>=0;--d){let p=o[d][1];if(p===""||p==="\r")a=d;else break}if(a===0){let d=i.chomp==="+"&&o.length>0?`
|
|
70
70
|
`.repeat(Math.max(1,o.length-1)):"",p=n+i.length;return e.source&&(p+=e.source.length),{value:d,type:r,comment:i.comment,range:[n,p,p]}}let l=e.indent+i.indent,c=e.offset+i.length,h=0;for(let d=0;d<a;++d){let[p,S]=o[d];if(S===""||S==="\r")i.indent===0&&p.length>l&&(l=p.length);else{p.length<l&&t(c+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=p.length),h=d,l===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=p.length+S.length+1}for(let d=o.length-1;d>=a;--d)o[d][0].length>l&&(a=d+1);let u="",f="",y=!1;for(let d=0;d<h;++d)u+=o[d][0].slice(l)+`
|
|
71
71
|
`;for(let d=h;d<a;++d){let[p,S]=o[d];c+=p.length+S.length+1;let w=S[S.length-1]==="\r";if(w&&(S=S.slice(0,-1)),S&&p.length<l){let k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-S.length-(w?2:1),"BAD_INDENT",k),p=""}r===pn.Scalar.BLOCK_LITERAL?(u+=f+p.slice(l)+S,f=`
|
|
72
72
|
`):p.length>l||S[0]===" "?(f===" "?f=`
|
|
@@ -81,7 +81,7 @@ ${c}
|
|
|
81
81
|
`+o[d][0].slice(l);u[u.length-1]!==`
|
|
82
82
|
`&&(u+=`
|
|
83
83
|
`);break;default:u+=`
|
|
84
|
-
`}let g=n+i.length+e.source.length;return{value:u,type:r,comment:i.comment,range:[n,g,g]}}function Vc({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,a="",l=-1;for(let f=1;f<i.length;++f){let y=i[f];if(!a&&(y==="-"||y==="+"))a=y;else{let g=Number(y);!o&&g?o=g:l===-1&&(l=s+f)}}l!==-1&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",u=i.length;for(let f=1;f<e.length;++f){let y=e[f];switch(y.type){case"space":c=!0;case"newline":u+=y.source.length;break;case"comment":t&&!c&&n(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=y.source.length,h=y.source.substring(1);break;case"error":n(y,"UNEXPECTED_TOKEN",y.message),u+=y.source.length;break;default:{let g=`Unexpected token in block scalar header: ${y.type}`;n(y,"UNEXPECTED_TOKEN",g);let d=y.source;d&&typeof d=="string"&&(u+=d.length)}}}return{mode:r,indent:o,chomp:a,comment:h,length:u}}function Wc(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}
|
|
84
|
+
`}let g=n+i.length+e.source.length;return{value:u,type:r,comment:i.comment,range:[n,g,g]}}function Vc({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,a="",l=-1;for(let f=1;f<i.length;++f){let y=i[f];if(!a&&(y==="-"||y==="+"))a=y;else{let g=Number(y);!o&&g?o=g:l===-1&&(l=s+f)}}l!==-1&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",u=i.length;for(let f=1;f<e.length;++f){let y=e[f];switch(y.type){case"space":c=!0;case"newline":u+=y.source.length;break;case"comment":t&&!c&&n(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=y.source.length,h=y.source.substring(1);break;case"error":n(y,"UNEXPECTED_TOKEN",y.message),u+=y.source.length;break;default:{let g=`Unexpected token in block scalar header: ${y.type}`;n(y,"UNEXPECTED_TOKEN",g);let d=y.source;d&&typeof d=="string"&&(u+=d.length)}}}return{mode:r,indent:o,chomp:a,comment:h,length:u}}function Wc(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}jr.resolveBlockScalar=Jc});var gn=m(xr=>{"use strict";var mn=C(),Gc=Se();function Qc(s,e,t){let{offset:n,type:i,source:r,end:o}=s,a,l,c=(f,y,g)=>t(n+f,y,g);switch(i){case"scalar":a=mn.Scalar.PLAIN,l=Hc(r,c);break;case"single-quoted-scalar":a=mn.Scalar.QUOTE_SINGLE,l=Xc(r,c);break;case"double-quoted-scalar":a=mn.Scalar.QUOTE_DOUBLE,l=zc(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let h=n+r.length,u=Gc.resolveEnd(o,h,e,t);return{value:l,type:a,comment:u.comment,range:[n,h,u.offset]}}function Hc(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Kr(s)}function Xc(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Kr(s.slice(1,-1)).replace(/''/g,"'")}function Kr(s){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
85
85
|
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
86
86
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
|
|
87
87
|
`?i+=r:r=`
|
|
@@ -96,7 +96,7 @@ ${c}
|
|
|
96
96
|
`);)n===`
|
|
97
97
|
`&&(t+=`
|
|
98
98
|
`),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}var eu={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
99
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function tu(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}xr.resolveFlowScalar=Qc});var Jr=m(Yr=>{"use strict";var re=q(),Ur=C(),su=yn(),nu=gn();function iu(s,e,t,n){let{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?su.resolveBlockScalar(s,e,n):nu.resolveFlowScalar(e,s.options.strict,n),l=t?s.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[re.SCALAR]:l?c=ru(s.schema,i,l,t,n):e.type==="scalar"?c=ou(s,i,e,n):c=s.schema[re.SCALAR];let h;try{let u=c.resolve(i,f=>n(t??e,"TAG_RESOLVE_FAILED",f),s.options);h=re.isScalar(u)?u:new Ur.Scalar(u)}catch(u){let f=u instanceof Error?u.message:String(u);n(t??e,"TAG_RESOLVE_FAILED",f),h=new Ur.Scalar(i)}return h.range=a,h.source=i,r&&(h.type=r),l&&(h.tag=l),c.format&&(h.format=c.format),o&&(h.comment=o),h}function ru(s,e,t,n,i){if(t==="!")return s[re.SCALAR];let r=[];for(let a of s.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(let a of r)if(a.test?.test(e))return a;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[re.SCALAR])}function ou({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(a=>(a.default===!0||s&&a.default==="key")&&a.test?.test(n))||t[re.SCALAR];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(n))??t[re.SCALAR];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),h=`Value may be parsed as either ${l} or ${c}`;r(i,"TAG_RESOLVE_FAILED",h,!0)}}return o}Yr.composeScalar=iu});var Wr=m(Vr=>{"use strict";function au(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}Vr.emptyScalarPosition=au});var Hr=m(Sn=>{"use strict";var lu=Ee(),cu=q(),uu=
|
|
99
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function tu(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}xr.resolveFlowScalar=Qc});var Jr=m(Yr=>{"use strict";var re=q(),Ur=C(),su=yn(),nu=gn();function iu(s,e,t,n){let{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?su.resolveBlockScalar(s,e,n):nu.resolveFlowScalar(e,s.options.strict,n),l=t?s.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[re.SCALAR]:l?c=ru(s.schema,i,l,t,n):e.type==="scalar"?c=ou(s,i,e,n):c=s.schema[re.SCALAR];let h;try{let u=c.resolve(i,f=>n(t??e,"TAG_RESOLVE_FAILED",f),s.options);h=re.isScalar(u)?u:new Ur.Scalar(u)}catch(u){let f=u instanceof Error?u.message:String(u);n(t??e,"TAG_RESOLVE_FAILED",f),h=new Ur.Scalar(i)}return h.range=a,h.source=i,r&&(h.type=r),l&&(h.tag=l),c.format&&(h.format=c.format),o&&(h.comment=o),h}function ru(s,e,t,n,i){if(t==="!")return s[re.SCALAR];let r=[];for(let a of s.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(let a of r)if(a.test?.test(e))return a;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[re.SCALAR])}function ou({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(a=>(a.default===!0||s&&a.default==="key")&&a.test?.test(n))||t[re.SCALAR];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(n))??t[re.SCALAR];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),h=`Value may be parsed as either ${l} or ${c}`;r(i,"TAG_RESOLVE_FAILED",h,!0)}}return o}Yr.composeScalar=iu});var Wr=m(Vr=>{"use strict";function au(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}Vr.emptyScalarPosition=au});var Hr=m(Sn=>{"use strict";var lu=Ee(),cu=q(),uu=Rr(),Gr=Jr(),fu=Se(),du=Wr(),hu={composeNode:Qr,composeEmptyNode:bn};function Qr(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=t,c,h=!0;switch(e.type){case"alias":c=pu(s,e,n),(a||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Gr.composeScalar(s,e,l,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=uu.composeCollection(hu,s,e,t,n),a&&(c.anchor=a.source.substring(1));break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),c=bn(s,e.offset,void 0,null,t,n),h=!1}}return a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!cu.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),s.options.keepSourceTokens&&h&&(c.srcToken=e),c}function bn(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:a,end:l},c){let h={type:"scalar",offset:du.emptyScalarPosition(e,t,n),indent:-1,source:""},u=Gr.composeScalar(s,h,a,c);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=l),u}function pu({options:s},{offset:e,source:t,end:n},i){let r=new lu.Alias(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=fu.resolveEnd(n,o,s.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}Sn.composeEmptyNode=bn;Sn.composeNode=Qr});var Zr=m(zr=>{"use strict";var yu=Ye(),Xr=Hr(),mu=Se(),gu=Ge();function bu(s,e,{offset:t,start:n,value:i,end:r},o){let a=Object.assign({_directives:e},s),l=new yu.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},h=gu.resolveProps(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});h.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?Xr.composeNode(c,i,h,o):Xr.composeEmptyNode(c,h.end,n,null,h,o);let u=l.contents.range[2],f=mu.resolveEnd(r,u,!1,o);return f.comment&&(l.comment=f.comment),l.range=[t,u,f.offset],l}zr.composeDoc=bu});var vn=m(so=>{"use strict";var Su=st("process"),wu=rs(),vu=Ye(),Qe=We(),eo=q(),ku=Zr(),Au=Se();function He(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function to(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
|
|
100
100
|
|
|
101
101
|
`:`
|
|
102
102
|
`)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var wn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let o=He(t);r?this.warnings.push(new Qe.YAMLWarning(o,n,i)):this.errors.push(new Qe.YAMLParseError(o,n,i))},this.directives=new wu.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=to(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
@@ -113,30 +113,30 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
113
113
|
`});for(let l of Object.keys(s))l!=="type"&&l!=="offset"&&delete s[l];Object.assign(s,{type:"block-scalar",indent:o,props:a,source:i})}}function io(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function kn(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
114
114
|
`};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}Vt.createScalarToken=Tu;Vt.resolveAsScalar=Eu;Vt.setScalarValue=Cu});var ao=m(oo=>{"use strict";var Iu=s=>"type"in s?Gt(s):Wt(s);function Gt(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Gt(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Wt(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Wt(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Wt(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function Wt({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=Gt(e)),t)for(let r of t)i+=r.source;return n&&(i+=Gt(n)),i}oo.stringify=Iu});var fo=m(uo=>{"use strict";var An=Symbol("break visit"),Pu=Symbol("skip children"),lo=Symbol("remove item");function oe(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),co(Object.freeze([]),s,e)}oe.BREAK=An;oe.SKIP=Pu;oe.REMOVE=lo;oe.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};oe.parentCollection=(s,e)=>{let t=oe.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function co(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let a=co(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof a=="number")o=a-1;else{if(a===An)return An;a===lo&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}uo.visit=oe});var Qt=m(M=>{"use strict";var Nn=ro(),$u=ao(),Du=fo(),qn="\uFEFF",On="",En="",Tn="",Mu=s=>!!s&&"items"in s,_u=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Fu(s){switch(s){case qn:return"<BOM>";case On:return"<DOC>";case En:return"<FLOW_END>";case Tn:return"<SCALAR>";default:return JSON.stringify(s)}}function Bu(s){switch(s){case qn:return"byte-order-mark";case On:return"doc-mode";case En:return"flow-error-end";case Tn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
115
115
|
`:case`\r
|
|
116
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":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}M.createScalarToken=Nn.createScalarToken;M.resolveAsScalar=Nn.resolveAsScalar;M.setScalarValue=Nn.setScalarValue;M.stringify=$u.stringify;M.visit=Du.visit;M.BOM=qn;M.DOCUMENT=On;M.FLOW_END=En;M.SCALAR=Tn;M.isCollection=Mu;M.isScalar=_u;M.prettyToken=Fu;M.tokenType=Bu});var In=m(po=>{"use strict";var Xe=Qt();function
|
|
117
|
-
`:case"\r":case" ":return!0;default:return!1}}var ho=new Set("0123456789ABCDEFabcdef"),
|
|
118
|
-
\r `),Cn=s=>!s||
|
|
116
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":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}M.createScalarToken=Nn.createScalarToken;M.resolveAsScalar=Nn.resolveAsScalar;M.setScalarValue=Nn.setScalarValue;M.stringify=$u.stringify;M.visit=Du.visit;M.BOM=qn;M.DOCUMENT=On;M.FLOW_END=En;M.SCALAR=Tn;M.isCollection=Mu;M.isScalar=_u;M.prettyToken=Fu;M.tokenType=Bu});var In=m(po=>{"use strict";var Xe=Qt();function R(s){switch(s){case void 0:case" ":case`
|
|
117
|
+
`:case"\r":case" ":return!0;default:return!1}}var ho=new Set("0123456789ABCDEFabcdef"),Ru=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ht=new Set(",[]{}"),ju=new Set(` ,[]{}
|
|
118
|
+
\r `),Cn=s=>!s||ju.has(s),Ln=class{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 n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
119
119
|
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
120
120
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
|
|
121
121
|
`||!i&&!this.atEnd)return e+n+1}return t===`
|
|
122
|
-
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&
|
|
123
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),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]===Xe.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),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 Xe.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==="...")&&
|
|
122
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&R(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
123
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),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]===Xe.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),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 Xe.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==="...")&&R(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!R(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&R(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}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(Cn),"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,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&R(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Xe.FLOW_END,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"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(Cn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||R(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf(`
|
|
124
124
|
`,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
|
|
125
|
-
`,r)}i!==-1&&(t=i-(n[i-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;for(;;){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=>
|
|
125
|
+
`,r)}i!==-1&&(t=i-(n[i-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;for(;;){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=>R(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
|
|
126
126
|
`:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
127
127
|
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
128
128
|
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
129
129
|
`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let a=r;for(;o===" ";)o=this.buffer[--r];if(o===`
|
|
130
|
-
`&&r>=this.pos&&r+1+t>a)e=r;else break}while(!0);return yield Xe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(
|
|
130
|
+
`&&r>=this.pos&&r+1+t>a)e=r;else break}while(!0);return yield Xe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(R(r)||e&&Ht.has(r))break;t=n}else if(R(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
|
|
131
131
|
`?(n+=1,i=`
|
|
132
132
|
`,r=this.buffer[n+1]):t=n),r==="#"||e&&Ht.has(r))break;if(i===`
|
|
133
|
-
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Ht.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Xe.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Cn))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(
|
|
133
|
+
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Ht.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Xe.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Cn))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(R(t)||e&&Ht.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!R(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];for(;t;)if(Ru.has(t))t=this.buffer[++e];else if(t==="%"&&ho.has(this.buffer[e+1])&&ho.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];return e===`
|
|
134
134
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
135
135
|
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};po.Lexer=Ln});var $n=m(yo=>{"use strict";var Pn=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};yo.LineCounter=Pn});var Mn=m(wo=>{"use strict";var Ku=st("process"),mo=Qt(),xu=In();function Z(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function go(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function So(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Xt(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function we(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function bo(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!Z(e.start,"explicit-key-ind")&&!Z(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,So(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var Dn=class{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 xu.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,Ku.env.LOG_TOKENS&&console.log("|",mo.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=mo.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;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"){for(;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 n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&bo(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&go(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.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:[]};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":{go(e.start)!==-1?(yield*this.pop(),yield*this.step()):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);t?this.stack.push(t):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=Xt(this.peek(2)),n=we(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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(`
|
|
136
136
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
137
137
|
`,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 n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):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 i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):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(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(So(t.key)&&!Z(t.sep,"newline")){let o=we(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Z(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=we(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Z(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Z(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 n&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):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 i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.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;t.value||Z(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Xt(n),r=we(i);bo(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
138
138
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
139
|
-
`,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=Xt(e),n=we(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Xt(e),n=we(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],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:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};wo.Parser=Dn});var qo=m(Ze=>{"use strict";var vo=vn(),Uu=Ye(),ze=We(),Yu=bs(),Ju=q(),Vu=$n(),ko=Mn();function Ao(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Vu.LineCounter||null,prettyErrors:e}}function Wu(s,e={}){let{lineCounter:t,prettyErrors:n}=Ao(e),i=new ko.Parser(t?.addNewLine),r=new vo.Composer(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let a of o)a.errors.forEach(ze.prettifyError(s,t)),a.warnings.forEach(ze.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function No(s,e={}){let{lineCounter:t,prettyErrors:n}=Ao(e),i=new ko.Parser(t?.addNewLine),r=new vo.Composer(e),o=null;for(let a of r.compose(i.parse(s),!0,s.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ze.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(ze.prettifyError(s,t)),o.warnings.forEach(ze.prettifyError(s,t))),o}function Gu(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=No(s,t);if(!i)return null;if(i.warnings.forEach(r=>Yu.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function Qu(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return Ju.isDocument(s)&&!n?s.toString(t):new Uu.Document(s,n,t).toString(t)}Ze.parse=Gu;Ze.parseAllDocuments=Wu;Ze.parseDocument=No;Ze.stringify=Qu});var Eo=m(E=>{"use strict";var Hu=vn(),Xu=Ye(),zu=en(),_n=We(),Zu=Ee(),ee=q(),ef=Q(),tf=C(),sf=X(),nf=z(),rf=Qt(),of=In(),af=$n(),lf=Mn(),zt=qo(),Oo=Ae();E.Composer=Hu.Composer;E.Document=Xu.Document;E.Schema=zu.Schema;E.YAMLError=_n.YAMLError;E.YAMLParseError=_n.YAMLParseError;E.YAMLWarning=_n.YAMLWarning;E.Alias=Zu.Alias;E.isAlias=ee.isAlias;E.isCollection=ee.isCollection;E.isDocument=ee.isDocument;E.isMap=ee.isMap;E.isNode=ee.isNode;E.isPair=ee.isPair;E.isScalar=ee.isScalar;E.isSeq=ee.isSeq;E.Pair=ef.Pair;E.Scalar=tf.Scalar;E.YAMLMap=sf.YAMLMap;E.YAMLSeq=nf.YAMLSeq;E.CST=rf;E.Lexer=of.Lexer;E.LineCounter=af.LineCounter;E.Parser=lf.Parser;E.parse=zt.parse;E.parseAllDocuments=zt.parseAllDocuments;E.parseDocument=zt.parseDocument;E.stringify=zt.stringify;E.visit=Oo.visit;E.visitAsync=Oo.visitAsync});var ts=()=>({version:"0.1.0",phase:"IDLE",spec:null,specDescription:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human",approved:!1,planPath:null},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],lastCalledAt:null,classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null,revisitHistory:[]}),Sf=(s,e,t,n)=>({concerns:s,tools:e,providers:t,project:n,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser@latest noskills"});var le=$o(Eo(),1);var _=".eser",ve=`${_}/.state`,Fn=`${ve}/state.json`,es=`${_}/manifest.yml`,et=`${_}/concerns`,Co=`${_}/rules`,Zt=`${_}/specs`,Lo=`${_}/workflows`,tt=`${ve}/specs`,cf=`${ve}/active.json`,ae=`${_}/.sessions`,Io=`${_}/.events`,ke={eserDir:_,stateDir:ve,stateFile:Fn,manifestFile:es,concernsDir:et,rulesDir:Co,specsDir:Zt,workflowsDir:Lo,specStatesDir:tt,activeFile:cf,specDir:s=>`${Zt}/${s}`,specFile:s=>`${Zt}/${s}/spec.md`,specStateFile:s=>`${tt}/${s}.json`,concernFile:s=>`${et}/${s}.json`,sessionsDir:ae,sessionFile:s=>`${ae}/${s}.json`,eventsDir:Io,eserGitignore:`${_}/.gitignore`},To=async s=>{let e=`${s}/${Fn}`;try{let t=await O.fs.readTextFile(e);return JSON.parse(t)}catch{return ts()}},
|
|
139
|
+
`,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=Xt(e),n=we(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Xt(e),n=we(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],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:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};wo.Parser=Dn});var qo=m(Ze=>{"use strict";var vo=vn(),Uu=Ye(),ze=We(),Yu=bs(),Ju=q(),Vu=$n(),ko=Mn();function Ao(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Vu.LineCounter||null,prettyErrors:e}}function Wu(s,e={}){let{lineCounter:t,prettyErrors:n}=Ao(e),i=new ko.Parser(t?.addNewLine),r=new vo.Composer(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let a of o)a.errors.forEach(ze.prettifyError(s,t)),a.warnings.forEach(ze.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function No(s,e={}){let{lineCounter:t,prettyErrors:n}=Ao(e),i=new ko.Parser(t?.addNewLine),r=new vo.Composer(e),o=null;for(let a of r.compose(i.parse(s),!0,s.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ze.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(ze.prettifyError(s,t)),o.warnings.forEach(ze.prettifyError(s,t))),o}function Gu(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=No(s,t);if(!i)return null;if(i.warnings.forEach(r=>Yu.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function Qu(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return Ju.isDocument(s)&&!n?s.toString(t):new Uu.Document(s,n,t).toString(t)}Ze.parse=Gu;Ze.parseAllDocuments=Wu;Ze.parseDocument=No;Ze.stringify=Qu});var Eo=m(E=>{"use strict";var Hu=vn(),Xu=Ye(),zu=en(),_n=We(),Zu=Ee(),ee=q(),ef=Q(),tf=C(),sf=X(),nf=z(),rf=Qt(),of=In(),af=$n(),lf=Mn(),zt=qo(),Oo=Ae();E.Composer=Hu.Composer;E.Document=Xu.Document;E.Schema=zu.Schema;E.YAMLError=_n.YAMLError;E.YAMLParseError=_n.YAMLParseError;E.YAMLWarning=_n.YAMLWarning;E.Alias=Zu.Alias;E.isAlias=ee.isAlias;E.isCollection=ee.isCollection;E.isDocument=ee.isDocument;E.isMap=ee.isMap;E.isNode=ee.isNode;E.isPair=ee.isPair;E.isScalar=ee.isScalar;E.isSeq=ee.isSeq;E.Pair=ef.Pair;E.Scalar=tf.Scalar;E.YAMLMap=sf.YAMLMap;E.YAMLSeq=nf.YAMLSeq;E.CST=rf;E.Lexer=of.Lexer;E.LineCounter=af.LineCounter;E.Parser=lf.Parser;E.parse=zt.parse;E.parseAllDocuments=zt.parseAllDocuments;E.parseDocument=zt.parseDocument;E.stringify=zt.stringify;E.visit=Oo.visit;E.visitAsync=Oo.visitAsync});var ts=()=>({version:"0.1.0",phase:"IDLE",spec:null,specDescription:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human",approved:!1,planPath:null},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],lastCalledAt:null,classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null,revisitHistory:[]}),Sf=(s,e,t,n)=>({concerns:s,tools:e,providers:t,project:n,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser@latest noskills"});var le=$o(Eo(),1);var _=".eser",ve=`${_}/.state`,Fn=`${ve}/state.json`,es=`${_}/manifest.yml`,et=`${_}/concerns`,Co=`${_}/rules`,Zt=`${_}/specs`,Lo=`${_}/workflows`,tt=`${ve}/specs`,cf=`${ve}/active.json`,ae=`${_}/.sessions`,Io=`${_}/.events`,ke={eserDir:_,stateDir:ve,stateFile:Fn,manifestFile:es,concernsDir:et,rulesDir:Co,specsDir:Zt,workflowsDir:Lo,specStatesDir:tt,activeFile:cf,specDir:s=>`${Zt}/${s}`,specFile:s=>`${Zt}/${s}/spec.md`,specStateFile:s=>`${tt}/${s}.json`,concernFile:s=>`${et}/${s}.json`,sessionsDir:ae,sessionFile:s=>`${ae}/${s}.json`,eventsDir:Io,eserGitignore:`${_}/.gitignore`},To=async s=>{let e=`${s}/${Fn}`;try{let t=await O.fs.readTextFile(e);return JSON.parse(t)}catch{return ts()}},Rd=async(s,e)=>{if(e==null)return To(s);let t=`${s}/${ke.specDir(e)}`;try{await O.fs.stat(t)}catch{throw new Error(`Spec '${e}' not found. Run \`noskills spec list\` to see available specs.`)}let n=await df(s,e);if(n.spec===e)return n;let i=await To(s);return i.spec===e?i:{...n,spec:e}};var uf=s=>{if(s===void 0)return null;for(let e of s)if(e.startsWith("--spec="))return e.slice(7);return null},jd=s=>{let e=uf(s);return e===null||e.length===0?{ok:!1,error:"Error: spec name is required. Use `noskills spec <name> <command>` format."}:{ok:!0,spec:e}},ff=async(s,e)=>{let t=`${s}/${ve}`,n=`${s}/${Fn}`;await O.fs.mkdir(t,{recursive:!0}),await O.fs.writeTextFile(n,JSON.stringify(e,null,2)+`
|
|
140
140
|
`)};var df=async(s,e)=>{let t=`${s}/${ke.specStateFile(e)}`;try{let n=await O.fs.readTextFile(t);return JSON.parse(n)}catch{return ts()}},hf=async(s,e,t)=>{let n=`${s}/${tt}`,i=`${s}/${ke.specStateFile(e)}`;await O.fs.mkdir(n,{recursive:!0}),await O.fs.writeTextFile(i,JSON.stringify(t,null,2)+`
|
|
141
141
|
`)},Kd=async s=>{let e=`${s}/${tt}`,t=[];try{for await(let n of O.fs.readDir(e))if(n.isFile&&n.name.endsWith(".json")){let i=n.name.replace(/\.json$/,""),r=await O.fs.readTextFile(`${e}/${n.name}`);t.push({name:i,state:JSON.parse(r)})}}catch{}return t},xd=async s=>{let e=`${s}/${es}`;try{let t=await O.fs.readTextFile(e),n=le.parse(t);return n?.noskills===void 0?null:n.noskills}catch{return null}},Ud=async(s,e)=>{let t=`${s}/${es}`,n;try{let r=await O.fs.readTextFile(t);n=le.parseDocument(r)}catch{n=new le.Document({})}let i=n.createNode(e);i.commentBefore=" noskills orchestrator \u2014 inline comments in this section won't be preserved on next write",n.set("noskills",i),await O.fs.writeTextFile(t,n.toString())},Yd=async(s,e)=>{let t=`${s}/${ke.concernFile(e)}`;try{let n=await O.fs.readTextFile(t);return JSON.parse(n)}catch{return null}},Jd=async(s,e)=>{let t=`${s}/${et}`,n=`${s}/${ke.concernFile(e.id)}`;await O.fs.mkdir(t,{recursive:!0}),await O.fs.writeTextFile(n,JSON.stringify(e,null,2)+`
|
|
142
142
|
`)},Vd=async s=>{let e=`${s}/${et}`,t=[];try{for await(let n of O.fs.readDir(e))if(n.isFile&&n.name.endsWith(".json")){let i=await O.fs.readTextFile(`${e}/${n.name}`);t.push(JSON.parse(i))}}catch{}return t},Wd=async s=>{let e=[_,ve,tt,et,Co,Zt,Lo,Io];for(let n of e)await O.fs.mkdir(`${s}/${n}`,{recursive:!0});let t=`${s}/${ke.eserGitignore}`;try{await O.fs.stat(t)}catch{await O.fs.writeTextFile(t,`# eser toolchain runtime state \u2014 not tracked by git
|
|
@@ -145,4 +145,4 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
145
145
|
.events/
|
|
146
146
|
`)}},Gd=async(s,e)=>{await ff(s,e),e.spec!==null&&await hf(s,e.spec,e)},Po=2*60*60*1e3,Qd=async(s,e)=>{let t=`${s}/${ae}`;await O.fs.mkdir(t,{recursive:!0}),await O.fs.writeTextFile(`${t}/${e.id}.json`,JSON.stringify(e,null,2)+`
|
|
147
147
|
`)},pf=async(s,e)=>{try{let t=await O.fs.readTextFile(`${s}/${ae}/${e}.json`);return JSON.parse(t)}catch{return null}},yf=async s=>{let e=`${s}/${ae}`,t=[];try{for await(let n of O.fs.readDir(e))if(n.isFile&&n.name.endsWith(".json"))try{let i=await O.fs.readTextFile(`${e}/${n.name}`);t.push(JSON.parse(i))}catch{}}catch{}return t},mf=async(s,e)=>{try{return await O.fs.remove(`${s}/${ae}/${e}.json`),!0}catch{return!1}},Hd=async(s,e,t)=>{let n=await pf(s,e);if(n===null)return;let i={...n,phase:t,lastActiveAt:new Date().toISOString()};await O.fs.writeTextFile(`${s}/${ae}/${e}.json`,JSON.stringify(i,null,2)+`
|
|
148
|
-
`)},Xd=async s=>{let e=await yf(s),t=Date.now(),n=[];for(let i of e)t-new Date(i.lastActiveAt).getTime()>Po&&(await mf(s,i.id),n.push(i.id));return n},zd=s=>Date.now()-new Date(s.lastActiveAt).getTime()>Po,Zd=()=>{let s=new Uint8Array(4);return crypto.getRandomValues(s),Array.from(s).map(e=>e.toString(16).padStart(2,"0")).join("")},eh=async s=>{try{let e=await O.fs.readTextFile(`${s}/${es}`);return le.parse(e)?.noskills!==void 0}catch{return!1}},gf=s=>{let e=s.includes("\\")?"\\":"/",t=s.split(e).filter(Boolean);return t.length<=1?s.startsWith("/")?"/":s:(t.pop(),(s.startsWith("/")?"/":"")+t.join(e))},bf=async s=>{let e=s;for(let t=0;t<100;t++){try{return await O.fs.stat(`${e}/${_}`),e}catch{}let n=gf(e);if(n===e)return null;e=n}return null},th=async()=>{let s=O.process.cwd(),e=O.env.get("NOSKILLS_PROJECT_ROOT")??null;if(e!==null)try{return await O.fs.stat(`${e}/${_}`),{root:e,found:!0}}catch{}let t=await bf(s);return t!==null?{root:t,found:!0}:e!==null?{root:e,found:!1}:{root:s,found:!1}};export{ts as a,Sf as b,Eo as c,ke as d,To as e,
|
|
148
|
+
`)},Xd=async s=>{let e=await yf(s),t=Date.now(),n=[];for(let i of e)t-new Date(i.lastActiveAt).getTime()>Po&&(await mf(s,i.id),n.push(i.id));return n},zd=s=>Date.now()-new Date(s.lastActiveAt).getTime()>Po,Zd=()=>{let s=new Uint8Array(4);return crypto.getRandomValues(s),Array.from(s).map(e=>e.toString(16).padStart(2,"0")).join("")},eh=async s=>{try{let e=await O.fs.readTextFile(`${s}/${es}`);return le.parse(e)?.noskills!==void 0}catch{return!1}},gf=s=>{let e=s.includes("\\")?"\\":"/",t=s.split(e).filter(Boolean);return t.length<=1?s.startsWith("/")?"/":s:(t.pop(),(s.startsWith("/")?"/":"")+t.join(e))},bf=async s=>{let e=s;for(let t=0;t<100;t++){try{return await O.fs.stat(`${e}/${_}`),e}catch{}let n=gf(e);if(n===e)return null;e=n}return null},th=async()=>{let s=O.process.cwd(),e=O.env.get("NOSKILLS_PROJECT_ROOT")??null;if(e!==null)try{return await O.fs.stat(`${e}/${_}`),{root:e,found:!0}}catch{}let t=await bf(s);return t!==null?{root:t,found:!0}:e!==null?{root:e,found:!1}:{root:s,found:!1}};export{ts as a,Sf as b,Eo as c,ke as d,To as e,Rd as f,uf as g,jd as h,ff as i,df as j,hf as k,Kd as l,xd as m,Ud as n,Yd as o,Jd as p,Vd as q,Wd as r,Gd as s,Qd as t,pf as u,yf as v,mf as w,Hd as x,Xd as y,zd as z,Zd as A,eh as B,th as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-D3IKJ7FF.js";import{C as k,m as C,n as P,o as b,p as R}from"./chunk-XXBSEOQR.js";import{b as x,c as A}from"./chunk-UT6ZCLRA.js";import{c as d,d as c,f as u,g as v,o as m,q as w,r as g}from"./chunk-2GF5IUQD.js";import{a as l,b as p}from"./chunk-2N4GTHXQ.js";import"./chunk-XNGHRJVK.js";import"./chunk-CKETVOVQ.js";import"./chunk-YSLRAWBK.js";import"./chunk-OTRBRRIO.js";var W=async s=>{let e=s?.[0];if(e==="add")return await $(s?.slice(1));if(e==="remove")return await I(s?.slice(1));if(e==="list")return await j();let t=x(),n=m({renderer:g.ansi(),sink:w.stdout()});return n.writeln(`Usage: ${t} concern <add <id> | remove <id> | list>`),await n.close(),l(void 0)},$=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),{root:t}=await k(),n=(s??[]).filter(i=>!i.startsWith("-")),r=await C(t);if(n.length===0)return e.writeln(u("Please provide concern ID(s): "),d(A("concern add open-source beautiful-product"))),await e.close(),p({exitCode:1});if(r===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});let a=await y(),o=[];for(let i of n){let f=await b(t,i);if(f===null&&(f=a.find(h=>h.id===i)??null,f!==null&&await R(t,f)),f===null){e.writeln(u(`Unknown concern: ${i}`)),e.writeln(c(` Available: ${a.map(h=>h.id).join(", ")}`));continue}if(r.concerns.includes(i)||o.includes(i)){e.writeln(c(`Concern "${i}" is already active.`));continue}o.push(i)}if(o.length>0){let i={...r,concerns:[...r.concerns,...o]};await P(t,i),e.writeln(v("\u2714"),` Activated concerns: ${o.join(", ")}`)}return await e.close(),l(void 0)},I=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),{root:t}=await k(),n=s?.[0],r=await C(t);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),d(A("concern remove move-fast"))),await e.close(),p({exitCode:1});if(r===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});if(!r.concerns.includes(n))return e.writeln(c(`Concern "${n}" is not active.`)),await e.close(),l(void 0);let a={...r,concerns:r.concerns.filter(o=>o!==n)};return await P(t,a),e.writeln(v("\u2714")," Deactivated concern: ",d(n)),await e.close(),l(void 0)},j=async()=>{let s=m({renderer:g.ansi(),sink:w.stdout()}),{root:e}=await k(),t=await C(e),n=await y(),r=t?.concerns??[];if(s.writeln(d("Concerns")),s.writeln(""),n.length===0)s.writeln(c(" No concerns defined."));else for(let a of n){let o=r.includes(a.id);s.writeln(" ",o?v("\u25CF"):c("\u25CB")," ",o?d(a.id):c(a.id),c(` ${a.description.slice(0,60)}...`))}return await s.close(),l(void 0)};export{W as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-H77MLIL5.js";import{h as C}from"./chunk-HNAHPI6V.js";import{
|
|
1
|
+
import{a as k}from"./chunk-H77MLIL5.js";import{h as C}from"./chunk-HNAHPI6V.js";import{A as E}from"./chunk-XS5JHAC7.js";import{C as v,f as g,h as y,k as S}from"./chunk-XXBSEOQR.js";import{f as n,g as u,o as f,q as w,r as h}from"./chunk-2GF5IUQD.js";import{a as d,b as a}from"./chunk-2N4GTHXQ.js";import"./chunk-XNGHRJVK.js";import"./chunk-CKETVOVQ.js";import"./chunk-YSLRAWBK.js";import"./chunk-OTRBRRIO.js";var j=async p=>{let e=f({renderer:h.ansi(),sink:w.stdout()}),{root:i}=await v(),s=y(p);if(!s.ok)return e.writeln(n(s.error)),await e.close(),a({exitCode:1});let m=(p??[]).filter(r=>!r.startsWith("--")),o=m[0],l=m.slice(1).join(" ");if(!o||!l)return e.writeln(n("Usage: noskills spec <name> delegate <questionId> <userName>")),await e.close(),a({exitCode:1});let t;try{t=await g(i,s.spec)}catch(r){let R=r instanceof Error?r.message:String(r);return e.writeln(n(R)),await e.close(),a({exitCode:1})}if(t.phase!=="DISCOVERY"&&t.phase!=="DISCOVERY_REVIEW")return e.writeln(n(`Cannot delegate in phase: ${t.phase}. Only during discovery.`)),await e.close(),a({exitCode:1});let c=await C(i),I=E(t,o,l,c.name);return await S(i,s.spec,I),await k(i,{ts:new Date().toISOString(),type:"delegation-created",spec:s.spec,user:c.name,question:o,from:c.name,to:l}),e.writeln(u("\u2714"),` Delegated "${o}" to ${l}`),await e.close(),d(void 0)};export{j as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,b as v,c as F,d as R,e as b}from"./chunk-5P46WSNG.js";import{C as h,e as y}from"./chunk-
|
|
1
|
+
import{a as k,b as v,c as F,d as R,e as b}from"./chunk-5P46WSNG.js";import{C as h,e as y}from"./chunk-XXBSEOQR.js";import{c as u,d as r,f as d,g as f,h as g,o as p,q as w,r as $}from"./chunk-2GF5IUQD.js";import{a,b as c}from"./chunk-2N4GTHXQ.js";import"./chunk-XNGHRJVK.js";import"./chunk-CKETVOVQ.js";import"./chunk-YSLRAWBK.js";import"./chunk-OTRBRRIO.js";var U=async m=>{let e=p({renderer:$.ansi(),sink:w.stdout()}),{root:n}=await h(),l=m?.[0];if(l==="scan"){let i=await k(n);await F(n,i),e.writeln(f("\u2714"),` Found ${i.length} diagram(s):`);for(let s of i)e.writeln(` ${s.file}:${s.line} `,r(`[${s.type}]`),r(` refs: ${s.referencedFiles.length}`));return await e.close(),a(void 0)}if(l==="list"||l===void 0){let i=await v(n);if(i.length===0)return e.writeln(r("No diagrams registered. Run: noskills diagrams scan")),await e.close(),a(void 0);e.writeln(u(`${i.length} diagram(s):`));for(let s of i)e.writeln(` ${s.file}:${s.line} `,r(`[${s.type}]`),` refs: ${s.referencedFiles.join(", ")||"none"}`),e.writeln(r(` verified: ${s.lastVerified.slice(0,10)}`));return await e.close(),a(void 0)}if(l==="check"){let s=(await y(n)).execution.modifiedFiles,o=await b(n,s);if(o.length===0)e.writeln(f("\u2714")," No stale diagrams.");else{e.writeln(g(`\u26A0 ${o.length} potentially stale diagram(s):`));for(let t of o)e.writeln(` ${t.file}:${t.line} `,r(`[${t.type}]`)),e.writeln(r(` ${t.reason}`))}return await e.close(),a(void 0)}if(l==="verify"){let i=m?.[1];if(!i)return e.writeln(d("Usage: noskills diagrams verify <file>")),await e.close(),c({exitCode:1});let s;for(let t of m??[])t.startsWith("--line=")&&(s=parseInt(t.slice(7),10));return await R(n,i,s)?e.writeln(f("\u2714"),` Verified: ${i}`):e.writeln(d(`Diagram not found in registry: ${i}`)),await e.close(),a(void 0)}return e.writeln(d("Unknown subcommand. Use: scan, list, check, verify")),await e.close(),c({exitCode:1})};export{U as main};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as I}from"./chunk-H77MLIL5.js";import{a as P,d as O}from"./chunk-VAP3TSYK.js";import{h as D}from"./chunk-HNAHPI6V.js";import{D as U,p as T,s as k}from"./chunk-XS5JHAC7.js";import{C as v,d as C,f as x,h as y,i as $,k as b}from"./chunk-XXBSEOQR.js";import{c as m}from"./chunk-UT6ZCLRA.js";import{c,d as a,f as o,g as f,h,o as g,q as S,r as E}from"./chunk-2GF5IUQD.js";import{a as u,b as n}from"./chunk-2N4GTHXQ.js";import{i as w}from"./chunk-XNGHRJVK.js";import"./chunk-CKETVOVQ.js";import"./chunk-YSLRAWBK.js";import"./chunk-OTRBRRIO.js";var B=async R=>{let e=g({renderer:E.ansi(),sink:S.stdout()}),{root:i}=await v(),p=y(R);if(!p.ok)return e.writeln(o(p.error)),await e.close(),n({exitCode:1});let t;try{t=await x(i,p.spec)}catch(s){let l=s instanceof Error?s.message:String(s);return e.writeln(o(l)),await e.close(),n({exitCode:1})}if(t.phase!=="EXECUTING")return e.writeln(o(`Cannot complete in phase: ${t.phase}`)),e.writeln(a("Only EXECUTING phase can transition to COMPLETED.")),await e.close(),n({exitCode:1});if(t.execution.awaitingStatusReport)return e.writeln(o("Cannot complete: status report is pending.")),e.writeln(a(`Submit a status report first: ${m(`next --answer='{"completed":[...],"remaining":[...]}'`)}`)),await e.close(),n({exitCode:1});if(t.execution.debt!==null&&t.execution.debt.items.length>0){e.writeln(h(`Warning: ${t.execution.debt.items.length} unresolved debt item(s).`));for(let s of t.execution.debt.items)e.writeln(a(` - ${s.id}: ${s.text}`));e.writeln("")}if(t.spec!==null){let s=`${i}/${C.specDir(t.spec)}`;try{await w.fs.stat(s)}catch{return e.writeln(o(`Active spec '${t.spec}' directory not found.`)),e.writeln(a("Run `noskills reset` to return to idle.")),await e.close(),n({exitCode:1})}}let d=await D(i),r=T(t,"done");r=k(r,"EXECUTING","COMPLETED",d),r.spec!==null&&await b(i,r.spec,r);let G=U(r);if(await $(i,G),r.spec!==null&&(await P(i,r.spec,"completed"),await O(i,r.spec,"completed")),await I(i,{ts:new Date().toISOString(),type:"phase-change",spec:t.spec??"unknown",user:d.name,from:"EXECUTING",to:"COMPLETED"}),e.writeln(f("\u2714")," Spec completed!"),e.writeln(""),e.writeln(" Spec: ",c(t.spec??"unknown")),e.writeln(` Iterations: ${t.execution.iteration}`),e.writeln(` Decisions: ${t.decisions.length}`),t.decisions.length>0){let s=t.decisions.filter(l=>l.promoted);s.length>0&&e.writeln(a(` Promoted to rules: ${s.length}`))}return e.writeln(""),e.writeln("Start a new spec with: ",c(`${m('spec new "..."')}`)),await e.close(),u(void 0)};export{B as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as v}from"./chunk-HNAHPI6V.js";import{
|
|
1
|
+
import{h as v}from"./chunk-HNAHPI6V.js";import{w as y,x as I,y as R,z as E}from"./chunk-XS5JHAC7.js";import{C as q,f as F,h as U,k as c}from"./chunk-XXBSEOQR.js";import{d,f as o,g as p,o as k,q as x,r as C}from"./chunk-2GF5IUQD.js";import{a as l,b as i}from"./chunk-2N4GTHXQ.js";import"./chunk-XNGHRJVK.js";import"./chunk-CKETVOVQ.js";import"./chunk-YSLRAWBK.js";import"./chunk-OTRBRRIO.js";var Y=async w=>{let e=k({renderer:C.ansi(),sink:x.stdout()}),{root:a}=await q(),n=U(w);if(!n.ok)return e.writeln(o(n.error)),await e.close(),i({exitCode:1});let f=(w??[]).filter(s=>!s.startsWith("--")),t=f[0],m=f.slice(1).join(" "),u=null,h=!1;for(let s of w??[])s.startsWith("--answer=")&&(u=s.slice(9)),s==="--skip"&&(h=!0);if(!t)return e.writeln(o('Usage: noskills spec <name> followup <questionId> "question text"')),e.writeln(d(' Or: noskills spec <name> followup <followUpId> --answer="text"')),e.writeln(d(" Or: noskills spec <name> followup <followUpId> --skip")),await e.close(),i({exitCode:1});let r;try{r=await F(a,n.spec)}catch(s){let A=s instanceof Error?s.message:String(s);return e.writeln(o(A)),await e.close(),i({exitCode:1})}if(u!==null){let s=I(r,t,u);return await c(a,n.spec,s),e.writeln(p("\u2714"),` Answered follow-up: ${t}`),await e.close(),l(void 0)}if(h){let s=R(r,t);return await c(a,n.spec,s),e.writeln(p("\u2714"),` Skipped follow-up: ${t}`),await e.close(),l(void 0)}if(m.length===0)return e.writeln(o("Follow-up question text is required.")),await e.close(),i({exitCode:1});if(r.phase!=="DISCOVERY"&&r.phase!=="DISCOVERY_REVIEW")return e.writeln(o(`Cannot add follow-ups in phase: ${r.phase}`)),await e.close(),i({exitCode:1});let O=await v(a),g=y(r,t,m,O.name);await c(a,n.spec,g);let S=E(g,t),$=S[S.length-1];return e.writeln(p("\u2714"),` Follow-up added: ${$?.id??t}`),await e.close(),l(void 0)};export{Y as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T,b as J,h as B,i as N,j as q,k as G,l as U,m,n as y,o as f}from"./chunk-YTNM7A5Y.js";import{a as k}from"./chunk-AP3YBNPX.js";import{a as ae,b as re,c as ce}from"./chunk-5CNPFLE6.js";import{a as te}from"./chunk-
|
|
1
|
+
import{a as T,b as J,h as B,i as N,j as q,k as G,l as U,m,n as y,o as f}from"./chunk-YTNM7A5Y.js";import{a as k}from"./chunk-AP3YBNPX.js";import{a as ae,b as re,c as ce}from"./chunk-5CNPFLE6.js";import{a as te}from"./chunk-EKZXJCT7.js";import{b as oe,e as se,f as ie}from"./chunk-DZTBXXB3.js";import"./chunk-PKYW3S5P.js";import"./chunk-7UX6WIXX.js";import{d as ne}from"./chunk-LBPD4EIH.js";import"./chunk-O2NUECRA.js";import{b as D}from"./chunk-D3IKJ7FF.js";import{B as X,a as W,b as z,e as H,i as _,m as I,n as K,p as V,r as Q}from"./chunk-XXBSEOQR.js";import{a as Y,c as Z,d as ee}from"./chunk-UT6ZCLRA.js";import"./chunk-AGPCY6XP.js";import"./chunk-2GF5IUQD.js";import"./chunk-JVCVWI3B.js";import"./chunk-5MN3MWQN.js";import"./chunk-OLM5RTFK.js";import{a as F}from"./chunk-YSSDQJTT.js";import{a as O}from"./chunk-2N4GTHXQ.js";import{i as u}from"./chunk-XNGHRJVK.js";import"./chunk-CKETVOVQ.js";import"./chunk-YSLRAWBK.js";import"./chunk-OTRBRRIO.js";var ve=new F({description:"AI provider interface \u2014 ask questions, generate content",modules:{ask:{description:"Send a prompt to an AI provider",load:()=>import("./ask-VGI3BFZW.js")},list:{description:"List available AI providers",load:()=>import("./list-6EQP6VUL.js")}}});var le=k;var xe=async t=>{try{return await u.fs.stat(t),!0}catch{return!1}},Pe=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]},{id:"codex",paths:[".codex",".codex/config.toml"]},{id:"copilot-cli",paths:[".copilot",".github/hooks"]}],de=async t=>{let e=[];for(let i of Pe)for(let s of i.paths)if(await xe(`${t}/${s}`)){e.push(i.id);break}return e};var r=async t=>{try{return await u.fs.stat(t),!0}catch{return!1}},pe=async(t,e)=>{try{let i=await u.fs.readTextFile(t);return JSON.parse(i)[e]??null}catch{return null}},Te=async t=>{let e=[];return(await r(`${t}/package.json`)||await r(`${t}/deno.json`))&&e.push("typescript"),await r(`${t}/go.mod`)&&e.push("go"),await r(`${t}/Cargo.toml`)&&e.push("rust"),(await r(`${t}/pyproject.toml`)||await r(`${t}/setup.py`))&&e.push("python"),e},Be=async t=>{let e=[],i=await pe(`${t}/package.json`,"dependencies");return i!==null&&("react"in i&&e.push("react"),"vue"in i&&e.push("vue"),"svelte"in i&&e.push("svelte"),"next"in i&&e.push("nextjs"),"express"in i&&e.push("express"),"hono"in i&&e.push("hono")),e},Ie=async t=>{let e=[];return await r(`${t}/.github/workflows`)&&e.push("github-actions"),await r(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await r(`${t}/Jenkinsfile`)&&e.push("jenkins"),await r(`${t}/.circleci`)&&e.push("circleci"),e},ke=async t=>{if(await r(`${t}/deno.json`))return"deno";let e=await pe(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},ue=async t=>{let[e,i,s,d]=await Promise.all([Te(t),Be(t),Ie(t),ke(t)]);return{languages:e,frameworks:i,ci:s,testRunner:d}};var Mt=async t=>{let e=u.process.cwd(),i=re(t),s=J({target:i==="agent"?"non-interactive":"interactive"}),d=ce(t),h=ge(d,"--concerns"),g=ge(d,"--tools"),p=d.includes("--non-interactive")||i==="agent",w=await X(e);N(s,"noskills init");let A=f(s,"Checking directories...");A.start(),await Q(e),A.succeed("Config: .eser/");let M=f(s,"Scanning project...");M.start();let x=await ue(e);M.succeed("Project scanned");for(let o of x.languages)y.step(s,` ${o}`);for(let o of x.frameworks)y.step(s,` ${o}`);m(s);let R=f(s,"Detecting coding tools...");R.start();let $=await de(e),b=ae(),E=b!==null&&!$.includes(b)?[b]:[],v=[...new Set([...E,...$])];R.succeed(`${v.length} coding tool(s) detected`);let l;if(g!==null){let o=["claude-code","cursor","kiro","copilot","windsurf","opencode","codex","copilot-cli"],n=g.filter(a=>o.includes(a));l=[...new Set([...E,...n])]}else if(w){let o=await I(e);l=o!==null?[...o.tools]:[...v]}else p?l=[...v]:(m(s),l=await Me(s,v,b));m(s);let j=f(s,"Detecting AI providers...");j.start();let P=(await le()).filter(o=>o.available).map(o=>o.name);j.succeed(`${P.length} provider(s) detected`),m(s);let S=await D(),c;if(h!==null){let o=S.map(n=>n.id);c=h.filter(n=>o.includes(n)).sort((n,a)=>o.indexOf(n)-o.indexOf(a))}else if(w){let o=await I(e);c=o!==null?[...o.concerns]:[]}else if(p)c=[];else{let o=S.map(a=>({value:a.id,label:a.name,hint:a.description.slice(0,60)})),n=await B(s,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:o});c=T(n)?[]:[...n]}c.length>0&&y.success(s,` Concerns: ${c.join(", ")}`),m(s);let me=S.filter(o=>c.includes(o.id));for(let o of me)await V(e,o);let L=await ee();Y(L);let C={...z(c,l,P,x),command:L};if(await K(e,C),!w){let o=W();await _(e,o)}if(l.length>0){let o=f(s,"Syncing tool files...");o.start();let n=await ie(e,l,C);o.succeed(`Synced ${n.length} tool(s)`);for(let a of n)y.step(s,` ${a}`)}if(q(s,`Done. ${l.length} tool(s), ${P.length} provider(s), ${c.length} concern(s).`),i==="agent"){let o=await H(e),a=(await D()).filter(be=>c.includes(be.id)),fe=await oe(e),he=se(C?.tools??[]),ye=await te(o,a,fe,C,void 0,void 0,void 0,he);await ne(ye,"json")}else G(s),U(s,`Start a spec with: ${Z('spec new "..."')}`);return O(void 0)},Ae=[{value:"claude-code",label:"Claude Code"},{value:"cursor",label:"Cursor"},{value:"kiro",label:"Kiro"},{value:"copilot",label:"GitHub Copilot"},{value:"windsurf",label:"Windsurf"},{value:"opencode",label:"OpenCode"},{value:"codex",label:"Codex CLI"},{value:"copilot-cli",label:"Copilot CLI"}],Me=async(t,e,i)=>{let s=e.length===0?"No coding tools detected. Which tools do you use? (space to toggle)":"Any additional tools? (space to toggle, enter to skip)",d=new Set(e),h=await B(t,{message:s,options:Ae.map(p=>({...p,hint:p.value===i?"you're running inside it":d.has(p.value)?"detected":void 0,disabled:p.value===i})),initialValues:[...e],required:!1});if(T(h))return[...e];let g=[...h];return i!==null&&!g.includes(i)&&g.unshift(i),g},ge=(t,e)=>{if(t===void 0)return null;for(let i of t)if(i.startsWith(`${e}=`))return i.slice(e.length+1).split(",").map(s=>s.trim()).filter(Boolean);return null};export{Mt as main};
|