faf-cli 7.4.0 → 7.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,146 +1,146 @@
1
- import{createRequire as x6}from"node:module";var E6=Object.defineProperty;var D=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var g6=($)=>$;function y6($,Z){this[$]=g6.bind(null,Z)}var h6=($,Z)=>{for(var U in Z)E6($,U,{get:Z[U],enumerable:!0,configurable:!0,set:y6.bind(Z,U)})};var p0=x6(import.meta.url);var w=D((UZ)=>{var S$=Symbol.for("yaml.alias"),B3=Symbol.for("yaml.document"),N1=Symbol.for("yaml.map"),V3=Symbol.for("yaml.pair"),E$=Symbol.for("yaml.scalar"),b1=Symbol.for("yaml.seq"),r=Symbol.for("yaml.node.type"),r6=($)=>!!$&&typeof $==="object"&&$[r]===S$,n6=($)=>!!$&&typeof $==="object"&&$[r]===B3,o6=($)=>!!$&&typeof $==="object"&&$[r]===N1,t6=($)=>!!$&&typeof $==="object"&&$[r]===V3,O3=($)=>!!$&&typeof $==="object"&&$[r]===E$,e6=($)=>!!$&&typeof $==="object"&&$[r]===b1;function W3($){if($&&typeof $==="object")switch($[r]){case N1:case b1:return!0}return!1}function $Z($){if($&&typeof $==="object")switch($[r]){case S$:case N1:case E$:case b1:return!0}return!1}var ZZ=($)=>(O3($)||W3($))&&!!$.anchor;UZ.ALIAS=S$;UZ.DOC=B3;UZ.MAP=N1;UZ.NODE_TYPE=r;UZ.PAIR=V3;UZ.SCALAR=E$;UZ.SEQ=b1;UZ.hasAnchor=ZZ;UZ.isAlias=r6;UZ.isCollection=W3;UZ.isDocument=n6;UZ.isMap=o6;UZ.isNode=$Z;UZ.isPair=t6;UZ.isScalar=O3;UZ.isSeq=e6});var a0=D((RZ)=>{var h=w(),k=Symbol("break visit"),I3=Symbol("skip children"),i=Symbol("remove node");function w1($,Z){let U=L3(Z);if(h.isDocument($)){if(F0(null,$.contents,U,Object.freeze([$]))===i)$.contents=null}else F0(null,$,U,Object.freeze([]))}w1.BREAK=k;w1.SKIP=I3;w1.REMOVE=i;function F0($,Z,U,X){let Q=D3($,Z,U,X);if(h.isNode(Q)||h.isPair(Q))return R3($,X,Q),F0($,Q,U,X);if(typeof Q!=="symbol"){if(h.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let J=0;J<Z.items.length;++J){let z=F0(J,Z.items[J],U,X);if(typeof z==="number")J=z-1;else if(z===k)return k;else if(z===i)Z.items.splice(J,1),J-=1}}else if(h.isPair(Z)){X=Object.freeze(X.concat(Z));let J=F0("key",Z.key,U,X);if(J===k)return k;else if(J===i)Z.key=null;let z=F0("value",Z.value,U,X);if(z===k)return k;else if(z===i)Z.value=null}}return Q}async function C1($,Z){let U=L3(Z);if(h.isDocument($)){if(await N0(null,$.contents,U,Object.freeze([$]))===i)$.contents=null}else await N0(null,$,U,Object.freeze([]))}C1.BREAK=k;C1.SKIP=I3;C1.REMOVE=i;async function N0($,Z,U,X){let Q=await D3($,Z,U,X);if(h.isNode(Q)||h.isPair(Q))return R3($,X,Q),N0($,Q,U,X);if(typeof Q!=="symbol"){if(h.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let J=0;J<Z.items.length;++J){let z=await N0(J,Z.items[J],U,X);if(typeof z==="number")J=z-1;else if(z===k)return k;else if(z===i)Z.items.splice(J,1),J-=1}}else if(h.isPair(Z)){X=Object.freeze(X.concat(Z));let J=await N0("key",Z.key,U,X);if(J===k)return k;else if(J===i)Z.key=null;let z=await N0("value",Z.value,U,X);if(z===k)return k;else if(z===i)Z.value=null}}return Q}function L3($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function D3($,Z,U,X){if(typeof U==="function")return U($,Z,X);if(h.isMap(Z))return U.Map?.($,Z,X);if(h.isSeq(Z))return U.Seq?.($,Z,X);if(h.isPair(Z))return U.Pair?.($,Z,X);if(h.isScalar(Z))return U.Scalar?.($,Z,X);if(h.isAlias(Z))return U.Alias?.($,Z,X);return}function R3($,Z,U){let X=Z[Z.length-1];if(h.isCollection(X))X.items[$]=U;else if(h.isPair(X))if($==="key")X.key=U;else X.value=U;else if(h.isDocument(X))X.contents=U;else{let Q=h.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${Q} parent`)}}RZ.visit=w1;RZ.visitAsync=C1});var g$=D((FZ)=>{var M3=w(),PZ=a0(),TZ={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},AZ=($)=>$.replace(/[!,[\]{}]/g,(Z)=>TZ[Z]);class v{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},v.defaultYaml,$),this.tags=Object.assign({},v.defaultTags,Z)}clone(){let $=new v(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new v(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:v.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},v.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:v.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},v.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),X=U.shift();switch(X){case"%TAG":{if(U.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[Q,J]=U;return this.tags[Q]=J,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[Q]=U;if(Q==="1.1"||Q==="1.2")return this.yaml.version=Q,!0;else{let J=/^\d+\.\d+$/.test(Q);return Z(6,`Unsupported YAML version ${Q}`,J),!1}}default:return Z(0,`Unknown directive ${X}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let J=$.slice(2,-1);if(J==="!"||J==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return J}let[,U,X]=$.match(/^(.*!)([^!]*)$/s);if(!X)Z(`The ${$} tag has no suffix`);let Q=this.tags[U];if(Q)try{return Q+decodeURIComponent(X)}catch(J){return Z(String(J)),null}if(U==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,U]of Object.entries(this.tags))if($.startsWith(U))return Z+AZ($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),X;if($&&U.length>0&&M3.isNode($.contents)){let Q={};PZ.visit($.contents,(J,z)=>{if(M3.isNode(z)&&z.tag)Q[z.tag]=!0}),X=Object.keys(Q)}else X=[];for(let[Q,J]of U){if(Q==="!!"&&J==="tag:yaml.org,2002:")continue;if(!$||X.some((z)=>z.startsWith(J)))Z.push(`%TAG ${Q} ${J}`)}return Z.join(`
2
- `)}}v.defaultYaml={explicit:!1,version:"1.2"};v.defaultTags={"!!":"tag:yaml.org,2002:"};FZ.Directives=v});var j1=D((jZ)=>{var K3=w(),bZ=a0();function wZ($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function P3($){let Z=new Set;return bZ.visit($,{Value(U,X){if(X.anchor)Z.add(X.anchor)}}),Z}function T3($,Z){for(let U=1;;++U){let X=`${$}${U}`;if(!Z.has(X))return X}}function CZ($,Z){let U=[],X=new Map,Q=null;return{onAnchor:(J)=>{U.push(J),Q??(Q=P3($));let z=T3(Z,Q);return Q.add(z),z},setAnchors:()=>{for(let J of U){let z=X.get(J);if(typeof z==="object"&&z.anchor&&(K3.isScalar(z.node)||K3.isCollection(z.node)))z.node.anchor=z.anchor;else{let H=Error("Failed to resolve repeated object (this should not happen)");throw H.source=J,H}}},sourceObjects:X}}jZ.anchorIsValid=wZ;jZ.anchorNames=P3;jZ.createNodeAnchors=CZ;jZ.findNewAnchor=T3});var y$=D((hZ)=>{function r0($,Z,U,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let Q=0,J=X.length;Q<J;++Q){let z=X[Q],H=r0($,X,String(Q),z);if(H===void 0)delete X[Q];else if(H!==z)X[Q]=H}else if(X instanceof Map)for(let Q of Array.from(X.keys())){let J=X.get(Q),z=r0($,X,Q,J);if(z===void 0)X.delete(Q);else if(z!==J)X.set(Q,z)}else if(X instanceof Set)for(let Q of Array.from(X)){let J=r0($,X,Q,Q);if(J===void 0)X.delete(Q);else if(J!==Q)X.delete(Q),X.add(J)}else for(let[Q,J]of Object.entries(X)){let z=r0($,X,Q,J);if(z===void 0)delete X[Q];else if(z!==J)X[Q]=z}return $.call(Z,U,X)}hZ.applyReviver=r0});var $0=D((uZ)=>{var fZ=w();function A3($,Z,U){if(Array.isArray($))return $.map((X,Q)=>A3(X,String(Q),U));if($&&typeof $.toJSON==="function"){if(!U||!fZ.hasAnchor($))return $.toJSON(Z,U);let X={aliasCount:0,count:1,res:void 0};U.anchors.set($,X),U.onCreate=(J)=>{X.res=J,delete U.onCreate};let Q=$.toJSON(Z,U);if(U.onCreate)U.onCreate(Q);return Q}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}uZ.toJS=A3});var S1=D((lZ)=>{var vZ=y$(),F3=w(),mZ=$0();class N3{constructor($){Object.defineProperty(this,F3.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:Z,maxAliasCount:U,onAnchor:X,reviver:Q}={}){if(!F3.isDocument($))throw TypeError("A document argument is required");let J={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},z=mZ.toJS(this,"",J);if(typeof X==="function")for(let{count:H,res:Y}of J.anchors.values())X(Y,H);return typeof Q==="function"?vZ.applyReviver(Q,{"":z},"",z):z}}lZ.NodeBase=N3});var n0=D((aZ)=>{var dZ=j1(),cZ=a0(),b0=w(),iZ=S1(),sZ=$0();class b3 extends iZ.NodeBase{constructor($){super(b0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){let U;if(Z?.aliasResolveCache)U=Z.aliasResolveCache;else if(U=[],cZ.visit($,{Node:(Q,J)=>{if(b0.isAlias(J)||b0.hasAnchor(J))U.push(J)}}),Z)Z.aliasResolveCache=U;let X=void 0;for(let Q of U){if(Q===this)break;if(Q.anchor===this.source)X=Q}return X}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:U,doc:X,maxAliasCount:Q}=Z,J=this.resolve(X,Z);if(!J){let H=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(H)}let z=U.get(J);if(!z)sZ.toJS(J,null,Z),z=U.get(J);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(Q>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=E1(X,J,U);if(z.count*z.aliasCount>Q)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString($,Z,U){let X=`*${this.source}`;if($){if(dZ.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let Q=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(Q)}if($.implicitKey)return`${X} `}return X}}function E1($,Z,U){if(b0.isAlias(Z)){let X=Z.resolve($),Q=U&&X&&U.get(X);return Q?Q.count*Q.aliasCount:0}else if(b0.isCollection(Z)){let X=0;for(let Q of Z.items){let J=E1($,Q,U);if(J>X)X=J}return X}else if(b0.isPair(Z)){let X=E1($,Z.key,U),Q=E1($,Z.value,U);return Math.max(X,Q)}return 1}aZ.Alias=b3});var y=D(($U)=>{var nZ=w(),oZ=S1(),tZ=$0(),eZ=($)=>!$||typeof $!=="function"&&typeof $!=="object";class _0 extends oZ.NodeBase{constructor($){super(nZ.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:tZ.toJS(this.value,$,Z)}toString(){return String(this.value)}}_0.BLOCK_FOLDED="BLOCK_FOLDED";_0.BLOCK_LITERAL="BLOCK_LITERAL";_0.PLAIN="PLAIN";_0.QUOTE_DOUBLE="QUOTE_DOUBLE";_0.QUOTE_SINGLE="QUOTE_SINGLE";$U.Scalar=_0;$U.isScalarValue=eZ});var o0=D((HU)=>{var XU=n0(),B0=w(),w3=y(),QU="tag:yaml.org,2002:";function JU($,Z,U){if(Z){let X=U.filter((J)=>J.tag===Z),Q=X.find((J)=>!J.format)??X[0];if(!Q)throw Error(`Tag ${Z} not found`);return Q}return U.find((X)=>X.identify?.($)&&!X.format)}function zU($,Z,U){if(B0.isDocument($))$=$.contents;if(B0.isNode($))return $;if(B0.isPair($)){let q=U.schema[B0.MAP].createNode?.(U.schema,null,U);return q.items.push($),q}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:X,onAnchor:Q,onTagObj:J,schema:z,sourceObjects:H}=U,Y=void 0;if(X&&$&&typeof $==="object")if(Y=H.get($),Y)return Y.anchor??(Y.anchor=Q($)),new XU.Alias(Y.anchor);else Y={anchor:null,node:null},H.set($,Y);if(Z?.startsWith("!!"))Z=QU+Z.slice(2);let G=JU($,Z,z.tags);if(!G){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let q=new w3.Scalar($);if(Y)Y.node=q;return q}G=$ instanceof Map?z[B0.MAP]:(Symbol.iterator in Object($))?z[B0.SEQ]:z[B0.MAP]}if(J)J(G),delete U.onTagObj;let _=G?.createNode?G.createNode(U.schema,$,U):typeof G?.nodeClass?.from==="function"?G.nodeClass.from(U.schema,$,U):new w3.Scalar($);if(Z)_.tag=Z;else if(!G.default)_.tag=G.tag;if(Y)Y.node=_;return _}HU.createNode=zU});var g1=D((_U)=>{var YU=o0(),s=w(),qU=S1();function h$($,Z,U){let X=U;for(let Q=Z.length-1;Q>=0;--Q){let J=Z[Q];if(typeof J==="number"&&Number.isInteger(J)&&J>=0){let z=[];z[J]=X,X=z}else X=new Map([[J,X]])}return YU.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var C3=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class j3 extends qU.NodeBase{constructor($,Z){super($);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone($){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)Z.schema=$;if(Z.items=Z.items.map((U)=>s.isNode(U)||s.isPair(U)?U.clone($):U),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(C3($))this.add(Z);else{let[U,...X]=$,Q=this.get(U,!0);if(s.isCollection(Q))Q.addIn(X,Z);else if(Q===void 0&&this.schema)this.set(U,h$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${X}`)}}deleteIn($){let[Z,...U]=$;if(U.length===0)return this.delete(Z);let X=this.get(Z,!0);if(s.isCollection(X))return X.deleteIn(U);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${U}`)}getIn($,Z){let[U,...X]=$,Q=this.get(U,!0);if(X.length===0)return!Z&&s.isScalar(Q)?Q.value:Q;else return s.isCollection(Q)?Q.getIn(X,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!s.isPair(Z))return!1;let U=Z.value;return U==null||$&&s.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[Z,...U]=$;if(U.length===0)return this.has(Z);let X=this.get(Z,!0);return s.isCollection(X)?X.hasIn(U):!1}setIn($,Z){let[U,...X]=$;if(X.length===0)this.set(U,Z);else{let Q=this.get(U,!0);if(s.isCollection(Q))Q.setIn(X,Z);else if(Q===void 0&&this.schema)this.set(U,h$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${X}`)}}}_U.Collection=j3;_U.collectionFromPath=h$;_U.isEmptyPath=C3});var t0=D((LU)=>{var WU=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function x$($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var IU=($,Z,U)=>$.endsWith(`
3
- `)?x$(U,Z):U.includes(`
1
+ import{createRequire as a9}from"node:module";var c9=Object.defineProperty;var R=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var i9=($)=>$;function r9($,Z){this[$]=i9.bind(null,Z)}var s9=($,Z)=>{for(var U in Z)c9($,U,{get:Z[U],enumerable:!0,configurable:!0,set:r9.bind(Z,U)})};var r0=a9(import.meta.url);var C=R((WZ)=>{var u$=Symbol.for("yaml.alias"),M3=Symbol.for("yaml.document"),g1=Symbol.for("yaml.map"),K3=Symbol.for("yaml.pair"),k$=Symbol.for("yaml.scalar"),x1=Symbol.for("yaml.seq"),t=Symbol.for("yaml.node.type"),qZ=($)=>!!$&&typeof $==="object"&&$[t]===u$,YZ=($)=>!!$&&typeof $==="object"&&$[t]===M3,GZ=($)=>!!$&&typeof $==="object"&&$[t]===g1,_Z=($)=>!!$&&typeof $==="object"&&$[t]===K3,F3=($)=>!!$&&typeof $==="object"&&$[t]===k$,BZ=($)=>!!$&&typeof $==="object"&&$[t]===x1;function P3($){if($&&typeof $==="object")switch($[t]){case g1:case x1:return!0}return!1}function VZ($){if($&&typeof $==="object")switch($[t]){case u$:case g1:case k$:case x1:return!0}return!1}var OZ=($)=>(F3($)||P3($))&&!!$.anchor;WZ.ALIAS=u$;WZ.DOC=M3;WZ.MAP=g1;WZ.NODE_TYPE=t;WZ.PAIR=K3;WZ.SCALAR=k$;WZ.SEQ=x1;WZ.hasAnchor=OZ;WZ.isAlias=qZ;WZ.isCollection=P3;WZ.isDocument=YZ;WZ.isMap=GZ;WZ.isNode=VZ;WZ.isPair=_Z;WZ.isScalar=F3;WZ.isSeq=BZ});var t0=R((jZ)=>{var h=C(),k=Symbol("break visit"),A3=Symbol("skip children"),s=Symbol("remove node");function h1($,Z){let U=T3(Z);if(h.isDocument($)){if(b0(null,$.contents,U,Object.freeze([$]))===s)$.contents=null}else b0(null,$,U,Object.freeze([]))}h1.BREAK=k;h1.SKIP=A3;h1.REMOVE=s;function b0($,Z,U,X){let Q=N3($,Z,U,X);if(h.isNode(Q)||h.isPair(Q))return w3($,X,Q),b0($,Q,U,X);if(typeof Q!=="symbol"){if(h.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let z=0;z<Z.items.length;++z){let J=b0(z,Z.items[z],U,X);if(typeof J==="number")z=J-1;else if(J===k)return k;else if(J===s)Z.items.splice(z,1),z-=1}}else if(h.isPair(Z)){X=Object.freeze(X.concat(Z));let z=b0("key",Z.key,U,X);if(z===k)return k;else if(z===s)Z.key=null;let J=b0("value",Z.value,U,X);if(J===k)return k;else if(J===s)Z.value=null}}return Q}async function y1($,Z){let U=T3(Z);if(h.isDocument($)){if(await S0(null,$.contents,U,Object.freeze([$]))===s)$.contents=null}else await S0(null,$,U,Object.freeze([]))}y1.BREAK=k;y1.SKIP=A3;y1.REMOVE=s;async function S0($,Z,U,X){let Q=await N3($,Z,U,X);if(h.isNode(Q)||h.isPair(Q))return w3($,X,Q),S0($,Q,U,X);if(typeof Q!=="symbol"){if(h.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let z=0;z<Z.items.length;++z){let J=await S0(z,Z.items[z],U,X);if(typeof J==="number")z=J-1;else if(J===k)return k;else if(J===s)Z.items.splice(z,1),z-=1}}else if(h.isPair(Z)){X=Object.freeze(X.concat(Z));let z=await S0("key",Z.key,U,X);if(z===k)return k;else if(z===s)Z.key=null;let J=await S0("value",Z.value,U,X);if(J===k)return k;else if(J===s)Z.value=null}}return Q}function T3($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function N3($,Z,U,X){if(typeof U==="function")return U($,Z,X);if(h.isMap(Z))return U.Map?.($,Z,X);if(h.isSeq(Z))return U.Seq?.($,Z,X);if(h.isPair(Z))return U.Pair?.($,Z,X);if(h.isScalar(Z))return U.Scalar?.($,Z,X);if(h.isAlias(Z))return U.Alias?.($,Z,X);return}function w3($,Z,U){let X=Z[Z.length-1];if(h.isCollection(X))X.items[$]=U;else if(h.isPair(X))if($==="key")X.key=U;else X.value=U;else if(h.isDocument(X))X.contents=U;else{let Q=h.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${Q} parent`)}}jZ.visit=h1;jZ.visitAsync=y1});var v$=R((uZ)=>{var C3=C(),hZ=t0(),yZ={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},fZ=($)=>$.replace(/[!,[\]{}]/g,(Z)=>yZ[Z]);class m{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},m.defaultYaml,$),this.tags=Object.assign({},m.defaultTags,Z)}clone(){let $=new m(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new m(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:m.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},m.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:m.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},m.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),X=U.shift();switch(X){case"%TAG":{if(U.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[Q,z]=U;return this.tags[Q]=z,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[Q]=U;if(Q==="1.1"||Q==="1.2")return this.yaml.version=Q,!0;else{let z=/^\d+\.\d+$/.test(Q);return Z(6,`Unsupported YAML version ${Q}`,z),!1}}default:return Z(0,`Unknown directive ${X}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let z=$.slice(2,-1);if(z==="!"||z==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return z}let[,U,X]=$.match(/^(.*!)([^!]*)$/s);if(!X)Z(`The ${$} tag has no suffix`);let Q=this.tags[U];if(Q)try{return Q+decodeURIComponent(X)}catch(z){return Z(String(z)),null}if(U==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,U]of Object.entries(this.tags))if($.startsWith(U))return Z+fZ($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),X;if($&&U.length>0&&C3.isNode($.contents)){let Q={};hZ.visit($.contents,(z,J)=>{if(C3.isNode(J)&&J.tag)Q[J.tag]=!0}),X=Object.keys(Q)}else X=[];for(let[Q,z]of U){if(Q==="!!"&&z==="tag:yaml.org,2002:")continue;if(!$||X.some((J)=>J.startsWith(z)))Z.push(`%TAG ${Q} ${z}`)}return Z.join(`
2
+ `)}}m.defaultYaml={explicit:!1,version:"1.2"};m.defaultTags={"!!":"tag:yaml.org,2002:"};uZ.Directives=m});var f1=R((lZ)=>{var b3=C(),vZ=t0();function mZ($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function S3($){let Z=new Set;return vZ.visit($,{Value(U,X){if(X.anchor)Z.add(X.anchor)}}),Z}function E3($,Z){for(let U=1;;++U){let X=`${$}${U}`;if(!Z.has(X))return X}}function pZ($,Z){let U=[],X=new Map,Q=null;return{onAnchor:(z)=>{U.push(z),Q??(Q=S3($));let J=E3(Z,Q);return Q.add(J),J},setAnchors:()=>{for(let z of U){let J=X.get(z);if(typeof J==="object"&&J.anchor&&(b3.isScalar(J.node)||b3.isCollection(J.node)))J.node.anchor=J.anchor;else{let H=Error("Failed to resolve repeated object (this should not happen)");throw H.source=z,H}}},sourceObjects:X}}lZ.anchorIsValid=mZ;lZ.anchorNames=S3;lZ.createNodeAnchors=pZ;lZ.findNewAnchor=E3});var m$=R((sZ)=>{function e0($,Z,U,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let Q=0,z=X.length;Q<z;++Q){let J=X[Q],H=e0($,X,String(Q),J);if(H===void 0)delete X[Q];else if(H!==J)X[Q]=H}else if(X instanceof Map)for(let Q of Array.from(X.keys())){let z=X.get(Q),J=e0($,X,Q,z);if(J===void 0)X.delete(Q);else if(J!==z)X.set(Q,J)}else if(X instanceof Set)for(let Q of Array.from(X)){let z=e0($,X,Q,Q);if(z===void 0)X.delete(Q);else if(z!==Q)X.delete(Q),X.add(z)}else for(let[Q,z]of Object.entries(X)){let J=e0($,X,Q,z);if(J===void 0)delete X[Q];else if(J!==z)X[Q]=J}return $.call(Z,U,X)}sZ.applyReviver=e0});var X0=R((oZ)=>{var nZ=C();function j3($,Z,U){if(Array.isArray($))return $.map((X,Q)=>j3(X,String(Q),U));if($&&typeof $.toJSON==="function"){if(!U||!nZ.hasAnchor($))return $.toJSON(Z,U);let X={aliasCount:0,count:1,res:void 0};U.anchors.set($,X),U.onCreate=(z)=>{X.res=z,delete U.onCreate};let Q=$.toJSON(Z,U);if(U.onCreate)U.onCreate(Q);return Q}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}oZ.toJS=j3});var u1=R((Z4)=>{var eZ=m$(),g3=C(),$4=X0();class x3{constructor($){Object.defineProperty(this,g3.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:Z,maxAliasCount:U,onAnchor:X,reviver:Q}={}){if(!g3.isDocument($))throw TypeError("A document argument is required");let z={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},J=$4.toJS(this,"",z);if(typeof X==="function")for(let{count:H,res:q}of z.anchors.values())X(q,H);return typeof Q==="function"?eZ.applyReviver(Q,{"":J},"",J):J}}Z4.NodeBase=x3});var $1=R((H4)=>{var X4=f1(),Q4=t0(),E0=C(),z4=u1(),J4=X0();class h3 extends z4.NodeBase{constructor($){super(E0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){let U;if(Z?.aliasResolveCache)U=Z.aliasResolveCache;else if(U=[],Q4.visit($,{Node:(Q,z)=>{if(E0.isAlias(z)||E0.hasAnchor(z))U.push(z)}}),Z)Z.aliasResolveCache=U;let X=void 0;for(let Q of U){if(Q===this)break;if(Q.anchor===this.source)X=Q}return X}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:U,doc:X,maxAliasCount:Q}=Z,z=this.resolve(X,Z);if(!z){let H=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(H)}let J=U.get(z);if(!J)J4.toJS(z,null,Z),J=U.get(z);if(J?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(Q>=0){if(J.count+=1,J.aliasCount===0)J.aliasCount=k1(X,z,U);if(J.count*J.aliasCount>Q)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return J.res}toString($,Z,U){let X=`*${this.source}`;if($){if(X4.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let Q=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(Q)}if($.implicitKey)return`${X} `}return X}}function k1($,Z,U){if(E0.isAlias(Z)){let X=Z.resolve($),Q=U&&X&&U.get(X);return Q?Q.count*Q.aliasCount:0}else if(E0.isCollection(Z)){let X=0;for(let Q of Z.items){let z=k1($,Q,U);if(z>X)X=z}return X}else if(E0.isPair(Z)){let X=k1($,Z.key,U),Q=k1($,Z.value,U);return Math.max(X,Q)}return 1}H4.Alias=h3});var x=R((V4)=>{var Y4=C(),G4=u1(),_4=X0(),B4=($)=>!$||typeof $!=="function"&&typeof $!=="object";class O0 extends G4.NodeBase{constructor($){super(Y4.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:_4.toJS(this.value,$,Z)}toString(){return String(this.value)}}O0.BLOCK_FOLDED="BLOCK_FOLDED";O0.BLOCK_LITERAL="BLOCK_LITERAL";O0.PLAIN="PLAIN";O0.QUOTE_DOUBLE="QUOTE_DOUBLE";O0.QUOTE_SINGLE="QUOTE_SINGLE";V4.Scalar=O0;V4.isScalarValue=B4});var Z1=R((M4)=>{var D4=$1(),W0=C(),y3=x(),I4="tag:yaml.org,2002:";function L4($,Z,U){if(Z){let X=U.filter((z)=>z.tag===Z),Q=X.find((z)=>!z.format)??X[0];if(!Q)throw Error(`Tag ${Z} not found`);return Q}return U.find((X)=>X.identify?.($)&&!X.format)}function R4($,Z,U){if(W0.isDocument($))$=$.contents;if(W0.isNode($))return $;if(W0.isPair($)){let _=U.schema[W0.MAP].createNode?.(U.schema,null,U);return _.items.push($),_}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:X,onAnchor:Q,onTagObj:z,schema:J,sourceObjects:H}=U,q=void 0;if(X&&$&&typeof $==="object")if(q=H.get($),q)return q.anchor??(q.anchor=Q($)),new D4.Alias(q.anchor);else q={anchor:null,node:null},H.set($,q);if(Z?.startsWith("!!"))Z=I4+Z.slice(2);let Y=L4($,Z,J.tags);if(!Y){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let _=new y3.Scalar($);if(q)q.node=_;return _}Y=$ instanceof Map?J[W0.MAP]:(Symbol.iterator in Object($))?J[W0.SEQ]:J[W0.MAP]}if(z)z(Y),delete U.onTagObj;let G=Y?.createNode?Y.createNode(U.schema,$,U):typeof Y?.nodeClass?.from==="function"?Y.nodeClass.from(U.schema,$,U):new y3.Scalar($);if(Z)G.tag=Z;else if(!Y.default)G.tag=Y.tag;if(q)q.node=G;return G}M4.createNode=R4});var v1=R((A4)=>{var F4=Z1(),a=C(),P4=u1();function p$($,Z,U){let X=U;for(let Q=Z.length-1;Q>=0;--Q){let z=Z[Q];if(typeof z==="number"&&Number.isInteger(z)&&z>=0){let J=[];J[z]=X,X=J}else X=new Map([[z,X]])}return F4.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var f3=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class u3 extends P4.NodeBase{constructor($,Z){super($);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone($){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)Z.schema=$;if(Z.items=Z.items.map((U)=>a.isNode(U)||a.isPair(U)?U.clone($):U),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(f3($))this.add(Z);else{let[U,...X]=$,Q=this.get(U,!0);if(a.isCollection(Q))Q.addIn(X,Z);else if(Q===void 0&&this.schema)this.set(U,p$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${X}`)}}deleteIn($){let[Z,...U]=$;if(U.length===0)return this.delete(Z);let X=this.get(Z,!0);if(a.isCollection(X))return X.deleteIn(U);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${U}`)}getIn($,Z){let[U,...X]=$,Q=this.get(U,!0);if(X.length===0)return!Z&&a.isScalar(Q)?Q.value:Q;else return a.isCollection(Q)?Q.getIn(X,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!a.isPair(Z))return!1;let U=Z.value;return U==null||$&&a.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[Z,...U]=$;if(U.length===0)return this.has(Z);let X=this.get(Z,!0);return a.isCollection(X)?X.hasIn(U):!1}setIn($,Z){let[U,...X]=$;if(X.length===0)this.set(U,Z);else{let Q=this.get(U,!0);if(a.isCollection(Q))Q.setIn(X,Z);else if(Q===void 0&&this.schema)this.set(U,p$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${X}`)}}}A4.Collection=u3;A4.collectionFromPath=p$;A4.isEmptyPath=f3});var U1=R((S4)=>{var C4=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function l$($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var b4=($,Z,U)=>$.endsWith(`
3
+ `)?l$(U,Z):U.includes(`
4
4
  `)?`
5
- `+x$(U,Z):($.endsWith(" ")?"":" ")+U;LU.indentComment=x$;LU.lineComment=IU;LU.stringifyComment=WU});var E3=D((PU)=>{function KU($,Z,U="flow",{indentAtStart:X,lineWidth:Q=80,minContentWidth:J=20,onFold:z,onOverflow:H}={}){if(!Q||Q<0)return $;if(Q<J)J=0;let Y=Math.max(1+J,1+Q-Z.length);if($.length<=Y)return $;let G=[],_={},q=Q-Z.length;if(typeof X==="number")if(X>Q-Math.max(2,J))G.push(0);else q=Q-X;let B=void 0,O=void 0,I=!1,V=-1,W=-1,L=-1;if(U==="block"){if(V=S3($,V,Z.length),V!==-1)q=V+Y}for(let P;P=$[V+=1];){if(U==="quoted"&&P==="\\"){switch(W=V,$[V+1]){case"x":V+=3;break;case"u":V+=5;break;case"U":V+=9;break;default:V+=1}L=V}if(P===`
6
- `){if(U==="block")V=S3($,V,Z.length);q=V+Z.length+Y,B=void 0}else{if(P===" "&&O&&O!==" "&&O!==`
5
+ `+l$(U,Z):($.endsWith(" ")?"":" ")+U;S4.indentComment=l$;S4.lineComment=b4;S4.stringifyComment=C4});var v3=R((h4)=>{function x4($,Z,U="flow",{indentAtStart:X,lineWidth:Q=80,minContentWidth:z=20,onFold:J,onOverflow:H}={}){if(!Q||Q<0)return $;if(Q<z)z=0;let q=Math.max(1+z,1+Q-Z.length);if($.length<=q)return $;let Y=[],G={},_=Q-Z.length;if(typeof X==="number")if(X>Q-Math.max(2,z))Y.push(0);else _=Q-X;let B=void 0,O=void 0,D=!1,V=-1,W=-1,I=-1;if(U==="block"){if(V=k3($,V,Z.length),V!==-1)_=V+q}for(let F;F=$[V+=1];){if(U==="quoted"&&F==="\\"){switch(W=V,$[V+1]){case"x":V+=3;break;case"u":V+=5;break;case"U":V+=9;break;default:V+=1}I=V}if(F===`
6
+ `){if(U==="block")V=k3($,V,Z.length);_=V+Z.length+q,B=void 0}else{if(F===" "&&O&&O!==" "&&O!==`
7
7
  `&&O!=="\t"){let A=$[V+1];if(A&&A!==" "&&A!==`
8
- `&&A!=="\t")B=V}if(V>=q)if(B)G.push(B),q=B+Y,B=void 0;else if(U==="quoted"){while(O===" "||O==="\t")O=P,P=$[V+=1],I=!0;let A=V>L+1?V-2:W-1;if(_[A])return $;G.push(A),_[A]=!0,q=A+Y,B=void 0}else I=!0}O=P}if(I&&H)H();if(G.length===0)return $;if(z)z();let R=$.slice(0,G[0]);for(let P=0;P<G.length;++P){let A=G[P],F=G[P+1]||$.length;if(A===0)R=`
9
- ${Z}${$.slice(0,F)}`;else{if(U==="quoted"&&_[A])R+=`${$[A]}\\`;R+=`
10
- ${Z}${$.slice(A+1,F)}`}}return R}function S3($,Z,U){let X=Z,Q=Z+1,J=$[Q];while(J===" "||J==="\t")if(Z<Q+U)J=$[++Z];else{do J=$[++Z];while(J&&J!==`
11
- `);X=Z,Q=Z+1,J=$[Q]}return X}PU.FOLD_BLOCK="block";PU.FOLD_FLOW="flow";PU.FOLD_QUOTED="quoted";PU.foldFlowLines=KU});var $1=D((jU)=>{var l=y(),Z0=E3(),h1=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),x1=($)=>/^(%|---|\.\.\.)/m.test($);function bU($,Z,U){if(!Z||Z<0)return!1;let X=Z-U,Q=$.length;if(Q<=X)return!1;for(let J=0,z=0;J<Q;++J)if($[J]===`
12
- `){if(J-z>X)return!0;if(z=J+1,Q-z<=X)return!1}return!0}function e0($,Z){let U=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return U;let{implicitKey:X}=Z,Q=Z.options.doubleQuotedMinMultiLineLength,J=Z.indent||(x1($)?" ":""),z="",H=0;for(let Y=0,G=U[Y];G;G=U[++Y]){if(G===" "&&U[Y+1]==="\\"&&U[Y+2]==="n")z+=U.slice(H,Y)+"\\ ",Y+=1,H=Y,G="\\";if(G==="\\")switch(U[Y+1]){case"u":{z+=U.slice(H,Y);let _=U.substr(Y+2,4);switch(_){case"0000":z+="\\0";break;case"0007":z+="\\a";break;case"000b":z+="\\v";break;case"001b":z+="\\e";break;case"0085":z+="\\N";break;case"00a0":z+="\\_";break;case"2028":z+="\\L";break;case"2029":z+="\\P";break;default:if(_.substr(0,2)==="00")z+="\\x"+_.substr(2);else z+=U.substr(Y,6)}Y+=5,H=Y+1}break;case"n":if(X||U[Y+2]==='"'||U.length<Q)Y+=1;else{z+=U.slice(H,Y)+`
8
+ `&&A!=="\t")B=V}if(V>=_)if(B)Y.push(B),_=B+q,B=void 0;else if(U==="quoted"){while(O===" "||O==="\t")O=F,F=$[V+=1],D=!0;let A=V>I+1?V-2:W-1;if(G[A])return $;Y.push(A),G[A]=!0,_=A+q,B=void 0}else D=!0}O=F}if(D&&H)H();if(Y.length===0)return $;if(J)J();let L=$.slice(0,Y[0]);for(let F=0;F<Y.length;++F){let A=Y[F],T=Y[F+1]||$.length;if(A===0)L=`
9
+ ${Z}${$.slice(0,T)}`;else{if(U==="quoted"&&G[A])L+=`${$[A]}\\`;L+=`
10
+ ${Z}${$.slice(A+1,T)}`}}return L}function k3($,Z,U){let X=Z,Q=Z+1,z=$[Q];while(z===" "||z==="\t")if(Z<Q+U)z=$[++Z];else{do z=$[++Z];while(z&&z!==`
11
+ `);X=Z,Q=Z+1,z=$[Q]}return X}h4.FOLD_BLOCK="block";h4.FOLD_FLOW="flow";h4.FOLD_QUOTED="quoted";h4.foldFlowLines=x4});var Q1=R((l4)=>{var d=x(),Q0=v3(),p1=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),l1=($)=>/^(%|---|\.\.\.)/m.test($);function v4($,Z,U){if(!Z||Z<0)return!1;let X=Z-U,Q=$.length;if(Q<=X)return!1;for(let z=0,J=0;z<Q;++z)if($[z]===`
12
+ `){if(z-J>X)return!0;if(J=z+1,Q-J<=X)return!1}return!0}function X1($,Z){let U=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return U;let{implicitKey:X}=Z,Q=Z.options.doubleQuotedMinMultiLineLength,z=Z.indent||(l1($)?" ":""),J="",H=0;for(let q=0,Y=U[q];Y;Y=U[++q]){if(Y===" "&&U[q+1]==="\\"&&U[q+2]==="n")J+=U.slice(H,q)+"\\ ",q+=1,H=q,Y="\\";if(Y==="\\")switch(U[q+1]){case"u":{J+=U.slice(H,q);let G=U.substr(q+2,4);switch(G){case"0000":J+="\\0";break;case"0007":J+="\\a";break;case"000b":J+="\\v";break;case"001b":J+="\\e";break;case"0085":J+="\\N";break;case"00a0":J+="\\_";break;case"2028":J+="\\L";break;case"2029":J+="\\P";break;default:if(G.substr(0,2)==="00")J+="\\x"+G.substr(2);else J+=U.substr(q,6)}q+=5,H=q+1}break;case"n":if(X||U[q+2]==='"'||U.length<Q)q+=1;else{J+=U.slice(H,q)+`
13
13
 
14
- `;while(U[Y+2]==="\\"&&U[Y+3]==="n"&&U[Y+4]!=='"')z+=`
15
- `,Y+=2;if(z+=J,U[Y+2]===" ")z+="\\";Y+=1,H=Y+1}break;default:Y+=1}}return z=H?z+U.slice(H):U,X?z:Z0.foldFlowLines(z,J,Z0.FOLD_QUOTED,h1(Z,!1))}function f$($,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&$.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test($))return e0($,Z);let U=Z.indent||(x1($)?" ":""),X="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${U}`)+"'";return Z.implicitKey?X:Z0.foldFlowLines(X,U,Z0.FOLD_FLOW,h1(Z,!1))}function w0($,Z){let{singleQuote:U}=Z.options,X;if(U===!1)X=e0;else{let Q=$.includes('"'),J=$.includes("'");if(Q&&!J)X=f$;else if(J&&!Q)X=e0;else X=U?f$:e0}return X($,Z)}var u$;try{u$=new RegExp(`(^|(?<!
14
+ `;while(U[q+2]==="\\"&&U[q+3]==="n"&&U[q+4]!=='"')J+=`
15
+ `,q+=2;if(J+=z,U[q+2]===" ")J+="\\";q+=1,H=q+1}break;default:q+=1}}return J=H?J+U.slice(H):U,X?J:Q0.foldFlowLines(J,z,Q0.FOLD_QUOTED,p1(Z,!1))}function d$($,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&$.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test($))return X1($,Z);let U=Z.indent||(l1($)?" ":""),X="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${U}`)+"'";return Z.implicitKey?X:Q0.foldFlowLines(X,U,Q0.FOLD_FLOW,p1(Z,!1))}function j0($,Z){let{singleQuote:U}=Z.options,X;if(U===!1)X=X1;else{let Q=$.includes('"'),z=$.includes("'");if(Q&&!z)X=d$;else if(z&&!Q)X=X1;else X=U?d$:X1}return X($,Z)}var c$;try{c$=new RegExp(`(^|(?<!
18
18
  ))
19
19
  +(?!
20
- |$)`,"g")}catch{u$=/\n+(?!\n|$)/g}function y1({comment:$,type:Z,value:U},X,Q,J){let{blockQuote:z,commentString:H,lineWidth:Y}=X.options;if(!z||/\n[\t ]+$/.test(U))return w0(U,X);let G=X.indent||(X.forceBlockIndent||x1(U)?" ":""),_=z==="literal"?!0:z==="folded"||Z===l.Scalar.BLOCK_FOLDED?!1:Z===l.Scalar.BLOCK_LITERAL?!0:!bU(U,Y,G.length);if(!U)return _?`|
20
+ |$)`,"g")}catch{c$=/\n+(?!\n|$)/g}function m1({comment:$,type:Z,value:U},X,Q,z){let{blockQuote:J,commentString:H,lineWidth:q}=X.options;if(!J||/\n[\t ]+$/.test(U))return j0(U,X);let Y=X.indent||(X.forceBlockIndent||l1(U)?" ":""),G=J==="literal"?!0:J==="folded"||Z===d.Scalar.BLOCK_FOLDED?!1:Z===d.Scalar.BLOCK_LITERAL?!0:!v4(U,q,Y.length);if(!U)return G?`|
21
21
  `:`>
22
- `;let q,B;for(B=U.length;B>0;--B){let F=U[B-1];if(F!==`
23
- `&&F!=="\t"&&F!==" ")break}let O=U.substring(B),I=O.indexOf(`
24
- `);if(I===-1)q="-";else if(U===O||I!==O.length-1){if(q="+",J)J()}else q="";if(O){if(U=U.slice(0,-O.length),O[O.length-1]===`
25
- `)O=O.slice(0,-1);O=O.replace(u$,`$&${G}`)}let V=!1,W,L=-1;for(W=0;W<U.length;++W){let F=U[W];if(F===" ")V=!0;else if(F===`
26
- `)L=W;else break}let R=U.substring(0,L<W?L+1:W);if(R)U=U.substring(R.length),R=R.replace(/\n+/g,`$&${G}`);let A=(V?G?"2":"1":"")+q;if($){if(A+=" "+H($.replace(/ ?[\r\n]+/g," ")),Q)Q()}if(!_){let F=U.replace(/\n+/g,`
27
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${G}`),N=!1,C=h1(X,!0);if(z!=="folded"&&Z!==l.Scalar.BLOCK_FOLDED)C.onOverflow=()=>{N=!0};let T=Z0.foldFlowLines(`${R}${F}${O}`,G,Z0.FOLD_BLOCK,C);if(!N)return`>${A}
28
- ${G}${T}`}return U=U.replace(/\n+/g,`$&${G}`),`|${A}
29
- ${G}${R}${U}${O}`}function wU($,Z,U,X){let{type:Q,value:J}=$,{actualString:z,implicitKey:H,indent:Y,indentStep:G,inFlow:_}=Z;if(H&&J.includes(`
30
- `)||_&&/[[\]{},]/.test(J))return w0(J,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(J))return H||_||!J.includes(`
31
- `)?w0(J,Z):y1($,Z,U,X);if(!H&&!_&&Q!==l.Scalar.PLAIN&&J.includes(`
32
- `))return y1($,Z,U,X);if(x1(J)){if(Y==="")return Z.forceBlockIndent=!0,y1($,Z,U,X);else if(H&&Y===G)return w0(J,Z)}let q=J.replace(/\n+/g,`$&
33
- ${Y}`);if(z){let B=(V)=>V.default&&V.tag!=="tag:yaml.org,2002:str"&&V.test?.test(q),{compat:O,tags:I}=Z.doc.schema;if(I.some(B)||O?.some(B))return w0(J,Z)}return H?q:Z0.foldFlowLines(q,Y,Z0.FOLD_FLOW,h1(Z,!1))}function CU($,Z,U,X){let{implicitKey:Q,inFlow:J}=Z,z=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:H}=$;if(H!==l.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))H=l.Scalar.QUOTE_DOUBLE}let Y=(_)=>{switch(_){case l.Scalar.BLOCK_FOLDED:case l.Scalar.BLOCK_LITERAL:return Q||J?w0(z.value,Z):y1(z,Z,U,X);case l.Scalar.QUOTE_DOUBLE:return e0(z.value,Z);case l.Scalar.QUOTE_SINGLE:return f$(z.value,Z);case l.Scalar.PLAIN:return wU(z,Z,U,X);default:return null}},G=Y(H);if(G===null){let{defaultKeyType:_,defaultStringType:q}=Z.options,B=Q&&_||q;if(G=Y(B),G===null)throw Error(`Unsupported default string type ${B}`)}return G}jU.stringifyString=CU});var Z1=D((kU)=>{var EU=j1(),U0=w(),gU=t0(),yU=$1();function hU($,Z){let U=Object.assign({blockQuote:!0,commentString:gU.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,Z),X;switch(U.collectionStyle){case"block":X=!1;break;case"flow":X=!0;break;default:X=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:X,options:U}}function xU($,Z){if(Z.tag){let Q=$.filter((J)=>J.tag===Z.tag);if(Q.length>0)return Q.find((J)=>J.format===Z.format)??Q[0]}let U=void 0,X;if(U0.isScalar(Z)){X=Z.value;let Q=$.filter((J)=>J.identify?.(X));if(Q.length>1){let J=Q.filter((z)=>z.test);if(J.length>0)Q=J}U=Q.find((J)=>J.format===Z.format)??Q.find((J)=>!J.format)}else X=Z,U=$.find((Q)=>Q.nodeClass&&X instanceof Q.nodeClass);if(!U){let Q=X?.constructor?.name??(X===null?"null":typeof X);throw Error(`Tag not resolved for ${Q} value`)}return U}function fU($,Z,{anchors:U,doc:X}){if(!X.directives)return"";let Q=[],J=(U0.isScalar($)||U0.isCollection($))&&$.anchor;if(J&&EU.anchorIsValid(J))U.add(J),Q.push(`&${J}`);let z=$.tag??(Z.default?null:Z.tag);if(z)Q.push(X.directives.tagString(z));return Q.join(" ")}function uU($,Z,U,X){if(U0.isPair($))return $.toString(Z,U,X);if(U0.isAlias($)){if(Z.doc.directives)return $.toString(Z);if(Z.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add($);else Z.resolvedAliases=new Set([$]);$=$.resolve(Z.doc)}}let Q=void 0,J=U0.isNode($)?$:Z.doc.createNode($,{onTagObj:(Y)=>Q=Y});Q??(Q=xU(Z.doc.schema.tags,J));let z=fU(J,Q,Z);if(z.length>0)Z.indentAtStart=(Z.indentAtStart??0)+z.length+1;let H=typeof Q.stringify==="function"?Q.stringify(J,Z,U,X):U0.isScalar(J)?yU.stringifyString(J,Z,U,X):J.toString(Z,U,X);if(!z)return H;return U0.isScalar(J)||H[0]==="{"||H[0]==="["?`${z} ${H}`:`${z}
34
- ${Z.indent}${H}`}kU.createStringifyContext=hU;kU.stringify=uU});var h3=D((pU)=>{var n=w(),g3=y(),y3=Z1(),U1=t0();function lU({key:$,value:Z},U,X,Q){let{allNullValues:J,doc:z,indent:H,indentStep:Y,options:{commentString:G,indentSeq:_,simpleKeys:q}}=U,B=n.isNode($)&&$.comment||null;if(q){if(B)throw Error("With simple keys, key nodes cannot have comments");if(n.isCollection($)||!n.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let O=!q&&(!$||B&&Z==null&&!U.inFlow||n.isCollection($)||(n.isScalar($)?$.type===g3.Scalar.BLOCK_FOLDED||$.type===g3.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!O&&(q||!J),indent:H+Y});let I=!1,V=!1,W=y3.stringify($,U,()=>I=!0,()=>V=!0);if(!O&&!U.inFlow&&W.length>1024){if(q)throw Error("With simple keys, single line scalar must not span more than 1024 characters");O=!0}if(U.inFlow){if(J||Z==null){if(I&&X)X();return W===""?"?":O?`? ${W}`:W}}else if(J&&!q||Z==null&&O){if(W=`? ${W}`,B&&!I)W+=U1.lineComment(W,U.indent,G(B));else if(V&&Q)Q();return W}if(I)B=null;if(O){if(B)W+=U1.lineComment(W,U.indent,G(B));W=`? ${W}
35
- ${H}:`}else if(W=`${W}:`,B)W+=U1.lineComment(W,U.indent,G(B));let L,R,P;if(n.isNode(Z))L=!!Z.spaceBefore,R=Z.commentBefore,P=Z.comment;else if(L=!1,R=null,P=null,Z&&typeof Z==="object")Z=z.createNode(Z);if(U.implicitKey=!1,!O&&!B&&n.isScalar(Z))U.indentAtStart=W.length+1;if(V=!1,!_&&Y.length>=2&&!U.inFlow&&!O&&n.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)U.indent=U.indent.substring(2);let A=!1,F=y3.stringify(Z,U,()=>A=!0,()=>V=!0),N=" ";if(B||L||R){if(N=L?`
36
- `:"",R){let C=G(R);N+=`
37
- ${U1.indentComment(C,U.indent)}`}if(F===""&&!U.inFlow){if(N===`
38
- `&&P)N=`
22
+ `;let _,B;for(B=U.length;B>0;--B){let T=U[B-1];if(T!==`
23
+ `&&T!=="\t"&&T!==" ")break}let O=U.substring(B),D=O.indexOf(`
24
+ `);if(D===-1)_="-";else if(U===O||D!==O.length-1){if(_="+",z)z()}else _="";if(O){if(U=U.slice(0,-O.length),O[O.length-1]===`
25
+ `)O=O.slice(0,-1);O=O.replace(c$,`$&${Y}`)}let V=!1,W,I=-1;for(W=0;W<U.length;++W){let T=U[W];if(T===" ")V=!0;else if(T===`
26
+ `)I=W;else break}let L=U.substring(0,I<W?I+1:W);if(L)U=U.substring(L.length),L=L.replace(/\n+/g,`$&${Y}`);let A=(V?Y?"2":"1":"")+_;if($){if(A+=" "+H($.replace(/ ?[\r\n]+/g," ")),Q)Q()}if(!G){let T=U.replace(/\n+/g,`
27
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${Y}`),N=!1,b=p1(X,!0);if(J!=="folded"&&Z!==d.Scalar.BLOCK_FOLDED)b.onOverflow=()=>{N=!0};let P=Q0.foldFlowLines(`${L}${T}${O}`,Y,Q0.FOLD_BLOCK,b);if(!N)return`>${A}
28
+ ${Y}${P}`}return U=U.replace(/\n+/g,`$&${Y}`),`|${A}
29
+ ${Y}${L}${U}${O}`}function m4($,Z,U,X){let{type:Q,value:z}=$,{actualString:J,implicitKey:H,indent:q,indentStep:Y,inFlow:G}=Z;if(H&&z.includes(`
30
+ `)||G&&/[[\]{},]/.test(z))return j0(z,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(z))return H||G||!z.includes(`
31
+ `)?j0(z,Z):m1($,Z,U,X);if(!H&&!G&&Q!==d.Scalar.PLAIN&&z.includes(`
32
+ `))return m1($,Z,U,X);if(l1(z)){if(q==="")return Z.forceBlockIndent=!0,m1($,Z,U,X);else if(H&&q===Y)return j0(z,Z)}let _=z.replace(/\n+/g,`$&
33
+ ${q}`);if(J){let B=(V)=>V.default&&V.tag!=="tag:yaml.org,2002:str"&&V.test?.test(_),{compat:O,tags:D}=Z.doc.schema;if(D.some(B)||O?.some(B))return j0(z,Z)}return H?_:Q0.foldFlowLines(_,q,Q0.FOLD_FLOW,p1(Z,!1))}function p4($,Z,U,X){let{implicitKey:Q,inFlow:z}=Z,J=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:H}=$;if(H!==d.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(J.value))H=d.Scalar.QUOTE_DOUBLE}let q=(G)=>{switch(G){case d.Scalar.BLOCK_FOLDED:case d.Scalar.BLOCK_LITERAL:return Q||z?j0(J.value,Z):m1(J,Z,U,X);case d.Scalar.QUOTE_DOUBLE:return X1(J.value,Z);case d.Scalar.QUOTE_SINGLE:return d$(J.value,Z);case d.Scalar.PLAIN:return m4(J,Z,U,X);default:return null}},Y=q(H);if(Y===null){let{defaultKeyType:G,defaultStringType:_}=Z.options,B=Q&&G||_;if(Y=q(B),Y===null)throw Error(`Unsupported default string type ${B}`)}return Y}l4.stringifyString=p4});var z1=R((t4)=>{var c4=f1(),z0=C(),i4=U1(),r4=Q1();function s4($,Z){let U=Object.assign({blockQuote:!0,commentString:i4.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,Z),X;switch(U.collectionStyle){case"block":X=!1;break;case"flow":X=!0;break;default:X=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:X,options:U}}function a4($,Z){if(Z.tag){let Q=$.filter((z)=>z.tag===Z.tag);if(Q.length>0)return Q.find((z)=>z.format===Z.format)??Q[0]}let U=void 0,X;if(z0.isScalar(Z)){X=Z.value;let Q=$.filter((z)=>z.identify?.(X));if(Q.length>1){let z=Q.filter((J)=>J.test);if(z.length>0)Q=z}U=Q.find((z)=>z.format===Z.format)??Q.find((z)=>!z.format)}else X=Z,U=$.find((Q)=>Q.nodeClass&&X instanceof Q.nodeClass);if(!U){let Q=X?.constructor?.name??(X===null?"null":typeof X);throw Error(`Tag not resolved for ${Q} value`)}return U}function n4($,Z,{anchors:U,doc:X}){if(!X.directives)return"";let Q=[],z=(z0.isScalar($)||z0.isCollection($))&&$.anchor;if(z&&c4.anchorIsValid(z))U.add(z),Q.push(`&${z}`);let J=$.tag??(Z.default?null:Z.tag);if(J)Q.push(X.directives.tagString(J));return Q.join(" ")}function o4($,Z,U,X){if(z0.isPair($))return $.toString(Z,U,X);if(z0.isAlias($)){if(Z.doc.directives)return $.toString(Z);if(Z.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add($);else Z.resolvedAliases=new Set([$]);$=$.resolve(Z.doc)}}let Q=void 0,z=z0.isNode($)?$:Z.doc.createNode($,{onTagObj:(q)=>Q=q});Q??(Q=a4(Z.doc.schema.tags,z));let J=n4(z,Q,Z);if(J.length>0)Z.indentAtStart=(Z.indentAtStart??0)+J.length+1;let H=typeof Q.stringify==="function"?Q.stringify(z,Z,U,X):z0.isScalar(z)?r4.stringifyString(z,Z,U,X):z.toString(Z,U,X);if(!J)return H;return z0.isScalar(z)||H[0]==="{"||H[0]==="["?`${J} ${H}`:`${J}
34
+ ${Z.indent}${H}`}t4.createStringifyContext=s4;t4.stringify=o4});var l3=R((U5)=>{var e=C(),m3=x(),p3=z1(),J1=U1();function Z5({key:$,value:Z},U,X,Q){let{allNullValues:z,doc:J,indent:H,indentStep:q,options:{commentString:Y,indentSeq:G,simpleKeys:_}}=U,B=e.isNode($)&&$.comment||null;if(_){if(B)throw Error("With simple keys, key nodes cannot have comments");if(e.isCollection($)||!e.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let O=!_&&(!$||B&&Z==null&&!U.inFlow||e.isCollection($)||(e.isScalar($)?$.type===m3.Scalar.BLOCK_FOLDED||$.type===m3.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!O&&(_||!z),indent:H+q});let D=!1,V=!1,W=p3.stringify($,U,()=>D=!0,()=>V=!0);if(!O&&!U.inFlow&&W.length>1024){if(_)throw Error("With simple keys, single line scalar must not span more than 1024 characters");O=!0}if(U.inFlow){if(z||Z==null){if(D&&X)X();return W===""?"?":O?`? ${W}`:W}}else if(z&&!_||Z==null&&O){if(W=`? ${W}`,B&&!D)W+=J1.lineComment(W,U.indent,Y(B));else if(V&&Q)Q();return W}if(D)B=null;if(O){if(B)W+=J1.lineComment(W,U.indent,Y(B));W=`? ${W}
35
+ ${H}:`}else if(W=`${W}:`,B)W+=J1.lineComment(W,U.indent,Y(B));let I,L,F;if(e.isNode(Z))I=!!Z.spaceBefore,L=Z.commentBefore,F=Z.comment;else if(I=!1,L=null,F=null,Z&&typeof Z==="object")Z=J.createNode(Z);if(U.implicitKey=!1,!O&&!B&&e.isScalar(Z))U.indentAtStart=W.length+1;if(V=!1,!G&&q.length>=2&&!U.inFlow&&!O&&e.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)U.indent=U.indent.substring(2);let A=!1,T=p3.stringify(Z,U,()=>A=!0,()=>V=!0),N=" ";if(B||I||L){if(N=I?`
36
+ `:"",L){let b=Y(L);N+=`
37
+ ${J1.indentComment(b,U.indent)}`}if(T===""&&!U.inFlow){if(N===`
38
+ `&&F)N=`
39
39
 
40
40
  `}else N+=`
41
- ${U.indent}`}else if(!O&&n.isCollection(Z)){let C=F[0],T=F.indexOf(`
42
- `),b=T!==-1,j=U.inFlow??Z.flow??Z.items.length===0;if(b||!j){let c=!1;if(b&&(C==="&"||C==="!")){let g=F.indexOf(" ");if(C==="&"&&g!==-1&&g<T&&F[g+1]==="!")g=F.indexOf(" ",g+1);if(g===-1||T<g)c=!0}if(!c)N=`
43
- ${U.indent}`}}else if(F===""||F[0]===`
44
- `)N="";if(W+=N+F,U.inFlow){if(A&&X)X()}else if(P&&!A)W+=U1.lineComment(W,U.indent,G(P));else if(V&&Q)Q();return W}pU.stringifyPair=lU});var k$=D((sU)=>{var x3=p0("process");function cU($,...Z){if($==="debug")console.log(...Z)}function iU($,Z){if($==="debug"||$==="warn")if(typeof x3.emitWarning==="function")x3.emitWarning(Z);else console.warn(Z)}sU.debug=cU;sU.warn=iU});var k1=D((oU)=>{var X1=w(),f3=y(),f1="<<",u1={identify:($)=>$===f1||typeof $==="symbol"&&$.description===f1,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new f3.Scalar(Symbol(f1)),{addToJSMap:u3}),stringify:()=>f1},nU=($,Z)=>(u1.identify(Z)||X1.isScalar(Z)&&(!Z.type||Z.type===f3.Scalar.PLAIN)&&u1.identify(Z.value))&&$?.doc.schema.tags.some((U)=>U.tag===u1.tag&&U.default);function u3($,Z,U){if(U=$&&X1.isAlias(U)?U.resolve($.doc):U,X1.isSeq(U))for(let X of U.items)v$($,Z,X);else if(Array.isArray(U))for(let X of U)v$($,Z,X);else v$($,Z,U)}function v$($,Z,U){let X=$&&X1.isAlias(U)?U.resolve($.doc):U;if(!X1.isMap(X))throw Error("Merge sources must be maps or map aliases");let Q=X.toJSON(null,$,Map);for(let[J,z]of Q)if(Z instanceof Map){if(!Z.has(J))Z.set(J,z)}else if(Z instanceof Set)Z.add(J);else if(!Object.prototype.hasOwnProperty.call(Z,J))Object.defineProperty(Z,J,{value:z,writable:!0,enumerable:!0,configurable:!0});return Z}oU.addMergeToJSMap=u3;oU.isMergeKey=nU;oU.merge=u1});var l$=D((J4)=>{var Z4=k$(),k3=k1(),U4=Z1(),v3=w(),m$=$0();function X4($,Z,{key:U,value:X}){if(v3.isNode(U)&&U.addToJSMap)U.addToJSMap($,Z,X);else if(k3.isMergeKey($,U))k3.addMergeToJSMap($,Z,X);else{let Q=m$.toJS(U,"",$);if(Z instanceof Map)Z.set(Q,m$.toJS(X,Q,$));else if(Z instanceof Set)Z.add(Q);else{let J=Q4(U,Q,$),z=m$.toJS(X,J,$);if(J in Z)Object.defineProperty(Z,J,{value:z,writable:!0,enumerable:!0,configurable:!0});else Z[J]=z}}return Z}function Q4($,Z,U){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(v3.isNode($)&&U?.doc){let X=U4.createStringifyContext(U.doc,{});X.anchors=new Set;for(let J of U.anchors.keys())X.anchors.add(J.anchor);X.inFlow=!0,X.inStringifyKey=!0;let Q=$.toString(X);if(!U.mapKeyWarned){let J=JSON.stringify(Q);if(J.length>40)J=J.substring(0,36)+'..."';Z4.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${J}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return Q}return JSON.stringify(Z)}J4.addPairToJSMap=X4});var X0=D((q4)=>{var m3=o0(),H4=h3(),G4=l$(),v1=w();function Y4($,Z,U){let X=m3.createNode($,void 0,U),Q=m3.createNode(Z,void 0,U);return new m1(X,Q)}class m1{constructor($,Z=null){Object.defineProperty(this,v1.NODE_TYPE,{value:v1.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:U}=this;if(v1.isNode(Z))Z=Z.clone($);if(v1.isNode(U))U=U.clone($);return new m1(Z,U)}toJSON($,Z){let U=Z?.mapAsMap?new Map:{};return G4.addPairToJSMap(Z,U,this)}toString($,Z,U){return $?.doc?H4.stringifyPair(this,$,Z,U):JSON.stringify(this)}}q4.Pair=m1;q4.createPair=Y4});var p$=D((I4)=>{var V0=w(),l3=Z1(),l1=t0();function V4($,Z,U){return(Z.inFlow??$.flow?W4:O4)($,Z,U)}function O4({comment:$,items:Z},U,{blockItemPrefix:X,flowChars:Q,itemIndent:J,onChompKeep:z,onComment:H}){let{indent:Y,options:{commentString:G}}=U,_=Object.assign({},U,{indent:J,type:null}),q=!1,B=[];for(let I=0;I<Z.length;++I){let V=Z[I],W=null;if(V0.isNode(V)){if(!q&&V.spaceBefore)B.push("");if(p1(U,B,V.commentBefore,q),V.comment)W=V.comment}else if(V0.isPair(V)){let R=V0.isNode(V.key)?V.key:null;if(R){if(!q&&R.spaceBefore)B.push("");p1(U,B,R.commentBefore,q)}}q=!1;let L=l3.stringify(V,_,()=>W=null,()=>q=!0);if(W)L+=l1.lineComment(L,J,G(W));if(q&&W)q=!1;B.push(X+L)}let O;if(B.length===0)O=Q.start+Q.end;else{O=B[0];for(let I=1;I<B.length;++I){let V=B[I];O+=V?`
45
- ${Y}${V}`:`
41
+ ${U.indent}`}else if(!O&&e.isCollection(Z)){let b=T[0],P=T.indexOf(`
42
+ `),w=P!==-1,v=U.inFlow??Z.flow??Z.items.length===0;if(w||!v){let S=!1;if(w&&(b==="&"||b==="!")){let g=T.indexOf(" ");if(b==="&"&&g!==-1&&g<P&&T[g+1]==="!")g=T.indexOf(" ",g+1);if(g===-1||P<g)S=!0}if(!S)N=`
43
+ ${U.indent}`}}else if(T===""||T[0]===`
44
+ `)N="";if(W+=N+T,U.inFlow){if(A&&X)X()}else if(F&&!A)W+=J1.lineComment(W,U.indent,Y(F));else if(V&&Q)Q();return W}U5.stringifyPair=Z5});var i$=R((J5)=>{var d3=r0("process");function Q5($,...Z){if($==="debug")console.log(...Z)}function z5($,Z){if($==="debug"||$==="warn")if(typeof d3.emitWarning==="function")d3.emitWarning(Z);else console.warn(Z)}J5.debug=Q5;J5.warn=z5});var i1=R((G5)=>{var H1=C(),c3=x(),d1="<<",c1={identify:($)=>$===d1||typeof $==="symbol"&&$.description===d1,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new c3.Scalar(Symbol(d1)),{addToJSMap:i3}),stringify:()=>d1},Y5=($,Z)=>(c1.identify(Z)||H1.isScalar(Z)&&(!Z.type||Z.type===c3.Scalar.PLAIN)&&c1.identify(Z.value))&&$?.doc.schema.tags.some((U)=>U.tag===c1.tag&&U.default);function i3($,Z,U){if(U=$&&H1.isAlias(U)?U.resolve($.doc):U,H1.isSeq(U))for(let X of U.items)r$($,Z,X);else if(Array.isArray(U))for(let X of U)r$($,Z,X);else r$($,Z,U)}function r$($,Z,U){let X=$&&H1.isAlias(U)?U.resolve($.doc):U;if(!H1.isMap(X))throw Error("Merge sources must be maps or map aliases");let Q=X.toJSON(null,$,Map);for(let[z,J]of Q)if(Z instanceof Map){if(!Z.has(z))Z.set(z,J)}else if(Z instanceof Set)Z.add(z);else if(!Object.prototype.hasOwnProperty.call(Z,z))Object.defineProperty(Z,z,{value:J,writable:!0,enumerable:!0,configurable:!0});return Z}G5.addMergeToJSMap=i3;G5.isMergeKey=Y5;G5.merge=c1});var a$=R((L5)=>{var O5=i$(),r3=i1(),W5=z1(),s3=C(),s$=X0();function D5($,Z,{key:U,value:X}){if(s3.isNode(U)&&U.addToJSMap)U.addToJSMap($,Z,X);else if(r3.isMergeKey($,U))r3.addMergeToJSMap($,Z,X);else{let Q=s$.toJS(U,"",$);if(Z instanceof Map)Z.set(Q,s$.toJS(X,Q,$));else if(Z instanceof Set)Z.add(Q);else{let z=I5(U,Q,$),J=s$.toJS(X,z,$);if(z in Z)Object.defineProperty(Z,z,{value:J,writable:!0,enumerable:!0,configurable:!0});else Z[z]=J}}return Z}function I5($,Z,U){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(s3.isNode($)&&U?.doc){let X=W5.createStringifyContext(U.doc,{});X.anchors=new Set;for(let z of U.anchors.keys())X.anchors.add(z.anchor);X.inFlow=!0,X.inStringifyKey=!0;let Q=$.toString(X);if(!U.mapKeyWarned){let z=JSON.stringify(Q);if(z.length>40)z=z.substring(0,36)+'..."';O5.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${z}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return Q}return JSON.stringify(Z)}L5.addPairToJSMap=D5});var J0=R((P5)=>{var a3=Z1(),M5=l3(),K5=a$(),r1=C();function F5($,Z,U){let X=a3.createNode($,void 0,U),Q=a3.createNode(Z,void 0,U);return new s1(X,Q)}class s1{constructor($,Z=null){Object.defineProperty(this,r1.NODE_TYPE,{value:r1.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:U}=this;if(r1.isNode(Z))Z=Z.clone($);if(r1.isNode(U))U=U.clone($);return new s1(Z,U)}toJSON($,Z){let U=Z?.mapAsMap?new Map:{};return K5.addPairToJSMap(Z,U,this)}toString($,Z,U){return $?.doc?M5.stringifyPair(this,$,Z,U):JSON.stringify(this)}}P5.Pair=s1;P5.createPair=F5});var n$=R((b5)=>{var D0=C(),n3=z1(),a1=U1();function N5($,Z,U){return(Z.inFlow??$.flow?C5:w5)($,Z,U)}function w5({comment:$,items:Z},U,{blockItemPrefix:X,flowChars:Q,itemIndent:z,onChompKeep:J,onComment:H}){let{indent:q,options:{commentString:Y}}=U,G=Object.assign({},U,{indent:z,type:null}),_=!1,B=[];for(let D=0;D<Z.length;++D){let V=Z[D],W=null;if(D0.isNode(V)){if(!_&&V.spaceBefore)B.push("");if(n1(U,B,V.commentBefore,_),V.comment)W=V.comment}else if(D0.isPair(V)){let L=D0.isNode(V.key)?V.key:null;if(L){if(!_&&L.spaceBefore)B.push("");n1(U,B,L.commentBefore,_)}}_=!1;let I=n3.stringify(V,G,()=>W=null,()=>_=!0);if(W)I+=a1.lineComment(I,z,Y(W));if(_&&W)_=!1;B.push(X+I)}let O;if(B.length===0)O=Q.start+Q.end;else{O=B[0];for(let D=1;D<B.length;++D){let V=B[D];O+=V?`
45
+ ${q}${V}`:`
46
46
  `}}if($){if(O+=`
47
- `+l1.indentComment(G($),Y),H)H()}else if(q&&z)z();return O}function W4({items:$},Z,{flowChars:U,itemIndent:X}){let{indent:Q,indentStep:J,flowCollectionPadding:z,options:{commentString:H}}=Z;X+=J;let Y=Object.assign({},Z,{indent:X,inFlow:!0,type:null}),G=!1,_=0,q=[];for(let I=0;I<$.length;++I){let V=$[I],W=null;if(V0.isNode(V)){if(V.spaceBefore)q.push("");if(p1(Z,q,V.commentBefore,!1),V.comment)W=V.comment}else if(V0.isPair(V)){let R=V0.isNode(V.key)?V.key:null;if(R){if(R.spaceBefore)q.push("");if(p1(Z,q,R.commentBefore,!1),R.comment)G=!0}let P=V0.isNode(V.value)?V.value:null;if(P){if(P.comment)W=P.comment;if(P.commentBefore)G=!0}else if(V.value==null&&R?.comment)W=R.comment}if(W)G=!0;let L=l3.stringify(V,Y,()=>W=null);if(G||(G=q.length>_||L.includes(`
48
- `)),I<$.length-1)L+=",";else if(Z.options.trailingComma){if(Z.options.lineWidth>0)G||(G=q.reduce((R,P)=>R+P.length+2,2)+(L.length+2)>Z.options.lineWidth);if(G)L+=","}if(W)L+=l1.lineComment(L,X,H(W));q.push(L),_=q.length}let{start:B,end:O}=U;if(q.length===0)return B+O;else{if(!G){let I=q.reduce((V,W)=>V+W.length+2,2);G=Z.options.lineWidth>0&&I>Z.options.lineWidth}if(G){let I=B;for(let V of q)I+=V?`
49
- ${J}${Q}${V}`:`
50
- `;return`${I}
51
- ${Q}${O}`}else return`${B}${z}${q.join(" ")}${z}${O}`}}function p1({indent:$,options:{commentString:Z}},U,X,Q){if(X&&Q)X=X.replace(/^\n+/,"");if(X){let J=l1.indentComment(Z(X),$);U.push(J.trimStart())}}I4.stringifyCollection=V4});var J0=D((P4)=>{var D4=p$(),R4=l$(),M4=g1(),Q0=w(),d1=X0(),K4=y();function Q1($,Z){let U=Q0.isScalar(Z)?Z.value:Z;for(let X of $)if(Q0.isPair(X)){if(X.key===Z||X.key===U)return X;if(Q0.isScalar(X.key)&&X.key.value===U)return X}return}class p3 extends M4.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(Q0.MAP,$);this.items=[]}static from($,Z,U){let{keepUndefined:X,replacer:Q}=U,J=new this($),z=(H,Y)=>{if(typeof Q==="function")Y=Q.call(Z,H,Y);else if(Array.isArray(Q)&&!Q.includes(H))return;if(Y!==void 0||X)J.items.push(d1.createPair(H,Y,U))};if(Z instanceof Map)for(let[H,Y]of Z)z(H,Y);else if(Z&&typeof Z==="object")for(let H of Object.keys(Z))z(H,Z[H]);if(typeof $.sortMapEntries==="function")J.items.sort($.sortMapEntries);return J}add($,Z){let U;if(Q0.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new d1.Pair($,$?.value);else U=new d1.Pair($.key,$.value);let X=Q1(this.items,U.key),Q=this.schema?.sortMapEntries;if(X){if(!Z)throw Error(`Key ${U.key} already set`);if(Q0.isScalar(X.value)&&K4.isScalarValue(U.value))X.value.value=U.value;else X.value=U.value}else if(Q){let J=this.items.findIndex((z)=>Q(U,z)<0);if(J===-1)this.items.push(U);else this.items.splice(J,0,U)}else this.items.push(U)}delete($){let Z=Q1(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let X=Q1(this.items,$)?.value;return(!Z&&Q0.isScalar(X)?X.value:X)??void 0}has($){return!!Q1(this.items,$)}set($,Z){this.add(new d1.Pair($,Z),!0)}toJSON($,Z,U){let X=U?new U:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(X);for(let Q of this.items)R4.addPairToJSMap(Z,X,Q);return X}toString($,Z,U){if(!$)return JSON.stringify(this);for(let X of this.items)if(!Q0.isPair(X))throw Error(`Map items must all be pairs; found ${JSON.stringify(X)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return D4.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:Z})}}P4.YAMLMap=p3;P4.findPair=Q1});var C0=D((b4)=>{var F4=w(),d3=J0(),N4={collection:"map",default:!0,nodeClass:d3.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!F4.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,U)=>d3.YAMLMap.from($,Z,U)};b4.map=N4});var z0=D((y4)=>{var C4=o0(),j4=p$(),S4=g1(),i1=w(),E4=y(),g4=$0();class c3 extends S4.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(i1.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let Z=c1($);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get($,Z){let U=c1($);if(typeof U!=="number")return;let X=this.items[U];return!Z&&i1.isScalar(X)?X.value:X}has($){let Z=c1($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let U=c1($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let X=this.items[U];if(i1.isScalar(X)&&E4.isScalarValue(Z))X.value=Z;else this.items[U]=Z}toJSON($,Z){let U=[];if(Z?.onCreate)Z.onCreate(U);let X=0;for(let Q of this.items)U.push(g4.toJS(Q,String(X++),Z));return U}toString($,Z,U){if(!$)return JSON.stringify(this);return j4.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:Z})}static from($,Z,U){let{replacer:X}=U,Q=new this($);if(Z&&Symbol.iterator in Object(Z)){let J=0;for(let z of Z){if(typeof X==="function"){let H=Z instanceof Set?z:String(J++);z=X.call(Z,H,z)}Q.items.push(C4.createNode(z,void 0,U))}}return Q}}function c1($){let Z=i1.isScalar($)?$.value:$;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}y4.YAMLSeq=c3});var j0=D((u4)=>{var x4=w(),i3=z0(),f4={collection:"seq",default:!0,nodeClass:i3.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!x4.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,U)=>i3.YAMLSeq.from($,Z,U)};u4.seq=f4});var J1=D((l4)=>{var v4=$1(),m4={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,U,X){return Z=Object.assign({actualString:!0},Z),v4.stringifyString($,Z,U,X)}};l4.string=m4});var s1=D((d4)=>{var s3=y(),a3={identify:($)=>$==null,createNode:()=>new s3.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new s3.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&a3.test.test($)?$:Z.options.nullStr};d4.nullTag=a3});var d$=D((s4)=>{var i4=y(),r3={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new i4.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},U){if($&&r3.test.test($)){let X=$[0]==="t"||$[0]==="T";if(Z===X)return $}return Z?U.options.trueStr:U.options.falseStr}};s4.boolTag=r3});var S0=D((n4)=>{function r4({format:$,minFractionDigits:Z,tag:U,value:X}){if(typeof X==="bigint")return String(X);let Q=typeof X==="number"?X:Number(X);if(!isFinite(Q))return isNaN(Q)?".nan":Q<0?"-.inf":".inf";let J=Object.is(X,-0)?"-0":JSON.stringify(X);if(!$&&Z&&(!U||U==="tag:yaml.org,2002:float")&&/^\d/.test(J)){let z=J.indexOf(".");if(z<0)z=J.length,J+=".";let H=Z-(J.length-z-1);while(H-- >0)J+="0"}return J}n4.stringifyNumber=r4});var i$=D((U5)=>{var t4=y(),c$=S0(),e4={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:c$.stringifyNumber},$5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():c$.stringifyNumber($)}},Z5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new t4.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-U-1;return Z},stringify:c$.stringifyNumber};U5.float=Z5;U5.floatExp=$5;U5.floatNaN=e4});var a$=D((Y5)=>{var n3=S0(),a1=($)=>typeof $==="bigint"||Number.isInteger($),s$=($,Z,U,{intAsBigInt:X})=>X?BigInt($):parseInt($.substring(Z),U);function o3($,Z,U){let{value:X}=$;if(a1(X)&&X>=0)return U+X.toString(Z);return n3.stringifyNumber($)}var z5={identify:($)=>a1($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,U)=>s$($,2,8,U),stringify:($)=>o3($,8,"0o")},H5={identify:a1,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,U)=>s$($,0,10,U),stringify:n3.stringifyNumber},G5={identify:($)=>a1($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,U)=>s$($,2,16,U),stringify:($)=>o3($,16,"0x")};Y5.int=H5;Y5.intHex=G5;Y5.intOct=z5});var t3=D((R5)=>{var V5=C0(),O5=s1(),W5=j0(),I5=J1(),L5=d$(),r$=i$(),n$=a$(),D5=[V5.map,W5.seq,I5.string,O5.nullTag,L5.boolTag,n$.intOct,n$.int,n$.intHex,r$.floatNaN,r$.floatExp,r$.float];R5.schema=D5});var $8=D((b5)=>{var K5=y(),P5=C0(),T5=j0();function e3($){return typeof $==="bigint"||Number.isInteger($)}var r1=({value:$})=>JSON.stringify($),A5=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:r1},{identify:($)=>$==null,createNode:()=>new K5.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:r1},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:r1},{identify:e3,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>e3($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:r1}],F5={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},N5=[P5.map,T5.seq].concat(A5,F5);b5.schema=N5});var t$=D((S5)=>{var z1=p0("buffer"),o$=y(),C5=$1(),j5={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof z1.Buffer==="function")return z1.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),X=new Uint8Array(U.length);for(let Q=0;Q<U.length;++Q)X[Q]=U.charCodeAt(Q);return X}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:U},X,Q,J){if(!U)return"";let z=U,H;if(typeof z1.Buffer==="function")H=z instanceof z1.Buffer?z.toString("base64"):z1.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let Y="";for(let G=0;G<z.length;++G)Y+=String.fromCharCode(z[G]);H=btoa(Y)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=o$.Scalar.BLOCK_LITERAL),Z!==o$.Scalar.QUOTE_DOUBLE){let Y=Math.max(X.options.lineWidth-X.indent.length,X.options.minContentWidth),G=Math.ceil(H.length/Y),_=Array(G);for(let q=0,B=0;q<G;++q,B+=Y)_[q]=H.substr(B,Y);H=_.join(Z===o$.Scalar.BLOCK_LITERAL?`
52
- `:" ")}return C5.stringifyString({comment:$,type:Z,value:H},X,Q,J)}};S5.binary=j5});var o1=D((x5)=>{var n1=w(),e$=X0(),g5=y(),y5=z0();function Z8($,Z){if(n1.isSeq($))for(let U=0;U<$.items.length;++U){let X=$.items[U];if(n1.isPair(X))continue;else if(n1.isMap(X)){if(X.items.length>1)Z("Each pair must have its own sequence indicator");let Q=X.items[0]||new e$.Pair(new g5.Scalar(null));if(X.commentBefore)Q.key.commentBefore=Q.key.commentBefore?`${X.commentBefore}
53
- ${Q.key.commentBefore}`:X.commentBefore;if(X.comment){let J=Q.value??Q.key;J.comment=J.comment?`${X.comment}
54
- ${J.comment}`:X.comment}X=Q}$.items[U]=n1.isPair(X)?X:new e$.Pair(X)}else Z("Expected a sequence for this tag");return $}function U8($,Z,U){let{replacer:X}=U,Q=new y5.YAMLSeq($);Q.tag="tag:yaml.org,2002:pairs";let J=0;if(Z&&Symbol.iterator in Object(Z))for(let z of Z){if(typeof X==="function")z=X.call(Z,String(J++),z);let H,Y;if(Array.isArray(z))if(z.length===2)H=z[0],Y=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let G=Object.keys(z);if(G.length===1)H=G[0],Y=z[H];else throw TypeError(`Expected tuple with one key, not ${G.length} keys`)}else H=z;Q.items.push(e$.createPair(H,Y,U))}return Q}var h5={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Z8,createNode:U8};x5.createPairs=U8;x5.pairs=h5;x5.resolvePairs=Z8});var Z2=D((l5)=>{var X8=w(),$2=$0(),H1=J0(),v5=z0(),Q8=o1();class O0 extends v5.YAMLSeq{constructor(){super();this.add=H1.YAMLMap.prototype.add.bind(this),this.delete=H1.YAMLMap.prototype.delete.bind(this),this.get=H1.YAMLMap.prototype.get.bind(this),this.has=H1.YAMLMap.prototype.has.bind(this),this.set=H1.YAMLMap.prototype.set.bind(this),this.tag=O0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let U=new Map;if(Z?.onCreate)Z.onCreate(U);for(let X of this.items){let Q,J;if(X8.isPair(X))Q=$2.toJS(X.key,"",Z),J=$2.toJS(X.value,Q,Z);else Q=$2.toJS(X,"",Z);if(U.has(Q))throw Error("Ordered maps must not include duplicate keys");U.set(Q,J)}return U}static from($,Z,U){let X=Q8.createPairs($,Z,U),Q=new this;return Q.items=X.items,Q}}O0.tag="tag:yaml.org,2002:omap";var m5={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:O0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let U=Q8.resolvePairs($,Z),X=[];for(let{key:Q}of U.items)if(X8.isScalar(Q))if(X.includes(Q.value))Z(`Ordered maps must not include duplicate keys: ${Q.value}`);else X.push(Q.value);return Object.assign(new O0,U)},createNode:($,Z,U)=>O0.from($,Z,U)};l5.YAMLOMap=O0;l5.omap=m5});var Y8=D((c5)=>{var J8=y();function z8({value:$,source:Z},U){if(Z&&($?H8:G8).test.test(Z))return Z;return $?U.options.trueStr:U.options.falseStr}var H8={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new J8.Scalar(!0),stringify:z8},G8={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new J8.Scalar(!1),stringify:z8};c5.falseTag=G8;c5.trueTag=H8});var q8=D((t5)=>{var a5=y(),U2=S0(),r5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U2.stringifyNumber},n5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():U2.stringifyNumber($)}},o5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new a5.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let X=$.substring(U+1).replace(/_/g,"");if(X[X.length-1]==="0")Z.minFractionDigits=X.length}return Z},stringify:U2.stringifyNumber};t5.float=o5;t5.floatExp=n5;t5.floatNaN=r5});var B8=D((z7)=>{var _8=S0(),G1=($)=>typeof $==="bigint"||Number.isInteger($);function t1($,Z,U,{intAsBigInt:X}){let Q=$[0];if(Q==="-"||Q==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),X){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let z=BigInt($);return Q==="-"?BigInt(-1)*z:z}let J=parseInt($,U);return Q==="-"?-1*J:J}function X2($,Z,U){let{value:X}=$;if(G1(X)){let Q=X.toString(Z);return X<0?"-"+U+Q.substr(1):U+Q}return _8.stringifyNumber($)}var U7={identify:G1,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,U)=>t1($,2,2,U),stringify:($)=>X2($,2,"0b")},X7={identify:G1,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,U)=>t1($,1,8,U),stringify:($)=>X2($,8,"0")},Q7={identify:G1,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,U)=>t1($,0,10,U),stringify:_8.stringifyNumber},J7={identify:G1,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,U)=>t1($,2,16,U),stringify:($)=>X2($,16,"0x")};z7.int=Q7;z7.intBin=U7;z7.intHex=J7;z7.intOct=X7});var Q2=D((B7)=>{var Z$=w(),e1=X0(),$$=J0();class W0 extends $$.YAMLMap{constructor($){super($);this.tag=W0.tag}add($){let Z;if(Z$.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new e1.Pair($.key,null);else Z=new e1.Pair($,null);if(!$$.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let U=$$.findPair(this.items,$);return!Z&&Z$.isPair(U)?Z$.isScalar(U.key)?U.key.value:U.key:U}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let U=$$.findPair(this.items,$);if(U&&!Z)this.items.splice(this.items.indexOf(U),1);else if(!U&&Z)this.items.push(new e1.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,U);else throw Error("Set items must all have null values")}static from($,Z,U){let{replacer:X}=U,Q=new this($);if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof X==="function")J=X.call(Z,J,J);Q.items.push(e1.createPair(J,null,U))}return Q}}W0.tag="tag:yaml.org,2002:set";var _7={collection:"map",identify:($)=>$ instanceof Set,nodeClass:W0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,U)=>W0.from($,Z,U),resolve($,Z){if(Z$.isMap($))if($.hasAllNullValues(!0))return Object.assign(new W0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};B7.YAMLSet=W0;B7.set=_7});var z2=D((D7)=>{var W7=S0();function J2($,Z){let U=$[0],X=U==="-"||U==="+"?$.substring(1):$,Q=(z)=>Z?BigInt(z):Number(z),J=X.replace(/_/g,"").split(":").reduce((z,H)=>z*Q(60)+Q(H),Q(0));return U==="-"?Q(-1)*J:J}function V8($){let{value:Z}=$,U=(z)=>z;if(typeof Z==="bigint")U=(z)=>BigInt(z);else if(isNaN(Z)||!isFinite(Z))return W7.stringifyNumber($);let X="";if(Z<0)X="-",Z*=U(-1);let Q=U(60),J=[Z%Q];if(Z<60)J.unshift(0);else if(Z=(Z-J[0])/Q,J.unshift(Z%Q),Z>=60)Z=(Z-J[0])/Q,J.unshift(Z);return X+J.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var I7={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,Z,{intAsBigInt:U})=>J2($,U),stringify:V8},L7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>J2($,!1),stringify:V8},O8={identify:($)=>$ 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($){let Z=$.match(O8.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,X,Q,J,z,H]=Z.map(Number),Y=Z[7]?Number((Z[7]+"00").substr(1,3)):0,G=Date.UTC(U,X-1,Q,J||0,z||0,H||0,Y),_=Z[8];if(_&&_!=="Z"){let q=J2(_,!1);if(Math.abs(q)<30)q*=60;G-=60000*q}return new Date(G)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};D7.floatTime=L7;D7.intTime=I7;D7.timestamp=O8});var I8=D((E7)=>{var P7=C0(),T7=s1(),A7=j0(),F7=J1(),N7=t$(),W8=Y8(),H2=q8(),U$=B8(),b7=k1(),w7=Z2(),C7=o1(),j7=Q2(),G2=z2(),S7=[P7.map,A7.seq,F7.string,T7.nullTag,W8.trueTag,W8.falseTag,U$.intBin,U$.intOct,U$.int,U$.intHex,H2.floatNaN,H2.floatExp,H2.float,N7.binary,b7.merge,w7.omap,C7.pairs,j7.set,G2.intTime,G2.floatTime,G2.timestamp];E7.schema=S7});var N8=D((m7)=>{var M8=C0(),y7=s1(),K8=j0(),h7=J1(),x7=d$(),Y2=i$(),q2=a$(),f7=t3(),u7=$8(),P8=t$(),Y1=k1(),T8=Z2(),A8=o1(),L8=I8(),F8=Q2(),X$=z2(),D8=new Map([["core",f7.schema],["failsafe",[M8.map,K8.seq,h7.string]],["json",u7.schema],["yaml11",L8.schema],["yaml-1.1",L8.schema]]),R8={binary:P8.binary,bool:x7.boolTag,float:Y2.float,floatExp:Y2.floatExp,floatNaN:Y2.floatNaN,floatTime:X$.floatTime,int:q2.int,intHex:q2.intHex,intOct:q2.intOct,intTime:X$.intTime,map:M8.map,merge:Y1.merge,null:y7.nullTag,omap:T8.omap,pairs:A8.pairs,seq:K8.seq,set:F8.set,timestamp:X$.timestamp},k7={"tag:yaml.org,2002:binary":P8.binary,"tag:yaml.org,2002:merge":Y1.merge,"tag:yaml.org,2002:omap":T8.omap,"tag:yaml.org,2002:pairs":A8.pairs,"tag:yaml.org,2002:set":F8.set,"tag:yaml.org,2002:timestamp":X$.timestamp};function v7($,Z,U){let X=D8.get(Z);if(X&&!$)return U&&!X.includes(Y1.merge)?X.concat(Y1.merge):X.slice();let Q=X;if(!Q)if(Array.isArray($))Q=[];else{let J=Array.from(D8.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${J} or define customTags array`)}if(Array.isArray($))for(let J of $)Q=Q.concat(J);else if(typeof $==="function")Q=$(Q.slice());if(U)Q=Q.concat(Y1.merge);return Q.reduce((J,z)=>{let H=typeof z==="string"?R8[z]:z;if(!H){let Y=JSON.stringify(z),G=Object.keys(R8).map((_)=>JSON.stringify(_)).join(", ");throw Error(`Unknown custom tag ${Y}; use one of ${G}`)}if(!J.includes(H))J.push(H);return J},[])}m7.coreKnownTags=k7;m7.getTags=v7});var V2=D((a7)=>{var _2=w(),d7=C0(),c7=j0(),i7=J1(),Q$=N8(),s7=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class B2{constructor({compat:$,customTags:Z,merge:U,resolveKnownTags:X,schema:Q,sortMapEntries:J,toStringDefaults:z}){this.compat=Array.isArray($)?Q$.getTags($,"compat"):$?Q$.getTags(null,$):null,this.name=typeof Q==="string"&&Q||"core",this.knownTags=X?Q$.coreKnownTags:{},this.tags=Q$.getTags(Z,this.name,U),this.toStringOptions=z??null,Object.defineProperty(this,_2.MAP,{value:d7.map}),Object.defineProperty(this,_2.SCALAR,{value:i7.string}),Object.defineProperty(this,_2.SEQ,{value:c7.seq}),this.sortMapEntries=typeof J==="function"?J:J===!0?s7:null}clone(){let $=Object.create(B2.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}a7.Schema=B2});var b8=D((t7)=>{var n7=w(),O2=Z1(),q1=t0();function o7($,Z){let U=[],X=Z.directives===!0;if(Z.directives!==!1&&$.directives){let Y=$.directives.toString($);if(Y)U.push(Y),X=!0;else if($.directives.docStart)X=!0}if(X)U.push("---");let Q=O2.createStringifyContext($,Z),{commentString:J}=Q.options;if($.commentBefore){if(U.length!==1)U.unshift("");let Y=J($.commentBefore);U.unshift(q1.indentComment(Y,""))}let z=!1,H=null;if($.contents){if(n7.isNode($.contents)){if($.contents.spaceBefore&&X)U.push("");if($.contents.commentBefore){let _=J($.contents.commentBefore);U.push(q1.indentComment(_,""))}Q.forceBlockIndent=!!$.comment,H=$.contents.comment}let Y=H?void 0:()=>z=!0,G=O2.stringify($.contents,Q,()=>H=null,Y);if(H)G+=q1.lineComment(G,"",J(H));if((G[0]==="|"||G[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${G}`;else U.push(G)}else U.push(O2.stringify($.contents,Q));if($.directives?.docEnd)if($.comment){let Y=J($.comment);if(Y.includes(`
55
- `))U.push("..."),U.push(q1.indentComment(Y,""));else U.push(`... ${Y}`)}else U.push("...");else{let Y=$.comment;if(Y&&z)Y=Y.replace(/^\n+/,"");if(Y){if((!z||H)&&U[U.length-1]!=="")U.push("");U.push(q1.indentComment(J(Y),""))}}return U.join(`
47
+ `+a1.indentComment(Y($),q),H)H()}else if(_&&J)J();return O}function C5({items:$},Z,{flowChars:U,itemIndent:X}){let{indent:Q,indentStep:z,flowCollectionPadding:J,options:{commentString:H}}=Z;X+=z;let q=Object.assign({},Z,{indent:X,inFlow:!0,type:null}),Y=!1,G=0,_=[];for(let D=0;D<$.length;++D){let V=$[D],W=null;if(D0.isNode(V)){if(V.spaceBefore)_.push("");if(n1(Z,_,V.commentBefore,!1),V.comment)W=V.comment}else if(D0.isPair(V)){let L=D0.isNode(V.key)?V.key:null;if(L){if(L.spaceBefore)_.push("");if(n1(Z,_,L.commentBefore,!1),L.comment)Y=!0}let F=D0.isNode(V.value)?V.value:null;if(F){if(F.comment)W=F.comment;if(F.commentBefore)Y=!0}else if(V.value==null&&L?.comment)W=L.comment}if(W)Y=!0;let I=n3.stringify(V,q,()=>W=null);if(Y||(Y=_.length>G||I.includes(`
48
+ `)),D<$.length-1)I+=",";else if(Z.options.trailingComma){if(Z.options.lineWidth>0)Y||(Y=_.reduce((L,F)=>L+F.length+2,2)+(I.length+2)>Z.options.lineWidth);if(Y)I+=","}if(W)I+=a1.lineComment(I,X,H(W));_.push(I),G=_.length}let{start:B,end:O}=U;if(_.length===0)return B+O;else{if(!Y){let D=_.reduce((V,W)=>V+W.length+2,2);Y=Z.options.lineWidth>0&&D>Z.options.lineWidth}if(Y){let D=B;for(let V of _)D+=V?`
49
+ ${z}${Q}${V}`:`
50
+ `;return`${D}
51
+ ${Q}${O}`}else return`${B}${J}${_.join(" ")}${J}${O}`}}function n1({indent:$,options:{commentString:Z}},U,X,Q){if(X&&Q)X=X.replace(/^\n+/,"");if(X){let z=a1.indentComment(Z(X),$);U.push(z.trimStart())}}b5.stringifyCollection=N5});var q0=R((h5)=>{var E5=n$(),j5=a$(),g5=v1(),H0=C(),o1=J0(),x5=x();function q1($,Z){let U=H0.isScalar(Z)?Z.value:Z;for(let X of $)if(H0.isPair(X)){if(X.key===Z||X.key===U)return X;if(H0.isScalar(X.key)&&X.key.value===U)return X}return}class o3 extends g5.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(H0.MAP,$);this.items=[]}static from($,Z,U){let{keepUndefined:X,replacer:Q}=U,z=new this($),J=(H,q)=>{if(typeof Q==="function")q=Q.call(Z,H,q);else if(Array.isArray(Q)&&!Q.includes(H))return;if(q!==void 0||X)z.items.push(o1.createPair(H,q,U))};if(Z instanceof Map)for(let[H,q]of Z)J(H,q);else if(Z&&typeof Z==="object")for(let H of Object.keys(Z))J(H,Z[H]);if(typeof $.sortMapEntries==="function")z.items.sort($.sortMapEntries);return z}add($,Z){let U;if(H0.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new o1.Pair($,$?.value);else U=new o1.Pair($.key,$.value);let X=q1(this.items,U.key),Q=this.schema?.sortMapEntries;if(X){if(!Z)throw Error(`Key ${U.key} already set`);if(H0.isScalar(X.value)&&x5.isScalarValue(U.value))X.value.value=U.value;else X.value=U.value}else if(Q){let z=this.items.findIndex((J)=>Q(U,J)<0);if(z===-1)this.items.push(U);else this.items.splice(z,0,U)}else this.items.push(U)}delete($){let Z=q1(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let X=q1(this.items,$)?.value;return(!Z&&H0.isScalar(X)?X.value:X)??void 0}has($){return!!q1(this.items,$)}set($,Z){this.add(new o1.Pair($,Z),!0)}toJSON($,Z,U){let X=U?new U:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(X);for(let Q of this.items)j5.addPairToJSMap(Z,X,Q);return X}toString($,Z,U){if(!$)return JSON.stringify(this);for(let X of this.items)if(!H0.isPair(X))throw Error(`Map items must all be pairs; found ${JSON.stringify(X)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return E5.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:Z})}}h5.YAMLMap=o3;h5.findPair=q1});var g0=R((v5)=>{var u5=C(),t3=q0(),k5={collection:"map",default:!0,nodeClass:t3.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!u5.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,U)=>t3.YAMLMap.from($,Z,U)};v5.map=k5});var Y0=R((r5)=>{var p5=Z1(),l5=n$(),d5=v1(),e1=C(),c5=x(),i5=X0();class e3 extends d5.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(e1.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let Z=t1($);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get($,Z){let U=t1($);if(typeof U!=="number")return;let X=this.items[U];return!Z&&e1.isScalar(X)?X.value:X}has($){let Z=t1($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let U=t1($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let X=this.items[U];if(e1.isScalar(X)&&c5.isScalarValue(Z))X.value=Z;else this.items[U]=Z}toJSON($,Z){let U=[];if(Z?.onCreate)Z.onCreate(U);let X=0;for(let Q of this.items)U.push(i5.toJS(Q,String(X++),Z));return U}toString($,Z,U){if(!$)return JSON.stringify(this);return l5.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:Z})}static from($,Z,U){let{replacer:X}=U,Q=new this($);if(Z&&Symbol.iterator in Object(Z)){let z=0;for(let J of Z){if(typeof X==="function"){let H=Z instanceof Set?J:String(z++);J=X.call(Z,H,J)}Q.items.push(p5.createNode(J,void 0,U))}}return Q}}function t1($){let Z=e1.isScalar($)?$.value:$;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}r5.YAMLSeq=e3});var x0=R((o5)=>{var a5=C(),$8=Y0(),n5={collection:"seq",default:!0,nodeClass:$8.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!a5.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,U)=>$8.YAMLSeq.from($,Z,U)};o5.seq=n5});var Y1=R((ZU)=>{var e5=Q1(),$U={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,U,X){return Z=Object.assign({actualString:!0},Z),e5.stringifyString($,Z,U,X)}};ZU.string=$U});var $$=R((XU)=>{var Z8=x(),U8={identify:($)=>$==null,createNode:()=>new Z8.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Z8.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&U8.test.test($)?$:Z.options.nullStr};XU.nullTag=U8});var o$=R((JU)=>{var zU=x(),X8={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new zU.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},U){if($&&X8.test.test($)){let X=$[0]==="t"||$[0]==="T";if(Z===X)return $}return Z?U.options.trueStr:U.options.falseStr}};JU.boolTag=X8});var h0=R((YU)=>{function qU({format:$,minFractionDigits:Z,tag:U,value:X}){if(typeof X==="bigint")return String(X);let Q=typeof X==="number"?X:Number(X);if(!isFinite(Q))return isNaN(Q)?".nan":Q<0?"-.inf":".inf";let z=Object.is(X,-0)?"-0":JSON.stringify(X);if(!$&&Z&&(!U||U==="tag:yaml.org,2002:float")&&/^\d/.test(z)){let J=z.indexOf(".");if(J<0)J=z.length,z+=".";let H=Z-(z.length-J-1);while(H-- >0)z+="0"}return z}YU.stringifyNumber=qU});var e$=R((WU)=>{var _U=x(),t$=h0(),BU={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t$.stringifyNumber},VU={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():t$.stringifyNumber($)}},OU={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new _U.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-U-1;return Z},stringify:t$.stringifyNumber};WU.float=OU;WU.floatExp=VU;WU.floatNaN=BU});var Z2=R((FU)=>{var Q8=h0(),Z$=($)=>typeof $==="bigint"||Number.isInteger($),$2=($,Z,U,{intAsBigInt:X})=>X?BigInt($):parseInt($.substring(Z),U);function z8($,Z,U){let{value:X}=$;if(Z$(X)&&X>=0)return U+X.toString(Z);return Q8.stringifyNumber($)}var RU={identify:($)=>Z$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,U)=>$2($,2,8,U),stringify:($)=>z8($,8,"0o")},MU={identify:Z$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,U)=>$2($,0,10,U),stringify:Q8.stringifyNumber},KU={identify:($)=>Z$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,U)=>$2($,2,16,U),stringify:($)=>z8($,16,"0x")};FU.int=MU;FU.intHex=KU;FU.intOct=RU});var J8=R((jU)=>{var NU=g0(),wU=$$(),CU=x0(),bU=Y1(),SU=o$(),U2=e$(),X2=Z2(),EU=[NU.map,CU.seq,bU.string,wU.nullTag,SU.boolTag,X2.intOct,X2.int,X2.intHex,U2.floatNaN,U2.floatExp,U2.float];jU.schema=EU});var q8=R((vU)=>{var xU=x(),hU=g0(),yU=x0();function H8($){return typeof $==="bigint"||Number.isInteger($)}var U$=({value:$})=>JSON.stringify($),fU=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:U$},{identify:($)=>$==null,createNode:()=>new xU.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:U$},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:U$},{identify:H8,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>H8($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:U$}],uU={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},kU=[hU.map,yU.seq].concat(fU,uU);vU.schema=kU});var z2=R((dU)=>{var G1=r0("buffer"),Q2=x(),pU=Q1(),lU={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof G1.Buffer==="function")return G1.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),X=new Uint8Array(U.length);for(let Q=0;Q<U.length;++Q)X[Q]=U.charCodeAt(Q);return X}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:U},X,Q,z){if(!U)return"";let J=U,H;if(typeof G1.Buffer==="function")H=J instanceof G1.Buffer?J.toString("base64"):G1.Buffer.from(J.buffer).toString("base64");else if(typeof btoa==="function"){let q="";for(let Y=0;Y<J.length;++Y)q+=String.fromCharCode(J[Y]);H=btoa(q)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=Q2.Scalar.BLOCK_LITERAL),Z!==Q2.Scalar.QUOTE_DOUBLE){let q=Math.max(X.options.lineWidth-X.indent.length,X.options.minContentWidth),Y=Math.ceil(H.length/q),G=Array(Y);for(let _=0,B=0;_<Y;++_,B+=q)G[_]=H.substr(B,q);H=G.join(Z===Q2.Scalar.BLOCK_LITERAL?`
52
+ `:" ")}return pU.stringifyString({comment:$,type:Z,value:H},X,Q,z)}};dU.binary=lU});var Q$=R((aU)=>{var X$=C(),J2=J0(),iU=x(),rU=Y0();function Y8($,Z){if(X$.isSeq($))for(let U=0;U<$.items.length;++U){let X=$.items[U];if(X$.isPair(X))continue;else if(X$.isMap(X)){if(X.items.length>1)Z("Each pair must have its own sequence indicator");let Q=X.items[0]||new J2.Pair(new iU.Scalar(null));if(X.commentBefore)Q.key.commentBefore=Q.key.commentBefore?`${X.commentBefore}
53
+ ${Q.key.commentBefore}`:X.commentBefore;if(X.comment){let z=Q.value??Q.key;z.comment=z.comment?`${X.comment}
54
+ ${z.comment}`:X.comment}X=Q}$.items[U]=X$.isPair(X)?X:new J2.Pair(X)}else Z("Expected a sequence for this tag");return $}function G8($,Z,U){let{replacer:X}=U,Q=new rU.YAMLSeq($);Q.tag="tag:yaml.org,2002:pairs";let z=0;if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof X==="function")J=X.call(Z,String(z++),J);let H,q;if(Array.isArray(J))if(J.length===2)H=J[0],q=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let Y=Object.keys(J);if(Y.length===1)H=Y[0],q=J[H];else throw TypeError(`Expected tuple with one key, not ${Y.length} keys`)}else H=J;Q.items.push(J2.createPair(H,q,U))}return Q}var sU={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Y8,createNode:G8};aU.createPairs=G8;aU.pairs=sU;aU.resolvePairs=Y8});var q2=R((Z7)=>{var _8=C(),H2=X0(),_1=q0(),eU=Y0(),B8=Q$();class I0 extends eU.YAMLSeq{constructor(){super();this.add=_1.YAMLMap.prototype.add.bind(this),this.delete=_1.YAMLMap.prototype.delete.bind(this),this.get=_1.YAMLMap.prototype.get.bind(this),this.has=_1.YAMLMap.prototype.has.bind(this),this.set=_1.YAMLMap.prototype.set.bind(this),this.tag=I0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let U=new Map;if(Z?.onCreate)Z.onCreate(U);for(let X of this.items){let Q,z;if(_8.isPair(X))Q=H2.toJS(X.key,"",Z),z=H2.toJS(X.value,Q,Z);else Q=H2.toJS(X,"",Z);if(U.has(Q))throw Error("Ordered maps must not include duplicate keys");U.set(Q,z)}return U}static from($,Z,U){let X=B8.createPairs($,Z,U),Q=new this;return Q.items=X.items,Q}}I0.tag="tag:yaml.org,2002:omap";var $7={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:I0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let U=B8.resolvePairs($,Z),X=[];for(let{key:Q}of U.items)if(_8.isScalar(Q))if(X.includes(Q.value))Z(`Ordered maps must not include duplicate keys: ${Q.value}`);else X.push(Q.value);return Object.assign(new I0,U)},createNode:($,Z,U)=>I0.from($,Z,U)};Z7.YAMLOMap=I0;Z7.omap=$7});var I8=R((Q7)=>{var V8=x();function O8({value:$,source:Z},U){if(Z&&($?W8:D8).test.test(Z))return Z;return $?U.options.trueStr:U.options.falseStr}var W8={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new V8.Scalar(!0),stringify:O8},D8={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new V8.Scalar(!1),stringify:O8};Q7.falseTag=D8;Q7.trueTag=W8});var L8=R((_7)=>{var H7=x(),Y2=h0(),q7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Y2.stringifyNumber},Y7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():Y2.stringifyNumber($)}},G7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new H7.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let X=$.substring(U+1).replace(/_/g,"");if(X[X.length-1]==="0")Z.minFractionDigits=X.length}return Z},stringify:Y2.stringifyNumber};_7.float=G7;_7.floatExp=Y7;_7.floatNaN=q7});var M8=R((R7)=>{var R8=h0(),B1=($)=>typeof $==="bigint"||Number.isInteger($);function z$($,Z,U,{intAsBigInt:X}){let Q=$[0];if(Q==="-"||Q==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),X){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return Q==="-"?BigInt(-1)*J:J}let z=parseInt($,U);return Q==="-"?-1*z:z}function G2($,Z,U){let{value:X}=$;if(B1(X)){let Q=X.toString(Z);return X<0?"-"+U+Q.substr(1):U+Q}return R8.stringifyNumber($)}var W7={identify:B1,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,U)=>z$($,2,2,U),stringify:($)=>G2($,2,"0b")},D7={identify:B1,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,U)=>z$($,1,8,U),stringify:($)=>G2($,8,"0")},I7={identify:B1,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,U)=>z$($,0,10,U),stringify:R8.stringifyNumber},L7={identify:B1,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,U)=>z$($,2,16,U),stringify:($)=>G2($,16,"0x")};R7.int=I7;R7.intBin=W7;R7.intHex=L7;R7.intOct=D7});var _2=R((T7)=>{var q$=C(),J$=J0(),H$=q0();class L0 extends H$.YAMLMap{constructor($){super($);this.tag=L0.tag}add($){let Z;if(q$.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new J$.Pair($.key,null);else Z=new J$.Pair($,null);if(!H$.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let U=H$.findPair(this.items,$);return!Z&&q$.isPair(U)?q$.isScalar(U.key)?U.key.value:U.key:U}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let U=H$.findPair(this.items,$);if(U&&!Z)this.items.splice(this.items.indexOf(U),1);else if(!U&&Z)this.items.push(new J$.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,U);else throw Error("Set items must all have null values")}static from($,Z,U){let{replacer:X}=U,Q=new this($);if(Z&&Symbol.iterator in Object(Z))for(let z of Z){if(typeof X==="function")z=X.call(Z,z,z);Q.items.push(J$.createPair(z,null,U))}return Q}}L0.tag="tag:yaml.org,2002:set";var A7={collection:"map",identify:($)=>$ instanceof Set,nodeClass:L0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,U)=>L0.from($,Z,U),resolve($,Z){if(q$.isMap($))if($.hasAllNullValues(!0))return Object.assign(new L0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};T7.YAMLSet=L0;T7.set=A7});var V2=R((E7)=>{var C7=h0();function B2($,Z){let U=$[0],X=U==="-"||U==="+"?$.substring(1):$,Q=(J)=>Z?BigInt(J):Number(J),z=X.replace(/_/g,"").split(":").reduce((J,H)=>J*Q(60)+Q(H),Q(0));return U==="-"?Q(-1)*z:z}function K8($){let{value:Z}=$,U=(J)=>J;if(typeof Z==="bigint")U=(J)=>BigInt(J);else if(isNaN(Z)||!isFinite(Z))return C7.stringifyNumber($);let X="";if(Z<0)X="-",Z*=U(-1);let Q=U(60),z=[Z%Q];if(Z<60)z.unshift(0);else if(Z=(Z-z[0])/Q,z.unshift(Z%Q),Z>=60)Z=(Z-z[0])/Q,z.unshift(Z);return X+z.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var b7={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,Z,{intAsBigInt:U})=>B2($,U),stringify:K8},S7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>B2($,!1),stringify:K8},F8={identify:($)=>$ 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($){let Z=$.match(F8.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,X,Q,z,J,H]=Z.map(Number),q=Z[7]?Number((Z[7]+"00").substr(1,3)):0,Y=Date.UTC(U,X-1,Q,z||0,J||0,H||0,q),G=Z[8];if(G&&G!=="Z"){let _=B2(G,!1);if(Math.abs(_)<30)_*=60;Y-=60000*_}return new Date(Y)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};E7.floatTime=S7;E7.intTime=b7;E7.timestamp=F8});var A8=R((c7)=>{var h7=g0(),y7=$$(),f7=x0(),u7=Y1(),k7=z2(),P8=I8(),O2=L8(),Y$=M8(),v7=i1(),m7=q2(),p7=Q$(),l7=_2(),W2=V2(),d7=[h7.map,f7.seq,u7.string,y7.nullTag,P8.trueTag,P8.falseTag,Y$.intBin,Y$.intOct,Y$.int,Y$.intHex,O2.floatNaN,O2.floatExp,O2.float,k7.binary,v7.merge,m7.omap,p7.pairs,l7.set,W2.intTime,W2.floatTime,W2.timestamp];c7.schema=d7});var x8=R(($X)=>{var C8=g0(),r7=$$(),b8=x0(),s7=Y1(),a7=o$(),D2=e$(),I2=Z2(),n7=J8(),o7=q8(),S8=z2(),V1=i1(),E8=q2(),j8=Q$(),T8=A8(),g8=_2(),G$=V2(),N8=new Map([["core",n7.schema],["failsafe",[C8.map,b8.seq,s7.string]],["json",o7.schema],["yaml11",T8.schema],["yaml-1.1",T8.schema]]),w8={binary:S8.binary,bool:a7.boolTag,float:D2.float,floatExp:D2.floatExp,floatNaN:D2.floatNaN,floatTime:G$.floatTime,int:I2.int,intHex:I2.intHex,intOct:I2.intOct,intTime:G$.intTime,map:C8.map,merge:V1.merge,null:r7.nullTag,omap:E8.omap,pairs:j8.pairs,seq:b8.seq,set:g8.set,timestamp:G$.timestamp},t7={"tag:yaml.org,2002:binary":S8.binary,"tag:yaml.org,2002:merge":V1.merge,"tag:yaml.org,2002:omap":E8.omap,"tag:yaml.org,2002:pairs":j8.pairs,"tag:yaml.org,2002:set":g8.set,"tag:yaml.org,2002:timestamp":G$.timestamp};function e7($,Z,U){let X=N8.get(Z);if(X&&!$)return U&&!X.includes(V1.merge)?X.concat(V1.merge):X.slice();let Q=X;if(!Q)if(Array.isArray($))Q=[];else{let z=Array.from(N8.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${z} or define customTags array`)}if(Array.isArray($))for(let z of $)Q=Q.concat(z);else if(typeof $==="function")Q=$(Q.slice());if(U)Q=Q.concat(V1.merge);return Q.reduce((z,J)=>{let H=typeof J==="string"?w8[J]:J;if(!H){let q=JSON.stringify(J),Y=Object.keys(w8).map((G)=>JSON.stringify(G)).join(", ");throw Error(`Unknown custom tag ${q}; use one of ${Y}`)}if(!z.includes(H))z.push(H);return z},[])}$X.coreKnownTags=t7;$X.getTags=e7});var M2=R((HX)=>{var L2=C(),XX=g0(),QX=x0(),zX=Y1(),_$=x8(),JX=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class R2{constructor({compat:$,customTags:Z,merge:U,resolveKnownTags:X,schema:Q,sortMapEntries:z,toStringDefaults:J}){this.compat=Array.isArray($)?_$.getTags($,"compat"):$?_$.getTags(null,$):null,this.name=typeof Q==="string"&&Q||"core",this.knownTags=X?_$.coreKnownTags:{},this.tags=_$.getTags(Z,this.name,U),this.toStringOptions=J??null,Object.defineProperty(this,L2.MAP,{value:XX.map}),Object.defineProperty(this,L2.SCALAR,{value:zX.string}),Object.defineProperty(this,L2.SEQ,{value:QX.seq}),this.sortMapEntries=typeof z==="function"?z:z===!0?JX:null}clone(){let $=Object.create(R2.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}HX.Schema=R2});var h8=R((_X)=>{var YX=C(),K2=z1(),O1=U1();function GX($,Z){let U=[],X=Z.directives===!0;if(Z.directives!==!1&&$.directives){let q=$.directives.toString($);if(q)U.push(q),X=!0;else if($.directives.docStart)X=!0}if(X)U.push("---");let Q=K2.createStringifyContext($,Z),{commentString:z}=Q.options;if($.commentBefore){if(U.length!==1)U.unshift("");let q=z($.commentBefore);U.unshift(O1.indentComment(q,""))}let J=!1,H=null;if($.contents){if(YX.isNode($.contents)){if($.contents.spaceBefore&&X)U.push("");if($.contents.commentBefore){let G=z($.contents.commentBefore);U.push(O1.indentComment(G,""))}Q.forceBlockIndent=!!$.comment,H=$.contents.comment}let q=H?void 0:()=>J=!0,Y=K2.stringify($.contents,Q,()=>H=null,q);if(H)Y+=O1.lineComment(Y,"",z(H));if((Y[0]==="|"||Y[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${Y}`;else U.push(Y)}else U.push(K2.stringify($.contents,Q));if($.directives?.docEnd)if($.comment){let q=z($.comment);if(q.includes(`
55
+ `))U.push("..."),U.push(O1.indentComment(q,""));else U.push(`... ${q}`)}else U.push("...");else{let q=$.comment;if(q&&J)q=q.replace(/^\n+/,"");if(q){if((!J||H)&&U[U.length-1]!=="")U.push("");U.push(O1.indentComment(z(q),""))}}return U.join(`
56
56
  `)+`
57
- `}t7.stringifyDocument=o7});var _1=D((HX)=>{var $X=n0(),E0=g1(),m=w(),ZX=X0(),UX=$0(),XX=V2(),QX=b8(),W2=j1(),JX=y$(),zX=o0(),I2=g$();class L2{constructor($,Z,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,m.NODE_TYPE,{value:m.DOC});let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(U===void 0&&Z)U=Z,Z=void 0;let Q=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=Q;let{version:J}=Q;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)J=this.directives.yaml.version}else this.directives=new I2.Directives({version:J});this.setSchema(J,U),this.contents=$===void 0?null:this.createNode($,X,U)}clone(){let $=Object.create(L2.prototype,{[m.NODE_TYPE]:{value:m.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=m.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(g0(this.contents))this.contents.add($)}addIn($,Z){if(g0(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let U=W2.anchorNames(this);$.anchor=!Z||U.has(Z)?W2.findNewAnchor(Z||"a",U):Z}return new $X.Alias($.anchor)}createNode($,Z,U){let X=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),X=Z;else if(Array.isArray(Z)){let V=(L)=>typeof L==="number"||L instanceof String||L instanceof Number,W=Z.filter(V).map(String);if(W.length>0)Z=Z.concat(W);X=Z}else if(U===void 0&&Z)U=Z,Z=void 0;let{aliasDuplicateObjects:Q,anchorPrefix:J,flow:z,keepUndefined:H,onTagObj:Y,tag:G}=U??{},{onAnchor:_,setAnchors:q,sourceObjects:B}=W2.createNodeAnchors(this,J||"a"),O={aliasDuplicateObjects:Q??!0,keepUndefined:H??!1,onAnchor:_,onTagObj:Y,replacer:X,schema:this.schema,sourceObjects:B},I=zX.createNode($,G,O);if(z&&m.isCollection(I))I.flow=!0;return q(),I}createPair($,Z,U={}){let X=this.createNode($,null,U),Q=this.createNode(Z,null,U);return new ZX.Pair(X,Q)}delete($){return g0(this.contents)?this.contents.delete($):!1}deleteIn($){if(E0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return g0(this.contents)?this.contents.deleteIn($):!1}get($,Z){return m.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(E0.isEmptyPath($))return!Z&&m.isScalar(this.contents)?this.contents.value:this.contents;return m.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return m.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(E0.isEmptyPath($))return this.contents!==void 0;return m.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=E0.collectionFromPath(this.schema,[$],Z);else if(g0(this.contents))this.contents.set($,Z)}setIn($,Z){if(E0.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=E0.collectionFromPath(this.schema,Array.from($),Z);else if(g0(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new I2.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new I2.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let X=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${X}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(U)this.schema=new XX.Schema(Object.assign(U,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:U,maxAliasCount:X,onAnchor:Q,reviver:J}={}){let z={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},H=UX.toJS(this.contents,Z??"",z);if(typeof Q==="function")for(let{count:Y,res:G}of z.anchors.values())Q(G,Y);return typeof J==="function"?JX.applyReviver(J,{"":H},"",H):H}toJSON($,Z){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:Z})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let Z=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return QX.stringifyDocument(this,$)}}function g0($){if(m.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}HX.Document=L2});var B1=D((qX)=>{class J$ extends Error{constructor($,Z,U,X){super();this.name=$,this.code=U,this.message=X,this.pos=Z}}class w8 extends J${constructor($,Z,U){super("YAMLParseError",$,Z,U)}}class C8 extends J${constructor($,Z,U){super("YAMLWarning",$,Z,U)}}var YX=($,Z)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((H)=>Z.linePos(H));let{line:X,col:Q}=U.linePos[0];U.message+=` at line ${X}, column ${Q}`;let J=Q-1,z=$.substring(Z.lineStarts[X-1],Z.lineStarts[X]).replace(/[\n\r]+$/,"");if(J>=60&&z.length>80){let H=Math.min(J-39,z.length-79);z="…"+z.substring(H),J-=H-1}if(z.length>80)z=z.substring(0,79)+"…";if(X>1&&/^ *$/.test(z.substring(0,J))){let H=$.substring(Z.lineStarts[X-2],Z.lineStarts[X-1]);if(H.length>80)H=H.substring(0,79)+`…
58
- `;z=H+z}if(/[^ ]/.test(z)){let H=1,Y=U.linePos[1];if(Y?.line===X&&Y.col>Q)H=Math.max(1,Math.min(Y.col-Q,80-J));let G=" ".repeat(J)+"^".repeat(H);U.message+=`:
57
+ `}_X.stringifyDocument=GX});var W1=R((MX)=>{var VX=$1(),y0=v1(),p=C(),OX=J0(),WX=X0(),DX=M2(),IX=h8(),F2=f1(),LX=m$(),RX=Z1(),P2=v$();class A2{constructor($,Z,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,p.NODE_TYPE,{value:p.DOC});let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(U===void 0&&Z)U=Z,Z=void 0;let Q=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=Q;let{version:z}=Q;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)z=this.directives.yaml.version}else this.directives=new P2.Directives({version:z});this.setSchema(z,U),this.contents=$===void 0?null:this.createNode($,X,U)}clone(){let $=Object.create(A2.prototype,{[p.NODE_TYPE]:{value:p.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=p.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(f0(this.contents))this.contents.add($)}addIn($,Z){if(f0(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let U=F2.anchorNames(this);$.anchor=!Z||U.has(Z)?F2.findNewAnchor(Z||"a",U):Z}return new VX.Alias($.anchor)}createNode($,Z,U){let X=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),X=Z;else if(Array.isArray(Z)){let V=(I)=>typeof I==="number"||I instanceof String||I instanceof Number,W=Z.filter(V).map(String);if(W.length>0)Z=Z.concat(W);X=Z}else if(U===void 0&&Z)U=Z,Z=void 0;let{aliasDuplicateObjects:Q,anchorPrefix:z,flow:J,keepUndefined:H,onTagObj:q,tag:Y}=U??{},{onAnchor:G,setAnchors:_,sourceObjects:B}=F2.createNodeAnchors(this,z||"a"),O={aliasDuplicateObjects:Q??!0,keepUndefined:H??!1,onAnchor:G,onTagObj:q,replacer:X,schema:this.schema,sourceObjects:B},D=RX.createNode($,Y,O);if(J&&p.isCollection(D))D.flow=!0;return _(),D}createPair($,Z,U={}){let X=this.createNode($,null,U),Q=this.createNode(Z,null,U);return new OX.Pair(X,Q)}delete($){return f0(this.contents)?this.contents.delete($):!1}deleteIn($){if(y0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return f0(this.contents)?this.contents.deleteIn($):!1}get($,Z){return p.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(y0.isEmptyPath($))return!Z&&p.isScalar(this.contents)?this.contents.value:this.contents;return p.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return p.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(y0.isEmptyPath($))return this.contents!==void 0;return p.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=y0.collectionFromPath(this.schema,[$],Z);else if(f0(this.contents))this.contents.set($,Z)}setIn($,Z){if(y0.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=y0.collectionFromPath(this.schema,Array.from($),Z);else if(f0(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new P2.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new P2.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let X=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${X}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(U)this.schema=new DX.Schema(Object.assign(U,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:U,maxAliasCount:X,onAnchor:Q,reviver:z}={}){let J={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},H=WX.toJS(this.contents,Z??"",J);if(typeof Q==="function")for(let{count:q,res:Y}of J.anchors.values())Q(Y,q);return typeof z==="function"?LX.applyReviver(z,{"":H},"",H):H}toJSON($,Z){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:Z})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let Z=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return IX.stringifyDocument(this,$)}}function f0($){if(p.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}MX.Document=A2});var D1=R((PX)=>{class B$ extends Error{constructor($,Z,U,X){super();this.name=$,this.code=U,this.message=X,this.pos=Z}}class y8 extends B${constructor($,Z,U){super("YAMLParseError",$,Z,U)}}class f8 extends B${constructor($,Z,U){super("YAMLWarning",$,Z,U)}}var FX=($,Z)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((H)=>Z.linePos(H));let{line:X,col:Q}=U.linePos[0];U.message+=` at line ${X}, column ${Q}`;let z=Q-1,J=$.substring(Z.lineStarts[X-1],Z.lineStarts[X]).replace(/[\n\r]+$/,"");if(z>=60&&J.length>80){let H=Math.min(z-39,J.length-79);J="…"+J.substring(H),z-=H-1}if(J.length>80)J=J.substring(0,79)+"…";if(X>1&&/^ *$/.test(J.substring(0,z))){let H=$.substring(Z.lineStarts[X-2],Z.lineStarts[X-1]);if(H.length>80)H=H.substring(0,79)+`…
58
+ `;J=H+J}if(/[^ ]/.test(J)){let H=1,q=U.linePos[1];if(q?.line===X&&q.col>Q)H=Math.max(1,Math.min(q.col-Q,80-z));let Y=" ".repeat(z)+"^".repeat(H);U.message+=`:
59
59
 
60
- ${z}
61
- ${G}
62
- `}};qX.YAMLError=J$;qX.YAMLParseError=w8;qX.YAMLWarning=C8;qX.prettifyError=YX});var V1=D((IX)=>{function WX($,{flow:Z,indicator:U,next:X,offset:Q,onError:J,parentIndent:z,startOnNewline:H}){let Y=!1,G=H,_=H,q="",B="",O=!1,I=!1,V=null,W=null,L=null,R=null,P=null,A=null,F=null;for(let T of $){if(I){if(T.type!=="space"&&T.type!=="newline"&&T.type!=="comma")J(T.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");I=!1}if(V){if(G&&T.type!=="comment"&&T.type!=="newline")J(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");V=null}switch(T.type){case"space":if(!Z&&(U!=="doc-start"||X?.type!=="flow-collection")&&T.source.includes("\t"))V=T;_=!0;break;case"comment":{if(!_)J(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let b=T.source.substring(1)||" ";if(!q)q=b;else q+=B+b;B="",G=!1;break}case"newline":if(G){if(q)q+=T.source;else if(!A||U!=="seq-item-ind")Y=!0}else B+=T.source;if(G=!0,O=!0,W||L)R=T;_=!0;break;case"anchor":if(W)J(T,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(T.source.endsWith(":"))J(T.offset+T.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);W=T,F??(F=T.offset),G=!1,_=!1,I=!0;break;case"tag":{if(L)J(T,"MULTIPLE_TAGS","A node can have at most one tag");L=T,F??(F=T.offset),G=!1,_=!1,I=!0;break}case U:if(W||L)J(T,"BAD_PROP_ORDER",`Anchors and tags must be after the ${T.source} indicator`);if(A)J(T,"UNEXPECTED_TOKEN",`Unexpected ${T.source} in ${Z??"collection"}`);A=T,G=U==="seq-item-ind"||U==="explicit-key-ind",_=!1;break;case"comma":if(Z){if(P)J(T,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);P=T,G=!1,_=!1;break}default:J(T,"UNEXPECTED_TOKEN",`Unexpected ${T.type} token`),G=!1,_=!1}}let N=$[$.length-1],C=N?N.offset+N.source.length:Q;if(I&&X&&X.type!=="space"&&X.type!=="newline"&&X.type!=="comma"&&(X.type!=="scalar"||X.source!==""))J(X.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(V&&(G&&V.indent<=z||X?.type==="block-map"||X?.type==="block-seq"))J(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:P,found:A,spaceBefore:Y,comment:q,hasNewline:O,anchor:W,tag:L,newlineAfterProp:R,end:C,start:F??C}}IX.resolveProps=WX});var z$=D((DX)=>{function D2($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
63
- `))return!0;if($.end){for(let Z of $.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of $.items){for(let U of Z.start)if(U.type==="newline")return!0;if(Z.sep){for(let U of Z.sep)if(U.type==="newline")return!0}if(D2(Z.key)||D2(Z.value))return!0}return!1;default:return!0}}DX.containsNewline=D2});var R2=D((PX)=>{var MX=z$();function KX($,Z,U){if(Z?.type==="flow-collection"){let X=Z.end[0];if(X.indent===$&&(X.source==="]"||X.source==="}")&&MX.containsNewline(Z))U(X,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}PX.flowIndentCheck=KX});var M2=D((FX)=>{var j8=w();function AX($,Z,U){let{uniqueKeys:X}=$.options;if(X===!1)return!1;let Q=typeof X==="function"?X:(J,z)=>J===z||j8.isScalar(J)&&j8.isScalar(z)&&J.value===z.value;return Z.some((J)=>Q(J.key,U))}FX.mapIncludes=AX});var h8=D((SX)=>{var S8=X0(),bX=J0(),E8=V1(),wX=z$(),g8=R2(),CX=M2(),y8="All mapping items must start at the same column";function jX({composeNode:$,composeEmptyNode:Z},U,X,Q,J){let H=new(J?.nodeClass??bX.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let Y=X.offset,G=null;for(let _ of X.items){let{start:q,key:B,sep:O,value:I}=_,V=E8.resolveProps(q,{indicator:"explicit-key-ind",next:B??O?.[0],offset:Y,onError:Q,parentIndent:X.indent,startOnNewline:!0}),W=!V.found;if(W){if(B){if(B.type==="block-seq")Q(Y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in B&&B.indent!==X.indent)Q(Y,"BAD_INDENT",y8)}if(!V.anchor&&!V.tag&&!O){if(G=V.end,V.comment)if(H.comment)H.comment+=`
64
- `+V.comment;else H.comment=V.comment;continue}if(V.newlineAfterProp||wX.containsNewline(B))Q(B??q[q.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(V.found?.indent!==X.indent)Q(Y,"BAD_INDENT",y8);U.atKey=!0;let L=V.end,R=B?$(U,B,V,Q):Z(U,L,q,null,V,Q);if(U.schema.compat)g8.flowIndentCheck(X.indent,B,Q);if(U.atKey=!1,CX.mapIncludes(U,H.items,R))Q(L,"DUPLICATE_KEY","Map keys must be unique");let P=E8.resolveProps(O??[],{indicator:"map-value-ind",next:I,offset:R.range[2],onError:Q,parentIndent:X.indent,startOnNewline:!B||B.type==="block-scalar"});if(Y=P.end,P.found){if(W){if(I?.type==="block-map"&&!P.hasNewline)Q(Y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&V.start<P.found.offset-1024)Q(R.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let A=I?$(U,I,P,Q):Z(U,Y,O,null,P,Q);if(U.schema.compat)g8.flowIndentCheck(X.indent,I,Q);Y=A.range[2];let F=new S8.Pair(R,A);if(U.options.keepSourceTokens)F.srcToken=_;H.items.push(F)}else{if(W)Q(R.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(P.comment)if(R.comment)R.comment+=`
65
- `+P.comment;else R.comment=P.comment;let A=new S8.Pair(R);if(U.options.keepSourceTokens)A.srcToken=_;H.items.push(A)}}if(G&&G<Y)Q(G,"IMPOSSIBLE","Map comment with trailing content");return H.range=[X.offset,Y,G??Y],H}SX.resolveBlockMap=jX});var x8=D((fX)=>{var gX=z0(),yX=V1(),hX=R2();function xX({composeNode:$,composeEmptyNode:Z},U,X,Q,J){let H=new(J?.nodeClass??gX.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let Y=X.offset,G=null;for(let{start:_,value:q}of X.items){let B=yX.resolveProps(_,{indicator:"seq-item-ind",next:q,offset:Y,onError:Q,parentIndent:X.indent,startOnNewline:!0});if(!B.found)if(B.anchor||B.tag||q)if(q?.type==="block-seq")Q(B.end,"BAD_INDENT","All sequence items must start at the same column");else Q(Y,"MISSING_CHAR","Sequence item without - indicator");else{if(G=B.end,B.comment)H.comment=B.comment;continue}let O=q?$(U,q,B,Q):Z(U,B.end,_,null,B,Q);if(U.schema.compat)hX.flowIndentCheck(X.indent,q,Q);Y=O.range[2],H.items.push(O)}return H.range=[X.offset,Y,G??Y],H}fX.resolveBlockSeq=xX});var y0=D((vX)=>{function kX($,Z,U,X){let Q="";if($){let J=!1,z="";for(let H of $){let{source:Y,type:G}=H;switch(G){case"space":J=!0;break;case"comment":{if(U&&!J)X(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let _=Y.substring(1)||" ";if(!Q)Q=_;else Q+=z+_;z="";break}case"newline":if(Q)z+=Y;J=!0;break;default:X(H,"UNEXPECTED_TOKEN",`Unexpected ${G} at node end`)}Z+=Y.length}}return{comment:Q,offset:Z}}vX.resolveEnd=kX});var k8=D((rX)=>{var lX=w(),pX=X0(),f8=J0(),dX=z0(),cX=y0(),u8=V1(),iX=z$(),sX=M2(),K2="Block collections are not allowed within flow collections",P2=($)=>$&&($.type==="block-map"||$.type==="block-seq");function aX({composeNode:$,composeEmptyNode:Z},U,X,Q,J){let z=X.start.source==="{",H=z?"flow map":"flow sequence",G=new(J?.nodeClass??(z?f8.YAMLMap:dX.YAMLSeq))(U.schema);G.flow=!0;let _=U.atRoot;if(_)U.atRoot=!1;if(U.atKey)U.atKey=!1;let q=X.offset+X.start.source.length;for(let W=0;W<X.items.length;++W){let L=X.items[W],{start:R,key:P,sep:A,value:F}=L,N=u8.resolveProps(R,{flow:H,indicator:"explicit-key-ind",next:P??A?.[0],offset:q,onError:Q,parentIndent:X.indent,startOnNewline:!1});if(!N.found){if(!N.anchor&&!N.tag&&!A&&!F){if(W===0&&N.comma)Q(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`);else if(W<X.items.length-1)Q(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${H}`);if(N.comment)if(G.comment)G.comment+=`
66
- `+N.comment;else G.comment=N.comment;q=N.end;continue}if(!z&&U.options.strict&&iX.containsNewline(P))Q(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(W===0){if(N.comma)Q(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`)}else{if(!N.comma)Q(N.start,"MISSING_CHAR",`Missing , between ${H} items`);if(N.comment){let C="";$:for(let T of R)switch(T.type){case"comma":case"space":break;case"comment":C=T.source.substring(1);break $;default:break $}if(C){let T=G.items[G.items.length-1];if(lX.isPair(T))T=T.value??T.key;if(T.comment)T.comment+=`
67
- `+C;else T.comment=C;N.comment=N.comment.substring(C.length+1)}}}if(!z&&!A&&!N.found){let C=F?$(U,F,N,Q):Z(U,N.end,A,null,N,Q);if(G.items.push(C),q=C.range[2],P2(F))Q(C.range,"BLOCK_IN_FLOW",K2)}else{U.atKey=!0;let C=N.end,T=P?$(U,P,N,Q):Z(U,C,R,null,N,Q);if(P2(P))Q(T.range,"BLOCK_IN_FLOW",K2);U.atKey=!1;let b=u8.resolveProps(A??[],{flow:H,indicator:"map-value-ind",next:F,offset:T.range[2],onError:Q,parentIndent:X.indent,startOnNewline:!1});if(b.found){if(!z&&!N.found&&U.options.strict){if(A)for(let g of A){if(g===b.found)break;if(g.type==="newline"){Q(g,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(N.start<b.found.offset-1024)Q(b.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(F)if("source"in F&&F.source?.[0]===":")Q(F,"MISSING_CHAR",`Missing space after : in ${H}`);else Q(b.start,"MISSING_CHAR",`Missing , or : between ${H} items`);let j=F?$(U,F,b,Q):b.found?Z(U,b.end,A,null,b,Q):null;if(j){if(P2(F))Q(j.range,"BLOCK_IN_FLOW",K2)}else if(b.comment)if(T.comment)T.comment+=`
68
- `+b.comment;else T.comment=b.comment;let c=new pX.Pair(T,j);if(U.options.keepSourceTokens)c.srcToken=L;if(z){let g=G;if(sX.mapIncludes(U,g.items,T))Q(C,"DUPLICATE_KEY","Map keys must be unique");g.items.push(c)}else{let g=new f8.YAMLMap(U.schema);g.flow=!0,g.items.push(c);let l0=(j??T).range;g.range=[T.range[0],l0[1],l0[2]],G.items.push(g)}q=j?j.range[2]:b.end}}let B=z?"}":"]",[O,...I]=X.end,V=q;if(O?.source===B)V=O.offset+O.source.length;else{let W=H[0].toUpperCase()+H.substring(1),L=_?`${W} must end with a ${B}`:`${W} in block collection must be sufficiently indented and end with a ${B}`;if(Q(q,_?"MISSING_CHAR":"BAD_INDENT",L),O&&O.source.length!==1)I.unshift(O)}if(I.length>0){let W=cX.resolveEnd(I,V,U.options.strict,Q);if(W.comment)if(G.comment)G.comment+=`
69
- `+W.comment;else G.comment=W.comment;G.range=[X.offset,V,W.offset]}else G.range=[X.offset,V,V];return G}rX.resolveFlowCollection=aX});var v8=D((JQ)=>{var oX=w(),tX=y(),eX=J0(),$Q=z0(),ZQ=h8(),UQ=x8(),XQ=k8();function T2($,Z,U,X,Q,J){let z=U.type==="block-map"?ZQ.resolveBlockMap($,Z,U,X,J):U.type==="block-seq"?UQ.resolveBlockSeq($,Z,U,X,J):XQ.resolveFlowCollection($,Z,U,X,J),H=z.constructor;if(Q==="!"||Q===H.tagName)return z.tag=H.tagName,z;if(Q)z.tag=Q;return z}function QQ($,Z,U,X,Q){let J=X.tag,z=!J?null:Z.directives.tagName(J.source,(B)=>Q(J,"TAG_RESOLVE_FAILED",B));if(U.type==="block-seq"){let{anchor:B,newlineAfterProp:O}=X,I=B&&J?B.offset>J.offset?B:J:B??J;if(I&&(!O||O.offset<I.offset))Q(I,"MISSING_CHAR","Missing newline after block sequence props")}let H=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!J||!z||z==="!"||z===eX.YAMLMap.tagName&&H==="map"||z===$Q.YAMLSeq.tagName&&H==="seq")return T2($,Z,U,Q,z);let Y=Z.schema.tags.find((B)=>B.tag===z&&B.collection===H);if(!Y){let B=Z.schema.knownTags[z];if(B?.collection===H)Z.schema.tags.push(Object.assign({},B,{default:!1})),Y=B;else{if(B)Q(J,"BAD_COLLECTION_TYPE",`${B.tag} used for ${H} collection, but expects ${B.collection??"scalar"}`,!0);else Q(J,"TAG_RESOLVE_FAILED",`Unresolved tag: ${z}`,!0);return T2($,Z,U,Q,z)}}let G=T2($,Z,U,Q,z,Y),_=Y.resolve?.(G,(B)=>Q(J,"TAG_RESOLVE_FAILED",B),Z.options)??G,q=oX.isNode(_)?_:new tX.Scalar(_);if(q.range=G.range,q.tag=z,Y?.format)q.format=Y.format;return q}JQ.composeCollection=QQ});var F2=D((qQ)=>{var A2=y();function HQ($,Z,U){let X=Z.offset,Q=GQ(Z,$.options.strict,U);if(!Q)return{value:"",type:null,comment:"",range:[X,X,X]};let J=Q.mode===">"?A2.Scalar.BLOCK_FOLDED:A2.Scalar.BLOCK_LITERAL,z=Z.source?YQ(Z.source):[],H=z.length;for(let V=z.length-1;V>=0;--V){let W=z[V][1];if(W===""||W==="\r")H=V;else break}if(H===0){let V=Q.chomp==="+"&&z.length>0?`
70
- `.repeat(Math.max(1,z.length-1)):"",W=X+Q.length;if(Z.source)W+=Z.source.length;return{value:V,type:J,comment:Q.comment,range:[X,W,W]}}let Y=Z.indent+Q.indent,G=Z.offset+Q.length,_=0;for(let V=0;V<H;++V){let[W,L]=z[V];if(L===""||L==="\r"){if(Q.indent===0&&W.length>Y)Y=W.length}else{if(W.length<Y)U(G+W.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(Q.indent===0)Y=W.length;if(_=V,Y===0&&!$.atRoot)U(G,"BAD_INDENT","Block scalar values in collections must be indented");break}G+=W.length+L.length+1}for(let V=z.length-1;V>=H;--V)if(z[V][0].length>Y)H=V+1;let q="",B="",O=!1;for(let V=0;V<_;++V)q+=z[V][0].slice(Y)+`
71
- `;for(let V=_;V<H;++V){let[W,L]=z[V];G+=W.length+L.length+1;let R=L[L.length-1]==="\r";if(R)L=L.slice(0,-1);if(L&&W.length<Y){let A=`Block scalar lines must not be less indented than their ${Q.indent?"explicit indentation indicator":"first line"}`;U(G-L.length-(R?2:1),"BAD_INDENT",A),W=""}if(J===A2.Scalar.BLOCK_LITERAL)q+=B+W.slice(Y)+L,B=`
72
- `;else if(W.length>Y||L[0]==="\t"){if(B===" ")B=`
60
+ ${J}
61
+ ${Y}
62
+ `}};PX.YAMLError=B$;PX.YAMLParseError=y8;PX.YAMLWarning=f8;PX.prettifyError=FX});var I1=R((bX)=>{function CX($,{flow:Z,indicator:U,next:X,offset:Q,onError:z,parentIndent:J,startOnNewline:H}){let q=!1,Y=H,G=H,_="",B="",O=!1,D=!1,V=null,W=null,I=null,L=null,F=null,A=null,T=null;for(let P of $){if(D){if(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma")z(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");D=!1}if(V){if(Y&&P.type!=="comment"&&P.type!=="newline")z(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");V=null}switch(P.type){case"space":if(!Z&&(U!=="doc-start"||X?.type!=="flow-collection")&&P.source.includes("\t"))V=P;G=!0;break;case"comment":{if(!G)z(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let w=P.source.substring(1)||" ";if(!_)_=w;else _+=B+w;B="",Y=!1;break}case"newline":if(Y){if(_)_+=P.source;else if(!A||U!=="seq-item-ind")q=!0}else B+=P.source;if(Y=!0,O=!0,W||I)L=P;G=!0;break;case"anchor":if(W)z(P,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(P.source.endsWith(":"))z(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);W=P,T??(T=P.offset),Y=!1,G=!1,D=!0;break;case"tag":{if(I)z(P,"MULTIPLE_TAGS","A node can have at most one tag");I=P,T??(T=P.offset),Y=!1,G=!1,D=!0;break}case U:if(W||I)z(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`);if(A)z(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${Z??"collection"}`);A=P,Y=U==="seq-item-ind"||U==="explicit-key-ind",G=!1;break;case"comma":if(Z){if(F)z(P,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);F=P,Y=!1,G=!1;break}default:z(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),Y=!1,G=!1}}let N=$[$.length-1],b=N?N.offset+N.source.length:Q;if(D&&X&&X.type!=="space"&&X.type!=="newline"&&X.type!=="comma"&&(X.type!=="scalar"||X.source!==""))z(X.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(V&&(Y&&V.indent<=J||X?.type==="block-map"||X?.type==="block-seq"))z(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:F,found:A,spaceBefore:q,comment:_,hasNewline:O,anchor:W,tag:I,newlineAfterProp:L,end:b,start:T??b}}bX.resolveProps=CX});var V$=R((EX)=>{function T2($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
63
+ `))return!0;if($.end){for(let Z of $.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of $.items){for(let U of Z.start)if(U.type==="newline")return!0;if(Z.sep){for(let U of Z.sep)if(U.type==="newline")return!0}if(T2(Z.key)||T2(Z.value))return!0}return!1;default:return!0}}EX.containsNewline=T2});var N2=R((hX)=>{var gX=V$();function xX($,Z,U){if(Z?.type==="flow-collection"){let X=Z.end[0];if(X.indent===$&&(X.source==="]"||X.source==="}")&&gX.containsNewline(Z))U(X,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}hX.flowIndentCheck=xX});var w2=R((uX)=>{var u8=C();function fX($,Z,U){let{uniqueKeys:X}=$.options;if(X===!1)return!1;let Q=typeof X==="function"?X:(z,J)=>z===J||u8.isScalar(z)&&u8.isScalar(J)&&z.value===J.value;return Z.some((z)=>Q(z.key,U))}uX.mapIncludes=fX});var l8=R((dX)=>{var k8=J0(),vX=q0(),v8=I1(),mX=V$(),m8=N2(),pX=w2(),p8="All mapping items must start at the same column";function lX({composeNode:$,composeEmptyNode:Z},U,X,Q,z){let H=new(z?.nodeClass??vX.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let q=X.offset,Y=null;for(let G of X.items){let{start:_,key:B,sep:O,value:D}=G,V=v8.resolveProps(_,{indicator:"explicit-key-ind",next:B??O?.[0],offset:q,onError:Q,parentIndent:X.indent,startOnNewline:!0}),W=!V.found;if(W){if(B){if(B.type==="block-seq")Q(q,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in B&&B.indent!==X.indent)Q(q,"BAD_INDENT",p8)}if(!V.anchor&&!V.tag&&!O){if(Y=V.end,V.comment)if(H.comment)H.comment+=`
64
+ `+V.comment;else H.comment=V.comment;continue}if(V.newlineAfterProp||mX.containsNewline(B))Q(B??_[_.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(V.found?.indent!==X.indent)Q(q,"BAD_INDENT",p8);U.atKey=!0;let I=V.end,L=B?$(U,B,V,Q):Z(U,I,_,null,V,Q);if(U.schema.compat)m8.flowIndentCheck(X.indent,B,Q);if(U.atKey=!1,pX.mapIncludes(U,H.items,L))Q(I,"DUPLICATE_KEY","Map keys must be unique");let F=v8.resolveProps(O??[],{indicator:"map-value-ind",next:D,offset:L.range[2],onError:Q,parentIndent:X.indent,startOnNewline:!B||B.type==="block-scalar"});if(q=F.end,F.found){if(W){if(D?.type==="block-map"&&!F.hasNewline)Q(q,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&V.start<F.found.offset-1024)Q(L.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let A=D?$(U,D,F,Q):Z(U,q,O,null,F,Q);if(U.schema.compat)m8.flowIndentCheck(X.indent,D,Q);q=A.range[2];let T=new k8.Pair(L,A);if(U.options.keepSourceTokens)T.srcToken=G;H.items.push(T)}else{if(W)Q(L.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(F.comment)if(L.comment)L.comment+=`
65
+ `+F.comment;else L.comment=F.comment;let A=new k8.Pair(L);if(U.options.keepSourceTokens)A.srcToken=G;H.items.push(A)}}if(Y&&Y<q)Q(Y,"IMPOSSIBLE","Map comment with trailing content");return H.range=[X.offset,q,Y??q],H}dX.resolveBlockMap=lX});var d8=R((nX)=>{var iX=Y0(),rX=I1(),sX=N2();function aX({composeNode:$,composeEmptyNode:Z},U,X,Q,z){let H=new(z?.nodeClass??iX.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let q=X.offset,Y=null;for(let{start:G,value:_}of X.items){let B=rX.resolveProps(G,{indicator:"seq-item-ind",next:_,offset:q,onError:Q,parentIndent:X.indent,startOnNewline:!0});if(!B.found)if(B.anchor||B.tag||_)if(_?.type==="block-seq")Q(B.end,"BAD_INDENT","All sequence items must start at the same column");else Q(q,"MISSING_CHAR","Sequence item without - indicator");else{if(Y=B.end,B.comment)H.comment=B.comment;continue}let O=_?$(U,_,B,Q):Z(U,B.end,G,null,B,Q);if(U.schema.compat)sX.flowIndentCheck(X.indent,_,Q);q=O.range[2],H.items.push(O)}return H.range=[X.offset,q,Y??q],H}nX.resolveBlockSeq=aX});var u0=R((eX)=>{function tX($,Z,U,X){let Q="";if($){let z=!1,J="";for(let H of $){let{source:q,type:Y}=H;switch(Y){case"space":z=!0;break;case"comment":{if(U&&!z)X(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let G=q.substring(1)||" ";if(!Q)Q=G;else Q+=J+G;J="";break}case"newline":if(Q)J+=q;z=!0;break;default:X(H,"UNEXPECTED_TOKEN",`Unexpected ${Y} at node end`)}Z+=q.length}}return{comment:Q,offset:Z}}eX.resolveEnd=tX});var r8=R((qQ)=>{var ZQ=C(),UQ=J0(),c8=q0(),XQ=Y0(),QQ=u0(),i8=I1(),zQ=V$(),JQ=w2(),C2="Block collections are not allowed within flow collections",b2=($)=>$&&($.type==="block-map"||$.type==="block-seq");function HQ({composeNode:$,composeEmptyNode:Z},U,X,Q,z){let J=X.start.source==="{",H=J?"flow map":"flow sequence",Y=new(z?.nodeClass??(J?c8.YAMLMap:XQ.YAMLSeq))(U.schema);Y.flow=!0;let G=U.atRoot;if(G)U.atRoot=!1;if(U.atKey)U.atKey=!1;let _=X.offset+X.start.source.length;for(let W=0;W<X.items.length;++W){let I=X.items[W],{start:L,key:F,sep:A,value:T}=I,N=i8.resolveProps(L,{flow:H,indicator:"explicit-key-ind",next:F??A?.[0],offset:_,onError:Q,parentIndent:X.indent,startOnNewline:!1});if(!N.found){if(!N.anchor&&!N.tag&&!A&&!T){if(W===0&&N.comma)Q(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`);else if(W<X.items.length-1)Q(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${H}`);if(N.comment)if(Y.comment)Y.comment+=`
66
+ `+N.comment;else Y.comment=N.comment;_=N.end;continue}if(!J&&U.options.strict&&zQ.containsNewline(F))Q(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(W===0){if(N.comma)Q(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`)}else{if(!N.comma)Q(N.start,"MISSING_CHAR",`Missing , between ${H} items`);if(N.comment){let b="";$:for(let P of L)switch(P.type){case"comma":case"space":break;case"comment":b=P.source.substring(1);break $;default:break $}if(b){let P=Y.items[Y.items.length-1];if(ZQ.isPair(P))P=P.value??P.key;if(P.comment)P.comment+=`
67
+ `+b;else P.comment=b;N.comment=N.comment.substring(b.length+1)}}}if(!J&&!A&&!N.found){let b=T?$(U,T,N,Q):Z(U,N.end,A,null,N,Q);if(Y.items.push(b),_=b.range[2],b2(T))Q(b.range,"BLOCK_IN_FLOW",C2)}else{U.atKey=!0;let b=N.end,P=F?$(U,F,N,Q):Z(U,b,L,null,N,Q);if(b2(F))Q(P.range,"BLOCK_IN_FLOW",C2);U.atKey=!1;let w=i8.resolveProps(A??[],{flow:H,indicator:"map-value-ind",next:T,offset:P.range[2],onError:Q,parentIndent:X.indent,startOnNewline:!1});if(w.found){if(!J&&!N.found&&U.options.strict){if(A)for(let g of A){if(g===w.found)break;if(g.type==="newline"){Q(g,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(N.start<w.found.offset-1024)Q(w.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(T)if("source"in T&&T.source?.[0]===":")Q(T,"MISSING_CHAR",`Missing space after : in ${H}`);else Q(w.start,"MISSING_CHAR",`Missing , or : between ${H} items`);let v=T?$(U,T,w,Q):w.found?Z(U,w.end,A,null,w,Q):null;if(v){if(b2(T))Q(v.range,"BLOCK_IN_FLOW",C2)}else if(w.comment)if(P.comment)P.comment+=`
68
+ `+w.comment;else P.comment=w.comment;let S=new UQ.Pair(P,v);if(U.options.keepSourceTokens)S.srcToken=I;if(J){let g=Y;if(JQ.mapIncludes(U,g.items,P))Q(b,"DUPLICATE_KEY","Map keys must be unique");g.items.push(S)}else{let g=new c8.YAMLMap(U.schema);g.flow=!0,g.items.push(S);let i0=(v??P).range;g.range=[P.range[0],i0[1],i0[2]],Y.items.push(g)}_=v?v.range[2]:w.end}}let B=J?"}":"]",[O,...D]=X.end,V=_;if(O?.source===B)V=O.offset+O.source.length;else{let W=H[0].toUpperCase()+H.substring(1),I=G?`${W} must end with a ${B}`:`${W} in block collection must be sufficiently indented and end with a ${B}`;if(Q(_,G?"MISSING_CHAR":"BAD_INDENT",I),O&&O.source.length!==1)D.unshift(O)}if(D.length>0){let W=QQ.resolveEnd(D,V,U.options.strict,Q);if(W.comment)if(Y.comment)Y.comment+=`
69
+ `+W.comment;else Y.comment=W.comment;Y.range=[X.offset,V,W.offset]}else Y.range=[X.offset,V,V];return Y}qQ.resolveFlowCollection=HQ});var s8=R((LQ)=>{var GQ=C(),_Q=x(),BQ=q0(),VQ=Y0(),OQ=l8(),WQ=d8(),DQ=r8();function S2($,Z,U,X,Q,z){let J=U.type==="block-map"?OQ.resolveBlockMap($,Z,U,X,z):U.type==="block-seq"?WQ.resolveBlockSeq($,Z,U,X,z):DQ.resolveFlowCollection($,Z,U,X,z),H=J.constructor;if(Q==="!"||Q===H.tagName)return J.tag=H.tagName,J;if(Q)J.tag=Q;return J}function IQ($,Z,U,X,Q){let z=X.tag,J=!z?null:Z.directives.tagName(z.source,(B)=>Q(z,"TAG_RESOLVE_FAILED",B));if(U.type==="block-seq"){let{anchor:B,newlineAfterProp:O}=X,D=B&&z?B.offset>z.offset?B:z:B??z;if(D&&(!O||O.offset<D.offset))Q(D,"MISSING_CHAR","Missing newline after block sequence props")}let H=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!z||!J||J==="!"||J===BQ.YAMLMap.tagName&&H==="map"||J===VQ.YAMLSeq.tagName&&H==="seq")return S2($,Z,U,Q,J);let q=Z.schema.tags.find((B)=>B.tag===J&&B.collection===H);if(!q){let B=Z.schema.knownTags[J];if(B?.collection===H)Z.schema.tags.push(Object.assign({},B,{default:!1})),q=B;else{if(B)Q(z,"BAD_COLLECTION_TYPE",`${B.tag} used for ${H} collection, but expects ${B.collection??"scalar"}`,!0);else Q(z,"TAG_RESOLVE_FAILED",`Unresolved tag: ${J}`,!0);return S2($,Z,U,Q,J)}}let Y=S2($,Z,U,Q,J,q),G=q.resolve?.(Y,(B)=>Q(z,"TAG_RESOLVE_FAILED",B),Z.options)??Y,_=GQ.isNode(G)?G:new _Q.Scalar(G);if(_.range=Y.range,_.tag=J,q?.format)_.format=q.format;return _}LQ.composeCollection=IQ});var j2=R((PQ)=>{var E2=x();function MQ($,Z,U){let X=Z.offset,Q=KQ(Z,$.options.strict,U);if(!Q)return{value:"",type:null,comment:"",range:[X,X,X]};let z=Q.mode===">"?E2.Scalar.BLOCK_FOLDED:E2.Scalar.BLOCK_LITERAL,J=Z.source?FQ(Z.source):[],H=J.length;for(let V=J.length-1;V>=0;--V){let W=J[V][1];if(W===""||W==="\r")H=V;else break}if(H===0){let V=Q.chomp==="+"&&J.length>0?`
70
+ `.repeat(Math.max(1,J.length-1)):"",W=X+Q.length;if(Z.source)W+=Z.source.length;return{value:V,type:z,comment:Q.comment,range:[X,W,W]}}let q=Z.indent+Q.indent,Y=Z.offset+Q.length,G=0;for(let V=0;V<H;++V){let[W,I]=J[V];if(I===""||I==="\r"){if(Q.indent===0&&W.length>q)q=W.length}else{if(W.length<q)U(Y+W.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(Q.indent===0)q=W.length;if(G=V,q===0&&!$.atRoot)U(Y,"BAD_INDENT","Block scalar values in collections must be indented");break}Y+=W.length+I.length+1}for(let V=J.length-1;V>=H;--V)if(J[V][0].length>q)H=V+1;let _="",B="",O=!1;for(let V=0;V<G;++V)_+=J[V][0].slice(q)+`
71
+ `;for(let V=G;V<H;++V){let[W,I]=J[V];Y+=W.length+I.length+1;let L=I[I.length-1]==="\r";if(L)I=I.slice(0,-1);if(I&&W.length<q){let A=`Block scalar lines must not be less indented than their ${Q.indent?"explicit indentation indicator":"first line"}`;U(Y-I.length-(L?2:1),"BAD_INDENT",A),W=""}if(z===E2.Scalar.BLOCK_LITERAL)_+=B+W.slice(q)+I,B=`
72
+ `;else if(W.length>q||I[0]==="\t"){if(B===" ")B=`
73
73
  `;else if(!O&&B===`
74
74
  `)B=`
75
75
 
76
- `;q+=B+W.slice(Y)+L,B=`
77
- `,O=!0}else if(L==="")if(B===`
78
- `)q+=`
76
+ `;_+=B+W.slice(q)+I,B=`
77
+ `,O=!0}else if(I==="")if(B===`
78
+ `)_+=`
79
79
  `;else B=`
80
- `;else q+=B+L,B=" ",O=!1}switch(Q.chomp){case"-":break;case"+":for(let V=H;V<z.length;++V)q+=`
81
- `+z[V][0].slice(Y);if(q[q.length-1]!==`
82
- `)q+=`
83
- `;break;default:q+=`
84
- `}let I=X+Q.length+Z.source.length;return{value:q,type:J,comment:Q.comment,range:[X,I,I]}}function GQ({offset:$,props:Z},U,X){if(Z[0].type!=="block-scalar-header")return X(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:Q}=Z[0],J=Q[0],z=0,H="",Y=-1;for(let B=1;B<Q.length;++B){let O=Q[B];if(!H&&(O==="-"||O==="+"))H=O;else{let I=Number(O);if(!z&&I)z=I;else if(Y===-1)Y=$+B}}if(Y!==-1)X(Y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${Q}`);let G=!1,_="",q=Q.length;for(let B=1;B<Z.length;++B){let O=Z[B];switch(O.type){case"space":G=!0;case"newline":q+=O.source.length;break;case"comment":if(U&&!G)X(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");q+=O.source.length,_=O.source.substring(1);break;case"error":X(O,"UNEXPECTED_TOKEN",O.message),q+=O.source.length;break;default:{let I=`Unexpected token in block scalar header: ${O.type}`;X(O,"UNEXPECTED_TOKEN",I);let V=O.source;if(V&&typeof V==="string")q+=V.length}}}return{mode:J,indent:z,chomp:H,comment:_,length:q}}function YQ($){let Z=$.split(/\n( *)/),U=Z[0],X=U.match(/^( *)/),J=[X?.[1]?[X[1],U.slice(X[1].length)]:["",U]];for(let z=1;z<Z.length;z+=2)J.push([Z[z],Z[z+1]]);return J}qQ.resolveBlockScalar=HQ});var b2=D((MQ)=>{var N2=y(),BQ=y0();function VQ($,Z,U){let{offset:X,type:Q,source:J,end:z}=$,H,Y,G=(B,O,I)=>U(X+B,O,I);switch(Q){case"scalar":H=N2.Scalar.PLAIN,Y=OQ(J,G);break;case"single-quoted-scalar":H=N2.Scalar.QUOTE_SINGLE,Y=WQ(J,G);break;case"double-quoted-scalar":H=N2.Scalar.QUOTE_DOUBLE,Y=IQ(J,G);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${Q}`),{value:"",type:null,comment:"",range:[X,X+J.length,X+J.length]}}let _=X+J.length,q=BQ.resolveEnd(z,_,Z,U);return{value:Y,type:H,comment:q.comment,range:[X,_,q.offset]}}function OQ($,Z){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return m8($)}function WQ($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return m8($.slice(1,-1)).replace(/''/g,"'")}function m8($){let Z,U;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
80
+ `;else _+=B+I,B=" ",O=!1}switch(Q.chomp){case"-":break;case"+":for(let V=H;V<J.length;++V)_+=`
81
+ `+J[V][0].slice(q);if(_[_.length-1]!==`
82
+ `)_+=`
83
+ `;break;default:_+=`
84
+ `}let D=X+Q.length+Z.source.length;return{value:_,type:z,comment:Q.comment,range:[X,D,D]}}function KQ({offset:$,props:Z},U,X){if(Z[0].type!=="block-scalar-header")return X(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:Q}=Z[0],z=Q[0],J=0,H="",q=-1;for(let B=1;B<Q.length;++B){let O=Q[B];if(!H&&(O==="-"||O==="+"))H=O;else{let D=Number(O);if(!J&&D)J=D;else if(q===-1)q=$+B}}if(q!==-1)X(q,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${Q}`);let Y=!1,G="",_=Q.length;for(let B=1;B<Z.length;++B){let O=Z[B];switch(O.type){case"space":Y=!0;case"newline":_+=O.source.length;break;case"comment":if(U&&!Y)X(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");_+=O.source.length,G=O.source.substring(1);break;case"error":X(O,"UNEXPECTED_TOKEN",O.message),_+=O.source.length;break;default:{let D=`Unexpected token in block scalar header: ${O.type}`;X(O,"UNEXPECTED_TOKEN",D);let V=O.source;if(V&&typeof V==="string")_+=V.length}}}return{mode:z,indent:J,chomp:H,comment:G,length:_}}function FQ($){let Z=$.split(/\n( *)/),U=Z[0],X=U.match(/^( *)/),z=[X?.[1]?[X[1],U.slice(X[1].length)]:["",U]];for(let J=1;J<Z.length;J+=2)z.push([Z[J],Z[J+1]]);return z}PQ.resolveBlockScalar=MQ});var x2=R((gQ)=>{var g2=x(),TQ=u0();function NQ($,Z,U){let{offset:X,type:Q,source:z,end:J}=$,H,q,Y=(B,O,D)=>U(X+B,O,D);switch(Q){case"scalar":H=g2.Scalar.PLAIN,q=wQ(z,Y);break;case"single-quoted-scalar":H=g2.Scalar.QUOTE_SINGLE,q=CQ(z,Y);break;case"double-quoted-scalar":H=g2.Scalar.QUOTE_DOUBLE,q=bQ(z,Y);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${Q}`),{value:"",type:null,comment:"",range:[X,X+z.length,X+z.length]}}let G=X+z.length,_=TQ.resolveEnd(J,G,Z,U);return{value:q,type:H,comment:_.comment,range:[X,G,_.offset]}}function wQ($,Z){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return a8($)}function CQ($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return a8($.slice(1,-1)).replace(/''/g,"'")}function a8($){let Z,U;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
85
  `,"sy"),U=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
- `,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,U=/[ \t]*(.*?)[ \t]*\r?\n/sy}let X=Z.exec($);if(!X)return $;let Q=X[1],J=" ",z=Z.lastIndex;U.lastIndex=z;while(X=U.exec($)){if(X[1]==="")if(J===`
87
- `)Q+=J;else J=`
88
- `;else Q+=J+X[1],J=" ";z=U.lastIndex}let H=/[ \t]*(.*)/sy;return H.lastIndex=z,X=H.exec($),Q+J+(X?.[1]??"")}function IQ($,Z){let U="";for(let X=1;X<$.length-1;++X){let Q=$[X];if(Q==="\r"&&$[X+1]===`
86
+ `,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,U=/[ \t]*(.*?)[ \t]*\r?\n/sy}let X=Z.exec($);if(!X)return $;let Q=X[1],z=" ",J=Z.lastIndex;U.lastIndex=J;while(X=U.exec($)){if(X[1]==="")if(z===`
87
+ `)Q+=z;else z=`
88
+ `;else Q+=z+X[1],z=" ";J=U.lastIndex}let H=/[ \t]*(.*)/sy;return H.lastIndex=J,X=H.exec($),Q+z+(X?.[1]??"")}function bQ($,Z){let U="";for(let X=1;X<$.length-1;++X){let Q=$[X];if(Q==="\r"&&$[X+1]===`
89
89
  `)continue;if(Q===`
90
- `){let{fold:J,offset:z}=LQ($,X);U+=J,X=z}else if(Q==="\\"){let J=$[++X],z=DQ[J];if(z)U+=z;else if(J===`
91
- `){J=$[X+1];while(J===" "||J==="\t")J=$[++X+1]}else if(J==="\r"&&$[X+1]===`
92
- `){J=$[++X+1];while(J===" "||J==="\t")J=$[++X+1]}else if(J==="x"||J==="u"||J==="U"){let H={x:2,u:4,U:8}[J];U+=RQ($,X+1,H,Z),X+=H}else{let H=$.substr(X-1,2);Z(X-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),U+=H}}else if(Q===" "||Q==="\t"){let J=X,z=$[X+1];while(z===" "||z==="\t")z=$[++X+1];if(z!==`
93
- `&&!(z==="\r"&&$[X+2]===`
94
- `))U+=X>J?$.slice(J,X+1):Q}else U+=Q}if($[$.length-1]!=='"'||$.length===1)Z($.length,"MISSING_CHAR",'Missing closing "quote');return U}function LQ($,Z){let U="",X=$[Z+1];while(X===" "||X==="\t"||X===`
90
+ `){let{fold:z,offset:J}=SQ($,X);U+=z,X=J}else if(Q==="\\"){let z=$[++X],J=EQ[z];if(J)U+=J;else if(z===`
91
+ `){z=$[X+1];while(z===" "||z==="\t")z=$[++X+1]}else if(z==="\r"&&$[X+1]===`
92
+ `){z=$[++X+1];while(z===" "||z==="\t")z=$[++X+1]}else if(z==="x"||z==="u"||z==="U"){let H={x:2,u:4,U:8}[z];U+=jQ($,X+1,H,Z),X+=H}else{let H=$.substr(X-1,2);Z(X-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),U+=H}}else if(Q===" "||Q==="\t"){let z=X,J=$[X+1];while(J===" "||J==="\t")J=$[++X+1];if(J!==`
93
+ `&&!(J==="\r"&&$[X+2]===`
94
+ `))U+=X>z?$.slice(z,X+1):Q}else U+=Q}if($[$.length-1]!=='"'||$.length===1)Z($.length,"MISSING_CHAR",'Missing closing "quote');return U}function SQ($,Z){let U="",X=$[Z+1];while(X===" "||X==="\t"||X===`
95
95
  `||X==="\r"){if(X==="\r"&&$[Z+2]!==`
96
96
  `)break;if(X===`
97
97
  `)U+=`
98
- `;Z+=1,X=$[Z+1]}if(!U)U=" ";return{fold:U,offset:Z}}var DQ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
- `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function RQ($,Z,U,X){let Q=$.substr(Z,U),z=Q.length===U&&/^[0-9a-fA-F]+$/.test(Q)?parseInt(Q,16):NaN;if(isNaN(z)){let H=$.substr(Z-2,U+2);return X(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),H}return String.fromCodePoint(z)}MQ.resolveFlowScalar=VQ});var p8=D((bQ)=>{var I0=w(),l8=y(),PQ=F2(),TQ=b2();function AQ($,Z,U,X){let{value:Q,type:J,comment:z,range:H}=Z.type==="block-scalar"?PQ.resolveBlockScalar($,Z,X):TQ.resolveFlowScalar(Z,$.options.strict,X),Y=U?$.directives.tagName(U.source,(q)=>X(U,"TAG_RESOLVE_FAILED",q)):null,G;if($.options.stringKeys&&$.atKey)G=$.schema[I0.SCALAR];else if(Y)G=FQ($.schema,Q,Y,U,X);else if(Z.type==="scalar")G=NQ($,Q,Z,X);else G=$.schema[I0.SCALAR];let _;try{let q=G.resolve(Q,(B)=>X(U??Z,"TAG_RESOLVE_FAILED",B),$.options);_=I0.isScalar(q)?q:new l8.Scalar(q)}catch(q){let B=q instanceof Error?q.message:String(q);X(U??Z,"TAG_RESOLVE_FAILED",B),_=new l8.Scalar(Q)}if(_.range=H,_.source=Q,J)_.type=J;if(Y)_.tag=Y;if(G.format)_.format=G.format;if(z)_.comment=z;return _}function FQ($,Z,U,X,Q){if(U==="!")return $[I0.SCALAR];let J=[];for(let H of $.tags)if(!H.collection&&H.tag===U)if(H.default&&H.test)J.push(H);else return H;for(let H of J)if(H.test?.test(Z))return H;let z=$.knownTags[U];if(z&&!z.collection)return $.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return Q(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[I0.SCALAR]}function NQ({atKey:$,directives:Z,schema:U},X,Q,J){let z=U.tags.find((H)=>(H.default===!0||$&&H.default==="key")&&H.test?.test(X))||U[I0.SCALAR];if(U.compat){let H=U.compat.find((Y)=>Y.default&&Y.test?.test(X))??U[I0.SCALAR];if(z.tag!==H.tag){let Y=Z.tagString(z.tag),G=Z.tagString(H.tag),_=`Value may be parsed as either ${Y} or ${G}`;J(Q,"TAG_RESOLVE_FAILED",_,!0)}}return z}bQ.composeScalar=AQ});var d8=D((jQ)=>{function CQ($,Z,U){if(Z){U??(U=Z.length);for(let X=U-1;X>=0;--X){let Q=Z[X];switch(Q.type){case"space":case"comment":case"newline":$-=Q.source.length;continue}Q=Z[++X];while(Q?.type==="space")$+=Q.source.length,Q=Z[++X];break}}return $}jQ.emptyScalarPosition=CQ});var s8=D((kQ)=>{var EQ=n0(),gQ=w(),yQ=v8(),c8=p8(),hQ=y0(),xQ=d8(),fQ={composeNode:i8,composeEmptyNode:w2};function i8($,Z,U,X){let Q=$.atKey,{spaceBefore:J,comment:z,anchor:H,tag:Y}=U,G,_=!0;switch(Z.type){case"alias":if(G=uQ($,Z,X),H||Y)X(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(G=c8.composeScalar($,Z,Y,X),H)G.anchor=H.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(G=yQ.composeCollection(fQ,$,Z,U,X),H)G.anchor=H.source.substring(1)}catch(q){let B=q instanceof Error?q.message:String(q);X(Z,"RESOURCE_EXHAUSTION",B)}break;default:{let q=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;X(Z,"UNEXPECTED_TOKEN",q),_=!1}}if(G??(G=w2($,Z.offset,void 0,null,U,X)),H&&G.anchor==="")X(H,"BAD_ALIAS","Anchor cannot be an empty string");if(Q&&$.options.stringKeys&&(!gQ.isScalar(G)||typeof G.value!=="string"||G.tag&&G.tag!=="tag:yaml.org,2002:str"))X(Y??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(J)G.spaceBefore=!0;if(z)if(Z.type==="scalar"&&Z.source==="")G.comment=z;else G.commentBefore=z;if($.options.keepSourceTokens&&_)G.srcToken=Z;return G}function w2($,Z,U,X,{spaceBefore:Q,comment:J,anchor:z,tag:H,end:Y},G){let _={type:"scalar",offset:xQ.emptyScalarPosition(Z,U,X),indent:-1,source:""},q=c8.composeScalar($,_,H,G);if(z){if(q.anchor=z.source.substring(1),q.anchor==="")G(z,"BAD_ALIAS","Anchor cannot be an empty string")}if(Q)q.spaceBefore=!0;if(J)q.comment=J,q.range[2]=Y;return q}function uQ({options:$},{offset:Z,source:U,end:X},Q){let J=new EQ.Alias(U.substring(1));if(J.source==="")Q(Z,"BAD_ALIAS","Alias cannot be an empty string");if(J.source.endsWith(":"))Q(Z+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=Z+U.length,H=hQ.resolveEnd(X,z,$.strict,Q);if(J.range=[Z,z,H.offset],H.comment)J.comment=H.comment;return J}kQ.composeEmptyNode=w2;kQ.composeNode=i8});var r8=D((iQ)=>{var lQ=_1(),a8=s8(),pQ=y0(),dQ=V1();function cQ($,Z,{offset:U,start:X,value:Q,end:J},z){let H=Object.assign({_directives:Z},$),Y=new lQ.Document(void 0,H),G={atKey:!1,atRoot:!0,directives:Y.directives,options:Y.options,schema:Y.schema},_=dQ.resolveProps(X,{indicator:"doc-start",next:Q??J?.[0],offset:U,onError:z,parentIndent:0,startOnNewline:!0});if(_.found){if(Y.directives.docStart=!0,Q&&(Q.type==="block-map"||Q.type==="block-seq")&&!_.hasNewline)z(_.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}Y.contents=Q?a8.composeNode(G,Q,_,z):a8.composeEmptyNode(G,_.end,X,null,_,z);let q=Y.contents.range[2],B=pQ.resolveEnd(J,q,!1,z);if(B.comment)Y.comment=B.comment;return Y.range=[U,q,B.offset],Y}iQ.composeDoc=cQ});var C2=D((eQ)=>{var aQ=p0("process"),rQ=g$(),nQ=_1(),O1=B1(),n8=w(),oQ=r8(),tQ=y0();function W1($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:U}=$;return[Z,Z+(typeof U==="string"?U.length:1)]}function o8($){let Z="",U=!1,X=!1;for(let Q=0;Q<$.length;++Q){let J=$[Q];switch(J[0]){case"#":Z+=(Z===""?"":X?`
98
+ `;Z+=1,X=$[Z+1]}if(!U)U=" ";return{fold:U,offset:Z}}var EQ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function jQ($,Z,U,X){let Q=$.substr(Z,U),J=Q.length===U&&/^[0-9a-fA-F]+$/.test(Q)?parseInt(Q,16):NaN;if(isNaN(J)){let H=$.substr(Z-2,U+2);return X(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),H}return String.fromCodePoint(J)}gQ.resolveFlowScalar=NQ});var o8=R((vQ)=>{var R0=C(),n8=x(),hQ=j2(),yQ=x2();function fQ($,Z,U,X){let{value:Q,type:z,comment:J,range:H}=Z.type==="block-scalar"?hQ.resolveBlockScalar($,Z,X):yQ.resolveFlowScalar(Z,$.options.strict,X),q=U?$.directives.tagName(U.source,(_)=>X(U,"TAG_RESOLVE_FAILED",_)):null,Y;if($.options.stringKeys&&$.atKey)Y=$.schema[R0.SCALAR];else if(q)Y=uQ($.schema,Q,q,U,X);else if(Z.type==="scalar")Y=kQ($,Q,Z,X);else Y=$.schema[R0.SCALAR];let G;try{let _=Y.resolve(Q,(B)=>X(U??Z,"TAG_RESOLVE_FAILED",B),$.options);G=R0.isScalar(_)?_:new n8.Scalar(_)}catch(_){let B=_ instanceof Error?_.message:String(_);X(U??Z,"TAG_RESOLVE_FAILED",B),G=new n8.Scalar(Q)}if(G.range=H,G.source=Q,z)G.type=z;if(q)G.tag=q;if(Y.format)G.format=Y.format;if(J)G.comment=J;return G}function uQ($,Z,U,X,Q){if(U==="!")return $[R0.SCALAR];let z=[];for(let H of $.tags)if(!H.collection&&H.tag===U)if(H.default&&H.test)z.push(H);else return H;for(let H of z)if(H.test?.test(Z))return H;let J=$.knownTags[U];if(J&&!J.collection)return $.tags.push(Object.assign({},J,{default:!1,test:void 0})),J;return Q(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[R0.SCALAR]}function kQ({atKey:$,directives:Z,schema:U},X,Q,z){let J=U.tags.find((H)=>(H.default===!0||$&&H.default==="key")&&H.test?.test(X))||U[R0.SCALAR];if(U.compat){let H=U.compat.find((q)=>q.default&&q.test?.test(X))??U[R0.SCALAR];if(J.tag!==H.tag){let q=Z.tagString(J.tag),Y=Z.tagString(H.tag),G=`Value may be parsed as either ${q} or ${Y}`;z(Q,"TAG_RESOLVE_FAILED",G,!0)}}return J}vQ.composeScalar=fQ});var t8=R((lQ)=>{function pQ($,Z,U){if(Z){U??(U=Z.length);for(let X=U-1;X>=0;--X){let Q=Z[X];switch(Q.type){case"space":case"comment":case"newline":$-=Q.source.length;continue}Q=Z[++X];while(Q?.type==="space")$+=Q.source.length,Q=Z[++X];break}}return $}lQ.emptyScalarPosition=pQ});var Z6=R((tQ)=>{var cQ=$1(),iQ=C(),rQ=s8(),e8=o8(),sQ=u0(),aQ=t8(),nQ={composeNode:$6,composeEmptyNode:h2};function $6($,Z,U,X){let Q=$.atKey,{spaceBefore:z,comment:J,anchor:H,tag:q}=U,Y,G=!0;switch(Z.type){case"alias":if(Y=oQ($,Z,X),H||q)X(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(Y=e8.composeScalar($,Z,q,X),H)Y.anchor=H.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(Y=rQ.composeCollection(nQ,$,Z,U,X),H)Y.anchor=H.source.substring(1)}catch(_){let B=_ instanceof Error?_.message:String(_);X(Z,"RESOURCE_EXHAUSTION",B)}break;default:{let _=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;X(Z,"UNEXPECTED_TOKEN",_),G=!1}}if(Y??(Y=h2($,Z.offset,void 0,null,U,X)),H&&Y.anchor==="")X(H,"BAD_ALIAS","Anchor cannot be an empty string");if(Q&&$.options.stringKeys&&(!iQ.isScalar(Y)||typeof Y.value!=="string"||Y.tag&&Y.tag!=="tag:yaml.org,2002:str"))X(q??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(z)Y.spaceBefore=!0;if(J)if(Z.type==="scalar"&&Z.source==="")Y.comment=J;else Y.commentBefore=J;if($.options.keepSourceTokens&&G)Y.srcToken=Z;return Y}function h2($,Z,U,X,{spaceBefore:Q,comment:z,anchor:J,tag:H,end:q},Y){let G={type:"scalar",offset:aQ.emptyScalarPosition(Z,U,X),indent:-1,source:""},_=e8.composeScalar($,G,H,Y);if(J){if(_.anchor=J.source.substring(1),_.anchor==="")Y(J,"BAD_ALIAS","Anchor cannot be an empty string")}if(Q)_.spaceBefore=!0;if(z)_.comment=z,_.range[2]=q;return _}function oQ({options:$},{offset:Z,source:U,end:X},Q){let z=new cQ.Alias(U.substring(1));if(z.source==="")Q(Z,"BAD_ALIAS","Alias cannot be an empty string");if(z.source.endsWith(":"))Q(Z+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let J=Z+U.length,H=sQ.resolveEnd(X,J,$.strict,Q);if(z.range=[Z,J,H.offset],H.comment)z.comment=H.comment;return z}tQ.composeEmptyNode=h2;tQ.composeNode=$6});var X6=R((zz)=>{var Zz=W1(),U6=Z6(),Uz=u0(),Xz=I1();function Qz($,Z,{offset:U,start:X,value:Q,end:z},J){let H=Object.assign({_directives:Z},$),q=new Zz.Document(void 0,H),Y={atKey:!1,atRoot:!0,directives:q.directives,options:q.options,schema:q.schema},G=Xz.resolveProps(X,{indicator:"doc-start",next:Q??z?.[0],offset:U,onError:J,parentIndent:0,startOnNewline:!0});if(G.found){if(q.directives.docStart=!0,Q&&(Q.type==="block-map"||Q.type==="block-seq")&&!G.hasNewline)J(G.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}q.contents=Q?U6.composeNode(Y,Q,G,J):U6.composeEmptyNode(Y,G.end,X,null,G,J);let _=q.contents.range[2],B=Uz.resolveEnd(z,_,!1,J);if(B.comment)q.comment=B.comment;return q.range=[U,_,B.offset],q}zz.composeDoc=Qz});var y2=R((Bz)=>{var Hz=r0("process"),qz=v$(),Yz=W1(),L1=D1(),Q6=C(),Gz=X6(),_z=u0();function R1($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:U}=$;return[Z,Z+(typeof U==="string"?U.length:1)]}function z6($){let Z="",U=!1,X=!1;for(let Q=0;Q<$.length;++Q){let z=$[Q];switch(z[0]){case"#":Z+=(Z===""?"":X?`
100
100
 
101
101
  `:`
102
- `)+(J.substring(1)||" "),U=!0,X=!1;break;case"%":if($[Q+1]?.[0]!=="#")Q+=1;U=!1;break;default:if(!U)X=!0;U=!1}}return{comment:Z,afterEmptyLine:X}}class t8{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,U,X,Q)=>{let J=W1(Z);if(Q)this.warnings.push(new O1.YAMLWarning(J,U,X));else this.errors.push(new O1.YAMLParseError(J,U,X))},this.directives=new rQ.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:U,afterEmptyLine:X}=o8(this.prelude);if(U){let Q=$.contents;if(Z)$.comment=$.comment?`${$.comment}
103
- ${U}`:U;else if(X||$.directives.docStart||!Q)$.commentBefore=U;else if(n8.isCollection(Q)&&!Q.flow&&Q.items.length>0){let J=Q.items[0];if(n8.isPair(J))J=J.key;let z=J.commentBefore;J.commentBefore=z?`${U}
104
- ${z}`:U}else{let J=Q.commentBefore;Q.commentBefore=J?`${U}
105
- ${J}`:U}}if(Z)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:o8(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,U=-1){for(let X of $)yield*this.next(X);yield*this.end(Z,U)}*next($){if(aQ.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,U,X)=>{let Q=W1($);Q[0]+=Z,this.onError(Q,"BAD_DIRECTIVE",U,X)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=oQ.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Z.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Z,!1),this.doc)yield this.doc;this.doc=Z,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Z=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new O1.YAMLParseError(W1($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new O1.YAMLParseError(W1($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=tQ.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
106
- ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new O1.YAMLParseError(W1($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,Z=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),X=new nQ.Document(void 0,U);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");X.range=[0,Z,Z],this.decorate(X,!1),yield X}}}eQ.Composer=t8});var Z9=D((GJ)=>{var ZJ=F2(),UJ=b2(),XJ=B1(),e8=$1();function QJ($,Z=!0,U){if($){let X=(Q,J,z)=>{let H=typeof Q==="number"?Q:Array.isArray(Q)?Q[0]:Q.offset;if(U)U(H,J,z);else throw new XJ.YAMLParseError([H,H+1],J,z)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return UJ.resolveFlowScalar($,Z,X);case"block-scalar":return ZJ.resolveBlockScalar({options:{strict:Z}},$,X)}}return null}function JJ($,Z){let{implicitKey:U=!1,indent:X,inFlow:Q=!1,offset:J=-1,type:z="PLAIN"}=Z,H=e8.stringifyString({type:z,value:$},{implicitKey:U,indent:X>0?" ".repeat(X):"",inFlow:Q,options:{blockQuote:!0,lineWidth:-1}}),Y=Z.end??[{type:"newline",offset:-1,indent:X,source:`
107
- `}];switch(H[0]){case"|":case">":{let G=H.indexOf(`
108
- `),_=H.substring(0,G),q=H.substring(G+1)+`
109
- `,B=[{type:"block-scalar-header",offset:J,indent:X,source:_}];if(!$9(B,Y))B.push({type:"newline",offset:-1,indent:X,source:`
110
- `});return{type:"block-scalar",offset:J,indent:X,props:B,source:q}}case'"':return{type:"double-quoted-scalar",offset:J,indent:X,source:H,end:Y};case"'":return{type:"single-quoted-scalar",offset:J,indent:X,source:H,end:Y};default:return{type:"scalar",offset:J,indent:X,source:H,end:Y}}}function zJ($,Z,U={}){let{afterKey:X=!1,implicitKey:Q=!1,inFlow:J=!1,type:z}=U,H="indent"in $?$.indent:null;if(X&&typeof H==="number")H+=2;if(!z)switch($.type){case"single-quoted-scalar":z="QUOTE_SINGLE";break;case"double-quoted-scalar":z="QUOTE_DOUBLE";break;case"block-scalar":{let G=$.props[0];if(G.type!=="block-scalar-header")throw Error("Invalid block scalar header");z=G.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:z="PLAIN"}let Y=e8.stringifyString({type:z,value:Z},{implicitKey:Q||H===null,indent:H!==null&&H>0?" ".repeat(H):"",inFlow:J,options:{blockQuote:!0,lineWidth:-1}});switch(Y[0]){case"|":case">":HJ($,Y);break;case'"':j2($,Y,"double-quoted-scalar");break;case"'":j2($,Y,"single-quoted-scalar");break;default:j2($,Y,"scalar")}}function HJ($,Z){let U=Z.indexOf(`
102
+ `)+(z.substring(1)||" "),U=!0,X=!1;break;case"%":if($[Q+1]?.[0]!=="#")Q+=1;U=!1;break;default:if(!U)X=!0;U=!1}}return{comment:Z,afterEmptyLine:X}}class J6{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,U,X,Q)=>{let z=R1(Z);if(Q)this.warnings.push(new L1.YAMLWarning(z,U,X));else this.errors.push(new L1.YAMLParseError(z,U,X))},this.directives=new qz.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:U,afterEmptyLine:X}=z6(this.prelude);if(U){let Q=$.contents;if(Z)$.comment=$.comment?`${$.comment}
103
+ ${U}`:U;else if(X||$.directives.docStart||!Q)$.commentBefore=U;else if(Q6.isCollection(Q)&&!Q.flow&&Q.items.length>0){let z=Q.items[0];if(Q6.isPair(z))z=z.key;let J=z.commentBefore;z.commentBefore=J?`${U}
104
+ ${J}`:U}else{let z=Q.commentBefore;Q.commentBefore=z?`${U}
105
+ ${z}`:U}}if(Z)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:z6(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,U=-1){for(let X of $)yield*this.next(X);yield*this.end(Z,U)}*next($){if(Hz.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,U,X)=>{let Q=R1($);Q[0]+=Z,this.onError(Q,"BAD_DIRECTIVE",U,X)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=Gz.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Z.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Z,!1),this.doc)yield this.doc;this.doc=Z,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Z=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new L1.YAMLParseError(R1($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new L1.YAMLParseError(R1($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=_z.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
106
+ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new L1.YAMLParseError(R1($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,Z=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),X=new Yz.Document(void 0,U);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");X.range=[0,Z,Z],this.decorate(X,!1),yield X}}}Bz.Composer=J6});var Y6=R((Kz)=>{var Oz=j2(),Wz=x2(),Dz=D1(),H6=Q1();function Iz($,Z=!0,U){if($){let X=(Q,z,J)=>{let H=typeof Q==="number"?Q:Array.isArray(Q)?Q[0]:Q.offset;if(U)U(H,z,J);else throw new Dz.YAMLParseError([H,H+1],z,J)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Wz.resolveFlowScalar($,Z,X);case"block-scalar":return Oz.resolveBlockScalar({options:{strict:Z}},$,X)}}return null}function Lz($,Z){let{implicitKey:U=!1,indent:X,inFlow:Q=!1,offset:z=-1,type:J="PLAIN"}=Z,H=H6.stringifyString({type:J,value:$},{implicitKey:U,indent:X>0?" ".repeat(X):"",inFlow:Q,options:{blockQuote:!0,lineWidth:-1}}),q=Z.end??[{type:"newline",offset:-1,indent:X,source:`
107
+ `}];switch(H[0]){case"|":case">":{let Y=H.indexOf(`
108
+ `),G=H.substring(0,Y),_=H.substring(Y+1)+`
109
+ `,B=[{type:"block-scalar-header",offset:z,indent:X,source:G}];if(!q6(B,q))B.push({type:"newline",offset:-1,indent:X,source:`
110
+ `});return{type:"block-scalar",offset:z,indent:X,props:B,source:_}}case'"':return{type:"double-quoted-scalar",offset:z,indent:X,source:H,end:q};case"'":return{type:"single-quoted-scalar",offset:z,indent:X,source:H,end:q};default:return{type:"scalar",offset:z,indent:X,source:H,end:q}}}function Rz($,Z,U={}){let{afterKey:X=!1,implicitKey:Q=!1,inFlow:z=!1,type:J}=U,H="indent"in $?$.indent:null;if(X&&typeof H==="number")H+=2;if(!J)switch($.type){case"single-quoted-scalar":J="QUOTE_SINGLE";break;case"double-quoted-scalar":J="QUOTE_DOUBLE";break;case"block-scalar":{let Y=$.props[0];if(Y.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=Y.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let q=H6.stringifyString({type:J,value:Z},{implicitKey:Q||H===null,indent:H!==null&&H>0?" ".repeat(H):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}});switch(q[0]){case"|":case">":Mz($,q);break;case'"':f2($,q,"double-quoted-scalar");break;case"'":f2($,q,"single-quoted-scalar");break;default:f2($,q,"scalar")}}function Mz($,Z){let U=Z.indexOf(`
111
111
  `),X=Z.substring(0,U),Q=Z.substring(U+1)+`
112
- `;if($.type==="block-scalar"){let J=$.props[0];if(J.type!=="block-scalar-header")throw Error("Invalid block scalar header");J.source=X,$.source=Q}else{let{offset:J}=$,z="indent"in $?$.indent:-1,H=[{type:"block-scalar-header",offset:J,indent:z,source:X}];if(!$9(H,"end"in $?$.end:void 0))H.push({type:"newline",offset:-1,indent:z,source:`
113
- `});for(let Y of Object.keys($))if(Y!=="type"&&Y!=="offset")delete $[Y];Object.assign($,{type:"block-scalar",indent:z,props:H,source:Q})}}function $9($,Z){if(Z)for(let U of Z)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function j2($,Z,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=Z;break;case"block-scalar":{let X=$.props.slice(1),Q=Z.length;if($.props[0].type==="block-scalar-header")Q-=$.props[0].source.length;for(let J of X)J.offset+=Q;delete $.props,Object.assign($,{type:U,source:Z,end:X});break}case"block-map":case"block-seq":{let Q={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
114
- `};delete $.items,Object.assign($,{type:U,source:Z,end:[Q]});break}default:{let X="indent"in $?$.indent:-1,Q="end"in $&&Array.isArray($.end)?$.end.filter((J)=>J.type==="space"||J.type==="comment"||J.type==="newline"):[];for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:U,indent:X,source:Z,end:Q})}}}GJ.createScalarToken=JJ;GJ.resolveAsScalar=QJ;GJ.setScalarValue=zJ});var U9=D((VJ)=>{var BJ=($)=>("type"in $)?G$($):H$($);function G$($){switch($.type){case"block-scalar":{let Z="";for(let U of $.props)Z+=G$(U);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let U of $.items)Z+=H$(U);return Z}case"flow-collection":{let Z=$.start.source;for(let U of $.items)Z+=H$(U);for(let U of $.end)Z+=U.source;return Z}case"document":{let Z=H$($);if($.end)for(let U of $.end)Z+=U.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let U of $.end)Z+=U.source;return Z}}}function H$({start:$,key:Z,sep:U,value:X}){let Q="";for(let J of $)Q+=J.source;if(Z)Q+=G$(Z);if(U)for(let J of U)Q+=J.source;if(X)Q+=G$(X);return Q}VJ.stringify=BJ});var J9=D((IJ)=>{var S2=Symbol("break visit"),WJ=Symbol("skip children"),X9=Symbol("remove item");function L0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};Q9(Object.freeze([]),$,Z)}L0.BREAK=S2;L0.SKIP=WJ;L0.REMOVE=X9;L0.itemAtPath=($,Z)=>{let U=$;for(let[X,Q]of Z){let J=U?.[X];if(J&&"items"in J)U=J.items[Q];else return}return U};L0.parentCollection=($,Z)=>{let U=L0.itemAtPath($,Z.slice(0,-1)),X=Z[Z.length-1][0],Q=U?.[X];if(Q&&"items"in Q)return Q;throw Error("Parent collection not found")};function Q9($,Z,U){let X=U(Z,$);if(typeof X==="symbol")return X;for(let Q of["key","value"]){let J=Z[Q];if(J&&"items"in J){for(let z=0;z<J.items.length;++z){let H=Q9(Object.freeze($.concat([[Q,z]])),J.items[z],U);if(typeof H==="number")z=H-1;else if(H===S2)return S2;else if(H===X9)J.items.splice(z,1),z-=1}if(typeof X==="function"&&Q==="key")X=X(Z,$)}}return typeof X==="function"?X(Z,$):X}IJ.visit=L0});var Y$=D((AJ)=>{var E2=Z9(),DJ=U9(),RJ=J9(),g2="\uFEFF",y2="\x02",h2="\x18",x2="\x1F",MJ=($)=>!!$&&("items"in $),KJ=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function PJ($){switch($){case g2:return"<BOM>";case y2:return"<DOC>";case h2:return"<FLOW_END>";case x2:return"<SCALAR>";default:return JSON.stringify($)}}function TJ($){switch($){case g2:return"byte-order-mark";case y2:return"doc-mode";case h2:return"flow-error-end";case x2:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
112
+ `;if($.type==="block-scalar"){let z=$.props[0];if(z.type!=="block-scalar-header")throw Error("Invalid block scalar header");z.source=X,$.source=Q}else{let{offset:z}=$,J="indent"in $?$.indent:-1,H=[{type:"block-scalar-header",offset:z,indent:J,source:X}];if(!q6(H,"end"in $?$.end:void 0))H.push({type:"newline",offset:-1,indent:J,source:`
113
+ `});for(let q of Object.keys($))if(q!=="type"&&q!=="offset")delete $[q];Object.assign($,{type:"block-scalar",indent:J,props:H,source:Q})}}function q6($,Z){if(Z)for(let U of Z)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function f2($,Z,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=Z;break;case"block-scalar":{let X=$.props.slice(1),Q=Z.length;if($.props[0].type==="block-scalar-header")Q-=$.props[0].source.length;for(let z of X)z.offset+=Q;delete $.props,Object.assign($,{type:U,source:Z,end:X});break}case"block-map":case"block-seq":{let Q={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
114
+ `};delete $.items,Object.assign($,{type:U,source:Z,end:[Q]});break}default:{let X="indent"in $?$.indent:-1,Q="end"in $&&Array.isArray($.end)?$.end.filter((z)=>z.type==="space"||z.type==="comment"||z.type==="newline"):[];for(let z of Object.keys($))if(z!=="type"&&z!=="offset")delete $[z];Object.assign($,{type:U,indent:X,source:Z,end:Q})}}}Kz.createScalarToken=Lz;Kz.resolveAsScalar=Iz;Kz.setScalarValue=Rz});var G6=R((Nz)=>{var Tz=($)=>("type"in $)?W$($):O$($);function W$($){switch($.type){case"block-scalar":{let Z="";for(let U of $.props)Z+=W$(U);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let U of $.items)Z+=O$(U);return Z}case"flow-collection":{let Z=$.start.source;for(let U of $.items)Z+=O$(U);for(let U of $.end)Z+=U.source;return Z}case"document":{let Z=O$($);if($.end)for(let U of $.end)Z+=U.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let U of $.end)Z+=U.source;return Z}}}function O$({start:$,key:Z,sep:U,value:X}){let Q="";for(let z of $)Q+=z.source;if(Z)Q+=W$(Z);if(U)for(let z of U)Q+=z.source;if(X)Q+=W$(X);return Q}Nz.stringify=Tz});var V6=R((bz)=>{var u2=Symbol("break visit"),Cz=Symbol("skip children"),_6=Symbol("remove item");function M0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};B6(Object.freeze([]),$,Z)}M0.BREAK=u2;M0.SKIP=Cz;M0.REMOVE=_6;M0.itemAtPath=($,Z)=>{let U=$;for(let[X,Q]of Z){let z=U?.[X];if(z&&"items"in z)U=z.items[Q];else return}return U};M0.parentCollection=($,Z)=>{let U=M0.itemAtPath($,Z.slice(0,-1)),X=Z[Z.length-1][0],Q=U?.[X];if(Q&&"items"in Q)return Q;throw Error("Parent collection not found")};function B6($,Z,U){let X=U(Z,$);if(typeof X==="symbol")return X;for(let Q of["key","value"]){let z=Z[Q];if(z&&"items"in z){for(let J=0;J<z.items.length;++J){let H=B6(Object.freeze($.concat([[Q,J]])),z.items[J],U);if(typeof H==="number")J=H-1;else if(H===u2)return u2;else if(H===_6)z.items.splice(J,1),J-=1}if(typeof X==="function"&&Q==="key")X=X(Z,$)}}return typeof X==="function"?X(Z,$):X}bz.visit=M0});var D$=R((fz)=>{var k2=Y6(),Ez=G6(),jz=V6(),v2="\uFEFF",m2="\x02",p2="\x18",l2="\x1F",gz=($)=>!!$&&("items"in $),xz=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function hz($){switch($){case v2:return"<BOM>";case m2:return"<DOC>";case p2:return"<FLOW_END>";case l2:return"<SCALAR>";default:return JSON.stringify($)}}function yz($){switch($){case v2:return"byte-order-mark";case m2:return"doc-mode";case p2:return"flow-error-end";case l2: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($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}AJ.createScalarToken=E2.createScalarToken;AJ.resolveAsScalar=E2.resolveAsScalar;AJ.setScalarValue=E2.setScalarValue;AJ.stringify=DJ.stringify;AJ.visit=RJ.visit;AJ.BOM=g2;AJ.DOCUMENT=y2;AJ.FLOW_END=h2;AJ.SCALAR=x2;AJ.isCollection=MJ;AJ.isScalar=KJ;AJ.prettyToken=PJ;AJ.tokenType=TJ});var u2=D((vJ)=>{var I1=Y$();function p($){switch($){case void 0:case" ":case`
117
- `:case"\r":case"\t":return!0;default:return!1}}var z9=new Set("0123456789ABCDEFabcdef"),uJ=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),q$=new Set(",[]{}"),kJ=new Set(` ,[]{}
118
- \r `),f2=($)=>!$||kJ.has($);class H9{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($,Z=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!Z;let U=this.next??"stream";while(U&&(Z||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
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($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}fz.createScalarToken=k2.createScalarToken;fz.resolveAsScalar=k2.resolveAsScalar;fz.setScalarValue=k2.setScalarValue;fz.stringify=Ez.stringify;fz.visit=jz.visit;fz.BOM=v2;fz.DOCUMENT=m2;fz.FLOW_END=p2;fz.SCALAR=l2;fz.isCollection=gz;fz.isScalar=xz;fz.prettyToken=hz;fz.tokenType=yz});var c2=R((ez)=>{var M1=D$();function c($){switch($){case void 0:case" ":case`
117
+ `:case"\r":case"\t":return!0;default:return!1}}var O6=new Set("0123456789ABCDEFabcdef"),oz=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),I$=new Set(",[]{}"),tz=new Set(` ,[]{}
118
+ \r `),d2=($)=>!$||tz.has($);class W6{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($,Z=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!Z;let U=this.next??"stream";while(U&&(Z||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
119
119
  `)return!0;if(Z==="\r")return this.buffer[$+1]===`
120
120
  `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let Z=this.buffer[$];if(this.indentNext>0){let U=0;while(Z===" ")Z=this.buffer[++U+$];if(Z==="\r"){let X=this.buffer[U+$+1];if(X===`
121
121
  `||!X&&!this.atEnd)return $+U+1}return Z===`
122
- `||U>=this.indentNext||!Z&&!this.atEnd?$+U:-1}if(Z==="-"||Z==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&p(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
123
- `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){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 $=this.getLine();if($===null)return this.setNext("stream");if($[0]===I1.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let Z=$.length,U=$.indexOf("#");while(U!==-1){let Q=$[U-1];if(Q===" "||Q==="\t"){Z=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let Q=$[Z-1];if(Q===" "||Q==="\t")Z-=1;else break}let X=(yield*this.pushCount(Z))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-X),this.pushNewline(),"stream"}if(this.atLineEnd()){let Z=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-Z),yield*this.pushNewline(),"stream"}return yield I1.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let Z=this.peek(3);if((Z==="---"||Z==="...")&&p(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,Z==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!p(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,Z]=this.peek(2);if(!Z&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&p(Z)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let Z=yield*this.pushIndicators();switch($[Z]){case"#":yield*this.pushCount($.length-Z);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(f2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return Z+=yield*this.parseBlockScalarHeader(),Z+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-Z),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,Z,U=-1;do{if($=yield*this.pushNewline(),$>0)Z=yield*this.pushSpaces(!1),this.indentValue=U=Z;else Z=0;Z+=yield*this.pushSpaces(!0)}while($+Z>0);let X=this.getLine();if(X===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&X[0]!=="#"||U===0&&(X.startsWith("---")||X.startsWith("..."))&&p(X[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(X[0]==="]"||X[0]==="}")))return this.flowLevel=0,yield I1.FLOW_END,yield*this.parseLineStart()}let Q=0;while(X[Q]===",")Q+=yield*this.pushCount(1),Q+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(Q+=yield*this.pushIndicators(),X[Q]){case void 0:return"flow";case"#":return yield*this.pushCount(X.length-Q),"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(f2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let J=this.charAt(1);if(this.flowKey||p(J)||J===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),Z=this.buffer.indexOf($,this.pos+1);if($==="'")while(Z!==-1&&this.buffer[Z+1]==="'")Z=this.buffer.indexOf("'",Z+2);else while(Z!==-1){let Q=0;while(this.buffer[Z-1-Q]==="\\")Q+=1;if(Q%2===0)break;Z=this.buffer.indexOf('"',Z+1)}let U=this.buffer.substring(0,Z),X=U.indexOf(`
122
+ `||U>=this.indentNext||!Z&&!this.atEnd?$+U:-1}if(Z==="-"||Z==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&c(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
123
+ `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){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 $=this.getLine();if($===null)return this.setNext("stream");if($[0]===M1.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let Z=$.length,U=$.indexOf("#");while(U!==-1){let Q=$[U-1];if(Q===" "||Q==="\t"){Z=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let Q=$[Z-1];if(Q===" "||Q==="\t")Z-=1;else break}let X=(yield*this.pushCount(Z))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-X),this.pushNewline(),"stream"}if(this.atLineEnd()){let Z=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-Z),yield*this.pushNewline(),"stream"}return yield M1.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let Z=this.peek(3);if((Z==="---"||Z==="...")&&c(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,Z==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!c(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,Z]=this.peek(2);if(!Z&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&c(Z)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let Z=yield*this.pushIndicators();switch($[Z]){case"#":yield*this.pushCount($.length-Z);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(d2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return Z+=yield*this.parseBlockScalarHeader(),Z+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-Z),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,Z,U=-1;do{if($=yield*this.pushNewline(),$>0)Z=yield*this.pushSpaces(!1),this.indentValue=U=Z;else Z=0;Z+=yield*this.pushSpaces(!0)}while($+Z>0);let X=this.getLine();if(X===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&X[0]!=="#"||U===0&&(X.startsWith("---")||X.startsWith("..."))&&c(X[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(X[0]==="]"||X[0]==="}")))return this.flowLevel=0,yield M1.FLOW_END,yield*this.parseLineStart()}let Q=0;while(X[Q]===",")Q+=yield*this.pushCount(1),Q+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(Q+=yield*this.pushIndicators(),X[Q]){case void 0:return"flow";case"#":return yield*this.pushCount(X.length-Q),"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(d2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let z=this.charAt(1);if(this.flowKey||c(z)||z===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),Z=this.buffer.indexOf($,this.pos+1);if($==="'")while(Z!==-1&&this.buffer[Z+1]==="'")Z=this.buffer.indexOf("'",Z+2);else while(Z!==-1){let Q=0;while(this.buffer[Z-1-Q]==="\\")Q+=1;if(Q%2===0)break;Z=this.buffer.indexOf('"',Z+1)}let U=this.buffer.substring(0,Z),X=U.indexOf(`
124
124
  `,this.pos);if(X!==-1){while(X!==-1){let Q=this.continueScalar(X+1);if(Q===-1)break;X=U.indexOf(`
125
- `,Q)}if(X!==-1)Z=X-(U[X-1]==="\r"?2:1)}if(Z===-1){if(!this.atEnd)return this.setNext("quoted-scalar");Z=this.buffer.length}return yield*this.pushToIndex(Z+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let Z=this.buffer[++$];if(Z==="+")this.blockScalarKeep=!0;else if(Z>"0"&&Z<="9")this.blockScalarIndent=Number(Z)-1;else if(Z!=="-")break}return yield*this.pushUntil((Z)=>p(Z)||Z==="#")}*parseBlockScalar(){let $=this.pos-1,Z=0,U;$:for(let Q=this.pos;U=this.buffer[Q];++Q)switch(U){case" ":Z+=1;break;case`
126
- `:$=Q,Z=0;break;case"\r":{let J=this.buffer[Q+1];if(!J&&!this.atEnd)return this.setNext("block-scalar");if(J===`
125
+ `,Q)}if(X!==-1)Z=X-(U[X-1]==="\r"?2:1)}if(Z===-1){if(!this.atEnd)return this.setNext("quoted-scalar");Z=this.buffer.length}return yield*this.pushToIndex(Z+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let Z=this.buffer[++$];if(Z==="+")this.blockScalarKeep=!0;else if(Z>"0"&&Z<="9")this.blockScalarIndent=Number(Z)-1;else if(Z!=="-")break}return yield*this.pushUntil((Z)=>c(Z)||Z==="#")}*parseBlockScalar(){let $=this.pos-1,Z=0,U;$:for(let Q=this.pos;U=this.buffer[Q];++Q)switch(U){case" ":Z+=1;break;case`
126
+ `:$=Q,Z=0;break;case"\r":{let z=this.buffer[Q+1];if(!z&&!this.atEnd)return this.setNext("block-scalar");if(z===`
127
127
  `)break}default:break $}if(!U&&!this.atEnd)return this.setNext("block-scalar");if(Z>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=Z;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let Q=this.continueScalar($+1);if(Q===-1)break;$=this.buffer.indexOf(`
128
128
  `,Q)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let X=$+1;U=this.buffer[X];while(U===" ")U=this.buffer[++X];if(U==="\t"){while(U==="\t"||U===" "||U==="\r"||U===`
129
- `)U=this.buffer[++X];$=X-1}else if(!this.blockScalarKeep)do{let Q=$-1,J=this.buffer[Q];if(J==="\r")J=this.buffer[--Q];let z=Q;while(J===" ")J=this.buffer[--Q];if(J===`
130
- `&&Q>=this.pos&&Q+1+Z>z)$=Q;else break}while(!0);return yield I1.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,U=this.pos-1,X;while(X=this.buffer[++U])if(X===":"){let Q=this.buffer[U+1];if(p(Q)||$&&q$.has(Q))break;Z=U}else if(p(X)){let Q=this.buffer[U+1];if(X==="\r")if(Q===`
129
+ `)U=this.buffer[++X];$=X-1}else if(!this.blockScalarKeep)do{let Q=$-1,z=this.buffer[Q];if(z==="\r")z=this.buffer[--Q];let J=Q;while(z===" ")z=this.buffer[--Q];if(z===`
130
+ `&&Q>=this.pos&&Q+1+Z>J)$=Q;else break}while(!0);return yield M1.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,U=this.pos-1,X;while(X=this.buffer[++U])if(X===":"){let Q=this.buffer[U+1];if(c(Q)||$&&I$.has(Q))break;Z=U}else if(c(X)){let Q=this.buffer[U+1];if(X==="\r")if(Q===`
131
131
  `)U+=1,X=`
132
- `,Q=this.buffer[U+1];else Z=U;if(Q==="#"||$&&q$.has(Q))break;if(X===`
133
- `){let J=this.continueScalar(U+1);if(J===-1)break;U=Math.max(U,J-2)}}else{if($&&q$.has(X))break;Z=U}if(!X&&!this.atEnd)return this.setNext("plain-scalar");return yield I1.SCALAR,yield*this.pushToIndex(Z+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,Z){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(Z)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(f2))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,Z=this.charAt(1);if(p(Z)||$&&q$.has(Z)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,Z=this.buffer[$];while(!p(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(uJ.has(Z))Z=this.buffer[++$];else if(Z==="%"&&z9.has(this.buffer[$+1])&&z9.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
132
+ `,Q=this.buffer[U+1];else Z=U;if(Q==="#"||$&&I$.has(Q))break;if(X===`
133
+ `){let z=this.continueScalar(U+1);if(z===-1)break;U=Math.max(U,z-2)}}else{if($&&I$.has(X))break;Z=U}if(!X&&!this.atEnd)return this.setNext("plain-scalar");return yield M1.SCALAR,yield*this.pushToIndex(Z+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,Z){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(Z)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(d2))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,Z=this.charAt(1);if(c(Z)||$&&I$.has(Z)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,Z=this.buffer[$];while(!c(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(oz.has(Z))Z=this.buffer[++$];else if(Z==="%"&&O6.has(this.buffer[$+1])&&O6.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
134
134
  `)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
135
- `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,U;do U=this.buffer[++Z];while(U===" "||$&&U==="\t");let X=Z-this.pos;if(X>0)yield this.buffer.substr(this.pos,X),this.pos=Z;return X}*pushUntil($){let Z=this.pos,U=this.buffer[Z];while(!$(U))U=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}vJ.Lexer=H9});var k2=D((lJ)=>{class G9{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,U=this.lineStarts.length;while(Z<U){let Q=Z+U>>1;if(this.lineStarts[Q]<$)Z=Q+1;else U=Q}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let X=this.lineStarts[Z-1];return{line:Z,col:$-X+1}}}}lJ.LineCounter=G9});var v2=D((iJ)=>{var dJ=p0("process"),Y9=Y$(),cJ=u2();function H0($,Z){for(let U=0;U<$.length;++U)if($[U].type===Z)return!0;return!1}function q9($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function B9($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _$($){switch($.type){case"document":return $.start;case"block-map":{let Z=$.items[$.items.length-1];return Z.sep??Z.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function h0($){if($.length===0)return[];let Z=$.length;$:while(--Z>=0)switch($[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++Z]?.type==="space");return $.splice(Z,$.length)}function _9($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!H0(Z.start,"explicit-key-ind")&&!H0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,B9(Z.value))if(Z.value.end)Array.prototype.push.apply(Z.value.end,Z.sep);else Z.value.end=Z.sep;else Array.prototype.push.apply(Z.start,Z.sep);delete Z.sep}}}class V9{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new cJ.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,Z))yield*this.next(U);if(!Z)yield*this.end()}*next($){if(this.source=$,dJ.env.LOG_TOKENS)console.log("|",Y9.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=Y9.tokenType($);if(!Z){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Z=$??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let U=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in U?U.indent:0;else if(Z.type==="flow-collection"&&U.type==="document")Z.indent=0;if(Z.type==="flow-collection")_9(Z);switch(U.type){case"document":U.value=Z;break;case"block-scalar":U.props.push(Z);break;case"block-map":{let X=U.items[U.items.length-1];if(X.value){U.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(X.sep)X.value=Z;else{Object.assign(X,{key:Z,sep:[]}),this.onKeyLine=!X.explicitKey;return}break}case"block-seq":{let X=U.items[U.items.length-1];if(X.value)U.items.push({start:[],value:Z});else X.value=Z;break}case"flow-collection":{let X=U.items[U.items.length-1];if(!X||X.value)U.items.push({start:[],key:Z,sep:[]});else if(X.sep)X.value=Z;else Object.assign(X,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let X=Z.items[Z.items.length-1];if(X&&!X.sep&&!X.value&&X.start.length>0&&q9(X.start)===-1&&(Z.indent===0||X.start.every((Q)=>Q.type!=="comment"||Q.indent<Z.indent))){if(U.type==="document")U.end=X.start;else U.items.push({start:X.start});Z.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 $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(q9($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Z=_$(this.peek(2)),U=h0(Z),X;if($.end)X=$.end,X.push(this.sourceToken),delete $.end;else X=[this.sourceToken];let Q={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=Q}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
135
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,U;do U=this.buffer[++Z];while(U===" "||$&&U==="\t");let X=Z-this.pos;if(X>0)yield this.buffer.substr(this.pos,X),this.pos=Z;return X}*pushUntil($){let Z=this.pos,U=this.buffer[Z];while(!$(U))U=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}ez.Lexer=W6});var i2=R((ZJ)=>{class D6{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,U=this.lineStarts.length;while(Z<U){let Q=Z+U>>1;if(this.lineStarts[Q]<$)Z=Q+1;else U=Q}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let X=this.lineStarts[Z-1];return{line:Z,col:$-X+1}}}}ZJ.LineCounter=D6});var r2=R((zJ)=>{var XJ=r0("process"),I6=D$(),QJ=c2();function G0($,Z){for(let U=0;U<$.length;++U)if($[U].type===Z)return!0;return!1}function L6($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function M6($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function L$($){switch($.type){case"document":return $.start;case"block-map":{let Z=$.items[$.items.length-1];return Z.sep??Z.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function k0($){if($.length===0)return[];let Z=$.length;$:while(--Z>=0)switch($[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++Z]?.type==="space");return $.splice(Z,$.length)}function R6($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!G0(Z.start,"explicit-key-ind")&&!G0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,M6(Z.value))if(Z.value.end)Array.prototype.push.apply(Z.value.end,Z.sep);else Z.value.end=Z.sep;else Array.prototype.push.apply(Z.start,Z.sep);delete Z.sep}}}class K6{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new QJ.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,Z))yield*this.next(U);if(!Z)yield*this.end()}*next($){if(this.source=$,XJ.env.LOG_TOKENS)console.log("|",I6.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=I6.tokenType($);if(!Z){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Z=$??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let U=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in U?U.indent:0;else if(Z.type==="flow-collection"&&U.type==="document")Z.indent=0;if(Z.type==="flow-collection")R6(Z);switch(U.type){case"document":U.value=Z;break;case"block-scalar":U.props.push(Z);break;case"block-map":{let X=U.items[U.items.length-1];if(X.value){U.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(X.sep)X.value=Z;else{Object.assign(X,{key:Z,sep:[]}),this.onKeyLine=!X.explicitKey;return}break}case"block-seq":{let X=U.items[U.items.length-1];if(X.value)U.items.push({start:[],value:Z});else X.value=Z;break}case"flow-collection":{let X=U.items[U.items.length-1];if(!X||X.value)U.items.push({start:[],key:Z,sep:[]});else if(X.sep)X.value=Z;else Object.assign(X,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let X=Z.items[Z.items.length-1];if(X&&!X.sep&&!X.value&&X.start.length>0&&L6(X.start)===-1&&(Z.indent===0||X.start.every((Q)=>Q.type!=="comment"||Q.indent<Z.indent))){if(U.type==="document")U.end=X.start;else U.items.push({start:X.start});Z.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 $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(L6($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Z=L$(this.peek(2)),U=k0(Z),X;if($.end)X=$.end,X.push(this.sourceToken),delete $.end;else X=[this.sourceToken];let Q={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=Q}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
136
136
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
137
- `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let U="end"in Z.value?Z.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,X=U&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",Q=[];if(X&&Z.sep&&!Z.value){let J=[];for(let z=0;z<Z.sep.length;++z){let H=Z.sep[z];switch(H.type){case"newline":J.push(z);break;case"space":break;case"comment":if(H.indent>$.indent)J.length=0;break;default:J.length=0}}if(J.length>=2)Q=Z.sep.splice(J[1])}switch(this.type){case"anchor":case"tag":if(X||Z.value)Q.push(this.sourceToken),$.items.push({start:Q}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(X||Z.value)Q.push(this.sourceToken),$.items.push({start:Q,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(H0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let J=h0(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(H0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]});else if(B9(Z.key)&&!H0(Z.sep,"newline")){let J=h0(Z.start),z=Z.key,H=Z.sep;H.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:z,sep:H}]})}else if(Q.length>0)Z.sep=Z.sep.concat(Q,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||X)$.items.push({start:Q,key:null,sep:[this.sourceToken]});else if(H0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let J=this.flowScalar(this.type);if(X||Z.value)$.items.push({start:Q,key:J,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(J);else Object.assign(Z,{key:J,sep:[]}),this.onKeyLine=!0;return}default:{let J=this.startBlockValue($);if(J){if(J.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!H0(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(U)$.items.push({start:Q});this.stack.push(J);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let U="end"in Z.value?Z.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=$.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Z.value||H0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:X,sep:[]});else if(Z.sep)this.stack.push(X);else Object.assign(Z,{key:X,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let X=_$(U),Q=h0(X);_9($);let J=$.end.splice(1,$.end.length);J.push(this.sourceToken);let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:Q,key:$,sep:J}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
137
+ `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let U="end"in Z.value?Z.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,X=U&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",Q=[];if(X&&Z.sep&&!Z.value){let z=[];for(let J=0;J<Z.sep.length;++J){let H=Z.sep[J];switch(H.type){case"newline":z.push(J);break;case"space":break;case"comment":if(H.indent>$.indent)z.length=0;break;default:z.length=0}}if(z.length>=2)Q=Z.sep.splice(z[1])}switch(this.type){case"anchor":case"tag":if(X||Z.value)Q.push(this.sourceToken),$.items.push({start:Q}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(X||Z.value)Q.push(this.sourceToken),$.items.push({start:Q,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(G0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let z=k0(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(G0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]});else if(M6(Z.key)&&!G0(Z.sep,"newline")){let z=k0(Z.start),J=Z.key,H=Z.sep;H.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:J,sep:H}]})}else if(Q.length>0)Z.sep=Z.sep.concat(Q,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||X)$.items.push({start:Q,key:null,sep:[this.sourceToken]});else if(G0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let z=this.flowScalar(this.type);if(X||Z.value)$.items.push({start:Q,key:z,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(z);else Object.assign(Z,{key:z,sep:[]}),this.onKeyLine=!0;return}default:{let z=this.startBlockValue($);if(z){if(z.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!G0(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(U)$.items.push({start:Q});this.stack.push(z);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let U="end"in Z.value?Z.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=$.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Z.value||G0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:X,sep:[]});else if(Z.sep)this.stack.push(X);else Object.assign(Z,{key:X,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let X=L$(U),Q=k0(X);R6($);let z=$.end.splice(1,$.end.length);z.push(this.sourceToken);let J={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:Q,key:$,sep:z}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=J}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
138
138
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
139
- `,Z)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 Z=_$($),U=h0(Z);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=_$($),U=h0(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}iJ.Parser=V9});var D9=D((Zz)=>{var O9=C2(),aJ=_1(),L1=B1(),rJ=k$(),nJ=w(),oJ=k2(),W9=v2();function I9($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new oJ.LineCounter||null,prettyErrors:Z}}function tJ($,Z={}){let{lineCounter:U,prettyErrors:X}=I9(Z),Q=new W9.Parser(U?.addNewLine),J=new O9.Composer(Z),z=Array.from(J.compose(Q.parse($)));if(X&&U)for(let H of z)H.errors.forEach(L1.prettifyError($,U)),H.warnings.forEach(L1.prettifyError($,U));if(z.length>0)return z;return Object.assign([],{empty:!0},J.streamInfo())}function L9($,Z={}){let{lineCounter:U,prettyErrors:X}=I9(Z),Q=new W9.Parser(U?.addNewLine),J=new O9.Composer(Z),z=null;for(let H of J.compose(Q.parse($),!0,$.length))if(!z)z=H;else if(z.options.logLevel!=="silent"){z.errors.push(new L1.YAMLParseError(H.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(X&&U)z.errors.forEach(L1.prettifyError($,U)),z.warnings.forEach(L1.prettifyError($,U));return z}function eJ($,Z,U){let X=void 0;if(typeof Z==="function")X=Z;else if(U===void 0&&Z&&typeof Z==="object")U=Z;let Q=L9($,U);if(!Q)return null;if(Q.warnings.forEach((J)=>rJ.warn(Q.options.logLevel,J)),Q.errors.length>0)if(Q.options.logLevel!=="silent")throw Q.errors[0];else Q.errors=[];return Q.toJS(Object.assign({reviver:X},U))}function $z($,Z,U){let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(U===void 0&&Z)U=Z;if(typeof U==="string")U=U.length;if(typeof U==="number"){let Q=Math.round(U);U=Q<1?void 0:Q>8?{indent:8}:{indent:Q}}if($===void 0){let{keepUndefined:Q}=U??Z??{};if(!Q)return}if(nJ.isDocument($)&&!X)return $.toString(U);return new aJ.Document($,X,U).toString(U)}Zz.parse=eJ;Zz.parseAllDocuments=tJ;Zz.parseDocument=L9;Zz.stringify=$z});var x=[{index:1,path:"project.name",label:"Name",description:"Project name",category:"project"},{index:2,path:"project.goal",label:"Goal",description:"Goal (use case)",category:"project"},{index:3,path:"project.main_language",label:"Language",description:"Primary language",category:"project"},{index:4,path:"human_context.who",label:"Who",description:"Who is this for?",category:"human"},{index:5,path:"human_context.what",label:"What",description:"What are they building",category:"human"},{index:6,path:"human_context.why",label:"Why",description:"Why does it exist",category:"human"},{index:7,path:"human_context.where",label:"Where",description:"Where does it run",category:"human"},{index:8,path:"human_context.when",label:"When",description:"When was it started / timeline",category:"human"},{index:9,path:"human_context.how",label:"How",description:"How is it built",category:"human"},{index:10,path:"stack.frontend",canonical:"stack.framework",label:"Framework",description:"Framework (React, Svelte, etc.)",category:"frontend"},{index:11,path:"stack.css_framework",canonical:"stack.css",label:"CSS",description:"CSS framework",category:"frontend"},{index:12,path:"stack.ui_library",label:"UI Library",description:"UI component library",category:"frontend"},{index:13,path:"stack.state_management",canonical:"stack.state",label:"State",description:"State management",category:"frontend"},{index:14,path:"stack.backend",label:"Backend",description:"Backend framework",category:"backend"},{index:15,path:"stack.api_type",canonical:"stack.api",label:"API",description:"API style (REST, GraphQL, etc.)",category:"backend"},{index:16,path:"stack.runtime",label:"Runtime",description:"Runtime (Node, Bun, Python, etc.)",category:"backend"},{index:17,path:"stack.database",canonical:"stack.db",label:"Database",description:"Database",category:"backend"},{index:18,path:"stack.connection",label:"Connection",description:"Connection method (Prisma, etc.)",category:"backend"},{index:19,path:"stack.hosting",label:"Hosting",description:"Hosting platform",category:"universal"},{index:20,path:"stack.build",label:"Build",description:"Build tool",category:"universal"},{index:21,path:"stack.cicd",label:"CI/CD",description:"CI/CD",category:"universal"},{index:22,path:"stack.monorepo_tool",label:"Monorepo",description:"Monorepo tool",category:"enterprise_infra"},{index:23,path:"stack.package_manager",canonical:"stack.pkg_manager",label:"Package Manager",description:"Package manager",category:"enterprise_infra"},{index:24,path:"stack.workspaces",label:"Workspaces",description:"Workspace configuration",category:"enterprise_infra"},{index:25,path:"monorepo.packages_count",label:"Packages",description:"Number of packages",category:"enterprise_infra"},{index:26,path:"monorepo.build_orchestrator",label:"Build Orchestrator",description:"Build orchestration tool",category:"enterprise_infra"},{index:27,path:"stack.admin",label:"Admin",description:"Admin panel",category:"enterprise_app"},{index:28,path:"stack.cache",label:"Cache",description:"Caching layer",category:"enterprise_app"},{index:29,path:"stack.search",label:"Search",description:"Search engine",category:"enterprise_app"},{index:30,path:"stack.storage",label:"Storage",description:"Object storage",category:"enterprise_app"},{index:31,path:"monorepo.versioning_strategy",label:"Versioning",description:"Version strategy",category:"enterprise_ops"},{index:32,path:"monorepo.shared_configs",label:"Shared Configs",description:"Shared configs",category:"enterprise_ops"},{index:33,path:"monorepo.remote_cache",label:"Remote Cache",description:"Remote build cache",category:"enterprise_ops"}],d0=new Map(x.flatMap(($)=>$.canonical?[[$.path,$],[$.canonical,$]]:[[$.path,$]])),KY=new Map(x.filter(($)=>$.canonical).map(($)=>[$.canonical,$.path])),PY=new Map(x.filter(($)=>$.canonical).map(($)=>[$.path,$.canonical]));function q3($,Z){let U=(Q)=>{let J=Q.split("."),z=$;for(let H of J)if(z&&typeof z==="object"&&H in z)z=z[H];else return;return z},X=U(Z.path);if(X!==void 0)return X;if(Z.canonical)return U(Z.canonical);return}function f6($){return x.filter((Z)=>Z.category===$)}var u6=x.filter(($)=>$.index<=21),k6=x,T1=new Set(["describe your project goal","development teams","cloud platform","null","none","unknown","n/a","not applicable"]);function q0($){if($===null||$===void 0||$==="")return!0;if(typeof $==="string")return T1.has($.toLowerCase().trim());if(Array.isArray($)&&$.length===0)return!0;if(typeof $==="object"&&Object.keys($).length===0)return!0;return!1}var T0={about:[],documentation:["project","human"],intent:["project","human"],encyclopedia:["project","human"],cli:["project","human","universal"],library:["project","human","universal"],sdk:["project","human","universal"],wasm:["project","human","universal"],html:["project","human","universal"],"server-card":["project","human","universal"],frontend:["project","frontend","human","universal"],website:["project","frontend","human","universal"],mobile:["project","frontend","human","universal"],extension:["project","frontend","human","universal"],mcp:["project","backend","human","universal"],backend:["project","backend","universal","human"],"data-science":["project","backend","human","universal"],fullstack:["project","frontend","backend","universal","human"],svelte:["project","frontend","backend","universal","human"],framework:["project","frontend","backend","universal","human"],"monorepo-root":["project","human","enterprise_infra","enterprise_app","enterprise_ops"],mcpaas:["project","backend","universal","human","enterprise_app","enterprise_ops"],saas:["project","frontend","backend","universal","human","enterprise_app"],enterprise:["project","frontend","backend","universal","human","enterprise_infra","enterprise_app","enterprise_ops"]};var F$=($)=>(Z)=>`\x1B[${$}m${Z}\x1B[0m`,A1=F$("1"),c0=F$("2"),AY=F$("3"),i0={cyan:"#00D4D4",cyanDeep:"#0E8C8C",orange:"#FF6B35"},F1=($)=>`\x1B[38;2;0;212;212m${$}\x1B[0m`,N$=($)=>`\x1B[38;2;14;140;140m${$}\x1B[0m`,A0=($)=>`\x1B[38;5;208m${$}\x1B[0m`;var a=[{name:"TROPHY",indicator:`${A0("✪")} ${A0("TROPHY")}`,threshold:100},{name:"GOLD",indicator:`${A0(A1("★"))} ${A0("GOLD")}`,threshold:99},{name:"SILVER",indicator:`${F1("◆")} ${F1("SILVER")}`,threshold:95},{name:"BRONZE",indicator:`${N$("◇")} ${N$("BRONZE")}`,threshold:85},{name:"GREEN",indicator:`${A1("●")} GREEN`,threshold:70},{name:"YELLOW",indicator:`${c0("●")} YELLOW`,threshold:55},{name:"RED",indicator:`${c0("○")} RED`,threshold:1},{name:"WHITE",indicator:`${c0("♡")}`,threshold:0}];function s0($){for(let Z of a)if($>=Z.threshold)return Z;return a[a.length-1]}function v6($){let Z=s0($),U=a.indexOf(Z);return U>0?a[U-1]:null}var C$={};h6(C$,{validate:()=>l6,sdkVersion:()=>s6,scoreFafb:()=>i6,scoreEnterprise:()=>m6,score:()=>w$,fafbInfo:()=>c6,decompile:()=>d6,compile:()=>p6});var b$=null;function e(){if(b$)return b$;try{let $=p0("faf-scoring-kernel");return b$=$,$}catch{throw Error(`faf-scoring-kernel not installed.
139
+ `,Z)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 Z=L$($),U=k0(Z);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=L$($),U=k0(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}zJ.Parser=K6});var N6=R((OJ)=>{var F6=y2(),HJ=W1(),K1=D1(),qJ=i$(),YJ=C(),GJ=i2(),P6=r2();function A6($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new GJ.LineCounter||null,prettyErrors:Z}}function _J($,Z={}){let{lineCounter:U,prettyErrors:X}=A6(Z),Q=new P6.Parser(U?.addNewLine),z=new F6.Composer(Z),J=Array.from(z.compose(Q.parse($)));if(X&&U)for(let H of J)H.errors.forEach(K1.prettifyError($,U)),H.warnings.forEach(K1.prettifyError($,U));if(J.length>0)return J;return Object.assign([],{empty:!0},z.streamInfo())}function T6($,Z={}){let{lineCounter:U,prettyErrors:X}=A6(Z),Q=new P6.Parser(U?.addNewLine),z=new F6.Composer(Z),J=null;for(let H of z.compose(Q.parse($),!0,$.length))if(!J)J=H;else if(J.options.logLevel!=="silent"){J.errors.push(new K1.YAMLParseError(H.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(X&&U)J.errors.forEach(K1.prettifyError($,U)),J.warnings.forEach(K1.prettifyError($,U));return J}function BJ($,Z,U){let X=void 0;if(typeof Z==="function")X=Z;else if(U===void 0&&Z&&typeof Z==="object")U=Z;let Q=T6($,U);if(!Q)return null;if(Q.warnings.forEach((z)=>qJ.warn(Q.options.logLevel,z)),Q.errors.length>0)if(Q.options.logLevel!=="silent")throw Q.errors[0];else Q.errors=[];return Q.toJS(Object.assign({reviver:X},U))}function VJ($,Z,U){let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(U===void 0&&Z)U=Z;if(typeof U==="string")U=U.length;if(typeof U==="number"){let Q=Math.round(U);U=Q<1?void 0:Q>8?{indent:8}:{indent:Q}}if($===void 0){let{keepUndefined:Q}=U??Z??{};if(!Q)return}if(YJ.isDocument($)&&!X)return $.toString(U);return new HJ.Document($,X,U).toString(U)}OJ.parse=BJ;OJ.parseAllDocuments=_J;OJ.parseDocument=T6;OJ.stringify=VJ});var y=[{index:1,path:"project.name",label:"Name",description:"Project name",category:"project"},{index:2,path:"project.goal",label:"Goal",description:"Goal (use case)",category:"project"},{index:3,path:"project.main_language",label:"Language",description:"Primary language",category:"project"},{index:4,path:"human_context.who",label:"Who",description:"Who is this for?",category:"human"},{index:5,path:"human_context.what",label:"What",description:"What are they building",category:"human"},{index:6,path:"human_context.why",label:"Why",description:"Why does it exist",category:"human"},{index:7,path:"human_context.where",label:"Where",description:"Where does it run",category:"human"},{index:8,path:"human_context.when",label:"When",description:"When was it started / timeline",category:"human"},{index:9,path:"human_context.how",label:"How",description:"How is it built",category:"human"},{index:10,path:"stack.frontend",canonical:"stack.framework",label:"Framework",description:"Framework (React, Svelte, etc.)",category:"frontend"},{index:11,path:"stack.css_framework",canonical:"stack.css",label:"CSS",description:"CSS framework",category:"frontend"},{index:12,path:"stack.ui_library",label:"UI Library",description:"UI component library",category:"frontend"},{index:13,path:"stack.state_management",canonical:"stack.state",label:"State",description:"State management",category:"frontend"},{index:14,path:"stack.backend",label:"Backend",description:"Backend framework",category:"backend"},{index:15,path:"stack.api_type",canonical:"stack.api",label:"API",description:"API style (REST, GraphQL, etc.)",category:"backend"},{index:16,path:"stack.runtime",label:"Runtime",description:"Runtime (Node, Bun, Python, etc.)",category:"backend"},{index:17,path:"stack.database",canonical:"stack.db",label:"Database",description:"Database",category:"backend"},{index:18,path:"stack.connection",label:"Connection",description:"Connection method (Prisma, etc.)",category:"backend"},{index:19,path:"stack.hosting",label:"Hosting",description:"Hosting platform",category:"universal"},{index:20,path:"stack.build",label:"Build",description:"Build tool",category:"universal"},{index:21,path:"stack.cicd",label:"CI/CD",description:"CI/CD",category:"universal"},{index:22,path:"stack.monorepo_tool",label:"Monorepo",description:"Monorepo tool",category:"enterprise_infra"},{index:23,path:"stack.package_manager",canonical:"stack.pkg_manager",label:"Package Manager",description:"Package manager",category:"enterprise_infra"},{index:24,path:"stack.workspaces",label:"Workspaces",description:"Workspace configuration",category:"enterprise_infra"},{index:25,path:"monorepo.packages_count",label:"Packages",description:"Number of packages",category:"enterprise_infra"},{index:26,path:"monorepo.build_orchestrator",label:"Build Orchestrator",description:"Build orchestration tool",category:"enterprise_infra"},{index:27,path:"stack.admin",label:"Admin",description:"Admin panel",category:"enterprise_app"},{index:28,path:"stack.cache",label:"Cache",description:"Caching layer",category:"enterprise_app"},{index:29,path:"stack.search",label:"Search",description:"Search engine",category:"enterprise_app"},{index:30,path:"stack.storage",label:"Storage",description:"Object storage",category:"enterprise_app"},{index:31,path:"monorepo.versioning_strategy",label:"Versioning",description:"Version strategy",category:"enterprise_ops"},{index:32,path:"monorepo.shared_configs",label:"Shared Configs",description:"Shared configs",category:"enterprise_ops"},{index:33,path:"monorepo.remote_cache",label:"Remote Cache",description:"Remote build cache",category:"enterprise_ops"}],s0=new Map(y.flatMap(($)=>$.canonical?[[$.path,$],[$.canonical,$]]:[[$.path,$]])),ZG=new Map(y.filter(($)=>$.canonical).map(($)=>[$.canonical,$.path])),UG=new Map(y.filter(($)=>$.canonical).map(($)=>[$.path,$.canonical]));function L3($,Z){let U=(Q)=>{let z=Q.split("."),J=$;for(let H of z)if(J&&typeof J==="object"&&H in J)J=J[H];else return;return J},X=U(Z.path);if(X!==void 0)return X;if(Z.canonical)return U(Z.canonical);return}function n9($){return y.filter((Z)=>Z.category===$)}var o9=y.filter(($)=>$.index<=21),t9=y,S1=new Set(["describe your project goal","development teams","cloud platform","null","none","unknown","n/a","not applicable"]);function V0($){if($===null||$===void 0||$==="")return!0;if(typeof $==="string")return S1.has($.toLowerCase().trim());if(Array.isArray($)&&$.length===0)return!0;if(typeof $==="object"&&Object.keys($).length===0)return!0;return!1}var w0={about:[],documentation:["project","human"],intent:["project","human"],encyclopedia:["project","human"],cli:["project","human","universal"],library:["project","human","universal"],sdk:["project","human","universal"],wasm:["project","human","universal"],html:["project","human","universal"],"server-card":["project","human","universal"],frontend:["project","frontend","human","universal"],website:["project","frontend","human","universal"],mobile:["project","frontend","human","universal"],extension:["project","frontend","human","universal"],mcp:["project","backend","human","universal"],backend:["project","backend","universal","human"],"data-science":["project","backend","human","universal"],fullstack:["project","frontend","backend","universal","human"],svelte:["project","frontend","backend","universal","human"],framework:["project","frontend","backend","universal","human"],"monorepo-root":["project","human","enterprise_infra","enterprise_app","enterprise_ops"],mcpaas:["project","backend","universal","human","enterprise_app","enterprise_ops"],saas:["project","frontend","backend","universal","human","enterprise_app"],enterprise:["project","frontend","backend","universal","human","enterprise_infra","enterprise_app","enterprise_ops"]};var j$=($)=>(Z)=>`\x1B[${$}m${Z}\x1B[0m`,E1=j$("1"),a0=j$("2"),QG=j$("3"),n0={cyan:"#00D4D4",cyanDeep:"#0E8C8C",orange:"#FF6B35"},j1=($)=>`\x1B[38;2;0;212;212m${$}\x1B[0m`,g$=($)=>`\x1B[38;2;14;140;140m${$}\x1B[0m`,C0=($)=>`\x1B[38;5;208m${$}\x1B[0m`;var o=[{name:"TROPHY",indicator:`${C0("✪")} ${C0("TROPHY")}`,threshold:100},{name:"GOLD",indicator:`${C0(E1("★"))} ${C0("GOLD")}`,threshold:99},{name:"SILVER",indicator:`${j1("◆")} ${j1("SILVER")}`,threshold:95},{name:"BRONZE",indicator:`${g$("◇")} ${g$("BRONZE")}`,threshold:85},{name:"GREEN",indicator:`${E1("●")} GREEN`,threshold:70},{name:"YELLOW",indicator:`${a0("●")} YELLOW`,threshold:55},{name:"RED",indicator:`${a0("○")} RED`,threshold:1},{name:"WHITE",indicator:`${a0("♡")}`,threshold:0}];function o0($){for(let Z of o)if($>=Z.threshold)return Z;return o[o.length-1]}function e9($){let Z=o0($),U=o.indexOf(Z);return U>0?o[U-1]:null}var y$={};s9(y$,{validate:()=>ZZ,sdkVersion:()=>JZ,scoreFafb:()=>zZ,scoreEnterprise:()=>$Z,score:()=>h$,fafbInfo:()=>QZ,decompile:()=>XZ,compile:()=>UZ});var x$=null;function U0(){if(x$)return x$;try{let $=r0("faf-scoring-kernel");return x$=$,$}catch{throw Error(`faf-scoring-kernel not installed.
140
140
 
141
141
  Run: npm install faf-scoring-kernel
142
- `)}}function w$($){return JSON.parse(e().score_faf($))}function m6($){return JSON.parse(e().score_faf_enterprise($))}function l6($){return e().validate_faf($)}function p6($){return e().compile_fafb($)}function d6($){return JSON.parse(e().decompile_fafb($))}function c6($){return JSON.parse(e().fafb_info($))}function i6($){return JSON.parse(e().score_fafb($))}function s6(){return e().sdk_version()}function _3($){return{score:$.score,tier:s0($.score),populated:$.populated,empty:$.empty,ignored:$.ignored,active:$.active,total:$.total,slots:$.slots}}function j$($){if(/^\s*app_type:\s*about\s*$/m.test($)){let U=$.match(/^\s+source_score:\s*(\d+)\s*$/m),X=U?parseInt(U[1],10):-1,Q=X>=0&&X<=100?X:-1,J=$.match(/^\s+represents:\s*(\S+)\s*$/m),z=J?J[1]:void 0;return{score:Q,tier:Q>=0?s0(Q):a[a.length-1],populated:0,empty:0,ignored:0,active:0,total:0,slots:{},inherited:!0,represents:z}}return _3(w$($))}function a6($){let Z=[];if(!$||typeof $!=="object")return Z.push("File is not a valid YAML mapping"),{valid:!1,errors:Z};let U=$;if(!U.faf_version)Z.push("Missing required field: faf_version");if(!U.project?.name)Z.push("Missing required field: project.name");if(U.app_type==="about"){if(!U.about?.represents)Z.push("app_type 'about' requires about.represents (owner/repo of the source codebase)");else if(!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(U.about.represents))Z.push(`about.represents must be "owner/repo" format (got: ${U.about.represents})`);if(U.about?.source_score!==void 0){let X=U.about.source_score;if(typeof X!=="number"||X<0||X>100)Z.push(`about.source_score must be a number 0-100 (got: ${X})`)}}return{valid:Z.length===0,errors:Z}}import{readFileSync as P9,writeFileSync as oq,existsSync as M9}from"fs";import{join as K9,dirname as pz,basename as eq}from"path";var zz=C2(),Hz=_1(),Gz=V2(),m2=B1(),Yz=n0(),G0=w(),qz=X0(),_z=y(),Bz=J0(),Vz=z0(),aq=Y$(),Oz=u2(),Wz=k2(),Iz=v2(),B$=D9(),R9=a0();var Lz=zz.Composer,Dz=Hz.Document,Rz=Gz.Schema,Mz=m2.YAMLError,Kz=m2.YAMLParseError,Pz=m2.YAMLWarning,Tz=Yz.Alias,Az=G0.isAlias,Fz=G0.isCollection,Nz=G0.isDocument,bz=G0.isMap,wz=G0.isNode,Cz=G0.isPair,jz=G0.isScalar,Sz=G0.isSeq,Ez=qz.Pair,gz=_z.Scalar,yz=Bz.YAMLMap,hz=Vz.YAMLSeq;var xz=Oz.Lexer,fz=Wz.LineCounter,uz=Iz.Parser,o=B$.parse,kz=B$.parseAllDocuments,vz=B$.parseDocument,V$=B$.stringify,mz=R9.visit,lz=R9.visitAsync;function dz($){let Z=P9($,"utf-8");return o(Z)}function T9($){return P9($,"utf-8")}function A9($=process.cwd()){let Z=["project.faf",".faf"];for(let X of Z){let Q=K9($,X);if(M9(Q))return Q}let U=pz($);if(U!==$)for(let X of Z){let Q=K9(U,X);if(M9(Q))return Q}return null}import{writeFileSync as cz}from"fs";import{join as iz}from"path";var F9=i0.orange,sz=i0.cyan,az=i0.cyanDeep,rz="#FF9500",nz="#FF3B30",oz="#E6EDF3",tz="#6E7681",N9={TROPHY:{glyph:"✪",color:F9},GOLD:{glyph:"★",color:F9},SILVER:{glyph:"◆",color:sz},BRONZE:{glyph:"◇",color:az},GREEN:{glyph:"●",color:oz},YELLOW:{glyph:"●",color:rz},RED:{glyph:"○",color:nz},WHITE:{glyph:"♡",color:tz}};function x0($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var b9=["who","what","why","where","when","how"];function O$($){return $.filter(([,Z])=>Z!==void 0&&Z!==null&&String(Z).trim()!=="").map(([Z,U])=>`<div class="row"><div class="k">${x0(Z)}</div><div class="v">${x0(U)}</div></div>`).join(`
143
- `)}function w9($,Z,U="project.faf"){let X=x0($.project?.name??"Project"),Q=Z.tier?.name??"WHITE",J=N9[Q]??N9.WHITE,z=Z.inherited?Z.represents?`inherited from ${x0(Z.represents)}`:"inherited":`${Z.score}%`,H=Q==="TROPHY"&&!Z.inherited,Y=$.human_context??{},G=b9.map((V)=>[V,Y[V]]),_=Object.entries(Y).filter(([V])=>!b9.includes(V)),q=[["goal",$.project?.goal],["main_language",$.project?.main_language],["type",$.project?.type],["framework",$.project?.framework],["faf_version",$.faf_version]],B=Object.entries($.stack??{}),O=B.filter(([,V])=>V&&V!=="slotignored"&&String(V).trim()!==""),I=B.filter(([,V])=>V==="slotignored").length;return`<!DOCTYPE html>
142
+ `)}}function h$($){return JSON.parse(U0().score_faf($))}function $Z($){return JSON.parse(U0().score_faf_enterprise($))}function ZZ($){return U0().validate_faf($)}function UZ($){return U0().compile_fafb($)}function XZ($){return JSON.parse(U0().decompile_fafb($))}function QZ($){return JSON.parse(U0().fafb_info($))}function zZ($){return JSON.parse(U0().score_fafb($))}function JZ(){return U0().sdk_version()}function R3($){return{score:$.score,tier:o0($.score),populated:$.populated,empty:$.empty,ignored:$.ignored,active:$.active,total:$.total,slots:$.slots}}function f$($){if(/^\s*app_type:\s*about\s*$/m.test($)){let U=$.match(/^\s+source_score:\s*(\d+)\s*$/m),X=U?parseInt(U[1],10):-1,Q=X>=0&&X<=100?X:-1,z=$.match(/^\s+represents:\s*(\S+)\s*$/m),J=z?z[1]:void 0;return{score:Q,tier:Q>=0?o0(Q):o[o.length-1],populated:0,empty:0,ignored:0,active:0,total:0,slots:{},inherited:!0,represents:J}}return R3(h$($))}function HZ($){let Z=[];if(!$||typeof $!=="object")return Z.push("File is not a valid YAML mapping"),{valid:!1,errors:Z};let U=$;if(!U.faf_version)Z.push("Missing required field: faf_version");if(!U.project?.name)Z.push("Missing required field: project.name");if(U.app_type==="about"){if(!U.about?.represents)Z.push("app_type 'about' requires about.represents (owner/repo of the source codebase)");else if(!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(U.about.represents))Z.push(`about.represents must be "owner/repo" format (got: ${U.about.represents})`);if(U.about?.source_score!==void 0){let X=U.about.source_score;if(typeof X!=="number"||X<0||X>100)Z.push(`about.source_score must be a number 0-100 (got: ${X})`)}}return{valid:Z.length===0,errors:Z}}import{readFileSync as S6,writeFileSync as E_,existsSync as C6}from"fs";import{join as b6,dirname as UH,basename as g_}from"path";var RJ=y2(),MJ=W1(),KJ=M2(),s2=D1(),FJ=$1(),_0=C(),PJ=J0(),AJ=x(),TJ=q0(),NJ=Y0(),C_=D$(),wJ=c2(),CJ=i2(),bJ=r2(),R$=N6(),w6=t0();var SJ=RJ.Composer,EJ=MJ.Document,jJ=KJ.Schema,gJ=s2.YAMLError,xJ=s2.YAMLParseError,hJ=s2.YAMLWarning,yJ=FJ.Alias,fJ=_0.isAlias,uJ=_0.isCollection,kJ=_0.isDocument,vJ=_0.isMap,mJ=_0.isNode,pJ=_0.isPair,lJ=_0.isScalar,dJ=_0.isSeq,cJ=PJ.Pair,iJ=AJ.Scalar,rJ=TJ.YAMLMap,sJ=NJ.YAMLSeq;var aJ=wJ.Lexer,nJ=CJ.LineCounter,oJ=bJ.Parser,$0=R$.parse,tJ=R$.parseAllDocuments,eJ=R$.parseDocument,M$=R$.stringify,$H=w6.visit,ZH=w6.visitAsync;function XH($){let Z=S6($,"utf-8");return $0(Z)}function E6($){return S6($,"utf-8")}function j6($=process.cwd()){let Z=["project.faf",".faf"];for(let X of Z){let Q=b6($,X);if(C6(Q))return Q}let U=UH($);if(U!==$)for(let X of Z){let Q=b6(U,X);if(C6(Q))return Q}return null}import{writeFileSync as QH}from"fs";import{join as zH}from"path";var g6=n0.orange,JH=n0.cyan,HH=n0.cyanDeep,qH="#FF9500",YH="#FF3B30",GH="#E6EDF3",_H="#6E7681",x6={TROPHY:{glyph:"✪",color:g6},GOLD:{glyph:"★",color:g6},SILVER:{glyph:"◆",color:JH},BRONZE:{glyph:"◇",color:HH},GREEN:{glyph:"●",color:GH},YELLOW:{glyph:"●",color:qH},RED:{glyph:"○",color:YH},WHITE:{glyph:"♡",color:_H}};function v0($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var h6=["who","what","why","where","when","how"];function K$($){return $.filter(([,Z])=>Z!==void 0&&Z!==null&&String(Z).trim()!=="").map(([Z,U])=>`<div class="row"><div class="k">${v0(Z)}</div><div class="v">${v0(U)}</div></div>`).join(`
143
+ `)}function y6($,Z,U="project.faf"){let X=v0($.project?.name??"Project"),Q=Z.tier?.name??"WHITE",z=x6[Q]??x6.WHITE,J=Z.inherited?Z.represents?`inherited from ${v0(Z.represents)}`:"inherited":`${Z.score}%`,H=Q==="TROPHY"&&!Z.inherited,q=$.human_context??{},Y=h6.map((V)=>[V,q[V]]),G=Object.entries(q).filter(([V])=>!h6.includes(V)),_=[["goal",$.project?.goal],["main_language",$.project?.main_language],["type",$.project?.type],["framework",$.project?.framework],["faf_version",$.faf_version]],B=Object.entries($.stack??{}),O=B.filter(([,V])=>V&&V!=="slotignored"&&String(V).trim()!==""),D=B.filter(([,V])=>V==="slotignored").length;return`<!DOCTYPE html>
144
144
  <html lang="en">
145
145
  <head>
146
146
  <meta charset="UTF-8">
@@ -152,19 +152,19 @@ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.pus
152
152
  *{margin:0;padding:0;box-sizing:border-box}
153
153
  body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;background:#0a0a0a;color:#e6edf3;line-height:1.55;padding:48px 20px}
154
154
  .wrap{max-width:880px;margin:0 auto}
155
- .bar{height:3px;border-radius:2px;background:linear-gradient(90deg,transparent,${J.color},transparent);margin-bottom:40px}
155
+ .bar{height:3px;border-radius:2px;background:linear-gradient(90deg,transparent,${z.color},transparent);margin-bottom:40px}
156
156
  header{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;margin-bottom:8px}
157
157
  h1{font-size:2.2rem;font-weight:800;letter-spacing:-1px}
158
- .badge{font-size:1.05rem;font-weight:800;color:${J.color};white-space:nowrap}
158
+ .badge{font-size:1.05rem;font-weight:800;color:${z.color};white-space:nowrap}
159
159
  .score{font-size:1.05rem;font-weight:700;color:#8b949e}
160
160
  .eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:#6e7681;margin-bottom:36px}
161
161
  section{margin-bottom:34px}
162
- h2{font-size:12px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:${J.color};margin-bottom:14px;padding-bottom:6px;border-bottom:1px solid rgba(255,255,255,.07)}
162
+ h2{font-size:12px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:${z.color};margin-bottom:14px;padding-bottom:6px;border-bottom:1px solid rgba(255,255,255,.07)}
163
163
  .row{display:flex;gap:18px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.04)}
164
164
  .k{flex:0 0 150px;color:#8b949e;font-size:.9rem;text-transform:capitalize}
165
165
  .v{flex:1;color:#e6edf3;font-size:.95rem;word-break:break-word}
166
166
  .meter{height:8px;border-radius:4px;background:rgba(255,255,255,.06);overflow:hidden;margin:6px 0 10px}
167
- .meter span{display:block;height:100%;background:${J.color};width:${Math.max(0,Math.min(100,Z.score))}%}
167
+ .meter span{display:block;height:100%;background:${z.color};width:${Math.max(0,Math.min(100,Z.score))}%}
168
168
  .award{font-size:.95rem}
169
169
  .statline{margin-bottom:32px}
170
170
  .awd-pre{color:#6E7681}
@@ -181,47 +181,48 @@ footer strong{color:#e6edf3}
181
181
  <div class="eyebrow">project.faf · visual render</div>
182
182
  <header>
183
183
  <h1>${X}</h1>
184
- <span class="badge">${J.glyph} ${x0(Q)}</span>
185
- <span class="score">${z}</span>
184
+ <span class="badge">${z.glyph} ${v0(Q)}</span>
185
+ <span class="score">${J}</span>
186
186
  </header>
187
187
  <div class="meter"><span></span></div>
188
- ${H?'<p class="award statline"><span class="awd-pre">✅ All Required slots filled.</span> <span class="awd-win">100% Trophy ✪ Awarded</span></p>':`<p class="muted statline">${Z.populated}/${Z.active} slots populated · ${Z.total} total${I?` · ${I} N/A`:""}</p>`}
188
+ ${H?'<p class="award statline"><span class="awd-pre">✅ All Required slots filled.</span> <span class="awd-win">100% Trophy ✪ Awarded</span></p>':`<p class="muted statline">${Z.populated}/${Z.active} slots populated · ${Z.total} total${D?` · ${D} N/A`:""}</p>`}
189
189
 
190
190
  <section>
191
191
  <h2>The 6 W's</h2>
192
- ${O$(G)||'<p class="muted">No human_context yet.</p>'}
193
- ${_.length?O$(_):""}
192
+ ${K$(Y)||'<p class="muted">No human_context yet.</p>'}
193
+ ${G.length?K$(G):""}
194
194
  </section>
195
195
 
196
196
  <section>
197
197
  <h2>Project</h2>
198
- ${O$(q)||'<p class="muted">—</p>'}
198
+ ${K$(_)||'<p class="muted">—</p>'}
199
199
  </section>
200
200
 
201
201
  <section>
202
202
  <h2>Stack</h2>
203
- ${O.length?O$(O):'<p class="muted">No active stack slots.</p>'}
203
+ ${O.length?K$(O):'<p class="muted">No active stack slots.</p>'}
204
204
  </section>
205
205
 
206
206
  <footer>
207
- Rendered on-demand from your current <strong>${x0(U)}</strong><br>
207
+ Rendered on-demand from your current <strong>${v0(U)}</strong><br>
208
208
  <strong>Humans like visuals. <span style="color:#00D4D4">We gave them one.</span></strong>
209
209
  </footer>
210
210
  </div>
211
211
  </body>
212
212
  </html>
213
- `}function ez($,Z,U,X="project.faf"){cz(iz($,"project.html"),w9(Z,U,X),"utf-8")}import{writeFileSync as $H}from"fs";import{join as ZH}from"path";var C9="application/vnd.faf+yaml",UH="https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",XH=/^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;function S9($){let Z=String($.project?.name??"project").trim();if(Z.includes("/")&&XH.test(Z))return Z;let U=$.project?.homepage??$.project?.website??$.project?.url,X="local";if(U)try{X=new URL(U).hostname.replace(/^www\./,"").split(".").reverse().join(".")}catch{}let Q=Z.replace(/[^a-zA-Z0-9._-]/g,"-").replace(/^-+|-+$/g,"")||"project";return`${X}/${Q}`}function QH($){let Z=String($.project?.goal??$.context??$.project?.name??"MCP server").replace(/\s+/g," ").trim();if(!Z)return"MCP server";return Z.length<=100?Z:`${Z.slice(0,97).trimEnd()}...`}function l2($,Z={}){return{faf:Z.fafPointer??"./project.faf",mediaType:C9,iana:`https://www.iana.org/assignments/media-types/${C9}`,deterministic:!0,...Z.scoreEndpoint?{scoreEndpoint:Z.scoreEndpoint}:{},generated:$.generated??Z.now??new Date().toISOString()}}function E9($,Z={}){let U={$schema:UH,name:S9($),version:String($.project?.version??"0.1.0"),description:QH($)},X=HH($)??$.project?.name;if(X&&X.length<=100)U.title=X;let Q=$.project?.homepage??$.project?.website??$.project?.url;if(Q)U.websiteUrl=Q;if(Z.remoteUrl)U.remotes=[{type:"streamable-http",url:Z.remoteUrl}];return U._meta={"one.faf/context":l2($,Z)},U}var g9="io.modelcontextprotocol.registry/publisher-provided",j9=4096;function JH($,Z={}){let U={"one.faf/context":l2($,Z)},X=new TextEncoder().encode(JSON.stringify(U)).length;if(X>j9)throw Error(`publisher-provided _meta is ${X}B — exceeds the registry ${j9}B cap`);return{[g9]:U}}function zH($){return S9($)}function HH($){let Z=$.project?.title;if(typeof Z==="string"){let U=Z.trim();if(U&&U.length<=100)return U}return}function GH($,Z,U={}){let X=E9(Z,U),Q=ZH($,"server-card");return $H(Q,`${JSON.stringify(X,null,2)}
214
- `,"utf-8"),Q}var p2=["ephemeral","standard","high","critical"],Y0=Object.fromEntries(p2.map(($,Z)=>[$,Z])),W$=new Set(["user","feedback","project","reference"]),d2=new Set(["version","profile","namepoint","created","last_etched","retention","index","memory"]),c2=new Set(["facts","sessions","preferences","custom"]),i2={low:"ephemeral",medium:"standard"};import{readFileSync as YH,writeFileSync as qH,existsSync as _H}from"fs";function f0(){return new Date().toISOString().replace(/\.\d{3}Z$/,"Z")}function u($){return $===null||$===void 0}function D1($){if(u($))return"standard";if(i2[$])return i2[$];if($ in Y0)return $;return"standard"}var BH=new Set(["text","id","type","priority","tags","links","timestamp","source"]);function y9($){if(typeof $==="string")return{text:$,id:null,type:null,priority:"standard",tags:[],links:[],timestamp:null,source:null,extra:{}};if(!$||typeof $!=="object"||!("text"in $))throw Error(`fact must be a string or a mapping with 'text': ${JSON.stringify($)}`);let Z=$,U={};for(let[X,Q]of Object.entries(Z))if(!BH.has(X))U[X]=Q;return{text:String(Z.text),id:Z.id??null,type:Z.type??null,priority:D1(Z.priority),tags:Array.isArray(Z.tags)?Z.tags.slice():[],links:Array.isArray(Z.links)?Z.links.slice():[],timestamp:Z.timestamp??null,source:Z.source??null,extra:U}}function h9($){if(u($.id)&&u($.type)&&$.tags.length===0&&$.links.length===0&&u($.timestamp)&&u($.source)&&Object.keys($.extra).length===0&&$.priority==="standard")return $.text;let U={text:$.text};if(!u($.id))U.id=$.id;if(!u($.type))U.type=$.type;if(U.priority=$.priority,$.tags.length)U.tags=$.tags;if($.links.length)U.links=$.links;if(!u($.timestamp))U.timestamp=$.timestamp;if(!u($.source))U.source=$.source;return Object.assign(U,$.extra),U}class D0{namepoint;profile;retention;created;last_etched;_facts;_byId;_index;_sessions;_preferences;_custom;_extra;_memoryExtra;constructor($,Z={}){this.namepoint=$,this.profile=Z.profile??"knowledge",this.retention=Z.retention??"forever",this.created=Z.created??f0(),this.last_etched=this.created,this._facts=Z.facts?Z.facts.slice():[],this._byId=new Map,this._facts.forEach((U,X)=>{if(!u(U.id))this._byId.set(U.id,X)}),this._index=Z.index?Z.index.slice():[],this._sessions=Z.sessions?structuredClone(Z.sessions):[],this._preferences=Z.preferences?{...Z.preferences}:{},this._custom=Z.custom?{...Z.custom}:{},this._extra=Z.extra?{...Z.extra}:{},this._memoryExtra=Z.memoryExtra?{...Z.memoryExtra}:{}}get facts(){return this._facts}get index(){return this._index}get sessions(){return this._sessions}get preferences(){return this._preferences}get custom(){return this._custom}get extra(){return this._extra}get memoryExtra(){return this._memoryExtra}static load($){if(!_H($))throw Error(`soul file not found: ${$}`);let Z=YH($,"utf-8"),U=o(Z);if(!U||typeof U!=="object")throw Error("soul is not a YAML mapping");let X=U.memory&&typeof U.memory==="object"?U.memory:{},Q=Array.isArray(X.facts)?X.facts:[],J={};for(let[Y,G]of Object.entries(U))if(!d2.has(Y))J[Y]=structuredClone(G);let z={};for(let[Y,G]of Object.entries(X))if(!c2.has(Y))z[Y]=structuredClone(G);let H=new D0(String(U.namepoint??$.replace(/.*\//,"").replace(/\.fafm$/,"")),{profile:String(U.profile??"voice"),facts:Q.map(y9),retention:String(U.retention??"forever"),created:U.created??null,index:Array.isArray(U.index)?U.index.slice():[],sessions:Array.isArray(X.sessions)?structuredClone(X.sessions):[],preferences:X.preferences&&typeof X.preferences==="object"?structuredClone(X.preferences):{},custom:X.custom&&typeof X.custom==="object"?structuredClone(X.custom):{},extra:J,memoryExtra:z});return H.last_etched=String(U.last_etched??H.created),H}static fromFile($){return D0.load($)}toDoc(){let $={facts:this._facts.map(h9),sessions:structuredClone(this._sessions),preferences:structuredClone(this._preferences),custom:structuredClone(this._custom)};for(let[U,X]of Object.entries(this._memoryExtra))if(!c2.has(U))$[U]=structuredClone(X);let Z={version:"1.1",profile:this.profile,namepoint:this.namepoint,created:this.created,last_etched:this.last_etched,retention:this.retention,index:this._index.slice(),memory:$};for(let[U,X]of Object.entries(this._extra))if(!d2.has(U))Z[U]=structuredClone(X);return Z}toYaml(){return V$(this.toDoc(),{lineWidth:100})}rebuildIndex($=80){return this._index=this._facts.map((Z)=>`${Z.id??"?"} — ${Z.text.slice(0,$)}`),this._index}save($,Z={}){if(Z.reindex!==!1)this.rebuildIndex();return qH($,this.toYaml(),"utf-8"),$}toFile($,Z={}){return this.save($,Z)}add($){if(!u($.id)&&this._byId.has($.id)){let Z=this._byId.get($.id);if(Z!==void 0)this._facts[Z]=$}else if(this._facts.push($),!u($.id))this._byId.set($.id,this._facts.length-1);if($.timestamp&&$.timestamp>(this.last_etched||""))this.last_etched=$.timestamp;return $}etch($,Z={}){return this.add({text:$,id:Z.id??null,type:Z.type??null,priority:D1(Z.priority),tags:Z.tags?Z.tags.slice():[],links:Z.links?Z.links.slice():[],timestamp:f0(),source:Z.source??null,extra:{}})}recall($,Z={}){let U=Y0[D1(Z.minPriority??"ephemeral")]??0,X=($??"").toLowerCase(),Q=new Set(Z.tags??[]),J=[];this._facts.forEach((H,Y)=>{if(X&&!H.text.toLowerCase().includes(X))return;if(Q.size>0&&![...Q].some((G)=>H.tags.includes(G)))return;if(!u(Z.type)&&H.type!==Z.type)return;if((Y0[H.priority]??1)<U)return;J.push([Y,H])}),J.sort((H,Y)=>{let G=Y0[H[1].priority]??1,_=Y0[Y[1].priority]??1;if(_!==G)return _-G;let q=H[1].timestamp??"",B=Y[1].timestamp??"";if(B!==q)return B<q?-1:B>q?1:0;return Y[0]-H[0]});let z=J.map(([,H])=>H);if(!u(Z.limit))return z.slice(0,Z.limit);return z}getFact($){let Z=this._byId.get($);return Z===void 0?null:this._facts[Z]}deleteFact($){let Z=this._byId.get($);if(Z===void 0)return!1;return this._facts.splice(Z,1),this._byId.clear(),this._facts.forEach((U,X)=>{if(!u(U.id))this._byId.set(U.id,X)}),!0}}import{readdirSync as VH,readFileSync as OH,statSync as x9,existsSync as WH}from"fs";import{join as IH,basename as f9,resolve as LH}from"path";var u9=new Set(["MEMORY.md","MEMORY-FULL.md","README.md"]),DH=/\[\[([^\]]+)\]\]/g;function RH($){let Z=x9($).mtimeMs;return new Date(Z).toISOString().replace(/\.\d{3}Z$/,"Z")}function MH($){if(!$.startsWith("---"))return{fm:null,body:$};let Z=$.split("---");if(Z.length<3)return{fm:null,body:$};try{let U=o(Z[1]);if(!U||typeof U!=="object")return{fm:null,body:Z.slice(2).join("---").trim()};return{fm:U,body:Z.slice(2).join("---").trim()}}catch{return{fm:null,body:$}}}function KH($,Z,U){if(!U.name)return null;let X=U.metadata&&typeof U.metadata==="object"?U.metadata:{},Q=X.type;if(typeof Q!=="string"||!W$.has(Q))return null;let J=String(U.name).trim(),H=(U.description!==void 0&&U.description!==null&&String(U.description).trim()?String(U.description).trim():"")||J,Y={};if(X.originSessionId)Y.provenance=[`session:${X.originSessionId}`];let G=[...new Set([...Z.matchAll(DH)].map((_)=>_[1]))].sort();return{text:H,id:J,type:Q,priority:"standard",tags:[],links:G,timestamp:RH($),source:`claude-code memory: ${f9($)}`,extra:Y}}function k9($,Z={}){let U=LH($);if(!WH(U))throw Error(`Claude memory directory not found: ${U}`);if(!x9(U).isDirectory())throw Error(`Claude memory path is not a directory: ${U}`);let X=Z.skip??u9,Q=Z.namepoint??`@claude-code:${f9(U)}`,J=[],z=VH(U).filter((q)=>q.endsWith(".md")).sort();for(let q of z){if(X.has(q))continue;let B=IH(U,q),O;try{O=OH(B,"utf-8")}catch{continue}let{fm:I,body:V}=MH(O);if(!I)continue;let W=KH(B,V,I);if(W)J.push(W)}let H=J.map((q)=>q.timestamp).filter(Boolean),Y=H.length?H.reduce((q,B)=>q<B?q:B):f0(),G=H.length?H.reduce((q,B)=>q>B?q:B):Y,_=new D0(Q,{profile:"knowledge",facts:J,created:Y});return _.last_etched=G,_.rebuildIndex(),_}var d9="faf-interview/1",u0="(terse — 3-4 words)",s2=[{path:"project.name",question:"What is the name of this project?",header:"Name",type:"text",required:!0},{path:"project.goal",question:"What does this project do? (one sentence)",header:"Goal",type:"text",required:!0},{path:"human_context.who",question:`Who is this for? ${u0}`,header:"Who",type:"text",required:!0},{path:"human_context.what",question:`What are they building? ${u0}`,header:"What",type:"text",required:!0},{path:"human_context.why",question:`Why does it exist? ${u0}`,header:"Why",type:"text",required:!0},{path:"human_context.where",question:`Where does it run or ship? ${u0}`,header:"Where",type:"text",required:!0},{path:"human_context.when",question:`When — timeline or stage? ${u0}`,header:"When",type:"text",required:!0},{path:"human_context.how",question:`How is it built or used? ${u0}`,header:"How",type:"text",required:!0}],c9=[{path:"project.main_language",question:"What is the primary programming language?",header:"Language",type:"select",required:!0,options:[{label:"TypeScript",value:"TypeScript",description:"JavaScript with types"},{label:"JavaScript",value:"JavaScript",description:"Vanilla JS or Node.js"},{label:"Python",value:"Python",description:"Python 3.x"},{label:"Rust",value:"Rust",description:"Systems programming"},{label:"Go",value:"Go",description:"Golang"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.frontend",question:"What frontend framework does it use?",header:"Frontend",type:"select",required:!1,options:[{label:"React",value:"React",description:"React.js"},{label:"Vue",value:"Vue",description:"Vue.js"},{label:"Svelte",value:"Svelte",description:"Svelte/SvelteKit"},{label:"Next.js",value:"Next.js",description:"React framework"},{label:"None",value:"None",description:"No frontend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.backend",question:"What backend framework does it use?",header:"Backend",type:"select",required:!1,options:[{label:"Express",value:"Express",description:"Node.js Express"},{label:"Fastify",value:"Fastify",description:"Node.js Fastify"},{label:"Django",value:"Django",description:"Python Django"},{label:"FastAPI",value:"FastAPI",description:"Python FastAPI"},{label:"None",value:"None",description:"No backend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.database",question:"What database does it use?",header:"Database",type:"select",required:!1,options:[{label:"PostgreSQL",value:"PostgreSQL",description:"Postgres"},{label:"MySQL",value:"MySQL",description:"MySQL/MariaDB"},{label:"SQLite",value:"SQLite",description:"Embedded SQL"},{label:"MongoDB",value:"MongoDB",description:"Document store"},{label:"None",value:"None",description:"No database"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.runtime",question:"What runtime does it run on?",header:"Runtime",type:"text",required:!1},{path:"stack.hosting",question:"Where is it hosted or distributed?",header:"Hosting",type:"text",required:!1},{path:"stack.build",question:"What is the build tool?",header:"Build",type:"text",required:!1},{path:"stack.cicd",question:"What CI/CD does it use?",header:"CI/CD",type:"text",required:!1}],k0=[...s2,...c9],i9=new Map(k0.map(($)=>[$.path,$])),PH=Object.fromEntries(k0.map(($)=>[$.path,$]));function a2($){let Z=i9.get($);if(Z)return Z.question;let U=d0.get($)??x.find((X)=>X.canonical===$);return U?`${U.description}?`.replace(/\?\?$/,"?"):`${$}?`}function TH($,Z){return k0.filter((U)=>{let X=U.path.split("."),Q=$;for(let J of X)if(Q&&typeof Q==="object"&&J in Q)Q=Q[J];else{Q=void 0;break}if(Q==="slotignored")return!1;return Z(Q)})}var AH=new Set(["developers","development teams","development team","teams","development","cloud platform","web platform","platform","best practices","improve development efficiency","development efficiency","modern development practices","modern development","test-driven development","production/stable","production","stable","app","project","tool"]),FH=[["npm",/\bnpm\b/i],["PyPI",/\bpypi\b/i],["crates.io",/\bcrates\.io\b/i],["Homebrew",/\bhomebrew\b/i],["Docker",/\bdocker\b/i],["Cloudflare",/\bcloudflare\b/i],["Vercel",/\bvercel\b/i],["Netlify",/\bnetlify\b/i],["AWS",/\baws\b/i],["Cloud Run",/\bcloud run\b/i],["edge",/\bedge\b/i],["browser",/\bbrowser\b/i],["WASM",/\bwasm\b/i],["GitHub",/\bgithub\b/i],["MCP Registry",/\bmcp registry\b/i],["Chrome Web Store",/\bchrome web store\b/i],["Smithery",/\bsmithery\b/i]],v9=($)=>AH.has($.toLowerCase().trim()),NH=/^(?:with|and|or|using|for|to|that|who|whom|whose|the|a|an|in|on|of|via|by|&)$/i;function m9($,Z=5){let U=$.trim().split(/\s+/).filter(Boolean).slice(0,Z);while(U.length&&NH.test(U[U.length-1].replace(/[.,;:]+$/,"")))U.pop();return U.join(" ")}function s9($){let Z={};if(!$||typeof $!=="string")return Z;let U=$.trim(),X=U.replace(/^[^A-Za-z0-9]+/,"").split(/\s+(?:for|that|which|to)\s+|\s+[—–]\s+|\s-\s|:\s|\.\s|,\s/)[0].trim(),Q=m9(X);if(Q.split(/\s+/).filter(Boolean).length>=2&&!v9(Q))Z.what=Q;let J=FH.filter(([,Y])=>Y.test(U)).map(([Y])=>Y);if(J.length)Z.where=J.slice(0,4).join(", ");let z=U.match(/\bfor ((?:[A-Za-z][\w./+-]* )?(?:any |all )?(?:developers?|teams?|engineers?|builders?|users?|integrators?)\b[^.,;:—]*)/i),H=m9((z?.[1]||"").trim().replace(/\s+/g," "));if(H&&!v9(H))Z.who=H;return Z}function l9($,Z){let U=$;for(let X of Z.split("."))if(U&&typeof U==="object"&&X in U)U=U[X];else return;return U}function p9($){if(typeof $!=="string")return!1;let Z=$.trim();if(!Z||Z==="slotignored")return!1;return!q0(Z)}function bH($,Z={}){let U=$&&typeof $==="object"?$:{},X=l9(U,"project.goal"),Q=(p9(X)?String(X).trim():"")||(Z.goal??"").trim(),J=s9(Q),z=Z.detailed??{},H={"project.goal":Q||void 0,"human_context.what":J.what,"human_context.where":J.where,"human_context.who":J.who},Y=(O)=>{let I=H[O];if(I)return{value:I,source:"project goal",confidence:0.9};let V=O.startsWith("human_context.")?O.slice(14):"",W=V?z[V]:void 0;return W?{value:W.value,source:W.source,confidence:W.confidence}:void 0},G=s2.map((O,I)=>{let V={n:I+1,path:O.path,header:O.header,question:O.question},W=l9(U,O.path);if(p9(W))return{...V,value:String(W).trim(),status:"filled",seeded:!1};let L=Y(O.path);if(L)return{...V,value:L.value,status:"seeded",seeded:!0,source:L.source,confidence:L.confidence};return{...V,value:"",status:"empty",seeded:!1}}),_=G.filter((O)=>O.status==="filled").length,q=G.filter((O)=>O.status==="seeded").length,B=G.filter((O)=>O.status==="empty").length;return{version:d9,rows:G,filledCount:_,seededCount:q,emptyCount:B,complete:B===0}}function I$($){if($===null||$===void 0)return!0;if(typeof $==="string"){let Z=$.trim();return Z===""||q0(Z)}return!1}function wH($,Z){let U=$;for(let X of Z.split("."))if(U&&typeof U==="object"&&X in U)U=U[X];else return;return U}function a9($){if($==="project.goal")return!0;return d0.get($)?.category==="human"}function r9($,Z=I$){let U=[],X=[];for(let Q of k0){let J=wH($,Q.path);if(J==="slotignored")continue;if(!Z(J))continue;(a9(Q.path)?U:X).push(Q.path)}return{human:U,sourceable:X}}function n9($,Z,U=I$){let X=r9(Z,U),Q;if($>=100||X.human.length===0&&X.sourceable.length===0)Q="done";else if(X.sourceable.length>0)Q="can-source";else Q="needs-human";let J=Q==="needs-human"?r2(X):[];return{status:Q,score:$,gaps:X,ask:J}}function r2($){return $.human.map((Z)=>({path:Z,question:a2(Z)}))}function CH($,Z={}){let U=Math.max(1,Z.maxRounds??5),X=Z.isEmpty??I$,Q=[],J=0;for(let H=0;H<=U;H++){let Y=$.read();if(!Y)return{status:"no-faf",score:0,rounds:J,history:Q,ask:[]};let G=$.score(Y.yaml);Q.push(G);let _=n9(G,Y.data,X);if(_.status==="done")return{status:"done",score:G,rounds:J,history:Q,ask:[]};if(_.status==="needs-human")return{status:"needs-human",score:G,rounds:J,history:Q,ask:_.ask};if(Q.length>=2&&G<=Q[Q.length-2])return _.gaps.human.length?{status:"needs-human",score:G,rounds:J,history:Q,ask:r2(_.gaps)}:{status:"stuck",score:G,rounds:J,history:Q,ask:[]};if(J>=U)return{status:"capped",score:G,rounds:J,history:Q,ask:r2(_.gaps)};$.runAuto(),J++}return{status:"capped",score:Q[Q.length-1]??0,rounds:J,history:Q,ask:[]}}import{createHash as t9}from"crypto";var n2="faf-bench/1",jH={"project.name":"What is the project's name?","project.goal":"What is the project's goal — what is it for?","project.main_language":"What is the primary programming language?","human_context.who":"Who is this project for?","human_context.what":"What are they building?","human_context.why":"Why does this project exist?","human_context.where":"Where does it run or get distributed?","human_context.when":"When — what is the project's timeline or stage?","human_context.how":"How is it built or used?"};function SH($,Z){return jH[$]??`What is the project's ${Z.replace(/\s*\(.*\)$/,"").toLowerCase()}?`}var e9=[["typescript","ts"],["javascript","js"],["python","py","python3"],["node","nodejs","node js","node.js"],["github actions","gh actions","actions"],["postgresql","postgres","pg"],["kubernetes","k8s"],["npm","npm registry"],["cloudflare workers","cf workers","workers"],["google cloud run","cloud run","gcp cloud run"]],R1=new Map;e9.forEach(($,Z)=>$.forEach((U)=>R1.set(U,Z)));var EH=new Set(["a","an","the","and","or","of","for","to","in","on","with","is","it","its","their","your","via","by","using","use","used"]);function L$($){return $.toLowerCase().replace(/[^a-z0-9\s.+#-]/g," ").replace(/\.(?=\s|$)/g," ").replace(/\s+/g," ").trim()}function o9($){return L$($).split(" ").filter((Z)=>Z&&!EH.has(Z))}function $6($,Z){let U=L$($),X=L$(Z);if(!U||!X)return!1;if(U===X)return!0;let Q=R1.get(U);if(Q!==void 0&&R1.get(X)===Q)return!0;let J=o9($);if(J.length===0)return!1;let z=new Set(o9(Z));return J.every((H)=>{if(z.has(H))return!0;let Y=R1.get(H);return Y!==void 0&&[...z].some((G)=>R1.get(G)===Y)})}function gH($){let Z=j$($),U=o($),X=[],Q={},J=0;for(let Y of x){if(Z.slots[Y.path]!=="populated")continue;let G=q3(U,Y);if(typeof G!=="string")continue;let _=G.trim();if(!_||T1.has(_.toLowerCase()))continue;J+=1,X.push({n:J,path:Y.path,question:SH(Y.path,Y.description)}),Q[J]=_}let z=JSON.stringify({v:n2,q:X.map((Y)=>[Y.path,Y.question])}),H=t9("sha256").update(z).digest("hex").slice(0,12);return{version:n2,qsetHash:H,questions:X,answers:Q}}function yH($){return{version:$.version,qsetHash:$.qsetHash,questions:$.questions}}function hH($,Z){let U=$.questions.map((Q)=>{let J=Z[String(Q.n)]??Z[Q.path]??"";return{n:Q.n,path:Q.path,ok:typeof J==="string"&&J.trim()!==""&&$6($.answers[Q.n],J)}}),X=$.questions.filter((Q)=>!U[Q.n-1].ok);return{correct:U.filter((Q)=>Q.ok).length,total:$.questions.length,misses:X,perQuestion:U}}function xH($,Z){let U=JSON.stringify({v:$.version,repo:Z??null,qset:$.qsetHash,protocol:$.protocol,cold:$.cold??null,faf:$.faf??null});return{projection:U,hash:t9("sha256").update(U).digest("hex")}}import{existsSync as LG,readdirSync as G6,readFileSync as DG}from"fs";import{join as Z3,dirname as RG,extname as MG,resolve as KG}from"path";var o2={"package.json":{frameworks:["Node.js","JavaScript","TypeScript"],slots:{packageManager:"npm/yarn/pnpm",mainLanguage:"JavaScript/TypeScript"},priority:35,intelligence:"ultra-high"},"README.md":{frameworks:[],slots:{targetUser:"developers",coreProblem:"understanding project",missionPurpose:"project documentation"},priority:25,intelligence:"high"},"requirements.txt":{frameworks:["Python"],slots:{packageManager:"pip",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},Pipfile:{frameworks:["Python"],slots:{packageManager:"pipenv",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},"pyproject.toml":{frameworks:["Python"],slots:{mainLanguage:"Python",runtime:"Python",backend:"Python"},priority:36,intelligence:"ultra-high"},Gemfile:{frameworks:["Ruby","Rails"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:35,intelligence:"ultra-high"},"composer.json":{frameworks:["PHP","Laravel","Symfony"],slots:{packageManager:"composer",mainLanguage:"PHP"},priority:35,intelligence:"ultra-high"},"Cargo.toml":{frameworks:["Rust"],slots:{packageManager:"cargo",mainLanguage:"Rust",buildTool:"cargo"},priority:36,intelligence:"ultra-high"},"go.mod":{frameworks:["Go"],slots:{packageManager:"go modules",mainLanguage:"Go",buildTool:"go build"},priority:36,intelligence:"ultra-high"},"*.csproj":{frameworks:["C#",".NET"],slots:{packageManager:"NuGet",mainLanguage:"C#",buildTool:"dotnet"},priority:36,intelligence:"ultra-high"},"pubspec.yaml":{frameworks:["Dart"],slots:{packageManager:"pub",mainLanguage:"Dart"},priority:35,intelligence:"ultra-high"},"pom.xml":{frameworks:["Java","Spring","Maven"],slots:{packageManager:"maven",mainLanguage:"Java",buildTool:"maven"},priority:35,intelligence:"ultra-high"},"build.gradle":{frameworks:["Java","Kotlin","Spring","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java/Kotlin",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"next.config.js":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.mjs":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.ts":{frameworks:["Next.js 13+"],slots:{framework:"Next.js 13+",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.js":{frameworks:["Nuxt 2"],slots:{framework:"Nuxt 2",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.ts":{frameworks:["Nuxt 3"],slots:{framework:"Nuxt 3",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"svelte.config.js":{frameworks:["SvelteKit"],slots:{framework:"SvelteKit",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"angular.json":{frameworks:["Angular"],slots:{framework:"Angular",buildTool:"Angular CLI",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manifest.json":{frameworks:["Chrome Extension","Browser Extension"],slots:{framework:"Chrome Extension",runtime:"Chrome/Browser",mainLanguage:"JavaScript",hosting:"Chrome Web Store",apiType:"Chrome APIs"},priority:35,intelligence:"ultra-high",confirmWith:["popup.html","background.js","content.js"]},"vue.config.js":{frameworks:["Vue"],slots:{framework:"Vue",buildTool:"Vue CLI",mainLanguage:"JavaScript"},priority:30,intelligence:"high"},"remix.config.js":{frameworks:["Remix"],slots:{framework:"Remix",runtime:"Node.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.js":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.ts":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"astro.config.mjs":{frameworks:["Astro"],slots:{framework:"Astro",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"redwood.toml":{frameworks:["RedwoodJS"],slots:{framework:"RedwoodJS",buildTool:"Webpack",mainLanguage:"JavaScript/TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"blitz.config.ts":{frameworks:["Blitz.js"],slots:{framework:"Blitz.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"qwik.config.ts":{frameworks:["Qwik"],slots:{framework:"Qwik",buildTool:"Vite",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manage.py":{frameworks:["Django"],slots:{framework:"Django",backend:"Django",mainLanguage:"Python",server:"Django",apiType:"Django Views"},priority:30,intelligence:"high"},artisan:{frameworks:["Laravel"],slots:{framework:"Laravel",backend:"Laravel",mainLanguage:"PHP",server:"PHP",apiType:"Laravel Routes"},priority:30,intelligence:"high"},"mix.exs":{frameworks:["Phoenix","Elixir"],slots:{framework:"Phoenix",backend:"Phoenix",mainLanguage:"Elixir",server:"BEAM"},priority:30,intelligence:"high"},"nest-cli.json":{frameworks:["NestJS"],slots:{framework:"NestJS",backend:"NestJS",mainLanguage:"TypeScript",server:"Node.js",apiType:"REST API"},priority:30,intelligence:"high"},"strapi.config.js":{frameworks:["Strapi"],slots:{backend:"Strapi",apiType:"REST API",database:"Required",server:"Node.js"},priority:30,intelligence:"high"},Dockerfile:{frameworks:["Docker"],slots:{hosting:"Docker",connection:"Containerized"},priority:30,intelligence:"high"},"docker-compose.yml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"docker-compose.yaml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"kubernetes.yml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"k8s.yaml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"vercel.json":{frameworks:["Vercel"],slots:{hosting:"Vercel",cicd:"Vercel"},priority:30,intelligence:"high"},"netlify.toml":{frameworks:["Netlify"],slots:{hosting:"Netlify",cicd:"Netlify"},priority:30,intelligence:"high"},"render.yaml":{frameworks:["Render"],slots:{hosting:"Render",cicd:"Render"},priority:30,intelligence:"high"},"fly.toml":{frameworks:["Fly.io"],slots:{hosting:"Fly.io",cicd:"Fly.io"},priority:30,intelligence:"high"},"railway.json":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"railway.toml":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"app.yaml":{frameworks:["Google App Engine"],slots:{hosting:"Google Cloud",cicd:"Google Cloud"},priority:30,intelligence:"high"},Procfile:{frameworks:["Heroku"],slots:{hosting:"Heroku",cicd:"Heroku"},priority:30,intelligence:"high"},"vite.config.js":{frameworks:["Vite"],slots:{buildTool:"Vite"},priority:25,intelligence:"medium"},"vite.config.ts":{frameworks:["Vite"],slots:{buildTool:"Vite",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"webpack.config.js":{frameworks:["Webpack"],slots:{buildTool:"Webpack"},priority:25,intelligence:"medium"},"rollup.config.js":{frameworks:["Rollup"],slots:{buildTool:"Rollup"},priority:25,intelligence:"medium"},"esbuild.config.js":{frameworks:["esbuild"],slots:{buildTool:"esbuild"},priority:25,intelligence:"medium"},"parcel.config.js":{frameworks:["Parcel"],slots:{buildTool:"Parcel"},priority:25,intelligence:"medium"},"snowpack.config.js":{frameworks:["Snowpack"],slots:{buildTool:"Snowpack"},priority:25,intelligence:"medium"},"tsconfig.json":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"jsconfig.json":{frameworks:["JavaScript"],slots:{mainLanguage:"JavaScript"},priority:20,intelligence:"medium"},"babel.config.js":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},".babelrc":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},"jest.config.js":{frameworks:["Jest"],slots:{cicd:"Jest"},priority:25,intelligence:"medium"},"jest.config.ts":{frameworks:["Jest"],slots:{cicd:"Jest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"vitest.config.ts":{frameworks:["Vitest"],slots:{cicd:"Vitest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"cypress.config.js":{frameworks:["Cypress"],slots:{cicd:"Cypress"},priority:25,intelligence:"medium"},"playwright.config.ts":{frameworks:["Playwright"],slots:{cicd:"Playwright",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"karma.conf.js":{frameworks:["Karma"],slots:{cicd:"Karma"},priority:20,intelligence:"medium"},"mocha.opts":{frameworks:["Mocha"],slots:{cicd:"Mocha"},priority:20,intelligence:"medium"},".rspec":{frameworks:["RSpec"],slots:{cicd:"RSpec",mainLanguage:"Ruby"},priority:25,intelligence:"medium"},"pytest.ini":{frameworks:["Pytest"],slots:{cicd:"Pytest",mainLanguage:"Python"},priority:25,intelligence:"medium"},"phpunit.xml":{frameworks:["PHPUnit"],slots:{cicd:"PHPUnit",mainLanguage:"PHP"},priority:25,intelligence:"medium"},"schema.prisma":{frameworks:["Prisma"],slots:{database:"Prisma ORM",connection:"Prisma"},priority:25,intelligence:"medium"},"drizzle.config.ts":{frameworks:["Drizzle"],slots:{database:"Drizzle ORM",connection:"Drizzle",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ormconfig.js":{frameworks:["TypeORM"],slots:{database:"TypeORM",connection:"TypeORM"},priority:25,intelligence:"medium"},"knexfile.js":{frameworks:["Knex.js"],slots:{database:"Knex.js",connection:"Knex.js"},priority:25,intelligence:"medium"},"sequelize.config.js":{frameworks:["Sequelize"],slots:{database:"Sequelize",connection:"Sequelize"},priority:25,intelligence:"medium"},"alembic.ini":{frameworks:["Alembic"],slots:{database:"Alembic",mainLanguage:"Python"},priority:25,intelligence:"medium"},".github/workflows":{frameworks:["GitHub Actions"],slots:{cicd:"GitHub Actions"},priority:25,intelligence:"medium"},".gitlab-ci.yml":{frameworks:["GitLab CI"],slots:{cicd:"GitLab CI"},priority:25,intelligence:"medium"},Jenkinsfile:{frameworks:["Jenkins"],slots:{cicd:"Jenkins"},priority:25,intelligence:"medium"},".circleci/config.yml":{frameworks:["CircleCI"],slots:{cicd:"CircleCI"},priority:25,intelligence:"medium"},".travis.yml":{frameworks:["Travis CI"],slots:{cicd:"Travis CI"},priority:25,intelligence:"medium"},"azure-pipelines.yml":{frameworks:["Azure DevOps"],slots:{cicd:"Azure DevOps"},priority:25,intelligence:"medium"},"bitbucket-pipelines.yml":{frameworks:["Bitbucket Pipelines"],slots:{cicd:"Bitbucket Pipelines"},priority:25,intelligence:"medium"},"tailwind.config.js":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS"},priority:20,intelligence:"medium"},"tailwind.config.ts":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"postcss.config.js":{frameworks:["PostCSS"],slots:{cssFramework:"PostCSS"},priority:20,intelligence:"medium"},"uno.config.ts":{frameworks:["UnoCSS"],slots:{cssFramework:"UnoCSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"styled-components.config.js":{frameworks:["styled-components"],slots:{cssFramework:"styled-components",uiLibrary:"styled-components"},priority:20,intelligence:"medium"},"emotion.config.js":{frameworks:["Emotion"],slots:{cssFramework:"Emotion",uiLibrary:"Emotion"},priority:20,intelligence:"medium"},"metro.config.js":{frameworks:["React Native"],slots:{framework:"React Native",mainLanguage:"JavaScript"},priority:25,intelligence:"medium"},"expo.config.js":{frameworks:["Expo"],slots:{framework:"React Native",buildTool:"Expo"},priority:25,intelligence:"medium"},"app.json":{frameworks:["React Native","Expo"],slots:{framework:"React Native"},priority:20,intelligence:"medium",confirmWith:["expo"]},"capacitor.config.ts":{frameworks:["Capacitor"],slots:{framework:"Capacitor",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ionic.config.json":{frameworks:["Ionic"],slots:{framework:"Ionic",uiLibrary:"Ionic"},priority:25,intelligence:"medium"},"nx.json":{frameworks:["Nx"],slots:{buildTool:"Nx"},priority:25,intelligence:"medium"},"turbo.json":{frameworks:["Turborepo"],slots:{buildTool:"Turborepo"},priority:25,intelligence:"medium"},"lerna.json":{frameworks:["Lerna"],slots:{buildTool:"Lerna"},priority:25,intelligence:"medium"},"rush.json":{frameworks:["Rush"],slots:{buildTool:"Rush"},priority:25,intelligence:"medium"},"pnpm-workspace.yaml":{frameworks:["pnpm workspaces"],slots:{packageManager:"pnpm",buildTool:"pnpm workspaces"},priority:25,intelligence:"medium"},"*.svelte":{frameworks:["Svelte","SvelteKit"],slots:{framework:"Svelte"},priority:15,intelligence:"low"},"*.vue":{frameworks:["Vue"],slots:{framework:"Vue"},priority:15,intelligence:"low"},"*.jsx":{frameworks:["React"],slots:{framework:"React",mainLanguage:"JavaScript"},priority:15,intelligence:"low"},"*.ts":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.tsx":{frameworks:["React","TypeScript"],slots:{framework:"React",mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.py":{frameworks:["Python"],slots:{mainLanguage:"Python"},priority:15,intelligence:"low"},"*.rb":{frameworks:["Ruby"],slots:{mainLanguage:"Ruby"},priority:15,intelligence:"low"},"*.php":{frameworks:["PHP"],slots:{mainLanguage:"PHP"},priority:15,intelligence:"low"},"*.java":{frameworks:["Java"],slots:{mainLanguage:"Java"},priority:15,intelligence:"low"},"*.kt":{frameworks:["Kotlin"],slots:{mainLanguage:"Kotlin"},priority:15,intelligence:"low"},"*.swift":{frameworks:["Swift"],slots:{mainLanguage:"Swift"},priority:15,intelligence:"low"},"*.go":{frameworks:["Go"],slots:{mainLanguage:"Go"},priority:15,intelligence:"low"},"*.rs":{frameworks:["Rust"],slots:{mainLanguage:"Rust"},priority:15,intelligence:"low"},"*.dart":{frameworks:["Flutter","Dart"],slots:{mainLanguage:"Dart"},priority:15,intelligence:"low"},"*.ex":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.exs":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.scala":{frameworks:["Scala"],slots:{mainLanguage:"Scala"},priority:15,intelligence:"low"},"*.clj":{frameworks:["Clojure"],slots:{mainLanguage:"Clojure"},priority:15,intelligence:"low"},"*.lua":{frameworks:["Lua"],slots:{mainLanguage:"Lua"},priority:15,intelligence:"low"},"*.r":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.R":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.jl":{frameworks:["Julia"],slots:{mainLanguage:"Julia"},priority:15,intelligence:"low"},"*.nim":{frameworks:["Nim"],slots:{mainLanguage:"Nim"},priority:15,intelligence:"low"},"*.zig":{frameworks:["Zig"],slots:{mainLanguage:"Zig"},priority:15,intelligence:"low"},"build.zig":{frameworks:["Zig"],slots:{packageManager:"Zig Package Manager",mainLanguage:"Zig",buildTool:"zig build",framework:"Zig",build:"zig build"},priority:35,intelligence:"ultra-high"},"openapi.json":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"openapi.yaml":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"swagger.json":{frameworks:["Swagger"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"graphql.schema":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},"schema.graphql":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},".graphqlconfig":{frameworks:["GraphQL"],slots:{apiType:"GraphQL"},priority:25,intelligence:"medium"},"redux.config.js":{frameworks:["Redux"],slots:{stateManagement:"Redux"},priority:20,intelligence:"medium"},"mobx.config.js":{frameworks:["MobX"],slots:{stateManagement:"MobX"},priority:20,intelligence:"medium"},"vuex.config.js":{frameworks:["Vuex"],slots:{stateManagement:"Vuex",framework:"Vue"},priority:20,intelligence:"medium"},"pinia.config.js":{frameworks:["Pinia"],slots:{stateManagement:"Pinia",framework:"Vue"},priority:20,intelligence:"medium"},"zustand.config.js":{frameworks:["Zustand"],slots:{stateManagement:"Zustand"},priority:20,intelligence:"medium"},".eslintrc.js":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".eslintrc.json":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".prettierrc":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},".prettierrc.json":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},"biome.json":{frameworks:["Biome"],slots:{},priority:15,intelligence:"low"},".editorconfig":{frameworks:["EditorConfig"],slots:{},priority:10,intelligence:"low"},"serverless.yml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"serverless.yaml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"sam.yaml":{frameworks:["AWS SAM"],slots:{hosting:"AWS Lambda",backend:"AWS SAM",cicd:"AWS SAM CLI"},priority:30,intelligence:"high"},"template.yaml":{frameworks:["AWS SAM","CloudFormation"],slots:{hosting:"AWS",backend:"AWS SAM/CloudFormation",cicd:"AWS"},priority:25,intelligence:"medium",confirmWith:["samconfig.toml"]},"amplify.yml":{frameworks:["AWS Amplify"],slots:{hosting:"AWS Amplify",backend:"AWS Amplify",cicd:"AWS Amplify"},priority:30,intelligence:"high"},Podfile:{frameworks:["CocoaPods","iOS"],slots:{packageManager:"CocoaPods",mainLanguage:"Swift/Objective-C",framework:"iOS Native"},priority:30,intelligence:"high"},"build.gradle.kts":{frameworks:["Gradle Kotlin DSL","Android","Kotlin"],slots:{packageManager:"Gradle",mainLanguage:"Kotlin",buildTool:"Gradle Kotlin DSL",framework:"Android"},priority:30,intelligence:"high"},"*.ipynb":{frameworks:["Jupyter","Python"],slots:{mainLanguage:"Python",framework:"Jupyter Notebook"},priority:30,intelligence:"high"},MLproject:{frameworks:["MLflow"],slots:{mainLanguage:"Python",framework:"MLflow",backend:"MLflow",cicd:"MLflow"},priority:30,intelligence:"high"},"dvc.yaml":{frameworks:["DVC","Data Version Control"],slots:{mainLanguage:"Python",framework:"DVC",cicd:"DVC Pipelines"},priority:30,intelligence:"high"},"dvc.lock":{frameworks:["DVC"],slots:{framework:"DVC"},priority:20,intelligence:"medium"},"wrangler.toml":{frameworks:["Cloudflare Workers","Cloudflare"],slots:{hosting:"Cloudflare Workers",backend:"Cloudflare Workers",runtime:"V8 Isolates"},priority:30,intelligence:"high"},"deno.json":{frameworks:["Deno"],slots:{runtime:"Deno",mainLanguage:"TypeScript",packageManager:"Deno"},priority:30,intelligence:"high"},"bun.lockb":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",mainLanguage:"TypeScript/JavaScript"},priority:30,intelligence:"high"},"codecov.yml":{frameworks:["Codecov"],slots:{cicd:"Codecov"},priority:25,intelligence:"high"},"dependabot.yml":{frameworks:["Dependabot","GitHub"],slots:{cicd:"Dependabot"},priority:25,intelligence:"high"},"renovate.json":{frameworks:["Renovate"],slots:{cicd:"Renovate"},priority:25,intelligence:"high"},Makefile:{frameworks:["Make","GNU Make"],slots:{buildTool:"Make"},priority:30,intelligence:"high"},"CMakeLists.txt":{frameworks:["CMake","C","C++"],slots:{buildTool:"CMake",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"meson.build":{frameworks:["Meson","C","C++"],slots:{buildTool:"Meson",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"*.c":{frameworks:["C"],slots:{mainLanguage:"C"},priority:30,intelligence:"high"},"*.cpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cc":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.h":{frameworks:["C","C++"],slots:{mainLanguage:"C/C++"},priority:25,intelligence:"high"},"*.hpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.hxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:20,intelligence:"medium"},".env":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.example":{frameworks:[],slots:{},priority:25,intelligence:"high"},".env.local":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.development":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.production":{frameworks:[],slots:{},priority:20,intelligence:"medium"},"skaffold.yaml":{frameworks:["Skaffold","Kubernetes"],slots:{hosting:"Kubernetes",cicd:"Skaffold"},priority:30,intelligence:"high"},"Chart.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes",backend:"Helm"},priority:30,intelligence:"high"},"values.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes"},priority:25,intelligence:"high",confirmWith:["Chart.yaml"]},"pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"Pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"terragrunt.hcl":{frameworks:["Terragrunt","Terraform"],slots:{hosting:"Cloud",cicd:"Terragrunt"},priority:30,intelligence:"high"},"ansible.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:30,intelligence:"high"},"playbook.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:25,intelligence:"high"},"*.cs":{frameworks:["C#",".NET","Unity"],slots:{mainLanguage:"C#"},priority:30,intelligence:"high"},"*.m":{frameworks:["Objective-C","iOS"],slots:{mainLanguage:"Objective-C"},priority:25,intelligence:"high"},".nvmrc":{frameworks:["Node.js","nvm"],slots:{runtime:"Node.js"},priority:25,intelligence:"high"},".tool-versions":{frameworks:["asdf"],slots:{},priority:25,intelligence:"high"},".ruby-version":{frameworks:["Ruby","rbenv"],slots:{mainLanguage:"Ruby",runtime:"Ruby"},priority:25,intelligence:"high"},".python-version":{frameworks:["Python","pyenv"],slots:{mainLanguage:"Python",runtime:"Python"},priority:25,intelligence:"high"},".dockerignore":{frameworks:["Docker"],slots:{},priority:20,intelligence:"medium"},".gitattributes":{frameworks:["Git"],slots:{},priority:15,intelligence:"low"},".npmrc":{frameworks:["npm","Node.js"],slots:{packageManager:"npm"},priority:20,intelligence:"medium"},"sonar-project.properties":{frameworks:["SonarQube","SonarCloud"],slots:{cicd:"SonarQube"},priority:25,intelligence:"high"},"*.fs":{frameworks:["F#",".NET"],slots:{mainLanguage:"F#"},priority:25,intelligence:"high"},"*.mm":{frameworks:["Objective-C++","iOS","macOS"],slots:{mainLanguage:"Objective-C++"},priority:25,intelligence:"high"},"build.zig.zon":{frameworks:["Zig"],slots:{mainLanguage:"Zig",packageManager:"Zig Package Manager",buildTool:"zig build"},priority:35,intelligence:"ultra-high"},"gleam.toml":{frameworks:["Gleam","BEAM","Erlang"],slots:{mainLanguage:"Gleam",runtime:"BEAM",packageManager:"Gleam"},priority:30,intelligence:"high"},"bunfig.toml":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",buildTool:"Bun"},priority:30,intelligence:"high"},"mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},".mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},"manifest.toml":{frameworks:["Flox","Nix"],slots:{},priority:25,intelligence:"high",confirmWith:[".flox"]},justfile:{frameworks:["Just"],slots:{buildTool:"Just"},priority:25,intelligence:"high"},".pre-commit-config.yaml":{frameworks:["pre-commit"],slots:{cicd:"pre-commit"},priority:25,intelligence:"high"},"CLAUDE.md":{frameworks:["Claude Code"],slots:{},priority:30,intelligence:"high",confirmWith:[".claude"]}};import{existsSync as Z6,readFileSync as uH,readdirSync as kH}from"fs";import{join as t2}from"path";var v0={version:2,_doc:"SINGLE SOURCE of Dart/Flutter detection KNOWLEDGE (A+B hybrid, the Truth-is-faf-cli spec). faf-cli imports this directly; faf-python-sdk vendors a synced copy (phase 2); MCPs compose it. Bolster Dart/Flutter by editing THIS file. Logic stays in dart.ts. Refreshed 2026-08-01 (knowledge v2) — community receipt on top of 6.13.0 Dart Edition.",flutterDeps:["flutter"],mcpDeps:["dart_mcp","mcp_server","mcp_dart","dart_mcp_server","mcp","dart_mcpserver"],serverFrameworks:[["serverpod","Serverpod"],["dart_frog","Dart Frog"],["conduit","Conduit"],["angel3_framework","Angel3"],["alfred","Alfred"],["shelf","Shelf"],["jaspr","Jaspr"],["relic","Relic"]],stateManagement:[["flutter_riverpod","Riverpod"],["hooks_riverpod","Riverpod"],["riverpod_annotation","Riverpod"],["riverpod","Riverpod"],["flutter_bloc","Bloc"],["bloc","Bloc"],["provider","Provider"],["get","GetX"],["flutter_mobx","MobX"],["mobx","MobX"],["signals","Signals"],["flutter_hooks","Hooks"]],routing:[["go_router","go_router"],["auto_route","auto_route"],["beamer","Beamer"],["routemaster","Routemaster"]]};var vH=v0.flutterDeps,mH=v0.mcpDeps,lH=v0.serverFrameworks,pH=v0.stateManagement,dH=v0.routing;function cH($){let Z=new Set,U=!1;for(let X of $.split(`
215
- `)){if(/^(dependencies|dev_dependencies|dependency_overrides):\s*$/.test(X)){U=!0;continue}if(/^\S/.test(X))U=!1;if(U){let Q=X.match(/^\s{2}([a-zA-Z0-9_]+):/);if(Q)Z.add(Q[1].toLowerCase())}}return Z}function D$($){let Z=t2($,"pubspec.yaml");if(!Z6(Z))return null;let U;try{U=uH(Z,"utf-8")}catch{return null}let X=cH(U),Q=(P)=>X.has(P.toLowerCase()),J=vH.some(Q)||/^flutter:\s*$/m.test(U)||/\bsdk:\s*flutter\b/.test(U),z=mH.find(Q),H=lH.find(([P])=>Q(P)),Y=pH.find(([P])=>Q(P)),G=Y?Y[1]:"",_=dH.find(([P])=>Q(P)),q=_?_[1]:"",B=Q("flutter_test")?"flutter_test":Q("test")?"test":"",O=/^executables:\s*$/m.test(U),I=!1;try{I=kH(t2($,"bin")).some((P)=>P.endsWith(".dart"))}catch{}let V=O||I,W,L="",R;if(J)if(L="Flutter",Z6(t2($,"lib","main.dart"))||/^publish_to:\s*['"]?none\b/m.test(U))W="mobile",R="pubspec.yaml (Flutter app)";else W="library",R="pubspec.yaml (Flutter package)";else if(z)W="mcp",R=`pubspec.yaml + ${z} (Dart MCP server)`;else if(H)W="backend",L=H[1],R=`pubspec.yaml + ${H[0]} (Dart backend)`;else if(V)W="cli",R=O?"pubspec.yaml executables: (Dart CLI)":"pubspec.yaml + bin/*.dart (Dart CLI)";else W="library",R="pubspec.yaml (Dart package)";return{appType:W,isFlutter:J,framework:L,stateManagement:G,routing:q,testing:B,found:R}}import{existsSync as e2,readFileSync as Q6,readdirSync as U6,statSync as sH}from"fs";import{join as M$}from"path";var R$={version:1,_doc:"SINGLE SOURCE of Go detection KNOWLEDGE (A+B hybrid, Truth-is-faf-cli). faf-cli imports this directly; SDKs/MCPs compose it. Bolster Go by editing THIS file. Logic stays in go.ts. Content-aware: go.mod ≠ one bucket — backend · CLI · MCP · library. 2026-08-01 initial (Dart composition pattern).",mcpModules:["github.com/mark3labs/mcp-go","github.com/modelcontextprotocol/go-sdk","github.com/metoro-io/mcp-golang","github.com/ThinkInAIXYZ/go-mcp"],serverFrameworks:[["github.com/gin-gonic/gin","Gin"],["github.com/labstack/echo","Echo"],["github.com/labstack/echo/v4","Echo"],["github.com/gofiber/fiber","Fiber"],["github.com/gofiber/fiber/v2","Fiber"],["github.com/go-chi/chi","Chi"],["github.com/go-chi/chi/v5","Chi"],["github.com/gorilla/mux","Gorilla Mux"],["github.com/gofiber/fiber/v3","Fiber"],["google.golang.org/grpc","gRPC"],["connectrpc.com/connect","Connect"],["github.com/go-kratos/kratos","Kratos"],["github.com/go-kratos/kratos/v2","Kratos"],["github.com/zeromicro/go-zero","go-zero"],["github.com/cloudwego/hertz","Hertz"]],cliFrameworks:[["github.com/spf13/cobra","Cobra"],["github.com/urfave/cli","urfave/cli"],["github.com/urfave/cli/v2","urfave/cli"],["github.com/alecthomas/kingpin","Kingpin"],["github.com/alecthomas/kong","Kong"]]};var aH=R$.mcpModules,rH=R$.serverFrameworks,nH=R$.cliFrameworks;function oH($){let Z=new Set,U=!1;for(let X of $.split(`
216
- `)){let Q=X.replace(/\/\/.*$/,"").trim();if(!Q)continue;if(/^require\s*\(\s*$/.test(Q)){U=!0;continue}if(U){if(Q===")"){U=!1;continue}let z=Q.match(/^(\S+)/);if(z)Z.add(z[1].toLowerCase());continue}let J=Q.match(/^require\s+(\S+)/);if(J&&J[1]!=="(")Z.add(J[1].toLowerCase())}return Z}function J6($,Z){let U=Z.toLowerCase();for(let X of $)if(X===U||X.startsWith(`${U}/`))return!0;return!1}function X6($,Z){let U;for(let X of Z){if(!J6($,X[0]))continue;if(!U||X[0].length>U[0].length)U=X}return U}function tH($,Z){let U;for(let X of Z){if(!J6($,X))continue;if(!U||X.length>U.length)U=X}return U}function eH($){let Z=$.match(/^module\s+(\S+)/m);return Z?Z[1]:""}function $G($){let Z=M$($,"cmd");if(!e2(Z))return!1;try{for(let U of U6(Z)){let X=M$(Z,U);try{if(sH(X).isDirectory()){if(U6(X).some((J)=>J.endsWith(".go")))return!0}else if(U.endsWith(".go"))return!0}catch{}}}catch{}return!1}function ZG($){let Z=M$($,"main.go");if(!e2(Z))return!1;try{let U=Q6(Z,"utf-8");return/^package\s+main\b/m.test(U)}catch{return!1}}function K$($){let Z=M$($,"go.mod");if(!e2(Z))return null;let U;try{U=Q6(Z,"utf-8")}catch{return null}let X=eH(U),Q=oH(U),J=tH(Q,aH),z=X6(Q,rH),H=X6(Q,nH),Y=$G($),G=ZG($),_,q="",B;if(J)_="mcp",B=`go.mod + ${J} (Go MCP server)`;else if(z)_="backend",q=z[1],B=`go.mod + ${z[0]} (Go backend)`;else if(H)_="cli",q=H[1],B=`go.mod + ${H[0]} (Go CLI)`;else if(Y)_="cli",B="go.mod + cmd/ (Go CLI layout)";else if(G&&!z)_="cli",B="go.mod + main.go package main (Go CLI)";else _="library",B="go.mod (Go module)";return{appType:_,modulePath:X,framework:q,found:B}}import{existsSync as XG,readFileSync as QG,readdirSync as JG}from"fs";import{join as zG}from"path";var R0={version:1,_doc:"SINGLE SOURCE of C# /.NET detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster C# by editing THIS file. Logic stays in csharp.ts. Content-aware: .csproj alone ≠ type — Sdk first, then props/packages. Kill line: .csproj alone ≠ type. 2026-08-01 initial.",mcpPackages:["ModelContextProtocol","ModelContextProtocol.AspNetCore","ModelContextProtocol.Core","ModelContextProtocol.Extensions.Tasks","ModelContextProtocol.Extensions.Apps"],cliPackages:[["System.CommandLine","System.CommandLine"],["Spectre.Console.Cli","Spectre.Console"],["Spectre.Console","Spectre.Console"],["McMaster.Extensions.CommandLineUtils","McMaster"]],testPackages:[["Microsoft.NET.Test.Sdk","VSTest"],["xunit.v3","xUnit"],["xunit","xUnit"],["NUnit","NUnit"],["MSTest.TestFramework","MSTest"],["MSTest","MSTest"]],grpcServerPackages:["Grpc.AspNetCore"],specializedSdks:[["Microsoft.NET.Sdk.Web","web","ASP.NET Core"],["Microsoft.NET.Sdk.Worker","worker","Worker"],["Microsoft.NET.Sdk.BlazorWebAssembly","blazor-wasm","Blazor WebAssembly"],["Microsoft.NET.Sdk.Razor","razor-lib","Razor Class Library"],["MSTest.Sdk","test","MSTest"],["Aspire.AppHost.Sdk","aspire","Aspire AppHost"]],baseSdk:"Microsoft.NET.Sdk"};var HG=R0.mcpPackages.map(($)=>$.toLowerCase()),GG=R0.cliPackages.map(([$,Z])=>[$.toLowerCase(),Z]),YG=R0.testPackages.map(([$,Z])=>[$.toLowerCase(),Z]),qG=R0.grpcServerPackages.map(($)=>$.toLowerCase()),_G=R0.specializedSdks,z6=R0.baseSdk.toLowerCase();function BG($){let Z=$.match(/<Project\b[^>]*\bSdk\s*=\s*"([^"/]+)(?:\/[^"]*)?"/i),U=$.match(/<Sdk\b[^>]*\bName\s*=\s*"([^"]+)"/i),X=(Z?.[1]||U?.[1]||"").trim(),Q=($.match(/<OutputType>\s*([^<]+?)\s*<\/OutputType>/i)?.[1]||"").trim(),J=$.match(/<TargetFramework>\s*([^<]+?)\s*<\/TargetFramework>/i)?.[1],H=($.match(/<TargetFrameworks>\s*([^<]+?)\s*<\/TargetFrameworks>/i)?.[1]||J||"").trim(),Y=/<IsTestProject>\s*true\s*<\/IsTestProject>/i.test($),G=/<UseMaui>\s*true\s*<\/UseMaui>/i.test($),_=/<UseWPF>\s*true\s*<\/UseWPF>/i.test($),q=/<UseWindowsForms>\s*true\s*<\/UseWindowsForms>/i.test($),B=new Set;for(let I of $.matchAll(/<PackageReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))B.add(I[1].toLowerCase());for(let I of $.matchAll(/<PackageReference\s+Include\s*=\s*"([^"]+)"/gi))B.add(I[1].toLowerCase());let O=new Set;for(let I of $.matchAll(/<FrameworkReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))O.add(I[1].toLowerCase());return{sdk:X,outputType:Q,targetFramework:H,isTestProject:Y,useMaui:G,useWpf:_,useWindowsForms:q,packages:B,frameworkRefs:O}}function $3($,Z){let U=Z.toLowerCase();if($.has(U))return!0;for(let X of $)if(X===U||X.startsWith(`${U}.`))return!0;return!1}function H6($,Z){let U;for(let[X,Q]of Z){if(!$3($,X))continue;if(!U||X.length>U[0].length)U=[X,Q]}return U}function VG($){let Z;for(let U of HG){if(!$3($,U))continue;if(!Z||U.length>Z.length)Z=U}for(let U of $)if(U==="modelcontextprotocol"||U.startsWith("modelcontextprotocol.")){if(!Z||U.length>Z.length)Z=U}return Z}function OG($){let Z=$.toLowerCase();if(!Z)return;let U;for(let X of _G){let Q=X[0].toLowerCase();if(Z===Q||Z.startsWith(`${Q}/`)){if(!U||Q.length>U[0].length)U=X}}return U}function P$($){let Z=$.toLowerCase();return Z==="exe"||Z==="winexe"}function WG($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if($==="backend")return 2;if($==="cli")return 3;if(Z&&Z!=="")return 4;return 5}function IG($,Z){let U=Z.replace(/\.csproj$/i,""),{sdk:X,packages:Q,frameworkRefs:J,outputType:z}=$,H,Y="",G,_=VG(Q),q=OG(X),B=H6(Q,YG),O=H6(Q,GG),I=qG.some((W)=>$3(Q,W)),V=J.has("microsoft.aspnetcore.app");if(_)H="mcp",Y="MCP",G=`${Z} + ${_} (C# MCP server)`;else if($.isTestProject||q?.[1]==="test"||B)H="library",Y=B?.[1]||(q?.[1]==="test"?q[2]:"Test"),G=`${Z} + test (${Y})`;else if($.useMaui)H="mobile",Y="MAUI",G=`${Z} + UseMaui (MAUI)`;else if($.useWpf||$.useWindowsForms)H="backend",Y=$.useWpf&&$.useWindowsForms?"WPF+WinForms":$.useWpf?"WPF":"Windows Forms",G=`${Z} + ${Y}`;else if(q?.[1]==="web")H="backend",Y=I?"gRPC":q[2],G=`${Z} + Sdk=${q[0]}${I?" + Grpc.AspNetCore":""} (ASP.NET Core)`;else if(q?.[1]==="worker")H="backend",Y=q[2],G=`${Z} + Sdk=${q[0]} (Worker)`;else if(q?.[1]==="blazor-wasm")H="backend",Y=q[2],G=`${Z} + Sdk=${q[0]} (Blazor WASM)`;else if(q?.[1]==="aspire")H="backend",Y=q[2],G=`${Z} + Sdk=${q[0]} (Aspire)`;else if(q?.[1]==="razor-lib")H="library",Y=q[2],G=`${Z} + Sdk=${q[0]} (Razor class library)`;else if(V&&P$(z))H="backend",Y="ASP.NET Core",G=`${Z} + FrameworkReference Microsoft.AspNetCore.App (host)`;else if(V&&!P$(z))H="library",Y="ASP.NET Core",G=`${Z} + FrameworkReference Microsoft.AspNetCore.App (web library)`;else if(O&&(P$(z)||!z))H="cli",Y=O[1],G=`${Z} + ${O[0]} (C# CLI)`;else if(P$(z))H="cli",G=`${Z} + OutputType=Exe (C# console)`;else{H="library";let W=X?` Sdk=${X}`:"";if(G=`${Z}${W} (C# class library)`.replace(" Sdk=Microsoft.NET.Sdk",""),!X||X.toLowerCase()===z6||X.toLowerCase().startsWith(`${z6}/`))G=`${Z} (C# class library)`}return{appType:H,projectName:U,targetFramework:$.targetFramework,sdk:X||"Microsoft.NET.Sdk",framework:Y,found:G}}function M1($){if(!XG($))return[];try{return JG($).filter((Z)=>Z.toLowerCase().endsWith(".csproj")).sort()}catch{return[]}}function T$($){let Z=M1($);if(Z.length===0)return null;let U=null,X=999;for(let Q of Z){let J=zG($,Q),z;try{z=QG(J,"utf-8")}catch{continue}let H=BG(z),Y=IG(H,Q),G=WG(Y.appType,Y.framework);if(!U||G<X)U=Y,X=G}return U}var PG=new Set(["node_modules",".git","dist","build","venv",".venv","__pycache__","target","coverage",".next",".svelte-kit","vendor"]),TG=new Set([".py",".ts",".tsx",".js",".jsx",".svelte",".vue",".rb",".go",".rs",".php",".java",".kt",".swift"]),AG={mainLanguage:["project","main_language"],main_language:["project","main_language"],framework:["stack","frontend"],cssFramework:["stack","css_framework"],css:["stack","css_framework"],uiLibrary:["stack","ui_library"],ui_library:["stack","ui_library"],stateManagement:["stack","state_management"],state:["stack","state_management"],backend:["stack","backend"],apiType:["stack","api_type"],api:["stack","api_type"],runtime:["stack","runtime"],database:["stack","database"],db:["stack","database"],connection:["stack","connection"],hosting:["stack","hosting"],buildTool:["stack","build"],build_tool:["stack","build"],build:["stack","build"],packageManager:["stack","package_manager"],pkg_manager:["stack","package_manager"],cicd:["stack","cicd"]},FG=[["packageManager","package-manager"],["pkg_manager","package-manager"],["mainLanguage","language"],["main_language","language"],["framework","framework"],["backend","backend"],["database","database"],["db","database"],["cicd","ci-cd"],["hosting","hosting"],["buildTool","build"],["build_tool","build"],["build","build"],["runtime","runtime"],["cssFramework","css"],["css","css"],["uiLibrary","ui-library"],["stateManagement","state-management"],["apiType","api"],["api","api"]];function NG($,Z){for(let[U,X]of FG)if(U in $)return X;return Z.length>0?"framework":"config"}function bG($){try{let Z=JSON.parse(DG($,"utf-8")),U=["background","content_scripts","action","browser_action","permissions"].some((X)=>(X in Z));if(typeof Z.manifest_version==="number"&&U)return"chrome";return"other"}catch{return"other"}}function wG($){let Z=[],U=KG($),X=LG(Z3($,".git"));for(let Q=0;Q<10;Q++){let J;try{J=G6(U)}catch{break}for(let H of J){if(H.toLowerCase().endsWith(".csproj")){let G=T$(U);if(G){let _={mainLanguage:"C#",packageManager:"NuGet",buildTool:"dotnet"};if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="cli"&&G.framework)_.framework=G.framework;else if(G.appType==="mcp")_.apiType="MCP";else if(G.appType==="mobile"&&G.framework)_.framework=G.framework;if(G.targetFramework)_.runtime=G.targetFramework;let q=G.framework?[G.framework,"C#",".NET"]:["C#",".NET"];Z.push({slots:_,priority:36,frameworks:q,fileName:H})}continue}let Y=o2[H];if(!Y)continue;if(H==="manifest.json"&&bG(Z3(U,H))!=="chrome")continue;if(H==="pubspec.yaml"){let G=D$(U);if(G){let _={mainLanguage:"Dart",packageManager:"pub"};if(G.isFlutter){if(_.framework="Flutter",G.stateManagement)_.stateManagement=G.stateManagement}else if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="mcp")_.apiType="MCP";Z.push({slots:_,priority:Y.priority,frameworks:G.isFlutter?["Flutter","Dart"]:["Dart"],fileName:H});continue}}if(H==="go.mod"){let G=K$(U);if(G){let _={mainLanguage:"Go",packageManager:"go modules",buildTool:"go build"};if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="cli"&&G.framework)_.framework=G.framework;else if(G.appType==="mcp")_.apiType="MCP";let q=G.framework?[G.framework,"Go"]:["Go"];Z.push({slots:_,priority:Y.priority,frameworks:q,fileName:H});continue}}Z.push({slots:Y.slots||{},priority:Y.priority,frameworks:Y.frameworks,fileName:H})}if(X&&Q===0)break;let z=RG(U);if(z===U)break;U=z}return Z}function CG($){let Z=[];for(let U of q6($,2,{count:0})){let X=o2[`*${U}`],Q=X?.slots?.mainLanguage;if(Q)Z.push({slots:{mainLanguage:Q},priority:X.priority,frameworks:X.frameworks})}return Z}function Y6($){let Z=[...wG($),...CG($)],U={},X={},Q=new Set;for(let G of Z){G.frameworks.forEach((_)=>Q.add(_));for(let[_,q]of Object.entries(G.slots))if(q&&!q.includes("/")&&(!(_ in U)||G.priority>X[_]))U[_]=q,X[_]=G.priority}let J=new Map;for(let G of Z){if(!G.fileName)continue;if(!J.has(G.fileName))J.set(G.fileName,{fileName:G.fileName,category:NG(G.slots,G.frameworks),priority:G.priority})}let z=[...J.values()].sort((G,_)=>_.priority-G.priority||G.fileName.localeCompare(_.fileName)),H=[];if(U.mainLanguage)H.push(U.mainLanguage.toLowerCase());if(U.framework)H.push(U.framework.toLowerCase());let Y=H.length>0?H.join("-"):"unknown-stack";return{slotFills:U,frameworks:[...Q],confirmedCount:Z.length,discoveredFormats:z,stackSignature:Y}}function U3($){let{slotFills:Z}=Y6($),U={};for(let[X,Q]of Object.entries(Z)){let J=AG[X];if(!J||!Q)continue;let[z,H]=J;if(z==="project")(U.project??={})[H]=Q;else(U.stack??={})[H]=Q}return U}function q6($,Z,U){let X=new Set;if(Z<0||U.count>400)return X;let Q;try{Q=G6($,{withFileTypes:!0})}catch{return X}for(let J of Q){if(U.count++>400)break;if(!J.isDirectory()){let z=MG(J.name);if(TG.has(z))X.add(z);continue}if(PG.has(J.name)||J.name.startsWith("."))continue;for(let z of q6(Z3($,J.name),Z-1,U))X.add(z)}return X}import{existsSync as _6,readFileSync as B6}from"fs";import{join as V6}from"path";var f=($,Z,U)=>({value:$,source:Z,confidence:U});function O6($){let Z=jG($),U=SG($),X={},Q=(J,z)=>{if(z)X[J]=z};return Q("what",EG(Z,U)),Q("who",gG(U)),Q("why",yG(U)),Q("where",hG(Z,U)),Q("when",xG(U)),Q("how",fG(Z,U)),X}function X3($){let Z=O6($),U={};return Object.keys(Z).forEach((X)=>{let Q=Z[X];if(Q)U[X]=Q.value}),U}function jG($){let Z=V6($,"package.json");if(!_6(Z))return null;try{return JSON.parse(B6(Z,"utf-8"))}catch{return null}}function SG($){let Z=V6($,"README.md");if(!_6(Z))return"";let U;try{U=B6(Z,"utf-8")}catch{return""}return U.split(`
213
+ `}function BH($,Z,U,X="project.faf"){QH(zH($,"project.html"),y6(Z,U,X),"utf-8")}import{writeFileSync as VH}from"fs";import{join as OH}from"path";var f6="application/vnd.faf+yaml",WH="https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",DH=/^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;function k6($){let Z=String($.project?.name??"project").trim();if(Z.includes("/")&&DH.test(Z))return Z;let U=$.project?.homepage??$.project?.website??$.project?.url,X="local";if(U)try{X=new URL(U).hostname.replace(/^www\./,"").split(".").reverse().join(".")}catch{}let Q=Z.replace(/[^a-zA-Z0-9._-]/g,"-").replace(/^-+|-+$/g,"")||"project";return`${X}/${Q}`}function IH($){let Z=String($.project?.goal??$.context??$.project?.name??"MCP server").replace(/\s+/g," ").trim();if(!Z)return"MCP server";return Z.length<=100?Z:`${Z.slice(0,97).trimEnd()}...`}function a2($,Z={}){return{faf:Z.fafPointer??"./project.faf",mediaType:f6,iana:`https://www.iana.org/assignments/media-types/${f6}`,deterministic:!0,...Z.scoreEndpoint?{scoreEndpoint:Z.scoreEndpoint}:{},generated:$.generated??Z.now??new Date().toISOString()}}function v6($,Z={}){let U={$schema:WH,name:k6($),version:String($.project?.version??"0.1.0"),description:IH($)},X=MH($)??$.project?.name;if(X&&X.length<=100)U.title=X;let Q=$.project?.homepage??$.project?.website??$.project?.url;if(Q)U.websiteUrl=Q;if(Z.remoteUrl)U.remotes=[{type:"streamable-http",url:Z.remoteUrl}];return U._meta={"one.faf/context":a2($,Z)},U}var m6="io.modelcontextprotocol.registry/publisher-provided",u6=4096;function LH($,Z={}){let U={"one.faf/context":a2($,Z)},X=new TextEncoder().encode(JSON.stringify(U)).length;if(X>u6)throw Error(`publisher-provided _meta is ${X}B — exceeds the registry ${u6}B cap`);return{[m6]:U}}function RH($){return k6($)}function MH($){let Z=$.project?.title;if(typeof Z==="string"){let U=Z.trim();if(U&&U.length<=100)return U}return}function KH($,Z,U={}){let X=v6(Z,U),Q=OH($,"server-card");return VH(Q,`${JSON.stringify(X,null,2)}
214
+ `,"utf-8"),Q}var n2=["ephemeral","standard","high","critical"],B0=Object.fromEntries(n2.map(($,Z)=>[$,Z])),F$=new Set(["user","feedback","project","reference"]),o2=new Set(["version","profile","namepoint","created","last_etched","retention","index","memory"]),t2=new Set(["facts","sessions","preferences","custom"]),e2={low:"ephemeral",medium:"standard"};import{readFileSync as FH,writeFileSync as PH,existsSync as AH}from"fs";function m0(){return new Date().toISOString().replace(/\.\d{3}Z$/,"Z")}function u($){return $===null||$===void 0}function F1($){if(u($))return"standard";if(e2[$])return e2[$];if($ in B0)return $;return"standard"}var TH=new Set(["text","id","type","priority","tags","links","timestamp","source"]);function p6($){if(typeof $==="string")return{text:$,id:null,type:null,priority:"standard",tags:[],links:[],timestamp:null,source:null,extra:{}};if(!$||typeof $!=="object"||!("text"in $))throw Error(`fact must be a string or a mapping with 'text': ${JSON.stringify($)}`);let Z=$,U={};for(let[X,Q]of Object.entries(Z))if(!TH.has(X))U[X]=Q;return{text:String(Z.text),id:Z.id??null,type:Z.type??null,priority:F1(Z.priority),tags:Array.isArray(Z.tags)?Z.tags.slice():[],links:Array.isArray(Z.links)?Z.links.slice():[],timestamp:Z.timestamp??null,source:Z.source??null,extra:U}}function l6($){if(u($.id)&&u($.type)&&$.tags.length===0&&$.links.length===0&&u($.timestamp)&&u($.source)&&Object.keys($.extra).length===0&&$.priority==="standard")return $.text;let U={text:$.text};if(!u($.id))U.id=$.id;if(!u($.type))U.type=$.type;if(U.priority=$.priority,$.tags.length)U.tags=$.tags;if($.links.length)U.links=$.links;if(!u($.timestamp))U.timestamp=$.timestamp;if(!u($.source))U.source=$.source;return Object.assign(U,$.extra),U}class K0{namepoint;profile;retention;created;last_etched;_facts;_byId;_index;_sessions;_preferences;_custom;_extra;_memoryExtra;constructor($,Z={}){this.namepoint=$,this.profile=Z.profile??"knowledge",this.retention=Z.retention??"forever",this.created=Z.created??m0(),this.last_etched=this.created,this._facts=Z.facts?Z.facts.slice():[],this._byId=new Map,this._facts.forEach((U,X)=>{if(!u(U.id))this._byId.set(U.id,X)}),this._index=Z.index?Z.index.slice():[],this._sessions=Z.sessions?structuredClone(Z.sessions):[],this._preferences=Z.preferences?{...Z.preferences}:{},this._custom=Z.custom?{...Z.custom}:{},this._extra=Z.extra?{...Z.extra}:{},this._memoryExtra=Z.memoryExtra?{...Z.memoryExtra}:{}}get facts(){return this._facts}get index(){return this._index}get sessions(){return this._sessions}get preferences(){return this._preferences}get custom(){return this._custom}get extra(){return this._extra}get memoryExtra(){return this._memoryExtra}static load($){if(!AH($))throw Error(`soul file not found: ${$}`);let Z=FH($,"utf-8"),U=$0(Z);if(!U||typeof U!=="object")throw Error("soul is not a YAML mapping");let X=U.memory&&typeof U.memory==="object"?U.memory:{},Q=Array.isArray(X.facts)?X.facts:[],z={};for(let[q,Y]of Object.entries(U))if(!o2.has(q))z[q]=structuredClone(Y);let J={};for(let[q,Y]of Object.entries(X))if(!t2.has(q))J[q]=structuredClone(Y);let H=new K0(String(U.namepoint??$.replace(/.*\//,"").replace(/\.fafm$/,"")),{profile:String(U.profile??"voice"),facts:Q.map(p6),retention:String(U.retention??"forever"),created:U.created??null,index:Array.isArray(U.index)?U.index.slice():[],sessions:Array.isArray(X.sessions)?structuredClone(X.sessions):[],preferences:X.preferences&&typeof X.preferences==="object"?structuredClone(X.preferences):{},custom:X.custom&&typeof X.custom==="object"?structuredClone(X.custom):{},extra:z,memoryExtra:J});return H.last_etched=String(U.last_etched??H.created),H}static fromFile($){return K0.load($)}toDoc(){let $={facts:this._facts.map(l6),sessions:structuredClone(this._sessions),preferences:structuredClone(this._preferences),custom:structuredClone(this._custom)};for(let[U,X]of Object.entries(this._memoryExtra))if(!t2.has(U))$[U]=structuredClone(X);let Z={version:"1.1",profile:this.profile,namepoint:this.namepoint,created:this.created,last_etched:this.last_etched,retention:this.retention,index:this._index.slice(),memory:$};for(let[U,X]of Object.entries(this._extra))if(!o2.has(U))Z[U]=structuredClone(X);return Z}toYaml(){return M$(this.toDoc(),{lineWidth:100})}rebuildIndex($=80){return this._index=this._facts.map((Z)=>`${Z.id??"?"} — ${Z.text.slice(0,$)}`),this._index}save($,Z={}){if(Z.reindex!==!1)this.rebuildIndex();return PH($,this.toYaml(),"utf-8"),$}toFile($,Z={}){return this.save($,Z)}add($){if(!u($.id)&&this._byId.has($.id)){let Z=this._byId.get($.id);if(Z!==void 0)this._facts[Z]=$}else if(this._facts.push($),!u($.id))this._byId.set($.id,this._facts.length-1);if($.timestamp&&$.timestamp>(this.last_etched||""))this.last_etched=$.timestamp;return $}etch($,Z={}){return this.add({text:$,id:Z.id??null,type:Z.type??null,priority:F1(Z.priority),tags:Z.tags?Z.tags.slice():[],links:Z.links?Z.links.slice():[],timestamp:m0(),source:Z.source??null,extra:{}})}recall($,Z={}){let U=B0[F1(Z.minPriority??"ephemeral")]??0,X=($??"").toLowerCase(),Q=new Set(Z.tags??[]),z=[];this._facts.forEach((H,q)=>{if(X&&!H.text.toLowerCase().includes(X))return;if(Q.size>0&&![...Q].some((Y)=>H.tags.includes(Y)))return;if(!u(Z.type)&&H.type!==Z.type)return;if((B0[H.priority]??1)<U)return;z.push([q,H])}),z.sort((H,q)=>{let Y=B0[H[1].priority]??1,G=B0[q[1].priority]??1;if(G!==Y)return G-Y;let _=H[1].timestamp??"",B=q[1].timestamp??"";if(B!==_)return B<_?-1:B>_?1:0;return q[0]-H[0]});let J=z.map(([,H])=>H);if(!u(Z.limit))return J.slice(0,Z.limit);return J}getFact($){let Z=this._byId.get($);return Z===void 0?null:this._facts[Z]}deleteFact($){let Z=this._byId.get($);if(Z===void 0)return!1;return this._facts.splice(Z,1),this._byId.clear(),this._facts.forEach((U,X)=>{if(!u(U.id))this._byId.set(U.id,X)}),!0}}import{readdirSync as NH,readFileSync as wH,statSync as d6,existsSync as CH}from"fs";import{join as bH,basename as c6,resolve as SH}from"path";var i6=new Set(["MEMORY.md","MEMORY-FULL.md","README.md"]),EH=/\[\[([^\]]+)\]\]/g;function jH($){let Z=d6($).mtimeMs;return new Date(Z).toISOString().replace(/\.\d{3}Z$/,"Z")}function gH($){if(!$.startsWith("---"))return{fm:null,body:$};let Z=$.split("---");if(Z.length<3)return{fm:null,body:$};try{let U=$0(Z[1]);if(!U||typeof U!=="object")return{fm:null,body:Z.slice(2).join("---").trim()};return{fm:U,body:Z.slice(2).join("---").trim()}}catch{return{fm:null,body:$}}}function xH($,Z,U){if(!U.name)return null;let X=U.metadata&&typeof U.metadata==="object"?U.metadata:{},Q=X.type;if(typeof Q!=="string"||!F$.has(Q))return null;let z=String(U.name).trim(),H=(U.description!==void 0&&U.description!==null&&String(U.description).trim()?String(U.description).trim():"")||z,q={};if(X.originSessionId)q.provenance=[`session:${X.originSessionId}`];let Y=[...new Set([...Z.matchAll(EH)].map((G)=>G[1]))].sort();return{text:H,id:z,type:Q,priority:"standard",tags:[],links:Y,timestamp:jH($),source:`claude-code memory: ${c6($)}`,extra:q}}function r6($,Z={}){let U=SH($);if(!CH(U))throw Error(`Claude memory directory not found: ${U}`);if(!d6(U).isDirectory())throw Error(`Claude memory path is not a directory: ${U}`);let X=Z.skip??i6,Q=Z.namepoint??`@claude-code:${c6(U)}`,z=[],J=NH(U).filter((_)=>_.endsWith(".md")).sort();for(let _ of J){if(X.has(_))continue;let B=bH(U,_),O;try{O=wH(B,"utf-8")}catch{continue}let{fm:D,body:V}=gH(O);if(!D)continue;let W=xH(B,V,D);if(W)z.push(W)}let H=z.map((_)=>_.timestamp).filter(Boolean),q=H.length?H.reduce((_,B)=>_<B?_:B):m0(),Y=H.length?H.reduce((_,B)=>_>B?_:B):q,G=new K0(Q,{profile:"knowledge",facts:z,created:q});return G.last_etched=Y,G.rebuildIndex(),G}var t6="faf-interview/1",p0="(terse — 3-4 words)",$3=[{path:"project.name",question:"What is the name of this project?",header:"Name",type:"text",required:!0},{path:"project.goal",question:"What does this project do? (one sentence)",header:"Goal",type:"text",required:!0},{path:"human_context.who",question:`Who is this for? ${p0}`,header:"Who",type:"text",required:!0},{path:"human_context.what",question:`What are they building? ${p0}`,header:"What",type:"text",required:!0},{path:"human_context.why",question:`Why does it exist? ${p0}`,header:"Why",type:"text",required:!0},{path:"human_context.where",question:`Where does it run or ship? ${p0}`,header:"Where",type:"text",required:!0},{path:"human_context.when",question:`When — timeline or stage? ${p0}`,header:"When",type:"text",required:!0},{path:"human_context.how",question:`How is it built or used? ${p0}`,header:"How",type:"text",required:!0}],e6=[{path:"project.main_language",question:"What is the primary programming language?",header:"Language",type:"select",required:!0,options:[{label:"TypeScript",value:"TypeScript",description:"JavaScript with types"},{label:"JavaScript",value:"JavaScript",description:"Vanilla JS or Node.js"},{label:"Python",value:"Python",description:"Python 3.x"},{label:"Rust",value:"Rust",description:"Systems programming"},{label:"Go",value:"Go",description:"Golang"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.frontend",question:"What frontend framework does it use?",header:"Frontend",type:"select",required:!1,options:[{label:"React",value:"React",description:"React.js"},{label:"Vue",value:"Vue",description:"Vue.js"},{label:"Svelte",value:"Svelte",description:"Svelte/SvelteKit"},{label:"Next.js",value:"Next.js",description:"React framework"},{label:"None",value:"None",description:"No frontend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.backend",question:"What backend framework does it use?",header:"Backend",type:"select",required:!1,options:[{label:"Express",value:"Express",description:"Node.js Express"},{label:"Fastify",value:"Fastify",description:"Node.js Fastify"},{label:"Django",value:"Django",description:"Python Django"},{label:"FastAPI",value:"FastAPI",description:"Python FastAPI"},{label:"None",value:"None",description:"No backend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.database",question:"What database does it use?",header:"Database",type:"select",required:!1,options:[{label:"PostgreSQL",value:"PostgreSQL",description:"Postgres"},{label:"MySQL",value:"MySQL",description:"MySQL/MariaDB"},{label:"SQLite",value:"SQLite",description:"Embedded SQL"},{label:"MongoDB",value:"MongoDB",description:"Document store"},{label:"None",value:"None",description:"No database"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.runtime",question:"What runtime does it run on?",header:"Runtime",type:"text",required:!1},{path:"stack.hosting",question:"Where is it hosted or distributed?",header:"Hosting",type:"text",required:!1},{path:"stack.build",question:"What is the build tool?",header:"Build",type:"text",required:!1},{path:"stack.cicd",question:"What CI/CD does it use?",header:"CI/CD",type:"text",required:!1}],l0=[...$3,...e6],$9=new Map(l0.map(($)=>[$.path,$])),hH=Object.fromEntries(l0.map(($)=>[$.path,$]));function Z3($){let Z=$9.get($);if(Z)return Z.question;let U=s0.get($)??y.find((X)=>X.canonical===$);return U?`${U.description}?`.replace(/\?\?$/,"?"):`${$}?`}function yH($,Z){return l0.filter((U)=>{let X=U.path.split("."),Q=$;for(let z of X)if(Q&&typeof Q==="object"&&z in Q)Q=Q[z];else{Q=void 0;break}if(Q==="slotignored")return!1;return Z(Q)})}var fH=new Set(["developers","development teams","development team","teams","development","cloud platform","web platform","platform","best practices","improve development efficiency","development efficiency","modern development practices","modern development","test-driven development","production/stable","production","stable","app","project","tool"]),uH=[["npm",/\bnpm\b/i],["PyPI",/\bpypi\b/i],["crates.io",/\bcrates\.io\b/i],["Homebrew",/\bhomebrew\b/i],["Docker",/\bdocker\b/i],["Cloudflare",/\bcloudflare\b/i],["Vercel",/\bvercel\b/i],["Netlify",/\bnetlify\b/i],["AWS",/\baws\b/i],["Cloud Run",/\bcloud run\b/i],["edge",/\bedge\b/i],["browser",/\bbrowser\b/i],["WASM",/\bwasm\b/i],["GitHub",/\bgithub\b/i],["MCP Registry",/\bmcp registry\b/i],["Chrome Web Store",/\bchrome web store\b/i],["Smithery",/\bsmithery\b/i]],s6=($)=>fH.has($.toLowerCase().trim()),kH=/^(?:with|and|or|using|for|to|that|who|whom|whose|the|a|an|in|on|of|via|by|&)$/i;function a6($,Z=5){let U=$.trim().split(/\s+/).filter(Boolean).slice(0,Z);while(U.length&&kH.test(U[U.length-1].replace(/[.,;:]+$/,"")))U.pop();return U.join(" ")}function Z9($){let Z={};if(!$||typeof $!=="string")return Z;let U=$.trim(),X=U.replace(/^[^A-Za-z0-9]+/,"").split(/\s+(?:for|that|which|to)\s+|\s+[—–]\s+|\s-\s|:\s|\.\s|,\s/)[0].trim(),Q=a6(X);if(Q.split(/\s+/).filter(Boolean).length>=2&&!s6(Q))Z.what=Q;let z=uH.filter(([,q])=>q.test(U)).map(([q])=>q);if(z.length)Z.where=z.slice(0,4).join(", ");let J=U.match(/\bfor ((?:[A-Za-z][\w./+-]* )?(?:any |all )?(?:developers?|teams?|engineers?|builders?|users?|integrators?)\b[^.,;:—]*)/i),H=a6((J?.[1]||"").trim().replace(/\s+/g," "));if(H&&!s6(H))Z.who=H;return Z}function n6($,Z){let U=$;for(let X of Z.split("."))if(U&&typeof U==="object"&&X in U)U=U[X];else return;return U}function o6($){if(typeof $!=="string")return!1;let Z=$.trim();if(!Z||Z==="slotignored")return!1;return!V0(Z)}function vH($,Z={}){let U=$&&typeof $==="object"?$:{},X=n6(U,"project.goal"),Q=(o6(X)?String(X).trim():"")||(Z.goal??"").trim(),z=Z9(Q),J=Z.detailed??{},H={"project.goal":Q||void 0,"human_context.what":z.what,"human_context.where":z.where,"human_context.who":z.who},q=(O)=>{let D=H[O];if(D)return{value:D,source:"project goal",confidence:0.9};let V=O.startsWith("human_context.")?O.slice(14):"",W=V?J[V]:void 0;return W?{value:W.value,source:W.source,confidence:W.confidence}:void 0},Y=$3.map((O,D)=>{let V={n:D+1,path:O.path,header:O.header,question:O.question},W=n6(U,O.path);if(o6(W))return{...V,value:String(W).trim(),status:"filled",seeded:!1};let I=q(O.path);if(I)return{...V,value:I.value,status:"seeded",seeded:!0,source:I.source,confidence:I.confidence};return{...V,value:"",status:"empty",seeded:!1}}),G=Y.filter((O)=>O.status==="filled").length,_=Y.filter((O)=>O.status==="seeded").length,B=Y.filter((O)=>O.status==="empty").length;return{version:t6,rows:Y,filledCount:G,seededCount:_,emptyCount:B,complete:B===0}}function P$($){if($===null||$===void 0)return!0;if(typeof $==="string"){let Z=$.trim();return Z===""||V0(Z)}return!1}function mH($,Z){let U=$;for(let X of Z.split("."))if(U&&typeof U==="object"&&X in U)U=U[X];else return;return U}function U9($){if($==="project.goal")return!0;return s0.get($)?.category==="human"}function X9($,Z=P$){let U=[],X=[];for(let Q of l0){let z=mH($,Q.path);if(z==="slotignored")continue;if(!Z(z))continue;(U9(Q.path)?U:X).push(Q.path)}return{human:U,sourceable:X}}function Q9($,Z,U=P$){let X=X9(Z,U),Q;if($>=100||X.human.length===0&&X.sourceable.length===0)Q="done";else if(X.sourceable.length>0)Q="can-source";else Q="needs-human";let z=Q==="needs-human"?U3(X):[];return{status:Q,score:$,gaps:X,ask:z}}function U3($){return $.human.map((Z)=>({path:Z,question:Z3(Z)}))}function pH($,Z={}){let U=Math.max(1,Z.maxRounds??5),X=Z.isEmpty??P$,Q=[],z=0;for(let H=0;H<=U;H++){let q=$.read();if(!q)return{status:"no-faf",score:0,rounds:z,history:Q,ask:[]};let Y=$.score(q.yaml);Q.push(Y);let G=Q9(Y,q.data,X);if(G.status==="done")return{status:"done",score:Y,rounds:z,history:Q,ask:[]};if(G.status==="needs-human")return{status:"needs-human",score:Y,rounds:z,history:Q,ask:G.ask};if(Q.length>=2&&Y<=Q[Q.length-2])return G.gaps.human.length?{status:"needs-human",score:Y,rounds:z,history:Q,ask:U3(G.gaps)}:{status:"stuck",score:Y,rounds:z,history:Q,ask:[]};if(z>=U)return{status:"capped",score:Y,rounds:z,history:Q,ask:U3(G.gaps)};$.runAuto(),z++}return{status:"capped",score:Q[Q.length-1]??0,rounds:z,history:Q,ask:[]}}import{createHash as J9}from"crypto";var X3="faf-bench/1",lH={"project.name":"What is the project's name?","project.goal":"What is the project's goal — what is it for?","project.main_language":"What is the primary programming language?","human_context.who":"Who is this project for?","human_context.what":"What are they building?","human_context.why":"Why does this project exist?","human_context.where":"Where does it run or get distributed?","human_context.when":"When — what is the project's timeline or stage?","human_context.how":"How is it built or used?"};function dH($,Z){return lH[$]??`What is the project's ${Z.replace(/\s*\(.*\)$/,"").toLowerCase()}?`}var H9=[["typescript","ts"],["javascript","js"],["python","py","python3"],["node","nodejs","node js","node.js"],["github actions","gh actions","actions"],["postgresql","postgres","pg"],["kubernetes","k8s"],["npm","npm registry"],["cloudflare workers","cf workers","workers"],["google cloud run","cloud run","gcp cloud run"]],P1=new Map;H9.forEach(($,Z)=>$.forEach((U)=>P1.set(U,Z)));var cH=new Set(["a","an","the","and","or","of","for","to","in","on","with","is","it","its","their","your","via","by","using","use","used"]);function A$($){return $.toLowerCase().replace(/[^a-z0-9\s.+#-]/g," ").replace(/\.(?=\s|$)/g," ").replace(/\s+/g," ").trim()}function z9($){return A$($).split(" ").filter((Z)=>Z&&!cH.has(Z))}function q9($,Z){let U=A$($),X=A$(Z);if(!U||!X)return!1;if(U===X)return!0;let Q=P1.get(U);if(Q!==void 0&&P1.get(X)===Q)return!0;let z=z9($);if(z.length===0)return!1;let J=new Set(z9(Z));return z.every((H)=>{if(J.has(H))return!0;let q=P1.get(H);return q!==void 0&&[...J].some((Y)=>P1.get(Y)===q)})}function iH($){let Z=f$($),U=$0($),X=[],Q={},z=0;for(let q of y){if(Z.slots[q.path]!=="populated")continue;let Y=L3(U,q);if(typeof Y!=="string")continue;let G=Y.trim();if(!G||S1.has(G.toLowerCase()))continue;z+=1,X.push({n:z,path:q.path,question:dH(q.path,q.description)}),Q[z]=G}let J=JSON.stringify({v:X3,q:X.map((q)=>[q.path,q.question])}),H=J9("sha256").update(J).digest("hex").slice(0,12);return{version:X3,qsetHash:H,questions:X,answers:Q}}function rH($){return{version:$.version,qsetHash:$.qsetHash,questions:$.questions}}function sH($,Z){let U=$.questions.map((Q)=>{let z=Z[String(Q.n)]??Z[Q.path]??"";return{n:Q.n,path:Q.path,ok:typeof z==="string"&&z.trim()!==""&&q9($.answers[Q.n],z)}}),X=$.questions.filter((Q)=>!U[Q.n-1].ok);return{correct:U.filter((Q)=>Q.ok).length,total:$.questions.length,misses:X,perQuestion:U}}function aH($,Z){let U=JSON.stringify({v:$.version,repo:Z??null,qset:$.qsetHash,protocol:$.protocol,cold:$.cold??null,faf:$.faf??null});return{projection:U,hash:J9("sha256").update(U).digest("hex")}}import{existsSync as tq,readdirSync as M9,readFileSync as eq}from"fs";import{join as Y3,dirname as $Y,extname as ZY,resolve as UY}from"path";var Q3={"package.json":{frameworks:["Node.js","JavaScript","TypeScript"],slots:{packageManager:"npm/yarn/pnpm",mainLanguage:"JavaScript/TypeScript"},priority:35,intelligence:"ultra-high"},"README.md":{frameworks:[],slots:{targetUser:"developers",coreProblem:"understanding project",missionPurpose:"project documentation"},priority:25,intelligence:"high"},"requirements.txt":{frameworks:["Python"],slots:{packageManager:"pip",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},Pipfile:{frameworks:["Python"],slots:{packageManager:"pipenv",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},"pyproject.toml":{frameworks:["Python"],slots:{mainLanguage:"Python",runtime:"Python",backend:"Python"},priority:36,intelligence:"ultra-high"},Gemfile:{frameworks:["Ruby","Rails"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:35,intelligence:"ultra-high"},"composer.json":{frameworks:["PHP","Laravel","Symfony"],slots:{packageManager:"composer",mainLanguage:"PHP"},priority:35,intelligence:"ultra-high"},"Cargo.toml":{frameworks:["Rust"],slots:{packageManager:"cargo",mainLanguage:"Rust",buildTool:"cargo"},priority:36,intelligence:"ultra-high"},"go.mod":{frameworks:["Go"],slots:{packageManager:"go modules",mainLanguage:"Go",buildTool:"go build"},priority:36,intelligence:"ultra-high"},"*.csproj":{frameworks:["C#",".NET"],slots:{packageManager:"NuGet",mainLanguage:"C#",buildTool:"dotnet"},priority:36,intelligence:"ultra-high"},"pubspec.yaml":{frameworks:["Dart"],slots:{packageManager:"pub",mainLanguage:"Dart"},priority:35,intelligence:"ultra-high"},"pom.xml":{frameworks:["Java"],slots:{packageManager:"maven",mainLanguage:"Java",buildTool:"maven"},priority:35,intelligence:"ultra-high"},"build.gradle":{frameworks:["Java","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"settings.gradle":{frameworks:["Java","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java",buildTool:"gradle"},priority:34,intelligence:"high"},"settings.gradle.kts":{frameworks:["Kotlin","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Kotlin",buildTool:"gradle"},priority:34,intelligence:"high"},"next.config.js":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.mjs":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.ts":{frameworks:["Next.js 13+"],slots:{framework:"Next.js 13+",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.js":{frameworks:["Nuxt 2"],slots:{framework:"Nuxt 2",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.ts":{frameworks:["Nuxt 3"],slots:{framework:"Nuxt 3",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"svelte.config.js":{frameworks:["SvelteKit"],slots:{framework:"SvelteKit",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"angular.json":{frameworks:["Angular"],slots:{framework:"Angular",buildTool:"Angular CLI",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manifest.json":{frameworks:["Chrome Extension","Browser Extension"],slots:{framework:"Chrome Extension",runtime:"Chrome/Browser",mainLanguage:"JavaScript",hosting:"Chrome Web Store",apiType:"Chrome APIs"},priority:35,intelligence:"ultra-high",confirmWith:["popup.html","background.js","content.js"]},"vue.config.js":{frameworks:["Vue"],slots:{framework:"Vue",buildTool:"Vue CLI",mainLanguage:"JavaScript"},priority:30,intelligence:"high"},"remix.config.js":{frameworks:["Remix"],slots:{framework:"Remix",runtime:"Node.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.js":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.ts":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"astro.config.mjs":{frameworks:["Astro"],slots:{framework:"Astro",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"redwood.toml":{frameworks:["RedwoodJS"],slots:{framework:"RedwoodJS",buildTool:"Webpack",mainLanguage:"JavaScript/TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"blitz.config.ts":{frameworks:["Blitz.js"],slots:{framework:"Blitz.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"qwik.config.ts":{frameworks:["Qwik"],slots:{framework:"Qwik",buildTool:"Vite",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manage.py":{frameworks:["Django"],slots:{framework:"Django",backend:"Django",mainLanguage:"Python",server:"Django",apiType:"Django Views"},priority:30,intelligence:"high"},artisan:{frameworks:["Laravel"],slots:{framework:"Laravel",backend:"Laravel",mainLanguage:"PHP",server:"PHP",apiType:"Laravel Routes"},priority:30,intelligence:"high"},"mix.exs":{frameworks:["Phoenix","Elixir"],slots:{framework:"Phoenix",backend:"Phoenix",mainLanguage:"Elixir",server:"BEAM"},priority:30,intelligence:"high"},"nest-cli.json":{frameworks:["NestJS"],slots:{framework:"NestJS",backend:"NestJS",mainLanguage:"TypeScript",server:"Node.js",apiType:"REST API"},priority:30,intelligence:"high"},"strapi.config.js":{frameworks:["Strapi"],slots:{backend:"Strapi",apiType:"REST API",database:"Required",server:"Node.js"},priority:30,intelligence:"high"},Dockerfile:{frameworks:["Docker"],slots:{hosting:"Docker",connection:"Containerized"},priority:30,intelligence:"high"},"docker-compose.yml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"docker-compose.yaml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"kubernetes.yml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"k8s.yaml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"vercel.json":{frameworks:["Vercel"],slots:{hosting:"Vercel",cicd:"Vercel"},priority:30,intelligence:"high"},"netlify.toml":{frameworks:["Netlify"],slots:{hosting:"Netlify",cicd:"Netlify"},priority:30,intelligence:"high"},"render.yaml":{frameworks:["Render"],slots:{hosting:"Render",cicd:"Render"},priority:30,intelligence:"high"},"fly.toml":{frameworks:["Fly.io"],slots:{hosting:"Fly.io",cicd:"Fly.io"},priority:30,intelligence:"high"},"railway.json":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"railway.toml":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"app.yaml":{frameworks:["Google App Engine"],slots:{hosting:"Google Cloud",cicd:"Google Cloud"},priority:30,intelligence:"high"},Procfile:{frameworks:["Heroku"],slots:{hosting:"Heroku",cicd:"Heroku"},priority:30,intelligence:"high"},"vite.config.js":{frameworks:["Vite"],slots:{buildTool:"Vite"},priority:25,intelligence:"medium"},"vite.config.ts":{frameworks:["Vite"],slots:{buildTool:"Vite",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"webpack.config.js":{frameworks:["Webpack"],slots:{buildTool:"Webpack"},priority:25,intelligence:"medium"},"rollup.config.js":{frameworks:["Rollup"],slots:{buildTool:"Rollup"},priority:25,intelligence:"medium"},"esbuild.config.js":{frameworks:["esbuild"],slots:{buildTool:"esbuild"},priority:25,intelligence:"medium"},"parcel.config.js":{frameworks:["Parcel"],slots:{buildTool:"Parcel"},priority:25,intelligence:"medium"},"snowpack.config.js":{frameworks:["Snowpack"],slots:{buildTool:"Snowpack"},priority:25,intelligence:"medium"},"tsconfig.json":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"jsconfig.json":{frameworks:["JavaScript"],slots:{mainLanguage:"JavaScript"},priority:20,intelligence:"medium"},"babel.config.js":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},".babelrc":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},"jest.config.js":{frameworks:["Jest"],slots:{cicd:"Jest"},priority:25,intelligence:"medium"},"jest.config.ts":{frameworks:["Jest"],slots:{cicd:"Jest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"vitest.config.ts":{frameworks:["Vitest"],slots:{cicd:"Vitest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"cypress.config.js":{frameworks:["Cypress"],slots:{cicd:"Cypress"},priority:25,intelligence:"medium"},"playwright.config.ts":{frameworks:["Playwright"],slots:{cicd:"Playwright",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"karma.conf.js":{frameworks:["Karma"],slots:{cicd:"Karma"},priority:20,intelligence:"medium"},"mocha.opts":{frameworks:["Mocha"],slots:{cicd:"Mocha"},priority:20,intelligence:"medium"},".rspec":{frameworks:["RSpec"],slots:{cicd:"RSpec",mainLanguage:"Ruby"},priority:25,intelligence:"medium"},"pytest.ini":{frameworks:["Pytest"],slots:{cicd:"Pytest",mainLanguage:"Python"},priority:25,intelligence:"medium"},"phpunit.xml":{frameworks:["PHPUnit"],slots:{cicd:"PHPUnit",mainLanguage:"PHP"},priority:25,intelligence:"medium"},"schema.prisma":{frameworks:["Prisma"],slots:{database:"Prisma ORM",connection:"Prisma"},priority:25,intelligence:"medium"},"drizzle.config.ts":{frameworks:["Drizzle"],slots:{database:"Drizzle ORM",connection:"Drizzle",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ormconfig.js":{frameworks:["TypeORM"],slots:{database:"TypeORM",connection:"TypeORM"},priority:25,intelligence:"medium"},"knexfile.js":{frameworks:["Knex.js"],slots:{database:"Knex.js",connection:"Knex.js"},priority:25,intelligence:"medium"},"sequelize.config.js":{frameworks:["Sequelize"],slots:{database:"Sequelize",connection:"Sequelize"},priority:25,intelligence:"medium"},"alembic.ini":{frameworks:["Alembic"],slots:{database:"Alembic",mainLanguage:"Python"},priority:25,intelligence:"medium"},".github/workflows":{frameworks:["GitHub Actions"],slots:{cicd:"GitHub Actions"},priority:25,intelligence:"medium"},".gitlab-ci.yml":{frameworks:["GitLab CI"],slots:{cicd:"GitLab CI"},priority:25,intelligence:"medium"},Jenkinsfile:{frameworks:["Jenkins"],slots:{cicd:"Jenkins"},priority:25,intelligence:"medium"},".circleci/config.yml":{frameworks:["CircleCI"],slots:{cicd:"CircleCI"},priority:25,intelligence:"medium"},".travis.yml":{frameworks:["Travis CI"],slots:{cicd:"Travis CI"},priority:25,intelligence:"medium"},"azure-pipelines.yml":{frameworks:["Azure DevOps"],slots:{cicd:"Azure DevOps"},priority:25,intelligence:"medium"},"bitbucket-pipelines.yml":{frameworks:["Bitbucket Pipelines"],slots:{cicd:"Bitbucket Pipelines"},priority:25,intelligence:"medium"},"tailwind.config.js":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS"},priority:20,intelligence:"medium"},"tailwind.config.ts":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"postcss.config.js":{frameworks:["PostCSS"],slots:{cssFramework:"PostCSS"},priority:20,intelligence:"medium"},"uno.config.ts":{frameworks:["UnoCSS"],slots:{cssFramework:"UnoCSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"styled-components.config.js":{frameworks:["styled-components"],slots:{cssFramework:"styled-components",uiLibrary:"styled-components"},priority:20,intelligence:"medium"},"emotion.config.js":{frameworks:["Emotion"],slots:{cssFramework:"Emotion",uiLibrary:"Emotion"},priority:20,intelligence:"medium"},"metro.config.js":{frameworks:["React Native"],slots:{framework:"React Native",mainLanguage:"JavaScript"},priority:25,intelligence:"medium"},"expo.config.js":{frameworks:["Expo"],slots:{framework:"React Native",buildTool:"Expo"},priority:25,intelligence:"medium"},"app.json":{frameworks:["React Native","Expo"],slots:{framework:"React Native"},priority:20,intelligence:"medium",confirmWith:["expo"]},"capacitor.config.ts":{frameworks:["Capacitor"],slots:{framework:"Capacitor",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ionic.config.json":{frameworks:["Ionic"],slots:{framework:"Ionic",uiLibrary:"Ionic"},priority:25,intelligence:"medium"},"nx.json":{frameworks:["Nx"],slots:{buildTool:"Nx"},priority:25,intelligence:"medium"},"turbo.json":{frameworks:["Turborepo"],slots:{buildTool:"Turborepo"},priority:25,intelligence:"medium"},"lerna.json":{frameworks:["Lerna"],slots:{buildTool:"Lerna"},priority:25,intelligence:"medium"},"rush.json":{frameworks:["Rush"],slots:{buildTool:"Rush"},priority:25,intelligence:"medium"},"pnpm-workspace.yaml":{frameworks:["pnpm workspaces"],slots:{packageManager:"pnpm",buildTool:"pnpm workspaces"},priority:25,intelligence:"medium"},"*.svelte":{frameworks:["Svelte","SvelteKit"],slots:{framework:"Svelte"},priority:15,intelligence:"low"},"*.vue":{frameworks:["Vue"],slots:{framework:"Vue"},priority:15,intelligence:"low"},"*.jsx":{frameworks:["React"],slots:{framework:"React",mainLanguage:"JavaScript"},priority:15,intelligence:"low"},"*.ts":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.tsx":{frameworks:["React","TypeScript"],slots:{framework:"React",mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.py":{frameworks:["Python"],slots:{mainLanguage:"Python"},priority:15,intelligence:"low"},"*.rb":{frameworks:["Ruby"],slots:{mainLanguage:"Ruby"},priority:15,intelligence:"low"},"*.php":{frameworks:["PHP"],slots:{mainLanguage:"PHP"},priority:15,intelligence:"low"},"*.java":{frameworks:["Java"],slots:{mainLanguage:"Java"},priority:15,intelligence:"low"},"*.kt":{frameworks:["Kotlin"],slots:{mainLanguage:"Kotlin"},priority:15,intelligence:"low"},"*.swift":{frameworks:["Swift"],slots:{mainLanguage:"Swift"},priority:15,intelligence:"low"},"*.go":{frameworks:["Go"],slots:{mainLanguage:"Go"},priority:15,intelligence:"low"},"*.rs":{frameworks:["Rust"],slots:{mainLanguage:"Rust"},priority:15,intelligence:"low"},"*.dart":{frameworks:["Flutter","Dart"],slots:{mainLanguage:"Dart"},priority:15,intelligence:"low"},"*.ex":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.exs":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.scala":{frameworks:["Scala"],slots:{mainLanguage:"Scala"},priority:15,intelligence:"low"},"*.clj":{frameworks:["Clojure"],slots:{mainLanguage:"Clojure"},priority:15,intelligence:"low"},"*.lua":{frameworks:["Lua"],slots:{mainLanguage:"Lua"},priority:15,intelligence:"low"},"*.r":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.R":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.jl":{frameworks:["Julia"],slots:{mainLanguage:"Julia"},priority:15,intelligence:"low"},"*.nim":{frameworks:["Nim"],slots:{mainLanguage:"Nim"},priority:15,intelligence:"low"},"*.zig":{frameworks:["Zig"],slots:{mainLanguage:"Zig"},priority:15,intelligence:"low"},"build.zig":{frameworks:["Zig"],slots:{packageManager:"Zig Package Manager",mainLanguage:"Zig",buildTool:"zig build",framework:"Zig",build:"zig build"},priority:35,intelligence:"ultra-high"},"openapi.json":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"openapi.yaml":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"swagger.json":{frameworks:["Swagger"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"graphql.schema":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},"schema.graphql":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},".graphqlconfig":{frameworks:["GraphQL"],slots:{apiType:"GraphQL"},priority:25,intelligence:"medium"},"redux.config.js":{frameworks:["Redux"],slots:{stateManagement:"Redux"},priority:20,intelligence:"medium"},"mobx.config.js":{frameworks:["MobX"],slots:{stateManagement:"MobX"},priority:20,intelligence:"medium"},"vuex.config.js":{frameworks:["Vuex"],slots:{stateManagement:"Vuex",framework:"Vue"},priority:20,intelligence:"medium"},"pinia.config.js":{frameworks:["Pinia"],slots:{stateManagement:"Pinia",framework:"Vue"},priority:20,intelligence:"medium"},"zustand.config.js":{frameworks:["Zustand"],slots:{stateManagement:"Zustand"},priority:20,intelligence:"medium"},".eslintrc.js":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".eslintrc.json":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".prettierrc":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},".prettierrc.json":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},"biome.json":{frameworks:["Biome"],slots:{},priority:15,intelligence:"low"},".editorconfig":{frameworks:["EditorConfig"],slots:{},priority:10,intelligence:"low"},"serverless.yml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"serverless.yaml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"sam.yaml":{frameworks:["AWS SAM"],slots:{hosting:"AWS Lambda",backend:"AWS SAM",cicd:"AWS SAM CLI"},priority:30,intelligence:"high"},"template.yaml":{frameworks:["AWS SAM","CloudFormation"],slots:{hosting:"AWS",backend:"AWS SAM/CloudFormation",cicd:"AWS"},priority:25,intelligence:"medium",confirmWith:["samconfig.toml"]},"amplify.yml":{frameworks:["AWS Amplify"],slots:{hosting:"AWS Amplify",backend:"AWS Amplify",cicd:"AWS Amplify"},priority:30,intelligence:"high"},Podfile:{frameworks:["CocoaPods","iOS"],slots:{packageManager:"CocoaPods",mainLanguage:"Swift/Objective-C",framework:"iOS Native"},priority:30,intelligence:"high"},"build.gradle.kts":{frameworks:["Kotlin","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Kotlin",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"*.ipynb":{frameworks:["Jupyter","Python"],slots:{mainLanguage:"Python",framework:"Jupyter Notebook"},priority:30,intelligence:"high"},MLproject:{frameworks:["MLflow"],slots:{mainLanguage:"Python",framework:"MLflow",backend:"MLflow",cicd:"MLflow"},priority:30,intelligence:"high"},"dvc.yaml":{frameworks:["DVC","Data Version Control"],slots:{mainLanguage:"Python",framework:"DVC",cicd:"DVC Pipelines"},priority:30,intelligence:"high"},"dvc.lock":{frameworks:["DVC"],slots:{framework:"DVC"},priority:20,intelligence:"medium"},"wrangler.toml":{frameworks:["Cloudflare Workers","Cloudflare"],slots:{hosting:"Cloudflare Workers",backend:"Cloudflare Workers",runtime:"V8 Isolates"},priority:30,intelligence:"high"},"deno.json":{frameworks:["Deno"],slots:{runtime:"Deno",mainLanguage:"TypeScript",packageManager:"Deno"},priority:30,intelligence:"high"},"bun.lockb":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",mainLanguage:"TypeScript/JavaScript"},priority:30,intelligence:"high"},"codecov.yml":{frameworks:["Codecov"],slots:{cicd:"Codecov"},priority:25,intelligence:"high"},"dependabot.yml":{frameworks:["Dependabot","GitHub"],slots:{cicd:"Dependabot"},priority:25,intelligence:"high"},"renovate.json":{frameworks:["Renovate"],slots:{cicd:"Renovate"},priority:25,intelligence:"high"},Makefile:{frameworks:["Make","GNU Make"],slots:{buildTool:"Make"},priority:30,intelligence:"high"},"CMakeLists.txt":{frameworks:["CMake","C","C++"],slots:{buildTool:"CMake",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"meson.build":{frameworks:["Meson","C","C++"],slots:{buildTool:"Meson",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"*.c":{frameworks:["C"],slots:{mainLanguage:"C"},priority:30,intelligence:"high"},"*.cpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cc":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.h":{frameworks:["C","C++"],slots:{mainLanguage:"C/C++"},priority:25,intelligence:"high"},"*.hpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.hxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:20,intelligence:"medium"},".env":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.example":{frameworks:[],slots:{},priority:25,intelligence:"high"},".env.local":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.development":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.production":{frameworks:[],slots:{},priority:20,intelligence:"medium"},"skaffold.yaml":{frameworks:["Skaffold","Kubernetes"],slots:{hosting:"Kubernetes",cicd:"Skaffold"},priority:30,intelligence:"high"},"Chart.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes",backend:"Helm"},priority:30,intelligence:"high"},"values.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes"},priority:25,intelligence:"high",confirmWith:["Chart.yaml"]},"pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"Pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"terragrunt.hcl":{frameworks:["Terragrunt","Terraform"],slots:{hosting:"Cloud",cicd:"Terragrunt"},priority:30,intelligence:"high"},"ansible.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:30,intelligence:"high"},"playbook.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:25,intelligence:"high"},"*.cs":{frameworks:["C#",".NET","Unity"],slots:{mainLanguage:"C#"},priority:30,intelligence:"high"},"*.m":{frameworks:["Objective-C","iOS"],slots:{mainLanguage:"Objective-C"},priority:25,intelligence:"high"},".nvmrc":{frameworks:["Node.js","nvm"],slots:{runtime:"Node.js"},priority:25,intelligence:"high"},".tool-versions":{frameworks:["asdf"],slots:{},priority:25,intelligence:"high"},".ruby-version":{frameworks:["Ruby","rbenv"],slots:{mainLanguage:"Ruby",runtime:"Ruby"},priority:25,intelligence:"high"},".python-version":{frameworks:["Python","pyenv"],slots:{mainLanguage:"Python",runtime:"Python"},priority:25,intelligence:"high"},".dockerignore":{frameworks:["Docker"],slots:{},priority:20,intelligence:"medium"},".gitattributes":{frameworks:["Git"],slots:{},priority:15,intelligence:"low"},".npmrc":{frameworks:["npm","Node.js"],slots:{packageManager:"npm"},priority:20,intelligence:"medium"},"sonar-project.properties":{frameworks:["SonarQube","SonarCloud"],slots:{cicd:"SonarQube"},priority:25,intelligence:"high"},"*.fs":{frameworks:["F#",".NET"],slots:{mainLanguage:"F#"},priority:25,intelligence:"high"},"*.mm":{frameworks:["Objective-C++","iOS","macOS"],slots:{mainLanguage:"Objective-C++"},priority:25,intelligence:"high"},"build.zig.zon":{frameworks:["Zig"],slots:{mainLanguage:"Zig",packageManager:"Zig Package Manager",buildTool:"zig build"},priority:35,intelligence:"ultra-high"},"gleam.toml":{frameworks:["Gleam","BEAM","Erlang"],slots:{mainLanguage:"Gleam",runtime:"BEAM",packageManager:"Gleam"},priority:30,intelligence:"high"},"bunfig.toml":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",buildTool:"Bun"},priority:30,intelligence:"high"},"mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},".mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},"manifest.toml":{frameworks:["Flox","Nix"],slots:{},priority:25,intelligence:"high",confirmWith:[".flox"]},justfile:{frameworks:["Just"],slots:{buildTool:"Just"},priority:25,intelligence:"high"},".pre-commit-config.yaml":{frameworks:["pre-commit"],slots:{cicd:"pre-commit"},priority:25,intelligence:"high"},"CLAUDE.md":{frameworks:["Claude Code"],slots:{},priority:30,intelligence:"high",confirmWith:[".claude"]}};import{existsSync as Y9,readFileSync as oH,readdirSync as tH}from"fs";import{join as z3}from"path";var d0={version:2,_doc:"SINGLE SOURCE of Dart/Flutter detection KNOWLEDGE (A+B hybrid, the Truth-is-faf-cli spec). faf-cli imports this directly; faf-python-sdk vendors a synced copy (phase 2); MCPs compose it. Bolster Dart/Flutter by editing THIS file. Logic stays in dart.ts. Refreshed 2026-08-01 (knowledge v2) — community receipt on top of 6.13.0 Dart Edition.",flutterDeps:["flutter"],mcpDeps:["dart_mcp","mcp_server","mcp_dart","dart_mcp_server","mcp","dart_mcpserver"],serverFrameworks:[["serverpod","Serverpod"],["dart_frog","Dart Frog"],["conduit","Conduit"],["angel3_framework","Angel3"],["alfred","Alfred"],["shelf","Shelf"],["jaspr","Jaspr"],["relic","Relic"]],stateManagement:[["flutter_riverpod","Riverpod"],["hooks_riverpod","Riverpod"],["riverpod_annotation","Riverpod"],["riverpod","Riverpod"],["flutter_bloc","Bloc"],["bloc","Bloc"],["provider","Provider"],["get","GetX"],["flutter_mobx","MobX"],["mobx","MobX"],["signals","Signals"],["flutter_hooks","Hooks"]],routing:[["go_router","go_router"],["auto_route","auto_route"],["beamer","Beamer"],["routemaster","Routemaster"]]};var eH=d0.flutterDeps,$q=d0.mcpDeps,Zq=d0.serverFrameworks,Uq=d0.stateManagement,Xq=d0.routing;function Qq($){let Z=new Set,U=!1;for(let X of $.split(`
215
+ `)){if(/^(dependencies|dev_dependencies|dependency_overrides):\s*$/.test(X)){U=!0;continue}if(/^\S/.test(X))U=!1;if(U){let Q=X.match(/^\s{2}([a-zA-Z0-9_]+):/);if(Q)Z.add(Q[1].toLowerCase())}}return Z}function T$($){let Z=z3($,"pubspec.yaml");if(!Y9(Z))return null;let U;try{U=oH(Z,"utf-8")}catch{return null}let X=Qq(U),Q=(F)=>X.has(F.toLowerCase()),z=eH.some(Q)||/^flutter:\s*$/m.test(U)||/\bsdk:\s*flutter\b/.test(U),J=$q.find(Q),H=Zq.find(([F])=>Q(F)),q=Uq.find(([F])=>Q(F)),Y=q?q[1]:"",G=Xq.find(([F])=>Q(F)),_=G?G[1]:"",B=Q("flutter_test")?"flutter_test":Q("test")?"test":"",O=/^executables:\s*$/m.test(U),D=!1;try{D=tH(z3($,"bin")).some((F)=>F.endsWith(".dart"))}catch{}let V=O||D,W,I="",L;if(z)if(I="Flutter",Y9(z3($,"lib","main.dart"))||/^publish_to:\s*['"]?none\b/m.test(U))W="mobile",L="pubspec.yaml (Flutter app)";else W="library",L="pubspec.yaml (Flutter package)";else if(J)W="mcp",L=`pubspec.yaml + ${J} (Dart MCP server)`;else if(H)W="backend",I=H[1],L=`pubspec.yaml + ${H[0]} (Dart backend)`;else if(V)W="cli",L=O?"pubspec.yaml executables: (Dart CLI)":"pubspec.yaml + bin/*.dart (Dart CLI)";else W="library",L="pubspec.yaml (Dart package)";return{appType:W,isFlutter:z,framework:I,stateManagement:Y,routing:_,testing:B,found:L}}import{existsSync as J3,readFileSync as B9,readdirSync as G9,statSync as Jq}from"fs";import{join as w$}from"path";var N$={version:1,_doc:"SINGLE SOURCE of Go detection KNOWLEDGE (A+B hybrid, Truth-is-faf-cli). faf-cli imports this directly; SDKs/MCPs compose it. Bolster Go by editing THIS file. Logic stays in go.ts. Content-aware: go.mod ≠ one bucket — backend · CLI · MCP · library. 2026-08-01 initial (Dart composition pattern).",mcpModules:["github.com/mark3labs/mcp-go","github.com/modelcontextprotocol/go-sdk","github.com/metoro-io/mcp-golang","github.com/ThinkInAIXYZ/go-mcp"],serverFrameworks:[["github.com/gin-gonic/gin","Gin"],["github.com/labstack/echo","Echo"],["github.com/labstack/echo/v4","Echo"],["github.com/gofiber/fiber","Fiber"],["github.com/gofiber/fiber/v2","Fiber"],["github.com/go-chi/chi","Chi"],["github.com/go-chi/chi/v5","Chi"],["github.com/gorilla/mux","Gorilla Mux"],["github.com/gofiber/fiber/v3","Fiber"],["google.golang.org/grpc","gRPC"],["connectrpc.com/connect","Connect"],["github.com/go-kratos/kratos","Kratos"],["github.com/go-kratos/kratos/v2","Kratos"],["github.com/zeromicro/go-zero","go-zero"],["github.com/cloudwego/hertz","Hertz"]],cliFrameworks:[["github.com/spf13/cobra","Cobra"],["github.com/urfave/cli","urfave/cli"],["github.com/urfave/cli/v2","urfave/cli"],["github.com/alecthomas/kingpin","Kingpin"],["github.com/alecthomas/kong","Kong"]]};var Hq=N$.mcpModules,qq=N$.serverFrameworks,Yq=N$.cliFrameworks;function Gq($){let Z=new Set,U=!1;for(let X of $.split(`
216
+ `)){let Q=X.replace(/\/\/.*$/,"").trim();if(!Q)continue;if(/^require\s*\(\s*$/.test(Q)){U=!0;continue}if(U){if(Q===")"){U=!1;continue}let J=Q.match(/^(\S+)/);if(J)Z.add(J[1].toLowerCase());continue}let z=Q.match(/^require\s+(\S+)/);if(z&&z[1]!=="(")Z.add(z[1].toLowerCase())}return Z}function V9($,Z){let U=Z.toLowerCase();for(let X of $)if(X===U||X.startsWith(`${U}/`))return!0;return!1}function _9($,Z){let U;for(let X of Z){if(!V9($,X[0]))continue;if(!U||X[0].length>U[0].length)U=X}return U}function _q($,Z){let U;for(let X of Z){if(!V9($,X))continue;if(!U||X.length>U.length)U=X}return U}function Bq($){let Z=$.match(/^module\s+(\S+)/m);return Z?Z[1]:""}function Vq($){let Z=w$($,"cmd");if(!J3(Z))return!1;try{for(let U of G9(Z)){let X=w$(Z,U);try{if(Jq(X).isDirectory()){if(G9(X).some((z)=>z.endsWith(".go")))return!0}else if(U.endsWith(".go"))return!0}catch{}}}catch{}return!1}function Oq($){let Z=w$($,"main.go");if(!J3(Z))return!1;try{let U=B9(Z,"utf-8");return/^package\s+main\b/m.test(U)}catch{return!1}}function C$($){let Z=w$($,"go.mod");if(!J3(Z))return null;let U;try{U=B9(Z,"utf-8")}catch{return null}let X=Bq(U),Q=Gq(U),z=_q(Q,Hq),J=_9(Q,qq),H=_9(Q,Yq),q=Vq($),Y=Oq($),G,_="",B;if(z)G="mcp",B=`go.mod + ${z} (Go MCP server)`;else if(J)G="backend",_=J[1],B=`go.mod + ${J[0]} (Go backend)`;else if(H)G="cli",_=H[1],B=`go.mod + ${H[0]} (Go CLI)`;else if(q)G="cli",B="go.mod + cmd/ (Go CLI layout)";else if(Y&&!J)G="cli",B="go.mod + main.go package main (Go CLI)";else G="library",B="go.mod (Go module)";return{appType:G,modulePath:X,framework:_,found:B}}import{existsSync as Dq,readFileSync as Iq,readdirSync as Lq}from"fs";import{join as Rq}from"path";var F0={version:1,_doc:"SINGLE SOURCE of C# /.NET detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster C# by editing THIS file. Logic stays in csharp.ts. Content-aware: .csproj alone ≠ type — Sdk first, then props/packages. Kill line: .csproj alone ≠ type. 2026-08-01 initial.",mcpPackages:["ModelContextProtocol","ModelContextProtocol.AspNetCore","ModelContextProtocol.Core","ModelContextProtocol.Extensions.Tasks","ModelContextProtocol.Extensions.Apps"],cliPackages:[["System.CommandLine","System.CommandLine"],["Spectre.Console.Cli","Spectre.Console"],["Spectre.Console","Spectre.Console"],["McMaster.Extensions.CommandLineUtils","McMaster"]],testPackages:[["Microsoft.NET.Test.Sdk","VSTest"],["xunit.v3","xUnit"],["xunit","xUnit"],["NUnit","NUnit"],["MSTest.TestFramework","MSTest"],["MSTest","MSTest"]],grpcServerPackages:["Grpc.AspNetCore"],specializedSdks:[["Microsoft.NET.Sdk.Web","web","ASP.NET Core"],["Microsoft.NET.Sdk.Worker","worker","Worker"],["Microsoft.NET.Sdk.BlazorWebAssembly","blazor-wasm","Blazor WebAssembly"],["Microsoft.NET.Sdk.Razor","razor-lib","Razor Class Library"],["MSTest.Sdk","test","MSTest"],["Aspire.AppHost.Sdk","aspire","Aspire AppHost"]],baseSdk:"Microsoft.NET.Sdk"};var Mq=F0.mcpPackages.map(($)=>$.toLowerCase()),Kq=F0.cliPackages.map(([$,Z])=>[$.toLowerCase(),Z]),Fq=F0.testPackages.map(([$,Z])=>[$.toLowerCase(),Z]),Pq=F0.grpcServerPackages.map(($)=>$.toLowerCase()),Aq=F0.specializedSdks,O9=F0.baseSdk.toLowerCase();function Tq($){let Z=$.match(/<Project\b[^>]*\bSdk\s*=\s*"([^"/]+)(?:\/[^"]*)?"/i),U=$.match(/<Sdk\b[^>]*\bName\s*=\s*"([^"]+)"/i),X=(Z?.[1]||U?.[1]||"").trim(),Q=($.match(/<OutputType>\s*([^<]+?)\s*<\/OutputType>/i)?.[1]||"").trim(),z=$.match(/<TargetFramework>\s*([^<]+?)\s*<\/TargetFramework>/i)?.[1],H=($.match(/<TargetFrameworks>\s*([^<]+?)\s*<\/TargetFrameworks>/i)?.[1]||z||"").trim(),q=/<IsTestProject>\s*true\s*<\/IsTestProject>/i.test($),Y=/<UseMaui>\s*true\s*<\/UseMaui>/i.test($),G=/<UseWPF>\s*true\s*<\/UseWPF>/i.test($),_=/<UseWindowsForms>\s*true\s*<\/UseWindowsForms>/i.test($),B=new Set;for(let D of $.matchAll(/<PackageReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))B.add(D[1].toLowerCase());for(let D of $.matchAll(/<PackageReference\s+Include\s*=\s*"([^"]+)"/gi))B.add(D[1].toLowerCase());let O=new Set;for(let D of $.matchAll(/<FrameworkReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))O.add(D[1].toLowerCase());return{sdk:X,outputType:Q,targetFramework:H,isTestProject:q,useMaui:Y,useWpf:G,useWindowsForms:_,packages:B,frameworkRefs:O}}function H3($,Z){let U=Z.toLowerCase();if($.has(U))return!0;for(let X of $)if(X===U||X.startsWith(`${U}.`))return!0;return!1}function W9($,Z){let U;for(let[X,Q]of Z){if(!H3($,X))continue;if(!U||X.length>U[0].length)U=[X,Q]}return U}function Nq($){let Z;for(let U of Mq){if(!H3($,U))continue;if(!Z||U.length>Z.length)Z=U}for(let U of $)if(U==="modelcontextprotocol"||U.startsWith("modelcontextprotocol.")){if(!Z||U.length>Z.length)Z=U}return Z}function wq($){let Z=$.toLowerCase();if(!Z)return;let U;for(let X of Aq){let Q=X[0].toLowerCase();if(Z===Q||Z.startsWith(`${Q}/`)){if(!U||Q.length>U[0].length)U=X}}return U}function b$($){let Z=$.toLowerCase();return Z==="exe"||Z==="winexe"}function Cq($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if($==="backend")return 2;if($==="cli")return 3;if(Z&&Z!=="")return 4;return 5}function bq($,Z){let U=Z.replace(/\.csproj$/i,""),{sdk:X,packages:Q,frameworkRefs:z,outputType:J}=$,H,q="",Y,G=Nq(Q),_=wq(X),B=W9(Q,Fq),O=W9(Q,Kq),D=Pq.some((W)=>H3(Q,W)),V=z.has("microsoft.aspnetcore.app");if(G)H="mcp",q="MCP",Y=`${Z} + ${G} (C# MCP server)`;else if($.isTestProject||_?.[1]==="test"||B)H="library",q=B?.[1]||(_?.[1]==="test"?_[2]:"Test"),Y=`${Z} + test (${q})`;else if($.useMaui)H="mobile",q="MAUI",Y=`${Z} + UseMaui (MAUI)`;else if($.useWpf||$.useWindowsForms)H="backend",q=$.useWpf&&$.useWindowsForms?"WPF+WinForms":$.useWpf?"WPF":"Windows Forms",Y=`${Z} + ${q}`;else if(_?.[1]==="web")H="backend",q=D?"gRPC":_[2],Y=`${Z} + Sdk=${_[0]}${D?" + Grpc.AspNetCore":""} (ASP.NET Core)`;else if(_?.[1]==="worker")H="backend",q=_[2],Y=`${Z} + Sdk=${_[0]} (Worker)`;else if(_?.[1]==="blazor-wasm")H="backend",q=_[2],Y=`${Z} + Sdk=${_[0]} (Blazor WASM)`;else if(_?.[1]==="aspire")H="backend",q=_[2],Y=`${Z} + Sdk=${_[0]} (Aspire)`;else if(_?.[1]==="razor-lib")H="library",q=_[2],Y=`${Z} + Sdk=${_[0]} (Razor class library)`;else if(V&&b$(J))H="backend",q="ASP.NET Core",Y=`${Z} + FrameworkReference Microsoft.AspNetCore.App (host)`;else if(V&&!b$(J))H="library",q="ASP.NET Core",Y=`${Z} + FrameworkReference Microsoft.AspNetCore.App (web library)`;else if(O&&(b$(J)||!J))H="cli",q=O[1],Y=`${Z} + ${O[0]} (C# CLI)`;else if(b$(J))H="cli",Y=`${Z} + OutputType=Exe (C# console)`;else{H="library";let W=X?` Sdk=${X}`:"";if(Y=`${Z}${W} (C# class library)`.replace(" Sdk=Microsoft.NET.Sdk",""),!X||X.toLowerCase()===O9||X.toLowerCase().startsWith(`${O9}/`))Y=`${Z} (C# class library)`}return{appType:H,projectName:U,targetFramework:$.targetFramework,sdk:X||"Microsoft.NET.Sdk",framework:q,found:Y}}function A1($){if(!Dq($))return[];try{return Lq($).filter((Z)=>Z.toLowerCase().endsWith(".csproj")).sort()}catch{return[]}}function S$($){let Z=A1($);if(Z.length===0)return null;let U=null,X=999;for(let Q of Z){let z=Rq($,Q),J;try{J=Iq(z,"utf-8")}catch{continue}let H=Tq(J),q=bq(H,Q),Y=Cq(q.appType,q.framework);if(!U||Y<X)U=q,X=Y}return U}import{existsSync as P0,readFileSync as Eq,readdirSync as jq,statSync as gq}from"fs";import{join as l}from"path";var i={version:1,_doc:"SINGLE SOURCE of JVM (Java/Kotlin) detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster JVM by editing THIS file. Logic stays in jvm.ts. Kill line: pom / gradle alone ≠ type. Content-aware: plugins · parents · packaging · deps · version catalogs. One brand JVM — Android/KMP are facets, not a second Kotlin Edition. 2026-08-03 initial (post-intel).",mcpArtifacts:["io.modelcontextprotocol.sdk:mcp","io.modelcontextprotocol.sdk:mcp-core","io.modelcontextprotocol.sdk:mcp-spring-webflux","io.modelcontextprotocol.sdk:mcp-spring-webmvc","org.springframework.ai:spring-ai-starter-mcp-server","org.springframework.ai:spring-ai-starter-mcp-server-webmvc","org.springframework.ai:spring-ai-starter-mcp-server-webflux","org.springframework.ai:spring-ai-starter-mcp-client","org.springframework.ai:spring-ai-mcp-server-spring-boot-starter","org.springframework.ai:spring-ai-mcp-client-spring-boot-starter","io.modelcontextprotocol:kotlin-sdk","io.modelcontextprotocol.kotlin:mcp"],webPlugins:[["org.springframework.boot","Spring Boot"],["io.quarkus","Quarkus"],["io.quarkus.gradle.plugin","Quarkus"],["io.micronaut.application","Micronaut"],["io.micronaut.library","Micronaut"]],webParents:[["org.springframework.boot:spring-boot-starter-parent","Spring Boot"],["io.quarkus.platform:quarkus-bom","Quarkus"],["io.micronaut.platform:micronaut-parent","Micronaut"]],webArtifacts:[["org.springframework.boot:spring-boot-starter-web","Spring Boot"],["org.springframework.boot:spring-boot-starter-webflux","Spring Boot"],["org.springframework.boot:spring-boot-starter","Spring Boot"],["io.quarkus:quarkus-core","Quarkus"],["io.micronaut:micronaut-http-server-netty","Micronaut"],["io.ktor:ktor-server-core","Ktor"],["io.ktor:ktor-server-netty","Ktor"],["io.ktor:ktor-server-cio","Ktor"]],androidPlugins:["com.android.application","com.android.library","com.android.kotlin.multiplatform.library"],kmpPlugins:["org.jetbrains.kotlin.multiplatform","kotlin-multiplatform"],jvmKotlinPlugins:["org.jetbrains.kotlin.jvm","kotlin-jvm","org.jetbrains.kotlin.android","kotlin-android"],cliPlugins:[["org.gradle.application","application"],["application","application"]],cliArtifacts:[["info.picocli:picocli","Picocli"],["com.github.ajalt.clikt:clikt","Clikt"],["com.github.ajalt.clikt:clikt-jvm","Clikt"]],libraryPlugins:["java-library","org.gradle.java-library"]};var xq=i.mcpArtifacts.map(($)=>$.toLowerCase()),hq=i.webPlugins.map(([$,Z])=>[$.toLowerCase(),Z]),yq=i.webParents.map(([$,Z])=>[$.toLowerCase(),Z]),fq=i.webArtifacts.map(([$,Z])=>[$.toLowerCase(),Z]),yB=i.androidPlugins.map(($)=>$.toLowerCase()),uq=i.kmpPlugins.map(($)=>$.toLowerCase()),kq=i.jvmKotlinPlugins.map(($)=>$.toLowerCase()),vq=i.cliPlugins.map(([$,Z])=>[$.toLowerCase(),Z]),mq=i.cliArtifacts.map(([$,Z])=>[$.toLowerCase(),Z]),pq=i.libraryPlugins.map(($)=>$.toLowerCase()),lq=["pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts"];function q3($){return lq.some((Z)=>P0(l($,Z)))}function N1($){try{return Eq($,"utf-8")}catch{return null}}function dq($){let Z=new Map,U=new Map,X="";for(let Q of $.split(`
217
+ `)){let z=Q.replace(/#.*$/,"").trim();if(!z)continue;let J=z.match(/^\[([^\]]+)\]$/);if(J){X=J[1].trim().toLowerCase();continue}let H=z.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bid\s*=\s*"([^"]+)"/);if(H&&(X==="plugins"||X.endsWith(".plugins"))){Z.set(H[1].replace(/-/g,".").toLowerCase(),H[2].toLowerCase()),Z.set(H[1].toLowerCase(),H[2].toLowerCase());continue}let q=z.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bmodule\s*=\s*"([^"]+)"/);if(q&&(X==="libraries"||X.endsWith(".libraries"))){let _=q[1].toLowerCase();U.set(_,q[2].toLowerCase()),U.set(_.replace(/-/g,"."),q[2].toLowerCase());continue}let Y=z.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bgroup\s*=\s*"([^"]+)"[^}]*\bname\s*=\s*"([^"]+)"/);if(Y&&(X==="libraries"||X.endsWith(".libraries"))){let _=`${Y[2]}:${Y[3]}`.toLowerCase(),B=Y[1].toLowerCase();U.set(B,_),U.set(B.replace(/-/g,"."),_);continue}let G=z.match(/^([A-Za-z0-9_.-]+)\s*=\s*"([^"]+)"/);if(G){let _=G[1].toLowerCase(),B=G[2];if(X==="plugins"||X.endsWith(".plugins")){let O=B.split(":")[0].toLowerCase();Z.set(_,O),Z.set(_.replace(/-/g,"."),O)}else if(X==="libraries"||X.endsWith(".libraries")){let O=B.split(":");if(O.length>=2){let D=`${O[0]}:${O[1]}`.toLowerCase();U.set(_,D),U.set(_.replace(/-/g,"."),D)}}}}return{plugins:Z,libraries:U}}function cq($){let Z=l($,"gradle","libs.versions.toml");if(!P0(Z))return{plugins:new Map,libraries:new Map};let U=N1(Z);if(!U)return{plugins:new Map,libraries:new Map};return dq(U)}function iq($){let Z=[];for(let U of $.matchAll(/include\s*\(\s*([^)]+)\)/g))for(let X of U[1].split(",")){let Q=X.replace(/['":\s]/g,"").replace(/^:/,"");if(Q)Z.push(Q.replace(/:/g,"/"))}for(let U of $.matchAll(/include\s+((?:['"][^'"]+['"]\s*,?\s*)+)/g))for(let X of U[1].split(",")){let Q=X.replace(/['":\s]/g,"").replace(/^:/,"");if(Q)Z.push(Q.replace(/:/g,"/"))}for(let U of $.matchAll(/project\s*\(\s*["']:([^"']+)["']\s*\)\s*\.projectDir\s*=\s*file\s*\(\s*["']([^"']+)["']\s*\)/g))Z.push(U[2].replace(/^\.\//,""));return[...new Set(Z)]}function rq($,Z){let U=new Set;for(let X of $.matchAll(/\bid\s*\(\s*["']([^"']+)["']\s*\)/g))U.add(X[1].toLowerCase());for(let X of $.matchAll(/\bid\s+['"]([^'"]+)['"]/g))U.add(X[1].toLowerCase());for(let X of $.matchAll(/plugins\s*\{([\s\S]*?)\}/g))for(let Q of X[1].split(/[\n;]/)){let z=Q.replace(/\/\/.*$/,"").trim();if(!z||z.startsWith("id")||z.startsWith("kotlin")||z.startsWith("alias"))continue;let J=z.match(/^`([a-zA-Z0-9.-]+)`$/)||z.match(/^([a-zA-Z][a-zA-Z0-9.-]*)$/);if(J)U.add(J[1].toLowerCase())}for(let X of $.matchAll(/\bkotlin\s*\(\s*["']([^"']+)["']\s*\)/g)){let Q=X[1].toLowerCase();if(Q==="jvm")U.add("org.jetbrains.kotlin.jvm");else if(Q==="multiplatform")U.add("org.jetbrains.kotlin.multiplatform");else if(Q==="android")U.add("org.jetbrains.kotlin.android");else U.add(`org.jetbrains.kotlin.${Q}`)}for(let X of $.matchAll(/libs\.plugins\.([A-Za-z0-9_.]+)/g)){let Q=X[1].toLowerCase(),z=Z.plugins.get(Q)||Z.plugins.get(Q.replace(/\./g,"-"))||Z.plugins.get(Q.replace(/-/g,"."));if(z)U.add(z);else if(Q.includes("spring")&&Q.includes("boot"))U.add("org.springframework.boot")}for(let X of $.matchAll(/apply\s+plugin\s*:\s*['"]([^'"]+)['"]/g))U.add(X[1].toLowerCase());return U}function sq($,Z){let U=new Set;for(let X of $.matchAll(/["']([A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+)(?::[^"']+)?["']/g))U.add(X[1].toLowerCase());for(let X of $.matchAll(/libs\.([A-Za-z0-9_.]+)/g)){let Q=X[1].toLowerCase();if(Q.startsWith("plugins."))continue;let z=[Q,Q.replace(/\./g,"-"),Q.replace(/-/g,".")];for(let J of z){let H=Z.libraries.get(J);if(H){U.add(H.includes(":")?H.split(":").slice(0,2).join(":"):H);break}}}return U}function L9($){let Z=($.match(/<packaging>\s*([^<]+?)\s*<\/packaging>/i)?.[1]||"jar").trim().toLowerCase(),U=new Set,X=$.match(/<parent>([\s\S]*?)<\/parent>/i);if(X){let J=X[1].match(/<groupId>\s*([^<]+?)\s*<\/groupId>/i)?.[1]?.trim(),H=X[1].match(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i)?.[1]?.trim();if(J&&H)U.add(`${J}:${H}`.toLowerCase())}let Q=new Set;for(let J of $.matchAll(/<dependency>([\s\S]*?)<\/dependency>/gi)){let H=J[1].match(/<groupId>\s*([^<]+?)\s*<\/groupId>/i)?.[1]?.trim(),q=J[1].match(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i)?.[1]?.trim();if(H&&q)Q.add(`${H}:${q}`.toLowerCase())}let z=[];for(let J of $.matchAll(/<module>\s*([^<]+?)\s*<\/module>/gi))z.push(J[1].trim());return{packaging:Z,parents:U,artifacts:Q,modules:z}}function Z0($,Z){let U=Z.toLowerCase();if($.has(U))return!0;for(let X of $)if(X===U||X.endsWith(`.${U}`)||X===U.replace(/^org\.gradle\./,""))return!0;return!1}function T1($,Z,U){let X;for(let[Q,z]of Z){let J=!1;if(U==="plugin")J=Z0($,Q);else if(J=$.has(Q)||[...$].some((H)=>H===Q||H.startsWith(`${Q}:`)||H.startsWith(`${Q}.`)),!J&&U==="artifact")J=[...$].some((H)=>H===Q||H.startsWith(`${Q}`));if(!J)continue;if(!X||Q.length>X[0].length)X=[Q,z]}return X}function aq($){let Z;for(let U of xq)for(let X of $){if(X===U||X.startsWith(`${U}:`)||X.startsWith(U.replace(/:mcp$/,":"))){if(!Z||U.length>Z.length)Z=U}if(X.startsWith("io.modelcontextprotocol")||X.includes("spring-ai-starter-mcp")||X.includes("spring-ai-mcp")){if(!Z||X.length>Z.length)Z=X}}return Z}function R9($){let Z=new Set,U=!1,X=!1,Q=[l($,"src"),l($,"src","main")],z=(J,H)=>{if(H>4||!P0(J))return;let q;try{q=jq(J)}catch{return}for(let Y of q){if(Y==="androidMain"||Y==="commonMain"||Y==="jvmMain"||Y==="iosMain")Z.add(Y);let G=l(J,Y);try{if(gq(G).isDirectory())z(G,H+1);else if(Y.endsWith(".kt")||Y.endsWith(".kts"))U=!0;else if(Y.endsWith(".java"))X=!0}catch{}}};for(let J of Q)z(J,0);return{kotlin:U,java:X,hints:Z}}function nq($){let Z=[],U=$.plugins,X=$.artifacts,Q=uq.some((A)=>Z0(U,A))||$.sourceHints.has("commonMain"),z=Z0(U,"com.android.application"),J=Z0(U,"com.android.library")||Z0(U,"com.android.kotlin.multiplatform.library");if(z||J)Z.push("android");if(Q)Z.push("multiplatform");let H=aq(X),q=T1(U,hq,"plugin"),Y=T1($.parents,yq,"parent"),G=T1(X,fq,"artifact"),_=T1(U,vq,"plugin"),B=T1(X,mq,"artifact"),O=pq.some((A)=>Z0(U,A)),D=$.packaging==="pom",V,W="",I;if(z)V="mobile",W=Q?"Android+KMP":"Android",I=`${$.path||"root"} + com.android.application (${W})`;else if(H)V="mcp",W="MCP",Z.push("mcp"),I=`${$.path||"root"} + ${H} (JVM MCP server)`;else if(q||Y||G){V="backend",W=q?.[1]||Y?.[1]||G?.[1]||"JVM";let A=q?.[0]||Y?.[0]||G?.[0]||"web";I=`${$.path||"root"} + ${A} (JVM backend)`}else if(Q&&!J)V="library",W="Kotlin Multiplatform",I=`${$.path||"root"} + kotlin multiplatform (KMP library)`;else if(J)V="library",W=Q?"Android+KMP":"Android",I=`${$.path||"root"} + android library (${W})`;else if(B||$.hasApplicationPlugin&&($.hasMainClass||_)||_&&$.hasMainClass)V="cli",W=B?.[1]||"application",I=B?`${$.path||"root"} + ${B[0]} (JVM CLI)`:`${$.path||"root"} + application plugin (JVM CLI)`;else if($.hasApplicationPlugin&&!O)V="cli",W="application",I=`${$.path||"root"} + application plugin (JVM CLI)`;else if(D)V="library",I=`${$.path||"root"} + packaging=pom (Maven aggregator/BOM)`;else{V="library";let A=$.kotlinSources&&!$.javaSources?"Kotlin":"JVM";if(I=`${$.path||"root"} (${A} library)`,O)I=`${$.path||"root"} + java-library (JVM library)`}let L="Java";if($.kotlinSources&&$.javaSources)L="Java/Kotlin";else if($.kotlinSources||kq.some((A)=>Z0(U,A))||Q)L="Kotlin";let F=[...new Set(Z)];return{appType:V,framework:W,facets:F,found:I,buildTool:$.buildTool,mainLanguage:L}}function oq($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if(Z.includes("multiplatform")&&$==="backend")return 2;if($==="backend")return 3;if($==="cli")return 4;if(Z.includes("multiplatform"))return 5;if(Z.includes("android"))return 6;return 7}function D9($,Z,U){let X=Z?l($,Z):$,Q=l(X,"build.gradle.kts"),z=l(X,"build.gradle"),J=P0(Q)?Q:P0(z)?z:null;if(!J)return null;let H=N1(J);if(!H)return null;let q=rq(H,U),Y=sq(H,U),G=R9(X),_=/mainClass\s*[.=]/.test(H)||/mainClassName\s*=/.test(H)||/Main-Class/.test(H),B=Z0(q,"application")||Z0(q,"org.gradle.application");return{path:Z||"build.gradle",plugins:q,artifacts:Y,packaging:"jar",parents:new Set,hasMainClass:_,hasApplicationPlugin:B,sourceHints:G.hints,kotlinSources:G.kotlin||J.endsWith(".kts"),javaSources:G.java,buildTool:"gradle"}}function I9($,Z){let U=Z?l($,Z):$,X=l(U,"pom.xml");if(!P0(X))return null;let Q=N1(X);if(!Q)return null;let{packaging:z,parents:J,artifacts:H}=L9(Q),q=R9(U);return{path:Z?`${Z}/pom.xml`:"pom.xml",plugins:new Set,artifacts:H,packaging:z,parents:J,hasMainClass:/<mainClass>/.test(Q),hasApplicationPlugin:!1,sourceHints:q.hints,kotlinSources:q.kotlin,javaSources:q.java,buildTool:"maven"}}function w1($){if(!q3($))return null;let Z=cq($),U=[],X=null;for(let Y of["settings.gradle.kts","settings.gradle"]){let G=l($,Y);if(P0(G)){X=N1(G);break}}let Q=X?iq(X):[],z=D9($,"",Z);if(z)U.push(z);for(let Y of Q){let G=D9($,Y,Z);if(G)U.push(G)}let J=I9($,"");if(J){U.push(J);let Y=N1(l($,"pom.xml"));if(Y){let{modules:G}=L9(Y);for(let _ of G){let B=I9($,_);if(B)U.push(B)}}}if(U.length===0&&X)return{appType:"library",framework:"",buildTool:"gradle",mainLanguage:"Java/Kotlin",facets:[],found:"settings.gradle (Gradle multi-project root)"};if(U.length===0)return null;let H=null,q=999;for(let Y of U){let G=nq(Y),_=oq(G.appType,G.facets);if(!H||_<q)H={appType:G.appType,framework:G.framework,buildTool:G.buildTool,mainLanguage:G.mainLanguage,facets:G.facets,found:G.found},q=_}if(H&&Q.length>0&&!H.found.includes("multi-project"));return H}var XY=new Set(["node_modules",".git","dist","build","venv",".venv","__pycache__","target","coverage",".next",".svelte-kit","vendor"]),QY=new Set([".py",".ts",".tsx",".js",".jsx",".svelte",".vue",".rb",".go",".rs",".php",".java",".kt",".swift"]),zY={mainLanguage:["project","main_language"],main_language:["project","main_language"],framework:["stack","frontend"],cssFramework:["stack","css_framework"],css:["stack","css_framework"],uiLibrary:["stack","ui_library"],ui_library:["stack","ui_library"],stateManagement:["stack","state_management"],state:["stack","state_management"],backend:["stack","backend"],apiType:["stack","api_type"],api:["stack","api_type"],runtime:["stack","runtime"],database:["stack","database"],db:["stack","database"],connection:["stack","connection"],hosting:["stack","hosting"],buildTool:["stack","build"],build_tool:["stack","build"],build:["stack","build"],packageManager:["stack","package_manager"],pkg_manager:["stack","package_manager"],cicd:["stack","cicd"]},JY=[["packageManager","package-manager"],["pkg_manager","package-manager"],["mainLanguage","language"],["main_language","language"],["framework","framework"],["backend","backend"],["database","database"],["db","database"],["cicd","ci-cd"],["hosting","hosting"],["buildTool","build"],["build_tool","build"],["build","build"],["runtime","runtime"],["cssFramework","css"],["css","css"],["uiLibrary","ui-library"],["stateManagement","state-management"],["apiType","api"],["api","api"]];function HY($,Z){for(let[U,X]of JY)if(U in $)return X;return Z.length>0?"framework":"config"}function qY($){try{let Z=JSON.parse(eq($,"utf-8")),U=["background","content_scripts","action","browser_action","permissions"].some((X)=>(X in Z));if(typeof Z.manifest_version==="number"&&U)return"chrome";return"other"}catch{return"other"}}function YY($){let Z=[],U=UY($),X=tq(Y3($,".git")),Q=new Set;for(let z=0;z<10;z++){let J;try{J=M9(U)}catch{break}for(let q of J){if(q.toLowerCase().endsWith(".csproj")){let G=S$(U);if(G){let _={mainLanguage:"C#",packageManager:"NuGet",buildTool:"dotnet"};if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="cli"&&G.framework)_.framework=G.framework;else if(G.appType==="mcp")_.apiType="MCP";else if(G.appType==="mobile"&&G.framework)_.framework=G.framework;if(G.targetFramework)_.runtime=G.targetFramework;let B=G.framework?[G.framework,"C#",".NET"]:["C#",".NET"];Z.push({slots:_,priority:36,frameworks:B,fileName:q})}continue}let Y=Q3[q];if(!Y)continue;if(q==="manifest.json"&&qY(Y3(U,q))!=="chrome")continue;if(q==="pubspec.yaml"){let G=T$(U);if(G){let _={mainLanguage:"Dart",packageManager:"pub"};if(G.isFlutter){if(_.framework="Flutter",G.stateManagement)_.stateManagement=G.stateManagement}else if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="mcp")_.apiType="MCP";Z.push({slots:_,priority:Y.priority,frameworks:G.isFlutter?["Flutter","Dart"]:["Dart"],fileName:q});continue}}if(q==="go.mod"){let G=C$(U);if(G){let _={mainLanguage:"Go",packageManager:"go modules",buildTool:"go build"};if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="cli"&&G.framework)_.framework=G.framework;else if(G.appType==="mcp")_.apiType="MCP";let B=G.framework?[G.framework,"Go"]:["Go"];Z.push({slots:_,priority:Y.priority,frameworks:B,fileName:q});continue}}if(q==="pom.xml"||q==="build.gradle"||q==="build.gradle.kts"||q==="settings.gradle"||q==="settings.gradle.kts"){if(Q.has(U))continue;Q.add(U);let G=w1(U);if(G){let _={mainLanguage:G.mainLanguage==="Java/Kotlin"?"Kotlin":G.mainLanguage,packageManager:G.buildTool==="maven"?"maven":"gradle",buildTool:G.buildTool};if(G.appType==="backend"&&G.framework)_.backend=G.framework;else if(G.appType==="cli"&&G.framework)_.framework=G.framework;else if(G.appType==="mcp")_.apiType="MCP";else if(G.appType==="mobile")_.framework=G.framework||"Android";if(G.facets.includes("multiplatform"))_.framework=G.framework||"Kotlin Multiplatform";let B=G.framework?[G.framework,"JVM",G.mainLanguage==="Kotlin"?"Kotlin":"Java"]:["JVM",G.mainLanguage==="Kotlin"?"Kotlin":"Java"];Z.push({slots:_,priority:Y.priority??35,frameworks:B,fileName:q});continue}}Z.push({slots:Y.slots||{},priority:Y.priority,frameworks:Y.frameworks,fileName:q})}if(X&&z===0)break;let H=$Y(U);if(H===U)break;U=H}return Z}function GY($){let Z=[];for(let U of F9($,2,{count:0})){let X=Q3[`*${U}`],Q=X?.slots?.mainLanguage;if(Q)Z.push({slots:{mainLanguage:Q},priority:X.priority,frameworks:X.frameworks})}return Z}function K9($){let Z=[...YY($),...GY($)],U={},X={},Q=new Set;for(let Y of Z){Y.frameworks.forEach((G)=>Q.add(G));for(let[G,_]of Object.entries(Y.slots))if(_&&!_.includes("/")&&(!(G in U)||Y.priority>X[G]))U[G]=_,X[G]=Y.priority}let z=new Map;for(let Y of Z){if(!Y.fileName)continue;if(!z.has(Y.fileName))z.set(Y.fileName,{fileName:Y.fileName,category:HY(Y.slots,Y.frameworks),priority:Y.priority})}let J=[...z.values()].sort((Y,G)=>G.priority-Y.priority||Y.fileName.localeCompare(G.fileName)),H=[];if(U.mainLanguage)H.push(U.mainLanguage.toLowerCase());if(U.framework)H.push(U.framework.toLowerCase());let q=H.length>0?H.join("-"):"unknown-stack";return{slotFills:U,frameworks:[...Q],confirmedCount:Z.length,discoveredFormats:J,stackSignature:q}}function G3($){let{slotFills:Z}=K9($),U={};for(let[X,Q]of Object.entries(Z)){let z=zY[X];if(!z||!Q)continue;let[J,H]=z;if(J==="project")(U.project??={})[H]=Q;else(U.stack??={})[H]=Q}return U}function F9($,Z,U){let X=new Set;if(Z<0||U.count>400)return X;let Q;try{Q=M9($,{withFileTypes:!0})}catch{return X}for(let z of Q){if(U.count++>400)break;if(!z.isDirectory()){let J=ZY(z.name);if(QY.has(J))X.add(J);continue}if(XY.has(z.name)||z.name.startsWith("."))continue;for(let J of F9(Y3($,z.name),Z-1,U))X.add(J)}return X}import{existsSync as P9,readFileSync as A9}from"fs";import{join as T9}from"path";var f=($,Z,U)=>({value:$,source:Z,confidence:U});function N9($){let Z=_Y($),U=BY($),X={},Q=(z,J)=>{if(J)X[z]=J};return Q("what",VY(Z,U)),Q("who",OY(U)),Q("why",WY(U)),Q("where",DY(Z,U)),Q("when",IY(U)),Q("how",LY(Z,U)),X}function _3($){let Z=N9($),U={};return Object.keys(Z).forEach((X)=>{let Q=Z[X];if(Q)U[X]=Q.value}),U}function _Y($){let Z=T9($,"package.json");if(!P9(Z))return null;try{return JSON.parse(A9(Z,"utf-8"))}catch{return null}}function BY($){let Z=T9($,"README.md");if(!P9(Z))return"";let U;try{U=A9(Z,"utf-8")}catch{return""}return U.split(`
217
218
  `).filter((X)=>!/^\s*\[!\[/.test(X)&&!/^\s*!\[/.test(X)).join(`
218
- `).replace(/<[^>]+>/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").trim()}function M0($){return $.replace(/\s+/g," ").replace(/[#*`>]/g,"").trim().slice(0,280)}function m0($,Z){let U=new RegExp(`##?\\s+(${Z})\\s*\\n+([\\s\\S]+?)(?:\\n\\n|\\n##?|$)`,"i"),X=$.match(U);return X&&X[2]&&X[2].trim().length>20?{body:M0(X[2]),heading:X[1].trim()}:null}function K1($,Z,U=30){for(let X of Z){let Q=$.match(X);if(Q&&Q[1]&&Q[1].trim().length>=U)return M0(Q[1])}return null}function EG($,Z){if($?.description&&$.description.length>20)return f(M0($.description),"package.json:description",0.95);let U=m0(Z,"Purpose|What|About|Overview|Description");if(U)return f(U.body,`README:## ${U.heading}`,0.8);let X=Z.split(/\n\s*\n/).map((J)=>J.trim()).find((J)=>J.length>30&&!J.startsWith("#"));if(X)return f(M0(X),"README:first-paragraph",0.5);let Q=K1(Z,[/(?:core|main|primary)\s+(?:problem|challenge)(?:\s+is)?\s*:?\s*([^.\n]{30,})/i,/solves?\s+(?:the\s+)?(?:problem\s+of\s+)?([^.\n]{30,})/i]);return Q?f(Q,"README:problem-heuristic",0.6):null}function gG($){let Z=m0($,"Audience|Who|Who is this for|Who it.s for");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let U=K1($,[/\b(?:designed|built|made)\s+for\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i,/\bfor\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i],8);return U?f(U,"README:audience-heuristic",0.6):null}function yG($){let Z=m0($,"Why|Mission|Motivation|Rationale|Vision");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let U=K1($,[/(?:our\s+|the\s+)?(?:mission|purpose|goal)\s+is\s+([^.\n]{30,})/i,/\b(?:mission|purpose|goal)\s*:\s*([^.\n]{30,})/i,/(?:built|created|designed)\s+(?:because|to)\s+([^.\n]{30,})/i]);return U?f(U,"README:mission-heuristic",0.6):null}function hG($,Z){let U=typeof $?.repository==="string"?$.repository:$?.repository?.url;if(U)return f(M0(U.replace(/^git\+/,"").replace(/\.git$/,"")),"package.json:repository",0.95);if($?.homepage)return f(M0($.homepage),"package.json:homepage",0.9);let X=K1(Z,[/\b(?:deployed|hosted|available|published)\s+(?:on|at|via)\s+([^.\n]{3,80})/i],3);return X?f(X,"README:deploy-heuristic",0.6):null}function xG($){let Z=m0($,"Timeline|Status|Release|Roadmap");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let U=K1($,[/\b(production\s+since\s+[^.\n]{4,60})/i,/\b((?:in\s+)?(?:production|beta|alpha|development)\s+since\s+[^.\n]{4,60})/i,/\bsince\s+((?:[A-Z][a-z]+\s+)?\d{4}[^.\n]{0,40})/],4);return U?f(U,"README:since-heuristic",0.6):null}function fG($,Z){let U=$?.scripts?Object.keys($.scripts):[],X=["start","dev","build"].filter((z)=>U.includes(z));if(X.length)return f(M0(X.map((z)=>`npm run ${z}`).join(", ")),"package.json:scripts",0.9);let Q=m0(Z,"Usage|Getting Started|Install|Installation|Quick Start");if(Q)return f(Q.body,`README:## ${Q.heading}`,0.8);let J=m0(Z,"Architecture|Approach|How it works|Methodology|How");return J?f(J.body,`README:## ${J.heading}`,0.7):null}var W6="3.0";import{existsSync as K,readFileSync as t,readdirSync as L6}from"fs";import{join as M}from"path";var I6=[{name:"Next.js",slug:"nextjs",category:"frontend",signals:[{type:"dependency",key:"next"},{type:"file",pattern:"next.config.*"}]},{name:"React",slug:"react",category:"frontend",signals:[{type:"dependency",key:"react"}]},{name:"SvelteKit",slug:"sveltekit",category:"frontend",signals:[{type:"dependency",key:"@sveltejs/kit"},{type:"file",pattern:"svelte.config.*"}]},{name:"Svelte",slug:"svelte",category:"frontend",signals:[{type:"dependency",key:"svelte"},{type:"devDependency",key:"svelte"}]},{name:"Vue.js",slug:"vue",category:"frontend",signals:[{type:"dependency",key:"vue"}]},{name:"Nuxt",slug:"nuxt",category:"frontend",signals:[{type:"dependency",key:"nuxt"},{type:"file",pattern:"nuxt.config.*"}]},{name:"Angular",slug:"angular",category:"frontend",signals:[{type:"dependency",key:"@angular/core"},{type:"file",pattern:"angular.json"}]},{name:"Astro",slug:"astro",category:"frontend",signals:[{type:"dependency",key:"astro"},{type:"file",pattern:"astro.config.*"}]},{name:"Solid",slug:"solid",category:"frontend",signals:[{type:"dependency",key:"solid-js"}]},{name:"Remix",slug:"remix",category:"frontend",signals:[{type:"dependency",key:"@remix-run/react"}]},{name:"Gatsby",slug:"gatsby",category:"frontend",signals:[{type:"dependency",key:"gatsby"},{type:"file",pattern:"gatsby-config.*"}]},{name:"Qwik",slug:"qwik",category:"frontend",signals:[{type:"dependency",key:"@builder.io/qwik"}]},{name:"Vercel (SvelteKit)",slug:"adapter-vercel",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-vercel"},{type:"devDependency",key:"@sveltejs/adapter-vercel"}]},{name:"Node (SvelteKit)",slug:"adapter-node",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-node"},{type:"devDependency",key:"@sveltejs/adapter-node"}]},{name:"Static (SvelteKit)",slug:"adapter-static",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-static"},{type:"devDependency",key:"@sveltejs/adapter-static"}]},{name:"Cloudflare (SvelteKit)",slug:"adapter-cloudflare",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-cloudflare"},{type:"devDependency",key:"@sveltejs/adapter-cloudflare"}]},{name:"Netlify (SvelteKit)",slug:"adapter-netlify",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-netlify"},{type:"devDependency",key:"@sveltejs/adapter-netlify"}]},{name:"Tailwind CSS",slug:"tailwind",category:"css",signals:[{type:"dependency",key:"tailwindcss"},{type:"devDependency",key:"tailwindcss"},{type:"file",pattern:"tailwind.config.*"}]},{name:"Bootstrap",slug:"bootstrap",category:"css",signals:[{type:"dependency",key:"bootstrap"}]},{name:"Styled Components",slug:"styled-components",category:"css",signals:[{type:"dependency",key:"styled-components"}]},{name:"shadcn/ui",slug:"shadcn",category:"ui",signals:[{type:"file",pattern:"components.json"},{type:"dependency",key:"@radix-ui/react-dialog"}]},{name:"Material UI",slug:"mui",category:"ui",signals:[{type:"dependency",key:"@mui/material"}]},{name:"Chakra UI",slug:"chakra",category:"ui",signals:[{type:"dependency",key:"@chakra-ui/react"}]},{name:"Ant Design",slug:"antd",category:"ui",signals:[{type:"dependency",key:"antd"}]},{name:"Redux",slug:"redux",category:"state",signals:[{type:"dependency",key:"@reduxjs/toolkit"}]},{name:"Zustand",slug:"zustand",category:"state",signals:[{type:"dependency",key:"zustand"}]},{name:"Jotai",slug:"jotai",category:"state",signals:[{type:"dependency",key:"jotai"}]},{name:"Pinia",slug:"pinia",category:"state",signals:[{type:"dependency",key:"pinia"}]},{name:"Express",slug:"express",category:"backend",signals:[{type:"dependency",key:"express"}]},{name:"Fastify",slug:"fastify",category:"backend",signals:[{type:"dependency",key:"fastify"}]},{name:"Hono",slug:"hono",category:"backend",signals:[{type:"dependency",key:"hono"}]},{name:"Elysia",slug:"elysia",category:"backend",signals:[{type:"dependency",key:"elysia"}]},{name:"NestJS",slug:"nestjs",category:"backend",signals:[{type:"dependency",key:"@nestjs/core"}]},{name:"Koa",slug:"koa",category:"backend",signals:[{type:"dependency",key:"koa"}]},{name:"Django",slug:"django",category:"backend",signals:[{type:"file",pattern:"manage.py"},{type:"file",pattern:"settings.py"}]},{name:"Flask",slug:"flask",category:"backend",signals:[{type:"file",pattern:"app.py"}]},{name:"FastAPI",slug:"fastapi",category:"backend",signals:[{type:"file",pattern:"main.py"}]},{name:"Rails",slug:"rails",category:"backend",signals:[{type:"file",pattern:"Gemfile"},{type:"file",pattern:"config/routes.rb"}]},{name:"Spring Boot",slug:"spring",category:"backend",signals:[{type:"file",pattern:"pom.xml"},{type:"file",pattern:"build.gradle"}]},{name:"Prisma",slug:"prisma",category:"database",signals:[{type:"dependency",key:"prisma"},{type:"devDependency",key:"prisma"},{type:"file",pattern:"prisma/schema.prisma"}]},{name:"Drizzle",slug:"drizzle",category:"database",signals:[{type:"dependency",key:"drizzle-orm"},{type:"file",pattern:"drizzle.config.*"}]},{name:"TypeORM",slug:"typeorm",category:"database",signals:[{type:"dependency",key:"typeorm"}]},{name:"Mongoose",slug:"mongoose",category:"database",signals:[{type:"dependency",key:"mongoose"}]},{name:"Vite",slug:"vite",category:"build",signals:[{type:"dependency",key:"vite"},{type:"devDependency",key:"vite"},{type:"file",pattern:"vite.config.*"}]},{name:"webpack",slug:"webpack",category:"build",signals:[{type:"dependency",key:"webpack"},{type:"devDependency",key:"webpack"},{type:"file",pattern:"webpack.config.*"}]},{name:"esbuild",slug:"esbuild",category:"build",signals:[{type:"dependency",key:"esbuild"},{type:"devDependency",key:"esbuild"}]},{name:"Turbopack",slug:"turbopack",category:"build",signals:[{type:"file",pattern:"turbo.json"}]},{name:"Jest",slug:"jest",category:"testing",signals:[{type:"devDependency",key:"jest"},{type:"file",pattern:"jest.config.*"}]},{name:"Vitest",slug:"vitest",category:"testing",signals:[{type:"devDependency",key:"vitest"}]},{name:"Playwright",slug:"playwright",category:"testing",signals:[{type:"devDependency",key:"@playwright/test"},{type:"file",pattern:"playwright.config.*"}]},{name:"Cypress",slug:"cypress",category:"testing",signals:[{type:"devDependency",key:"cypress"},{type:"file",pattern:"cypress.config.*"}]},{name:"Turborepo",slug:"turborepo",category:"monorepo",signals:[{type:"devDependency",key:"turbo"},{type:"file",pattern:"turbo.json"}]},{name:"Nx",slug:"nx",category:"monorepo",signals:[{type:"devDependency",key:"nx"},{type:"file",pattern:"nx.json"}]},{name:"Lerna",slug:"lerna",category:"monorepo",signals:[{type:"devDependency",key:"lerna"},{type:"file",pattern:"lerna.json"}]},{name:"MCP SDK",slug:"mcp",category:"ai",signals:[{type:"dependency",key:"@modelcontextprotocol/sdk"}]},{name:"Anthropic SDK",slug:"anthropic",category:"ai",signals:[{type:"dependency",key:"@anthropic-ai/sdk"}]},{name:"OpenAI SDK",slug:"openai",category:"ai",signals:[{type:"dependency",key:"openai"}]},{name:"LangChain",slug:"langchain",category:"ai",signals:[{type:"dependency",key:"langchain"}]},{name:"Vercel",slug:"vercel",category:"hosting",signals:[{type:"file",pattern:"vercel.json"}]},{name:"Netlify",slug:"netlify",category:"hosting",signals:[{type:"file",pattern:"netlify.toml"}]},{name:"Docker",slug:"docker",category:"hosting",signals:[{type:"file",pattern:"Dockerfile"},{type:"file",pattern:"docker-compose.yml"}]},{name:"Cloudflare Workers",slug:"cloudflare",category:"hosting",signals:[{type:"file",pattern:"wrangler.toml"},{type:"dependency",key:"wrangler"}]},{name:"GitHub Actions",slug:"github-actions",category:"cicd",signals:[{type:"file",pattern:".github/workflows/*.yml"}]},{name:"Commander.js",slug:"commander",category:"cli",signals:[{type:"dependency",key:"commander"}]}];function uG($){let Z=M($,"Cargo.toml");if(!K(Z))return null;try{let X=t(Z,"utf-8").match(/^\s*\[package\][\s\S]*?^\s*name\s*=\s*"([^"]+)"/m);return X?X[1]:null}catch{return null}}function kG($){let Z=M($,"Cargo.toml");if(!K(Z))return!1;try{let U=t(Z,"utf-8");return/^\s*\[\[bin\]\]/m.test(U)}catch{return!1}}function vG($,Z){if(Z?.keywords?.some((X)=>/^sdk(?:\s|-|$)|-sdk$/i.test(X)))return'package.json keywords contains "sdk"';if(Z?.name&&/(?:^|[-_/])sdk(?:[-_/]|$)/i.test(Z.name))return`package.json name "${Z.name}" → sdk`;let U=uG($);if(U&&/(?:^|[-_])sdk(?:[-_]|$)/i.test(U))return`Cargo.toml name "${U}" → sdk`;return null}function mG($){let Z=["manifest.json","public/manifest.json","src/manifest.json","app/manifest.json","extension/manifest.json","dist/manifest.json"];for(let U of Z){let X=M($,U);if(!K(X))continue;try{let Q=JSON.parse(t(X,"utf-8"));if(typeof Q.manifest_version==="number")return`${U} manifest_version ${Q.manifest_version} (browser extension)`}catch{}}return null}function lG($){let Z=/(numpy|pandas|jupyter|scikit-learn|sklearn|pytorch|tensorflow|matplotlib|scipy)/i,U=M($,"pyproject.toml");if(K(U))try{let J=t(U,"utf-8").match(Z);if(J)return`pyproject.toml depends on ${J[1]}`}catch{}let X=M($,"requirements.txt");if(K(X))try{let J=t(X,"utf-8").match(Z);if(J)return`requirements.txt contains ${J[1]}`}catch{}return null}function pG($,Z){let U=["react-native","expo","@capacitor/core","@ionic/core"];if(Z){for(let X of U)if(Z.dependencies?.[X]||Z.devDependencies?.[X])return`${X} dependency`}if(K(M($,"ios"))&&K(M($,"android")))return"ios/ + android/ dirs";return null}function dG($,Z){let U=M($,"Cargo.toml");if(K(U))try{let Q=t(U,"utf-8");if(/crate-type\s*=\s*\[[^\]]*"cdylib"/.test(Q))return'Cargo.toml crate-type = ["cdylib"]';if(/wasm-bindgen|wasm-pack/i.test(Q))return"Cargo.toml wasm-bindgen/wasm-pack"}catch{}let X=M($,"build.zig");if(K(X))try{let Q=t(X,"utf-8");if(/\.wasm\b|wasm32|setOutputFormat\(\.wasm/i.test(Q))return"build.zig wasm target"}catch{}if(Z?.keywords?.some((Q)=>/^wasm(?:-|$)|webassembly/i.test(Q)))return'package.json keywords contains "wasm"';return null}function cG($,Z){if(!K(M($,"index.html")))return null;if(Z?.dependencies||Z?.devDependencies){let U={...Z.dependencies??{},...Z.devDependencies??{}};if(["react","vue","svelte","@sveltejs/kit","next","nuxt","astro","gatsby","solid-js","qwik"].some((Q)=>U[Q]))return null}return"index.html (vanilla, no frontend framework)"}function iG($,Z){if(Z?.name&&/specification|^@.*\/spec/i.test(Z.name))return`package name "${Z.name}" → documentation`;if(Z?.keywords?.some((U)=>/^(specification|format-spec|standard)$/i.test(U)))return'package keywords contains "specification"';if(Z?.bin)return null;if(Z?.files&&Z.files.length>0){let U=/^(dist|src|lib|build|bin)(\/|$)|\/(dist|src|lib|build|bin)(\/|$)|(\.|\/)(js|ts|tsx|jsx|mjs|cjs|py|rs|go)$/,X=Z.files.some((J)=>U.test(J)),Q=Z.files.some((J)=>/\.(md|MD)$|examples?\//.test(J)||J==="README.md"||J==="docs"||J==="docs/");if(!X&&Q)return"package.json files = docs/examples only (no source)"}return null}function sG($,Z,U){let X=U.find((Q)=>Q.slug==="astro"||Q.slug==="gatsby");if(X)return`${X.name} (static-site framework)`;if(Z?.keywords?.some((Q)=>/^(website|marketing|landing|brochure|portfolio)$/i.test(Q)))return'package keywords contains "website"/"marketing"/"landing"';return null}function aG($,Z){if(!Z)return null;let U={...Z.dependencies??{},...Z.devDependencies??{}},X=["@clerk/nextjs","@clerk/clerk-react","next-auth","@auth/core","auth0","@auth0/nextjs-auth0"],Q=["stripe","@stripe/stripe-js","lemonsqueezy"],J=X.some((H)=>U[H]),z=Q.some((H)=>U[H]);if(J&&z)return"auth + payment dependencies";return null}function rG($,Z,U){if(Z?.keywords?.some((J)=>/mcpaas/i.test(J)))return'package keywords contains "mcpaas"';if(Z?.name&&/mcpaas/i.test(Z.name))return`package name "${Z.name}" → mcpaas`;let X=U.some((J)=>J.slug==="mcp"),Q=U.some((J)=>J.category==="database");if(X&&Q&&Z?.dependencies&&Object.keys(Z.dependencies).length>10)return"MCP + database + complex deps (platform shape)";return null}function nG($,Z){if(!Z?.private)return null;if(!(!!Z.workspaces||K(M($,"pnpm-workspace.yaml"))))return null;return"private workspace + multi-package"}function K0($){let Z=M($,"package.json");if(!K(Z))return null;try{return JSON.parse(t(Z,"utf-8"))}catch{return null}}function oG($,Z){if(!Z.includes("*"))return K(M($,Z));let U=Z.split("/");if(U.length===1){let H=Z.split("*")[0];try{return L6($).some((Y)=>Y.startsWith(H))}catch{return!1}}let X=M($,...U.slice(0,-1)),Q=U[U.length-1],J=Q.split("*")[0],z=Q.split("*")[1]||"";try{return L6(X).some((H)=>H.startsWith(J)&&H.endsWith(z))}catch{return!1}}function tG($,Z,U){switch($.type){case"dependency":return!!Z?.dependencies?.[$.key];case"devDependency":return!!Z?.devDependencies?.[$.key];case"file":return oG(U,$.pattern);default:return!1}}function Q3($){let Z=K0($);return I6.map((U)=>{let Q=U.signals.filter((J)=>tG(J,Z,$)).length/U.signals.length;return{name:U.name,slug:U.slug,category:U.category,confidence:Q}}).filter((U)=>U.confidence>0).sort((U,X)=>X.confidence-U.confidence)}function D6($){let Z=K0($);if(Z?.devDependencies?.typescript||Z?.dependencies?.typescript)return"TypeScript";if(K(M($,"tsconfig.json")))return"TypeScript";if(K(M($,"Cargo.toml")))return"Rust";if(K(M($,"go.mod")))return"Go";if(M1($).length>0)return"C#";if(K(M($,"pyproject.toml"))||K(M($,"setup.py")))return"Python";if(K(M($,"Gemfile")))return"Ruby";if(K(M($,"pom.xml"))||K(M($,"build.gradle")))return"Java";if(K(M($,"Package.swift")))return"Swift";if(K(M($,"build.zig")))return"Zig";if(K(M($,"pubspec.yaml")))return"Dart";if(Z)return"JavaScript";return"Unknown"}function R6($){let Z=K0($),U=Q3($),X=[],Q=iG($,Z);if(Q)return X.push(Q),{type:"documentation",found:X};let J=vG($,Z);if(J)return X.push(J),{type:"sdk",found:X};let z=mG($);if(z)return X.push(z),{type:"extension",found:X};let H=rG($,Z,U);if(H)return X.push(H),{type:"mcpaas",found:X};let Y=aG($,Z);if(Y)return X.push(Y),{type:"saas",found:X};let G=dG($,Z);if(G)return X.push(G),{type:"wasm",found:X};let _=D$($);if(_)return X.push(_.found),{type:_.appType,found:X};let q=K$($);if(q)return X.push(q.found),{type:q.appType,found:X};let B=T$($);if(B)return X.push(B.found),{type:B.appType,found:X};let O=pG($,Z);if(O)return X.push(O),{type:"mobile",found:X};if(U.some((j)=>j.slug==="mcp"))return X.push("MCP SDK signal"),{type:"mcp",found:X};if(Z?.bin)return X.push("package.json bin"),{type:"cli",found:X};if(kG($))return X.push("Cargo.toml [[bin]]"),{type:"cli",found:X};if(K(M($,"build.zig"))){if(X.push("build.zig"),K(M($,"src/main.zig")))return X.push("src/main.zig"),{type:"cli",found:X};if(K(M($,"src/root.zig")))return X.push("src/root.zig"),{type:"library",found:X}}let V=U.some((j)=>j.slug==="svelte"||j.slug==="sveltekit");if(Z?.private===!0&&(K(M($,"pnpm-workspace.yaml"))||Z?.workspaces!==void 0)&&V)return X.push("private workspace","Svelte"),{type:"framework",found:X};if(V)return X.push("Svelte/SvelteKit"),{type:"svelte",found:X};let L=U.some((j)=>j.category==="frontend"),R=U.some((j)=>j.category==="backend");if(Z?.private&&(Z.workspaces||K(M($,"pnpm-workspace.yaml")))&&L&&R)return X.push("private workspace + frontend + backend frameworks"),{type:"enterprise",found:X};let P=nG($,Z);if(P)return X.push(P),{type:"monorepo-root",found:X};let A=sG($,Z,U);if(A)return X.push(A),{type:"website",found:X};if(U.some((j)=>j.slug==="nextjs"||j.slug==="nuxt"))return X.push(U.find((j)=>j.slug==="nextjs")?"Next.js":"Nuxt"),{type:"fullstack",found:X};let N=U.some((j)=>j.category==="frontend"),C=U.some((j)=>j.category==="backend");if(N&&C)return X.push("frontend framework","backend framework"),{type:"fullstack",found:X};if(N)return X.push("frontend framework"),{type:"frontend",found:X};if(C)return X.push("backend framework"),{type:"backend",found:X};let T=lG($);if(T)return X.push(T),{type:"data-science",found:X};let b=cG($,Z);if(b)return X.push(b),{type:"html",found:X};if(Z?.main&&!Z?.bin)return X.push("package.json main (no bin)"),{type:"library",found:X};return X.push("no classifying signals — fallback"),{type:"library",found:X}}function M6($){if(K(M($,"bunfig.toml")))return"Bun";if(K(M($,"deno.json"))||K(M($,"deno.jsonc")))return"Deno";if(K0($))return"Node.js";if(K(M($,"Cargo.toml")))return"Rust";if(K(M($,"go.mod")))return"Go";if(M1($).length>0)return".NET";if(K(M($,"pubspec.yaml")))return"Dart";return"Unknown"}function K6($){if(K(M($,"pubspec.yaml")))return"pub";if(K(M($,"go.mod")))return"go modules";if(M1($).length>0)return"NuGet";if(K(M($,"bun.lockb"))||K(M($,"bun.lock")))return"bun";if(K(M($,"pnpm-lock.yaml")))return"pnpm";if(K(M($,"yarn.lock")))return"yarn";if(K(M($,"package-lock.json")))return"npm";return"npm"}function P6($){if(K(M($,".github/workflows")))return"GitHub Actions";if(K(M($,".gitlab-ci.yml")))return"GitLab CI";if(K(M($,".circleci")))return"CircleCI";if(K(M($,"Jenkinsfile")))return"Jenkins";return null}function T6($){if(K(M($,"vercel.json")))return"Vercel";if(K(M($,"netlify.toml")))return"Netlify";if(K(M($,"wrangler.toml")))return"Cloudflare";if(K(M($,"Dockerfile")))return"Docker";if(K(M($,"fly.toml")))return"Fly.io";if(K(M($,"render.yaml")))return"Render";return null}function A6($){let Z=M($,"svelte.config.js");if(!K(Z))return null;try{let X=t(Z,"utf-8").match(/@sveltejs\/adapter-(\w+)/);if(X){let Q=X[1];switch(Q){case"vercel":return"Vercel";case"node":return"Node";case"static":return"Static";case"cloudflare":return"Cloudflare";case"netlify":return"Netlify";case"auto":return"Auto";default:return Q}}return null}catch{return null}}function F6($){let Z=K0($);if(Z?.devDependencies?.vite||Z?.dependencies?.vite)return"Vite";if(Z?.devDependencies?.webpack||Z?.dependencies?.webpack)return"webpack";if(Z?.devDependencies?.esbuild||Z?.dependencies?.esbuild)return"esbuild";if(K(M($,"tsconfig.json"))&&Z?.devDependencies?.typescript)return"TypeScript (tsc)";return null}function N6($){return["package.json","Cargo.toml","pyproject.toml","go.mod","build.zig","build.zig.zon","src/index.ts","src/index.js","src/main.ts","src/cli.ts","src/main.rs","src/lib.rs","src/main.zig","src/root.zig","src/__init__.py","main.py","__main__.py","main.go","cmd/main.go","README.md","SPECIFICATION.md","BINARY-FORMAT.md","tsconfig.json","wrangler.toml","vercel.json"].filter((U)=>K(M($,U)))}function b6($,Z){let U={};if(Z?.scripts){for(let X of["build","test","lint","dev","start"])if(Z.scripts[X]){let Q=K(M($,"bun.lock"))||K(M($,"bun.lockb"))?"bun run":"npm run";U[X]=`${Q} ${X}`}}if(K(M($,"Cargo.toml"))){if(!U.build)U.build="cargo build --release";if(!U.test)U.test="cargo test";if(!U.lint)U.lint="cargo clippy"}if(K(M($,"build.zig"))){if(!U.build)U.build="zig build";if(!U.test)U.test="zig build test"}if(K(M($,"go.mod"))){if(!U.build)U.build="go build ./...";if(!U.test)U.test="go test ./..."}if(K(M($,"pyproject.toml"))||K(M($,"pytest.ini"))){if(!U.test)U.test="pytest"}return U}function w6($,Z,U,X){let Q=[];if(X&&X!=="Unknown")Q.push(X);let J=new Set(["frontend","backend","database","build","css","state","monorepo"]);for(let z of U)if(J.has(z.category))Q.push(z.name);if(K(M($,"bunfig.toml")))Q.push("Bun");else if(K(M($,"deno.json"))||K(M($,"deno.jsonc")))Q.push("Deno");if(Q.length<3&&Z?.dependencies){let z=Object.keys(Z.dependencies).slice(0,5);for(let H of z)if(!Q.some((Y)=>Y.toLowerCase().includes(H.toLowerCase())))Q.push(H)}return Q}function C6($){let Z=K0($),U=Q3($),X=D6($),Q=R6($),J=Q.type,z=M6($),H=K6($),Y=P6($),G=T6($),_=F6($),q=U.find((S)=>S.category==="frontend"),B=U.find((S)=>S.category==="css"),O=U.find((S)=>S.category==="ui"),I=U.find((S)=>S.category==="state"),V=U.find((S)=>S.category==="backend"),W=U.find((S)=>S.category==="database"),L=T0[J]||T0.library,R=J==="framework",P=U.some((S)=>S.slug==="svelte"||S.slug==="sveltekit"),A=R&&P?"svelte":R?null:null,F=J==="svelte"||A==="svelte",N=F?A6($):null,C=F&&U.some((S)=>S.slug==="sveltekit"),T=new Set(["css_framework","ui_library","database","connection","hosting"]),b={},j=x.filter((S)=>S.path.startsWith("stack."));for(let S of j){let E=S.path.replace("stack.","");if(!L.includes(S.category)){b[E]="slotignored";continue}if(R&&T.has(E)){b[E]="slotignored";continue}switch(E){case"frontend":b[E]=q?.name??(J==="cli"?"CLI":"");break;case"css_framework":b[E]=B?.name??"";break;case"ui_library":b[E]=O?.name??"";break;case"state_management":b[E]=F?I?.name??"Runes":I?.name??"";break;case"backend":b[E]=F?C?"SvelteKit":V?.name??"":V?.name??"";break;case"api_type":b[E]=C?"Server Routes":"";break;case"runtime":b[E]=z!=="Unknown"?z:"";break;case"database":b[E]=W?.name??"";break;case"connection":b[E]=W?.name??"";break;case"hosting":if(F&&N)b[E]=N;else b[E]=G??"";break;case"build":b[E]=F?"Vite":_??"";break;case"cicd":b[E]=Y??"";break;case"package_manager":b[E]=H;break;default:b[E]="";break}}let c={},g=x.filter((S)=>S.path.startsWith("monorepo."));for(let S of g){let E=S.path.replace("monorepo.","");if(!L.includes(S.category))c[E]="slotignored";else c[E]=""}let l0={name:Z?.name??$.split("/").pop()??"project",goal:Z?.description??"",main_language:X,type:J};if(R&&A)l0.framework=A;let H3=w6($,Z,U,X),G3=N6($),Y3=b6($,Z),P1={faf_version:W6,project:l0,stack:b,human_context:{who:"",what:Z?.description??"",why:"",where:"",when:"",how:""},monorepo:c,_meta:{found:Q.found}};if(H3.length>0)P1.tech_stack=H3;if(G3.length>0)P1.key_files=G3;if(Object.keys(Y3).length>0)P1.commands=Y3;return P1}import{existsSync as $Y,readFileSync as ZY}from"fs";import{join as UY}from"path";var j6={MIN_LENGTH:8,MAX_LENGTH:280},eG=[/^(see|see\s+the?)\s+readme/i,/^(tbd|todo|fixme|coming\s+soon)\b/i,/^(software|application|app|project|tool|library|framework)\.?$/i,/^(for\s+users|for\s+developers)\.?$/i,/^(description|goal|name|title)\.?$/i,/^lorem\s+ipsum/i,/^example(\s+\w+)?\.?$/i];function d($){let Z=$.trim();if(Z.length<j6.MIN_LENGTH)return!1;if(Z.length>j6.MAX_LENGTH)return!1;if(eG.some((U)=>U.test(Z)))return!1;if(/^[\s|\-*+]/.test(Z))return!1;if(Z.split(`
219
- `).length>4)return!1;return!0}function XY($){let Z=$.split(`
219
+ `).replace(/<[^>]+>/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").trim()}function A0($){return $.replace(/\s+/g," ").replace(/[#*`>]/g,"").trim().slice(0,280)}function c0($,Z){let U=new RegExp(`##?\\s+(${Z})\\s*\\n+([\\s\\S]+?)(?:\\n\\n|\\n##?|$)`,"i"),X=$.match(U);return X&&X[2]&&X[2].trim().length>20?{body:A0(X[2]),heading:X[1].trim()}:null}function C1($,Z,U=30){for(let X of Z){let Q=$.match(X);if(Q&&Q[1]&&Q[1].trim().length>=U)return A0(Q[1])}return null}function VY($,Z){if($?.description&&$.description.length>20)return f(A0($.description),"package.json:description",0.95);let U=c0(Z,"Purpose|What|About|Overview|Description");if(U)return f(U.body,`README:## ${U.heading}`,0.8);let X=Z.split(/\n\s*\n/).map((z)=>z.trim()).find((z)=>z.length>30&&!z.startsWith("#"));if(X)return f(A0(X),"README:first-paragraph",0.5);let Q=C1(Z,[/(?:core|main|primary)\s+(?:problem|challenge)(?:\s+is)?\s*:?\s*([^.\n]{30,})/i,/solves?\s+(?:the\s+)?(?:problem\s+of\s+)?([^.\n]{30,})/i]);return Q?f(Q,"README:problem-heuristic",0.6):null}function OY($){let Z=c0($,"Audience|Who|Who is this for|Who it.s for");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let U=C1($,[/\b(?:designed|built|made)\s+for\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i,/\bfor\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i],8);return U?f(U,"README:audience-heuristic",0.6):null}function WY($){let Z=c0($,"Why|Mission|Motivation|Rationale|Vision");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let U=C1($,[/(?:our\s+|the\s+)?(?:mission|purpose|goal)\s+is\s+([^.\n]{30,})/i,/\b(?:mission|purpose|goal)\s*:\s*([^.\n]{30,})/i,/(?:built|created|designed)\s+(?:because|to)\s+([^.\n]{30,})/i]);return U?f(U,"README:mission-heuristic",0.6):null}function DY($,Z){let U=typeof $?.repository==="string"?$.repository:$?.repository?.url;if(U)return f(A0(U.replace(/^git\+/,"").replace(/\.git$/,"")),"package.json:repository",0.95);if($?.homepage)return f(A0($.homepage),"package.json:homepage",0.9);let X=C1(Z,[/\b(?:deployed|hosted|available|published)\s+(?:on|at|via)\s+([^.\n]{3,80})/i],3);return X?f(X,"README:deploy-heuristic",0.6):null}function IY($){let Z=c0($,"Timeline|Status|Release|Roadmap");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let U=C1($,[/\b(production\s+since\s+[^.\n]{4,60})/i,/\b((?:in\s+)?(?:production|beta|alpha|development)\s+since\s+[^.\n]{4,60})/i,/\bsince\s+((?:[A-Z][a-z]+\s+)?\d{4}[^.\n]{0,40})/],4);return U?f(U,"README:since-heuristic",0.6):null}function LY($,Z){let U=$?.scripts?Object.keys($.scripts):[],X=["start","dev","build"].filter((J)=>U.includes(J));if(X.length)return f(A0(X.map((J)=>`npm run ${J}`).join(", ")),"package.json:scripts",0.9);let Q=c0(Z,"Usage|Getting Started|Install|Installation|Quick Start");if(Q)return f(Q.body,`README:## ${Q.heading}`,0.8);let z=c0(Z,"Architecture|Approach|How it works|Methodology|How");return z?f(z.body,`README:## ${z.heading}`,0.7):null}var w9="3.0";import{existsSync as K,readFileSync as n,readdirSync as b9}from"fs";import{join as M}from"path";var C9=[{name:"Next.js",slug:"nextjs",category:"frontend",signals:[{type:"dependency",key:"next"},{type:"file",pattern:"next.config.*"}]},{name:"React",slug:"react",category:"frontend",signals:[{type:"dependency",key:"react"}]},{name:"SvelteKit",slug:"sveltekit",category:"frontend",signals:[{type:"dependency",key:"@sveltejs/kit"},{type:"file",pattern:"svelte.config.*"}]},{name:"Svelte",slug:"svelte",category:"frontend",signals:[{type:"dependency",key:"svelte"},{type:"devDependency",key:"svelte"}]},{name:"Vue.js",slug:"vue",category:"frontend",signals:[{type:"dependency",key:"vue"}]},{name:"Nuxt",slug:"nuxt",category:"frontend",signals:[{type:"dependency",key:"nuxt"},{type:"file",pattern:"nuxt.config.*"}]},{name:"Angular",slug:"angular",category:"frontend",signals:[{type:"dependency",key:"@angular/core"},{type:"file",pattern:"angular.json"}]},{name:"Astro",slug:"astro",category:"frontend",signals:[{type:"dependency",key:"astro"},{type:"file",pattern:"astro.config.*"}]},{name:"Solid",slug:"solid",category:"frontend",signals:[{type:"dependency",key:"solid-js"}]},{name:"Remix",slug:"remix",category:"frontend",signals:[{type:"dependency",key:"@remix-run/react"}]},{name:"Gatsby",slug:"gatsby",category:"frontend",signals:[{type:"dependency",key:"gatsby"},{type:"file",pattern:"gatsby-config.*"}]},{name:"Qwik",slug:"qwik",category:"frontend",signals:[{type:"dependency",key:"@builder.io/qwik"}]},{name:"Vercel (SvelteKit)",slug:"adapter-vercel",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-vercel"},{type:"devDependency",key:"@sveltejs/adapter-vercel"}]},{name:"Node (SvelteKit)",slug:"adapter-node",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-node"},{type:"devDependency",key:"@sveltejs/adapter-node"}]},{name:"Static (SvelteKit)",slug:"adapter-static",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-static"},{type:"devDependency",key:"@sveltejs/adapter-static"}]},{name:"Cloudflare (SvelteKit)",slug:"adapter-cloudflare",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-cloudflare"},{type:"devDependency",key:"@sveltejs/adapter-cloudflare"}]},{name:"Netlify (SvelteKit)",slug:"adapter-netlify",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-netlify"},{type:"devDependency",key:"@sveltejs/adapter-netlify"}]},{name:"Tailwind CSS",slug:"tailwind",category:"css",signals:[{type:"dependency",key:"tailwindcss"},{type:"devDependency",key:"tailwindcss"},{type:"file",pattern:"tailwind.config.*"}]},{name:"Bootstrap",slug:"bootstrap",category:"css",signals:[{type:"dependency",key:"bootstrap"}]},{name:"Styled Components",slug:"styled-components",category:"css",signals:[{type:"dependency",key:"styled-components"}]},{name:"shadcn/ui",slug:"shadcn",category:"ui",signals:[{type:"file",pattern:"components.json"},{type:"dependency",key:"@radix-ui/react-dialog"}]},{name:"Material UI",slug:"mui",category:"ui",signals:[{type:"dependency",key:"@mui/material"}]},{name:"Chakra UI",slug:"chakra",category:"ui",signals:[{type:"dependency",key:"@chakra-ui/react"}]},{name:"Ant Design",slug:"antd",category:"ui",signals:[{type:"dependency",key:"antd"}]},{name:"Redux",slug:"redux",category:"state",signals:[{type:"dependency",key:"@reduxjs/toolkit"}]},{name:"Zustand",slug:"zustand",category:"state",signals:[{type:"dependency",key:"zustand"}]},{name:"Jotai",slug:"jotai",category:"state",signals:[{type:"dependency",key:"jotai"}]},{name:"Pinia",slug:"pinia",category:"state",signals:[{type:"dependency",key:"pinia"}]},{name:"Express",slug:"express",category:"backend",signals:[{type:"dependency",key:"express"}]},{name:"Fastify",slug:"fastify",category:"backend",signals:[{type:"dependency",key:"fastify"}]},{name:"Hono",slug:"hono",category:"backend",signals:[{type:"dependency",key:"hono"}]},{name:"Elysia",slug:"elysia",category:"backend",signals:[{type:"dependency",key:"elysia"}]},{name:"NestJS",slug:"nestjs",category:"backend",signals:[{type:"dependency",key:"@nestjs/core"}]},{name:"Koa",slug:"koa",category:"backend",signals:[{type:"dependency",key:"koa"}]},{name:"Django",slug:"django",category:"backend",signals:[{type:"file",pattern:"manage.py"},{type:"file",pattern:"settings.py"}]},{name:"Flask",slug:"flask",category:"backend",signals:[{type:"file",pattern:"app.py"}]},{name:"FastAPI",slug:"fastapi",category:"backend",signals:[{type:"file",pattern:"main.py"}]},{name:"Rails",slug:"rails",category:"backend",signals:[{type:"file",pattern:"Gemfile"},{type:"file",pattern:"config/routes.rb"}]},{name:"Spring Boot",slug:"spring",category:"backend",signals:[{type:"content",pattern:"pom.xml",key:"spring-boot"},{type:"content",pattern:"build.gradle",key:"springframework.boot"},{type:"content",pattern:"build.gradle.kts",key:"springframework.boot"},{type:"content",pattern:"gradle/libs.versions.toml",key:"springframework.boot"}]},{name:"Prisma",slug:"prisma",category:"database",signals:[{type:"dependency",key:"prisma"},{type:"devDependency",key:"prisma"},{type:"file",pattern:"prisma/schema.prisma"}]},{name:"Drizzle",slug:"drizzle",category:"database",signals:[{type:"dependency",key:"drizzle-orm"},{type:"file",pattern:"drizzle.config.*"}]},{name:"TypeORM",slug:"typeorm",category:"database",signals:[{type:"dependency",key:"typeorm"}]},{name:"Mongoose",slug:"mongoose",category:"database",signals:[{type:"dependency",key:"mongoose"}]},{name:"Vite",slug:"vite",category:"build",signals:[{type:"dependency",key:"vite"},{type:"devDependency",key:"vite"},{type:"file",pattern:"vite.config.*"}]},{name:"webpack",slug:"webpack",category:"build",signals:[{type:"dependency",key:"webpack"},{type:"devDependency",key:"webpack"},{type:"file",pattern:"webpack.config.*"}]},{name:"esbuild",slug:"esbuild",category:"build",signals:[{type:"dependency",key:"esbuild"},{type:"devDependency",key:"esbuild"}]},{name:"Turbopack",slug:"turbopack",category:"build",signals:[{type:"file",pattern:"turbo.json"}]},{name:"Jest",slug:"jest",category:"testing",signals:[{type:"devDependency",key:"jest"},{type:"file",pattern:"jest.config.*"}]},{name:"Vitest",slug:"vitest",category:"testing",signals:[{type:"devDependency",key:"vitest"}]},{name:"Playwright",slug:"playwright",category:"testing",signals:[{type:"devDependency",key:"@playwright/test"},{type:"file",pattern:"playwright.config.*"}]},{name:"Cypress",slug:"cypress",category:"testing",signals:[{type:"devDependency",key:"cypress"},{type:"file",pattern:"cypress.config.*"}]},{name:"Turborepo",slug:"turborepo",category:"monorepo",signals:[{type:"devDependency",key:"turbo"},{type:"file",pattern:"turbo.json"}]},{name:"Nx",slug:"nx",category:"monorepo",signals:[{type:"devDependency",key:"nx"},{type:"file",pattern:"nx.json"}]},{name:"Lerna",slug:"lerna",category:"monorepo",signals:[{type:"devDependency",key:"lerna"},{type:"file",pattern:"lerna.json"}]},{name:"MCP SDK",slug:"mcp",category:"ai",signals:[{type:"dependency",key:"@modelcontextprotocol/sdk"}]},{name:"Anthropic SDK",slug:"anthropic",category:"ai",signals:[{type:"dependency",key:"@anthropic-ai/sdk"}]},{name:"OpenAI SDK",slug:"openai",category:"ai",signals:[{type:"dependency",key:"openai"}]},{name:"LangChain",slug:"langchain",category:"ai",signals:[{type:"dependency",key:"langchain"}]},{name:"Vercel",slug:"vercel",category:"hosting",signals:[{type:"file",pattern:"vercel.json"}]},{name:"Netlify",slug:"netlify",category:"hosting",signals:[{type:"file",pattern:"netlify.toml"}]},{name:"Docker",slug:"docker",category:"hosting",signals:[{type:"file",pattern:"Dockerfile"},{type:"file",pattern:"docker-compose.yml"}]},{name:"Cloudflare Workers",slug:"cloudflare",category:"hosting",signals:[{type:"file",pattern:"wrangler.toml"},{type:"dependency",key:"wrangler"}]},{name:"GitHub Actions",slug:"github-actions",category:"cicd",signals:[{type:"file",pattern:".github/workflows/*.yml"}]},{name:"Commander.js",slug:"commander",category:"cli",signals:[{type:"dependency",key:"commander"}]}];function RY($){let Z=M($,"Cargo.toml");if(!K(Z))return null;try{let X=n(Z,"utf-8").match(/^\s*\[package\][\s\S]*?^\s*name\s*=\s*"([^"]+)"/m);return X?X[1]:null}catch{return null}}function MY($){let Z=M($,"Cargo.toml");if(!K(Z))return!1;try{let U=n(Z,"utf-8");return/^\s*\[\[bin\]\]/m.test(U)}catch{return!1}}function KY($,Z){if(Z?.keywords?.some((X)=>/^sdk(?:\s|-|$)|-sdk$/i.test(X)))return'package.json keywords contains "sdk"';if(Z?.name&&/(?:^|[-_/])sdk(?:[-_/]|$)/i.test(Z.name))return`package.json name "${Z.name}" → sdk`;let U=RY($);if(U&&/(?:^|[-_])sdk(?:[-_]|$)/i.test(U))return`Cargo.toml name "${U}" → sdk`;return null}function FY($){let Z=["manifest.json","public/manifest.json","src/manifest.json","app/manifest.json","extension/manifest.json","dist/manifest.json"];for(let U of Z){let X=M($,U);if(!K(X))continue;try{let Q=JSON.parse(n(X,"utf-8"));if(typeof Q.manifest_version==="number")return`${U} manifest_version ${Q.manifest_version} (browser extension)`}catch{}}return null}function PY($){let Z=/(numpy|pandas|jupyter|scikit-learn|sklearn|pytorch|tensorflow|matplotlib|scipy)/i,U=M($,"pyproject.toml");if(K(U))try{let z=n(U,"utf-8").match(Z);if(z)return`pyproject.toml depends on ${z[1]}`}catch{}let X=M($,"requirements.txt");if(K(X))try{let z=n(X,"utf-8").match(Z);if(z)return`requirements.txt contains ${z[1]}`}catch{}return null}function AY($,Z){let U=["react-native","expo","@capacitor/core","@ionic/core"];if(Z){for(let X of U)if(Z.dependencies?.[X]||Z.devDependencies?.[X])return`${X} dependency`}if(K(M($,"ios"))&&K(M($,"android")))return"ios/ + android/ dirs";return null}function TY($,Z){let U=M($,"Cargo.toml");if(K(U))try{let Q=n(U,"utf-8");if(/crate-type\s*=\s*\[[^\]]*"cdylib"/.test(Q))return'Cargo.toml crate-type = ["cdylib"]';if(/wasm-bindgen|wasm-pack/i.test(Q))return"Cargo.toml wasm-bindgen/wasm-pack"}catch{}let X=M($,"build.zig");if(K(X))try{let Q=n(X,"utf-8");if(/\.wasm\b|wasm32|setOutputFormat\(\.wasm/i.test(Q))return"build.zig wasm target"}catch{}if(Z?.keywords?.some((Q)=>/^wasm(?:-|$)|webassembly/i.test(Q)))return'package.json keywords contains "wasm"';return null}function NY($,Z){if(!K(M($,"index.html")))return null;if(Z?.dependencies||Z?.devDependencies){let U={...Z.dependencies??{},...Z.devDependencies??{}};if(["react","vue","svelte","@sveltejs/kit","next","nuxt","astro","gatsby","solid-js","qwik"].some((Q)=>U[Q]))return null}return"index.html (vanilla, no frontend framework)"}function wY($,Z){if(Z?.name&&/specification|^@.*\/spec/i.test(Z.name))return`package name "${Z.name}" → documentation`;if(Z?.keywords?.some((U)=>/^(specification|format-spec|standard)$/i.test(U)))return'package keywords contains "specification"';if(Z?.bin)return null;if(Z?.files&&Z.files.length>0){let U=/^(dist|src|lib|build|bin)(\/|$)|\/(dist|src|lib|build|bin)(\/|$)|(\.|\/)(js|ts|tsx|jsx|mjs|cjs|py|rs|go)$/,X=Z.files.some((z)=>U.test(z)),Q=Z.files.some((z)=>/\.(md|MD)$|examples?\//.test(z)||z==="README.md"||z==="docs"||z==="docs/");if(!X&&Q)return"package.json files = docs/examples only (no source)"}return null}function CY($,Z,U){let X=U.find((Q)=>Q.slug==="astro"||Q.slug==="gatsby");if(X)return`${X.name} (static-site framework)`;if(Z?.keywords?.some((Q)=>/^(website|marketing|landing|brochure|portfolio)$/i.test(Q)))return'package keywords contains "website"/"marketing"/"landing"';return null}function bY($,Z){if(!Z)return null;let U={...Z.dependencies??{},...Z.devDependencies??{}},X=["@clerk/nextjs","@clerk/clerk-react","next-auth","@auth/core","auth0","@auth0/nextjs-auth0"],Q=["stripe","@stripe/stripe-js","lemonsqueezy"],z=X.some((H)=>U[H]),J=Q.some((H)=>U[H]);if(z&&J)return"auth + payment dependencies";return null}function SY($,Z,U){if(Z?.keywords?.some((z)=>/mcpaas/i.test(z)))return'package keywords contains "mcpaas"';if(Z?.name&&/mcpaas/i.test(Z.name))return`package name "${Z.name}" → mcpaas`;let X=U.some((z)=>z.slug==="mcp"),Q=U.some((z)=>z.category==="database");if(X&&Q&&Z?.dependencies&&Object.keys(Z.dependencies).length>10)return"MCP + database + complex deps (platform shape)";return null}function EY($,Z){if(!Z?.private)return null;if(!(!!Z.workspaces||K(M($,"pnpm-workspace.yaml"))))return null;return"private workspace + multi-package"}function T0($){let Z=M($,"package.json");if(!K(Z))return null;try{return JSON.parse(n(Z,"utf-8"))}catch{return null}}function S9($,Z){if(!Z.includes("*"))return K(M($,Z));let U=Z.split("/");if(U.length===1){let H=Z.split("*")[0];try{return b9($).some((q)=>q.startsWith(H))}catch{return!1}}let X=M($,...U.slice(0,-1)),Q=U[U.length-1],z=Q.split("*")[0],J=Q.split("*")[1]||"";try{return b9(X).some((H)=>H.startsWith(z)&&H.endsWith(J))}catch{return!1}}function jY($,Z,U){switch($.type){case"dependency":return!!Z?.dependencies?.[$.key];case"devDependency":return!!Z?.devDependencies?.[$.key];case"file":return S9(U,$.pattern);case"content":{if(!$.pattern||!$.key)return!1;if(!S9(U,$.pattern))return!1;try{let X=M(U,$.pattern);if(!K(X))return!1;return n(X,"utf-8").toLowerCase().includes($.key.toLowerCase())}catch{return!1}}default:return!1}}function B3($){let Z=T0($);return C9.map((U)=>{let Q=U.signals.filter((z)=>jY(z,Z,$)).length/U.signals.length;return{name:U.name,slug:U.slug,category:U.category,confidence:Q}}).filter((U)=>U.confidence>0).sort((U,X)=>X.confidence-U.confidence)}function E9($){let Z=T0($);if(Z?.devDependencies?.typescript||Z?.dependencies?.typescript)return"TypeScript";if(K(M($,"tsconfig.json")))return"TypeScript";if(K(M($,"Cargo.toml")))return"Rust";if(K(M($,"go.mod")))return"Go";if(A1($).length>0)return"C#";if(K(M($,"pyproject.toml"))||K(M($,"setup.py")))return"Python";if(K(M($,"Gemfile")))return"Ruby";if(q3($)){let U=w1($);if(U)return U.mainLanguage==="Java/Kotlin"?"Kotlin":U.mainLanguage;return"Java"}if(K(M($,"Package.swift")))return"Swift";if(K(M($,"build.zig")))return"Zig";if(K(M($,"pubspec.yaml")))return"Dart";if(Z)return"JavaScript";return"Unknown"}function j9($){let Z=T0($),U=B3($),X=[],Q=wY($,Z);if(Q)return X.push(Q),{type:"documentation",found:X};let z=KY($,Z);if(z)return X.push(z),{type:"sdk",found:X};let J=FY($);if(J)return X.push(J),{type:"extension",found:X};let H=SY($,Z,U);if(H)return X.push(H),{type:"mcpaas",found:X};let q=bY($,Z);if(q)return X.push(q),{type:"saas",found:X};let Y=TY($,Z);if(Y)return X.push(Y),{type:"wasm",found:X};let G=T$($);if(G)return X.push(G.found),{type:G.appType,found:X};let _=C$($);if(_)return X.push(_.found),{type:_.appType,found:X};let B=S$($);if(B)return X.push(B.found),{type:B.appType,found:X};let O=w1($);if(O)return X.push(O.found),{type:O.appType,found:X};let D=AY($,Z);if(D)return X.push(D),{type:"mobile",found:X};if(U.some((S)=>S.slug==="mcp"))return X.push("MCP SDK signal"),{type:"mcp",found:X};if(Z?.bin)return X.push("package.json bin"),{type:"cli",found:X};if(MY($))return X.push("Cargo.toml [[bin]]"),{type:"cli",found:X};if(K(M($,"build.zig"))){if(X.push("build.zig"),K(M($,"src/main.zig")))return X.push("src/main.zig"),{type:"cli",found:X};if(K(M($,"src/root.zig")))return X.push("src/root.zig"),{type:"library",found:X}}let W=U.some((S)=>S.slug==="svelte"||S.slug==="sveltekit");if(Z?.private===!0&&(K(M($,"pnpm-workspace.yaml"))||Z?.workspaces!==void 0)&&W)return X.push("private workspace","Svelte"),{type:"framework",found:X};if(W)return X.push("Svelte/SvelteKit"),{type:"svelte",found:X};let L=U.some((S)=>S.category==="frontend"),F=U.some((S)=>S.category==="backend");if(Z?.private&&(Z.workspaces||K(M($,"pnpm-workspace.yaml")))&&L&&F)return X.push("private workspace + frontend + backend frameworks"),{type:"enterprise",found:X};let A=EY($,Z);if(A)return X.push(A),{type:"monorepo-root",found:X};let T=CY($,Z,U);if(T)return X.push(T),{type:"website",found:X};if(U.some((S)=>S.slug==="nextjs"||S.slug==="nuxt"))return X.push(U.find((S)=>S.slug==="nextjs")?"Next.js":"Nuxt"),{type:"fullstack",found:X};let b=U.some((S)=>S.category==="frontend"),P=U.some((S)=>S.category==="backend");if(b&&P)return X.push("frontend framework","backend framework"),{type:"fullstack",found:X};if(b)return X.push("frontend framework"),{type:"frontend",found:X};if(P)return X.push("backend framework"),{type:"backend",found:X};let w=PY($);if(w)return X.push(w),{type:"data-science",found:X};let v=NY($,Z);if(v)return X.push(v),{type:"html",found:X};if(Z?.main&&!Z?.bin)return X.push("package.json main (no bin)"),{type:"library",found:X};return X.push("no classifying signals — fallback"),{type:"library",found:X}}function g9($){if(K(M($,"bunfig.toml")))return"Bun";if(K(M($,"deno.json"))||K(M($,"deno.jsonc")))return"Deno";if(T0($))return"Node.js";if(K(M($,"Cargo.toml")))return"Rust";if(K(M($,"go.mod")))return"Go";if(A1($).length>0)return".NET";if(K(M($,"pubspec.yaml")))return"Dart";return"Unknown"}function x9($){if(K(M($,"pubspec.yaml")))return"pub";if(K(M($,"go.mod")))return"go modules";if(A1($).length>0)return"NuGet";if(K(M($,"pom.xml")))return"maven";if(K(M($,"build.gradle"))||K(M($,"build.gradle.kts"))||K(M($,"settings.gradle"))||K(M($,"settings.gradle.kts")))return"gradle";if(K(M($,"bun.lockb"))||K(M($,"bun.lock")))return"bun";if(K(M($,"pnpm-lock.yaml")))return"pnpm";if(K(M($,"yarn.lock")))return"yarn";if(K(M($,"package-lock.json")))return"npm";return"npm"}function h9($){if(K(M($,".github/workflows")))return"GitHub Actions";if(K(M($,".gitlab-ci.yml")))return"GitLab CI";if(K(M($,".circleci")))return"CircleCI";if(K(M($,"Jenkinsfile")))return"Jenkins";return null}function y9($){if(K(M($,"vercel.json")))return"Vercel";if(K(M($,"netlify.toml")))return"Netlify";if(K(M($,"wrangler.toml")))return"Cloudflare";if(K(M($,"Dockerfile")))return"Docker";if(K(M($,"fly.toml")))return"Fly.io";if(K(M($,"render.yaml")))return"Render";return null}function f9($){let Z=M($,"svelte.config.js");if(!K(Z))return null;try{let X=n(Z,"utf-8").match(/@sveltejs\/adapter-(\w+)/);if(X){let Q=X[1];switch(Q){case"vercel":return"Vercel";case"node":return"Node";case"static":return"Static";case"cloudflare":return"Cloudflare";case"netlify":return"Netlify";case"auto":return"Auto";default:return Q}}return null}catch{return null}}function u9($){let Z=T0($);if(Z?.devDependencies?.vite||Z?.dependencies?.vite)return"Vite";if(Z?.devDependencies?.webpack||Z?.dependencies?.webpack)return"webpack";if(Z?.devDependencies?.esbuild||Z?.dependencies?.esbuild)return"esbuild";if(K(M($,"tsconfig.json"))&&Z?.devDependencies?.typescript)return"TypeScript (tsc)";return null}function k9($){return["package.json","Cargo.toml","pyproject.toml","go.mod","build.zig","build.zig.zon","src/index.ts","src/index.js","src/main.ts","src/cli.ts","src/main.rs","src/lib.rs","src/main.zig","src/root.zig","src/__init__.py","main.py","__main__.py","main.go","cmd/main.go","README.md","SPECIFICATION.md","BINARY-FORMAT.md","tsconfig.json","wrangler.toml","vercel.json"].filter((U)=>K(M($,U)))}function v9($,Z){let U={};if(Z?.scripts){for(let X of["build","test","lint","dev","start"])if(Z.scripts[X]){let Q=K(M($,"bun.lock"))||K(M($,"bun.lockb"))?"bun run":"npm run";U[X]=`${Q} ${X}`}}if(K(M($,"Cargo.toml"))){if(!U.build)U.build="cargo build --release";if(!U.test)U.test="cargo test";if(!U.lint)U.lint="cargo clippy"}if(K(M($,"build.zig"))){if(!U.build)U.build="zig build";if(!U.test)U.test="zig build test"}if(K(M($,"go.mod"))){if(!U.build)U.build="go build ./...";if(!U.test)U.test="go test ./..."}if(K(M($,"pyproject.toml"))||K(M($,"pytest.ini"))){if(!U.test)U.test="pytest"}return U}function m9($,Z,U,X){let Q=[];if(X&&X!=="Unknown")Q.push(X);let z=new Set(["frontend","backend","database","build","css","state","monorepo"]);for(let J of U)if(z.has(J.category))Q.push(J.name);if(K(M($,"bunfig.toml")))Q.push("Bun");else if(K(M($,"deno.json"))||K(M($,"deno.jsonc")))Q.push("Deno");if(Q.length<3&&Z?.dependencies){let J=Object.keys(Z.dependencies).slice(0,5);for(let H of J)if(!Q.some((q)=>q.toLowerCase().includes(H.toLowerCase())))Q.push(H)}return Q}function p9($){let Z=T0($),U=B3($),X=E9($),Q=j9($),z=Q.type,J=g9($),H=x9($),q=h9($),Y=y9($),G=u9($),_=U.find((E)=>E.category==="frontend"),B=U.find((E)=>E.category==="css"),O=U.find((E)=>E.category==="ui"),D=U.find((E)=>E.category==="state"),V=U.find((E)=>E.category==="backend"),W=U.find((E)=>E.category==="database"),I=w0[z]||w0.library,L=z==="framework",F=U.some((E)=>E.slug==="svelte"||E.slug==="sveltekit"),A=L&&F?"svelte":L?null:null,T=z==="svelte"||A==="svelte",N=T?f9($):null,b=T&&U.some((E)=>E.slug==="sveltekit"),P=new Set(["css_framework","ui_library","database","connection","hosting"]),w={},v=y.filter((E)=>E.path.startsWith("stack."));for(let E of v){let j=E.path.replace("stack.","");if(!I.includes(E.category)){w[j]="slotignored";continue}if(L&&P.has(j)){w[j]="slotignored";continue}switch(j){case"frontend":w[j]=_?.name??(z==="cli"?"CLI":"");break;case"css_framework":w[j]=B?.name??"";break;case"ui_library":w[j]=O?.name??"";break;case"state_management":w[j]=T?D?.name??"Runes":D?.name??"";break;case"backend":w[j]=T?b?"SvelteKit":V?.name??"":V?.name??"";break;case"api_type":w[j]=b?"Server Routes":"";break;case"runtime":w[j]=J!=="Unknown"?J:"";break;case"database":w[j]=W?.name??"";break;case"connection":w[j]=W?.name??"";break;case"hosting":if(T&&N)w[j]=N;else w[j]=Y??"";break;case"build":w[j]=T?"Vite":G??"";break;case"cicd":w[j]=q??"";break;case"package_manager":w[j]=H;break;default:w[j]="";break}}let S={},g=y.filter((E)=>E.path.startsWith("monorepo."));for(let E of g){let j=E.path.replace("monorepo.","");if(!I.includes(E.category))S[j]="slotignored";else S[j]=""}let i0={name:Z?.name??$.split("/").pop()??"project",goal:Z?.description??"",main_language:X,type:z};if(L&&A)i0.framework=A;let W3=m9($,Z,U,X),D3=k9($),I3=v9($,Z),b1={faf_version:w9,project:i0,stack:w,human_context:{who:"",what:Z?.description??"",why:"",where:"",when:"",how:""},monorepo:S,_meta:{found:Q.found}};if(W3.length>0)b1.tech_stack=W3;if(D3.length>0)b1.key_files=D3;if(Object.keys(I3).length>0)b1.commands=I3;return b1}import{existsSync as xY,readFileSync as hY}from"fs";import{join as yY}from"path";var l9={MIN_LENGTH:8,MAX_LENGTH:280},gY=[/^(see|see\s+the?)\s+readme/i,/^(tbd|todo|fixme|coming\s+soon)\b/i,/^(software|application|app|project|tool|library|framework)\.?$/i,/^(for\s+users|for\s+developers)\.?$/i,/^(description|goal|name|title)\.?$/i,/^lorem\s+ipsum/i,/^example(\s+\w+)?\.?$/i];function r($){let Z=$.trim();if(Z.length<l9.MIN_LENGTH)return!1;if(Z.length>l9.MAX_LENGTH)return!1;if(gY.some((U)=>U.test(Z)))return!1;if(/^[\s|\-*+]/.test(Z))return!1;if(Z.split(`
220
+ `).length>4)return!1;return!0}function fY($){let Z=$.split(`
220
221
  `),U=0;while(U<Z.length&&/^(#\s|$)/.test(Z[U].trim()))U++;while(U<Z.length){let X=Z[U].trim();if(/^\[!\[/.test(X)){U++;continue}if(/^!\[/.test(X)){U++;continue}if(/^<img\s/i.test(X)){U++;continue}if(X===""){U++;continue}break}return Z.slice(U).join(`
221
- `)}function QY($){let U=XY($).split(`
222
- `),X=[];for(let Q of U){let J=Q.trim();if(J===""){if(X.length>0)break;continue}if(/^(#|>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(J))break;if(/^\*\*[^*]+\*\*\s*$/.test(J)&&X.length===0)continue;X.push(J)}if(X.length===0)return null;return X.join(" ").trim()}function P0($,Z){let U=$.split(`
223
- `),X=0;while(X<U.length){let J=U[X].trim().match(/^(#{1,6})\s+(.+)$/);if(J&&Z.test(J[2])){let z=J[1].length,H=[];X++;while(X<U.length){let Y=U[X].trim(),G=Y.match(/^(#{1,6})\s+/);if(G&&G[1].length<=z)break;if(Y===""){if(H.length>0)break;X++;continue}if(/^(>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(Y))break;H.push(Y),X++}if(H.length===0)return null;return H.join(" ").trim()}X++}return null}function JY($){let Z=P0($,/^(use\s+cases?|goal)\b/i);if(Z&&d(Z))return Z;let U=QY($);if(U&&d(U))return U;return}function zY($){let Z=P0($,/^(about|description|overview|what(\s+is\s+this)?)\b/i);if(Z&&d(Z))return Z;return}function HY($){let Z=P0($,/^(audience|users?|for\s+whom|who(\s+is\s+this\s+for)?)\b/i);if(Z&&d(Z))return Z;return}function GY($){let Z=P0($,/^(why|motivation|problem|rationale)\b/i);if(Z&&d(Z))return Z;return}function YY($){let Z=P0($,/^(deployment|where(\s+it\s+runs)?|hosting)\b/i);if(Z&&d(Z))return Z;return}function qY($){let Z=P0($,/^(status|history|timeline|since|launched)\b/i);if(Z&&d(Z))return Z;return}function _Y($){let Z=P0($,/^(architecture|how(\s+it\s+works)?|approach|design)\b/i);if(Z&&d(Z))return Z;return}function J3($){let Z=["README.md","README.MD","Readme.md","readme.md"],U=null;for(let O of Z){let I=UY($,O);if($Y(I)){U=I;break}}if(!U)return{};let X;try{X=ZY(U,"utf-8")}catch{return{}}let Q={},J=JY(X);if(J)Q.project={goal:J};let z={},H=zY(X);if(H)z.what=H;let Y=HY(X);if(Y)z.who=Y;let G=GY(X);if(G)z.why=G;let _=YY(X);if(_)z.where=_;let q=qY(X);if(q)z.when=q;let B=_Y(X);if(B)z.how=B;if(Object.keys(z).length>0)Q.human_context=z;return Q}import{existsSync as BY,readFileSync as VY}from"fs";import{join as OY}from"path";function WY($,Z){let U=$.split(`
224
- `),X=!1;for(let Q of U){let J=Q.trim();if(/^\[/.test(J)){X=J==="[package]";continue}if(!X)continue;let z=J.match(new RegExp(`^${Z}\\s*=\\s*(.+)$`));if(z){let H=z[1].trim();H=H.replace(/\s*#.*$/,"").trim();let Y=H.match(/^"((?:[^"\\]|\\.)*)"$/)||H.match(/^'((?:[^'\\]|\\.)*)'$/);if(Y)return Y[1];return H}}return null}function z3($){let Z=OY($,"Cargo.toml");if(!BY(Z))return{};let U;try{U=VY(Z,"utf-8")}catch{return{}}let X=WY(U,"description");if(X&&d(X))return{project:{goal:X}};return{}}function IY($,Z){let U={project:{...Z.project??{},...$.project??{}},human_context:{...Z.human_context??{},...$.human_context??{}}};if(U.project&&Object.keys(U.project).length===0)delete U.project;if(U.human_context&&Object.keys(U.human_context).length===0)delete U.human_context;return U}function S6($){return IY(J3($),z3($))}function LY($){let Z=C6($),U=S6($),X=A$(Z,U);DY(X);let Q=A$(X,U3($));return A$(Q,{human_context:X3($)})}function DY($){let Z=$.project?.type??"library",U=T0[Z]||T0.library;for(let X of x){if(U.includes(X.category))continue;let[Q,J]=X.path.split(".");if(Q==="stack"&&$.stack)$.stack[J]="slotignored";if(Q==="monorepo"&&$.monorepo)$.monorepo[J]="slotignored"}}function A$($,Z){let U={...$};for(let[X,Q]of Object.entries(Z)){let J=U[X];if(q0(J))U[X]=Q;else if(typeof Q==="object"&&Q!==null&&!Array.isArray(Q)&&typeof J==="object"&&J!==null&&!Array.isArray(J))U[X]=A$(J,Q)}return U}export{GH as writeServerCard,ez as writeProjectHtml,a6 as validateFaf,f0 as utcNow,U3 as turboCatSlots,Y6 as turboCatScan,f6 as slotsByCategory,s9 as seedSixWsFromGoal,j$ as scoreFafYaml,CH as runLoop,O6 as relentlessContextDetailed,X3 as relentlessContext,zH as registryName,JH as registryMeta,T9 as readFafRaw,dz as readFaf,a2 as questionForSlot,yH as publicQuestions,L$ as normalizeAnswer,n9 as loopVerdict,C$ as kernel,q0 as isPlaceholder,a9 as isHumanSlot,I$ as isEmptyValue,TH as interviewForMissing,hH as gradeAnswers,s0 as getTier,v6 as getNextTier,E9 as generateServerCard,w9 as generateProjectHtml,k9 as fromClaudeDir,A9 as findFafFile,l2 as fafContextBlock,_3 as enrichScore,gH as deriveQuestionSet,r9 as classifyGaps,D1 as canonicalPriority,bH as buildTableOf8,xH as buildReceipt,LY as assembleFreshFaf,$6 as answersMatch,a as TIERS,c9 as STACK_INTERVIEW,d0 as SLOT_BY_PATH,x as SLOTS,s2 as SIX_WS_INTERVIEW,g9 as REGISTRY_PUBLISHER_KEY,Y0 as PRIORITY_RANK,p2 as PRIORITY_ORDER,T1 as PLACEHOLDERS,W$ as KNOWLEDGE_TYPES,d9 as INTERVIEW_VERSION,PH as INTERVIEW_PATHS,i9 as INTERVIEW_BY_PATH,k0 as INTERVIEW,D0 as FafmSoul,i0 as FAF_HEX,k6 as ENTERPRISE_SLOTS,n2 as BENCH_VERSION,u6 as BASE_SLOTS,e9 as ALIAS_GROUPS};
222
+ `)}function uY($){let U=fY($).split(`
223
+ `),X=[];for(let Q of U){let z=Q.trim();if(z===""){if(X.length>0)break;continue}if(/^(#|>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(z))break;if(/^\*\*[^*]+\*\*\s*$/.test(z)&&X.length===0)continue;X.push(z)}if(X.length===0)return null;return X.join(" ").trim()}function N0($,Z){let U=$.split(`
224
+ `),X=0;while(X<U.length){let z=U[X].trim().match(/^(#{1,6})\s+(.+)$/);if(z&&Z.test(z[2])){let J=z[1].length,H=[];X++;while(X<U.length){let q=U[X].trim(),Y=q.match(/^(#{1,6})\s+/);if(Y&&Y[1].length<=J)break;if(q===""){if(H.length>0)break;X++;continue}if(/^(>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(q))break;H.push(q),X++}if(H.length===0)return null;return H.join(" ").trim()}X++}return null}function kY($){let Z=N0($,/^(use\s+cases?|goal)\b/i);if(Z&&r(Z))return Z;let U=uY($);if(U&&r(U))return U;return}function vY($){let Z=N0($,/^(about|description|overview|what(\s+is\s+this)?)\b/i);if(Z&&r(Z))return Z;return}function mY($){let Z=N0($,/^(audience|users?|for\s+whom|who(\s+is\s+this\s+for)?)\b/i);if(Z&&r(Z))return Z;return}function pY($){let Z=N0($,/^(why|motivation|problem|rationale)\b/i);if(Z&&r(Z))return Z;return}function lY($){let Z=N0($,/^(deployment|where(\s+it\s+runs)?|hosting)\b/i);if(Z&&r(Z))return Z;return}function dY($){let Z=N0($,/^(status|history|timeline|since|launched)\b/i);if(Z&&r(Z))return Z;return}function cY($){let Z=N0($,/^(architecture|how(\s+it\s+works)?|approach|design)\b/i);if(Z&&r(Z))return Z;return}function V3($){let Z=["README.md","README.MD","Readme.md","readme.md"],U=null;for(let O of Z){let D=yY($,O);if(xY(D)){U=D;break}}if(!U)return{};let X;try{X=hY(U,"utf-8")}catch{return{}}let Q={},z=kY(X);if(z)Q.project={goal:z};let J={},H=vY(X);if(H)J.what=H;let q=mY(X);if(q)J.who=q;let Y=pY(X);if(Y)J.why=Y;let G=lY(X);if(G)J.where=G;let _=dY(X);if(_)J.when=_;let B=cY(X);if(B)J.how=B;if(Object.keys(J).length>0)Q.human_context=J;return Q}import{existsSync as iY,readFileSync as rY}from"fs";import{join as sY}from"path";function aY($,Z){let U=$.split(`
225
+ `),X=!1;for(let Q of U){let z=Q.trim();if(/^\[/.test(z)){X=z==="[package]";continue}if(!X)continue;let J=z.match(new RegExp(`^${Z}\\s*=\\s*(.+)$`));if(J){let H=J[1].trim();H=H.replace(/\s*#.*$/,"").trim();let q=H.match(/^"((?:[^"\\]|\\.)*)"$/)||H.match(/^'((?:[^'\\]|\\.)*)'$/);if(q)return q[1];return H}}return null}function O3($){let Z=sY($,"Cargo.toml");if(!iY(Z))return{};let U;try{U=rY(Z,"utf-8")}catch{return{}}let X=aY(U,"description");if(X&&r(X))return{project:{goal:X}};return{}}function nY($,Z){let U={project:{...Z.project??{},...$.project??{}},human_context:{...Z.human_context??{},...$.human_context??{}}};if(U.project&&Object.keys(U.project).length===0)delete U.project;if(U.human_context&&Object.keys(U.human_context).length===0)delete U.human_context;return U}function d9($){return nY(V3($),O3($))}function oY($){let Z=p9($),U=d9($),X=E$(Z,U);tY(X);let Q=E$(X,G3($));return E$(Q,{human_context:_3($)})}function tY($){let Z=$.project?.type??"library",U=w0[Z]||w0.library;for(let X of y){if(U.includes(X.category))continue;let[Q,z]=X.path.split(".");if(Q==="stack"&&$.stack)$.stack[z]="slotignored";if(Q==="monorepo"&&$.monorepo)$.monorepo[z]="slotignored"}}function E$($,Z){let U={...$};for(let[X,Q]of Object.entries(Z)){let z=U[X];if(V0(z))U[X]=Q;else if(typeof Q==="object"&&Q!==null&&!Array.isArray(Q)&&typeof z==="object"&&z!==null&&!Array.isArray(z))U[X]=E$(z,Q)}return U}export{KH as writeServerCard,BH as writeProjectHtml,HZ as validateFaf,m0 as utcNow,G3 as turboCatSlots,K9 as turboCatScan,n9 as slotsByCategory,Z9 as seedSixWsFromGoal,f$ as scoreFafYaml,pH as runLoop,N9 as relentlessContextDetailed,_3 as relentlessContext,RH as registryName,LH as registryMeta,E6 as readFafRaw,XH as readFaf,Z3 as questionForSlot,rH as publicQuestions,A$ as normalizeAnswer,Q9 as loopVerdict,y$ as kernel,V0 as isPlaceholder,U9 as isHumanSlot,P$ as isEmptyValue,yH as interviewForMissing,sH as gradeAnswers,o0 as getTier,e9 as getNextTier,v6 as generateServerCard,y6 as generateProjectHtml,r6 as fromClaudeDir,j6 as findFafFile,a2 as fafContextBlock,R3 as enrichScore,iH as deriveQuestionSet,X9 as classifyGaps,F1 as canonicalPriority,vH as buildTableOf8,aH as buildReceipt,oY as assembleFreshFaf,q9 as answersMatch,o as TIERS,e6 as STACK_INTERVIEW,s0 as SLOT_BY_PATH,y as SLOTS,$3 as SIX_WS_INTERVIEW,m6 as REGISTRY_PUBLISHER_KEY,B0 as PRIORITY_RANK,n2 as PRIORITY_ORDER,S1 as PLACEHOLDERS,F$ as KNOWLEDGE_TYPES,t6 as INTERVIEW_VERSION,hH as INTERVIEW_PATHS,$9 as INTERVIEW_BY_PATH,l0 as INTERVIEW,K0 as FafmSoul,n0 as FAF_HEX,t9 as ENTERPRISE_SLOTS,X3 as BENCH_VERSION,o9 as BASE_SLOTS,H9 as ALIAS_GROUPS};
225
226
 
226
- //# debugId=2A4B779731F9D0A364756E2164756E21
227
+ //# debugId=9DFFE6C0E81FF14464756E2164756E21
227
228
  //# sourceMappingURL=index.js.map