astro-vscode 2.16.6 → 2.16.8
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +12 -0
- package/package.json +2 -3
- package/scripts/build.mjs +3 -1
- package/dist/astro-ts-plugin-bundle/index.js +0 -156
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> astro-vscode@2.16.
|
|
2
|
+
> astro-vscode@2.16.8 build /home/runner/work/astro/astro/packages/language-tools/vscode
|
|
3
3
|
> tsc && pnpm prebuild && node scripts/build.mjs -- --minify
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> astro-vscode@2.16.
|
|
6
|
+
> astro-vscode@2.16.8 prebuild /home/runner/work/astro/astro/packages/language-tools/vscode
|
|
7
7
|
> cd ../ts-plugin && pnpm build
|
|
8
8
|
|
|
9
9
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# astro-vscode
|
|
2
2
|
|
|
3
|
+
## 2.16.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#15156](https://github.com/withastro/astro/pull/15156) [`9cc2c71`](https://github.com/withastro/astro/commit/9cc2c71a601c04415f13b3ac62c361ef2c40b63d) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes TypeScript plugin not working
|
|
8
|
+
|
|
9
|
+
## 2.16.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#15131](https://github.com/withastro/astro/pull/15131) [`d40ff7d`](https://github.com/withastro/astro/commit/d40ff7d8570f30c82402d8e2b01d4da890e3e771) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes extension asking for the wrong version of VS Code
|
|
14
|
+
|
|
3
15
|
## 2.16.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"color": "#17191E",
|
|
25
25
|
"theme": "dark"
|
|
26
26
|
},
|
|
27
|
-
"version": "2.16.
|
|
27
|
+
"version": "2.16.8",
|
|
28
28
|
"author": "withastro",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"publisher": "astro-build",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"typescriptServerPlugins": [
|
|
51
51
|
{
|
|
52
52
|
"name": "astro-ts-plugin-bundle",
|
|
53
|
-
"path": "./dist/astro-ts-plugin-bundle",
|
|
54
53
|
"enableForWorkspaceTypeScriptVersions": true
|
|
55
54
|
}
|
|
56
55
|
],
|
|
@@ -241,7 +240,7 @@
|
|
|
241
240
|
"@types/glob": "^8.1.0",
|
|
242
241
|
"@types/mocha": "^10.0.10",
|
|
243
242
|
"@types/node": "^20.9.0",
|
|
244
|
-
"@types/vscode": "^1.
|
|
243
|
+
"@types/vscode": "^1.90.0",
|
|
245
244
|
"@volar/language-server": "~2.4.27",
|
|
246
245
|
"@volar/vscode": "~2.4.27",
|
|
247
246
|
"@vscode/test-electron": "^2.5.2",
|
package/scripts/build.mjs
CHANGED
|
@@ -18,7 +18,9 @@ export default async function build() {
|
|
|
18
18
|
entryPoints: {
|
|
19
19
|
'dist/node/client': './src/client.ts',
|
|
20
20
|
'dist/node/server': './node_modules/@astrojs/language-server/bin/nodeServer.js',
|
|
21
|
-
|
|
21
|
+
// We need to generate this inside node_modules so VS Code can resolve it
|
|
22
|
+
'node_modules/astro-ts-plugin-bundle/index':
|
|
23
|
+
'./node_modules/@astrojs/ts-plugin/dist/index.js',
|
|
22
24
|
},
|
|
23
25
|
bundle: true,
|
|
24
26
|
metafile: metaFile,
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";var ss=Object.defineProperty;var xc=Object.getOwnPropertyDescriptor;var $c=Object.getOwnPropertyNames;var jc=Object.prototype.hasOwnProperty;var Rc=(n,e)=>()=>(n&&(e=n(n=0)),e);var b=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Bc=(n,e)=>{for(var t in e)ss(n,t,{get:e[t],enumerable:!0})},Kc=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $c(e))!jc.call(n,i)&&i!==t&&ss(n,i,{get:()=>e[i],enumerable:!(s=xc(e,i))||s.enumerable});return n};var Uc=n=>Kc(ss({},"__esModule",{value:!0}),n);var er=b(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.binarySearch=Vc;function Vc(n,e){let t=0,s=n.length-1,i;for(;t<=s;){let a=Math.floor((t+s)/2),c=n[a];if(c<e)t=a+1;else if(c>e)s=a-1;else{t=a,s=a,i=a;break}}let r=Math.max(Math.min(t,s,n.length-1),0),o=Math.min(Math.max(t,s,0),n.length-1);return{low:r,high:o,match:i}}});var os=b(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.translateOffset=Yc;var tr=!1;function Yc(n,e,t,s,i=s){if(!e.every((c,l)=>l===0||e[l-1]<=c)){for(let c=0;c<e.length;c++){let l=e[c],f=s[c];if(n>=l&&n<=l+f){let d=i[c],u=t[c],p=Math.min(n-l,d);return u+p}}tr||(tr=!0,console.warn("fromOffsets should be sorted in ascending order"))}let o=0,a=e.length-1;for(;o<=a;){let c=Math.floor((o+a)/2),l=e[c],f=s[c];if(n>=l&&n<=l+f){let d=i[c],u=t[c],p=Math.min(n-l,d);return u+p}else n<l?a=c-1:o=c+1}}});var sr=b(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.SourceMap=void 0;var as=er(),nr=os(),cs=class{constructor(e){this.mappings=e}toSourceRange(e,t,s,i){return this.findMatchingStartEnd(e,t,s,"generatedOffsets",i)}toGeneratedRange(e,t,s,i){return this.findMatchingStartEnd(e,t,s,"sourceOffsets",i)}toSourceLocation(e,t){return this.findMatchingOffsets(e,"generatedOffsets",t)}toGeneratedLocation(e,t){return this.findMatchingOffsets(e,"sourceOffsets",t)}*findMatchingOffsets(e,t,s){let i=this.getMemoBasedOnRange(t);if(i.offsets.length===0)return;let{low:r,high:o}=(0,as.binarySearch)(i.offsets,e),a=new Set,c=t==="sourceOffsets"?"generatedOffsets":"sourceOffsets";for(let l=r;l<=o;l++)for(let f of i.mappings[l]){if(a.has(f)||(a.add(f),s&&!s(f.data)))continue;let d=(0,nr.translateOffset)(e,f[t],f[c],Ve(f,t),Ve(f,c));d!==void 0&&(yield[d,f])}}*findMatchingStartEnd(e,t,s,i,r){let o=i==="sourceOffsets"?"generatedOffsets":"sourceOffsets",a=[],c=!1;for(let[l,f]of this.findMatchingOffsets(e,i)){if(r&&!r(f.data))continue;a.push([l,f]);let d=(0,nr.translateOffset)(t,f[i],f[o],Ve(f,i),Ve(f,o));d!==void 0&&(c=!0,yield[l,d,f,f])}if(!c&&s){for(let[l,f]of a)for(let[d,u]of this.findMatchingOffsets(t,i))if(!(r&&!r(u.data)||d<l)){yield[l,d,f,u];break}}}getMemoBasedOnRange(e){return e==="sourceOffsets"?this.sourceCodeOffsetsMemo??=this.createMemo("sourceOffsets"):this.generatedCodeOffsetsMemo??=this.createMemo("generatedOffsets")}createMemo(e){let t=new Set;for(let r of this.mappings)for(let o=0;o<r[e].length;o++)t.add(r[e][o]),t.add(r[e][o]+Ve(r,e)[o]);let s=[...t].sort((r,o)=>r-o),i=s.map(()=>new Set);for(let r of this.mappings)for(let o=0;o<r[e].length;o++){let a=(0,as.binarySearch)(s,r[e][o]).match,c=(0,as.binarySearch)(s,r[e][o]+Ve(r,e)[o]).match;for(let l=a;l<=c;l++)i[l].add(r)}return{offsets:s,mappings:i}}};Gt.SourceMap=cs;function Ve(n,e){return e==="sourceOffsets"?n.lengths:n.generatedLengths??n.lengths}});var Jt=b(Oe=>{"use strict";var Gc=Oe&&Oe.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),ir=Oe&&Oe.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Gc(e,n,t)};Object.defineProperty(Oe,"__esModule",{value:!0});ir(sr(),Oe);ir(os(),Oe)});var rr=b(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.isHoverEnabled=Jc;I.isInlayHintsEnabled=Hc;I.isCodeLensEnabled=Wc;I.isMonikerEnabled=Qc;I.isInlineValueEnabled=zc;I.isSemanticTokensEnabled=Xc;I.isCallHierarchyEnabled=Zc;I.isTypeHierarchyEnabled=el;I.isRenameEnabled=tl;I.isDefinitionEnabled=nl;I.isTypeDefinitionEnabled=sl;I.isReferencesEnabled=il;I.isImplementationEnabled=rl;I.isHighlightEnabled=ol;I.isSymbolsEnabled=al;I.isFoldingRangesEnabled=cl;I.isSelectionRangesEnabled=ll;I.isLinkedEditingEnabled=fl;I.isColorEnabled=ul;I.isDocumentLinkEnabled=dl;I.isDiagnosticsEnabled=hl;I.isCodeActionsEnabled=pl;I.isFormattingEnabled=ml;I.isCompletionEnabled=gl;I.isAutoInsertEnabled=yl;I.isSignatureHelpEnabled=Sl;I.shouldReportDiagnostics=bl;I.resolveRenameNewName=vl;I.resolveRenameEditText=wl;I.findOverlapCodeRange=Ol;function Jc(n){return!!n.semantic}function Hc(n){return!!n.semantic}function Wc(n){return!!n.semantic}function Qc(n){return!!n.semantic}function zc(n){return!!n.semantic}function Xc(n){return typeof n.semantic=="object"?n.semantic.shouldHighlight?.()??!0:!!n.semantic}function Zc(n){return!!n.navigation}function el(n){return!!n.navigation}function tl(n){return typeof n.navigation=="object"?n.navigation.shouldRename?.()??!0:!!n.navigation}function nl(n){return!!n.navigation}function sl(n){return!!n.navigation}function il(n){return!!n.navigation}function rl(n){return!!n.navigation}function ol(n){return typeof n.navigation=="object"?n.navigation.shouldHighlight?.()??!0:!!n.navigation}function al(n){return!!n.structure}function cl(n){return!!n.structure}function ll(n){return!!n.structure}function fl(n){return!!n.structure}function ul(n){return!!n.structure}function dl(n){return!!n.structure}function hl(n){return!!n.verification}function pl(n){return!!n.verification}function ml(n){return!!n.format}function gl(n){return!!n.completion}function yl(n){return!!n.completion}function Sl(n){return!!n.completion}function bl(n,e,t){return typeof n.verification=="object"?n.verification.shouldReport?.(e,t)??!0:!!n.verification}function vl(n,e){return typeof e.navigation=="object"?e.navigation.resolveRenameNewName?.(n)??n:n}function wl(n,e){return typeof e.navigation=="object"?e.navigation.resolveRenameEditText?.(n)??n:n}function Ol(n,e,t,s){let i,r;for(let[o,a]of t.toGeneratedLocation(n))if(s(a.data)){i=o;break}for(let[o,a]of t.toGeneratedLocation(e))if(s(a.data)){r=o;break}if(i===void 0||r===void 0){for(let o of t.mappings)if(s(o.data)){let a=o.sourceOffsets[0],c=o.sourceOffsets[o.sourceOffsets.length-1]+o.lengths[o.lengths.length-1],l=El(n,e,a,c);if(l){let f=l.start-a+o.generatedOffsets[0],d=(o.generatedLengths??o.lengths)[o.generatedOffsets.length-1],u=Math.min(l.end-o.sourceOffsets[o.sourceOffsets.length-1],d),p=o.generatedOffsets[o.generatedOffsets.length-1]+u;i=i===void 0?f:Math.min(i,f),r=r===void 0?p:Math.max(r,p)}}}if(i!==void 0&&r!==void 0)return{start:i,end:r}}function El(n,e,t,s){let i=Math.max(n,t),r=Math.min(e,s);if(!(i>r))return{start:i,end:r}}});var fs=b(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.LinkedCodeMap=void 0;var Nl=Jt(),ls=class extends Nl.SourceMap{*getLinkedOffsets(e){for(let t of this.toGeneratedLocation(e))yield t[0];for(let t of this.toSourceLocation(e))yield t[0]}};Ht.LinkedCodeMap=ls});var ar=b(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0})});var cr=b(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.FileMap=void 0;var us=class extends Map{constructor(e){super(),this.caseSensitive=e,this.originalFileNames=new Map}keys(){return this.originalFileNames.values()}get(e){return super.get(this.normalizeId(e))}has(e){return super.has(this.normalizeId(e))}set(e,t){return this.originalFileNames.set(this.normalizeId(e),e),super.set(this.normalizeId(e),t)}delete(e){return this.originalFileNames.delete(this.normalizeId(e)),super.delete(this.normalizeId(e))}clear(){return this.originalFileNames.clear(),super.clear()}normalizeId(e){return this.caseSensitive?e:e.toLowerCase()}};Wt.FileMap=us});var Ye=b(te=>{"use strict";var Cl=te&&te.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),zt=te&&te.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Cl(e,n,t)};Object.defineProperty(te,"__esModule",{value:!0});te.defaultMapperFactory=te.SourceMap=void 0;te.createLanguage=ql;te.forEachEmbeddedCode=Qt;var kl=Jt();Object.defineProperty(te,"SourceMap",{enumerable:!0,get:function(){return kl.SourceMap}});zt(rr(),te);zt(fs(),te);zt(ar(),te);zt(cr(),te);var Al=Jt(),Ll=fs(),_l=n=>new Al.SourceMap(n);te.defaultMapperFactory=_l;function ql(n,e,t,s){let i=new WeakMap,r=new WeakMap,o=new WeakMap,a={mapperFactory:te.defaultMapperFactory,plugins:n,scripts:{fromVirtualCode(f){return i.get(f)},get(f,d=!0,u=!1){t(f,d,u);let p=e.get(f);return p?.isAssociationDirty&&this.set(f,p.snapshot,p.languageId),e.get(f)},set(f,d,u,p=n){if(!u){for(let h of n)if(u=h.getLanguageId?.(f),u)break}if(!u){console.warn(`languageId not found for ${String(f)}`);return}let m=!1;for(let h of n)if(h.isAssociatedFileOnly?.(f,u)){m=!0;break}if(e.has(f)){let h=e.get(f);if(h.languageId!==u||h.associatedOnly!==m)return this.delete(f),c(h),this.set(f,d,u);if(m)h.snapshot!==d&&(h.snapshot=d,c(h));else if(h.isAssociationDirty||h.snapshot!==d){h.snapshot!==d&&(h.snapshot=d,c(h));let g=l(h);if(h.generated){let{updateVirtualCode:S,createVirtualCode:v}=h.generated.languagePlugin,C=S?S(f,h.generated.root,d,g):v?.(f,u,d,g);if(C){h.generated.root=C,h.generated.embeddedCodes.clear();for(let A of Qt(h.generated.root))i.set(A,h),h.generated.embeddedCodes.set(A.id,A);return h}else{this.delete(f);return}}}else return h}else{let h={id:f,languageId:u,snapshot:d,associatedIds:new Set,targetIds:new Set,associatedOnly:m};if(e.set(f,h),m)return h;for(let g of p){let S=g.createVirtualCode?.(f,u,d,l(h));if(S){h.generated={root:S,languagePlugin:g,embeddedCodes:new Map};for(let v of Qt(S))i.set(v,h),h.generated.embeddedCodes.set(v.id,v);break}}return h}},delete(f){let d=e.get(f);d&&(d.generated?.languagePlugin.disposeVirtualCode?.(f,d.generated.root),e.delete(f),c(d))}},maps:{get(f,d){let u=r.get(f.snapshot);if(u||r.set(f.snapshot,u=new WeakMap),!u.has(d.snapshot)){let p=f.associatedScriptMappings?.get(d.id)??f.mappings;u.set(d.snapshot,a.mapperFactory(p))}return u.get(d.snapshot)},*forEach(f){let d=i.get(f);if(yield[d,this.get(f,d)],f.associatedScriptMappings)for(let[u]of f.associatedScriptMappings){let p=e.get(u);p&&(yield[p,this.get(f,p)])}}},linkedCodeMaps:{get(f){let d=i.get(f),u=o.get(f.snapshot);return u?.[0]!==d.snapshot&&o.set(f.snapshot,u=[d.snapshot,f.linkedCodeMappings?new Ll.LinkedCodeMap(f.linkedCodeMappings):void 0]),u[1]}}};return a;function c(f){f.targetIds.forEach(d=>{let u=e.get(d);u&&(u.isAssociationDirty=!0,s?.(u.id))})}function l(f){for(let d of f.associatedIds)e.get(d)?.targetIds.delete(f.id);return f.associatedIds.clear(),f.isAssociationDirty=!1,{getAssociatedScript(d){t(d,!0,!0);let u=e.get(d);return u&&(u.targetIds.add(f.id),f.associatedIds.add(u.id)),u}}}}function*Qt(n){if(yield n,n.embeddedCodes)for(let e of n.embeddedCodes)yield*Qt(e)}});var lr=b(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});ds.dedupeDocumentSpans=Tl;function Tl(n){return Ml(n,e=>[e.fileName,e.textSpan.start,e.textSpan.length].join(":"))}function Ml(n,e){let t=new Map;for(let s of n.reverse())t.set(e(s),s);return[...t.values()]}});var Zt=b(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.getServiceScript=Il;Xt.fixupImpliedNodeFormatForFile=Pl;function Il(n,e){let t=n.scripts.get(e);if(t?.targetIds.size)for(let s of t.targetIds){let i=n.scripts.get(s);if(i?.generated){let r=i.generated.languagePlugin.typescript?.getServiceScript(i.generated.root);if(r)return[r,i,t]}}if(t?.associatedOnly)return[void 0,t,t];if(t?.generated){let s=t.generated.languagePlugin.typescript?.getServiceScript(t.generated.root);if(s)return[s,t,t]}return[void 0,void 0,void 0]}function Pl(n,e,t,s,i,r){if(t.impliedNodeFormat!==void 0||!e.some(l=>t.fileName.endsWith(l))||[".d.ts",".ts",".tsx",".js",".jsx"].some(l=>t.fileName.endsWith(l)))return;let a=t.fileName+".ts",c=n.getImpliedNodeFormatForFileWorker?.(a,s,i,r)?.impliedNodeFormat;if(c!==void 0)return t.impliedNodeFormat=c,()=>t.impliedNodeFormat=void 0}});var yr=b(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.transformCallHierarchyItem=Fl;ee.transformDiagnostic=ur;ee.fillSourceFileText=dr;ee.transformFileTextChanges=xl;ee.transformDocumentSpan=$l;ee.transformSpan=Ee;ee.transformTextChange=jl;ee.transformTextSpan=tn;ee.toSourceOffset=Rl;ee.toSourceRanges=hr;ee.toSourceOffsets=pr;ee.toGeneratedRange=Bl;ee.toGeneratedRanges=mr;ee.toGeneratedOffset=Kl;ee.toGeneratedOffsets=gr;ee.getMappingOffset=he;var Dl=Ye(),en=Zt(),Ge=new WeakMap,fr=new WeakSet;function Fl(n,e,t,s){let i=Ee(n,e.file,e.span,t,s),r=Ee(n,e.file,e.selectionSpan,t,s);return{...e,file:i?.fileName??e.file,span:i?.textSpan??{start:0,length:0},selectionSpan:r?.textSpan??{start:0,length:0}}}function ur(n,e,t,s){if(!Ge.has(e)){Ge.set(e,void 0);let{relatedInformation:i}=e;if(i&&(e.relatedInformation=i.map(r=>ur(n,r,t,s)).filter(r=>!!r)),e.file!==void 0&&e.start!==void 0&&e.length!==void 0){let[r]=(0,en.getServiceScript)(n,e.file.fileName);if(r){let[o,a]=tn(void 0,n,r,{start:e.start,length:e.length},!0,l=>(0,Dl.shouldReportDiagnostics)(l,String(e.source),String(e.code)))??[],c=o?e.file.fileName===o?e.file:t?.getSourceFile(o):void 0;a&&c&&(s&&dr(n,e.file),Ge.set(e,{...e,file:c,start:a.start,length:a.length}))}else Ge.set(e,e)}else Ge.set(e,e)}return Ge.get(e)}function dr(n,e){if(fr.has(e))return;fr.add(e);let[t]=(0,en.getServiceScript)(n,e.fileName);if(t&&!t.preventLeadingOffset){let s=n.scripts.fromVirtualCode(t.code);e.text=s.snapshot.getText(0,s.snapshot.getLength())+e.text.substring(s.snapshot.getLength())}}function xl(n,e,t,s){let i={},r=new Set;for(let a of e){let[c,l]=(0,en.getServiceScript)(n,a.fileName);if(l)a.textChanges.forEach(f=>{let{fileName:d,textSpan:u}=Ee(n,a.fileName,f.span,t,s)??{};d&&u&&(i[d]??(i[d]=[])).push({...f,span:u})});else{let f=i[a.fileName]??(i[a.fileName]=[]);a.textChanges.forEach(d=>{f.push(d)}),a.isNewFile&&r.add(a.fileName)}}let o=[];for(let a in i)o.push({fileName:a,isNewFile:r.has(a),textChanges:i[a]});return o}function $l(n,e,t,s,i){let r=Ee(n,e.fileName,e.textSpan,t,s);if(!r&&i&&(r={fileName:e.fileName,textSpan:{start:0,length:0}}),!r)return;let o=Ee(n,e.fileName,e.contextSpan,t,s),a=Ee(n,e.originalFileName,e.originalTextSpan,t,s),c=Ee(n,e.originalFileName,e.originalContextSpan,t,s);return{...e,fileName:r.fileName,textSpan:r.textSpan,contextSpan:o?.textSpan,originalFileName:a?.fileName,originalTextSpan:a?.textSpan,originalContextSpan:c?.textSpan}}function Ee(n,e,t,s,i){if(!e||!t)return;let[r]=(0,en.getServiceScript)(n,e);if(r){let[o,a]=tn(void 0,n,r,t,s,i)??[];if(a&&o)return{fileName:o,textSpan:a}}else return{fileName:e,textSpan:t}}function jl(n,e,t,s,i,r){let[o,a]=tn(n,e,t,s.span,i,r)??[];if(a&&o)return[o,{newText:s.newText,span:a}]}function tn(n,e,t,s,i,r){let o=s.start,a=s.start+s.length;for(let[c,l,f]of hr(n,e,t,o,a,i,r))return[c,{start:l,length:f-l}]}function Rl(n,e,t,s,i){for(let r of pr(n,e,t,s,i))return r}function*hr(n,e,t,s,i,r,o){if(n){let a=e.maps.get(t.code,n);for(let[c,l]of a.toSourceRange(s-he(e,t),i-he(e,t),r,o))yield[n.id,c,l]}else for(let[a,c]of e.maps.forEach(t.code))for(let[l,f]of c.toSourceRange(s-he(e,t),i-he(e,t),r,o))yield[a.id,l,f]}function*pr(n,e,t,s,i){if(n){let r=e.maps.get(t.code,n);for(let[o,a]of r.toSourceLocation(s-he(e,t)))i(a.data)&&(yield[n.id,o])}else for(let[r,o]of e.maps.forEach(t.code))for(let[a,c]of o.toSourceLocation(s-he(e,t)))i(c.data)&&(yield[r.id,a])}function Bl(n,e,t,s,i,r){for(let o of mr(n,e,t,s,i,r))return o}function*mr(n,e,t,s,i,r){let o=n.maps.get(e.code,t);for(let[a,c]of o.toGeneratedRange(s,i,!0,r))yield[a+he(n,e),c+he(n,e)]}function Kl(n,e,t,s,i){for(let[r]of gr(n,e,t,s,i))return r}function*gr(n,e,t,s,i){let r=n.maps.get(e.code,t);for(let[o,a]of r.toGeneratedLocation(s))i(a.data)&&(yield[o+he(n,e),a])}function he(n,e){return e.preventLeadingOffset?0:n.scripts.fromVirtualCode(e.code).snapshot.getLength()}});var Sr=b(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.createProxyLanguageService=Ul;var N=Ye(),Ne=lr(),L=yr(),B=Zt(),P=/\\/g;function Ul(n){let e=new Map,t;return{initialize(s){t=(i,r)=>{switch(r){case"getNavigationTree":return Vl(s,i[r]);case"getOutliningSpans":return Yl(s,i[r]);case"getFormattingEditsForDocument":return Gl(s,i[r]);case"getFormattingEditsForRange":return Jl(s,i[r]);case"getFormattingEditsAfterKeystroke":return Hl(s,i[r]);case"getEditsForFileRename":return Wl(s,i[r]);case"getLinkedEditingRangeAtPosition":return Ql(s,i[r]);case"prepareCallHierarchy":return zl(s,i[r]);case"provideCallHierarchyIncomingCalls":return Xl(s,i[r]);case"provideCallHierarchyOutgoingCalls":return Zl(s,i[r]);case"organizeImports":return ef(s,i[r]);case"getQuickInfoAtPosition":return tf(s,i[r]);case"getSignatureHelpItems":return nf(s,i[r]);case"getDocumentHighlights":return sf(s,i[r]);case"getApplicableRefactors":return rf(s,i[r]);case"getEditsForRefactor":return of(s,i[r]);case"getCombinedCodeFix":return af(s,i[r]);case"getRenameInfo":return cf(s,i[r]);case"getCodeFixesAtPosition":return lf(s,i[r]);case"getEncodedSemanticClassifications":return ff(s,i[r]);case"getSyntacticDiagnostics":return uf(s,n,i[r]);case"getSemanticDiagnostics":return df(s,n,i[r]);case"getSuggestionDiagnostics":return hf(s,n,i[r]);case"getDefinitionAndBoundSpan":return pf(s,i[r]);case"findReferences":return mf(s,i[r]);case"getDefinitionAtPosition":return gf(s,i[r]);case"getTypeDefinitionAtPosition":return yf(s,i[r]);case"getImplementationAtPosition":return Sf(s,i[r]);case"findRenameLocations":return bf(s,i[r]);case"getReferencesAtPosition":return vf(s,i[r]);case"getCompletionsAtPosition":return wf(s,i[r]);case"getCompletionEntryDetails":return Of(s,i[r]);case"provideInlayHints":return Ef(s,i[r]);case"getFileReferences":return Nf(s,i[r]);case"getNavigateToItems":return Cf(s,i[r])}}},proxy:new Proxy(n,{get(s,i,r){if(t){e.has(i)||e.set(i,t(s,i));let o=e.get(i);if(o)return o}return Reflect.get(s,i,r)},set(s,i,r,o){return Reflect.set(s,i,r,o)}})}}function Vl(n,e){return t=>{let s=t.replace(P,"/"),[i,r]=(0,B.getServiceScript)(n,s);if(i||r?.associatedOnly){let o=e(r.id);return o.childItems=void 0,o}else return e(s)}}function Yl(n,e){return t=>{let s=t.replace(P,"/"),[i,r]=(0,B.getServiceScript)(n,s);return i||r?.associatedOnly?[]:e(s)}}function Gl(n,e){return(t,s)=>{let i=t.replace(P,"/"),[r,o,a]=(0,B.getServiceScript)(n,i);return o?.associatedOnly?[]:r?n.maps.get(r.code,o).mappings.some(f=>(0,N.isFormattingEnabled)(f.data))?e(o.id,s).map(f=>(0,L.transformTextChange)(a,n,r,f,!1,N.isFormattingEnabled)?.[1]).filter(f=>!!f):[]:e(i,s)}}function Jl(n,e){return(t,s,i,r)=>{let o=t.replace(P,"/"),[a,c,l]=(0,B.getServiceScript)(n,o);if(c?.associatedOnly)return[];if(a){let f=(0,L.toGeneratedRange)(n,a,l,s,i,N.isFormattingEnabled);return f!==void 0?e(c.id,f[0],f[1],r).map(u=>(0,L.transformTextChange)(l,n,a,u,!1,N.isFormattingEnabled)?.[1]).filter(u=>!!u):[]}else return e(o,s,i,r)}}function Hl(n,e){return(t,s,i,r)=>{let o=t.replace(P,"/"),[a,c,l]=(0,B.getServiceScript)(n,o);if(c?.associatedOnly)return[];if(a){let f=(0,L.toGeneratedOffset)(n,a,l,s,N.isFormattingEnabled);return f!==void 0?e(c.id,f,i,r).map(u=>(0,L.transformTextChange)(l,n,a,u,!1,N.isFormattingEnabled)?.[1]).filter(u=>!!u):[]}else return e(o,s,i,r)}}function Wl(n,e){return(t,s,i,r)=>{let o=e(t,s,i,r);return(0,L.transformFileTextChanges)(n,o,!1,N.isRenameEnabled)}}function Ql(n,e){return(t,s)=>{let i=t.replace(P,"/"),[r,o,a]=(0,B.getServiceScript)(n,i);if(!o?.associatedOnly)if(r){let c=(0,L.toGeneratedOffset)(n,r,a,s,N.isLinkedEditingEnabled);if(c!==void 0){let l=e(o.id,c);if(l)return{ranges:l.ranges.map(f=>(0,L.transformTextSpan)(a,n,r,f,!1,N.isLinkedEditingEnabled)?.[1]).filter(f=>!!f),wordPattern:l.wordPattern}}}else return e(i,s)}}function zl(n,e){return(t,s)=>{let i=t.replace(P,"/"),[r,o,a]=(0,B.getServiceScript)(n,i);if(!o?.associatedOnly)if(r){let c=(0,L.toGeneratedOffset)(n,r,a,s,N.isCallHierarchyEnabled);if(c!==void 0){let l=e(o.id,c);if(Array.isArray(l))return l.map(f=>(0,L.transformCallHierarchyItem)(n,f,!0,N.isCallHierarchyEnabled));if(l)return(0,L.transformCallHierarchyItem)(n,l,!0,N.isCallHierarchyEnabled)}}else return e(i,s)}}function Xl(n,e){return(t,s)=>{let i=[],r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(a?.associatedOnly)return[];if(o){let l=(0,L.toGeneratedOffset)(n,o,c,s,N.isCallHierarchyEnabled);l!==void 0&&(i=e(a.id,l))}else i=e(r,s);return i.map(l=>{let f=(0,L.transformCallHierarchyItem)(n,l.from,!0,N.isCallHierarchyEnabled),d=l.fromSpans.map(u=>(0,L.transformSpan)(n,l.from.file,u,!0,N.isCallHierarchyEnabled)?.textSpan).filter(u=>!!u);return{from:f,fromSpans:d}})}}function Zl(n,e){return(t,s)=>{let i=[],r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(a?.associatedOnly)return[];if(o){let l=(0,L.toGeneratedOffset)(n,o,c,s,N.isCallHierarchyEnabled);l!==void 0&&(i=e(a.id,l))}else i=e(r,s);return i.map(l=>{let f=(0,L.transformCallHierarchyItem)(n,l.to,!0,N.isCallHierarchyEnabled),d=l.fromSpans.map(u=>o?(0,L.transformTextSpan)(c,n,o,u,!0,N.isCallHierarchyEnabled)?.[1]:u).filter(u=>!!u);return{to:f,fromSpans:d}})}}function ef(n,e){return(t,s,i)=>{let r=e(t,s,i);return(0,L.transformFileTextChanges)(n,r,!1,N.isCodeActionsEnabled)}}function tf(n,e){return(t,s,...i)=>{let r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(!a?.associatedOnly)if(o){let l=[];for(let[f]of(0,L.toGeneratedOffsets)(n,o,c,s,N.isHoverEnabled)){let d=e(a.id,f,...i);if(d){let u=(0,L.transformTextSpan)(c,n,o,d.textSpan,!0,N.isHoverEnabled)?.[1];u&&l.push({...d,textSpan:u})}}if(l.length===1)return l[0];if(l.length>=2){let f={...l[0]};f.displayParts=f.displayParts?.slice(),f.documentation=f.documentation?.slice(),f.tags=f.tags?.slice();let d=new Set([ye(l[0].displayParts)]),u=new Set([ye(l[0].documentation)]),p=new Set;for(let m of l[0].tags??[])p.add(m.name+"__volar__"+ye(m.text));for(let m=1;m<l.length;m++){let{displayParts:h,documentation:g,tags:S}=l[m];h?.length&&!d.has(ye(h))&&(d.add(ye(h)),f.displayParts??=[],f.displayParts.push({...h[0],text:`
|
|
2
|
-
|
|
3
|
-
`+h[0].text}),f.displayParts.push(...h.slice(1))),g?.length&&!u.has(ye(g))&&(u.add(ye(g)),f.documentation??=[],f.documentation.push({...g[0],text:`
|
|
4
|
-
|
|
5
|
-
`+g[0].text}),f.documentation.push(...g.slice(1)));for(let v of S??[])p.has(v.name+"__volar__"+ye(v.text))||(p.add(v.name+"__volar__"+ye(v.text)),f.tags??=[],f.tags.push(v))}return f}}else return e(r,s,...i)}}function nf(n,e){return(t,s,i)=>{let r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(!a?.associatedOnly)if(o){let l=(0,L.toGeneratedOffset)(n,o,c,s,N.isSignatureHelpEnabled);if(l!==void 0){let f=e(a.id,l,i);if(f){let d=(0,L.transformTextSpan)(c,n,o,f.applicableSpan,!0,N.isSignatureHelpEnabled)?.[1];if(d)return{...f,applicableSpan:d}}}}else return e(r,s,i)}}function sf(n,e){return(t,s,i)=>{let r=t.replace(P,"/");return Ce(n,r,s,N.isHighlightEnabled,(c,l)=>e(c,l,i),function*(c){for(let l of c)for(let f of l.highlightSpans)yield[f.fileName??l.fileName,f.textSpan.start]}).flat().map(c=>({...c,highlightSpans:c.highlightSpans.map(l=>{let{textSpan:f}=(0,L.transformSpan)(n,l.fileName??c.fileName,l.textSpan,!1,N.isHighlightEnabled)??{};if(f)return{...l,contextSpan:(0,L.transformSpan)(n,l.fileName??c.fileName,l.contextSpan,!1,N.isHighlightEnabled)?.textSpan,textSpan:f}}).filter(l=>!!l)}))}}function rf(n,e){return(t,s,i,r,o,a)=>{let c=t.replace(P,"/"),[l,f,d]=(0,B.getServiceScript)(n,c);if(f?.associatedOnly)return[];if(l){if(typeof s=="number"){let u=(0,L.toGeneratedOffset)(n,l,d,s,N.isCodeActionsEnabled);if(u!==void 0)return e(f.id,u,i,r,o,a)}else for(let[u,p]of(0,L.toGeneratedRanges)(n,l,d,s.pos,s.end,N.isCodeActionsEnabled))return e(f.id,{pos:u,end:p},i,r,o,a);return[]}else return e(c,s,i,r,o,a)}}function of(n,e){return(t,s,i,r,o,a,c)=>{let l,f=t.replace(P,"/"),[d,u,p]=(0,B.getServiceScript)(n,f);if(!u?.associatedOnly){if(d)if(typeof i=="number"){let m=(0,L.toGeneratedOffset)(n,d,p,i,N.isCodeActionsEnabled);m!==void 0&&(l=e(u.id,s,m,r,o,a,c))}else for(let[m,h]of(0,L.toGeneratedRanges)(n,d,p,i.pos,i.end,N.isCodeActionsEnabled))l=e(u.id,s,{pos:m,end:h},r,o,a,c);else l=e(f,s,i,r,o,a,c);if(l)return l.edits=(0,L.transformFileTextChanges)(n,l.edits,!1,N.isCodeActionsEnabled),l}}}function af(n,e){return(...t)=>{let s=e(...t);return s.changes=(0,L.transformFileTextChanges)(n,s.changes,!1,N.isCodeActionsEnabled),s}}function cf(n,e){return(t,s,i)=>{let r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(a?.associatedOnly)return{canRename:!1,localizedErrorMessage:"Cannot rename"};if(o){let l;for(let[f]of(0,L.toGeneratedOffsets)(n,o,c,s,N.isRenameEnabled)){let d=e(a.id,f,i);if(d.canRename){let u=(0,L.transformTextSpan)(c,n,o,d.triggerSpan,!1,N.isRenameEnabled)?.[1];if(u)return d.triggerSpan=u,d}else l=d}return l||{canRename:!1,localizedErrorMessage:"Failed to get rename locations"}}else return e(r,s,i)}}function lf(n,e){return(t,s,i,r,o,a)=>{let c=[],l=t.replace(P,"/"),[f,d,u]=(0,B.getServiceScript)(n,l);if(d?.associatedOnly)return[];if(f){let p=(0,L.toGeneratedRange)(n,f,u,s,i,N.isCodeActionsEnabled);p!==void 0&&(c=e(d.id,p[0],p[1],r,o,a))}else c=e(l,s,i,r,o,a);return c=c.map(p=>(p.changes=(0,L.transformFileTextChanges)(n,p.changes,!1,N.isCodeActionsEnabled),p)),c}}function ff(n,e){return(t,s,i)=>{let r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(a?.associatedOnly)return{spans:[],endOfLineState:0};if(o){let l=n.maps.get(o.code,a),f=(0,N.findOverlapCodeRange)(s.start,s.start+s.length,l,N.isSemanticTokensEnabled);if(!f)return{spans:[],endOfLineState:0};let d=(0,L.getMappingOffset)(n,o),u=f.start+d,p=f.end+d,m=e(a.id,{start:u,length:p-u},i),h=[];for(let g=0;g<m.spans.length;g+=3)for(let[S,v,C]of(0,L.toSourceRanges)(c,n,o,m.spans[g],m.spans[g]+m.spans[g+1],!1,N.isSemanticTokensEnabled)){h.push(v,C-v,m.spans[g+2]);break}return m.spans=h,m}else return e(r,s,i)}}function uf(n,e,t){return s=>{let i=s.replace(P,"/"),[r,o,a]=(0,B.getServiceScript)(n,i);return o?.associatedOnly?[]:t(o?.id??i).map(c=>(0,L.transformDiagnostic)(n,c,e.getProgram(),!1)).filter(c=>!!c).filter(c=>!r||n.scripts.get(c.file.fileName)===a)}}function df(n,e,t){return s=>{let i=s.replace(P,"/"),[r,o,a]=(0,B.getServiceScript)(n,i);return o?.associatedOnly?[]:t(o?.id??i).map(c=>(0,L.transformDiagnostic)(n,c,e.getProgram(),!1)).filter(c=>!!c).filter(c=>!r||!c.file||n.scripts.get(c.file.fileName)===a)}}function hf(n,e,t){return s=>{let i=s.replace(P,"/"),[r,o,a]=(0,B.getServiceScript)(n,i);return o?.associatedOnly?[]:t(o?.id??i).map(c=>(0,L.transformDiagnostic)(n,c,e.getProgram(),!1)).filter(c=>!!c).filter(c=>!r||!c.file||n.scripts.get(c.file.fileName)===a)}}function pf(n,e){return(t,s)=>{let i=t.replace(P,"/"),r=Ce(n,i,s,N.isDefinitionEnabled,(c,l)=>e(c,l),function*(c){for(let l of c.definitions??[])yield[l.fileName,l.textSpan.start]}),o=r.map(c=>(0,L.transformSpan)(n,i,c.textSpan,!0,N.isDefinitionEnabled)?.textSpan).filter(c=>!!c)[0];if(!o)return;let a=r.map(c=>c.definitions?.map(l=>(0,L.transformDocumentSpan)(n,l,!0,N.isDefinitionEnabled,l.fileName!==i)).filter(l=>!!l)??[]).flat();return{textSpan:o,definitions:(0,Ne.dedupeDocumentSpans)(a)}}}function mf(n,e){return(t,s)=>{let i=t.replace(P,"/");return Ce(n,i,s,N.isReferencesEnabled,(a,c)=>e(a,c),function*(a){for(let c of a)for(let l of c.references)yield[l.fileName,l.textSpan.start]}).flat().map(a=>({definition:(0,L.transformDocumentSpan)(n,a.definition,!0,N.isDefinitionEnabled,!0),references:a.references.map(l=>(0,L.transformDocumentSpan)(n,l,!0,N.isReferencesEnabled)).filter(l=>!!l)}))}}function gf(n,e){return(t,s)=>{let i=t.replace(P,"/"),o=Ce(n,i,s,N.isDefinitionEnabled,(a,c)=>e(a,c),function*(a){for(let c of a)yield[c.fileName,c.textSpan.start]}).flat().map(a=>(0,L.transformDocumentSpan)(n,a,!0,N.isDefinitionEnabled,a.fileName!==i)).filter(a=>!!a);return(0,Ne.dedupeDocumentSpans)(o)}}function yf(n,e){return(t,s)=>{let i=t.replace(P,"/"),o=Ce(n,i,s,N.isTypeDefinitionEnabled,(a,c)=>e(a,c),function*(a){for(let c of a)yield[c.fileName,c.textSpan.start]}).flat().map(a=>(0,L.transformDocumentSpan)(n,a,!0,N.isTypeDefinitionEnabled)).filter(a=>!!a);return(0,Ne.dedupeDocumentSpans)(o)}}function Sf(n,e){return(t,s)=>{let i=t.replace(P,"/"),o=Ce(n,i,s,N.isImplementationEnabled,(a,c)=>e(a,c),function*(a){for(let c of a)yield[c.fileName,c.textSpan.start]}).flat().map(a=>(0,L.transformDocumentSpan)(n,a,!0,N.isImplementationEnabled)).filter(a=>!!a);return(0,Ne.dedupeDocumentSpans)(o)}}function bf(n,e){return(t,s,i,r,o)=>{let a=t.replace(P,"/"),l=Ce(n,a,s,N.isRenameEnabled,(f,d)=>e(f,d,i,r,o),function*(f){for(let d of f)yield[d.fileName,d.textSpan.start]}).flat().map(f=>(0,L.transformDocumentSpan)(n,f,!1,N.isRenameEnabled)).filter(f=>!!f);return(0,Ne.dedupeDocumentSpans)(l)}}function vf(n,e){return(t,s)=>{let i=t.replace(P,"/"),o=Ce(n,i,s,N.isReferencesEnabled,(a,c)=>e(a,c),function*(a){for(let c of a)yield[c.fileName,c.textSpan.start]}).flat().map(a=>(0,L.transformDocumentSpan)(n,a,!0,N.isReferencesEnabled)).filter(a=>!!a);return(0,Ne.dedupeDocumentSpans)(o)}}function wf(n,e){return(t,s,i,r)=>{let o=t.replace(P,"/"),[a,c,l]=(0,B.getServiceScript)(n,o);if(!c?.associatedOnly)if(a){let f,d=[];for(let[p,m]of(0,L.toGeneratedOffsets)(n,a,l,s,N.isCompletionEnabled)){let h=typeof m.data.completion=="object"&&m.data.completion.isAdditional;if(!h&&f?.entries.length)continue;let g=e(c.id,p,i,r);if(g){typeof m.data.completion=="object"&&m.data.completion.onlyImport&&(g.entries=g.entries.filter(S=>!!S.sourceDisplay));for(let S of g.entries)S.replacementSpan=S.replacementSpan&&(0,L.transformTextSpan)(l,n,a,S.replacementSpan,!1,N.isCompletionEnabled)?.[1];g.optionalReplacementSpan=g.optionalReplacementSpan&&(0,L.transformTextSpan)(l,n,a,g.optionalReplacementSpan,!1,N.isCompletionEnabled)?.[1],h?d.push(g):f=g}}let u=d;if(f&&u.unshift(f),u.length)return{...u[0],entries:u.map(p=>p.entries).flat()}}else return e(o,s,i,r)}}function Of(n,e){return(t,s,i,r,o,a,c)=>{let l,f=t.replace(P,"/"),[d,u,p]=(0,B.getServiceScript)(n,f);if(!u?.associatedOnly){if(d){let m=(0,L.toGeneratedOffset)(n,d,p,s,N.isCompletionEnabled);m!==void 0&&(l=e(u.id,m,i,r,o,a,c))}else return e(f,s,i,r,o,a,c);if(l?.codeActions)for(let m of l.codeActions)m.changes=(0,L.transformFileTextChanges)(n,m.changes,!1,N.isCompletionEnabled);return l}}}function Ef(n,e){return(t,s,i)=>{let r=t.replace(P,"/"),[o,a,c]=(0,B.getServiceScript)(n,r);if(a?.associatedOnly)return[];if(o){let l=n.maps.get(o.code,c),f=(0,N.findOverlapCodeRange)(s.start,s.start+s.length,l,N.isSemanticTokensEnabled);if(!f)return[];let d=(0,L.getMappingOffset)(n,o),u=f.start+d,p=f.end+d,m=e(a.id,{start:u,length:p-u},i),h=[];for(let g of m){let S=(0,L.toSourceOffset)(c,n,o,g.position,N.isInlayHintsEnabled);S!==void 0&&h.push({...g,position:S[1]})}return h}else return e(r,s,i)}}function Nf(n,e){return t=>{let s=t.replace(P,"/"),r=e(s).map(o=>(0,L.transformDocumentSpan)(n,o,!0,N.isReferencesEnabled)).filter(o=>!!o);return(0,Ne.dedupeDocumentSpans)(r)}}function Cf(n,e){return(...t)=>{let i=e(...t).map(r=>(0,L.transformDocumentSpan)(n,r,!0,N.isReferencesEnabled)).filter(r=>!!r);return(0,Ne.dedupeDocumentSpans)(i)}}function Ce(n,e,t,s,i,r){let o=[],a=new Set,[c,l,f]=(0,B.getServiceScript)(n,e);if(c)for(let[u]of(0,L.toGeneratedOffsets)(n,c,f,t,s))d(l.id,u);else d(e,t);return o;function d(u,p){if(a.has(u+":"+p))return;a.add(u+":"+p);let m=i(u,p);if(m){o.push(m);for(let h of r(m)){a.add(h[0]+":"+h[1]);let[g]=(0,B.getServiceScript)(n,h[0]);if(!g)continue;let S=n.linkedCodeMaps.get(g.code);if(!S)continue;let v=(0,L.getMappingOffset)(n,g);for(let C of S.getLinkedOffsets(h[1]-v))d(h[0],C+v)}}}}function ye(n){return n?n.map(e=>e.text).join(""):""}});var br=b(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.resolveFileLanguageId=kf;function kf(n){switch(n.split(".").pop()){case"js":return"javascript";case"cjs":return"javascript";case"mjs":return"javascript";case"ts":return"typescript";case"cts":return"typescript";case"mts":return"typescript";case"jsx":return"javascriptreact";case"tsx":return"typescriptreact";case"json":return"json"}}});var vr=b(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.createResolveModuleName=Af;function Af(n,e,t,s,i){let r=new Map,o={readFile:t.readFile.bind(t),directoryExists:t.directoryExists?.bind(t),realpath:t.realpath?.bind(t),getCurrentDirectory:t.getCurrentDirectory?.bind(t),getDirectories:t.getDirectories?.bind(t),useCaseSensitiveFileNames:typeof t.useCaseSensitiveFileNames=="function"?t.useCaseSensitiveFileNames.bind(t):t.useCaseSensitiveFileNames,fileExists(c){let l=t.fileExists(c);for(let{typescript:f}of s)if(f){if(!l)for(let{extension:d}of f.extraFileExtensions){if(!c.endsWith(`.d.${d}.ts`))continue;let u=c.slice(0,-`.d.${d}.ts`.length)+`.${d}`;if(a(u)){let p=i(u);if(p?.generated){let m=p.generated.languagePlugin.typescript?.getServiceScript(p.generated.root);if(m){let h=u+".d.ts";return(m.extension===".js"||m.extension===".jsx")&&a(h)?r.set(c,{sourceFileName:h,extension:".ts"}):r.set(c,{sourceFileName:u,extension:m.extension}),!0}}}}if(f.resolveHiddenExtensions&&c.endsWith(".d.ts"))for(let{extension:d}of f.extraFileExtensions){let u=c.slice(0,-5)+`.${d}`;if(a(u)){let p=i(u);if(p?.generated){let m=p.generated.languagePlugin.typescript?.getServiceScript(p.generated.root);if(m)return r.set(c,{sourceFileName:u,extension:m.extension}),!0}}}}return l}};return(c,l,f,d,u,p)=>{let m=n.resolveModuleName(c,l,f,o,d,u,p);if(m.resolvedModule){let h=r.get(m.resolvedModule.resolvedFileName);h&&(m.resolvedModule.resolvedFileName=h.sourceFileName,m.resolvedModule.extension=h.extension)}return r.clear(),m};function a(c){return t.fileExists(c)?(e?.(c)??t.readFile(c)?.length??0)<4*1024*1024:!1}}});var wr=b(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.decorateLanguageServiceHost=qf;nn.searchExternalFiles=Tf;var Lf=vr(),_f=Zt();function qf(n,e,t){let s=e.plugins.map(u=>u.typescript?.extraFileExtensions.map(p=>"."+p.extension)??[]).flat(),i=new Map,r=new Set,o=t.readDirectory?.bind(t),a=t.resolveModuleNameLiterals?.bind(t),c=t.resolveModuleNames?.bind(t),l=t.getScriptSnapshot.bind(t),f=t.getScriptKind?.bind(t);if(o&&(t.readDirectory=(u,p,m,h,g)=>{if(p)for(let S of s)p.includes(S)||(p=[...p,S]);return o(u,p,m,h,g)}),s.length){let u=(0,Lf.createResolveModuleName)(n,n.sys.getFileSize,t,e.plugins,m=>e.scripts.get(m)),p=t.getModuleResolutionCache?.();a&&(t.resolveModuleNameLiterals=(m,h,g,S,v,...C)=>{let A=(0,_f.fixupImpliedNodeFormatForFile)(n,s,v,p?.getPackageJsonInfoCache(),t,S);try{return m.every(_=>!s.some(q=>_.text.endsWith(q)))?a(m,h,g,S,v,...C):m.map(_=>{let q=n.getModeForUsageLocation(v,_,S);return u(_.text,h,S,p,g,q)})}finally{A?.()}}),c&&(t.resolveModuleNames=(m,h,g,S,v,C)=>m.every(A=>!s.some(_=>A.endsWith(_)))?c(m,h,g,S,v,C):m.map(A=>u(A,h,v,p,S).resolvedModule))}t.getScriptSnapshot=u=>{let p=d(u,!0);return p?p.snapshot:l(u)},f&&(t.getScriptKind=u=>{let p=d(u,!1);return p?p.scriptKind:f(u)});function d(u,p){if(r.has(u))return;let m;try{m=t.getScriptVersion(u)}catch{r.add(u)}if(m===void 0)return;let h=i.get(u);if(!h||h[0]!==m){h=[m];let g=e.scripts.get(u,void 0,p);if(g?.generated){let S=g.generated.languagePlugin.typescript?.getServiceScript(g.generated.root);if(S)if(S.preventLeadingOffset)h[1]={extension:S.extension,scriptKind:S.scriptKind,snapshot:S.code.snapshot};else{let C=g.snapshot.getText(0,g.snapshot.getLength()).split(`
|
|
6
|
-
`).map(A=>" ".repeat(A.length)).join(`
|
|
7
|
-
`)+S.code.snapshot.getText(0,S.code.snapshot.getLength());h[1]={extension:S.extension,scriptKind:S.scriptKind,snapshot:n.ScriptSnapshot.fromString(C)}}g.generated.languagePlugin.typescript?.getExtraServiceScripts&&console.warn("getExtraServiceScripts() is not available in TS plugin.")}i.set(u,h)}return h[1]}}function Tf(n,e,t){if(e.projectKind!==n.server.ProjectKind.Configured)return[];let s=e.getProjectName(),i=n.readJsonConfigFile(s,e.readFile.bind(e)),r={useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),fileExists:e.fileExists.bind(e),readFile:e.readFile.bind(e),readDirectory:(...a)=>(a[1]=t,e.readDirectory(...a))};return n.parseJsonSourceFileConfigFileContent(i,r,e.getCurrentDirectory()).fileNames}});var Cr=b(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.makeGetExternalFiles=K.decoratedLanguageServiceHosts=K.decoratedLanguageServices=K.projectExternalFileExtensions=K.externalFiles=void 0;K.makeGetScriptInfoWithLargeFileFailsafe=Nr;K.createLanguageCommon=If;K.isHasAlreadyDecoratedLanguageService=Ff;var Or=Ye(),Mf=br(),Er=wr();K.externalFiles=new WeakMap;K.projectExternalFileExtensions=new WeakMap;K.decoratedLanguageServices=new WeakSet;K.decoratedLanguageServiceHosts=new WeakSet;function Nr(n){return e=>{try{return n.project.getScriptInfo(e)}catch{}}}function If(n,e,t,s){let i=t.languageServiceHost.getScriptSnapshot.bind(t.languageServiceHost),r=Nr(t),o=(0,Or.createLanguage)([...n.languagePlugins,{getLanguageId:Mf.resolveFileLanguageId}],new Or.FileMap(e.sys.useCaseSensitiveFileNames),(a,c,l)=>{let f;l?f=i(a):(f=r(a)?.getSnapshot(),f||(t.project.getScriptVersion(a),f=r(a)?.getSnapshot())),f?o.scripts.set(a,f):o.scripts.delete(a)},a=>{t.session.change({file:a,line:1,offset:1,endLine:1,endOffset:1,insertString:""})});s(o),(0,Er.decorateLanguageServiceHost)(e,o,t.languageServiceHost),n.setup?.(o)}var Pf=n=>(e,t=0)=>{if(t>=1||!K.externalFiles.has(e)){let s=K.externalFiles.get(e),i=K.projectExternalFileExtensions.get(e),r=i?.length?(0,Er.searchExternalFiles)(n,e,i):[];K.externalFiles.set(e,r),s&&!Df(s,r)&&e.refreshDiagnostics()}return K.externalFiles.get(e)};K.makeGetExternalFiles=Pf;function Df(n,e){if(n.length!==e.length)return!1;let t=new Set(n);for(let s of e)if(!t.has(s))return!1;return!0}function Ff(n){return K.decoratedLanguageServices.has(n.languageService)||K.decoratedLanguageServiceHosts.has(n.languageServiceHost)?!0:(K.decoratedLanguageServices.add(n.languageService),K.decoratedLanguageServiceHosts.add(n.languageServiceHost),!1)}});var kr=b(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.createLanguageServicePlugin=$f;var xf=Sr(),sn=Cr();function $f(n){return e=>{let{typescript:t}=e;return{create(i){if(!(0,sn.isHasAlreadyDecoratedLanguageService)(i)){let r=n(t,i),o=r.languagePlugins.map(l=>l.typescript?.extraFileExtensions.map(f=>"."+f.extension)??[]).flat();sn.projectExternalFileExtensions.set(i.project,o);let{proxy:a,initialize:c}=(0,xf.createProxyLanguageService)(i.languageService);i.languageService=a,(0,sn.createLanguageCommon)(r,t,i,c)}return i.languageService},getExternalFiles:(0,sn.makeGetExternalFiles)(t)}}}});var M=b(ne=>{"use strict";var ys=Symbol.for("yaml.alias"),Ar=Symbol.for("yaml.document"),rn=Symbol.for("yaml.map"),Lr=Symbol.for("yaml.pair"),Ss=Symbol.for("yaml.scalar"),on=Symbol.for("yaml.seq"),Se=Symbol.for("yaml.node.type"),jf=n=>!!n&&typeof n=="object"&&n[Se]===ys,Rf=n=>!!n&&typeof n=="object"&&n[Se]===Ar,Bf=n=>!!n&&typeof n=="object"&&n[Se]===rn,Kf=n=>!!n&&typeof n=="object"&&n[Se]===Lr,_r=n=>!!n&&typeof n=="object"&&n[Se]===Ss,Uf=n=>!!n&&typeof n=="object"&&n[Se]===on;function qr(n){if(n&&typeof n=="object")switch(n[Se]){case rn:case on:return!0}return!1}function Vf(n){if(n&&typeof n=="object")switch(n[Se]){case ys:case rn:case Ss:case on:return!0}return!1}var Yf=n=>(_r(n)||qr(n))&&!!n.anchor;ne.ALIAS=ys;ne.DOC=Ar;ne.MAP=rn;ne.NODE_TYPE=Se;ne.PAIR=Lr;ne.SCALAR=Ss;ne.SEQ=on;ne.hasAnchor=Yf;ne.isAlias=jf;ne.isCollection=qr;ne.isDocument=Rf;ne.isMap=Bf;ne.isNode=Vf;ne.isPair=Kf;ne.isScalar=_r;ne.isSeq=Uf});var lt=b(bs=>{"use strict";var W=M(),se=Symbol("break visit"),Tr=Symbol("skip children"),pe=Symbol("remove node");function an(n,e){let t=Mr(e);W.isDocument(n)?Je(null,n.contents,t,Object.freeze([n]))===pe&&(n.contents=null):Je(null,n,t,Object.freeze([]))}an.BREAK=se;an.SKIP=Tr;an.REMOVE=pe;function Je(n,e,t,s){let i=Ir(n,e,t,s);if(W.isNode(i)||W.isPair(i))return Pr(n,s,i),Je(n,i,t,s);if(typeof i!="symbol"){if(W.isCollection(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){let o=Je(r,e.items[r],t,s);if(typeof o=="number")r=o-1;else{if(o===se)return se;o===pe&&(e.items.splice(r,1),r-=1)}}}else if(W.isPair(e)){s=Object.freeze(s.concat(e));let r=Je("key",e.key,t,s);if(r===se)return se;r===pe&&(e.key=null);let o=Je("value",e.value,t,s);if(o===se)return se;o===pe&&(e.value=null)}}return i}async function cn(n,e){let t=Mr(e);W.isDocument(n)?await He(null,n.contents,t,Object.freeze([n]))===pe&&(n.contents=null):await He(null,n,t,Object.freeze([]))}cn.BREAK=se;cn.SKIP=Tr;cn.REMOVE=pe;async function He(n,e,t,s){let i=await Ir(n,e,t,s);if(W.isNode(i)||W.isPair(i))return Pr(n,s,i),He(n,i,t,s);if(typeof i!="symbol"){if(W.isCollection(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){let o=await He(r,e.items[r],t,s);if(typeof o=="number")r=o-1;else{if(o===se)return se;o===pe&&(e.items.splice(r,1),r-=1)}}}else if(W.isPair(e)){s=Object.freeze(s.concat(e));let r=await He("key",e.key,t,s);if(r===se)return se;r===pe&&(e.key=null);let o=await He("value",e.value,t,s);if(o===se)return se;o===pe&&(e.value=null)}}return i}function Mr(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Ir(n,e,t,s){if(typeof t=="function")return t(n,e,s);if(W.isMap(e))return t.Map?.(n,e,s);if(W.isSeq(e))return t.Seq?.(n,e,s);if(W.isPair(e))return t.Pair?.(n,e,s);if(W.isScalar(e))return t.Scalar?.(n,e,s);if(W.isAlias(e))return t.Alias?.(n,e,s)}function Pr(n,e,t){let s=e[e.length-1];if(W.isCollection(s))s.items[n]=t;else if(W.isPair(s))n==="key"?s.key=t:s.value=t;else if(W.isDocument(s))s.contents=t;else{let i=W.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}bs.visit=an;bs.visitAsync=cn});var vs=b(Fr=>{"use strict";var Dr=M(),Gf=lt(),Jf={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Hf=n=>n.replace(/[!,[\]{}]/g,e=>Jf[e]),ie=class{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ie.defaultYaml,e),this.tags=Object.assign({},ie.defaultTags,t)}clone(){let e=new ie(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new ie(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ie.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ie.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ie.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ie.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),i=s.shift();switch(i){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[r,o]=s;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=s;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[,s,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[s];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+Hf(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),i;if(e&&s.length>0&&Dr.isNode(e.contents)){let r={};Gf.visit(e.contents,(o,a)=>{Dr.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of s)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
8
|
-
`)}};ie.defaultYaml={explicit:!1,version:"1.2"};ie.defaultTags={"!!":"tag:yaml.org,2002:"};Fr.Directives=ie});var ln=b(ft=>{"use strict";var xr=M(),Wf=lt();function Qf(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function $r(n){let e=new Set;return Wf.visit(n,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function jr(n,e){for(let t=1;;++t){let s=`${n}${t}`;if(!e.has(s))return s}}function zf(n,e){let t=[],s=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=$r(n));let o=jr(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=s.get(r);if(typeof o=="object"&&o.anchor&&(xr.isScalar(o.node)||xr.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:s}}ft.anchorIsValid=Qf;ft.anchorNames=$r;ft.createNodeAnchors=zf;ft.findNewAnchor=jr});var ws=b(Rr=>{"use strict";function ut(n,e,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;i<r;++i){let o=s[i],a=ut(n,s,String(i),o);a===void 0?delete s[i]:a!==o&&(s[i]=a)}else if(s instanceof Map)for(let i of Array.from(s.keys())){let r=s.get(i),o=ut(n,s,i,r);o===void 0?s.delete(i):o!==r&&s.set(i,o)}else if(s instanceof Set)for(let i of Array.from(s)){let r=ut(n,s,i,i);r===void 0?s.delete(i):r!==i&&(s.delete(i),s.add(r))}else for(let[i,r]of Object.entries(s)){let o=ut(n,s,i,r);o===void 0?delete s[i]:o!==r&&(s[i]=o)}return n.call(e,t,s)}Rr.applyReviver=ut});var ke=b(Kr=>{"use strict";var Xf=M();function Br(n,e,t){if(Array.isArray(n))return n.map((s,i)=>Br(s,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!Xf.hasAnchor(n))return n.toJSON(e,t);let s={aliasCount:0,count:1,res:void 0};t.anchors.set(n,s),t.onCreate=r=>{s.res=r,delete t.onCreate};let i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!t?.keep?Number(n):n}Kr.toJS=Br});var fn=b(Vr=>{"use strict";var Zf=ws(),Ur=M(),eu=ke(),Os=class{constructor(e){Object.defineProperty(this,Ur.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:s,onAnchor:i,reviver:r}={}){if(!Ur.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 s=="number"?s:100},a=eu.toJS(this,"",o);if(typeof i=="function")for(let{count:c,res:l}of o.anchors.values())i(l,c);return typeof r=="function"?Zf.applyReviver(r,{"":a},"",a):a}};Vr.NodeBase=Os});var dt=b(Yr=>{"use strict";var tu=ln(),nu=lt(),We=M(),su=fn(),iu=ke(),Es=class extends su.NodeBase{constructor(e){super(We.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let s;t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],nu.visit(e,{Node:(r,o)=>{(We.isAlias(o)||We.hasAnchor(o))&&s.push(o)}}),t&&(t.aliasResolveCache=s));let i;for(let r of s){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:s,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=s.get(o);if(a||(iu.toJS(o,null,t),a=s.get(o)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=un(i,o,s)),a.count*a.aliasCount>r)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,t,s){let i=`*${this.source}`;if(e){if(tu.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 un(n,e,t){if(We.isAlias(e)){let s=e.resolve(n),i=t&&s&&t.get(s);return i?i.count*i.aliasCount:0}else if(We.isCollection(e)){let s=0;for(let i of e.items){let r=un(n,i,t);r>s&&(s=r)}return s}else if(We.isPair(e)){let s=un(n,e.key,t),i=un(n,e.value,t);return Math.max(s,i)}return 1}Yr.Alias=Es});var J=b(Ns=>{"use strict";var ru=M(),ou=fn(),au=ke(),cu=n=>!n||typeof n!="function"&&typeof n!="object",Ae=class extends ou.NodeBase{constructor(e){super(ru.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:au.toJS(this.value,e,t)}toString(){return String(this.value)}};Ae.BLOCK_FOLDED="BLOCK_FOLDED";Ae.BLOCK_LITERAL="BLOCK_LITERAL";Ae.PLAIN="PLAIN";Ae.QUOTE_DOUBLE="QUOTE_DOUBLE";Ae.QUOTE_SINGLE="QUOTE_SINGLE";Ns.Scalar=Ae;Ns.isScalarValue=cu});var ht=b(Jr=>{"use strict";var lu=dt(),$e=M(),Gr=J(),fu="tag:yaml.org,2002:";function uu(n,e,t){if(e){let s=t.filter(r=>r.tag===e),i=s.find(r=>!r.format)??s[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(s=>s.identify?.(n)&&!s.format)}function du(n,e,t){if($e.isDocument(n)&&(n=n.contents),$e.isNode(n))return n;if($e.isPair(n)){let d=t.schema[$e.MAP].createNode?.(t.schema,null,t);return d.items.push(n),d}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:s,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,c;if(s&&n&&typeof n=="object"){if(c=a.get(n),c)return c.anchor??(c.anchor=i(n)),new lu.Alias(c.anchor);c={anchor:null,node:null},a.set(n,c)}e?.startsWith("!!")&&(e=fu+e.slice(2));let l=uu(n,e,o.tags);if(!l){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){let d=new Gr.Scalar(n);return c&&(c.node=d),d}l=n instanceof Map?o[$e.MAP]:Symbol.iterator in Object(n)?o[$e.SEQ]:o[$e.MAP]}r&&(r(l),delete t.onTagObj);let f=l?.createNode?l.createNode(t.schema,n,t):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(t.schema,n,t):new Gr.Scalar(n);return e?f.tag=e:l.default||(f.tag=l.tag),c&&(c.node=f),f}Jr.createNode=du});var hn=b(dn=>{"use strict";var hu=ht(),me=M(),pu=fn();function Cs(n,e,t){let s=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]=s,s=o}else s=new Map([[r,s]])}return hu.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}var Hr=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done,ks=class extends pu.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(s=>me.isNode(s)||me.isPair(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Hr(e))this.add(t);else{let[s,...i]=e,r=this.get(s,!0);if(me.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(s,Cs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}deleteIn(e){let[t,...s]=e;if(s.length===0)return this.delete(t);let i=this.get(t,!0);if(me.isCollection(i))return i.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...i]=e,r=this.get(s,!0);return i.length===0?!t&&me.isScalar(r)?r.value:r:me.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!me.isPair(t))return!1;let s=t.value;return s==null||e&&me.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(s.length===0)return this.has(t);let i=this.get(t,!0);return me.isCollection(i)?i.hasIn(s):!1}setIn(e,t){let[s,...i]=e;if(i.length===0)this.set(s,t);else{let r=this.get(s,!0);if(me.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(s,Cs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}};dn.Collection=ks;dn.collectionFromPath=Cs;dn.isEmptyPath=Hr});var pt=b(pn=>{"use strict";var mu=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function As(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}var gu=(n,e,t)=>n.endsWith(`
|
|
9
|
-
`)?As(t,e):t.includes(`
|
|
10
|
-
`)?`
|
|
11
|
-
`+As(t,e):(n.endsWith(" ")?"":" ")+t;pn.indentComment=As;pn.lineComment=gu;pn.stringifyComment=mu});var Qr=b(mt=>{"use strict";var yu="flow",Ls="block",mn="quoted";function Su(n,e,t="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return n;i<r&&(r=0);let c=Math.max(1+r,1+i-e.length);if(n.length<=c)return n;let l=[],f={},d=i-e.length;typeof s=="number"&&(s>i-Math.max(2,r)?l.push(0):d=i-s);let u,p,m=!1,h=-1,g=-1,S=-1;t===Ls&&(h=Wr(n,h,e.length),h!==-1&&(d=h+c));for(let C;C=n[h+=1];){if(t===mn&&C==="\\"){switch(g=h,n[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}S=h}if(C===`
|
|
12
|
-
`)t===Ls&&(h=Wr(n,h,e.length)),d=h+e.length+c,u=void 0;else{if(C===" "&&p&&p!==" "&&p!==`
|
|
13
|
-
`&&p!==" "){let A=n[h+1];A&&A!==" "&&A!==`
|
|
14
|
-
`&&A!==" "&&(u=h)}if(h>=d)if(u)l.push(u),d=u+c,u=void 0;else if(t===mn){for(;p===" "||p===" ";)p=C,C=n[h+=1],m=!0;let A=h>S+1?h-2:g-1;if(f[A])return n;l.push(A),f[A]=!0,d=A+c,u=void 0}else m=!0}p=C}if(m&&a&&a(),l.length===0)return n;o&&o();let v=n.slice(0,l[0]);for(let C=0;C<l.length;++C){let A=l[C],_=l[C+1]||n.length;A===0?v=`
|
|
15
|
-
${e}${n.slice(0,_)}`:(t===mn&&f[A]&&(v+=`${n[A]}\\`),v+=`
|
|
16
|
-
${e}${n.slice(A+1,_)}`)}return v}function Wr(n,e,t){let s=e,i=e+1,r=n[i];for(;r===" "||r===" ";)if(e<i+t)r=n[++e];else{do r=n[++e];while(r&&r!==`
|
|
17
|
-
`);s=e,i=e+1,r=n[i]}return s}mt.FOLD_BLOCK=Ls;mt.FOLD_FLOW=yu;mt.FOLD_QUOTED=mn;mt.foldFlowLines=Su});var yt=b(zr=>{"use strict";var le=J(),Le=Qr(),yn=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Sn=n=>/^(%|---|\.\.\.)/m.test(n);function bu(n,e,t){if(!e||e<0)return!1;let s=e-t,i=n.length;if(i<=s)return!1;for(let r=0,o=0;r<i;++r)if(n[r]===`
|
|
18
|
-
`){if(r-o>s)return!0;if(o=r+1,i-o<=s)return!1}return!0}function gt(n,e){let t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:s}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(Sn(n)?" ":""),o="",a=0;for(let c=0,l=t[c];l;l=t[++c])if(l===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(t[c+1]){case"u":{o+=t.slice(a,c);let f=t.substr(c+2,4);switch(f){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:f.substr(0,2)==="00"?o+="\\x"+f.substr(2):o+=t.substr(c,6)}c+=5,a=c+1}break;case"n":if(s||t[c+2]==='"'||t.length<i)c+=1;else{for(o+=t.slice(a,c)+`
|
|
19
|
-
|
|
20
|
-
`;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)o+=`
|
|
21
|
-
`,c+=2;o+=r,t[c+2]===" "&&(o+="\\"),c+=1,a=c+1}break;default:c+=1}return o=a?o+t.slice(a):t,s?o:Le.foldFlowLines(o,r,Le.FOLD_QUOTED,yn(e,!1))}function _s(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
|
22
|
-
`)||/[ \t]\n|\n[ \t]/.test(n))return gt(n,e);let t=e.indent||(Sn(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
23
|
-
${t}`)+"'";return e.implicitKey?s:Le.foldFlowLines(s,t,Le.FOLD_FLOW,yn(e,!1))}function Qe(n,e){let{singleQuote:t}=e.options,s;if(t===!1)s=gt;else{let i=n.includes('"'),r=n.includes("'");i&&!r?s=_s:r&&!i?s=gt:s=t?_s:gt}return s(n,e)}var qs;try{qs=new RegExp(`(^|(?<!
|
|
24
|
-
))
|
|
25
|
-
+(?!
|
|
26
|
-
|$)`,"g")}catch{qs=/\n+(?!\n|$)/g}function gn({comment:n,type:e,value:t},s,i,r){let{blockQuote:o,commentString:a,lineWidth:c}=s.options;if(!o||/\n[\t ]+$/.test(t))return Qe(t,s);let l=s.indent||(s.forceBlockIndent||Sn(t)?" ":""),f=o==="literal"?!0:o==="folded"||e===le.Scalar.BLOCK_FOLDED?!1:e===le.Scalar.BLOCK_LITERAL?!0:!bu(t,c,l.length);if(!t)return f?`|
|
|
27
|
-
`:`>
|
|
28
|
-
`;let d,u;for(u=t.length;u>0;--u){let _=t[u-1];if(_!==`
|
|
29
|
-
`&&_!==" "&&_!==" ")break}let p=t.substring(u),m=p.indexOf(`
|
|
30
|
-
`);m===-1?d="-":t===p||m!==p.length-1?(d="+",r&&r()):d="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
|
|
31
|
-
`&&(p=p.slice(0,-1)),p=p.replace(qs,`$&${l}`));let h=!1,g,S=-1;for(g=0;g<t.length;++g){let _=t[g];if(_===" ")h=!0;else if(_===`
|
|
32
|
-
`)S=g;else break}let v=t.substring(0,S<g?S+1:g);v&&(t=t.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let A=(h?l?"2":"1":"")+d;if(n&&(A+=" "+a(n.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){let _=t.replace(/\n+/g,`
|
|
33
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),q=!1,F=yn(s,!0);o!=="folded"&&e!==le.Scalar.BLOCK_FOLDED&&(F.onOverflow=()=>{q=!0});let k=Le.foldFlowLines(`${v}${_}${p}`,l,Le.FOLD_BLOCK,F);if(!q)return`>${A}
|
|
34
|
-
${l}${k}`}return t=t.replace(/\n+/g,`$&${l}`),`|${A}
|
|
35
|
-
${l}${v}${t}${p}`}function vu(n,e,t,s){let{type:i,value:r}=n,{actualString:o,implicitKey:a,indent:c,indentStep:l,inFlow:f}=e;if(a&&r.includes(`
|
|
36
|
-
`)||f&&/[[\]{},]/.test(r))return Qe(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||f||!r.includes(`
|
|
37
|
-
`)?Qe(r,e):gn(n,e,t,s);if(!a&&!f&&i!==le.Scalar.PLAIN&&r.includes(`
|
|
38
|
-
`))return gn(n,e,t,s);if(Sn(r)){if(c==="")return e.forceBlockIndent=!0,gn(n,e,t,s);if(a&&c===l)return Qe(r,e)}let d=r.replace(/\n+/g,`$&
|
|
39
|
-
${c}`);if(o){let u=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:p,tags:m}=e.doc.schema;if(m.some(u)||p?.some(u))return Qe(r,e)}return a?d:Le.foldFlowLines(d,c,Le.FOLD_FLOW,yn(e,!1))}function wu(n,e,t,s){let{implicitKey:i,inFlow:r}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)}),{type:a}=n;a!==le.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=le.Scalar.QUOTE_DOUBLE);let c=f=>{switch(f){case le.Scalar.BLOCK_FOLDED:case le.Scalar.BLOCK_LITERAL:return i||r?Qe(o.value,e):gn(o,e,t,s);case le.Scalar.QUOTE_DOUBLE:return gt(o.value,e);case le.Scalar.QUOTE_SINGLE:return _s(o.value,e);case le.Scalar.PLAIN:return vu(o,e,t,s);default:return null}},l=c(a);if(l===null){let{defaultKeyType:f,defaultStringType:d}=e.options,u=i&&f||d;if(l=c(u),l===null)throw new Error(`Unsupported default string type ${u}`)}return l}zr.stringifyString=wu});var St=b(Ts=>{"use strict";var Ou=ln(),_e=M(),Eu=pt(),Nu=yt();function Cu(n,e){let t=Object.assign({blockQuote:!0,commentString:Eu.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},n.schema.toStringOptions,e),s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function ku(n,e){if(e.tag){let i=n.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,s;if(_e.isScalar(e)){s=e.value;let i=n.filter(r=>r.identify?.(s));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 s=e,t=n.find(i=>i.nodeClass&&s instanceof i.nodeClass);if(!t){let i=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${i} value`)}return t}function Au(n,e,{anchors:t,doc:s}){if(!s.directives)return"";let i=[],r=(_e.isScalar(n)||_e.isCollection(n))&&n.anchor;r&&Ou.anchorIsValid(r)&&(t.add(r),i.push(`&${r}`));let o=n.tag??(e.default?null:e.tag);return o&&i.push(s.directives.tagString(o)),i.join(" ")}function Lu(n,e,t,s){if(_e.isPair(n))return n.toString(e,t,s);if(_e.isAlias(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let i,r=_e.isNode(n)?n:e.doc.createNode(n,{onTagObj:c=>i=c});i??(i=ku(e.doc.schema.tags,r));let o=Au(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,s):_e.isScalar(r)?Nu.stringifyString(r,e,t,s):r.toString(e,t,s);return o?_e.isScalar(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
40
|
-
${e.indent}${a}`:a}Ts.createStringifyContext=Cu;Ts.stringify=Lu});var to=b(eo=>{"use strict";var be=M(),Xr=J(),Zr=St(),bt=pt();function _u({key:n,value:e},t,s,i){let{allNullValues:r,doc:o,indent:a,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:d}}=t,u=be.isNode(n)&&n.comment||null;if(d){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(be.isCollection(n)||!be.isNode(n)&&typeof n=="object"){let F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}let p=!d&&(!n||u&&e==null&&!t.inFlow||be.isCollection(n)||(be.isScalar(n)?n.type===Xr.Scalar.BLOCK_FOLDED||n.type===Xr.Scalar.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(d||!r),indent:a+c});let m=!1,h=!1,g=Zr.stringify(n,t,()=>m=!0,()=>h=!0);if(!p&&!t.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(r||e==null)return m&&s&&s(),g===""?"?":p?`? ${g}`:g}else if(r&&!d||e==null&&p)return g=`? ${g}`,u&&!m?g+=bt.lineComment(g,t.indent,l(u)):h&&i&&i(),g;m&&(u=null),p?(u&&(g+=bt.lineComment(g,t.indent,l(u))),g=`? ${g}
|
|
41
|
-
${a}:`):(g=`${g}:`,u&&(g+=bt.lineComment(g,t.indent,l(u))));let S,v,C;be.isNode(e)?(S=!!e.spaceBefore,v=e.commentBefore,C=e.comment):(S=!1,v=null,C=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!p&&!u&&be.isScalar(e)&&(t.indentAtStart=g.length+1),h=!1,!f&&c.length>=2&&!t.inFlow&&!p&&be.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let A=!1,_=Zr.stringify(e,t,()=>A=!0,()=>h=!0),q=" ";if(u||S||v){if(q=S?`
|
|
42
|
-
`:"",v){let F=l(v);q+=`
|
|
43
|
-
${bt.indentComment(F,t.indent)}`}_===""&&!t.inFlow?q===`
|
|
44
|
-
`&&C&&(q=`
|
|
45
|
-
|
|
46
|
-
`):q+=`
|
|
47
|
-
${t.indent}`}else if(!p&&be.isCollection(e)){let F=_[0],k=_.indexOf(`
|
|
48
|
-
`),Y=k!==-1,ue=t.inFlow??e.flow??e.items.length===0;if(Y||!ue){let ge=!1;if(Y&&(F==="&"||F==="!")){let V=_.indexOf(" ");F==="&"&&V!==-1&&V<k&&_[V+1]==="!"&&(V=_.indexOf(" ",V+1)),(V===-1||k<V)&&(ge=!0)}ge||(q=`
|
|
49
|
-
${t.indent}`)}}else(_===""||_[0]===`
|
|
50
|
-
`)&&(q="");return g+=q+_,t.inFlow?A&&s&&s():C&&!A?g+=bt.lineComment(g,t.indent,l(C)):h&&i&&i(),g}eo.stringifyPair=_u});var Is=b(Ms=>{"use strict";var no=require("process");function qu(n,...e){n==="debug"&&console.log(...e)}function Tu(n,e){(n==="debug"||n==="warn")&&(typeof no.emitWarning=="function"?no.emitWarning(e):console.warn(e))}Ms.debug=qu;Ms.warn=Tu});var On=b(wn=>{"use strict";var vt=M(),so=J(),bn="<<",vn={identify:n=>n===bn||typeof n=="symbol"&&n.description===bn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new so.Scalar(Symbol(bn)),{addToJSMap:io}),stringify:()=>bn},Mu=(n,e)=>(vn.identify(e)||vt.isScalar(e)&&(!e.type||e.type===so.Scalar.PLAIN)&&vn.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===vn.tag&&t.default);function io(n,e,t){if(t=n&&vt.isAlias(t)?t.resolve(n.doc):t,vt.isSeq(t))for(let s of t.items)Ps(n,e,s);else if(Array.isArray(t))for(let s of t)Ps(n,e,s);else Ps(n,e,t)}function Ps(n,e,t){let s=n&&vt.isAlias(t)?t.resolve(n.doc):t;if(!vt.isMap(s))throw new Error("Merge sources must be maps or map aliases");let i=s.toJSON(null,n,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}wn.addMergeToJSMap=io;wn.isMergeKey=Mu;wn.merge=vn});var Fs=b(ao=>{"use strict";var Iu=Is(),ro=On(),Pu=St(),oo=M(),Ds=ke();function Du(n,e,{key:t,value:s}){if(oo.isNode(t)&&t.addToJSMap)t.addToJSMap(n,e,s);else if(ro.isMergeKey(n,t))ro.addMergeToJSMap(n,e,s);else{let i=Ds.toJS(t,"",n);if(e instanceof Map)e.set(i,Ds.toJS(s,i,n));else if(e instanceof Set)e.add(i);else{let r=Fu(t,i,n),o=Ds.toJS(s,r,n);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Fu(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(oo.isNode(n)&&t?.doc){let s=Pu.createStringifyContext(t.doc,{});s.anchors=new Set;for(let r of t.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;let i=n.toString(s);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),Iu.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)}ao.addPairToJSMap=Du});var qe=b(xs=>{"use strict";var co=ht(),xu=to(),$u=Fs(),En=M();function ju(n,e,t){let s=co.createNode(n,void 0,t),i=co.createNode(e,void 0,t);return new ze(s,i)}var ze=class{constructor(e,t=null){Object.defineProperty(this,En.NODE_TYPE,{value:En.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return En.isNode(t)&&(t=t.clone(e)),En.isNode(s)&&(s=s.clone(e)),new ze(t,s)}toJSON(e,t){let s=t?.mapAsMap?new Map:{};return $u.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?xu.stringifyPair(this,e,t,s):JSON.stringify(this)}};xs.Pair=ze;xs.createPair=ju});var $s=b(fo=>{"use strict";var je=M(),lo=St(),Nn=pt();function Ru(n,e,t){return(e.inFlow??n.flow?Ku:Bu)(n,e,t)}function Bu({comment:n,items:e},t,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:c,options:{commentString:l}}=t,f=Object.assign({},t,{indent:r,type:null}),d=!1,u=[];for(let m=0;m<e.length;++m){let h=e[m],g=null;if(je.isNode(h))!d&&h.spaceBefore&&u.push(""),Cn(t,u,h.commentBefore,d),h.comment&&(g=h.comment);else if(je.isPair(h)){let v=je.isNode(h.key)?h.key:null;v&&(!d&&v.spaceBefore&&u.push(""),Cn(t,u,v.commentBefore,d))}d=!1;let S=lo.stringify(h,f,()=>g=null,()=>d=!0);g&&(S+=Nn.lineComment(S,r,l(g))),d&&g&&(d=!1),u.push(s+S)}let p;if(u.length===0)p=i.start+i.end;else{p=u[0];for(let m=1;m<u.length;++m){let h=u[m];p+=h?`
|
|
51
|
-
${c}${h}`:`
|
|
52
|
-
`}}return n?(p+=`
|
|
53
|
-
`+Nn.indentComment(l(n),c),a&&a()):d&&o&&o(),p}function Ku({items:n},e,{flowChars:t,itemIndent:s}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;s+=r;let c=Object.assign({},e,{indent:s,inFlow:!0,type:null}),l=!1,f=0,d=[];for(let m=0;m<n.length;++m){let h=n[m],g=null;if(je.isNode(h))h.spaceBefore&&d.push(""),Cn(e,d,h.commentBefore,!1),h.comment&&(g=h.comment);else if(je.isPair(h)){let v=je.isNode(h.key)?h.key:null;v&&(v.spaceBefore&&d.push(""),Cn(e,d,v.commentBefore,!1),v.comment&&(l=!0));let C=je.isNode(h.value)?h.value:null;C?(C.comment&&(g=C.comment),C.commentBefore&&(l=!0)):h.value==null&&v?.comment&&(g=v.comment)}g&&(l=!0);let S=lo.stringify(h,c,()=>g=null);m<n.length-1&&(S+=","),g&&(S+=Nn.lineComment(S,s,a(g))),!l&&(d.length>f||S.includes(`
|
|
54
|
-
`))&&(l=!0),d.push(S),f=d.length}let{start:u,end:p}=t;if(d.length===0)return u+p;if(!l){let m=d.reduce((h,g)=>h+g.length+2,2);l=e.options.lineWidth>0&&m>e.options.lineWidth}if(l){let m=u;for(let h of d)m+=h?`
|
|
55
|
-
${r}${i}${h}`:`
|
|
56
|
-
`;return`${m}
|
|
57
|
-
${i}${p}`}else return`${u}${o}${d.join(" ")}${o}${p}`}function Cn({indent:n,options:{commentString:e}},t,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){let r=Nn.indentComment(e(s),n);t.push(r.trimStart())}}fo.stringifyCollection=Ru});var Me=b(Rs=>{"use strict";var Uu=$s(),Vu=Fs(),Yu=hn(),Te=M(),kn=qe(),Gu=J();function wt(n,e){let t=Te.isScalar(e)?e.value:e;for(let s of n)if(Te.isPair(s)&&(s.key===e||s.key===t||Te.isScalar(s.key)&&s.key.value===t))return s}var js=class extends Yu.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Te.MAP,e),this.items=[]}static from(e,t,s){let{keepUndefined:i,replacer:r}=s,o=new this(e),a=(c,l)=>{if(typeof r=="function")l=r.call(t,c,l);else if(Array.isArray(r)&&!r.includes(c))return;(l!==void 0||i)&&o.items.push(kn.createPair(c,l,s))};if(t instanceof Map)for(let[c,l]of t)a(c,l);else if(t&&typeof t=="object")for(let c of Object.keys(t))a(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let s;Te.isPair(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new kn.Pair(e,e?.value):s=new kn.Pair(e.key,e.value);let i=wt(this.items,s.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${s.key} already set`);Te.isScalar(i.value)&&Gu.isScalarValue(s.value)?i.value.value=s.value:i.value=s.value}else if(r){let o=this.items.findIndex(a=>r(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let t=wt(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=wt(this.items,e)?.value;return(!t&&Te.isScalar(i)?i.value:i)??void 0}has(e){return!!wt(this.items,e)}set(e,t){this.add(new kn.Pair(e,t),!0)}toJSON(e,t,s){let i=s?new s:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)Vu.addPairToJSMap(t,i,r);return i}toString(e,t,s){if(!e)return JSON.stringify(this);for(let i of this.items)if(!Te.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})),Uu.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}};Rs.YAMLMap=js;Rs.findPair=wt});var Xe=b(ho=>{"use strict";var Ju=M(),uo=Me(),Hu={collection:"map",default:!0,nodeClass:uo.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(n,e){return Ju.isMap(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>uo.YAMLMap.from(n,e,t)};ho.map=Hu});var Ie=b(po=>{"use strict";var Wu=ht(),Qu=$s(),zu=hn(),Ln=M(),Xu=J(),Zu=ke(),Bs=class extends zu.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ln.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=An(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let s=An(e);if(typeof s!="number")return;let i=this.items[s];return!t&&Ln.isScalar(i)?i.value:i}has(e){let t=An(e);return typeof t=="number"&&t<this.items.length}set(e,t){let s=An(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[s];Ln.isScalar(i)&&Xu.isScalarValue(t)?i.value=t:this.items[s]=t}toJSON(e,t){let s=[];t?.onCreate&&t.onCreate(s);let i=0;for(let r of this.items)s.push(Zu.toJS(r,String(i++),t));return s}toString(e,t,s){return e?Qu.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){let{replacer:i}=s,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){let c=t instanceof Set?a:String(o++);a=i.call(t,c,a)}r.items.push(Wu.createNode(a,void 0,s))}}return r}};function An(n){let e=Ln.isScalar(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}po.YAMLSeq=Bs});var Ze=b(go=>{"use strict";var ed=M(),mo=Ie(),td={collection:"seq",default:!0,nodeClass:mo.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(n,e){return ed.isSeq(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>mo.YAMLSeq.from(n,e,t)};go.seq=td});var Ot=b(yo=>{"use strict";var nd=yt(),sd={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,s){return e=Object.assign({actualString:!0},e),nd.stringifyString(n,e,t,s)}};yo.string=sd});var _n=b(vo=>{"use strict";var So=J(),bo={identify:n=>n==null,createNode:()=>new So.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new So.Scalar(null),stringify:({source:n},e)=>typeof n=="string"&&bo.test.test(n)?n:e.options.nullStr};vo.nullTag=bo});var Ks=b(Oo=>{"use strict";var id=J(),wo={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new id.Scalar(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&wo.test.test(n)){let s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?t.options.trueStr:t.options.falseStr}};Oo.boolTag=wo});var et=b(Eo=>{"use strict";function rd({format:n,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);let i=typeof s=="number"?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(s,-0)?"-0":JSON.stringify(s);if(!n&&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}Eo.stringifyNumber=rd});var Vs=b(qn=>{"use strict";var od=J(),Us=et(),ad={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Us.stringifyNumber},cd={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():Us.stringifyNumber(n)}},ld={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){let e=new od.Scalar(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:Us.stringifyNumber};qn.float=ld;qn.floatExp=cd;qn.floatNaN=ad});var Gs=b(Mn=>{"use strict";var No=et(),Tn=n=>typeof n=="bigint"||Number.isInteger(n),Ys=(n,e,t,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),t);function Co(n,e,t){let{value:s}=n;return Tn(s)&&s>=0?t+s.toString(e):No.stringifyNumber(n)}var fd={identify:n=>Tn(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>Ys(n,2,8,t),stringify:n=>Co(n,8,"0o")},ud={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>Ys(n,0,10,t),stringify:No.stringifyNumber},dd={identify:n=>Tn(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>Ys(n,2,16,t),stringify:n=>Co(n,16,"0x")};Mn.int=ud;Mn.intHex=dd;Mn.intOct=fd});var Ao=b(ko=>{"use strict";var hd=Xe(),pd=_n(),md=Ze(),gd=Ot(),yd=Ks(),Js=Vs(),Hs=Gs(),Sd=[hd.map,md.seq,gd.string,pd.nullTag,yd.boolTag,Hs.intOct,Hs.int,Hs.intHex,Js.floatNaN,Js.floatExp,Js.float];ko.schema=Sd});var qo=b(_o=>{"use strict";var bd=J(),vd=Xe(),wd=Ze();function Lo(n){return typeof n=="bigint"||Number.isInteger(n)}var In=({value:n})=>JSON.stringify(n),Od=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:In},{identify:n=>n==null,createNode:()=>new bd.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:In},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:In},{identify:Lo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>Lo(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:In}],Ed={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},Nd=[vd.map,wd.seq].concat(Od,Ed);_o.schema=Nd});var Qs=b(To=>{"use strict";var Et=require("buffer"),Ws=J(),Cd=yt(),kd={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Et.Buffer=="function")return Et.Buffer.from(n,"base64");if(typeof atob=="function"){let t=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let i=0;i<t.length;++i)s[i]=t.charCodeAt(i);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},s,i,r){if(!t)return"";let o=t,a;if(typeof Et.Buffer=="function")a=o instanceof Et.Buffer?o.toString("base64"):Et.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<o.length;++l)c+=String.fromCharCode(o[l]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Ws.Scalar.BLOCK_LITERAL),e!==Ws.Scalar.QUOTE_DOUBLE){let c=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),l=Math.ceil(a.length/c),f=new Array(l);for(let d=0,u=0;d<l;++d,u+=c)f[d]=a.substr(u,c);a=f.join(e===Ws.Scalar.BLOCK_LITERAL?`
|
|
58
|
-
`:" ")}return Cd.stringifyString({comment:n,type:e,value:a},s,i,r)}};To.binary=kd});var Fn=b(Dn=>{"use strict";var Pn=M(),zs=qe(),Ad=J(),Ld=Ie();function Mo(n,e){if(Pn.isSeq(n))for(let t=0;t<n.items.length;++t){let s=n.items[t];if(!Pn.isPair(s)){if(Pn.isMap(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");let i=s.items[0]||new zs.Pair(new Ad.Scalar(null));if(s.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${s.commentBefore}
|
|
59
|
-
${i.key.commentBefore}`:s.commentBefore),s.comment){let r=i.value??i.key;r.comment=r.comment?`${s.comment}
|
|
60
|
-
${r.comment}`:s.comment}s=i}n.items[t]=Pn.isPair(s)?s:new zs.Pair(s)}}else e("Expected a sequence for this tag");return n}function Io(n,e,t){let{replacer:s}=t,i=new Ld.YAMLSeq(n);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)a=l[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=o;i.items.push(zs.createPair(a,c,t))}return i}var _d={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mo,createNode:Io};Dn.createPairs=Io;Dn.pairs=_d;Dn.resolvePairs=Mo});var ei=b(Zs=>{"use strict";var Po=M(),Xs=ke(),Nt=Me(),qd=Ie(),Do=Fn(),ve=class extends qd.YAMLSeq{constructor(){super(),this.add=Nt.YAMLMap.prototype.add.bind(this),this.delete=Nt.YAMLMap.prototype.delete.bind(this),this.get=Nt.YAMLMap.prototype.get.bind(this),this.has=Nt.YAMLMap.prototype.has.bind(this),this.set=Nt.YAMLMap.prototype.set.bind(this),this.tag=ve.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;t?.onCreate&&t.onCreate(s);for(let i of this.items){let r,o;if(Po.isPair(i)?(r=Xs.toJS(i.key,"",t),o=Xs.toJS(i.value,r,t)):r=Xs.toJS(i,"",t),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}static from(e,t,s){let i=Do.createPairs(e,t,s),r=new this;return r.items=i.items,r}};ve.tag="tag:yaml.org,2002:omap";var Td={collection:"seq",identify:n=>n instanceof Map,nodeClass:ve,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){let t=Do.resolvePairs(n,e),s=[];for(let{key:i}of t.items)Po.isScalar(i)&&(s.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):s.push(i.value));return Object.assign(new ve,t)},createNode:(n,e,t)=>ve.from(n,e,t)};Zs.YAMLOMap=ve;Zs.omap=Td});var Ro=b(ti=>{"use strict";var Fo=J();function xo({value:n,source:e},t){return e&&(n?$o:jo).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}var $o={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Fo.Scalar(!0),stringify:xo},jo={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Fo.Scalar(!1),stringify:xo};ti.falseTag=jo;ti.trueTag=$o});var Bo=b(xn=>{"use strict";var Md=J(),ni=et(),Id={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ni.stringifyNumber},Pd={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():ni.stringifyNumber(n)}},Dd={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){let e=new Md.Scalar(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){let s=n.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:ni.stringifyNumber};xn.float=Dd;xn.floatExp=Pd;xn.floatNaN=Id});var Uo=b(kt=>{"use strict";var Ko=et(),Ct=n=>typeof n=="bigint"||Number.isInteger(n);function $n(n,e,t,{intAsBigInt:s}){let i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}let o=BigInt(n);return i==="-"?BigInt(-1)*o:o}let r=parseInt(n,t);return i==="-"?-1*r:r}function si(n,e,t){let{value:s}=n;if(Ct(s)){let i=s.toString(e);return s<0?"-"+t+i.substr(1):t+i}return Ko.stringifyNumber(n)}var Fd={identify:Ct,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>$n(n,2,2,t),stringify:n=>si(n,2,"0b")},xd={identify:Ct,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>$n(n,1,8,t),stringify:n=>si(n,8,"0")},$d={identify:Ct,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>$n(n,0,10,t),stringify:Ko.stringifyNumber},jd={identify:Ct,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>$n(n,2,16,t),stringify:n=>si(n,16,"0x")};kt.int=$d;kt.intBin=Fd;kt.intHex=jd;kt.intOct=xd});var ri=b(ii=>{"use strict";var Bn=M(),jn=qe(),Rn=Me(),we=class extends Rn.YAMLMap{constructor(e){super(e),this.tag=we.tag}add(e){let t;Bn.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new jn.Pair(e.key,null):t=new jn.Pair(e,null),Rn.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let s=Rn.findPair(this.items,e);return!t&&Bn.isPair(s)?Bn.isScalar(s.key)?s.key.value:s.key:s}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 s=Rn.findPair(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new jn.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){let{replacer:i}=s,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(jn.createPair(o,null,s));return r}};we.tag="tag:yaml.org,2002:set";var Rd={collection:"map",identify:n=>n instanceof Set,nodeClass:we,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>we.from(n,e,t),resolve(n,e){if(Bn.isMap(n)){if(n.hasAllNullValues(!0))return Object.assign(new we,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};ii.YAMLSet=we;ii.set=Rd});var ai=b(Kn=>{"use strict";var Bd=et();function oi(n,e){let t=n[0],s=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),r=s.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function Vo(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Bd.stringifyNumber(n);let s="";e<0&&(s="-",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))),s+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Kd={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>oi(n,t),stringify:Vo},Ud={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>oi(n,!1),stringify:Vo},Yo={identify:n=>n 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(n){let e=n.match(Yo.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,s,i,r,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(t,s-1,i,r||0,o||0,a||0,c),f=e[8];if(f&&f!=="Z"){let d=oi(f,!1);Math.abs(d)<30&&(d*=60),l-=6e4*d}return new Date(l)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Kn.floatTime=Ud;Kn.intTime=Kd;Kn.timestamp=Yo});var Ho=b(Jo=>{"use strict";var Vd=Xe(),Yd=_n(),Gd=Ze(),Jd=Ot(),Hd=Qs(),Go=Ro(),ci=Bo(),Un=Uo(),Wd=On(),Qd=ei(),zd=Fn(),Xd=ri(),li=ai(),Zd=[Vd.map,Gd.seq,Jd.string,Yd.nullTag,Go.trueTag,Go.falseTag,Un.intBin,Un.intOct,Un.int,Un.intHex,ci.floatNaN,ci.floatExp,ci.float,Hd.binary,Wd.merge,Qd.omap,zd.pairs,Xd.set,li.intTime,li.floatTime,li.timestamp];Jo.schema=Zd});var ia=b(di=>{"use strict";var Xo=Xe(),eh=_n(),Zo=Ze(),th=Ot(),nh=Ks(),fi=Vs(),ui=Gs(),sh=Ao(),ih=qo(),ea=Qs(),At=On(),ta=ei(),na=Fn(),Wo=Ho(),sa=ri(),Vn=ai(),Qo=new Map([["core",sh.schema],["failsafe",[Xo.map,Zo.seq,th.string]],["json",ih.schema],["yaml11",Wo.schema],["yaml-1.1",Wo.schema]]),zo={binary:ea.binary,bool:nh.boolTag,float:fi.float,floatExp:fi.floatExp,floatNaN:fi.floatNaN,floatTime:Vn.floatTime,int:ui.int,intHex:ui.intHex,intOct:ui.intOct,intTime:Vn.intTime,map:Xo.map,merge:At.merge,null:eh.nullTag,omap:ta.omap,pairs:na.pairs,seq:Zo.seq,set:sa.set,timestamp:Vn.timestamp},rh={"tag:yaml.org,2002:binary":ea.binary,"tag:yaml.org,2002:merge":At.merge,"tag:yaml.org,2002:omap":ta.omap,"tag:yaml.org,2002:pairs":na.pairs,"tag:yaml.org,2002:set":sa.set,"tag:yaml.org,2002:timestamp":Vn.timestamp};function oh(n,e,t){let s=Qo.get(e);if(s&&!n)return t&&!s.includes(At.merge)?s.concat(At.merge):s.slice();let i=s;if(!i)if(Array.isArray(n))i=[];else{let r=Array.from(Qo.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(n))for(let r of n)i=i.concat(r);else typeof n=="function"&&(i=n(i.slice()));return t&&(i=i.concat(At.merge)),i.reduce((r,o)=>{let a=typeof o=="string"?zo[o]:o;if(!a){let c=JSON.stringify(o),l=Object.keys(zo).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return r.includes(a)||r.push(a),r},[])}di.coreKnownTags=rh;di.getTags=oh});var pi=b(ra=>{"use strict";var hi=M(),ah=Xe(),ch=Ze(),lh=Ot(),Yn=ia(),fh=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0,Lt=class{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Yn.getTags(e,"compat"):e?Yn.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Yn.coreKnownTags:{},this.tags=Yn.getTags(t,this.name,s),this.toStringOptions=a??null,Object.defineProperty(this,hi.MAP,{value:ah.map}),Object.defineProperty(this,hi.SCALAR,{value:lh.string}),Object.defineProperty(this,hi.SEQ,{value:ch.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?fh:null}clone(){let e=Object.create(Lt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};ra.Schema=Lt});var aa=b(oa=>{"use strict";var uh=M(),mi=St(),_t=pt();function dh(n,e){let t=[],s=e.directives===!0;if(e.directives!==!1&&n.directives){let c=n.directives.toString(n);c?(t.push(c),s=!0):n.directives.docStart&&(s=!0)}s&&t.push("---");let i=mi.createStringifyContext(n,e),{commentString:r}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");let c=r(n.commentBefore);t.unshift(_t.indentComment(c,""))}let o=!1,a=null;if(n.contents){if(uh.isNode(n.contents)){if(n.contents.spaceBefore&&s&&t.push(""),n.contents.commentBefore){let f=r(n.contents.commentBefore);t.push(_t.indentComment(f,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}let c=a?void 0:()=>o=!0,l=mi.stringify(n.contents,i,()=>a=null,c);a&&(l+=_t.lineComment(l,"",r(a))),(l[0]==="|"||l[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${l}`:t.push(l)}else t.push(mi.stringify(n.contents,i));if(n.directives?.docEnd)if(n.comment){let c=r(n.comment);c.includes(`
|
|
61
|
-
`)?(t.push("..."),t.push(_t.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=n.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(_t.indentComment(r(c),"")))}return t.join(`
|
|
62
|
-
`)+`
|
|
63
|
-
`}oa.stringifyDocument=dh});var Tt=b(ca=>{"use strict";var hh=dt(),tt=hn(),ae=M(),ph=qe(),mh=ke(),gh=pi(),yh=aa(),gi=ln(),Sh=ws(),bh=ht(),yi=vs(),qt=class{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ae.NODE_TYPE,{value:ae.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:s===void 0&&t&&(s=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"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new yi.Directives({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,i,s)}clone(){let e=Object.create(qt.prototype,{[ae.NODE_TYPE]:{value:ae.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=ae.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){nt(this.contents)&&this.contents.add(e)}addIn(e,t){nt(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let s=gi.anchorNames(this);e.anchor=!t||s.has(t)?gi.findNewAnchor(t||"a",s):t}return new hh.Alias(e.anchor)}createNode(e,t,s){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let g=v=>typeof v=="number"||v instanceof String||v instanceof Number,S=t.filter(g).map(String);S.length>0&&(t=t.concat(S)),i=t}else s===void 0&&t&&(s=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:f}=s??{},{onAnchor:d,setAnchors:u,sourceObjects:p}=gi.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:r??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:p},h=bh.createNode(e,f,m);return a&&ae.isCollection(h)&&(h.flow=!0),u(),h}createPair(e,t,s={}){let i=this.createNode(e,null,s),r=this.createNode(t,null,s);return new ph.Pair(i,r)}delete(e){return nt(this.contents)?this.contents.delete(e):!1}deleteIn(e){return tt.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):nt(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return ae.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return tt.isEmptyPath(e)?!t&&ae.isScalar(this.contents)?this.contents.value:this.contents:ae.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return ae.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return tt.isEmptyPath(e)?this.contents!==void 0:ae.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=tt.collectionFromPath(this.schema,[e],t):nt(this.contents)&&this.contents.set(e,t)}setIn(e,t){tt.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=tt.collectionFromPath(this.schema,Array.from(e),t):nt(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new yi.Directives({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new yi.Directives({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=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(s)this.schema=new gh.Schema(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:i,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=mh.toJS(this.contents,t??"",a);if(typeof r=="function")for(let{count:l,res:f}of a.anchors.values())r(f,l);return typeof o=="function"?Sh.applyReviver(o,{"":c},"",c):c}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 yh.stringifyDocument(this,e)}};function nt(n){if(ae.isCollection(n))return!0;throw new Error("Expected a YAML collection as document contents")}ca.Document=qt});var Pt=b(It=>{"use strict";var Mt=class extends Error{constructor(e,t,s,i){super(),this.name=e,this.code=s,this.message=i,this.pos=t}},Si=class extends Mt{constructor(e,t,s){super("YAMLParseError",e,t,s)}},bi=class extends Mt{constructor(e,t,s){super("YAMLWarning",e,t,s)}},vh=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:s,col:i}=t.linePos[0];t.message+=` at line ${s}, column ${i}`;let r=i-1,o=n.substring(e.lineStarts[s-1],e.lineStarts[s]).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"),s>1&&/^ *$/.test(o.substring(0,r))){let a=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
64
|
-
`),o=a+o}if(/[^ ]/.test(o)){let a=1,c=t.linePos[1];c?.line===s&&c.col>i&&(a=Math.max(1,Math.min(c.col-i,80-r)));let l=" ".repeat(r)+"^".repeat(a);t.message+=`:
|
|
65
|
-
|
|
66
|
-
${o}
|
|
67
|
-
${l}
|
|
68
|
-
`}};It.YAMLError=Mt;It.YAMLParseError=Si;It.YAMLWarning=bi;It.prettifyError=vh});var Dt=b(la=>{"use strict";function wh(n,{flow:e,indicator:t,next:s,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let c=!1,l=a,f=a,d="",u="",p=!1,m=!1,h=null,g=null,S=null,v=null,C=null,A=null,_=null;for(let k of n)switch(m&&(k.type!=="space"&&k.type!=="newline"&&k.type!=="comma"&&r(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),h&&(l&&k.type!=="comment"&&k.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),k.type){case"space":!e&&(t!=="doc-start"||s?.type!=="flow-collection")&&k.source.includes(" ")&&(h=k),f=!0;break;case"comment":{f||r(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let Y=k.source.substring(1)||" ";d?d+=u+Y:d=Y,u="",l=!1;break}case"newline":l?d?d+=k.source:(!A||t!=="seq-item-ind")&&(c=!0):u+=k.source,l=!0,p=!0,(g||S)&&(v=k),f=!0;break;case"anchor":g&&r(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),k.source.endsWith(":")&&r(k.offset+k.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=k,_??(_=k.offset),l=!1,f=!1,m=!0;break;case"tag":{S&&r(k,"MULTIPLE_TAGS","A node can have at most one tag"),S=k,_??(_=k.offset),l=!1,f=!1,m=!0;break}case t:(g||S)&&r(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),A&&r(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${e??"collection"}`),A=k,l=t==="seq-item-ind"||t==="explicit-key-ind",f=!1;break;case"comma":if(e){C&&r(k,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),C=k,l=!1,f=!1;break}default:r(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),l=!1,f=!1}let q=n[n.length-1],F=q?q.offset+q.source.length:i;return m&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(l&&h.indent<=o||s?.type==="block-map"||s?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:C,found:A,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:S,newlineAfterProp:v,end:F,start:_??F}}la.resolveProps=wh});var Gn=b(fa=>{"use strict";function vi(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
|
|
69
|
-
`))return!0;if(n.end){for(let e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of n.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(vi(e.key)||vi(e.value))return!0}return!1;default:return!0}}fa.containsNewline=vi});var wi=b(ua=>{"use strict";var Oh=Gn();function Eh(n,e,t){if(e?.type==="flow-collection"){let s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&Oh.containsNewline(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}ua.flowIndentCheck=Eh});var Oi=b(ha=>{"use strict";var da=M();function Nh(n,e,t){let{uniqueKeys:s}=n.options;if(s===!1)return!1;let i=typeof s=="function"?s:(r,o)=>r===o||da.isScalar(r)&&da.isScalar(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}ha.mapIncludes=Nh});var ba=b(Sa=>{"use strict";var pa=qe(),Ch=Me(),ma=Dt(),kh=Gn(),ga=wi(),Ah=Oi(),ya="All mapping items must start at the same column";function Lh({composeNode:n,composeEmptyNode:e},t,s,i,r){let o=r?.nodeClass??Ch.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=s.offset,l=null;for(let f of s.items){let{start:d,key:u,sep:p,value:m}=f,h=ma.resolveProps(d,{indicator:"explicit-key-ind",next:u??p?.[0],offset:c,onError:i,parentIndent:s.indent,startOnNewline:!0}),g=!h.found;if(g){if(u&&(u.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==s.indent&&i(c,"BAD_INDENT",ya)),!h.anchor&&!h.tag&&!p){l=h.end,h.comment&&(a.comment?a.comment+=`
|
|
70
|
-
`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||kh.containsNewline(u))&&i(u??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==s.indent&&i(c,"BAD_INDENT",ya);t.atKey=!0;let S=h.end,v=u?n(t,u,h,i):e(t,S,d,null,h,i);t.schema.compat&&ga.flowIndentCheck(s.indent,u,i),t.atKey=!1,Ah.mapIncludes(t,a.items,v)&&i(S,"DUPLICATE_KEY","Map keys must be unique");let C=ma.resolveProps(p??[],{indicator:"map-value-ind",next:m,offset:v.range[2],onError:i,parentIndent:s.indent,startOnNewline:!u||u.type==="block-scalar"});if(c=C.end,C.found){g&&(m?.type==="block-map"&&!C.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<C.found.offset-1024&&i(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let A=m?n(t,m,C,i):e(t,c,p,null,C,i);t.schema.compat&&ga.flowIndentCheck(s.indent,m,i),c=A.range[2];let _=new pa.Pair(v,A);t.options.keepSourceTokens&&(_.srcToken=f),a.items.push(_)}else{g&&i(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),C.comment&&(v.comment?v.comment+=`
|
|
71
|
-
`+C.comment:v.comment=C.comment);let A=new pa.Pair(v);t.options.keepSourceTokens&&(A.srcToken=f),a.items.push(A)}}return l&&l<c&&i(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,c,l??c],a}Sa.resolveBlockMap=Lh});var wa=b(va=>{"use strict";var _h=Ie(),qh=Dt(),Th=wi();function Mh({composeNode:n,composeEmptyNode:e},t,s,i,r){let o=r?.nodeClass??_h.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=s.offset,l=null;for(let{start:f,value:d}of s.items){let u=qh.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:c,onError:i,parentIndent:s.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||d)d?.type==="block-seq"?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=u.end,u.comment&&(a.comment=u.comment);continue}let p=d?n(t,d,u,i):e(t,u.end,f,null,u,i);t.schema.compat&&Th.flowIndentCheck(s.indent,d,i),c=p.range[2],a.items.push(p)}return a.range=[s.offset,c,l??c],a}va.resolveBlockSeq=Mh});var st=b(Oa=>{"use strict";function Ih(n,e,t,s){let i="";if(n){let r=!1,o="";for(let a of n){let{source:c,type:l}=a;switch(l){case"space":r=!0;break;case"comment":{t&&!r&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";i?i+=o+f:i=f,o="";break}case"newline":i&&(o+=c),r=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:i,offset:e}}Oa.resolveEnd=Ih});var ka=b(Ca=>{"use strict";var Ph=M(),Dh=qe(),Ea=Me(),Fh=Ie(),xh=st(),Na=Dt(),$h=Gn(),jh=Oi(),Ei="Block collections are not allowed within flow collections",Ni=n=>n&&(n.type==="block-map"||n.type==="block-seq");function Rh({composeNode:n,composeEmptyNode:e},t,s,i,r){let o=s.start.source==="{",a=o?"flow map":"flow sequence",c=r?.nodeClass??(o?Ea.YAMLMap:Fh.YAMLSeq),l=new c(t.schema);l.flow=!0;let f=t.atRoot;f&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let d=s.offset+s.start.source.length;for(let g=0;g<s.items.length;++g){let S=s.items[g],{start:v,key:C,sep:A,value:_}=S,q=Na.resolveProps(v,{flow:a,indicator:"explicit-key-ind",next:C??A?.[0],offset:d,onError:i,parentIndent:s.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!A&&!_){g===0&&q.comma?i(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<s.items.length-1&&i(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),q.comment&&(l.comment?l.comment+=`
|
|
72
|
-
`+q.comment:l.comment=q.comment),d=q.end;continue}!o&&t.options.strict&&$h.containsNewline(C)&&i(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)q.comma&&i(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(q.comma||i(q.start,"MISSING_CHAR",`Missing , between ${a} items`),q.comment){let F="";e:for(let k of v)switch(k.type){case"comma":case"space":break;case"comment":F=k.source.substring(1);break e;default:break e}if(F){let k=l.items[l.items.length-1];Ph.isPair(k)&&(k=k.value??k.key),k.comment?k.comment+=`
|
|
73
|
-
`+F:k.comment=F,q.comment=q.comment.substring(F.length+1)}}if(!o&&!A&&!q.found){let F=_?n(t,_,q,i):e(t,q.end,A,null,q,i);l.items.push(F),d=F.range[2],Ni(_)&&i(F.range,"BLOCK_IN_FLOW",Ei)}else{t.atKey=!0;let F=q.end,k=C?n(t,C,q,i):e(t,F,v,null,q,i);Ni(C)&&i(k.range,"BLOCK_IN_FLOW",Ei),t.atKey=!1;let Y=Na.resolveProps(A??[],{flow:a,indicator:"map-value-ind",next:_,offset:k.range[2],onError:i,parentIndent:s.indent,startOnNewline:!1});if(Y.found){if(!o&&!q.found&&t.options.strict){if(A)for(let V of A){if(V===Y.found)break;if(V.type==="newline"){i(V,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<Y.found.offset-1024&&i(Y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source?.[0]===":"?i(_,"MISSING_CHAR",`Missing space after : in ${a}`):i(Y.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let ue=_?n(t,_,Y,i):Y.found?e(t,Y.end,A,null,Y,i):null;ue?Ni(_)&&i(ue.range,"BLOCK_IN_FLOW",Ei):Y.comment&&(k.comment?k.comment+=`
|
|
74
|
-
`+Y.comment:k.comment=Y.comment);let ge=new Dh.Pair(k,ue);if(t.options.keepSourceTokens&&(ge.srcToken=S),o){let V=l;jh.mapIncludes(t,V.items,k)&&i(F,"DUPLICATE_KEY","Map keys must be unique"),V.items.push(ge)}else{let V=new Ea.YAMLMap(t.schema);V.flow=!0,V.items.push(ge);let Vt=(ue??k).range;V.range=[k.range[0],Vt[1],Vt[2]],l.items.push(V)}d=ue?ue.range[2]:Y.end}}let u=o?"}":"]",[p,...m]=s.end,h=d;if(p?.source===u)h=p.offset+p.source.length;else{let g=a[0].toUpperCase()+a.substring(1),S=f?`${g} must end with a ${u}`:`${g} in block collection must be sufficiently indented and end with a ${u}`;i(d,f?"MISSING_CHAR":"BAD_INDENT",S),p&&p.source.length!==1&&m.unshift(p)}if(m.length>0){let g=xh.resolveEnd(m,h,t.options.strict,i);g.comment&&(l.comment?l.comment+=`
|
|
75
|
-
`+g.comment:l.comment=g.comment),l.range=[s.offset,h,g.offset]}else l.range=[s.offset,h,h];return l}Ca.resolveFlowCollection=Rh});var La=b(Aa=>{"use strict";var Bh=M(),Kh=J(),Uh=Me(),Vh=Ie(),Yh=ba(),Gh=wa(),Jh=ka();function Ci(n,e,t,s,i,r){let o=t.type==="block-map"?Yh.resolveBlockMap(n,e,t,s,r):t.type==="block-seq"?Gh.resolveBlockSeq(n,e,t,s,r):Jh.resolveFlowCollection(n,e,t,s,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Hh(n,e,t,s,i){let r=s.tag,o=r?e.directives.tagName(r.source,u=>i(r,"TAG_RESOLVE_FAILED",u)):null;if(t.type==="block-seq"){let{anchor:u,newlineAfterProp:p}=s,m=u&&r?u.offset>r.offset?u:r:u??r;m&&(!p||p.offset<m.offset)&&i(m,"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===Uh.YAMLMap.tagName&&a==="map"||o===Vh.YAMLSeq.tagName&&a==="seq")return Ci(n,e,t,i,o);let c=e.schema.tags.find(u=>u.tag===o&&u.collection===a);if(!c){let u=e.schema.knownTags[o];if(u?.collection===a)e.schema.tags.push(Object.assign({},u,{default:!1})),c=u;else return u?i(r,"BAD_COLLECTION_TYPE",`${u.tag} used for ${a} collection, but expects ${u.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ci(n,e,t,i,o)}let l=Ci(n,e,t,i,o,c),f=c.resolve?.(l,u=>i(r,"TAG_RESOLVE_FAILED",u),e.options)??l,d=Bh.isNode(f)?f:new Kh.Scalar(f);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}Aa.composeCollection=Hh});var Ai=b(_a=>{"use strict";var ki=J();function Wh(n,e,t){let s=e.offset,i=Qh(e,n.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};let r=i.mode===">"?ki.Scalar.BLOCK_FOLDED:ki.Scalar.BLOCK_LITERAL,o=e.source?zh(e.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let g=o[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=i.chomp==="+"&&o.length>0?`
|
|
76
|
-
`.repeat(Math.max(1,o.length-1)):"",g=s+i.length;return e.source&&(g+=e.source.length),{value:h,type:r,comment:i.comment,range:[s,g,g]}}let c=e.indent+i.indent,l=e.offset+i.length,f=0;for(let h=0;h<a;++h){let[g,S]=o[h];if(S===""||S==="\r")i.indent===0&&g.length>c&&(c=g.length);else{if(g.length<c){let v="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";t(l+g.length,"MISSING_CHAR",v)}i.indent===0&&(c=g.length),f=h,c===0&&!n.atRoot&&t(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=g.length+S.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>c&&(a=h+1);let d="",u="",p=!1;for(let h=0;h<f;++h)d+=o[h][0].slice(c)+`
|
|
77
|
-
`;for(let h=f;h<a;++h){let[g,S]=o[h];l+=g.length+S.length+1;let v=S[S.length-1]==="\r";if(v&&(S=S.slice(0,-1)),S&&g.length<c){let A=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(l-S.length-(v?2:1),"BAD_INDENT",A),g=""}r===ki.Scalar.BLOCK_LITERAL?(d+=u+g.slice(c)+S,u=`
|
|
78
|
-
`):g.length>c||S[0]===" "?(u===" "?u=`
|
|
79
|
-
`:!p&&u===`
|
|
80
|
-
`&&(u=`
|
|
81
|
-
|
|
82
|
-
`),d+=u+g.slice(c)+S,u=`
|
|
83
|
-
`,p=!0):S===""?u===`
|
|
84
|
-
`?d+=`
|
|
85
|
-
`:u=`
|
|
86
|
-
`:(d+=u+S,u=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)d+=`
|
|
87
|
-
`+o[h][0].slice(c);d[d.length-1]!==`
|
|
88
|
-
`&&(d+=`
|
|
89
|
-
`);break;default:d+=`
|
|
90
|
-
`}let m=s+i.length+e.source.length;return{value:d,type:r,comment:i.comment,range:[s,m,m]}}function Qh({offset:n,props:e},t,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,a="",c=-1;for(let u=1;u<i.length;++u){let p=i[u];if(!a&&(p==="-"||p==="+"))a=p;else{let m=Number(p);!o&&m?o=m:c===-1&&(c=n+u)}}c!==-1&&s(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,f="",d=i.length;for(let u=1;u<e.length;++u){let p=e[u];switch(p.type){case"space":l=!0;case"newline":d+=p.source.length;break;case"comment":t&&!l&&s(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=p.source.length,f=p.source.substring(1);break;case"error":s(p,"UNEXPECTED_TOKEN",p.message),d+=p.source.length;break;default:{let m=`Unexpected token in block scalar header: ${p.type}`;s(p,"UNEXPECTED_TOKEN",m);let h=p.source;h&&typeof h=="string"&&(d+=h.length)}}}return{mode:r,indent:o,chomp:a,comment:f,length:d}}function zh(n){let e=n.split(/\n( *)/),t=e[0],s=t.match(/^( *)/),r=[s?.[1]?[s[1],t.slice(s[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}_a.resolveBlockScalar=Wh});var _i=b(Ta=>{"use strict";var Li=J(),Xh=st();function Zh(n,e,t){let{offset:s,type:i,source:r,end:o}=n,a,c,l=(u,p,m)=>t(s+u,p,m);switch(i){case"scalar":a=Li.Scalar.PLAIN,c=ep(r,l);break;case"single-quoted-scalar":a=Li.Scalar.QUOTE_SINGLE,c=tp(r,l);break;case"double-quoted-scalar":a=Li.Scalar.QUOTE_DOUBLE,c=np(r,l);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[s,s+r.length,s+r.length]}}let f=s+r.length,d=Xh.resolveEnd(o,f,e,t);return{value:c,type:a,comment:d.comment,range:[s,f,d.offset]}}function ep(n,e){let t="";switch(n[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 ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),qa(n)}function tp(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),qa(n.slice(1,-1)).replace(/''/g,"'")}function qa(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
91
|
-
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
92
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let i=s[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;s=t.exec(n);)s[1]===""?r===`
|
|
93
|
-
`?i+=r:r=`
|
|
94
|
-
`:(i+=r+s[1],r=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(n),i+r+(s?.[1]??"")}function np(n,e){let t="";for(let s=1;s<n.length-1;++s){let i=n[s];if(!(i==="\r"&&n[s+1]===`
|
|
95
|
-
`))if(i===`
|
|
96
|
-
`){let{fold:r,offset:o}=sp(n,s);t+=r,s=o}else if(i==="\\"){let r=n[++s],o=ip[r];if(o)t+=o;else if(r===`
|
|
97
|
-
`)for(r=n[s+1];r===" "||r===" ";)r=n[++s+1];else if(r==="\r"&&n[s+1]===`
|
|
98
|
-
`)for(r=n[++s+1];r===" "||r===" ";)r=n[++s+1];else if(r==="x"||r==="u"||r==="U"){let a={x:2,u:4,U:8}[r];t+=rp(n,s+1,a,e),s+=a}else{let a=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){let r=s,o=n[s+1];for(;o===" "||o===" ";)o=n[++s+1];o!==`
|
|
99
|
-
`&&!(o==="\r"&&n[s+2]===`
|
|
100
|
-
`)&&(t+=s>r?n.slice(r,s+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function sp(n,e){let t="",s=n[e+1];for(;(s===" "||s===" "||s===`
|
|
101
|
-
`||s==="\r")&&!(s==="\r"&&n[e+2]!==`
|
|
102
|
-
`);)s===`
|
|
103
|
-
`&&(t+=`
|
|
104
|
-
`),e+=1,s=n[e+1];return t||(t=" "),{fold:t,offset:e}}var ip={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
105
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rp(n,e,t,s){let i=n.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=n.substr(e-2,t+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}Ta.resolveFlowScalar=Zh});var Pa=b(Ia=>{"use strict";var Re=M(),Ma=J(),op=Ai(),ap=_i();function cp(n,e,t,s){let{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?op.resolveBlockScalar(n,e,s):ap.resolveFlowScalar(e,n.options.strict,s),c=t?n.directives.tagName(t.source,d=>s(t,"TAG_RESOLVE_FAILED",d)):null,l;n.options.stringKeys&&n.atKey?l=n.schema[Re.SCALAR]:c?l=lp(n.schema,i,c,t,s):e.type==="scalar"?l=fp(n,i,e,s):l=n.schema[Re.SCALAR];let f;try{let d=l.resolve(i,u=>s(t??e,"TAG_RESOLVE_FAILED",u),n.options);f=Re.isScalar(d)?d:new Ma.Scalar(d)}catch(d){let u=d instanceof Error?d.message:String(d);s(t??e,"TAG_RESOLVE_FAILED",u),f=new Ma.Scalar(i)}return f.range=a,f.source=i,r&&(f.type=r),c&&(f.tag=c),l.format&&(f.format=l.format),o&&(f.comment=o),f}function lp(n,e,t,s,i){if(t==="!")return n[Re.SCALAR];let r=[];for(let a of n.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=n.knownTags[t];return o&&!o.collection?(n.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[Re.SCALAR])}function fp({atKey:n,directives:e,schema:t},s,i,r){let o=t.tags.find(a=>(a.default===!0||n&&a.default==="key")&&a.test?.test(s))||t[Re.SCALAR];if(t.compat){let a=t.compat.find(c=>c.default&&c.test?.test(s))??t[Re.SCALAR];if(o.tag!==a.tag){let c=e.tagString(o.tag),l=e.tagString(a.tag),f=`Value may be parsed as either ${c} or ${l}`;r(i,"TAG_RESOLVE_FAILED",f,!0)}}return o}Ia.composeScalar=cp});var Fa=b(Da=>{"use strict";function up(n,e,t){if(e){t??(t=e.length);for(let s=t-1;s>=0;--s){let i=e[s];switch(i.type){case"space":case"comment":case"newline":n-=i.source.length;continue}for(i=e[++s];i?.type==="space";)n+=i.source.length,i=e[++s];break}}return n}Da.emptyScalarPosition=up});var ja=b(Ti=>{"use strict";var dp=dt(),hp=M(),pp=La(),xa=Pa(),mp=st(),gp=Fa(),yp={composeNode:$a,composeEmptyNode:qi};function $a(n,e,t,s){let i=n.atKey,{spaceBefore:r,comment:o,anchor:a,tag:c}=t,l,f=!0;switch(e.type){case"alias":l=Sp(n,e,s),(a||c)&&s(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":l=xa.composeScalar(n,e,c,s),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=pp.composeCollection(yp,n,e,t,s),a&&(l.anchor=a.source.substring(1));break;default:{let d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",d),l=qi(n,e.offset,void 0,null,t,s),f=!1}}return a&&l.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&n.options.stringKeys&&(!hp.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&s(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(l.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?l.comment=o:l.commentBefore=o),n.options.keepSourceTokens&&f&&(l.srcToken=e),l}function qi(n,e,t,s,{spaceBefore:i,comment:r,anchor:o,tag:a,end:c},l){let f={type:"scalar",offset:gp.emptyScalarPosition(e,t,s),indent:-1,source:""},d=xa.composeScalar(n,f,a,l);return o&&(d.anchor=o.source.substring(1),d.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),r&&(d.comment=r,d.range[2]=c),d}function Sp({options:n},{offset:e,source:t,end:s},i){let r=new dp.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=mp.resolveEnd(s,o,n.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}Ti.composeEmptyNode=qi;Ti.composeNode=$a});var Ka=b(Ba=>{"use strict";var bp=Tt(),Ra=ja(),vp=st(),wp=Dt();function Op(n,e,{offset:t,start:s,value:i,end:r},o){let a=Object.assign({_directives:e},n),c=new bp.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=wp.resolveProps(s,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&o(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?Ra.composeNode(l,i,f,o):Ra.composeEmptyNode(l,f.end,s,null,f,o);let d=c.contents.range[2],u=vp.resolveEnd(r,d,!1,o);return u.comment&&(c.comment=u.comment),c.range=[t,d,u.offset],c}Ba.composeDoc=Op});var Ii=b(Ya=>{"use strict";var Ep=require("process"),Np=vs(),Cp=Tt(),Ft=Pt(),Ua=M(),kp=Ka(),Ap=st();function xt(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];let{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function Va(n){let e="",t=!1,s=!1;for(let i=0;i<n.length;++i){let r=n[i];switch(r[0]){case"#":e+=(e===""?"":s?`
|
|
106
|
-
|
|
107
|
-
`:`
|
|
108
|
-
`)+(r.substring(1)||" "),t=!0,s=!1;break;case"%":n[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(s=!0),t=!1}}return{comment:e,afterEmptyLine:s}}var Mi=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,i,r)=>{let o=xt(t);r?this.warnings.push(new Ft.YAMLWarning(o,s,i)):this.errors.push(new Ft.YAMLParseError(o,s,i))},this.directives=new Np.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:i}=Va(this.prelude);if(s){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
109
|
-
${s}`:s;else if(i||e.directives.docStart||!r)e.commentBefore=s;else if(Ua.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];Ua.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s}
|
|
110
|
-
${a}`:s}else{let o=r.commentBefore;r.commentBefore=o?`${s}
|
|
111
|
-
${o}`:s}}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:Va(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let i of e)yield*this.next(i);yield*this.end(t,s)}*next(e){switch(Ep.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,s,i)=>{let r=xt(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",s,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=kp.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,s=new Ft.YAMLParseError(xt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new Ft.YAMLParseError(xt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;let t=Ap.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
|
|
112
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ft.YAMLParseError(xt(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 s=Object.assign({_directives:this.directives},this.options),i=new Cp.Document(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};Ya.Composer=Mi});var Ha=b(Jn=>{"use strict";var Lp=Ai(),_p=_i(),qp=Pt(),Ga=yt();function Tp(n,e=!0,t){if(n){let s=(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 qp.YAMLParseError([a,a+1],r,o)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return _p.resolveFlowScalar(n,e,s);case"block-scalar":return Lp.resolveBlockScalar({options:{strict:e}},n,s)}}return null}function Mp(n,e){let{implicitKey:t=!1,indent:s,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,a=Ga.stringifyString({type:o,value:n},{implicitKey:t,indent:s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
|
113
|
-
`}];switch(a[0]){case"|":case">":{let l=a.indexOf(`
|
|
114
|
-
`),f=a.substring(0,l),d=a.substring(l+1)+`
|
|
115
|
-
`,u=[{type:"block-scalar-header",offset:r,indent:s,source:f}];return Ja(u,c)||u.push({type:"newline",offset:-1,indent:s,source:`
|
|
116
|
-
`}),{type:"block-scalar",offset:r,indent:s,props:u,source:d}}case'"':return{type:"double-quoted-scalar",offset:r,indent:s,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:r,indent:s,source:a,end:c};default:return{type:"scalar",offset:r,indent:s,source:a,end:c}}}function Ip(n,e,t={}){let{afterKey:s=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,a="indent"in n?n.indent:null;if(s&&typeof a=="number"&&(a+=2),!o)switch(n.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let l=n.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let c=Ga.stringifyString({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Pp(n,c);break;case'"':Pi(n,c,"double-quoted-scalar");break;case"'":Pi(n,c,"single-quoted-scalar");break;default:Pi(n,c,"scalar")}}function Pp(n,e){let t=e.indexOf(`
|
|
117
|
-
`),s=e.substring(0,t),i=e.substring(t+1)+`
|
|
118
|
-
`;if(n.type==="block-scalar"){let r=n.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=s,n.source=i}else{let{offset:r}=n,o="indent"in n?n.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:s}];Ja(a,"end"in n?n.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
119
|
-
`});for(let c of Object.keys(n))c!=="type"&&c!=="offset"&&delete n[c];Object.assign(n,{type:"block-scalar",indent:o,props:a,source:i})}}function Ja(n,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function Pi(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{let s=n.props.slice(1),i=e.length;n.props[0].type==="block-scalar-header"&&(i-=n.props[0].source.length);for(let r of s)r.offset+=i;delete n.props,Object.assign(n,{type:t,source:e,end:s});break}case"block-map":case"block-seq":{let i={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
|
|
120
|
-
`};delete n.items,Object.assign(n,{type:t,source:e,end:[i]});break}default:{let s="indent"in n?n.indent:-1,i="end"in n&&Array.isArray(n.end)?n.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(n))r!=="type"&&r!=="offset"&&delete n[r];Object.assign(n,{type:t,indent:s,source:e,end:i})}}}Jn.createScalarToken=Mp;Jn.resolveAsScalar=Tp;Jn.setScalarValue=Ip});var Qa=b(Wa=>{"use strict";var Dp=n=>"type"in n?Wn(n):Hn(n);function Wn(n){switch(n.type){case"block-scalar":{let e="";for(let t of n.props)e+=Wn(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(let t of n.items)e+=Hn(t);return e}case"flow-collection":{let e=n.start.source;for(let t of n.items)e+=Hn(t);for(let t of n.end)e+=t.source;return e}case"document":{let e=Hn(n);if(n.end)for(let t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(let t of n.end)e+=t.source;return e}}}function Hn({start:n,key:e,sep:t,value:s}){let i="";for(let r of n)i+=r.source;if(e&&(i+=Wn(e)),t)for(let r of t)i+=r.source;return s&&(i+=Wn(s)),i}Wa.stringify=Dp});var ec=b(Za=>{"use strict";var Di=Symbol("break visit"),Fp=Symbol("skip children"),za=Symbol("remove item");function Be(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),Xa(Object.freeze([]),n,e)}Be.BREAK=Di;Be.SKIP=Fp;Be.REMOVE=za;Be.itemAtPath=(n,e)=>{let t=n;for(let[s,i]of e){let r=t?.[s];if(r&&"items"in r)t=r.items[i];else return}return t};Be.parentCollection=(n,e)=>{let t=Be.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],i=t?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Xa(n,e,t){let s=t(e,n);if(typeof s=="symbol")return s;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=Xa(Object.freeze(n.concat([[i,o]])),r.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Di)return Di;a===za&&(r.items.splice(o,1),o-=1)}}typeof s=="function"&&i==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}Za.visit=Be});var Qn=b(re=>{"use strict";var Fi=Ha(),xp=Qa(),$p=ec(),xi="\uFEFF",$i="",ji="",Ri="",jp=n=>!!n&&"items"in n,Rp=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function Bp(n){switch(n){case xi:return"<BOM>";case $i:return"<DOC>";case ji:return"<FLOW_END>";case Ri:return"<SCALAR>";default:return JSON.stringify(n)}}function Kp(n){switch(n){case xi:return"byte-order-mark";case $i:return"doc-mode";case ji:return"flow-error-end";case Ri:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
121
|
-
`:case`\r
|
|
122
|
-
`: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(n[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}re.createScalarToken=Fi.createScalarToken;re.resolveAsScalar=Fi.resolveAsScalar;re.setScalarValue=Fi.setScalarValue;re.stringify=xp.stringify;re.visit=$p.visit;re.BOM=xi;re.DOCUMENT=$i;re.FLOW_END=ji;re.SCALAR=Ri;re.isCollection=jp;re.isScalar=Rp;re.prettyToken=Bp;re.tokenType=Kp});var Ui=b(nc=>{"use strict";var $t=Qn();function fe(n){switch(n){case void 0:case" ":case`
|
|
123
|
-
`:case"\r":case" ":return!0;default:return!1}}var tc=new Set("0123456789ABCDEFabcdef"),Up=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),zn=new Set(",[]{}"),Vp=new Set(` ,[]{}
|
|
124
|
-
\r `),Bi=n=>!n||Vp.has(n),Ki=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 s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
125
|
-
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
126
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;t===" ";)t=this.buffer[++s+e];if(t==="\r"){let i=this.buffer[s+e+1];if(i===`
|
|
127
|
-
`||!i&&!this.atEnd)return e+s+1}return t===`
|
|
128
|
-
`||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&fe(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(`
|
|
129
|
-
`,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]===$t.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,s=e.indexOf("#");for(;s!==-1;){let r=e[s-1];if(r===" "||r===" "){t=s-1;break}else s=e.indexOf("#",s+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 $t.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==="...")&&fe(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&&!fe(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===":")&&fe(t)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,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(Bi),"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,s=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&i[0]!=="#"||s===0&&(i.startsWith("---")||i.startsWith("..."))&&fe(i[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield $t.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(Bi),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||fe(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 s=this.buffer.substring(0,t),i=s.indexOf(`
|
|
130
|
-
`,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=s.indexOf(`
|
|
131
|
-
`,r)}i!==-1&&(t=i-(s[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=>fe(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let r=this.pos;s=this.buffer[r];++r)switch(s){case" ":t+=1;break;case`
|
|
132
|
-
`:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
133
|
-
`)break}default:break e}if(!s&&!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(`
|
|
134
|
-
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(s=this.buffer[i];s===" ";)s=this.buffer[++i];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
|
135
|
-
`;)s=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===`
|
|
136
|
-
`&&r>=this.pos&&r+1+t>a)e=r;else break}while(!0);return yield $t.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,s=this.pos-1,i;for(;i=this.buffer[++s];)if(i===":"){let r=this.buffer[s+1];if(fe(r)||e&&zn.has(r))break;t=s}else if(fe(i)){let r=this.buffer[s+1];if(i==="\r"&&(r===`
|
|
137
|
-
`?(s+=1,i=`
|
|
138
|
-
`,r=this.buffer[s+1]):t=s),r==="#"||e&&zn.has(r))break;if(i===`
|
|
139
|
-
`){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&zn.has(i))break;t=s}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield $t.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 s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.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(Bi))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(fe(t)||e&&zn.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(;!fe(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(Up.has(t))t=this.buffer[++e];else if(t==="%"&&tc.has(this.buffer[e+1])&&tc.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===`
|
|
140
|
-
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
141
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s===" ");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,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};nc.Lexer=Ki});var Yi=b(sc=>{"use strict";var Vi=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){let r=t+s>>1;this.lineStarts[r]<e?t=r+1:s=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}}}};sc.LineCounter=Vi});var Ji=b(cc=>{"use strict";var Yp=require("process"),ic=Qn(),Gp=Ui();function Pe(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function rc(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function ac(n){switch(n?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Xn(n){switch(n.type){case"document":return n.start;case"block-map":{let e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function it(n){if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;n[++e]?.type==="space";);return n.splice(e,n.length)}function oc(n){if(n.start.type==="flow-seq-start")for(let e of n.items)e.sep&&!e.value&&!Pe(e.start,"explicit-key-ind")&&!Pe(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,ac(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 Gi=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 Gp.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,Yp.env.LOG_TOKENS&&console.log("|",ic.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ic.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 s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,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)if(this.stack.length===0)yield t;else{let s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&oc(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{let i=s.items[s.items.length-1];if(i.value){s.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=s.items[s.items.length-1];i.value?s.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=s.items[s.items.length-1];!i||i.value?s.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((s.type==="document"||s.type==="block-map"||s.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&&rc(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(s.type==="document"?s.end=i.start:s.items.push({start:i.start}),t.items.splice(-1,1))}}else{let s="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:s}}}*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":{rc(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=Xn(this.peek(2)),s=it(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:s,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(`
|
|
142
|
-
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
143
|
-
`,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 s="end"in t.value?t.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.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 s=!this.onKeyLine&&this.indent===e.indent,i=s&&(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 c=t.sep[a];switch(c.type){case"newline":o.push(a);break;case"space":break;case"comment":c.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(Pe(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(ac(t.key)&&!Pe(t.sep,"newline")){let o=it(t.start),a=t.key,c=t.sep;c.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:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Pe(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=it(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]}):Pe(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&&!Pe(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 s&&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 s="end"in t.value?t.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.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||Pe(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.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 s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let i=Xn(s),r=it(i);oc(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(`
|
|
144
|
-
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
145
|
-
`,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=Xn(e),s=it(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Xn(e),s=it(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};cc.Parser=Gi});var hc=b(Rt=>{"use strict";var lc=Ii(),Jp=Tt(),jt=Pt(),Hp=Is(),Wp=M(),Qp=Yi(),fc=Ji();function uc(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Qp.LineCounter||null,prettyErrors:e}}function zp(n,e={}){let{lineCounter:t,prettyErrors:s}=uc(e),i=new fc.Parser(t?.addNewLine),r=new lc.Composer(e),o=Array.from(r.compose(i.parse(n)));if(s&&t)for(let a of o)a.errors.forEach(jt.prettifyError(n,t)),a.warnings.forEach(jt.prettifyError(n,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function dc(n,e={}){let{lineCounter:t,prettyErrors:s}=uc(e),i=new fc.Parser(t?.addNewLine),r=new lc.Composer(e),o=null;for(let a of r.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new jt.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(o.errors.forEach(jt.prettifyError(n,t)),o.warnings.forEach(jt.prettifyError(n,t))),o}function Xp(n,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=dc(n,t);if(!i)return null;if(i.warnings.forEach(r=>Hp.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:s},t))}function Zp(n,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=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(n===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return Wp.isDocument(n)&&!s?n.toString(t):new Jp.Document(n,s,t).toString(t)}Rt.parse=Xp;Rt.parseAllDocuments=zp;Rt.parseDocument=dc;Rt.stringify=Zp});var mc=b(D=>{"use strict";var em=Ii(),tm=Tt(),nm=pi(),Hi=Pt(),sm=dt(),De=M(),im=qe(),rm=J(),om=Me(),am=Ie(),cm=Qn(),lm=Ui(),fm=Yi(),um=Ji(),Zn=hc(),pc=lt();D.Composer=em.Composer;D.Document=tm.Document;D.Schema=nm.Schema;D.YAMLError=Hi.YAMLError;D.YAMLParseError=Hi.YAMLParseError;D.YAMLWarning=Hi.YAMLWarning;D.Alias=sm.Alias;D.isAlias=De.isAlias;D.isCollection=De.isCollection;D.isDocument=De.isDocument;D.isMap=De.isMap;D.isNode=De.isNode;D.isPair=De.isPair;D.isScalar=De.isScalar;D.isSeq=De.isSeq;D.Pair=im.Pair;D.Scalar=rm.Scalar;D.YAMLMap=om.YAMLMap;D.YAMLSeq=am.YAMLSeq;D.CST=cm;D.Lexer=lm.Lexer;D.LineCounter=fm.LineCounter;D.Parser=um.Parser;D.parse=Zn.parse;D.parseAllDocuments=Zn.parseAllDocuments;D.parseDocument=Zn.parseDocument;D.stringify=Zn.stringify;D.visit=pc.visit;D.visitAsync=pc.visitAsync});var gc=b(ce=>{"use strict";var dm=ce&&ce.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),hm=ce&&ce.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),pm=ce&&ce.__importStar||function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var s=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(s[s.length]=i);return s},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=n(e),i=0;i<s.length;i++)s[i]!=="default"&&dm(t,e,s[i]);return hm(t,e),t}}();Object.defineProperty(ce,"__esModule",{value:!0});ce.VIRTUAL_CODE_ID=void 0;ce.yaml2ts=gm;var Q=pm(mc());ce.VIRTUAL_CODE_ID="frontmatter-ts";var mm={verification:!1,completion:!1,semantic:!1,navigation:!0,structure:!1,format:!1};function gm(n,e){let t=[],s=(0,Q.parseDocument)(n,{keepSourceTokens:!0,customTags:["timestamp"],strict:!1,logLevel:"silent"}),i=`import type { InferEntrySchema } from "astro:content";
|
|
146
|
-
|
|
147
|
-
(
|
|
148
|
-
`,r=n.trim().length>0?"":"{}";Q.default.visit(s,{Value(l,f){if((0,Q.isCollection)(f)&&((0,Q.isMap)(f)&&o(f,l),(0,Q.isSeq)(f)&&a(f)),(0,Q.isScalar)(f)){let d=c(f);r+=`${d}: null
|
|
149
|
-
`}return Q.default.visit.REMOVE}});function o(l,f){return r+=`{
|
|
150
|
-
`,l.items.forEach(d=>{if((0,Q.isScalar)(d.key)){let u=c(d.key);((0,Q.isScalar)(d.value)||d.value===null)&&(r+=`${u}: null,
|
|
151
|
-
`),(0,Q.isMap)(d.value)&&(r+=`${u}: `,o(d.value)),(0,Q.isSeq)(d.value)&&(r+=`${u}: `,a(d.value))}return Q.default.visit.REMOVE}),r+="}",f!==null&&(r+=","),r+=`
|
|
152
|
-
`,Q.default.visit.REMOVE}function a(l){return r+="[",l.items.forEach(f=>((0,Q.isScalar)(f)&&(r+="null,"),(0,Q.isMap)(f)&&o(f),(0,Q.isSeq)(f)&&a(f),Q.default.visit.REMOVE)),r+=`],
|
|
153
|
-
`,Q.default.visit.REMOVE}function c(l){let f=JSON.stringify(l.toJS(s)),d=Q.CST.isScalar(l.srcToken)?l.srcToken.source.length:0;return t.push({generatedOffsets:[i.length+r.length],sourceOffsets:[l.range[0]],lengths:[d],generatedLengths:[f.length],data:mm}),f}return i+=`${r}) satisfies InferEntrySchema<"${e}">;
|
|
154
|
-
|
|
155
|
-
`,{errors:s.errors,virtualCode:{id:ce.VIRTUAL_CODE_ID,languageId:"typescript",snapshot:{getText:(l,f)=>i.substring(l,f),getLength:()=>i.length,getChangeRange:()=>{}},mappings:t}}}});var Sc=b(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.yaml2ts=rt.VIRTUAL_CODE_ID=void 0;var yc=gc();Object.defineProperty(rt,"VIRTUAL_CODE_ID",{enumerable:!0,get:function(){return yc.VIRTUAL_CODE_ID}});Object.defineProperty(rt,"yaml2ts",{enumerable:!0,get:function(){return yc.yaml2ts}})});var wc=b(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.FrontmatterHolder=Fe.frontmatterRE=void 0;Fe.getFrontmatterLanguagePlugin=wm;var ym=require("node:url"),vc=Sc(),Sm=Ye(),Wi={md:"markdown",mdx:"mdx",mdoc:"markdoc"},bc=Object.keys(Wi),bm=Object.values(Wi);Fe.frontmatterRE=/^---(.*?)^---/ms;function vm(n,e){for(let t of n)if(t.config.entries[e])return t.config.entries[e]}function wm(n){return{getLanguageId(e){let t=bc.find(s=>e.endsWith(`.${s}`));if(t)return Wi[t]},createVirtualCode(e,t,s){if(bm.includes(t)){let i=e.replace(/\\/g,"/");return new es(i,t,s,vm(n,(0,ym.pathToFileURL)(i).toString().toLowerCase()))}},typescript:{extraFileExtensions:bc.map(e=>({extension:e,isMixedContent:!0,scriptKind:7})),getServiceScript(e){for(let t of(0,Sm.forEachEmbeddedCode)(e))if(t.id===vc.VIRTUAL_CODE_ID)return{code:t,extension:".ts",scriptKind:3}}}}}var es=class{constructor(e,t,s,i){if(this.fileName=e,this.languageId=t,this.snapshot=s,this.collection=i,this.id="frontmatter-holder",this.mappings=[{sourceOffsets:[0],generatedOffsets:[0],lengths:[this.snapshot.getLength()],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!0}}],this.embeddedCodes=[],this.snapshot=s,!this.collection)return;let r=Fe.frontmatterRE.exec(this.snapshot.getText(0,this.snapshot.getLength()))?.[0];if(!r)return;let o=(0,vc.yaml2ts)(r,this.collection);this.embeddedCodes.push(o.virtualCode)}};Fe.FrontmatterHolder=es});var Oc=b((Qi,Bt)=>{(function(n,e){if(typeof Qi=="object"&&typeof Bt<"u")e(Bt),Bt.exports=t(Bt);else if(typeof define=="function"&&define.amd)define(["module"],function(s){e.apply(this,arguments),s.exports=t(s)});else{let s={exports:{}};e(s),n=typeof globalThis<"u"?globalThis:n||self,n.sourcemapCodec=t(s)}function t(s){return"default"in s.exports?s.exports.default:s.exports}})(Qi,function(n){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r=(O,w)=>{for(var y in w)e(O,y,{get:w[y],enumerable:!0})},o=(O,w,y,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let T of s(w))!i.call(O,T)&&T!==y&&e(O,T,{get:()=>w[T],enumerable:!(E=t(w,T))||E.enumerable});return O},a=O=>o(e({},"__esModule",{value:!0}),O),c={};r(c,{decode:()=>Vt,decodeGeneratedRanges:()=>Y,decodeOriginalScopes:()=>q,encode:()=>Pc,encodeGeneratedRanges:()=>ue,encodeOriginalScopes:()=>F}),n.exports=a(c);var l=",".charCodeAt(0),f=";".charCodeAt(0),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=new Uint8Array(64),p=new Uint8Array(128);for(let O=0;O<d.length;O++){let w=d.charCodeAt(O);u[O]=w,p[w]=O}function m(O,w){let y=0,E=0,T=0;do{let U=O.next();T=p[U],y|=(T&31)<<E,E+=5}while(T&32);let x=y&1;return y>>>=1,x&&(y=-2147483648|-y),w+y}function h(O,w,y){let E=w-y;E=E<0?-E<<1|1:E<<1;do{let T=E&31;E>>>=5,E>0&&(T|=32),O.write(u[T])}while(E>0);return w}function g(O,w){return O.pos>=w?!1:O.peek()!==l}var S=1024*16,v=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(O){return Buffer.from(O.buffer,O.byteOffset,O.byteLength).toString()}}:{decode(O){let w="";for(let y=0;y<O.length;y++)w+=String.fromCharCode(O[y]);return w}},C=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(S)}write(O){let{buffer:w}=this;w[this.pos++]=O,this.pos===S&&(this.out+=v.decode(w),this.pos=0)}flush(){let{buffer:O,out:w,pos:y}=this;return y>0?w+v.decode(O.subarray(0,y)):w}},A=class{constructor(O){this.pos=0,this.buffer=O}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(O){let{buffer:w,pos:y}=this,E=w.indexOf(O,y);return E===-1?w.length:E}},_=[];function q(O){let{length:w}=O,y=new A(O),E=[],T=[],x=0;for(;y.pos<w;y.pos++){x=m(y,x);let U=m(y,0);if(!g(y,w)){let X=T.pop();X[2]=x,X[3]=U;continue}let j=m(y,0),R=m(y,0)&1?[x,U,0,0,j,m(y,0)]:[x,U,0,0,j],z=_;if(g(y,w)){z=[];do{let X=m(y,0);z.push(X)}while(g(y,w))}R.vars=z,E.push(R),T.push(R)}return E}function F(O){let w=new C;for(let y=0;y<O.length;)y=k(O,y,w,[0]);return w.flush()}function k(O,w,y,E){let T=O[w],{0:x,1:U,2:j,3:H,4:G,vars:R}=T;w>0&&y.write(l),E[0]=h(y,x,E[0]),h(y,U,0),h(y,G,0);let z=T.length===6?1:0;h(y,z,0),T.length===6&&h(y,T[5],0);for(let X of R)h(y,X,0);for(w++;w<O.length;){let X=O[w],{0:$,1:Z}=X;if($>j||$===j&&Z>=H)break;w=k(O,w,y,E)}return y.write(l),E[0]=h(y,j,E[0]),h(y,H,0),w}function Y(O){let{length:w}=O,y=new A(O),E=[],T=[],x=0,U=0,j=0,H=0,G=0,R=0,z=0,X=0;do{let $=y.indexOf(";"),Z=0;for(;y.pos<$;y.pos++){if(Z=m(y,Z),!g(y,$)){let oe=T.pop();oe[2]=x,oe[3]=Z;continue}let de=m(y,0),Yt=de&1,ot=de&2,at=de&4,Zi=null,ns=_,xe;if(Yt){let oe=m(y,U);j=m(y,U===oe?j:0),U=oe,xe=[x,Z,0,0,oe,j]}else xe=[x,Z,0,0];if(xe.isScope=!!at,ot){let oe=H,Ue=G;H=m(y,H);let ct=oe===H;G=m(y,ct?G:0),R=m(y,ct&&Ue===G?R:0),Zi=[H,G,R]}if(xe.callsite=Zi,g(y,$)){ns=[];do{z=x,X=Z;let oe=m(y,0),Ue;if(oe<-1){Ue=[[m(y,0)]];for(let ct=-1;ct>oe;ct--){let Dc=z;z=m(y,z),X=m(y,z===Dc?X:0);let Fc=m(y,0);Ue.push([Fc,z,X])}}else Ue=[[oe]];ns.push(Ue)}while(g(y,$))}xe.bindings=ns,E.push(xe),T.push(xe)}x++,y.pos=$+1}while(y.pos<w);return E}function ue(O){if(O.length===0)return"";let w=new C;for(let y=0;y<O.length;)y=ge(O,y,w,[0,0,0,0,0,0,0]);return w.flush()}function ge(O,w,y,E){let T=O[w],{0:x,1:U,2:j,3:H,isScope:G,callsite:R,bindings:z}=T;E[0]<x?(V(y,E[0],x),E[0]=x,E[1]=0):w>0&&y.write(l),E[1]=h(y,T[1],E[1]);let X=(T.length===6?1:0)|(R?2:0)|(G?4:0);if(h(y,X,0),T.length===6){let{4:$,5:Z}=T;$!==E[2]&&(E[3]=0),E[2]=h(y,$,E[2]),E[3]=h(y,Z,E[3])}if(R){let{0:$,1:Z,2:de}=T.callsite;$!==E[4]?(E[5]=0,E[6]=0):Z!==E[5]&&(E[6]=0),E[4]=h(y,$,E[4]),E[5]=h(y,Z,E[5]),E[6]=h(y,de,E[6])}if(z)for(let $ of z){$.length>1&&h(y,-$.length,0);let Z=$[0][0];h(y,Z,0);let de=x,Yt=U;for(let ot=1;ot<$.length;ot++){let at=$[ot];de=h(y,at[1],de),Yt=h(y,at[2],Yt),h(y,at[0],0)}}for(w++;w<O.length;){let $=O[w],{0:Z,1:de}=$;if(Z>j||Z===j&&de>=H)break;w=ge(O,w,y,E)}return E[0]<j?(V(y,E[0],j),E[0]=j,E[1]=0):y.write(l),E[1]=h(y,H,E[1]),w}function V(O,w,y){do O.write(f);while(++w<y)}function Vt(O){let{length:w}=O,y=new A(O),E=[],T=0,x=0,U=0,j=0,H=0;do{let G=y.indexOf(";"),R=[],z=!0,X=0;for(T=0;y.pos<G;){let $;T=m(y,T),T<X&&(z=!1),X=T,g(y,G)?(x=m(y,x),U=m(y,U),j=m(y,j),g(y,G)?(H=m(y,H),$=[T,x,U,j,H]):$=[T,x,U,j]):$=[T],R.push($),y.pos++}z||Mc(R),E.push(R),y.pos=G+1}while(y.pos<=w);return E}function Mc(O){O.sort(Ic)}function Ic(O,w){return O[0]-w[0]}function Pc(O){let w=new C,y=0,E=0,T=0,x=0;for(let U=0;U<O.length;U++){let j=O[U];if(U>0&&w.write(f),j.length===0)continue;let H=0;for(let G=0;G<j.length;G++){let R=j[G];G>0&&w.write(l),H=h(w,R[0],H),R.length!==1&&(y=h(w,R[1],y),E=h(w,R[2],E),T=h(w,R[3],T),R.length!==4&&(x=h(w,R[4],x)))}}return w.flush()}})});var kc={};Bc(kc,{TextDocument:()=>zi});function Xi(n,e){if(n.length<=1)return n;let t=n.length/2|0,s=n.slice(0,t),i=n.slice(t);Xi(s,e),Xi(i,e);let r=0,o=0,a=0;for(;r<s.length&&o<i.length;)e(s[r],i[o])<=0?n[a++]=s[r++]:n[a++]=i[o++];for(;r<s.length;)n[a++]=s[r++];for(;o<i.length;)n[a++]=i[o++];return n}function Ec(n,e,t=0){let s=e?[t]:[];for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);Nc(r)&&(r===13&&i+1<n.length&&n.charCodeAt(i+1)===10&&i++,s.push(t+i+1))}return s}function Nc(n){return n===13||n===10}function Cc(n){let e=n.start,t=n.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function Om(n){let e=Cc(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var Ke,zi,Ac=Rc(()=>{"use strict";Ke=class{constructor(e,t,s,i){this._uri=e,this._languageId=t,this._version=s,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),s=this.offsetAt(e.end);return this._content.substring(t,s)}return this._content}update(e,t){for(let s of e)if(Ke.isIncremental(s)){let i=Cc(s.range),r=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,r)+s.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),c=Math.max(i.end.line,0),l=this._lineOffsets,f=Ec(s.text,!1,r);if(c-a===f.length)for(let u=0,p=f.length;u<p;u++)l[u+a+1]=f[u];else f.length<1e4?l.splice(a+1,c-a,...f):this._lineOffsets=l=l.slice(0,a+1).concat(f,l.slice(c+1));let d=s.text.length-(o-r);if(d!==0)for(let u=a+1+f.length,p=l.length;u<p;u++)l[u]=l[u]+d}else if(Ke.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=t}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Ec(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),s=0,i=t.length;if(i===0)return{line:0,character:e};for(;s<i;){let o=Math.floor((s+i)/2);t[o]>e?i=o:s=o+1}let r=s-1;return e=this.ensureBeforeEOL(e,t[r]),{line:r,character:e-t[r]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let s=t[e.line];if(e.character<=0)return s;let i=e.line+1<t.length?t[e.line+1]:this._content.length,r=Math.min(s+e.character,i);return this.ensureBeforeEOL(r,s)}ensureBeforeEOL(e,t){for(;e>t&&Nc(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")}static isFull(e){let t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0}};(function(n){function e(i,r,o,a){return new Ke(i,r,o,a)}n.create=e;function t(i,r,o){if(i instanceof Ke)return i.update(r,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function s(i,r){let o=i.getText(),a=Xi(r.map(Om),(f,d)=>{let u=f.range.start.line-d.range.start.line;return u===0?f.range.start.character-d.range.start.character:u}),c=0,l=[];for(let f of a){let d=i.offsetAt(f.range.start);if(d<c)throw new Error("Overlapping edit");d>c&&l.push(o.substring(c,d)),f.newText.length&&l.push(f.newText),c=i.offsetAt(f.range.end)}return l.push(o.substr(c)),l.join("")}n.applyEdits=s})(zi||(zi={}))});var qc=b(Kt=>{"use strict";var Em=Kt&&Kt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.astro2tsx=Am;var Lc=Em(require("node:path")),Nm=require("@astrojs/compiler/sync"),Cm=Oc(),_c=(Ac(),Uc(kc));function km(n,e){try{return(0,Nm.convertToTSX)(n,{filename:e.filename})}catch(t){return console.error(`There was an error transforming ${e.filename} to TSX. An empty file will be returned instead. Please create an issue: https://github.com/withastro/astro/issues
|
|
156
|
-
Error: ${t}.`),{code:"",map:{file:e.filename??"",sources:[],sourcesContent:[],names:[],mappings:"",version:0},diagnostics:[{code:1e3,location:{file:e.filename,line:1,column:1,length:n.length},severity:1,text:"The Astro compiler encountered an unknown error while parsing this file. Please create an issue with your code and the error shown in the server's logs: https://github.com/withastro/astro/issues"}],metaRanges:{frontmatter:{start:0,end:0},body:{start:0,end:0}}}}}function Am(n,e){let t=km(n,{filename:e});return{virtualFile:Lm(n,t,e),diagnostics:t.diagnostics}}function Lm(n,e,t){e.code=_m(e.code,t);let s=(0,Cm.decode)(e.map.mappings),i=_c.TextDocument.create(t,"astro",0,n),r=_c.TextDocument.create(t+".tsx","typescriptreact",0,e.code),o=[],a;for(let c=0;c<s.length;c++)for(let l of s[c]){let f=l[0],d=r.offsetAt({line:c,character:f});if(a){let u=d-a.genOffset,p=n.substring(a.sourceOffset,a.sourceOffset+u),m=e.code.substring(a.genOffset,a.genOffset+u);if(p!==m){u=0;for(let h=0;h<d-a.genOffset&&p[h]===m[h];h++)u=h+1}if(u>0){let h=o.length?o[o.length-1]:void 0;h&&h.generatedOffsets[0]+h.lengths[0]===a.genOffset&&h.sourceOffsets[0]+h.lengths[0]===a.sourceOffset?h.lengths[0]+=u:o.push({sourceOffsets:[a.sourceOffset],generatedOffsets:[a.genOffset],lengths:[u],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!1}})}a=void 0}if(l[2]!==void 0&&l[3]!==void 0){let u=i.offsetAt({line:l[2],character:l[3]});a={genOffset:d,sourceOffset:u}}}return{id:"tsx",languageId:"typescriptreact",snapshot:{getText:(c,l)=>e.code.substring(c,l),getLength:()=>e.code.length,getChangeRange:()=>{}},mappings:o,embeddedCodes:[]}}function _m(n,e){let t=Lc.default.basename(e,Lc.default.extname(e)),s=t.startsWith("[")&&t.endsWith("]");return n.replace(/\b(\S*)__AstroComponent_/g,(i,r)=>r?s?`_${r}_`:r[0].toUpperCase()+r.slice(1):t==="404"?"FourOhFour":i)}});var Tc=b(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.AstroVirtualCode=void 0;Ut.getLanguagePlugin=Mm;var qm=Ye(),Tm=qc();function Mm(){return{getLanguageId(n){if(n.endsWith(".astro"))return"astro"},createVirtualCode(n,e,t){if(e==="astro")return new ts(n,t)},typescript:{extraFileExtensions:[{extension:"astro",isMixedContent:!0,scriptKind:7}],getServiceScript(n){for(let e of(0,qm.forEachEmbeddedCode)(n))if(e.id==="tsx")return{code:e,extension:".tsx",scriptKind:4}}}}}var ts=class{constructor(e,t){this.fileName=e,this.snapshot=t,this.id="root",this.languageId="astro",this.codegenStacks=[],this.mappings=[{sourceOffsets:[0],generatedOffsets:[0],lengths:[this.snapshot.getLength()],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!1}}],this.embeddedCodes=[];let s=(0,Tm.astro2tsx)(this.snapshot.getText(0,this.snapshot.getLength()),this.fileName);this.embeddedCodes.push(s.virtualFile)}};Ut.AstroVirtualCode=ts});var Im=kr(),Pm=wc(),Dm=Tc();module.exports=(0,Im.createLanguageServicePlugin)((n,e)=>{let t;try{let i=e.project.getCurrentDirectory(),r=n.sys.readFile(i+"/.astro/collections/collections.json");r&&(t={folder:i,config:JSON.parse(r)})}catch(i){i&&i.code!=="ENOENT"&&console.error(i)}let s=[(0,Dm.getLanguagePlugin)()];return t&&s.push((0,Pm.getFrontmatterLanguagePlugin)([t])),{languagePlugins:s}});
|