@techdocs/cli 1.5.0-next.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/embedded-app/.config-schema.json +45 -0
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/1032.96cef90d.chunk.js +5 -0
  5. package/dist/embedded-app/static/1032.96cef90d.chunk.js.map +1 -0
  6. package/dist/embedded-app/static/1105.ac144a87.chunk.js +5 -0
  7. package/dist/embedded-app/static/1105.ac144a87.chunk.js.map +1 -0
  8. package/dist/embedded-app/static/184.5623ac15.chunk.js +5 -0
  9. package/dist/embedded-app/static/184.5623ac15.chunk.js.map +1 -0
  10. package/dist/embedded-app/static/2440.240e2610.chunk.js +5 -0
  11. package/dist/embedded-app/static/2440.240e2610.chunk.js.map +1 -0
  12. package/dist/embedded-app/static/2924.b757596e.chunk.js +3 -0
  13. package/dist/embedded-app/static/2924.b757596e.chunk.js.map +1 -0
  14. package/dist/embedded-app/static/3487.bf80060c.chunk.js +5 -0
  15. package/dist/embedded-app/static/3487.bf80060c.chunk.js.map +1 -0
  16. package/dist/embedded-app/static/3893.0eb40023.chunk.js +3 -0
  17. package/dist/embedded-app/static/3893.0eb40023.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/4966.9cb67949.chunk.js +49 -0
  19. package/dist/embedded-app/static/4966.9cb67949.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/5458.f510f1d2.chunk.js +5 -0
  21. package/dist/embedded-app/static/5458.f510f1d2.chunk.js.map +1 -0
  22. package/dist/embedded-app/static/5877.fa5d49bb.chunk.js +6 -0
  23. package/dist/embedded-app/static/5877.fa5d49bb.chunk.js.map +1 -0
  24. package/dist/embedded-app/static/5914.412625b0.chunk.js +3 -0
  25. package/dist/embedded-app/static/5914.412625b0.chunk.js.map +1 -0
  26. package/dist/embedded-app/static/6051.5b06b988.chunk.js +4 -0
  27. package/dist/embedded-app/static/{6051.9a397327.chunk.js.map → 6051.5b06b988.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/7670.dce585cd.chunk.js +3 -0
  29. package/dist/embedded-app/static/{7670.714e8960.chunk.js.map → 7670.dce585cd.chunk.js.map} +1 -1
  30. package/dist/embedded-app/static/7750.f3e35b68.chunk.js +8 -0
  31. package/dist/embedded-app/static/7750.f3e35b68.chunk.js.map +1 -0
  32. package/dist/embedded-app/static/7893.67e0b03f.chunk.js +3 -0
  33. package/dist/embedded-app/static/7893.67e0b03f.chunk.js.map +1 -0
  34. package/dist/embedded-app/static/8629.18b8b029.chunk.js +7 -0
  35. package/dist/embedded-app/static/8629.18b8b029.chunk.js.map +1 -0
  36. package/dist/embedded-app/static/8662.e8af541f.chunk.js +3 -0
  37. package/dist/embedded-app/static/8662.e8af541f.chunk.js.map +1 -0
  38. package/dist/embedded-app/static/8951.b8daca92.chunk.js +3 -0
  39. package/dist/embedded-app/static/8951.b8daca92.chunk.js.map +1 -0
  40. package/dist/embedded-app/static/9545.3ea2318c.chunk.js +5 -0
  41. package/dist/embedded-app/static/9545.3ea2318c.chunk.js.map +1 -0
  42. package/dist/embedded-app/static/9598.c8137318.chunk.js +3 -0
  43. package/dist/embedded-app/static/9598.c8137318.chunk.js.map +1 -0
  44. package/dist/embedded-app/static/967.c3c74dec.chunk.js +15 -0
  45. package/dist/embedded-app/static/967.c3c74dec.chunk.js.map +1 -0
  46. package/dist/embedded-app/static/9770.18f87a62.chunk.js +5 -0
  47. package/dist/embedded-app/static/9770.18f87a62.chunk.js.map +1 -0
  48. package/dist/embedded-app/static/main.04af2edd.js +487 -0
  49. package/dist/embedded-app/static/main.04af2edd.js.map +1 -0
  50. package/dist/embedded-app/static/module-i18next.db8a27ed.js +3 -0
  51. package/dist/embedded-app/static/{module-i18next.3eb80014.js.map → module-i18next.db8a27ed.js.map} +1 -1
  52. package/dist/embedded-app/static/module-lodash.8166f005.js +29 -0
  53. package/dist/embedded-app/static/module-lodash.8166f005.js.map +1 -0
  54. package/dist/embedded-app/static/{module-material-table.1d463a12.js → module-material-table.0f5635dd.js} +2 -2
  55. package/dist/embedded-app/static/{module-material-table.1d463a12.js.map → module-material-table.0f5635dd.js.map} +1 -1
  56. package/dist/embedded-app/static/module-material-ui.1b712255.js +24 -0
  57. package/dist/embedded-app/static/module-material-ui.1b712255.js.map +1 -0
  58. package/dist/embedded-app/static/{module-react-beautiful-dnd.ad887878.js → module-react-beautiful-dnd.62627182.js} +2 -2
  59. package/dist/embedded-app/static/{module-react-beautiful-dnd.ad887878.js.map → module-react-beautiful-dnd.62627182.js.map} +1 -1
  60. package/dist/embedded-app/static/{module-react-dom.bd3fd0c6.js → module-react-dom.07625e59.js} +1 -1
  61. package/dist/embedded-app/static/{module-react-dom.bd3fd0c6.js.map → module-react-dom.07625e59.js.map} +1 -1
  62. package/dist/embedded-app/static/module-react-router-dom.a0f835fd.js +22 -0
  63. package/dist/embedded-app/static/module-react-router-dom.a0f835fd.js.map +1 -0
  64. package/dist/embedded-app/static/module-react-router.8e9755f1.js +22 -0
  65. package/dist/embedded-app/static/module-react-router.8e9755f1.js.map +1 -0
  66. package/dist/embedded-app/static/module-zod.c74c6842.js +3 -0
  67. package/dist/embedded-app/static/module-zod.c74c6842.js.map +1 -0
  68. package/dist/embedded-app/static/{runtime.2d4c0606.js → runtime.04af2edd.js} +2 -2
  69. package/dist/embedded-app/static/runtime.04af2edd.js.map +1 -0
  70. package/dist/embedded-app/static/vendor.04af2edd.js +159 -0
  71. package/dist/embedded-app/static/vendor.04af2edd.js.map +1 -0
  72. package/dist/index.cjs.js +1 -1
  73. package/package.json +6 -6
  74. package/dist/embedded-app/static/1032.f8378b05.chunk.js +0 -3
  75. package/dist/embedded-app/static/1032.f8378b05.chunk.js.map +0 -1
  76. package/dist/embedded-app/static/1093.317a4f39.chunk.js +0 -7
  77. package/dist/embedded-app/static/1093.317a4f39.chunk.js.map +0 -1
  78. package/dist/embedded-app/static/1105.a5f2c603.chunk.js +0 -3
  79. package/dist/embedded-app/static/1105.a5f2c603.chunk.js.map +0 -1
  80. package/dist/embedded-app/static/184.2d07d6cf.chunk.js +0 -3
  81. package/dist/embedded-app/static/184.2d07d6cf.chunk.js.map +0 -1
  82. package/dist/embedded-app/static/2440.c513a311.chunk.js +0 -3
  83. package/dist/embedded-app/static/2440.c513a311.chunk.js.map +0 -1
  84. package/dist/embedded-app/static/5458.f60ece35.chunk.js +0 -3
  85. package/dist/embedded-app/static/5458.f60ece35.chunk.js.map +0 -1
  86. package/dist/embedded-app/static/5837.d9697f2a.chunk.js +0 -3
  87. package/dist/embedded-app/static/5837.d9697f2a.chunk.js.map +0 -1
  88. package/dist/embedded-app/static/6051.9a397327.chunk.js +0 -4
  89. package/dist/embedded-app/static/732.b079cbc6.chunk.js +0 -3
  90. package/dist/embedded-app/static/732.b079cbc6.chunk.js.map +0 -1
  91. package/dist/embedded-app/static/7560.f82352d7.chunk.js +0 -3
  92. package/dist/embedded-app/static/7560.f82352d7.chunk.js.map +0 -1
  93. package/dist/embedded-app/static/7670.714e8960.chunk.js +0 -3
  94. package/dist/embedded-app/static/7750.da1a67d5.chunk.js +0 -8
  95. package/dist/embedded-app/static/7750.da1a67d5.chunk.js.map +0 -1
  96. package/dist/embedded-app/static/8951.d0edcfcb.chunk.js +0 -3
  97. package/dist/embedded-app/static/8951.d0edcfcb.chunk.js.map +0 -1
  98. package/dist/embedded-app/static/9545.24f95d89.chunk.js +0 -3
  99. package/dist/embedded-app/static/9545.24f95d89.chunk.js.map +0 -1
  100. package/dist/embedded-app/static/9770.2fa7c11e.chunk.js +0 -3
  101. package/dist/embedded-app/static/9770.2fa7c11e.chunk.js.map +0 -1
  102. package/dist/embedded-app/static/main.2d4c0606.js +0 -522
  103. package/dist/embedded-app/static/main.2d4c0606.js.map +0 -1
  104. package/dist/embedded-app/static/module-ajv.be583887.js +0 -10
  105. package/dist/embedded-app/static/module-ajv.be583887.js.map +0 -1
  106. package/dist/embedded-app/static/module-i18next.3eb80014.js +0 -3
  107. package/dist/embedded-app/static/module-lodash.4c9a1319.js +0 -29
  108. package/dist/embedded-app/static/module-lodash.4c9a1319.js.map +0 -1
  109. package/dist/embedded-app/static/module-luxon.b1d74b2d.js +0 -3
  110. package/dist/embedded-app/static/module-luxon.b1d74b2d.js.map +0 -1
  111. package/dist/embedded-app/static/module-material-ui.1afbaa53.js +0 -51
  112. package/dist/embedded-app/static/module-material-ui.1afbaa53.js.map +0 -1
  113. package/dist/embedded-app/static/module-octokit.7416db07.js +0 -5
  114. package/dist/embedded-app/static/module-octokit.7416db07.js.map +0 -1
  115. package/dist/embedded-app/static/module-react-router-dom.ef191c8f.js +0 -21
  116. package/dist/embedded-app/static/module-react-router-dom.ef191c8f.js.map +0 -1
  117. package/dist/embedded-app/static/module-react-router.d2e96318.js +0 -21
  118. package/dist/embedded-app/static/module-react-router.d2e96318.js.map +0 -1
  119. package/dist/embedded-app/static/module-yaml.00a97896.js +0 -140
  120. package/dist/embedded-app/static/module-yaml.00a97896.js.map +0 -1
  121. package/dist/embedded-app/static/module-zod.49079951.js +0 -3
  122. package/dist/embedded-app/static/module-zod.49079951.js.map +0 -1
  123. package/dist/embedded-app/static/runtime.2d4c0606.js.map +0 -1
  124. package/dist/embedded-app/static/vendor.2d4c0606.js +0 -213
  125. package/dist/embedded-app/static/vendor.2d4c0606.js.map +0 -1
@@ -1,140 +0,0 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[9035],{10921:function(Qn,js,X){X.d(js,{ZP:function(){return Gn}});var st={};X.r(st),X.d(st,{BOM:function(){return Ze},DOCUMENT:function(){return xe},FLOW_END:function(){return et},SCALAR:function(){return _e},createScalarToken:function(){return Bn},isCollection:function(){return Kn},isScalar:function(){return qn},prettyToken:function(){return Fn},resolveAsScalar:function(){return vn},setScalarValue:function(){return Mn},stringify:function(){return jn},tokenType:function(){return Is},visit:function(){return ee}});var nt={};X.r(nt),X.d(nt,{Alias:function(){return Ce},CST:function(){return st},Composer:function(){return Tt},Document:function(){return me},Lexer:function(){return _s},LineCounter:function(){return $s},Pair:function(){return B},Parser:function(){return Bt},Scalar:function(){return O},Schema:function(){return We},YAMLError:function(){return Nt},YAMLMap:function(){return D},YAMLParseError:function(){return x},YAMLSeq:function(){return H},YAMLWarning:function(){return ms},isAlias:function(){return z},isCollection:function(){return I},isDocument:function(){return ne},isMap:function(){return ie},isNode:function(){return $},isPair:function(){return L},isScalar:function(){return E},isSeq:function(){return re},parse:function(){return Yn},parseAllDocuments:function(){return Vn},parseDocument:function(){return Ps},stringify:function(){return Jn},visit:function(){return Q},visitAsync:function(){return $e}});const it=Symbol.for("yaml.alias"),rt=Symbol.for("yaml.document"),G=Symbol.for("yaml.map"),Mt=Symbol.for("yaml.pair"),Y=Symbol.for("yaml.scalar"),se=Symbol.for("yaml.seq"),K=Symbol.for("yaml.node.type"),z=s=>!!s&&typeof s=="object"&&s[K]===it,ne=s=>!!s&&typeof s=="object"&&s[K]===rt,ie=s=>!!s&&typeof s=="object"&&s[K]===G,L=s=>!!s&&typeof s=="object"&&s[K]===Mt,E=s=>!!s&&typeof s=="object"&&s[K]===Y,re=s=>!!s&&typeof s=="object"&&s[K]===se;function I(s){if(s&&typeof s=="object")switch(s[K]){case G:case se:return!0}return!1}function $(s){if(s&&typeof s=="object")switch(s[K]){case it:case G:case Y:case se:return!0}return!1}const Ds=s=>(E(s)||I(s))&&!!s.anchor,j=Symbol("break visit"),Pt=Symbol("skip children"),V=Symbol("remove node");function Q(s,e){const t=jt(e);ne(s)?oe(null,s.contents,t,Object.freeze([s]))===V&&(s.contents=null):oe(null,s,t,Object.freeze([]))}Q.BREAK=j,Q.SKIP=Pt,Q.REMOVE=V;function oe(s,e,t,n){const i=Dt(s,e,t,n);if($(i)||L(i))return Kt(s,n,i),oe(s,i,t,n);if(typeof i!="symbol"){if(I(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=oe(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===j)return j;o===V&&(e.items.splice(r,1),r-=1)}}}else if(L(e)){n=Object.freeze(n.concat(e));const r=oe("key",e.key,t,n);if(r===j)return j;r===V&&(e.key=null);const o=oe("value",e.value,t,n);if(o===j)return j;o===V&&(e.value=null)}}return i}async function $e(s,e){const t=jt(e);ne(s)?await le(null,s.contents,t,Object.freeze([s]))===V&&(s.contents=null):await le(null,s,t,Object.freeze([]))}$e.BREAK=j,$e.SKIP=Pt,$e.REMOVE=V;async function le(s,e,t,n){const i=await Dt(s,e,t,n);if($(i)||L(i))return Kt(s,n,i),le(s,i,t,n);if(typeof i!="symbol"){if(I(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=await le(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===j)return j;o===V&&(e.items.splice(r,1),r-=1)}}}else if(L(e)){n=Object.freeze(n.concat(e));const r=await le("key",e.key,t,n);if(r===j)return j;r===V&&(e.key=null);const o=await le("value",e.value,t,n);if(o===j)return j;o===V&&(e.value=null)}}return i}function jt(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function Dt(s,e,t,n){var i,r,o,l,a;if(typeof t=="function")return t(s,e,n);if(ie(e))return(i=t.Map)==null?void 0:i.call(t,s,e,n);if(re(e))return(r=t.Seq)==null?void 0:r.call(t,s,e,n);if(L(e))return(o=t.Pair)==null?void 0:o.call(t,s,e,n);if(E(e))return(l=t.Scalar)==null?void 0:l.call(t,s,e,n);if(z(e))return(a=t.Alias)==null?void 0:a.call(t,s,e,n)}function Kt(s,e,t){const n=e[e.length-1];if(I(n))n.items[s]=t;else if(L(n))s==="key"?n.key=t:n.value=t;else if(ne(n))n.contents=t;else{const i=z(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const Ks={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},qs=s=>s.replace(/[!,[\]{}]/g,e=>Ks[e]);class P{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},P.defaultYaml,e),this.tags=Object.assign({},P.defaultTags,t)}clone(){const e=new P(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new P(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:P.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},P.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:P.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},P.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,n,i]=e.match(/^(.*!)([^!]*)$/);i||t(`The ${e} tag has no suffix`);const r=this.tags[n];return r?r+decodeURIComponent(i):n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+qs(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&$(e.contents)){const r={};Q(e.contents,(o,l)=>{$(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
2
- `)}}P.defaultYaml={explicit:!1,version:"1.2"},P.defaultTags={"!!":"tag:yaml.org,2002:"};function qt(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Ft(s){const e=new Set;return Q(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Ut(s,e){for(let t=1;;++t){const n=`${s}${t}`;if(!e.has(n))return n}}function Fs(s,e){const t=[],n=new Map;let i=null;return{onAnchor:r=>{t.push(r),i||(i=Ft(s));const o=Ut(e,i);return i.add(o),o},setAnchors:()=>{for(const r of t){const o=n.get(r);if(typeof o=="object"&&o.anchor&&(E(o.node)||I(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function ae(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){const o=n[i],l=ae(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(const i of Array.from(n.keys())){const r=n.get(i),o=ae(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(const i of Array.from(n)){const r=ae(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(const[i,r]of Object.entries(n)){const o=ae(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}function q(s,e,t){if(Array.isArray(s))return s.map((n,i)=>q(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Ds(s))return s.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};const i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!(t!=null&&t.keep)?Number(s):s}class ot{constructor(e){Object.defineProperty(this,K,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!ne(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=q(this,"",o);if(typeof i=="function")for(const{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?ae(r,{"":l},"",l):l}}class Ce extends ot{constructor(e){super(it),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Q(e,{Node:(n,i)=>{if(i===this)return Q.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i);if(!o){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(q(o,null,t),l=n.get(o)),!l||l.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=ve(i,o,n)),l.count*l.aliasCount>r)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(qt(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}}function ve(s,e,t){if(z(e)){const n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(I(e)){let n=0;for(const i of e.items){const r=ve(s,i,t);r>n&&(n=r)}return n}else if(L(e)){const n=ve(s,e.key,t),i=ve(s,e.value,t);return Math.max(n,i)}return 1}const Rt=s=>!s||typeof s!="function"&&typeof s!="object";class O extends ot{constructor(e){super(Y),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:q(this.value,e,t)}toString(){return String(this.value)}}O.BLOCK_FOLDED="BLOCK_FOLDED",O.BLOCK_LITERAL="BLOCK_LITERAL",O.PLAIN="PLAIN",O.QUOTE_DOUBLE="QUOTE_DOUBLE",O.QUOTE_SINGLE="QUOTE_SINGLE";const Us="tag:yaml.org,2002:";function Rs(s,e,t){var n;if(e){const i=t.filter(o=>o.tag===e),r=(n=i.find(o=>!o.format))!=null?n:i[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,s))&&!i.format})}function Se(s,e,t){var u,p,f;if(ne(s)&&(s=s.contents),$(s))return s;if(L(s)){const y=(p=(u=t.schema[G]).createNode)==null?void 0:p.call(u,t.schema,null,t);return y.items.push(s),y}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt!="undefined"&&s instanceof BigInt)&&(s=s.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t;let a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor||(a.anchor=i(s)),new Ce(a.anchor);a={anchor:null,node:null},l.set(s,a)}e!=null&&e.startsWith("!!")&&(e=Us+e.slice(2));let c=Rs(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){const y=new O(s);return a&&(a.node=y),y}c=s instanceof Map?o[G]:Symbol.iterator in Object(s)?o[se]:o[G]}r&&(r(c),delete t.onTagObj);const h=c!=null&&c.createNode?c.createNode(t.schema,s,t):typeof((f=c==null?void 0:c.nodeClass)==null?void 0:f.from)=="function"?c.nodeClass.from(t.schema,s,t):new O(s);return e?h.tag=e:c.default||(h.tag=c.tag),a&&(a.node=h),h}function Be(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Se(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}const ke=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done;class Me extends ot{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>$(n)||L(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ke(e))this.add(t);else{const[n,...i]=e,r=this.get(n,!0);if(I(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Be(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const i=this.get(t,!0);if(I(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&E(r)?r.value:r:I(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!L(t))return!1;const n=t.value;return n==null||e&&E(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const i=this.get(t,!0);return I(i)?i.hasIn(n):!1}setIn(e,t){const[n,...i]=e;if(i.length===0)this.set(n,t);else{const r=this.get(n,!0);if(I(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Be(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}Me.maxFlowStringSingleLineLength=60;const Vs=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function J(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}const W=(s,e,t)=>s.endsWith(`
3
- `)?J(t,e):t.includes(`
4
- `)?`
5
- `+J(t,e):(s.endsWith(" ")?"":" ")+t,Vt="flow",lt="block",Pe="quoted";function je(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return s;const a=Math.max(1+r,1+i-e.length);if(s.length<=a)return s;const c=[],h={};let u=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):u=i-n);let p,f,y=!1,d=-1,m=-1,w=-1;t===lt&&(d=Yt(s,d),d!==-1&&(u=d+a));for(let k;k=s[d+=1];){if(t===Pe&&k==="\\"){switch(m=d,s[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}w=d}if(k===`
6
- `)t===lt&&(d=Yt(s,d)),u=d+a,p=void 0;else{if(k===" "&&f&&f!==" "&&f!==`
7
- `&&f!==" "){const S=s[d+1];S&&S!==" "&&S!==`
8
- `&&S!==" "&&(p=d)}if(d>=u)if(p)c.push(p),u=p+a,p=void 0;else if(t===Pe){for(;f===" "||f===" ";)f=k,k=s[d+=1],y=!0;const S=d>w+1?d-2:m-1;if(h[S])return s;c.push(S),h[S]=!0,u=S+a,p=void 0}else y=!0}f=k}if(y&&l&&l(),c.length===0)return s;o&&o();let b=s.slice(0,c[0]);for(let k=0;k<c.length;++k){const S=c[k],N=c[k+1]||s.length;S===0?b=`
9
- ${e}${s.slice(0,N)}`:(t===Pe&&h[S]&&(b+=`${s[S]}\\`),b+=`
10
- ${e}${s.slice(S+1,N)}`)}return b}function Yt(s,e){let t=s[e+1];for(;t===" "||t===" ";){do t=s[e+=1];while(t&&t!==`
11
- `);t=s[e+1]}return e}const De=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),Ke=s=>/^(%|---|\.\.\.)/m.test(s);function Ys(s,e,t){if(!e||e<0)return!1;const n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
12
- `){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}function Ne(s,e){const t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(Ke(s)?" ":"");let o="",l=0;for(let a=0,c=t[a];c;c=t[++a])if(c===" "&&t[a+1]==="\\"&&t[a+2]==="n"&&(o+=t.slice(l,a)+"\\ ",a+=1,l=a,c="\\"),c==="\\")switch(t[a+1]){case"u":{o+=t.slice(l,a);const h=t.substr(a+2,4);switch(h){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:h.substr(0,2)==="00"?o+="\\x"+h.substr(2):o+=t.substr(a,6)}a+=5,l=a+1}break;case"n":if(n||t[a+2]==='"'||t.length<i)a+=1;else{for(o+=t.slice(l,a)+`
13
-
14
- `;t[a+2]==="\\"&&t[a+3]==="n"&&t[a+4]!=='"';)o+=`
15
- `,a+=2;o+=r,t[a+2]===" "&&(o+="\\"),a+=1,l=a+1}break;default:a+=1}return o=l?o+t.slice(l):t,n?o:je(o,r,Pe,De(e,!1))}function at(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test(s))return Ne(s,e);const t=e.indent||(Ke(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${t}`)+"'";return e.implicitKey?n:je(n,t,Vt,De(e,!1))}function ce(s,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=Ne;else{const i=s.includes('"'),r=s.includes("'");i&&!r?n=at:r&&!i?n=Ne:n=t?at:Ne}return n(s,e)}let ct;try{ct=new RegExp(`(^|(?<!
18
- ))
19
- +(?!
20
- |$)`,"g")}catch{ct=/\n+(?!\n|$)/g}function qe({comment:s,type:e,value:t},n,i,r){const{blockQuote:o,commentString:l,lineWidth:a}=n.options;if(!o||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return ce(t,n);const c=n.indent||(n.forceBlockIndent||Ke(t)?" ":""),h=o==="literal"?!0:o==="folded"||e===O.BLOCK_FOLDED?!1:e===O.BLOCK_LITERAL?!0:!Ys(t,a,c.length);if(!t)return h?`|
21
- `:`>
22
- `;let u,p;for(p=t.length;p>0;--p){const g=t[p-1];if(g!==`
23
- `&&g!==" "&&g!==" ")break}let f=t.substring(p);const y=f.indexOf(`
24
- `);y===-1?u="-":t===f||y!==f.length-1?(u="+",r&&r()):u="",f&&(t=t.slice(0,-f.length),f[f.length-1]===`
25
- `&&(f=f.slice(0,-1)),f=f.replace(ct,`$&${c}`));let d=!1,m,w=-1;for(m=0;m<t.length;++m){const g=t[m];if(g===" ")d=!0;else if(g===`
26
- `)w=m;else break}let b=t.substring(0,w<m?w+1:m);b&&(t=t.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let S=(h?"|":">")+(d?c?"2":"1":"")+u;if(s&&(S+=" "+l(s.replace(/ ?[\r\n]+/g," ")),i&&i()),h)return t=t.replace(/\n+/g,`$&${c}`),`${S}
27
- ${c}${b}${t}${f}`;t=t.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const N=je(`${b}${t}${f}`,c,lt,De(n,!0));return`${S}
29
- ${c}${N}`}function Js(s,e,t,n){const{type:i,value:r}=s,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:h}=e;if(l&&r.includes(`
30
- `)||h&&/[[\]{},]/.test(r))return ce(r,e);if(!r||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||h||!r.includes(`
31
- `)?ce(r,e):qe(s,e,t,n);if(!l&&!h&&i!==O.PLAIN&&r.includes(`
32
- `))return qe(s,e,t,n);if(Ke(r)){if(a==="")return e.forceBlockIndent=!0,qe(s,e,t,n);if(l&&a===c)return ce(r,e)}const u=r.replace(/\n+/g,`$&
33
- ${a}`);if(o){const p=d=>{var m;return d.default&&d.tag!=="tag:yaml.org,2002:str"&&((m=d.test)==null?void 0:m.test(u))},{compat:f,tags:y}=e.doc.schema;if(y.some(p)||f!=null&&f.some(p))return ce(r,e)}return l?u:je(u,a,Vt,De(e,!1))}function Oe(s,e,t,n){const{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)});let{type:l}=s;l!==O.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=O.QUOTE_DOUBLE);const a=h=>{switch(h){case O.BLOCK_FOLDED:case O.BLOCK_LITERAL:return i||r?ce(o.value,e):qe(o,e,t,n);case O.QUOTE_DOUBLE:return Ne(o.value,e);case O.QUOTE_SINGLE:return at(o.value,e);case O.PLAIN:return Js(o,e,t,n);default:return null}};let c=a(l);if(c===null){const{defaultKeyType:h,defaultStringType:u}=e.options,p=i&&h||u;if(c=a(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function Jt(s,e){const t=Object.assign({blockQuote:!0,commentString:Vs,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},s.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Gs(s,e){var i,r,o,l;if(e.tag){const a=s.filter(c=>c.tag===e.tag);if(a.length>0)return(i=a.find(c=>c.format===e.format))!=null?i:a[0]}let t,n;if(E(e)){n=e.value;const a=s.filter(c=>{var h;return(h=c.identify)==null?void 0:h.call(c,n)});t=(r=a.find(c=>c.format===e.format))!=null?r:a.find(c=>!c.format)}else n=e,t=s.find(a=>a.nodeClass&&n instanceof a.nodeClass);if(!t){const a=(l=(o=n==null?void 0:n.constructor)==null?void 0:o.name)!=null?l:typeof n;throw new Error(`Tag not resolved for ${a} value`)}return t}function Qs(s,e,{anchors:t,doc:n}){if(!n.directives)return"";const i=[],r=(E(s)||I(s))&&s.anchor;r&&qt(r)&&(t.add(r),i.push(`&${r}`));const o=s.tag?s.tag:e.default?null:e.tag;return o&&i.push(n.directives.tagString(o)),i.join(" ")}function fe(s,e,t,n){var a,c;if(L(s))return s.toString(e,t,n);if(z(s)){if(e.doc.directives)return s.toString(e);if((a=e.resolvedAliases)!=null&&a.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i;const r=$(s)?s:e.doc.createNode(s,{onTagObj:h=>i=h});i||(i=Gs(e.doc.schema.tags,r));const o=Qs(r,i,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);const l=typeof i.stringify=="function"?i.stringify(r,e,t,n):E(r)?Oe(r,e,t,n):r.toString(e,t,n);return o?E(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
34
- ${e.indent}${l}`:l}function Ws({key:s,value:e},t,n,i){var T,A;const{allNullValues:r,doc:o,indent:l,indentStep:a,options:{commentString:c,indentSeq:h,simpleKeys:u}}=t;let p=$(s)&&s.comment||null;if(u){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(I(s)){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let f=!u&&(!s||p&&e==null&&!t.inFlow||I(s)||(E(s)?s.type===O.BLOCK_FOLDED||s.type===O.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!f&&(u||!r),indent:l+a});let y=!1,d=!1,m=fe(s,t,()=>y=!0,()=>d=!0);if(!f&&!t.inFlow&&m.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(t.inFlow){if(r||e==null)return y&&n&&n(),m===""?"?":f?`? ${m}`:m}else if(r&&!u||e==null&&f)return m=`? ${m}`,p&&!y?m+=W(m,t.indent,c(p)):d&&i&&i(),m;y&&(p=null),f?(p&&(m+=W(m,t.indent,c(p))),m=`? ${m}
35
- ${l}:`):(m=`${m}:`,p&&(m+=W(m,t.indent,c(p))));let w,b,k;$(e)?(w=!!e.spaceBefore,b=e.commentBefore,k=e.comment):(w=!1,b=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!f&&!p&&E(e)&&(t.indentAtStart=m.length+1),d=!1,!h&&a.length>=2&&!t.inFlow&&!f&&re(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1;const N=fe(e,t,()=>S=!0,()=>d=!0);let g=" ";if(p||w||b){if(g=w?`
36
- `:"",b){const C=c(b);g+=`
37
- ${J(C,t.indent)}`}N===""&&!t.inFlow?g===`
38
- `&&(g=`
39
-
40
- `):g+=`
41
- ${t.indent}`}else if(!f&&I(e)){const C=N[0],_=N.indexOf(`
42
- `),M=_!==-1,te=(A=(T=t.inFlow)!=null?T:e.flow)!=null?A:e.items.length===0;if(M||!te){let we=!1;if(M&&(C==="&"||C==="!")){let v=N.indexOf(" ");C==="&"&&v!==-1&&v<_&&N[v+1]==="!"&&(v=N.indexOf(" ",v+1)),(v===-1||_<v)&&(we=!0)}we||(g=`
43
- ${t.indent}`)}}else(N===""||N[0]===`
44
- `)&&(g="");return m+=g+N,t.inFlow?S&&n&&n():k&&!S?m+=W(m,t.indent,c(k)):d&&i&&i(),m}var ft=X(34406);function Wn(s,...e){s==="debug"&&console.log(...e)}function Gt(s,e){(s==="debug"||s==="warn")&&(typeof ft!="undefined"&&ft.emitWarning?ft.emitWarning(e):console.warn(e))}const Qt="<<";function Wt(s,e,{key:t,value:n}){if(s!=null&&s.doc.schema.merge&&Hs(t))if(n=z(n)?n.resolve(s.doc):n,re(n))for(const i of n.items)ut(s,e,i);else if(Array.isArray(n))for(const i of n)ut(s,e,i);else ut(s,e,n);else{const i=q(t,"",s);if(e instanceof Map)e.set(i,q(n,i,s));else if(e instanceof Set)e.add(i);else{const r=Xs(t,i,s),o=q(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}const Hs=s=>s===Qt||E(s)&&s.value===Qt&&(!s.type||s.type===O.PLAIN);function ut(s,e,t){const n=s&&z(t)?t.resolve(s.doc):t;if(!ie(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,s,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function Xs(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if($(s)&&(t!=null&&t.doc)){const n=Jt(t.doc,{});n.anchors=new Set;for(const r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;const i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),Gt(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function ht(s,e,t){const n=Se(s,void 0,t),i=Se(e,void 0,t);return new B(n,i)}class B{constructor(e,t=null){Object.defineProperty(this,K,{value:Mt}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return $(t)&&(t=t.clone(e)),$(n)&&(n=n.clone(e)),new B(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return Wt(t,n,this)}toString(e,t,n){return e!=null&&e.doc?Ws(this,e,t,n):JSON.stringify(this)}}function Ht(s,e,t){var r;return(((r=e.inFlow)!=null?r:s.flow)?Zs:zs)(s,e,t)}function zs({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){const{indent:a,options:{commentString:c}}=t,h=Object.assign({},t,{indent:r,type:null});let u=!1;const p=[];for(let y=0;y<e.length;++y){const d=e[y];let m=null;if($(d))!u&&d.spaceBefore&&p.push(""),Fe(t,p,d.commentBefore,u),d.comment&&(m=d.comment);else if(L(d)){const b=$(d.key)?d.key:null;b&&(!u&&b.spaceBefore&&p.push(""),Fe(t,p,b.commentBefore,u))}u=!1;let w=fe(d,h,()=>m=null,()=>u=!0);m&&(w+=W(w,r,c(m))),u&&m&&(u=!1),p.push(n+w)}let f;if(p.length===0)f=i.start+i.end;else{f=p[0];for(let y=1;y<p.length;++y){const d=p[y];f+=d?`
45
- ${a}${d}`:`
46
- `}}return s?(f+=`
47
- `+J(c(s),a),l&&l()):u&&o&&o(),f}function Zs({comment:s,items:e},t,{flowChars:n,itemIndent:i,onComment:r}){const{indent:o,indentStep:l,flowCollectionPadding:a,options:{commentString:c}}=t;i+=l;const h=Object.assign({},t,{indent:i,inFlow:!0,type:null});let u=!1,p=0;const f=[];for(let w=0;w<e.length;++w){const b=e[w];let k=null;if($(b))b.spaceBefore&&f.push(""),Fe(t,f,b.commentBefore,!1),b.comment&&(k=b.comment);else if(L(b)){const N=$(b.key)?b.key:null;N&&(N.spaceBefore&&f.push(""),Fe(t,f,N.commentBefore,!1),N.comment&&(u=!0));const g=$(b.value)?b.value:null;g?(g.comment&&(k=g.comment),g.commentBefore&&(u=!0)):b.value==null&&(N!=null&&N.comment)&&(k=N.comment)}k&&(u=!0);let S=fe(b,h,()=>k=null);w<e.length-1&&(S+=","),k&&(S+=W(S,i,c(k))),!u&&(f.length>p||S.includes(`
48
- `))&&(u=!0),f.push(S),p=f.length}let y;const{start:d,end:m}=n;if(f.length===0)y=d+m;else if(u||(u=f.reduce((b,k)=>b+k.length+2,2)>Me.maxFlowStringSingleLineLength),u){y=d;for(const w of f)y+=w?`
49
- ${l}${o}${w}`:`
50
- `;y+=`
51
- ${o}${m}`}else y=`${d}${a}${f.join(" ")}${a}${m}`;return s&&(y+=W(y,o,c(s)),r&&r()),y}function Fe({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const r=J(e(n),s);t.push(r.trimStart())}}function Z(s,e){const t=E(e)?e.value:e;for(const n of s)if(L(n)&&(n.key===e||n.key===t||E(n.key)&&n.key.value===t))return n}class D extends Me{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(G,e),this.items=[]}static from(e,t,n){const{keepUndefined:i,replacer:r}=n,o=new this(e),l=(a,c)=>{if(typeof r=="function")c=r.call(t,a,c);else if(Array.isArray(r)&&!r.includes(a))return;(c!==void 0||i)&&o.items.push(ht(a,c,n))};if(t instanceof Map)for(const[a,c]of t)l(a,c);else if(t&&typeof t=="object")for(const a of Object.keys(t))l(a,t[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let n;L(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new B(e,e==null?void 0:e.value):n=new B(e.key,e.value);const i=Z(this.items,n.key),r=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);E(i.value)&&Rt(n.value)?i.value.value=n.value:i.value=n.value}else if(r){const l=this.items.findIndex(a=>r(n,a)<0);l===-1?this.items.push(n):this.items.splice(l,0,n)}else this.items.push(n)}delete(e){const t=Z(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var r;const n=Z(this.items,e),i=n==null?void 0:n.value;return(r=!t&&E(i)?i.value:i)!=null?r:void 0}has(e){return!!Z(this.items,e)}set(e,t){this.add(new B(e,t),!0)}toJSON(e,t,n){const i=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(i);for(const r of this.items)Wt(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(const i of this.items)if(!L(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ht(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const ue={collection:"map",default:!0,nodeClass:D,tag:"tag:yaml.org,2002:map",resolve(s,e){return ie(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>D.from(s,e,t)};class H extends Me{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(se,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ue(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=Ue(e);if(typeof n!="number")return;const i=this.items[n];return!t&&E(i)?i.value:i}has(e){const t=Ue(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=Ue(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];E(i)&&Rt(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let i=0;for(const r of this.items)n.push(q(r,String(i++),t));return n}toString(e,t,n){return e?Ht(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){const a=t instanceof Set?l:String(o++);l=i.call(t,a,l)}r.items.push(Se(l,void 0,n))}}return r}}function Ue(s){let e=E(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const he={collection:"seq",default:!0,nodeClass:H,tag:"tag:yaml.org,2002:seq",resolve(s,e){return re(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>H.from(s,e,t)},Re={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),Oe(s,e,t,n)}},Ve={identify:s=>s==null,createNode:()=>new O(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new O(null),stringify:({source:s},e)=>typeof s=="string"&&Ve.test.test(s)?s:e.options.nullStr},dt={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new O(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&dt.test.test(s)){const n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};function U({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}const Xt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U},zt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){const e=Number(s.value);return isFinite(e)?e.toExponential():U(s)}},Zt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){const e=new O(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:U},Ye=s=>typeof s=="bigint"||Number.isInteger(s),pt=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function xt(s,e,t){const{value:n}=s;return Ye(n)&&n>=0?t+n.toString(e):U(s)}const es={identify:s=>Ye(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>pt(s,2,8,t),stringify:s=>xt(s,8,"0o")},ts={identify:Ye,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>pt(s,0,10,t),stringify:U},ss={identify:s=>Ye(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>pt(s,2,16,t),stringify:s=>xt(s,16,"0x")},xs=[ue,he,Re,Ve,dt,es,ts,ss,Xt,zt,Zt];function ns(s){return typeof s=="bigint"||Number.isInteger(s)}const Je=({value:s})=>JSON.stringify(s),en=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:Je},{identify:s=>s==null,createNode:()=>new O(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Je},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:s=>s==="true",stringify:Je},{identify:ns,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>ns(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:Je}],tn={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},sn=[ue,he].concat(en,tn);var Ae=X(48834).lW;const mt={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Ae=="function")return Ae.from(s,"base64");if(typeof atob=="function"){const t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){const o=t;let l;if(typeof Ae=="function")l=o instanceof Ae?o.toString("base64"):Ae.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<o.length;++c)a+=String.fromCharCode(o[c]);l=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.BLOCK_LITERAL),e!==O.QUOTE_DOUBLE){const a=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(l.length/a),h=new Array(c);for(let u=0,p=0;u<c;++u,p+=a)h[u]=l.substr(p,a);l=h.join(e===O.BLOCK_LITERAL?`
52
- `:" ")}return Oe({comment:s,type:e,value:l},n,i,r)}};function is(s,e){var t;if(re(s))for(let n=0;n<s.items.length;++n){let i=s.items[n];if(!L(i)){if(ie(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");const r=i.items[0]||new B(new O(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
53
- ${r.key.commentBefore}`:i.commentBefore),i.comment){const o=(t=r.value)!=null?t:r.key;o.comment=o.comment?`${i.comment}
54
- ${o.comment}`:i.comment}i=r}s.items[n]=L(i)?i:new B(i)}}else e("Expected a sequence for this tag");return s}function rs(s,e,t){const{replacer:n}=t,i=new H(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else l=o;i.items.push(ht(l,a,t))}return i}const yt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:is,createNode:rs};class de extends H{constructor(){super(),this.add=D.prototype.add.bind(this),this.delete=D.prototype.delete.bind(this),this.get=D.prototype.get.bind(this),this.has=D.prototype.has.bind(this),this.set=D.prototype.set.bind(this),this.tag=de.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const i of this.items){let r,o;if(L(i)?(r=q(i.key,"",t),o=q(i.value,r,t)):r=q(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){const i=rs(e,t,n),r=new this;return r.items=i.items,r}}de.tag="tag:yaml.org,2002:omap";const gt={collection:"seq",identify:s=>s instanceof Map,nodeClass:de,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){const t=is(s,e),n=[];for(const{key:i}of t.items)E(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new de,t)},createNode:(s,e,t)=>de.from(s,e,t)};function os({value:s,source:e},t){return e&&(s?ls:as).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}const ls={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new O(!0),stringify:os},as={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new O(!1),stringify:os},nn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U},rn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){const e=Number(s.value);return isFinite(e)?e.toExponential():U(s)}},on={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){const e=new O(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){const n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:U},Ee=s=>typeof s=="bigint"||Number.isInteger(s);function Ge(s,e,t,{intAsBigInt:n}){const i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}const o=BigInt(s);return i==="-"?BigInt(-1)*o:o}const r=parseInt(s,t);return i==="-"?-1*r:r}function bt(s,e,t){const{value:n}=s;if(Ee(n)){const i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return U(s)}const ln={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>Ge(s,2,2,t),stringify:s=>bt(s,2,"0b")},an={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>Ge(s,1,8,t),stringify:s=>bt(s,8,"0")},cn={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>Ge(s,0,10,t),stringify:U},fn={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>Ge(s,2,16,t),stringify:s=>bt(s,16,"0x")};class pe extends D{constructor(e){super(e),this.tag=pe.tag}add(e){let t;L(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new B(e.key,null):t=new B(e,null),Z(this.items,t.key)||this.items.push(t)}get(e,t){const n=Z(this.items,e);return!t&&L(n)?E(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=Z(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new B(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(ht(o,null,n));return r}}pe.tag="tag:yaml.org,2002:set";const wt={collection:"map",identify:s=>s instanceof Set,nodeClass:pe,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>pe.from(s,e,t),resolve(s,e){if(ie(s)){if(s.hasAllNullValues(!0))return Object.assign(new pe,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};function St(s,e){const t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,l)=>o*i(60)+i(l),i(0));return t==="-"?i(-1)*r:r}function cs(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return U(s);let n="";e<0&&(n="-",e*=t(-1));const i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const fs={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>St(s,t),stringify:cs},us={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>St(s,!1),stringify:cs},Qe={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){const e=s.match(Qe.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,i,r,o,l]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,n-1,i,r||0,o||0,l||0,a);const h=e[8];if(h&&h!=="Z"){let u=St(h,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:s})=>s.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},hs=[ue,he,Re,Ve,ls,as,ln,an,cn,fn,nn,rn,on,mt,gt,yt,wt,fs,us,Qe],ds=new Map([["core",xs],["failsafe",[ue,he,Re]],["json",sn],["yaml11",hs],["yaml-1.1",hs]]),ps={binary:mt,bool:dt,float:Zt,floatExp:zt,floatNaN:Xt,floatTime:us,int:ts,intHex:ss,intOct:es,intTime:fs,map:ue,null:Ve,omap:gt,pairs:yt,seq:he,set:wt,timestamp:Qe},un={"tag:yaml.org,2002:binary":mt,"tag:yaml.org,2002:omap":gt,"tag:yaml.org,2002:pairs":yt,"tag:yaml.org,2002:set":wt,"tag:yaml.org,2002:timestamp":Qe};function kt(s,e){let t=ds.get(e);if(!t)if(Array.isArray(s))t=[];else{const n=Array.from(ds.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`)}if(Array.isArray(s))for(const n of s)t=t.concat(n);else typeof s=="function"&&(t=s(t.slice()));return t.map(n=>{if(typeof n!="string")return n;const i=ps[n];if(i)return i;const r=Object.keys(ps).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${r}`)})}const hn=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0;class We{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?kt(e,"compat"):e?kt(null,e):null,this.merge=!!n,this.name=typeof r=="string"&&r||"core",this.knownTags=i?un:{},this.tags=kt(t,this.name),this.toStringOptions=l!=null?l:null,Object.defineProperty(this,G,{value:ue}),Object.defineProperty(this,Y,{value:Re}),Object.defineProperty(this,se,{value:he}),this.sortMapEntries=typeof o=="function"?o:o===!0?hn:null}clone(){const e=Object.create(We.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function dn(s,e){var a;const t=[];let n=e.directives===!0;if(e.directives!==!1&&s.directives){const c=s.directives.toString(s);c?(t.push(c),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");const i=Jt(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");const c=r(s.commentBefore);t.unshift(J(c,""))}let o=!1,l=null;if(s.contents){if($(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){const u=r(s.contents.commentBefore);t.push(J(u,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}const c=l?void 0:()=>o=!0;let h=fe(s.contents,i,()=>l=null,c);l&&(h+=W(h,"",r(l))),(h[0]==="|"||h[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${h}`:t.push(h)}else t.push(fe(s.contents,i));if((a=s.directives)!=null&&a.docEnd)if(s.comment){const c=r(s.comment);c.includes(`
55
- `)?(t.push("..."),t.push(J(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=s.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(J(r(c),"")))}return t.join(`
56
- `)+`
57
- `}class me{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,K,{value:rt});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new P({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){const e=Object.create(me.prototype,{[K]:{value:rt}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=$(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ye(this.contents)&&this.contents.add(e)}addIn(e,t){ye(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=Ft(this);e.anchor=!t||n.has(t)?Ut(t||"a",n):t}return new Ce(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const m=b=>typeof b=="number"||b instanceof String||b instanceof Number,w=t.filter(m).map(String);w.length>0&&(t=t.concat(w)),i=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:h}=n!=null?n:{},{onAnchor:u,setAnchors:p,sourceObjects:f}=Fs(this,o||"a"),y={aliasDuplicateObjects:r!=null?r:!0,keepUndefined:a!=null?a:!1,onAnchor:u,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:f},d=Se(e,h,y);return l&&I(d)&&(d.flow=!0),p(),d}createPair(e,t,n={}){const i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new B(i,r)}delete(e){return ye(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ke(e)?this.contents==null?!1:(this.contents=null,!0):ye(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return I(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ke(e)?!t&&E(this.contents)?this.contents.value:this.contents:I(this.contents)?this.contents.getIn(e,t):void 0}has(e){return I(this.contents)?this.contents.has(e):!1}hasIn(e){return ke(e)?this.contents!==void 0:I(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Be(this.schema,[e],t):ye(this.contents)&&this.contents.set(e,t)}setIn(e,t){ke(e)?this.contents=t:this.contents==null?this.contents=Be(this.schema,Array.from(e),t):ye(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new P({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new P({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new We(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){const l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=q(this.contents,t!=null?t:"",l);if(typeof r=="function")for(const{count:c,res:h}of l.anchors.values())r(h,c);return typeof o=="function"?ae(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return dn(this,e)}}function ye(s){if(I(s))return!0;throw new Error("Expected a YAML collection as document contents")}class Nt extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}}class x extends Nt{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class ms extends Nt{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const He=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));const{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const l=Math.min(r-39,o.length-79);o="\u2026"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
58
- `),o=l+o}if(/[^ ]/.test(o)){let l=1;const a=t.linePos[1];a&&a.line===n&&a.col>i&&(l=Math.max(1,Math.min(a.col-i,80-r)));const c=" ".repeat(r)+"^".repeat(l);t.message+=`:
59
-
60
- ${o}
61
- ${c}
62
- `}};function ge(s,{flow:e,indicator:t,next:n,offset:i,onError:r,startOnNewline:o}){let l=!1,a=o,c=o,h="",u="",p=!1,f=!1,y=!1,d=null,m=null,w=null,b=null,k=null;for(const g of s)switch(y&&(g.type!=="space"&&g.type!=="newline"&&g.type!=="comma"&&r(g.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),g.type){case"space":!e&&a&&t!=="doc-start"&&g.source[0]===" "&&r(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const T=g.source.substring(1)||" ";h?h+=u+T:h=T,u="",a=!1;break}case"newline":a?h?h+=g.source:l=!0:u+=g.source,a=!0,p=!0,(d||m)&&(f=!0),c=!0;break;case"anchor":d&&r(g,"MULTIPLE_ANCHORS","A node can have at most one anchor"),g.source.endsWith(":")&&r(g.offset+g.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),d=g,k===null&&(k=g.offset),a=!1,c=!1,y=!0;break;case"tag":{m&&r(g,"MULTIPLE_TAGS","A node can have at most one tag"),m=g,k===null&&(k=g.offset),a=!1,c=!1,y=!0;break}case t:(d||m)&&r(g,"BAD_PROP_ORDER",`Anchors and tags must be after the ${g.source} indicator`),b&&r(g,"UNEXPECTED_TOKEN",`Unexpected ${g.source} in ${e!=null?e:"collection"}`),b=g,a=!1,c=!1;break;case"comma":if(e){w&&r(g,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=g,a=!1,c=!1;break}default:r(g,"UNEXPECTED_TOKEN",`Unexpected ${g.type} token`),a=!1,c=!1}const S=s[s.length-1],N=S?S.offset+S.source.length:i;return y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:w,found:b,spaceBefore:l,comment:h,hasNewline:p,hasNewlineAfterProp:f,anchor:d,tag:m,end:N,start:k!=null?k:N}}function Le(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
63
- `))return!0;if(s.end){for(const e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of s.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Le(e.key)||Le(e.value))return!0}return!1;default:return!0}}function Ot(s,e,t){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&Le(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function ys(s,e,t){const{uniqueKeys:n}=s.options;if(n===!1)return!1;const i=typeof n=="function"?n:(r,o)=>r===o||E(r)&&E(o)&&r.value===o.value&&!(r.value==="<<"&&s.schema.merge);return e.some(r=>i(r.key,t))}const gs="All mapping items must start at the same column";function pn({composeNode:s,composeEmptyNode:e},t,n,i,r){var h,u;const o=(h=r==null?void 0:r.nodeClass)!=null?h:D,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(const p of n.items){const{start:f,key:y,sep:d,value:m}=p,w=ge(f,{indicator:"explicit-key-ind",next:y!=null?y:d==null?void 0:d[0],offset:a,onError:i,startOnNewline:!0}),b=!w.found;if(b){if(y&&(y.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==n.indent&&i(a,"BAD_INDENT",gs)),!w.anchor&&!w.tag&&!d){c=w.end,w.comment&&(l.comment?l.comment+=`
64
- `+w.comment:l.comment=w.comment);continue}(w.hasNewlineAfterProp||Le(y))&&i(y!=null?y:f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=w.found)==null?void 0:u.indent)!==n.indent&&i(a,"BAD_INDENT",gs);const k=w.end,S=y?s(t,y,w,i):e(t,k,f,null,w,i);t.schema.compat&&Ot(n.indent,y,i),ys(t,l.items,S)&&i(k,"DUPLICATE_KEY","Map keys must be unique");const N=ge(d!=null?d:[],{indicator:"map-value-ind",next:m,offset:S.range[2],onError:i,startOnNewline:!y||y.type==="block-scalar"});if(a=N.end,N.found){b&&((m==null?void 0:m.type)==="block-map"&&!N.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&w.start<N.found.offset-1024&&i(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const g=m?s(t,m,N,i):e(t,a,d,null,N,i);t.schema.compat&&Ot(n.indent,m,i),a=g.range[2];const T=new B(S,g);t.options.keepSourceTokens&&(T.srcToken=p),l.items.push(T)}else{b&&i(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(S.comment?S.comment+=`
65
- `+N.comment:S.comment=N.comment);const g=new B(S);t.options.keepSourceTokens&&(g.srcToken=p),l.items.push(g)}}return c&&c<a&&i(c,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,a,c!=null?c:a],l}function mn({composeNode:s,composeEmptyNode:e},t,n,i,r){var h;const o=(h=r==null?void 0:r.nodeClass)!=null?h:H,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(const{start:u,value:p}of n.items){const f=ge(u,{indicator:"seq-item-ind",next:p,offset:a,onError:i,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||p)p&&p.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{c=f.end,f.comment&&(l.comment=f.comment);continue}const y=p?s(t,p,f,i):e(t,f.end,u,null,f,i);t.schema.compat&&Ot(n.indent,p,i),a=y.range[2],l.items.push(y)}return l.range=[n.offset,a,c!=null?c:a],l}function Ie(s,e,t,n){let i="";if(s){let r=!1,o="";for(const l of s){const{source:a,type:c}=l;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const h=a.substring(1)||" ";i?i+=o+h:i=h,o="";break}case"newline":i&&(o+=a),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=a.length}}return{comment:i,offset:e}}const At="Block collections are not allowed within flow collections",Et=s=>s&&(s.type==="block-map"||s.type==="block-seq");function yn({composeNode:s,composeEmptyNode:e},t,n,i,r){var m,w;const o=n.start.source==="{",l=o?"flow map":"flow sequence",a=(m=r==null?void 0:r.nodeClass)!=null?m:o?D:H,c=new a(t.schema);c.flow=!0;const h=t.atRoot;h&&(t.atRoot=!1);let u=n.offset+n.start.source.length;for(let b=0;b<n.items.length;++b){const k=n.items[b],{start:S,key:N,sep:g,value:T}=k,A=ge(S,{flow:l,indicator:"explicit-key-ind",next:N!=null?N:g==null?void 0:g[0],offset:u,onError:i,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!g&&!T){b===0&&A.comma?i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):b<n.items.length-1&&i(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),A.comment&&(c.comment?c.comment+=`
66
- `+A.comment:c.comment=A.comment),u=A.end;continue}!o&&t.options.strict&&Le(N)&&i(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(b===0)A.comma&&i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(A.comma||i(A.start,"MISSING_CHAR",`Missing , between ${l} items`),A.comment){let C="";e:for(const _ of S)switch(_.type){case"comma":case"space":break;case"comment":C=_.source.substring(1);break e;default:break e}if(C){let _=c.items[c.items.length-1];L(_)&&(_=(w=_.value)!=null?w:_.key),_.comment?_.comment+=`
67
- `+C:_.comment=C,A.comment=A.comment.substring(C.length+1)}}if(!o&&!g&&!A.found){const C=T?s(t,T,A,i):e(t,A.end,g,null,A,i);c.items.push(C),u=C.range[2],Et(T)&&i(C.range,"BLOCK_IN_FLOW",At)}else{const C=A.end,_=N?s(t,N,A,i):e(t,C,S,null,A,i);Et(N)&&i(_.range,"BLOCK_IN_FLOW",At);const M=ge(g!=null?g:[],{flow:l,indicator:"map-value-ind",next:T,offset:_.range[2],onError:i,startOnNewline:!1});if(M.found){if(!o&&!A.found&&t.options.strict){if(g)for(const v of g){if(v===M.found)break;if(v.type==="newline"){i(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<M.found.offset-1024&&i(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&T.source&&T.source[0]===":"?i(T,"MISSING_CHAR",`Missing space after : in ${l}`):i(M.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const te=T?s(t,T,M,i):M.found?e(t,M.end,g,null,M,i):null;te?Et(T)&&i(te.range,"BLOCK_IN_FLOW",At):M.comment&&(_.comment?_.comment+=`
68
- `+M.comment:_.comment=M.comment);const we=new B(_,te);if(t.options.keepSourceTokens&&(we.srcToken=k),o){const v=c;ys(t,v.items,_)&&i(C,"DUPLICATE_KEY","Map keys must be unique"),v.items.push(we)}else{const v=new D(t.schema);v.flow=!0,v.items.push(we),c.items.push(v)}u=te?te.range[2]:M.end}}const p=o?"}":"]",[f,...y]=n.end;let d=u;if(f&&f.source===p)d=f.offset+f.source.length;else{const b=l[0].toUpperCase()+l.substring(1),k=h?`${b} must end with a ${p}`:`${b} in block collection must be sufficiently indented and end with a ${p}`;i(u,h?"MISSING_CHAR":"BAD_INDENT",k),f&&f.source.length!==1&&y.unshift(f)}if(y.length>0){const b=Ie(y,d,t.options.strict,i);b.comment&&(c.comment?c.comment+=`
69
- `+b.comment:c.comment=b.comment),c.range=[n.offset,d,b.offset]}else c.range=[n.offset,d,d];return c}function Lt(s,e,t,n,i,r){const o=t.type==="block-map"?pn(s,e,t,n,r):t.type==="block-seq"?mn(s,e,t,n,r):yn(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}function gn(s,e,t,n,i){var u,p;const r=n?e.directives.tagName(n.source,f=>i(n,"TAG_RESOLVE_FAILED",f)):null,o=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!n||!r||r==="!"||r===D.tagName&&o==="map"||r===H.tagName&&o==="seq"||!o)return Lt(s,e,t,i,r);let l=e.schema.tags.find(f=>f.tag===r&&f.collection===o);if(!l){const f=e.schema.knownTags[r];if(f&&f.collection===o)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f!=null&&f.collection?i(n,"BAD_COLLECTION_TYPE",`${f.tag} used for ${o} collection, but expects ${f.collection}`,!0):i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),Lt(s,e,t,i,r)}const a=Lt(s,e,t,i,r,l),c=(p=(u=l.resolve)==null?void 0:u.call(l,a,f=>i(n,"TAG_RESOLVE_FAILED",f),e.options))!=null?p:a,h=$(c)?c:new O(c);return h.range=a.range,h.tag=r,l!=null&&l.format&&(h.format=l.format),h}function bs(s,e,t){const n=s.offset,i=bn(s,e,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const r=i.mode===">"?O.BLOCK_FOLDED:O.BLOCK_LITERAL,o=s.source?wn(s.source):[];let l=o.length;for(let d=o.length-1;d>=0;--d){const m=o[d][1];if(m===""||m==="\r")l=d;else break}if(l===0){const d=i.chomp==="+"&&o.length>0?`
70
- `.repeat(Math.max(1,o.length-1)):"";let m=n+i.length;return s.source&&(m+=s.source.length),{value:d,type:r,comment:i.comment,range:[n,m,m]}}let a=s.indent+i.indent,c=s.offset+i.length,h=0;for(let d=0;d<l;++d){const[m,w]=o[d];if(w===""||w==="\r")i.indent===0&&m.length>a&&(a=m.length);else{if(m.length<a){const b="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";t(c+m.length,"MISSING_CHAR",b)}i.indent===0&&(a=m.length),h=d;break}c+=m.length+w.length+1}for(let d=o.length-1;d>=l;--d)o[d][0].length>a&&(l=d+1);let u="",p="",f=!1;for(let d=0;d<h;++d)u+=o[d][0].slice(a)+`
71
- `;for(let d=h;d<l;++d){let[m,w]=o[d];c+=m.length+w.length+1;const b=w[w.length-1]==="\r";if(b&&(w=w.slice(0,-1)),w&&m.length<a){const S=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-w.length-(b?2:1),"BAD_INDENT",S),m=""}r===O.BLOCK_LITERAL?(u+=p+m.slice(a)+w,p=`
72
- `):m.length>a||w[0]===" "?(p===" "?p=`
73
- `:!f&&p===`
74
- `&&(p=`
75
-
76
- `),u+=p+m.slice(a)+w,p=`
77
- `,f=!0):w===""?p===`
78
- `?u+=`
79
- `:p=`
80
- `:(u+=p+w,p=" ",f=!1)}switch(i.chomp){case"-":break;case"+":for(let d=l;d<o.length;++d)u+=`
81
- `+o[d][0].slice(a);u[u.length-1]!==`
82
- `&&(u+=`
83
- `);break;default:u+=`
84
- `}const y=n+i.length+s.source.length;return{value:u,type:r,comment:i.comment,range:[n,y,y]}}function bn({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,l="",a=-1;for(let p=1;p<i.length;++p){const f=i[p];if(!l&&(f==="-"||f==="+"))l=f;else{const y=Number(f);!o&&y?o=y:a===-1&&(a=s+p)}}a!==-1&&n(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",u=i.length;for(let p=1;p<e.length;++p){const f=e[p];switch(f.type){case"space":c=!0;case"newline":u+=f.source.length;break;case"comment":t&&!c&&n(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=f.source.length,h=f.source.substring(1);break;case"error":n(f,"UNEXPECTED_TOKEN",f.message),u+=f.source.length;break;default:{const y=`Unexpected token in block scalar header: ${f.type}`;n(f,"UNEXPECTED_TOKEN",y);const d=f.source;d&&typeof d=="string"&&(u+=d.length)}}}return{mode:r,indent:o,chomp:l,comment:h,length:u}}function wn(s){const e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n!=null&&n[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}function ws(s,e,t){const{offset:n,type:i,source:r,end:o}=s;let l,a;const c=(p,f,y)=>t(n+p,f,y);switch(i){case"scalar":l=O.PLAIN,a=Sn(r,c);break;case"single-quoted-scalar":l=O.QUOTE_SINGLE,a=kn(r,c);break;case"double-quoted-scalar":l=O.QUOTE_DOUBLE,a=Nn(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}const h=n+r.length,u=Ie(o,h,e,t);return{value:a,type:l,comment:u.comment,range:[n,h,u.offset]}}function Sn(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Ss(s)}function kn(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Ss(s.slice(1,-1)).replace(/''/g,"'")}function Ss(s){var a;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
- `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
87
- `?i+=r:r=`
88
- `:(i+=r+n[1],r=" "),o=t.lastIndex;const l=/[ \t]*(.*)/sy;return l.lastIndex=o,n=l.exec(s),i+r+((a=n==null?void 0:n[1])!=null?a:"")}function Nn(s,e){let t="";for(let n=1;n<s.length-1;++n){const i=s[n];if(!(i==="\r"&&s[n+1]===`
89
- `))if(i===`
90
- `){const{fold:r,offset:o}=On(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n];const o=An[r];if(o)t+=o;else if(r===`
91
- `)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
92
- `)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){const l={x:2,u:4,U:8}[r];t+=En(s,n+1,l,e),n+=l}else{const l=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),t+=l}}else if(i===" "||i===" "){const r=n;let o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
93
- `&&!(o==="\r"&&s[n+2]===`
94
- `)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function On(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
95
- `||n==="\r")&&!(n==="\r"&&s[e+2]!==`
96
- `);)n===`
97
- `&&(t+=`
98
- `),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}const An={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function En(s,e,t,n){const i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(o)}function ks(s,e,t,n){const{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?bs(e,s.options.strict,n):ws(e,s.options.strict,n),a=t?s.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,c=t&&a?Ln(s.schema,i,a,t,n):e.type==="scalar"?In(s,i,e,n):s.schema[Y];let h;try{const u=c.resolve(i,p=>n(t!=null?t:e,"TAG_RESOLVE_FAILED",p),s.options);h=E(u)?u:new O(u)}catch(u){const p=u instanceof Error?u.message:String(u);n(t!=null?t:e,"TAG_RESOLVE_FAILED",p),h=new O(i)}return h.range=l,h.source=i,r&&(h.type=r),a&&(h.tag=a),c.format&&(h.format=c.format),o&&(h.comment=o),h}function Ln(s,e,t,n,i){var l;if(t==="!")return s[Y];const r=[];for(const a of s.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(const a of r)if((l=a.test)!=null&&l.test(e))return a;const o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[Y])}function In({directives:s,schema:e},t,n,i){var o;const r=e.tags.find(l=>{var a;return l.default&&((a=l.test)==null?void 0:a.test(t))})||e[Y];if(e.compat){const l=(o=e.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(t))}))!=null?o:e[Y];if(r.tag!==l.tag){const a=s.tagString(r.tag),c=s.tagString(l.tag),h=`Value may be parsed as either ${a} or ${c}`;i(n,"TAG_RESOLVE_FAILED",h,!0)}}return r}function Tn(s,e,t){if(e){t===null&&(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];(i==null?void 0:i.type)==="space";)s+=i.source.length,i=e[++n];break}}return s}const _n={composeNode:Ns,composeEmptyNode:It};function Ns(s,e,t,n){const{spaceBefore:i,comment:r,anchor:o,tag:l}=t;let a,c=!0;switch(e.type){case"alias":a=$n(s,e,n),(o||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":a=ks(s,e,l,n),o&&(a.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":a=gn(_n,s,e,l,n),o&&(a.anchor=o.source.substring(1));break;default:{const h=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",h),a=It(s,e.offset,void 0,null,t,n),c=!1}}return o&&a.anchor===""&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(a.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?a.comment=r:a.commentBefore=r),s.options.keepSourceTokens&&c&&(a.srcToken=e),a}function It(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){const h={type:"scalar",offset:Tn(e,t,n),indent:-1,source:""},u=ks(s,h,l,c);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=a),u}function $n({options:s},{offset:e,source:t,end:n},i){const r=new Ce(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+t.length,l=Ie(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}function Cn(s,e,{offset:t,start:n,value:i,end:r},o){const l=Object.assign({_directives:e},s),a=new me(void 0,l),c={atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},h=ge(n,{indicator:"doc-start",next:i!=null?i:r==null?void 0:r[0],offset:t,onError:o,startOnNewline:!0});h.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?Ns(c,i,h,o):It(c,h.end,n,null,h,o);const u=a.contents.range[2],p=Ie(r,u,!1,o);return p.comment&&(a.comment=p.comment),a.range=[t,u,p.offset],a}function Te(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];const{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function Os(s){var i;let e="",t=!1,n=!1;for(let r=0;r<s.length;++r){const o=s[r];switch(o[0]){case"#":e+=(e===""?"":n?`
100
-
101
- `:`
102
- `)+(o.substring(1)||" "),t=!0,n=!1;break;case"%":((i=s[r+1])==null?void 0:i[0])!=="#"&&(r+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}class Tt{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{const o=Te(t);r?this.warnings.push(new ms(o,n,i)):this.errors.push(new x(o,n,i))},this.directives=new P({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:i}=Os(this.prelude);if(n){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}
103
- ${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(I(r)&&!r.flow&&r.items.length>0){let o=r.items[0];L(o)&&(o=o.key);const l=o.commentBefore;o.commentBefore=l?`${n}
104
- ${l}`:n}else{const o=r.commentBefore;r.commentBefore=o?`${n}
105
- ${o}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Os(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{const r=Te(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Cn(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new x(Te(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new x(Te(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=Ie(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
106
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new x(Te(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),i=new me(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function vn(s,e=!0,t){if(s){const n=(i,r,o)=>{const l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new x([l,l+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ws(s,e,n);case"block-scalar":return bs(s,e,n)}}return null}function Bn(s,e){var c;const{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=Oe({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:n,source:`
107
- `}];switch(l[0]){case"|":case">":{const h=l.indexOf(`
108
- `),u=l.substring(0,h),p=l.substring(h+1)+`
109
- `,f=[{type:"block-scalar-header",offset:r,indent:n,source:u}];return As(f,a)||f.push({type:"newline",offset:-1,indent:n,source:`
110
- `}),{type:"block-scalar",offset:r,indent:n,props:f,source:p}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:a};default:return{type:"scalar",offset:r,indent:n,source:l,end:a}}}function Mn(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const a=Oe({type:o,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":Pn(s,a);break;case'"':_t(s,a,"double-quoted-scalar");break;case"'":_t(s,a,"single-quoted-scalar");break;default:_t(s,a,"scalar")}}function Pn(s,e){const t=e.indexOf(`
111
- `),n=e.substring(0,t),i=e.substring(t+1)+`
112
- `;if(s.type==="block-scalar"){const r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{const{offset:r}=s,o="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:r,indent:o,source:n}];As(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:`
113
- `});for(const a of Object.keys(s))a!=="type"&&a!=="offset"&&delete s[a];Object.assign(s,{type:"block-scalar",indent:o,props:l,source:i})}}function As(s,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function _t(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{const n=s.props.slice(1);let i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(const r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
114
- `};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{const n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(const r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}const jn=s=>"type"in s?Xe(s):ze(s);function Xe(s){switch(s.type){case"block-scalar":{let e="";for(const t of s.props)e+=Xe(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(const t of s.items)e+=ze(t);return e}case"flow-collection":{let e=s.start.source;for(const t of s.items)e+=ze(t);for(const t of s.end)e+=t.source;return e}case"document":{let e=ze(s);if(s.end)for(const t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(const t of s.end)e+=t.source;return e}}}function ze({start:s,key:e,sep:t,value:n}){let i="";for(const r of s)i+=r.source;if(e&&(i+=Xe(e)),t)for(const r of t)i+=r.source;return n&&(i+=Xe(n)),i}const $t=Symbol("break visit"),Dn=Symbol("skip children"),Es=Symbol("remove item");function ee(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),Ls(Object.freeze([]),s,e)}ee.BREAK=$t,ee.SKIP=Dn,ee.REMOVE=Es,ee.itemAtPath=(s,e)=>{let t=s;for(const[n,i]of e){const r=t==null?void 0:t[n];if(r&&"items"in r)t=r.items[i];else return}return t},ee.parentCollection=(s,e)=>{const t=ee.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t==null?void 0:t[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Ls(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(const i of["key","value"]){const r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){const l=Ls(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof l=="number")o=l-1;else{if(l===$t)return $t;l===Es&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}const Ze="\uFEFF",xe="",et="",_e="",Kn=s=>!!s&&"items"in s,qn=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Fn(s){switch(s){case Ze:return"<BOM>";case xe:return"<DOC>";case et:return"<FLOW_END>";case _e:return"<SCALAR>";default:return JSON.stringify(s)}}function Is(s){switch(s){case Ze:return"byte-order-mark";case xe:return"doc-mode";case et:return"flow-error-end";case _e:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
- `:case`\r
116
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function F(s){switch(s){case void 0:case" ":case`
117
- `:case"\r":case" ":return!0;default:return!1}}const Ts="0123456789ABCDEFabcdef".split(""),Un="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),Ct=",[]{}".split(""),Rn=` ,[]{}
118
- \r `.split(""),vt=s=>!s||Rn.includes(s);class _s{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var i;e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let n=(i=this.next)!=null?i:"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
119
- `?!0:t==="\r"?this.buffer[e+1]===`
120
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const i=this.buffer[n+e+1];if(i===`
121
- `||!i&&!this.atEnd)return e+n+1}return t===`
122
- `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&F(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
123
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ze&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length;const n=e.indexOf("#");if(n!==-1){const r=e[n-1];(r===" "||r===" ")&&(t=n-1)}for(;;){const r=e[t-1];if(r===" "||r===" ")t-=1;else break}const i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield xe,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if(t==="---"&&F(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if(t==="..."&&F(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!F(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&F(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(vt),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&F(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield et,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(vt),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||F(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let i=n.indexOf(`
124
- `,this.pos);if(i!==-1){for(;i!==-1;){const r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
125
- `,r)}i!==-1&&(t=i-(n[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>F(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":t+=1;break;case`
126
- `:e=i,t=0;break;case"\r":{const r=this.buffer[i+1];if(!r&&!this.atEnd)return this.setNext("block-scalar");if(r===`
127
- `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext+=this.blockScalarIndent;do{const i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
128
- `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep)do{let i=e-1,r=this.buffer[i];r==="\r"&&(r=this.buffer[--i]);const o=i;for(;r===" "||r===" ";)r=this.buffer[--i];if(r===`
129
- `&&i>=this.pos&&i+1+t>o)e=i;else break}while(!0);return yield _e,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){const r=this.buffer[n+1];if(F(r)||e&&r===",")break;t=n}else if(F(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
130
- `?(n+=1,i=`
131
- `,r=this.buffer[n+1]):t=n),r==="#"||e&&Ct.includes(r))break;if(i===`
132
- `){const o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Ct.includes(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield _e,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(vt))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(F(t)||e&&Ct.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!F(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Un.includes(t))t=this.buffer[++e];else if(t==="%"&&Ts.includes(this.buffer[e+1])&&Ts.includes(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
133
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
134
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class $s{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}}function R(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function Cs(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function vs(s){switch(s==null?void 0:s.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function tt(s){var e;switch(s.type){case"document":return s.start;case"block-map":{const t=s.items[s.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function be(s){var t;if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=s[++e])==null?void 0:t.type)==="space";);return s.splice(e,s.length)}function Bs(s){if(s.start.type==="flow-seq-start")for(const e of s.items)e.sep&&!e.value&&!R(e.start,"explicit-key-ind")&&!R(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,vs(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Bt{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new _s,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=Is(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e!=null?e:this.stack.pop();if(t)if(this.stack.length===0)yield t;else{const n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Bs(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!R(i.start,"explicit-key-ind");return}break}case"block-seq":{const i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{const i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Cs(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),t.items.splice(-1,1))}}else{const n="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:n}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Cs(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=tt(this.peek(2)),n=be(t);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
135
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
136
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const i="end"in t.value?t.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2],r=(n=i==null?void 0:i.value)==null?void 0:n.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent&&t.sep;let r=[];if(i&&t.sep&&!t.value){const o=[];for(let l=0;l<t.sep.length;++l){const a=t.sep[l];switch(a.type){case"newline":o.push(l);break;case"space":break;case"comment":a.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!R(t.start,"explicit-key-ind")?t.start.push(this.sourceToken):i||t.value?(r.push(this.sourceToken),e.items.push({start:r})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(R(t.start,"explicit-key-ind"))if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(R(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(vs(t.key)&&!R(t.sep,"newline")){const o=be(t.start),l=t.key,a=t.sep;a.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:a}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(R(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=be(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):R(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){i&&o.type!=="block-seq"&&R(t.start,"explicit-key-ind")&&e.items.push({start:r}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const i="end"in t.value?t.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2],r=(n=i==null?void 0:i.value)==null?void 0:n.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||R(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const i=tt(n),r=be(i);Bs(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
137
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
138
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=tt(e),n=be(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=!0;const t=tt(e),n=be(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Ms(s){const e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new $s||null,prettyErrors:e}}function Vn(s,e={}){const{lineCounter:t,prettyErrors:n}=Ms(e),i=new Bt(t==null?void 0:t.addNewLine),r=new Tt(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(const l of o)l.errors.forEach(He(s,t)),l.warnings.forEach(He(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Ps(s,e={}){const{lineCounter:t,prettyErrors:n}=Ms(e),i=new Bt(t==null?void 0:t.addNewLine),r=new Tt(e);let o=null;for(const l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new x(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(He(s,t)),o.warnings.forEach(He(s,t))),o}function Yn(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=Ps(s,t);if(!i)return null;if(i.warnings.forEach(r=>Gt(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function Jn(s,e,t){var i;let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(s===void 0){const{keepUndefined:r}=(i=t!=null?t:e)!=null?i:{};if(!r)return}return new me(s,n,t).toString(t)}var Gn=nt}}]);})();
139
-
140
- //# sourceMappingURL=module-yaml.00a97896.js.map