@pickled-dev/cli 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +43 -43
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -26,16 +26,16 @@ Expecting one of '${X.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycl
|
|
|
26
26
|
`),this._exit(0,"commander.version",$)}),this}description($,Z){if($===void 0&&Z===void 0)return this._description;if(this._description=$,Z)this._argsDescription=Z;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let Z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Z=this.commands[this.commands.length-1];if($===Z._name)throw Error("Command alias can't be the same as its name");let X=this.parent?._findCommand($);if(X){let z=[X.name()].concat(X.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${z}'`)}return Z._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((Z)=>this.alias(Z)),this}usage($){if($===void 0){if(this._usage)return this._usage;let Z=this.registeredArguments.map((X)=>{return gX(X)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?Z:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}helpGroup($){if($===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=$,this}commandsGroup($){if($===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=$,this}optionsGroup($){if($===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=$,this}_initOptionGroup($){if(this._defaultOptionGroup&&!$.helpGroupHeading)$.helpGroup(this._defaultOptionGroup)}_initCommandGroup($){if(this._defaultCommandGroup&&!$.helpGroup())$.helpGroup(this._defaultCommandGroup)}nameFromFilename($){return this._name=T0.basename($,T0.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let Z=this.createHelp(),X=this._getOutputContext($);Z.prepareContext({error:X.error,helpWidth:X.helpWidth,outputHasColors:X.hasColors});let z=Z.formatHelp(this,Z);if(X.hasColors)return z;return this._outputConfiguration.stripColor(z)}_getOutputContext($){$=$||{};let Z=!!$.error,X,z,q;if(Z)X=(J)=>this._outputConfiguration.writeErr(J),z=this._outputConfiguration.getErrHasColors(),q=this._outputConfiguration.getErrHelpWidth();else X=(J)=>this._outputConfiguration.writeOut(J),z=this._outputConfiguration.getOutHasColors(),q=this._outputConfiguration.getOutHelpWidth();return{error:Z,write:(J)=>{if(!z)J=this._outputConfiguration.stripColor(J);return X(J)},hasColors:z,helpWidth:q}}outputHelp($){let Z;if(typeof $==="function")Z=$,$=void 0;let X=this._getOutputContext($),z={error:X.error,write:X.write,command:this};this._getCommandAndAncestors().reverse().forEach((G)=>G.emit("beforeAllHelp",z)),this.emit("beforeHelp",z);let q=this.helpInformation({error:X.error});if(Z){if(q=Z(q),typeof q!=="string"&&!Buffer.isBuffer(q))throw Error("outputHelp callback must return a string or a Buffer")}if(X.write(q),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",z),this._getCommandAndAncestors().forEach((G)=>G.emit("afterAllHelp",z))}helpOption($,Z){if(typeof $==="boolean"){if($){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption($??"-h, --help",Z??"display help for command"),$||Z)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this._initOptionGroup($),this}help($){this.outputHelp($);let Z=Number(b.exitCode??0);if(Z===0&&$&&typeof $!=="function"&&$.error)Z=1;this._exit(Z,"commander.help","(outputHelp)")}addHelpText($,Z){let X=["beforeAll","before","after","afterAll"];if(!X.includes($))throw Error(`Unexpected value for position to addHelpText.
|
|
27
27
|
Expecting one of '${X.join("', '")}'`);let z=`${$}Help`;return this.on(z,(q)=>{let G;if(typeof Z==="function")G=Z({error:q.error,command:q.command});else G=Z;if(G)q.write(`${G}
|
|
28
28
|
`)}),this}_outputHelpIfRequested($){let Z=this._getHelpOption();if(Z&&$.find((z)=>Z.is(z)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function x5($){return $.map((Z)=>{if(!Z.startsWith("--inspect"))return Z;let X,z="127.0.0.1",q="9229",G;if((G=Z.match(/^(--inspect(-brk)?)$/))!==null)X=G[1];else if((G=Z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(X=G[1],/^\d+$/.test(G[3]))q=G[3];else z=G[3];else if((G=Z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)X=G[1],z=G[3],q=G[4];if(X&&q!=="0")return`${X}=${z}:${parseInt(q)+1}`;return Z})}function _4(){if(b.env.NO_COLOR||b.env.FORCE_COLOR==="0"||b.env.FORCE_COLOR==="false")return!1;if(b.env.FORCE_COLOR||b.env.CLICOLOR_FORCE!==void 0)return!0;return}dX.Command=F4;dX.useColor=_4});var v5=F((aX)=>{var{Argument:f5}=E1(),{Command:M4}=k5(),{CommanderError:cX,InvalidArgumentError:h5}=f$(),{Help:iX}=B4(),{Option:g5}=T4();aX.program=new M4;aX.createCommand=($)=>new M4($);aX.createOption=($,Z)=>new g5($,Z);aX.createArgument=($,Z)=>new f5($,Z);aX.Command=M4;aX.Option=g5;aX.Argument=f5;aX.Help=iX;aX.CommanderError=cX;aX.InvalidArgumentError=h5;aX.InvalidOptionArgumentError=h5});var E=F((Kz)=>{var I4=Symbol.for("yaml.alias"),d5=Symbol.for("yaml.document"),y1=Symbol.for("yaml.map"),p5=Symbol.for("yaml.pair"),R4=Symbol.for("yaml.scalar"),x1=Symbol.for("yaml.seq"),L0=Symbol.for("yaml.node.type"),Jz=($)=>!!$&&typeof $==="object"&&$[L0]===I4,Qz=($)=>!!$&&typeof $==="object"&&$[L0]===d5,Yz=($)=>!!$&&typeof $==="object"&&$[L0]===y1,Hz=($)=>!!$&&typeof $==="object"&&$[L0]===p5,l5=($)=>!!$&&typeof $==="object"&&$[L0]===R4,Uz=($)=>!!$&&typeof $==="object"&&$[L0]===x1;function c5($){if($&&typeof $==="object")switch($[L0]){case y1:case x1:return!0}return!1}function Wz($){if($&&typeof $==="object")switch($[L0]){case I4:case y1:case R4:case x1:return!0}return!1}var Vz=($)=>(l5($)||c5($))&&!!$.anchor;Kz.ALIAS=I4;Kz.DOC=d5;Kz.MAP=y1;Kz.NODE_TYPE=L0;Kz.PAIR=p5;Kz.SCALAR=R4;Kz.SEQ=x1;Kz.hasAnchor=Vz;Kz.isAlias=Jz;Kz.isCollection=c5;Kz.isDocument=Qz;Kz.isMap=Yz;Kz.isNode=Wz;Kz.isPair=Hz;Kz.isScalar=l5;Kz.isSeq=Uz});var h$=F((Cz)=>{var v=E(),r=Symbol("break visit"),i5=Symbol("skip children"),W0=Symbol("remove node");function k1($,Z){let X=a5(Z);if(v.isDocument($)){if(X$(null,$.contents,X,Object.freeze([$]))===W0)$.contents=null}else X$(null,$,X,Object.freeze([]))}k1.BREAK=r;k1.SKIP=i5;k1.REMOVE=W0;function X$($,Z,X,z){let q=n5($,Z,X,z);if(v.isNode(q)||v.isPair(q))return s5($,z,q),X$($,q,X,z);if(typeof q!=="symbol"){if(v.isCollection(Z)){z=Object.freeze(z.concat(Z));for(let G=0;G<Z.items.length;++G){let J=X$(G,Z.items[G],X,z);if(typeof J==="number")G=J-1;else if(J===r)return r;else if(J===W0)Z.items.splice(G,1),G-=1}}else if(v.isPair(Z)){z=Object.freeze(z.concat(Z));let G=X$("key",Z.key,X,z);if(G===r)return r;else if(G===W0)Z.key=null;let J=X$("value",Z.value,X,z);if(J===r)return r;else if(J===W0)Z.value=null}}return q}async function f1($,Z){let X=a5(Z);if(v.isDocument($)){if(await z$(null,$.contents,X,Object.freeze([$]))===W0)$.contents=null}else await z$(null,$,X,Object.freeze([]))}f1.BREAK=r;f1.SKIP=i5;f1.REMOVE=W0;async function z$($,Z,X,z){let q=await n5($,Z,X,z);if(v.isNode(q)||v.isPair(q))return s5($,z,q),z$($,q,X,z);if(typeof q!=="symbol"){if(v.isCollection(Z)){z=Object.freeze(z.concat(Z));for(let G=0;G<Z.items.length;++G){let J=await z$(G,Z.items[G],X,z);if(typeof J==="number")G=J-1;else if(J===r)return r;else if(J===W0)Z.items.splice(G,1),G-=1}}else if(v.isPair(Z)){z=Object.freeze(z.concat(Z));let G=await z$("key",Z.key,X,z);if(G===r)return r;else if(G===W0)Z.key=null;let J=await z$("value",Z.value,X,z);if(J===r)return r;else if(J===W0)Z.value=null}}return q}function a5($){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 n5($,Z,X,z){if(typeof X==="function")return X($,Z,z);if(v.isMap(Z))return X.Map?.($,Z,z);if(v.isSeq(Z))return X.Seq?.($,Z,z);if(v.isPair(Z))return X.Pair?.($,Z,z);if(v.isScalar(Z))return X.Scalar?.($,Z,z);if(v.isAlias(Z))return X.Alias?.($,Z,z);return}function s5($,Z,X){let z=Z[Z.length-1];if(v.isCollection(z))z.items[$]=X;else if(v.isPair(z))if($==="key")z.key=X;else z.value=X;else if(v.isDocument(z))z.contents=X;else{let q=v.isAlias(z)?"alias":"scalar";throw Error(`Cannot replace node with ${q} parent`)}}Cz.visit=k1;Cz.visitAsync=f1});var A4=F((fz)=>{var r5=E(),yz=h$(),xz={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},kz=($)=>$.replace(/[!,[\]{}]/g,(Z)=>xz[Z]);class Z0{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Z0.defaultYaml,$),this.tags=Object.assign({},Z0.defaultTags,Z)}clone(){let $=new Z0(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new Z0(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Z0.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Z0.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:Z0.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Z0.defaultTags),this.atNextDocument=!1;let X=$.trim().split(/[ \t]+/),z=X.shift();switch(z){case"%TAG":{if(X.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),X.length<2)return!1}let[q,G]=X;return this.tags[q]=G,!0}case"%YAML":{if(this.yaml.explicit=!0,X.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[q]=X;if(q==="1.1"||q==="1.2")return this.yaml.version=q,!0;else{let G=/^\d+\.\d+$/.test(q);return Z(6,`Unsupported YAML version ${q}`,G),!1}}default:return Z(0,`Unknown directive ${z}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let G=$.slice(2,-1);if(G==="!"||G==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return G}let[,X,z]=$.match(/^(.*!)([^!]*)$/s);if(!z)Z(`The ${$} tag has no suffix`);let q=this.tags[X];if(q)try{return q+decodeURIComponent(z)}catch(G){return Z(String(G)),null}if(X==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,X]of Object.entries(this.tags))if($.startsWith(X))return Z+kz($.substring(X.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],X=Object.entries(this.tags),z;if($&&X.length>0&&r5.isNode($.contents)){let q={};yz.visit($.contents,(G,J)=>{if(r5.isNode(J)&&J.tag)q[J.tag]=!0}),z=Object.keys(q)}else z=[];for(let[q,G]of X){if(q==="!!"&&G==="tag:yaml.org,2002:")continue;if(!$||z.some((J)=>J.startsWith(G)))Z.push(`%TAG ${q} ${G}`)}return Z.join(`
|
|
29
|
-
`)}}Z0.defaultYaml={explicit:!1,version:"1.2"};Z0.defaultTags={"!!":"tag:yaml.org,2002:"};fz.Directives=Z0});var h1=F((mz)=>{var o5=E(),gz=h$();function vz($){if(/[\x00-\x19\s,[\]{}]/.test($)){let X=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(X)}return!0}function t5($){let Z=new Set;return gz.visit($,{Value(X,z){if(z.anchor)Z.add(z.anchor)}}),Z}function e5($,Z){for(let X=1;;++X){let z=`${$}${X}`;if(!Z.has(z))return z}}function uz($,Z){let X=[],z=new Map,q=null;return{onAnchor:(G)=>{X.push(G),q??(q=t5($));let J=e5(Z,q);return q.add(J),J},setAnchors:()=>{for(let G of X){let J=z.get(G);if(typeof J==="object"&&J.anchor&&(o5.isScalar(J.node)||o5.isCollection(J.node)))J.node.anchor=J.anchor;else{let Q=Error("Failed to resolve repeated object (this should not happen)");throw Q.source=G,Q}}},sourceObjects:z}}mz.anchorIsValid=vz;mz.anchorNames=t5;mz.createNodeAnchors=uz;mz.findNewAnchor=e5});var j4=F((iz)=>{function g$($,Z,X,z){if(z&&typeof z==="object")if(Array.isArray(z))for(let q=0,G=z.length;q<G;++q){let J=z[q],Q=g$($,z,String(q),J);if(Q===void 0)delete z[q];else if(Q!==J)z[q]=Q}else if(z instanceof Map)for(let q of Array.from(z.keys())){let G=z.get(q),J=g$($,z,q,G);if(J===void 0)z.delete(q);else if(J!==G)z.set(q,J)}else if(z instanceof Set)for(let q of Array.from(z)){let G=g$($,z,q,q);if(G===void 0)z.delete(q);else if(G!==q)z.delete(q),z.add(G)}else for(let[q,G]of Object.entries(z)){let J=g$($,z,q,G);if(J===void 0)delete z[q];else if(J!==G)z[q]=J}return $.call(Z,X,z)}iz.applyReviver=g$});var R0=F((sz)=>{var nz=E();function $
|
|
29
|
+
`)}}Z0.defaultYaml={explicit:!1,version:"1.2"};Z0.defaultTags={"!!":"tag:yaml.org,2002:"};fz.Directives=Z0});var h1=F((mz)=>{var o5=E(),gz=h$();function vz($){if(/[\x00-\x19\s,[\]{}]/.test($)){let X=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(X)}return!0}function t5($){let Z=new Set;return gz.visit($,{Value(X,z){if(z.anchor)Z.add(z.anchor)}}),Z}function e5($,Z){for(let X=1;;++X){let z=`${$}${X}`;if(!Z.has(z))return z}}function uz($,Z){let X=[],z=new Map,q=null;return{onAnchor:(G)=>{X.push(G),q??(q=t5($));let J=e5(Z,q);return q.add(J),J},setAnchors:()=>{for(let G of X){let J=z.get(G);if(typeof J==="object"&&J.anchor&&(o5.isScalar(J.node)||o5.isCollection(J.node)))J.node.anchor=J.anchor;else{let Q=Error("Failed to resolve repeated object (this should not happen)");throw Q.source=G,Q}}},sourceObjects:z}}mz.anchorIsValid=vz;mz.anchorNames=t5;mz.createNodeAnchors=uz;mz.findNewAnchor=e5});var j4=F((iz)=>{function g$($,Z,X,z){if(z&&typeof z==="object")if(Array.isArray(z))for(let q=0,G=z.length;q<G;++q){let J=z[q],Q=g$($,z,String(q),J);if(Q===void 0)delete z[q];else if(Q!==J)z[q]=Q}else if(z instanceof Map)for(let q of Array.from(z.keys())){let G=z.get(q),J=g$($,z,q,G);if(J===void 0)z.delete(q);else if(J!==G)z.set(q,J)}else if(z instanceof Set)for(let q of Array.from(z)){let G=g$($,z,q,q);if(G===void 0)z.delete(q);else if(G!==q)z.delete(q),z.add(G)}else for(let[q,G]of Object.entries(z)){let J=g$($,z,q,G);if(J===void 0)delete z[q];else if(J!==G)z[q]=J}return $.call(Z,X,z)}iz.applyReviver=g$});var R0=F((sz)=>{var nz=E();function $8($,Z,X){if(Array.isArray($))return $.map((z,q)=>$8(z,String(q),X));if($&&typeof $.toJSON==="function"){if(!X||!nz.hasAnchor($))return $.toJSON(Z,X);let z={aliasCount:0,count:1,res:void 0};X.anchors.set($,z),X.onCreate=(G)=>{z.res=G,delete X.onCreate};let q=$.toJSON(Z,X);if(X.onCreate)X.onCreate(q);return q}if(typeof $==="bigint"&&!X?.keep)return Number($);return $}sz.toJS=$8});var g1=F((ez)=>{var oz=j4(),Z8=E(),tz=R0();class X8{constructor($){Object.defineProperty(this,Z8.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:X,onAnchor:z,reviver:q}={}){if(!Z8.isDocument($))throw TypeError("A document argument is required");let G={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},J=tz.toJS(this,"",G);if(typeof z==="function")for(let{count:Q,res:Y}of G.anchors.values())z(Y,Q);return typeof q==="function"?oz.applyReviver(q,{"":J},"",J):J}}ez.NodeBase=X8});var v$=F((G3)=>{var Z3=h1(),X3=h$(),q$=E(),z3=g1(),q3=R0();class z8 extends z3.NodeBase{constructor($){super(q$.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){let X;if(Z?.aliasResolveCache)X=Z.aliasResolveCache;else if(X=[],X3.visit($,{Node:(q,G)=>{if(q$.isAlias(G)||q$.hasAnchor(G))X.push(G)}}),Z)Z.aliasResolveCache=X;let z=void 0;for(let q of X){if(q===this)break;if(q.anchor===this.source)z=q}return z}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:X,doc:z,maxAliasCount:q}=Z,G=this.resolve(z,Z);if(!G){let Q=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(Q)}let J=X.get(G);if(!J)q3.toJS(G,null,Z),J=X.get(G);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=v1(z,G,X);if(J.count*J.aliasCount>q)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return J.res}toString($,Z,X){let z=`*${this.source}`;if($){if(Z3.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`${z} `}return z}}function v1($,Z,X){if(q$.isAlias(Z)){let z=Z.resolve($),q=X&&z&&X.get(z);return q?q.count*q.aliasCount:0}else if(q$.isCollection(Z)){let z=0;for(let q of Z.items){let G=v1($,q,X);if(G>z)z=G}return z}else if(q$.isPair(Z)){let z=v1($,Z.key,X),q=v1($,Z.value,X);return Math.max(z,q)}return 1}G3.Alias=z8});var g=F((W3)=>{var Q3=E(),Y3=g1(),H3=R0(),U3=($)=>!$||typeof $!=="function"&&typeof $!=="object";class d0 extends Y3.NodeBase{constructor($){super(Q3.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:H3.toJS(this.value,$,Z)}toString(){return String(this.value)}}d0.BLOCK_FOLDED="BLOCK_FOLDED";d0.BLOCK_LITERAL="BLOCK_LITERAL";d0.PLAIN="PLAIN";d0.QUOTE_DOUBLE="QUOTE_DOUBLE";d0.QUOTE_SINGLE="QUOTE_SINGLE";W3.Scalar=d0;W3.isScalarValue=U3});var u$=F((_3)=>{var B3=v$(),p0=E(),q8=g(),T3="tag:yaml.org,2002:";function L3($,Z,X){if(Z){let z=X.filter((G)=>G.tag===Z),q=z.find((G)=>!G.format)??z[0];if(!q)throw Error(`Tag ${Z} not found`);return q}return X.find((z)=>z.identify?.($)&&!z.format)}function D3($,Z,X){if(p0.isDocument($))$=$.contents;if(p0.isNode($))return $;if(p0.isPair($)){let U=X.schema[p0.MAP].createNode?.(X.schema,null,X);return U.items.push($),U}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:z,onAnchor:q,onTagObj:G,schema:J,sourceObjects:Q}=X,Y=void 0;if(z&&$&&typeof $==="object")if(Y=Q.get($),Y)return Y.anchor??(Y.anchor=q($)),new B3.Alias(Y.anchor);else Y={anchor:null,node:null},Q.set($,Y);if(Z?.startsWith("!!"))Z=T3+Z.slice(2);let H=L3($,Z,J.tags);if(!H){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let U=new q8.Scalar($);if(Y)Y.node=U;return U}H=$ instanceof Map?J[p0.MAP]:(Symbol.iterator in Object($))?J[p0.SEQ]:J[p0.MAP]}if(G)G(H),delete X.onTagObj;let W=H?.createNode?H.createNode(X.schema,$,X):typeof H?.nodeClass?.from==="function"?H.nodeClass.from(X.schema,$,X):new q8.Scalar($);if(Z)W.tag=Z;else if(!H.default)W.tag=H.tag;if(Y)Y.node=W;return W}_3.createNode=D3});var u1=F((w3)=>{var M3=u$(),V0=E(),O3=g1();function N4($,Z,X){let z=X;for(let q=Z.length-1;q>=0;--q){let G=Z[q];if(typeof G==="number"&&Number.isInteger(G)&&G>=0){let J=[];J[G]=z,z=J}else z=new Map([[G,z]])}return M3.createNode(z,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var G8=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class J8 extends O3.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((X)=>V0.isNode(X)||V0.isPair(X)?X.clone($):X),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(G8($))this.add(Z);else{let[X,...z]=$,q=this.get(X,!0);if(V0.isCollection(q))q.addIn(z,Z);else if(q===void 0&&this.schema)this.set(X,N4(this.schema,z,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${z}`)}}deleteIn($){let[Z,...X]=$;if(X.length===0)return this.delete(Z);let z=this.get(Z,!0);if(V0.isCollection(z))return z.deleteIn(X);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}getIn($,Z){let[X,...z]=$,q=this.get(X,!0);if(z.length===0)return!Z&&V0.isScalar(q)?q.value:q;else return V0.isCollection(q)?q.getIn(z,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!V0.isPair(Z))return!1;let X=Z.value;return X==null||$&&V0.isScalar(X)&&X.value==null&&!X.commentBefore&&!X.comment&&!X.tag})}hasIn($){let[Z,...X]=$;if(X.length===0)return this.has(Z);let z=this.get(Z,!0);return V0.isCollection(z)?z.hasIn(X):!1}setIn($,Z){let[X,...z]=$;if(z.length===0)this.set(X,Z);else{let q=this.get(X,!0);if(V0.isCollection(q))q.setIn(z,Z);else if(q===void 0&&this.schema)this.set(X,N4(this.schema,z,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${z}`)}}}w3.Collection=J8;w3.collectionFromPath=N4;w3.isEmptyPath=G8});var m$=F((N3)=>{var A3=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function S4($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var j3=($,Z,X)=>$.endsWith(`
|
|
30
30
|
`)?S4(X,Z):X.includes(`
|
|
31
31
|
`)?`
|
|
32
|
-
`+S4(X,Z):($.endsWith(" ")?"":" ")+X;
|
|
33
|
-
`){if(X==="block")K=
|
|
32
|
+
`+S4(X,Z):($.endsWith(" ")?"":" ")+X;N3.indentComment=S4;N3.lineComment=j3;N3.stringifyComment=A3});var Y8=F((y3)=>{function b3($,Z,X="flow",{indentAtStart:z,lineWidth:q=80,minContentWidth:G=20,onFold:J,onOverflow:Q}={}){if(!q||q<0)return $;if(q<G)G=0;let Y=Math.max(1+G,1+q-Z.length);if($.length<=Y)return $;let H=[],W={},U=q-Z.length;if(typeof z==="number")if(z>q-Math.max(2,G))H.push(0);else U=q-z;let V=void 0,B=void 0,L=!1,K=-1,T=-1,D=-1;if(X==="block"){if(K=Q8($,K,Z.length),K!==-1)U=K+Y}for(let O;O=$[K+=1];){if(X==="quoted"&&O==="\\"){switch(T=K,$[K+1]){case"x":K+=3;break;case"u":K+=5;break;case"U":K+=9;break;default:K+=1}D=K}if(O===`
|
|
33
|
+
`){if(X==="block")K=Q8($,K,Z.length);U=K+Z.length+Y,V=void 0}else{if(O===" "&&B&&B!==" "&&B!==`
|
|
34
34
|
`&&B!=="\t"){let w=$[K+1];if(w&&w!==" "&&w!==`
|
|
35
35
|
`&&w!=="\t")V=K}if(K>=U)if(V)H.push(V),U=V+Y,V=void 0;else if(X==="quoted"){while(B===" "||B==="\t")B=O,O=$[K+=1],L=!0;let w=K>D+1?K-2:T-1;if(W[w])return $;H.push(w),W[w]=!0,U=w+Y,V=void 0}else L=!0}B=O}if(L&&Q)Q();if(H.length===0)return $;if(J)J();let _=$.slice(0,H[0]);for(let O=0;O<H.length;++O){let w=H[O],R=H[O+1]||$.length;if(w===0)_=`
|
|
36
36
|
${Z}${$.slice(0,R)}`;else{if(X==="quoted"&&W[w])_+=`${$[w]}\\`;_+=`
|
|
37
|
-
${Z}${$.slice(w+1,R)}`}}return _}function
|
|
38
|
-
`);z=Z,q=Z+1,G=$[q]}return z}
|
|
37
|
+
${Z}${$.slice(w+1,R)}`}}return _}function Q8($,Z,X){let z=Z,q=Z+1,G=$[q];while(G===" "||G==="\t")if(Z<q+X)G=$[++Z];else{do G=$[++Z];while(G&&G!==`
|
|
38
|
+
`);z=Z,q=Z+1,G=$[q]}return z}y3.FOLD_BLOCK="block";y3.FOLD_FLOW="flow";y3.FOLD_QUOTED="quoted";y3.foldFlowLines=b3});var p$=F((m3)=>{var Q0=g(),A0=Y8(),d1=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),p1=($)=>/^(%|---|\.\.\.)/m.test($);function g3($,Z,X){if(!Z||Z<0)return!1;let z=Z-X,q=$.length;if(q<=z)return!1;for(let G=0,J=0;G<q;++G)if($[G]===`
|
|
39
39
|
`){if(G-J>z)return!0;if(J=G+1,q-J<=z)return!1}return!0}function d$($,Z){let X=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return X;let{implicitKey:z}=Z,q=Z.options.doubleQuotedMinMultiLineLength,G=Z.indent||(p1($)?" ":""),J="",Q=0;for(let Y=0,H=X[Y];H;H=X[++Y]){if(H===" "&&X[Y+1]==="\\"&&X[Y+2]==="n")J+=X.slice(Q,Y)+"\\ ",Y+=1,Q=Y,H="\\";if(H==="\\")switch(X[Y+1]){case"u":{J+=X.slice(Q,Y);let W=X.substr(Y+2,4);switch(W){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(W.substr(0,2)==="00")J+="\\x"+W.substr(2);else J+=X.substr(Y,6)}Y+=5,Q=Y+1}break;case"n":if(z||X[Y+2]==='"'||X.length<q)Y+=1;else{J+=X.slice(Q,Y)+`
|
|
40
40
|
|
|
41
41
|
`;while(X[Y+2]==="\\"&&X[Y+3]==="n"&&X[Y+4]!=='"')J+=`
|
|
@@ -44,7 +44,7 @@ ${Z}${$.slice(w+1,R)}`}}return _}function Q6($,Z,X){let z=Z,q=Z+1,G=$[q];while(G
|
|
|
44
44
|
${X}`)+"'";return Z.implicitKey?z:A0.foldFlowLines(z,X,A0.FOLD_FLOW,d1(Z,!1))}function G$($,Z){let{singleQuote:X}=Z.options,z;if(X===!1)z=d$;else{let q=$.includes('"'),G=$.includes("'");if(q&&!G)z=C4;else if(G&&!q)z=d$;else z=X?C4:d$}return z($,Z)}var E4;try{E4=new RegExp(`(^|(?<!
|
|
45
45
|
))
|
|
46
46
|
+(?!
|
|
47
|
-
|$)`,"g")}catch{E4=/\n+(?!\n|$)/g}function m1({comment:$,type:Z,value:X},z,q,G){let{blockQuote:J,commentString:Q,lineWidth:Y}=z.options;if(!J||/\n[\t ]+$/.test(X))return G$(X,z);let H=z.indent||(z.forceBlockIndent||p1(X)?" ":""),W=J==="literal"?!0:J==="folded"||Z===Q0.Scalar.BLOCK_FOLDED?!1:Z===Q0.Scalar.BLOCK_LITERAL?!0:!
|
|
47
|
+
|$)`,"g")}catch{E4=/\n+(?!\n|$)/g}function m1({comment:$,type:Z,value:X},z,q,G){let{blockQuote:J,commentString:Q,lineWidth:Y}=z.options;if(!J||/\n[\t ]+$/.test(X))return G$(X,z);let H=z.indent||(z.forceBlockIndent||p1(X)?" ":""),W=J==="literal"?!0:J==="folded"||Z===Q0.Scalar.BLOCK_FOLDED?!1:Z===Q0.Scalar.BLOCK_LITERAL?!0:!g3(X,Y,H.length);if(!X)return W?`|
|
|
48
48
|
`:`>
|
|
49
49
|
`;let U,V;for(V=X.length;V>0;--V){let R=X[V-1];if(R!==`
|
|
50
50
|
`&&R!=="\t"&&R!==" ")break}let B=X.substring(V),L=B.indexOf(`
|
|
@@ -53,13 +53,13 @@ ${X}`)+"'";return Z.implicitKey?z:A0.foldFlowLines(z,X,A0.FOLD_FLOW,d1(Z,!1))}fu
|
|
|
53
53
|
`)D=T;else break}let _=X.substring(0,D<T?D+1:T);if(_)X=X.substring(_.length),_=_.replace(/\n+/g,`$&${H}`);let w=(K?H?"2":"1":"")+U;if($){if(w+=" "+Q($.replace(/ ?[\r\n]+/g," ")),q)q()}if(!W){let R=X.replace(/\n+/g,`
|
|
54
54
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${H}`),I=!1,C=d1(z,!0);if(J!=="folded"&&Z!==Q0.Scalar.BLOCK_FOLDED)C.onOverflow=()=>{I=!0};let M=A0.foldFlowLines(`${_}${R}${B}`,H,A0.FOLD_BLOCK,C);if(!I)return`>${w}
|
|
55
55
|
${H}${M}`}return X=X.replace(/\n+/g,`$&${H}`),`|${w}
|
|
56
|
-
${H}${_}${X}${B}`}function
|
|
56
|
+
${H}${_}${X}${B}`}function v3($,Z,X,z){let{type:q,value:G}=$,{actualString:J,implicitKey:Q,indent:Y,indentStep:H,inFlow:W}=Z;if(Q&&G.includes(`
|
|
57
57
|
`)||W&&/[[\]{},]/.test(G))return G$(G,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(G))return Q||W||!G.includes(`
|
|
58
58
|
`)?G$(G,Z):m1($,Z,X,z);if(!Q&&!W&&q!==Q0.Scalar.PLAIN&&G.includes(`
|
|
59
59
|
`))return m1($,Z,X,z);if(p1(G)){if(Y==="")return Z.forceBlockIndent=!0,m1($,Z,X,z);else if(Q&&Y===H)return G$(G,Z)}let U=G.replace(/\n+/g,`$&
|
|
60
|
-
${Y}`);if(J){let V=(K)=>K.default&&K.tag!=="tag:yaml.org,2002:str"&&K.test?.test(U),{compat:B,tags:L}=Z.doc.schema;if(L.some(V)||B?.some(V))return G$(G,Z)}return Q?U:A0.foldFlowLines(U,Y,A0.FOLD_FLOW,d1(Z,!1))}function
|
|
61
|
-
${Z.indent}${Q}`}
|
|
62
|
-
${Q}:`}else if(T=`${T}:`,V)T+=c$.lineComment(T,X.indent,H(V));let D,_,O;if(D0.isNode(Z))D=!!Z.spaceBefore,_=Z.commentBefore,O=Z.comment;else if(D=!1,_=null,O=null,Z&&typeof Z==="object")Z=J.createNode(Z);if(X.implicitKey=!1,!B&&!V&&D0.isScalar(Z))X.indentAtStart=T.length+1;if(K=!1,!W&&Y.length>=2&&!X.inFlow&&!B&&D0.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)X.indent=X.indent.substring(2);let w=!1,R=
|
|
60
|
+
${Y}`);if(J){let V=(K)=>K.default&&K.tag!=="tag:yaml.org,2002:str"&&K.test?.test(U),{compat:B,tags:L}=Z.doc.schema;if(L.some(V)||B?.some(V))return G$(G,Z)}return Q?U:A0.foldFlowLines(U,Y,A0.FOLD_FLOW,d1(Z,!1))}function u3($,Z,X,z){let{implicitKey:q,inFlow:G}=Z,J=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:Q}=$;if(Q!==Q0.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(J.value))Q=Q0.Scalar.QUOTE_DOUBLE}let Y=(W)=>{switch(W){case Q0.Scalar.BLOCK_FOLDED:case Q0.Scalar.BLOCK_LITERAL:return q||G?G$(J.value,Z):m1(J,Z,X,z);case Q0.Scalar.QUOTE_DOUBLE:return d$(J.value,Z);case Q0.Scalar.QUOTE_SINGLE:return C4(J.value,Z);case Q0.Scalar.PLAIN:return v3(J,Z,X,z);default:return null}},H=Y(Q);if(H===null){let{defaultKeyType:W,defaultStringType:U}=Z.options,V=q&&W||U;if(H=Y(V),H===null)throw Error(`Unsupported default string type ${V}`)}return H}m3.stringifyString=u3});var l$=F((r3)=>{var p3=h1(),j0=E(),l3=m$(),c3=p$();function i3($,Z){let X=Object.assign({blockQuote:!0,commentString:l3.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,Z),z;switch(X.collectionStyle){case"block":z=!1;break;case"flow":z=!0;break;default:z=null}return{anchors:new Set,doc:$,flowCollectionPadding:X.flowCollectionPadding?" ":"",indent:"",indentStep:typeof X.indent==="number"?" ".repeat(X.indent):" ",inFlow:z,options:X}}function a3($,Z){if(Z.tag){let q=$.filter((G)=>G.tag===Z.tag);if(q.length>0)return q.find((G)=>G.format===Z.format)??q[0]}let X=void 0,z;if(j0.isScalar(Z)){z=Z.value;let q=$.filter((G)=>G.identify?.(z));if(q.length>1){let G=q.filter((J)=>J.test);if(G.length>0)q=G}X=q.find((G)=>G.format===Z.format)??q.find((G)=>!G.format)}else z=Z,X=$.find((q)=>q.nodeClass&&z instanceof q.nodeClass);if(!X){let q=z?.constructor?.name??(z===null?"null":typeof z);throw Error(`Tag not resolved for ${q} value`)}return X}function n3($,Z,{anchors:X,doc:z}){if(!z.directives)return"";let q=[],G=(j0.isScalar($)||j0.isCollection($))&&$.anchor;if(G&&p3.anchorIsValid(G))X.add(G),q.push(`&${G}`);let J=$.tag??(Z.default?null:Z.tag);if(J)q.push(z.directives.tagString(J));return q.join(" ")}function s3($,Z,X,z){if(j0.isPair($))return $.toString(Z,X,z);if(j0.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,G=j0.isNode($)?$:Z.doc.createNode($,{onTagObj:(Y)=>q=Y});q??(q=a3(Z.doc.schema.tags,G));let J=n3(G,q,Z);if(J.length>0)Z.indentAtStart=(Z.indentAtStart??0)+J.length+1;let Q=typeof q.stringify==="function"?q.stringify(G,Z,X,z):j0.isScalar(G)?c3.stringifyString(G,Z,X,z):G.toString(Z,X,z);if(!J)return Q;return j0.isScalar(G)||Q[0]==="{"||Q[0]==="["?`${J} ${Q}`:`${J}
|
|
61
|
+
${Z.indent}${Q}`}r3.createStringifyContext=i3;r3.stringify=s3});var W8=F(($7)=>{var D0=E(),H8=g(),U8=l$(),c$=m$();function e3({key:$,value:Z},X,z,q){let{allNullValues:G,doc:J,indent:Q,indentStep:Y,options:{commentString:H,indentSeq:W,simpleKeys:U}}=X,V=D0.isNode($)&&$.comment||null;if(U){if(V)throw Error("With simple keys, key nodes cannot have comments");if(D0.isCollection($)||!D0.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let B=!U&&(!$||V&&Z==null&&!X.inFlow||D0.isCollection($)||(D0.isScalar($)?$.type===H8.Scalar.BLOCK_FOLDED||$.type===H8.Scalar.BLOCK_LITERAL:typeof $==="object"));X=Object.assign({},X,{allNullValues:!1,implicitKey:!B&&(U||!G),indent:Q+Y});let L=!1,K=!1,T=U8.stringify($,X,()=>L=!0,()=>K=!0);if(!B&&!X.inFlow&&T.length>1024){if(U)throw Error("With simple keys, single line scalar must not span more than 1024 characters");B=!0}if(X.inFlow){if(G||Z==null){if(L&&z)z();return T===""?"?":B?`? ${T}`:T}}else if(G&&!U||Z==null&&B){if(T=`? ${T}`,V&&!L)T+=c$.lineComment(T,X.indent,H(V));else if(K&&q)q();return T}if(L)V=null;if(B){if(V)T+=c$.lineComment(T,X.indent,H(V));T=`? ${T}
|
|
62
|
+
${Q}:`}else if(T=`${T}:`,V)T+=c$.lineComment(T,X.indent,H(V));let D,_,O;if(D0.isNode(Z))D=!!Z.spaceBefore,_=Z.commentBefore,O=Z.comment;else if(D=!1,_=null,O=null,Z&&typeof Z==="object")Z=J.createNode(Z);if(X.implicitKey=!1,!B&&!V&&D0.isScalar(Z))X.indentAtStart=T.length+1;if(K=!1,!W&&Y.length>=2&&!X.inFlow&&!B&&D0.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)X.indent=X.indent.substring(2);let w=!1,R=U8.stringify(Z,X,()=>w=!0,()=>K=!0),I=" ";if(V||D||_){if(I=D?`
|
|
63
63
|
`:"",_){let C=H(_);I+=`
|
|
64
64
|
${c$.indentComment(C,X.indent)}`}if(R===""&&!X.inFlow){if(I===`
|
|
65
65
|
`&&O)I=`
|
|
@@ -68,32 +68,32 @@ ${c$.indentComment(C,X.indent)}`}if(R===""&&!X.inFlow){if(I===`
|
|
|
68
68
|
${X.indent}`}else if(!B&&D0.isCollection(Z)){let C=R[0],M=R.indexOf(`
|
|
69
69
|
`),y=M!==-1,p=X.inFlow??Z.flow??Z.items.length===0;if(y||!p){let s=!1;if(y&&(C==="&"||C==="!")){let k=R.indexOf(" ");if(C==="&"&&k!==-1&&k<M&&R[k+1]==="!")k=R.indexOf(" ",k+1);if(k===-1||M<k)s=!0}if(!s)I=`
|
|
70
70
|
${X.indent}`}}else if(R===""||R[0]===`
|
|
71
|
-
`)I="";if(T+=I+R,X.inFlow){if(w&&z)z()}else if(O&&!w)T+=c$.lineComment(T,X.indent,H(O));else if(K&&q)q();return T}$
|
|
71
|
+
`)I="";if(T+=I+R,X.inFlow){if(w&&z)z()}else if(O&&!w)T+=c$.lineComment(T,X.indent,H(O));else if(K&&q)q();return T}$7.stringifyPair=e3});var b4=F((q7)=>{var V8=B0("process");function X7($,...Z){if($==="debug")console.log(...Z)}function z7($,Z){if($==="debug"||$==="warn")if(typeof V8.emitWarning==="function")V8.emitWarning(Z);else console.warn(Z)}q7.debug=X7;q7.warn=z7});var i1=F((Y7)=>{var i$=E(),K8=g(),l1="<<",c1={identify:($)=>$===l1||typeof $==="symbol"&&$.description===l1,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new K8.Scalar(Symbol(l1)),{addToJSMap:B8}),stringify:()=>l1},Q7=($,Z)=>(c1.identify(Z)||i$.isScalar(Z)&&(!Z.type||Z.type===K8.Scalar.PLAIN)&&c1.identify(Z.value))&&$?.doc.schema.tags.some((X)=>X.tag===c1.tag&&X.default);function B8($,Z,X){if(X=$&&i$.isAlias(X)?X.resolve($.doc):X,i$.isSeq(X))for(let z of X.items)y4($,Z,z);else if(Array.isArray(X))for(let z of X)y4($,Z,z);else y4($,Z,X)}function y4($,Z,X){let z=$&&i$.isAlias(X)?X.resolve($.doc):X;if(!i$.isMap(z))throw Error("Merge sources must be maps or map aliases");let q=z.toJSON(null,$,Map);for(let[G,J]of q)if(Z instanceof Map){if(!Z.has(G))Z.set(G,J)}else if(Z instanceof Set)Z.add(G);else if(!Object.prototype.hasOwnProperty.call(Z,G))Object.defineProperty(Z,G,{value:J,writable:!0,enumerable:!0,configurable:!0});return Z}Y7.addMergeToJSMap=B8;Y7.isMergeKey=Q7;Y7.merge=c1});var k4=F((L7)=>{var V7=b4(),T8=i1(),K7=l$(),L8=E(),x4=R0();function B7($,Z,{key:X,value:z}){if(L8.isNode(X)&&X.addToJSMap)X.addToJSMap($,Z,z);else if(T8.isMergeKey($,X))T8.addMergeToJSMap($,Z,z);else{let q=x4.toJS(X,"",$);if(Z instanceof Map)Z.set(q,x4.toJS(z,q,$));else if(Z instanceof Set)Z.add(q);else{let G=T7(X,q,$),J=x4.toJS(z,G,$);if(G in Z)Object.defineProperty(Z,G,{value:J,writable:!0,enumerable:!0,configurable:!0});else Z[G]=J}}return Z}function T7($,Z,X){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(L8.isNode($)&&X?.doc){let z=K7.createStringifyContext(X.doc,{});z.anchors=new Set;for(let G of X.anchors.keys())z.anchors.add(G.anchor);z.inFlow=!0,z.inStringifyKey=!0;let q=$.toString(z);if(!X.mapKeyWarned){let G=JSON.stringify(q);if(G.length>40)G=G.substring(0,36)+'..."';V7.warn(X.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${G}. Set mapAsMap: true to use object keys.`),X.mapKeyWarned=!0}return q}return JSON.stringify(Z)}L7.addPairToJSMap=B7});var N0=F((O7)=>{var D8=u$(),_7=W8(),F7=k4(),a1=E();function M7($,Z,X){let z=D8.createNode($,void 0,X),q=D8.createNode(Z,void 0,X);return new n1(z,q)}class n1{constructor($,Z=null){Object.defineProperty(this,a1.NODE_TYPE,{value:a1.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:X}=this;if(a1.isNode(Z))Z=Z.clone($);if(a1.isNode(X))X=X.clone($);return new n1(Z,X)}toJSON($,Z){let X=Z?.mapAsMap?new Map:{};return F7.addPairToJSMap(Z,X,this)}toString($,Z,X){return $?.doc?_7.stringifyPair(this,$,Z,X):JSON.stringify(this)}}O7.Pair=n1;O7.createPair=M7});var f4=F((j7)=>{var l0=E(),_8=l$(),s1=m$();function I7($,Z,X){return(Z.inFlow??$.flow?A7:R7)($,Z,X)}function R7({comment:$,items:Z},X,{blockItemPrefix:z,flowChars:q,itemIndent:G,onChompKeep:J,onComment:Q}){let{indent:Y,options:{commentString:H}}=X,W=Object.assign({},X,{indent:G,type:null}),U=!1,V=[];for(let L=0;L<Z.length;++L){let K=Z[L],T=null;if(l0.isNode(K)){if(!U&&K.spaceBefore)V.push("");if(r1(X,V,K.commentBefore,U),K.comment)T=K.comment}else if(l0.isPair(K)){let _=l0.isNode(K.key)?K.key:null;if(_){if(!U&&_.spaceBefore)V.push("");r1(X,V,_.commentBefore,U)}}U=!1;let D=_8.stringify(K,W,()=>T=null,()=>U=!0);if(T)D+=s1.lineComment(D,G,H(T));if(U&&T)U=!1;V.push(z+D)}let B;if(V.length===0)B=q.start+q.end;else{B=V[0];for(let L=1;L<V.length;++L){let K=V[L];B+=K?`
|
|
72
72
|
${Y}${K}`:`
|
|
73
73
|
`}}if($){if(B+=`
|
|
74
|
-
`+s1.indentComment(H($),Y),Q)Q()}else if(U&&J)J();return B}function
|
|
74
|
+
`+s1.indentComment(H($),Y),Q)Q()}else if(U&&J)J();return B}function A7({items:$},Z,{flowChars:X,itemIndent:z}){let{indent:q,indentStep:G,flowCollectionPadding:J,options:{commentString:Q}}=Z;z+=G;let Y=Object.assign({},Z,{indent:z,inFlow:!0,type:null}),H=!1,W=0,U=[];for(let L=0;L<$.length;++L){let K=$[L],T=null;if(l0.isNode(K)){if(K.spaceBefore)U.push("");if(r1(Z,U,K.commentBefore,!1),K.comment)T=K.comment}else if(l0.isPair(K)){let _=l0.isNode(K.key)?K.key:null;if(_){if(_.spaceBefore)U.push("");if(r1(Z,U,_.commentBefore,!1),_.comment)H=!0}let O=l0.isNode(K.value)?K.value:null;if(O){if(O.comment)T=O.comment;if(O.commentBefore)H=!0}else if(K.value==null&&_?.comment)T=_.comment}if(T)H=!0;let D=_8.stringify(K,Y,()=>T=null);if(L<$.length-1)D+=",";if(T)D+=s1.lineComment(D,z,Q(T));if(!H&&(U.length>W||D.includes(`
|
|
75
75
|
`)))H=!0;U.push(D),W=U.length}let{start:V,end:B}=X;if(U.length===0)return V+B;else{if(!H){let L=U.reduce((K,T)=>K+T.length+2,2);H=Z.options.lineWidth>0&&L>Z.options.lineWidth}if(H){let L=V;for(let K of U)L+=K?`
|
|
76
76
|
${G}${q}${K}`:`
|
|
77
77
|
`;return`${L}
|
|
78
|
-
${q}${B}`}else return`${V}${J}${U.join(" ")}${J}${B}`}}function r1({indent:$,options:{commentString:Z}},X,z,q){if(z&&q)z=z.replace(/^\n+/,"");if(z){let G=s1.indentComment(Z(z),$);X.push(G.trimStart())}}
|
|
79
|
-
`:" ")}return uq.stringifyString({comment:$,type:Z,value:Q},z,q,G)}};dq.binary=mq});var q2=F((aq)=>{var z2=E(),i4=N0(),lq=g(),cq=E0();function
|
|
78
|
+
${q}${B}`}else return`${V}${J}${U.join(" ")}${J}${B}`}}function r1({indent:$,options:{commentString:Z}},X,z,q){if(z&&q)z=z.replace(/^\n+/,"");if(z){let G=s1.indentComment(Z(z),$);X.push(G.trimStart())}}j7.stringifyCollection=I7});var C0=F((y7)=>{var S7=f4(),C7=k4(),E7=u1(),S0=E(),o1=N0(),b7=g();function a$($,Z){let X=S0.isScalar(Z)?Z.value:Z;for(let z of $)if(S0.isPair(z)){if(z.key===Z||z.key===X)return z;if(S0.isScalar(z.key)&&z.key.value===X)return z}return}class F8 extends E7.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(S0.MAP,$);this.items=[]}static from($,Z,X){let{keepUndefined:z,replacer:q}=X,G=new this($),J=(Q,Y)=>{if(typeof q==="function")Y=q.call(Z,Q,Y);else if(Array.isArray(q)&&!q.includes(Q))return;if(Y!==void 0||z)G.items.push(o1.createPair(Q,Y,X))};if(Z instanceof Map)for(let[Q,Y]of Z)J(Q,Y);else if(Z&&typeof Z==="object")for(let Q of Object.keys(Z))J(Q,Z[Q]);if(typeof $.sortMapEntries==="function")G.items.sort($.sortMapEntries);return G}add($,Z){let X;if(S0.isPair($))X=$;else if(!$||typeof $!=="object"||!("key"in $))X=new o1.Pair($,$?.value);else X=new o1.Pair($.key,$.value);let z=a$(this.items,X.key),q=this.schema?.sortMapEntries;if(z){if(!Z)throw Error(`Key ${X.key} already set`);if(S0.isScalar(z.value)&&b7.isScalarValue(X.value))z.value.value=X.value;else z.value=X.value}else if(q){let G=this.items.findIndex((J)=>q(X,J)<0);if(G===-1)this.items.push(X);else this.items.splice(G,0,X)}else this.items.push(X)}delete($){let Z=a$(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let z=a$(this.items,$)?.value;return(!Z&&S0.isScalar(z)?z.value:z)??void 0}has($){return!!a$(this.items,$)}set($,Z){this.add(new o1.Pair($,Z),!0)}toJSON($,Z,X){let z=X?new X:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(z);for(let q of this.items)C7.addPairToJSMap(Z,z,q);return z}toString($,Z,X){if(!$)return JSON.stringify(this);for(let z of this.items)if(!S0.isPair(z))throw Error(`Map items must all be pairs; found ${JSON.stringify(z)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return S7.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:X,onComment:Z})}}y7.YAMLMap=F8;y7.findPair=a$});var J$=F((g7)=>{var f7=E(),M8=C0(),h7={collection:"map",default:!0,nodeClass:M8.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!f7.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,X)=>M8.YAMLMap.from($,Z,X)};g7.map=h7});var E0=F((c7)=>{var u7=u$(),m7=f4(),d7=u1(),e1=E(),p7=g(),l7=R0();class O8 extends d7.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 X=t1($);if(typeof X!=="number")return;let z=this.items[X];return!Z&&e1.isScalar(z)?z.value:z}has($){let Z=t1($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let X=t1($);if(typeof X!=="number")throw Error(`Expected a valid index, not ${$}.`);let z=this.items[X];if(e1.isScalar(z)&&p7.isScalarValue(Z))z.value=Z;else this.items[X]=Z}toJSON($,Z){let X=[];if(Z?.onCreate)Z.onCreate(X);let z=0;for(let q of this.items)X.push(l7.toJS(q,String(z++),Z));return X}toString($,Z,X){if(!$)return JSON.stringify(this);return m7.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:X,onComment:Z})}static from($,Z,X){let{replacer:z}=X,q=new this($);if(Z&&Symbol.iterator in Object(Z)){let G=0;for(let J of Z){if(typeof z==="function"){let Q=Z instanceof Set?J:String(G++);J=z.call(Z,Q,J)}q.items.push(u7.createNode(J,void 0,X))}}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}c7.YAMLSeq=O8});var Q$=F((s7)=>{var a7=E(),w8=E0(),n7={collection:"seq",default:!0,nodeClass:w8.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!a7.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,X)=>w8.YAMLSeq.from($,Z,X)};s7.seq=n7});var n$=F((e7)=>{var o7=p$(),t7={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,X,z){return Z=Object.assign({actualString:!0},Z),o7.stringifyString($,Z,X,z)}};e7.string=t7});var $2=F((Zq)=>{var P8=g(),I8={identify:($)=>$==null,createNode:()=>new P8.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new P8.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&I8.test.test($)?$:Z.options.nullStr};Zq.nullTag=I8});var h4=F((qq)=>{var zq=g(),R8={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new zq.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},X){if($&&R8.test.test($)){let z=$[0]==="t"||$[0]==="T";if(Z===z)return $}return Z?X.options.trueStr:X.options.falseStr}};qq.boolTag=R8});var Y$=F((Qq)=>{function Jq({format:$,minFractionDigits:Z,tag:X,value:z}){if(typeof z==="bigint")return String(z);let q=typeof z==="number"?z:Number(z);if(!isFinite(q))return isNaN(q)?".nan":q<0?"-.inf":".inf";let G=Object.is(z,-0)?"-0":JSON.stringify(z);if(!$&&Z&&(!X||X==="tag:yaml.org,2002:float")&&/^\d/.test(G)){let J=G.indexOf(".");if(J<0)J=G.length,G+=".";let Q=Z-(G.length-J-1);while(Q-- >0)G+="0"}return G}Qq.stringifyNumber=Jq});var v4=F((Kq)=>{var Hq=g(),g4=Y$(),Uq={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:g4.stringifyNumber},Wq={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():g4.stringifyNumber($)}},Vq={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new Hq.Scalar(parseFloat($)),X=$.indexOf(".");if(X!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-X-1;return Z},stringify:g4.stringifyNumber};Kq.float=Vq;Kq.floatExp=Wq;Kq.floatNaN=Uq});var m4=F((Mq)=>{var A8=Y$(),Z2=($)=>typeof $==="bigint"||Number.isInteger($),u4=($,Z,X,{intAsBigInt:z})=>z?BigInt($):parseInt($.substring(Z),X);function j8($,Z,X){let{value:z}=$;if(Z2(z)&&z>=0)return X+z.toString(Z);return A8.stringifyNumber($)}var Dq={identify:($)=>Z2($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,X)=>u4($,2,8,X),stringify:($)=>j8($,8,"0o")},_q={identify:Z2,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,X)=>u4($,0,10,X),stringify:A8.stringifyNumber},Fq={identify:($)=>Z2($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,X)=>u4($,2,16,X),stringify:($)=>j8($,16,"0x")};Mq.int=_q;Mq.intHex=Fq;Mq.intOct=Dq});var N8=F((Cq)=>{var Iq=J$(),Rq=$2(),Aq=Q$(),jq=n$(),Nq=h4(),d4=v4(),p4=m4(),Sq=[Iq.map,Aq.seq,jq.string,Rq.nullTag,Nq.boolTag,p4.intOct,p4.int,p4.intHex,d4.floatNaN,d4.floatExp,d4.float];Cq.schema=Sq});var C8=F((gq)=>{var bq=g(),yq=J$(),xq=Q$();function S8($){return typeof $==="bigint"||Number.isInteger($)}var X2=({value:$})=>JSON.stringify($),kq=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:X2},{identify:($)=>$==null,createNode:()=>new bq.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:X2},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:X2},{identify:S8,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:X})=>X?BigInt($):parseInt($,10),stringify:({value:$})=>S8($)?$.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:X2}],fq={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},hq=[yq.map,xq.seq].concat(kq,fq);gq.schema=hq});var c4=F((dq)=>{var s$=B0("buffer"),l4=g(),uq=p$(),mq={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof s$.Buffer==="function")return s$.Buffer.from($,"base64");else if(typeof atob==="function"){let X=atob($.replace(/[\n\r]/g,"")),z=new Uint8Array(X.length);for(let q=0;q<X.length;++q)z[q]=X.charCodeAt(q);return z}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:X},z,q,G){if(!X)return"";let J=X,Q;if(typeof s$.Buffer==="function")Q=J instanceof s$.Buffer?J.toString("base64"):s$.Buffer.from(J.buffer).toString("base64");else if(typeof btoa==="function"){let Y="";for(let H=0;H<J.length;++H)Y+=String.fromCharCode(J[H]);Q=btoa(Y)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=l4.Scalar.BLOCK_LITERAL),Z!==l4.Scalar.QUOTE_DOUBLE){let Y=Math.max(z.options.lineWidth-z.indent.length,z.options.minContentWidth),H=Math.ceil(Q.length/Y),W=Array(H);for(let U=0,V=0;U<H;++U,V+=Y)W[U]=Q.substr(V,Y);Q=W.join(Z===l4.Scalar.BLOCK_LITERAL?`
|
|
79
|
+
`:" ")}return uq.stringifyString({comment:$,type:Z,value:Q},z,q,G)}};dq.binary=mq});var q2=F((aq)=>{var z2=E(),i4=N0(),lq=g(),cq=E0();function E8($,Z){if(z2.isSeq($))for(let X=0;X<$.items.length;++X){let z=$.items[X];if(z2.isPair(z))continue;else if(z2.isMap(z)){if(z.items.length>1)Z("Each pair must have its own sequence indicator");let q=z.items[0]||new i4.Pair(new lq.Scalar(null));if(z.commentBefore)q.key.commentBefore=q.key.commentBefore?`${z.commentBefore}
|
|
80
80
|
${q.key.commentBefore}`:z.commentBefore;if(z.comment){let G=q.value??q.key;G.comment=G.comment?`${z.comment}
|
|
81
|
-
${G.comment}`:z.comment}z=q}$.items[X]=z2.isPair(z)?z:new i4.Pair(z)}else Z("Expected a sequence for this tag");return $}function b6($,Z,X){let{replacer:z}=X,q=new cq.YAMLSeq($);q.tag="tag:yaml.org,2002:pairs";let G=0;if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof z==="function")J=z.call(Z,String(G++),J);let Q,Y;if(Array.isArray(J))if(J.length===2)Q=J[0],Y=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let H=Object.keys(J);if(H.length===1)Q=H[0],Y=J[Q];else throw TypeError(`Expected tuple with one key, not ${H.length} keys`)}else Q=J;q.items.push(i4.createPair(Q,Y,X))}return q}var iq={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:E6,createNode:b6};aq.createPairs=b6;aq.pairs=iq;aq.resolvePairs=E6});var n4=F((eq)=>{var y6=E(),a4=R0(),r$=C0(),oq=E0(),x6=q2();class c0 extends oq.YAMLSeq{constructor(){super();this.add=r$.YAMLMap.prototype.add.bind(this),this.delete=r$.YAMLMap.prototype.delete.bind(this),this.get=r$.YAMLMap.prototype.get.bind(this),this.has=r$.YAMLMap.prototype.has.bind(this),this.set=r$.YAMLMap.prototype.set.bind(this),this.tag=c0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let X=new Map;if(Z?.onCreate)Z.onCreate(X);for(let z of this.items){let q,G;if(y6.isPair(z))q=a4.toJS(z.key,"",Z),G=a4.toJS(z.value,q,Z);else q=a4.toJS(z,"",Z);if(X.has(q))throw Error("Ordered maps must not include duplicate keys");X.set(q,G)}return X}static from($,Z,X){let z=x6.createPairs($,Z,X),q=new this;return q.items=z.items,q}}c0.tag="tag:yaml.org,2002:omap";var tq={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:c0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let X=x6.resolvePairs($,Z),z=[];for(let{key:q}of X.items)if(y6.isScalar(q))if(z.includes(q.value))Z(`Ordered maps must not include duplicate keys: ${q.value}`);else z.push(q.value);return Object.assign(new c0,X)},createNode:($,Z,X)=>c0.from($,Z,X)};eq.YAMLOMap=c0;eq.omap=tq});var v6=F((XG)=>{var k6=g();function f6({value:$,source:Z},X){if(Z&&($?h6:g6).test.test(Z))return Z;return $?X.options.trueStr:X.options.falseStr}var h6={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new k6.Scalar(!0),stringify:f6},g6={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new k6.Scalar(!1),stringify:f6};XG.falseTag=g6;XG.trueTag=h6});var u6=F((HG)=>{var GG=g(),s4=Y$(),JG={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:s4.stringifyNumber},QG={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():s4.stringifyNumber($)}},YG={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new GG.Scalar(parseFloat($.replace(/_/g,""))),X=$.indexOf(".");if(X!==-1){let z=$.substring(X+1).replace(/_/g,"");if(z[z.length-1]==="0")Z.minFractionDigits=z.length}return Z},stringify:s4.stringifyNumber};HG.float=YG;HG.floatExp=QG;HG.floatNaN=JG});var d6=F((DG)=>{var m6=Y$(),o$=($)=>typeof $==="bigint"||Number.isInteger($);function G2($,Z,X,{intAsBigInt:z}){let q=$[0];if(q==="-"||q==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),z){switch(X){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return q==="-"?BigInt(-1)*J:J}let G=parseInt($,X);return q==="-"?-1*G:G}function r4($,Z,X){let{value:z}=$;if(o$(z)){let q=z.toString(Z);return z<0?"-"+X+q.substr(1):X+q}return m6.stringifyNumber($)}var KG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,X)=>G2($,2,2,X),stringify:($)=>r4($,2,"0b")},BG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,X)=>G2($,1,8,X),stringify:($)=>r4($,8,"0")},TG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,X)=>G2($,0,10,X),stringify:m6.stringifyNumber},LG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,X)=>G2($,2,16,X),stringify:($)=>r4($,16,"0x")};DG.int=TG;DG.intBin=KG;DG.intHex=LG;DG.intOct=BG});var o4=F((PG)=>{var Y2=E(),J2=N0(),Q2=C0();class i0 extends Q2.YAMLMap{constructor($){super($);this.tag=i0.tag}add($){let Z;if(Y2.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new J2.Pair($.key,null);else Z=new J2.Pair($,null);if(!Q2.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let X=Q2.findPair(this.items,$);return!Z&&Y2.isPair(X)?Y2.isScalar(X.key)?X.key.value:X.key:X}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let X=Q2.findPair(this.items,$);if(X&&!Z)this.items.splice(this.items.indexOf(X),1);else if(!X&&Z)this.items.push(new J2.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,X){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,X);else throw Error("Set items must all have null values")}static from($,Z,X){let{replacer:z}=X,q=new this($);if(Z&&Symbol.iterator in Object(Z))for(let G of Z){if(typeof z==="function")G=z.call(Z,G,G);q.items.push(J2.createPair(G,null,X))}return q}}i0.tag="tag:yaml.org,2002:set";var wG={collection:"map",identify:($)=>$ instanceof Set,nodeClass:i0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,X)=>i0.from($,Z,X),resolve($,Z){if(Y2.isMap($))if($.hasAllNullValues(!0))return Object.assign(new i0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};PG.YAMLSet=i0;PG.set=wG});var e4=F((SG)=>{var AG=Y$();function t4($,Z){let X=$[0],z=X==="-"||X==="+"?$.substring(1):$,q=(J)=>Z?BigInt(J):Number(J),G=z.replace(/_/g,"").split(":").reduce((J,Q)=>J*q(60)+q(Q),q(0));return X==="-"?q(-1)*G:G}function p6($){let{value:Z}=$,X=(J)=>J;if(typeof Z==="bigint")X=(J)=>BigInt(J);else if(isNaN(Z)||!isFinite(Z))return AG.stringifyNumber($);let z="";if(Z<0)z="-",Z*=X(-1);let q=X(60),G=[Z%q];if(Z<60)G.unshift(0);else if(Z=(Z-G[0])/q,G.unshift(Z%q),Z>=60)Z=(Z-G[0])/q,G.unshift(Z);return z+G.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var jG={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:X})=>t4($,X),stringify:p6},NG={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:($)=>t4($,!1),stringify:p6},l6={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(l6.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,X,z,q,G,J,Q]=Z.map(Number),Y=Z[7]?Number((Z[7]+"00").substr(1,3)):0,H=Date.UTC(X,z-1,q,G||0,J||0,Q||0,Y),W=Z[8];if(W&&W!=="Z"){let U=t4(W,!1);if(Math.abs(U)<30)U*=60;H-=60000*U}return new Date(H)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};SG.floatTime=NG;SG.intTime=jG;SG.timestamp=l6});var i6=F((pG)=>{var yG=J$(),xG=$2(),kG=Q$(),fG=n$(),hG=c4(),c6=v6(),$9=u6(),H2=d6(),gG=i1(),vG=n4(),uG=q2(),mG=o4(),Z9=e4(),dG=[yG.map,kG.seq,fG.string,xG.nullTag,c6.trueTag,c6.falseTag,H2.intBin,H2.intOct,H2.int,H2.intHex,$9.floatNaN,$9.floatExp,$9.float,hG.binary,gG.merge,vG.omap,uG.pairs,mG.set,Z9.intTime,Z9.floatTime,Z9.timestamp];pG.schema=dG});var X8=F((tG)=>{var r6=J$(),cG=$2(),o6=Q$(),iG=n$(),aG=h4(),X9=v4(),z9=m4(),nG=N6(),sG=C6(),t6=c4(),t$=i1(),e6=n4(),$8=q2(),a6=i6(),Z8=o4(),U2=e4(),n6=new Map([["core",nG.schema],["failsafe",[r6.map,o6.seq,iG.string]],["json",sG.schema],["yaml11",a6.schema],["yaml-1.1",a6.schema]]),s6={binary:t6.binary,bool:aG.boolTag,float:X9.float,floatExp:X9.floatExp,floatNaN:X9.floatNaN,floatTime:U2.floatTime,int:z9.int,intHex:z9.intHex,intOct:z9.intOct,intTime:U2.intTime,map:r6.map,merge:t$.merge,null:cG.nullTag,omap:e6.omap,pairs:$8.pairs,seq:o6.seq,set:Z8.set,timestamp:U2.timestamp},rG={"tag:yaml.org,2002:binary":t6.binary,"tag:yaml.org,2002:merge":t$.merge,"tag:yaml.org,2002:omap":e6.omap,"tag:yaml.org,2002:pairs":$8.pairs,"tag:yaml.org,2002:set":Z8.set,"tag:yaml.org,2002:timestamp":U2.timestamp};function oG($,Z,X){let z=n6.get(Z);if(z&&!$)return X&&!z.includes(t$.merge)?z.concat(t$.merge):z.slice();let q=z;if(!q)if(Array.isArray($))q=[];else{let G=Array.from(n6.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${G} or define customTags array`)}if(Array.isArray($))for(let G of $)q=q.concat(G);else if(typeof $==="function")q=$(q.slice());if(X)q=q.concat(t$.merge);return q.reduce((G,J)=>{let Q=typeof J==="string"?s6[J]:J;if(!Q){let Y=JSON.stringify(J),H=Object.keys(s6).map((W)=>JSON.stringify(W)).join(", ");throw Error(`Unknown custom tag ${Y}; use one of ${H}`)}if(!G.includes(Q))G.push(Q);return G},[])}tG.coreKnownTags=rG;tG.getTags=oG});var J9=F((GJ)=>{var q9=E(),ZJ=J$(),XJ=Q$(),zJ=n$(),W2=X8(),qJ=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class G9{constructor({compat:$,customTags:Z,merge:X,resolveKnownTags:z,schema:q,sortMapEntries:G,toStringDefaults:J}){this.compat=Array.isArray($)?W2.getTags($,"compat"):$?W2.getTags(null,$):null,this.name=typeof q==="string"&&q||"core",this.knownTags=z?W2.coreKnownTags:{},this.tags=W2.getTags(Z,this.name,X),this.toStringOptions=J??null,Object.defineProperty(this,q9.MAP,{value:ZJ.map}),Object.defineProperty(this,q9.SCALAR,{value:zJ.string}),Object.defineProperty(this,q9.SEQ,{value:XJ.seq}),this.sortMapEntries=typeof G==="function"?G:G===!0?qJ:null}clone(){let $=Object.create(G9.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}GJ.Schema=G9});var z8=F((HJ)=>{var QJ=E(),Q9=l$(),e$=m$();function YJ($,Z){let X=[],z=Z.directives===!0;if(Z.directives!==!1&&$.directives){let Y=$.directives.toString($);if(Y)X.push(Y),z=!0;else if($.directives.docStart)z=!0}if(z)X.push("---");let q=Q9.createStringifyContext($,Z),{commentString:G}=q.options;if($.commentBefore){if(X.length!==1)X.unshift("");let Y=G($.commentBefore);X.unshift(e$.indentComment(Y,""))}let J=!1,Q=null;if($.contents){if(QJ.isNode($.contents)){if($.contents.spaceBefore&&z)X.push("");if($.contents.commentBefore){let W=G($.contents.commentBefore);X.push(e$.indentComment(W,""))}q.forceBlockIndent=!!$.comment,Q=$.contents.comment}let Y=Q?void 0:()=>J=!0,H=Q9.stringify($.contents,q,()=>Q=null,Y);if(Q)H+=e$.lineComment(H,"",G(Q));if((H[0]==="|"||H[0]===">")&&X[X.length-1]==="---")X[X.length-1]=`--- ${H}`;else X.push(H)}else X.push(Q9.stringify($.contents,q));if($.directives?.docEnd)if($.comment){let Y=G($.comment);if(Y.includes(`
|
|
81
|
+
${G.comment}`:z.comment}z=q}$.items[X]=z2.isPair(z)?z:new i4.Pair(z)}else Z("Expected a sequence for this tag");return $}function b8($,Z,X){let{replacer:z}=X,q=new cq.YAMLSeq($);q.tag="tag:yaml.org,2002:pairs";let G=0;if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof z==="function")J=z.call(Z,String(G++),J);let Q,Y;if(Array.isArray(J))if(J.length===2)Q=J[0],Y=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let H=Object.keys(J);if(H.length===1)Q=H[0],Y=J[Q];else throw TypeError(`Expected tuple with one key, not ${H.length} keys`)}else Q=J;q.items.push(i4.createPair(Q,Y,X))}return q}var iq={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:E8,createNode:b8};aq.createPairs=b8;aq.pairs=iq;aq.resolvePairs=E8});var n4=F((eq)=>{var y8=E(),a4=R0(),r$=C0(),oq=E0(),x8=q2();class c0 extends oq.YAMLSeq{constructor(){super();this.add=r$.YAMLMap.prototype.add.bind(this),this.delete=r$.YAMLMap.prototype.delete.bind(this),this.get=r$.YAMLMap.prototype.get.bind(this),this.has=r$.YAMLMap.prototype.has.bind(this),this.set=r$.YAMLMap.prototype.set.bind(this),this.tag=c0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let X=new Map;if(Z?.onCreate)Z.onCreate(X);for(let z of this.items){let q,G;if(y8.isPair(z))q=a4.toJS(z.key,"",Z),G=a4.toJS(z.value,q,Z);else q=a4.toJS(z,"",Z);if(X.has(q))throw Error("Ordered maps must not include duplicate keys");X.set(q,G)}return X}static from($,Z,X){let z=x8.createPairs($,Z,X),q=new this;return q.items=z.items,q}}c0.tag="tag:yaml.org,2002:omap";var tq={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:c0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let X=x8.resolvePairs($,Z),z=[];for(let{key:q}of X.items)if(y8.isScalar(q))if(z.includes(q.value))Z(`Ordered maps must not include duplicate keys: ${q.value}`);else z.push(q.value);return Object.assign(new c0,X)},createNode:($,Z,X)=>c0.from($,Z,X)};eq.YAMLOMap=c0;eq.omap=tq});var v8=F((XG)=>{var k8=g();function f8({value:$,source:Z},X){if(Z&&($?h8:g8).test.test(Z))return Z;return $?X.options.trueStr:X.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 k8.Scalar(!0),stringify:f8},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 k8.Scalar(!1),stringify:f8};XG.falseTag=g8;XG.trueTag=h8});var u8=F((HG)=>{var GG=g(),s4=Y$(),JG={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:s4.stringifyNumber},QG={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():s4.stringifyNumber($)}},YG={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new GG.Scalar(parseFloat($.replace(/_/g,""))),X=$.indexOf(".");if(X!==-1){let z=$.substring(X+1).replace(/_/g,"");if(z[z.length-1]==="0")Z.minFractionDigits=z.length}return Z},stringify:s4.stringifyNumber};HG.float=YG;HG.floatExp=QG;HG.floatNaN=JG});var d8=F((DG)=>{var m8=Y$(),o$=($)=>typeof $==="bigint"||Number.isInteger($);function G2($,Z,X,{intAsBigInt:z}){let q=$[0];if(q==="-"||q==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),z){switch(X){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return q==="-"?BigInt(-1)*J:J}let G=parseInt($,X);return q==="-"?-1*G:G}function r4($,Z,X){let{value:z}=$;if(o$(z)){let q=z.toString(Z);return z<0?"-"+X+q.substr(1):X+q}return m8.stringifyNumber($)}var KG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,X)=>G2($,2,2,X),stringify:($)=>r4($,2,"0b")},BG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,X)=>G2($,1,8,X),stringify:($)=>r4($,8,"0")},TG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,X)=>G2($,0,10,X),stringify:m8.stringifyNumber},LG={identify:o$,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,X)=>G2($,2,16,X),stringify:($)=>r4($,16,"0x")};DG.int=TG;DG.intBin=KG;DG.intHex=LG;DG.intOct=BG});var o4=F((PG)=>{var Y2=E(),J2=N0(),Q2=C0();class i0 extends Q2.YAMLMap{constructor($){super($);this.tag=i0.tag}add($){let Z;if(Y2.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new J2.Pair($.key,null);else Z=new J2.Pair($,null);if(!Q2.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let X=Q2.findPair(this.items,$);return!Z&&Y2.isPair(X)?Y2.isScalar(X.key)?X.key.value:X.key:X}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let X=Q2.findPair(this.items,$);if(X&&!Z)this.items.splice(this.items.indexOf(X),1);else if(!X&&Z)this.items.push(new J2.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,X){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,X);else throw Error("Set items must all have null values")}static from($,Z,X){let{replacer:z}=X,q=new this($);if(Z&&Symbol.iterator in Object(Z))for(let G of Z){if(typeof z==="function")G=z.call(Z,G,G);q.items.push(J2.createPair(G,null,X))}return q}}i0.tag="tag:yaml.org,2002:set";var wG={collection:"map",identify:($)=>$ instanceof Set,nodeClass:i0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,X)=>i0.from($,Z,X),resolve($,Z){if(Y2.isMap($))if($.hasAllNullValues(!0))return Object.assign(new i0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};PG.YAMLSet=i0;PG.set=wG});var e4=F((SG)=>{var AG=Y$();function t4($,Z){let X=$[0],z=X==="-"||X==="+"?$.substring(1):$,q=(J)=>Z?BigInt(J):Number(J),G=z.replace(/_/g,"").split(":").reduce((J,Q)=>J*q(60)+q(Q),q(0));return X==="-"?q(-1)*G:G}function p8($){let{value:Z}=$,X=(J)=>J;if(typeof Z==="bigint")X=(J)=>BigInt(J);else if(isNaN(Z)||!isFinite(Z))return AG.stringifyNumber($);let z="";if(Z<0)z="-",Z*=X(-1);let q=X(60),G=[Z%q];if(Z<60)G.unshift(0);else if(Z=(Z-G[0])/q,G.unshift(Z%q),Z>=60)Z=(Z-G[0])/q,G.unshift(Z);return z+G.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var jG={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:X})=>t4($,X),stringify:p8},NG={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:($)=>t4($,!1),stringify:p8},l8={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(l8.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,X,z,q,G,J,Q]=Z.map(Number),Y=Z[7]?Number((Z[7]+"00").substr(1,3)):0,H=Date.UTC(X,z-1,q,G||0,J||0,Q||0,Y),W=Z[8];if(W&&W!=="Z"){let U=t4(W,!1);if(Math.abs(U)<30)U*=60;H-=60000*U}return new Date(H)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};SG.floatTime=NG;SG.intTime=jG;SG.timestamp=l8});var i8=F((pG)=>{var yG=J$(),xG=$2(),kG=Q$(),fG=n$(),hG=c4(),c8=v8(),$9=u8(),H2=d8(),gG=i1(),vG=n4(),uG=q2(),mG=o4(),Z9=e4(),dG=[yG.map,kG.seq,fG.string,xG.nullTag,c8.trueTag,c8.falseTag,H2.intBin,H2.intOct,H2.int,H2.intHex,$9.floatNaN,$9.floatExp,$9.float,hG.binary,gG.merge,vG.omap,uG.pairs,mG.set,Z9.intTime,Z9.floatTime,Z9.timestamp];pG.schema=dG});var X6=F((tG)=>{var r8=J$(),cG=$2(),o8=Q$(),iG=n$(),aG=h4(),X9=v4(),z9=m4(),nG=N8(),sG=C8(),t8=c4(),t$=i1(),e8=n4(),$6=q2(),a8=i8(),Z6=o4(),U2=e4(),n8=new Map([["core",nG.schema],["failsafe",[r8.map,o8.seq,iG.string]],["json",sG.schema],["yaml11",a8.schema],["yaml-1.1",a8.schema]]),s8={binary:t8.binary,bool:aG.boolTag,float:X9.float,floatExp:X9.floatExp,floatNaN:X9.floatNaN,floatTime:U2.floatTime,int:z9.int,intHex:z9.intHex,intOct:z9.intOct,intTime:U2.intTime,map:r8.map,merge:t$.merge,null:cG.nullTag,omap:e8.omap,pairs:$6.pairs,seq:o8.seq,set:Z6.set,timestamp:U2.timestamp},rG={"tag:yaml.org,2002:binary":t8.binary,"tag:yaml.org,2002:merge":t$.merge,"tag:yaml.org,2002:omap":e8.omap,"tag:yaml.org,2002:pairs":$6.pairs,"tag:yaml.org,2002:set":Z6.set,"tag:yaml.org,2002:timestamp":U2.timestamp};function oG($,Z,X){let z=n8.get(Z);if(z&&!$)return X&&!z.includes(t$.merge)?z.concat(t$.merge):z.slice();let q=z;if(!q)if(Array.isArray($))q=[];else{let G=Array.from(n8.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${G} or define customTags array`)}if(Array.isArray($))for(let G of $)q=q.concat(G);else if(typeof $==="function")q=$(q.slice());if(X)q=q.concat(t$.merge);return q.reduce((G,J)=>{let Q=typeof J==="string"?s8[J]:J;if(!Q){let Y=JSON.stringify(J),H=Object.keys(s8).map((W)=>JSON.stringify(W)).join(", ");throw Error(`Unknown custom tag ${Y}; use one of ${H}`)}if(!G.includes(Q))G.push(Q);return G},[])}tG.coreKnownTags=rG;tG.getTags=oG});var J9=F((GJ)=>{var q9=E(),ZJ=J$(),XJ=Q$(),zJ=n$(),W2=X6(),qJ=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class G9{constructor({compat:$,customTags:Z,merge:X,resolveKnownTags:z,schema:q,sortMapEntries:G,toStringDefaults:J}){this.compat=Array.isArray($)?W2.getTags($,"compat"):$?W2.getTags(null,$):null,this.name=typeof q==="string"&&q||"core",this.knownTags=z?W2.coreKnownTags:{},this.tags=W2.getTags(Z,this.name,X),this.toStringOptions=J??null,Object.defineProperty(this,q9.MAP,{value:ZJ.map}),Object.defineProperty(this,q9.SCALAR,{value:zJ.string}),Object.defineProperty(this,q9.SEQ,{value:XJ.seq}),this.sortMapEntries=typeof G==="function"?G:G===!0?qJ:null}clone(){let $=Object.create(G9.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}GJ.Schema=G9});var z6=F((HJ)=>{var QJ=E(),Q9=l$(),e$=m$();function YJ($,Z){let X=[],z=Z.directives===!0;if(Z.directives!==!1&&$.directives){let Y=$.directives.toString($);if(Y)X.push(Y),z=!0;else if($.directives.docStart)z=!0}if(z)X.push("---");let q=Q9.createStringifyContext($,Z),{commentString:G}=q.options;if($.commentBefore){if(X.length!==1)X.unshift("");let Y=G($.commentBefore);X.unshift(e$.indentComment(Y,""))}let J=!1,Q=null;if($.contents){if(QJ.isNode($.contents)){if($.contents.spaceBefore&&z)X.push("");if($.contents.commentBefore){let W=G($.contents.commentBefore);X.push(e$.indentComment(W,""))}q.forceBlockIndent=!!$.comment,Q=$.contents.comment}let Y=Q?void 0:()=>J=!0,H=Q9.stringify($.contents,q,()=>Q=null,Y);if(Q)H+=e$.lineComment(H,"",G(Q));if((H[0]==="|"||H[0]===">")&&X[X.length-1]==="---")X[X.length-1]=`--- ${H}`;else X.push(H)}else X.push(Q9.stringify($.contents,q));if($.directives?.docEnd)if($.comment){let Y=G($.comment);if(Y.includes(`
|
|
82
82
|
`))X.push("..."),X.push(e$.indentComment(Y,""));else X.push(`... ${Y}`)}else X.push("...");else{let Y=$.comment;if(Y&&J)Y=Y.replace(/^\n+/,"");if(Y){if((!J||Q)&&X[X.length-1]!=="")X.push("");X.push(e$.indentComment(G(Y),""))}}return X.join(`
|
|
83
83
|
`)+`
|
|
84
|
-
`}HJ.stringifyDocument=YJ});var $1=F((_J)=>{var WJ=v$(),H$=u1(),X0=E(),VJ=N0(),KJ=R0(),BJ=J9(),TJ=
|
|
84
|
+
`}HJ.stringifyDocument=YJ});var $1=F((_J)=>{var WJ=v$(),H$=u1(),X0=E(),VJ=N0(),KJ=R0(),BJ=J9(),TJ=z6(),Y9=h1(),LJ=j4(),DJ=u$(),H9=A4();class U9{constructor($,Z,X){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,X0.NODE_TYPE,{value:X0.DOC});let z=null;if(typeof Z==="function"||Array.isArray(Z))z=Z;else if(X===void 0&&Z)X=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"},X);this.options=q;let{version:G}=q;if(X?._directives){if(this.directives=X._directives.atDocument(),this.directives.yaml.explicit)G=this.directives.yaml.version}else this.directives=new H9.Directives({version:G});this.setSchema(G,X),this.contents=$===void 0?null:this.createNode($,z,X)}clone(){let $=Object.create(U9.prototype,{[X0.NODE_TYPE]:{value:X0.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=X0.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(U$(this.contents))this.contents.add($)}addIn($,Z){if(U$(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let X=Y9.anchorNames(this);$.anchor=!Z||X.has(Z)?Y9.findNewAnchor(Z||"a",X):Z}return new WJ.Alias($.anchor)}createNode($,Z,X){let z=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),z=Z;else if(Array.isArray(Z)){let K=(D)=>typeof D==="number"||D instanceof String||D instanceof Number,T=Z.filter(K).map(String);if(T.length>0)Z=Z.concat(T);z=Z}else if(X===void 0&&Z)X=Z,Z=void 0;let{aliasDuplicateObjects:q,anchorPrefix:G,flow:J,keepUndefined:Q,onTagObj:Y,tag:H}=X??{},{onAnchor:W,setAnchors:U,sourceObjects:V}=Y9.createNodeAnchors(this,G||"a"),B={aliasDuplicateObjects:q??!0,keepUndefined:Q??!1,onAnchor:W,onTagObj:Y,replacer:z,schema:this.schema,sourceObjects:V},L=DJ.createNode($,H,B);if(J&&X0.isCollection(L))L.flow=!0;return U(),L}createPair($,Z,X={}){let z=this.createNode($,null,X),q=this.createNode(Z,null,X);return new VJ.Pair(z,q)}delete($){return U$(this.contents)?this.contents.delete($):!1}deleteIn($){if(H$.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return U$(this.contents)?this.contents.deleteIn($):!1}get($,Z){return X0.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(H$.isEmptyPath($))return!Z&&X0.isScalar(this.contents)?this.contents.value:this.contents;return X0.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return X0.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(H$.isEmptyPath($))return this.contents!==void 0;return X0.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=H$.collectionFromPath(this.schema,[$],Z);else if(U$(this.contents))this.contents.set($,Z)}setIn($,Z){if(H$.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=H$.collectionFromPath(this.schema,Array.from($),Z);else if(U$(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let X;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new H9.Directives({version:"1.1"});X={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new H9.Directives({version:$});X={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;X=null;break;default:{let z=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${z}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(X)this.schema=new BJ.Schema(Object.assign(X,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:X,maxAliasCount:z,onAnchor:q,reviver:G}={}){let J={anchors:new Map,doc:this,keep:!$,mapAsMap:X===!0,mapKeyWarned:!1,maxAliasCount:typeof z==="number"?z:100},Q=KJ.toJS(this.contents,Z??"",J);if(typeof q==="function")for(let{count:Y,res:H}of J.anchors.values())q(H,Y);return typeof G==="function"?LJ.applyReviver(G,{"":Q},"",Q):Q}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 TJ.stringifyDocument(this,$)}}function U$($){if(X0.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}_J.Document=U9});var Z1=F((OJ)=>{class V2 extends Error{constructor($,Z,X,z){super();this.name=$,this.code=X,this.message=z,this.pos=Z}}class q6 extends V2{constructor($,Z,X){super("YAMLParseError",$,Z,X)}}class G6 extends V2{constructor($,Z,X){super("YAMLWarning",$,Z,X)}}var MJ=($,Z)=>(X)=>{if(X.pos[0]===-1)return;X.linePos=X.pos.map((Q)=>Z.linePos(Q));let{line:z,col:q}=X.linePos[0];X.message+=` at line ${z}, column ${q}`;let G=q-1,J=$.substring(Z.lineStarts[z-1],Z.lineStarts[z]).replace(/[\n\r]+$/,"");if(G>=60&&J.length>80){let Q=Math.min(G-39,J.length-79);J="\u2026"+J.substring(Q),G-=Q-1}if(J.length>80)J=J.substring(0,79)+"\u2026";if(z>1&&/^ *$/.test(J.substring(0,G))){let Q=$.substring(Z.lineStarts[z-2],Z.lineStarts[z-1]);if(Q.length>80)Q=Q.substring(0,79)+`\u2026
|
|
85
85
|
`;J=Q+J}if(/[^ ]/.test(J)){let Q=1,Y=X.linePos[1];if(Y?.line===z&&Y.col>q)Q=Math.max(1,Math.min(Y.col-q,80-G));let H=" ".repeat(G)+"^".repeat(Q);X.message+=`:
|
|
86
86
|
|
|
87
87
|
${J}
|
|
88
88
|
${H}
|
|
89
|
-
`}};OJ.YAMLError=V2;OJ.YAMLParseError=
|
|
90
|
-
`))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 X of Z.start)if(X.type==="newline")return!0;if(Z.sep){for(let X of Z.sep)if(X.type==="newline")return!0}if(W9(Z.key)||W9(Z.value))return!0}return!1;default:return!0}}SJ.containsNewline=W9});var V9=F((yJ)=>{var EJ=K2();function bJ($,Z,X){if(Z?.type==="flow-collection"){let z=Z.end[0];if(z.indent===$&&(z.source==="]"||z.source==="}")&&EJ.containsNewline(Z))X(z,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}yJ.flowIndentCheck=bJ});var K9=F((fJ)=>{var
|
|
91
|
-
`+K.comment;else Q.comment=K.comment;continue}if(K.newlineAfterProp||vJ.containsNewline(V))q(V??U[U.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(K.found?.indent!==z.indent)q(Y,"BAD_INDENT",
|
|
92
|
-
`+O.comment;else _.comment=O.comment;let w=new
|
|
89
|
+
`}};OJ.YAMLError=V2;OJ.YAMLParseError=q6;OJ.YAMLWarning=G6;OJ.prettifyError=MJ});var X1=F((jJ)=>{function AJ($,{flow:Z,indicator:X,next:z,offset:q,onError:G,parentIndent:J,startOnNewline:Q}){let Y=!1,H=Q,W=Q,U="",V="",B=!1,L=!1,K=null,T=null,D=null,_=null,O=null,w=null,R=null;for(let M of $){if(L){if(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma")G(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");L=!1}if(K){if(H&&M.type!=="comment"&&M.type!=="newline")G(K,"TAB_AS_INDENT","Tabs are not allowed as indentation");K=null}switch(M.type){case"space":if(!Z&&(X!=="doc-start"||z?.type!=="flow-collection")&&M.source.includes("\t"))K=M;W=!0;break;case"comment":{if(!W)G(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let y=M.source.substring(1)||" ";if(!U)U=y;else U+=V+y;V="",H=!1;break}case"newline":if(H){if(U)U+=M.source;else if(!w||X!=="seq-item-ind")Y=!0}else V+=M.source;if(H=!0,B=!0,T||D)_=M;W=!0;break;case"anchor":if(T)G(M,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(M.source.endsWith(":"))G(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);T=M,R??(R=M.offset),H=!1,W=!1,L=!0;break;case"tag":{if(D)G(M,"MULTIPLE_TAGS","A node can have at most one tag");D=M,R??(R=M.offset),H=!1,W=!1,L=!0;break}case X:if(T||D)G(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`);if(w)G(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${Z??"collection"}`);w=M,H=X==="seq-item-ind"||X==="explicit-key-ind",W=!1;break;case"comma":if(Z){if(O)G(M,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);O=M,H=!1,W=!1;break}default:G(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),H=!1,W=!1}}let I=$[$.length-1],C=I?I.offset+I.source.length:q;if(L&&z&&z.type!=="space"&&z.type!=="newline"&&z.type!=="comma"&&(z.type!=="scalar"||z.source!==""))G(z.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(K&&(H&&K.indent<=J||z?.type==="block-map"||z?.type==="block-seq"))G(K,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:O,found:w,spaceBefore:Y,comment:U,hasNewline:B,anchor:T,tag:D,newlineAfterProp:_,end:C,start:R??C}}jJ.resolveProps=AJ});var K2=F((SJ)=>{function W9($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
|
|
90
|
+
`))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 X of Z.start)if(X.type==="newline")return!0;if(Z.sep){for(let X of Z.sep)if(X.type==="newline")return!0}if(W9(Z.key)||W9(Z.value))return!0}return!1;default:return!0}}SJ.containsNewline=W9});var V9=F((yJ)=>{var EJ=K2();function bJ($,Z,X){if(Z?.type==="flow-collection"){let z=Z.end[0];if(z.indent===$&&(z.source==="]"||z.source==="}")&&EJ.containsNewline(Z))X(z,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}yJ.flowIndentCheck=bJ});var K9=F((fJ)=>{var J6=E();function kJ($,Z,X){let{uniqueKeys:z}=$.options;if(z===!1)return!1;let q=typeof z==="function"?z:(G,J)=>G===J||J6.isScalar(G)&&J6.isScalar(J)&&G.value===J.value;return Z.some((G)=>q(G.key,X))}fJ.mapIncludes=kJ});var W6=F((dJ)=>{var Q6=N0(),gJ=C0(),Y6=X1(),vJ=K2(),H6=V9(),uJ=K9(),U6="All mapping items must start at the same column";function mJ({composeNode:$,composeEmptyNode:Z},X,z,q,G){let Q=new(G?.nodeClass??gJ.YAMLMap)(X.schema);if(X.atRoot)X.atRoot=!1;let Y=z.offset,H=null;for(let W of z.items){let{start:U,key:V,sep:B,value:L}=W,K=Y6.resolveProps(U,{indicator:"explicit-key-ind",next:V??B?.[0],offset:Y,onError:q,parentIndent:z.indent,startOnNewline:!0}),T=!K.found;if(T){if(V){if(V.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 V&&V.indent!==z.indent)q(Y,"BAD_INDENT",U6)}if(!K.anchor&&!K.tag&&!B){if(H=K.end,K.comment)if(Q.comment)Q.comment+=`
|
|
91
|
+
`+K.comment;else Q.comment=K.comment;continue}if(K.newlineAfterProp||vJ.containsNewline(V))q(V??U[U.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(K.found?.indent!==z.indent)q(Y,"BAD_INDENT",U6);X.atKey=!0;let D=K.end,_=V?$(X,V,K,q):Z(X,D,U,null,K,q);if(X.schema.compat)H6.flowIndentCheck(z.indent,V,q);if(X.atKey=!1,uJ.mapIncludes(X,Q.items,_))q(D,"DUPLICATE_KEY","Map keys must be unique");let O=Y6.resolveProps(B??[],{indicator:"map-value-ind",next:L,offset:_.range[2],onError:q,parentIndent:z.indent,startOnNewline:!V||V.type==="block-scalar"});if(Y=O.end,O.found){if(T){if(L?.type==="block-map"&&!O.hasNewline)q(Y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(X.options.strict&&K.start<O.found.offset-1024)q(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let w=L?$(X,L,O,q):Z(X,Y,B,null,O,q);if(X.schema.compat)H6.flowIndentCheck(z.indent,L,q);Y=w.range[2];let R=new Q6.Pair(_,w);if(X.options.keepSourceTokens)R.srcToken=W;Q.items.push(R)}else{if(T)q(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(O.comment)if(_.comment)_.comment+=`
|
|
92
|
+
`+O.comment;else _.comment=O.comment;let w=new Q6.Pair(_);if(X.options.keepSourceTokens)w.srcToken=W;Q.items.push(w)}}if(H&&H<Y)q(H,"IMPOSSIBLE","Map comment with trailing content");return Q.range=[z.offset,Y,H??Y],Q}dJ.resolveBlockMap=mJ});var V6=F((nJ)=>{var lJ=E0(),cJ=X1(),iJ=V9();function aJ({composeNode:$,composeEmptyNode:Z},X,z,q,G){let Q=new(G?.nodeClass??lJ.YAMLSeq)(X.schema);if(X.atRoot)X.atRoot=!1;if(X.atKey)X.atKey=!1;let Y=z.offset,H=null;for(let{start:W,value:U}of z.items){let V=cJ.resolveProps(W,{indicator:"seq-item-ind",next:U,offset:Y,onError:q,parentIndent:z.indent,startOnNewline:!0});if(!V.found)if(V.anchor||V.tag||U)if(U?.type==="block-seq")q(V.end,"BAD_INDENT","All sequence items must start at the same column");else q(Y,"MISSING_CHAR","Sequence item without - indicator");else{if(H=V.end,V.comment)Q.comment=V.comment;continue}let B=U?$(X,U,V,q):Z(X,V.end,W,null,V,q);if(X.schema.compat)iJ.flowIndentCheck(z.indent,U,q);Y=B.range[2],Q.items.push(B)}return Q.range=[z.offset,Y,H??Y],Q}nJ.resolveBlockSeq=aJ});var W$=F((oJ)=>{function rJ($,Z,X,z){let q="";if($){let G=!1,J="";for(let Q of $){let{source:Y,type:H}=Q;switch(H){case"space":G=!0;break;case"comment":{if(X&&!G)z(Q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let W=Y.substring(1)||" ";if(!q)q=W;else q+=J+W;J="";break}case"newline":if(q)J+=Y;G=!0;break;default:z(Q,"UNEXPECTED_TOKEN",`Unexpected ${H} at node end`)}Z+=Y.length}}return{comment:q,offset:Z}}oJ.resolveEnd=rJ});var T6=F((JQ)=>{var eJ=E(),$Q=N0(),K6=C0(),ZQ=E0(),XQ=W$(),B6=X1(),zQ=K2(),qQ=K9(),B9="Block collections are not allowed within flow collections",T9=($)=>$&&($.type==="block-map"||$.type==="block-seq");function GQ({composeNode:$,composeEmptyNode:Z},X,z,q,G){let J=z.start.source==="{",Q=J?"flow map":"flow sequence",H=new(G?.nodeClass??(J?K6.YAMLMap:ZQ.YAMLSeq))(X.schema);H.flow=!0;let W=X.atRoot;if(W)X.atRoot=!1;if(X.atKey)X.atKey=!1;let U=z.offset+z.start.source.length;for(let T=0;T<z.items.length;++T){let D=z.items[T],{start:_,key:O,sep:w,value:R}=D,I=B6.resolveProps(_,{flow:Q,indicator:"explicit-key-ind",next:O??w?.[0],offset:U,onError:q,parentIndent:z.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!w&&!R){if(T===0&&I.comma)q(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${Q}`);else if(T<z.items.length-1)q(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${Q}`);if(I.comment)if(H.comment)H.comment+=`
|
|
93
93
|
`+I.comment;else H.comment=I.comment;U=I.end;continue}if(!J&&X.options.strict&&zQ.containsNewline(O))q(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0){if(I.comma)q(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${Q}`)}else{if(!I.comma)q(I.start,"MISSING_CHAR",`Missing , between ${Q} items`);if(I.comment){let C="";$:for(let M of _)switch(M.type){case"comma":case"space":break;case"comment":C=M.source.substring(1);break $;default:break $}if(C){let M=H.items[H.items.length-1];if(eJ.isPair(M))M=M.value??M.key;if(M.comment)M.comment+=`
|
|
94
|
-
`+C;else M.comment=C;I.comment=I.comment.substring(C.length+1)}}}if(!J&&!w&&!I.found){let C=R?$(X,R,I,q):Z(X,I.end,w,null,I,q);if(H.items.push(C),U=C.range[2],T9(R))q(C.range,"BLOCK_IN_FLOW",B9)}else{X.atKey=!0;let C=I.end,M=O?$(X,O,I,q):Z(X,C,_,null,I,q);if(T9(O))q(M.range,"BLOCK_IN_FLOW",B9);X.atKey=!1;let y=
|
|
95
|
-
`+y.comment;else M.comment=y.comment;let s=new $Q.Pair(M,p);if(X.options.keepSourceTokens)s.srcToken=D;if(J){let k=H;if(qQ.mapIncludes(X,k.items,M))q(C,"DUPLICATE_KEY","Map keys must be unique");k.items.push(s)}else{let k=new
|
|
96
|
-
`+T.comment;else H.comment=T.comment;H.range=[z.offset,K,T.offset]}else H.range=[z.offset,K,K];return H}JQ.resolveFlowCollection=GQ});var
|
|
94
|
+
`+C;else M.comment=C;I.comment=I.comment.substring(C.length+1)}}}if(!J&&!w&&!I.found){let C=R?$(X,R,I,q):Z(X,I.end,w,null,I,q);if(H.items.push(C),U=C.range[2],T9(R))q(C.range,"BLOCK_IN_FLOW",B9)}else{X.atKey=!0;let C=I.end,M=O?$(X,O,I,q):Z(X,C,_,null,I,q);if(T9(O))q(M.range,"BLOCK_IN_FLOW",B9);X.atKey=!1;let y=B6.resolveProps(w??[],{flow:Q,indicator:"map-value-ind",next:R,offset:M.range[2],onError:q,parentIndent:z.indent,startOnNewline:!1});if(y.found){if(!J&&!I.found&&X.options.strict){if(w)for(let k of w){if(k===y.found)break;if(k.type==="newline"){q(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(I.start<y.found.offset-1024)q(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(R)if("source"in R&&R.source?.[0]===":")q(R,"MISSING_CHAR",`Missing space after : in ${Q}`);else q(y.start,"MISSING_CHAR",`Missing , or : between ${Q} items`);let p=R?$(X,R,y,q):y.found?Z(X,y.end,w,null,y,q):null;if(p){if(T9(R))q(p.range,"BLOCK_IN_FLOW",B9)}else if(y.comment)if(M.comment)M.comment+=`
|
|
95
|
+
`+y.comment;else M.comment=y.comment;let s=new $Q.Pair(M,p);if(X.options.keepSourceTokens)s.srcToken=D;if(J){let k=H;if(qQ.mapIncludes(X,k.items,M))q(C,"DUPLICATE_KEY","Map keys must be unique");k.items.push(s)}else{let k=new K6.YAMLMap(X.schema);k.flow=!0,k.items.push(s);let o=(p??M).range;k.range=[M.range[0],o[1],o[2]],H.items.push(k)}U=p?p.range[2]:y.end}}let V=J?"}":"]",[B,...L]=z.end,K=U;if(B?.source===V)K=B.offset+B.source.length;else{let T=Q[0].toUpperCase()+Q.substring(1),D=W?`${T} must end with a ${V}`:`${T} in block collection must be sufficiently indented and end with a ${V}`;if(q(U,W?"MISSING_CHAR":"BAD_INDENT",D),B&&B.source.length!==1)L.unshift(B)}if(L.length>0){let T=XQ.resolveEnd(L,K,X.options.strict,q);if(T.comment)if(H.comment)H.comment+=`
|
|
96
|
+
`+T.comment;else H.comment=T.comment;H.range=[z.offset,K,T.offset]}else H.range=[z.offset,K,K];return H}JQ.resolveFlowCollection=GQ});var L6=F((LQ)=>{var YQ=E(),HQ=g(),UQ=C0(),WQ=E0(),VQ=W6(),KQ=V6(),BQ=T6();function L9($,Z,X,z,q,G){let J=X.type==="block-map"?VQ.resolveBlockMap($,Z,X,z,G):X.type==="block-seq"?KQ.resolveBlockSeq($,Z,X,z,G):BQ.resolveFlowCollection($,Z,X,z,G),Q=J.constructor;if(q==="!"||q===Q.tagName)return J.tag=Q.tagName,J;if(q)J.tag=q;return J}function TQ($,Z,X,z,q){let G=z.tag,J=!G?null:Z.directives.tagName(G.source,(V)=>q(G,"TAG_RESOLVE_FAILED",V));if(X.type==="block-seq"){let{anchor:V,newlineAfterProp:B}=z,L=V&&G?V.offset>G.offset?V:G:V??G;if(L&&(!B||B.offset<L.offset))q(L,"MISSING_CHAR","Missing newline after block sequence props")}let Q=X.type==="block-map"?"map":X.type==="block-seq"?"seq":X.start.source==="{"?"map":"seq";if(!G||!J||J==="!"||J===UQ.YAMLMap.tagName&&Q==="map"||J===WQ.YAMLSeq.tagName&&Q==="seq")return L9($,Z,X,q,J);let Y=Z.schema.tags.find((V)=>V.tag===J&&V.collection===Q);if(!Y){let V=Z.schema.knownTags[J];if(V?.collection===Q)Z.schema.tags.push(Object.assign({},V,{default:!1})),Y=V;else{if(V)q(G,"BAD_COLLECTION_TYPE",`${V.tag} used for ${Q} collection, but expects ${V.collection??"scalar"}`,!0);else q(G,"TAG_RESOLVE_FAILED",`Unresolved tag: ${J}`,!0);return L9($,Z,X,q,J)}}let H=L9($,Z,X,q,J,Y),W=Y.resolve?.(H,(V)=>q(G,"TAG_RESOLVE_FAILED",V),Z.options)??H,U=YQ.isNode(W)?W:new HQ.Scalar(W);if(U.range=H.range,U.tag=J,Y?.format)U.format=Y.format;return U}LQ.composeCollection=TQ});var _9=F((OQ)=>{var D9=g();function _Q($,Z,X){let z=Z.offset,q=FQ(Z,$.options.strict,X);if(!q)return{value:"",type:null,comment:"",range:[z,z,z]};let G=q.mode===">"?D9.Scalar.BLOCK_FOLDED:D9.Scalar.BLOCK_LITERAL,J=Z.source?MQ(Z.source):[],Q=J.length;for(let K=J.length-1;K>=0;--K){let T=J[K][1];if(T===""||T==="\r")Q=K;else break}if(Q===0){let K=q.chomp==="+"&&J.length>0?`
|
|
97
97
|
`.repeat(Math.max(1,J.length-1)):"",T=z+q.length;if(Z.source)T+=Z.source.length;return{value:K,type:G,comment:q.comment,range:[z,T,T]}}let Y=Z.indent+q.indent,H=Z.offset+q.length,W=0;for(let K=0;K<Q;++K){let[T,D]=J[K];if(D===""||D==="\r"){if(q.indent===0&&T.length>Y)Y=T.length}else{if(T.length<Y)X(H+T.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(q.indent===0)Y=T.length;if(W=K,Y===0&&!$.atRoot)X(H,"BAD_INDENT","Block scalar values in collections must be indented");break}H+=T.length+D.length+1}for(let K=J.length-1;K>=Q;--K)if(J[K][0].length>Y)Q=K+1;let U="",V="",B=!1;for(let K=0;K<W;++K)U+=J[K][0].slice(Y)+`
|
|
98
98
|
`;for(let K=W;K<Q;++K){let[T,D]=J[K];H+=T.length+D.length+1;let _=D[D.length-1]==="\r";if(_)D=D.slice(0,-1);if(D&&T.length<Y){let w=`Block scalar lines must not be less indented than their ${q.indent?"explicit indentation indicator":"first line"}`;X(H-D.length-(_?2:1),"BAD_INDENT",w),T=""}if(G===D9.Scalar.BLOCK_LITERAL)U+=V+T.slice(Y)+D,V=`
|
|
99
99
|
`;else if(T.length>Y||D[0]==="\t"){if(V===" ")V=`
|
|
@@ -108,7 +108,7 @@ ${H}
|
|
|
108
108
|
`+J[K][0].slice(Y);if(U[U.length-1]!==`
|
|
109
109
|
`)U+=`
|
|
110
110
|
`;break;default:U+=`
|
|
111
|
-
`}let L=z+q.length+Z.source.length;return{value:U,type:G,comment:q.comment,range:[z,L,L]}}function FQ({offset:$,props:Z},X,z){if(Z[0].type!=="block-scalar-header")return z(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:q}=Z[0],G=q[0],J=0,Q="",Y=-1;for(let V=1;V<q.length;++V){let B=q[V];if(!Q&&(B==="-"||B==="+"))Q=B;else{let L=Number(B);if(!J&&L)J=L;else if(Y===-1)Y=$+V}}if(Y!==-1)z(Y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${q}`);let H=!1,W="",U=q.length;for(let V=1;V<Z.length;++V){let B=Z[V];switch(B.type){case"space":H=!0;case"newline":U+=B.source.length;break;case"comment":if(X&&!H)z(B,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");U+=B.source.length,W=B.source.substring(1);break;case"error":z(B,"UNEXPECTED_TOKEN",B.message),U+=B.source.length;break;default:{let L=`Unexpected token in block scalar header: ${B.type}`;z(B,"UNEXPECTED_TOKEN",L);let K=B.source;if(K&&typeof K==="string")U+=K.length}}}return{mode:G,indent:J,chomp:Q,comment:W,length:U}}function MQ($){let Z=$.split(/\n( *)/),X=Z[0],z=X.match(/^( *)/),G=[z?.[1]?[z[1],X.slice(z[1].length)]:["",X]];for(let J=1;J<Z.length;J+=2)G.push([Z[J],Z[J+1]]);return G}OQ.resolveBlockScalar=_Q});var M9=F((EQ)=>{var F9=g(),PQ=W$();function IQ($,Z,X){let{offset:z,type:q,source:G,end:J}=$,Q,Y,H=(V,B,L)=>X(z+V,B,L);switch(q){case"scalar":Q=F9.Scalar.PLAIN,Y=RQ(G,H);break;case"single-quoted-scalar":Q=F9.Scalar.QUOTE_SINGLE,Y=AQ(G,H);break;case"double-quoted-scalar":Q=F9.Scalar.QUOTE_DOUBLE,Y=jQ(G,H);break;default:return X($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${q}`),{value:"",type:null,comment:"",range:[z,z+G.length,z+G.length]}}let W=z+G.length,U=PQ.resolveEnd(J,W,Z,X);return{value:Y,type:Q,comment:U.comment,range:[z,W,U.offset]}}function RQ($,Z){let X="";switch($[0]){case"\t":X="a tab character";break;case",":X="flow indicator character ,";break;case"%":X="directive indicator character %";break;case"|":case">":{X=`block scalar indicator ${$[0]}`;break}case"@":case"`":{X=`reserved character ${$[0]}`;break}}if(X)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${X}`);return
|
|
111
|
+
`}let L=z+q.length+Z.source.length;return{value:U,type:G,comment:q.comment,range:[z,L,L]}}function FQ({offset:$,props:Z},X,z){if(Z[0].type!=="block-scalar-header")return z(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:q}=Z[0],G=q[0],J=0,Q="",Y=-1;for(let V=1;V<q.length;++V){let B=q[V];if(!Q&&(B==="-"||B==="+"))Q=B;else{let L=Number(B);if(!J&&L)J=L;else if(Y===-1)Y=$+V}}if(Y!==-1)z(Y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${q}`);let H=!1,W="",U=q.length;for(let V=1;V<Z.length;++V){let B=Z[V];switch(B.type){case"space":H=!0;case"newline":U+=B.source.length;break;case"comment":if(X&&!H)z(B,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");U+=B.source.length,W=B.source.substring(1);break;case"error":z(B,"UNEXPECTED_TOKEN",B.message),U+=B.source.length;break;default:{let L=`Unexpected token in block scalar header: ${B.type}`;z(B,"UNEXPECTED_TOKEN",L);let K=B.source;if(K&&typeof K==="string")U+=K.length}}}return{mode:G,indent:J,chomp:Q,comment:W,length:U}}function MQ($){let Z=$.split(/\n( *)/),X=Z[0],z=X.match(/^( *)/),G=[z?.[1]?[z[1],X.slice(z[1].length)]:["",X]];for(let J=1;J<Z.length;J+=2)G.push([Z[J],Z[J+1]]);return G}OQ.resolveBlockScalar=_Q});var M9=F((EQ)=>{var F9=g(),PQ=W$();function IQ($,Z,X){let{offset:z,type:q,source:G,end:J}=$,Q,Y,H=(V,B,L)=>X(z+V,B,L);switch(q){case"scalar":Q=F9.Scalar.PLAIN,Y=RQ(G,H);break;case"single-quoted-scalar":Q=F9.Scalar.QUOTE_SINGLE,Y=AQ(G,H);break;case"double-quoted-scalar":Q=F9.Scalar.QUOTE_DOUBLE,Y=jQ(G,H);break;default:return X($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${q}`),{value:"",type:null,comment:"",range:[z,z+G.length,z+G.length]}}let W=z+G.length,U=PQ.resolveEnd(J,W,Z,X);return{value:Y,type:Q,comment:U.comment,range:[z,W,U.offset]}}function RQ($,Z){let X="";switch($[0]){case"\t":X="a tab character";break;case",":X="flow indicator character ,";break;case"%":X="directive indicator character %";break;case"|":case">":{X=`block scalar indicator ${$[0]}`;break}case"@":case"`":{X=`reserved character ${$[0]}`;break}}if(X)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${X}`);return D6($)}function AQ($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return D6($.slice(1,-1)).replace(/''/g,"'")}function D6($){let Z,X;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
112
112
|
`,"sy"),X=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
113
113
|
`,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,X=/[ \t]*(.*?)[ \t]*\r?\n/sy}let z=Z.exec($);if(!z)return $;let q=z[1],G=" ",J=Z.lastIndex;X.lastIndex=J;while(z=X.exec($)){if(z[1]==="")if(G===`
|
|
114
114
|
`)q+=G;else G=`
|
|
@@ -123,26 +123,26 @@ ${H}
|
|
|
123
123
|
`)break;if(z===`
|
|
124
124
|
`)X+=`
|
|
125
125
|
`;Z+=1,z=$[Z+1]}if(!X)X=" ";return{fold:X,offset:Z}}var SQ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
126
|
-
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function CQ($,Z,X,z){let q=$.substr(Z,X),J=q.length===X&&/^[0-9a-fA-F]+$/.test(q)?parseInt(q,16):NaN;if(isNaN(J)){let Q=$.substr(Z-2,X+2);return z(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${Q}`),Q}return String.fromCodePoint(J)}EQ.resolveFlowScalar=IQ});var
|
|
126
|
+
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function CQ($,Z,X,z){let q=$.substr(Z,X),J=q.length===X&&/^[0-9a-fA-F]+$/.test(q)?parseInt(q,16):NaN;if(isNaN(J)){let Q=$.substr(Z-2,X+2);return z(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${Q}`),Q}return String.fromCodePoint(J)}EQ.resolveFlowScalar=IQ});var F6=F((gQ)=>{var a0=E(),_6=g(),yQ=_9(),xQ=M9();function kQ($,Z,X,z){let{value:q,type:G,comment:J,range:Q}=Z.type==="block-scalar"?yQ.resolveBlockScalar($,Z,z):xQ.resolveFlowScalar(Z,$.options.strict,z),Y=X?$.directives.tagName(X.source,(U)=>z(X,"TAG_RESOLVE_FAILED",U)):null,H;if($.options.stringKeys&&$.atKey)H=$.schema[a0.SCALAR];else if(Y)H=fQ($.schema,q,Y,X,z);else if(Z.type==="scalar")H=hQ($,q,Z,z);else H=$.schema[a0.SCALAR];let W;try{let U=H.resolve(q,(V)=>z(X??Z,"TAG_RESOLVE_FAILED",V),$.options);W=a0.isScalar(U)?U:new _6.Scalar(U)}catch(U){let V=U instanceof Error?U.message:String(U);z(X??Z,"TAG_RESOLVE_FAILED",V),W=new _6.Scalar(q)}if(W.range=Q,W.source=q,G)W.type=G;if(Y)W.tag=Y;if(H.format)W.format=H.format;if(J)W.comment=J;return W}function fQ($,Z,X,z,q){if(X==="!")return $[a0.SCALAR];let G=[];for(let Q of $.tags)if(!Q.collection&&Q.tag===X)if(Q.default&&Q.test)G.push(Q);else return Q;for(let Q of G)if(Q.test?.test(Z))return Q;let J=$.knownTags[X];if(J&&!J.collection)return $.tags.push(Object.assign({},J,{default:!1,test:void 0})),J;return q(z,"TAG_RESOLVE_FAILED",`Unresolved tag: ${X}`,X!=="tag:yaml.org,2002:str"),$[a0.SCALAR]}function hQ({atKey:$,directives:Z,schema:X},z,q,G){let J=X.tags.find((Q)=>(Q.default===!0||$&&Q.default==="key")&&Q.test?.test(z))||X[a0.SCALAR];if(X.compat){let Q=X.compat.find((Y)=>Y.default&&Y.test?.test(z))??X[a0.SCALAR];if(J.tag!==Q.tag){let Y=Z.tagString(J.tag),H=Z.tagString(Q.tag),W=`Value may be parsed as either ${Y} or ${H}`;G(q,"TAG_RESOLVE_FAILED",W,!0)}}return J}gQ.composeScalar=kQ});var M6=F((mQ)=>{function uQ($,Z,X){if(Z){X??(X=Z.length);for(let z=X-1;z>=0;--z){let q=Z[z];switch(q.type){case"space":case"comment":case"newline":$-=q.source.length;continue}q=Z[++z];while(q?.type==="space")$+=q.source.length,q=Z[++z];break}}return $}mQ.emptyScalarPosition=uQ});var P6=F((rQ)=>{var pQ=v$(),lQ=E(),cQ=L6(),O6=F6(),iQ=W$(),aQ=M6(),nQ={composeNode:w6,composeEmptyNode:O9};function w6($,Z,X,z){let q=$.atKey,{spaceBefore:G,comment:J,anchor:Q,tag:Y}=X,H,W=!0;switch(Z.type){case"alias":if(H=sQ($,Z,z),Q||Y)z(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(H=O6.composeScalar($,Z,Y,z),Q)H.anchor=Q.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(H=cQ.composeCollection(nQ,$,Z,X,z),Q)H.anchor=Q.source.substring(1);break;default:{let U=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;z(Z,"UNEXPECTED_TOKEN",U),H=O9($,Z.offset,void 0,null,X,z),W=!1}}if(Q&&H.anchor==="")z(Q,"BAD_ALIAS","Anchor cannot be an empty string");if(q&&$.options.stringKeys&&(!lQ.isScalar(H)||typeof H.value!=="string"||H.tag&&H.tag!=="tag:yaml.org,2002:str"))z(Y??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(G)H.spaceBefore=!0;if(J)if(Z.type==="scalar"&&Z.source==="")H.comment=J;else H.commentBefore=J;if($.options.keepSourceTokens&&W)H.srcToken=Z;return H}function O9($,Z,X,z,{spaceBefore:q,comment:G,anchor:J,tag:Q,end:Y},H){let W={type:"scalar",offset:aQ.emptyScalarPosition(Z,X,z),indent:-1,source:""},U=O6.composeScalar($,W,Q,H);if(J){if(U.anchor=J.source.substring(1),U.anchor==="")H(J,"BAD_ALIAS","Anchor cannot be an empty string")}if(q)U.spaceBefore=!0;if(G)U.comment=G,U.range[2]=Y;return U}function sQ({options:$},{offset:Z,source:X,end:z},q){let G=new pQ.Alias(X.substring(1));if(G.source==="")q(Z,"BAD_ALIAS","Alias cannot be an empty string");if(G.source.endsWith(":"))q(Z+X.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let J=Z+X.length,Q=iQ.resolveEnd(z,J,$.strict,q);if(G.range=[Z,J,Q.offset],Q.comment)G.comment=Q.comment;return G}rQ.composeEmptyNode=O9;rQ.composeNode=w6});var R6=F((zY)=>{var eQ=$1(),I6=P6(),$Y=W$(),ZY=X1();function XY($,Z,{offset:X,start:z,value:q,end:G},J){let Q=Object.assign({_directives:Z},$),Y=new eQ.Document(void 0,Q),H={atKey:!1,atRoot:!0,directives:Y.directives,options:Y.options,schema:Y.schema},W=ZY.resolveProps(z,{indicator:"doc-start",next:q??G?.[0],offset:X,onError:J,parentIndent:0,startOnNewline:!0});if(W.found){if(Y.directives.docStart=!0,q&&(q.type==="block-map"||q.type==="block-seq")&&!W.hasNewline)J(W.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}Y.contents=q?I6.composeNode(H,q,W,J):I6.composeEmptyNode(H,W.end,z,null,W,J);let U=Y.contents.range[2],V=$Y.resolveEnd(G,U,!1,J);if(V.comment)Y.comment=V.comment;return Y.range=[X,U,V.offset],Y}zY.composeDoc=XY});var w9=F((UY)=>{var GY=B0("process"),JY=A4(),QY=$1(),z1=Z1(),A6=E(),YY=R6(),HY=W$();function q1($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:X}=$;return[Z,Z+(typeof X==="string"?X.length:1)]}function j6($){let Z="",X=!1,z=!1;for(let q=0;q<$.length;++q){let G=$[q];switch(G[0]){case"#":Z+=(Z===""?"":z?`
|
|
127
127
|
|
|
128
128
|
`:`
|
|
129
|
-
`)+(G.substring(1)||" "),X=!0,z=!1;break;case"%":if($[q+1]?.[0]!=="#")q+=1;X=!1;break;default:if(!X)z=!0;X=!1}}return{comment:Z,afterEmptyLine:z}}class
|
|
130
|
-
${X}`:X;else if(z||$.directives.docStart||!q)$.commentBefore=X;else if(
|
|
129
|
+
`)+(G.substring(1)||" "),X=!0,z=!1;break;case"%":if($[q+1]?.[0]!=="#")q+=1;X=!1;break;default:if(!X)z=!0;X=!1}}return{comment:Z,afterEmptyLine:z}}class N6{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,X,z,q)=>{let G=q1(Z);if(q)this.warnings.push(new z1.YAMLWarning(G,X,z));else this.errors.push(new z1.YAMLParseError(G,X,z))},this.directives=new JY.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:X,afterEmptyLine:z}=j6(this.prelude);if(X){let q=$.contents;if(Z)$.comment=$.comment?`${$.comment}
|
|
130
|
+
${X}`:X;else if(z||$.directives.docStart||!q)$.commentBefore=X;else if(A6.isCollection(q)&&!q.flow&&q.items.length>0){let G=q.items[0];if(A6.isPair(G))G=G.key;let J=G.commentBefore;G.commentBefore=J?`${X}
|
|
131
131
|
${J}`:X}else{let G=q.commentBefore;q.commentBefore=G?`${X}
|
|
132
|
-
${G}`:X}}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:
|
|
133
|
-
${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new z1.YAMLParseError(q1($),"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 X=Object.assign({_directives:this.directives},this.options),z=new QY.Document(void 0,X);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");z.range=[0,Z,Z],this.decorate(z,!1),yield z}}}UY.Composer=
|
|
132
|
+
${G}`:X}}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:j6(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,X=-1){for(let z of $)yield*this.next(z);yield*this.end(Z,X)}*next($){if(GY.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,X,z)=>{let q=q1($);q[0]+=Z,this.onError(q,"BAD_DIRECTIVE",X,z)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=YY.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,X=new z1.YAMLParseError(q1($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(X);else this.doc.errors.push(X);break}case"doc-end":{if(!this.doc){this.errors.push(new z1.YAMLParseError(q1($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=HY.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let X=this.doc.comment;this.doc.comment=X?`${X}
|
|
133
|
+
${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new z1.YAMLParseError(q1($),"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 X=Object.assign({_directives:this.directives},this.options),z=new QY.Document(void 0,X);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");z.range=[0,Z,Z],this.decorate(z,!1),yield z}}}UY.Composer=N6});var E6=F((FY)=>{var VY=_9(),KY=M9(),BY=Z1(),S6=p$();function TY($,Z=!0,X){if($){let z=(q,G,J)=>{let Q=typeof q==="number"?q:Array.isArray(q)?q[0]:q.offset;if(X)X(Q,G,J);else throw new BY.YAMLParseError([Q,Q+1],G,J)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return KY.resolveFlowScalar($,Z,z);case"block-scalar":return VY.resolveBlockScalar({options:{strict:Z}},$,z)}}return null}function LY($,Z){let{implicitKey:X=!1,indent:z,inFlow:q=!1,offset:G=-1,type:J="PLAIN"}=Z,Q=S6.stringifyString({type:J,value:$},{implicitKey:X,indent:z>0?" ".repeat(z):"",inFlow:q,options:{blockQuote:!0,lineWidth:-1}}),Y=Z.end??[{type:"newline",offset:-1,indent:z,source:`
|
|
134
134
|
`}];switch(Q[0]){case"|":case">":{let H=Q.indexOf(`
|
|
135
135
|
`),W=Q.substring(0,H),U=Q.substring(H+1)+`
|
|
136
|
-
`,V=[{type:"block-scalar-header",offset:G,indent:z,source:W}];if(!
|
|
137
|
-
`});return{type:"block-scalar",offset:G,indent:z,props:V,source:U}}case'"':return{type:"double-quoted-scalar",offset:G,indent:z,source:Q,end:Y};case"'":return{type:"single-quoted-scalar",offset:G,indent:z,source:Q,end:Y};default:return{type:"scalar",offset:G,indent:z,source:Q,end:Y}}}function DY($,Z,X={}){let{afterKey:z=!1,implicitKey:q=!1,inFlow:G=!1,type:J}=X,Q="indent"in $?$.indent:null;if(z&&typeof Q==="number")Q+=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 H=$.props[0];if(H.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=H.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let Y=
|
|
136
|
+
`,V=[{type:"block-scalar-header",offset:G,indent:z,source:W}];if(!C6(V,Y))V.push({type:"newline",offset:-1,indent:z,source:`
|
|
137
|
+
`});return{type:"block-scalar",offset:G,indent:z,props:V,source:U}}case'"':return{type:"double-quoted-scalar",offset:G,indent:z,source:Q,end:Y};case"'":return{type:"single-quoted-scalar",offset:G,indent:z,source:Q,end:Y};default:return{type:"scalar",offset:G,indent:z,source:Q,end:Y}}}function DY($,Z,X={}){let{afterKey:z=!1,implicitKey:q=!1,inFlow:G=!1,type:J}=X,Q="indent"in $?$.indent:null;if(z&&typeof Q==="number")Q+=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 H=$.props[0];if(H.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=H.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let Y=S6.stringifyString({type:J,value:Z},{implicitKey:q||Q===null,indent:Q!==null&&Q>0?" ".repeat(Q):"",inFlow:G,options:{blockQuote:!0,lineWidth:-1}});switch(Y[0]){case"|":case">":_Y($,Y);break;case'"':P9($,Y,"double-quoted-scalar");break;case"'":P9($,Y,"single-quoted-scalar");break;default:P9($,Y,"scalar")}}function _Y($,Z){let X=Z.indexOf(`
|
|
138
138
|
`),z=Z.substring(0,X),q=Z.substring(X+1)+`
|
|
139
|
-
`;if($.type==="block-scalar"){let G=$.props[0];if(G.type!=="block-scalar-header")throw Error("Invalid block scalar header");G.source=z,$.source=q}else{let{offset:G}=$,J="indent"in $?$.indent:-1,Q=[{type:"block-scalar-header",offset:G,indent:J,source:z}];if(!
|
|
140
|
-
`});for(let Y of Object.keys($))if(Y!=="type"&&Y!=="offset")delete $[Y];Object.assign($,{type:"block-scalar",indent:J,props:Q,source:q})}}function
|
|
141
|
-
`};delete $.items,Object.assign($,{type:X,source:Z,end:[q]});break}default:{let z="indent"in $?$.indent:-1,q="end"in $&&Array.isArray($.end)?$.end.filter((G)=>G.type==="space"||G.type==="comment"||G.type==="newline"):[];for(let G of Object.keys($))if(G!=="type"&&G!=="offset")delete $[G];Object.assign($,{type:X,indent:z,source:Z,end:q})}}}FY.createScalarToken=LY;FY.resolveAsScalar=TY;FY.setScalarValue=DY});var
|
|
139
|
+
`;if($.type==="block-scalar"){let G=$.props[0];if(G.type!=="block-scalar-header")throw Error("Invalid block scalar header");G.source=z,$.source=q}else{let{offset:G}=$,J="indent"in $?$.indent:-1,Q=[{type:"block-scalar-header",offset:G,indent:J,source:z}];if(!C6(Q,"end"in $?$.end:void 0))Q.push({type:"newline",offset:-1,indent:J,source:`
|
|
140
|
+
`});for(let Y of Object.keys($))if(Y!=="type"&&Y!=="offset")delete $[Y];Object.assign($,{type:"block-scalar",indent:J,props:Q,source:q})}}function C6($,Z){if(Z)for(let X of Z)switch(X.type){case"space":case"comment":$.push(X);break;case"newline":return $.push(X),!0}return!1}function P9($,Z,X){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=X,$.source=Z;break;case"block-scalar":{let z=$.props.slice(1),q=Z.length;if($.props[0].type==="block-scalar-header")q-=$.props[0].source.length;for(let G of z)G.offset+=q;delete $.props,Object.assign($,{type:X,source:Z,end:z});break}case"block-map":case"block-seq":{let q={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
|
|
141
|
+
`};delete $.items,Object.assign($,{type:X,source:Z,end:[q]});break}default:{let z="indent"in $?$.indent:-1,q="end"in $&&Array.isArray($.end)?$.end.filter((G)=>G.type==="space"||G.type==="comment"||G.type==="newline"):[];for(let G of Object.keys($))if(G!=="type"&&G!=="offset")delete $[G];Object.assign($,{type:X,indent:z,source:Z,end:q})}}}FY.createScalarToken=LY;FY.resolveAsScalar=TY;FY.setScalarValue=DY});var b6=F((IY)=>{var PY=($)=>("type"in $)?T2($):B2($);function T2($){switch($.type){case"block-scalar":{let Z="";for(let X of $.props)Z+=T2(X);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let X of $.items)Z+=B2(X);return Z}case"flow-collection":{let Z=$.start.source;for(let X of $.items)Z+=B2(X);for(let X of $.end)Z+=X.source;return Z}case"document":{let Z=B2($);if($.end)for(let X of $.end)Z+=X.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let X of $.end)Z+=X.source;return Z}}}function B2({start:$,key:Z,sep:X,value:z}){let q="";for(let G of $)q+=G.source;if(Z)q+=T2(Z);if(X)for(let G of X)q+=G.source;if(z)q+=T2(z);return q}IY.stringify=PY});var k6=F((jY)=>{var I9=Symbol("break visit"),AY=Symbol("skip children"),y6=Symbol("remove item");function n0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};x6(Object.freeze([]),$,Z)}n0.BREAK=I9;n0.SKIP=AY;n0.REMOVE=y6;n0.itemAtPath=($,Z)=>{let X=$;for(let[z,q]of Z){let G=X?.[z];if(G&&"items"in G)X=G.items[q];else return}return X};n0.parentCollection=($,Z)=>{let X=n0.itemAtPath($,Z.slice(0,-1)),z=Z[Z.length-1][0],q=X?.[z];if(q&&"items"in q)return q;throw Error("Parent collection not found")};function x6($,Z,X){let z=X(Z,$);if(typeof z==="symbol")return z;for(let q of["key","value"]){let G=Z[q];if(G&&"items"in G){for(let J=0;J<G.items.length;++J){let Q=x6(Object.freeze($.concat([[q,J]])),G.items[J],X);if(typeof Q==="number")J=Q-1;else if(Q===I9)return I9;else if(Q===y6)G.items.splice(J,1),J-=1}if(typeof z==="function"&&q==="key")z=z(Z,$)}}return typeof z==="function"?z(Z,$):z}jY.visit=n0});var L2=F((kY)=>{var R9=E6(),SY=b6(),CY=k6(),A9="\uFEFF",j9="\x02",N9="\x18",S9="\x1F",EY=($)=>!!$&&("items"in $),bY=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function yY($){switch($){case A9:return"<BOM>";case j9:return"<DOC>";case N9:return"<FLOW_END>";case S9:return"<SCALAR>";default:return JSON.stringify($)}}function xY($){switch($){case A9:return"byte-order-mark";case j9:return"doc-mode";case N9:return"flow-error-end";case S9:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
142
142
|
`:case`\r
|
|
143
143
|
`: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}kY.createScalarToken=R9.createScalarToken;kY.resolveAsScalar=R9.resolveAsScalar;kY.setScalarValue=R9.setScalarValue;kY.stringify=SY.stringify;kY.visit=CY.visit;kY.BOM=A9;kY.DOCUMENT=j9;kY.FLOW_END=N9;kY.SCALAR=S9;kY.isCollection=EY;kY.isScalar=bY;kY.prettyToken=yY;kY.tokenType=xY});var E9=F((oY)=>{var G1=L2();function Y0($){switch($){case void 0:case" ":case`
|
|
144
|
-
`:case"\r":case"\t":return!0;default:return!1}}var
|
|
145
|
-
\r `),C9=($)=>!$||rY.has($);class
|
|
144
|
+
`:case"\r":case"\t":return!0;default:return!1}}var f6=new Set("0123456789ABCDEFabcdef"),sY=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),D2=new Set(",[]{}"),rY=new Set(` ,[]{}
|
|
145
|
+
\r `),C9=($)=>!$||rY.has($);class h6{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 X=this.next??"stream";while(X&&(Z||this.hasChars(1)))X=yield*this.parseNext(X)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
|
|
146
146
|
`)return!0;if(Z==="\r")return this.buffer[$+1]===`
|
|
147
147
|
`;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let Z=this.buffer[$];if(this.indentNext>0){let X=0;while(Z===" ")Z=this.buffer[++X+$];if(Z==="\r"){let z=this.buffer[X+$+1];if(z===`
|
|
148
148
|
`||!z&&!this.atEnd)return $+X+1}return Z===`
|
|
@@ -157,17 +157,17 @@ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.pus
|
|
|
157
157
|
`&&q>=this.pos&&q+1+Z>J)$=q;else break}while(!0);return yield G1.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,X=this.pos-1,z;while(z=this.buffer[++X])if(z===":"){let q=this.buffer[X+1];if(Y0(q)||$&&D2.has(q))break;Z=X}else if(Y0(z)){let q=this.buffer[X+1];if(z==="\r")if(q===`
|
|
158
158
|
`)X+=1,z=`
|
|
159
159
|
`,q=this.buffer[X+1];else Z=X;if(q==="#"||$&&D2.has(q))break;if(z===`
|
|
160
|
-
`){let G=this.continueScalar(X+1);if(G===-1)break;X=Math.max(X,G-2)}}else{if($&&D2.has(z))break;Z=X}if(!z&&!this.atEnd)return this.setNext("plain-scalar");return yield G1.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 X=this.buffer.slice(this.pos,$);if(X)return yield X,this.pos+=X.length,X.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(C9))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,Z=this.charAt(1);if(Y0(Z)||$&&D2.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(!Y0(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(sY.has(Z))Z=this.buffer[++$];else if(Z==="%"&&
|
|
160
|
+
`){let G=this.continueScalar(X+1);if(G===-1)break;X=Math.max(X,G-2)}}else{if($&&D2.has(z))break;Z=X}if(!z&&!this.atEnd)return this.setNext("plain-scalar");return yield G1.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 X=this.buffer.slice(this.pos,$);if(X)return yield X,this.pos+=X.length,X.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(C9))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,Z=this.charAt(1);if(Y0(Z)||$&&D2.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(!Y0(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(sY.has(Z))Z=this.buffer[++$];else if(Z==="%"&&f6.has(this.buffer[$+1])&&f6.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
|
|
161
161
|
`)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
|
|
162
|
-
`)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,X;do X=this.buffer[++Z];while(X===" "||$&&X==="\t");let z=Z-this.pos;if(z>0)yield this.buffer.substr(this.pos,z),this.pos=Z;return z}*pushUntil($){let Z=this.pos,X=this.buffer[Z];while(!$(X))X=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}oY.Lexer=
|
|
162
|
+
`)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,X;do X=this.buffer[++Z];while(X===" "||$&&X==="\t");let z=Z-this.pos;if(z>0)yield this.buffer.substr(this.pos,z),this.pos=Z;return z}*pushUntil($){let Z=this.pos,X=this.buffer[Z];while(!$(X))X=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}oY.Lexer=h6});var b9=F((eY)=>{class g6{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,X=this.lineStarts.length;while(Z<X){let q=Z+X>>1;if(this.lineStarts[q]<$)Z=q+1;else X=q}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let z=this.lineStarts[Z-1];return{line:Z,col:$-z+1}}}}eY.LineCounter=g6});var y9=F((zH)=>{var ZH=B0("process"),v6=L2(),XH=E9();function b0($,Z){for(let X=0;X<$.length;++X)if($[X].type===Z)return!0;return!1}function u6($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function d6($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _2($){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 V$($){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 m6($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!b0(Z.start,"explicit-key-ind")&&!b0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,d6(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 p6{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 XH.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let X of this.lexer.lex($,Z))yield*this.next(X);if(!Z)yield*this.end()}*next($){if(this.source=$,ZH.env.LOG_TOKENS)console.log("|",v6.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=v6.tokenType($);if(!Z){let X=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:X,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 X=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in X?X.indent:0;else if(Z.type==="flow-collection"&&X.type==="document")Z.indent=0;if(Z.type==="flow-collection")m6(Z);switch(X.type){case"document":X.value=Z;break;case"block-scalar":X.props.push(Z);break;case"block-map":{let z=X.items[X.items.length-1];if(z.value){X.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(z.sep)z.value=Z;else{Object.assign(z,{key:Z,sep:[]}),this.onKeyLine=!z.explicitKey;return}break}case"block-seq":{let z=X.items[X.items.length-1];if(z.value)X.items.push({start:[],value:Z});else z.value=Z;break}case"flow-collection":{let z=X.items[X.items.length-1];if(!z||z.value)X.items.push({start:[],key:Z,sep:[]});else if(z.sep)z.value=Z;else Object.assign(z,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((X.type==="document"||X.type==="block-map"||X.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let z=Z.items[Z.items.length-1];if(z&&!z.sep&&!z.value&&z.start.length>0&&u6(z.start)===-1&&(Z.indent===0||z.start.every((q)=>q.type!=="comment"||q.indent<Z.indent))){if(X.type==="document")X.end=z.start;else X.items.push({start:z.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(u6($.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=_2(this.peek(2)),X=V$(Z),z;if($.end)z=$.end,z.push(this.sourceToken),delete $.end;else z=[this.sourceToken];let q={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:X,key:$,sep:z}]};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(`
|
|
163
163
|
`)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
|
|
164
|
-
`,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 X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.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 z=$.items[$.items.length-2]?.value?.end;if(Array.isArray(z)){Array.prototype.push.apply(z,Z.start),z.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let X=!this.onKeyLine&&this.indent===$.indent,z=X&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",q=[];if(z&&Z.sep&&!Z.value){let G=[];for(let J=0;J<Z.sep.length;++J){let Q=Z.sep[J];switch(Q.type){case"newline":G.push(J);break;case"space":break;case"comment":if(Q.indent>$.indent)G.length=0;break;default:G.length=0}}if(G.length>=2)q=Z.sep.splice(G[1])}switch(this.type){case"anchor":case"tag":if(z||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(z||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(b0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let G=V$(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:G,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(b0(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(
|
|
164
|
+
`,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 X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.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 z=$.items[$.items.length-2]?.value?.end;if(Array.isArray(z)){Array.prototype.push.apply(z,Z.start),z.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let X=!this.onKeyLine&&this.indent===$.indent,z=X&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",q=[];if(z&&Z.sep&&!Z.value){let G=[];for(let J=0;J<Z.sep.length;++J){let Q=Z.sep[J];switch(Q.type){case"newline":G.push(J);break;case"space":break;case"comment":if(Q.indent>$.indent)G.length=0;break;default:G.length=0}}if(G.length>=2)q=Z.sep.splice(G[1])}switch(this.type){case"anchor":case"tag":if(z||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(z||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(b0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let G=V$(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:G,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(b0(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(d6(Z.key)&&!b0(Z.sep,"newline")){let G=V$(Z.start),J=Z.key,Q=Z.sep;Q.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:G,key:J,sep:Q}]})}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||z)$.items.push({start:q,key:null,sep:[this.sourceToken]});else if(b0(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 G=this.flowScalar(this.type);if(z||Z.value)$.items.push({start:q,key:G,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(G);else Object.assign(Z,{key:G,sep:[]}),this.onKeyLine=!0;return}default:{let G=this.startBlockValue($);if(G){if(G.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!b0(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(X)$.items.push({start:q});this.stack.push(G);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.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 z=$.items[$.items.length-2]?.value?.end;if(Array.isArray(z)){Array.prototype.push.apply(z,Z.start),z.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||b0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let X=this.startBlockValue($);if(X){this.stack.push(X);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let X;do yield*this.pop(),X=this.peek(1);while(X?.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 z=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:z,sep:[]});else if(Z.sep)this.stack.push(z);else Object.assign(Z,{key:z,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let X=this.startBlockValue($);if(X)this.stack.push(X);else yield*this.pop(),yield*this.step()}else{let X=this.peek(2);if(X.type==="block-map"&&(this.type==="map-value-ind"&&X.indent===$.indent||this.type==="newline"&&!X.items[X.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&X.type!=="flow-collection"){let z=_2(X),q=V$(z);m6($);let G=$.end.splice(1,$.end.length);G.push(this.sourceToken);let J={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:q,key:$,sep:G}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=J}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
|
|
165
165
|
`)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
|
|
166
|
-
`,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=_2($),X=V$(Z);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=_2($),X=V$(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((X)=>X.type==="newline"||X.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()}}}zH.Parser=p8});var n8=F((VH)=>{var l8=w9(),GH=$1(),J1=Z1(),JH=b4(),QH=E(),YH=b9(),c8=y9();function i8($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new YH.LineCounter||null,prettyErrors:Z}}function HH($,Z={}){let{lineCounter:X,prettyErrors:z}=i8(Z),q=new c8.Parser(X?.addNewLine),G=new l8.Composer(Z),J=Array.from(G.compose(q.parse($)));if(z&&X)for(let Q of J)Q.errors.forEach(J1.prettifyError($,X)),Q.warnings.forEach(J1.prettifyError($,X));if(J.length>0)return J;return Object.assign([],{empty:!0},G.streamInfo())}function a8($,Z={}){let{lineCounter:X,prettyErrors:z}=i8(Z),q=new c8.Parser(X?.addNewLine),G=new l8.Composer(Z),J=null;for(let Q of G.compose(q.parse($),!0,$.length))if(!J)J=Q;else if(J.options.logLevel!=="silent"){J.errors.push(new J1.YAMLParseError(Q.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(z&&X)J.errors.forEach(J1.prettifyError($,X)),J.warnings.forEach(J1.prettifyError($,X));return J}function UH($,Z,X){let z=void 0;if(typeof Z==="function")z=Z;else if(X===void 0&&Z&&typeof Z==="object")X=Z;let q=a8($,X);if(!q)return null;if(q.warnings.forEach((G)=>JH.warn(q.options.logLevel,G)),q.errors.length>0)if(q.options.logLevel!=="silent")throw q.errors[0];else q.errors=[];return q.toJS(Object.assign({reviver:z},X))}function WH($,Z,X){let z=null;if(typeof Z==="function"||Array.isArray(Z))z=Z;else if(X===void 0&&Z)X=Z;if(typeof X==="string")X=X.length;if(typeof X==="number"){let q=Math.round(X);X=q<1?void 0:q>8?{indent:8}:{indent:q}}if($===void 0){let{keepUndefined:q}=X??Z??{};if(!q)return}if(QH.isDocument($)&&!z)return $.toString(X);return new GH.Document($,z,X).toString(X)}VH.parse=UH;VH.parseAllDocuments=HH;VH.parseDocument=a8;VH.stringify=WH});var r8=F((SH)=>{var DH=w9(),_H=$1(),FH=J9(),x9=Z1(),MH=v$(),y0=E(),OH=N0(),wH=g(),PH=C0(),IH=E0(),RH=L2(),AH=E9(),jH=b9(),NH=y9(),F2=n8(),s8=h$();SH.Composer=DH.Composer;SH.Document=_H.Document;SH.Schema=FH.Schema;SH.YAMLError=x9.YAMLError;SH.YAMLParseError=x9.YAMLParseError;SH.YAMLWarning=x9.YAMLWarning;SH.Alias=MH.Alias;SH.isAlias=y0.isAlias;SH.isCollection=y0.isCollection;SH.isDocument=y0.isDocument;SH.isMap=y0.isMap;SH.isNode=y0.isNode;SH.isPair=y0.isPair;SH.isScalar=y0.isScalar;SH.isSeq=y0.isSeq;SH.Pair=OH.Pair;SH.Scalar=wH.Scalar;SH.YAMLMap=PH.YAMLMap;SH.YAMLSeq=IH.YAMLSeq;SH.CST=RH;SH.Lexer=AH.Lexer;SH.LineCounter=jH.LineCounter;SH.Parser=NH.Parser;SH.parse=F2.parse;SH.parseAllDocuments=F2.parseAllDocuments;SH.parseDocument=F2.parseDocument;SH.stringify=F2.stringify;SH.visit=s8.visit;SH.visitAsync=s8.visitAsync});var u5=P5(v5(),1),{program:Z$,createCommand:gV,createArgument:vV,createOption:uV,CommanderError:mV,InvalidArgumentError:dV,InvalidOptionArgumentError:pV,Command:lV,Argument:cV,Option:O4,Help:iV}=u5.default;var m5={name:"@pickled-dev/cli",version:"0.17.2",description:"Test what agents actually understand about your product",module:"dist/index.js",type:"module",bin:{pickled:"./dist/index.js"},files:["dist"],scripts:{dev:"bun run ./src/index.ts",build:"bun build ./src/index.ts --outdir ./dist --target bun --minify --external @anthropic-ai/claude-agent-sdk",release:"semantic-release"},dependencies:{commander:"^14.0.2",chalk:"^5.6.2","@anthropic-ai/claude-agent-sdk":"^0.3.0"},devDependencies:{"@pickled-dev/config":"workspace:*","@pickled-dev/core":"workspace:*","semantic-release":"^25.0.2","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/exec":"^7.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.2","semantic-release-ai-notes":"^0.3.0"}};import PV from"path";var U0={category:"cli",provider:"claude-code",model:"sonnet"},w4=["Read","Glob","Grep","Bash"],P4=["Edit","MultiEdit","Write","NotebookEdit"];var o8=P5(r8(),1);async function K$($){let Z=`${$}/pickled.yml`,X=Bun.file(Z);if(!await X.exists())throw Error(`pickled.yml not found in ${$}`);let z;try{let q=await X.text();z=o8.default.parse(q)}catch(q){throw Error(`Failed to parse pickled.yml: ${q}`)}return z=k9(z),JU(z),z}var GU=/\$\{([A-Z_][A-Z0-9_]*)\}/g;function k9($){if(typeof $==="string")return $.replace(GU,(Z,X)=>process.env[X]??"");if(Array.isArray($))return $.map(k9);if($!==null&&typeof $==="object"){let Z={};for(let[X,z]of Object.entries($))Z[X]=k9(z);return Z}return $}function JU($){if(!$.tool?.name)throw Error("pickled.yml: 'tool.name' is required");if(!Array.isArray($.scenarios)||$.scenarios.length===0)throw Error("pickled.yml: 'scenarios' must be a non-empty array");if($.docs?.sources)for(let[X,z]of Object.entries($.docs.sources))KU(X,z);if($.toolsets){if(typeof $.toolsets!=="object"||Array.isArray($.toolsets))throw Error("pickled.yml: 'toolsets' must be an object mapping name to configuration");for(let[X,z]of Object.entries($.toolsets))if(typeof z!=="object"||z===null||Array.isArray(z))throw Error(`pickled.yml: toolsets["${X}"] must be an object`)}if($.targets)for(let[X,z]of Object.entries($.targets)){if(z.systemPrompt!==void 0)throw Error(`pickled.yml: target "${X}" sets 'systemPrompt', which bypasses the citation contract. Remove it; custom prompts are not supported in citation mode.`);if(z.provider==="codex-cli"){if(!z.model)throw Error(`pickled.yml: target "${X}" (codex-cli) requires an explicit 'model' field. Codex's default model can change without notice; pin it for reproducible evals.`);if(z.maxTurns!==void 0)throw Error(`pickled.yml: target "${X}" (codex-cli) sets 'maxTurns', but the codex CLI does not support a turn cap. Remove the field.`)}if(z.category==="api"){if(!z.model)throw Error(`pickled.yml: target "${X}" (api/${z.provider}) requires an explicit 'model' field. Pickled does not substitute a default; reproducible evals depend on pinning the model.`);let q=["allowedTools","disallowedTools","mcpServers","permissionMode","maxTurns","maxThinkingTokens","maxBudgetUsd"];for(let G of q)if(z[G]!==void 0)throw Error(`pickled.yml: target "${X}" (api/${z.provider}) sets '${G}', which only applies to CLI/Agent SDK targets. Remove the field; API targets accept only model/temperature/maxTokens/threshold.`);if(z.workspaceContext!==void 0)throw Error(`pickled.yml: target "${X}" (api/${z.provider}) sets 'workspaceContext', which only applies to IDE targets. Remove the field.`)}}let Z=new Set(Object.keys($.docs?.sources??{}));for(let X of $.scenarios){if(!X.name||!X.prompt)throw Error("pickled.yml: every scenario needs 'name' and 'prompt'");if(X.requiredSources!==void 0){if(!Array.isArray(X.requiredSources))throw Error(`pickled.yml: scenario "${X.name}" has non-array 'requiredSources'. Omit the field to skip citation scoring, or set [] for "any cited source counts".`);for(let z of X.requiredSources)if(!Z.has(z))throw Error(`pickled.yml: scenario "${X.name}" references unknown source "${z}". Declared sources: ${[...Z].join(", ")||"(none)"}`)}LU(X.name,X.traps),VU(X.name,X.compareSurfaces,Z),YU(X.name,X.matrix,Z,new Set(Object.keys($.targets??{})),new Set(Object.keys($.toolsets??{none:{}}))),HU(X.name,X.expected),UU(X.name,X.verifiers,Z),WU(X)}QU($)}function QU($){if(!$.docs?.sources)return;let Z=[];for(let[z,q]of Object.entries($.docs.sources)){if(typeof q==="string")continue;let G=q.audit?.traps;if(Array.isArray(G))Z.push({id:z,list:G})}if(Z.length===0)return;let X=new Map;for(let z of $.scenarios)for(let q of z.traps??[]){let G=X.get(q.id);if(G!==void 0)throw Error(`pickled.yml: trap id "${q.id}" is declared in both scenario "${G}" and scenario "${z.name}". Globally unique trap ids are required when any source uses list-form audit.traps suppression. Rename one of the traps.`);X.set(q.id,z.name)}for(let{id:z,list:q}of Z)for(let G of q)if(!X.has(G)){let J=[...X.keys()].join(", ")||"(none)";throw Error(`pickled.yml: docs.sources["${z}"].audit.traps lists unknown trap id "${G}". Declared trap ids: ${J}`)}}function YU($,Z,X,z,q){if(Z===void 0)return;if(typeof Z!=="object"||Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" matrix must be an object with optional interfaces/sources/toolsets arrays`);let G=(J,Q,Y)=>{let H=Z[J];if(H===void 0)return;if(!Array.isArray(H))throw Error(`pickled.yml: scenario "${$}" matrix.${J} must be an array of ${Y} names`);if(H.length===0)throw Error(`pickled.yml: scenario "${$}" matrix.${J} cannot be empty (omit the field to use defaults)`);for(let W of H){if(typeof W!=="string")throw Error(`pickled.yml: scenario "${$}" matrix.${J} entries must be strings`);if(!Q.has(W))throw Error(`pickled.yml: scenario "${$}" matrix.${J} references unknown ${Y} "${W}". Declared: ${[...Q].join(", ")||"(none)"}`)}};G("interfaces",z,"target"),G("sources",X,"source"),G("toolsets",q,"toolset")}function HU($,Z){if(Z===void 0)return;if(typeof Z!=="object"||Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" expected must be an object with optional includes/excludes arrays`);let X=(z)=>{let q=Z[z];if(q===void 0)return;if(!Array.isArray(q))throw Error(`pickled.yml: scenario "${$}" expected.${z} must be an array of strings`);if(q.length===0)throw Error(`pickled.yml: scenario "${$}" expected.${z} cannot be empty (omit the field instead)`);for(let G=0;G<q.length;G++)if(typeof q[G]!=="string"||q[G].length===0)throw Error(`pickled.yml: scenario "${$}" expected.${z}[${G}] must be a non-empty string`)};X("includes"),X("excludes")}function UU($,Z,X){if(Z===void 0)return;if(typeof Z!=="object"||Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" verifiers must be an object`);let z=Z.sources;if(z===void 0)return;if(!Array.isArray(z))throw Error(`pickled.yml: scenario "${$}" verifiers.sources must be an array of source IDs`);for(let q of z){if(typeof q!=="string")throw Error(`pickled.yml: scenario "${$}" verifiers.sources entries must be strings`);if(!X.has(q))throw Error(`pickled.yml: scenario "${$}" verifiers.sources references unknown source "${q}"`)}}function WU($){let Z=$.requiredSources!==void 0,X=$.expected!==void 0&&($.expected.includes!==void 0&&$.expected.includes.length>0||$.expected.excludes!==void 0&&$.expected.excludes.length>0),z=$.traps!==void 0&&$.traps.length>0;if(!Z&&!X&&!z)throw Error(`pickled.yml: scenario "${$.name}" must declare at least one of requiredSources, expected.includes/excludes, or traps. A scenario with nothing to check has no verdict.`);let q=($.matrix?.toolsets??[]).filter((G)=>G!=="none");if(q.length>0&&!X&&!z)throw Error(`pickled.yml: scenario "${$.name}" declares non-none toolsets [${q.join(", ")}] but has neither expected.includes/excludes nor traps. Non-none cells skip the citation contract because the source is not injected, so requiredSources alone leaves them with no actionable answer contract. Add expected or traps, or restrict matrix.toolsets to ["none"].`)}function VU($,Z,X){if(Z===void 0)return;if(!Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" compareSurfaces must be an array of source-id lists`);if(Z.length===0)throw Error(`pickled.yml: scenario "${$}" compareSurfaces cannot be empty (use a non-empty list of surfaces, or remove the field)`);for(let z=0;z<Z.length;z++){let q=Z[z];if(!Array.isArray(q))throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] must be an array of source ids`);if(q.length===0)throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] must be a non-empty list of source ids`);for(let G of q){if(typeof G!=="string")throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] entries must be string source ids`);if(!X.has(G))throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] references unknown source "${G}". Declared sources: ${[...X].join(", ")||"(none)"}`)}}}function KU($,Z){if(typeof Z==="string"){if(Z.length===0)throw Error(`pickled.yml: docs.sources["${$}"] string form must be a non-empty file path or URL`);return}if(!Z||typeof Z!=="object")throw Error(`pickled.yml: docs.sources["${$}"] must be a string (path/URL) or an object with a 'path' field`);let X=Z;if(typeof X.path!=="string"||X.path.length===0)throw Error(`pickled.yml: docs.sources["${$}"] object form requires a non-empty 'path' field`);if(X.audit!==void 0){if(typeof X.audit!=="object"||X.audit===null)throw Error(`pickled.yml: docs.sources["${$}"].audit must be an object`);let z=X.audit;if(z.traps!==void 0){let q=z.traps;if(typeof q==="boolean");else if(Array.isArray(q)){if(q.length===0)throw Error(`pickled.yml: docs.sources["${$}"].audit.traps cannot be an empty array; use true (scan all) or false (skip all) instead`);for(let G=0;G<q.length;G++)if(typeof q[G]!=="string")throw Error(`pickled.yml: docs.sources["${$}"].audit.traps[${G}] must be a string trap id`)}else throw Error(`pickled.yml: docs.sources["${$}"].audit.traps must be a boolean or an array of trap ids`)}for(let q of Object.keys(z))if(q!=="traps")throw Error(`pickled.yml: docs.sources["${$}"].audit has unknown field "${q}"`)}if(X.type!==void 0){if(X.type!=="file"&&X.type!=="url"&&X.type!=="codebase")throw Error(`pickled.yml: docs.sources["${$}"].type must be "file", "url", or "codebase"`)}if(X.type==="codebase"){if(typeof X.path==="string"&&X.path.split("/").includes(".."))throw Error(`pickled.yml: docs.sources["${$}"].path must not contain ".." segments. Codebase loader stays within the project root.`);if(X.exclude!==void 0){if(!Array.isArray(X.exclude))throw Error(`pickled.yml: docs.sources["${$}"].exclude must be an array of glob patterns`);for(let z=0;z<X.exclude.length;z++)if(typeof X.exclude[z]!=="string")throw Error(`pickled.yml: docs.sources["${$}"].exclude[${z}] must be a string glob pattern`)}if(X.maxBytes!==void 0){if(typeof X.maxBytes!=="number"||!Number.isFinite(X.maxBytes)||X.maxBytes<=0)throw Error(`pickled.yml: docs.sources["${$}"].maxBytes must be a positive number of bytes`)}}else{if(X.exclude!==void 0)throw Error(`pickled.yml: docs.sources["${$}"].exclude only applies to type: codebase sources`);if(X.maxBytes!==void 0)throw Error(`pickled.yml: docs.sources["${$}"].maxBytes only applies to type: codebase sources`)}for(let z of Object.keys(X))if(z!=="path"&&z!=="audit"&&z!=="type"&&z!=="exclude"&&z!=="maxBytes")throw Error(`pickled.yml: docs.sources["${$}"] has unknown field "${z}"`)}var BU=new Set(["g","y"]),TU=new Set(["i","m","s","u","v"]);function LU($,Z){if(Z===void 0)return;if(!Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" has non-array 'traps'`);let X=new Set;for(let z of Z){if(!z.id||typeof z.id!=="string")throw Error(`pickled.yml: scenario "${$}" has a trap missing 'id'`);if(X.has(z.id))throw Error(`pickled.yml: scenario "${$}" has duplicate trap id "${z.id}"`);if(X.add(z.id),!z.reason||typeof z.reason!=="string")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" requires non-empty 'reason'`);if(z.auditSeverity!==void 0&&z.auditSeverity!=="warning"&&z.auditSeverity!=="error")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" auditSeverity must be "warning" or "error"`);let q=typeof z.match==="string",G=typeof z.pattern==="string";if(q===G)throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" must set exactly one of 'match' or 'pattern'`);if(q){if(z.match==="")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has empty 'match'`);if(z.flags!==void 0)throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" sets 'flags' without 'pattern'`)}else{let J=z.pattern;if(typeof J!=="string")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" must set 'pattern'`);if(J==="")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has empty 'pattern'`);if(z.flags!==void 0){if(typeof z.flags!=="string")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has non-string 'flags'`);for(let Q of z.flags){if(BU.has(Q))throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" uses forbidden regex flag "${Q}" (g and y are not allowed)`);if(!TU.has(Q))throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" uses unsupported regex flag "${Q}"`)}}try{new RegExp(J,z.flags??"")}catch(Q){throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has invalid regex pattern: ${Q instanceof Error?Q.message:Q}`)}}}}function f9($,Z){let X=new Set([...Object.keys($.targets??{}),"default"]);if(!X.has(Z)){let z=[...X].sort().join(", ");throw Error(`Unknown target: "${Z}". Available targets: ${z}`)}return{...$,matrix:{...$.matrix,target:[Z]},scenarios:$.scenarios.filter((z)=>!z.target||z.target===Z)}}function h9($){if(typeof $==="string")return{path:$,auditTraps:!0};return{path:$.path,auditTraps:$.audit?.traps??!0}}function M2($){let{config:Z,files:X,pairs:z,findings:q}=$,G=[],J=q.filter((U)=>U.severity==="error").length,Q=q.filter((U)=>U.severity==="warning").length;if(G.push(`# Agent-context audit
|
|
166
|
+
`,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=_2($),X=V$(Z);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=_2($),X=V$(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((X)=>X.type==="newline"||X.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()}}}zH.Parser=p6});var n6=F((VH)=>{var l6=w9(),GH=$1(),J1=Z1(),JH=b4(),QH=E(),YH=b9(),c6=y9();function i6($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new YH.LineCounter||null,prettyErrors:Z}}function HH($,Z={}){let{lineCounter:X,prettyErrors:z}=i6(Z),q=new c6.Parser(X?.addNewLine),G=new l6.Composer(Z),J=Array.from(G.compose(q.parse($)));if(z&&X)for(let Q of J)Q.errors.forEach(J1.prettifyError($,X)),Q.warnings.forEach(J1.prettifyError($,X));if(J.length>0)return J;return Object.assign([],{empty:!0},G.streamInfo())}function a6($,Z={}){let{lineCounter:X,prettyErrors:z}=i6(Z),q=new c6.Parser(X?.addNewLine),G=new l6.Composer(Z),J=null;for(let Q of G.compose(q.parse($),!0,$.length))if(!J)J=Q;else if(J.options.logLevel!=="silent"){J.errors.push(new J1.YAMLParseError(Q.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(z&&X)J.errors.forEach(J1.prettifyError($,X)),J.warnings.forEach(J1.prettifyError($,X));return J}function UH($,Z,X){let z=void 0;if(typeof Z==="function")z=Z;else if(X===void 0&&Z&&typeof Z==="object")X=Z;let q=a6($,X);if(!q)return null;if(q.warnings.forEach((G)=>JH.warn(q.options.logLevel,G)),q.errors.length>0)if(q.options.logLevel!=="silent")throw q.errors[0];else q.errors=[];return q.toJS(Object.assign({reviver:z},X))}function WH($,Z,X){let z=null;if(typeof Z==="function"||Array.isArray(Z))z=Z;else if(X===void 0&&Z)X=Z;if(typeof X==="string")X=X.length;if(typeof X==="number"){let q=Math.round(X);X=q<1?void 0:q>8?{indent:8}:{indent:q}}if($===void 0){let{keepUndefined:q}=X??Z??{};if(!q)return}if(QH.isDocument($)&&!z)return $.toString(X);return new GH.Document($,z,X).toString(X)}VH.parse=UH;VH.parseAllDocuments=HH;VH.parseDocument=a6;VH.stringify=WH});var r6=F((SH)=>{var DH=w9(),_H=$1(),FH=J9(),x9=Z1(),MH=v$(),y0=E(),OH=N0(),wH=g(),PH=C0(),IH=E0(),RH=L2(),AH=E9(),jH=b9(),NH=y9(),F2=n6(),s6=h$();SH.Composer=DH.Composer;SH.Document=_H.Document;SH.Schema=FH.Schema;SH.YAMLError=x9.YAMLError;SH.YAMLParseError=x9.YAMLParseError;SH.YAMLWarning=x9.YAMLWarning;SH.Alias=MH.Alias;SH.isAlias=y0.isAlias;SH.isCollection=y0.isCollection;SH.isDocument=y0.isDocument;SH.isMap=y0.isMap;SH.isNode=y0.isNode;SH.isPair=y0.isPair;SH.isScalar=y0.isScalar;SH.isSeq=y0.isSeq;SH.Pair=OH.Pair;SH.Scalar=wH.Scalar;SH.YAMLMap=PH.YAMLMap;SH.YAMLSeq=IH.YAMLSeq;SH.CST=RH;SH.Lexer=AH.Lexer;SH.LineCounter=jH.LineCounter;SH.Parser=NH.Parser;SH.parse=F2.parse;SH.parseAllDocuments=F2.parseAllDocuments;SH.parseDocument=F2.parseDocument;SH.stringify=F2.stringify;SH.visit=s6.visit;SH.visitAsync=s6.visitAsync});var u5=P5(v5(),1),{program:Z$,createCommand:gV,createArgument:vV,createOption:uV,CommanderError:mV,InvalidArgumentError:dV,InvalidOptionArgumentError:pV,Command:lV,Argument:cV,Option:O4,Help:iV}=u5.default;var m5={name:"@pickled-dev/cli",version:"0.18.0",description:"Test what agents actually understand about your product",module:"dist/index.js",type:"module",bin:{pickled:"./dist/index.js"},files:["dist"],scripts:{dev:"bun run ./src/index.ts",build:"bun build ./src/index.ts --outdir ./dist --target bun --minify --external @anthropic-ai/claude-agent-sdk",release:"semantic-release"},dependencies:{commander:"^14.0.2",chalk:"^5.6.2","@anthropic-ai/claude-agent-sdk":"^0.3.0"},devDependencies:{"@pickled-dev/config":"workspace:*","@pickled-dev/core":"workspace:*","semantic-release":"^25.0.2","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/exec":"^7.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.2","@semantic-release/release-notes-generator":"^14.0.3"}};import PV from"path";var U0={category:"cli",provider:"claude-code",model:"sonnet"},w4=["Read","Glob","Grep","Bash"],P4=["Edit","MultiEdit","Write","NotebookEdit"];var o6=P5(r6(),1);async function K$($){let Z=`${$}/pickled.yml`,X=Bun.file(Z);if(!await X.exists())throw Error(`pickled.yml not found in ${$}`);let z;try{let q=await X.text();z=o6.default.parse(q)}catch(q){throw Error(`Failed to parse pickled.yml: ${q}`)}return z=k9(z),JU(z),z}var GU=/\$\{([A-Z_][A-Z0-9_]*)\}/g;function k9($){if(typeof $==="string")return $.replace(GU,(Z,X)=>process.env[X]??"");if(Array.isArray($))return $.map(k9);if($!==null&&typeof $==="object"){let Z={};for(let[X,z]of Object.entries($))Z[X]=k9(z);return Z}return $}function JU($){if(!$.tool?.name)throw Error("pickled.yml: 'tool.name' is required");if(!Array.isArray($.scenarios)||$.scenarios.length===0)throw Error("pickled.yml: 'scenarios' must be a non-empty array");if($.docs?.sources)for(let[X,z]of Object.entries($.docs.sources))KU(X,z);if($.toolsets){if(typeof $.toolsets!=="object"||Array.isArray($.toolsets))throw Error("pickled.yml: 'toolsets' must be an object mapping name to configuration");for(let[X,z]of Object.entries($.toolsets))if(typeof z!=="object"||z===null||Array.isArray(z))throw Error(`pickled.yml: toolsets["${X}"] must be an object`)}if($.targets)for(let[X,z]of Object.entries($.targets)){if(z.systemPrompt!==void 0)throw Error(`pickled.yml: target "${X}" sets 'systemPrompt', which bypasses the citation contract. Remove it; custom prompts are not supported in citation mode.`);if(z.provider==="codex-cli"){if(!z.model)throw Error(`pickled.yml: target "${X}" (codex-cli) requires an explicit 'model' field. Codex's default model can change without notice; pin it for reproducible evals.`);if(z.maxTurns!==void 0)throw Error(`pickled.yml: target "${X}" (codex-cli) sets 'maxTurns', but the codex CLI does not support a turn cap. Remove the field.`)}if(z.category==="api"){if(!z.model)throw Error(`pickled.yml: target "${X}" (api/${z.provider}) requires an explicit 'model' field. Pickled does not substitute a default; reproducible evals depend on pinning the model.`);let q=["allowedTools","disallowedTools","mcpServers","permissionMode","maxTurns","maxThinkingTokens","maxBudgetUsd"];for(let G of q)if(z[G]!==void 0)throw Error(`pickled.yml: target "${X}" (api/${z.provider}) sets '${G}', which only applies to CLI/Agent SDK targets. Remove the field; API targets accept only model/temperature/maxTokens/threshold.`);if(z.workspaceContext!==void 0)throw Error(`pickled.yml: target "${X}" (api/${z.provider}) sets 'workspaceContext', which only applies to IDE targets. Remove the field.`)}}let Z=new Set(Object.keys($.docs?.sources??{}));for(let X of $.scenarios){if(!X.name||!X.prompt)throw Error("pickled.yml: every scenario needs 'name' and 'prompt'");if(X.requiredSources!==void 0){if(!Array.isArray(X.requiredSources))throw Error(`pickled.yml: scenario "${X.name}" has non-array 'requiredSources'. Omit the field to skip citation scoring, or set [] for "any cited source counts".`);for(let z of X.requiredSources)if(!Z.has(z))throw Error(`pickled.yml: scenario "${X.name}" references unknown source "${z}". Declared sources: ${[...Z].join(", ")||"(none)"}`)}LU(X.name,X.traps),VU(X.name,X.compareSurfaces,Z),YU(X.name,X.matrix,Z,new Set(Object.keys($.targets??{})),new Set(Object.keys($.toolsets??{none:{}}))),HU(X.name,X.expected),UU(X.name,X.verifiers,Z),WU(X)}QU($)}function QU($){if(!$.docs?.sources)return;let Z=[];for(let[z,q]of Object.entries($.docs.sources)){if(typeof q==="string")continue;let G=q.audit?.traps;if(Array.isArray(G))Z.push({id:z,list:G})}if(Z.length===0)return;let X=new Map;for(let z of $.scenarios)for(let q of z.traps??[]){let G=X.get(q.id);if(G!==void 0)throw Error(`pickled.yml: trap id "${q.id}" is declared in both scenario "${G}" and scenario "${z.name}". Globally unique trap ids are required when any source uses list-form audit.traps suppression. Rename one of the traps.`);X.set(q.id,z.name)}for(let{id:z,list:q}of Z)for(let G of q)if(!X.has(G)){let J=[...X.keys()].join(", ")||"(none)";throw Error(`pickled.yml: docs.sources["${z}"].audit.traps lists unknown trap id "${G}". Declared trap ids: ${J}`)}}function YU($,Z,X,z,q){if(Z===void 0)return;if(typeof Z!=="object"||Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" matrix must be an object with optional interfaces/sources/toolsets arrays`);let G=(J,Q,Y)=>{let H=Z[J];if(H===void 0)return;if(!Array.isArray(H))throw Error(`pickled.yml: scenario "${$}" matrix.${J} must be an array of ${Y} names`);if(H.length===0)throw Error(`pickled.yml: scenario "${$}" matrix.${J} cannot be empty (omit the field to use defaults)`);for(let W of H){if(typeof W!=="string")throw Error(`pickled.yml: scenario "${$}" matrix.${J} entries must be strings`);if(!Q.has(W))throw Error(`pickled.yml: scenario "${$}" matrix.${J} references unknown ${Y} "${W}". Declared: ${[...Q].join(", ")||"(none)"}`)}};G("interfaces",z,"target"),G("sources",X,"source"),G("toolsets",q,"toolset")}function HU($,Z){if(Z===void 0)return;if(typeof Z!=="object"||Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" expected must be an object with optional includes/excludes arrays`);let X=(z)=>{let q=Z[z];if(q===void 0)return;if(!Array.isArray(q))throw Error(`pickled.yml: scenario "${$}" expected.${z} must be an array of strings`);if(q.length===0)throw Error(`pickled.yml: scenario "${$}" expected.${z} cannot be empty (omit the field instead)`);for(let G=0;G<q.length;G++)if(typeof q[G]!=="string"||q[G].length===0)throw Error(`pickled.yml: scenario "${$}" expected.${z}[${G}] must be a non-empty string`)};X("includes"),X("excludes")}function UU($,Z,X){if(Z===void 0)return;if(typeof Z!=="object"||Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" verifiers must be an object`);let z=Z.sources;if(z===void 0)return;if(!Array.isArray(z))throw Error(`pickled.yml: scenario "${$}" verifiers.sources must be an array of source IDs`);for(let q of z){if(typeof q!=="string")throw Error(`pickled.yml: scenario "${$}" verifiers.sources entries must be strings`);if(!X.has(q))throw Error(`pickled.yml: scenario "${$}" verifiers.sources references unknown source "${q}"`)}}function WU($){let Z=$.requiredSources!==void 0,X=$.expected!==void 0&&($.expected.includes!==void 0&&$.expected.includes.length>0||$.expected.excludes!==void 0&&$.expected.excludes.length>0),z=$.traps!==void 0&&$.traps.length>0;if(!Z&&!X&&!z)throw Error(`pickled.yml: scenario "${$.name}" must declare at least one of requiredSources, expected.includes/excludes, or traps. A scenario with nothing to check has no verdict.`);let q=($.matrix?.toolsets??[]).filter((G)=>G!=="none");if(q.length>0&&!X&&!z)throw Error(`pickled.yml: scenario "${$.name}" declares non-none toolsets [${q.join(", ")}] but has neither expected.includes/excludes nor traps. Non-none cells skip the citation contract because the source is not injected, so requiredSources alone leaves them with no actionable answer contract. Add expected or traps, or restrict matrix.toolsets to ["none"].`)}function VU($,Z,X){if(Z===void 0)return;if(!Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" compareSurfaces must be an array of source-id lists`);if(Z.length===0)throw Error(`pickled.yml: scenario "${$}" compareSurfaces cannot be empty (use a non-empty list of surfaces, or remove the field)`);for(let z=0;z<Z.length;z++){let q=Z[z];if(!Array.isArray(q))throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] must be an array of source ids`);if(q.length===0)throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] must be a non-empty list of source ids`);for(let G of q){if(typeof G!=="string")throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] entries must be string source ids`);if(!X.has(G))throw Error(`pickled.yml: scenario "${$}" compareSurfaces[${z}] references unknown source "${G}". Declared sources: ${[...X].join(", ")||"(none)"}`)}}}function KU($,Z){if(typeof Z==="string"){if(Z.length===0)throw Error(`pickled.yml: docs.sources["${$}"] string form must be a non-empty file path or URL`);return}if(!Z||typeof Z!=="object")throw Error(`pickled.yml: docs.sources["${$}"] must be a string (path/URL) or an object with a 'path' field`);let X=Z;if(typeof X.path!=="string"||X.path.length===0)throw Error(`pickled.yml: docs.sources["${$}"] object form requires a non-empty 'path' field`);if(X.audit!==void 0){if(typeof X.audit!=="object"||X.audit===null)throw Error(`pickled.yml: docs.sources["${$}"].audit must be an object`);let z=X.audit;if(z.traps!==void 0){let q=z.traps;if(typeof q==="boolean");else if(Array.isArray(q)){if(q.length===0)throw Error(`pickled.yml: docs.sources["${$}"].audit.traps cannot be an empty array; use true (scan all) or false (skip all) instead`);for(let G=0;G<q.length;G++)if(typeof q[G]!=="string")throw Error(`pickled.yml: docs.sources["${$}"].audit.traps[${G}] must be a string trap id`)}else throw Error(`pickled.yml: docs.sources["${$}"].audit.traps must be a boolean or an array of trap ids`)}for(let q of Object.keys(z))if(q!=="traps")throw Error(`pickled.yml: docs.sources["${$}"].audit has unknown field "${q}"`)}if(X.type!==void 0){if(X.type!=="file"&&X.type!=="url"&&X.type!=="codebase")throw Error(`pickled.yml: docs.sources["${$}"].type must be "file", "url", or "codebase"`)}if(X.type==="codebase"){if(typeof X.path==="string"&&X.path.split("/").includes(".."))throw Error(`pickled.yml: docs.sources["${$}"].path must not contain ".." segments. Codebase loader stays within the project root.`);if(X.exclude!==void 0){if(!Array.isArray(X.exclude))throw Error(`pickled.yml: docs.sources["${$}"].exclude must be an array of glob patterns`);for(let z=0;z<X.exclude.length;z++)if(typeof X.exclude[z]!=="string")throw Error(`pickled.yml: docs.sources["${$}"].exclude[${z}] must be a string glob pattern`)}if(X.maxBytes!==void 0){if(typeof X.maxBytes!=="number"||!Number.isFinite(X.maxBytes)||X.maxBytes<=0)throw Error(`pickled.yml: docs.sources["${$}"].maxBytes must be a positive number of bytes`)}}else{if(X.exclude!==void 0)throw Error(`pickled.yml: docs.sources["${$}"].exclude only applies to type: codebase sources`);if(X.maxBytes!==void 0)throw Error(`pickled.yml: docs.sources["${$}"].maxBytes only applies to type: codebase sources`)}for(let z of Object.keys(X))if(z!=="path"&&z!=="audit"&&z!=="type"&&z!=="exclude"&&z!=="maxBytes")throw Error(`pickled.yml: docs.sources["${$}"] has unknown field "${z}"`)}var BU=new Set(["g","y"]),TU=new Set(["i","m","s","u","v"]);function LU($,Z){if(Z===void 0)return;if(!Array.isArray(Z))throw Error(`pickled.yml: scenario "${$}" has non-array 'traps'`);let X=new Set;for(let z of Z){if(!z.id||typeof z.id!=="string")throw Error(`pickled.yml: scenario "${$}" has a trap missing 'id'`);if(X.has(z.id))throw Error(`pickled.yml: scenario "${$}" has duplicate trap id "${z.id}"`);if(X.add(z.id),!z.reason||typeof z.reason!=="string")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" requires non-empty 'reason'`);if(z.auditSeverity!==void 0&&z.auditSeverity!=="warning"&&z.auditSeverity!=="error")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" auditSeverity must be "warning" or "error"`);let q=typeof z.match==="string",G=typeof z.pattern==="string";if(q===G)throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" must set exactly one of 'match' or 'pattern'`);if(q){if(z.match==="")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has empty 'match'`);if(z.flags!==void 0)throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" sets 'flags' without 'pattern'`)}else{let J=z.pattern;if(typeof J!=="string")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" must set 'pattern'`);if(J==="")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has empty 'pattern'`);if(z.flags!==void 0){if(typeof z.flags!=="string")throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has non-string 'flags'`);for(let Q of z.flags){if(BU.has(Q))throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" uses forbidden regex flag "${Q}" (g and y are not allowed)`);if(!TU.has(Q))throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" uses unsupported regex flag "${Q}"`)}}try{new RegExp(J,z.flags??"")}catch(Q){throw Error(`pickled.yml: scenario "${$}" trap "${z.id}" has invalid regex pattern: ${Q instanceof Error?Q.message:Q}`)}}}}function f9($,Z){let X=new Set([...Object.keys($.targets??{}),"default"]);if(!X.has(Z)){let z=[...X].sort().join(", ");throw Error(`Unknown target: "${Z}". Available targets: ${z}`)}return{...$,matrix:{...$.matrix,target:[Z]},scenarios:$.scenarios.filter((z)=>!z.target||z.target===Z)}}function h9($){if(typeof $==="string")return{path:$,auditTraps:!0};return{path:$.path,auditTraps:$.audit?.traps??!0}}function M2($){let{config:Z,files:X,pairs:z,findings:q}=$,G=[],J=q.filter((U)=>U.severity==="error").length,Q=q.filter((U)=>U.severity==="warning").length;if(G.push(`# Agent-context audit
|
|
167
167
|
`),G.push(`Target: \`${Z.targetRepo}\``),G.push(`Budgets: root \u2264 ${Z.budgets.rootLines} lines, nested warn at ${Z.budgets.nestedWarnLines} lines.`),G.push(`Found ${X.length} agent-doc files. ${J} error(s), ${Q} warning(s).
|
|
168
168
|
`),G.push(`## Inventory
|
|
169
169
|
`),X.length===0)G.push(`No agent-doc files found.
|
|
170
|
-
`);else{G.push("| File | Lines | Kind | Notes |"),G.push("|---|---|---|---|");let U=[...X].sort((V,B)=>B.lineCount-V.lineCount);for(let V of U){let B=!V.relPath.includes("/"),L=
|
|
170
|
+
`);else{G.push("| File | Lines | Kind | Notes |"),G.push("|---|---|---|---|");let U=[...X].sort((V,B)=>B.lineCount-V.lineCount);for(let V of U){let B=!V.relPath.includes("/"),L=t6(V.lineCount,B,Z),K=V.isSymlink?`symlink \u2192 ${V.symlinkTarget?.replace(`${Z.targetRepo}/`,"")??"?"}`:"file";G.push(`| \`${V.relPath}\` | ${V.lineCount} | ${K} | ${L} |`)}G.push("")}if(G.push(`## AGENTS.md / CLAUDE.md pairs
|
|
171
171
|
`),z.length===0)G.push(`No pairs found.
|
|
172
172
|
`);else{G.push("| Directory | A | C | Class | Detail |"),G.push("|---|---|---|---|---|");for(let U of z)G.push(`| \`${U.dir||"(root)"}\` | ${U.agentsExists?"\u2713":"\xB7"} | ${U.claudeExists?"\u2713":"\xB7"} | ${U.classification} | ${U.detail} |`);G.push("")}let Y=X.filter((U)=>!U.isSymlink&&U.brokenPathRefs.length+U.brokenImports.length>0);if(G.push(`## Broken references
|
|
173
173
|
`),Y.length===0)G.push(`None detected.
|
|
@@ -182,8 +182,8 @@ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.pus
|
|
|
182
182
|
`),G.push("| Section | Lines |"),G.push("|---|---|");for(let V of U.sections.slice(0,10))G.push(`| ${V.header} | ${V.lines} |`);G.push("")}if(G.push(`## Registered-source trap matches
|
|
183
183
|
`),G.push("Catches stale claims in `docs.sources` against declared traps. Per-source suppression: `audit.traps: false` skips all traps; `audit.traps: [<trap_id>, ...]` skips only the listed traps and keeps scanning the rest.\n"),$.sourceTrapMatches.length===0)G.push(`None.
|
|
184
184
|
`);else{for(let U of $.sourceTrapMatches)G.push(`- **${U.sourceId}** (\`${U.sourcePath}:L${U.line}\`) \u2014 trap \`${U.trapId}\` matched \`${U.matched}\` (${U.severity})`),G.push(` - reason: ${U.trapReason}`),G.push(` - fix: remove the stale claim, retire the trap, set \`audit.traps: ['${U.trapId}']\` to suppress just this one (other traps still apply), or set \`audit.traps: false\` if the source is deliberately stale`);G.push("")}return G.join(`
|
|
185
|
-
`)}function O2($){return JSON.stringify($,null,2)}function w2($){let{config:Z,files:X,pairs:z,findings:q}=$,G=[],J=q.filter((U)=>U.severity==="error").length,Q=q.filter((U)=>U.severity==="warning").length;if(G.push("pickled audit"),G.push(`Target: ${Z.targetRepo}`),G.push(`Budgets: root \u2264 ${Z.budgets.rootLines} lines, nested warn at ${Z.budgets.nestedWarnLines} lines.`),G.push(`Found: ${X.length} agent-doc file(s) \xB7 ${J} error(s) \xB7 ${Q} warning(s)`),G.push(""),G.push("Inventory"),X.length===0)G.push(" none");else{let U=[...X].sort((B,L)=>L.lineCount-B.lineCount),V=Math.max(...U.map((B)=>B.relPath.length));for(let B of U){let L=!B.relPath.includes("/"),K=
|
|
186
|
-
`)}function
|
|
185
|
+
`)}function O2($){return JSON.stringify($,null,2)}function w2($){let{config:Z,files:X,pairs:z,findings:q}=$,G=[],J=q.filter((U)=>U.severity==="error").length,Q=q.filter((U)=>U.severity==="warning").length;if(G.push("pickled audit"),G.push(`Target: ${Z.targetRepo}`),G.push(`Budgets: root \u2264 ${Z.budgets.rootLines} lines, nested warn at ${Z.budgets.nestedWarnLines} lines.`),G.push(`Found: ${X.length} agent-doc file(s) \xB7 ${J} error(s) \xB7 ${Q} warning(s)`),G.push(""),G.push("Inventory"),X.length===0)G.push(" none");else{let U=[...X].sort((B,L)=>L.lineCount-B.lineCount),V=Math.max(...U.map((B)=>B.relPath.length));for(let B of U){let L=!B.relPath.includes("/"),K=t6(B.lineCount,L,Z),T=B.isSymlink?`symlink \u2192 ${B.symlinkTarget?.replace(`${Z.targetRepo}/`,"")??"?"}`:"file",D=`${B.lineCount}`.padStart(4),_=B.relPath.padEnd(V),O=K?` (${K})`:"";G.push(` ${_} ${D} lines ${T}${O}`)}}if(G.push(""),G.push("AGENTS.md / CLAUDE.md pairs"),z.length===0)G.push(" none");else for(let U of z){let V=U.dir||"(root)";G.push(` ${V}: ${U.classification} \xB7 ${U.detail}`)}G.push("");let Y=X.filter((U)=>!U.isSymlink&&U.brokenPathRefs.length+U.brokenImports.length>0);if(G.push("Broken references"),Y.length===0)G.push(" none");else for(let U of Y){G.push(` ${U.relPath}:`);for(let V of U.brokenPathRefs)G.push(` path: ${V}`);for(let V of U.brokenImports)G.push(` @-import: ${V}`)}G.push("");let H=X.filter((U)=>!U.isSymlink&&U.unresolvedCommands.length>0);if(G.push("Unresolved package-manager commands (advisory)"),H.length===0)G.push(" none");else for(let U of H){G.push(` ${U.relPath}:`);for(let V of U.unresolvedCommands)G.push(` ${V}`)}G.push("");let W=X.filter((U)=>{if(U.isSymlink)return!1;return!U.relPath.includes("/")?U.lineCount>Z.budgets.rootLines:U.lineCount>Z.budgets.nestedWarnLines});if(G.push("Section breakdown for files over budget"),W.length===0)G.push(" all files within budget");else for(let U of W){G.push(` ${U.relPath} (${U.lineCount} lines):`);for(let V of U.sections.slice(0,10))G.push(` ${V.header.padEnd(40)} ${V.lines} lines`)}if(G.push(""),G.push("Registered-source trap matches"),$.sourceTrapMatches.length===0)G.push(" none");else for(let U of $.sourceTrapMatches){let V=U.severity==="error"?"error":"warning";G.push(` [${V}] ${U.sourceId} (${U.sourcePath}:L${U.line}): trap ${U.trapId} matched "${U.matched}"`),G.push(` reason: ${U.trapReason}`),G.push(` fix: remove the stale claim, retire the trap, set audit.traps: ['${U.trapId}'] to suppress just this trap (others still apply), or set audit.traps: false if deliberately stale`)}return G.join(`
|
|
186
|
+
`)}function t6($,Z,X){if(Z&&$>X.budgets.rootLines)return`over root budget (${$} > ${X.budgets.rootLines})`;if(!Z&&$>X.budgets.nestedWarnLines)return`over nested-warn (${$} > ${X.budgets.nestedWarnLines})`;return""}import{existsSync as T$,lstatSync as qZ,readFileSync as A2,readlinkSync as SU,statSync as CU}from"fs";import{dirname as j2,isAbsolute as EU,join as g9,relative as bU,resolve as v9}from"path";var{Glob:zZ}=globalThis.Bun;var P2=["node_modules/**","**/node_modules/**",".git/**","**/.git/**","dist/**","**/dist/**","build/**","**/build/**",".next/**","**/.next/**",".source/**","**/.source/**","out/**","**/out/**",".turbo/**","**/.turbo/**",".cache/**","**/.cache/**",".runs/**","**/.runs/**","coverage/**","**/coverage/**","**/__fixtures__/**","**/tests/**/fixture/**","**/tests/**/fixtures/**","**/test/**/fixture/**","**/test/**/fixtures/**"],B$={targetRepo:".",budgets:{rootLines:120,nestedWarnLines:200},ignore:P2,intentionalDifferentPairs:[],knownCommands:[]};function I2($){if(!$)return B$;return{targetRepo:$.targetRepo??B$.targetRepo,budgets:{rootLines:$.budgets?.rootLines??B$.budgets.rootLines,nestedWarnLines:$.budgets?.nestedWarnLines??B$.budgets.nestedWarnLines},ignore:$.ignore??P2,intentionalDifferentPairs:$.intentionalDifferentPairs??[],knownCommands:$.knownCommands??[]}}import{existsSync as IU}from"fs";import{join as RU,resolve as AU}from"path";function x0($){let Z=[],X=[];for(let z of $.traps){let q=DU($.response,z);if(q)Z.push(q);else X.push(z.id)}return{fired:Z,avoided:X}}function DU($,Z){if(Z.match!==void 0){let X=$.indexOf(Z.match);if(X===-1)return null;return{id:Z.id,reason:Z.reason,matched:Z.match,snippet:e6($,X,Z.match.length),index:X}}if(Z.pattern!==void 0){let z=new RegExp(Z.pattern,Z.flags??"").exec($);if(!z)return null;return{id:Z.id,reason:Z.reason,matched:z[0],snippet:e6($,z.index,z[0].length),index:z.index}}return null}function e6($,Z,X){let z=Math.max(0,Z-40),q=Math.min($.length,Z+X+40),G=$.slice(z,q).replace(/\s+/g," ").trim();if(z>0)G=`...${G}`;if(q<$.length)G=`${G}...`;return G}import R2 from"path";var{Glob:$Z}=globalThis.Bun;var _U=262144,FU=4194304;function MU($){return $.startsWith("http://")||$.startsWith("https://")}async function OU($,Z,X){let z=await fetch(Z);if(!z.ok)throw Error(`Failed to fetch source "${$}" from ${Z}: ${z.status} ${z.statusText}`);let q=await z.text();return{id:$,source:Z,content:q,name:new URL(Z).hostname+new URL(Z).pathname,type:"url",auditTraps:X}}async function wU($,Z,X,z){let q=R2.isAbsolute(Z)?Z:R2.resolve(X,Z),G=Bun.file(q);if(!await G.exists())throw Error(`Source "${$}" not found at ${q}`);let J=await G.text();return{id:$,source:Z,content:J,name:R2.basename(q),type:"file",auditTraps:z}}async function PU($,Z,X,z,q){let G=new $Z(Z.path),J=(Z.exclude??[]).map((B)=>new $Z(B)),Q=[];for await(let B of G.scan({cwd:X,onlyFiles:!0,followSymlinks:!1})){if(J.some((L)=>L.match(B)))continue;Q.push(B)}Q.sort();let Y=Z.maxBytes??_U,H=Math.max(Y,FU),W=[],U=0;for(let B of Q){let L=R2.resolve(X,B),K=await Bun.file(L).text(),T=`// === ${B} ===
|
|
187
187
|
`;if(W.push(T,K),!K.endsWith(`
|
|
188
188
|
`))W.push(`
|
|
189
189
|
`);if(U+=T.length+K.length,U>H)throw Error(`Codebase source "${$}" exceeded hard cap of ${H} bytes (matched glob ${Z.path}). Tighten the glob or raise the limit via maxBytes (and accept the request-size risk).`)}if(U>Y)q?.(` warn: codebase source [${$}] is ${U} bytes (soft cap ${Y}); consider tightening the glob`);let V=W.join("");return{id:$,source:Z.path,content:V,name:`${Q.length} file${Q.length===1?"":"s"} in ${Z.path}`,type:"codebase",auditTraps:z,matchedFiles:Q}}async function ZZ($,Z,X,z){let{path:q,auditTraps:G}=h9(Z);if(typeof Z!=="string"&&Z.type==="codebase")return PU($,Z,X,G,z);if(MU(q))return OU($,q,G);return wU($,q,X,G)}async function Q1($,Z,X){let z=Object.entries($);return await Promise.all(z.map(([G,J])=>ZZ(G,J,Z,X)))}async function XZ($){if(!IU(RU($,"pickled.yml")))return{matches:[],findings:[]};let Z=await K$($),X=Z.docs?.sources;if(!X||Object.keys(X).length===0)return{matches:[],findings:[]};let z={};for(let[H,W]of Object.entries(X)){let U=typeof W==="string"?W:W.path;if(U.startsWith("http://")||U.startsWith("https://"))continue;z[H]=W}if(Object.keys(z).length===0)return{matches:[],findings:[]};let q=[],G=new Map;for(let H of Z.scenarios)for(let W of H.traps??[])q.push(W),G.set(W,W.auditSeverity??"warning");if(q.length===0)return{matches:[],findings:[]};let J=await Q1(z,$),Q=[],Y=[];for(let H of J){let W=H.auditTraps;if(W===!1)continue;let U=Array.isArray(W)?new Set(W):null,V=H.type==="codebase"&&H.matchedFiles?await jU(H.matchedFiles,$,H.source):[{path:H.source,content:H.content}];for(let B of V)for(let L of q){if(U?.has(L.id))continue;let{fired:K}=x0({response:B.content,traps:[L]}),T=K[0];if(!T)continue;let D=NU(B.content,T.index),_=G.get(L)??"warning";Q.push({sourceId:H.id,sourcePath:B.path,trapId:T.id,trapReason:T.reason,matched:T.matched,snippet:T.snippet,line:D,severity:_}),Y.push({severity:_,category:"trap-source-match",file:B.path,message:`source [${H.id}] matches trap '${T.id}' ("${T.matched}") in ${B.path}. ${T.reason} Fix: remove the stale claim from the source, retire the trap if no longer relevant, set audit.traps: ['${T.id}'] on the source to suppress just this trap (other traps still apply), or set audit.traps: false if the source is deliberately stale or test-only.`})}}return{matches:Q,findings:Y}}async function jU($,Z,X){let z=[];for(let q of $)try{let G=await Bun.file(AU(Z,q)).text();z.push({path:q,content:G})}catch{}return z}function NU($,Z){let X=1,z=Math.min(Z,$.length);for(let q=0;q<z;q++)if($[q]===`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pickled-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Test what agents actually understand about your product",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"@semantic-release/exec": "^7.1.0",
|
|
29
29
|
"@semantic-release/git": "^10.0.1",
|
|
30
30
|
"@semantic-release/github": "^12.0.2",
|
|
31
|
-
"semantic-release-
|
|
31
|
+
"@semantic-release/release-notes-generator": "^14.0.3"
|
|
32
32
|
}
|
|
33
33
|
}
|