odm-client 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/mongodb-client.d.ts +9 -7
- package/dist/client/mongodb-index.d.ts +2 -2
- package/dist/cloudbase-index.cjs +1 -1
- package/dist/cloudbase-index.js +66 -56
- package/dist/decorators/index.d.ts +7 -0
- package/dist/deps/_commonjsHelpers-KaVRbhAgd4-5pgl5rkso.js +28 -0
- package/dist/deps/_commonjsHelpers-KaVRbhAgd4-r4alsdeis.js +1 -0
- package/dist/deps/acorn-DYjaOAP8Gz-29lcn4w0b.js +16 -0
- package/dist/deps/acorn-DYjaOAP8Gz-gyct7wut5.js +3005 -0
- package/dist/deps/angular-1bp1uAROl4-bz9b1prej.js +2533 -0
- package/dist/deps/angular-1bp1uAROl4-z3xa5q2km.js +3 -0
- package/dist/deps/babel-_P9jsDBVVy-ipfz7c01i.js +7217 -0
- package/dist/deps/babel-_P9jsDBVVy-kjb76ly0t.js +15 -0
- package/dist/deps/estree-Q-oFBmJEml-u09jq3zep.js +44 -0
- package/dist/deps/estree-Q-oFBmJEml-w9z7zljkf.js +4528 -0
- package/dist/deps/flow-j77MFvzLrn-kf5rv1yl1.js +20 -0
- package/dist/deps/flow-j77MFvzLrn-l8rtylmcl.js +27411 -0
- package/dist/deps/glimmer-ewQPb5nTUl-5p9240228.js +37 -0
- package/dist/deps/glimmer-ewQPb5nTUl-xsdp5ejns.js +2703 -0
- package/dist/deps/graphql-8EXR1_taGG-a4my17998.js +28 -0
- package/dist/deps/graphql-8EXR1_taGG-iqqy1396h.js +1221 -0
- package/dist/deps/html-dGbiW_CFWL-inuu6eaf1.js +25 -0
- package/dist/deps/html-dGbiW_CFWL-mq1pmq7je.js +2791 -0
- package/dist/deps/markdown-vAYIRClyWZ-el25zjeip.js +62 -0
- package/dist/deps/markdown-vAYIRClyWZ-f8svm8az3.js +3190 -0
- package/dist/deps/meriyah-d5_qqf88x--ntk7vora9.js +5 -0
- package/dist/deps/meriyah-d5_qqf88x--tbqv1nv9b.js +2645 -0
- package/dist/deps/postcss-Vz5bDQ3hJO-if8y8k5xi.js +4739 -0
- package/dist/deps/postcss-Vz5bDQ3hJO-rmv75nb4j.js +61 -0
- package/dist/deps/typescript-2hCq12HCbJ-n0w7fscoa.js +21 -0
- package/dist/deps/typescript-2hCq12HCbJ-yusfiayfb.js +12947 -0
- package/dist/deps/yaml-I5o0CrcX7J-ibk1yd293.js +4079 -0
- package/dist/deps/yaml-I5o0CrcX7J-xyc4o9p22.js +159 -0
- package/dist/generator/cloudbase-init-generator.d.ts +8 -0
- package/dist/generator/enum-generator.d.ts +3 -0
- package/dist/generator/index.d.ts +6 -0
- package/dist/generator/mongodb-init-generator.d.ts +9 -0
- package/dist/generator/parser.d.ts +21 -0
- package/dist/generator/table-generator.d.ts +3 -0
- package/dist/generator/type-generator.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -29
- package/dist/index2.cjs +42770 -0
- package/dist/index2.js +242204 -0
- package/dist/mongodb-index.cjs +11 -11
- package/dist/mongodb-index.js +2103 -2106
- package/dist/types/index.d.ts +14 -0
- package/package.json +3 -1
- /package/dist/deps/{query-builder-h6B2D2BCoQ-4ajykqs3m.js → query-builder-h6B2D2BCoQ-f5zcr506g.js} +0 -0
- /package/dist/deps/{query-builder-h6B2D2BCoQ-wqso6i87o.js → query-builder-h6B2D2BCoQ-iw94q0kiz.js} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";var mr=Object.defineProperty;var Ft=t=>{throw TypeError(t)};var gr=(t,e,n)=>e in t?mr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ue=(t,e,n)=>gr(t,typeof e!="symbol"?e+"":e,n),ct=(t,e,n)=>e.has(t)||Ft("Cannot "+n);var Be=(t,e,n)=>(ct(t,e,"read from private field"),n?n.call(t):e.get(t)),tt=(t,e,n)=>e.has(t)?Ft("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ft=(t,e,n,c)=>(ct(t,e,"write to private field"),c?c.call(t,n):e.set(t,n),n),Ve=(t,e,n)=>(ct(t,e,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var yr=Object.create,Tt=Object.defineProperty,vr=Object.getOwnPropertyDescriptor,Er=Object.getOwnPropertyNames,Sr=Object.getPrototypeOf,br=Object.prototype.hasOwnProperty,Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nn=(t,e)=>{for(var n in e)Tt(t,n,{get:e[n],enumerable:!0})},wr=(t,e,n,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let g of Er(e))!br.call(t,g)&&g!==n&&Tt(t,g,{get:()=>e[g],enumerable:!(c=vr(e,g))||c.enumerable});return t},xt=(t,e,n)=>(n=t!=null?yr(Sr(t)):{},wr(Tt(n,"default",{value:t,enumerable:!0}),t)),Re=Me(t=>{var e={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},n={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},c="tag:yaml.org,2002:",g={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function y(l){let i=[0],r=l.indexOf(`
|
|
2
|
+
`);for(;r!==-1;)r+=1,i.push(r),r=l.indexOf(`
|
|
3
|
+
`,r);return i}function b(l){let i,r;return typeof l=="string"?(i=y(l),r=l):(Array.isArray(l)&&(l=l[0]),l&&l.context&&(l.lineStarts||(l.lineStarts=y(l.context.src)),i=l.lineStarts,r=l.context.src)),{lineStarts:i,src:r}}function A(l,i){if(typeof l!="number"||l<0)return null;let{lineStarts:r,src:s}=b(i);if(!r||!s||l>s.length)return null;for(let p=0;p<r.length;++p){let u=r[p];if(l<u)return{line:p,col:l-r[p-1]+1};if(l===u)return{line:p+1,col:1}}let o=r.length;return{line:o,col:l-r[o-1]+1}}function k(l,i){let{lineStarts:r,src:s}=b(i);if(!r||!(l>=1)||l>r.length)return null;let o=r[l-1],p=r[l];for(;p&&p>o&&s[p-1]===`
|
|
4
|
+
`;)--p;return s.slice(o,p)}function C({start:l,end:i},r,s=80){let o=k(l.line,r);if(!o)return null;let{col:p}=l;if(o.length>s)if(p<=s-10)o=o.substr(0,s-1)+"…";else{let x=Math.round(s/2);o.length>p+x&&(o=o.substr(0,p+x-1)+"…"),p-=o.length-s,o="…"+o.substr(1-s)}let u=1,h="";i&&(i.line===l.line&&p+(i.col-l.col)<=s+1?u=i.col-l.col:(u=Math.min(o.length+1,s)-p,h="…"));let E=p>1?" ".repeat(p-1):"",O="^".repeat(u);return`${o}
|
|
5
|
+
${E}${O}${h}`}var P=class rn{static copy(i){return new rn(i.start,i.end)}constructor(i,r){this.start=i,this.end=r||i}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(i,r){let{start:s,end:o}=this;if(i.length===0||o<=i[0])return this.origStart=s,this.origEnd=o,r;let p=r;for(;p<i.length&&!(i[p]>s);)++p;this.origStart=s+p;let u=p;for(;p<i.length&&!(i[p]>=o);)++p;return this.origEnd=o+p,u}},F=class Ae{static addStringTerminator(i,r,s){if(s[s.length-1]===`
|
|
6
|
+
`)return s;let o=Ae.endOfWhiteSpace(i,r);return o>=i.length||i[o]===`
|
|
7
|
+
`?s+`
|
|
8
|
+
`:s}static atDocumentBoundary(i,r,s){let o=i[r];if(!o)return!0;let p=i[r-1];if(p&&p!==`
|
|
9
|
+
`)return!1;if(s){if(o!==s)return!1}else if(o!==e.DIRECTIVES_END&&o!==e.DOCUMENT_END)return!1;let u=i[r+1],h=i[r+2];if(u!==o||h!==o)return!1;let E=i[r+3];return!E||E===`
|
|
10
|
+
`||E===" "||E===" "}static endOfIdentifier(i,r){let s=i[r],o=s==="<",p=o?[`
|
|
11
|
+
`," "," ",">"]:[`
|
|
12
|
+
`," "," ","[","]","{","}",","];for(;s&&p.indexOf(s)===-1;)s=i[r+=1];return o&&s===">"&&(r+=1),r}static endOfIndent(i,r){let s=i[r];for(;s===" ";)s=i[r+=1];return r}static endOfLine(i,r){let s=i[r];for(;s&&s!==`
|
|
13
|
+
`;)s=i[r+=1];return r}static endOfWhiteSpace(i,r){let s=i[r];for(;s===" "||s===" ";)s=i[r+=1];return r}static startOfLine(i,r){let s=i[r-1];if(s===`
|
|
14
|
+
`)return r;for(;s&&s!==`
|
|
15
|
+
`;)s=i[r-=1];return r+1}static endOfBlockIndent(i,r,s){let o=Ae.endOfIndent(i,s);if(o>s+r)return o;{let p=Ae.endOfWhiteSpace(i,o),u=i[p];if(!u||u===`
|
|
16
|
+
`)return p}return null}static atBlank(i,r,s){let o=i[r];return o===`
|
|
17
|
+
`||o===" "||o===" "||s&&!o}static nextNodeIsIndented(i,r,s){return!i||r<0?!1:r>0?!0:s&&i==="-"}static normalizeOffset(i,r){let s=i[r];return s?s!==`
|
|
18
|
+
`&&i[r-1]===`
|
|
19
|
+
`?r-1:Ae.endOfWhiteSpace(i,r):r}static foldNewline(i,r,s){let o=0,p=!1,u="",h=i[r+1];for(;h===" "||h===" "||h===`
|
|
20
|
+
`;){switch(h){case`
|
|
21
|
+
`:o=0,r+=1,u+=`
|
|
22
|
+
`;break;case" ":o<=s&&(p=!0),r=Ae.endOfWhiteSpace(i,r+2)-1;break;case" ":o+=1,r+=1;break}h=i[r+1]}return u||(u=" "),h&&o<=s&&(p=!0),{fold:u,offset:r,error:p}}constructor(i,r,s){Object.defineProperty(this,"context",{value:s||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=r||[],this.type=i,this.value=null}getPropValue(i,r,s){if(!this.context)return null;let{src:o}=this.context,p=this.props[i];return p&&o[p.start]===r?o.slice(p.start+(s?1:0),p.end):null}get anchor(){for(let i=0;i<this.props.length;++i){let r=this.getPropValue(i,e.ANCHOR,!0);if(r!=null)return r}return null}get comment(){let i=[];for(let r=0;r<this.props.length;++r){let s=this.getPropValue(r,e.COMMENT,!0);s!=null&&i.push(s)}return i.length>0?i.join(`
|
|
23
|
+
`):null}commentHasRequiredWhitespace(i){let{src:r}=this.context;if(this.header&&i===this.header.end||!this.valueRange)return!1;let{end:s}=this.valueRange;return i!==s||Ae.atBlank(r,s-1)}get hasComment(){if(this.context){let{src:i}=this.context;for(let r=0;r<this.props.length;++r)if(i[this.props[r].start]===e.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:i}=this.context;for(let r=0;r<this.props.length;++r)if(i[this.props[r].start]!==e.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[n.FLOW_MAP,n.FLOW_SEQ,n.QUOTE_DOUBLE,n.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let i=A(this.range.start,this.context.root);if(!i)return;let r=A(this.range.end,this.context.root);return{start:i,end:r}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:i,end:r}=this.valueRange;return this.context.src.slice(i,r)}get tag(){for(let i=0;i<this.props.length;++i){let r=this.getPropValue(i,e.TAG,!1);if(r!=null){if(r[1]==="<")return{verbatim:r.slice(2,-1)};{let[s,o,p]=r.match(/^(.*!)([^!]*)$/);return{handle:o,suffix:p}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:i,end:r}=this.valueRange,{src:s}=this.context;for(let o=i;o<r;++o)if(s[o]===`
|
|
24
|
+
`)return!0;return!1}parseComment(i){let{src:r}=this.context;if(r[i]===e.COMMENT){let s=Ae.endOfLine(r,i+1),o=new P(i,s);return this.props.push(o),s}return i}setOrigRanges(i,r){return this.range&&(r=this.range.setOrigRange(i,r)),this.valueRange&&this.valueRange.setOrigRange(i,r),this.props.forEach(s=>s.setOrigRange(i,r)),r}toString(){let{context:{src:i},range:r,value:s}=this;if(s!=null)return s;let o=i.slice(r.start,r.end);return Ae.addStringTerminator(i,r.end,o)}},ie=class extends Error{constructor(l,i,r){if(!r||!(i instanceof F))throw new Error(`Invalid arguments for new ${l}`);super(),this.name=l,this.message=r,this.source=i}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let l=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new P(this.offset,this.offset+1);let i=l&&A(this.offset,l);if(i){let r={line:i.line,col:i.col+1};this.linePos={start:i,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:i,col:r}=this.linePos.start;this.message+=` at line ${i}, column ${r}`;let s=l&&C(this.linePos,l);s&&(this.message+=`:
|
|
25
|
+
|
|
26
|
+
${s}
|
|
27
|
+
`)}delete this.source}},q=class extends ie{constructor(l,i){super("YAMLReferenceError",l,i)}},z=class extends ie{constructor(l,i){super("YAMLSemanticError",l,i)}},K=class extends ie{constructor(l,i){super("YAMLSyntaxError",l,i)}},ee=class extends ie{constructor(l,i){super("YAMLWarning",l,i)}};function le(l,i,r){return i in l?Object.defineProperty(l,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[i]=r,l}var M=class yt extends F{static endOfLine(i,r,s){let o=i[r],p=r;for(;o&&o!==`
|
|
28
|
+
`&&!(s&&(o==="["||o==="]"||o==="{"||o==="}"||o===","));){let u=i[p+1];if(o===":"&&(!u||u===`
|
|
29
|
+
`||u===" "||u===" "||s&&u===",")||(o===" "||o===" ")&&u==="#")break;p+=1,o=u}return p}get strValue(){if(!this.valueRange||!this.context)return null;let{start:i,end:r}=this.valueRange,{src:s}=this.context,o=s[r-1];for(;i<r&&(o===`
|
|
30
|
+
`||o===" "||o===" ");)o=s[--r-1];let p="";for(let h=i;h<r;++h){let E=s[h];if(E===`
|
|
31
|
+
`){let{fold:O,offset:x}=F.foldNewline(s,h,-1);p+=O,h=x}else if(E===" "||E===" "){let O=h,x=s[h+1];for(;h<r&&(x===" "||x===" ");)h+=1,x=s[h+1];x!==`
|
|
32
|
+
`&&(p+=h>O?s.slice(O,h+1):E)}else p+=E}let u=s[i];switch(u){case" ":{let h="Plain value cannot start with a tab character";return{errors:[new z(this,h)],str:p}}case"@":case"`":{let h=`Plain value cannot start with reserved character ${u}`;return{errors:[new z(this,h)],str:p}}default:return p}}parseBlockValue(i){let{indent:r,inFlow:s,src:o}=this.context,p=i,u=i;for(let h=o[p];h===`
|
|
33
|
+
`&&!F.atDocumentBoundary(o,p+1);h=o[p]){let E=F.endOfBlockIndent(o,r,p+1);if(E===null||o[E]==="#")break;o[E]===`
|
|
34
|
+
`?p=E:(u=yt.endOfLine(o,E,s),p=u)}return this.valueRange.isEmpty()&&(this.valueRange.start=i),this.valueRange.end=u,u}parse(i,r){this.context=i;let{inFlow:s,src:o}=i,p=r,u=o[p];return u&&u!=="#"&&u!==`
|
|
35
|
+
`&&(p=yt.endOfLine(o,r,s)),this.valueRange=new P(r,p),p=F.endOfWhiteSpace(o,p),p=this.parseComment(p),(!this.hasComment||this.valueRange.isEmpty())&&(p=this.parseBlockValue(p)),p}};t.Char=e,t.Node=F,t.PlainValue=M,t.Range=P,t.Type=n,t.YAMLError=ie,t.YAMLReferenceError=q,t.YAMLSemanticError=z,t.YAMLSyntaxError=K,t.YAMLWarning=ee,t._defineProperty=le,t.defaultTagPrefix=c,t.defaultTags=g}),Or=Me(t=>{var e=Re(),n=class extends e.Node{constructor(){super(e.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(M,l){return this.context=M,this.range=new e.Range(l,l+1),l+1}},c=class extends e.Node{constructor(M,l){super(M,l),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(M,l){this.context=M;let{parseNode:i,src:r}=M,{atLineStart:s,lineStart:o}=M;!s&&this.type===e.Type.SEQ_ITEM&&(this.error=new e.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let p=s?l-o:M.indent,u=e.Node.endOfWhiteSpace(r,l+1),h=r[u],E=h==="#",O=[],x=null;for(;h===`
|
|
36
|
+
`||h==="#";){if(h==="#"){let W=e.Node.endOfLine(r,u+1);O.push(new e.Range(u,W)),u=W}else{s=!0,o=u+1;let W=e.Node.endOfWhiteSpace(r,o);r[W]===`
|
|
37
|
+
`&&O.length===0&&(x=new n,o=x.parse({src:r},o)),u=e.Node.endOfIndent(r,o)}h=r[u]}if(e.Node.nextNodeIsIndented(h,u-(o+p),this.type!==e.Type.SEQ_ITEM)?this.node=i({atLineStart:s,inCollection:!1,indent:p,lineStart:o,parent:this},u):h&&o>l+1&&(u=o-1),this.node){if(x){let W=M.parent.items||M.parent.contents;W&&W.push(x)}O.length&&Array.prototype.push.apply(this.props,O),u=this.node.range.end}else if(E){let W=O[0];this.props.push(W),u=W.end}else u=e.Node.endOfLine(r,l+1);let _=this.node?this.node.valueRange.end:u;return this.valueRange=new e.Range(l,_),u}setOrigRanges(M,l){return l=super.setOrigRanges(M,l),this.node?this.node.setOrigRanges(M,l):l}toString(){let{context:{src:M},node:l,range:i,value:r}=this;if(r!=null)return r;let s=l?M.slice(i.start,l.range.start)+String(l):M.slice(i.start,i.end);return e.Node.addStringTerminator(M,i.end,s)}},g=class extends e.Node{constructor(){super(e.Type.COMMENT)}parse(M,l){this.context=M;let i=this.parseComment(l);return this.range=new e.Range(l,i),i}};function y(M){let l=M;for(;l instanceof c;)l=l.node;if(!(l instanceof b))return null;let i=l.items.length,r=-1;for(let p=i-1;p>=0;--p){let u=l.items[p];if(u.type===e.Type.COMMENT){let{indent:h,lineStart:E}=u.context;if(h>0&&u.range.start>=E+h)break;r=p}else if(u.type===e.Type.BLANK_LINE)r=p;else break}if(r===-1)return null;let s=l.items.splice(r,i-r),o=s[0].range.start;for(;l.range.end=o,l.valueRange&&l.valueRange.end>o&&(l.valueRange.end=o),l!==M;)l=l.context.parent;return s}var b=class vt extends e.Node{static nextContentHasIndent(l,i,r){let s=e.Node.endOfLine(l,i)+1;i=e.Node.endOfWhiteSpace(l,s);let o=l[i];return o?i>=s+r?!0:o!=="#"&&o!==`
|
|
38
|
+
`?!1:vt.nextContentHasIndent(l,i,r):!1}constructor(l){super(l.type===e.Type.SEQ_ITEM?e.Type.SEQ:e.Type.MAP);for(let r=l.props.length-1;r>=0;--r)if(l.props[r].start<l.context.lineStart){this.props=l.props.slice(0,r+1),l.props=l.props.slice(r+1);let s=l.props[0]||l.valueRange;l.range.start=s.start;break}this.items=[l];let i=y(l);i&&Array.prototype.push.apply(this.items,i)}get includesTrailingLines(){return this.items.length>0}parse(l,i){this.context=l;let{parseNode:r,src:s}=l,o=e.Node.startOfLine(s,i),p=this.items[0];p.context.parent=this,this.valueRange=e.Range.copy(p.valueRange);let u=p.range.start-p.context.lineStart,h=i;h=e.Node.normalizeOffset(s,h);let E=s[h],O=e.Node.endOfWhiteSpace(s,o)===h,x=!1;for(;E;){for(;E===`
|
|
39
|
+
`||E==="#";){if(O&&E===`
|
|
40
|
+
`&&!x){let B=new n;if(h=B.parse({src:s},h),this.valueRange.end=h,h>=s.length){E=null;break}this.items.push(B),h-=1}else if(E==="#"){if(h<o+u&&!vt.nextContentHasIndent(s,h,u))return h;let B=new g;if(h=B.parse({indent:u,lineStart:o,src:s},h),this.items.push(B),this.valueRange.end=h,h>=s.length){E=null;break}}if(o=h+1,h=e.Node.endOfIndent(s,o),e.Node.atBlank(s,h)){let B=e.Node.endOfWhiteSpace(s,h),U=s[B];(!U||U===`
|
|
41
|
+
`||U==="#")&&(h=B)}E=s[h],O=!0}if(!E)break;if(h!==o+u&&(O||E!==":")){if(h<o+u){o>i&&(h=o);break}else if(!this.error){let B="All collection items must start at the same column";this.error=new e.YAMLSyntaxError(this,B)}}if(p.type===e.Type.SEQ_ITEM){if(E!=="-"){o>i&&(h=o);break}}else if(E==="-"&&!this.error){let B=s[h+1];if(!B||B===`
|
|
42
|
+
`||B===" "||B===" "){let U="A collection cannot be both a mapping and a sequence";this.error=new e.YAMLSyntaxError(this,U)}}let _=r({atLineStart:O,inCollection:!0,indent:u,lineStart:o,parent:this},h);if(!_)return h;if(this.items.push(_),this.valueRange.end=_.valueRange.end,h=e.Node.normalizeOffset(s,_.range.end),E=s[h],O=!1,x=_.includesTrailingLines,E){let B=h-1,U=s[B];for(;U===" "||U===" ";)U=s[--B];U===`
|
|
43
|
+
`&&(o=B+1,O=!0)}let W=y(_);W&&Array.prototype.push.apply(this.items,W)}return h}setOrigRanges(l,i){return i=super.setOrigRanges(l,i),this.items.forEach(r=>{i=r.setOrigRanges(l,i)}),i}toString(){let{context:{src:l},items:i,range:r,value:s}=this;if(s!=null)return s;let o=l.slice(r.start,i[0].range.start)+String(i[0]);for(let p=1;p<i.length;++p){let u=i[p],{atLineStart:h,indent:E}=u.context;if(h)for(let O=0;O<E;++O)o+=" ";o+=String(u)}return e.Node.addStringTerminator(l,r.end,o)}},A=class extends e.Node{constructor(){super(e.Type.DIRECTIVE),this.name=null}get parameters(){let M=this.rawValue;return M?M.trim().split(/[ \t]+/):[]}parseName(M){let{src:l}=this.context,i=M,r=l[i];for(;r&&r!==`
|
|
44
|
+
`&&r!==" "&&r!==" ";)r=l[i+=1];return this.name=l.slice(M,i),i}parseParameters(M){let{src:l}=this.context,i=M,r=l[i];for(;r&&r!==`
|
|
45
|
+
`&&r!=="#";)r=l[i+=1];return this.valueRange=new e.Range(M,i),i}parse(M,l){this.context=M;let i=this.parseName(l+1);return i=this.parseParameters(i),i=this.parseComment(i),this.range=new e.Range(l,i),i}},k=class Et extends e.Node{static startCommentOrEndBlankLine(l,i){let r=e.Node.endOfWhiteSpace(l,i),s=l[r];return s==="#"||s===`
|
|
46
|
+
`?r:i}constructor(){super(e.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(l){let{src:i}=this.context;this.directives=[];let r=!0,s=!1,o=l;for(;!e.Node.atDocumentBoundary(i,o,e.Char.DIRECTIVES_END);)switch(o=Et.startCommentOrEndBlankLine(i,o),i[o]){case`
|
|
47
|
+
`:if(r){let p=new n;o=p.parse({src:i},o),o<i.length&&this.directives.push(p)}else o+=1,r=!0;break;case"#":{let p=new g;o=p.parse({src:i},o),this.directives.push(p),r=!1}break;case"%":{let p=new A;o=p.parse({parent:this,src:i},o),this.directives.push(p),s=!0,r=!1}break;default:return s?this.error=new e.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o}return i[o]?(this.directivesEndMarker=new e.Range(o,o+3),o+3):(s?this.error=new e.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}parseContents(l){let{parseNode:i,src:r}=this.context;this.contents||(this.contents=[]);let s=l;for(;r[s-1]==="-";)s-=1;let o=e.Node.endOfWhiteSpace(r,l),p=s===l;for(this.valueRange=new e.Range(o);!e.Node.atDocumentBoundary(r,o,e.Char.DOCUMENT_END);){switch(r[o]){case`
|
|
48
|
+
`:if(p){let u=new n;o=u.parse({src:r},o),o<r.length&&this.contents.push(u)}else o+=1,p=!0;s=o;break;case"#":{let u=new g;o=u.parse({src:r},o),this.contents.push(u),p=!1}break;default:{let u=e.Node.endOfIndent(r,o),h=i({atLineStart:p,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},u);if(!h)return this.valueRange.end=u;this.contents.push(h),o=h.range.end,p=!1;let E=y(h);E&&Array.prototype.push.apply(this.contents,E)}}o=Et.startCommentOrEndBlankLine(r,o)}if(this.valueRange.end=o,r[o]&&(this.documentEndMarker=new e.Range(o,o+3),o+=3,r[o])){if(o=e.Node.endOfWhiteSpace(r,o),r[o]==="#"){let u=new g;o=u.parse({src:r},o),this.contents.push(u)}switch(r[o]){case`
|
|
49
|
+
`:o+=1;break;case void 0:break;default:this.error=new e.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return o}parse(l,i){l.root=this,this.context=l;let{src:r}=l,s=r.charCodeAt(i)===65279?i+1:i;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(l,i){return i=super.setOrigRanges(l,i),this.directives.forEach(r=>{i=r.setOrigRanges(l,i)}),this.directivesEndMarker&&(i=this.directivesEndMarker.setOrigRange(l,i)),this.contents.forEach(r=>{i=r.setOrigRanges(l,i)}),this.documentEndMarker&&(i=this.documentEndMarker.setOrigRange(l,i)),i}toString(){let{contents:l,directives:i,value:r}=this;if(r!=null)return r;let s=i.join("");return l.length>0&&((i.length>0||l[0].type===e.Type.COMMENT)&&(s+=`---
|
|
50
|
+
`),s+=l.join("")),s[s.length-1]!==`
|
|
51
|
+
`&&(s+=`
|
|
52
|
+
`),s}},C=class extends e.Node{parse(M,l){this.context=M;let{src:i}=M,r=e.Node.endOfIdentifier(i,l+1);return this.valueRange=new e.Range(l+1,r),r=e.Node.endOfWhiteSpace(i,r),r=this.parseComment(r),r}},P={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},F=class extends e.Node{constructor(M,l){super(M,l),this.blockIndent=null,this.chomping=P.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===P.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:M,end:l}=this.valueRange,{indent:i,src:r}=this.context;if(this.valueRange.isEmpty())return"";let s=null,o=r[l-1];for(;o===`
|
|
53
|
+
`||o===" "||o===" ";){if(l-=1,l<=M){if(this.chomping===P.KEEP)break;return""}o===`
|
|
54
|
+
`&&(s=l),o=r[l-1]}let p=l+1;s&&(this.chomping===P.KEEP?(p=s,l=this.valueRange.end):l=s);let u=i+this.blockIndent,h=this.type===e.Type.BLOCK_FOLDED,E=!0,O="",x="",_=!1;for(let W=M;W<l;++W){for(let U=0;U<u&&r[W]===" ";++U)W+=1;let B=r[W];if(B===`
|
|
55
|
+
`)x===`
|
|
56
|
+
`?O+=`
|
|
57
|
+
`:x=`
|
|
58
|
+
`;else{let U=e.Node.endOfLine(r,W),oe=r.slice(W,U);W=U,h&&(B===" "||B===" ")&&W<p?(x===" "?x=`
|
|
59
|
+
`:!_&&!E&&x===`
|
|
60
|
+
`&&(x=`
|
|
61
|
+
|
|
62
|
+
`),O+=x+oe,x=U<l&&r[U]||"",_=!0):(O+=x+oe,x=h&&W<p?" ":`
|
|
63
|
+
`,_=!1),E&&oe!==""&&(E=!1)}}return this.chomping===P.STRIP?O:O+`
|
|
64
|
+
`}parseBlockHeader(M){let{src:l}=this.context,i=M+1,r="";for(;;){let s=l[i];switch(s){case"-":this.chomping=P.STRIP;break;case"+":this.chomping=P.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=s;break;default:return this.blockIndent=Number(r)||null,this.header=new e.Range(M,i),i}i+=1}}parseBlockValue(M){let{indent:l,src:i}=this.context,r=!!this.blockIndent,s=M,o=M,p=1;for(let u=i[s];u===`
|
|
65
|
+
`&&(s+=1,!e.Node.atDocumentBoundary(i,s));u=i[s]){let h=e.Node.endOfBlockIndent(i,l,s);if(h===null)break;let E=i[h],O=h-(s+l);if(this.blockIndent){if(E&&E!==`
|
|
66
|
+
`&&O<this.blockIndent){if(i[h]==="#")break;if(!this.error){let x=`Block scalars must not be less indented than their ${r?"explicit indentation indicator":"first line"}`;this.error=new e.YAMLSemanticError(this,x)}}}else if(i[h]!==`
|
|
67
|
+
`){if(O<p){let x="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new e.YAMLSemanticError(this,x)}this.blockIndent=O}else O>p&&(p=O);i[h]===`
|
|
68
|
+
`?s=h:s=o=e.Node.endOfLine(i,h)}return this.chomping!==P.KEEP&&(s=i[o]?o+1:o),this.valueRange=new e.Range(M+1,s),s}parse(M,l){this.context=M;let{src:i}=M,r=this.parseBlockHeader(l);return r=e.Node.endOfWhiteSpace(i,r),r=this.parseComment(r),r=this.parseBlockValue(r),r}setOrigRanges(M,l){return l=super.setOrigRanges(M,l),this.header?this.header.setOrigRange(M,l):l}},ie=class extends e.Node{constructor(M,l){super(M,l),this.items=null}prevNodeIsJsonLike(M=this.items.length){let l=this.items[M-1];return!!l&&(l.jsonLike||l.type===e.Type.COMMENT&&this.prevNodeIsJsonLike(M-1))}parse(M,l){this.context=M;let{parseNode:i,src:r}=M,{indent:s,lineStart:o}=M,p=r[l];this.items=[{char:p,offset:l}];let u=e.Node.endOfWhiteSpace(r,l+1);for(p=r[u];p&&p!=="]"&&p!=="}";){switch(p){case`
|
|
69
|
+
`:{o=u+1;let h=e.Node.endOfWhiteSpace(r,o);if(r[h]===`
|
|
70
|
+
`){let E=new n;o=E.parse({src:r},o),this.items.push(E)}if(u=e.Node.endOfIndent(r,o),u<=o+s&&(p=r[u],u<o+s||p!=="]"&&p!=="}")){let E="Insufficient indentation in flow collection";this.error=new e.YAMLSemanticError(this,E)}}break;case",":this.items.push({char:p,offset:u}),u+=1;break;case"#":{let h=new g;u=h.parse({src:r},u),this.items.push(h)}break;case"?":case":":{let h=r[u+1];if(h===`
|
|
71
|
+
`||h===" "||h===" "||h===","||p===":"&&this.prevNodeIsJsonLike()){this.items.push({char:p,offset:u}),u+=1;break}}default:{let h=i({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},u);if(!h)return this.valueRange=new e.Range(l,u),u;this.items.push(h),u=e.Node.normalizeOffset(r,h.range.end)}}u=e.Node.endOfWhiteSpace(r,u),p=r[u]}return this.valueRange=new e.Range(l,u+1),p&&(this.items.push({char:p,offset:u}),u=e.Node.endOfWhiteSpace(r,u+1),u=this.parseComment(u)),u}setOrigRanges(M,l){return l=super.setOrigRanges(M,l),this.items.forEach(i=>{if(i instanceof e.Node)l=i.setOrigRanges(M,l);else if(M.length===0)i.origOffset=i.offset;else{let r=l;for(;r<M.length&&!(M[r]>i.offset);)++r;i.origOffset=i.offset+r,l=r}}),l}toString(){let{context:{src:M},items:l,range:i,value:r}=this;if(r!=null)return r;let s=l.filter(u=>u instanceof e.Node),o="",p=i.start;return s.forEach(u=>{let h=M.slice(p,u.range.start);p=u.range.end,o+=h+String(u),o[o.length-1]===`
|
|
72
|
+
`&&M[p-1]!==`
|
|
73
|
+
`&&M[p]===`
|
|
74
|
+
`&&(p+=1)}),o+=M.slice(p,i.end),e.Node.addStringTerminator(M,i.end,o)}},q=class sn extends e.Node{static endOfQuote(l,i){let r=l[i];for(;r&&r!=='"';)i+=r==="\\"?2:1,r=l[i];return i+1}get strValue(){if(!this.valueRange||!this.context)return null;let l=[],{start:i,end:r}=this.valueRange,{indent:s,src:o}=this.context;o[r-1]!=='"'&&l.push(new e.YAMLSyntaxError(this,'Missing closing "quote'));let p="";for(let u=i+1;u<r-1;++u){let h=o[u];if(h===`
|
|
75
|
+
`){e.Node.atDocumentBoundary(o,u+1)&&l.push(new e.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:E,offset:O,error:x}=e.Node.foldNewline(o,u,s);p+=E,u=O,x&&l.push(new e.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(h==="\\")switch(u+=1,o[u]){case"0":p+="\0";break;case"a":p+="\x07";break;case"b":p+="\b";break;case"e":p+="\x1B";break;case"f":p+="\f";break;case"n":p+=`
|
|
76
|
+
`;break;case"r":p+="\r";break;case"t":p+=" ";break;case"v":p+="\v";break;case"N":p+="
";break;case"_":p+=" ";break;case"L":p+="\u2028";break;case"P":p+="\u2029";break;case" ":p+=" ";break;case'"':p+='"';break;case"/":p+="/";break;case"\\":p+="\\";break;case" ":p+=" ";break;case"x":p+=this.parseCharCode(u+1,2,l),u+=2;break;case"u":p+=this.parseCharCode(u+1,4,l),u+=4;break;case"U":p+=this.parseCharCode(u+1,8,l),u+=8;break;case`
|
|
77
|
+
`:for(;o[u+1]===" "||o[u+1]===" ";)u+=1;break;default:l.push(new e.YAMLSyntaxError(this,`Invalid escape sequence ${o.substr(u-1,2)}`)),p+="\\"+o[u]}else if(h===" "||h===" "){let E=u,O=o[u+1];for(;O===" "||O===" ";)u+=1,O=o[u+1];O!==`
|
|
78
|
+
`&&(p+=u>E?o.slice(E,u+1):h)}else p+=h}return l.length>0?{errors:l,str:p}:p}parseCharCode(l,i,r){let{src:s}=this.context,o=s.substr(l,i),p=o.length===i&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(p)?(r.push(new e.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(l-2,i+2)}`)),s.substr(l-2,i+2)):String.fromCodePoint(p)}parse(l,i){this.context=l;let{src:r}=l,s=sn.endOfQuote(r,i+1);return this.valueRange=new e.Range(i,s),s=e.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},z=class on extends e.Node{static endOfQuote(l,i){let r=l[i];for(;r;)if(r==="'"){if(l[i+1]!=="'")break;r=l[i+=2]}else r=l[i+=1];return i+1}get strValue(){if(!this.valueRange||!this.context)return null;let l=[],{start:i,end:r}=this.valueRange,{indent:s,src:o}=this.context;o[r-1]!=="'"&&l.push(new e.YAMLSyntaxError(this,"Missing closing 'quote"));let p="";for(let u=i+1;u<r-1;++u){let h=o[u];if(h===`
|
|
79
|
+
`){e.Node.atDocumentBoundary(o,u+1)&&l.push(new e.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:E,offset:O,error:x}=e.Node.foldNewline(o,u,s);p+=E,u=O,x&&l.push(new e.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(h==="'")p+=h,u+=1,o[u]!=="'"&&l.push(new e.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(h===" "||h===" "){let E=u,O=o[u+1];for(;O===" "||O===" ";)u+=1,O=o[u+1];O!==`
|
|
80
|
+
`&&(p+=u>E?o.slice(E,u+1):h)}else p+=h}return l.length>0?{errors:l,str:p}:p}parse(l,i){this.context=l;let{src:r}=l,s=on.endOfQuote(r,i+1);return this.valueRange=new e.Range(i,s),s=e.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function K(M,l){switch(M){case e.Type.ALIAS:return new C(M,l);case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return new F(M,l);case e.Type.FLOW_MAP:case e.Type.FLOW_SEQ:return new ie(M,l);case e.Type.MAP_KEY:case e.Type.MAP_VALUE:case e.Type.SEQ_ITEM:return new c(M,l);case e.Type.COMMENT:case e.Type.PLAIN:return new e.PlainValue(M,l);case e.Type.QUOTE_DOUBLE:return new q(M,l);case e.Type.QUOTE_SINGLE:return new z(M,l);default:return null}}var ee=class nt{static parseType(l,i,r){switch(l[i]){case"*":return e.Type.ALIAS;case">":return e.Type.BLOCK_FOLDED;case"|":return e.Type.BLOCK_LITERAL;case"{":return e.Type.FLOW_MAP;case"[":return e.Type.FLOW_SEQ;case"?":return!r&&e.Node.atBlank(l,i+1,!0)?e.Type.MAP_KEY:e.Type.PLAIN;case":":return!r&&e.Node.atBlank(l,i+1,!0)?e.Type.MAP_VALUE:e.Type.PLAIN;case"-":return!r&&e.Node.atBlank(l,i+1,!0)?e.Type.SEQ_ITEM:e.Type.PLAIN;case'"':return e.Type.QUOTE_DOUBLE;case"'":return e.Type.QUOTE_SINGLE;default:return e.Type.PLAIN}}constructor(l={},{atLineStart:i,inCollection:r,inFlow:s,indent:o,lineStart:p,parent:u}={}){e._defineProperty(this,"parseNode",(h,E)=>{if(e.Node.atDocumentBoundary(this.src,E))return null;let O=new nt(this,h),{props:x,type:_,valueStart:W}=O.parseProps(E),B=K(_,x),U=B.parse(O,W);if(B.range=new e.Range(E,U),U<=E&&(B.error=new Error("Node#parse consumed no characters"),B.error.parseEnd=U,B.error.source=B,B.range.end=E+1),O.nodeStartsCollection(B)){!B.error&&!O.atLineStart&&O.parent.type===e.Type.DOCUMENT&&(B.error=new e.YAMLSyntaxError(B,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let oe=new b(B);return U=oe.parse(new nt(O),U),oe.range=new e.Range(E,U),oe}return B}),this.atLineStart=i??(l.atLineStart||!1),this.inCollection=r??(l.inCollection||!1),this.inFlow=s??(l.inFlow||!1),this.indent=o??l.indent,this.lineStart=p??l.lineStart,this.parent=u??(l.parent||{}),this.root=l.root,this.src=l.src}nodeStartsCollection(l){let{inCollection:i,inFlow:r,src:s}=this;if(i||r)return!1;if(l instanceof c)return!0;let o=l.range.end;return s[o]===`
|
|
81
|
+
`||s[o-1]===`
|
|
82
|
+
`?!1:(o=e.Node.endOfWhiteSpace(s,o),s[o]===":")}parseProps(l){let{inFlow:i,parent:r,src:s}=this,o=[],p=!1;l=this.atLineStart?e.Node.endOfIndent(s,l):e.Node.endOfWhiteSpace(s,l);let u=s[l];for(;u===e.Char.ANCHOR||u===e.Char.COMMENT||u===e.Char.TAG||u===`
|
|
83
|
+
`;){if(u===`
|
|
84
|
+
`){let E=l,O;do O=E+1,E=e.Node.endOfIndent(s,O);while(s[E]===`
|
|
85
|
+
`);let x=E-(O+this.indent),_=r.type===e.Type.SEQ_ITEM&&r.context.atLineStart;if(s[E]!=="#"&&!e.Node.nextNodeIsIndented(s[E],x,!_))break;this.atLineStart=!0,this.lineStart=O,p=!1,l=E}else if(u===e.Char.COMMENT){let E=e.Node.endOfLine(s,l+1);o.push(new e.Range(l,E)),l=E}else{let E=e.Node.endOfIdentifier(s,l+1);u===e.Char.TAG&&s[E]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(l+1,E+13))&&(E=e.Node.endOfIdentifier(s,E+5)),o.push(new e.Range(l,E)),p=!0,l=e.Node.endOfWhiteSpace(s,E)}u=s[l]}p&&u===":"&&e.Node.atBlank(s,l+1,!0)&&(l-=1);let h=nt.parseType(s,l,i);return{props:o,type:h,valueStart:l}}};function le(M){let l=[];M.indexOf("\r")!==-1&&(M=M.replace(/\r\n?/g,(s,o)=>(s.length>1&&l.push(o),`
|
|
86
|
+
`)));let i=[],r=0;do{let s=new k,o=new ee({src:M});r=s.parse(o,r),i.push(s)}while(r<M.length);return i.setOrigRanges=()=>{if(l.length===0)return!1;for(let o=1;o<l.length;++o)l[o]-=o;let s=0;for(let o=0;o<i.length;++o)s=i[o].setOrigRanges(l,s);return l.splice(0,l.length),!0},i.toString=()=>i.join(`...
|
|
87
|
+
`),i}t.parse=le}),ze=Me(t=>{var e=Re();function n(f,a,d){return d?`#${d.replace(/[\s\S]^/gm,`$&${a}#`)}
|
|
88
|
+
${a}${f}`:f}function c(f,a,d){return d?d.indexOf(`
|
|
89
|
+
`)===-1?`${f} #${d}`:`${f}
|
|
90
|
+
`+d.replace(/^/gm,`${a||""}#`):f}var g=class{};function y(f,a,d){if(Array.isArray(f))return f.map((m,v)=>y(m,String(v),d));if(f&&typeof f.toJSON=="function"){let m=d&&d.anchors&&d.anchors.get(f);m&&(d.onCreate=S=>{m.res=S,delete d.onCreate});let v=f.toJSON(a,d);return m&&d.onCreate&&d.onCreate(v),v}return(!d||!d.keep)&&typeof f=="bigint"?Number(f):f}var b=class extends g{constructor(f){super(),this.value=f}toJSON(f,a){return a&&a.keep?this.value:y(this.value,f,a)}toString(){return String(this.value)}};function A(f,a,d){let m=d;for(let v=a.length-1;v>=0;--v){let S=a[v];if(Number.isInteger(S)&&S>=0){let N=[];N[S]=m,m=N}else{let N={};Object.defineProperty(N,S,{value:m,writable:!0,enumerable:!0,configurable:!0}),m=N}}return f.createNode(m,!1)}var k=f=>f==null||typeof f=="object"&&f[Symbol.iterator]().next().done,C=class Ie extends g{constructor(a){super(),e._defineProperty(this,"items",[]),this.schema=a}addIn(a,d){if(k(a))this.add(d);else{let[m,...v]=a,S=this.get(m,!0);if(S instanceof Ie)S.addIn(v,d);else if(S===void 0&&this.schema)this.set(m,A(this.schema,v,d));else throw new Error(`Expected YAML collection at ${m}. Remaining path: ${v}`)}}deleteIn([a,...d]){if(d.length===0)return this.delete(a);let m=this.get(a,!0);if(m instanceof Ie)return m.deleteIn(d);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${d}`)}getIn([a,...d],m){let v=this.get(a,!0);return d.length===0?!m&&v instanceof b?v.value:v:v instanceof Ie?v.getIn(d,m):void 0}hasAllNullValues(){return this.items.every(a=>{if(!a||a.type!=="PAIR")return!1;let d=a.value;return d==null||d instanceof b&&d.value==null&&!d.commentBefore&&!d.comment&&!d.tag})}hasIn([a,...d]){if(d.length===0)return this.has(a);let m=this.get(a,!0);return m instanceof Ie?m.hasIn(d):!1}setIn([a,...d],m){if(d.length===0)this.set(a,m);else{let v=this.get(a,!0);if(v instanceof Ie)v.setIn(d,m);else if(v===void 0&&this.schema)this.set(a,A(this.schema,d,m));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${d}`)}}toJSON(){return null}toString(a,{blockItem:d,flowChars:m,isMap:v,itemIndent:S},N,L){let{indent:T,indentStep:I,stringify:R}=a,j=this.type===e.Type.FLOW_MAP||this.type===e.Type.FLOW_SEQ||a.inFlow;j&&(S+=I);let ne=v&&this.hasAllNullValues();a=Object.assign({},a,{allNullValues:ne,indent:S,inFlow:j,type:null});let Q=!1,re=!1,J=this.items.reduce((ce,X,se)=>{let Z;X&&(!Q&&X.spaceBefore&&ce.push({type:"comment",str:""}),X.commentBefore&&X.commentBefore.match(/^.*$/gm).forEach(hr=>{ce.push({type:"comment",str:`#${hr}`})}),X.comment&&(Z=X.comment),j&&(!Q&&X.spaceBefore||X.commentBefore||X.comment||X.key&&(X.key.commentBefore||X.key.comment)||X.value&&(X.value.commentBefore||X.value.comment))&&(re=!0)),Q=!1;let fe=R(X,a,()=>Z=null,()=>Q=!0);return j&&!re&&fe.includes(`
|
|
91
|
+
`)&&(re=!0),j&&se<this.items.length-1&&(fe+=","),fe=c(fe,S,Z),Q&&(Z||j)&&(Q=!1),ce.push({type:"item",str:fe}),ce},[]),te;if(J.length===0)te=m.start+m.end;else if(j){let{start:ce,end:X}=m,se=J.map(Z=>Z.str);if(re||se.reduce((Z,fe)=>Z+fe.length+2,2)>Ie.maxFlowStringSingleLineLength){te=ce;for(let Z of se)te+=Z?`
|
|
92
|
+
${I}${T}${Z}`:`
|
|
93
|
+
`;te+=`
|
|
94
|
+
${T}${X}`}else te=`${ce} ${se.join(" ")} ${X}`}else{let ce=J.map(d);te=ce.shift();for(let X of ce)te+=X?`
|
|
95
|
+
${T}${X}`:`
|
|
96
|
+
`}return this.comment?(te+=`
|
|
97
|
+
`+this.comment.replace(/^/gm,`${T}#`),N&&N()):Q&&L&&L(),te}};e._defineProperty(C,"maxFlowStringSingleLineLength",60);function P(f){let a=f instanceof b?f.value:f;return a&&typeof a=="string"&&(a=Number(a)),Number.isInteger(a)&&a>=0?a:null}var F=class extends C{add(f){this.items.push(f)}delete(f){let a=P(f);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(f,a){let d=P(f);if(typeof d!="number")return;let m=this.items[d];return!a&&m instanceof b?m.value:m}has(f){let a=P(f);return typeof a=="number"&&a<this.items.length}set(f,a){let d=P(f);if(typeof d!="number")throw new Error(`Expected a valid index, not ${f}.`);this.items[d]=a}toJSON(f,a){let d=[];a&&a.onCreate&&a.onCreate(d);let m=0;for(let v of this.items)d.push(y(v,String(m++),a));return d}toString(f,a,d){return f?super.toString(f,{blockItem:m=>m.type==="comment"?m.str:`- ${m.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(f.indent||"")+" "},a,d):JSON.stringify(this)}},ie=(f,a,d)=>a===null?"":typeof a!="object"?String(a):f instanceof g&&d&&d.doc?f.toString({anchors:Object.create(null),doc:d.doc,indent:"",indentStep:d.indentStep,inFlow:!0,inStringifyKey:!0,stringify:d.stringify}):JSON.stringify(a),q=class an extends g{constructor(a,d=null){super(),this.key=a,this.value=d,this.type=an.Type.PAIR}get commentBefore(){return this.key instanceof g?this.key.commentBefore:void 0}set commentBefore(a){if(this.key==null&&(this.key=new b(null)),this.key instanceof g)this.key.commentBefore=a;else{let d="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(d)}}addToJSMap(a,d){let m=y(this.key,"",a);if(d instanceof Map){let v=y(this.value,m,a);d.set(m,v)}else if(d instanceof Set)d.add(m);else{let v=ie(this.key,m,a),S=y(this.value,v,a);v in d?Object.defineProperty(d,v,{value:S,writable:!0,enumerable:!0,configurable:!0}):d[v]=S}return d}toJSON(a,d){let m=d&&d.mapAsMap?new Map:{};return this.addToJSMap(d,m)}toString(a,d,m){if(!a||!a.doc)return JSON.stringify(this);let{indent:v,indentSeq:S,simpleKeys:N}=a.doc.options,{key:L,value:T}=this,I=L instanceof g&&L.comment;if(N){if(I)throw new Error("With simple keys, key nodes cannot have comments");if(L instanceof C){let fe="With simple keys, collection cannot be used as a key value";throw new Error(fe)}}let R=!N&&(!L||I||(L instanceof g?L instanceof C||L.type===e.Type.BLOCK_FOLDED||L.type===e.Type.BLOCK_LITERAL:typeof L=="object")),{doc:j,indent:ne,indentStep:Q,stringify:re}=a;a=Object.assign({},a,{implicitKey:!R,indent:ne+Q});let J=!1,te=re(L,a,()=>I=null,()=>J=!0);if(te=c(te,a.indent,I),!R&&te.length>1024){if(N)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");R=!0}if(a.allNullValues&&!N)return this.comment?(te=c(te,a.indent,this.comment),d&&d()):J&&!I&&m&&m(),a.inFlow&&!R?te:`? ${te}`;te=R?`? ${te}
|
|
98
|
+
${ne}:`:`${te}:`,this.comment&&(te=c(te,a.indent,this.comment),d&&d());let ce="",X=null;if(T instanceof g){if(T.spaceBefore&&(ce=`
|
|
99
|
+
`),T.commentBefore){let fe=T.commentBefore.replace(/^/gm,`${a.indent}#`);ce+=`
|
|
100
|
+
${fe}`}X=T.comment}else T&&typeof T=="object"&&(T=j.schema.createNode(T,!0));a.implicitKey=!1,!R&&!this.comment&&T instanceof b&&(a.indentAtStart=te.length+1),J=!1,!S&&v>=2&&!a.inFlow&&!R&&T instanceof F&&T.type!==e.Type.FLOW_SEQ&&!T.tag&&!j.anchors.getName(T)&&(a.indent=a.indent.substr(2));let se=re(T,a,()=>X=null,()=>J=!0),Z=" ";return ce||this.comment?Z=`${ce}
|
|
101
|
+
${a.indent}`:!R&&T instanceof C?(!(se[0]==="["||se[0]==="{")||se.includes(`
|
|
102
|
+
`))&&(Z=`
|
|
103
|
+
${a.indent}`):se[0]===`
|
|
104
|
+
`&&(Z=""),J&&!X&&m&&m(),c(te+Z+se,a.indent,X)}};e._defineProperty(q,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var z=(f,a)=>{if(f instanceof K){let d=a.get(f.source);return d.count*d.aliasCount}else if(f instanceof C){let d=0;for(let m of f.items){let v=z(m,a);v>d&&(d=v)}return d}else if(f instanceof q){let d=z(f.key,a),m=z(f.value,a);return Math.max(d,m)}return 1},K=class ln extends g{static stringify({range:a,source:d},{anchors:m,doc:v,implicitKey:S,inStringifyKey:N}){let L=Object.keys(m).find(I=>m[I]===d);if(!L&&N&&(L=v.anchors.getName(d)||v.anchors.newName()),L)return`*${L}${S?" ":""}`;let T=v.anchors.getName(d)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${T} [${a}]`)}constructor(a){super(),this.source=a,this.type=e.Type.ALIAS}set tag(a){throw new Error("Alias nodes cannot have tags")}toJSON(a,d){if(!d)return y(this.source,a,d);let{anchors:m,maxAliasCount:v}=d,S=m.get(this.source);if(!S||S.res===void 0){let N="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,N):new ReferenceError(N)}if(v>=0&&(S.count+=1,S.aliasCount===0&&(S.aliasCount=z(this.source,m)),S.count*S.aliasCount>v)){let N="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,N):new ReferenceError(N)}return S.res}toString(a){return ln.stringify(this,a)}};e._defineProperty(K,"default",!0);function ee(f,a){let d=a instanceof b?a.value:a;for(let m of f)if(m instanceof q&&(m.key===a||m.key===d||m.key&&m.key.value===d))return m}var le=class extends C{add(f,a){f?f instanceof q||(f=new q(f.key||f,f.value)):f=new q(f);let d=ee(this.items,f.key),m=this.schema&&this.schema.sortMapEntries;if(d)if(a)d.value=f.value;else throw new Error(`Key ${f.key} already set`);else if(m){let v=this.items.findIndex(S=>m(f,S)<0);v===-1?this.items.push(f):this.items.splice(v,0,f)}else this.items.push(f)}delete(f){let a=ee(this.items,f);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(f,a){let d=ee(this.items,f),m=d&&d.value;return!a&&m instanceof b?m.value:m}has(f){return!!ee(this.items,f)}set(f,a){this.add(new q(f,a),!0)}toJSON(f,a,d){let m=d?new d:a&&a.mapAsMap?new Map:{};a&&a.onCreate&&a.onCreate(m);for(let v of this.items)v.addToJSMap(a,m);return m}toString(f,a,d){if(!f)return JSON.stringify(this);for(let m of this.items)if(!(m instanceof q))throw new Error(`Map items must all be pairs; found ${JSON.stringify(m)} instead`);return super.toString(f,{blockItem:m=>m.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:f.indent||""},a,d)}},M="<<",l=class extends q{constructor(f){if(f instanceof q){let a=f.value;a instanceof F||(a=new F,a.items.push(f.value),a.range=f.value.range),super(f.key,a),this.range=f.range}else super(new b(M),new F);this.type=q.Type.MERGE_PAIR}addToJSMap(f,a){for(let{source:d}of this.value.items){if(!(d instanceof le))throw new Error("Merge sources must be maps");let m=d.toJSON(null,f,Map);for(let[v,S]of m)a instanceof Map?a.has(v)||a.set(v,S):a instanceof Set?a.add(v):Object.prototype.hasOwnProperty.call(a,v)||Object.defineProperty(a,v,{value:S,writable:!0,enumerable:!0,configurable:!0})}return a}toString(f,a){let d=this.value;if(d.items.length>1)return super.toString(f,a);this.value=d.items[0];let m=super.toString(f,a);return this.value=d,m}},i={defaultType:e.Type.BLOCK_LITERAL,lineWidth:76},r={trueStr:"true",falseStr:"false"},s={asBigInt:!1},o={nullStr:"null"},p={defaultType:e.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function u(f,a,d){for(let{format:m,test:v,resolve:S}of a)if(v){let N=f.match(v);if(N){let L=S.apply(null,N);return L instanceof b||(L=new b(L)),m&&(L.format=m),L}}return d&&(f=d(f)),new b(f)}var h="flow",E="block",O="quoted",x=(f,a)=>{let d=f[a+1];for(;d===" "||d===" ";){do d=f[a+=1];while(d&&d!==`
|
|
105
|
+
`);d=f[a+1]}return a};function _(f,a,d,{indentAtStart:m,lineWidth:v=80,minContentWidth:S=20,onFold:N,onOverflow:L}){if(!v||v<0)return f;let T=Math.max(1+S,1+v-a.length);if(f.length<=T)return f;let I=[],R={},j=v-a.length;typeof m=="number"&&(m>v-Math.max(2,S)?I.push(0):j=v-m);let ne,Q,re=!1,J=-1,te=-1,ce=-1;d===E&&(J=x(f,J),J!==-1&&(j=J+T));for(let se;se=f[J+=1];){if(d===O&&se==="\\"){switch(te=J,f[J+1]){case"x":J+=3;break;case"u":J+=5;break;case"U":J+=9;break;default:J+=1}ce=J}if(se===`
|
|
106
|
+
`)d===E&&(J=x(f,J)),j=J+T,ne=void 0;else{if(se===" "&&Q&&Q!==" "&&Q!==`
|
|
107
|
+
`&&Q!==" "){let Z=f[J+1];Z&&Z!==" "&&Z!==`
|
|
108
|
+
`&&Z!==" "&&(ne=J)}if(J>=j)if(ne)I.push(ne),j=ne+T,ne=void 0;else if(d===O){for(;Q===" "||Q===" ";)Q=se,se=f[J+=1],re=!0;let Z=J>ce+1?J-2:te-1;if(R[Z])return f;I.push(Z),R[Z]=!0,j=Z+T,ne=void 0}else re=!0}Q=se}if(re&&L&&L(),I.length===0)return f;N&&N();let X=f.slice(0,I[0]);for(let se=0;se<I.length;++se){let Z=I[se],fe=I[se+1]||f.length;Z===0?X=`
|
|
109
|
+
${a}${f.slice(0,fe)}`:(d===O&&R[Z]&&(X+=`${f[Z]}\\`),X+=`
|
|
110
|
+
${a}${f.slice(Z+1,fe)}`)}return X}var W=({indentAtStart:f})=>f?Object.assign({indentAtStart:f},p.fold):p.fold,B=f=>/^(%|---|\.\.\.)/m.test(f);function U(f,a,d){if(!a||a<0)return!1;let m=a-d,v=f.length;if(v<=m)return!1;for(let S=0,N=0;S<v;++S)if(f[S]===`
|
|
111
|
+
`){if(S-N>m)return!0;if(N=S+1,v-N<=m)return!1}return!0}function oe(f,a){let{implicitKey:d}=a,{jsonEncoding:m,minMultiLineLength:v}=p.doubleQuoted,S=JSON.stringify(f);if(m)return S;let N=a.indent||(B(f)?" ":""),L="",T=0;for(let I=0,R=S[I];R;R=S[++I])if(R===" "&&S[I+1]==="\\"&&S[I+2]==="n"&&(L+=S.slice(T,I)+"\\ ",I+=1,T=I,R="\\"),R==="\\")switch(S[I+1]){case"u":{L+=S.slice(T,I);let j=S.substr(I+2,4);switch(j){case"0000":L+="\\0";break;case"0007":L+="\\a";break;case"000b":L+="\\v";break;case"001b":L+="\\e";break;case"0085":L+="\\N";break;case"00a0":L+="\\_";break;case"2028":L+="\\L";break;case"2029":L+="\\P";break;default:j.substr(0,2)==="00"?L+="\\x"+j.substr(2):L+=S.substr(I,6)}I+=5,T=I+1}break;case"n":if(d||S[I+2]==='"'||S.length<v)I+=1;else{for(L+=S.slice(T,I)+`
|
|
112
|
+
|
|
113
|
+
`;S[I+2]==="\\"&&S[I+3]==="n"&&S[I+4]!=='"';)L+=`
|
|
114
|
+
`,I+=2;L+=N,S[I+2]===" "&&(L+="\\"),I+=1,T=I+1}break;default:I+=1}return L=T?L+S.slice(T):S,d?L:_(L,N,O,W(a))}function he(f,a){if(a.implicitKey){if(/\n/.test(f))return oe(f,a)}else if(/[ \t]\n|\n[ \t]/.test(f))return oe(f,a);let d=a.indent||(B(f)?" ":""),m="'"+f.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
115
|
+
${d}`)+"'";return a.implicitKey?m:_(m,d,h,W(a))}function Se({comment:f,type:a,value:d},m,v,S){if(/\n[\t ]+$/.test(d)||/^\s*$/.test(d))return oe(d,m);let N=m.indent||(m.forceBlockIndent||B(d)?" ":""),L=N?"2":"1",T=a===e.Type.BLOCK_FOLDED?!1:a===e.Type.BLOCK_LITERAL?!0:!U(d,p.fold.lineWidth,N.length),I=T?"|":">";if(!d)return I+`
|
|
116
|
+
`;let R="",j="";if(d=d.replace(/[\n\t ]*$/,Q=>{let re=Q.indexOf(`
|
|
117
|
+
`);return re===-1?I+="-":(d===Q||re!==Q.length-1)&&(I+="+",S&&S()),j=Q.replace(/\n$/,""),""}).replace(/^[\n ]*/,Q=>{Q.indexOf(" ")!==-1&&(I+=L);let re=Q.match(/ +$/);return re?(R=Q.slice(0,-re[0].length),re[0]):(R=Q,"")}),j&&(j=j.replace(/\n+(?!\n|$)/g,`$&${N}`)),R&&(R=R.replace(/\n+/g,`$&${N}`)),f&&(I+=" #"+f.replace(/ ?[\r\n]+/g," "),v&&v()),!d)return`${I}${L}
|
|
118
|
+
${N}${j}`;if(T)return d=d.replace(/\n+/g,`$&${N}`),`${I}
|
|
119
|
+
${N}${R}${d}${j}`;d=d.replace(/\n+/g,`
|
|
120
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`);let ne=_(`${R}${d}${j}`,N,E,p.fold);return`${I}
|
|
121
|
+
${N}${ne}`}function w(f,a,d,m){let{comment:v,type:S,value:N}=f,{actualString:L,implicitKey:T,indent:I,inFlow:R}=a;if(T&&/[\n[\]{},]/.test(N)||R&&/[[\]{},]/.test(N))return oe(N,a);if(!N||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(N))return T||R||N.indexOf(`
|
|
122
|
+
`)===-1?N.indexOf('"')!==-1&&N.indexOf("'")===-1?he(N,a):oe(N,a):Se(f,a,d,m);if(!T&&!R&&S!==e.Type.PLAIN&&N.indexOf(`
|
|
123
|
+
`)!==-1)return Se(f,a,d,m);if(I===""&&B(N))return a.forceBlockIndent=!0,Se(f,a,d,m);let j=N.replace(/\n+/g,`$&
|
|
124
|
+
${I}`);if(L){let{tags:Q}=a.doc.schema;if(typeof u(j,Q,Q.scalarFallback).value!="string")return oe(N,a)}let ne=T?j:_(j,I,h,W(a));return v&&!R&&(ne.indexOf(`
|
|
125
|
+
`)!==-1||v.indexOf(`
|
|
126
|
+
`)!==-1)?(d&&d(),n(ne,I,v)):ne}function $(f,a,d,m){let{defaultType:v}=p,{implicitKey:S,inFlow:N}=a,{type:L,value:T}=f;typeof T!="string"&&(T=String(T),f=Object.assign({},f,{value:T}));let I=j=>{switch(j){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return Se(f,a,d,m);case e.Type.QUOTE_DOUBLE:return oe(T,a);case e.Type.QUOTE_SINGLE:return he(T,a);case e.Type.PLAIN:return w(f,a,d,m);default:return null}};(L!==e.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(T)||(S||N)&&(L===e.Type.BLOCK_FOLDED||L===e.Type.BLOCK_LITERAL))&&(L=e.Type.QUOTE_DOUBLE);let R=I(L);if(R===null&&(R=I(v),R===null))throw new Error(`Unsupported default string type ${v}`);return R}function D({format:f,minFractionDigits:a,tag:d,value:m}){if(typeof m=="bigint")return String(m);if(!isFinite(m))return isNaN(m)?".nan":m<0?"-.inf":".inf";let v=JSON.stringify(m);if(!f&&a&&(!d||d==="tag:yaml.org,2002:float")&&/^\d/.test(v)){let S=v.indexOf(".");S<0&&(S=v.length,v+=".");let N=a-(v.length-S-1);for(;N-- >0;)v+="0"}return v}function Y(f,a){let d,m;switch(a.type){case e.Type.FLOW_MAP:d="}",m="flow map";break;case e.Type.FLOW_SEQ:d="]",m="flow sequence";break;default:f.push(new e.YAMLSemanticError(a,"Not a flow collection!?"));return}let v;for(let S=a.items.length-1;S>=0;--S){let N=a.items[S];if(!N||N.type!==e.Type.COMMENT){v=N;break}}if(v&&v.char!==d){let S=`Expected ${m} to end with ${d}`,N;typeof v.offset=="number"?(N=new e.YAMLSemanticError(a,S),N.offset=v.offset+1):(N=new e.YAMLSemanticError(v,S),v.range&&v.range.end&&(N.offset=v.range.end-v.range.start)),f.push(N)}}function V(f,a){let d=a.context.src[a.range.start-1];if(d!==`
|
|
127
|
+
`&&d!==" "&&d!==" "){let m="Comments must be separated from other tokens by white space characters";f.push(new e.YAMLSemanticError(a,m))}}function G(f,a){let d=String(a),m=d.substr(0,8)+"..."+d.substr(-8);return new e.YAMLSemanticError(f,`The "${m}" key is too long`)}function me(f,a){for(let{afterKey:d,before:m,comment:v}of a){let S=f.items[m];S?(d&&S.value&&(S=S.value),v===void 0?(d||!S.commentBefore)&&(S.spaceBefore=!0):S.commentBefore?S.commentBefore+=`
|
|
128
|
+
`+v:S.commentBefore=v):v!==void 0&&(f.comment?f.comment+=`
|
|
129
|
+
`+v:f.comment=v)}}function Ne(f,a){let d=a.strValue;return d?typeof d=="string"?d:(d.errors.forEach(m=>{m.source||(m.source=a),f.errors.push(m)}),d.str):""}function Le(f,a){let{handle:d,suffix:m}=a.tag,v=f.tagPrefixes.find(S=>S.handle===d);if(!v){let S=f.getDefaults().tagPrefixes;if(S&&(v=S.find(N=>N.handle===d)),!v)throw new e.YAMLSemanticError(a,`The ${d} tag handle is non-default and was not declared.`)}if(!m)throw new e.YAMLSemanticError(a,`The ${d} tag has no suffix.`);if(d==="!"&&(f.version||f.options.version)==="1.0"){if(m[0]==="^")return f.warnings.push(new e.YAMLWarning(a,"YAML 1.0 ^ tag expansion is not supported")),m;if(/[:/]/.test(m)){let S=m.match(/^([a-z0-9-]+)\/(.*)/i);return S?`tag:${S[1]}.yaml.org,2002:${S[2]}`:`tag:${m}`}}return v.prefix+decodeURIComponent(m)}function we(f,a){let{tag:d,type:m}=a,v=!1;if(d){let{handle:S,suffix:N,verbatim:L}=d;if(L){if(L!=="!"&&L!=="!!")return L;let T=`Verbatim tags aren't resolved, so ${L} is invalid.`;f.errors.push(new e.YAMLSemanticError(a,T))}else if(S==="!"&&!N)v=!0;else try{return Le(f,a)}catch(T){f.errors.push(T)}}switch(m){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:case e.Type.QUOTE_DOUBLE:case e.Type.QUOTE_SINGLE:return e.defaultTags.STR;case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;case e.Type.PLAIN:return v?e.defaultTags.STR:null;default:return null}}function Ke(f,a,d){let{tags:m}=f.schema,v=[];for(let N of m)if(N.tag===d)if(N.test)v.push(N);else{let L=N.resolve(f,a);return L instanceof C?L:new b(L)}let S=Ne(f,a);return typeof S=="string"&&v.length>0?u(S,v,m.scalarFallback):null}function et({type:f}){switch(f){case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;default:return e.defaultTags.STR}}function nr(f,a,d){try{let m=Ke(f,a,d);if(m)return d&&a.tag&&(m.tag=d),m}catch(m){return m.source||(m.source=a),f.errors.push(m),null}try{let m=et(a);if(!m)throw new Error(`The tag ${d} is unavailable`);let v=`The tag ${d} is unavailable, falling back to ${m}`;f.warnings.push(new e.YAMLWarning(a,v));let S=Ke(f,a,m);return S.tag=d,S}catch(m){let v=new e.YAMLReferenceError(a,m.message);return v.stack=m.stack,f.errors.push(v),null}}var rr=f=>{if(!f)return!1;let{type:a}=f;return a===e.Type.MAP_KEY||a===e.Type.MAP_VALUE||a===e.Type.SEQ_ITEM};function ir(f,a){let d={before:[],after:[]},m=!1,v=!1,S=rr(a.context.parent)?a.context.parent.props.concat(a.props):a.props;for(let{start:N,end:L}of S)switch(a.context.src[N]){case e.Char.COMMENT:{if(!a.commentHasRequiredWhitespace(N)){let R="Comments must be separated from other tokens by white space characters";f.push(new e.YAMLSemanticError(a,R))}let{header:T,valueRange:I}=a;(I&&(N>I.start||T&&N>T.start)?d.after:d.before).push(a.context.src.slice(N+1,L));break}case e.Char.ANCHOR:if(m){let T="A node can have at most one anchor";f.push(new e.YAMLSemanticError(a,T))}m=!0;break;case e.Char.TAG:if(v){let T="A node can have at most one tag";f.push(new e.YAMLSemanticError(a,T))}v=!0;break}return{comments:d,hasAnchor:m,hasTag:v}}function sr(f,a){let{anchors:d,errors:m,schema:v}=f;if(a.type===e.Type.ALIAS){let N=a.rawValue,L=d.getNode(N);if(!L){let I=`Aliased anchor not found: ${N}`;return m.push(new e.YAMLReferenceError(a,I)),null}let T=new K(L);return d._cstAliases.push(T),T}let S=we(f,a);if(S)return nr(f,a,S);if(a.type!==e.Type.PLAIN){let N=`Failed to resolve ${a.type} node here`;return m.push(new e.YAMLSyntaxError(a,N)),null}try{let N=Ne(f,a);return u(N,v.tags,v.tags.scalarFallback)}catch(N){return N.source||(N.source=a),m.push(N),null}}function Te(f,a){if(!a)return null;a.error&&f.errors.push(a.error);let{comments:d,hasAnchor:m,hasTag:v}=ir(f.errors,a);if(m){let{anchors:N}=f,L=a.anchor,T=N.getNode(L);T&&(N.map[N.newName(L)]=T),N.map[L]=a}if(a.type===e.Type.ALIAS&&(m||v)){let N="An alias node must not specify any properties";f.errors.push(new e.YAMLSemanticError(a,N))}let S=sr(f,a);if(S){S.range=[a.range.start,a.range.end],f.options.keepCstNodes&&(S.cstNode=a),f.options.keepNodeTypes&&(S.type=a.type);let N=d.before.join(`
|
|
130
|
+
`);N&&(S.commentBefore=S.commentBefore?`${S.commentBefore}
|
|
131
|
+
${N}`:N);let L=d.after.join(`
|
|
132
|
+
`);L&&(S.comment=S.comment?`${S.comment}
|
|
133
|
+
${L}`:L)}return a.resolved=S}function or(f,a){if(a.type!==e.Type.MAP&&a.type!==e.Type.FLOW_MAP){let N=`A ${a.type} node cannot be resolved as a mapping`;return f.errors.push(new e.YAMLSyntaxError(a,N)),null}let{comments:d,items:m}=a.type===e.Type.FLOW_MAP?cr(f,a):ur(f,a),v=new le;v.items=m,me(v,d);let S=!1;for(let N=0;N<m.length;++N){let{key:L}=m[N];if(L instanceof C&&(S=!0),f.schema.merge&&L&&L.value===M){m[N]=new l(m[N]);let T=m[N].value.items,I=null;T.some(R=>{if(R instanceof K){let{type:j}=R.source;return j===e.Type.MAP||j===e.Type.FLOW_MAP?!1:I="Merge nodes aliases can only point to maps"}return I="Merge nodes can only have Alias nodes as values"}),I&&f.errors.push(new e.YAMLSemanticError(a,I))}else for(let T=N+1;T<m.length;++T){let{key:I}=m[T];if(L===I||L&&I&&Object.prototype.hasOwnProperty.call(L,"value")&&L.value===I.value){let R=`Map keys must be unique; "${L}" is repeated`;f.errors.push(new e.YAMLSemanticError(a,R));break}}}if(S&&!f.options.mapAsMap){let N="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";f.warnings.push(new e.YAMLWarning(a,N))}return a.resolved=v,v}var ar=({context:{lineStart:f,node:a,src:d},props:m})=>{if(m.length===0)return!1;let{start:v}=m[0];if(a&&v>a.valueRange.start||d[v]!==e.Char.COMMENT)return!1;for(let S=f;S<v;++S)if(d[S]===`
|
|
134
|
+
`)return!1;return!0};function lr(f,a){if(!ar(f))return;let d=f.getPropValue(0,e.Char.COMMENT,!0),m=!1,v=a.value.commentBefore;if(v&&v.startsWith(d))a.value.commentBefore=v.substr(d.length+1),m=!0;else{let S=a.value.comment;!f.node&&S&&S.startsWith(d)&&(a.value.comment=S.substr(d.length+1),m=!0)}m&&(a.comment=d)}function ur(f,a){let d=[],m=[],v,S=null;for(let N=0;N<a.items.length;++N){let L=a.items[N];switch(L.type){case e.Type.BLANK_LINE:d.push({afterKey:!!v,before:m.length});break;case e.Type.COMMENT:d.push({afterKey:!!v,before:m.length,comment:L.comment});break;case e.Type.MAP_KEY:v!==void 0&&m.push(new q(v)),L.error&&f.errors.push(L.error),v=Te(f,L.node),S=null;break;case e.Type.MAP_VALUE:{if(v===void 0&&(v=null),L.error&&f.errors.push(L.error),!L.context.atLineStart&&L.node&&L.node.type===e.Type.MAP&&!L.node.context.atLineStart){let R="Nested mappings are not allowed in compact mappings";f.errors.push(new e.YAMLSemanticError(L.node,R))}let T=L.node;if(!T&&L.props.length>0){T=new e.PlainValue(e.Type.PLAIN,[]),T.context={parent:L,src:L.context.src};let R=L.range.start+1;if(T.range={start:R,end:R},T.valueRange={start:R,end:R},typeof L.range.origStart=="number"){let j=L.range.origStart+1;T.range.origStart=T.range.origEnd=j,T.valueRange.origStart=T.valueRange.origEnd=j}}let I=new q(v,Te(f,T));lr(L,I),m.push(I),v&&typeof S=="number"&&L.range.start>S+1024&&f.errors.push(G(a,v)),v=void 0,S=null}break;default:v!==void 0&&m.push(new q(v)),v=Te(f,L),S=L.range.start,L.error&&f.errors.push(L.error);e:for(let T=N+1;;++T){let I=a.items[T];switch(I&&I.type){case e.Type.BLANK_LINE:case e.Type.COMMENT:continue e;case e.Type.MAP_VALUE:break e;default:{let R="Implicit map keys need to be followed by map values";f.errors.push(new e.YAMLSemanticError(L,R));break e}}}if(L.valueRangeContainsNewline){let T="Implicit map keys need to be on a single line";f.errors.push(new e.YAMLSemanticError(L,T))}}}return v!==void 0&&m.push(new q(v)),{comments:d,items:m}}function cr(f,a){let d=[],m=[],v,S=!1,N="{";for(let L=0;L<a.items.length;++L){let T=a.items[L];if(typeof T.char=="string"){let{char:I,offset:R}=T;if(I==="?"&&v===void 0&&!S){S=!0,N=":";continue}if(I===":"){if(v===void 0&&(v=null),N===":"){N=",";continue}}else if(S&&(v===void 0&&I!==","&&(v=null),S=!1),v!==void 0&&(m.push(new q(v)),v=void 0,I===",")){N=":";continue}if(I==="}"){if(L===a.items.length-1)continue}else if(I===N){N=":";continue}let j=`Flow map contains an unexpected ${I}`,ne=new e.YAMLSyntaxError(a,j);ne.offset=R,f.errors.push(ne)}else T.type===e.Type.BLANK_LINE?d.push({afterKey:!!v,before:m.length}):T.type===e.Type.COMMENT?(V(f.errors,T),d.push({afterKey:!!v,before:m.length,comment:T.comment})):v===void 0?(N===","&&f.errors.push(new e.YAMLSemanticError(T,"Separator , missing in flow map")),v=Te(f,T)):(N!==","&&f.errors.push(new e.YAMLSemanticError(T,"Indicator : missing in flow map entry")),m.push(new q(v,Te(f,T))),v=void 0,S=!1)}return Y(f.errors,a),v!==void 0&&m.push(new q(v)),{comments:d,items:m}}function fr(f,a){if(a.type!==e.Type.SEQ&&a.type!==e.Type.FLOW_SEQ){let S=`A ${a.type} node cannot be resolved as a sequence`;return f.errors.push(new e.YAMLSyntaxError(a,S)),null}let{comments:d,items:m}=a.type===e.Type.FLOW_SEQ?dr(f,a):pr(f,a),v=new F;if(v.items=m,me(v,d),!f.options.mapAsMap&&m.some(S=>S instanceof q&&S.key instanceof C)){let S="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";f.warnings.push(new e.YAMLWarning(a,S))}return a.resolved=v,v}function pr(f,a){let d=[],m=[];for(let v=0;v<a.items.length;++v){let S=a.items[v];switch(S.type){case e.Type.BLANK_LINE:d.push({before:m.length});break;case e.Type.COMMENT:d.push({comment:S.comment,before:m.length});break;case e.Type.SEQ_ITEM:if(S.error&&f.errors.push(S.error),m.push(Te(f,S.node)),S.hasProps){let N="Sequence items cannot have tags or anchors before the - indicator";f.errors.push(new e.YAMLSemanticError(S,N))}break;default:S.error&&f.errors.push(S.error),f.errors.push(new e.YAMLSyntaxError(S,`Unexpected ${S.type} node in sequence`))}}return{comments:d,items:m}}function dr(f,a){let d=[],m=[],v=!1,S,N=null,L="[",T=null;for(let I=0;I<a.items.length;++I){let R=a.items[I];if(typeof R.char=="string"){let{char:j,offset:ne}=R;if(j!==":"&&(v||S!==void 0)&&(v&&S===void 0&&(S=L?m.pop():null),m.push(new q(S)),v=!1,S=void 0,N=null),j===L)L=null;else if(!L&&j==="?")v=!0;else if(L!=="["&&j===":"&&S===void 0){if(L===","){if(S=m.pop(),S instanceof q){let Q="Chaining flow sequence pairs is invalid",re=new e.YAMLSemanticError(a,Q);re.offset=ne,f.errors.push(re)}if(!v&&typeof N=="number"){let Q=R.range?R.range.start:R.offset;Q>N+1024&&f.errors.push(G(a,S));let{src:re}=T.context;for(let J=N;J<Q;++J)if(re[J]===`
|
|
135
|
+
`){let te="Implicit keys of flow sequence pairs need to be on a single line";f.errors.push(new e.YAMLSemanticError(T,te));break}}}else S=null;N=null,v=!1,L=null}else if(L==="["||j!=="]"||I<a.items.length-1){let Q=`Flow sequence contains an unexpected ${j}`,re=new e.YAMLSyntaxError(a,Q);re.offset=ne,f.errors.push(re)}}else if(R.type===e.Type.BLANK_LINE)d.push({before:m.length});else if(R.type===e.Type.COMMENT)V(f.errors,R),d.push({comment:R.comment,before:m.length});else{if(L){let ne=`Expected a ${L} in flow sequence`;f.errors.push(new e.YAMLSemanticError(R,ne))}let j=Te(f,R);S===void 0?(m.push(j),T=R):(m.push(new q(S,j)),S=void 0),N=R.range.start,L=","}}return Y(f.errors,a),S!==void 0&&m.push(new q(S)),{comments:d,items:m}}t.Alias=K,t.Collection=C,t.Merge=l,t.Node=g,t.Pair=q,t.Scalar=b,t.YAMLMap=le,t.YAMLSeq=F,t.addComment=c,t.binaryOptions=i,t.boolOptions=r,t.findPair=ee,t.intOptions=s,t.isEmptyPath=k,t.nullOptions=o,t.resolveMap=or,t.resolveNode=Te,t.resolveSeq=fr,t.resolveString=Ne,t.strOptions=p,t.stringifyNumber=D,t.stringifyString=$,t.toJSON=y}),un=Me(t=>{var e=Re(),n=ze(),c={identify:u=>u instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(u,h)=>{let E=n.resolveString(u,h);if(typeof Buffer=="function")return Buffer.from(E,"base64");if(typeof atob=="function"){let O=atob(E.replace(/[\n\r]/g,"")),x=new Uint8Array(O.length);for(let _=0;_<O.length;++_)x[_]=O.charCodeAt(_);return x}else{let O="This environment does not support reading binary tags; either Buffer or atob is required";return u.errors.push(new e.YAMLReferenceError(h,O)),null}},options:n.binaryOptions,stringify:({comment:u,type:h,value:E},O,x,_)=>{let W;if(typeof Buffer=="function")W=E instanceof Buffer?E.toString("base64"):Buffer.from(E.buffer).toString("base64");else if(typeof btoa=="function"){let B="";for(let U=0;U<E.length;++U)B+=String.fromCharCode(E[U]);W=btoa(B)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(h||(h=n.binaryOptions.defaultType),h===e.Type.QUOTE_DOUBLE)E=W;else{let{lineWidth:B}=n.binaryOptions,U=Math.ceil(W.length/B),oe=new Array(U);for(let he=0,Se=0;he<U;++he,Se+=B)oe[he]=W.substr(Se,B);E=oe.join(h===e.Type.BLOCK_LITERAL?`
|
|
136
|
+
`:" ")}return n.stringifyString({comment:u,type:h,value:E},O,x,_)}};function g(u,h){let E=n.resolveSeq(u,h);for(let O=0;O<E.items.length;++O){let x=E.items[O];if(!(x instanceof n.Pair)){if(x instanceof n.YAMLMap){if(x.items.length>1){let W="Each pair must have its own sequence indicator";throw new e.YAMLSemanticError(h,W)}let _=x.items[0]||new n.Pair;x.commentBefore&&(_.commentBefore=_.commentBefore?`${x.commentBefore}
|
|
137
|
+
${_.commentBefore}`:x.commentBefore),x.comment&&(_.comment=_.comment?`${x.comment}
|
|
138
|
+
${_.comment}`:x.comment),x=_}E.items[O]=x instanceof n.Pair?x:new n.Pair(x)}}return E}function y(u,h,E){let O=new n.YAMLSeq(u);O.tag="tag:yaml.org,2002:pairs";for(let x of h){let _,W;if(Array.isArray(x))if(x.length===2)_=x[0],W=x[1];else throw new TypeError(`Expected [key, value] tuple: ${x}`);else if(x&&x instanceof Object){let U=Object.keys(x);if(U.length===1)_=U[0],W=x[_];else throw new TypeError(`Expected { key: value } tuple: ${x}`)}else _=x;let B=u.createPair(_,W,E);O.items.push(B)}return O}var b={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:g,createNode:y},A=class cn extends n.YAMLSeq{constructor(){super(),e._defineProperty(this,"add",n.YAMLMap.prototype.add.bind(this)),e._defineProperty(this,"delete",n.YAMLMap.prototype.delete.bind(this)),e._defineProperty(this,"get",n.YAMLMap.prototype.get.bind(this)),e._defineProperty(this,"has",n.YAMLMap.prototype.has.bind(this)),e._defineProperty(this,"set",n.YAMLMap.prototype.set.bind(this)),this.tag=cn.tag}toJSON(h,E){let O=new Map;E&&E.onCreate&&E.onCreate(O);for(let x of this.items){let _,W;if(x instanceof n.Pair?(_=n.toJSON(x.key,"",E),W=n.toJSON(x.value,_,E)):_=n.toJSON(x,"",E),O.has(_))throw new Error("Ordered maps must not include duplicate keys");O.set(_,W)}return O}};e._defineProperty(A,"tag","tag:yaml.org,2002:omap");function k(u,h){let E=g(u,h),O=[];for(let{key:x}of E.items)if(x instanceof n.Scalar)if(O.includes(x.value)){let _="Ordered maps must not include duplicate keys";throw new e.YAMLSemanticError(h,_)}else O.push(x.value);return Object.assign(new A,E)}function C(u,h,E){let O=y(u,h,E),x=new A;return x.items=O.items,x}var P={identify:u=>u instanceof Map,nodeClass:A,default:!1,tag:"tag:yaml.org,2002:omap",resolve:k,createNode:C},F=class fn extends n.YAMLMap{constructor(){super(),this.tag=fn.tag}add(h){let E=h instanceof n.Pair?h:new n.Pair(h);n.findPair(this.items,E.key)||this.items.push(E)}get(h,E){let O=n.findPair(this.items,h);return!E&&O instanceof n.Pair?O.key instanceof n.Scalar?O.key.value:O.key:O}set(h,E){if(typeof E!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof E}`);let O=n.findPair(this.items,h);O&&!E?this.items.splice(this.items.indexOf(O),1):!O&&E&&this.items.push(new n.Pair(h))}toJSON(h,E){return super.toJSON(h,E,Set)}toString(h,E,O){if(!h)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(h,E,O);throw new Error("Set items must all have null values")}};e._defineProperty(F,"tag","tag:yaml.org,2002:set");function ie(u,h){let E=n.resolveMap(u,h);if(!E.hasAllNullValues())throw new e.YAMLSemanticError(h,"Set items must all have null values");return Object.assign(new F,E)}function q(u,h,E){let O=new F;for(let x of h)O.items.push(u.createPair(x,null,E));return O}var z={identify:u=>u instanceof Set,nodeClass:F,default:!1,tag:"tag:yaml.org,2002:set",resolve:ie,createNode:q},K=(u,h)=>{let E=h.split(":").reduce((O,x)=>O*60+Number(x),0);return u==="-"?-E:E},ee=({value:u})=>{if(isNaN(u)||!isFinite(u))return n.stringifyNumber(u);let h="";u<0&&(h="-",u=Math.abs(u));let E=[u%60];return u<60?E.unshift(0):(u=Math.round((u-E[0])/60),E.unshift(u%60),u>=60&&(u=Math.round((u-E[0])/60),E.unshift(u))),h+E.map(O=>O<10?"0"+String(O):String(O)).join(":").replace(/000000\d*$/,"")},le={identify:u=>typeof u=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(u,h,E)=>K(h,E.replace(/_/g,"")),stringify:ee},M={identify:u=>typeof u=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(u,h,E)=>K(h,E.replace(/_/g,"")),stringify:ee},l={identify:u=>u 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:(u,h,E,O,x,_,W,B,U)=>{B&&(B=(B+"00").substr(1,3));let oe=Date.UTC(h,E-1,O,x||0,_||0,W||0,B||0);if(U&&U!=="Z"){let he=K(U[0],U.slice(1));Math.abs(he)<30&&(he*=60),oe-=6e4*he}return new Date(oe)},stringify:({value:u})=>u.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function i(u){let h={};return u?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!h.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!h.YAML_SILENCE_WARNINGS}function r(u,h){i(!1)&&console.warn(h?`${h}: ${u}`:u)}function s(u){if(i(!0)){let h=u.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");r(`The endpoint 'yaml/${h}' will be removed in a future release.`,"DeprecationWarning")}}var o={};function p(u,h){if(!o[u]&&i(!0)){o[u]=!0;let E=`The option '${u}' will be removed in a future release`;E+=h?`, use '${h}' instead.`:".",r(E,"DeprecationWarning")}}t.binary=c,t.floatTime=M,t.intTime=le,t.omap=P,t.pairs=b,t.set=z,t.timestamp=l,t.warn=r,t.warnFileDeprecation=s,t.warnOptionDeprecation=p}),pn=Me(t=>{var e=Re(),n=ze(),c=un();function g(w,$,D){let Y=new n.YAMLMap(w);if($ instanceof Map)for(let[V,G]of $)Y.items.push(w.createPair(V,G,D));else if($&&typeof $=="object")for(let V of Object.keys($))Y.items.push(w.createPair(V,$[V],D));return typeof w.sortMapEntries=="function"&&Y.items.sort(w.sortMapEntries),Y}var y={createNode:g,default:!0,nodeClass:n.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:n.resolveMap};function b(w,$,D){let Y=new n.YAMLSeq(w);if($&&$[Symbol.iterator])for(let V of $){let G=w.createNode(V,D.wrapScalars,null,D);Y.items.push(G)}return Y}var A={createNode:b,default:!0,nodeClass:n.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:n.resolveSeq},k={identify:w=>typeof w=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify(w,$,D,Y){return $=Object.assign({actualString:!0},$),n.stringifyString(w,$,D,Y)},options:n.strOptions},C=[y,A,k],P=w=>typeof w=="bigint"||Number.isInteger(w),F=(w,$,D)=>n.intOptions.asBigInt?BigInt(w):parseInt($,D);function ie(w,$,D){let{value:Y}=w;return P(Y)&&Y>=0?D+Y.toString($):n.stringifyNumber(w)}var q={identify:w=>w==null,createNode:(w,$,D)=>D.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},z={identify:w=>typeof w=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:w=>w[0]==="t"||w[0]==="T",options:n.boolOptions,stringify:({value:w})=>w?n.boolOptions.trueStr:n.boolOptions.falseStr},K={identify:w=>P(w)&&w>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(w,$)=>F(w,$,8),options:n.intOptions,stringify:w=>ie(w,8,"0o")},ee={identify:P,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:w=>F(w,w,10),options:n.intOptions,stringify:n.stringifyNumber},le={identify:w=>P(w)&&w>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(w,$)=>F(w,$,16),options:n.intOptions,stringify:w=>ie(w,16,"0x")},M={identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(w,$)=>$?NaN:w[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},l={identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:w=>parseFloat(w),stringify:({value:w})=>Number(w).toExponential()},i={identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(w,$,D){let Y=$||D,V=new n.Scalar(parseFloat(w));return Y&&Y[Y.length-1]==="0"&&(V.minFractionDigits=Y.length),V},stringify:n.stringifyNumber},r=C.concat([q,z,K,ee,le,M,l,i]),s=w=>typeof w=="bigint"||Number.isInteger(w),o=({value:w})=>JSON.stringify(w),p=[y,A,{identify:w=>typeof w=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify:o},{identify:w=>w==null,createNode:(w,$,D)=>D.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:o},{identify:w=>typeof w=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:w=>w==="true",stringify:o},{identify:s,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:w=>n.intOptions.asBigInt?BigInt(w):parseInt(w,10),stringify:({value:w})=>s(w)?w.toString():JSON.stringify(w)},{identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:w=>parseFloat(w),stringify:o}];p.scalarFallback=w=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(w)}`)};var u=({value:w})=>w?n.boolOptions.trueStr:n.boolOptions.falseStr,h=w=>typeof w=="bigint"||Number.isInteger(w);function E(w,$,D){let Y=$.replace(/_/g,"");if(n.intOptions.asBigInt){switch(D){case 2:Y=`0b${Y}`;break;case 8:Y=`0o${Y}`;break;case 16:Y=`0x${Y}`;break}let G=BigInt(Y);return w==="-"?BigInt(-1)*G:G}let V=parseInt(Y,D);return w==="-"?-1*V:V}function O(w,$,D){let{value:Y}=w;if(h(Y)){let V=Y.toString($);return Y<0?"-"+D+V.substr(1):D+V}return n.stringifyNumber(w)}var x=C.concat([{identify:w=>w==null,createNode:(w,$,D)=>D.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:w=>typeof w=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:u},{identify:w=>typeof w=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:u},{identify:h,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(w,$,D)=>E($,D,2),stringify:w=>O(w,2,"0b")},{identify:h,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(w,$,D)=>E($,D,8),stringify:w=>O(w,8,"0")},{identify:h,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(w,$,D)=>E($,D,10),stringify:n.stringifyNumber},{identify:h,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(w,$,D)=>E($,D,16),stringify:w=>O(w,16,"0x")},{identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(w,$)=>$?NaN:w[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},{identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:w=>parseFloat(w.replace(/_/g,"")),stringify:({value:w})=>Number(w).toExponential()},{identify:w=>typeof w=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(w,$){let D=new n.Scalar(parseFloat(w.replace(/_/g,"")));if($){let Y=$.replace(/_/g,"");Y[Y.length-1]==="0"&&(D.minFractionDigits=Y.length)}return D},stringify:n.stringifyNumber}],c.binary,c.omap,c.pairs,c.set,c.intTime,c.floatTime,c.timestamp),_={core:r,failsafe:C,json:p,yaml11:x},W={binary:c.binary,bool:z,float:i,floatExp:l,floatNaN:M,floatTime:c.floatTime,int:ee,intHex:le,intOct:K,intTime:c.intTime,map:y,null:q,omap:c.omap,pairs:c.pairs,seq:A,set:c.set,timestamp:c.timestamp};function B(w,$,D){if($){let Y=D.filter(G=>G.tag===$),V=Y.find(G=>!G.format)||Y[0];if(!V)throw new Error(`Tag ${$} not found`);return V}return D.find(Y=>(Y.identify&&Y.identify(w)||Y.class&&w instanceof Y.class)&&!Y.format)}function U(w,$,D){if(w instanceof n.Node)return w;let{defaultPrefix:Y,onTagObj:V,prevObjects:G,schema:me,wrapScalars:Ne}=D;$&&$.startsWith("!!")&&($=Y+$.slice(2));let Le=B(w,$,me.tags);if(!Le){if(typeof w.toJSON=="function"&&(w=w.toJSON()),!w||typeof w!="object")return Ne?new n.Scalar(w):w;Le=w instanceof Map?y:w[Symbol.iterator]?A:y}V&&(V(Le),delete D.onTagObj);let we={value:void 0,node:void 0};if(w&&typeof w=="object"&&G){let Ke=G.get(w);if(Ke){let et=new n.Alias(Ke);return D.aliasNodes.push(et),et}we.value=w,G.set(w,we)}return we.node=Le.createNode?Le.createNode(D.schema,w,D):Ne?new n.Scalar(w):w,$&&we.node instanceof n.Node&&(we.node.tag=$),we.node}function oe(w,$,D,Y){let V=w[Y.replace(/\W/g,"")];if(!V){let G=Object.keys(w).map(me=>JSON.stringify(me)).join(", ");throw new Error(`Unknown schema "${Y}"; use one of ${G}`)}if(Array.isArray(D))for(let G of D)V=V.concat(G);else typeof D=="function"&&(V=D(V.slice()));for(let G=0;G<V.length;++G){let me=V[G];if(typeof me=="string"){let Ne=$[me];if(!Ne){let Le=Object.keys($).map(we=>JSON.stringify(we)).join(", ");throw new Error(`Unknown custom tag "${me}"; use one of ${Le}`)}V[G]=Ne}}return V}var he=(w,$)=>w.key<$.key?-1:w.key>$.key?1:0,Se=class dn{constructor({customTags:$,merge:D,schema:Y,sortMapEntries:V,tags:G}){this.merge=!!D,this.name=Y,this.sortMapEntries=V===!0?he:V||null,!$&&G&&c.warnOptionDeprecation("tags","customTags"),this.tags=oe(_,W,$||G,Y)}createNode($,D,Y,V){let G={defaultPrefix:dn.defaultPrefix,schema:this,wrapScalars:D},me=V?Object.assign(V,G):G;return U($,Y,me)}createPair($,D,Y){Y||(Y={wrapScalars:!0});let V=this.createNode($,Y.wrapScalars,null,Y),G=this.createNode(D,Y.wrapScalars,null,Y);return new n.Pair(V,G)}};e._defineProperty(Se,"defaultPrefix",e.defaultTagPrefix),e._defineProperty(Se,"defaultTags",e.defaultTags),t.Schema=Se}),Nr=Me(t=>{var e=Re(),n=ze(),c=pn(),g={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},y={get binary(){return n.binaryOptions},set binary(i){Object.assign(n.binaryOptions,i)},get bool(){return n.boolOptions},set bool(i){Object.assign(n.boolOptions,i)},get int(){return n.intOptions},set int(i){Object.assign(n.intOptions,i)},get null(){return n.nullOptions},set null(i){Object.assign(n.nullOptions,i)},get str(){return n.strOptions},set str(i){Object.assign(n.strOptions,i)}},b={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:e.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:e.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:e.defaultTagPrefix}]}};function A(i,r){if((i.version||i.options.version)==="1.0"){let p=r.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(p)return"!"+p[1];let u=r.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return u?`!${u[1]}/${u[2]}`:`!${r.replace(/^tag:/,"")}`}let s=i.tagPrefixes.find(p=>r.indexOf(p.prefix)===0);if(!s){let p=i.getDefaults().tagPrefixes;s=p&&p.find(u=>r.indexOf(u.prefix)===0)}if(!s)return r[0]==="!"?r:`!<${r}>`;let o=r.substr(s.prefix.length).replace(/[!,[\]{}]/g,p=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[p]);return s.handle+o}function k(i,r){if(r instanceof n.Alias)return n.Alias;if(r.tag){let p=i.filter(u=>u.tag===r.tag);if(p.length>0)return p.find(u=>u.format===r.format)||p[0]}let s,o;if(r instanceof n.Scalar){o=r.value;let p=i.filter(u=>u.identify&&u.identify(o)||u.class&&o instanceof u.class);s=p.find(u=>u.format===r.format)||p.find(u=>!u.format)}else o=r,s=i.find(p=>p.nodeClass&&o instanceof p.nodeClass);if(!s){let p=o&&o.constructor?o.constructor.name:typeof o;throw new Error(`Tag not resolved for ${p} value`)}return s}function C(i,r,{anchors:s,doc:o}){let p=[],u=o.anchors.getName(i);return u&&(s[u]=i,p.push(`&${u}`)),i.tag?p.push(A(o,i.tag)):r.default||p.push(A(o,r.tag)),p.join(" ")}function P(i,r,s,o){let{anchors:p,schema:u}=r.doc,h;if(!(i instanceof n.Node)){let x={aliasNodes:[],onTagObj:_=>h=_,prevObjects:new Map};i=u.createNode(i,!0,null,x);for(let _ of x.aliasNodes){_.source=_.source.node;let W=p.getName(_.source);W||(W=p.newName(),p.map[W]=_.source)}}if(i instanceof n.Pair)return i.toString(r,s,o);h||(h=k(u.tags,i));let E=C(i,h,r);E.length>0&&(r.indentAtStart=(r.indentAtStart||0)+E.length+1);let O=typeof h.stringify=="function"?h.stringify(i,r,s,o):i instanceof n.Scalar?n.stringifyString(i,r,s,o):i.toString(r,s,o);return E?i instanceof n.Scalar||O[0]==="{"||O[0]==="["?`${E} ${O}`:`${E}
|
|
139
|
+
${r.indent}${O}`:O}var F=class hn{static validAnchorNode(r){return r instanceof n.Scalar||r instanceof n.YAMLSeq||r instanceof n.YAMLMap}constructor(r){e._defineProperty(this,"map",Object.create(null)),this.prefix=r}createAlias(r,s){return this.setAnchor(r,s),new n.Alias(r)}createMergePair(...r){let s=new n.Merge;return s.value.items=r.map(o=>{if(o instanceof n.Alias){if(o.source instanceof n.YAMLMap)return o}else if(o instanceof n.YAMLMap)return this.createAlias(o);throw new Error("Merge sources must be Map nodes or their Aliases")}),s}getName(r){let{map:s}=this;return Object.keys(s).find(o=>s[o]===r)}getNames(){return Object.keys(this.map)}getNode(r){return this.map[r]}newName(r){r||(r=this.prefix);let s=Object.keys(this.map);for(let o=1;;++o){let p=`${r}${o}`;if(!s.includes(p))return p}}resolveNodes(){let{map:r,_cstAliases:s}=this;Object.keys(r).forEach(o=>{r[o]=r[o].resolved}),s.forEach(o=>{o.source=o.source.resolved}),delete this._cstAliases}setAnchor(r,s){if(r!=null&&!hn.validAnchorNode(r))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(s&&/[\x00-\x19\s,[\]{}]/.test(s))throw new Error("Anchor names must not contain whitespace or control characters");let{map:o}=this,p=r&&Object.keys(o).find(u=>o[u]===r);if(p)if(s)p!==s&&(delete o[p],o[s]=r);else return p;else{if(!s){if(!r)return null;s=this.newName()}o[s]=r}return s}},ie=(i,r)=>{if(i&&typeof i=="object"){let{tag:s}=i;i instanceof n.Collection?(s&&(r[s]=!0),i.items.forEach(o=>ie(o,r))):i instanceof n.Pair?(ie(i.key,r),ie(i.value,r)):i instanceof n.Scalar&&s&&(r[s]=!0)}return r},q=i=>Object.keys(ie(i,{}));function z(i,r){let s={before:[],after:[]},o,p=!1;for(let u of r)if(u.valueRange){if(o!==void 0){let E="Document contains trailing content not separated by a ... or --- line";i.errors.push(new e.YAMLSyntaxError(u,E));break}let h=n.resolveNode(i,u);p&&(h.spaceBefore=!0,p=!1),o=h}else u.comment!==null?(o===void 0?s.before:s.after).push(u.comment):u.type===e.Type.BLANK_LINE&&(p=!0,o===void 0&&s.before.length>0&&!i.commentBefore&&(i.commentBefore=s.before.join(`
|
|
140
|
+
`),s.before=[]));if(i.contents=o||null,!o)i.comment=s.before.concat(s.after).join(`
|
|
141
|
+
`)||null;else{let u=s.before.join(`
|
|
142
|
+
`);if(u){let h=o instanceof n.Collection&&o.items[0]?o.items[0]:o;h.commentBefore=h.commentBefore?`${u}
|
|
143
|
+
${h.commentBefore}`:u}i.comment=s.after.join(`
|
|
144
|
+
`)||null}}function K({tagPrefixes:i},r){let[s,o]=r.parameters;if(!s||!o){let p="Insufficient parameters given for %TAG directive";throw new e.YAMLSemanticError(r,p)}if(i.some(p=>p.handle===s)){let p="The %TAG directive must only be given at most once per handle in the same document.";throw new e.YAMLSemanticError(r,p)}return{handle:s,prefix:o}}function ee(i,r){let[s]=r.parameters;if(r.name==="YAML:1.0"&&(s="1.0"),!s){let o="Insufficient parameters given for %YAML directive";throw new e.YAMLSemanticError(r,o)}if(!b[s]){let o=`Document will be parsed as YAML ${i.version||i.options.version} rather than YAML ${s}`;i.warnings.push(new e.YAMLWarning(r,o))}return s}function le(i,r,s){let o=[],p=!1;for(let u of r){let{comment:h,name:E}=u;switch(E){case"TAG":try{i.tagPrefixes.push(K(i,u))}catch(O){i.errors.push(O)}p=!0;break;case"YAML":case"YAML:1.0":if(i.version){let O="The %YAML directive must only be given at most once per document.";i.errors.push(new e.YAMLSemanticError(u,O))}try{i.version=ee(i,u)}catch(O){i.errors.push(O)}p=!0;break;default:if(E){let O=`YAML only supports %TAG and %YAML directives, and not %${E}`;i.warnings.push(new e.YAMLWarning(u,O))}}h&&o.push(h)}if(s&&!p&&(i.version||s.version||i.options.version)==="1.1"){let u=({handle:h,prefix:E})=>({handle:h,prefix:E});i.tagPrefixes=s.tagPrefixes.map(u),i.version=s.version}i.commentBefore=o.join(`
|
|
145
|
+
`)||null}function M(i){if(i instanceof n.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var l=class St{constructor(r){this.anchors=new F(r.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=r,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(r){return M(this.contents),this.contents.add(r)}addIn(r,s){M(this.contents),this.contents.addIn(r,s)}delete(r){return M(this.contents),this.contents.delete(r)}deleteIn(r){return n.isEmptyPath(r)?this.contents==null?!1:(this.contents=null,!0):(M(this.contents),this.contents.deleteIn(r))}getDefaults(){return St.defaults[this.version]||St.defaults[this.options.version]||{}}get(r,s){return this.contents instanceof n.Collection?this.contents.get(r,s):void 0}getIn(r,s){return n.isEmptyPath(r)?!s&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(r,s):void 0}has(r){return this.contents instanceof n.Collection?this.contents.has(r):!1}hasIn(r){return n.isEmptyPath(r)?this.contents!==void 0:this.contents instanceof n.Collection?this.contents.hasIn(r):!1}set(r,s){M(this.contents),this.contents.set(r,s)}setIn(r,s){n.isEmptyPath(r)?this.contents=s:(M(this.contents),this.contents.setIn(r,s))}setSchema(r,s){if(!r&&!s&&this.schema)return;typeof r=="number"&&(r=r.toFixed(1)),r==="1.0"||r==="1.1"||r==="1.2"?(this.version?this.version=r:this.options.version=r,delete this.options.schema):r&&typeof r=="string"&&(this.options.schema=r),Array.isArray(s)&&(this.options.customTags=s);let o=Object.assign({},this.getDefaults(),this.options);this.schema=new c.Schema(o)}parse(r,s){this.options.keepCstNodes&&(this.cstNode=r),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:o=[],contents:p=[],directivesEndMarker:u,error:h,valueRange:E}=r;if(h&&(h.source||(h.source=this),this.errors.push(h)),le(this,o,s),u&&(this.directivesEndMarker=!0),this.range=E?[E.start,E.end]:null,this.setSchema(),this.anchors._cstAliases=[],z(this,p),this.anchors.resolveNodes(),this.options.prettyErrors){for(let O of this.errors)O instanceof e.YAMLError&&O.makePretty();for(let O of this.warnings)O instanceof e.YAMLError&&O.makePretty()}return this}listNonDefaultTags(){return q(this.contents).filter(r=>r.indexOf(c.Schema.defaultPrefix)!==0)}setTagPrefix(r,s){if(r[0]!=="!"||r[r.length-1]!=="!")throw new Error("Handle must start and end with !");if(s){let o=this.tagPrefixes.find(p=>p.handle===r);o?o.prefix=s:this.tagPrefixes.push({handle:r,prefix:s})}else this.tagPrefixes=this.tagPrefixes.filter(o=>o.handle!==r)}toJSON(r,s){let{keepBlobsInJSON:o,mapAsMap:p,maxAliasCount:u}=this.options,h=o&&(typeof r!="string"||!(this.contents instanceof n.Scalar)),E={doc:this,indentStep:" ",keep:h,mapAsMap:h&&!!p,maxAliasCount:u,stringify:P},O=Object.keys(this.anchors.map);O.length>0&&(E.anchors=new Map(O.map(_=>[this.anchors.map[_],{alias:[],aliasCount:0,count:1}])));let x=n.toJSON(this.contents,r,E);if(typeof s=="function"&&E.anchors)for(let{count:_,res:W}of E.anchors.values())s(W,_);return x}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let r=this.options.indent;if(!Number.isInteger(r)||r<=0){let O=JSON.stringify(r);throw new Error(`"indent" option must be a positive integer, not ${O}`)}this.setSchema();let s=[],o=!1;if(this.version){let O="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?O="%YAML:1.0":this.version==="1.1"&&(O="%YAML 1.1")),s.push(O),o=!0}let p=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:O,prefix:x})=>{p.some(_=>_.indexOf(x)===0)&&(s.push(`%TAG ${O} ${x}`),o=!0)}),(o||this.directivesEndMarker)&&s.push("---"),this.commentBefore&&((o||!this.directivesEndMarker)&&s.unshift(""),s.unshift(this.commentBefore.replace(/^/gm,"#")));let u={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(r),stringify:P},h=!1,E=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&(o||this.directivesEndMarker)&&s.push(""),this.contents.commentBefore&&s.push(this.contents.commentBefore.replace(/^/gm,"#")),u.forceBlockIndent=!!this.comment,E=this.contents.comment);let O=E?null:()=>h=!0,x=P(this.contents,u,()=>E=null,O);s.push(n.addComment(x,"",E))}else this.contents!==void 0&&s.push(P(this.contents,u));return this.comment&&((!h||E)&&s[s.length-1]!==""&&s.push(""),s.push(this.comment.replace(/^/gm,"#"))),s.join(`
|
|
146
|
+
`)+`
|
|
147
|
+
`}};e._defineProperty(l,"defaults",b),t.Document=l,t.defaultOptions=g,t.scalarOptions=y}),Lr=Me(t=>{var e=Or(),n=Nr(),c=pn(),g=Re(),y=un();ze();function b(q,z=!0,K){K===void 0&&typeof z=="string"&&(K=z,z=!0);let ee=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new c.Schema(ee).createNode(q,z,K)}var A=class extends n.Document{constructor(q){super(Object.assign({},n.defaultOptions,q))}};function k(q,z){let K=[],ee;for(let le of e.parse(q)){let M=new A(z);M.parse(le,ee),K.push(M),ee=M}return K}function C(q,z){let K=e.parse(q),ee=new A(z).parse(K[0]);if(K.length>1){let le="Source contains multiple documents; please use YAML.parseAllDocuments()";ee.errors.unshift(new g.YAMLSemanticError(K[1],le))}return ee}function P(q,z){let K=C(q,z);if(K.warnings.forEach(ee=>y.warn(ee)),K.errors.length>0)throw K.errors[0];return K.toJSON()}function F(q,z){let K=new A(z);return K.contents=q,String(K)}var ie={createNode:b,defaultOptions:n.defaultOptions,Document:A,parse:P,parseAllDocuments:k,parseCST:e.parse,parseDocument:C,scalarOptions:n.scalarOptions,stringify:F};t.YAML=ie}),mn=Me((t,e)=>{e.exports=Lr().YAML}),Ar=Me(t=>{var e=ze(),n=Re();t.findPair=e.findPair,t.parseMap=e.resolveMap,t.parseSeq=e.resolveSeq,t.stringifyNumber=e.stringifyNumber,t.stringifyString=e.stringifyString,t.toJSON=e.toJSON,t.Type=n.Type,t.YAMLError=n.YAMLError,t.YAMLReferenceError=n.YAMLReferenceError,t.YAMLSemanticError=n.YAMLSemanticError,t.YAMLSyntaxError=n.YAMLSyntaxError,t.YAMLWarning=n.YAMLWarning}),gn={};nn(gn,{__parsePrettierYamlConfig:()=>tr,languages:()=>Dn,options:()=>Wn,parsers:()=>Bt,printers:()=>er});var yn=(t,e)=>(n,c,...g)=>n|1&&c==null?void 0:(e.call(c)??c[t]).apply(c,g);function Mr(t){return this[t<0?this.length+t:t]}var Tr=yn("at",function(){if(Array.isArray(this)||typeof this=="string")return Mr}),ve=Tr,xr=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},kr=yn("replaceAll",function(){if(typeof this=="string")return xr}),pt=kr,Cr=()=>{},Ir=Cr,vn="string",En="array",Sn="cursor",bn="indent",kt="align",wn="trim",Ct="group",It="fill",Pt="if-break",On="indent-if-break",$t="line-suffix",Nn="line-suffix-boundary",Fe="line",Ln="label",Rt="break-parent",An=new Set([Sn,bn,kt,wn,Ct,It,Pt,On,$t,Nn,Fe,Ln,Rt]);function Pr(t){if(typeof t=="string")return vn;if(Array.isArray(t))return En;if(!t)return;let{type:e}=t;if(An.has(e))return e}var Mn=Pr,$r=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Rr(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
|
148
|
+
Expected it to be 'string' or 'object'.`;if(Mn(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let c=$r([...An].map(g=>`'${g}'`));return`Unexpected doc.type '${t.type}'.
|
|
149
|
+
Expected it to be ${c}.`}var _r=class extends Error{constructor(e){super(Rr(e));Ue(this,"name","InvalidDocError");this.doc=e}},Yr=_r;function Br(t,e){if(typeof t=="string")return e(t);let n=new Map;return c(t);function c(y){if(n.has(y))return n.get(y);let b=g(y);return n.set(y,b),b}function g(y){switch(Mn(y)){case En:return e(y.map(c));case It:return e({...y,parts:y.parts.map(c)});case Pt:return e({...y,breakContents:c(y.breakContents),flatContents:c(y.flatContents)});case Ct:{let{expandedStates:b,contents:A}=y;return b?(b=b.map(c),A=b[0]):A=c(A),e({...y,contents:A,expandedStates:b})}case kt:case bn:case On:case Ln:case $t:return e({...y,contents:c(y.contents)});case vn:case Sn:case wn:case Nn:case Fe:case Rt:return e(y);default:throw new Yr(y)}}}function Dr(t,e=wt){return Br(t,n=>typeof n=="string"?pe(e,n.split(`
|
|
150
|
+
`)):n)}var Wr=Ir;function at(t,e){return{type:kt,contents:e,n:t}}function qt(t){return at(Number.NEGATIVE_INFINITY,t)}function jr(t){return at({type:"root"},t)}function Fr(t){return at(-1,t)}var _t={type:Rt};function Tn(t){return{type:It,parts:t}}function it(t,e={}){return Wr(e.expandedStates),{type:Ct,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Kt(t,e){return it(t[0],{...e,expandedStates:t})}function bt(t,e="",n={}){return{type:Pt,breakContents:t,flatContents:e,groupId:n.groupId}}function pe(t,e){let n=[];for(let c=0;c<e.length;c++)c!==0&&n.push(t),n.push(e[c]);return n}var Xe={type:Fe},xn={type:Fe,soft:!0},qr={type:Fe,hard:!0},H=[qr,_t],Kr={type:Fe,hard:!0,literal:!0},wt=[Kr,_t];function Ur(t){return{type:$t,contents:t}}function Vr(t){return(e,n,c)=>{let g=!!(c!=null&&c.backwards);if(n===!1)return!1;let{length:y}=e,b=n;for(;b>=0&&b<y;){let A=e.charAt(b);if(t instanceof RegExp){if(!t.test(A))return b}else if(!t.includes(A))return b;g?b--:b++}return b===-1||b===y?b:!1}}var Ut=Vr(" "),Vt=t=>t===`
|
|
151
|
+
`||t==="\r"||t==="\u2028"||t==="\u2029";function Qr(t,e,n){let c=!!(n!=null&&n.backwards);if(e===!1)return!1;let g=t.charAt(e);if(c){if(t.charAt(e-1)==="\r"&&g===`
|
|
152
|
+
`)return e-2;if(Vt(g))return e-1}else{if(g==="\r"&&t.charAt(e+1)===`
|
|
153
|
+
`)return e+2;if(Vt(g))return e+1}return e}var Qt=Qr;function Jr(t,e){let n=e-1;n=Ut(t,n,{backwards:!0}),n=Qt(t,n,{backwards:!0}),n=Ut(t,n,{backwards:!0});let c=Qt(t,n,{backwards:!0});return n!==c}var kn=Jr,Gr=class extends Error{constructor(e,n,c="type"){super(`Unexpected ${n} node ${c}: ${JSON.stringify(e[c])}.`);Ue(this,"name","UnexpectedNodeError");this.node=e}},Hr=Gr,zr="format",Xr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Zr=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,ei=/^\s*@(?:format|prettier)\s*$/u,ti=t=>ei.test(t),ni=t=>Zr.test(t),ri=t=>Xr.test(t),ii=t=>`# @${zr}
|
|
154
|
+
|
|
155
|
+
${t}`;function Cn(t,e){switch(t.type){case"comment":if(ti(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break}}Cn.ignoredProperties=new Set(["position"]);var si=Cn;function In(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath))return async c=>{let g=await c(e.originalText,{parser:"json"});return g?[g,H]:void 0}}In.getVisitorKeys=()=>[];var oi=In,Qe=null;function He(t){if(Qe!==null&&typeof Qe.property){let e=Qe;return Qe=He.prototype=null,e}return Qe=He.prototype=t??Object.create(null),new He}var ai=10;for(let t=0;t<=ai;t++)He();function li(t){return He(t)}function ui(t,e="type"){li(t);function n(c){let g=c[e],y=t[g];if(!Array.isArray(y))throw Object.assign(new Error(`Missing visitor keys for '${g}'.`),{node:c});return y}return n}var ci=ui,ae=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],fi={root:ae[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:ae[0],documentBody:ae[0],directive:ae[1],alias:ae[1],blockLiteral:ae[1],blockFolded:ae[0],plain:ae[0],quoteSingle:ae[1],quoteDouble:ae[1],mapping:ae[0],mappingItem:ae[2],mappingKey:ae[3],mappingValue:ae[3],sequence:ae[0],sequenceItem:ae[3],flowMapping:ae[0],flowMappingItem:ae[2],flowSequence:ae[0],flowSequenceItem:ae[3],comment:ae[1],tag:ae[4],anchor:ae[4]},pi=ci(fi),di=pi,Yt=t=>t.position.start.offset,hi=t=>t.position.end.offset;function mi(t){return Array.isArray(t)&&t.length>0}var Ze=mi;function Oe(t,e){return typeof(t==null?void 0:t.type)=="string"&&e.includes(t.type)}function Pn(t,e,n){return e("children"in t?{...t,children:t.children.map(c=>Pn(c,e,t))}:t,n)}function Je(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function gi(t,e){let n=0,c=e.length;for(let g=t.position.end.offset-1;g<c;g++){let y=e[g];if(y===`
|
|
156
|
+
`&&n++,n===1&&/\S/u.test(y))return!1;if(n===2)return!0}return!1}function $n(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let c=1;c<n;c++){let g=t.stack[c],y=t.stack[c-1];if(Array.isArray(y)&&typeof g=="number"&&g!==y.length-1)return!1}return!0}function Ot(t){return Ze(t.children)?Ot(ve(0,t.children,-1)):t}function Jt(t){return t.value.trim()==="prettier-ignore"}function yi(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return ye(n)&&Jt(ve(0,n.endComments,-1))}return xe(e)&&Jt(ve(0,e.leadingComments,-1))}function st(t){return!Ze(t.children)&&!vi(t)}function vi(t){return xe(t)||De(t)||Rn(t)||be(t)||ye(t)}function xe(t){return Ze(t==null?void 0:t.leadingComments)}function De(t){return Ze(t==null?void 0:t.middleComments)}function Rn(t){return t==null?void 0:t.indicatorComment}function be(t){return t==null?void 0:t.trailingComment}function ye(t){return Ze(t==null?void 0:t.endComments)}function _n(t){return t?t.split(new RegExp("(?<!^| ) (?! |$)","u")):[]}function Ei(t,e,n){let c=e.split(`
|
|
157
|
+
`).map((y,b,A)=>b===0&&b===A.length-1?y:b!==0&&b!==A.length-1?y.trim():b===0?y.trimEnd():y.trimStart());if(n.proseWrap==="preserve")return c.map(y=>y?[y]:[]);let g=[];for(let[y,b]of c.entries()){let A=_n(b);y>0&&c[y-1].length>0&&A.length>0&&!(t==="quoteDouble"&&ve(0,ve(0,g,-1),-1).endsWith("\\"))?g[g.length-1]=[...ve(0,g,-1),...A]:g.push(A)}return n.proseWrap==="never"?g.map(y=>[y.join(" ")]):g}function Si(t,{parentIndent:e,isLastDescendant:n,options:c}){let g=t.position.start.line===t.position.end.line?"":c.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],y;if(t.indent===null){let C=g.match(/^(?<leadingSpace> *)[^\n\r ]/mu);y=C?C.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else y=t.indent-1+e;let b=g.split(`
|
|
158
|
+
`).map(C=>C.slice(y));if(c.proseWrap==="preserve"||t.type==="blockLiteral")return k(b.map(C=>C?[C]:[]));let A=[];for(let[C,P]of b.entries()){let F=_n(P);C>0&&F.length>0&&b[C-1].length>0&&!/^\s/u.test(F[0])&&!/^\s|\s$/u.test(ve(0,A,-1))?A[A.length-1]=[...ve(0,A,-1),...F]:A.push(F)}return A=A.map(C=>{let P=[];for(let F of C)P.length>0&&/\s$/u.test(ve(0,P,-1))?P[P.length-1]+=" "+F:P.push(F);return P}),c.proseWrap==="never"&&(A=A.map(C=>[C.join(" ")])),k(A);function k(C){if(t.chomping==="keep")return ve(0,C,-1).length===0?C.slice(0,-1):C;let P=0;for(let F=C.length-1;F>=0&&C[F].length===0;F--)P++;return P===0?C:P>=2&&!n?C.slice(0,-(P-1)):C.slice(0,-P)}}function Nt(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var dt=new WeakMap;function Yn(t,e){let{node:n,root:c}=t,g;return dt.has(c)?g=dt.get(c):(g=new Set,dt.set(c,g)),!g.has(n.position.end.line)&&(g.add(n.position.end.line),gi(n,e)&&!Bn(t.parent))?xn:""}function Bn(t){return ye(t)&&!Oe(t,["documentHead","documentBody","flowMapping","flowSequence"])}function ge(t,e){return at(" ".repeat(t),e)}function bi(t,e,n){let{node:c}=t,g=t.ancestors.filter(C=>C.type==="sequence"||C.type==="mapping").length,y=$n(t),b=[c.type==="blockFolded"?">":"|"];c.indent!==null&&b.push(c.indent.toString()),c.chomping!=="clip"&&b.push(c.chomping==="keep"?"+":"-"),Rn(c)&&b.push(" ",n("indicatorComment"));let A=Si(c,{parentIndent:g,isLastDescendant:y,options:e}),k=[];for(let[C,P]of A.entries())C===0&&k.push(H),k.push(Tn(pe(Xe,P))),C!==A.length-1?k.push(P.length===0?H:jr(wt)):c.chomping==="keep"&&y&&k.push(qt(P.length===0?H:wt));return c.indent===null?b.push(Fr(ge(e.tabWidth,k))):b.push(qt(ge(c.indent-1+g,k))),b}var wi=bi;function Gt(t,e,n){let{node:c}=t,g=c.type==="flowMapping",y=g?"{":"[",b=g?"}":"]",A=xn;g&&c.children.length>0&&e.bracketSpacing&&(A=Xe);let k=ve(0,c.children,-1),C=(k==null?void 0:k.type)==="flowMappingItem"&&st(k.key)&&st(k.value);return[y,ge(e.tabWidth,[A,Oi(t,e,n),e.trailingComma==="none"?"":bt(","),ye(c)?[H,pe(H,t.map(n,"endComments"))]:""]),C?"":A,b]}function Oi(t,e,n){return t.map(({isLast:c,node:g,next:y})=>[n(),c?"":[",",Xe,g.position.start.line!==y.position.start.line?Yn(t,e.originalText):""]],"children")}function Ni(t,e,n){var le;let{node:c,parent:g}=t,{key:y,value:b}=c,A=st(y),k=st(b);if(A&&k)return": ";let C=n("key"),P=Li(c)?" ":"";if(k)return c.type==="flowMappingItem"&&g.type==="flowMapping"?C:c.type==="mappingItem"&&ht(y.content,e)&&!be(y.content)&&((le=g.tag)==null?void 0:le.value)!=="tag:yaml.org,2002:set"?[C,P,":"]:["? ",ge(2,C)];let F=n("value");if(A)return[": ",ge(2,F)];if(xe(b)||!Nt(y.content))return["? ",ge(2,C),H,...t.map(()=>[n(),H],"value","leadingComments"),": ",ge(2,F)];if(Ai(y.content)&&!xe(y.content)&&!De(y.content)&&!be(y.content)&&!ye(y)&&!xe(b.content)&&!De(b.content)&&!ye(b)&&ht(b.content,e))return[C,P,": ",F];let ie=Symbol("mappingKey"),q=it([bt("? "),it(ge(2,C),{id:ie})]),z=[H,": ",ge(2,F)],K=[P,":"];ye(b)&&b.content&&Oe(b.content,["flowMapping","flowSequence"])&&b.content.children.length===0?K.push(" "):xe(b.content)||ye(b)&&b.content&&!Oe(b.content,["mapping","sequence"])||g.type==="mapping"&&be(y.content)&&Nt(b.content)||Oe(b.content,["mapping","sequence"])&&b.content.tag===null&&b.content.anchor===null?K.push(H):b.content?K.push(Xe):be(b)&&K.push(" "),K.push(F);let ee=ge(e.tabWidth,K);return ht(y.content,e)&&!xe(y.content)&&!De(y.content)&&!be(y.content)&&!ye(y)?Kt([[C,ee]]):Kt([[q,bt(z,ee,{groupId:ie})]])}function ht(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
|
159
|
+
`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function Li(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Ai(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Mi=Ni;function Ti(t){return Pn(t,xi)}function xi(t){switch(t.type){case"document":Je(t,"head",()=>t.children[0]),Je(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Je(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Je(t,"key",()=>t.children[0]),Je(t,"value",()=>t.children[1]);break}return t}var ki=Ti;function Ci(t,e,n){let{node:c}=t,g=[];c.type!=="mappingValue"&&xe(c)&&g.push([pe(H,t.map(n,"leadingComments")),H]);let{tag:y,anchor:b}=c;y&&g.push(n("tag")),y&&b&&g.push(" "),b&&g.push(n("anchor"));let A="";return Oe(c,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!$n(t)&&(A=Yn(t,e.originalText)),(y||b)&&(Oe(c,["sequence","mapping"])&&!De(c)?g.push(H):g.push(" ")),De(c)&&g.push([c.middleComments.length===1?"":H,pe(H,t.map(n,"middleComments")),H]),yi(t)?g.push(Dr(e.originalText.slice(c.position.start.offset,c.position.end.offset).trimEnd())):g.push(it(Ii(t,e,n))),be(c)&&!Oe(c,["document","documentHead"])&&g.push(Ur([c.type==="mappingValue"&&!c.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&Nt(c)?"":_t,n("trailingComment")])),Bn(c)&&g.push(ge(c.type==="sequenceItem"?2:0,[H,pe(H,t.map(({node:k})=>[kn(e.originalText,Yt(k))?H:"",n()],"endComments"))])),g.push(A),g}function Ii(t,e,n){let{node:c}=t;switch(c.type){case"root":{let g=Ot(c),y=!(Oe(g,["blockLiteral","blockFolded"])&&g.chomping==="keep"),b=[];return t.each(({node:A,isFirst:k})=>{k||b.push(H),b.push(n()),$i(t)&&(y&&b.push(H),b.push("..."),be(A)&&b.push(" ",n("trailingComment")))},"children"),y&&b.push(H),b}case"document":{let g=[];return Ri(t)&&((c.head.children.length>0||c.head.endComments.length>0)&&g.push(n("head")),be(c.head)?g.push(["---"," ",n(["head","trailingComment"])]):g.push("---")),Pi(c)&&g.push(n("body")),pe(H,g)}case"documentHead":return pe(H,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:g,endComments:y}=c,b="";if(g.length>0&&y.length>0){let A=Ot(c);if(Oe(A,["blockFolded","blockLiteral"]))A.chomping!=="keep"&&(b=[H,H]);else{let k=ve(0,g,-1);b=Oe(k,["mapping"])&&kn(e.originalText,Yt(y[0]))?[H,H]:H}}return[pe(H,t.map(n,"children")),b,pe(H,t.map(n,"endComments"))]}case"directive":return["%",pe(" ",[c.name,...c.parameters])];case"comment":return["#",c.value];case"alias":return["*",c.value];case"tag":return e.originalText.slice(c.position.start.offset,c.position.end.offset);case"anchor":return["&",c.value];case"plain":return Ge(c.type,e.originalText.slice(c.position.start.offset,c.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let g=e.originalText.slice(c.position.start.offset+1,c.position.end.offset-1);if(c.type==="quoteSingle"&&g.includes("\\")||c.type==="quoteDouble"&&/\\[^"]/u.test(g)){let b=c.type==="quoteDouble"?'"':"'";return[b,Ge(c.type,g,e),b]}if(g.includes('"'))return["'",Ge(c.type,c.type==="quoteDouble"?pt(0,pt(0,g,'\\"','"'),"'","'".repeat(2)):g,e),"'"];if(g.includes("'"))return['"',Ge(c.type,c.type==="quoteSingle"?pt(0,g,"''","'"):g,e),'"'];let y=e.singleQuote?"'":'"';return[y,Ge(c.type,g,e),y]}case"blockFolded":case"blockLiteral":return wi(t,e,n);case"mapping":case"sequence":return pe(H,t.map(n,"children"));case"sequenceItem":return["- ",ge(2,c.content?n("content"):"")];case"mappingKey":case"mappingValue":return c.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Mi(t,e,n);case"flowMapping":return Gt(t,e,n);case"flowSequence":return Gt(t,e,n);case"flowSequenceItem":return n("content");default:throw new Hr(c,"YAML")}}function Pi(t){return t.body.children.length>0||ye(t.body)}function $i(t){let e=t.node;if(e.documentEndMarker||be(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||ye(n.head)}function Ri(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||ye(e.head)||be(e.head)}function Ge(t,e,n){let c=Ei(t,e,n);return pe(H,c.map(g=>Tn(pe(Xe,g))))}var _i={preprocess:ki,embed:oi,print:Ci,massageAstNode:si,insertPragma:ii,getVisitorKeys:di},Yi=_i,Dn=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}],mt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]}},Bi={bracketSpacing:mt.bracketSpacing,singleQuote:mt.singleQuote,proseWrap:mt.proseWrap},Wn=Bi,Bt={};nn(Bt,{yaml:()=>Gs});var Ht=xt(mn()),Ee=xt(Ar());Ee.default.findPair;Ee.default.toJSON;Ee.default.parseMap;Ee.default.parseSeq;Ee.default.stringifyNumber;Ee.default.stringifyString;Ee.default.Type;Ee.default.YAMLError;Ee.default.YAMLReferenceError;var Di=Ee.default.YAMLSemanticError;Ee.default.YAMLSyntaxError;Ee.default.YAMLWarning;function de(t,e=null){"children"in t&&t.children.forEach(n=>de(n,t)),"anchor"in t&&t.anchor&&de(t.anchor,t),"tag"in t&&t.tag&&de(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>de(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>de(n,t)),"indicatorComment"in t&&t.indicatorComment&&de(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&de(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>de(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function ot(t){return`${t.line}:${t.column}`}function Wi(t){de(t);let e=ji(t),n=t.children.slice();t.comments.sort((c,g)=>c.position.start.offset-g.position.end.offset).filter(c=>!c._parent).forEach(c=>{for(;n.length>1&&c.position.start.line>n[0].position.end.line;)n.shift();Fi(c,e,n[0])})}function ji(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return jn(e,t),e}function jn(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:c}=t[n.line-1];(!c||n.column<c.position.start.column)&&(t[n.line-1].leadingAttachableNode=e)}if("trailingComment"in e&&e.position.end.column>1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:c}=t[n.line-1];(!c||n.column>=c.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:c}=e.position,g=[c.line].concat(n.line===c.line?[]:n.line);for(let y of g){let b=t[y-1].trailingNode;(!b||c.column>=b.position.end.column)&&(t[y-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{jn(t,n)})}}function Fi(t,e,n){let c=t.position.start.line,{trailingAttachableNode:g}=e[c-1];if(g){if(g.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${ot(t.position.start)}`);de(t,g),g.trailingComment=t;return}for(let b=c;b>=n.position.start.line;b--){let{trailingNode:A}=e[b-1],k;if(A)k=A;else if(b!==c&&e[b-1].comment)k=e[b-1].comment._parent;else continue;if((k.type==="sequence"||k.type==="mapping")&&(k=k.children[0]),k.type==="mappingItem"){let[C,P]=k.children;k=Fn(C)?C:P}for(;;){if(qi(k,t)){de(t,k),k.endComments.push(t);return}if(!k._parent)break;k=k._parent}break}for(let b=c+1;b<=n.position.end.line;b++){let{leadingAttachableNode:A}=e[b-1];if(A){de(t,A),A.leadingComments.push(t);return}}let y=n.children[1];de(t,y),y.endComments.push(t)}function qi(t,e){if(t.position.start.offset<e.position.start.offset&&t.position.end.offset>e.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offset<t.position.end.offset)return!1;switch(t.type){case"sequenceItem":return e.position.start.column>t.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Fn(t));default:return!1}}function Fn(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function ue(t,e){return{type:t,position:e}}function Ki(t,e,n){return{...ue("root",t),children:e,comments:n}}function rt(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):rt(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):rt(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&rt(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`)}}function $e(t,e){return{start:t,end:e}}function zt(t){return{start:t,end:t}}var We;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(We||(We={}));function Ui(t,e){return{...ue("anchor",t),value:e}}function Dt(t,e){return{...ue("comment",t),value:e}}function Vi(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Qi(t,e){return{...ue("tag",t),value:e}}function qn(t,e,n=()=>!1){let c=t.cstNode,g=[],y=null,b=null,A=null;for(let k of c.props){let C=e.text[k.origStart];switch(C){case We.Tag:y=y||k,b=Qi(e.transformRange(k),t.tag);break;case We.Anchor:y=y||k,A=Ui(e.transformRange(k),c.anchor);break;case We.Comment:{let P=Dt(e.transformRange(k),e.text.slice(k.origStart+1,k.origEnd));e.comments.push(P),!n(P)&&y&&y.origEnd<=k.origStart&&k.origEnd<=c.valueRange.origStart&&g.push(P);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(C)}`)}}return Vi(b,A,g)}function qe(){return{leadingComments:[]}}function lt(t=null){return{trailingComment:t}}function _e(){return{...qe(),...lt()}}function Ji(t,e,n){return{...ue("alias",t),..._e(),...e,value:n}}function Gi(t,e){let n=t.cstNode;return Ji(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function Hi(t){return{...t,type:"blockFolded"}}function zi(t,e,n,c,g,y){return{...ue("blockValue",t),...qe(),...e,chomping:n,indent:c,value:g,indicatorComment:y}}var Lt;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(Lt||(Lt={}));function Kn(t,e){let n=t.cstNode,c=1,g=n.chomping==="CLIP"?0:1,y=n.header.origEnd-n.header.origStart-c-g!==0,b=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),A=null,k=qn(t,e,C=>{if(!(b.start.offset<C.position.start.offset&&C.position.end.offset<b.end.offset))return!1;if(A)throw new Error(`Unexpected multiple indicator comments at ${ot(C.position.start)}`);return A=C,!0});return zi(b,k,Lt[n.chomping],y?n.blockIndent:null,n.strValue,A)}function Xi(t,e){return Hi(Kn(t,e))}function Zi(t){return{...t,type:"blockLiteral"}}function es(t,e){return Zi(Kn(t,e))}function ts(t,e){return Dt(e.transformRange(t.range),t.comment)}function ns(t,e,n){return{...ue("directive",t),..._e(),name:e,parameters:n}}function Wt(t,e){for(let n of t.props){let c=e.text[n.origStart];switch(c){case We.Comment:e.comments.push(Dt(e.transformRange(n),e.text.slice(n.origStart+1,n.origEnd)));break;default:throw new Error(`Unexpected leading character ${JSON.stringify(c)}`)}}}function rs(t,e){return Wt(t,e),ns(e.transformRange(t.range),t.name,t.parameters)}function is(t,e,n,c,g,y){return{...ue("document",t),...lt(y),directivesEndMarker:e,documentEndMarker:n,children:[c,g]}}function Ye(t=[]){return{endComments:t}}function ss(t,e,n){return{...ue("documentBody",t),...Ye(n),children:e?[e]:[]}}function ke(t){return t[t.length-1]}function Un(t,e){let n=t.match(e);return n?n.index:-1}function os(t,e,n){let c=t.cstNode,{comments:g,endComments:y,documentTrailingComment:b,documentHeadTrailingComment:A}=as(c,e,n),k=e.transformNode(t.contents),{position:C,documentEndPoint:P}=ls(c,k,e);return e.comments.push(...g,...y),{documentBody:ss(C,k,y),documentEndPoint:P,documentTrailingComment:b,documentHeadTrailingComment:A}}function as(t,e,n){let c=[],g=[],y=[],b=[],A=!1;for(let k=t.contents.length-1;k>=0;k--){let C=t.contents[k];if(C.type==="COMMENT"){let P=e.transformNode(C);n&&n.line===P.position.start.line?b.unshift(P):A?c.unshift(P):P.position.start.offset>=t.valueRange.origEnd?y.unshift(P):c.unshift(P)}else A=!0}if(y.length>1)throw new Error(`Unexpected multiple document trailing comments at ${ot(y[1].position.start)}`);if(b.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${ot(b[1].position.start)}`);return{comments:c,endComments:g,documentTrailingComment:ke(y)||null,documentHeadTrailingComment:ke(b)||null}}function ls(t,e,n){let c=Un(n.text.slice(t.valueRange.origEnd),/^\.\.\./),g=c===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[g-1]==="\r"&&g--;let y=n.transformRange({origStart:e!==null?e.position.start.offset:g,origEnd:g}),b=c===-1?y.end:n.transformOffset(t.valueRange.origEnd+3);return{position:y,documentEndPoint:b}}function us(t,e,n,c){return{...ue("documentHead",t),...Ye(n),...lt(c),children:e}}function cs(t,e){let n=t.cstNode,{directives:c,comments:g,endComments:y}=fs(n,e),{position:b,documentEndMarkererPoint:A}=ps(n,c,e);return e.comments.push(...g,...y),{createDocumentHeadWithTrailingComment:k=>(k&&e.comments.push(k),us(b,c,y,k)),documentHeadEndMarkerPoint:A}}function fs(t,e){let n=[],c=[],g=[],y=!1;for(let b=t.directives.length-1;b>=0;b--){let A=e.transformNode(t.directives[b]);A.type==="comment"?y?c.unshift(A):g.unshift(A):(y=!0,n.unshift(A))}return{directives:n,comments:c,endComments:g}}function ps(t,e,n){let c=Un(n.text.slice(0,t.valueRange.origStart),/---\s*$/);c>0&&!/[\r\n]/.test(n.text[c-1])&&(c=-1);let g=c===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:c,origEnd:c+3};return e.length!==0&&(g.origStart=e[0].position.start.offset),{position:n.transformRange(g),documentEndMarkererPoint:c===-1?null:n.transformOffset(c)}}function ds(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:c}=cs(t,e),{documentBody:g,documentEndPoint:y,documentTrailingComment:b,documentHeadTrailingComment:A}=os(t,e,c),k=n(A);b&&e.comments.push(b);let C=t.cstNode;return is($e(k.position.start,y),!!C.directivesEndMarker,!!C.documentEndMarker,k,g,b)}function Vn(t,e,n){return{...ue("flowCollection",t),..._e(),...Ye(),...e,children:n}}function hs(t,e,n){return{...Vn(t,e,n),type:"flowMapping"}}function Qn(t,e,n){return{...ue("flowMappingItem",t),...qe(),children:[e,n]}}function ut(t,e){let n=[];for(let c of t)c&&"type"in c&&c.type==="COMMENT"?e.comments.push(e.transformNode(c)):n.push(c);return n}function Jn(t){let[e,n]=["?",":"].map(c=>{let g=t.find(y=>"char"in y&&y.char===c);return g?{origStart:g.origOffset,origEnd:g.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Gn(t,e){let n=e;return c=>t.slice(n,n=c)}function Hn(t){let e=[],n=Gn(t,1),c=!1;for(let g=1;g<t.length-1;g++){let y=t[g];if("char"in y&&y.char===","){e.push(n(g)),n(g+1),c=!1;continue}c=!0}return c&&e.push(n(t.length-1)),e}function Xt(t,e){return{...ue("mappingKey",t),...lt(),...Ye(),children:e?[e]:[]}}function Zt(t,e){return{...ue("mappingValue",t),..._e(),...Ye(),children:e?[e]:[]}}function jt(t,e,n,c,g){let y=e.transformNode(t.key),b=e.transformNode(t.value),A=y||c?Xt(e.transformRange({origStart:c?c.origStart:y.position.start.offset,origEnd:y?y.position.end.offset:c.origStart+1}),y):null,k=b||g?Zt(e.transformRange({origStart:g?g.origStart:b.position.start.offset,origEnd:b?b.position.end.offset:g.origStart+1}),b):null;return n($e(A?A.position.start:k.position.start,k?k.position.end:A.position.end),A||Xt(zt(k.position.start),null),k||Zt(zt(A.position.end),null))}function ms(t,e){let n=ut(t.cstNode.items,e),c=Hn(n),g=t.items.map((A,k)=>{let C=c[k],{additionalKeyRange:P,additionalValueRange:F}=Jn(C);return jt(A,e,Qn,P,F)}),y=n[0],b=ke(n);return hs(e.transformRange({origStart:y.origOffset,origEnd:b.origOffset+1}),e.transformContent(t),g)}function gs(t,e,n){return{...Vn(t,e,n),type:"flowSequence"}}function ys(t,e){return{...ue("flowSequenceItem",t),children:[e]}}function vs(t,e){let n=ut(t.cstNode.items,e),c=Hn(n),g=t.items.map((A,k)=>{if(A.type!=="PAIR"){let C=e.transformNode(A);return ys($e(C.position.start,C.position.end),C)}else{let C=c[k],{additionalKeyRange:P,additionalValueRange:F}=Jn(C);return jt(A,e,Qn,P,F)}}),y=n[0],b=ke(n);return gs(e.transformRange({origStart:y.origOffset,origEnd:b.origOffset+1}),e.transformContent(t),g)}function Es(t,e,n){return{...ue("mapping",t),...qe(),...e,children:n}}function Ss(t,e,n){return{...ue("mappingItem",t),...qe(),children:[e,n]}}function bs(t,e){let n=t.cstNode;n.items.filter(b=>b.type==="MAP_KEY"||b.type==="MAP_VALUE").forEach(b=>Wt(b,e));let c=ut(n.items,e),g=ws(c),y=t.items.map((b,A)=>{let k=g[A],[C,P]=k[0].type==="MAP_VALUE"?[null,k[0].range]:[k[0].range,k.length===1?null:k[1].range];return jt(b,e,Ss,C,P)});return Es($e(y[0].position.start,ke(y).position.end),e.transformContent(t),y)}function ws(t){let e=[],n=Gn(t,0),c=!1;for(let g=0;g<t.length;g++){if(t[g].type==="MAP_VALUE"){e.push(n(g+1)),c=!1;continue}c&&e.push(n(g)),c=!0}return c&&e.push(n(1/0)),e}function Os(t,e,n){return{...ue("plain",t),..._e(),...e,value:n}}function Ns(t,e,n){for(let c=e;c>=0;c--)if(n.test(t[c]))return c;return-1}function Ls(t,e){let n=t.cstNode;return Os(e.transformRange({origStart:n.valueRange.origStart,origEnd:Ns(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function As(t){return{...t,type:"quoteDouble"}}function Ms(t,e,n){return{...ue("quoteValue",t),...e,..._e(),value:n}}function zn(t,e){let n=t.cstNode;return Ms(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function Ts(t,e){return As(zn(t,e))}function xs(t){return{...t,type:"quoteSingle"}}function ks(t,e){return xs(zn(t,e))}function Cs(t,e,n){return{...ue("sequence",t),...qe(),...Ye(),...e,children:n}}function Is(t,e){return{...ue("sequenceItem",t),..._e(),...Ye(),children:e?[e]:[]}}function Ps(t,e){let n=ut(t.cstNode.items,e).map((c,g)=>{Wt(c,e);let y=e.transformNode(t.items[g]);return Is($e(e.transformOffset(c.valueRange.origStart),y===null?e.transformOffset(c.valueRange.origStart+1):y.position.end),y)});return Cs($e(n[0].position.start,ke(n).position.end),e.transformContent(t),n)}function $s(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Gi(t,e);case"BLOCK_FOLDED":return Xi(t,e);case"BLOCK_LITERAL":return es(t,e);case"COMMENT":return ts(t,e);case"DIRECTIVE":return rs(t,e);case"DOCUMENT":return ds(t,e);case"FLOW_MAP":return ms(t,e);case"FLOW_SEQ":return vs(t,e);case"MAP":return bs(t,e);case"PLAIN":return Ls(t,e);case"QUOTE_DOUBLE":return Ts(t,e);case"QUOTE_SINGLE":return ks(t,e);case"SEQ":return Ps(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}var gt,Pe,je,Ce,At,Mt,tn,Rs=(tn=class{constructor(t,e){tt(this,Ce);Ue(this,"text");Ue(this,"comments",[]);tt(this,Pe);tt(this,je);this.text=e,ft(this,Pe,t)}setOrigRanges(){if(!Be(this,Pe).setOrigRanges())for(let t of Be(this,Pe))t.setOrigRanges([],0)}transformOffset(t){return Ve(this,Ce,At).call(this,{origStart:t,origEnd:t}).start}transformRange(t){let{start:e,end:n}=Ve(this,Ce,At).call(this,t);return $e(e,n)}transformNode(t){return $s(t,this)}transformContent(t){return qn(t,this)}},Pe=new WeakMap,je=new WeakMap,Ce=new WeakSet,At=function(t){if(!gt){let[y]=Be(this,Pe),b=Object.getPrototypeOf(Object.getPrototypeOf(y));gt=Object.getOwnPropertyDescriptor(b,"rangeAsLinePos").get}if(Be(this,je)??ft(this,je,{root:{context:{src:this.text}}}),this.text===""&&t.origStart===0&&t.origEnd===0)return{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}};let{start:{line:e,col:n},end:{line:c,col:g}}=gt.call({range:{start:Ve(this,Ce,Mt).call(this,t.origStart),end:Ve(this,Ce,Mt).call(this,t.origEnd)},context:Be(this,je)});return{start:{offset:t.origStart,line:e,column:n},end:{offset:t.origEnd,line:c,column:g}}},Mt=function(t){return t<0?0:t>this.text.length?this.text.length:t},tn),_s=Rs;function Ys(t,e,n){let c=new SyntaxError(t);return c.name="YAMLSyntaxError",c.source=e,c.position=n,c}function Bs(t,e){let n=t.source.range||t.source.valueRange;return Ys(t.message,e.text,e.transformRange(n))}function Xn(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(Xn)}return t}function en(t,e,n,c){let g=e(t);return y=>{c(g,y)&&n(t,g=y)}}function Zn(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(Zn),t.type==="document"){let[y,b]=t.children;y.position.start.offset===y.position.end.offset?y.position.start=y.position.end=b.position.start:b.position.start.offset===b.position.end.offset&&(b.position.start=b.position.end=y.position.end)}let n=en(t.position,Ds,Ws,qs),c=en(t.position,js,Fs,Ks);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),c(ke(t.endComments).position.end));let g=e.filter(y=>y!==null);if(g.length!==0){let y=g[0],b=ke(g);n(y.position.start),c(b.position.end),"leadingComments"in y&&y.leadingComments.length!==0&&n(y.leadingComments[0].position.start),"tag"in y&&y.tag&&n(y.tag.position.start),"anchor"in y&&y.anchor&&n(y.anchor.position.start),"trailingComment"in b&&b.trailingComment&&c(b.trailingComment.position.end)}}function Ds(t){return t.start}function Ws(t,e){t.start=e}function js(t){return t.end}function Fs(t,e){t.end=e}function qs(t,e){return e.offset<t.offset}function Ks(t,e){return e.offset>t.offset}function Us(t){let e=Ht.default.parseCST(t),n=new _s(e,t);n.setOrigRanges();let c=e.map(y=>new Ht.default.Document({merge:!1,keepCstNodes:!0}).parse(y));for(let y of c)for(let b of y.errors)if(!(b instanceof Di&&b.message==='Map keys must be unique; "<<" is repeated'))throw Bs(b,n);c.forEach(y=>rt(y.cstNode));let g=Ki(n.transformRange({origStart:0,origEnd:t.length}),c.map(y=>n.transformNode(y)),n.comments);return Wi(g),Zn(g),Xn(g),g}function Vs(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Qs=Vs;function Js(t){try{let e=Us(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Qs(e.message,{loc:e.position,cause:e}):e}}var Gs={astFormat:"yaml",parse:Js,hasPragma:ni,hasIgnorePragma:ri,locStart:Yt,locEnd:hi},er={yaml:Yi},Hs=xt(mn()),tr=Hs.default.parse;exports.__parsePrettierYamlConfig=tr;exports.default=gn;exports.languages=Dn;exports.options=Wn;exports.parsers=Bt;exports.printers=er;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SchemaMeta } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 生成 CloudBase 数据库初始化脚本(创建表及索引)
|
|
5
|
+
* @param schema 表定义对象,格式如 { user: { tableName: 'user', searchIndexes: [...] } }
|
|
6
|
+
* @returns 生成的 TypeScript 代码字符串
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateCloudbaseInitScript(schema: SchemaMeta, outputPath: string, prettier: any, prettierOptions?: object): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SchemaMeta } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 生成 MongoDB 数据库初始化脚本(创建集合及索引)
|
|
5
|
+
* @param schema 表定义对象,格式如 { user: { tableName: 'user', searchIndexes: [...] } }
|
|
6
|
+
* @param outputPath 输出文件路径
|
|
7
|
+
* @param prettierOptions Prettier 格式化选项
|
|
8
|
+
*/
|
|
9
|
+
export declare function generateMongodbInitScript(schema: SchemaMeta, outputPath: string, prettier: any, prettierOptions?: object): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Project } from 'ts-morph';
|
|
2
|
+
import { SchemaMeta, EnumStruct } from '../types/index';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 解析装饰器元数据
|
|
6
|
+
* @param project - ts-morph项目实例
|
|
7
|
+
* @param filePaths - 要解析的文件路径数组
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseDecorators(project: Project, filePaths: string[]): {
|
|
10
|
+
schemaMeta: SchemaMeta;
|
|
11
|
+
tableNames: string[];
|
|
12
|
+
enumList: EnumStruct[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 创建ts-morph项目
|
|
16
|
+
*/
|
|
17
|
+
export declare function createProject(): Project;
|
|
18
|
+
/**
|
|
19
|
+
* 获取Schema目录下的所有TypeScript文件
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSchemaFiles(schemaPath: string): string[];
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cloudbase-index.cjs"),t=require("./mongodb-index.cjs"),n=require("./index2.cjs");exports.createCloudBaseClient=e.createCloudBaseClient;exports.createMongoDBClient=t.createMongoDBClient;exports.generate=n.generate;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import { createCloudBaseClient as
|
|
2
|
-
import { createMongoDBClient as
|
|
3
|
-
|
|
4
|
-
return (e) => {
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
function n() {
|
|
8
|
-
return (t, e) => {
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function p(t) {
|
|
12
|
-
return (e, r) => {
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function i(t) {
|
|
16
|
-
return (e, r) => {
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function a(t) {
|
|
20
|
-
return (e, r) => {
|
|
21
|
-
};
|
|
22
|
-
}
|
|
1
|
+
import { createCloudBaseClient as r } from "./cloudbase-index.js";
|
|
2
|
+
import { createMongoDBClient as a } from "./mongodb-index.js";
|
|
3
|
+
import { generate as f } from "./index2.js";
|
|
23
4
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
o as Table,
|
|
28
|
-
a as UpdatedAt,
|
|
29
|
-
c as createCloudBaseClient,
|
|
30
|
-
g as createMongoDBClient
|
|
5
|
+
r as createCloudBaseClient,
|
|
6
|
+
a as createMongoDBClient,
|
|
7
|
+
f as generate
|
|
31
8
|
};
|