| 710 | `)+($.substring(1)||" "),_=!0,z=!1;break;case"%":if(q[Y+1]?.[0]!=="#")Y+=1;_=!1;break;default:if(!_)z=!0;_=!1}}return{comment:K,afterEmptyLine:z}}class R44{constructor(q={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(K,_,z,Y)=>{let $=Xn6(K);if(Y)this.warnings.push(new Mn6.YAMLWarning($,_,z));else this.errors.push(new Mn6.YAMLParseError($,_,z))},this.directives=new FL_.Directives({version:q.version||"1.2"}),this.options=q}decorate(q,K){let{comment:_,afterEmptyLine:z}=L44(this.prelude);if(_){let Y=q.contents;if(K)q.comment=q.comment?`${q.comment} |
| 711 | ${_}`:_;else if(z||q.directives.docStart||!Y)q.commentBefore=_;else if(E44.isCollection(Y)&&!Y.flow&&Y.items.length>0){let $=Y.items[0];if(E44.isPair($))$=$.key;let A=$.commentBefore;$.commentBefore=A?`${_} |
| 712 | ${A}`:_}else{let $=Y.commentBefore;Y.commentBefore=$?`${_} |
| 713 | ${$}`:_}}if(K)Array.prototype.push.apply(q.errors,this.errors),Array.prototype.push.apply(q.warnings,this.warnings);else q.errors=this.errors,q.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:L44(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(q,K=!1,_=-1){for(let z of q)yield*this.next(z);yield*this.end(K,_)}*next(q){if(gL_.env.LOG_STREAM)console.dir(q,{depth:null});switch(q.type){case"directive":this.directives.add(q.source,(K,_,z)=>{let Y=Xn6(q);Y[0]+=K,this.onError(Y,"BAD_DIRECTIVE",_,z)}),this.prelude.push(q.source),this.atDirectives=!0;break;case"document":{let K=QL_.composeDoc(this.options,this.directives,q,this.onError);if(this.atDirectives&&!K.directives.docStart)this.onError(q,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(K,!1),this.doc)yield this.doc;this.doc=K,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(q.source);break;case"error":{let K=q.source?`${q.message}: ${JSON.stringify(q.source)}`:q.message,_=new Mn6.YAMLParseError(Xn6(q),"UNEXPECTED_TOKEN",K);if(this.atDirectives||!this.doc)this.errors.push(_);else this.doc.errors.push(_);break}case"doc-end":{if(!this.doc){this.errors.push(new Mn6.YAMLParseError(Xn6(q),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let K=dL_.resolveEnd(q.end,q.offset+q.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),K.comment){let _=this.doc.comment;this.doc.comment=_?`${_} |
| 714 | ${K.comment}`:K.comment}this.doc.range[2]=K.offset;break}default:this.errors.push(new Mn6.YAMLParseError(Xn6(q),"UNEXPECTED_TOKEN",`Unsupported token ${q.type}`))}}*end(q=!1,K=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(q){let _=Object.assign({_directives:this.directives},this.options),z=new UL_.Document(void 0,_);if(this.atDirectives)this.onError(K,"MISSING_CHAR","Missing directives-end indicator line");z.range=[0,K,K],this.decorate(z,!1),yield z}}}cL_.Composer=R44});var C44=m((eL_)=>{var nL_=zh1(),iL_=$h1(),rL_=Hn6(),h44=tl6();function oL_(q,K=!0,_){if(q){let z=(Y,$,A)=>{let O=typeof Y==="number"?Y:Array.isArray(Y)?Y[0]:Y.offset;if(_)_(O,$,A);else throw new rL_.YAMLParseError([O,O+1],$,A)};switch(q.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return iL_.resolveFlowScalar(q,K,z);case"block-scalar":return nL_.resolveBlockScalar({options:{strict:K}},q,z)}}return null}function aL_(q,K){let{implicitKey:_=!1,indent:z,inFlow:Y=!1,offset:$=-1,type:A="PLAIN"}=K,O=h44.stringifyString({type:A,value:q},{implicitKey:_,indent:z>0?" ".repeat(z):"",inFlow:Y,options:{blockQuote:!0,lineWidth:-1}}),w=K.end??[{type:"newline",offset:-1,indent:z,source:` |
| 715 | `}];switch(O[0]){case"|":case">":{let j=O.indexOf(` |