pubo-node 1.0.154 → 1.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pubo-node.js +1 -1
- package/es/storage/json.js +0 -6
- package/lib/storage/json.js +0 -5
- package/package.json +2 -2
package/dist/pubo-node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["pubo-node"]=t():e["pubo-node"]=t()}(this,(()=>(()=>{"use strict";var e={5001:e=>{e.exports=require("cluster")},1808:e=>{e.exports=require("net")},7889:(e,t,n)=>{var s=n(3264),i=n(5738),r=n(8228),o=n(9248),a=n(1373),c=n(8864),l=n(7058);function u(e,t,n,s,i,r){const o="block-map"===n.type?a.resolveBlockMap(e,t,n,s,r):"block-seq"===n.type?c.resolveBlockSeq(e,t,n,s,r):l.resolveFlowCollection(e,t,n,s,r),u=o.constructor;return"!"===i||i===u.tagName?(o.tag=u.tagName,o):(i&&(o.tag=i),o)}t.composeCollection=function(e,t,n,a,c){const l=a.tag,f=l?t.directives.tagName(l.source,(e=>c(l,"TAG_RESOLVE_FAILED",e))):null;if("block-seq"===n.type){const{anchor:e,newlineAfterProp:t}=a,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&c(n,"MISSING_CHAR","Missing newline after block sequence props")}const h="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!l||!f||"!"===f||f===r.YAMLMap.tagName&&"map"===h||f===o.YAMLSeq.tagName&&"seq"===h)return u(e,t,n,c,f);let d=t.schema.tags.find((e=>e.tag===f&&e.collection===h));if(!d){const s=t.schema.knownTags[f];if(!s||s.collection!==h)return s?.collection?c(l,"BAD_COLLECTION_TYPE",`${s.tag} used for ${h} collection, but expects ${s.collection}`,!0):c(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),u(e,t,n,c,f);t.schema.tags.push(Object.assign({},s,{default:!1})),d=s}const p=u(e,t,n,c,f,d),m=d.resolve?.(p,(e=>c(l,"TAG_RESOLVE_FAILED",e)),t.options)??p,y=s.isNode(m)?m:new i.Scalar(m);return y.range=p.range,y.tag=f,d?.format&&(y.format=d.format),y}},9394:(e,t,n)=>{var s=n(505),i=n(3223),r=n(9516),o=n(814);t.composeDoc=function(e,t,{offset:n,start:a,value:c,end:l},u){const f=Object.assign({_directives:t},e),h=new s.Document(void 0,f),d={atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},p=o.resolveProps(a,{indicator:"doc-start",next:c??l?.[0],offset:n,onError:u,parentIndent:0,startOnNewline:!0});p.found&&(h.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||p.hasNewline||u(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=c?i.composeNode(d,c,p,u):i.composeEmptyNode(d,p.end,a,null,p,u);const m=h.contents.range[2],y=r.resolveEnd(l,m,!1,u);return y.comment&&(h.comment=y.comment),h.range=[n,m,y.offset],h}},3223:(e,t,n)=>{var s=n(366),i=n(7889),r=n(6491),o=n(9516),a=n(3576);const c={composeNode:l,composeEmptyNode:u};function l(e,t,n,a){const{spaceBefore:l,comment:f,anchor:h,tag:d}=n;let p,m=!0;switch(t.type){case"alias":p=function({options:e},{offset:t,source:n,end:i},r){const a=new s.Alias(n.substring(1));""===a.source&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,l=o.resolveEnd(i,c,e.strict,r);return a.range=[t,c,l.offset],l.comment&&(a.comment=l.comment),a}(e,t,a),(h||d)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=r.composeScalar(e,t,d,a),h&&(p.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=i.composeCollection(c,e,t,n,a),h&&(p.anchor=h.source.substring(1));break;default:a(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),p=u(e,t.offset,void 0,null,n,a),m=!1}return h&&""===p.anchor&&a(h,"BAD_ALIAS","Anchor cannot be an empty string"),l&&(p.spaceBefore=!0),f&&("scalar"===t.type&&""===t.source?p.comment=f:p.commentBefore=f),e.options.keepSourceTokens&&m&&(p.srcToken=t),p}function u(e,t,n,s,{spaceBefore:i,comment:o,anchor:c,tag:l,end:u},f){const h={type:"scalar",offset:a.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,h,l,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=u),d}t.composeEmptyNode=u,t.composeNode=l},6491:(e,t,n)=>{var s=n(3264),i=n(5738),r=n(1070),o=n(5147);t.composeScalar=function(e,t,n,a){const{value:c,type:l,comment:u,range:f}="block-scalar"===t.type?r.resolveBlockScalar(e,t,a):o.resolveFlowScalar(t,e.options.strict,a),h=n?e.directives.tagName(n.source,(e=>a(n,"TAG_RESOLVE_FAILED",e))):null,d=n&&h?function(e,t,n,i,r){if("!"===n)return e[s.SCALAR];const o=[];for(const t of e.tags)if(!t.collection&&t.tag===n){if(!t.default||!t.test)return t;o.push(t)}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[s.SCALAR])}(e.schema,c,h,n,a):"scalar"===t.type?function({directives:e,schema:t},n,i,r){const o=t.tags.find((e=>e.default&&e.test?.test(n)))||t[s.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(n)))??t[s.SCALAR];o.tag!==a.tag&&r(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(o.tag)} or ${e.tagString(a.tag)}`,!0)}return o}(e,c,t,a):e.schema[s.SCALAR];let p;try{const r=d.resolve(c,(e=>a(n??t,"TAG_RESOLVE_FAILED",e)),e.options);p=s.isScalar(r)?r:new i.Scalar(r)}catch(e){const s=e instanceof Error?e.message:String(e);a(n??t,"TAG_RESOLVE_FAILED",s),p=new i.Scalar(c)}return p.range=f,p.source=c,l&&(p.type=l),h&&(p.tag=h),d.format&&(p.format=d.format),u&&(p.comment=u),p}},1294:(e,t,n)=>{var s=n(3848),i=n(505),r=n(2981),o=n(3264),a=n(9394),c=n(9516);function l(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function u(e){let t="",n=!1,s=!1;for(let i=0;i<e.length;++i){const r=e[i];switch(r[0]){case"#":t+=(""===t?"":s?"\n\n":"\n")+(r.substring(1)||" "),n=!0,s=!1;break;case"%":"#"!==e[i+1]?.[0]&&(i+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:t,afterEmptyLine:s}}t.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=l(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new s.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:s}=u(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(s||e.directives.docStart||!i)e.commentBefore=n;else if(o.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];o.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`: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:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,((t,n,s)=>{const i=l(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,s)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new r.YAMLParseError(l(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 t="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(l(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new r.YAMLParseError(l(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 e=Object.assign({_directives:this.directives},this.options),n=new i.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}},1373:(e,t,n)=>{var s=n(7356),i=n(8228),r=n(814),o=n(7627),a=n(7049),c=n(434);const l="All mapping items must start at the same column";t.resolveBlockMap=function({composeNode:e,composeEmptyNode:t},n,u,f,h){const d=new(h?.nodeClass??i.YAMLMap)(n.schema);n.atRoot&&(n.atRoot=!1);let p=u.offset,m=null;for(const i of u.items){const{start:h,key:y,sep:g,value:v}=i,b=r.resolveProps(h,{indicator:"explicit-key-ind",next:y??g?.[0],offset:p,onError:f,parentIndent:u.indent,startOnNewline:!0}),w=!b.found;if(w){if(y&&("block-seq"===y.type?f(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==u.indent&&f(p,"BAD_INDENT",l)),!b.anchor&&!b.tag&&!g){m=b.end,b.comment&&(d.comment?d.comment+="\n"+b.comment:d.comment=b.comment);continue}(b.newlineAfterProp||o.containsNewline(y))&&f(y??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==u.indent&&f(p,"BAD_INDENT",l);const S=b.end,k=y?e(n,y,b,f):t(n,S,h,null,b,f);n.schema.compat&&a.flowIndentCheck(u.indent,y,f),c.mapIncludes(n,d.items,k)&&f(S,"DUPLICATE_KEY","Map keys must be unique");const N=r.resolveProps(g??[],{indicator:"map-value-ind",next:v,offset:k.range[2],onError:f,parentIndent:u.indent,startOnNewline:!y||"block-scalar"===y.type});if(p=N.end,N.found){w&&("block-map"!==v?.type||N.hasNewline||f(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<N.found.offset-1024&&f(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const r=v?e(n,v,N,f):t(n,p,g,null,N,f);n.schema.compat&&a.flowIndentCheck(u.indent,v,f),p=r.range[2];const o=new s.Pair(k,r);n.options.keepSourceTokens&&(o.srcToken=i),d.items.push(o)}else{w&&f(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(k.comment?k.comment+="\n"+N.comment:k.comment=N.comment);const e=new s.Pair(k);n.options.keepSourceTokens&&(e.srcToken=i),d.items.push(e)}}return m&&m<p&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[u.offset,p,m??p],d}},1070:(e,t,n)=>{var s=n(5738);t.resolveBlockScalar=function(e,t,n){const i=t.offset,r=function({offset:e,props:t},n,s){if("block-scalar-header"!==t[0].type)return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],r=i[0];let o=0,a="",c=-1;for(let t=1;t<i.length;++t){const n=i[t];if(a||"-"!==n&&"+"!==n){const s=Number(n);!o&&s?o=s:-1===c&&(c=e+t)}else a=n}-1!==c&&s(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,u="",f=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":l=!0;case"newline":f+=i.source.length;break;case"comment":n&&!l&&s(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=i.source.length,u=i.source.substring(1);break;case"error":s(i,"UNEXPECTED_TOKEN",i.message),f+=i.source.length;break;default:{s(i,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${i.type}`);const e=i.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:r,indent:o,chomp:a,comment:u,length:f}}(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const o=">"===r.mode?s.Scalar.BLOCK_FOLDED:s.Scalar.BLOCK_LITERAL,a=t.source?function(e){const t=e.split(/\n( *)/),n=t[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===r.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let n=i+r.length;return t.source&&(n+=t.source.length),{value:e,type:o,comment:r.comment,range:[i,n,n]}}let l=t.indent+r.indent,u=t.offset+r.length,f=0;for(let t=0;t<c;++t){const[s,i]=a[t];if(""!==i&&"\r"!==i){if(s.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(u+s.length,"MISSING_CHAR",e)}0===r.indent&&(l=s.length),f=t,0!==l||e.atRoot||n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}0===r.indent&&s.length>l&&(l=s.length),u+=s.length+i.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>l&&(c=e+1);let h="",d="",p=!1;for(let e=0;e<f;++e)h+=a[e][0].slice(l)+"\n";for(let e=f;e<c;++e){let[t,i]=a[e];u+=t.length+i.length+1;const c="\r"===i[i.length-1];if(c&&(i=i.slice(0,-1)),i&&t.length<l){const e="Block scalar lines must not be less indented than their "+(r.indent?"explicit indentation indicator":"first line");n(u-i.length-(c?2:1),"BAD_INDENT",e),t=""}o===s.Scalar.BLOCK_LITERAL?(h+=d+t.slice(l)+i,d="\n"):t.length>l||"\t"===i[0]?(" "===d?d="\n":p||"\n"!==d||(d="\n\n"),h+=d+t.slice(l)+i,d="\n",p=!0):""===i?"\n"===d?h+="\n":d="\n":(h+=d+i,d=" ",p=!1)}switch(r.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)h+="\n"+a[e][0].slice(l);"\n"!==h[h.length-1]&&(h+="\n");break;default:h+="\n"}const m=i+r.length+t.source.length;return{value:h,type:o,comment:r.comment,range:[i,m,m]}}},8864:(e,t,n)=>{var s=n(9248),i=n(814),r=n(7049);t.resolveBlockSeq=function({composeNode:e,composeEmptyNode:t},n,o,a,c){const l=new(c?.nodeClass??s.YAMLSeq)(n.schema);n.atRoot&&(n.atRoot=!1);let u=o.offset,f=null;for(const{start:s,value:c}of o.items){const h=i.resolveProps(s,{indicator:"seq-item-ind",next:c,offset:u,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!h.found){if(!(h.anchor||h.tag||c)){f=h.end,h.comment&&(l.comment=h.comment);continue}c&&"block-seq"===c.type?a(h.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator")}const d=c?e(n,c,h,a):t(n,h.end,s,null,h,a);n.schema.compat&&r.flowIndentCheck(o.indent,c,a),u=d.range[2],l.items.push(d)}return l.range=[o.offset,u,f??u],l}},9516:(e,t)=>{t.resolveEnd=function(e,t,n,s){let i="";if(e){let r=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{n&&!r&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=o+t:i=t,o="";break}case"newline":i&&(o+=e),r=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}},7058:(e,t,n)=>{var s=n(3264),i=n(7356),r=n(8228),o=n(9248),a=n(9516),c=n(814),l=n(7627),u=n(434);const f="Block collections are not allowed within flow collections",h=e=>e&&("block-map"===e.type||"block-seq"===e.type);t.resolveFlowCollection=function({composeNode:e,composeEmptyNode:t},n,d,p,m){const y="{"===d.start.source,g=y?"flow map":"flow sequence",v=new(m?.nodeClass??(y?r.YAMLMap:o.YAMLSeq))(n.schema);v.flow=!0;const b=n.atRoot;b&&(n.atRoot=!1);let w=d.offset+d.start.source.length;for(let o=0;o<d.items.length;++o){const a=d.items[o],{start:m,key:b,sep:S,value:k}=a,N=c.resolveProps(m,{flow:g,indicator:"explicit-key-ind",next:b??S?.[0],offset:w,onError:p,parentIndent:d.indent,startOnNewline:!1});if(!N.found){if(!(N.anchor||N.tag||S||k)){0===o&&N.comma?p(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${g}`):o<d.items.length-1&&p(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${g}`),N.comment&&(v.comment?v.comment+="\n"+N.comment:v.comment=N.comment),w=N.end;continue}!y&&n.options.strict&&l.containsNewline(b)&&p(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)N.comma&&p(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${g}`);else if(N.comma||p(N.start,"MISSING_CHAR",`Missing , between ${g} items`),N.comment){let e="";e:for(const t of m)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=v.items[v.items.length-1];s.isPair(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,N.comment=N.comment.substring(e.length+1)}}if(y||S||N.found){const s=N.end,o=b?e(n,b,N,p):t(n,s,m,null,N,p);h(b)&&p(o.range,"BLOCK_IN_FLOW",f);const l=c.resolveProps(S??[],{flow:g,indicator:"map-value-ind",next:k,offset:o.range[2],onError:p,parentIndent:d.indent,startOnNewline:!1});if(l.found){if(!y&&!N.found&&n.options.strict){if(S)for(const e of S){if(e===l.found)break;if("newline"===e.type){p(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}N.start<l.found.offset-1024&&p(l.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source&&":"===k.source[0]?p(k,"MISSING_CHAR",`Missing space after : in ${g}`):p(l.start,"MISSING_CHAR",`Missing , or : between ${g} items`));const E=k?e(n,k,l,p):l.found?t(n,l.end,S,null,l,p):null;E?h(k)&&p(E.range,"BLOCK_IN_FLOW",f):l.comment&&(o.comment?o.comment+="\n"+l.comment:o.comment=l.comment);const A=new i.Pair(o,E);if(n.options.keepSourceTokens&&(A.srcToken=a),y){const e=v;u.mapIncludes(n,e.items,o)&&p(s,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(A)}else{const e=new r.YAMLMap(n.schema);e.flow=!0,e.items.push(A);const t=(E??o).range;e.range=[o.range[0],t[1],t[2]],v.items.push(e)}w=E?E.range[2]:l.end}else{const s=k?e(n,k,N,p):t(n,N.end,S,null,N,p);v.items.push(s),w=s.range[2],h(k)&&p(s.range,"BLOCK_IN_FLOW",f)}}const S=y?"}":"]",[k,...N]=d.end;let E=w;if(k&&k.source===S)E=k.offset+k.source.length;else{const e=g[0].toUpperCase()+g.substring(1);p(w,b?"MISSING_CHAR":"BAD_INDENT",b?`${e} must end with a ${S}`:`${e} in block collection must be sufficiently indented and end with a ${S}`),k&&1!==k.source.length&&N.unshift(k)}if(N.length>0){const e=a.resolveEnd(N,E,n.options.strict,p);e.comment&&(v.comment?v.comment+="\n"+e.comment:v.comment=e.comment),v.range=[d.offset,E,e.offset]}else v.range=[d.offset,E,E];return v}},5147:(e,t,n)=>{var s=n(5738),i=n(9516);function r(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=t.exec(e);if(!s)return e;let i=s[1],r=" ",o=t.lastIndex;for(n.lastIndex=o;s=n.exec(e);)""===s[1]?"\n"===r?i+=r:r="\n":(i+=r+s[1],r=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(e),i+r+(s?.[1]??"")}function o(e,t){let n="",s=e[t+1];for(;!(" "!==s&&"\t"!==s&&"\n"!==s&&"\r"!==s||"\r"===s&&"\n"!==e[t+2]);)"\n"===s&&(n+="\n"),s=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const a={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function c(e,t,n,s){const i=e.substr(t,n),r=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(r)){const i=e.substr(t-2,n+2);return s(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(r)}t.resolveFlowScalar=function(e,t,n){const{offset:l,type:u,source:f,end:h}=e;let d,p;const m=(e,t,s)=>n(l+e,t,s);switch(u){case"scalar":d=s.Scalar.PLAIN,p=function(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),r(e)}(f,m);break;case"single-quoted-scalar":d=s.Scalar.QUOTE_SINGLE,p=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),r(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=s.Scalar.QUOTE_DOUBLE,p=function(e,t){let n="";for(let s=1;s<e.length-1;++s){const i=e[s];if("\r"!==i||"\n"!==e[s+1])if("\n"===i){const{fold:t,offset:i}=o(e,s);n+=t,s=i}else if("\\"===i){let i=e[++s];const r=a[i];if(r)n+=r;else if("\n"===i)for(i=e[s+1];" "===i||"\t"===i;)i=e[1+ ++s];else if("\r"===i&&"\n"===e[s+1])for(i=e[1+ ++s];" "===i||"\t"===i;)i=e[1+ ++s];else if("x"===i||"u"===i||"U"===i){const r={x:2,u:4,U:8}[i];n+=c(e,s+1,r,t),s+=r}else{const i=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||"\t"===i){const t=s;let r=e[s+1];for(;" "===r||"\t"===r;)r=e[1+ ++s];"\n"===r||"\r"===r&&"\n"===e[s+2]||(n+=s>t?e.slice(t,s+1):i)}else n+=i}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(f,m);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[l,l+f.length,l+f.length]}}const y=l+f.length,g=i.resolveEnd(h,y,t,n);return{value:p,type:d,comment:g.comment,range:[l,y,g.offset]}}},814:(e,t)=>{t.resolveProps=function(e,{flow:t,indicator:n,next:s,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let c=!1,l=a,u=a,f="",h="",d=!1,p=!1,m=null,y=null,g=null,v=null,b=null,w=null,S=null;for(const i of e)switch(p&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(l&&"comment"!==i.type&&"newline"!==i.type&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":t||"doc-start"===n&&"flow-collection"===s?.type||!i.source.includes("\t")||(m=i),u=!0;break;case"comment":{u||r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=i.source.substring(1)||" ";f?f+=h+e:f=e,h="",l=!1;break}case"newline":l?f?f+=i.source:c=!0:h+=i.source,l=!0,d=!0,(y||g)&&(v=i),u=!0;break;case"anchor":y&&r(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&r(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=i,null===S&&(S=i.offset),l=!1,u=!1,p=!0;break;case"tag":g&&r(i,"MULTIPLE_TAGS","A node can have at most one tag"),g=i,null===S&&(S=i.offset),l=!1,u=!1,p=!0;break;case n:(y||g)&&r(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),w&&r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),w=i,l="seq-item-ind"===n||"explicit-key-ind"===n,u=!1;break;case"comma":if(t){b&&r(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=i,l=!1,u=!1;break}default:r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),l=!1,u=!1}const k=e[e.length-1],N=k?k.offset+k.source.length:i;return p&&s&&"space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&("scalar"!==s.type||""!==s.source)&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(l&&m.indent<=o||"block-map"===s?.type||"block-seq"===s?.type)&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:c,comment:f,hasNewline:d,anchor:y,tag:g,newlineAfterProp:v,end:N,start:S??N}}},7627:(e,t)=>{t.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}}},3576:(e,t)=>{t.emptyScalarPosition=function(e,t,n){if(t){null===n&&(n=t.length);for(let s=n-1;s>=0;--s){let n=t[s];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++s];"space"===n?.type;)e+=n.source.length,n=t[++s];break}}return e}},7049:(e,t,n)=>{var s=n(7627);t.flowIndentCheck=function(e,t,n){if("flow-collection"===t?.type){const i=t.end[0];i.indent!==e||"]"!==i.source&&"}"!==i.source||!s.containsNewline(t)||n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},434:(e,t,n)=>{var s=n(3264);t.mapIncludes=function(e,t,n){const{uniqueKeys:i}=e.options;if(!1===i)return!1;const r="function"==typeof i?i:(t,n)=>t===n||s.isScalar(t)&&s.isScalar(n)&&t.value===n.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>r(e.key,n)))}},505:(e,t,n)=>{var s=n(366),i=n(1928),r=n(3264),o=n(7356),a=n(5805),c=n(9442),l=n(7763),u=n(5157),f=n(6791),h=n(9534),d=n(3848);class p{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,r.NODE_TYPE,{value:r.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===n&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:o}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new d.Directives({version:o}),this.setSchema(o,n),this.contents=void 0===e?null:this.createNode(e,s,n)}clone(){const e=Object.create(p.prototype,{[r.NODE_TYPE]:{value:r.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=r.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){m(this.contents)&&this.contents.add(e)}addIn(e,t){m(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=u.anchorNames(this);e.anchor=!t||n.has(t)?u.findNewAnchor(t||"a",n):t}return new s.Alias(e.anchor)}createNode(e,t,n){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===n&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:f}=n??{},{onAnchor:d,setAnchors:p,sourceObjects:m}=u.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:s,schema:this.schema,sourceObjects:m},g=h.createNode(e,f,y);return a&&r.isCollection(g)&&(g.flow=!0),p(),g}createPair(e,t,n={}){const s=this.createNode(e,null,n),i=this.createNode(t,null,n);return new o.Pair(s,i)}delete(e){return!!m(this.contents)&&this.contents.delete(e)}deleteIn(e){return i.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!m(this.contents)&&this.contents.deleteIn(e)}get(e,t){return r.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return i.isEmptyPath(e)?!t&&r.isScalar(this.contents)?this.contents.value:this.contents:r.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!r.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return i.isEmptyPath(e)?void 0!==this.contents:!!r.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=i.collectionFromPath(this.schema,[e],t):m(this.contents)&&this.contents.set(e,t)}setIn(e,t){i.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=i.collectionFromPath(this.schema,Array.from(e),t):m(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new d.Directives({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 d.Directives({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new c.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},c=a.toJS(this.contents,t??"",o);if("function"==typeof i)for(const{count:e,res:t}of o.anchors.values())i(t,e);return"function"==typeof r?f.applyReviver(r,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return l.stringifyDocument(this,e)}}function m(e){if(r.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t.Document=p},5157:(e,t,n)=>{var s=n(3264),i=n(9303);function r(e){const t=new Set;return i.visit(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function o(e,t){for(let n=1;;++n){const s=`${e}${n}`;if(!t.has(s))return s}}t.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},t.anchorNames=r,t.createNodeAnchors=function(e,t){const n=[],i=new Map;let a=null;return{onAnchor:s=>{n.push(s),a||(a=r(e));const i=o(t,a);return a.add(i),i},setAnchors:()=>{for(const e of n){const t=i.get(e);if("object"!=typeof t||!t.anchor||!s.isScalar(t.node)&&!s.isCollection(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:i}},t.findNewAnchor=o},6791:(e,t)=>{t.applyReviver=function e(t,n,s,i){if(i&&"object"==typeof i)if(Array.isArray(i))for(let n=0,s=i.length;n<s;++n){const s=i[n],r=e(t,i,String(n),s);void 0===r?delete i[n]:r!==s&&(i[n]=r)}else if(i instanceof Map)for(const n of Array.from(i.keys())){const s=i.get(n),r=e(t,i,n,s);void 0===r?i.delete(n):r!==s&&i.set(n,r)}else if(i instanceof Set)for(const n of Array.from(i)){const s=e(t,i,n,n);void 0===s?i.delete(n):s!==n&&(i.delete(n),i.add(s))}else for(const[n,s]of Object.entries(i)){const r=e(t,i,n,s);void 0===r?delete i[n]:r!==s&&(i[n]=r)}return t.call(n,s,i)}},9534:(e,t,n)=>{var s=n(366),i=n(3264),r=n(5738);t.createNode=function(e,t,n){if(i.isDocument(e)&&(e=e.contents),i.isNode(e))return e;if(i.isPair(e)){const t=n.schema[i.MAP].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:l,sourceObjects:u}=n;let f;if(o&&e&&"object"==typeof e){if(f=u.get(e),f)return f.anchor||(f.anchor=a(e)),new s.Alias(f.anchor);f={anchor:null,node:null},u.set(e,f)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let h=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),s=e.find((e=>!e.format))??e[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find((t=>t.identify?.(e)&&!t.format))}(e,t,l.tags);if(!h){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new r.Scalar(e);return f&&(f.node=t),t}h=e instanceof Map?l[i.MAP]:Symbol.iterator in Object(e)?l[i.SEQ]:l[i.MAP]}c&&(c(h),delete n.onTagObj);const d=h?.createNode?h.createNode(n.schema,e,n):"function"==typeof h?.nodeClass?.from?h.nodeClass.from(n.schema,e,n):new r.Scalar(e);return t?d.tag=t:h.default||(d.tag=h.tag),f&&(f.node=d),d}},3848:(e,t,n)=>{var s=n(3264),i=n(9303);const r={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class o{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},o.defaultYaml,e),this.tags=Object.assign({},o.defaultTags,t)}clone(){const e=new o(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new o(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:o.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},o.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:o.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},o.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),s=n.shift();switch(s){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,s]=n;return this.tags[e]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${s}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,s]=e.match(/^(.*!)([^!]*)$/s);s||t(`The ${e} tag has no suffix`);const i=this.tags[n];if(i)try{return i+decodeURIComponent(s)}catch(e){return t(String(e)),null}return"!"===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+e.substring(n.length).replace(/[!,[\]{}]/g,(e=>r[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let r;if(e&&n.length>0&&s.isNode(e.contents)){const t={};i.visit(e.contents,((e,n)=>{s.isNode(n)&&n.tag&&(t[n.tag]=!0)})),r=Object.keys(t)}else r=[];for(const[s,i]of n)"!!"===s&&"tag:yaml.org,2002:"===i||e&&!r.some((e=>e.startsWith(i)))||t.push(`%TAG ${s} ${i}`);return t.join("\n")}}o.defaultYaml={explicit:!1,version:"1.2"},o.defaultTags={"!!":"tag:yaml.org,2002:"},t.Directives=o},2981:(e,t)=>{class n extends Error{constructor(e,t,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=t}}t.YAMLError=n,t.YAMLParseError=class extends n{constructor(e,t,n){super("YAMLParseError",e,t,n)}},t.YAMLWarning=class extends n{constructor(e,t,n){super("YAMLWarning",e,t,n)}},t.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:s,col:i}=n.linePos[0];n.message+=` at line ${s}, column ${i}`;let r=i-1,o=e.substring(t.lineStarts[s-1],t.lineStarts[s]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const e=Math.min(r-39,o.length-79);o="…"+o.substring(e),r-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,r))){let n=e.substring(t.lineStarts[s-2],t.lineStarts[s-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===s&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-r)));const a=" ".repeat(r)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}}},4667:(e,t,n)=>{var s=n(1294),i=n(505),r=n(9442),o=n(2981),a=n(366),c=n(3264),l=n(7356),u=n(5738),f=n(8228),h=n(9248),d=(n(8575),n(5757)),p=n(862),m=n(654),y=n(3769),g=n(9303);s.Composer,i.Document,r.Schema,o.YAMLError,o.YAMLParseError,o.YAMLWarning,a.Alias,c.isAlias,c.isCollection,c.isDocument,c.isMap,c.isNode,c.isPair,c.isScalar,c.isSeq,l.Pair,u.Scalar,f.YAMLMap,h.YAMLSeq,d.Lexer,p.LineCounter,m.Parser,t.Qc=y.parse,y.parseAllDocuments,y.parseDocument,t.Pz=y.stringify,g.visit,g.visitAsync},4774:(e,t)=>{t.debug=function(e,...t){"debug"===e&&console.log(...t)},t.warn=function(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}},366:(e,t,n)=>{var s=n(5157),i=n(9303),r=n(3264),o=n(7384),a=n(5805);class c extends o.NodeBase{constructor(e){super(r.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return i.visit(e,{Node:(e,n)=>{if(n===this)return i.visit.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:s,maxAliasCount:i}=t,r=this.resolve(s);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=n.get(r);if(o||(a.toJS(r,null,t),o=n.get(r)),!o||void 0===o.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=l(s,r,n)),o.count*o.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return o.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(s.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${i} `}return i}}function l(e,t,n){if(r.isAlias(t)){const s=t.resolve(e),i=n&&s&&n.get(s);return i?i.count*i.aliasCount:0}if(r.isCollection(t)){let s=0;for(const i of t.items){const t=l(e,i,n);t>s&&(s=t)}return s}if(r.isPair(t)){const s=l(e,t.key,n),i=l(e,t.value,n);return Math.max(s,i)}return 1}t.Alias=c},1928:(e,t,n)=>{var s=n(9534),i=n(3264),r=n(7384);function o(e,t,n){let i=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){const e=[];e[n]=i,i=e}else i=new Map([[n,i]])}return s.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const a=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class c extends r.NodeBase{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((t=>i.isNode(t)||i.isPair(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(a(e))this.add(t);else{const[n,...s]=e,r=this.get(n,!0);if(i.isCollection(r))r.addIn(s,t);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`);this.set(n,o(this.schema,s,t))}}}deleteIn(e){const[t,...n]=e;if(0===n.length)return this.delete(t);const s=this.get(t,!0);if(i.isCollection(s))return s.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...s]=e,r=this.get(n,!0);return 0===s.length?!t&&i.isScalar(r)?r.value:r:i.isCollection(r)?r.getIn(s,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!i.isPair(t))return!1;const n=t.value;return null==n||e&&i.isScalar(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(0===n.length)return this.has(t);const s=this.get(t,!0);return!!i.isCollection(s)&&s.hasIn(n)}setIn(e,t){const[n,...s]=e;if(0===s.length)this.set(n,t);else{const e=this.get(n,!0);if(i.isCollection(e))e.setIn(s,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`);this.set(n,o(this.schema,s,t))}}}}t.Collection=c,t.collectionFromPath=o,t.isEmptyPath=a},7384:(e,t,n)=>{var s=n(6791),i=n(3264),r=n(5805);t.NodeBase=class{constructor(e){Object.defineProperty(this,i.NODE_TYPE,{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:o,reviver:a}={}){if(!i.isDocument(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},l=r.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?s.applyReviver(a,{"":l},"",l):l}}},7356:(e,t,n)=>{var s=n(9534),i=n(4418),r=n(6434),o=n(3264);class a{constructor(e,t=null){Object.defineProperty(this,o.NODE_TYPE,{value:o.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return o.isNode(t)&&(t=t.clone(e)),o.isNode(n)&&(n=n.clone(e)),new a(t,n)}toJSON(e,t){const n=t?.mapAsMap?new Map:{};return r.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?i.stringifyPair(this,e,t,n):JSON.stringify(this)}}t.Pair=a,t.createPair=function(e,t,n){const i=s.createNode(e,void 0,n),r=s.createNode(t,void 0,n);return new a(i,r)}},5738:(e,t,n)=>{var s=n(3264),i=n(7384),r=n(5805);class o extends i.NodeBase{constructor(e){super(s.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:r.toJS(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",t.Scalar=o,t.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},8228:(e,t,n)=>{var s=n(2970),i=n(6434),r=n(1928),o=n(3264),a=n(7356),c=n(5738);function l(e,t){const n=o.isScalar(t)?t.value:t;for(const s of e)if(o.isPair(s)){if(s.key===t||s.key===n)return s;if(o.isScalar(s.key)&&s.key.value===n)return s}}class u extends r.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:s,replacer:i}=n,r=new this(e),o=(e,o)=>{if("function"==typeof i)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==o||s)&&r.items.push(a.createPair(e,o,n))};if(t instanceof Map)for(const[e,n]of t)o(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r}add(e,t){let n;n=o.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e?.value);const s=l(this.items,n.key),i=this.schema?.sortMapEntries;if(s){if(!t)throw new Error(`Key ${n.key} already set`);o.isScalar(s.value)&&c.isScalarValue(n.value)?s.value.value=n.value:s.value=n.value}else if(i){const e=this.items.findIndex((e=>i(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=l(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=l(this.items,e),s=n?.value;return(!t&&o.isScalar(s)?s.value:s)??void 0}has(e){return!!l(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,n){const s=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(s);for(const e of this.items)i.addPairToJSMap(t,s,e);return s}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!o.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),s.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}t.YAMLMap=u,t.findPair=l},9248:(e,t,n)=>{var s=n(9534),i=n(2970),r=n(1928),o=n(3264),a=n(5738),c=n(5805);class l extends r.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(o.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=u(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=u(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&o.isScalar(s)?s.value:s}has(e){const t=u(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=u(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const s=this.items[n];o.isScalar(s)&&a.isScalarValue(t)?s.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let s=0;for(const e of this.items)n.push(c.toJS(e,String(s++),t));return n}toString(e,t,n){return e?i.stringifyCollection(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 e=0;for(let o of t){if("function"==typeof i){const n=t instanceof Set?o:String(e++);o=i.call(t,n,o)}r.items.push(s.createNode(o,void 0,n))}}return r}}function u(e){let t=o.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=l},6434:(e,t,n)=>{var s=n(4774),i=n(121),r=n(3264),o=n(5738),a=n(5805);function c(e,t,n){const s=e&&r.isAlias(n)?n.resolve(e.doc):n;if(!r.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,e,Map);for(const[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}t.addPairToJSMap=function(e,t,{key:n,value:l}){if(e?.doc.schema.merge&&(e=>"<<"===e||r.isScalar(e)&&"<<"===e.value&&(!e.type||e.type===o.Scalar.PLAIN))(n))if(l=r.isAlias(l)?l.resolve(e.doc):l,r.isSeq(l))for(const n of l.items)c(e,t,n);else if(Array.isArray(l))for(const n of l)c(e,t,n);else c(e,t,l);else{const o=a.toJS(n,"",e);if(t instanceof Map)t.set(o,a.toJS(l,o,e));else if(t instanceof Set)t.add(o);else{const c=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(r.isNode(e)&&n?.doc){const t=i.createStringifyContext(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),s.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(n,o,e),u=a.toJS(l,c,e);c in t?Object.defineProperty(t,c,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[c]=u}}return t}},3264:(e,t)=>{const n=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),a=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),l=e=>!!e&&"object"==typeof e&&e[c]===o;function u(e){if(e&&"object"==typeof e)switch(e[c]){case i:case a:return!0}return!1}t.ALIAS=n,t.DOC=s,t.MAP=i,t.NODE_TYPE=c,t.PAIR=r,t.SCALAR=o,t.SEQ=a,t.hasAnchor=e=>(l(e)||u(e))&&!!e.anchor,t.isAlias=e=>!!e&&"object"==typeof e&&e[c]===n,t.isCollection=u,t.isDocument=e=>!!e&&"object"==typeof e&&e[c]===s,t.isMap=e=>!!e&&"object"==typeof e&&e[c]===i,t.isNode=function(e){if(e&&"object"==typeof e)switch(e[c]){case n:case i:case o:case a:return!0}return!1},t.isPair=e=>!!e&&"object"==typeof e&&e[c]===r,t.isScalar=l,t.isSeq=e=>!!e&&"object"==typeof e&&e[c]===a},5805:(e,t,n)=>{var s=n(3264);t.toJS=function e(t,n,i){if(Array.isArray(t))return t.map(((t,n)=>e(t,String(n),i)));if(t&&"function"==typeof t.toJSON){if(!i||!s.hasAnchor(t))return t.toJSON(n,i);const e={aliasCount:0,count:1,res:void 0};i.anchors.set(t,e),i.onCreate=t=>{e.res=t,delete i.onCreate};const r=t.toJSON(n,i);return i.onCreate&&i.onCreate(r),r}return"bigint"!=typeof t||i?.keep?t:Number(t)}},1771:(e,t,n)=>{var s=n(1070),i=n(5147),r=n(2981),o=n(3955);function a(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function c(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const s=e.props.slice(1);let i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of s)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:s});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const s="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:s,source:t,end:i})}}}t.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:s,inFlow:i=!1,offset:r=-1,type:c="PLAIN"}=t,l=o.stringifyString({type:c,value:e},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:s,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n"),t=l.substring(0,e),n=l.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:r,indent:s,source:t}];return a(i,u)||i.push({type:"newline",offset:-1,indent:s,source:"\n"}),{type:"block-scalar",offset:r,indent:s,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:r,indent:s,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:r,indent:s,source:l,end:u};default:return{type:"scalar",offset:r,indent:s,source:l,end:u}}},t.resolveAsScalar=function(e,t=!0,n){if(e){const o=(e,t,s)=>{const i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!n)throw new r.YAMLParseError([i,i+1],t,s);n(i,t,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(e,t,o);case"block-scalar":return s.resolveBlockScalar({options:{strict:t}},e,o)}}return null},t.setScalarValue=function(e,t,n={}){let{afterKey:s=!1,implicitKey:i=!1,inFlow:r=!1,type:l}=n,u="indent"in e?e.indent:null;if(s&&"number"==typeof u&&(u+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");l=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const f=o.stringifyString({type:l,value:t},{implicitKey:i||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),s=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=s,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,r=[{type:"block-scalar-header",offset:t,indent:n,source:s}];a(r,"end"in e?e.end:void 0)||r.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:r,source:i})}}(e,f);break;case'"':c(e,f,"double-quoted-scalar");break;case"'":c(e,f,"single-quoted-scalar");break;default:c(e,f,"scalar")}}},896:(e,t)=>{function n(e){switch(e.type){case"block-scalar":{let t="";for(const s of e.props)t+=n(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=s(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=s(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=s(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function s({start:e,key:t,sep:s,value:i}){let r="";for(const t of e)r+=t.source;if(t&&(r+=n(t)),s)for(const e of s)r+=e.source;return i&&(r+=n(i)),r}t.stringify=e=>"type"in e?n(e):s(e)},5340:(e,t)=>{const n=Symbol("break visit"),s=Symbol("skip children"),i=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),o(Object.freeze([]),e,t)}function o(e,t,s){let r=s(t,e);if("symbol"==typeof r)return r;for(const a of["key","value"]){const c=t[a];if(c&&"items"in c){for(let t=0;t<c.items.length;++t){const r=o(Object.freeze(e.concat([[a,t]])),c.items[t],s);if("number"==typeof r)t=r-1;else{if(r===n)return n;r===i&&(c.items.splice(t,1),t-=1)}}"function"==typeof r&&"key"===a&&(r=r(t,e))}}return"function"==typeof r?r(t,e):r}r.BREAK=n,r.SKIP=s,r.REMOVE=i,r.itemAtPath=(e,t)=>{let n=e;for(const[e,s]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[s]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},t.visit=r},8575:(e,t,n)=>{var s=n(1771),i=n(896),r=n(5340);t.createScalarToken=s.createScalarToken,t.resolveAsScalar=s.resolveAsScalar,t.setScalarValue=s.setScalarValue,t.stringify=i.stringify,t.visit=r.visit,t.BOM="\ufeff",t.DOCUMENT="",t.FLOW_END="",t.SCALAR="",t.isCollection=e=>!!e&&"items"in e,t.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),t.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},t.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":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(e[0]){case" ":case"\t":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}},5757:(e,t,n)=>{var s=n(8575);function i(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const r=new Set("0123456789ABCDEFabcdef"),o=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),a=new Set(",[]{}"),c=new Set(" ,[]{}\n\r\t"),l=e=>!e||c.has(e);t.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+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("\r"===t){const t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"===t||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&i(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(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(null===e)return this.setNext("stream");if(e[0]===s.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){const s=e[n-1];if(" "===s||"\t"===s){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){const n=e[t-1];if(" "!==n&&"\t"!==n)break;t-=1}const s=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),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 s.DOCUMENT,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 e=this.peek(3);if(("---"===e||"..."===e)&&i(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!i(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)&&i(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)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(l),"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 r=this.getLine();if(null===r)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==r[0]||0===n&&(r.startsWith("---")||r.startsWith("..."))&&i(r[3]))&&(n!==this.indentNext-1||1!==this.flowLevel||"]"!==r[0]&&"}"!==r[0]))return this.flowLevel=0,yield s.FLOW_END,yield*this.parseLineStart();let o=0;for(;","===r[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),r[o]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-o),"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(l),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||i(e)||","===e)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(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let s=n.indexOf("\n",this.pos);if(-1!==s){for(;-1!==s;){const e=this.continueScalar(s+1);if(-1===e)break;s=n.indexOf("\n",e)}-1!==s&&(t=s-("\r"===n[s-1]?2:1))}if(-1===t){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((e=>i(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let s=this.pos;e=this.buffer[s];++s)switch(e){case" ":n+=1;break;case"\n":t=s,n=0;break;case"\r":{const e=this.buffer[s+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(e=this.buffer[i];" "===e;)e=this.buffer[++i];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,s=this.buffer[e];"\r"===s&&(s=this.buffer[--e]);const i=e;for(;" "===s;)s=this.buffer[--e];if(!("\n"===s&&e>=this.pos&&e+1+n>i))break;t=e}return yield s.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,n=this.pos-1,r=this.pos-1;for(;t=this.buffer[++r];)if(":"===t){const t=this.buffer[r+1];if(i(t)||e&&a.has(t))break;n=r}else if(i(t)){let s=this.buffer[r+1];if("\r"===t&&("\n"===s?(r+=1,t="\n",s=this.buffer[r+1]):n=r),"#"===s||e&&a.has(s))break;if("\n"===t){const e=this.continueScalar(r+1);if(-1===e)break;r=Math.max(r,e-2)}}else{if(e&&a.has(t))break;n=r}return t||this.atEnd?(yield s.SCALAR,yield*this.pushToIndex(n+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*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(l))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(i(t)||e&&a.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!i(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o.has(t))t=this.buffer[++e];else{if("%"!==t||!r.has(this.buffer[e+1])||!r.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},862:(e,t)=>{t.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}},654:(e,t,n)=>{var s=n(8575),i=n(5757);function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function o(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function a(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function c(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function l(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,a(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}t.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new i.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&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,process.env.LOG_TOKENS&&console.log("|",s.prettyToken(e)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=s.tokenType(e);if(t)if("scalar"===t)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 t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,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("doc-end"!==this.type||e&&"doc-end"===e.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===o(n.start)&&(0===t.indent||n.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==o(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}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("map-value-ind"===this.type){const t=l(c(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;"comment"===s?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s))return Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(s&&t.sep&&!t.value){const n=[];for(let s=0;s<t.sep.length;++s){const i=t.sep[s];switch(i.type){case"newline":n.push(s);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)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:i,key:null,sep:[this.sourceToken]}]});else if(a(t.key)&&!r(t.sep,"newline")){const e=l(t.start),n=t.key,s=t.sep;s.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:s}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=l(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:i,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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const t=this.startBlockValue(e);if(t)return n&&"block-seq"!==t.type&&e.items.push({start:i}),void this.stack.push(t)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;"comment"===s?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s))return Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!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]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=l(c(t));u(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+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=l(c(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=l(c(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},3769:(e,t,n)=>{var s=n(1294),i=n(505),r=n(2981),o=n(4774),a=n(862),c=n(654);function l(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new a.LineCounter||null,prettyErrors:t}}function u(e,t={}){const{lineCounter:n,prettyErrors:i}=l(t),o=new c.Parser(n?.addNewLine),a=new s.Composer(t);let u=null;for(const t of a.compose(o.parse(e),!0,e.length))if(u){if("silent"!==u.options.logLevel){u.errors.push(new r.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else u=t;return i&&n&&(u.errors.forEach(r.prettifyError(e,n)),u.warnings.forEach(r.prettifyError(e,n))),u}t.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=u(e,n);if(!i)return null;if(i.warnings.forEach((e=>o.warn(i.options.logLevel,e))),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))},t.parseAllDocuments=function(e,t={}){const{lineCounter:n,prettyErrors:i}=l(t),o=new c.Parser(n?.addNewLine),a=new s.Composer(t),u=Array.from(a.compose(o.parse(e)));if(i&&n)for(const t of u)t.errors.forEach(r.prettifyError(e,n)),t.warnings.forEach(r.prettifyError(e,n));return u.length>0?u:Object.assign([],{empty:!0},a.streamInfo())},t.parseDocument=u,t.stringify=function(e,t,n){let s=null;if("function"==typeof t||Array.isArray(t)?s=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){const e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=n??t??{};if(!e)return}return new i.Document(e,s,n).toString(n)}},9442:(e,t,n)=>{var s=n(3264),i=n(4457),r=n(4284),o=n(5077),a=n(8927);const c=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class l{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:l,schema:u,sortMapEntries:f,toStringDefaults:h}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.merge=!!n,this.name="string"==typeof u&&u||"core",this.knownTags=l?a.coreKnownTags:{},this.tags=a.getTags(t,this.name),this.toStringOptions=h??null,Object.defineProperty(this,s.MAP,{value:i.map}),Object.defineProperty(this,s.SCALAR,{value:o.string}),Object.defineProperty(this,s.SEQ,{value:r.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?c:null}clone(){const e=Object.create(l.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}t.Schema=l},4457:(e,t,n)=>{var s=n(3264),i=n(8228);const r={collection:"map",default:!0,nodeClass:i.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(s.isMap(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>i.YAMLMap.from(e,t,n)};t.map=r},4556:(e,t,n)=>{var s=n(5738);const i={identify:e=>null==e,createNode:()=>new s.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new s.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&i.test.test(e)?e:t.options.nullStr};t.nullTag=i},4284:(e,t,n)=>{var s=n(3264),i=n(9248);const r={collection:"seq",default:!0,nodeClass:i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(s.isSeq(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>i.YAMLSeq.from(e,t,n)};t.seq=r},5077:(e,t,n)=>{var s=n(3955);const i={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,i)=>(t=Object.assign({actualString:!0},t),s.stringifyString(e,t,n,i))};t.string=i},9882:(e,t,n)=>{var s=n(5738);const i={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new s.Scalar("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&i.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};t.boolTag=i},2612:(e,t,n)=>{var s=n(5738),i=n(6592);const r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new s.Scalar(parseFloat(e)),n=e.indexOf(".");return-1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:i.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=r},8893:(e,t,n)=>{var s=n(6592);const i=e=>"bigint"==typeof e||Number.isInteger(e),r=(e,t,n,{intAsBigInt:s})=>s?BigInt(e):parseInt(e.substring(t),n);function o(e,t,n){const{value:r}=e;return i(r)&&r>=0?n+r.toString(t):s.stringifyNumber(e)}const a={identify:e=>i(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>r(e,2,8,n),stringify:e=>o(e,8,"0o")},c={identify:i,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:s.stringifyNumber},l={identify:e=>i(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>o(e,16,"0x")};t.int=c,t.intHex=l,t.intOct=a},3156:(e,t,n)=>{var s=n(4457),i=n(4556),r=n(4284),o=n(5077),a=n(9882),c=n(2612),l=n(8893);const u=[s.map,r.seq,o.string,i.nullTag,a.boolTag,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float];t.schema=u},3535:(e,t,n)=>{var s=n(5738),i=n(4457),r=n(4284);function o(e){return"bigint"==typeof e||Number.isInteger(e)}const a=({value:e})=>JSON.stringify(e),c=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:a},{identify:e=>null==e,createNode:()=>new s.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:a},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:a},{identify:o,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>o(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:a}],l={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},u=[i.map,r.seq].concat(c,l);t.schema=u},8927:(e,t,n)=>{var s=n(4457),i=n(4556),r=n(4284),o=n(5077),a=n(9882),c=n(2612),l=n(8893),u=n(3156),f=n(3535),h=n(8062),d=n(9497),p=n(6780),m=n(2321),y=n(1114),g=n(4849);const v=new Map([["core",u.schema],["failsafe",[s.map,r.seq,o.string]],["json",f.schema],["yaml11",m.schema],["yaml-1.1",m.schema]]),b={binary:h.binary,bool:a.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:g.floatTime,int:l.int,intHex:l.intHex,intOct:l.intOct,intTime:g.intTime,map:s.map,null:i.nullTag,omap:d.omap,pairs:p.pairs,seq:r.seq,set:y.set,timestamp:g.timestamp},w={"tag:yaml.org,2002:binary":h.binary,"tag:yaml.org,2002:omap":d.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":y.set,"tag:yaml.org,2002:timestamp":g.timestamp};t.coreKnownTags=w,t.getTags=function(e,t){let n=v.get(t);if(!n){if(!Array.isArray(e)){const e=Array.from(v.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}n=[]}if(Array.isArray(e))for(const t of e)n=n.concat(t);else"function"==typeof e&&(n=e(n.slice()));return n.map((e=>{if("string"!=typeof e)return e;const t=b[e];if(t)return t;const n=Object.keys(b).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}},8062:(e,t,n)=>{var s=n(5738),i=n(3955);const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,o,a){const c=n;let l;if("function"==typeof Buffer)l=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(t||(t=s.Scalar.BLOCK_LITERAL),t!==s.Scalar.QUOTE_DOUBLE){const e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(l.length/e),i=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)i[t]=l.substr(s,e);l=i.join(t===s.Scalar.BLOCK_LITERAL?"\n":" ")}return i.stringifyString({comment:e,type:t,value:l},r,o,a)}};t.binary=r},601:(e,t,n)=>{var s=n(5738);function i({value:e,source:t},n){return t&&(e?r:o).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const r={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new s.Scalar(!0),stringify:i},o={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new s.Scalar(!1),stringify:i};t.falseTag=o,t.trueTag=r},7381:(e,t,n)=>{var s=n(5738),i=n(6592);const r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new s.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){const s=e.substring(n+1).replace(/_/g,"");"0"===s[s.length-1]&&(t.minFractionDigits=s.length)}return t},stringify:i.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=r},8861:(e,t,n)=>{var s=n(6592);const i=e=>"bigint"==typeof e||Number.isInteger(e);function r(e,t,n,{intAsBigInt:s}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const r=parseInt(e,n);return"-"===i?-1*r:r}function o(e,t,n){const{value:r}=e;if(i(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return s.stringifyNumber(e)}const a={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>r(e,2,2,n),stringify:e=>o(e,2,"0b")},c={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>r(e,1,8,n),stringify:e=>o(e,8,"0")},l={identify:i,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:s.stringifyNumber},u={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>o(e,16,"0x")};t.int=l,t.intBin=a,t.intHex=u,t.intOct=c},9497:(e,t,n)=>{var s=n(3264),i=n(5805),r=n(8228),o=n(9248),a=n(6780);class c extends o.YAMLSeq{constructor(){super(),this.add=r.YAMLMap.prototype.add.bind(this),this.delete=r.YAMLMap.prototype.delete.bind(this),this.get=r.YAMLMap.prototype.get.bind(this),this.has=r.YAMLMap.prototype.has.bind(this),this.set=r.YAMLMap.prototype.set.bind(this),this.tag=c.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t?.onCreate&&t.onCreate(n);for(const e of this.items){let r,o;if(s.isPair(e)?(r=i.toJS(e.key,"",t),o=i.toJS(e.value,r,t)):r=i.toJS(e,"",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 s=a.createPairs(e,t,n),i=new this;return i.items=s.items,i}}c.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a.resolvePairs(e,t),i=[];for(const{key:e}of n.items)s.isScalar(e)&&(i.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):i.push(e.value));return Object.assign(new c,n)},createNode:(e,t,n)=>c.from(e,t,n)};t.YAMLOMap=c,t.omap=l},6780:(e,t,n)=>{var s=n(3264),i=n(7356),r=n(5738),o=n(9248);function a(e,t){if(s.isSeq(e))for(let n=0;n<e.items.length;++n){let o=e.items[n];if(!s.isPair(o)){if(s.isMap(o)){o.items.length>1&&t("Each pair must have its own sequence indicator");const e=o.items[0]||new i.Pair(new r.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[n]=s.isPair(o)?o:new i.Pair(o)}}else t("Expected a sequence for this tag");return e}function c(e,t,n){const{replacer:s}=n,r=new o.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,c;if("function"==typeof s&&(e=s.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);o=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);o=t[0],c=e[o]}else o=e;r.items.push(i.createPair(o,c,n))}return r}const l={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a,createNode:c};t.createPairs=c,t.pairs=l,t.resolvePairs=a},2321:(e,t,n)=>{var s=n(4457),i=n(4556),r=n(4284),o=n(5077),a=n(8062),c=n(601),l=n(7381),u=n(8861),f=n(9497),h=n(6780),d=n(1114),p=n(4849);const m=[s.map,r.seq,o.string,i.nullTag,c.trueTag,c.falseTag,u.intBin,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float,a.binary,f.omap,h.pairs,d.set,p.intTime,p.floatTime,p.timestamp];t.schema=m},1114:(e,t,n)=>{var s=n(3264),i=n(7356),r=n(8228);class o extends r.YAMLMap{constructor(e){super(e),this.tag=o.tag}add(e){let t;t=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new i.Pair(e.key,null):new i.Pair(e,null),r.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=r.findPair(this.items,e);return!t&&s.isPair(n)?s.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=r.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new i.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:s}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof s&&(e=s.call(t,e,e)),r.items.push(i.createPair(e,null,n));return r}}o.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:e=>e instanceof Set,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>o.from(e,t,n),resolve(e,t){if(s.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new o,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=o,t.set=a},4849:(e,t,n)=>{var s=n(6592);function i(e,t){const n=e[0],s="-"===n||"+"===n?e.substring(1):e,i=e=>t?BigInt(e):Number(e),r=s.replace(/_/g,"").split(":").reduce(((e,t)=>e*i(60)+i(t)),i(0));return"-"===n?i(-1)*r:r}function r(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return s.stringifyNumber(e);let i="";t<0&&(i="-",t*=n(-1));const r=n(60),o=[t%r];return t<60?o.unshift(0):(t=(t-o[0])/r,o.unshift(t%r),t>=60&&(t=(t-o[0])/r,o.unshift(t))),i+o.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const o={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>i(e,n),stringify:r},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>i(e,!1),stringify:r},c={identify:e=>e 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(e){const t=e.match(c.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,s,r,o,a,l]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let f=Date.UTC(n,s-1,r,o||0,a||0,l||0,u);const h=t[8];if(h&&"Z"!==h){let e=i(h,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=a,t.intTime=o,t.timestamp=c},4168:(e,t)=>{const n="block",s="quoted";function i(e,t,n){let s=t,i=t+1,r=e[i];for(;" "===r||"\t"===r;)if(t<i+n)r=e[++t];else{do{r=e[++t]}while(r&&"\n"!==r);s=t,i=t+1,r=e[i]}return s}t.FOLD_BLOCK=n,t.FOLD_FLOW="flow",t.FOLD_QUOTED=s,t.foldFlowLines=function(e,t,r="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;a<c&&(c=0);const f=Math.max(1+c,1+a-t.length);if(e.length<=f)return e;const h=[],d={};let p,m,y=a-t.length;"number"==typeof o&&(o>a-Math.max(2,c)?h.push(0):y=a-o);let g=!1,v=-1,b=-1,w=-1;r===n&&(v=i(e,v,t.length),-1!==v&&(y=v+f));for(let o;o=e[v+=1];){if(r===s&&"\\"===o){switch(b=v,e[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}w=v}if("\n"===o)r===n&&(v=i(e,v,t.length)),y=v+t.length+f,p=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[v+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=v)}if(v>=y)if(p)h.push(p),y=p+f,p=void 0;else if(r===s){for(;" "===m||"\t"===m;)m=o,o=e[v+=1],g=!0;const t=v>w+1?v-2:b-1;if(d[t])return e;h.push(t),d[t]=!0,y=t+f,p=void 0}else g=!0}m=o}if(g&&u&&u(),0===h.length)return e;l&&l();let S=e.slice(0,h[0]);for(let n=0;n<h.length;++n){const i=h[n],o=h[n+1]||e.length;0===i?S=`\n${t}${e.slice(0,o)}`:(r===s&&d[i]&&(S+=`${e[i]}\\`),S+=`\n${t}${e.slice(i+1,o)}`)}return S}},121:(e,t,n)=>{var s=n(5157),i=n(3264),r=n(1705),o=n(3955);t.createStringifyContext=function(e,t){const n=Object.assign({blockQuote:!0,commentString:r.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof n.indent?" ".repeat(n.indent):" ",inFlow:s,options:n}},t.stringify=function(e,t,n,r){if(i.isPair(e))return e.toString(t,n,r);if(i.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const c=i.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a||(a=function(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))??n[0]}let n,s;if(i.isScalar(t)){s=t.value;const i=e.filter((e=>e.identify?.(s)));n=i.find((e=>e.format===t.format))??i.find((e=>!e.format))}else s=t,n=e.find((e=>e.nodeClass&&s instanceof e.nodeClass));if(!n)throw new Error(`Tag not resolved for ${s?.constructor?.name??typeof s} value`);return n}(t.doc.schema.tags,c));const l=function(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],a=(i.isScalar(e)||i.isCollection(e))&&e.anchor;a&&s.anchorIsValid(a)&&(n.add(a),o.push(`&${a}`));const c=e.tag?e.tag:t.default?null:t.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}(c,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(c,t,n,r):i.isScalar(c)?o.stringifyString(c,t,n,r):c.toString(t,n,r);return l?i.isScalar(c)||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}},2970:(e,t,n)=>{var s=n(3264),i=n(121),r=n(1705);function o({comment:e,items:t},n,{blockItemPrefix:o,flowChars:a,itemIndent:l,onChompKeep:u,onComment:f}){const{indent:h,options:{commentString:d}}=n,p=Object.assign({},n,{indent:l,type:null});let m=!1;const y=[];for(let e=0;e<t.length;++e){const a=t[e];let u=null;if(s.isNode(a))!m&&a.spaceBefore&&y.push(""),c(n,y,a.commentBefore,m),a.comment&&(u=a.comment);else if(s.isPair(a)){const e=s.isNode(a.key)?a.key:null;e&&(!m&&e.spaceBefore&&y.push(""),c(n,y,e.commentBefore,m))}m=!1;let f=i.stringify(a,p,(()=>u=null),(()=>m=!0));u&&(f+=r.lineComment(f,l,d(u))),m&&u&&(m=!1),y.push(o+f)}let g;if(0===y.length)g=a.start+a.end;else{g=y[0];for(let e=1;e<y.length;++e){const t=y[e];g+=t?`\n${h}${t}`:"\n"}}return e?(g+="\n"+r.indentComment(d(e),h),f&&f()):m&&u&&u(),g}function a({items:e},t,{flowChars:n,itemIndent:o}){const{indent:a,indentStep:l,flowCollectionPadding:u,options:{commentString:f}}=t;o+=l;const h=Object.assign({},t,{indent:o,inFlow:!0,type:null});let d=!1,p=0;const m=[];for(let n=0;n<e.length;++n){const a=e[n];let l=null;if(s.isNode(a))a.spaceBefore&&m.push(""),c(t,m,a.commentBefore,!1),a.comment&&(l=a.comment);else if(s.isPair(a)){const e=s.isNode(a.key)?a.key:null;e&&(e.spaceBefore&&m.push(""),c(t,m,e.commentBefore,!1),e.comment&&(d=!0));const n=s.isNode(a.value)?a.value:null;n?(n.comment&&(l=n.comment),n.commentBefore&&(d=!0)):null==a.value&&e?.comment&&(l=e.comment)}l&&(d=!0);let u=i.stringify(a,h,(()=>l=null));n<e.length-1&&(u+=","),l&&(u+=r.lineComment(u,o,f(l))),!d&&(m.length>p||u.includes("\n"))&&(d=!0),m.push(u),p=m.length}const{start:y,end:g}=n;if(0===m.length)return y+g;if(!d){const e=m.reduce(((e,t)=>e+t.length+2),2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(d){let e=y;for(const t of m)e+=t?`\n${l}${a}${t}`:"\n";return`${e}\n${a}${g}`}return`${y}${u}${m.join(" ")}${u}${g}`}function c({indent:e,options:{commentString:t}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const i=r.indentComment(t(s),e);n.push(i.trimStart())}}t.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?a:o)(e,t,n)}},1705:(e,t)=>{function n(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}t.indentComment=n,t.lineComment=(e,t,s)=>e.endsWith("\n")?n(s,t):s.includes("\n")?"\n"+n(s,t):(e.endsWith(" ")?"":" ")+s,t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},7763:(e,t,n)=>{var s=n(3264),i=n(121),r=n(1705);t.stringifyDocument=function(e,t){const n=[];let o=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(n.push(t),o=!0):e.directives.docStart&&(o=!0)}o&&n.push("---");const a=i.createStringifyContext(e,t),{commentString:c}=a.options;if(e.commentBefore){1!==n.length&&n.unshift("");const t=c(e.commentBefore);n.unshift(r.indentComment(t,""))}let l=!1,u=null;if(e.contents){if(s.isNode(e.contents)){if(e.contents.spaceBefore&&o&&n.push(""),e.contents.commentBefore){const t=c(e.contents.commentBefore);n.push(r.indentComment(t,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const t=u?void 0:()=>l=!0;let f=i.stringify(e.contents,a,(()=>u=null),t);u&&(f+=r.lineComment(f,"",c(u))),"|"!==f[0]&&">"!==f[0]||"---"!==n[n.length-1]?n.push(f):n[n.length-1]=`--- ${f}`}else n.push(i.stringify(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=c(e.comment);t.includes("\n")?(n.push("..."),n.push(r.indentComment(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&l&&(t=t.replace(/^\n+/,"")),t&&(l&&!u||""===n[n.length-1]||n.push(""),n.push(r.indentComment(c(t),"")))}return n.join("\n")+"\n"}},6592:(e,t)=>{t.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:s}){if("bigint"==typeof s)return String(s);const i="number"==typeof s?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(s);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(r)){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let n=t-(r.length-e-1);for(;n-- >0;)r+="0"}return r}},4418:(e,t,n)=>{var s=n(3264),i=n(5738),r=n(121),o=n(1705);t.stringifyPair=function({key:e,value:t},n,a,c){const{allNullValues:l,doc:u,indent:f,indentStep:h,options:{commentString:d,indentSeq:p,simpleKeys:m}}=n;let y=s.isNode(e)&&e.comment||null;if(m){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(s.isCollection(e)||!s.isNode(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let g=!m&&(!e||y&&null==t&&!n.inFlow||s.isCollection(e)||(s.isScalar(e)?e.type===i.Scalar.BLOCK_FOLDED||e.type===i.Scalar.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(m||!l),indent:f+h});let v,b,w,S=!1,k=!1,N=r.stringify(e,n,(()=>S=!0),(()=>k=!0));if(!g&&!n.inFlow&&N.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(l||null==t)return S&&a&&a(),""===N?"?":g?`? ${N}`:N}else if(l&&!m||null==t&&g)return N=`? ${N}`,y&&!S?N+=o.lineComment(N,n.indent,d(y)):k&&c&&c(),N;S&&(y=null),g?(y&&(N+=o.lineComment(N,n.indent,d(y))),N=`? ${N}\n${f}:`):(N=`${N}:`,y&&(N+=o.lineComment(N,n.indent,d(y)))),s.isNode(t)?(v=!!t.spaceBefore,b=t.commentBefore,w=t.comment):(v=!1,b=null,w=null,t&&"object"==typeof t&&(t=u.createNode(t))),n.implicitKey=!1,g||y||!s.isScalar(t)||(n.indentAtStart=N.length+1),k=!1,p||!(h.length>=2)||n.inFlow||g||!s.isSeq(t)||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let E=!1;const A=r.stringify(t,n,(()=>E=!0),(()=>k=!0));let O=" ";if(y||v||b){if(O=v?"\n":"",b){const e=d(b);O+=`\n${o.indentComment(e,n.indent)}`}""!==A||n.inFlow?O+=`\n${n.indent}`:"\n"===O&&(O="\n\n")}else if(!g&&s.isCollection(t)){const e=A[0],s=A.indexOf("\n"),i=-1!==s,r=n.inFlow??t.flow??0===t.items.length;if(i||!r){let t=!1;if(i&&("&"===e||"!"===e)){let n=A.indexOf(" ");"&"===e&&-1!==n&&n<s&&"!"===A[n+1]&&(n=A.indexOf(" ",n+1)),(-1===n||s<n)&&(t=!0)}t||(O=`\n${n.indent}`)}}else""!==A&&"\n"!==A[0]||(O="");return N+=O+A,n.inFlow?E&&a&&a():w&&!E?N+=o.lineComment(N,n.indent,d(w)):k&&c&&c(),N}},3955:(e,t,n)=>{var s=n(5738),i=n(4168);const r=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),o=e=>/^(%|---|\.\.\.)/m.test(e);function a(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:s}=t,a=t.options.doubleQuotedMinMultiLineLength,c=t.indent||(o(e)?" ":"");let l="",u=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(l+=n.slice(u,e)+"\\ ",e+=1,u=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{l+=n.slice(u,e);const t=n.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=n.substr(e,6)}e+=5,u=e+1}break;case"n":if(s||'"'===n[e+2]||n.length<a)e+=1;else{for(l+=n.slice(u,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)l+="\n",e+=2;l+=c," "===n[e+2]&&(l+="\\"),e+=1,u=e+1}break;default:e+=1}return l=u?l+n.slice(u):n,s?l:i.foldFlowLines(l,c,i.FOLD_QUOTED,r(t,!1))}function c(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return a(e,t);const n=t.indent||(o(e)?" ":""),s="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?s:i.foldFlowLines(s,n,i.FOLD_FLOW,r(t,!1))}function l(e,t){const{singleQuote:n}=t.options;let s;if(!1===n)s=a;else{const t=e.includes('"'),i=e.includes("'");s=t&&!i?c:i&&!t?a:n?c:a}return s(e,t)}let u;try{u=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{u=/\n+(?!\n|$)/g}function f({comment:e,type:t,value:n},a,c,f){const{blockQuote:h,commentString:d,lineWidth:p}=a.options;if(!h||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return l(n,a);const m=a.indent||(a.forceBlockIndent||o(n)?" ":""),y="literal"===h||"folded"!==h&&t!==s.Scalar.BLOCK_FOLDED&&(t===s.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const s=t-n,i=e.length;if(i<=s)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>s)return!0;if(n=t+1,i-n<=s)return!1}return!0}(n,p,m.length));if(!n)return y?"|\n":">\n";let g,v;for(v=n.length;v>0;--v){const e=n[v-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let b=n.substring(v);const w=b.indexOf("\n");-1===w?g="-":n===b||w!==b.length-1?(g="+",f&&f()):g="",b&&(n=n.slice(0,-b.length),"\n"===b[b.length-1]&&(b=b.slice(0,-1)),b=b.replace(u,`$&${m}`));let S,k=!1,N=-1;for(S=0;S<n.length;++S){const e=n[S];if(" "===e)k=!0;else{if("\n"!==e)break;N=S}}let E=n.substring(0,N<S?N+1:S);E&&(n=n.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let A=(y?"|":">")+(k?m?"2":"1":"")+g;return e&&(A+=" "+d(e.replace(/ ?[\r\n]+/g," ")),c&&c()),y?`${A}\n${m}${E}${n=n.replace(/\n+/g,`$&${m}`)}${b}`:(n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`),`${A}\n${m}${i.foldFlowLines(`${E}${n}${b}`,m,i.FOLD_BLOCK,r(a,!0))}`)}t.stringifyString=function(e,t,n,u){const{implicitKey:h,inFlow:d}=t,p="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:m}=e;m!==s.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(p.value)&&(m=s.Scalar.QUOTE_DOUBLE);const y=e=>{switch(e){case s.Scalar.BLOCK_FOLDED:case s.Scalar.BLOCK_LITERAL:return h||d?l(p.value,t):f(p,t,n,u);case s.Scalar.QUOTE_DOUBLE:return a(p.value,t);case s.Scalar.QUOTE_SINGLE:return c(p.value,t);case s.Scalar.PLAIN:return function(e,t,n,a){const{type:c,value:u}=e,{actualString:h,implicitKey:d,indent:p,indentStep:m,inFlow:y}=t;if(d&&u.includes("\n")||y&&/[[\]{},]/.test(u))return l(u,t);if(!u||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return d||y||!u.includes("\n")?l(u,t):f(e,t,n,a);if(!d&&!y&&c!==s.Scalar.PLAIN&&u.includes("\n"))return f(e,t,n,a);if(o(u)){if(""===p)return t.forceBlockIndent=!0,f(e,t,n,a);if(d&&p===m)return l(u,t)}const g=u.replace(/\n+/g,`$&\n${p}`);if(h){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(g),{compat:n,tags:s}=t.doc.schema;if(s.some(e)||n?.some(e))return l(u,t)}return d?g:i.foldFlowLines(g,p,i.FOLD_FLOW,r(t,!1))}(p,t,n,u);default:return null}};let g=y(m);if(null===g){const{defaultKeyType:e,defaultStringType:n}=t.options,s=h&&e||n;if(g=y(s),null===g)throw new Error(`Unsupported default string type ${s}`)}return g}},9303:(e,t,n)=>{var s=n(3264);const i=Symbol("break visit"),r=Symbol("skip children"),o=Symbol("remove node");function a(e,t){const n=f(t);s.isDocument(e)?c(null,e.contents,n,Object.freeze([e]))===o&&(e.contents=null):c(null,e,n,Object.freeze([]))}function c(e,t,n,r){const a=h(e,t,n,r);if(s.isNode(a)||s.isPair(a))return d(e,r,a),c(e,a,n,r);if("symbol"!=typeof a)if(s.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const s=c(e,t.items[e],n,r);if("number"==typeof s)e=s-1;else{if(s===i)return i;s===o&&(t.items.splice(e,1),e-=1)}}}else if(s.isPair(t)){r=Object.freeze(r.concat(t));const e=c("key",t.key,n,r);if(e===i)return i;e===o&&(t.key=null);const s=c("value",t.value,n,r);if(s===i)return i;s===o&&(t.value=null)}return a}async function l(e,t){const n=f(t);s.isDocument(e)?await u(null,e.contents,n,Object.freeze([e]))===o&&(e.contents=null):await u(null,e,n,Object.freeze([]))}async function u(e,t,n,r){const a=await h(e,t,n,r);if(s.isNode(a)||s.isPair(a))return d(e,r,a),u(e,a,n,r);if("symbol"!=typeof a)if(s.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const s=await u(e,t.items[e],n,r);if("number"==typeof s)e=s-1;else{if(s===i)return i;s===o&&(t.items.splice(e,1),e-=1)}}}else if(s.isPair(t)){r=Object.freeze(r.concat(t));const e=await u("key",t.key,n,r);if(e===i)return i;e===o&&(t.key=null);const s=await u("value",t.value,n,r);if(s===i)return i;s===o&&(t.value=null)}return a}function f(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function h(e,t,n,i){return"function"==typeof n?n(e,t,i):s.isMap(t)?n.Map?.(e,t,i):s.isSeq(t)?n.Seq?.(e,t,i):s.isPair(t)?n.Pair?.(e,t,i):s.isScalar(t)?n.Scalar?.(e,t,i):s.isAlias(t)?n.Alias?.(e,t,i):void 0}function d(e,t,n){const i=t[t.length-1];if(s.isCollection(i))i.items[e]=n;else if(s.isPair(i))"key"===e?i.key=n:i.value=n;else{if(!s.isDocument(i)){const e=s.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}i.contents=n}}a.BREAK=i,a.SKIP=r,a.REMOVE=o,l.BREAK=i,l.SKIP=r,l.REMOVE=o,t.visit=a,t.visitAsync=l}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{n.r(s),n.d(s,{FtpClient:()=>F,FtpClientPool:()=>U,GrpcList:()=>G,JsonStorage:()=>S,PuboFileSystem:()=>H,RosTopic:()=>je,RosTopicManager:()=>$e,SIGKILL:()=>ce,createRpcClient:()=>W,getNetworks:()=>we,getProcessByPpid:()=>pe,getProcessCommandByPid:()=>de,getProcessCpuUseByPid:()=>he,getProcessName:()=>fe,getProcessTree:()=>me,getWifiName:()=>be,heartbeat:()=>ge,isPortAvailable:()=>ve,isProcessDied:()=>ue});const e=require("fs");function t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function i(){}function r(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(s.key))?i:String(i)),s)}var i}var o=function(){function e(){this.cache=[],this.running=!1,this.len=0}var n,s,o=e.prototype;return o._run=function(e){var n,s,i=e.fn,r=e.promise;try{return t((n=function(e,t){try{var n=function(e,t,n){try{var s=Promise.resolve(e());return t?s.then(t):s}catch(e){return Promise.reject(e)}}(i,(function(e){r.resolve(e)}))}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,(function(e){r.reject(e)})),s=function(){i=null,r=null},n&&n.then?n.then(s):s()))}catch(e){return Promise.reject(e)}},o.run=function(){try{var e=this;if(e.cache.length<1)return e.running=!1,t();e.running=!0;var n=e.cache.shift();return e.len-=1,t((s=function(){e.run()},(r=function(){if("function"==typeof n.fn)return(t=e._run(n))&&t.then?t.then(i):Promise.resolve();var t}())&&r.then?r.then(s):s()))}catch(e){return Promise.reject(e)}var s,r},o.push=function(e){var t=this;return this.len+=1,new Promise((function(n,s){t.cache.push({fn:e,promise:{resolve:n,reject:s}}),t.running||t.run()}))},n=e,(s=[{key:"length",get:function(){return this.len}}])&&r(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),e}();const a=require("crypto");var c=n.n(a);const l={randomUUID:c().randomUUID},u=new Uint8Array(256);let f=u.length;function h(){return f>u.length-16&&(c().randomFillSync(u),f=0),u.slice(f,f+=16)}const d=[];for(let e=0;e<256;++e)d.push((e+256).toString(16).slice(1));const p=function(e,t,n){if(l.randomUUID&&!t&&!e)return l.randomUUID();const s=(e=e||{}).random||(e.rng||h)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=s[e];return t}return function(e,t=0){return d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]}(s)};function m(){}var y=n(5001);function g(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()}var v=function(){function t(e,t){var n=this;this.path=void 0,this._state={},this.queue=new o,this.key=void 0,this.defaultState=void 0,this.path=e,this.defaultState=t,this.key=encodeURIComponent(e),y.on("online",(function(e){e.on("message",(function(t){n.onMessage(t,e),t=null}))})),y.on("exit",(function(e){e.removeAllListeners("message"),e=null})),this.restore(),global.GlobalEmitter?global.GlobalEmitter.on("SIGINT",this.kill.bind(this)):process.on("SIGINT",(function(){n.kill().then((function(){return process.exit(0)}))}))}var n=t.prototype;return n.kill=function(){try{var e=this;return b(g(e.queue.push((function(){return e.syncFile()}))))}catch(e){return Promise.reject(e)}},n.onMessage=function(e,t){try{var n,s=this;return e.key!==s.key?b():b((i=function(){t.send({uid:e.uid,key:s.key,payload:n}),e=null,t=null},(r="get"===e.type?b(s.getState(),(function(e){n=e})):function(e){var t=e();if(t&&t.then)return t.then(m)}((function(){if("set"===e.type)return b(s.setState(e.payload),(function(e){n=e}))})))&&r.then?r.then(i):i()))}catch(e){return Promise.reject(e)}var i,r},n.sync=function(){this.queue.length>0||this.queue.push(this._syncFile.bind(this))},n.syncFile=function(){(0,e.writeFileSync)(this.path,JSON.stringify(this._state))},n._syncFile=function(){try{var t=this;return b(new Promise((function(n,s){(0,e.writeFile)(t.path,JSON.stringify(t._state),(function(e){e?s(e):setTimeout(n,100)}))})))}catch(e){return Promise.reject(e)}},n.restore=function(){try{var t=(0,e.readFileSync)(this.path);this._state=JSON.parse(t.toString())}catch(t){var n,s="win32"===process.platform?"\\":"/";s&&(0,e.mkdirSync)(this.path.split(s).slice(0,-1).join(s),{recursive:!0}),this.setState(null!=(n=this.defaultState)?n:{})}},n.getState=function(){try{return b(this._state)}catch(e){return Promise.reject(e)}},n.setState=function(e){try{return this._state=e,this.sync(),b()}catch(e){return Promise.reject(e)}},t}();function b(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var w=function(){function e(e){this.key=void 0,this.callback={},this.key=encodeURIComponent(e),process.on("message",this.onMessage.bind(this))}var t=e.prototype;return t.onMessage=function(e){e.key===this.key&&("function"==typeof this.callback[e.uid]&&(this.callback[e.uid](e.payload),delete this.callback[e.uid]),e=null)},t.call=function(e){var t=e.type,n=e.payload;try{var s=this;return b(new Promise((function(e){var i=p();s.callback[i]=function(t){return e(t)},process.send({uid:i,type:t,payload:n,key:s.key}),n=null,t=null})))}catch(e){return Promise.reject(e)}},t.getState=function(){try{return b(this.call({type:"get",payload:{}}))}catch(e){return Promise.reject(e)}},t.setState=function(e){try{return b(this.call({type:"set",payload:e}))}catch(e){return Promise.reject(e)}},e}(),S=function(){function e(e,t){var n;void 0===t&&(t={}),this.instance=void 0,this.queue=new o,y.isPrimary?this.instance=new v(e,t.defaultState):this.instance=new w(e),null!=(n=t)&&n.initialState&&this.merge(t.initialState)}var t=e.prototype;return t.getState=function(){try{var e=this;return b(e.queue.push(e.instance.getState.bind(e.instance)))}catch(e){return Promise.reject(e)}},t.setState=function(e){try{var t=this;return b(t.queue.push((function(){return t.instance.setState(e)})))}catch(e){return Promise.reject(e)}},t.get=function(e){try{return e?b(this.getState(),(function(t){return t[e]})):b(this.getState())}catch(e){return Promise.reject(e)}},t.set=function(e,t){try{var n=this;return b(n.getState(),(function(s){return s[e]=t,g(n.setState(s))}))}catch(e){return Promise.reject(e)}},t.merge=function(e){try{var t=this;return b(t.getState(),(function(n){for(var s=0,i=Object.keys(e);s<i.length;s++){var r=i[s];n[r]=e[r]}return g(t.setState(n))}))}catch(e){return Promise.reject(e)}},t.remove=function(e){try{var t=this;return b(t.getState(),(function(n){return delete n[e],g(t.setState(n))}))}catch(e){return Promise.reject(e)}},e}(),k=function(e){void 0===e&&(e=8);var t=function(e){return Math.random().toString(32).slice(2,2+e)};if(e<=8)return t(e);for(var n="",s=0;s<=e;s+=8)n+=t(e-s>8?8:e-s);return n};function N(){}var E,A=(E=function(e){return(t=new Promise((function(t){var n=setTimeout((function(){t(),clearTimeout(n),n=null}),e)})))&&t.then?t.then(N):Promise.resolve();var t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(E.apply(this,e))}catch(e){return Promise.reject(e)}});function O(){}function T(e,t,n){if(n)return t?t(e()):e();try{var s=Promise.resolve(e());return t?s.then(t):s}catch(e){return Promise.reject(e)}}var P=function(e,t){var n=!0,s=function(){n=!1},i=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return o=function(){return o=function(){n?i():(i=null,e=null,s=null,n=null,t=null)},(r=A(t))&&r.then||(r=Promise.resolve(r)),o?r.then(o):r;var r,o},(r=function(t,n){try{var s=T(e,O,i)}catch(e){return n(e)}var i;return s&&s.then?s.then(void 0,n):s}(0,(function(e){console.log(e)})))&&r.then?r.then(o):o();var r,o}));return i(),s},L=function(e,t){var n=void 0===t?{}:t,s=n.checkTime,i=n.timeout;return new Promise((function(t,n){var r,o=P((function(){return T(e,(function(n){n&&("function"==typeof o&&o(),r&&(clearTimeout(r),r=null),t(n),o=null,e=null,t=null)}))}),s||100);i&&(r=setTimeout((function(){"function"==typeof o&&o(),r&&(clearTimeout(r),r=null),n("timeout"),n=null,o=null,e=null}),i))}))},C=["driver"],I=["maxConnection"];function x(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function _(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function M(){}function j(e,t){if(!t)return e&&e.then?e.then(M):Promise.resolve()}function $(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},D.apply(this,arguments)}function B(e,t){if(null==e)return{};var n,s,i={},r=Object.keys(e);for(s=0;s<r.length;s++)n=r[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}function q(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(s.key))?i:String(i)),s)}var i}function K(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var F=function(){function e(e){var t=e.driver,n=B(e,C);this.driver=void 0,this.options=void 0,this.state={running:!1,connected:!1,destroyed:!1,connecting:!1},this.client=void 0,this._len=0,this.id=k(),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.driver=t,this.options=n}var t=e.prototype;return t.connect=function(){try{var e=!1,t=this;return t.client||(t.client=new t.driver),t.state.destroyed=!1,x(_((function(){if(t.state.connecting)return x(L((function(){return t.state.connected}),{checkTime:1e3,timeout:1e4}),(function(){return e=!0,"connected"}))}),(function(n){return e?n:(t.state.connecting=!0,new Promise((function(e,n){t.client.once("ready",(function(){t.state.connected=!0,e("connected"),t.state.connecting=!1})),t.client.once("error",(function(e){n(e),t.close()})),t.client.connect(D({},t.options))})))})))}catch(e){return Promise.reject(e)}},t.close=function(){this.client.end(),this.state.connected=!1,this.state.destroyed=!0,this.state.connecting=!1,this.client=null},t.run=function(e){var t=e.fn,n=e.args;try{var s=this;return s.len+=1,x(_((function(){if(!s.state.connected)return j(s.connect())}),(function(){return _((function(){if(s.state.running)return j(L((function(){return!s.state.running}),{checkTime:1e3,timeout:6e6}))}),(function(){return s.state.running=!0,new Promise((function(e,i){var r;(r=s.client)[t].apply(r,n.concat([function(t,n){t?i(t):e(n)}]))}))}))})))}catch(e){return Promise.reject(e)}},t.bind=function(e){var t=this;return $((function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return x(t.run({fn:e,args:s}),(function(e){return t.state.running=!1,t.len-=1,e}))}))},t.get=function(){try{for(var e=this,t=Buffer.alloc(0),n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return x(e.run({fn:"get",args:s}),(function(n){return new Promise((function(s){n.on("data",(function(e){t=Buffer.concat([t,e],t.byteLength+e.byteLength)})),n.on("end",(function(){s(t),e.state.running=!1,e.len-=1}))}))}))}catch(e){return Promise.reject(e)}},K(e,[{key:"len",get:function(){return this._len},set:function(e){this._len=e,this._len<1&&this.close()}}]),e}(),U=function(){function e(e){var t=e.maxConnection,n=void 0===t?5:t,s=B(e,I);this.options=void 0,this.maxConnection=void 0,this.pool=[],this.get=this.bind("get"),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.options=s,this.maxConnection=n}return e.prototype.bind=function(e){var t=this;return $((function(){var n=t.client;return x(n[e].apply(n,arguments),(function(e){if(n.len<1){var s=t.pool.findIndex((function(e){return e.id===n.id}));t.pool.splice(s,1)}return e}))}))},K(e,[{key:"len",get:function(){return this.pool.length}},{key:"client",get:function(){if(this.pool.length<this.maxConnection){var e=new F(this.options);return this.pool.push(e),e}return this.pool.sort((function(e,t){return e.len-t.len})),this.pool[0]}}]),e}();function R(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Y.apply(this,arguments)}var J=function(e){return e},V=function(){function e(e){var t,n=e.url,s=e.options,i=void 0===s?{}:s,r=e.Grpc,o=e.cert;this.url=void 0,this.options=void 0,this.Grpc=void 0,this.credentials=void 0,this.client=void 0,this._timeout=void 0,this.connections=0;var a=Y({"grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1},i),c=o?r.credentials.createSsl(o):r.credentials.createInsecure();this.url=n,this.Grpc=r,this.credentials=c,this.options=a,this.options.timeout=null!=(t=this.options.timeout)?t:1e4,r=null,i=null,o=null}var t=e.prototype;return t.request=function(e,t,n){try{var s,i=this;i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i.connections+=1,i.client||(i.client=new i.Grpc.Client(i.url,i.credentials,i.options));var r=Buffer.alloc(0);return R((o=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return R(i._request({service:e,method:t,data:n}),(function(e){r=e}))}),(function(e){s=e})),a=function(){if(e=null,t=null,n=null,i.connections-=1,i.connections<0&&(i.connections=0),i.connections<1&&(i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i._timeout=setTimeout((function(){return i.close()}),6e4)),s)throw console.log(s),i.close(),new Error("grpc connection error.");return r},o&&o.then?o.then(a):a()))}catch(e){return Promise.reject(e)}var o,a},t._request=function(e){var t=this,n=e.service,s=e.method,i=e.data;return new Promise((function(e,r){var o=!1,a=setTimeout((function(){o=!0,t.close(),console.log("rpc request timeout"),r(new Error("timeout"))}),t.options.timeout);t.client.makeUnaryRequest("/"+n+"/"+s,J,J,i?Buffer.from(i):Buffer.alloc(0),(function(t,n){o||(clearTimeout(a),t?r(t):e(n))}))}))},t.close=function(){var e;this._timeout&&(clearTimeout(this._timeout),delete this._timeout),null==(e=this.client)||e.close(),this.client=null,delete this.client},e}(),G=[];function W(e){var t=e.url,n=e.options,s=void 0===n?{}:n,i=e.ServiceImp,r=e.Grpc,o=e.cert,a=new V({url:t,options:s,Grpc:r,cert:o});return G.push(a),r=null,s=null,new i({request:a.request.bind(a)})}var Q=function(e){return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return new Promise((function(t,s){e.apply(void 0,n.concat([function(e){e&&s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.length<2?t(i[0]):t([].concat(i))}]))}))}},H={read:Q(e.read),readFile:Q(e.readFile),writeFile:Q(e.writeFile),readdir:Q(e.readdir),open:Q(e.open),close:Q(e.close),write:Q(e.write),stat:Q(e.stat),mkdir:Q(e.mkdir),rm:Q(e.rm)};const X=require("child_process");function z(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Z(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var ee="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function te(e,t,n){if(!e.s){if(n instanceof ne){if(!n.s)return void(n.o=te.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(te.bind(null,e,t),te.bind(null,e,2));e.s=t,e.v=n;var s=e.o;s&&s(e)}}var ne=function(){function e(){}return e.prototype.then=function(t,n){var s=new e,i=this.s;if(i){var r=1&i?t:n;if(r){try{te(s,1,r(this.v))}catch(e){te(s,2,e)}return s}return this}return this.o=function(e){try{var i=e.v;1&e.s?te(s,1,t?t(i):i):n?te(s,1,n(i)):te(s,2,i)}catch(e){te(s,2,e)}},s},e}();function se(e){return e instanceof ne&&1&e.s}function ie(e,t,n){if("function"==typeof e[ee]){var s,i,r,o=e[ee]();if(function e(a){try{for(;!((s=o.next()).done||n&&n());)if((a=t(s.value))&&a.then){if(!se(a))return void a.then(e,r||(r=te.bind(null,i=new ne,2)));a=a.v}i?te(i,1,a):i=a}catch(e){te(i||(i=new ne),2,e)}}(),o.return){var a=function(e){try{s.done||o.return()}catch(e){}return e};if(i&&i.then)return i.then(a,(function(e){throw a(e)}));a()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],l=0;l<e.length;l++)c.push(e[l]);return function(e,t,n){var s,i,r=-1;return function o(a){try{for(;++r<e.length&&(!n||!n());)if((a=t(r))&&a.then){if(!se(a))return void a.then(o,i||(i=te.bind(null,s=new ne,2)));a=a.v}s?te(s,1,a):s=a}catch(e){te(s||(s=new ne),2,e)}}(),s}(c,(function(e){return t(c[e])}),n)}function re(e,t){return e&&e.then?e.then(t):t(e)}function oe(){}function ae(e,t){if(!t)return e&&e.then?e.then(oe):Promise.resolve()}var ce=Z((function(e,t){return void 0===t&&(t=2),"win32"===process.platform?new Promise((function(t){(0,X.exec)("taskkill /pid "+e+" /T /F",t)})):z(me(e),(function(e){var n=[e.pid];return ye(e,n),n.reverse(),e=null,re(ie(n,(function(e){return ae(le(e,t))})),(function(){return"success"}))}))})),le=Z((function(e,t,n){if(void 0===t&&(t=2),void 0===n&&(n=1),n>5)throw new Error("SIGKILL 失败. times > 5");return(0,X.exec)("kill -"+t+" "+e),function(e){if(e&&e.then)return e.then(oe)}(function(t,n){try{var s=ae(L((function(){return ue(e)}),{checkTime:100,timeout:4e3}))}catch(e){return n()}return s&&s.then?s.then(void 0,n):s}(0,(function(){return ae(le(e,9,n+1))})))})),ue=Z((function(e){return z(he(e),(function(e){return e<0}))}));function fe(e){return new Promise((function(t,n){(0,X.exec)('grep "Name:" /proc/'+e+"/status",(function(e,s){e?n(e):t(s)}))}))}function he(e){return new Promise((function(t){(0,X.exec)("ps -p "+e+" -o %cpu=",(function(e,n){t(e?-1:parseFloat(n.toString()))}))}))}function de(e){return new Promise((function(t){(0,X.exec)("ps -p "+e+" -o command=",(function(e,n){t(e?"":n.toString().split("\n")[0])}))}))}function pe(e){return new Promise((function(t){(0,X.exec)("ps -o pid --no-headers --ppid "+e,(function(e,n){t(e?[]:n.split("\n").filter((function(e){return!!e})).map((function(e){return parseFloat(e.trim())})))}))}))}var me=Z((function(e,t){var n=!1;return t||(n=!0,t={pid:e,children:[]}),z(pe(e),(function(e){return re(ie(e,(function(e){var n={pid:e,children:[]};return z(me(e,n),(function(){t.children.push(n)}))})),(function(){return n?t:(t=null,null)}))}))})),ye=function e(t,n){var s;t.children&&((s=n).push.apply(s,t.children.map((function(e){return e.pid}))),t.children.forEach((function(t){return e(t,n)}))),t=null,n=null},ge=function(){"function"==typeof process.send&&P(Z((function(){return ae(new Promise((function(e){process.send({type:"beat",timestamp:(new Date).valueOf()},e)})))})),6e3)},ve=function(e){return new Promise((function(t){var s=n(1808).createServer();s.listen(e,(function(){t(!0),s.close()})),s.on("error",(function(){t(!1),s.close()}))}))},be=function(){return function(e,t,n){try{var s=Promise.resolve(e());return t?s.then(t):s}catch(e){return Promise.reject(e)}}(we,(function(e){var t=e.find((function(e){return"Wireless interface"===e.description}));return t?t["logical name"]:""}))},we=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return new Promise((function(e){var t;null==(t=(0,X.exec)("lshw -C network").stdout)||t.on("data",(function(t){e(function(e){return e.toString().replace(/\*-network.*\n/g,"-----").split("-----").filter((function(e){return e.trim()})).map((function(e){var t={};return e.split("\n").forEach((function(e){var n=e.split(":").map((function(e){return e.trim()}));n[0]&&n[1]&&(t[n[0]]=n[1])})),t}))}(t))}))}))}));function Se(){}function ke(e){var t=e();if(t&&t.then)return t.then(Se)}var Ne="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Ee(e,t,n){if(!e.s){if(n instanceof Ae){if(!n.s)return void(n.o=Ee.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Ee.bind(null,e,t),Ee.bind(null,e,2));e.s=t,e.v=n;var s=e.o;s&&s(e)}}var Ae=function(){function e(){}return e.prototype.then=function(t,n){var s=new e,i=this.s;if(i){var r=1&i?t:n;if(r){try{Ee(s,1,r(this.v))}catch(e){Ee(s,2,e)}return s}return this}return this.o=function(e){try{var i=e.v;1&e.s?Ee(s,1,t?t(i):i):n?Ee(s,1,n(i)):Ee(s,2,i)}catch(e){Ee(s,2,e)}},s},e}();function Oe(e){return e instanceof Ae&&1&e.s}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Te.apply(this,arguments)}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}var Le=function(){function e(){this.state={},this.ids={}}var t=e.prototype;return t.on=function(e,t){if(this.state[e]||(this.state[e]=[]),"function"!=typeof t)throw new Error("第二个参数必须为function!");var n=this.state[e].push(t)-1,s=k(40);return this.ids[s]={event:e,index:n},s},t.cancel=function(e){var t=this;if(e){var n=this.ids[e]||{},s=n.event,i=n.index;s&&Array.isArray(this.state[s])&&(this.state[s].splice(i,1),delete this.ids[e],Object.keys(this.ids).forEach((function(e){t.ids[e].event===s&&t.ids[e].index>i&&(t.ids[e].index=t.ids[e].index-1)})))}else this.clear()},t.clear=function(){this.state.length=0},t.emit=function(e,t){if(Array.isArray(this.state[e]))for(var n,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.state[e]);!(n=s()).done;){var i=n.value;"function"==typeof i&&i(t)}},t.emitSync=function(e,t){try{var n=this;return(s=ke((function(){if(Array.isArray(n.state[e]))return function(e){if(e&&e.then)return e.then(Se)}(function(e,t,n){if("function"==typeof e[Ne]){var s,i,r,o=e[Ne]();if(function e(a){try{for(;!((s=o.next()).done||n&&n());)if((a=t(s.value))&&a.then){if(!Oe(a))return void a.then(e,r||(r=Ee.bind(null,i=new Ae,2)));a=a.v}i?Ee(i,1,a):i=a}catch(e){Ee(i||(i=new Ae),2,e)}}(),o.return){var a=function(e){try{s.done||o.return()}catch(e){}return e};if(i&&i.then)return i.then(a,(function(e){throw a(e)}));a()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],l=0;l<e.length;l++)c.push(e[l]);return function(e,t,n){var s,i,r=-1;return function o(a){try{for(;++r<e.length&&(!n||!n());)if((a=t(r))&&a.then){if(!Oe(a))return void a.then(o,i||(i=Ee.bind(null,s=new Ae,2)));a=a.v}s?Ee(s,1,a):s=a}catch(e){Ee(s||(s=new Ae),2,e)}}(),s}(c,(function(e){return t(c[e])}),n)}(n.state[e],(function(e){return ke((function(){if("function"==typeof e)return function(e,t){return e&&e.then?e.then(Se):Promise.resolve()}(e(t))}))})))})))&&s.then||(s=Promise.resolve(s)),s}catch(e){return Promise.reject(e)}var s},t.clone=function(){return{state:Te({},this.state),ids:Te({},this.ids)}},t.restore=function(e){this.state=e.state,this.ids=e.ids},e}(),Ce=function(){function e(e){var t=this,n=e.limit,s=void 0===n?10:n,i=e.onTimeout;this.onTimeout=void 0,this.timeout=null,this._time=void 0,this._time=1e3*s,this.onTimeout=function(){t.timeout&&(clearTimeout(t.timeout),t.timeout=null),i()}}var t=e.prototype;return t.feed=function(){this.init()},t.init=function(){clearTimeout(this.timeout),this.timeout=null,delete this.timeout,this.timeout=setTimeout(this.onTimeout,this._time)},t.stop=function(){this.timeout&&clearTimeout(this.timeout),delete this.timeout},e}(),Ie=function(){function e(e){this._splitSymbol=void 0,this._cache="",this._splitSymbol=e}return e.prototype.split=function(e){var t=(this._cache+e).split(this._splitSymbol);return this._cache=t.splice(t.length-1,1)[0],t},e}(),xe=n(4667);function _e(){}function Me(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var je=function(){function e(e,t){this.topic=void 0,this.messageType=void 0,this.emitter=new Le,this.subscribed=!1,this.dog=new Ce({limit:10,onTimeout:this.onTimeout.bind(this)}),this.strSplit=new Ie("---"),this.subscribeChildProcess=void 0,this.topic=e,this.messageType=t,this.subscribed=!1,this.emitter=new Le}var t=e.prototype;return t.onTimeout=function(){try{var e=this;return e.subscribed?Me(e.unsubscribe(),(function(){return Me(A(1e3),(function(){return(t=e.subscribe())&&t.then?t.then(_e):Promise.resolve();var t}))})):Me()}catch(e){return Promise.reject(e)}},t.onData=function(e){var t=this.strSplit.split(e.toString()).slice(-1)[0];if(t){this.dog.feed();var n=xe.Qc(t);this.emitter.emit("message",n)}},t.subscribe=function(){try{var e=this;return e.subscribeChildProcess||(e.subscribed=!0,e.dog.init(),e.subscribeChildProcess=(0,X.spawn)("rostopic",["echo",e.topic]),e.subscribeChildProcess.stdout.on("data",e.onData.bind(e)),e.subscribeChildProcess.stderr.on("data",(function(e){return console.log(e.toString())}))),Me()}catch(e){return Promise.reject(e)}},t.unsubscribe=function(){try{var e=this;return e.subscribeChildProcess?(e.dog.stop(),e.subscribed=!1,Me(ce(e.subscribeChildProcess.pid),(function(){e.subscribeChildProcess=null}))):Me()}catch(e){return Promise.reject(e)}},t.publish=function(e){var t=this,n=xe.Pz(e);return new Promise((function(e,s){(0,X.exec)("rostopic pub -1 "+t.topic+" "+t.messageType+' "'+n+'"',(function(t,n){t?s(t):e(n)}))}))},e}(),$e={cache:[],getTopic:function(e,t){var n=this.cache.find((function(t){return t.topic===e}));if(n)return n;var s=new je(e,t);return this.cache.push(s),s}}})(),s})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["pubo-node"]=t():e["pubo-node"]=t()}(this,(()=>(()=>{"use strict";var e={5001:e=>{e.exports=require("cluster")},1808:e=>{e.exports=require("net")},7889:(e,t,n)=>{var s=n(3264),i=n(5738),r=n(8228),o=n(9248),a=n(1373),c=n(8864),l=n(7058);function u(e,t,n,s,i,r){const o="block-map"===n.type?a.resolveBlockMap(e,t,n,s,r):"block-seq"===n.type?c.resolveBlockSeq(e,t,n,s,r):l.resolveFlowCollection(e,t,n,s,r),u=o.constructor;return"!"===i||i===u.tagName?(o.tag=u.tagName,o):(i&&(o.tag=i),o)}t.composeCollection=function(e,t,n,a,c){const l=a.tag,f=l?t.directives.tagName(l.source,(e=>c(l,"TAG_RESOLVE_FAILED",e))):null;if("block-seq"===n.type){const{anchor:e,newlineAfterProp:t}=a,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&c(n,"MISSING_CHAR","Missing newline after block sequence props")}const h="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!l||!f||"!"===f||f===r.YAMLMap.tagName&&"map"===h||f===o.YAMLSeq.tagName&&"seq"===h)return u(e,t,n,c,f);let d=t.schema.tags.find((e=>e.tag===f&&e.collection===h));if(!d){const s=t.schema.knownTags[f];if(!s||s.collection!==h)return s?.collection?c(l,"BAD_COLLECTION_TYPE",`${s.tag} used for ${h} collection, but expects ${s.collection}`,!0):c(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),u(e,t,n,c,f);t.schema.tags.push(Object.assign({},s,{default:!1})),d=s}const p=u(e,t,n,c,f,d),m=d.resolve?.(p,(e=>c(l,"TAG_RESOLVE_FAILED",e)),t.options)??p,y=s.isNode(m)?m:new i.Scalar(m);return y.range=p.range,y.tag=f,d?.format&&(y.format=d.format),y}},9394:(e,t,n)=>{var s=n(505),i=n(3223),r=n(9516),o=n(814);t.composeDoc=function(e,t,{offset:n,start:a,value:c,end:l},u){const f=Object.assign({_directives:t},e),h=new s.Document(void 0,f),d={atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},p=o.resolveProps(a,{indicator:"doc-start",next:c??l?.[0],offset:n,onError:u,parentIndent:0,startOnNewline:!0});p.found&&(h.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||p.hasNewline||u(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=c?i.composeNode(d,c,p,u):i.composeEmptyNode(d,p.end,a,null,p,u);const m=h.contents.range[2],y=r.resolveEnd(l,m,!1,u);return y.comment&&(h.comment=y.comment),h.range=[n,m,y.offset],h}},3223:(e,t,n)=>{var s=n(366),i=n(7889),r=n(6491),o=n(9516),a=n(3576);const c={composeNode:l,composeEmptyNode:u};function l(e,t,n,a){const{spaceBefore:l,comment:f,anchor:h,tag:d}=n;let p,m=!0;switch(t.type){case"alias":p=function({options:e},{offset:t,source:n,end:i},r){const a=new s.Alias(n.substring(1));""===a.source&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,l=o.resolveEnd(i,c,e.strict,r);return a.range=[t,c,l.offset],l.comment&&(a.comment=l.comment),a}(e,t,a),(h||d)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=r.composeScalar(e,t,d,a),h&&(p.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=i.composeCollection(c,e,t,n,a),h&&(p.anchor=h.source.substring(1));break;default:a(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),p=u(e,t.offset,void 0,null,n,a),m=!1}return h&&""===p.anchor&&a(h,"BAD_ALIAS","Anchor cannot be an empty string"),l&&(p.spaceBefore=!0),f&&("scalar"===t.type&&""===t.source?p.comment=f:p.commentBefore=f),e.options.keepSourceTokens&&m&&(p.srcToken=t),p}function u(e,t,n,s,{spaceBefore:i,comment:o,anchor:c,tag:l,end:u},f){const h={type:"scalar",offset:a.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,h,l,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=u),d}t.composeEmptyNode=u,t.composeNode=l},6491:(e,t,n)=>{var s=n(3264),i=n(5738),r=n(1070),o=n(5147);t.composeScalar=function(e,t,n,a){const{value:c,type:l,comment:u,range:f}="block-scalar"===t.type?r.resolveBlockScalar(e,t,a):o.resolveFlowScalar(t,e.options.strict,a),h=n?e.directives.tagName(n.source,(e=>a(n,"TAG_RESOLVE_FAILED",e))):null,d=n&&h?function(e,t,n,i,r){if("!"===n)return e[s.SCALAR];const o=[];for(const t of e.tags)if(!t.collection&&t.tag===n){if(!t.default||!t.test)return t;o.push(t)}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[s.SCALAR])}(e.schema,c,h,n,a):"scalar"===t.type?function({directives:e,schema:t},n,i,r){const o=t.tags.find((e=>e.default&&e.test?.test(n)))||t[s.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(n)))??t[s.SCALAR];o.tag!==a.tag&&r(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(o.tag)} or ${e.tagString(a.tag)}`,!0)}return o}(e,c,t,a):e.schema[s.SCALAR];let p;try{const r=d.resolve(c,(e=>a(n??t,"TAG_RESOLVE_FAILED",e)),e.options);p=s.isScalar(r)?r:new i.Scalar(r)}catch(e){const s=e instanceof Error?e.message:String(e);a(n??t,"TAG_RESOLVE_FAILED",s),p=new i.Scalar(c)}return p.range=f,p.source=c,l&&(p.type=l),h&&(p.tag=h),d.format&&(p.format=d.format),u&&(p.comment=u),p}},1294:(e,t,n)=>{var s=n(3848),i=n(505),r=n(2981),o=n(3264),a=n(9394),c=n(9516);function l(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function u(e){let t="",n=!1,s=!1;for(let i=0;i<e.length;++i){const r=e[i];switch(r[0]){case"#":t+=(""===t?"":s?"\n\n":"\n")+(r.substring(1)||" "),n=!0,s=!1;break;case"%":"#"!==e[i+1]?.[0]&&(i+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:t,afterEmptyLine:s}}t.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=l(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new s.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:s}=u(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(s||e.directives.docStart||!i)e.commentBefore=n;else if(o.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];o.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`: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:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,((t,n,s)=>{const i=l(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,s)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new r.YAMLParseError(l(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 t="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(l(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new r.YAMLParseError(l(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 e=Object.assign({_directives:this.directives},this.options),n=new i.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}},1373:(e,t,n)=>{var s=n(7356),i=n(8228),r=n(814),o=n(7627),a=n(7049),c=n(434);const l="All mapping items must start at the same column";t.resolveBlockMap=function({composeNode:e,composeEmptyNode:t},n,u,f,h){const d=new(h?.nodeClass??i.YAMLMap)(n.schema);n.atRoot&&(n.atRoot=!1);let p=u.offset,m=null;for(const i of u.items){const{start:h,key:y,sep:g,value:v}=i,b=r.resolveProps(h,{indicator:"explicit-key-ind",next:y??g?.[0],offset:p,onError:f,parentIndent:u.indent,startOnNewline:!0}),w=!b.found;if(w){if(y&&("block-seq"===y.type?f(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==u.indent&&f(p,"BAD_INDENT",l)),!b.anchor&&!b.tag&&!g){m=b.end,b.comment&&(d.comment?d.comment+="\n"+b.comment:d.comment=b.comment);continue}(b.newlineAfterProp||o.containsNewline(y))&&f(y??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==u.indent&&f(p,"BAD_INDENT",l);const S=b.end,k=y?e(n,y,b,f):t(n,S,h,null,b,f);n.schema.compat&&a.flowIndentCheck(u.indent,y,f),c.mapIncludes(n,d.items,k)&&f(S,"DUPLICATE_KEY","Map keys must be unique");const N=r.resolveProps(g??[],{indicator:"map-value-ind",next:v,offset:k.range[2],onError:f,parentIndent:u.indent,startOnNewline:!y||"block-scalar"===y.type});if(p=N.end,N.found){w&&("block-map"!==v?.type||N.hasNewline||f(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<N.found.offset-1024&&f(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const r=v?e(n,v,N,f):t(n,p,g,null,N,f);n.schema.compat&&a.flowIndentCheck(u.indent,v,f),p=r.range[2];const o=new s.Pair(k,r);n.options.keepSourceTokens&&(o.srcToken=i),d.items.push(o)}else{w&&f(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(k.comment?k.comment+="\n"+N.comment:k.comment=N.comment);const e=new s.Pair(k);n.options.keepSourceTokens&&(e.srcToken=i),d.items.push(e)}}return m&&m<p&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[u.offset,p,m??p],d}},1070:(e,t,n)=>{var s=n(5738);t.resolveBlockScalar=function(e,t,n){const i=t.offset,r=function({offset:e,props:t},n,s){if("block-scalar-header"!==t[0].type)return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],r=i[0];let o=0,a="",c=-1;for(let t=1;t<i.length;++t){const n=i[t];if(a||"-"!==n&&"+"!==n){const s=Number(n);!o&&s?o=s:-1===c&&(c=e+t)}else a=n}-1!==c&&s(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,u="",f=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":l=!0;case"newline":f+=i.source.length;break;case"comment":n&&!l&&s(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=i.source.length,u=i.source.substring(1);break;case"error":s(i,"UNEXPECTED_TOKEN",i.message),f+=i.source.length;break;default:{s(i,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${i.type}`);const e=i.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:r,indent:o,chomp:a,comment:u,length:f}}(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const o=">"===r.mode?s.Scalar.BLOCK_FOLDED:s.Scalar.BLOCK_LITERAL,a=t.source?function(e){const t=e.split(/\n( *)/),n=t[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===r.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let n=i+r.length;return t.source&&(n+=t.source.length),{value:e,type:o,comment:r.comment,range:[i,n,n]}}let l=t.indent+r.indent,u=t.offset+r.length,f=0;for(let t=0;t<c;++t){const[s,i]=a[t];if(""!==i&&"\r"!==i){if(s.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(u+s.length,"MISSING_CHAR",e)}0===r.indent&&(l=s.length),f=t,0!==l||e.atRoot||n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}0===r.indent&&s.length>l&&(l=s.length),u+=s.length+i.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>l&&(c=e+1);let h="",d="",p=!1;for(let e=0;e<f;++e)h+=a[e][0].slice(l)+"\n";for(let e=f;e<c;++e){let[t,i]=a[e];u+=t.length+i.length+1;const c="\r"===i[i.length-1];if(c&&(i=i.slice(0,-1)),i&&t.length<l){const e="Block scalar lines must not be less indented than their "+(r.indent?"explicit indentation indicator":"first line");n(u-i.length-(c?2:1),"BAD_INDENT",e),t=""}o===s.Scalar.BLOCK_LITERAL?(h+=d+t.slice(l)+i,d="\n"):t.length>l||"\t"===i[0]?(" "===d?d="\n":p||"\n"!==d||(d="\n\n"),h+=d+t.slice(l)+i,d="\n",p=!0):""===i?"\n"===d?h+="\n":d="\n":(h+=d+i,d=" ",p=!1)}switch(r.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)h+="\n"+a[e][0].slice(l);"\n"!==h[h.length-1]&&(h+="\n");break;default:h+="\n"}const m=i+r.length+t.source.length;return{value:h,type:o,comment:r.comment,range:[i,m,m]}}},8864:(e,t,n)=>{var s=n(9248),i=n(814),r=n(7049);t.resolveBlockSeq=function({composeNode:e,composeEmptyNode:t},n,o,a,c){const l=new(c?.nodeClass??s.YAMLSeq)(n.schema);n.atRoot&&(n.atRoot=!1);let u=o.offset,f=null;for(const{start:s,value:c}of o.items){const h=i.resolveProps(s,{indicator:"seq-item-ind",next:c,offset:u,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!h.found){if(!(h.anchor||h.tag||c)){f=h.end,h.comment&&(l.comment=h.comment);continue}c&&"block-seq"===c.type?a(h.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator")}const d=c?e(n,c,h,a):t(n,h.end,s,null,h,a);n.schema.compat&&r.flowIndentCheck(o.indent,c,a),u=d.range[2],l.items.push(d)}return l.range=[o.offset,u,f??u],l}},9516:(e,t)=>{t.resolveEnd=function(e,t,n,s){let i="";if(e){let r=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{n&&!r&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=o+t:i=t,o="";break}case"newline":i&&(o+=e),r=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}},7058:(e,t,n)=>{var s=n(3264),i=n(7356),r=n(8228),o=n(9248),a=n(9516),c=n(814),l=n(7627),u=n(434);const f="Block collections are not allowed within flow collections",h=e=>e&&("block-map"===e.type||"block-seq"===e.type);t.resolveFlowCollection=function({composeNode:e,composeEmptyNode:t},n,d,p,m){const y="{"===d.start.source,g=y?"flow map":"flow sequence",v=new(m?.nodeClass??(y?r.YAMLMap:o.YAMLSeq))(n.schema);v.flow=!0;const b=n.atRoot;b&&(n.atRoot=!1);let w=d.offset+d.start.source.length;for(let o=0;o<d.items.length;++o){const a=d.items[o],{start:m,key:b,sep:S,value:k}=a,N=c.resolveProps(m,{flow:g,indicator:"explicit-key-ind",next:b??S?.[0],offset:w,onError:p,parentIndent:d.indent,startOnNewline:!1});if(!N.found){if(!(N.anchor||N.tag||S||k)){0===o&&N.comma?p(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${g}`):o<d.items.length-1&&p(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${g}`),N.comment&&(v.comment?v.comment+="\n"+N.comment:v.comment=N.comment),w=N.end;continue}!y&&n.options.strict&&l.containsNewline(b)&&p(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)N.comma&&p(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${g}`);else if(N.comma||p(N.start,"MISSING_CHAR",`Missing , between ${g} items`),N.comment){let e="";e:for(const t of m)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=v.items[v.items.length-1];s.isPair(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,N.comment=N.comment.substring(e.length+1)}}if(y||S||N.found){const s=N.end,o=b?e(n,b,N,p):t(n,s,m,null,N,p);h(b)&&p(o.range,"BLOCK_IN_FLOW",f);const l=c.resolveProps(S??[],{flow:g,indicator:"map-value-ind",next:k,offset:o.range[2],onError:p,parentIndent:d.indent,startOnNewline:!1});if(l.found){if(!y&&!N.found&&n.options.strict){if(S)for(const e of S){if(e===l.found)break;if("newline"===e.type){p(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}N.start<l.found.offset-1024&&p(l.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source&&":"===k.source[0]?p(k,"MISSING_CHAR",`Missing space after : in ${g}`):p(l.start,"MISSING_CHAR",`Missing , or : between ${g} items`));const E=k?e(n,k,l,p):l.found?t(n,l.end,S,null,l,p):null;E?h(k)&&p(E.range,"BLOCK_IN_FLOW",f):l.comment&&(o.comment?o.comment+="\n"+l.comment:o.comment=l.comment);const A=new i.Pair(o,E);if(n.options.keepSourceTokens&&(A.srcToken=a),y){const e=v;u.mapIncludes(n,e.items,o)&&p(s,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(A)}else{const e=new r.YAMLMap(n.schema);e.flow=!0,e.items.push(A);const t=(E??o).range;e.range=[o.range[0],t[1],t[2]],v.items.push(e)}w=E?E.range[2]:l.end}else{const s=k?e(n,k,N,p):t(n,N.end,S,null,N,p);v.items.push(s),w=s.range[2],h(k)&&p(s.range,"BLOCK_IN_FLOW",f)}}const S=y?"}":"]",[k,...N]=d.end;let E=w;if(k&&k.source===S)E=k.offset+k.source.length;else{const e=g[0].toUpperCase()+g.substring(1);p(w,b?"MISSING_CHAR":"BAD_INDENT",b?`${e} must end with a ${S}`:`${e} in block collection must be sufficiently indented and end with a ${S}`),k&&1!==k.source.length&&N.unshift(k)}if(N.length>0){const e=a.resolveEnd(N,E,n.options.strict,p);e.comment&&(v.comment?v.comment+="\n"+e.comment:v.comment=e.comment),v.range=[d.offset,E,e.offset]}else v.range=[d.offset,E,E];return v}},5147:(e,t,n)=>{var s=n(5738),i=n(9516);function r(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=t.exec(e);if(!s)return e;let i=s[1],r=" ",o=t.lastIndex;for(n.lastIndex=o;s=n.exec(e);)""===s[1]?"\n"===r?i+=r:r="\n":(i+=r+s[1],r=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(e),i+r+(s?.[1]??"")}function o(e,t){let n="",s=e[t+1];for(;!(" "!==s&&"\t"!==s&&"\n"!==s&&"\r"!==s||"\r"===s&&"\n"!==e[t+2]);)"\n"===s&&(n+="\n"),s=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const a={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function c(e,t,n,s){const i=e.substr(t,n),r=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(r)){const i=e.substr(t-2,n+2);return s(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(r)}t.resolveFlowScalar=function(e,t,n){const{offset:l,type:u,source:f,end:h}=e;let d,p;const m=(e,t,s)=>n(l+e,t,s);switch(u){case"scalar":d=s.Scalar.PLAIN,p=function(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),r(e)}(f,m);break;case"single-quoted-scalar":d=s.Scalar.QUOTE_SINGLE,p=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),r(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=s.Scalar.QUOTE_DOUBLE,p=function(e,t){let n="";for(let s=1;s<e.length-1;++s){const i=e[s];if("\r"!==i||"\n"!==e[s+1])if("\n"===i){const{fold:t,offset:i}=o(e,s);n+=t,s=i}else if("\\"===i){let i=e[++s];const r=a[i];if(r)n+=r;else if("\n"===i)for(i=e[s+1];" "===i||"\t"===i;)i=e[1+ ++s];else if("\r"===i&&"\n"===e[s+1])for(i=e[1+ ++s];" "===i||"\t"===i;)i=e[1+ ++s];else if("x"===i||"u"===i||"U"===i){const r={x:2,u:4,U:8}[i];n+=c(e,s+1,r,t),s+=r}else{const i=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||"\t"===i){const t=s;let r=e[s+1];for(;" "===r||"\t"===r;)r=e[1+ ++s];"\n"===r||"\r"===r&&"\n"===e[s+2]||(n+=s>t?e.slice(t,s+1):i)}else n+=i}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(f,m);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[l,l+f.length,l+f.length]}}const y=l+f.length,g=i.resolveEnd(h,y,t,n);return{value:p,type:d,comment:g.comment,range:[l,y,g.offset]}}},814:(e,t)=>{t.resolveProps=function(e,{flow:t,indicator:n,next:s,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let c=!1,l=a,u=a,f="",h="",d=!1,p=!1,m=null,y=null,g=null,v=null,b=null,w=null,S=null;for(const i of e)switch(p&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(l&&"comment"!==i.type&&"newline"!==i.type&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":t||"doc-start"===n&&"flow-collection"===s?.type||!i.source.includes("\t")||(m=i),u=!0;break;case"comment":{u||r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=i.source.substring(1)||" ";f?f+=h+e:f=e,h="",l=!1;break}case"newline":l?f?f+=i.source:c=!0:h+=i.source,l=!0,d=!0,(y||g)&&(v=i),u=!0;break;case"anchor":y&&r(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&r(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=i,null===S&&(S=i.offset),l=!1,u=!1,p=!0;break;case"tag":g&&r(i,"MULTIPLE_TAGS","A node can have at most one tag"),g=i,null===S&&(S=i.offset),l=!1,u=!1,p=!0;break;case n:(y||g)&&r(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),w&&r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),w=i,l="seq-item-ind"===n||"explicit-key-ind"===n,u=!1;break;case"comma":if(t){b&&r(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=i,l=!1,u=!1;break}default:r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),l=!1,u=!1}const k=e[e.length-1],N=k?k.offset+k.source.length:i;return p&&s&&"space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&("scalar"!==s.type||""!==s.source)&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(l&&m.indent<=o||"block-map"===s?.type||"block-seq"===s?.type)&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:c,comment:f,hasNewline:d,anchor:y,tag:g,newlineAfterProp:v,end:N,start:S??N}}},7627:(e,t)=>{t.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}}},3576:(e,t)=>{t.emptyScalarPosition=function(e,t,n){if(t){null===n&&(n=t.length);for(let s=n-1;s>=0;--s){let n=t[s];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++s];"space"===n?.type;)e+=n.source.length,n=t[++s];break}}return e}},7049:(e,t,n)=>{var s=n(7627);t.flowIndentCheck=function(e,t,n){if("flow-collection"===t?.type){const i=t.end[0];i.indent!==e||"]"!==i.source&&"}"!==i.source||!s.containsNewline(t)||n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},434:(e,t,n)=>{var s=n(3264);t.mapIncludes=function(e,t,n){const{uniqueKeys:i}=e.options;if(!1===i)return!1;const r="function"==typeof i?i:(t,n)=>t===n||s.isScalar(t)&&s.isScalar(n)&&t.value===n.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>r(e.key,n)))}},505:(e,t,n)=>{var s=n(366),i=n(1928),r=n(3264),o=n(7356),a=n(5805),c=n(9442),l=n(7763),u=n(5157),f=n(6791),h=n(9534),d=n(3848);class p{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,r.NODE_TYPE,{value:r.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===n&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:o}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new d.Directives({version:o}),this.setSchema(o,n),this.contents=void 0===e?null:this.createNode(e,s,n)}clone(){const e=Object.create(p.prototype,{[r.NODE_TYPE]:{value:r.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=r.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){m(this.contents)&&this.contents.add(e)}addIn(e,t){m(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=u.anchorNames(this);e.anchor=!t||n.has(t)?u.findNewAnchor(t||"a",n):t}return new s.Alias(e.anchor)}createNode(e,t,n){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===n&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:f}=n??{},{onAnchor:d,setAnchors:p,sourceObjects:m}=u.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:s,schema:this.schema,sourceObjects:m},g=h.createNode(e,f,y);return a&&r.isCollection(g)&&(g.flow=!0),p(),g}createPair(e,t,n={}){const s=this.createNode(e,null,n),i=this.createNode(t,null,n);return new o.Pair(s,i)}delete(e){return!!m(this.contents)&&this.contents.delete(e)}deleteIn(e){return i.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!m(this.contents)&&this.contents.deleteIn(e)}get(e,t){return r.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return i.isEmptyPath(e)?!t&&r.isScalar(this.contents)?this.contents.value:this.contents:r.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!r.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return i.isEmptyPath(e)?void 0!==this.contents:!!r.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=i.collectionFromPath(this.schema,[e],t):m(this.contents)&&this.contents.set(e,t)}setIn(e,t){i.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=i.collectionFromPath(this.schema,Array.from(e),t):m(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new d.Directives({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 d.Directives({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new c.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},c=a.toJS(this.contents,t??"",o);if("function"==typeof i)for(const{count:e,res:t}of o.anchors.values())i(t,e);return"function"==typeof r?f.applyReviver(r,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return l.stringifyDocument(this,e)}}function m(e){if(r.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t.Document=p},5157:(e,t,n)=>{var s=n(3264),i=n(9303);function r(e){const t=new Set;return i.visit(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function o(e,t){for(let n=1;;++n){const s=`${e}${n}`;if(!t.has(s))return s}}t.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},t.anchorNames=r,t.createNodeAnchors=function(e,t){const n=[],i=new Map;let a=null;return{onAnchor:s=>{n.push(s),a||(a=r(e));const i=o(t,a);return a.add(i),i},setAnchors:()=>{for(const e of n){const t=i.get(e);if("object"!=typeof t||!t.anchor||!s.isScalar(t.node)&&!s.isCollection(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:i}},t.findNewAnchor=o},6791:(e,t)=>{t.applyReviver=function e(t,n,s,i){if(i&&"object"==typeof i)if(Array.isArray(i))for(let n=0,s=i.length;n<s;++n){const s=i[n],r=e(t,i,String(n),s);void 0===r?delete i[n]:r!==s&&(i[n]=r)}else if(i instanceof Map)for(const n of Array.from(i.keys())){const s=i.get(n),r=e(t,i,n,s);void 0===r?i.delete(n):r!==s&&i.set(n,r)}else if(i instanceof Set)for(const n of Array.from(i)){const s=e(t,i,n,n);void 0===s?i.delete(n):s!==n&&(i.delete(n),i.add(s))}else for(const[n,s]of Object.entries(i)){const r=e(t,i,n,s);void 0===r?delete i[n]:r!==s&&(i[n]=r)}return t.call(n,s,i)}},9534:(e,t,n)=>{var s=n(366),i=n(3264),r=n(5738);t.createNode=function(e,t,n){if(i.isDocument(e)&&(e=e.contents),i.isNode(e))return e;if(i.isPair(e)){const t=n.schema[i.MAP].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:l,sourceObjects:u}=n;let f;if(o&&e&&"object"==typeof e){if(f=u.get(e),f)return f.anchor||(f.anchor=a(e)),new s.Alias(f.anchor);f={anchor:null,node:null},u.set(e,f)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let h=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),s=e.find((e=>!e.format))??e[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find((t=>t.identify?.(e)&&!t.format))}(e,t,l.tags);if(!h){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new r.Scalar(e);return f&&(f.node=t),t}h=e instanceof Map?l[i.MAP]:Symbol.iterator in Object(e)?l[i.SEQ]:l[i.MAP]}c&&(c(h),delete n.onTagObj);const d=h?.createNode?h.createNode(n.schema,e,n):"function"==typeof h?.nodeClass?.from?h.nodeClass.from(n.schema,e,n):new r.Scalar(e);return t?d.tag=t:h.default||(d.tag=h.tag),f&&(f.node=d),d}},3848:(e,t,n)=>{var s=n(3264),i=n(9303);const r={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class o{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},o.defaultYaml,e),this.tags=Object.assign({},o.defaultTags,t)}clone(){const e=new o(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new o(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:o.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},o.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:o.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},o.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),s=n.shift();switch(s){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,s]=n;return this.tags[e]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${s}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,s]=e.match(/^(.*!)([^!]*)$/s);s||t(`The ${e} tag has no suffix`);const i=this.tags[n];if(i)try{return i+decodeURIComponent(s)}catch(e){return t(String(e)),null}return"!"===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+e.substring(n.length).replace(/[!,[\]{}]/g,(e=>r[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let r;if(e&&n.length>0&&s.isNode(e.contents)){const t={};i.visit(e.contents,((e,n)=>{s.isNode(n)&&n.tag&&(t[n.tag]=!0)})),r=Object.keys(t)}else r=[];for(const[s,i]of n)"!!"===s&&"tag:yaml.org,2002:"===i||e&&!r.some((e=>e.startsWith(i)))||t.push(`%TAG ${s} ${i}`);return t.join("\n")}}o.defaultYaml={explicit:!1,version:"1.2"},o.defaultTags={"!!":"tag:yaml.org,2002:"},t.Directives=o},2981:(e,t)=>{class n extends Error{constructor(e,t,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=t}}t.YAMLError=n,t.YAMLParseError=class extends n{constructor(e,t,n){super("YAMLParseError",e,t,n)}},t.YAMLWarning=class extends n{constructor(e,t,n){super("YAMLWarning",e,t,n)}},t.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:s,col:i}=n.linePos[0];n.message+=` at line ${s}, column ${i}`;let r=i-1,o=e.substring(t.lineStarts[s-1],t.lineStarts[s]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const e=Math.min(r-39,o.length-79);o="…"+o.substring(e),r-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,r))){let n=e.substring(t.lineStarts[s-2],t.lineStarts[s-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===s&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-r)));const a=" ".repeat(r)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}}},4667:(e,t,n)=>{var s=n(1294),i=n(505),r=n(9442),o=n(2981),a=n(366),c=n(3264),l=n(7356),u=n(5738),f=n(8228),h=n(9248),d=(n(8575),n(5757)),p=n(862),m=n(654),y=n(3769),g=n(9303);s.Composer,i.Document,r.Schema,o.YAMLError,o.YAMLParseError,o.YAMLWarning,a.Alias,c.isAlias,c.isCollection,c.isDocument,c.isMap,c.isNode,c.isPair,c.isScalar,c.isSeq,l.Pair,u.Scalar,f.YAMLMap,h.YAMLSeq,d.Lexer,p.LineCounter,m.Parser,t.Qc=y.parse,y.parseAllDocuments,y.parseDocument,t.Pz=y.stringify,g.visit,g.visitAsync},4774:(e,t)=>{t.debug=function(e,...t){"debug"===e&&console.log(...t)},t.warn=function(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}},366:(e,t,n)=>{var s=n(5157),i=n(9303),r=n(3264),o=n(7384),a=n(5805);class c extends o.NodeBase{constructor(e){super(r.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return i.visit(e,{Node:(e,n)=>{if(n===this)return i.visit.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:s,maxAliasCount:i}=t,r=this.resolve(s);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=n.get(r);if(o||(a.toJS(r,null,t),o=n.get(r)),!o||void 0===o.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=l(s,r,n)),o.count*o.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return o.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(s.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${i} `}return i}}function l(e,t,n){if(r.isAlias(t)){const s=t.resolve(e),i=n&&s&&n.get(s);return i?i.count*i.aliasCount:0}if(r.isCollection(t)){let s=0;for(const i of t.items){const t=l(e,i,n);t>s&&(s=t)}return s}if(r.isPair(t)){const s=l(e,t.key,n),i=l(e,t.value,n);return Math.max(s,i)}return 1}t.Alias=c},1928:(e,t,n)=>{var s=n(9534),i=n(3264),r=n(7384);function o(e,t,n){let i=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){const e=[];e[n]=i,i=e}else i=new Map([[n,i]])}return s.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const a=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class c extends r.NodeBase{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((t=>i.isNode(t)||i.isPair(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(a(e))this.add(t);else{const[n,...s]=e,r=this.get(n,!0);if(i.isCollection(r))r.addIn(s,t);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`);this.set(n,o(this.schema,s,t))}}}deleteIn(e){const[t,...n]=e;if(0===n.length)return this.delete(t);const s=this.get(t,!0);if(i.isCollection(s))return s.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...s]=e,r=this.get(n,!0);return 0===s.length?!t&&i.isScalar(r)?r.value:r:i.isCollection(r)?r.getIn(s,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!i.isPair(t))return!1;const n=t.value;return null==n||e&&i.isScalar(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(0===n.length)return this.has(t);const s=this.get(t,!0);return!!i.isCollection(s)&&s.hasIn(n)}setIn(e,t){const[n,...s]=e;if(0===s.length)this.set(n,t);else{const e=this.get(n,!0);if(i.isCollection(e))e.setIn(s,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`);this.set(n,o(this.schema,s,t))}}}}t.Collection=c,t.collectionFromPath=o,t.isEmptyPath=a},7384:(e,t,n)=>{var s=n(6791),i=n(3264),r=n(5805);t.NodeBase=class{constructor(e){Object.defineProperty(this,i.NODE_TYPE,{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:o,reviver:a}={}){if(!i.isDocument(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},l=r.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?s.applyReviver(a,{"":l},"",l):l}}},7356:(e,t,n)=>{var s=n(9534),i=n(4418),r=n(6434),o=n(3264);class a{constructor(e,t=null){Object.defineProperty(this,o.NODE_TYPE,{value:o.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return o.isNode(t)&&(t=t.clone(e)),o.isNode(n)&&(n=n.clone(e)),new a(t,n)}toJSON(e,t){const n=t?.mapAsMap?new Map:{};return r.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?i.stringifyPair(this,e,t,n):JSON.stringify(this)}}t.Pair=a,t.createPair=function(e,t,n){const i=s.createNode(e,void 0,n),r=s.createNode(t,void 0,n);return new a(i,r)}},5738:(e,t,n)=>{var s=n(3264),i=n(7384),r=n(5805);class o extends i.NodeBase{constructor(e){super(s.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:r.toJS(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",t.Scalar=o,t.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},8228:(e,t,n)=>{var s=n(2970),i=n(6434),r=n(1928),o=n(3264),a=n(7356),c=n(5738);function l(e,t){const n=o.isScalar(t)?t.value:t;for(const s of e)if(o.isPair(s)){if(s.key===t||s.key===n)return s;if(o.isScalar(s.key)&&s.key.value===n)return s}}class u extends r.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:s,replacer:i}=n,r=new this(e),o=(e,o)=>{if("function"==typeof i)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==o||s)&&r.items.push(a.createPair(e,o,n))};if(t instanceof Map)for(const[e,n]of t)o(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r}add(e,t){let n;n=o.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e?.value);const s=l(this.items,n.key),i=this.schema?.sortMapEntries;if(s){if(!t)throw new Error(`Key ${n.key} already set`);o.isScalar(s.value)&&c.isScalarValue(n.value)?s.value.value=n.value:s.value=n.value}else if(i){const e=this.items.findIndex((e=>i(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=l(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=l(this.items,e),s=n?.value;return(!t&&o.isScalar(s)?s.value:s)??void 0}has(e){return!!l(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,n){const s=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(s);for(const e of this.items)i.addPairToJSMap(t,s,e);return s}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!o.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),s.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}t.YAMLMap=u,t.findPair=l},9248:(e,t,n)=>{var s=n(9534),i=n(2970),r=n(1928),o=n(3264),a=n(5738),c=n(5805);class l extends r.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(o.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=u(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=u(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&o.isScalar(s)?s.value:s}has(e){const t=u(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=u(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const s=this.items[n];o.isScalar(s)&&a.isScalarValue(t)?s.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let s=0;for(const e of this.items)n.push(c.toJS(e,String(s++),t));return n}toString(e,t,n){return e?i.stringifyCollection(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 e=0;for(let o of t){if("function"==typeof i){const n=t instanceof Set?o:String(e++);o=i.call(t,n,o)}r.items.push(s.createNode(o,void 0,n))}}return r}}function u(e){let t=o.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=l},6434:(e,t,n)=>{var s=n(4774),i=n(121),r=n(3264),o=n(5738),a=n(5805);function c(e,t,n){const s=e&&r.isAlias(n)?n.resolve(e.doc):n;if(!r.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,e,Map);for(const[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}t.addPairToJSMap=function(e,t,{key:n,value:l}){if(e?.doc.schema.merge&&(e=>"<<"===e||r.isScalar(e)&&"<<"===e.value&&(!e.type||e.type===o.Scalar.PLAIN))(n))if(l=r.isAlias(l)?l.resolve(e.doc):l,r.isSeq(l))for(const n of l.items)c(e,t,n);else if(Array.isArray(l))for(const n of l)c(e,t,n);else c(e,t,l);else{const o=a.toJS(n,"",e);if(t instanceof Map)t.set(o,a.toJS(l,o,e));else if(t instanceof Set)t.add(o);else{const c=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(r.isNode(e)&&n?.doc){const t=i.createStringifyContext(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),s.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(n,o,e),u=a.toJS(l,c,e);c in t?Object.defineProperty(t,c,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[c]=u}}return t}},3264:(e,t)=>{const n=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),a=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),l=e=>!!e&&"object"==typeof e&&e[c]===o;function u(e){if(e&&"object"==typeof e)switch(e[c]){case i:case a:return!0}return!1}t.ALIAS=n,t.DOC=s,t.MAP=i,t.NODE_TYPE=c,t.PAIR=r,t.SCALAR=o,t.SEQ=a,t.hasAnchor=e=>(l(e)||u(e))&&!!e.anchor,t.isAlias=e=>!!e&&"object"==typeof e&&e[c]===n,t.isCollection=u,t.isDocument=e=>!!e&&"object"==typeof e&&e[c]===s,t.isMap=e=>!!e&&"object"==typeof e&&e[c]===i,t.isNode=function(e){if(e&&"object"==typeof e)switch(e[c]){case n:case i:case o:case a:return!0}return!1},t.isPair=e=>!!e&&"object"==typeof e&&e[c]===r,t.isScalar=l,t.isSeq=e=>!!e&&"object"==typeof e&&e[c]===a},5805:(e,t,n)=>{var s=n(3264);t.toJS=function e(t,n,i){if(Array.isArray(t))return t.map(((t,n)=>e(t,String(n),i)));if(t&&"function"==typeof t.toJSON){if(!i||!s.hasAnchor(t))return t.toJSON(n,i);const e={aliasCount:0,count:1,res:void 0};i.anchors.set(t,e),i.onCreate=t=>{e.res=t,delete i.onCreate};const r=t.toJSON(n,i);return i.onCreate&&i.onCreate(r),r}return"bigint"!=typeof t||i?.keep?t:Number(t)}},1771:(e,t,n)=>{var s=n(1070),i=n(5147),r=n(2981),o=n(3955);function a(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function c(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const s=e.props.slice(1);let i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of s)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:s});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const s="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:s,source:t,end:i})}}}t.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:s,inFlow:i=!1,offset:r=-1,type:c="PLAIN"}=t,l=o.stringifyString({type:c,value:e},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:s,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n"),t=l.substring(0,e),n=l.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:r,indent:s,source:t}];return a(i,u)||i.push({type:"newline",offset:-1,indent:s,source:"\n"}),{type:"block-scalar",offset:r,indent:s,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:r,indent:s,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:r,indent:s,source:l,end:u};default:return{type:"scalar",offset:r,indent:s,source:l,end:u}}},t.resolveAsScalar=function(e,t=!0,n){if(e){const o=(e,t,s)=>{const i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!n)throw new r.YAMLParseError([i,i+1],t,s);n(i,t,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(e,t,o);case"block-scalar":return s.resolveBlockScalar({options:{strict:t}},e,o)}}return null},t.setScalarValue=function(e,t,n={}){let{afterKey:s=!1,implicitKey:i=!1,inFlow:r=!1,type:l}=n,u="indent"in e?e.indent:null;if(s&&"number"==typeof u&&(u+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");l=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const f=o.stringifyString({type:l,value:t},{implicitKey:i||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),s=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=s,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,r=[{type:"block-scalar-header",offset:t,indent:n,source:s}];a(r,"end"in e?e.end:void 0)||r.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:r,source:i})}}(e,f);break;case'"':c(e,f,"double-quoted-scalar");break;case"'":c(e,f,"single-quoted-scalar");break;default:c(e,f,"scalar")}}},896:(e,t)=>{function n(e){switch(e.type){case"block-scalar":{let t="";for(const s of e.props)t+=n(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=s(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=s(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=s(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function s({start:e,key:t,sep:s,value:i}){let r="";for(const t of e)r+=t.source;if(t&&(r+=n(t)),s)for(const e of s)r+=e.source;return i&&(r+=n(i)),r}t.stringify=e=>"type"in e?n(e):s(e)},5340:(e,t)=>{const n=Symbol("break visit"),s=Symbol("skip children"),i=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),o(Object.freeze([]),e,t)}function o(e,t,s){let r=s(t,e);if("symbol"==typeof r)return r;for(const a of["key","value"]){const c=t[a];if(c&&"items"in c){for(let t=0;t<c.items.length;++t){const r=o(Object.freeze(e.concat([[a,t]])),c.items[t],s);if("number"==typeof r)t=r-1;else{if(r===n)return n;r===i&&(c.items.splice(t,1),t-=1)}}"function"==typeof r&&"key"===a&&(r=r(t,e))}}return"function"==typeof r?r(t,e):r}r.BREAK=n,r.SKIP=s,r.REMOVE=i,r.itemAtPath=(e,t)=>{let n=e;for(const[e,s]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[s]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},t.visit=r},8575:(e,t,n)=>{var s=n(1771),i=n(896),r=n(5340);t.createScalarToken=s.createScalarToken,t.resolveAsScalar=s.resolveAsScalar,t.setScalarValue=s.setScalarValue,t.stringify=i.stringify,t.visit=r.visit,t.BOM="\ufeff",t.DOCUMENT="",t.FLOW_END="",t.SCALAR="",t.isCollection=e=>!!e&&"items"in e,t.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),t.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},t.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":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(e[0]){case" ":case"\t":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}},5757:(e,t,n)=>{var s=n(8575);function i(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const r=new Set("0123456789ABCDEFabcdef"),o=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),a=new Set(",[]{}"),c=new Set(" ,[]{}\n\r\t"),l=e=>!e||c.has(e);t.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+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("\r"===t){const t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"===t||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&i(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(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(null===e)return this.setNext("stream");if(e[0]===s.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){const s=e[n-1];if(" "===s||"\t"===s){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){const n=e[t-1];if(" "!==n&&"\t"!==n)break;t-=1}const s=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),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 s.DOCUMENT,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 e=this.peek(3);if(("---"===e||"..."===e)&&i(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!i(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)&&i(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)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(l),"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 r=this.getLine();if(null===r)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==r[0]||0===n&&(r.startsWith("---")||r.startsWith("..."))&&i(r[3]))&&(n!==this.indentNext-1||1!==this.flowLevel||"]"!==r[0]&&"}"!==r[0]))return this.flowLevel=0,yield s.FLOW_END,yield*this.parseLineStart();let o=0;for(;","===r[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),r[o]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-o),"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(l),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||i(e)||","===e)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(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let s=n.indexOf("\n",this.pos);if(-1!==s){for(;-1!==s;){const e=this.continueScalar(s+1);if(-1===e)break;s=n.indexOf("\n",e)}-1!==s&&(t=s-("\r"===n[s-1]?2:1))}if(-1===t){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((e=>i(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let s=this.pos;e=this.buffer[s];++s)switch(e){case" ":n+=1;break;case"\n":t=s,n=0;break;case"\r":{const e=this.buffer[s+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(e=this.buffer[i];" "===e;)e=this.buffer[++i];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,s=this.buffer[e];"\r"===s&&(s=this.buffer[--e]);const i=e;for(;" "===s;)s=this.buffer[--e];if(!("\n"===s&&e>=this.pos&&e+1+n>i))break;t=e}return yield s.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,n=this.pos-1,r=this.pos-1;for(;t=this.buffer[++r];)if(":"===t){const t=this.buffer[r+1];if(i(t)||e&&a.has(t))break;n=r}else if(i(t)){let s=this.buffer[r+1];if("\r"===t&&("\n"===s?(r+=1,t="\n",s=this.buffer[r+1]):n=r),"#"===s||e&&a.has(s))break;if("\n"===t){const e=this.continueScalar(r+1);if(-1===e)break;r=Math.max(r,e-2)}}else{if(e&&a.has(t))break;n=r}return t||this.atEnd?(yield s.SCALAR,yield*this.pushToIndex(n+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*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(l))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(i(t)||e&&a.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!i(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o.has(t))t=this.buffer[++e];else{if("%"!==t||!r.has(this.buffer[e+1])||!r.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},862:(e,t)=>{t.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}},654:(e,t,n)=>{var s=n(8575),i=n(5757);function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function o(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function a(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function c(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function l(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,a(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}t.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new i.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&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,process.env.LOG_TOKENS&&console.log("|",s.prettyToken(e)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=s.tokenType(e);if(t)if("scalar"===t)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 t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,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("doc-end"!==this.type||e&&"doc-end"===e.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===o(n.start)&&(0===t.indent||n.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==o(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}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("map-value-ind"===this.type){const t=l(c(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;"comment"===s?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s))return Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(s&&t.sep&&!t.value){const n=[];for(let s=0;s<t.sep.length;++s){const i=t.sep[s];switch(i.type){case"newline":n.push(s);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)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:i,key:null,sep:[this.sourceToken]}]});else if(a(t.key)&&!r(t.sep,"newline")){const e=l(t.start),n=t.key,s=t.sep;s.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:s}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=l(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:i,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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const t=this.startBlockValue(e);if(t)return n&&"block-seq"!==t.type&&e.items.push({start:i}),void this.stack.push(t)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;"comment"===s?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s))return Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!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]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=l(c(t));u(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+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=l(c(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=l(c(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},3769:(e,t,n)=>{var s=n(1294),i=n(505),r=n(2981),o=n(4774),a=n(862),c=n(654);function l(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new a.LineCounter||null,prettyErrors:t}}function u(e,t={}){const{lineCounter:n,prettyErrors:i}=l(t),o=new c.Parser(n?.addNewLine),a=new s.Composer(t);let u=null;for(const t of a.compose(o.parse(e),!0,e.length))if(u){if("silent"!==u.options.logLevel){u.errors.push(new r.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else u=t;return i&&n&&(u.errors.forEach(r.prettifyError(e,n)),u.warnings.forEach(r.prettifyError(e,n))),u}t.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=u(e,n);if(!i)return null;if(i.warnings.forEach((e=>o.warn(i.options.logLevel,e))),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))},t.parseAllDocuments=function(e,t={}){const{lineCounter:n,prettyErrors:i}=l(t),o=new c.Parser(n?.addNewLine),a=new s.Composer(t),u=Array.from(a.compose(o.parse(e)));if(i&&n)for(const t of u)t.errors.forEach(r.prettifyError(e,n)),t.warnings.forEach(r.prettifyError(e,n));return u.length>0?u:Object.assign([],{empty:!0},a.streamInfo())},t.parseDocument=u,t.stringify=function(e,t,n){let s=null;if("function"==typeof t||Array.isArray(t)?s=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){const e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=n??t??{};if(!e)return}return new i.Document(e,s,n).toString(n)}},9442:(e,t,n)=>{var s=n(3264),i=n(4457),r=n(4284),o=n(5077),a=n(8927);const c=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class l{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:l,schema:u,sortMapEntries:f,toStringDefaults:h}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.merge=!!n,this.name="string"==typeof u&&u||"core",this.knownTags=l?a.coreKnownTags:{},this.tags=a.getTags(t,this.name),this.toStringOptions=h??null,Object.defineProperty(this,s.MAP,{value:i.map}),Object.defineProperty(this,s.SCALAR,{value:o.string}),Object.defineProperty(this,s.SEQ,{value:r.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?c:null}clone(){const e=Object.create(l.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}t.Schema=l},4457:(e,t,n)=>{var s=n(3264),i=n(8228);const r={collection:"map",default:!0,nodeClass:i.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(s.isMap(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>i.YAMLMap.from(e,t,n)};t.map=r},4556:(e,t,n)=>{var s=n(5738);const i={identify:e=>null==e,createNode:()=>new s.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new s.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&i.test.test(e)?e:t.options.nullStr};t.nullTag=i},4284:(e,t,n)=>{var s=n(3264),i=n(9248);const r={collection:"seq",default:!0,nodeClass:i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(s.isSeq(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>i.YAMLSeq.from(e,t,n)};t.seq=r},5077:(e,t,n)=>{var s=n(3955);const i={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,i)=>(t=Object.assign({actualString:!0},t),s.stringifyString(e,t,n,i))};t.string=i},9882:(e,t,n)=>{var s=n(5738);const i={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new s.Scalar("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&i.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};t.boolTag=i},2612:(e,t,n)=>{var s=n(5738),i=n(6592);const r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new s.Scalar(parseFloat(e)),n=e.indexOf(".");return-1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:i.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=r},8893:(e,t,n)=>{var s=n(6592);const i=e=>"bigint"==typeof e||Number.isInteger(e),r=(e,t,n,{intAsBigInt:s})=>s?BigInt(e):parseInt(e.substring(t),n);function o(e,t,n){const{value:r}=e;return i(r)&&r>=0?n+r.toString(t):s.stringifyNumber(e)}const a={identify:e=>i(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>r(e,2,8,n),stringify:e=>o(e,8,"0o")},c={identify:i,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:s.stringifyNumber},l={identify:e=>i(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>o(e,16,"0x")};t.int=c,t.intHex=l,t.intOct=a},3156:(e,t,n)=>{var s=n(4457),i=n(4556),r=n(4284),o=n(5077),a=n(9882),c=n(2612),l=n(8893);const u=[s.map,r.seq,o.string,i.nullTag,a.boolTag,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float];t.schema=u},3535:(e,t,n)=>{var s=n(5738),i=n(4457),r=n(4284);function o(e){return"bigint"==typeof e||Number.isInteger(e)}const a=({value:e})=>JSON.stringify(e),c=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:a},{identify:e=>null==e,createNode:()=>new s.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:a},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:a},{identify:o,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>o(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:a}],l={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},u=[i.map,r.seq].concat(c,l);t.schema=u},8927:(e,t,n)=>{var s=n(4457),i=n(4556),r=n(4284),o=n(5077),a=n(9882),c=n(2612),l=n(8893),u=n(3156),f=n(3535),h=n(8062),d=n(9497),p=n(6780),m=n(2321),y=n(1114),g=n(4849);const v=new Map([["core",u.schema],["failsafe",[s.map,r.seq,o.string]],["json",f.schema],["yaml11",m.schema],["yaml-1.1",m.schema]]),b={binary:h.binary,bool:a.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:g.floatTime,int:l.int,intHex:l.intHex,intOct:l.intOct,intTime:g.intTime,map:s.map,null:i.nullTag,omap:d.omap,pairs:p.pairs,seq:r.seq,set:y.set,timestamp:g.timestamp},w={"tag:yaml.org,2002:binary":h.binary,"tag:yaml.org,2002:omap":d.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":y.set,"tag:yaml.org,2002:timestamp":g.timestamp};t.coreKnownTags=w,t.getTags=function(e,t){let n=v.get(t);if(!n){if(!Array.isArray(e)){const e=Array.from(v.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}n=[]}if(Array.isArray(e))for(const t of e)n=n.concat(t);else"function"==typeof e&&(n=e(n.slice()));return n.map((e=>{if("string"!=typeof e)return e;const t=b[e];if(t)return t;const n=Object.keys(b).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}},8062:(e,t,n)=>{var s=n(5738),i=n(3955);const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,o,a){const c=n;let l;if("function"==typeof Buffer)l=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(t||(t=s.Scalar.BLOCK_LITERAL),t!==s.Scalar.QUOTE_DOUBLE){const e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(l.length/e),i=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)i[t]=l.substr(s,e);l=i.join(t===s.Scalar.BLOCK_LITERAL?"\n":" ")}return i.stringifyString({comment:e,type:t,value:l},r,o,a)}};t.binary=r},601:(e,t,n)=>{var s=n(5738);function i({value:e,source:t},n){return t&&(e?r:o).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const r={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new s.Scalar(!0),stringify:i},o={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new s.Scalar(!1),stringify:i};t.falseTag=o,t.trueTag=r},7381:(e,t,n)=>{var s=n(5738),i=n(6592);const r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new s.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){const s=e.substring(n+1).replace(/_/g,"");"0"===s[s.length-1]&&(t.minFractionDigits=s.length)}return t},stringify:i.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=r},8861:(e,t,n)=>{var s=n(6592);const i=e=>"bigint"==typeof e||Number.isInteger(e);function r(e,t,n,{intAsBigInt:s}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const r=parseInt(e,n);return"-"===i?-1*r:r}function o(e,t,n){const{value:r}=e;if(i(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return s.stringifyNumber(e)}const a={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>r(e,2,2,n),stringify:e=>o(e,2,"0b")},c={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>r(e,1,8,n),stringify:e=>o(e,8,"0")},l={identify:i,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:s.stringifyNumber},u={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>o(e,16,"0x")};t.int=l,t.intBin=a,t.intHex=u,t.intOct=c},9497:(e,t,n)=>{var s=n(3264),i=n(5805),r=n(8228),o=n(9248),a=n(6780);class c extends o.YAMLSeq{constructor(){super(),this.add=r.YAMLMap.prototype.add.bind(this),this.delete=r.YAMLMap.prototype.delete.bind(this),this.get=r.YAMLMap.prototype.get.bind(this),this.has=r.YAMLMap.prototype.has.bind(this),this.set=r.YAMLMap.prototype.set.bind(this),this.tag=c.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t?.onCreate&&t.onCreate(n);for(const e of this.items){let r,o;if(s.isPair(e)?(r=i.toJS(e.key,"",t),o=i.toJS(e.value,r,t)):r=i.toJS(e,"",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 s=a.createPairs(e,t,n),i=new this;return i.items=s.items,i}}c.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a.resolvePairs(e,t),i=[];for(const{key:e}of n.items)s.isScalar(e)&&(i.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):i.push(e.value));return Object.assign(new c,n)},createNode:(e,t,n)=>c.from(e,t,n)};t.YAMLOMap=c,t.omap=l},6780:(e,t,n)=>{var s=n(3264),i=n(7356),r=n(5738),o=n(9248);function a(e,t){if(s.isSeq(e))for(let n=0;n<e.items.length;++n){let o=e.items[n];if(!s.isPair(o)){if(s.isMap(o)){o.items.length>1&&t("Each pair must have its own sequence indicator");const e=o.items[0]||new i.Pair(new r.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[n]=s.isPair(o)?o:new i.Pair(o)}}else t("Expected a sequence for this tag");return e}function c(e,t,n){const{replacer:s}=n,r=new o.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,c;if("function"==typeof s&&(e=s.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);o=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);o=t[0],c=e[o]}else o=e;r.items.push(i.createPair(o,c,n))}return r}const l={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a,createNode:c};t.createPairs=c,t.pairs=l,t.resolvePairs=a},2321:(e,t,n)=>{var s=n(4457),i=n(4556),r=n(4284),o=n(5077),a=n(8062),c=n(601),l=n(7381),u=n(8861),f=n(9497),h=n(6780),d=n(1114),p=n(4849);const m=[s.map,r.seq,o.string,i.nullTag,c.trueTag,c.falseTag,u.intBin,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float,a.binary,f.omap,h.pairs,d.set,p.intTime,p.floatTime,p.timestamp];t.schema=m},1114:(e,t,n)=>{var s=n(3264),i=n(7356),r=n(8228);class o extends r.YAMLMap{constructor(e){super(e),this.tag=o.tag}add(e){let t;t=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new i.Pair(e.key,null):new i.Pair(e,null),r.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=r.findPair(this.items,e);return!t&&s.isPair(n)?s.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=r.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new i.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:s}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof s&&(e=s.call(t,e,e)),r.items.push(i.createPair(e,null,n));return r}}o.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:e=>e instanceof Set,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>o.from(e,t,n),resolve(e,t){if(s.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new o,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=o,t.set=a},4849:(e,t,n)=>{var s=n(6592);function i(e,t){const n=e[0],s="-"===n||"+"===n?e.substring(1):e,i=e=>t?BigInt(e):Number(e),r=s.replace(/_/g,"").split(":").reduce(((e,t)=>e*i(60)+i(t)),i(0));return"-"===n?i(-1)*r:r}function r(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return s.stringifyNumber(e);let i="";t<0&&(i="-",t*=n(-1));const r=n(60),o=[t%r];return t<60?o.unshift(0):(t=(t-o[0])/r,o.unshift(t%r),t>=60&&(t=(t-o[0])/r,o.unshift(t))),i+o.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const o={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>i(e,n),stringify:r},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>i(e,!1),stringify:r},c={identify:e=>e 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(e){const t=e.match(c.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,s,r,o,a,l]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let f=Date.UTC(n,s-1,r,o||0,a||0,l||0,u);const h=t[8];if(h&&"Z"!==h){let e=i(h,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=a,t.intTime=o,t.timestamp=c},4168:(e,t)=>{const n="block",s="quoted";function i(e,t,n){let s=t,i=t+1,r=e[i];for(;" "===r||"\t"===r;)if(t<i+n)r=e[++t];else{do{r=e[++t]}while(r&&"\n"!==r);s=t,i=t+1,r=e[i]}return s}t.FOLD_BLOCK=n,t.FOLD_FLOW="flow",t.FOLD_QUOTED=s,t.foldFlowLines=function(e,t,r="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;a<c&&(c=0);const f=Math.max(1+c,1+a-t.length);if(e.length<=f)return e;const h=[],d={};let p,m,y=a-t.length;"number"==typeof o&&(o>a-Math.max(2,c)?h.push(0):y=a-o);let g=!1,v=-1,b=-1,w=-1;r===n&&(v=i(e,v,t.length),-1!==v&&(y=v+f));for(let o;o=e[v+=1];){if(r===s&&"\\"===o){switch(b=v,e[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}w=v}if("\n"===o)r===n&&(v=i(e,v,t.length)),y=v+t.length+f,p=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[v+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=v)}if(v>=y)if(p)h.push(p),y=p+f,p=void 0;else if(r===s){for(;" "===m||"\t"===m;)m=o,o=e[v+=1],g=!0;const t=v>w+1?v-2:b-1;if(d[t])return e;h.push(t),d[t]=!0,y=t+f,p=void 0}else g=!0}m=o}if(g&&u&&u(),0===h.length)return e;l&&l();let S=e.slice(0,h[0]);for(let n=0;n<h.length;++n){const i=h[n],o=h[n+1]||e.length;0===i?S=`\n${t}${e.slice(0,o)}`:(r===s&&d[i]&&(S+=`${e[i]}\\`),S+=`\n${t}${e.slice(i+1,o)}`)}return S}},121:(e,t,n)=>{var s=n(5157),i=n(3264),r=n(1705),o=n(3955);t.createStringifyContext=function(e,t){const n=Object.assign({blockQuote:!0,commentString:r.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof n.indent?" ".repeat(n.indent):" ",inFlow:s,options:n}},t.stringify=function(e,t,n,r){if(i.isPair(e))return e.toString(t,n,r);if(i.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const c=i.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a||(a=function(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))??n[0]}let n,s;if(i.isScalar(t)){s=t.value;const i=e.filter((e=>e.identify?.(s)));n=i.find((e=>e.format===t.format))??i.find((e=>!e.format))}else s=t,n=e.find((e=>e.nodeClass&&s instanceof e.nodeClass));if(!n)throw new Error(`Tag not resolved for ${s?.constructor?.name??typeof s} value`);return n}(t.doc.schema.tags,c));const l=function(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],a=(i.isScalar(e)||i.isCollection(e))&&e.anchor;a&&s.anchorIsValid(a)&&(n.add(a),o.push(`&${a}`));const c=e.tag?e.tag:t.default?null:t.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}(c,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(c,t,n,r):i.isScalar(c)?o.stringifyString(c,t,n,r):c.toString(t,n,r);return l?i.isScalar(c)||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}},2970:(e,t,n)=>{var s=n(3264),i=n(121),r=n(1705);function o({comment:e,items:t},n,{blockItemPrefix:o,flowChars:a,itemIndent:l,onChompKeep:u,onComment:f}){const{indent:h,options:{commentString:d}}=n,p=Object.assign({},n,{indent:l,type:null});let m=!1;const y=[];for(let e=0;e<t.length;++e){const a=t[e];let u=null;if(s.isNode(a))!m&&a.spaceBefore&&y.push(""),c(n,y,a.commentBefore,m),a.comment&&(u=a.comment);else if(s.isPair(a)){const e=s.isNode(a.key)?a.key:null;e&&(!m&&e.spaceBefore&&y.push(""),c(n,y,e.commentBefore,m))}m=!1;let f=i.stringify(a,p,(()=>u=null),(()=>m=!0));u&&(f+=r.lineComment(f,l,d(u))),m&&u&&(m=!1),y.push(o+f)}let g;if(0===y.length)g=a.start+a.end;else{g=y[0];for(let e=1;e<y.length;++e){const t=y[e];g+=t?`\n${h}${t}`:"\n"}}return e?(g+="\n"+r.indentComment(d(e),h),f&&f()):m&&u&&u(),g}function a({items:e},t,{flowChars:n,itemIndent:o}){const{indent:a,indentStep:l,flowCollectionPadding:u,options:{commentString:f}}=t;o+=l;const h=Object.assign({},t,{indent:o,inFlow:!0,type:null});let d=!1,p=0;const m=[];for(let n=0;n<e.length;++n){const a=e[n];let l=null;if(s.isNode(a))a.spaceBefore&&m.push(""),c(t,m,a.commentBefore,!1),a.comment&&(l=a.comment);else if(s.isPair(a)){const e=s.isNode(a.key)?a.key:null;e&&(e.spaceBefore&&m.push(""),c(t,m,e.commentBefore,!1),e.comment&&(d=!0));const n=s.isNode(a.value)?a.value:null;n?(n.comment&&(l=n.comment),n.commentBefore&&(d=!0)):null==a.value&&e?.comment&&(l=e.comment)}l&&(d=!0);let u=i.stringify(a,h,(()=>l=null));n<e.length-1&&(u+=","),l&&(u+=r.lineComment(u,o,f(l))),!d&&(m.length>p||u.includes("\n"))&&(d=!0),m.push(u),p=m.length}const{start:y,end:g}=n;if(0===m.length)return y+g;if(!d){const e=m.reduce(((e,t)=>e+t.length+2),2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(d){let e=y;for(const t of m)e+=t?`\n${l}${a}${t}`:"\n";return`${e}\n${a}${g}`}return`${y}${u}${m.join(" ")}${u}${g}`}function c({indent:e,options:{commentString:t}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const i=r.indentComment(t(s),e);n.push(i.trimStart())}}t.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?a:o)(e,t,n)}},1705:(e,t)=>{function n(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}t.indentComment=n,t.lineComment=(e,t,s)=>e.endsWith("\n")?n(s,t):s.includes("\n")?"\n"+n(s,t):(e.endsWith(" ")?"":" ")+s,t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},7763:(e,t,n)=>{var s=n(3264),i=n(121),r=n(1705);t.stringifyDocument=function(e,t){const n=[];let o=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(n.push(t),o=!0):e.directives.docStart&&(o=!0)}o&&n.push("---");const a=i.createStringifyContext(e,t),{commentString:c}=a.options;if(e.commentBefore){1!==n.length&&n.unshift("");const t=c(e.commentBefore);n.unshift(r.indentComment(t,""))}let l=!1,u=null;if(e.contents){if(s.isNode(e.contents)){if(e.contents.spaceBefore&&o&&n.push(""),e.contents.commentBefore){const t=c(e.contents.commentBefore);n.push(r.indentComment(t,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const t=u?void 0:()=>l=!0;let f=i.stringify(e.contents,a,(()=>u=null),t);u&&(f+=r.lineComment(f,"",c(u))),"|"!==f[0]&&">"!==f[0]||"---"!==n[n.length-1]?n.push(f):n[n.length-1]=`--- ${f}`}else n.push(i.stringify(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=c(e.comment);t.includes("\n")?(n.push("..."),n.push(r.indentComment(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&l&&(t=t.replace(/^\n+/,"")),t&&(l&&!u||""===n[n.length-1]||n.push(""),n.push(r.indentComment(c(t),"")))}return n.join("\n")+"\n"}},6592:(e,t)=>{t.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:s}){if("bigint"==typeof s)return String(s);const i="number"==typeof s?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(s);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(r)){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let n=t-(r.length-e-1);for(;n-- >0;)r+="0"}return r}},4418:(e,t,n)=>{var s=n(3264),i=n(5738),r=n(121),o=n(1705);t.stringifyPair=function({key:e,value:t},n,a,c){const{allNullValues:l,doc:u,indent:f,indentStep:h,options:{commentString:d,indentSeq:p,simpleKeys:m}}=n;let y=s.isNode(e)&&e.comment||null;if(m){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(s.isCollection(e)||!s.isNode(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let g=!m&&(!e||y&&null==t&&!n.inFlow||s.isCollection(e)||(s.isScalar(e)?e.type===i.Scalar.BLOCK_FOLDED||e.type===i.Scalar.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(m||!l),indent:f+h});let v,b,w,S=!1,k=!1,N=r.stringify(e,n,(()=>S=!0),(()=>k=!0));if(!g&&!n.inFlow&&N.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(l||null==t)return S&&a&&a(),""===N?"?":g?`? ${N}`:N}else if(l&&!m||null==t&&g)return N=`? ${N}`,y&&!S?N+=o.lineComment(N,n.indent,d(y)):k&&c&&c(),N;S&&(y=null),g?(y&&(N+=o.lineComment(N,n.indent,d(y))),N=`? ${N}\n${f}:`):(N=`${N}:`,y&&(N+=o.lineComment(N,n.indent,d(y)))),s.isNode(t)?(v=!!t.spaceBefore,b=t.commentBefore,w=t.comment):(v=!1,b=null,w=null,t&&"object"==typeof t&&(t=u.createNode(t))),n.implicitKey=!1,g||y||!s.isScalar(t)||(n.indentAtStart=N.length+1),k=!1,p||!(h.length>=2)||n.inFlow||g||!s.isSeq(t)||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let E=!1;const A=r.stringify(t,n,(()=>E=!0),(()=>k=!0));let O=" ";if(y||v||b){if(O=v?"\n":"",b){const e=d(b);O+=`\n${o.indentComment(e,n.indent)}`}""!==A||n.inFlow?O+=`\n${n.indent}`:"\n"===O&&(O="\n\n")}else if(!g&&s.isCollection(t)){const e=A[0],s=A.indexOf("\n"),i=-1!==s,r=n.inFlow??t.flow??0===t.items.length;if(i||!r){let t=!1;if(i&&("&"===e||"!"===e)){let n=A.indexOf(" ");"&"===e&&-1!==n&&n<s&&"!"===A[n+1]&&(n=A.indexOf(" ",n+1)),(-1===n||s<n)&&(t=!0)}t||(O=`\n${n.indent}`)}}else""!==A&&"\n"!==A[0]||(O="");return N+=O+A,n.inFlow?E&&a&&a():w&&!E?N+=o.lineComment(N,n.indent,d(w)):k&&c&&c(),N}},3955:(e,t,n)=>{var s=n(5738),i=n(4168);const r=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),o=e=>/^(%|---|\.\.\.)/m.test(e);function a(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:s}=t,a=t.options.doubleQuotedMinMultiLineLength,c=t.indent||(o(e)?" ":"");let l="",u=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(l+=n.slice(u,e)+"\\ ",e+=1,u=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{l+=n.slice(u,e);const t=n.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=n.substr(e,6)}e+=5,u=e+1}break;case"n":if(s||'"'===n[e+2]||n.length<a)e+=1;else{for(l+=n.slice(u,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)l+="\n",e+=2;l+=c," "===n[e+2]&&(l+="\\"),e+=1,u=e+1}break;default:e+=1}return l=u?l+n.slice(u):n,s?l:i.foldFlowLines(l,c,i.FOLD_QUOTED,r(t,!1))}function c(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return a(e,t);const n=t.indent||(o(e)?" ":""),s="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?s:i.foldFlowLines(s,n,i.FOLD_FLOW,r(t,!1))}function l(e,t){const{singleQuote:n}=t.options;let s;if(!1===n)s=a;else{const t=e.includes('"'),i=e.includes("'");s=t&&!i?c:i&&!t?a:n?c:a}return s(e,t)}let u;try{u=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{u=/\n+(?!\n|$)/g}function f({comment:e,type:t,value:n},a,c,f){const{blockQuote:h,commentString:d,lineWidth:p}=a.options;if(!h||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return l(n,a);const m=a.indent||(a.forceBlockIndent||o(n)?" ":""),y="literal"===h||"folded"!==h&&t!==s.Scalar.BLOCK_FOLDED&&(t===s.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const s=t-n,i=e.length;if(i<=s)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>s)return!0;if(n=t+1,i-n<=s)return!1}return!0}(n,p,m.length));if(!n)return y?"|\n":">\n";let g,v;for(v=n.length;v>0;--v){const e=n[v-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let b=n.substring(v);const w=b.indexOf("\n");-1===w?g="-":n===b||w!==b.length-1?(g="+",f&&f()):g="",b&&(n=n.slice(0,-b.length),"\n"===b[b.length-1]&&(b=b.slice(0,-1)),b=b.replace(u,`$&${m}`));let S,k=!1,N=-1;for(S=0;S<n.length;++S){const e=n[S];if(" "===e)k=!0;else{if("\n"!==e)break;N=S}}let E=n.substring(0,N<S?N+1:S);E&&(n=n.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let A=(y?"|":">")+(k?m?"2":"1":"")+g;return e&&(A+=" "+d(e.replace(/ ?[\r\n]+/g," ")),c&&c()),y?`${A}\n${m}${E}${n=n.replace(/\n+/g,`$&${m}`)}${b}`:(n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`),`${A}\n${m}${i.foldFlowLines(`${E}${n}${b}`,m,i.FOLD_BLOCK,r(a,!0))}`)}t.stringifyString=function(e,t,n,u){const{implicitKey:h,inFlow:d}=t,p="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:m}=e;m!==s.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(p.value)&&(m=s.Scalar.QUOTE_DOUBLE);const y=e=>{switch(e){case s.Scalar.BLOCK_FOLDED:case s.Scalar.BLOCK_LITERAL:return h||d?l(p.value,t):f(p,t,n,u);case s.Scalar.QUOTE_DOUBLE:return a(p.value,t);case s.Scalar.QUOTE_SINGLE:return c(p.value,t);case s.Scalar.PLAIN:return function(e,t,n,a){const{type:c,value:u}=e,{actualString:h,implicitKey:d,indent:p,indentStep:m,inFlow:y}=t;if(d&&u.includes("\n")||y&&/[[\]{},]/.test(u))return l(u,t);if(!u||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return d||y||!u.includes("\n")?l(u,t):f(e,t,n,a);if(!d&&!y&&c!==s.Scalar.PLAIN&&u.includes("\n"))return f(e,t,n,a);if(o(u)){if(""===p)return t.forceBlockIndent=!0,f(e,t,n,a);if(d&&p===m)return l(u,t)}const g=u.replace(/\n+/g,`$&\n${p}`);if(h){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(g),{compat:n,tags:s}=t.doc.schema;if(s.some(e)||n?.some(e))return l(u,t)}return d?g:i.foldFlowLines(g,p,i.FOLD_FLOW,r(t,!1))}(p,t,n,u);default:return null}};let g=y(m);if(null===g){const{defaultKeyType:e,defaultStringType:n}=t.options,s=h&&e||n;if(g=y(s),null===g)throw new Error(`Unsupported default string type ${s}`)}return g}},9303:(e,t,n)=>{var s=n(3264);const i=Symbol("break visit"),r=Symbol("skip children"),o=Symbol("remove node");function a(e,t){const n=f(t);s.isDocument(e)?c(null,e.contents,n,Object.freeze([e]))===o&&(e.contents=null):c(null,e,n,Object.freeze([]))}function c(e,t,n,r){const a=h(e,t,n,r);if(s.isNode(a)||s.isPair(a))return d(e,r,a),c(e,a,n,r);if("symbol"!=typeof a)if(s.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const s=c(e,t.items[e],n,r);if("number"==typeof s)e=s-1;else{if(s===i)return i;s===o&&(t.items.splice(e,1),e-=1)}}}else if(s.isPair(t)){r=Object.freeze(r.concat(t));const e=c("key",t.key,n,r);if(e===i)return i;e===o&&(t.key=null);const s=c("value",t.value,n,r);if(s===i)return i;s===o&&(t.value=null)}return a}async function l(e,t){const n=f(t);s.isDocument(e)?await u(null,e.contents,n,Object.freeze([e]))===o&&(e.contents=null):await u(null,e,n,Object.freeze([]))}async function u(e,t,n,r){const a=await h(e,t,n,r);if(s.isNode(a)||s.isPair(a))return d(e,r,a),u(e,a,n,r);if("symbol"!=typeof a)if(s.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const s=await u(e,t.items[e],n,r);if("number"==typeof s)e=s-1;else{if(s===i)return i;s===o&&(t.items.splice(e,1),e-=1)}}}else if(s.isPair(t)){r=Object.freeze(r.concat(t));const e=await u("key",t.key,n,r);if(e===i)return i;e===o&&(t.key=null);const s=await u("value",t.value,n,r);if(s===i)return i;s===o&&(t.value=null)}return a}function f(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function h(e,t,n,i){return"function"==typeof n?n(e,t,i):s.isMap(t)?n.Map?.(e,t,i):s.isSeq(t)?n.Seq?.(e,t,i):s.isPair(t)?n.Pair?.(e,t,i):s.isScalar(t)?n.Scalar?.(e,t,i):s.isAlias(t)?n.Alias?.(e,t,i):void 0}function d(e,t,n){const i=t[t.length-1];if(s.isCollection(i))i.items[e]=n;else if(s.isPair(i))"key"===e?i.key=n:i.value=n;else{if(!s.isDocument(i)){const e=s.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}i.contents=n}}a.BREAK=i,a.SKIP=r,a.REMOVE=o,l.BREAK=i,l.SKIP=r,l.REMOVE=o,t.visit=a,t.visitAsync=l}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{n.r(s),n.d(s,{FtpClient:()=>F,FtpClientPool:()=>U,GrpcList:()=>G,JsonStorage:()=>S,PuboFileSystem:()=>H,RosTopic:()=>je,RosTopicManager:()=>$e,SIGKILL:()=>ce,createRpcClient:()=>W,getNetworks:()=>we,getProcessByPpid:()=>pe,getProcessCommandByPid:()=>de,getProcessCpuUseByPid:()=>he,getProcessName:()=>fe,getProcessTree:()=>me,getWifiName:()=>be,heartbeat:()=>ge,isPortAvailable:()=>ve,isProcessDied:()=>ue});const e=require("fs");function t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function i(){}function r(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(s.key))?i:String(i)),s)}var i}var o=function(){function e(){this.cache=[],this.running=!1,this.len=0}var n,s,o=e.prototype;return o._run=function(e){var n,s,i=e.fn,r=e.promise;try{return t((n=function(e,t){try{var n=function(e,t,n){try{var s=Promise.resolve(e());return t?s.then(t):s}catch(e){return Promise.reject(e)}}(i,(function(e){r.resolve(e)}))}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,(function(e){r.reject(e)})),s=function(){i=null,r=null},n&&n.then?n.then(s):s()))}catch(e){return Promise.reject(e)}},o.run=function(){try{var e=this;if(e.cache.length<1)return e.running=!1,t();e.running=!0;var n=e.cache.shift();return e.len-=1,t((s=function(){e.run()},(r=function(){if("function"==typeof n.fn)return(t=e._run(n))&&t.then?t.then(i):Promise.resolve();var t}())&&r.then?r.then(s):s()))}catch(e){return Promise.reject(e)}var s,r},o.push=function(e){var t=this;return this.len+=1,new Promise((function(n,s){t.cache.push({fn:e,promise:{resolve:n,reject:s}}),t.running||t.run()}))},n=e,(s=[{key:"length",get:function(){return this.len}}])&&r(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),e}();const a=require("crypto");var c=n.n(a);const l={randomUUID:c().randomUUID},u=new Uint8Array(256);let f=u.length;function h(){return f>u.length-16&&(c().randomFillSync(u),f=0),u.slice(f,f+=16)}const d=[];for(let e=0;e<256;++e)d.push((e+256).toString(16).slice(1));const p=function(e,t,n){if(l.randomUUID&&!t&&!e)return l.randomUUID();const s=(e=e||{}).random||(e.rng||h)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=s[e];return t}return function(e,t=0){return d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]}(s)};function m(){}var y=n(5001);function g(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()}var v=function(){function t(e,t){var n=this;this.path=void 0,this._state={},this.queue=new o,this.key=void 0,this.defaultState=void 0,this.path=e,this.defaultState=t,this.key=encodeURIComponent(e),y.on("online",(function(e){e.on("message",(function(t){n.onMessage(t,e),t=null}))})),y.on("exit",(function(e){e.removeAllListeners("message"),e=null})),this.restore(),global.GlobalEmitter&&global.GlobalEmitter.on("SIGINT",this.kill.bind(this))}var n=t.prototype;return n.kill=function(){try{var e=this;return b(g(e.queue.push((function(){return e.syncFile()}))))}catch(e){return Promise.reject(e)}},n.onMessage=function(e,t){try{var n,s=this;return e.key!==s.key?b():b((i=function(){t.send({uid:e.uid,key:s.key,payload:n}),e=null,t=null},(r="get"===e.type?b(s.getState(),(function(e){n=e})):function(e){var t=e();if(t&&t.then)return t.then(m)}((function(){if("set"===e.type)return b(s.setState(e.payload),(function(e){n=e}))})))&&r.then?r.then(i):i()))}catch(e){return Promise.reject(e)}var i,r},n.sync=function(){this.queue.length>0||this.queue.push(this._syncFile.bind(this))},n.syncFile=function(){(0,e.writeFileSync)(this.path,JSON.stringify(this._state))},n._syncFile=function(){try{var t=this;return b(new Promise((function(n,s){(0,e.writeFile)(t.path,JSON.stringify(t._state),(function(e){e?s(e):setTimeout(n,100)}))})))}catch(e){return Promise.reject(e)}},n.restore=function(){try{var t=(0,e.readFileSync)(this.path);this._state=JSON.parse(t.toString())}catch(t){var n,s="win32"===process.platform?"\\":"/";s&&(0,e.mkdirSync)(this.path.split(s).slice(0,-1).join(s),{recursive:!0}),this.setState(null!=(n=this.defaultState)?n:{})}},n.getState=function(){try{return b(this._state)}catch(e){return Promise.reject(e)}},n.setState=function(e){try{return this._state=e,this.sync(),b()}catch(e){return Promise.reject(e)}},t}();function b(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var w=function(){function e(e){this.key=void 0,this.callback={},this.key=encodeURIComponent(e),process.on("message",this.onMessage.bind(this))}var t=e.prototype;return t.onMessage=function(e){e.key===this.key&&("function"==typeof this.callback[e.uid]&&(this.callback[e.uid](e.payload),delete this.callback[e.uid]),e=null)},t.call=function(e){var t=e.type,n=e.payload;try{var s=this;return b(new Promise((function(e){var i=p();s.callback[i]=function(t){return e(t)},process.send({uid:i,type:t,payload:n,key:s.key}),n=null,t=null})))}catch(e){return Promise.reject(e)}},t.getState=function(){try{return b(this.call({type:"get",payload:{}}))}catch(e){return Promise.reject(e)}},t.setState=function(e){try{return b(this.call({type:"set",payload:e}))}catch(e){return Promise.reject(e)}},e}(),S=function(){function e(e,t){var n;void 0===t&&(t={}),this.instance=void 0,this.queue=new o,y.isPrimary?this.instance=new v(e,t.defaultState):this.instance=new w(e),null!=(n=t)&&n.initialState&&this.merge(t.initialState)}var t=e.prototype;return t.getState=function(){try{var e=this;return b(e.queue.push(e.instance.getState.bind(e.instance)))}catch(e){return Promise.reject(e)}},t.setState=function(e){try{var t=this;return b(t.queue.push((function(){return t.instance.setState(e)})))}catch(e){return Promise.reject(e)}},t.get=function(e){try{return e?b(this.getState(),(function(t){return t[e]})):b(this.getState())}catch(e){return Promise.reject(e)}},t.set=function(e,t){try{var n=this;return b(n.getState(),(function(s){return s[e]=t,g(n.setState(s))}))}catch(e){return Promise.reject(e)}},t.merge=function(e){try{var t=this;return b(t.getState(),(function(n){for(var s=0,i=Object.keys(e);s<i.length;s++){var r=i[s];n[r]=e[r]}return g(t.setState(n))}))}catch(e){return Promise.reject(e)}},t.remove=function(e){try{var t=this;return b(t.getState(),(function(n){return delete n[e],g(t.setState(n))}))}catch(e){return Promise.reject(e)}},e}(),k=function(e){void 0===e&&(e=8);var t=function(e){return Math.random().toString(32).slice(2,2+e)};if(e<=8)return t(e);for(var n="",s=0;s<=e;s+=8)n+=t(e-s>8?8:e-s);return n};function N(){}var E,A=(E=function(e){return(t=new Promise((function(t){var n=setTimeout((function(){t(),clearTimeout(n),n=null}),e)})))&&t.then?t.then(N):Promise.resolve();var t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(E.apply(this,e))}catch(e){return Promise.reject(e)}});function O(){}function T(e,t,n){if(n)return t?t(e()):e();try{var s=Promise.resolve(e());return t?s.then(t):s}catch(e){return Promise.reject(e)}}var P=function(e,t){var n=!0,s=function(){n=!1},i=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return o=function(){return o=function(){n?i():(i=null,e=null,s=null,n=null,t=null)},(r=A(t))&&r.then||(r=Promise.resolve(r)),o?r.then(o):r;var r,o},(r=function(t,n){try{var s=T(e,O,i)}catch(e){return n(e)}var i;return s&&s.then?s.then(void 0,n):s}(0,(function(e){console.log(e)})))&&r.then?r.then(o):o();var r,o}));return i(),s},L=function(e,t){var n=void 0===t?{}:t,s=n.checkTime,i=n.timeout;return new Promise((function(t,n){var r,o=P((function(){return T(e,(function(n){n&&("function"==typeof o&&o(),r&&(clearTimeout(r),r=null),t(n),o=null,e=null,t=null)}))}),s||100);i&&(r=setTimeout((function(){"function"==typeof o&&o(),r&&(clearTimeout(r),r=null),n("timeout"),n=null,o=null,e=null}),i))}))},C=["driver"],I=["maxConnection"];function x(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function _(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function M(){}function j(e,t){if(!t)return e&&e.then?e.then(M):Promise.resolve()}function $(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},D.apply(this,arguments)}function B(e,t){if(null==e)return{};var n,s,i={},r=Object.keys(e);for(s=0;s<r.length;s++)n=r[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}function q(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(s.key))?i:String(i)),s)}var i}function K(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var F=function(){function e(e){var t=e.driver,n=B(e,C);this.driver=void 0,this.options=void 0,this.state={running:!1,connected:!1,destroyed:!1,connecting:!1},this.client=void 0,this._len=0,this.id=k(),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.driver=t,this.options=n}var t=e.prototype;return t.connect=function(){try{var e=!1,t=this;return t.client||(t.client=new t.driver),t.state.destroyed=!1,x(_((function(){if(t.state.connecting)return x(L((function(){return t.state.connected}),{checkTime:1e3,timeout:1e4}),(function(){return e=!0,"connected"}))}),(function(n){return e?n:(t.state.connecting=!0,new Promise((function(e,n){t.client.once("ready",(function(){t.state.connected=!0,e("connected"),t.state.connecting=!1})),t.client.once("error",(function(e){n(e),t.close()})),t.client.connect(D({},t.options))})))})))}catch(e){return Promise.reject(e)}},t.close=function(){this.client.end(),this.state.connected=!1,this.state.destroyed=!0,this.state.connecting=!1,this.client=null},t.run=function(e){var t=e.fn,n=e.args;try{var s=this;return s.len+=1,x(_((function(){if(!s.state.connected)return j(s.connect())}),(function(){return _((function(){if(s.state.running)return j(L((function(){return!s.state.running}),{checkTime:1e3,timeout:6e6}))}),(function(){return s.state.running=!0,new Promise((function(e,i){var r;(r=s.client)[t].apply(r,n.concat([function(t,n){t?i(t):e(n)}]))}))}))})))}catch(e){return Promise.reject(e)}},t.bind=function(e){var t=this;return $((function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return x(t.run({fn:e,args:s}),(function(e){return t.state.running=!1,t.len-=1,e}))}))},t.get=function(){try{for(var e=this,t=Buffer.alloc(0),n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return x(e.run({fn:"get",args:s}),(function(n){return new Promise((function(s){n.on("data",(function(e){t=Buffer.concat([t,e],t.byteLength+e.byteLength)})),n.on("end",(function(){s(t),e.state.running=!1,e.len-=1}))}))}))}catch(e){return Promise.reject(e)}},K(e,[{key:"len",get:function(){return this._len},set:function(e){this._len=e,this._len<1&&this.close()}}]),e}(),U=function(){function e(e){var t=e.maxConnection,n=void 0===t?5:t,s=B(e,I);this.options=void 0,this.maxConnection=void 0,this.pool=[],this.get=this.bind("get"),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.options=s,this.maxConnection=n}return e.prototype.bind=function(e){var t=this;return $((function(){var n=t.client;return x(n[e].apply(n,arguments),(function(e){if(n.len<1){var s=t.pool.findIndex((function(e){return e.id===n.id}));t.pool.splice(s,1)}return e}))}))},K(e,[{key:"len",get:function(){return this.pool.length}},{key:"client",get:function(){if(this.pool.length<this.maxConnection){var e=new F(this.options);return this.pool.push(e),e}return this.pool.sort((function(e,t){return e.len-t.len})),this.pool[0]}}]),e}();function R(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Y.apply(this,arguments)}var J=function(e){return e},V=function(){function e(e){var t,n=e.url,s=e.options,i=void 0===s?{}:s,r=e.Grpc,o=e.cert;this.url=void 0,this.options=void 0,this.Grpc=void 0,this.credentials=void 0,this.client=void 0,this._timeout=void 0,this.connections=0;var a=Y({"grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1},i),c=o?r.credentials.createSsl(o):r.credentials.createInsecure();this.url=n,this.Grpc=r,this.credentials=c,this.options=a,this.options.timeout=null!=(t=this.options.timeout)?t:1e4,r=null,i=null,o=null}var t=e.prototype;return t.request=function(e,t,n){try{var s,i=this;i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i.connections+=1,i.client||(i.client=new i.Grpc.Client(i.url,i.credentials,i.options));var r=Buffer.alloc(0);return R((o=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return R(i._request({service:e,method:t,data:n}),(function(e){r=e}))}),(function(e){s=e})),a=function(){if(e=null,t=null,n=null,i.connections-=1,i.connections<0&&(i.connections=0),i.connections<1&&(i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i._timeout=setTimeout((function(){return i.close()}),6e4)),s)throw console.log(s),i.close(),new Error("grpc connection error.");return r},o&&o.then?o.then(a):a()))}catch(e){return Promise.reject(e)}var o,a},t._request=function(e){var t=this,n=e.service,s=e.method,i=e.data;return new Promise((function(e,r){var o=!1,a=setTimeout((function(){o=!0,t.close(),console.log("rpc request timeout"),r(new Error("timeout"))}),t.options.timeout);t.client.makeUnaryRequest("/"+n+"/"+s,J,J,i?Buffer.from(i):Buffer.alloc(0),(function(t,n){o||(clearTimeout(a),t?r(t):e(n))}))}))},t.close=function(){var e;this._timeout&&(clearTimeout(this._timeout),delete this._timeout),null==(e=this.client)||e.close(),this.client=null,delete this.client},e}(),G=[];function W(e){var t=e.url,n=e.options,s=void 0===n?{}:n,i=e.ServiceImp,r=e.Grpc,o=e.cert,a=new V({url:t,options:s,Grpc:r,cert:o});return G.push(a),r=null,s=null,new i({request:a.request.bind(a)})}var Q=function(e){return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return new Promise((function(t,s){e.apply(void 0,n.concat([function(e){e&&s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.length<2?t(i[0]):t([].concat(i))}]))}))}},H={read:Q(e.read),readFile:Q(e.readFile),writeFile:Q(e.writeFile),readdir:Q(e.readdir),open:Q(e.open),close:Q(e.close),write:Q(e.write),stat:Q(e.stat),mkdir:Q(e.mkdir),rm:Q(e.rm)};const X=require("child_process");function z(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Z(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var ee="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function te(e,t,n){if(!e.s){if(n instanceof ne){if(!n.s)return void(n.o=te.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(te.bind(null,e,t),te.bind(null,e,2));e.s=t,e.v=n;var s=e.o;s&&s(e)}}var ne=function(){function e(){}return e.prototype.then=function(t,n){var s=new e,i=this.s;if(i){var r=1&i?t:n;if(r){try{te(s,1,r(this.v))}catch(e){te(s,2,e)}return s}return this}return this.o=function(e){try{var i=e.v;1&e.s?te(s,1,t?t(i):i):n?te(s,1,n(i)):te(s,2,i)}catch(e){te(s,2,e)}},s},e}();function se(e){return e instanceof ne&&1&e.s}function ie(e,t,n){if("function"==typeof e[ee]){var s,i,r,o=e[ee]();if(function e(a){try{for(;!((s=o.next()).done||n&&n());)if((a=t(s.value))&&a.then){if(!se(a))return void a.then(e,r||(r=te.bind(null,i=new ne,2)));a=a.v}i?te(i,1,a):i=a}catch(e){te(i||(i=new ne),2,e)}}(),o.return){var a=function(e){try{s.done||o.return()}catch(e){}return e};if(i&&i.then)return i.then(a,(function(e){throw a(e)}));a()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],l=0;l<e.length;l++)c.push(e[l]);return function(e,t,n){var s,i,r=-1;return function o(a){try{for(;++r<e.length&&(!n||!n());)if((a=t(r))&&a.then){if(!se(a))return void a.then(o,i||(i=te.bind(null,s=new ne,2)));a=a.v}s?te(s,1,a):s=a}catch(e){te(s||(s=new ne),2,e)}}(),s}(c,(function(e){return t(c[e])}),n)}function re(e,t){return e&&e.then?e.then(t):t(e)}function oe(){}function ae(e,t){if(!t)return e&&e.then?e.then(oe):Promise.resolve()}var ce=Z((function(e,t){return void 0===t&&(t=2),"win32"===process.platform?new Promise((function(t){(0,X.exec)("taskkill /pid "+e+" /T /F",t)})):z(me(e),(function(e){var n=[e.pid];return ye(e,n),n.reverse(),e=null,re(ie(n,(function(e){return ae(le(e,t))})),(function(){return"success"}))}))})),le=Z((function(e,t,n){if(void 0===t&&(t=2),void 0===n&&(n=1),n>5)throw new Error("SIGKILL 失败. times > 5");return(0,X.exec)("kill -"+t+" "+e),function(e){if(e&&e.then)return e.then(oe)}(function(t,n){try{var s=ae(L((function(){return ue(e)}),{checkTime:100,timeout:4e3}))}catch(e){return n()}return s&&s.then?s.then(void 0,n):s}(0,(function(){return ae(le(e,9,n+1))})))})),ue=Z((function(e){return z(he(e),(function(e){return e<0}))}));function fe(e){return new Promise((function(t,n){(0,X.exec)('grep "Name:" /proc/'+e+"/status",(function(e,s){e?n(e):t(s)}))}))}function he(e){return new Promise((function(t){(0,X.exec)("ps -p "+e+" -o %cpu=",(function(e,n){t(e?-1:parseFloat(n.toString()))}))}))}function de(e){return new Promise((function(t){(0,X.exec)("ps -p "+e+" -o command=",(function(e,n){t(e?"":n.toString().split("\n")[0])}))}))}function pe(e){return new Promise((function(t){(0,X.exec)("ps -o pid --no-headers --ppid "+e,(function(e,n){t(e?[]:n.split("\n").filter((function(e){return!!e})).map((function(e){return parseFloat(e.trim())})))}))}))}var me=Z((function(e,t){var n=!1;return t||(n=!0,t={pid:e,children:[]}),z(pe(e),(function(e){return re(ie(e,(function(e){var n={pid:e,children:[]};return z(me(e,n),(function(){t.children.push(n)}))})),(function(){return n?t:(t=null,null)}))}))})),ye=function e(t,n){var s;t.children&&((s=n).push.apply(s,t.children.map((function(e){return e.pid}))),t.children.forEach((function(t){return e(t,n)}))),t=null,n=null},ge=function(){"function"==typeof process.send&&P(Z((function(){return ae(new Promise((function(e){process.send({type:"beat",timestamp:(new Date).valueOf()},e)})))})),6e3)},ve=function(e){return new Promise((function(t){var s=n(1808).createServer();s.listen(e,(function(){t(!0),s.close()})),s.on("error",(function(){t(!1),s.close()}))}))},be=function(){return function(e,t,n){try{var s=Promise.resolve(e());return t?s.then(t):s}catch(e){return Promise.reject(e)}}(we,(function(e){var t=e.find((function(e){return"Wireless interface"===e.description}));return t?t["logical name"]:""}))},we=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return new Promise((function(e){var t;null==(t=(0,X.exec)("lshw -C network").stdout)||t.on("data",(function(t){e(function(e){return e.toString().replace(/\*-network.*\n/g,"-----").split("-----").filter((function(e){return e.trim()})).map((function(e){var t={};return e.split("\n").forEach((function(e){var n=e.split(":").map((function(e){return e.trim()}));n[0]&&n[1]&&(t[n[0]]=n[1])})),t}))}(t))}))}))}));function Se(){}function ke(e){var t=e();if(t&&t.then)return t.then(Se)}var Ne="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Ee(e,t,n){if(!e.s){if(n instanceof Ae){if(!n.s)return void(n.o=Ee.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Ee.bind(null,e,t),Ee.bind(null,e,2));e.s=t,e.v=n;var s=e.o;s&&s(e)}}var Ae=function(){function e(){}return e.prototype.then=function(t,n){var s=new e,i=this.s;if(i){var r=1&i?t:n;if(r){try{Ee(s,1,r(this.v))}catch(e){Ee(s,2,e)}return s}return this}return this.o=function(e){try{var i=e.v;1&e.s?Ee(s,1,t?t(i):i):n?Ee(s,1,n(i)):Ee(s,2,i)}catch(e){Ee(s,2,e)}},s},e}();function Oe(e){return e instanceof Ae&&1&e.s}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Te.apply(this,arguments)}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}var Le=function(){function e(){this.state={},this.ids={}}var t=e.prototype;return t.on=function(e,t){if(this.state[e]||(this.state[e]=[]),"function"!=typeof t)throw new Error("第二个参数必须为function!");var n=this.state[e].push(t)-1,s=k(40);return this.ids[s]={event:e,index:n},s},t.cancel=function(e){var t=this;if(e){var n=this.ids[e]||{},s=n.event,i=n.index;s&&Array.isArray(this.state[s])&&(this.state[s].splice(i,1),delete this.ids[e],Object.keys(this.ids).forEach((function(e){t.ids[e].event===s&&t.ids[e].index>i&&(t.ids[e].index=t.ids[e].index-1)})))}else this.clear()},t.clear=function(){this.state.length=0},t.emit=function(e,t){if(Array.isArray(this.state[e]))for(var n,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.state[e]);!(n=s()).done;){var i=n.value;"function"==typeof i&&i(t)}},t.emitSync=function(e,t){try{var n=this;return(s=ke((function(){if(Array.isArray(n.state[e]))return function(e){if(e&&e.then)return e.then(Se)}(function(e,t,n){if("function"==typeof e[Ne]){var s,i,r,o=e[Ne]();if(function e(a){try{for(;!((s=o.next()).done||n&&n());)if((a=t(s.value))&&a.then){if(!Oe(a))return void a.then(e,r||(r=Ee.bind(null,i=new Ae,2)));a=a.v}i?Ee(i,1,a):i=a}catch(e){Ee(i||(i=new Ae),2,e)}}(),o.return){var a=function(e){try{s.done||o.return()}catch(e){}return e};if(i&&i.then)return i.then(a,(function(e){throw a(e)}));a()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],l=0;l<e.length;l++)c.push(e[l]);return function(e,t,n){var s,i,r=-1;return function o(a){try{for(;++r<e.length&&(!n||!n());)if((a=t(r))&&a.then){if(!Oe(a))return void a.then(o,i||(i=Ee.bind(null,s=new Ae,2)));a=a.v}s?Ee(s,1,a):s=a}catch(e){Ee(s||(s=new Ae),2,e)}}(),s}(c,(function(e){return t(c[e])}),n)}(n.state[e],(function(e){return ke((function(){if("function"==typeof e)return function(e,t){return e&&e.then?e.then(Se):Promise.resolve()}(e(t))}))})))})))&&s.then||(s=Promise.resolve(s)),s}catch(e){return Promise.reject(e)}var s},t.clone=function(){return{state:Te({},this.state),ids:Te({},this.ids)}},t.restore=function(e){this.state=e.state,this.ids=e.ids},e}(),Ce=function(){function e(e){var t=this,n=e.limit,s=void 0===n?10:n,i=e.onTimeout;this.onTimeout=void 0,this.timeout=null,this._time=void 0,this._time=1e3*s,this.onTimeout=function(){t.timeout&&(clearTimeout(t.timeout),t.timeout=null),i()}}var t=e.prototype;return t.feed=function(){this.init()},t.init=function(){clearTimeout(this.timeout),this.timeout=null,delete this.timeout,this.timeout=setTimeout(this.onTimeout,this._time)},t.stop=function(){this.timeout&&clearTimeout(this.timeout),delete this.timeout},e}(),Ie=function(){function e(e){this._splitSymbol=void 0,this._cache="",this._splitSymbol=e}return e.prototype.split=function(e){var t=(this._cache+e).split(this._splitSymbol);return this._cache=t.splice(t.length-1,1)[0],t},e}(),xe=n(4667);function _e(){}function Me(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var je=function(){function e(e,t){this.topic=void 0,this.messageType=void 0,this.emitter=new Le,this.subscribed=!1,this.dog=new Ce({limit:10,onTimeout:this.onTimeout.bind(this)}),this.strSplit=new Ie("---"),this.subscribeChildProcess=void 0,this.topic=e,this.messageType=t,this.subscribed=!1,this.emitter=new Le}var t=e.prototype;return t.onTimeout=function(){try{var e=this;return e.subscribed?Me(e.unsubscribe(),(function(){return Me(A(1e3),(function(){return(t=e.subscribe())&&t.then?t.then(_e):Promise.resolve();var t}))})):Me()}catch(e){return Promise.reject(e)}},t.onData=function(e){var t=this.strSplit.split(e.toString()).slice(-1)[0];if(t){this.dog.feed();var n=xe.Qc(t);this.emitter.emit("message",n)}},t.subscribe=function(){try{var e=this;return e.subscribeChildProcess||(e.subscribed=!0,e.dog.init(),e.subscribeChildProcess=(0,X.spawn)("rostopic",["echo",e.topic]),e.subscribeChildProcess.stdout.on("data",e.onData.bind(e)),e.subscribeChildProcess.stderr.on("data",(function(e){return console.log(e.toString())}))),Me()}catch(e){return Promise.reject(e)}},t.unsubscribe=function(){try{var e=this;return e.subscribeChildProcess?(e.dog.stop(),e.subscribed=!1,Me(ce(e.subscribeChildProcess.pid),(function(){e.subscribeChildProcess=null}))):Me()}catch(e){return Promise.reject(e)}},t.publish=function(e){var t=this,n=xe.Pz(e);return new Promise((function(e,s){(0,X.exec)("rostopic pub -1 "+t.topic+" "+t.messageType+' "'+n+'"',(function(t,n){t?s(t):e(n)}))}))},e}(),$e={cache:[],getTopic:function(e,t){var n=this.cache.find((function(t){return t.topic===e}));if(n)return n;var s=new je(e,t);return this.cache.push(s),s}}})(),s})()));
|
package/es/storage/json.js
CHANGED
|
@@ -36,12 +36,6 @@ var Manager = /*#__PURE__*/function () {
|
|
|
36
36
|
this.restore();
|
|
37
37
|
if (global.GlobalEmitter) {
|
|
38
38
|
global.GlobalEmitter.on('SIGINT', this.kill.bind(this));
|
|
39
|
-
} else {
|
|
40
|
-
process.on('SIGINT', function () {
|
|
41
|
-
_this.kill().then(function () {
|
|
42
|
-
return process.exit(0);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
39
|
}
|
|
46
40
|
}
|
|
47
41
|
// 进程退出时,同步文件
|
package/lib/storage/json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pubo-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.155",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"pubo-utils": "^1.0.149",
|
|
24
24
|
"yaml": "^2.5.1"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "a710c68b42586e7434fa910f5603030de60abb93",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.10.1",
|
|
29
29
|
"@babel/core": "^7.10.2",
|