typebulb 0.12.0 → 0.13.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/agents/claude/client.js +341 -205
- package/dist/agents/claude/styles.css +3 -21
- package/dist/ai/aiProvider.d.ts +59 -0
- package/dist/ai/aiProvider.d.ts.map +1 -0
- package/dist/ai/aiProvider.js +109 -0
- package/dist/ai/aiProvider.js.map +1 -0
- package/dist/ai/aiProviders.d.ts +28 -0
- package/dist/ai/aiProviders.d.ts.map +1 -0
- package/dist/ai/aiProviders.js +47 -0
- package/dist/ai/aiProviders.js.map +1 -0
- package/dist/ai/chat.d.ts +32 -0
- package/dist/ai/chat.d.ts.map +1 -0
- package/dist/ai/chat.js +5 -0
- package/dist/ai/chat.js.map +1 -0
- package/dist/ai/index.d.ts +9 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +11 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/protocol.d.ts +18 -0
- package/dist/ai/protocol.d.ts.map +1 -0
- package/dist/ai/protocol.js +3 -0
- package/dist/ai/protocol.js.map +1 -0
- package/dist/ai/providers/anthropic.d.ts +123 -0
- package/dist/ai/providers/anthropic.d.ts.map +1 -0
- package/dist/ai/providers/anthropic.js +130 -0
- package/dist/ai/providers/anthropic.js.map +1 -0
- package/dist/ai/providers/gemini.d.ts +62 -0
- package/dist/ai/providers/gemini.d.ts.map +1 -0
- package/dist/ai/providers/gemini.js +136 -0
- package/dist/ai/providers/gemini.js.map +1 -0
- package/dist/ai/providers/openAI.d.ts +146 -0
- package/dist/ai/providers/openAI.d.ts.map +1 -0
- package/dist/ai/providers/openAI.js +127 -0
- package/dist/ai/providers/openAI.js.map +1 -0
- package/dist/ai/providers/openRouter.d.ts +65 -0
- package/dist/ai/providers/openRouter.d.ts.map +1 -0
- package/dist/ai/providers/openRouter.js +82 -0
- package/dist/ai/providers/openRouter.js.map +1 -0
- package/dist/ai/sseParser.d.ts +32 -0
- package/dist/ai/sseParser.d.ts.map +1 -0
- package/dist/ai/sseParser.js +121 -0
- package/dist/ai/sseParser.js.map +1 -0
- package/dist/ai/stream.d.ts +20 -0
- package/dist/ai/stream.d.ts.map +1 -0
- package/dist/ai/stream.js +6 -0
- package/dist/ai/stream.js.map +1 -0
- package/dist/dts/cache.d.ts +30 -0
- package/dist/dts/cache.d.ts.map +1 -0
- package/dist/dts/cache.js +2 -0
- package/dist/dts/cache.js.map +1 -0
- package/dist/dts/definitelyTypedProvider.d.ts +20 -0
- package/dist/dts/definitelyTypedProvider.d.ts.map +1 -0
- package/dist/dts/definitelyTypedProvider.js +93 -0
- package/dist/dts/definitelyTypedProvider.js.map +1 -0
- package/dist/dts/dtsConfig.d.ts +12 -0
- package/dist/dts/dtsConfig.d.ts.map +1 -0
- package/dist/dts/dtsConfig.js +24 -0
- package/dist/dts/dtsConfig.js.map +1 -0
- package/dist/dts/dtsResolver.d.ts +63 -0
- package/dist/dts/dtsResolver.d.ts.map +1 -0
- package/dist/dts/dtsResolver.js +272 -0
- package/dist/dts/dtsResolver.js.map +1 -0
- package/dist/dts/fetchDts.d.ts +13 -0
- package/dist/dts/fetchDts.d.ts.map +1 -0
- package/dist/dts/fetchDts.js +46 -0
- package/dist/dts/fetchDts.js.map +1 -0
- package/dist/dts/httpFetch.d.ts +17 -0
- package/dist/dts/httpFetch.d.ts.map +1 -0
- package/dist/dts/httpFetch.js +35 -0
- package/dist/dts/httpFetch.js.map +1 -0
- package/dist/dts/index.d.ts +14 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/index.js +14 -0
- package/dist/dts/index.js.map +1 -0
- package/dist/dts/libManifest.d.ts +41 -0
- package/dist/dts/libManifest.d.ts.map +1 -0
- package/dist/dts/libManifest.js +109 -0
- package/dist/dts/libManifest.js.map +1 -0
- package/dist/dts/negativeCacheHelper.d.ts +29 -0
- package/dist/dts/negativeCacheHelper.d.ts.map +1 -0
- package/dist/dts/negativeCacheHelper.js +44 -0
- package/dist/dts/negativeCacheHelper.js.map +1 -0
- package/dist/dts/tarballFetcher.d.ts +13 -0
- package/dist/dts/tarballFetcher.d.ts.map +1 -0
- package/dist/dts/tarballFetcher.js +58 -0
- package/dist/dts/tarballFetcher.js.map +1 -0
- package/dist/dts/tbTypings.d.ts +15 -0
- package/dist/dts/tbTypings.d.ts.map +1 -0
- package/dist/dts/tbTypings.js +210 -0
- package/dist/dts/tbTypings.js.map +1 -0
- package/dist/dts/typeProvider.d.ts +37 -0
- package/dist/dts/typeProvider.d.ts.map +1 -0
- package/dist/dts/typeProvider.js +30 -0
- package/dist/dts/typeProvider.js.map +1 -0
- package/dist/dts/typeRefScanner.d.ts +8 -0
- package/dist/dts/typeRefScanner.d.ts.map +1 -0
- package/dist/dts/typeRefScanner.js +33 -0
- package/dist/dts/typeRefScanner.js.map +1 -0
- package/dist/dts/typescriptProvider.d.ts +21 -0
- package/dist/dts/typescriptProvider.d.ts.map +1 -0
- package/dist/dts/typescriptProvider.js +140 -0
- package/dist/dts/typescriptProvider.js.map +1 -0
- package/dist/dts/virtualFs.d.ts +20 -0
- package/dist/dts/virtualFs.d.ts.map +1 -0
- package/dist/dts/virtualFs.js +48 -0
- package/dist/dts/virtualFs.js.map +1 -0
- package/dist/format/chunks.d.ts +20 -0
- package/dist/format/chunks.d.ts.map +1 -0
- package/dist/format/chunks.js +51 -0
- package/dist/format/chunks.js.map +1 -0
- package/dist/format/config.d.ts +17 -0
- package/dist/format/config.d.ts.map +1 -0
- package/dist/format/config.js +13 -0
- package/dist/format/config.js.map +1 -0
- package/dist/format/detection.d.ts +11 -0
- package/dist/format/detection.d.ts.map +1 -0
- package/dist/format/detection.js +43 -0
- package/dist/format/detection.js.map +1 -0
- package/dist/format/index.d.ts +8 -0
- package/dist/format/index.d.ts.map +1 -0
- package/dist/format/index.js +8 -0
- package/dist/format/index.js.map +1 -0
- package/dist/format/parse.d.ts +20 -0
- package/dist/format/parse.d.ts.map +1 -0
- package/dist/format/parse.js +88 -0
- package/dist/format/parse.js.map +1 -0
- package/dist/format/registry.d.ts +24 -0
- package/dist/format/registry.d.ts.map +1 -0
- package/dist/format/registry.js +31 -0
- package/dist/format/registry.js.map +1 -0
- package/dist/format/serialize.d.ts +8 -0
- package/dist/format/serialize.d.ts.map +1 -0
- package/dist/format/serialize.js +30 -0
- package/dist/format/serialize.js.map +1 -0
- package/dist/format/yaml.d.ts +4 -0
- package/dist/format/yaml.d.ts.map +1 -0
- package/dist/format/yaml.js +17 -0
- package/dist/format/yaml.js.map +1 -0
- package/dist/index.js +385 -84
- package/dist/lint/index.d.ts +29 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +257 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/render.js +174 -38
- package/dist/resolver/attempt.d.ts +2 -0
- package/dist/resolver/attempt.d.ts.map +1 -0
- package/dist/resolver/attempt.js +9 -0
- package/dist/resolver/attempt.js.map +1 -0
- package/dist/resolver/cdnClient.d.ts +46 -0
- package/dist/resolver/cdnClient.d.ts.map +1 -0
- package/dist/resolver/cdnClient.js +107 -0
- package/dist/resolver/cdnClient.js.map +1 -0
- package/dist/resolver/cdnConstants.d.ts +10 -0
- package/dist/resolver/cdnConstants.d.ts.map +1 -0
- package/dist/resolver/cdnConstants.js +10 -0
- package/dist/resolver/cdnConstants.js.map +1 -0
- package/dist/resolver/index.d.ts +20 -0
- package/dist/resolver/index.d.ts.map +1 -0
- package/dist/resolver/index.js +20 -0
- package/dist/resolver/index.js.map +1 -0
- package/dist/resolver/packageRef.d.ts +21 -0
- package/dist/resolver/packageRef.d.ts.map +1 -0
- package/dist/resolver/packageRef.js +89 -0
- package/dist/resolver/packageRef.js.map +1 -0
- package/dist/resolver/packageService.d.ts +40 -0
- package/dist/resolver/packageService.d.ts.map +1 -0
- package/dist/resolver/packageService.js +156 -0
- package/dist/resolver/packageService.js.map +1 -0
- package/dist/resolver/peerResolver.d.ts +33 -0
- package/dist/resolver/peerResolver.d.ts.map +1 -0
- package/dist/resolver/peerResolver.js +66 -0
- package/dist/resolver/peerResolver.js.map +1 -0
- package/dist/resolver/semver.d.ts +17 -0
- package/dist/resolver/semver.d.ts.map +1 -0
- package/dist/resolver/semver.js +56 -0
- package/dist/resolver/semver.js.map +1 -0
- package/dist/resolver/types.d.ts +33 -0
- package/dist/resolver/types.d.ts.map +1 -0
- package/dist/resolver/types.js +2 -0
- package/dist/resolver/types.js.map +1 -0
- package/dist/resolver/versionResolver.d.ts +29 -0
- package/dist/resolver/versionResolver.d.ts.map +1 -0
- package/dist/resolver/versionResolver.js +79 -0
- package/dist/resolver/versionResolver.js.map +1 -0
- package/dist/servers.js +142 -3
- package/dist/transpile/index.d.ts +19 -0
- package/dist/transpile/index.d.ts.map +1 -0
- package/dist/transpile/index.js +23 -0
- package/dist/transpile/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +99 -68
package/dist/servers.js
CHANGED
|
@@ -1,3 +1,142 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
`)
|
|
1
|
+
import { createRequire as __cr } from 'module'; const require = __cr(import.meta.url);
|
|
2
|
+
var Fo=Object.create;var Kn=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Yo=Object.getPrototypeOf,Jo=Object.prototype.hasOwnProperty;var ze=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var g=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var Vo=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Uo(e))!Jo.call(s,i)&&i!==t&&Kn(s,i,{get:()=>e[i],enumerable:!(n=Ro(e,i))||n.enumerable});return s};var Wo=(s,e,t)=>(t=s!=null?Fo(Yo(s)):{},Vo(e||!s||!s.__esModule?Kn(t,"default",{value:s,enumerable:!0}):t,s));var q=g(P=>{"use strict";var ns=Symbol.for("yaml.alias"),Qn=Symbol.for("yaml.document"),st=Symbol.for("yaml.map"),Hn=Symbol.for("yaml.pair"),is=Symbol.for("yaml.scalar"),nt=Symbol.for("yaml.seq"),F=Symbol.for("yaml.node.type"),wa=s=>!!s&&typeof s=="object"&&s[F]===ns,va=s=>!!s&&typeof s=="object"&&s[F]===Qn,ka=s=>!!s&&typeof s=="object"&&s[F]===st,Na=s=>!!s&&typeof s=="object"&&s[F]===Hn,Xn=s=>!!s&&typeof s=="object"&&s[F]===is,Aa=s=>!!s&&typeof s=="object"&&s[F]===nt;function zn(s){if(s&&typeof s=="object")switch(s[F]){case st:case nt:return!0}return!1}function qa(s){if(s&&typeof s=="object")switch(s[F]){case ns:case st:case is:case nt:return!0}return!1}var Oa=s=>(Xn(s)||zn(s))&&!!s.anchor;P.ALIAS=ns;P.DOC=Qn;P.MAP=st;P.NODE_TYPE=F;P.PAIR=Hn;P.SCALAR=is;P.SEQ=nt;P.hasAnchor=Oa;P.isAlias=wa;P.isCollection=zn;P.isDocument=va;P.isMap=ka;P.isNode=qa;P.isPair=Na;P.isScalar=Xn;P.isSeq=Aa});var ve=g(rs=>{"use strict";var I=q(),M=Symbol("break visit"),Zn=Symbol("skip children"),j=Symbol("remove node");function it(s,e){let t=ei(e);I.isDocument(s)?ae(null,s.contents,t,Object.freeze([s]))===j&&(s.contents=null):ae(null,s,t,Object.freeze([]))}it.BREAK=M;it.SKIP=Zn;it.REMOVE=j;function ae(s,e,t,n){let i=ti(s,e,t,n);if(I.isNode(i)||I.isPair(i))return si(s,n,i),ae(s,i,t,n);if(typeof i!="symbol"){if(I.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ae(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===M)return M;o===j&&(e.items.splice(r,1),r-=1)}}}else if(I.isPair(e)){n=Object.freeze(n.concat(e));let r=ae("key",e.key,t,n);if(r===M)return M;r===j&&(e.key=null);let o=ae("value",e.value,t,n);if(o===M)return M;o===j&&(e.value=null)}}return i}async function rt(s,e){let t=ei(e);I.isDocument(s)?await le(null,s.contents,t,Object.freeze([s]))===j&&(s.contents=null):await le(null,s,t,Object.freeze([]))}rt.BREAK=M;rt.SKIP=Zn;rt.REMOVE=j;async function le(s,e,t,n){let i=await ti(s,e,t,n);if(I.isNode(i)||I.isPair(i))return si(s,n,i),le(s,i,t,n);if(typeof i!="symbol"){if(I.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await le(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===M)return M;o===j&&(e.items.splice(r,1),r-=1)}}}else if(I.isPair(e)){n=Object.freeze(n.concat(e));let r=await le("key",e.key,t,n);if(r===M)return M;r===j&&(e.key=null);let o=await le("value",e.value,t,n);if(o===M)return M;o===j&&(e.value=null)}}return i}function ei(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function ti(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(I.isMap(e))return t.Map?.(s,e,n);if(I.isSeq(e))return t.Seq?.(s,e,n);if(I.isPair(e))return t.Pair?.(s,e,n);if(I.isScalar(e))return t.Scalar?.(s,e,n);if(I.isAlias(e))return t.Alias?.(s,e,n)}function si(s,e,t){let n=e[e.length-1];if(I.isCollection(n))n.items[s]=t;else if(I.isPair(n))s==="key"?n.key=t:n.value=t;else if(I.isDocument(n))n.contents=t;else{let i=I.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}rs.visit=it;rs.visitAsync=rt});var os=g(ii=>{"use strict";var ni=q(),La=ve(),Ea={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ta=s=>s.replace(/[!,[\]{}]/g,e=>Ea[e]),ke=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Ta(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&ni.isNode(e.contents)){let r={};La.visit(e.contents,(o,a)=>{ni.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
3
|
+
`)}};ke.defaultYaml={explicit:!1,version:"1.2"};ke.defaultTags={"!!":"tag:yaml.org,2002:"};ii.Directives=ke});var ot=g(Ne=>{"use strict";var ri=q(),Ca=ve();function Ia(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function oi(s){let e=new Set;return Ca.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function ai(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function Pa(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=oi(s));let o=ai(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(ri.isScalar(o.node)||ri.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}Ne.anchorIsValid=Ia;Ne.anchorNames=oi;Ne.createNodeAnchors=Pa;Ne.findNewAnchor=ai});var as=g(li=>{"use strict";function Ae(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=Ae(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Ae(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Ae(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Ae(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}li.applyReviver=Ae});var Y=g(ui=>{"use strict";var Ma=q();function ci(s,e,t){if(Array.isArray(s))return s.map((n,i)=>ci(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Ma.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}ui.toJS=ci});var at=g(hi=>{"use strict";var Ba=as(),fi=q(),_a=Y(),ls=class{constructor(e){Object.defineProperty(this,fi.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!fi.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=_a.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?Ba.applyReviver(r,{"":a},"",a):a}};hi.NodeBase=ls});var qe=g(di=>{"use strict";var $a=ot(),Da=ve(),ce=q(),xa=at(),ja=Y(),cs=class extends xa.NodeBase{constructor(e){super(ce.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Da.visit(e,{Node:(r,o)=>{(ce.isAlias(o)||ce.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(ja.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=lt(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if($a.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function lt(s,e,t){if(ce.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(ce.isCollection(e)){let n=0;for(let i of e.items){let r=lt(s,i,t);r>n&&(n=r)}return n}else if(ce.isPair(e)){let n=lt(s,e.key,t),i=lt(s,e.value,t);return Math.max(n,i)}return 1}di.Alias=cs});var E=g(us=>{"use strict";var Ka=q(),Fa=at(),Ra=Y(),Ua=s=>!s||typeof s!="function"&&typeof s!="object",J=class extends Fa.NodeBase{constructor(e){super(Ka.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:Ra.toJS(this.value,e,t)}toString(){return String(this.value)}};J.BLOCK_FOLDED="BLOCK_FOLDED";J.BLOCK_LITERAL="BLOCK_LITERAL";J.PLAIN="PLAIN";J.QUOTE_DOUBLE="QUOTE_DOUBLE";J.QUOTE_SINGLE="QUOTE_SINGLE";us.Scalar=J;us.isScalarValue=Ua});var Oe=g(mi=>{"use strict";var Ya=qe(),ee=q(),pi=E(),Ja="tag:yaml.org,2002:";function Va(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function Wa(s,e,t){if(ee.isDocument(s)&&(s=s.contents),ee.isNode(s))return s;if(ee.isPair(s)){let u=t.schema[ee.MAP].createNode?.(t.schema,null,t);return u.items.push(s),u}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new Ya.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=Ja+e.slice(2));let c=Va(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let u=new pi.Scalar(s);return l&&(l.node=u),u}c=s instanceof Map?o[ee.MAP]:Symbol.iterator in Object(s)?o[ee.SEQ]:o[ee.MAP]}r&&(r(c),delete t.onTagObj);let d=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new pi.Scalar(s);return e?d.tag=e:c.default||(d.tag=c.tag),l&&(l.node=d),d}mi.createNode=Wa});var ut=g(ct=>{"use strict";var Ga=Oe(),K=q(),Qa=at();function fs(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Ga.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var gi=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,hs=class extends Qa.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>K.isNode(n)||K.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(gi(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(K.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,fs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(K.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&K.isScalar(r)?r.value:r:K.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!K.isPair(t))return!1;let n=t.value;return n==null||e&&K.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return K.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(K.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,fs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};ct.Collection=hs;ct.collectionFromPath=fs;ct.isEmptyPath=gi});var Le=g(ft=>{"use strict";var Ha=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function ds(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var Xa=(s,e,t)=>s.endsWith(`
|
|
4
|
+
`)?ds(t,e):t.includes(`
|
|
5
|
+
`)?`
|
|
6
|
+
`+ds(t,e):(s.endsWith(" ")?"":" ")+t;ft.indentComment=ds;ft.lineComment=Xa;ft.stringifyComment=Ha});var bi=g(Ee=>{"use strict";var za="flow",ps="block",ht="quoted";function Za(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return s;i<r&&(r=0);let l=Math.max(1+r,1+i-e.length);if(s.length<=l)return s;let c=[],d={},u=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):u=i-n);let f,m,y=!1,h=-1,p=-1,S=-1;t===ps&&(h=yi(s,h,e.length),h!==-1&&(u=h+l));for(let v;v=s[h+=1];){if(t===ht&&v==="\\"){switch(p=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}S=h}if(v===`
|
|
7
|
+
`)t===ps&&(h=yi(s,h,e.length)),u=h+e.length+l,f=void 0;else{if(v===" "&&m&&m!==" "&&m!==`
|
|
8
|
+
`&&m!==" "){let k=s[h+1];k&&k!==" "&&k!==`
|
|
9
|
+
`&&k!==" "&&(f=h)}if(h>=u)if(f)c.push(f),u=f+l,f=void 0;else if(t===ht){for(;m===" "||m===" ";)m=v,v=s[h+=1],y=!0;let k=h>S+1?h-2:p-1;if(d[k])return s;c.push(k),d[k]=!0,u=k+l,f=void 0}else y=!0}m=v}if(y&&a&&a(),c.length===0)return s;o&&o();let w=s.slice(0,c[0]);for(let v=0;v<c.length;++v){let k=c[v],N=c[v+1]||s.length;k===0?w=`
|
|
10
|
+
${e}${s.slice(0,N)}`:(t===ht&&d[k]&&(w+=`${s[k]}\\`),w+=`
|
|
11
|
+
${e}${s.slice(k+1,N)}`)}return w}function yi(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
|
|
12
|
+
`);n=e,i=e+1,r=s[i]}return n}Ee.FOLD_BLOCK=ps;Ee.FOLD_FLOW=za;Ee.FOLD_QUOTED=ht;Ee.foldFlowLines=Za});var Ce=g(Si=>{"use strict";var D=E(),V=bi(),pt=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),mt=s=>/^(%|---|\.\.\.)/m.test(s);function el(s,e,t){if(!e||e<0)return!1;let n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
|
|
13
|
+
`){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}function Te(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(mt(s)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let d=t.substr(l+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:d.substr(0,2)==="00"?o+="\\x"+d.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||t[l+2]==='"'||t.length<i)l+=1;else{for(o+=t.slice(a,l)+`
|
|
14
|
+
|
|
15
|
+
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
|
16
|
+
`,l+=2;o+=r,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,n?o:V.foldFlowLines(o,r,V.FOLD_QUOTED,pt(e,!1))}function ms(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
|
|
17
|
+
`)||/[ \t]\n|\n[ \t]/.test(s))return Te(s,e);let t=e.indent||(mt(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
18
|
+
${t}`)+"'";return e.implicitKey?n:V.foldFlowLines(n,t,V.FOLD_FLOW,pt(e,!1))}function ue(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=Te;else{let i=s.includes('"'),r=s.includes("'");i&&!r?n=ms:r&&!i?n=Te:n=t?ms:Te}return n(s,e)}var gs;try{gs=new RegExp(`(^|(?<!
|
|
19
|
+
))
|
|
20
|
+
+(?!
|
|
21
|
+
|$)`,"g")}catch{gs=/\n+(?!\n|$)/g}function dt({comment:s,type:e,value:t},n,i,r){let{blockQuote:o,commentString:a,lineWidth:l}=n.options;if(!o||/\n[\t ]+$/.test(t))return ue(t,n);let c=n.indent||(n.forceBlockIndent||mt(t)?" ":""),d=o==="literal"?!0:o==="folded"||e===D.Scalar.BLOCK_FOLDED?!1:e===D.Scalar.BLOCK_LITERAL?!0:!el(t,l,c.length);if(!t)return d?`|
|
|
22
|
+
`:`>
|
|
23
|
+
`;let u,f;for(f=t.length;f>0;--f){let N=t[f-1];if(N!==`
|
|
24
|
+
`&&N!==" "&&N!==" ")break}let m=t.substring(f),y=m.indexOf(`
|
|
25
|
+
`);y===-1?u="-":t===m||y!==m.length-1?(u="+",r&&r()):u="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
|
|
26
|
+
`&&(m=m.slice(0,-1)),m=m.replace(gs,`$&${c}`));let h=!1,p,S=-1;for(p=0;p<t.length;++p){let N=t[p];if(N===" ")h=!0;else if(N===`
|
|
27
|
+
`)S=p;else break}let w=t.substring(0,S<p?S+1:p);w&&(t=t.substring(w.length),w=w.replace(/\n+/g,`$&${c}`));let k=(h?c?"2":"1":"")+u;if(s&&(k+=" "+a(s.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){let N=t.replace(/\n+/g,`
|
|
28
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,L=pt(n,!0);o!=="folded"&&e!==D.Scalar.BLOCK_FOLDED&&(L.onOverflow=()=>{A=!0});let b=V.foldFlowLines(`${w}${N}${m}`,c,V.FOLD_BLOCK,L);if(!A)return`>${k}
|
|
29
|
+
${c}${b}`}return t=t.replace(/\n+/g,`$&${c}`),`|${k}
|
|
30
|
+
${c}${w}${t}${m}`}function tl(s,e,t,n){let{type:i,value:r}=s,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:d}=e;if(a&&r.includes(`
|
|
31
|
+
`)||d&&/[[\]{},]/.test(r))return ue(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||d||!r.includes(`
|
|
32
|
+
`)?ue(r,e):dt(s,e,t,n);if(!a&&!d&&i!==D.Scalar.PLAIN&&r.includes(`
|
|
33
|
+
`))return dt(s,e,t,n);if(mt(r)){if(l==="")return e.forceBlockIndent=!0,dt(s,e,t,n);if(a&&l===c)return ue(r,e)}let u=r.replace(/\n+/g,`$&
|
|
34
|
+
${l}`);if(o){let f=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(u),{compat:m,tags:y}=e.doc.schema;if(y.some(f)||m?.some(f))return ue(r,e)}return a?u:V.foldFlowLines(u,l,V.FOLD_FLOW,pt(e,!1))}function sl(s,e,t,n){let{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:a}=s;a!==D.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=D.Scalar.QUOTE_DOUBLE);let l=d=>{switch(d){case D.Scalar.BLOCK_FOLDED:case D.Scalar.BLOCK_LITERAL:return i||r?ue(o.value,e):dt(o,e,t,n);case D.Scalar.QUOTE_DOUBLE:return Te(o.value,e);case D.Scalar.QUOTE_SINGLE:return ms(o.value,e);case D.Scalar.PLAIN:return tl(o,e,t,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:u}=e.options,f=i&&d||u;if(c=l(f),c===null)throw new Error(`Unsupported default string type ${f}`)}return c}Si.stringifyString=sl});var Ie=g(ys=>{"use strict";var nl=ot(),W=q(),il=Le(),rl=Ce();function ol(s,e){let t=Object.assign({blockQuote:!0,commentString:il.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},s.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function al(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(W.isScalar(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){let r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function ll(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(W.isScalar(s)||W.isCollection(s))&&s.anchor;r&&nl.anchorIsValid(r)&&(t.add(r),i.push(`&${r}`));let o=s.tag??(e.default?null:e.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}function cl(s,e,t,n){if(W.isPair(s))return s.toString(e,t,n);if(W.isAlias(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i,r=W.isNode(s)?s:e.doc.createNode(s,{onTagObj:l=>i=l});i??(i=al(e.doc.schema.tags,r));let o=ll(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof i.stringify=="function"?i.stringify(r,e,t,n):W.isScalar(r)?rl.stringifyString(r,e,t,n):r.toString(e,t,n);return o?W.isScalar(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
35
|
+
${e.indent}${a}`:a}ys.createStringifyContext=ol;ys.stringify=cl});var Ni=g(ki=>{"use strict";var R=q(),wi=E(),vi=Ie(),Pe=Le();function ul({key:s,value:e},t,n,i){let{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=t,f=R.isNode(s)&&s.comment||null;if(u){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(R.isCollection(s)||!R.isNode(s)&&typeof s=="object"){let L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let m=!u&&(!s||f&&e==null&&!t.inFlow||R.isCollection(s)||(R.isScalar(s)?s.type===wi.Scalar.BLOCK_FOLDED||s.type===wi.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(u||!r),indent:a+l});let y=!1,h=!1,p=vi.stringify(s,t,()=>y=!0,()=>h=!0);if(!m&&!t.inFlow&&p.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(r||e==null)return y&&n&&n(),p===""?"?":m?`? ${p}`:p}else if(r&&!u||e==null&&m)return p=`? ${p}`,f&&!y?p+=Pe.lineComment(p,t.indent,c(f)):h&&i&&i(),p;y&&(f=null),m?(f&&(p+=Pe.lineComment(p,t.indent,c(f))),p=`? ${p}
|
|
36
|
+
${a}:`):(p=`${p}:`,f&&(p+=Pe.lineComment(p,t.indent,c(f))));let S,w,v;R.isNode(e)?(S=!!e.spaceBefore,w=e.commentBefore,v=e.comment):(S=!1,w=null,v=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!m&&!f&&R.isScalar(e)&&(t.indentAtStart=p.length+1),h=!1,!d&&l.length>=2&&!t.inFlow&&!m&&R.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,N=vi.stringify(e,t,()=>k=!0,()=>h=!0),A=" ";if(f||S||w){if(A=S?`
|
|
37
|
+
`:"",w){let L=c(w);A+=`
|
|
38
|
+
${Pe.indentComment(L,t.indent)}`}N===""&&!t.inFlow?A===`
|
|
39
|
+
`&&v&&(A=`
|
|
40
|
+
|
|
41
|
+
`):A+=`
|
|
42
|
+
${t.indent}`}else if(!m&&R.isCollection(e)){let L=N[0],b=N.indexOf(`
|
|
43
|
+
`),T=b!==-1,U=t.inFlow??e.flow??e.items.length===0;if(T||!U){let oe=!1;if(T&&(L==="&"||L==="!")){let C=N.indexOf(" ");L==="&"&&C!==-1&&C<b&&N[C+1]==="!"&&(C=N.indexOf(" ",C+1)),(C===-1||b<C)&&(oe=!0)}oe||(A=`
|
|
44
|
+
${t.indent}`)}}else(N===""||N[0]===`
|
|
45
|
+
`)&&(A="");return p+=A+N,t.inFlow?k&&n&&n():v&&!k?p+=Pe.lineComment(p,t.indent,c(v)):h&&i&&i(),p}ki.stringifyPair=ul});var Ss=g(bs=>{"use strict";var Ai=ze("process");function fl(s,...e){s==="debug"&&console.log(...e)}function hl(s,e){(s==="debug"||s==="warn")&&(typeof Ai.emitWarning=="function"?Ai.emitWarning(e):console.warn(e))}bs.debug=fl;bs.warn=hl});var St=g(bt=>{"use strict";var Me=q(),qi=E(),gt="<<",yt={identify:s=>s===gt||typeof s=="symbol"&&s.description===gt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new qi.Scalar(Symbol(gt)),{addToJSMap:Oi}),stringify:()=>gt},dl=(s,e)=>(yt.identify(e)||Me.isScalar(e)&&(!e.type||e.type===qi.Scalar.PLAIN)&&yt.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===yt.tag&&t.default);function Oi(s,e,t){if(t=s&&Me.isAlias(t)?t.resolve(s.doc):t,Me.isSeq(t))for(let n of t.items)ws(s,e,n);else if(Array.isArray(t))for(let n of t)ws(s,e,n);else ws(s,e,t)}function ws(s,e,t){let n=s&&Me.isAlias(t)?t.resolve(s.doc):t;if(!Me.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}bt.addMergeToJSMap=Oi;bt.isMergeKey=dl;bt.merge=yt});var ks=g(Ti=>{"use strict";var pl=Ss(),Li=St(),ml=Ie(),Ei=q(),vs=Y();function gl(s,e,{key:t,value:n}){if(Ei.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(Li.isMergeKey(s,t))Li.addMergeToJSMap(s,e,n);else{let i=vs.toJS(t,"",s);if(e instanceof Map)e.set(i,vs.toJS(n,i,s));else if(e instanceof Set)e.add(i);else{let r=yl(t,i,s),o=vs.toJS(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function yl(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Ei.isNode(s)&&t?.doc){let n=ml.createStringifyContext(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),pl.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}Ti.addPairToJSMap=gl});var G=g(Ns=>{"use strict";var Ci=Oe(),bl=Ni(),Sl=ks(),wt=q();function wl(s,e,t){let n=Ci.createNode(s,void 0,t),i=Ci.createNode(e,void 0,t);return new vt(n,i)}var vt=class s{constructor(e,t=null){Object.defineProperty(this,wt.NODE_TYPE,{value:wt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return wt.isNode(t)&&(t=t.clone(e)),wt.isNode(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return Sl.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?bl.stringifyPair(this,e,t,n):JSON.stringify(this)}};Ns.Pair=vt;Ns.createPair=wl});var As=g(Pi=>{"use strict";var te=q(),Ii=Ie(),kt=Le();function vl(s,e,t){return(e.inFlow??s.flow?Nl:kl)(s,e,t)}function kl({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,d=Object.assign({},t,{indent:r,type:null}),u=!1,f=[];for(let y=0;y<e.length;++y){let h=e[y],p=null;if(te.isNode(h))!u&&h.spaceBefore&&f.push(""),Nt(t,f,h.commentBefore,u),h.comment&&(p=h.comment);else if(te.isPair(h)){let w=te.isNode(h.key)?h.key:null;w&&(!u&&w.spaceBefore&&f.push(""),Nt(t,f,w.commentBefore,u))}u=!1;let S=Ii.stringify(h,d,()=>p=null,()=>u=!0);p&&(S+=kt.lineComment(S,r,c(p))),u&&p&&(u=!1),f.push(n+S)}let m;if(f.length===0)m=i.start+i.end;else{m=f[0];for(let y=1;y<f.length;++y){let h=f[y];m+=h?`
|
|
46
|
+
${l}${h}`:`
|
|
47
|
+
`}}return s?(m+=`
|
|
48
|
+
`+kt.indentComment(c(s),l),a&&a()):u&&o&&o(),m}function Nl({items:s},e,{flowChars:t,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;n+=r;let l=Object.assign({},e,{indent:n,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let y=0;y<s.length;++y){let h=s[y],p=null;if(te.isNode(h))h.spaceBefore&&u.push(""),Nt(e,u,h.commentBefore,!1),h.comment&&(p=h.comment);else if(te.isPair(h)){let w=te.isNode(h.key)?h.key:null;w&&(w.spaceBefore&&u.push(""),Nt(e,u,w.commentBefore,!1),w.comment&&(c=!0));let v=te.isNode(h.value)?h.value:null;v?(v.comment&&(p=v.comment),v.commentBefore&&(c=!0)):h.value==null&&w?.comment&&(p=w.comment)}p&&(c=!0);let S=Ii.stringify(h,l,()=>p=null);y<s.length-1&&(S+=","),p&&(S+=kt.lineComment(S,n,a(p))),!c&&(u.length>d||S.includes(`
|
|
49
|
+
`))&&(c=!0),u.push(S),d=u.length}let{start:f,end:m}=t;if(u.length===0)return f+m;if(!c){let y=u.reduce((h,p)=>h+p.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=f;for(let h of u)y+=h?`
|
|
50
|
+
${r}${i}${h}`:`
|
|
51
|
+
`;return`${y}
|
|
52
|
+
${i}${m}`}else return`${f}${o}${u.join(" ")}${o}${m}`}function Nt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=kt.indentComment(e(n),s);t.push(r.trimStart())}}Pi.stringifyCollection=vl});var H=g(Os=>{"use strict";var Al=As(),ql=ks(),Ol=ut(),Q=q(),At=G(),Ll=E();function Be(s,e){let t=Q.isScalar(e)?e.value:e;for(let n of s)if(Q.isPair(n)&&(n.key===e||n.key===t||Q.isScalar(n.key)&&n.key.value===t))return n}var qs=class extends Ol.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Q.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(t,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||i)&&o.items.push(At.createPair(l,c,n))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;Q.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new At.Pair(e,e?.value):n=new At.Pair(e.key,e.value);let i=Be(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);Q.isScalar(i.value)&&Ll.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(a=>r(n,a)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=Be(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=Be(this.items,e)?.value;return(!t&&Q.isScalar(i)?i.value:i)??void 0}has(e){return!!Be(this.items,e)}set(e,t){this.add(new At.Pair(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)ql.addPairToJSMap(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!Q.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Al.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};Os.YAMLMap=qs;Os.findPair=Be});var fe=g(Bi=>{"use strict";var El=q(),Mi=H(),Tl={collection:"map",default:!0,nodeClass:Mi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return El.isMap(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>Mi.YAMLMap.from(s,e,t)};Bi.map=Tl});var X=g(_i=>{"use strict";var Cl=Oe(),Il=As(),Pl=ut(),Ot=q(),Ml=E(),Bl=Y(),Ls=class extends Pl.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ot.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=qt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=qt(e);if(typeof n!="number")return;let i=this.items[n];return!t&&Ot.isScalar(i)?i.value:i}has(e){let t=qt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=qt(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];Ot.isScalar(i)&&Ml.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(Bl.toJS(r,String(i++),t));return n}toString(e,t,n){return e?Il.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){let l=t instanceof Set?a:String(o++);a=i.call(t,l,a)}r.items.push(Cl.createNode(a,void 0,n))}}return r}};function qt(s){let e=Ot.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}_i.YAMLSeq=Ls});var he=g(Di=>{"use strict";var _l=q(),$i=X(),$l={collection:"seq",default:!0,nodeClass:$i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return _l.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>$i.YAMLSeq.from(s,e,t)};Di.seq=$l});var _e=g(xi=>{"use strict";var Dl=Ce(),xl={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),Dl.stringifyString(s,e,t,n)}};xi.string=xl});var Lt=g(Fi=>{"use strict";var ji=E(),Ki={identify:s=>s==null,createNode:()=>new ji.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ji.Scalar(null),stringify:({source:s},e)=>typeof s=="string"&&Ki.test.test(s)?s:e.options.nullStr};Fi.nullTag=Ki});var Es=g(Ui=>{"use strict";var jl=E(),Ri={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new jl.Scalar(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&Ri.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};Ui.boolTag=Ri});var de=g(Yi=>{"use strict";function Kl({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}Yi.stringifyNumber=Kl});var Cs=g(Et=>{"use strict";var Fl=E(),Ts=de(),Rl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ts.stringifyNumber},Ul={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Ts.stringifyNumber(s)}},Yl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new Fl.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:Ts.stringifyNumber};Et.float=Yl;Et.floatExp=Ul;Et.floatNaN=Rl});var Ps=g(Ct=>{"use strict";var Ji=de(),Tt=s=>typeof s=="bigint"||Number.isInteger(s),Is=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function Vi(s,e,t){let{value:n}=s;return Tt(n)&&n>=0?t+n.toString(e):Ji.stringifyNumber(s)}var Jl={identify:s=>Tt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Is(s,2,8,t),stringify:s=>Vi(s,8,"0o")},Vl={identify:Tt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Is(s,0,10,t),stringify:Ji.stringifyNumber},Wl={identify:s=>Tt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Is(s,2,16,t),stringify:s=>Vi(s,16,"0x")};Ct.int=Vl;Ct.intHex=Wl;Ct.intOct=Jl});var Gi=g(Wi=>{"use strict";var Gl=fe(),Ql=Lt(),Hl=he(),Xl=_e(),zl=Es(),Ms=Cs(),Bs=Ps(),Zl=[Gl.map,Hl.seq,Xl.string,Ql.nullTag,zl.boolTag,Bs.intOct,Bs.int,Bs.intHex,Ms.floatNaN,Ms.floatExp,Ms.float];Wi.schema=Zl});var Xi=g(Hi=>{"use strict";var ec=E(),tc=fe(),sc=he();function Qi(s){return typeof s=="bigint"||Number.isInteger(s)}var It=({value:s})=>JSON.stringify(s),nc=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:It},{identify:s=>s==null,createNode:()=>new ec.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:It},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:It},{identify:Qi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>Qi(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:It}],ic={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},rc=[tc.map,sc.seq].concat(nc,ic);Hi.schema=rc});var $s=g(zi=>{"use strict";var $e=ze("buffer"),_s=E(),oc=Ce(),ac={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof $e.Buffer=="function")return $e.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";let o=t,a;if(typeof $e.Buffer=="function")a=o instanceof $e.Buffer?o.toString("base64"):$e.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=_s.Scalar.BLOCK_LITERAL),e!==_s.Scalar.QUOTE_DOUBLE){let l=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/l),d=new Array(c);for(let u=0,f=0;u<c;++u,f+=l)d[u]=a.substr(f,l);a=d.join(e===_s.Scalar.BLOCK_LITERAL?`
|
|
53
|
+
`:" ")}return oc.stringifyString({comment:s,type:e,value:a},n,i,r)}};zi.binary=ac});var Bt=g(Mt=>{"use strict";var Pt=q(),Ds=G(),lc=E(),cc=X();function Zi(s,e){if(Pt.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!Pt.isPair(n)){if(Pt.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new Ds.Pair(new lc.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
|
|
54
|
+
${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
|
|
55
|
+
${r.comment}`:n.comment}n=i}s.items[t]=Pt.isPair(n)?n:new Ds.Pair(n)}}else e("Expected a sequence for this tag");return s}function er(s,e,t){let{replacer:n}=t,i=new cc.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(Ds.createPair(a,l,t))}return i}var uc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zi,createNode:er};Mt.createPairs=er;Mt.pairs=uc;Mt.resolvePairs=Zi});var Ks=g(js=>{"use strict";var tr=q(),xs=Y(),De=H(),fc=X(),sr=Bt(),se=class s extends fc.YAMLSeq{constructor(){super(),this.add=De.YAMLMap.prototype.add.bind(this),this.delete=De.YAMLMap.prototype.delete.bind(this),this.get=De.YAMLMap.prototype.get.bind(this),this.has=De.YAMLMap.prototype.has.bind(this),this.set=De.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(tr.isPair(i)?(r=xs.toJS(i.key,"",t),o=xs.toJS(i.value,r,t)):r=xs.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=sr.createPairs(e,t,n),r=new this;return r.items=i.items,r}};se.tag="tag:yaml.org,2002:omap";var hc={collection:"seq",identify:s=>s instanceof Map,nodeClass:se,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=sr.resolvePairs(s,e),n=[];for(let{key:i}of t.items)tr.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new se,t)},createNode:(s,e,t)=>se.from(s,e,t)};js.YAMLOMap=se;js.omap=hc});var ar=g(Fs=>{"use strict";var nr=E();function ir({value:s,source:e},t){return e&&(s?rr:or).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var rr={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new nr.Scalar(!0),stringify:ir},or={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new nr.Scalar(!1),stringify:ir};Fs.falseTag=or;Fs.trueTag=rr});var lr=g(_t=>{"use strict";var dc=E(),Rs=de(),pc={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Rs.stringifyNumber},mc={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Rs.stringifyNumber(s)}},gc={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new dc.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Rs.stringifyNumber};_t.float=gc;_t.floatExp=mc;_t.floatNaN=pc});var ur=g(je=>{"use strict";var cr=de(),xe=s=>typeof s=="bigint"||Number.isInteger(s);function $t(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}function Us(s,e,t){let{value:n}=s;if(xe(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return cr.stringifyNumber(s)}var yc={identify:xe,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>$t(s,2,2,t),stringify:s=>Us(s,2,"0b")},bc={identify:xe,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>$t(s,1,8,t),stringify:s=>Us(s,8,"0")},Sc={identify:xe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>$t(s,0,10,t),stringify:cr.stringifyNumber},wc={identify:xe,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>$t(s,2,16,t),stringify:s=>Us(s,16,"0x")};je.int=Sc;je.intBin=yc;je.intHex=wc;je.intOct=bc});var Js=g(Ys=>{"use strict";var jt=q(),Dt=G(),xt=H(),ne=class s extends xt.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(e){let t;jt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Dt.Pair(e.key,null):t=new Dt.Pair(e,null),xt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=xt.findPair(this.items,e);return!t&&jt.isPair(n)?jt.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=xt.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Dt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Dt.createPair(o,null,n));return r}};ne.tag="tag:yaml.org,2002:set";var vc={collection:"map",identify:s=>s instanceof Set,nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ne.from(s,e,t),resolve(s,e){if(jt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ne,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Ys.YAMLSet=ne;Ys.set=vc});var Ws=g(Kt=>{"use strict";var kc=de();function Vs(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function fr(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return kc.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Nc={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Vs(s,t),stringify:fr},Ac={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Vs(s,!1),stringify:fr},hr={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){let e=s.match(hr.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,r||0,o||0,a||0,l),d=e[8];if(d&&d!=="Z"){let u=Vs(d,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Kt.floatTime=Ac;Kt.intTime=Nc;Kt.timestamp=hr});var mr=g(pr=>{"use strict";var qc=fe(),Oc=Lt(),Lc=he(),Ec=_e(),Tc=$s(),dr=ar(),Gs=lr(),Ft=ur(),Cc=St(),Ic=Ks(),Pc=Bt(),Mc=Js(),Qs=Ws(),Bc=[qc.map,Lc.seq,Ec.string,Oc.nullTag,dr.trueTag,dr.falseTag,Ft.intBin,Ft.intOct,Ft.int,Ft.intHex,Gs.floatNaN,Gs.floatExp,Gs.float,Tc.binary,Cc.merge,Ic.omap,Pc.pairs,Mc.set,Qs.intTime,Qs.floatTime,Qs.timestamp];pr.schema=Bc});var qr=g(zs=>{"use strict";var Sr=fe(),_c=Lt(),wr=he(),$c=_e(),Dc=Es(),Hs=Cs(),Xs=Ps(),xc=Gi(),jc=Xi(),vr=$s(),Ke=St(),kr=Ks(),Nr=Bt(),gr=mr(),Ar=Js(),Rt=Ws(),yr=new Map([["core",xc.schema],["failsafe",[Sr.map,wr.seq,$c.string]],["json",jc.schema],["yaml11",gr.schema],["yaml-1.1",gr.schema]]),br={binary:vr.binary,bool:Dc.boolTag,float:Hs.float,floatExp:Hs.floatExp,floatNaN:Hs.floatNaN,floatTime:Rt.floatTime,int:Xs.int,intHex:Xs.intHex,intOct:Xs.intOct,intTime:Rt.intTime,map:Sr.map,merge:Ke.merge,null:_c.nullTag,omap:kr.omap,pairs:Nr.pairs,seq:wr.seq,set:Ar.set,timestamp:Rt.timestamp},Kc={"tag:yaml.org,2002:binary":vr.binary,"tag:yaml.org,2002:merge":Ke.merge,"tag:yaml.org,2002:omap":kr.omap,"tag:yaml.org,2002:pairs":Nr.pairs,"tag:yaml.org,2002:set":Ar.set,"tag:yaml.org,2002:timestamp":Rt.timestamp};function Fc(s,e,t){let n=yr.get(e);if(n&&!s)return t&&!n.includes(Ke.merge)?n.concat(Ke.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(yr.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(Ke.merge)),i.reduce((r,o)=>{let a=typeof o=="string"?br[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(br).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(a)||r.push(a),r},[])}zs.coreKnownTags=Kc;zs.getTags=Fc});var tn=g(Or=>{"use strict";var Zs=q(),Rc=fe(),Uc=he(),Yc=_e(),Ut=qr(),Jc=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,en=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Ut.getTags(e,"compat"):e?Ut.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Ut.coreKnownTags:{},this.tags=Ut.getTags(t,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,Zs.MAP,{value:Rc.map}),Object.defineProperty(this,Zs.SCALAR,{value:Yc.string}),Object.defineProperty(this,Zs.SEQ,{value:Uc.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Jc:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Or.Schema=en});var Er=g(Lr=>{"use strict";var Vc=q(),sn=Ie(),Fe=Le();function Wc(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=sn.createStringifyContext(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let l=r(s.commentBefore);t.unshift(Fe.indentComment(l,""))}let o=!1,a=null;if(s.contents){if(Vc.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let d=r(s.contents.commentBefore);t.push(Fe.indentComment(d,""))}i.forceBlockIndent=!!s.comment,a=s.contents.comment}let l=a?void 0:()=>o=!0,c=sn.stringify(s.contents,i,()=>a=null,l);a&&(c+=Fe.lineComment(c,"",r(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(sn.stringify(s.contents,i));if(s.directives?.docEnd)if(s.comment){let l=r(s.comment);l.includes(`
|
|
56
|
+
`)?(t.push("..."),t.push(Fe.indentComment(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=s.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Fe.indentComment(r(l),"")))}return t.join(`
|
|
57
|
+
`)+`
|
|
58
|
+
`}Lr.stringifyDocument=Wc});var Re=g(Tr=>{"use strict";var Gc=qe(),pe=ut(),_=q(),Qc=G(),Hc=Y(),Xc=tn(),zc=Er(),nn=ot(),Zc=as(),eu=Oe(),rn=os(),on=class s{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_.NODE_TYPE,{value:_.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new rn.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[_.NODE_TYPE]:{value:_.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=_.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){me(this.contents)&&this.contents.add(e)}addIn(e,t){me(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=nn.anchorNames(this);e.anchor=!t||n.has(t)?nn.findNewAnchor(t||"a",n):t}return new Gc.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let p=w=>typeof w=="number"||w instanceof String||w instanceof Number,S=t.filter(p).map(String);S.length>0&&(t=t.concat(S)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:d}=n??{},{onAnchor:u,setAnchors:f,sourceObjects:m}=nn.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:u,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:m},h=eu.createNode(e,d,y);return a&&_.isCollection(h)&&(h.flow=!0),f(),h}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new Qc.Pair(i,r)}delete(e){return me(this.contents)?this.contents.delete(e):!1}deleteIn(e){return pe.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):me(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return _.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return pe.isEmptyPath(e)?!t&&_.isScalar(this.contents)?this.contents.value:this.contents:_.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return _.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return pe.isEmptyPath(e)?this.contents!==void 0:_.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=pe.collectionFromPath(this.schema,[e],t):me(this.contents)&&this.contents.set(e,t)}setIn(e,t){pe.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=pe.collectionFromPath(this.schema,Array.from(e),t):me(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new rn.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new rn.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Xc.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=Hc.toJS(this.contents,t??"",a);if(typeof r=="function")for(let{count:c,res:d}of a.anchors.values())r(d,c);return typeof o=="function"?Zc.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return zc.stringifyDocument(this,e)}};function me(s){if(_.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}Tr.Document=on});var Je=g(Ye=>{"use strict";var Ue=class extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},an=class extends Ue{constructor(e,t,n){super("YAMLParseError",e,t,n)}},ln=class extends Ue{constructor(e,t,n){super("YAMLWarning",e,t,n)}},tu=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let a=Math.min(r-39,o.length-79);o="\u2026"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let a=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
59
|
+
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l?.line===n&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-r)));let c=" ".repeat(r)+"^".repeat(a);t.message+=`:
|
|
60
|
+
|
|
61
|
+
${o}
|
|
62
|
+
${c}
|
|
63
|
+
`}};Ye.YAMLError=Ue;Ye.YAMLParseError=an;Ye.YAMLWarning=ln;Ye.prettifyError=tu});var Ve=g(Cr=>{"use strict";function su(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let l=!1,c=a,d=a,u="",f="",m=!1,y=!1,h=null,p=null,S=null,w=null,v=null,k=null,N=null;for(let b of s)switch(y&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&r(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),h&&(c&&b.type!=="comment"&&b.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),b.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&b.source.includes(" ")&&(h=b),d=!0;break;case"comment":{d||r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let T=b.source.substring(1)||" ";u?u+=f+T:u=T,f="",c=!1;break}case"newline":c?u?u+=b.source:(!k||t!=="seq-item-ind")&&(l=!0):f+=b.source,c=!0,m=!0,(p||S)&&(w=b),d=!0;break;case"anchor":p&&r(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&r(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=b,N??(N=b.offset),c=!1,d=!1,y=!0;break;case"tag":{S&&r(b,"MULTIPLE_TAGS","A node can have at most one tag"),S=b,N??(N=b.offset),c=!1,d=!1,y=!0;break}case t:(p||S)&&r(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),k&&r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),k=b,c=t==="seq-item-ind"||t==="explicit-key-ind",d=!1;break;case"comma":if(e){v&&r(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),v=b,c=!1,d=!1;break}default:r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=!1,d=!1}let A=s[s.length-1],L=A?A.offset+A.source.length:i;return y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:k,spaceBefore:l,comment:u,hasNewline:m,anchor:p,tag:S,newlineAfterProp:w,end:L,start:N??L}}Cr.resolveProps=su});var Yt=g(Ir=>{"use strict";function cn(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
64
|
+
`))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(cn(e.key)||cn(e.value))return!0}return!1;default:return!0}}Ir.containsNewline=cn});var un=g(Pr=>{"use strict";var nu=Yt();function iu(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&nu.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Pr.flowIndentCheck=iu});var fn=g(Br=>{"use strict";var Mr=q();function ru(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,o)=>r===o||Mr.isScalar(r)&&Mr.isScalar(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}Br.mapIncludes=ru});var Kr=g(jr=>{"use strict";var _r=G(),ou=H(),$r=Ve(),au=Yt(),Dr=un(),lu=fn(),xr="All mapping items must start at the same column";function cu({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??ou.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=n.offset,c=null;for(let d of n.items){let{start:u,key:f,sep:m,value:y}=d,h=$r.resolveProps(u,{indicator:"explicit-key-ind",next:f??m?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),p=!h.found;if(p){if(f&&(f.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==n.indent&&i(l,"BAD_INDENT",xr)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(a.comment?a.comment+=`
|
|
65
|
+
`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||au.containsNewline(f))&&i(f??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(l,"BAD_INDENT",xr);t.atKey=!0;let S=h.end,w=f?s(t,f,h,i):e(t,S,u,null,h,i);t.schema.compat&&Dr.flowIndentCheck(n.indent,f,i),t.atKey=!1,lu.mapIncludes(t,a.items,w)&&i(S,"DUPLICATE_KEY","Map keys must be unique");let v=$r.resolveProps(m??[],{indicator:"map-value-ind",next:y,offset:w.range[2],onError:i,parentIndent:n.indent,startOnNewline:!f||f.type==="block-scalar"});if(l=v.end,v.found){p&&(y?.type==="block-map"&&!v.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<v.found.offset-1024&&i(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let k=y?s(t,y,v,i):e(t,l,m,null,v,i);t.schema.compat&&Dr.flowIndentCheck(n.indent,y,i),l=k.range[2];let N=new _r.Pair(w,k);t.options.keepSourceTokens&&(N.srcToken=d),a.items.push(N)}else{p&&i(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(w.comment?w.comment+=`
|
|
66
|
+
`+v.comment:w.comment=v.comment);let k=new _r.Pair(w);t.options.keepSourceTokens&&(k.srcToken=d),a.items.push(k)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,l,c??l],a}jr.resolveBlockMap=cu});var Rr=g(Fr=>{"use strict";var uu=X(),fu=Ve(),hu=un();function du({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??uu.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=n.offset,c=null;for(let{start:d,value:u}of n.items){let f=fu.resolveProps(d,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||u)u?.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{c=f.end,f.comment&&(a.comment=f.comment);continue}let m=u?s(t,u,f,i):e(t,f.end,d,null,f,i);t.schema.compat&&hu.flowIndentCheck(n.indent,u,i),l=m.range[2],a.items.push(m)}return a.range=[n.offset,l,c??l],a}Fr.resolveBlockSeq=du});var ge=g(Ur=>{"use strict";function pu(s,e,t,n){let i="";if(s){let r=!1,o="";for(let a of s){let{source:l,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=l),r=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}Ur.resolveEnd=pu});var Wr=g(Vr=>{"use strict";var mu=q(),gu=G(),Yr=H(),yu=X(),bu=ge(),Jr=Ve(),Su=Yt(),wu=fn(),hn="Block collections are not allowed within flow collections",dn=s=>s&&(s.type==="block-map"||s.type==="block-seq");function vu({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=n.start.source==="{",a=o?"flow map":"flow sequence",l=r?.nodeClass??(o?Yr.YAMLMap:yu.YAMLSeq),c=new l(t.schema);c.flow=!0;let d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=n.offset+n.start.source.length;for(let p=0;p<n.items.length;++p){let S=n.items[p],{start:w,key:v,sep:k,value:N}=S,A=Jr.resolveProps(w,{flow:a,indicator:"explicit-key-ind",next:v??k?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!k&&!N){p===0&&A.comma?i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):p<n.items.length-1&&i(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
|
|
67
|
+
`+A.comment:c.comment=A.comment),u=A.end;continue}!o&&t.options.strict&&Su.containsNewline(v)&&i(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)A.comma&&i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||i(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let L="";e:for(let b of w)switch(b.type){case"comma":case"space":break;case"comment":L=b.source.substring(1);break e;default:break e}if(L){let b=c.items[c.items.length-1];mu.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
|
|
68
|
+
`+L:b.comment=L,A.comment=A.comment.substring(L.length+1)}}if(!o&&!k&&!A.found){let L=N?s(t,N,A,i):e(t,A.end,k,null,A,i);c.items.push(L),u=L.range[2],dn(N)&&i(L.range,"BLOCK_IN_FLOW",hn)}else{t.atKey=!0;let L=A.end,b=v?s(t,v,A,i):e(t,L,w,null,A,i);dn(v)&&i(b.range,"BLOCK_IN_FLOW",hn),t.atKey=!1;let T=Jr.resolveProps(k??[],{flow:a,indicator:"map-value-ind",next:N,offset:b.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(T.found){if(!o&&!A.found&&t.options.strict){if(k)for(let C of k){if(C===T.found)break;if(C.type==="newline"){i(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<T.found.offset-1024&&i(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&N.source?.[0]===":"?i(N,"MISSING_CHAR",`Missing space after : in ${a}`):i(T.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let U=N?s(t,N,T,i):T.found?e(t,T.end,k,null,T,i):null;U?dn(N)&&i(U.range,"BLOCK_IN_FLOW",hn):T.comment&&(b.comment?b.comment+=`
|
|
69
|
+
`+T.comment:b.comment=T.comment);let oe=new gu.Pair(b,U);if(t.options.keepSourceTokens&&(oe.srcToken=S),o){let C=c;wu.mapIncludes(t,C.items,b)&&i(L,"DUPLICATE_KEY","Map keys must be unique"),C.items.push(oe)}else{let C=new Yr.YAMLMap(t.schema);C.flow=!0,C.items.push(oe);let jn=(U??b).range;C.range=[b.range[0],jn[1],jn[2]],c.items.push(C)}u=U?U.range[2]:T.end}}let f=o?"}":"]",[m,...y]=n.end,h=u;if(m?.source===f)h=m.offset+m.source.length;else{let p=a[0].toUpperCase()+a.substring(1),S=d?`${p} must end with a ${f}`:`${p} in block collection must be sufficiently indented and end with a ${f}`;i(u,d?"MISSING_CHAR":"BAD_INDENT",S),m&&m.source.length!==1&&y.unshift(m)}if(y.length>0){let p=bu.resolveEnd(y,h,t.options.strict,i);p.comment&&(c.comment?c.comment+=`
|
|
70
|
+
`+p.comment:c.comment=p.comment),c.range=[n.offset,h,p.offset]}else c.range=[n.offset,h,h];return c}Vr.resolveFlowCollection=vu});var Qr=g(Gr=>{"use strict";var ku=q(),Nu=E(),Au=H(),qu=X(),Ou=Kr(),Lu=Rr(),Eu=Wr();function pn(s,e,t,n,i,r){let o=t.type==="block-map"?Ou.resolveBlockMap(s,e,t,n,r):t.type==="block-seq"?Lu.resolveBlockSeq(s,e,t,n,r):Eu.resolveFlowCollection(s,e,t,n,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Tu(s,e,t,n,i){let r=n.tag,o=r?e.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f)):null;if(t.type==="block-seq"){let{anchor:f,newlineAfterProp:m}=n,y=f&&r?f.offset>r.offset?f:r:f??r;y&&(!m||m.offset<y.offset)&&i(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===Au.YAMLMap.tagName&&a==="map"||o===qu.YAMLSeq.tagName&&a==="seq")return pn(s,e,t,i,o);let l=e.schema.tags.find(f=>f.tag===o&&f.collection===a);if(!l){let f=e.schema.knownTags[o];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?i(r,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),pn(s,e,t,i,o)}let c=pn(s,e,t,i,o,l),d=l.resolve?.(c,f=>i(r,"TAG_RESOLVE_FAILED",f),e.options)??c,u=ku.isNode(d)?d:new Nu.Scalar(d);return u.range=c.range,u.tag=o,l?.format&&(u.format=l.format),u}Gr.composeCollection=Tu});var gn=g(Hr=>{"use strict";var mn=E();function Cu(s,e,t){let n=e.offset,i=Iu(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?mn.Scalar.BLOCK_FOLDED:mn.Scalar.BLOCK_LITERAL,o=e.source?Pu(e.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let p=o[h][1];if(p===""||p==="\r")a=h;else break}if(a===0){let h=i.chomp==="+"&&o.length>0?`
|
|
71
|
+
`.repeat(Math.max(1,o.length-1)):"",p=n+i.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:i.comment,range:[n,p,p]}}let l=e.indent+i.indent,c=e.offset+i.length,d=0;for(let h=0;h<a;++h){let[p,S]=o[h];if(S===""||S==="\r")i.indent===0&&p.length>l&&(l=p.length);else{p.length<l&&t(c+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=p.length),d=h,l===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=p.length+S.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>l&&(a=h+1);let u="",f="",m=!1;for(let h=0;h<d;++h)u+=o[h][0].slice(l)+`
|
|
72
|
+
`;for(let h=d;h<a;++h){let[p,S]=o[h];c+=p.length+S.length+1;let w=S[S.length-1]==="\r";if(w&&(S=S.slice(0,-1)),S&&p.length<l){let k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-S.length-(w?2:1),"BAD_INDENT",k),p=""}r===mn.Scalar.BLOCK_LITERAL?(u+=f+p.slice(l)+S,f=`
|
|
73
|
+
`):p.length>l||S[0]===" "?(f===" "?f=`
|
|
74
|
+
`:!m&&f===`
|
|
75
|
+
`&&(f=`
|
|
76
|
+
|
|
77
|
+
`),u+=f+p.slice(l)+S,f=`
|
|
78
|
+
`,m=!0):S===""?f===`
|
|
79
|
+
`?u+=`
|
|
80
|
+
`:f=`
|
|
81
|
+
`:(u+=f+S,f=" ",m=!1)}switch(i.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)u+=`
|
|
82
|
+
`+o[h][0].slice(l);u[u.length-1]!==`
|
|
83
|
+
`&&(u+=`
|
|
84
|
+
`);break;default:u+=`
|
|
85
|
+
`}let y=n+i.length+e.source.length;return{value:u,type:r,comment:i.comment,range:[n,y,y]}}function Iu({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,a="",l=-1;for(let f=1;f<i.length;++f){let m=i[f];if(!a&&(m==="-"||m==="+"))a=m;else{let y=Number(m);!o&&y?o=y:l===-1&&(l=s+f)}}l!==-1&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",u=i.length;for(let f=1;f<e.length;++f){let m=e[f];switch(m.type){case"space":c=!0;case"newline":u+=m.source.length;break;case"comment":t&&!c&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,d=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{let y=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",y);let h=m.source;h&&typeof h=="string"&&(u+=h.length)}}}return{mode:r,indent:o,chomp:a,comment:d,length:u}}function Pu(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}Hr.resolveBlockScalar=Cu});var bn=g(zr=>{"use strict";var yn=E(),Mu=ge();function Bu(s,e,t){let{offset:n,type:i,source:r,end:o}=s,a,l,c=(f,m,y)=>t(n+f,m,y);switch(i){case"scalar":a=yn.Scalar.PLAIN,l=_u(r,c);break;case"single-quoted-scalar":a=yn.Scalar.QUOTE_SINGLE,l=$u(r,c);break;case"double-quoted-scalar":a=yn.Scalar.QUOTE_DOUBLE,l=Du(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let d=n+r.length,u=Mu.resolveEnd(o,d,e,t);return{value:l,type:a,comment:u.comment,range:[n,d,u.offset]}}function _u(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Xr(s)}function $u(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Xr(s.slice(1,-1)).replace(/''/g,"'")}function Xr(s){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
86
|
+
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
87
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
|
|
88
|
+
`?i+=r:r=`
|
|
89
|
+
`:(i+=r+n[1],r=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(s),i+r+(n?.[1]??"")}function Du(s,e){let t="";for(let n=1;n<s.length-1;++n){let i=s[n];if(!(i==="\r"&&s[n+1]===`
|
|
90
|
+
`))if(i===`
|
|
91
|
+
`){let{fold:r,offset:o}=xu(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n],o=ju[r];if(o)t+=o;else if(r===`
|
|
92
|
+
`)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
|
|
93
|
+
`)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){let a={x:2,u:4,U:8}[r];t+=Ku(s,n+1,a,e),n+=a}else{let a=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){let r=n,o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
|
|
94
|
+
`&&!(o==="\r"&&s[n+2]===`
|
|
95
|
+
`)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function xu(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
|
|
96
|
+
`||n==="\r")&&!(n==="\r"&&s[e+2]!==`
|
|
97
|
+
`);)n===`
|
|
98
|
+
`&&(t+=`
|
|
99
|
+
`),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}var ju={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
100
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ku(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}zr.resolveFlowScalar=Bu});var to=g(eo=>{"use strict";var ie=q(),Zr=E(),Fu=gn(),Ru=bn();function Uu(s,e,t,n){let{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?Fu.resolveBlockScalar(s,e,n):Ru.resolveFlowScalar(e,s.options.strict,n),l=t?s.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[ie.SCALAR]:l?c=Yu(s.schema,i,l,t,n):e.type==="scalar"?c=Ju(s,i,e,n):c=s.schema[ie.SCALAR];let d;try{let u=c.resolve(i,f=>n(t??e,"TAG_RESOLVE_FAILED",f),s.options);d=ie.isScalar(u)?u:new Zr.Scalar(u)}catch(u){let f=u instanceof Error?u.message:String(u);n(t??e,"TAG_RESOLVE_FAILED",f),d=new Zr.Scalar(i)}return d.range=a,d.source=i,r&&(d.type=r),l&&(d.tag=l),c.format&&(d.format=c.format),o&&(d.comment=o),d}function Yu(s,e,t,n,i){if(t==="!")return s[ie.SCALAR];let r=[];for(let a of s.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(let a of r)if(a.test?.test(e))return a;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[ie.SCALAR])}function Ju({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(a=>(a.default===!0||s&&a.default==="key")&&a.test?.test(n))||t[ie.SCALAR];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(n))??t[ie.SCALAR];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;r(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}eo.composeScalar=Uu});var no=g(so=>{"use strict";function Vu(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}so.emptyScalarPosition=Vu});var oo=g(wn=>{"use strict";var Wu=qe(),Gu=q(),Qu=Qr(),io=to(),Hu=ge(),Xu=no(),zu={composeNode:ro,composeEmptyNode:Sn};function ro(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=t,c,d=!0;switch(e.type){case"alias":c=Zu(s,e,n),(a||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=io.composeScalar(s,e,l,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Qu.composeCollection(zu,s,e,t,n),a&&(c.anchor=a.source.substring(1));break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),c=Sn(s,e.offset,void 0,null,t,n),d=!1}}return a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!Gu.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),s.options.keepSourceTokens&&d&&(c.srcToken=e),c}function Sn(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:a,end:l},c){let d={type:"scalar",offset:Xu.emptyScalarPosition(e,t,n),indent:-1,source:""},u=io.composeScalar(s,d,a,c);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=l),u}function Zu({options:s},{offset:e,source:t,end:n},i){let r=new Wu.Alias(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=Hu.resolveEnd(n,o,s.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}wn.composeEmptyNode=Sn;wn.composeNode=ro});var co=g(lo=>{"use strict";var ef=Re(),ao=oo(),tf=ge(),sf=Ve();function nf(s,e,{offset:t,start:n,value:i,end:r},o){let a=Object.assign({_directives:e},s),l=new ef.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=sf.resolveProps(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?ao.composeNode(c,i,d,o):ao.composeEmptyNode(c,d.end,n,null,d,o);let u=l.contents.range[2],f=tf.resolveEnd(r,u,!1,o);return f.comment&&(l.comment=f.comment),l.range=[t,u,f.offset],l}lo.composeDoc=nf});var kn=g(ho=>{"use strict";var rf=ze("process"),of=os(),af=Re(),We=Je(),uo=q(),lf=co(),cf=ge();function Ge(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function fo(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
|
|
101
|
+
|
|
102
|
+
`:`
|
|
103
|
+
`)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var vn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let o=Ge(t);r?this.warnings.push(new We.YAMLWarning(o,n,i)):this.errors.push(new We.YAMLParseError(o,n,i))},this.directives=new of.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=fo(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
104
|
+
${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(uo.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];uo.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${n}
|
|
105
|
+
${a}`:n}else{let o=r.commentBefore;r.commentBefore=o?`${n}
|
|
106
|
+
${o}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:fo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(rf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=Ge(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=lf.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new We.YAMLParseError(Ge(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new We.YAMLParseError(Ge(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=cf.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
|
|
107
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new We.YAMLParseError(Ge(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new af.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};ho.Composer=vn});var go=g(Jt=>{"use strict";var uf=gn(),ff=bn(),hf=Je(),po=Ce();function df(s,e=!0,t){if(s){let n=(i,r,o)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(a,r,o);else throw new hf.YAMLParseError([a,a+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ff.resolveFlowScalar(s,e,n);case"block-scalar":return uf.resolveBlockScalar({options:{strict:e}},s,n)}}return null}function pf(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,a=po.stringifyString({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:n,source:`
|
|
108
|
+
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
|
|
109
|
+
`),d=a.substring(0,c),u=a.substring(c+1)+`
|
|
110
|
+
`,f=[{type:"block-scalar-header",offset:r,indent:n,source:d}];return mo(f,l)||f.push({type:"newline",offset:-1,indent:n,source:`
|
|
111
|
+
`}),{type:"block-scalar",offset:r,indent:n,props:f,source:u}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:a,end:l};default:return{type:"scalar",offset:r,indent:n,source:a,end:l}}}function mf(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,a="indent"in s?s.indent:null;if(n&&typeof a=="number"&&(a+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=po.stringifyString({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":gf(s,l);break;case'"':Nn(s,l,"double-quoted-scalar");break;case"'":Nn(s,l,"single-quoted-scalar");break;default:Nn(s,l,"scalar")}}function gf(s,e){let t=e.indexOf(`
|
|
112
|
+
`),n=e.substring(0,t),i=e.substring(t+1)+`
|
|
113
|
+
`;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{let{offset:r}=s,o="indent"in s?s.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:n}];mo(a,"end"in s?s.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
114
|
+
`});for(let l of Object.keys(s))l!=="type"&&l!=="offset"&&delete s[l];Object.assign(s,{type:"block-scalar",indent:o,props:a,source:i})}}function mo(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function Nn(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
115
|
+
`};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}Jt.createScalarToken=pf;Jt.resolveAsScalar=df;Jt.setScalarValue=mf});var bo=g(yo=>{"use strict";var yf=s=>"type"in s?Wt(s):Vt(s);function Wt(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Wt(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Vt(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Vt(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Vt(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function Vt({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=Wt(e)),t)for(let r of t)i+=r.source;return n&&(i+=Wt(n)),i}yo.stringify=yf});var ko=g(vo=>{"use strict";var An=Symbol("break visit"),bf=Symbol("skip children"),So=Symbol("remove item");function re(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),wo(Object.freeze([]),s,e)}re.BREAK=An;re.SKIP=bf;re.REMOVE=So;re.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};re.parentCollection=(s,e)=>{let t=re.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function wo(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let a=wo(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof a=="number")o=a-1;else{if(a===An)return An;a===So&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}vo.visit=re});var Gt=g(B=>{"use strict";var qn=go(),Sf=bo(),wf=ko(),On="\uFEFF",Ln="",En="",Tn="",vf=s=>!!s&&"items"in s,kf=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Nf(s){switch(s){case On:return"<BOM>";case Ln:return"<DOC>";case En:return"<FLOW_END>";case Tn:return"<SCALAR>";default:return JSON.stringify(s)}}function Af(s){switch(s){case On:return"byte-order-mark";case Ln:return"doc-mode";case En:return"flow-error-end";case Tn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
116
|
+
`:case`\r
|
|
117
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}B.createScalarToken=qn.createScalarToken;B.resolveAsScalar=qn.resolveAsScalar;B.setScalarValue=qn.setScalarValue;B.stringify=Sf.stringify;B.visit=wf.visit;B.BOM=On;B.DOCUMENT=Ln;B.FLOW_END=En;B.SCALAR=Tn;B.isCollection=vf;B.isScalar=kf;B.prettyToken=Nf;B.tokenType=Af});var Pn=g(Ao=>{"use strict";var Qe=Gt();function x(s){switch(s){case void 0:case" ":case`
|
|
118
|
+
`:case"\r":case" ":return!0;default:return!1}}var No=new Set("0123456789ABCDEFabcdef"),qf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Qt=new Set(",[]{}"),Of=new Set(` ,[]{}
|
|
119
|
+
\r `),Cn=s=>!s||Of.has(s),In=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
120
|
+
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
121
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
|
|
122
|
+
`||!i&&!this.atEnd)return e+n+1}return t===`
|
|
123
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&x(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
124
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Qe.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Qe.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&x(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!x(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&x(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Cn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&x(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Qe.FLOW_END,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Cn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||x(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf(`
|
|
125
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
|
|
126
|
+
`,r)}i!==-1&&(t=i-(n[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>x(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
|
|
127
|
+
`:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
128
|
+
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
129
|
+
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
130
|
+
`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let a=r;for(;o===" ";)o=this.buffer[--r];if(o===`
|
|
131
|
+
`&&r>=this.pos&&r+1+t>a)e=r;else break}while(!0);return yield Qe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(x(r)||e&&Qt.has(r))break;t=n}else if(x(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
|
|
132
|
+
`?(n+=1,i=`
|
|
133
|
+
`,r=this.buffer[n+1]):t=n),r==="#"||e&&Qt.has(r))break;if(i===`
|
|
134
|
+
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Qt.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Qe.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Cn))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(x(t)||e&&Qt.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!x(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(qf.has(t))t=this.buffer[++e];else if(t==="%"&&No.has(this.buffer[e+1])&&No.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
135
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
136
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Ao.Lexer=In});var Bn=g(qo=>{"use strict";var Mn=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};qo.LineCounter=Mn});var $n=g(Co=>{"use strict";var Lf=ze("process"),Oo=Gt(),Ef=Pn();function z(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function Lo(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function To(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ht(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function ye(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function Eo(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!z(e.start,"explicit-key-ind")&&!z(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,To(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var _n=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Ef.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,Lf.env.LOG_TOKENS&&console.log("|",Oo.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Oo.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Eo(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Lo(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Lo(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Ht(this.peek(2)),n=ye(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
137
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
138
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(z(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(To(t.key)&&!z(t.sep,"newline")){let o=ye(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(z(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=ye(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):z(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!z(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||z(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Ht(n),r=ye(i);Eo(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
139
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
140
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Ht(e),n=ye(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ht(e),n=ye(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Co.Parser=_n});var _o=g(Xe=>{"use strict";var Io=kn(),Tf=Re(),He=Je(),Cf=Ss(),If=q(),Pf=Bn(),Po=$n();function Mo(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Pf.LineCounter||null,prettyErrors:e}}function Mf(s,e={}){let{lineCounter:t,prettyErrors:n}=Mo(e),i=new Po.Parser(t?.addNewLine),r=new Io.Composer(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let a of o)a.errors.forEach(He.prettifyError(s,t)),a.warnings.forEach(He.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Bo(s,e={}){let{lineCounter:t,prettyErrors:n}=Mo(e),i=new Po.Parser(t?.addNewLine),r=new Io.Composer(e),o=null;for(let a of r.compose(i.parse(s),!0,s.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new He.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(He.prettifyError(s,t)),o.warnings.forEach(He.prettifyError(s,t))),o}function Bf(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=Bo(s,t);if(!i)return null;if(i.warnings.forEach(r=>Cf.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function _f(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return If.isDocument(s)&&!n?s.toString(t):new Tf.Document(s,n,t).toString(t)}Xe.parse=Bf;Xe.parseAllDocuments=Mf;Xe.parseDocument=Bo;Xe.stringify=_f});var Do=g(O=>{"use strict";var $f=kn(),Df=Re(),xf=tn(),Dn=Je(),jf=qe(),Z=q(),Kf=G(),Ff=E(),Rf=H(),Uf=X(),Yf=Gt(),Jf=Pn(),Vf=Bn(),Wf=$n(),Xt=_o(),$o=ve();O.Composer=$f.Composer;O.Document=Df.Document;O.Schema=xf.Schema;O.YAMLError=Dn.YAMLError;O.YAMLParseError=Dn.YAMLParseError;O.YAMLWarning=Dn.YAMLWarning;O.Alias=jf.Alias;O.isAlias=Z.isAlias;O.isCollection=Z.isCollection;O.isDocument=Z.isDocument;O.isMap=Z.isMap;O.isNode=Z.isNode;O.isPair=Z.isPair;O.isScalar=Z.isScalar;O.isSeq=Z.isSeq;O.Pair=Kf.Pair;O.Scalar=Ff.Scalar;O.YAMLMap=Rf.YAMLMap;O.YAMLSeq=Uf.YAMLSeq;O.CST=Yf;O.Lexer=Jf.Lexer;O.LineCounter=Vf.LineCounter;O.Parser=Wf.Parser;O.parse=Xt.parse;O.parseAllDocuments=Xt.parseAllDocuments;O.parseDocument=Xt.parseDocument;O.stringify=Xt.stringify;O.visit=$o.visit;O.visitAsync=$o.visitAsync});import{spawn as Rn}from"child_process";import{readdir as Ho,readFile as Xo,writeFile as bh,unlink as we,mkdir as Sh}from"fs/promises";import{mkdirSync as vh,writeFileSync as kh,appendFileSync as Nh,readFileSync as zo}from"fs";import*as $ from"path";import{fileURLToPath as Zo}from"url";import{join as zt,resolve as Go}from"path";import{homedir as Qo}from"os";function Ze(){let s=process.env.TYPEBULB_SERVERS_DIR;return s?zt(s,".."):zt(Qo(),".typebulb")}function Se(){return process.env.TYPEBULB_SERVERS_DIR||zt(Ze(),"servers")}function be(s){let e=Go(s);return(process.platform==="win32"?e.toLowerCase():e).replace(/\\/g,"/")}function Fn(s,e){let t=be(s),n=be(e);return t.startsWith(n.endsWith("/")?n:n+"/")?!t.includes("/node_modules/"):!1}function ea(s){return $.join(Se(),`${s}.json`)}function et(s){return $.join(Se(),`${s}.log`)}function ta(s,e=0){try{let t=zo(et(s)),n=e>=0&&e<=t.length?e:0;return{text:t.subarray(n).toString("utf8"),offset:t.length}}catch{return{text:"",offset:0}}}function sa(s){try{return process.kill(s,0),!0}catch(e){return e.code==="EPERM"}}async function na(s){await we(ea(s)).catch(()=>{}),await we(et(s)).catch(()=>{})}async function Zt(s){let e;try{e=await Ho(Se())}catch{return[]}let t=[];return await Promise.all(e.map(async i=>{if(!i.endsWith(".json"))return;let r=$.join(Se(),i),o;try{o=JSON.parse(await Xo(r,"utf8"))}catch{await we(r).catch(()=>{});return}o&&typeof o.pid=="number"&&sa(o.pid)?t.push(o):(await we(r).catch(()=>{}),o?.pid&&await we(et(o.pid)).catch(()=>{}))})),(s?t.filter(i=>i.agent==null&&Fn(i.file,s)):t).sort((i,r)=>i.startedAt-r.startedAt)}async function ia(s){try{process.kill(s,"SIGTERM")}catch{}await na(s)}var ra=s=>new Promise(e=>setTimeout(e,s));function oa(){return $.join($.dirname(Zo(import.meta.url)),"index.js")}function aa(s,e={}){return{command:process.execPath,args:[oa(),...e.trust?["--trust"]:[],s,...e.open===!1?["--no-open"]:[]]}}async function la(s,e={}){let t=e.cwd??process.cwd(),n=$.resolve(t,s),i=(await Zt()).find(c=>c.file===n);if(i)return i;let{command:r,args:o}=aa(s,e);(process.platform==="win32"?Rn("cmd",["/c","start","","/b",r,...o],{cwd:t,stdio:"ignore",windowsHide:!0}):Rn(r,o,{cwd:t,detached:!0,stdio:"ignore"})).unref();let l=Date.now()+2e4;for(;Date.now()<l;){await ra(150);let c=(await Zt()).find(d=>d.file===n);if(c)return c}throw new Error(`Launched ${$.basename(s)} but it did not register within 20s.`)}import{readdirSync as fa,readFileSync as ha,statSync as da}from"fs";import{join as Un,basename as pa}from"path";function tt(s){let e=/^---[^\n]*\n([\s\S]*?)\n---/.exec(s),t=e?/^\s*name:\s*(.+?)\s*$/m.exec(e[1]):null;return t?t[1].replace(/^["']|["']$/g,""):void 0}function ca(s){return(tt(s)??"bulb").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"bulb"}function ua(s){return s.replace(/^---[^\n]*\r?\n[\s\S]*?\r?\n---[^\n]*\r?\n?/,"").replace(/^\r?\n+/,"")}function Yn(s,e,t){if(e>8)return t;let n;try{n=fa(s,{withFileTypes:!0})}catch{return t}for(let i of n)if(i.isDirectory()){if(i.name.startsWith(".")||i.name==="node_modules")continue;Yn(Un(s,i.name),e+1,t)}else i.isFile()&&i.name.endsWith(".bulb.md")&&t.push(Un(s,i.name));return t}function ma(s){return Yn(s,0,[]).map(e=>{let t=0;try{t=da(e).mtimeMs}catch{}let n;try{n=tt(ha(e,"utf8").slice(0,1024))}catch{}return{path:e,name:n??pa(e).replace(/\.bulb\.md$/,""),mtime:t}})}import{readFile as Qf}from"fs/promises";var es={code:{path:"code.tsx",language:"typescript"},css:{path:"styles.css",language:"css"},html:{path:"index.html",language:"html"},config:{path:"config.json",language:"json"},notes:{path:"notes.md",language:"markdown"},data:{path:"data.txt",language:"text"},infer:{path:"infer.md",language:"markdown"},insight:{path:"insight.json",language:"json"}},ts=["code","css","html","data","infer","insight","config","notes"];function Jn(s){return!!s?.startsWith("typebulb")}function ss(s){return s.startsWith('"')&&s.endsWith('"')?s.slice(1,-1).replace(/\\"/g,'"'):s.startsWith("'")&&s.endsWith("'")?s.slice(1,-1):s}function Vn(s){try{let e=s.split(`
|
|
141
|
+
`),t=0;if(e[t]?.trim()!=="---")return null;t++;let n=[];for(;t<e.length&&e[t]?.trim()!=="---";)n.push(e[t]),t++;if(e[t]?.trim()!=="---")return null;t++;let i=ga(n);if(!i)return null;let r=new Map;for(;t<e.length;){let a=e[t]?.trim()?.match(/^\*\*(.+)\*\*$/);if(a){let l=a[1].trim();for(t++;t<e.length&&e[t]?.trim()==="";)t++;let c=e[t]?.match(/^(`{3,})(\w*)\s*$/);if(!c){t++;continue}let d=c[1];t++;let u=[];for(;t<e.length&&!e[t]?.match(new RegExp(`^${d}\\s*$`));)u.push(e[t]),t++;t++,r.set(l,u.join(`
|
|
142
|
+
`))}else t++}return{frontmatter:i,files:r}}catch{return null}}function ga(s){let e={};for(let t of s){let n=t.indexOf(":");if(n===-1)continue;let i=t.slice(0,n).trim(),r=t.slice(n+1).trim();switch(i){case"format":e.format=r;break;case"name":e.name=ss(r);break}}return!Jn(e.format)||!e.name?null:e}function Wn(s){let e=Object.fromEntries(ts.map(t=>[t,s.files.get(es[t].path)||""]));return{name:s.frontmatter.name,...e}}var Gf=Wo(Do(),1);function xo(s){return{...Wn(s),server:s.files.get("server.ts")??""}}function jo(s){if(s.server.trim())return"server-side code (server.ts)";let e=s.code;if(/\btb\s*\.\s*fs\b/.test(e)||e.includes("/__fs"))return"the filesystem";if(/\btb\s*\.\s*ai\b/.test(e)||e.includes("/__ai"))return"AI (your API keys)";if(/\btb\s*\.\s*server\s*\.\s*(?!log\b)\w/.test(e)||e.includes("/__api"))return"server-side code (server.ts)"}async function Hf(s){try{let e=Vn(await Qf(s,"utf-8"));return e?jo(xo(e)):void 0}catch{return}}import{spawn as Xf}from"child_process";import{basename as zf}from"path";function Zf(){return process.env.TYPEBULB_EDITOR||"code"}var eh=/^(code|code-insiders|codium|vscodium|cursor|windsurf)(\.cmd|\.exe)?$/i;function th(s,e,t){return t==null?[e]:eh.test(zf(s))?["-g",`${e}:${t}`]:[`+${t}`,e]}function sh(s,e){let t=Zf();return{command:t,args:th(t,s,e)}}function nh(s,e){let{command:t,args:n}=sh(s,e),i=Xf(t,n,{shell:!0,detached:!0,stdio:"ignore"});i.on("error",r=>console.error("[typebulb] editor launch failed:",r?.message??r)),i.unref()}import{readFileSync as ih,writeFileSync as rh,mkdirSync as oh}from"fs";import{join as ah}from"path";function Ko(){return ah(Ze(),"trust.json")}function xn(){try{let s=JSON.parse(ih(Ko(),"utf8"));return new Set(Array.isArray(s)?s:[])}catch{return new Set}}function lh(s){oh(Ze(),{recursive:!0}),rh(Ko(),JSON.stringify([...s]))}function ch(s){return xn().has(be(s))}function uh(s,e){let t=xn(),n=be(s);(e?t.has(n):!t.has(n))||(e?t.add(n):t.delete(n),lh(t))}function fh(){return[...xn()]}export{tt as bulbName,ch as isBulbTrusted,la as launchBulbServer,ma as listBulbFiles,Zt as listBulbServers,fh as listTrustedBulbs,nh as openInEditor,Hf as predictBulbTrust,ta as readServerLog,et as serverLogPath,uh as setBulbTrusted,ca as slugifyBulbName,ia as stopBulbServer,ua as stripFrontmatter};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sucrase transpiler — strips TypeScript/JSX to runnable JS for the bulb's code
|
|
3
|
+
* blocks. Not a type-checking compiler: Sucrase removes types without validating
|
|
4
|
+
* them (that's `tsc`'s job, via `typebulb check`). Shared by typebulb.com and the
|
|
5
|
+
* CLI so a bulb compiles identically in both — the "just make it run" path.
|
|
6
|
+
*/
|
|
7
|
+
export interface TranspileOptions {
|
|
8
|
+
/** Skip the JSX transform. Use for `server.ts`, which is plain TypeScript. */
|
|
9
|
+
serverOnly?: boolean;
|
|
10
|
+
/** JSX runtime source (e.g. 'react', 'preact'). Ignored when `serverOnly`. */
|
|
11
|
+
jsxImportSource?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TranspileResult {
|
|
14
|
+
code: string;
|
|
15
|
+
/** Set instead of `code` when Sucrase couldn't parse the source. */
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function transpile(source: string, options?: TranspileOptions): TranspileResult;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../transpile/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAazF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sucrase transpiler — strips TypeScript/JSX to runnable JS for the bulb's code
|
|
3
|
+
* blocks. Not a type-checking compiler: Sucrase removes types without validating
|
|
4
|
+
* them (that's `tsc`'s job, via `typebulb check`). Shared by typebulb.com and the
|
|
5
|
+
* CLI so a bulb compiles identically in both — the "just make it run" path.
|
|
6
|
+
*/
|
|
7
|
+
import { transform } from 'sucrase';
|
|
8
|
+
export function transpile(source, options = {}) {
|
|
9
|
+
const transforms = options.serverOnly ? ['typescript'] : ['typescript', 'jsx'];
|
|
10
|
+
try {
|
|
11
|
+
const { code } = transform(source, {
|
|
12
|
+
transforms,
|
|
13
|
+
jsxRuntime: 'automatic',
|
|
14
|
+
jsxImportSource: options.jsxImportSource || 'react',
|
|
15
|
+
production: true,
|
|
16
|
+
});
|
|
17
|
+
return { code };
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
return { code: '', error: String(e) };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../transpile/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAA;AAenD,MAAM,UAAU,SAAS,CAAC,MAAc,EAAE,UAA4B,EAAE;IACtE,MAAM,UAAU,GAAgB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAA;IAC3F,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE;YACjC,UAAU;YACV,UAAU,EAAE,WAAW;YACvB,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,OAAO;YACnD,UAAU,EAAE,IAAI;SACjB,CAAC,CAAA;QACF,OAAO,EAAE,IAAI,EAAE,CAAA;IACjB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACvC,CAAC;AACH,CAAC"}
|