pubo-node 1.0.136 → 1.0.138
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/child-process/index.d.ts +1 -1
- package/es/child-process/index.js +78 -6
- package/es/storage/json.d.ts +1 -1
- package/es/storage/json.js +4 -0
- package/lib/child-process/index.d.ts +1 -1
- package/lib/child-process/index.js +77 -6
- package/lib/storage/json.d.ts +1 -1
- package/lib/storage/json.js +4 -0
- 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,(()=>(()=>{var e={496:(e,t,n)=>{"use strict";var r=n(81),s=r.spawn,i=r.exec;function o(e,t,n){var r={};try{Object.keys(e).forEach((function(n){e[n].forEach((function(e){r[e]||(a(e,t),r[e]=1)})),r[n]||(a(n,t),r[n]=1)}))}catch(e){if(n)return n(e);throw e}if(n)return n()}function a(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function c(e,t,n,r,s){var i=r(e),o="";i.stdout.on("data",(function(e){e=e.toString("ascii"),o+=e})),i.on("close",(function(i){delete n[e],0==i?o.match(/\d+/g).forEach((function(i){i=parseInt(i,10),t[e].push(i),t[i]=[],n[i]=1,c(i,t,n,r,s)})):0==Object.keys(n).length&&s()}))}e.exports=function(e,t,n){if("function"==typeof t&&void 0===n&&(n=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(n)return n(new Error("pid must be a number"));throw new Error("pid must be a number")}var r={},a={};switch(r[e]=[],a[e]=1,process.platform){case"win32":i("taskkill /pid "+e+" /T /F",n);break;case"darwin":c(e,r,a,(function(e){return s("pgrep",["-P",e])}),(function(){o(r,t,n)}));break;default:c(e,r,a,(function(e){return s("ps",["-o","pid","--no-headers","--ppid",e])}),(function(){o(r,t,n)}))}}},649:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=649,e.exports=t},81:e=>{"use strict";e.exports=require("child_process")},1:e=>{"use strict";e.exports=require("cluster")},808:e=>{"use strict";e.exports=require("net")},453:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(359);const o={get binary(){return s.binaryOptions},set binary(e){Object.assign(s.binaryOptions,e)},get bool(){return s.boolOptions},set bool(e){Object.assign(s.boolOptions,e)},get int(){return s.intOptions},set int(e){Object.assign(s.intOptions,e)},get null(){return s.nullOptions},set null(e){Object.assign(s.nullOptions,e)},get str(){return s.strOptions},set str(e){Object.assign(s.strOptions,e)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:r.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]}};function c(e,t){if("1.0"===(e.version||e.options.version)){const e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];const n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,"")}`}let n=e.tagPrefixes.find((e=>0===t.indexOf(e.prefix)));if(!n){const r=e.getDefaults().tagPrefixes;n=r&&r.find((e=>0===t.indexOf(e.prefix)))}if(!n)return"!"===t[0]?t:`!<${t}>`;const r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,(e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e])));return n.handle+r}function l(e,t,n,r){const{anchors:i,schema:o}=t.doc;let a;if(!(e instanceof s.Node)){const t={aliasNodes:[],onTagObj:e=>a=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=i.getName(e.source);t||(t=i.newName(),i.map[t]=e.source)}}if(e instanceof s.Pair)return e.toString(t,n,r);a||(a=function(e,t){if(t instanceof s.Alias)return s.Alias;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,r;if(t instanceof s.Scalar){r=t.value;const s=e.filter((e=>e.identify&&e.identify(r)||e.class&&r instanceof e.class));n=s.find((e=>e.format===t.format))||s.find((e=>!e.format))}else r=t,n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass));if(!n){const e=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${e} value`)}return n}(o.tags,e));const l=function(e,t,{anchors:n,doc:r}){const s=[],i=r.anchors.getName(e);return i&&(n[i]=e,s.push(`&${i}`)),e.tag?s.push(c(r,e.tag)):t.default||s.push(c(r,t.tag)),s.join(" ")}(e,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart||0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(e,t,n,r):e instanceof s.Scalar?s.stringifyString(e,t,n,r):e.toString(t,n,r);return l?e instanceof s.Scalar||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}class u{static validAnchorNode(e){return e instanceof s.Scalar||e instanceof s.YAMLSeq||e instanceof s.YAMLMap}constructor(e){r._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new s.Alias(e)}createMergePair(...e){const t=new s.Merge;return t.value.items=e.map((e=>{if(e instanceof s.Alias){if(e.source instanceof s.YAMLMap)return e}else if(e instanceof s.YAMLMap)return this.createAlias(e);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}getName(e){const{map:t}=this;return Object.keys(t).find((n=>t[n]===e))}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);const t=Object.keys(this.map);for(let n=1;;++n){const r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){const{map:e,_cstAliases:t}=this;Object.keys(e).forEach((t=>{e[t]=e[t].resolved})),t.forEach((e=>{e.source=e.source.resolved})),delete this._cstAliases}setAnchor(e,t){if(null!=e&&!u.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(t&&/[\x00-\x19\s,[\]{}]/.test(t))throw new Error("Anchor names must not contain whitespace or control characters");const{map:n}=this,r=e&&Object.keys(n).find((t=>n[t]===e));if(r){if(!t)return r;r!==t&&(delete n[r],n[t]=e)}else{if(!t){if(!e)return null;t=this.newName()}n[t]=e}return t}}const f=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof s.Collection?(n&&(t[n]=!0),e.items.forEach((e=>f(e,t)))):e instanceof s.Pair?(f(e.key,t),f(e.value,t)):e instanceof s.Scalar&&n&&(t[n]=!0)}return t};function h({tagPrefixes:e},t){const[n,s]=t.parameters;if(!n||!s){const e="Insufficient parameters given for %TAG directive";throw new r.YAMLSemanticError(t,e)}if(e.some((e=>e.handle===n))){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new r.YAMLSemanticError(t,e)}return{handle:n,prefix:s}}function p(e,t){let[n]=t.parameters;if("YAML:1.0"===t.name&&(n="1.0"),!n){const e="Insufficient parameters given for %YAML directive";throw new r.YAMLSemanticError(t,e)}if(!a[n]){const s=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${n}`;e.warnings.push(new r.YAMLWarning(t,s))}return n}function d(e){if(e instanceof s.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class g{constructor(e){this.anchors=new u(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return d(this.contents),this.contents.add(e)}addIn(e,t){d(this.contents),this.contents.addIn(e,t)}delete(e){return d(this.contents),this.contents.delete(e)}deleteIn(e){return s.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(d(this.contents),this.contents.deleteIn(e))}getDefaults(){return g.defaults[this.version]||g.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof s.Collection?this.contents.get(e,t):void 0}getIn(e,t){return s.isEmptyPath(e)?!t&&this.contents instanceof s.Scalar?this.contents.value:this.contents:this.contents instanceof s.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof s.Collection&&this.contents.has(e)}hasIn(e){return s.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof s.Collection&&this.contents.hasIn(e)}set(e,t){d(this.contents),this.contents.set(e,t)}setIn(e,t){s.isEmptyPath(e)?this.contents=t:(d(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);const n=Object.assign({},this.getDefaults(),this.options);this.schema=new i.Schema(n)}parse(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");const{directives:n=[],contents:i=[],directivesEndMarker:o,error:a,valueRange:c}=e;if(a&&(a.source||(a.source=this),this.errors.push(a)),function(e,t,n){const s=[];let i=!1;for(const n of t){const{comment:t,name:o}=n;switch(o){case"TAG":try{e.tagPrefixes.push(h(e,n))}catch(t){e.errors.push(t)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){const t="The %YAML directive must only be given at most once per document.";e.errors.push(new r.YAMLSemanticError(n,t))}try{e.version=p(e,n)}catch(t){e.errors.push(t)}i=!0;break;default:if(o){const t=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new r.YAMLWarning(n,t))}}t&&s.push(t)}if(n&&!i&&"1.1"===(e.version||n.version||e.options.version)){const t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=n.tagPrefixes.map(t),e.version=n.version}e.commentBefore=s.join("\n")||null}(this,n,t),o&&(this.directivesEndMarker=!0),this.range=c?[c.start,c.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let i,o=!1;for(const a of t)if(a.valueRange){if(void 0!==i){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new r.YAMLSyntaxError(a,t));break}const t=s.resolveNode(e,a);o&&(t.spaceBefore=!0,o=!1),i=t}else null!==a.comment?(void 0===i?n.before:n.after).push(a.comment):a.type===r.Type.BLANK_LINE&&(o=!0,void 0===i&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]));if(e.contents=i||null,i){const t=n.before.join("\n");if(t){const e=i instanceof s.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){for(const e of this.errors)e instanceof r.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof r.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=this.contents,Object.keys(f(e,{}))).filter((e=>0!==e.indexOf(i.Schema.defaultPrefix)));var e}setTagPrefix(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){const n=this.tagPrefixes.find((t=>t.handle===e));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((t=>t.handle!==e))}toJSON(e,t){const{keepBlobsInJSON:n,mapAsMap:r,maxAliasCount:i}=this.options,o=n&&("string"!=typeof e||!(this.contents instanceof s.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!r,maxAliasCount:i,stringify:l},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));const u=s.toJSON(this.contents,e,a);if("function"==typeof t&&a.anchors)for(const{count:e,res:n}of a.anchors.values())t(n,e);return u}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");const e=this.options.indent;if(!Number.isInteger(e)||e<=0){const t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();const t=[];let n=!1;if(this.version){let e="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?e="%YAML:1.0":"1.1"===this.version&&(e="%YAML 1.1")),t.push(e),n=!0}const r=this.listNonDefaultTags();this.tagPrefixes.forEach((({handle:e,prefix:s})=>{r.some((e=>0===e.indexOf(s)))&&(t.push(`%TAG ${e} ${s}`),n=!0)})),(n||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));const i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:l};let o=!1,a=null;if(this.contents){this.contents instanceof s.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);const e=a?null:()=>o=!0,r=l(this.contents,i,(()=>a=null),e);t.push(s.addComment(r,"",a))}else void 0!==this.contents&&t.push(l(this.contents,i));return this.comment&&(o&&!a||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}r._defineProperty(g,"defaults",a),t.Document=g,t.defaultOptions={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},t.scalarOptions=o},487:(e,t)=>{"use strict";const n={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},r={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};function s(e){const t=[0];let n=e.indexOf("\n");for(;-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function i(e){let t,n;return"string"==typeof e?(t=s(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=s(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function o(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=i(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){const r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}const s=n.length;return{line:s,col:e-n[s-1]+1}}class a{static copy(e){return new a(e.start,e.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:n,end:r}=this;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;let s=t;for(;s<e.length&&!(e[s]>n);)++s;this.origStart=n+s;const i=s;for(;s<e.length&&!(e[s]>=r);)++s;return this.origEnd=r+s,i}}class c{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=c.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,r){const s=e[t];if(!s)return!0;const i=e[t-1];if(i&&"\n"!==i)return!1;if(r){if(s!==r)return!1}else if(s!==n.DIRECTIVES_END&&s!==n.DOCUMENT_END)return!1;const o=e[t+1],a=e[t+2];if(o!==s||a!==s)return!1;const c=e[t+3];return!c||"\n"===c||"\t"===c||" "===c}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,s=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===s.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;" "===n;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&"\n"!==n;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;"\t"===n||" "===n;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}static endOfBlockIndent(e,t,n){const r=c.endOfIndent(e,n);if(r>n+t)return r;{const t=c.endOfWhiteSpace(e,r),n=e[t];if(!n||"\n"===n)return t}return null}static atBlank(e,t,n){const r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}static nextNodeIsIndented(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}static normalizeOffset(e,t){const n=e[t];return n?"\n"!==n&&"\n"===e[t-1]?t-1:c.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,s=!1,i="",o=e[t+1];for(;" "===o||"\t"===o||"\n"===o;){switch(o){case"\n":r=0,t+=1,i+="\n";break;case"\t":r<=n&&(s=!0),t=c.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}o=e[t+1]}return i||(i=" "),o&&r<=n&&(s=!0),{fold:i,offset:t,error:s}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;const{src:r}=this.context,s=this.props[e];return s&&r[s.start]===t?r.slice(s.start+(n?1:0),s.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const r=this.getPropValue(t,n.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return e!==n||c.atBlank(t,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]===n.COMMENT)return!0}return!1}get hasProps(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]!==n.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[r.FLOW_MAP,r.FLOW_SEQ,r.QUOTE_DOUBLE,r.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=o(this.range.start,this.context.root);return e?{start:e,end:o(this.range.end,this.context.root)}:void 0}get rawValue(){if(!this.valueRange||!this.context)return null;const{start:e,end:t}=this.valueRange;return this.context.src.slice(e,t)}get tag(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};{const[e,n,r]=t.match(/^(.*!)([^!]*)$/);return{handle:n,suffix:r}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;const{start:e,end:t}=this.valueRange,{src:n}=this.context;for(let r=e;r<t;++r)if("\n"===n[r])return!0;return!1}parseComment(e){const{src:t}=this.context;if(t[e]===n.COMMENT){const n=c.endOfLine(t,e+1),r=new a(e,n);return this.props.push(r),n}return e}setOrigRanges(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((n=>n.setOrigRange(e,t))),t}toString(){const{context:{src:e},range:t,value:n}=this;if(null!=n)return n;const r=e.slice(t.start,t.end);return c.addStringTerminator(e,t.end,r)}}class l extends Error{constructor(e,t,n){if(!(n&&t instanceof c))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);const t=e&&o(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:n}=this.linePos.start;this.message+=` at line ${t}, column ${n}`;const r=e&&function({start:e,end:t},n,r=80){let s=function(e,t){const{lineStarts:n,src:r}=i(t);if(!n||!(e>=1)||e>n.length)return null;const s=n[e-1];let o=n[e];for(;o&&o>s&&"\n"===r[o-1];)--o;return r.slice(s,o)}(e.line,n);if(!s)return null;let{col:o}=e;if(s.length>r)if(o<=r-10)s=s.substr(0,r-1)+"…";else{const e=Math.round(r/2);s.length>o+e&&(s=s.substr(0,o+e-1)+"…"),o-=s.length-r,s="…"+s.substr(1-r)}let a=1,c="";return t&&(t.line===e.line&&o+(t.col-e.col)<=r+1?a=t.col-e.col:(a=Math.min(s.length+1,r)-o,c="…")),`${s}\n${o>1?" ".repeat(o-1):""}${"^".repeat(a)}${c}`}(this.linePos,e);r&&(this.message+=`:\n\n${r}\n`)}delete this.source}}class u extends l{constructor(e,t){super("YAMLSemanticError",e,t)}}class f extends c{static endOfLine(e,t,n){let r=e[t],s=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[s+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;s+=1,r=t}return s}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:n}=this.context;let r=n[t-1];for(;e<t&&("\n"===r||"\t"===r||" "===r);)r=n[--t-1];let s="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=c.foldNewline(n,r,-1);s+=e,r=t}else if(" "===e||"\t"===e){const i=r;let o=n[r+1];for(;r<t&&(" "===o||"\t"===o);)r+=1,o=n[r+1];"\n"!==o&&(s+=r>i?n.slice(i,r+1):e)}else s+=e}const i=n[e];switch(i){case"\t":return{errors:[new u(this,"Plain value cannot start with a tab character")],str:s};case"@":case"`":return{errors:[new u(this,`Plain value cannot start with reserved character ${i}`)],str:s};default:return s}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let s=e,i=e;for(let e=r[s];"\n"===e&&!c.atDocumentBoundary(r,s+1);e=r[s]){const e=c.endOfBlockIndent(r,t,s+1);if(null===e||"#"===r[e])break;"\n"===r[e]?s=e:(i=f.endOfLine(r,e,n),s=i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=i,i}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let s=t;const i=r[s];return i&&"#"!==i&&"\n"!==i&&(s=f.endOfLine(r,t,n)),this.valueRange=new a(t,s),s=c.endOfWhiteSpace(r,s),s=this.parseComment(s),this.hasComment&&!this.valueRange.isEmpty()||(s=this.parseBlockValue(s)),s}}t.Char=n,t.Node=c,t.PlainValue=f,t.Range=a,t.Type=r,t.YAMLError=l,t.YAMLReferenceError=class extends l{constructor(e,t){super("YAMLReferenceError",e,t)}},t.YAMLSemanticError=u,t.YAMLSyntaxError=class extends l{constructor(e,t){super("YAMLSyntaxError",e,t)}},t.YAMLWarning=class extends l{constructor(e,t){super("YAMLWarning",e,t)}},t._defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.defaultTagPrefix="tag:yaml.org,2002:",t.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}},359:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(125);const o={createNode:function(e,t,n){const r=new s.YAMLMap(e);if(t instanceof Map)for(const[s,i]of t)r.items.push(e.createPair(s,i,n));else if(t&&"object"==typeof t)for(const s of Object.keys(t))r.items.push(e.createPair(s,t[s],n));return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:s.resolveMap},a={createNode:function(e,t,n){const r=new s.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const s of t){const t=e.createNode(s,n.wrapScalars,null,n);r.items.push(t)}return r},default:!0,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:s.resolveSeq},c={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),s.stringifyString(e,t,n,r)),options:s.strOptions},l=[o,a,c],u=e=>"bigint"==typeof e||Number.isInteger(e),f=(e,t,n)=>s.intOptions.asBigInt?BigInt(e):parseInt(t,n);function h(e,t,n){const{value:r}=e;return u(r)&&r>=0?n+r.toString(t):s.stringifyNumber(e)}const p={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},d={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:s.boolOptions,stringify:({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr},g={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>f(e,t,8),options:s.intOptions,stringify:e=>h(e,8,"0o")},m={identify:u,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>f(e,e,10),options:s.intOptions,stringify:s.stringifyNumber},y={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>f(e,t,16),options:s.intOptions,stringify:e=>h(e,16,"0x")},v={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},b={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:({value:e})=>Number(e).toExponential()},w={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,n){const r=t||n,i=new s.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:s.stringifyNumber},S=l.concat([p,d,g,m,y,v,b,w]),O=e=>"bigint"==typeof e||Number.isInteger(e),E=({value:e})=>JSON.stringify(e),N=[o,a,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:E},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:E},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:E},{identify:O,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>s.intOptions.asBigInt?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:E}];N.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};const T=({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr,x=e=>"bigint"==typeof e||Number.isInteger(e);function A(e,t,n){let r=t.replace(/_/g,"");if(s.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`}const t=BigInt(r);return"-"===e?BigInt(-1)*t:t}const i=parseInt(r,n);return"-"===e?-1*i:i}function L(e,t,n){const{value:r}=e;if(x(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return s.stringifyNumber(e)}const M=l.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:s.boolOptions,stringify:T},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:s.boolOptions,stringify:T},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>A(t,n,2),stringify:e=>L(e,2,"0b")},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>A(t,n,8),stringify:e=>L(e,8,"0")},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>A(t,n,10),stringify:s.stringifyNumber},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>A(t,n,16),stringify:e=>L(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},{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:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const n=new s.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:s.stringifyNumber}],i.binary,i.omap,i.pairs,i.set,i.intTime,i.floatTime,i.timestamp),k={core:S,failsafe:l,json:N,yaml11:M},P={binary:i.binary,bool:d,float:w,floatExp:b,floatNaN:v,floatTime:i.floatTime,int:m,intHex:y,intOct:g,intTime:i.intTime,map:o,null:p,omap:i.omap,pairs:i.pairs,seq:a,set:i.set,timestamp:i.timestamp};const I=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class _{constructor({customTags:e,merge:t,schema:n,sortMapEntries:r,tags:s}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===r?I:r||null,!e&&s&&i.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let s=e[r.replace(/\W/g,"")];if(!s){const t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(const e of n)s=s.concat(e);else"function"==typeof n&&(s=n(s.slice()));for(let e=0;e<s.length;++e){const n=s[e];if("string"==typeof n){const r=t[n];if(!r){const e=Object.keys(t).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${e}`)}s[e]=r}}return s}(k,P,e||s,n)}createNode(e,t,n,r){const i={defaultPrefix:_.defaultPrefix,schema:this,wrapScalars:t};return function(e,t,n){if(e instanceof s.Node)return e;const{defaultPrefix:r,onTagObj:i,prevObjects:c,schema:l,wrapScalars:u}=n;t&&t.startsWith("!!")&&(t=r+t.slice(2));let f=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),r=e.find((e=>!e.format))||e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,l.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return u?new s.Scalar(e):e;f=e instanceof Map?o:e[Symbol.iterator]?a:o}i&&(i(f),delete n.onTagObj);const h={value:void 0,node:void 0};if(e&&"object"==typeof e&&c){const t=c.get(e);if(t){const e=new s.Alias(t);return n.aliasNodes.push(e),e}h.value=e,c.set(e,h)}return h.node=f.createNode?f.createNode(n.schema,e,n):u?new s.Scalar(e):e,t&&h.node instanceof s.Node&&(h.node.tag=t),h.node}(e,n,r?Object.assign(r,i):i)}createPair(e,t,n){n||(n={wrapScalars:!0});const r=this.createNode(e,n.wrapScalars,null,n),i=this.createNode(t,n.wrapScalars,null,n);return new s.Pair(r,i)}}r._defineProperty(_,"defaultPrefix",r.defaultTagPrefix),r._defineProperty(_,"defaultTags",r.defaultTags),t.Schema=_},667:(e,t,n)=>{"use strict";var r=n(24),s=n(453),i=n(359),o=n(487),a=n(125);n(314);class c extends s.Document{constructor(e){super(Object.assign({},s.defaultOptions,e))}}function l(e,t){const n=r.parse(e),s=new c(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";s.errors.unshift(new o.YAMLSemanticError(n[1],e))}return s}const u={createNode:function(e,t=!0,n){void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},s.Document.defaults[s.defaultOptions.version],s.defaultOptions);return new i.Schema(r).createNode(e,t,n)},defaultOptions:s.defaultOptions,Document:c,parse:function(e,t){const n=l(e,t);if(n.warnings.forEach((e=>a.warn(e))),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){const n=[];let s;for(const i of r.parse(e)){const e=new c(t);e.parse(i,s),n.push(e),s=e}return n},parseCST:r.parse,parseDocument:l,scalarOptions:s.scalarOptions,stringify:function(e,t){const n=new c(t);return n.contents=e,String(n)}};t.YAML=u},24:(e,t,n)=>{"use strict";var r=n(487);class s extends r.Node{constructor(){super(r.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new r.Range(t,t+1),t+1}}class i extends r.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{atLineStart:o,lineStart:a}=e;o||this.type!==r.Type.SEQ_ITEM||(this.error=new r.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const c=o?t-a:e.indent;let l=r.Node.endOfWhiteSpace(i,t+1),u=i[l];const f="#"===u,h=[];let p=null;for(;"\n"===u||"#"===u;){if("#"===u){const e=r.Node.endOfLine(i,l+1);h.push(new r.Range(l,e)),l=e}else o=!0,a=l+1,"\n"===i[r.Node.endOfWhiteSpace(i,a)]&&0===h.length&&(p=new s,a=p.parse({src:i},a)),l=r.Node.endOfIndent(i,a);u=i[l]}if(r.Node.nextNodeIsIndented(u,l-(a+c),this.type!==r.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:c,lineStart:a,parent:this},l):u&&a>t+1&&(l=a-1),this.node){if(p){const t=e.parent.items||e.parent.contents;t&&t.push(p)}h.length&&Array.prototype.push.apply(this.props,h),l=this.node.range.end}else if(f){const e=h[0];this.props.push(e),l=e.end}else l=r.Node.endOfLine(i,t+1);const d=this.node?this.node.valueRange.end:l;return this.valueRange=new r.Range(t,d),l}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:n,value:s}=this;if(null!=s)return s;const i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return r.Node.addStringTerminator(e,n.end,i)}}class o extends r.Node{constructor(){super(r.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new r.Range(t,n),n}}function a(e){let t=e;for(;t instanceof i;)t=t.node;if(!(t instanceof c))return null;const n=t.items.length;let s=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===r.Type.COMMENT){const{indent:t,lineStart:r}=n.context;if(t>0&&n.range.start>=r+t)break;s=e}else{if(n.type!==r.Type.BLANK_LINE)break;s=e}}if(-1===s)return null;const o=t.items.splice(s,n-s),a=o[0].range.start;for(;t.range.end=a,t.valueRange&&t.valueRange.end>a&&(t.valueRange.end=a),t!==e;)t=t.context.parent;return o}class c extends r.Node{static nextContentHasIndent(e,t,n){const s=r.Node.endOfLine(e,t)+1,i=e[t=r.Node.endOfWhiteSpace(e,s)];return!!i&&(t>=s+n||("#"===i||"\n"===i)&&c.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===r.Type.SEQ_ITEM?r.Type.SEQ:r.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);const n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];const t=a(e);t&&Array.prototype.push.apply(this.items,t)}get includesTrailingLines(){return this.items.length>0}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let l=r.Node.startOfLine(i,t);const u=this.items[0];u.context.parent=this,this.valueRange=r.Range.copy(u.valueRange);const f=u.range.start-u.context.lineStart;let h=t;h=r.Node.normalizeOffset(i,h);let p=i[h],d=r.Node.endOfWhiteSpace(i,l)===h,g=!1;for(;p;){for(;"\n"===p||"#"===p;){if(d&&"\n"===p&&!g){const e=new s;if(h=e.parse({src:i},h),this.valueRange.end=h,h>=i.length){p=null;break}this.items.push(e),h-=1}else if("#"===p){if(h<l+f&&!c.nextContentHasIndent(i,h,f))return h;const e=new o;if(h=e.parse({indent:f,lineStart:l,src:i},h),this.items.push(e),this.valueRange.end=h,h>=i.length){p=null;break}}if(l=h+1,h=r.Node.endOfIndent(i,l),r.Node.atBlank(i,h)){const e=r.Node.endOfWhiteSpace(i,h),t=i[e];t&&"\n"!==t&&"#"!==t||(h=e)}p=i[h],d=!0}if(!p)break;if(h!==l+f&&(d||":"!==p)){if(h<l+f){l>t&&(h=l);break}if(!this.error){const e="All collection items must start at the same column";this.error=new r.YAMLSyntaxError(this,e)}}if(u.type===r.Type.SEQ_ITEM){if("-"!==p){l>t&&(h=l);break}}else if("-"===p&&!this.error){const e=i[h+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new r.YAMLSyntaxError(this,e)}}const e=n({atLineStart:d,inCollection:!0,indent:f,lineStart:l,parent:this},h);if(!e)return h;if(this.items.push(e),this.valueRange.end=e.valueRange.end,h=r.Node.normalizeOffset(i,e.range.end),p=i[h],d=!1,g=e.includesTrailingLines,p){let e=h-1,t=i[e];for(;" "===t||"\t"===t;)t=i[--e];"\n"===t&&(l=e+1,d=!0)}const m=a(e);m&&Array.prototype.push.apply(this.items,m)}return h}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{t=n.setOrigRanges(e,t)})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;let i=e.slice(n.start,t[0].range.start)+String(t[0]);for(let e=1;e<t.length;++e){const n=t[e],{atLineStart:r,indent:s}=n.context;if(r)for(let e=0;e<s;++e)i+=" ";i+=String(n)}return r.Node.addStringTerminator(e,n.end,i)}}class l extends r.Node{constructor(){super(r.Type.DIRECTIVE),this.name=null}get parameters(){const e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){const{src:t}=this.context;let n=e,r=t[n];for(;r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}parseParameters(e){const{src:t}=this.context;let n=e,s=t[n];for(;s&&"\n"!==s&&"#"!==s;)s=t[n+=1];return this.valueRange=new r.Range(e,n),n}parse(e,t){this.context=e;let n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new r.Range(t,n),n}}class u extends r.Node{static startCommentOrEndBlankLine(e,t){const n=r.Node.endOfWhiteSpace(e,t),s=e[n];return"#"===s||"\n"===s?n:t}constructor(){super(r.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){const{src:t}=this.context;this.directives=[];let n=!0,i=!1,a=e;for(;!r.Node.atDocumentBoundary(t,a,r.Char.DIRECTIVES_END);)switch(a=u.startCommentOrEndBlankLine(t,a),t[a]){case"\n":if(n){const e=new s;a=e.parse({src:t},a),a<t.length&&this.directives.push(e)}else a+=1,n=!0;break;case"#":{const e=new o;a=e.parse({src:t},a),this.directives.push(e),n=!1}break;case"%":{const e=new l;a=e.parse({parent:this,src:t},a),this.directives.push(e),i=!0,n=!1}break;default:return i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a}return t[a]?(this.directivesEndMarker=new r.Range(a,a+3),a+3):(i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let i=e;for(;"-"===n[i-1];)i-=1;let c=r.Node.endOfWhiteSpace(n,e),l=i===e;for(this.valueRange=new r.Range(c);!r.Node.atDocumentBoundary(n,c,r.Char.DOCUMENT_END);){switch(n[c]){case"\n":if(l){const e=new s;c=e.parse({src:n},c),c<n.length&&this.contents.push(e)}else c+=1,l=!0;i=c;break;case"#":{const e=new o;c=e.parse({src:n},c),this.contents.push(e),l=!1}break;default:{const e=r.Node.endOfIndent(n,c),s=t({atLineStart:l,indent:-1,inFlow:!1,inCollection:!1,lineStart:i,parent:this},e);if(!s)return this.valueRange.end=e;this.contents.push(s),c=s.range.end,l=!1;const o=a(s);o&&Array.prototype.push.apply(this.contents,o)}}c=u.startCommentOrEndBlankLine(n,c)}if(this.valueRange.end=c,n[c]&&(this.documentEndMarker=new r.Range(c,c+3),c+=3,n[c])){if(c=r.Node.endOfWhiteSpace(n,c),"#"===n[c]){const e=new o;c=e.parse({src:n},c),this.contents.push(e)}switch(n[c]){case"\n":c+=1;break;case void 0:break;default:this.error=new r.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return c}parse(e,t){e.root=this,this.context=e;const{src:n}=e;let r=65279===n.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),r=this.parseContents(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.directives.forEach((n=>{t=n.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((n=>{t=n.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){const{contents:e,directives:t,value:n}=this;if(null!=n)return n;let s=t.join("");return e.length>0&&((t.length>0||e[0].type===r.Type.COMMENT)&&(s+="---\n"),s+=e.join("")),"\n"!==s[s.length-1]&&(s+="\n"),s}}class f extends r.Node{parse(e,t){this.context=e;const{src:n}=e;let s=r.Node.endOfIdentifier(n,t+1);return this.valueRange=new r.Range(t+1,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}const h="KEEP",p="STRIP";class d extends r.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping="CLIP",this.header=null}get includesTrailingLines(){return this.chomping===h}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[t-1];for(;"\n"===o||"\t"===o||" "===o;){if(t-=1,t<=e){if(this.chomping===h)break;return""}"\n"===o&&(i=t),o=s[t-1]}let a=t+1;i&&(this.chomping===h?(a=i,t=this.valueRange.end):t=i);const c=n+this.blockIndent,l=this.type===r.Type.BLOCK_FOLDED;let u=!0,f="",d="",g=!1;for(let n=e;n<t;++n){for(let e=0;e<c&&" "===s[n];++e)n+=1;const e=s[n];if("\n"===e)"\n"===d?f+="\n":d="\n";else{const i=r.Node.endOfLine(s,n),o=s.slice(n,i);n=i,l&&(" "===e||"\t"===e)&&n<a?(" "===d?d="\n":g||u||"\n"!==d||(d="\n\n"),f+=d+o,d=i<t&&s[i]||"",g=!0):(f+=d+o,d=l&&n<a?" ":"\n",g=!1),u&&""!==o&&(u=!1)}}return this.chomping===p?f:f+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,s="";for(;;){const i=t[n];switch(i){case"-":this.chomping=p;break;case"+":this.chomping=h;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new r.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,s=!!this.blockIndent;let i=e,o=e,a=1;for(let e=n[i];"\n"===e&&(i+=1,!r.Node.atDocumentBoundary(n,i));e=n[i]){const e=r.Node.endOfBlockIndent(n,t,i);if(null===e)break;const c=n[e],l=e-(i+t);if(this.blockIndent){if(c&&"\n"!==c&&l<this.blockIndent){if("#"===n[e])break;if(!this.error){const e="Block scalars must not be less indented than their "+(s?"explicit indentation indicator":"first line");this.error=new r.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(l<a){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new r.YAMLSemanticError(this,e)}this.blockIndent=l}else l>a&&(a=l);i="\n"===n[e]?e:o=r.Node.endOfLine(n,e)}return this.chomping!==h&&(i=n[o]?o+1:o),this.valueRange=new r.Range(e+1,i),i}parse(e,t){this.context=e;const{src:n}=e;let s=this.parseBlockHeader(t);return s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class g extends r.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(e=this.items.length){const t=this.items[e-1];return!!t&&(t.jsonLike||t.type===r.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{indent:a,lineStart:c}=e,l=i[t];this.items=[{char:l,offset:t}];let u=r.Node.endOfWhiteSpace(i,t+1);for(l=i[u];l&&"]"!==l&&"}"!==l;){switch(l){case"\n":if(c=u+1,"\n"===i[r.Node.endOfWhiteSpace(i,c)]){const e=new s;c=e.parse({src:i},c),this.items.push(e)}if(u=r.Node.endOfIndent(i,c),u<=c+a&&(l=i[u],u<c+a||"]"!==l&&"}"!==l)){const e="Insufficient indentation in flow collection";this.error=new r.YAMLSemanticError(this,e)}break;case",":this.items.push({char:l,offset:u}),u+=1;break;case"#":{const e=new o;u=e.parse({src:i},u),this.items.push(e)}break;case"?":case":":{const e=i[u+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===l&&this.prevNodeIsJsonLike()){this.items.push({char:l,offset:u}),u+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:c,parent:this},u);if(!e)return this.valueRange=new r.Range(t,u),u;this.items.push(e),u=r.Node.normalizeOffset(i,e.range.end)}}u=r.Node.endOfWhiteSpace(i,u),l=i[u]}return this.valueRange=new r.Range(t,u+1),l&&(this.items.push({char:l,offset:u}),u=r.Node.endOfWhiteSpace(i,u+1),u=this.parseComment(u)),u}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{if(n instanceof r.Node)t=n.setOrigRanges(e,t);else if(0===e.length)n.origOffset=n.offset;else{let r=t;for(;r<e.length&&!(e[r]>n.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;const i=t.filter((e=>e instanceof r.Node));let o="",a=n.start;return i.forEach((t=>{const n=e.slice(a,t.range.start);a=t.range.end,o+=n+String(t),"\n"===o[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,n.end),r.Node.addStringTerminator(e,n.end,o)}}class m extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;'"'!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="";break;case"b":o+="\b";break;case"e":o+="";break;case"f":o+="\f";break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":case"\t":o+="\t";break;case"v":o+="\v";break;case"N":o+="
";break;case"_":o+=" ";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case"\n":for(;" "===i[a+1]||"\t"===i[a+1];)a+=1;break;default:e.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,t,n){const{src:s}=this.context,i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,t+2)}`)),s.substr(e-2,t+2)):String.fromCodePoint(o)}parse(e,t){this.context=e;const{src:n}=e;let s=m.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class y extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;"'"!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)o+=t,a+=1,"'"!==i[a]&&e.push(new r.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parse(e,t){this.context=e;const{src:n}=e;let s=y.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class v{static parseType(e,t,n){switch(e[t]){case"*":return r.Type.ALIAS;case">":return r.Type.BLOCK_FOLDED;case"|":return r.Type.BLOCK_LITERAL;case"{":return r.Type.FLOW_MAP;case"[":return r.Type.FLOW_SEQ;case"?":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_KEY:r.Type.PLAIN;case":":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_VALUE:r.Type.PLAIN;case"-":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.SEQ_ITEM:r.Type.PLAIN;case'"':return r.Type.QUOTE_DOUBLE;case"'":return r.Type.QUOTE_SINGLE;default:return r.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:n,inFlow:s,indent:o,lineStart:a,parent:l}={}){r._defineProperty(this,"parseNode",((e,t)=>{if(r.Node.atDocumentBoundary(this.src,t))return null;const n=new v(this,e),{props:s,type:o,valueStart:a}=n.parseProps(t),l=function(e,t){switch(e){case r.Type.ALIAS:return new f(e,t);case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return new d(e,t);case r.Type.FLOW_MAP:case r.Type.FLOW_SEQ:return new g(e,t);case r.Type.MAP_KEY:case r.Type.MAP_VALUE:case r.Type.SEQ_ITEM:return new i(e,t);case r.Type.COMMENT:case r.Type.PLAIN:return new r.PlainValue(e,t);case r.Type.QUOTE_DOUBLE:return new m(e,t);case r.Type.QUOTE_SINGLE:return new y(e,t);default:return null}}(o,s);let u=l.parse(n,a);if(l.range=new r.Range(t,u),u<=t&&(l.error=new Error("Node#parse consumed no characters"),l.error.parseEnd=u,l.error.source=l,l.range.end=t+1),n.nodeStartsCollection(l)){l.error||n.atLineStart||n.parent.type!==r.Type.DOCUMENT||(l.error=new r.YAMLSyntaxError(l,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new c(l);return u=e.parse(new v(n),u),e.range=new r.Range(t,u),e}return l})),this.atLineStart=null!=t?t:e.atLineStart||!1,this.inCollection=null!=n?n:e.inCollection||!1,this.inFlow=null!=s?s:e.inFlow||!1,this.indent=null!=o?o:e.indent,this.lineStart=null!=a?a:e.lineStart,this.parent=null!=l?l:e.parent||{},this.root=e.root,this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:n,src:s}=this;if(t||n)return!1;if(e instanceof i)return!0;let o=e.range.end;return"\n"!==s[o]&&"\n"!==s[o-1]&&(o=r.Node.endOfWhiteSpace(s,o),":"===s[o])}parseProps(e){const{inFlow:t,parent:n,src:s}=this,i=[];let o=!1,a=s[e=this.atLineStart?r.Node.endOfIndent(s,e):r.Node.endOfWhiteSpace(s,e)];for(;a===r.Char.ANCHOR||a===r.Char.COMMENT||a===r.Char.TAG||"\n"===a;){if("\n"===a){let t,i=e;do{t=i+1,i=r.Node.endOfIndent(s,t)}while("\n"===s[i]);const a=i-(t+this.indent),c=n.type===r.Type.SEQ_ITEM&&n.context.atLineStart;if("#"!==s[i]&&!r.Node.nextNodeIsIndented(s[i],a,!c))break;this.atLineStart=!0,this.lineStart=t,o=!1,e=i}else if(a===r.Char.COMMENT){const t=r.Node.endOfLine(s,e+1);i.push(new r.Range(e,t)),e=t}else{let t=r.Node.endOfIdentifier(s,e+1);a===r.Char.TAG&&","===s[t]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,t+13))&&(t=r.Node.endOfIdentifier(s,t+5)),i.push(new r.Range(e,t)),o=!0,e=r.Node.endOfWhiteSpace(s,t)}a=s[e]}return o&&":"===a&&r.Node.atBlank(s,e+1,!0)&&(e-=1),{props:i,type:v.parseType(s,e,t),valueStart:e}}}t.parse=function(e){const t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,((e,n)=>(e.length>1&&t.push(n),"\n"))));const n=[];let r=0;do{const t=new u,s=new v({src:e});r=t.parse(s,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(0===t.length)return!1;for(let e=1;e<t.length;++e)t[e]-=e;let e=0;for(let r=0;r<n.length;++r)e=n[r].setOrigRanges(t,e);return t.splice(0,t.length),!0},n.toString=()=>n.join("...\n"),n}},314:(e,t,n)=>{"use strict";var r=n(487);function s(e,t,n){return n?-1===n.indexOf("\n")?`${e} #${n}`:`${e}\n`+n.replace(/^/gm,`${t||""}#`):e}class i{}function o(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>o(e,String(t),n)));if(e&&"function"==typeof e.toJSON){const r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});const s=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(s),s}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}class a extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:o(this.value,e,t)}toString(){return String(this.value)}}function c(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if(Number.isInteger(n)&&n>=0){const e=[];e[n]=r,r=e}else{const e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}const l=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class u extends i{constructor(e){super(),r._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(l(e))this.add(t);else{const[n,...r]=e,s=this.get(n,!0);if(s instanceof u)s.addIn(r,t);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,c(this.schema,r,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(n instanceof u)return n.deleteIn(t);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],n){const r=this.get(e,!0);return 0===t.length?!n&&r instanceof a?r.value:r:r instanceof u?r.getIn(t,n):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof a&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([e,...t]){if(0===t.length)return this.has(e);const n=this.get(e,!0);return n instanceof u&&n.hasIn(t)}setIn([e,...t],n){if(0===t.length)this.set(e,n);else{const r=this.get(e,!0);if(r instanceof u)r.setIn(t,n);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`);this.set(e,c(this.schema,t,n))}}}toJSON(){return null}toString(e,{blockItem:t,flowChars:n,isMap:i,itemIndent:o},a,c){const{indent:l,indentStep:f,stringify:h}=e,p=this.type===r.Type.FLOW_MAP||this.type===r.Type.FLOW_SEQ||e.inFlow;p&&(o+=f);const d=i&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:o,inFlow:p,type:null});let g=!1,m=!1;const y=this.items.reduce(((t,n,r)=>{let i;n&&(!g&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((e=>{t.push({type:"comment",str:`#${e}`})})),n.comment&&(i=n.comment),p&&(!g&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(m=!0)),g=!1;let a=h(n,e,(()=>i=null),(()=>g=!0));return p&&!m&&a.includes("\n")&&(m=!0),p&&r<this.items.length-1&&(a+=","),a=s(a,o,i),g&&(i||p)&&(g=!1),t.push({type:"item",str:a}),t}),[]);let v;if(0===y.length)v=n.start+n.end;else if(p){const{start:e,end:t}=n,r=y.map((e=>e.str));if(m||r.reduce(((e,t)=>e+t.length+2),2)>u.maxFlowStringSingleLineLength){v=e;for(const e of r)v+=e?`\n${f}${l}${e}`:"\n";v+=`\n${l}${t}`}else v=`${e} ${r.join(" ")} ${t}`}else{const e=y.map(t);v=e.shift();for(const t of e)v+=t?`\n${l}${t}`:"\n"}return this.comment?(v+="\n"+this.comment.replace(/^/gm,`${l}#`),a&&a()):g&&c&&c(),v}}function f(e){let t=e instanceof a?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}r._defineProperty(u,"maxFlowStringSingleLineLength",60);class h extends u{add(e){this.items.push(e)}delete(e){const t=f(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=f(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof a?r.value:r}has(e){const t=f(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=f(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);this.items[n]=t}toJSON(e,t){const n=[];t&&t.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}class p extends i{constructor(e,t=null){super(),this.key=e,this.value=t,this.type=p.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new a(null)),!(this.key instanceof i))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}addToJSMap(e,t){const n=o(this.key,"",e);if(t instanceof Map){const r=o(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{const r=((e,t,n)=>null===t?"":"object"!=typeof t?String(t):e instanceof i&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t))(this.key,n,e),s=o(this.value,r,e);r in t?Object.defineProperty(t,r,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[r]=s}return t}toJSON(e,t){const n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,t,n){if(!e||!e.doc)return JSON.stringify(this);const{indent:o,indentSeq:c,simpleKeys:l}=e.doc.options;let{key:f,value:p}=this,d=f instanceof i&&f.comment;if(l){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(f instanceof u)throw new Error("With simple keys, collection cannot be used as a key value")}let g=!l&&(!f||d||(f instanceof i?f instanceof u||f.type===r.Type.BLOCK_FOLDED||f.type===r.Type.BLOCK_LITERAL:"object"==typeof f));const{doc:m,indent:y,indentStep:v,stringify:b}=e;e=Object.assign({},e,{implicitKey:!g,indent:y+v});let w=!1,S=b(f,e,(()=>d=null),(()=>w=!0));if(S=s(S,e.indent,d),!g&&S.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(e.allNullValues&&!l)return this.comment?(S=s(S,e.indent,this.comment),t&&t()):w&&!d&&n&&n(),e.inFlow&&!g?S:`? ${S}`;S=g?`? ${S}\n${y}:`:`${S}:`,this.comment&&(S=s(S,e.indent,this.comment),t&&t());let O="",E=null;p instanceof i?(p.spaceBefore&&(O="\n"),p.commentBefore&&(O+=`\n${p.commentBefore.replace(/^/gm,`${e.indent}#`)}`),E=p.comment):p&&"object"==typeof p&&(p=m.schema.createNode(p,!0)),e.implicitKey=!1,!g&&!this.comment&&p instanceof a&&(e.indentAtStart=S.length+1),w=!1,!c&&o>=2&&!e.inFlow&&!g&&p instanceof h&&p.type!==r.Type.FLOW_SEQ&&!p.tag&&!m.anchors.getName(p)&&(e.indent=e.indent.substr(2));const N=b(p,e,(()=>E=null),(()=>w=!0));let T=" ";return O||this.comment?T=`${O}\n${e.indent}`:!g&&p instanceof u?("["===N[0]||"{"===N[0])&&!N.includes("\n")||(T=`\n${e.indent}`):"\n"===N[0]&&(T=""),w&&!E&&n&&n(),s(S+T+N,e.indent,E)}}r._defineProperty(p,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const d=(e,t)=>{if(e instanceof g){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof u){let n=0;for(const r of e.items){const e=d(r,t);e>n&&(n=e)}return n}if(e instanceof p){const n=d(e.key,t),r=d(e.value,t);return Math.max(n,r)}return 1};class g extends i{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:s,inStringifyKey:i}){let o=Object.keys(n).find((e=>n[e]===t));if(!o&&i&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${s?" ":""}`;const a=r.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=r.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return o(this.source,e,t);const{anchors:n,maxAliasCount:s}=t,i=n.get(this.source);if(!i||void 0===i.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(s>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=d(this.source,n)),i.count*i.aliasCount>s)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return i.res}toString(e){return g.stringify(this,e)}}function m(e,t){const n=t instanceof a?t.value:t;for(const r of e)if(r instanceof p){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}r._defineProperty(g,"default",!0);class y extends u{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);const n=m(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error(`Key ${e.key} already set`);n.value=e.value}else if(r){const t=this.items.findIndex((t=>r(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){const t=m(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=m(this.items,e),r=n&&n.value;return!t&&r instanceof a?r.value:r}has(e){return!!m(this.items,e)}set(e,t){this.add(new p(e,t),!0)}toJSON(e,t,n){const r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);for(const e of this.items)e.addToJSMap(t,r);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!(e instanceof p))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}class v extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof h||(t=new h,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new a("<<"),new h);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof y))throw new Error("Merge sources must be maps");const r=n.toJSON(null,e,Map);for(const[e,n]of r)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}toString(e,t){const n=this.value;if(n.items.length>1)return super.toString(e,t);this.value=n.items[0];const r=super.toString(e,t);return this.value=n,r}}const b={defaultType:r.Type.BLOCK_LITERAL,lineWidth:76},w={defaultType:r.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function S(e,t,n){for(const{format:n,test:r,resolve:s}of t)if(r){const t=e.match(r);if(t){let e=s.apply(null,t);return e instanceof a||(e=new a(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new a(e)}const O="flow",E="block",N="quoted",T=(e,t)=>{let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function x(e,t,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return e;const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const l=[],u={};let f,h,p=s-t.length;"number"==typeof r&&(r>s-Math.max(2,i)?l.push(0):p=s-r);let d=!1,g=-1,m=-1,y=-1;n===E&&(g=T(e,g),-1!==g&&(p=g+c));for(let t;t=e[g+=1];){if(n===N&&"\\"===t){switch(m=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if("\n"===t)n===E&&(g=T(e,g)),p=g+c,f=void 0;else{if(" "===t&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[g+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=g)}if(g>=p)if(f)l.push(f),p=f+c,f=void 0;else if(n===N){for(;" "===h||"\t"===h;)h=t,t=e[g+=1],d=!0;const n=g>y+1?g-2:m-1;if(u[n])return e;l.push(n),u[n]=!0,p=n+c,f=void 0}else d=!0}h=t}if(d&&a&&a(),0===l.length)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){const s=l[r],i=l[r+1]||e.length;0===s?v=`\n${t}${e.slice(0,i)}`:(n===N&&u[s]&&(v+=`${e[s]}\\`),v+=`\n${t}${e.slice(s+1,i)}`)}return v}const A=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},w.fold):w.fold,L=e=>/^(%|---|\.\.\.)/m.test(e);function M(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:s}=w.doubleQuoted,i=JSON.stringify(e);if(r)return i;const o=t.indent||(L(e)?" ":"");let a="",c=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(a+=i.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{a+=i.slice(c,e);const t=i.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=i.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===i[e+2]||i.length<s)e+=1;else{for(a+=i.slice(c,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)a+="\n",e+=2;a+=o," "===i[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+i.slice(c):i,n?a:x(a,o,N,A(t))}function k(e,t){if(t.implicitKey){if(/\n/.test(e))return M(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return M(e,t);const n=t.indent||(L(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:x(r,n,O,A(t))}function P({comment:e,type:t,value:n},s,i,o){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return M(n,s);const a=s.indent||(s.forceBlockIndent||L(n)?" ":""),c=a?"2":"1",l=t!==r.Type.BLOCK_FOLDED&&(t===r.Type.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(n,w.fold.lineWidth,a.length));let u=l?"|":">";if(!n)return u+"\n";let f="",h="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?u+="-":n!==e&&t===e.length-1||(u+="+",o&&o()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(u+=c);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(u+=" #"+e.replace(/ ?[\r\n]+/g," "),i&&i()),!n)return`${u}${c}\n${a}${h}`;if(l)return n=n.replace(/\n+/g,`$&${a}`),`${u}\n${a}${f}${n}${h}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const p=x(`${f}${n}${h}`,a,E,w.fold);return`${u}\n${a}${p}`}function I(e,t){let n,s,i;switch(t.type){case r.Type.FLOW_MAP:n="}",s="flow map";break;case r.Type.FLOW_SEQ:n="]",s="flow sequence";break;default:return void e.push(new r.YAMLSemanticError(t,"Not a flow collection!?"))}for(let e=t.items.length-1;e>=0;--e){const n=t.items[e];if(!n||n.type!==r.Type.COMMENT){i=n;break}}if(i&&i.char!==n){const o=`Expected ${s} to end with ${n}`;let a;"number"==typeof i.offset?(a=new r.YAMLSemanticError(t,o),a.offset=i.offset+1):(a=new r.YAMLSemanticError(i,o),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function _(e,t){const n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}}function C(e,t){const n=String(t),s=n.substr(0,8)+"..."+n.substr(-8);return new r.YAMLSemanticError(e,`The "${s}" key is too long`)}function $(e,t){for(const{afterKey:n,before:r,comment:s}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===s?!n&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+s:t.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}function R(e,t){const n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((n=>{n.source||(n.source=t),e.errors.push(n)})),n.str):""}function B(e,t,n){const{tags:r}=e.schema,s=[];for(const i of r)if(i.tag===n){if(!i.test){const n=i.resolve(e,t);return n instanceof u?n:new a(n)}s.push(i)}const i=R(e,t);return"string"==typeof i&&s.length>0?S(i,s,r.scalarFallback):null}const Y=e=>{if(!e)return!1;const{type:t}=e;return t===r.Type.MAP_KEY||t===r.Type.MAP_VALUE||t===r.Type.SEQ_ITEM};function j(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:s,hasTag:i}=function(e,t){const n={before:[],after:[]};let s=!1,i=!1;const o=Y(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:a,end:c}of o)switch(t.context.src[a]){case r.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(a)){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}const{header:s,valueRange:i}=t;(i&&(a>i.start||s&&a>s.start)?n.after:n.before).push(t.context.src.slice(a+1,c));break}case r.Char.ANCHOR:if(s){const n="A node can have at most one anchor";e.push(new r.YAMLSemanticError(t,n))}s=!0;break;case r.Char.TAG:if(i){const n="A node can have at most one tag";e.push(new r.YAMLSemanticError(t,n))}i=!0}return{comments:n,hasAnchor:s,hasTag:i}}(e.errors,t);if(s){const{anchors:n}=e,r=t.anchor,s=n.getNode(r);s&&(n.map[n.newName(r)]=s),n.map[r]=t}if(t.type===r.Type.ALIAS&&(s||i)){const n="An alias node must not specify any properties";e.errors.push(new r.YAMLSemanticError(t,n))}const o=function(e,t){const{anchors:n,errors:s,schema:i}=e;if(t.type===r.Type.ALIAS){const e=t.rawValue,i=n.getNode(e);if(!i){const n=`Aliased anchor not found: ${e}`;return s.push(new r.YAMLReferenceError(t,n)),null}const o=new g(i);return n._cstAliases.push(o),o}const o=function(e,t){const{tag:n,type:s}=t;let i=!1;if(n){const{handle:s,suffix:o,verbatim:a}=n;if(a){if("!"!==a&&"!!"!==a)return a;const n=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new r.YAMLSemanticError(t,n))}else if("!"!==s||o)try{return function(e,t){const{handle:n,suffix:s}=t.tag;let i=e.tagPrefixes.find((e=>e.handle===n));if(!i){const s=e.getDefaults().tagPrefixes;if(s&&(i=s.find((e=>e.handle===n))),!i)throw new r.YAMLSemanticError(t,`The ${n} tag handle is non-default and was not declared.`)}if(!s)throw new r.YAMLSemanticError(t,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===s[0])return e.warnings.push(new r.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),s;if(/[:/]/.test(s)){const e=s.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${s}`}}return i.prefix+decodeURIComponent(s)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(s){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:case r.Type.QUOTE_DOUBLE:case r.Type.QUOTE_SINGLE:return r.defaultTags.STR;case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;case r.Type.PLAIN:return i?r.defaultTags.STR:null;default:return null}}(e,t);if(o)return function(e,t,n){try{const r=B(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{const s=function({type:e}){switch(e){case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;default:return r.defaultTags.STR}}(t);if(!s)throw new Error(`The tag ${n} is unavailable`);const i=`The tag ${n} is unavailable, falling back to ${s}`;e.warnings.push(new r.YAMLWarning(t,i));const o=B(e,t,s);return o.tag=n,o}catch(n){const s=new r.YAMLReferenceError(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}(e,t,o);if(t.type!==r.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;return s.push(new r.YAMLSyntaxError(t,e)),null}try{return S(R(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),s.push(e),null}}(e,t);if(o){o.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(o.cstNode=t),e.options.keepNodeTypes&&(o.type=t.type);const r=n.before.join("\n");r&&(o.commentBefore=o.commentBefore?`${o.commentBefore}\n${r}`:r);const s=n.after.join("\n");s&&(o.comment=o.comment?`${o.comment}\n${s}`:s)}return t.resolved=o}const D=({context:{lineStart:e,node:t,src:n},props:s})=>{if(0===s.length)return!1;const{start:i}=s[0];if(t&&i>t.valueRange.start)return!1;if(n[i]!==r.Char.COMMENT)return!1;for(let t=e;t<i;++t)if("\n"===n[t])return!1;return!0};function F(e,t){if(!D(e))return;const n=e.getPropValue(0,r.Char.COMMENT,!0);let s=!1;const i=t.value.commentBefore;if(i&&i.startsWith(n))t.value.commentBefore=i.substr(n.length+1),s=!0;else{const r=t.value.comment;!e.node&&r&&r.startsWith(n)&&(t.value.comment=r.substr(n.length+1),s=!0)}s&&(t.comment=n)}t.Alias=g,t.Collection=u,t.Merge=v,t.Node=i,t.Pair=p,t.Scalar=a,t.YAMLMap=y,t.YAMLSeq=h,t.addComment=s,t.binaryOptions=b,t.boolOptions={trueStr:"true",falseStr:"false"},t.findPair=m,t.intOptions={asBigInt:!1},t.isEmptyPath=l,t.nullOptions={nullStr:"null"},t.resolveMap=function(e,t){if(t.type!==r.Type.MAP&&t.type!==r.Type.FLOW_MAP){const n=`A ${t.type} node cannot be resolved as a mapping`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_MAP?function(e,t){const n=[],s=[];let i,o=!1,a="{";for(let c=0;c<t.items.length;++c){const l=t.items[c];if("string"==typeof l.char){const{char:n,offset:u}=l;if("?"===n&&void 0===i&&!o){o=!0,a=":";continue}if(":"===n){if(void 0===i&&(i=null),":"===a){a=",";continue}}else if(o&&(void 0===i&&","!==n&&(i=null),o=!1),void 0!==i&&(s.push(new p(i)),i=void 0,","===n)){a=":";continue}if("}"===n){if(c===t.items.length-1)continue}else if(n===a){a=":";continue}const f=`Flow map contains an unexpected ${n}`,h=new r.YAMLSyntaxError(t,f);h.offset=u,e.errors.push(h)}else l.type===r.Type.BLANK_LINE?n.push({afterKey:!!i,before:s.length}):l.type===r.Type.COMMENT?(_(e.errors,l),n.push({afterKey:!!i,before:s.length,comment:l.comment})):void 0===i?(","===a&&e.errors.push(new r.YAMLSemanticError(l,"Separator , missing in flow map")),i=j(e,l)):(","!==a&&e.errors.push(new r.YAMLSemanticError(l,"Indicator : missing in flow map entry")),s.push(new p(i,j(e,l))),i=void 0,o=!1)}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];let i,o=null;for(let a=0;a<t.items.length;++a){const c=t.items[a];switch(c.type){case r.Type.BLANK_LINE:n.push({afterKey:!!i,before:s.length});break;case r.Type.COMMENT:n.push({afterKey:!!i,before:s.length,comment:c.comment});break;case r.Type.MAP_KEY:void 0!==i&&s.push(new p(i)),c.error&&e.errors.push(c.error),i=j(e,c.node),o=null;break;case r.Type.MAP_VALUE:{if(void 0===i&&(i=null),c.error&&e.errors.push(c.error),!c.context.atLineStart&&c.node&&c.node.type===r.Type.MAP&&!c.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new r.YAMLSemanticError(c.node,t))}let n=c.node;if(!n&&c.props.length>0){n=new r.PlainValue(r.Type.PLAIN,[]),n.context={parent:c,src:c.context.src};const e=c.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof c.range.origStart){const e=c.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const a=new p(i,j(e,n));F(c,a),s.push(a),i&&"number"==typeof o&&c.range.start>o+1024&&e.errors.push(C(t,i)),i=void 0,o=null}break;default:void 0!==i&&s.push(new p(i)),i=j(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let n=a+1;;++n){const s=t.items[n];switch(s&&s.type){case r.Type.BLANK_LINE:case r.Type.COMMENT:continue e;case r.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new r.YAMLSemanticError(c,t));break e}}}if(c.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new r.YAMLSemanticError(c,t))}}}return void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t),i=new y;i.items=s,$(i,n);let o=!1;for(let n=0;n<s.length;++n){const{key:i}=s[n];if(i instanceof u&&(o=!0),e.schema.merge&&i&&"<<"===i.value){s[n]=new v(s[n]);const i=s[n].value.items;let o=null;i.some((e=>{if(e instanceof g){const{type:t}=e.source;return t!==r.Type.MAP&&t!==r.Type.FLOW_MAP&&(o="Merge nodes aliases can only point to maps")}return o="Merge nodes can only have Alias nodes as values"})),o&&e.errors.push(new r.YAMLSemanticError(t,o))}else for(let o=n+1;o<s.length;++o){const{key:n}=s[o];if(i===n||i&&n&&Object.prototype.hasOwnProperty.call(i,"value")&&i.value===n.value){const n=`Map keys must be unique; "${i}" is repeated`;e.errors.push(new r.YAMLSemanticError(t,n));break}}}if(o&&!e.options.mapAsMap){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveNode=j,t.resolveSeq=function(e,t){if(t.type!==r.Type.SEQ&&t.type!==r.Type.FLOW_SEQ){const n=`A ${t.type} node cannot be resolved as a sequence`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_SEQ?function(e,t){const n=[],s=[];let i,o=!1,a=null,c="[",l=null;for(let u=0;u<t.items.length;++u){const f=t.items[u];if("string"==typeof f.char){const{char:n,offset:h}=f;if(":"===n||!o&&void 0===i||(o&&void 0===i&&(i=c?s.pop():null),s.push(new p(i)),o=!1,i=void 0,a=null),n===c)c=null;else if(c||"?"!==n){if("["!==c&&":"===n&&void 0===i){if(","===c){if(i=s.pop(),i instanceof p){const n="Chaining flow sequence pairs is invalid",s=new r.YAMLSemanticError(t,n);s.offset=h,e.errors.push(s)}if(!o&&"number"==typeof a){const n=f.range?f.range.start:f.offset;n>a+1024&&e.errors.push(C(t,i));const{src:s}=l.context;for(let t=a;t<n;++t)if("\n"===s[t]){const t="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new r.YAMLSemanticError(l,t));break}}}else i=null;a=null,o=!1,c=null}else if("["===c||"]"!==n||u<t.items.length-1){const s=`Flow sequence contains an unexpected ${n}`,i=new r.YAMLSyntaxError(t,s);i.offset=h,e.errors.push(i)}}else o=!0}else if(f.type===r.Type.BLANK_LINE)n.push({before:s.length});else if(f.type===r.Type.COMMENT)_(e.errors,f),n.push({comment:f.comment,before:s.length});else{if(c){const t=`Expected a ${c} in flow sequence`;e.errors.push(new r.YAMLSemanticError(f,t))}const t=j(e,f);void 0===i?(s.push(t),l=f):(s.push(new p(i,t)),i=void 0),a=f.range.start,c=","}}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];for(let i=0;i<t.items.length;++i){const o=t.items[i];switch(o.type){case r.Type.BLANK_LINE:n.push({before:s.length});break;case r.Type.COMMENT:n.push({comment:o.comment,before:s.length});break;case r.Type.SEQ_ITEM:if(o.error&&e.errors.push(o.error),s.push(j(e,o.node)),o.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new r.YAMLSemanticError(o,t))}break;default:o.error&&e.errors.push(o.error),e.errors.push(new r.YAMLSyntaxError(o,`Unexpected ${o.type} node in sequence`))}}return{comments:n,items:s}}(e,t),i=new h;if(i.items=s,$(i,n),!e.options.mapAsMap&&s.some((e=>e instanceof p&&e.key instanceof u))){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveString=R,t.strOptions=w,t.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let n=t-(s.length-e-1);for(;n-- >0;)s+="0"}return s},t.stringifyString=function(e,t,n,s){const{defaultType:i}=w,{implicitKey:o,inFlow:a}=t;let{type:c,value:l}=e;"string"!=typeof l&&(l=String(l),e=Object.assign({},e,{value:l}));const u=i=>{switch(i){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return P(e,t,n,s);case r.Type.QUOTE_DOUBLE:return M(l,t);case r.Type.QUOTE_SINGLE:return k(l,t);case r.Type.PLAIN:return function(e,t,n,s){const{comment:i,type:o,value:a}=e,{actualString:c,implicitKey:l,indent:u,inFlow:f}=t;if(l&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return M(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return l||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?k(a,t):M(a,t):P(e,t,n,s);if(!l&&!f&&o!==r.Type.PLAIN&&-1!==a.indexOf("\n"))return P(e,t,n,s);if(""===u&&L(a))return t.forceBlockIndent=!0,P(e,t,n,s);const h=a.replace(/\n+/g,`$&\n${u}`);if(c){const{tags:e}=t.doc.schema;if("string"!=typeof S(h,e,e.scalarFallback).value)return M(a,t)}const p=l?h:x(h,u,O,A(t));return!i||f||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(p,u,i))}(e,t,n,s);default:return null}};c!==r.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)?c=r.Type.QUOTE_DOUBLE:!o&&!a||c!==r.Type.BLOCK_FOLDED&&c!==r.Type.BLOCK_LITERAL||(c=r.Type.QUOTE_DOUBLE);let f=u(c);if(null===f&&(f=u(i),null===f))throw new Error(`Unsupported default string type ${i}`);return f},t.toJSON=o},125:(e,t,n)=>{"use strict";var r=n(487),s=n(314);const i={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=s.resolveString(e,t);if("function"==typeof Buffer)return Buffer.from(n,"base64");if("function"==typeof atob){const e=atob(n.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}{const n="This environment does not support reading binary tags; either Buffer or atob is required";return e.errors.push(new r.YAMLReferenceError(t,n)),null}},options:s.binaryOptions,stringify:({comment:e,type:t,value:n},i,o,a)=>{let c;if("function"==typeof Buffer)c=n instanceof Buffer?n.toString("base64"):Buffer.from(n.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<n.length;++t)e+=String.fromCharCode(n[t]);c=btoa(e)}}if(t||(t=s.binaryOptions.defaultType),t===r.Type.QUOTE_DOUBLE)n=c;else{const{lineWidth:e}=s.binaryOptions,i=Math.ceil(c.length/e),o=new Array(i);for(let t=0,n=0;t<i;++t,n+=e)o[t]=c.substr(n,e);n=o.join(t===r.Type.BLOCK_LITERAL?"\n":" ")}return s.stringifyString({comment:e,type:t,value:n},i,o,a)}};function o(e,t){const n=s.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let i=n.items[e];if(!(i instanceof s.Pair)){if(i instanceof s.YAMLMap){if(i.items.length>1){const e="Each pair must have its own sequence indicator";throw new r.YAMLSemanticError(t,e)}const e=i.items[0]||new s.Pair;i.commentBefore&&(e.commentBefore=e.commentBefore?`${i.commentBefore}\n${e.commentBefore}`:i.commentBefore),i.comment&&(e.comment=e.comment?`${i.comment}\n${e.comment}`:i.comment),i=e}n.items[e]=i instanceof s.Pair?i:new s.Pair(i)}}return n}function a(e,t,n){const r=new s.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const s of t){let t,i;if(Array.isArray(s)){if(2!==s.length)throw new TypeError(`Expected [key, value] tuple: ${s}`);t=s[0],i=s[1]}else if(s&&s instanceof Object){const e=Object.keys(s);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${s}`);t=e[0],i=s[t]}else t=s;const o=e.createPair(t,i,n);r.items.push(o)}return r}const c={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:a};class l extends s.YAMLSeq{constructor(){super(),r._defineProperty(this,"add",s.YAMLMap.prototype.add.bind(this)),r._defineProperty(this,"delete",s.YAMLMap.prototype.delete.bind(this)),r._defineProperty(this,"get",s.YAMLMap.prototype.get.bind(this)),r._defineProperty(this,"has",s.YAMLMap.prototype.has.bind(this)),r._defineProperty(this,"set",s.YAMLMap.prototype.set.bind(this)),this.tag=l.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let r,i;if(e instanceof s.Pair?(r=s.toJSON(e.key,"",t),i=s.toJSON(e.value,r,t)):r=s.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}}r._defineProperty(l,"tag","tag:yaml.org,2002:omap");const u={identify:e=>e instanceof Map,nodeClass:l,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=o(e,t),i=[];for(const{key:e}of n.items)if(e instanceof s.Scalar){if(i.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new r.YAMLSemanticError(t,e)}i.push(e.value)}return Object.assign(new l,n)},createNode:function(e,t,n){const r=a(e,t,n),s=new l;return s.items=r.items,s}};class f extends s.YAMLMap{constructor(){super(),this.tag=f.tag}add(e){const t=e instanceof s.Pair?e:new s.Pair(e);s.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=s.findPair(this.items,e);return!t&&n instanceof s.Pair?n.key instanceof s.Scalar?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=s.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new s.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw new Error("Set items must all have null values")}}r._defineProperty(f,"tag","tag:yaml.org,2002:set");const h={identify:e=>e instanceof Set,nodeClass:f,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=s.resolveMap(e,t);if(!n.hasAllNullValues())throw new r.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new f,n)},createNode:function(e,t,n){const r=new f;for(const s of t)r.items.push(e.createPair(s,null,n));return r}},p=(e,t)=>{const n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},d=({value:e})=>{if(isNaN(e)||!isFinite(e))return s.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));const n=[e%60];return e<60?n.unshift(0):(e=Math.round((e-n[0])/60),n.unshift(e%60),e>=60&&(e=Math.round((e-n[0])/60),n.unshift(e))),t+n.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},m={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,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},y={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,t,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(t,n-1,r,s||0,i||0,o||0,a||0);if(c&&"Z"!==c){let e=p(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function v(e){const t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function b(e,t){if(v(!1)){const n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?`${t}: ${e}`:e)}}const w={};t.binary=i,t.floatTime=m,t.intTime=g,t.omap=u,t.pairs=c,t.set=h,t.timestamp=y,t.warn=b,t.warnFileDeprecation=function(e){v(!0)&&b(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")},t.warnOptionDeprecation=function(e,t){if(!w[e]&&v(!0)){w[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:".",b(n,"DeprecationWarning")}}},78:(e,t,n)=>{e.exports=n(667).YAML}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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 r={};return(()=>{"use strict";n.r(r),n.d(r,{FtpClient:()=>P,FtpClientPool:()=>I,JsonStorage:()=>b,PuboFileSystem:()=>F,RosTopic:()=>he,RosTopicManager:()=>pe,SIGKILL:()=>z,createRpcClient:()=>B,getNetworks:()=>ne,getProcessByPpid:()=>V,getProcessCommandByPid:()=>J,getProcessCpuUseByPid:()=>q,getProcessName:()=>Q,getProcessTree:()=>H,getWifiName:()=>re,isPortAvailable:()=>Z,isProcessDied:()=>G,pitch:()=>X});const e=require("fs");var t=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},i=function(){function e(){this.cache=[],this.running=!1,this.len=0}return e.prototype._run=function(e){var n=e.fn,r=e.promise;return t(this,void 0,void 0,(function(){var e,t;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,n()];case 1:return e=s.sent(),r.resolve(e),[3,3];case 2:return t=s.sent(),r.reject(t),[3,3];case 3:return[2]}}))}))},e.prototype.run=function(){return t(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return this.cache.length<1?(this.running=!1,[2]):(this.running=!0,e=this.cache.shift(),this.len-=1,"function"!=typeof e.fn?[3,2]:[4,this._run(e)]);case 1:t.sent(),t.label=2;case 2:return this.run(),[2]}}))}))},e.prototype.push=function(e){var t=this;return this.len+=1,new Promise((function(n,r){t.cache.push({fn:e,promise:{resolve:n,reject:r}}),t.running||t.run()}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),e}();const o=require("crypto");var a=n.n(o);const c={randomUUID:a().randomUUID},l=new Uint8Array(256);let u=l.length;function f(){return u>l.length-16&&(a().randomFillSync(l),u=0),l.slice(u,u+=16)}const h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));const p=function(e,t,n){if(c.randomUUID&&!t&&!e)return c.randomUUID();const r=(e=e||{}).random||(e.rng||f)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]}(r)};var d=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},g=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},m=n(1),y=function(){function t(e,t){var n=this;this._state={},this.queue=new i,this.path=e,this.key=encodeURIComponent(e),m.on("online",(function(e){e.on("message",(function(t){return n.onMessage(t,e)}))})),this.restore()}return t.prototype.onMessage=function(e,t){return d(this,void 0,void 0,(function(){var n;return g(this,(function(r){switch(r.label){case 0:return e.key!==this.key?[2]:"get"!==e.type?[3,2]:[4,this.getState()];case 1:return n=r.sent(),[3,4];case 2:return"set"!==e.type?[3,4]:[4,this.setState(e.payload)];case 3:n=r.sent(),r.label=4;case 4:return t.send({uid:e.uid,key:this.key,payload:n}),[2]}}))}))},t.prototype.sync=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){switch(e.label){case 0:return this.queue.length>0?[2]:[4,this.queue.push(this._syncFile.bind(this))];case 1:return e.sent(),[2]}}))}))},t.prototype._syncFile=function(){return d(this,void 0,void 0,(function(){var t=this;return g(this,(function(n){return[2,new Promise((function(n,r){(0,e.writeFile)(t.path,JSON.stringify(t._state),(function(e){e?r(e):n("")}))}))]}))}))},t.prototype.restore=function(){var t;try{var n=(0,e.readFileSync)(this.path);this._state=JSON.parse(n.toString())}catch(n){var r="win32"===process.platform?"\\":"/";r&&(0,e.mkdirSync)(this.path.split(r).slice(0,-1).join(r),{recursive:!0}),this.setState(null!==(t=this.defaultState)&&void 0!==t?t:{})}},t.prototype.getState=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){return[2,this._state]}))}))},t.prototype.setState=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return this._state=e,[4,this.sync()];case 1:return t.sent(),[2]}}))}))},t}(),v=function(){function e(e){this.callback={},this.key=encodeURIComponent(e),process.on("message",this.onMessage.bind(this))}return e.prototype.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.prototype.call=function(e){var t=e.type,n=e.payload;return d(this,void 0,void 0,(function(){var e=this;return g(this,(function(r){return[2,new Promise((function(r){var s=p();e.callback[s]=function(e){return r(e)},process.send({uid:s,type:t,payload:n,key:e.key})}))]}))}))},e.prototype.getState=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){return[2,this.call({type:"get",payload:{}})]}))}))},e.prototype.setState=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){return[2,this.call({type:"set",payload:e})]}))}))},e}(),b=function(){function e(e,t){m.isPrimary?this.instance=new y(e,t.defaultState):this.instance=new v(e),(null==t?void 0:t.initialState)&&this.merge(t.initialState)}return e.prototype.getState=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){return[2,this.instance.getState()]}))}))},e.prototype.setState=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){return[2,this.instance.setState(e)]}))}))},e.prototype.get=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return e?[3,1]:[2,this.getState()];case 1:return[4,this.getState()];case 2:return[2,t.sent()[e]]}}))}))},e.prototype.set=function(e,t){return d(this,void 0,void 0,(function(){var n;return g(this,(function(r){switch(r.label){case 0:return[4,this.getState()];case 1:return(n=r.sent())[e]=t,[4,this.setState(n)];case 2:return r.sent(),[2]}}))}))},e.prototype.merge=function(e){return d(this,void 0,void 0,(function(){var t,n,r,s,i,o;return g(this,(function(a){switch(a.label){case 0:return[4,this.getState()];case 1:t=a.sent();try{for(n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.keys(e)),r=n.next();!r.done;r=n.next())s=r.value,t[s]=e[s]}catch(e){i={error:e}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return[4,this.setState(t)];case 2:return a.sent(),[2]}}))}))},e.prototype.remove=function(e){return d(this,void 0,void 0,(function(){var t;return g(this,(function(n){switch(n.label){case 0:return[4,this.getState()];case 1:return delete(t=n.sent())[e],[4,this.setState(t)];case 2:return n.sent(),[2]}}))}))},e}(),w=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="",r=0;r<=e;r+=8)n+=t(e-r>8?8:e-r);return n},S=function(e){return t=void 0,n=void 0,s=function(){return function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 1:return t.sent(),[2]}}))},new((r=void 0)||(r=Promise))((function(e,i){function o(e){try{c(s.next(e))}catch(e){i(e)}}function a(e){try{c(s.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,a)}c((s=s.apply(t,n||[])).next())}));var t,n,r,s},O=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},E=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},N=function(e,t){var n=void 0===t?{}:t,r=n.checkTime,s=n.timeout;return new Promise((function(t,n){var i=function(e,t){var n=!0,r=function(){n=!1},s=function(){return O(void 0,void 0,void 0,(function(){return E(this,(function(r){switch(r.label){case 0:return[4,e()];case 1:return r.sent(),[4,S(t)];case 2:return r.sent(),n?s():s=null,[2]}}))}))};return s(),r}((function(){return O(void 0,void 0,void 0,(function(){var n;return E(this,(function(r){switch(r.label){case 0:return[4,e()];case 1:return(n=r.sent())&&(i(),t(n)),[2]}}))}))}),r||100);s&&setTimeout((function(){i(),n("timeout")}),s)}))},T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},T.apply(this,arguments)},x=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},L=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n},M=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},k=function(e,t,n){if(n||2===arguments.length)for(var r,s=0,i=t.length;s<i;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))},P=function(){function e(e){var t=e.driver,n=L(e,["driver"]);this.state={running:!1,connected:!1,destroyed:!1,connecting:!1},this._len=0,this.id=w(),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}return Object.defineProperty(e.prototype,"len",{get:function(){return this._len},set:function(e){this._len=e,this._len<1&&this.close()},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return x(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:return this.client||(this.client=new this.driver),this.state.destroyed=!1,this.state.connecting?[4,N((function(){return e.state.connected}),{checkTime:1e3,timeout:1e4})]:[3,2];case 1:return t.sent(),[2,"connected"];case 2:return this.state.connecting=!0,[2,new Promise((function(t,n){e.client.once("ready",(function(){e.state.connected=!0,t("connected"),e.state.connecting=!1})),e.client.once("error",(function(t){n(t),e.close()})),e.client.connect(T({},e.options))}))]}}))}))},e.prototype.close=function(){this.client.end(),this.state.connected=!1,this.state.destroyed=!0,this.state.connecting=!1,this.client=null},e.prototype.run=function(e){var t=e.fn,n=e.args;return x(this,void 0,void 0,(function(){var e=this;return A(this,(function(r){switch(r.label){case 0:return this.len+=1,this.state.connected?[3,2]:[4,this.connect()];case 1:r.sent(),r.label=2;case 2:return this.state.running?[4,N((function(){return!e.state.running}),{checkTime:1e3,timeout:6e6})]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.state.running=!0,[2,new Promise((function(r,s){var i;(i=e.client)[t].apply(i,k(k([],M(n),!1),[function(e,t){e?s(e):r(t)}],!1))}))]}}))}))},e.prototype.bind=function(e){var t=this;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return x(t,void 0,void 0,(function(){var t;return A(this,(function(r){switch(r.label){case 0:return[4,this.run({fn:e,args:n})];case 1:return t=r.sent(),this.state.running=!1,this.len-=1,[2,t]}}))}))}},e.prototype.get=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x(this,void 0,void 0,(function(){var t,n,r=this;return A(this,(function(s){switch(s.label){case 0:return t=Buffer.alloc(0),[4,this.run({fn:"get",args:e})];case 1:return n=s.sent(),[2,new Promise((function(e){n.on("data",(function(e){t=Buffer.concat([t,e],t.byteLength+e.byteLength)})),n.on("end",(function(){e(t),r.state.running=!1,r.len-=1}))}))]}}))}))},e}(),I=function(){function e(e){var t=e.maxConnection,n=void 0===t?5:t,r=L(e,["maxConnection"]);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=r,this.maxConnection=n}return Object.defineProperty(e.prototype,"len",{get:function(){return this.pool.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"client",{get:function(){if(this.pool.length<this.maxConnection){var e=new P(this.options);return this.pool.push(e),e}return this.pool.sort((function(e,t){return e.len-t.len})),this.pool[0]},enumerable:!1,configurable:!0}),e.prototype.bind=function(e){var t=this;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return x(t,void 0,void 0,(function(){var t,r,s;return A(this,(function(i){switch(i.label){case 0:return[4,(t=this.client)[e].apply(t,k([],M(n),!1))];case 1:return r=i.sent(),t.len<1&&(s=this.pool.findIndex((function(e){return e.id===t.id})),this.pool.splice(s,1)),[2,r]}}))}))}},e}(),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},_.apply(this,arguments)};function C(e){return e}var $=function(){function e(e){var t,n=e.url,r=e.options,s=void 0===r?{}:r,i=e.Grpc,o=e.cert;this.connections=0;var a=_({"grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1},s),c=o?i.credentials.createSsl(o):i.credentials.createInsecure();this.url=n,this.Grpc=i,this.credentials=c,this.options=a,this.options.timeout=null!==(t=this.options.timeout)&&void 0!==t?t:6e4}return e.prototype.request=function(e,t,n){return r=this,s=void 0,o=function(){var r,s,i,o=this;return function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(a){switch(a.label){case 0:this.connections+=1,this.client||(this.client=new this.Grpc.Client(this.url,this.credentials,this.options)),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._request({service:e,method:t,data:n})];case 2:return s=a.sent(),[3,4];case 3:return i=a.sent(),r=i,[3,4];case 4:if(this.connections-=1,this.connections<0&&(this.connections=0),this.connections<1&&(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._timeout=setTimeout((function(){return o.close()}),6e4)),r)throw this.close(),new Error("grpc connection error.");return[2,s]}}))},new((i=void 0)||(i=Promise))((function(e,t){function n(e){try{c(o.next(e))}catch(e){t(e)}}function a(e){try{c(o.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(n,a)}c((o=o.apply(r,s||[])).next())}));var r,s,i,o},e.prototype._request=function(e){var t=this,n=e.service,r=e.method,s=e.data;return new Promise((function(e,i){var o=!1,a=setTimeout((function(){o=!0,t.close(),console.log("rpc request timeout"),i(new Error("timeout"))}),t.options.timeout),c=function(t,n){o||(clearTimeout(a),t?i(t):e(n),c=null)};t.client.makeUnaryRequest("/".concat(n,"/").concat(r),C,C,s,c)}))},e.prototype.close=function(){var e;null===(e=this.client)||void 0===e||e.close(),this.client=null,delete this.client},e}(),R=[];function B(e){var t=e.url,n=e.options,r=void 0===n?{}:n,s=e.ServiceImp,i=e.Grpc,o=e.cert,a=new $({url:t,options:r,Grpc:i,cert:o});return R.push(a),new s({request:a.request.bind(a)})}var Y=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},j=function(e,t,n){if(n||2===arguments.length)for(var r,s=0,i=t.length;s<i;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))},D=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new Promise((function(n,r){e.apply(void 0,j(j([],Y(t),!1),[function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];e&&r(e),t.length<2?n(t[0]):n(j([],Y(t),!1))}],!1))}))}},F={read:D(e.read),readFile:D(e.readFile),writeFile:D(e.writeFile),readdir:D(e.readdir),open:D(e.open),close:D(e.close),write:D(e.write),stat:D(e.stat)},W=n(81),U=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},K=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};function Q(e){return new Promise((function(t,n){(0,W.exec)('grep "Name:" /proc/'.concat(e,"/status"),(function(e,r){e?n(e):t(r)}))}))}function q(e){return new Promise((function(t){(0,W.exec)("ps -p ".concat(e," -o %cpu="),(function(e,n){t(e?-1:parseFloat(n.toString()))}))}))}function J(e){return new Promise((function(t){(0,W.exec)("ps -p ".concat(e," -o command="),(function(e,n){t(e?"":n.toString().split("\n")[0])}))}))}function G(e){return U(this,void 0,void 0,(function(){return K(this,(function(t){switch(t.label){case 0:return[4,q(e)];case 1:return[2,t.sent()<0]}}))}))}function V(e){return new Promise((function(t){(0,W.exec)("ps -o pid --no-headers --ppid ".concat(e),(function(e,n){t(e?[]:n.split("\n").filter((function(e){return!!e})).map((function(e){return parseFloat(e.trim())})))}))}))}var H=function e(t,n){return U(void 0,void 0,void 0,(function(){var r,s,i,o,a,c,l,u;return K(this,(function(f){switch(f.label){case 0:return n||(n={pid:t,children:[]}),[4,V(t)];case 1:r=f.sent(),f.label=2;case 2:f.trys.push([2,7,8,9]),s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=s.next(),f.label=3;case 3:return i.done?[3,6]:(o=i.value,[4,e(o,a={pid:o,children:[]})]);case 4:f.sent(),n.children.push(a),f.label=5;case 5:return i=s.next(),[3,3];case 6:return[3,9];case 7:return c=f.sent(),l={error:c},[3,9];case 8:try{i&&!i.done&&(u=s.return)&&u.call(s)}finally{if(l)throw l.error}return[7];case 9:return[2,n]}}))}))};function z(e,t){return void 0===t&&(t=2),U(this,void 0,void 0,(function(){var r,s=this;return K(this,(function(i){switch(i.label){case 0:if(r=9===t?"SIGKILL":"SIGINT",n(496)(e,r),"win32"===process.platform)return[2];i.label=1;case 1:return i.trys.push([1,3,,5]),[4,N((function(){return U(s,void 0,void 0,(function(){return K(this,(function(t){return[2,G(e)]}))}))}),{checkTime:100,timeout:1e4})];case 2:return i.sent(),[3,5];case 3:return i.sent(),[4,z(e,9)];case 4:return i.sent(),[3,5];case 5:return[2]}}))}))}var Z=function(e){return new Promise((function(t){var r=n(808).createServer();r.listen(e,(function(){t(!0),r.close()})),r.on("error",(function(){t(!1),r.close()}))}))},X=function(){process.on("uncaughtException",(function(e){return console.log(e)})),process.on("unhandledRejection",(function(e){return console.log(e)})),global.require=n(649),global.exports=exports,global._0x2f=function(e){return e.map((function(e){return String.fromCharCode(e)})).reduce((function(e,t){return e+t}))},global._0x3c=function(e){return n(649)(global._0x2f(e))}},ee=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},te=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};function ne(){return ee(this,void 0,void 0,(function(){return te(this,(function(e){return[2,new Promise((function(e){var t;null===(t=(0,W.exec)("lshw -C network").stdout)||void 0===t||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 re(){return ee(this,void 0,void 0,(function(){var e,t;return te(this,(function(n){switch(n.label){case 0:return[4,ne()];case 1:return e=n.sent(),(t=e.find((function(e){return"Wireless interface"===e.description})))?[2,t["logical name"]]:[2,""]}}))}))}var se,ie=(se=function(e,t){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},se(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}se(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),oe=function(){return oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},oe.apply(this,arguments)},ae=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ce=function(){function e(){this.state={},this.ids={}}return e.prototype.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,r=w(40);return this.ids[r]={event:e,index:n},r},e.prototype.cancel=function(e){var t=this;if(e){var n=this.ids[e]||{},r=n.event,s=n.index;r&&Array.isArray(this.state[r])&&(this.state[r].splice(s,1),delete this.ids[e],Object.keys(this.ids).forEach((function(e){t.ids[e].event===r&&t.ids[e].index>s&&(t.ids[e].index=t.ids[e].index-1)})))}else this.clear()},e.prototype.clear=function(){this.state.length=0},e.prototype.emit=function(e,t){var n,r;if(Array.isArray(this.state[e]))try{for(var s=ae(this.state[e]),i=s.next();!i.done;i=s.next()){var o=i.value;"function"==typeof o&&o(t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},e.prototype.emitSync=function(e,t){return n=this,r=void 0,i=function(){var n,r,s,i,o,a;return function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(c){switch(c.label){case 0:if(!Array.isArray(this.state[e]))return[3,8];c.label=1;case 1:c.trys.push([1,6,7,8]),n=ae(this.state[e]),r=n.next(),c.label=2;case 2:return r.done?[3,5]:"function"!=typeof(s=r.value)?[3,4]:[4,s(t)];case 3:c.sent(),c.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{c(i.next(e))}catch(e){t(e)}}function a(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(o,a)}c((i=i.apply(n,r||[])).next())}));var n,r,s,i},e.prototype.clone=function(){return{state:oe({},this.state),ids:oe({},this.ids)}},e.prototype.restore=function(e){this.state=e.state,this.ids=e.ids},e}(),le=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._cache={},t}ie(t,e),t.prototype.emit=function(t,n){this._cache[t]=n,e.prototype.emit.call(this,t,n)},t.prototype.getState=function(e){return this._cache[e]}}(ce),function(){function e(e){var t=e.limit,n=void 0===t?10:t,r=e.onTimeout;this.limit=10,this.timeout=null,this.limit=n,this.onTimeout=r}return e.prototype.feed=function(){this.init()},e.prototype.init=function(){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.onTimeout()}),1e3*this.limit)},e.prototype.stop=function(){this.timeout&&clearTimeout(this.timeout)},e}()),ue=(function(){function e(e){var t=void 0===e?{}:e,n=t.size,r=void 0===n?5:n,s=t.step,i=void 0===s?5:s,o=t.min,a=void 0===o?-1/0:o,c=t.max,l=void 0===c?1/0:c;this.tmp=[],this.count=0,this.value=NaN,this.size=r,this.step=i,this.min=a,this.max=l}e.prototype.filter=function(e){return e<this.min||e>this.max||(this.tmp.push(e),this.old=this.calc(e)),this.old},e.prototype.calc=function(e){if(this.tmp.length<1)return e;this.tmp.length>this.size&&this.tmp.shift();var t=this.getMostNumberOfTmp(),n=t.res,r=t.dic;return n!==e&&Math.abs(n-e)>this.step?(this.value!==e?this.count=1:this.count+=1,this.value=e,this.count>r[n]?(this.tmp.length=0,this.tmp.push(e),e):n):(this.count=0,this.value=NaN,e)},e.prototype.getMostNumberOfTmp=function(){var e,t,n,r={},s=0;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.tmp),o=i.next();!o.done;o=i.next()){var a=o.value;r[a]?r[a]+=1:r[a]=1,r[a]>s&&(s=r[a],n=a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return{res:n,dic:r}}}(),function(){function e(e){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}()),fe=n(78),he=function(){function e(e,t){this.emitter=new ce,this.subscribed=!1,this.dog=new le({limit:60,onTimeout:this.onTimeout.bind(this)}),this.strSplit=new ue("---"),this.topic=e,this.messageType=t,this.subscribed=!1,this.emitter=new ce}return e.prototype.onTimeout=function(){this.subscribed&&(this.unsubscribe(),this.subscribe())},e.prototype.onData=function(e){var t=this.strSplit.split(e.toString()).slice(-1)[0];if(t){var n=fe.parse(t);this.emitter.emit("message",n)}},e.prototype.subscribe=function(){this.subscribeChildProcess||(this.subscribed=!0,this.subscribeChildProcess=(0,W.spawn)("rostopic",["echo",this.topic]),this.subscribeChildProcess.stdout.on("data",this.onData.bind(this)),this.dog.init())},e.prototype.unsubscribe=function(){this.subscribeChildProcess||(this.dog.stop(),this.subscribed=!1,z(this.subscribeChildProcess.pid),this.subscribeChildProcess=null)},e.prototype.publish=function(e){var t=this,n=fe.stringify(e);return new Promise((function(e,r){(0,W.exec)("rostopic pub -1 ".concat(t.topic," ").concat(t.messageType,' "').concat(n,'"'),(function(t,n){t?r(t):e(n)}))}))},e}(),pe={cache:[],getTopic:function(e,t){var n=this.cache.find((function(t){return t.topic===e}));if(n)return n;var r=new he(e,t);return this.cache.push(r),r}}})(),r})()));
|
|
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,(()=>(()=>{var e={649:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=649,e.exports=t},1:e=>{"use strict";e.exports=require("cluster")},808:e=>{"use strict";e.exports=require("net")},453:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(359);const o={get binary(){return s.binaryOptions},set binary(e){Object.assign(s.binaryOptions,e)},get bool(){return s.boolOptions},set bool(e){Object.assign(s.boolOptions,e)},get int(){return s.intOptions},set int(e){Object.assign(s.intOptions,e)},get null(){return s.nullOptions},set null(e){Object.assign(s.nullOptions,e)},get str(){return s.strOptions},set str(e){Object.assign(s.strOptions,e)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:r.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]}};function c(e,t){if("1.0"===(e.version||e.options.version)){const e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];const n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,"")}`}let n=e.tagPrefixes.find((e=>0===t.indexOf(e.prefix)));if(!n){const r=e.getDefaults().tagPrefixes;n=r&&r.find((e=>0===t.indexOf(e.prefix)))}if(!n)return"!"===t[0]?t:`!<${t}>`;const r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,(e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e])));return n.handle+r}function l(e,t,n,r){const{anchors:i,schema:o}=t.doc;let a;if(!(e instanceof s.Node)){const t={aliasNodes:[],onTagObj:e=>a=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=i.getName(e.source);t||(t=i.newName(),i.map[t]=e.source)}}if(e instanceof s.Pair)return e.toString(t,n,r);a||(a=function(e,t){if(t instanceof s.Alias)return s.Alias;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,r;if(t instanceof s.Scalar){r=t.value;const s=e.filter((e=>e.identify&&e.identify(r)||e.class&&r instanceof e.class));n=s.find((e=>e.format===t.format))||s.find((e=>!e.format))}else r=t,n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass));if(!n){const e=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${e} value`)}return n}(o.tags,e));const l=function(e,t,{anchors:n,doc:r}){const s=[],i=r.anchors.getName(e);return i&&(n[i]=e,s.push(`&${i}`)),e.tag?s.push(c(r,e.tag)):t.default||s.push(c(r,t.tag)),s.join(" ")}(e,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart||0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(e,t,n,r):e instanceof s.Scalar?s.stringifyString(e,t,n,r):e.toString(t,n,r);return l?e instanceof s.Scalar||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}class u{static validAnchorNode(e){return e instanceof s.Scalar||e instanceof s.YAMLSeq||e instanceof s.YAMLMap}constructor(e){r._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new s.Alias(e)}createMergePair(...e){const t=new s.Merge;return t.value.items=e.map((e=>{if(e instanceof s.Alias){if(e.source instanceof s.YAMLMap)return e}else if(e instanceof s.YAMLMap)return this.createAlias(e);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}getName(e){const{map:t}=this;return Object.keys(t).find((n=>t[n]===e))}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);const t=Object.keys(this.map);for(let n=1;;++n){const r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){const{map:e,_cstAliases:t}=this;Object.keys(e).forEach((t=>{e[t]=e[t].resolved})),t.forEach((e=>{e.source=e.source.resolved})),delete this._cstAliases}setAnchor(e,t){if(null!=e&&!u.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(t&&/[\x00-\x19\s,[\]{}]/.test(t))throw new Error("Anchor names must not contain whitespace or control characters");const{map:n}=this,r=e&&Object.keys(n).find((t=>n[t]===e));if(r){if(!t)return r;r!==t&&(delete n[r],n[t]=e)}else{if(!t){if(!e)return null;t=this.newName()}n[t]=e}return t}}const f=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof s.Collection?(n&&(t[n]=!0),e.items.forEach((e=>f(e,t)))):e instanceof s.Pair?(f(e.key,t),f(e.value,t)):e instanceof s.Scalar&&n&&(t[n]=!0)}return t};function h({tagPrefixes:e},t){const[n,s]=t.parameters;if(!n||!s){const e="Insufficient parameters given for %TAG directive";throw new r.YAMLSemanticError(t,e)}if(e.some((e=>e.handle===n))){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new r.YAMLSemanticError(t,e)}return{handle:n,prefix:s}}function p(e,t){let[n]=t.parameters;if("YAML:1.0"===t.name&&(n="1.0"),!n){const e="Insufficient parameters given for %YAML directive";throw new r.YAMLSemanticError(t,e)}if(!a[n]){const s=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${n}`;e.warnings.push(new r.YAMLWarning(t,s))}return n}function d(e){if(e instanceof s.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class g{constructor(e){this.anchors=new u(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return d(this.contents),this.contents.add(e)}addIn(e,t){d(this.contents),this.contents.addIn(e,t)}delete(e){return d(this.contents),this.contents.delete(e)}deleteIn(e){return s.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(d(this.contents),this.contents.deleteIn(e))}getDefaults(){return g.defaults[this.version]||g.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof s.Collection?this.contents.get(e,t):void 0}getIn(e,t){return s.isEmptyPath(e)?!t&&this.contents instanceof s.Scalar?this.contents.value:this.contents:this.contents instanceof s.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof s.Collection&&this.contents.has(e)}hasIn(e){return s.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof s.Collection&&this.contents.hasIn(e)}set(e,t){d(this.contents),this.contents.set(e,t)}setIn(e,t){s.isEmptyPath(e)?this.contents=t:(d(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);const n=Object.assign({},this.getDefaults(),this.options);this.schema=new i.Schema(n)}parse(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");const{directives:n=[],contents:i=[],directivesEndMarker:o,error:a,valueRange:c}=e;if(a&&(a.source||(a.source=this),this.errors.push(a)),function(e,t,n){const s=[];let i=!1;for(const n of t){const{comment:t,name:o}=n;switch(o){case"TAG":try{e.tagPrefixes.push(h(e,n))}catch(t){e.errors.push(t)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){const t="The %YAML directive must only be given at most once per document.";e.errors.push(new r.YAMLSemanticError(n,t))}try{e.version=p(e,n)}catch(t){e.errors.push(t)}i=!0;break;default:if(o){const t=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new r.YAMLWarning(n,t))}}t&&s.push(t)}if(n&&!i&&"1.1"===(e.version||n.version||e.options.version)){const t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=n.tagPrefixes.map(t),e.version=n.version}e.commentBefore=s.join("\n")||null}(this,n,t),o&&(this.directivesEndMarker=!0),this.range=c?[c.start,c.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let i,o=!1;for(const a of t)if(a.valueRange){if(void 0!==i){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new r.YAMLSyntaxError(a,t));break}const t=s.resolveNode(e,a);o&&(t.spaceBefore=!0,o=!1),i=t}else null!==a.comment?(void 0===i?n.before:n.after).push(a.comment):a.type===r.Type.BLANK_LINE&&(o=!0,void 0===i&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]));if(e.contents=i||null,i){const t=n.before.join("\n");if(t){const e=i instanceof s.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){for(const e of this.errors)e instanceof r.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof r.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=this.contents,Object.keys(f(e,{}))).filter((e=>0!==e.indexOf(i.Schema.defaultPrefix)));var e}setTagPrefix(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){const n=this.tagPrefixes.find((t=>t.handle===e));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((t=>t.handle!==e))}toJSON(e,t){const{keepBlobsInJSON:n,mapAsMap:r,maxAliasCount:i}=this.options,o=n&&("string"!=typeof e||!(this.contents instanceof s.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!r,maxAliasCount:i,stringify:l},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));const u=s.toJSON(this.contents,e,a);if("function"==typeof t&&a.anchors)for(const{count:e,res:n}of a.anchors.values())t(n,e);return u}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");const e=this.options.indent;if(!Number.isInteger(e)||e<=0){const t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();const t=[];let n=!1;if(this.version){let e="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?e="%YAML:1.0":"1.1"===this.version&&(e="%YAML 1.1")),t.push(e),n=!0}const r=this.listNonDefaultTags();this.tagPrefixes.forEach((({handle:e,prefix:s})=>{r.some((e=>0===e.indexOf(s)))&&(t.push(`%TAG ${e} ${s}`),n=!0)})),(n||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));const i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:l};let o=!1,a=null;if(this.contents){this.contents instanceof s.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);const e=a?null:()=>o=!0,r=l(this.contents,i,(()=>a=null),e);t.push(s.addComment(r,"",a))}else void 0!==this.contents&&t.push(l(this.contents,i));return this.comment&&(o&&!a||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}r._defineProperty(g,"defaults",a),t.Document=g,t.defaultOptions={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},t.scalarOptions=o},487:(e,t)=>{"use strict";const n={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},r={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};function s(e){const t=[0];let n=e.indexOf("\n");for(;-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function i(e){let t,n;return"string"==typeof e?(t=s(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=s(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function o(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=i(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){const r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}const s=n.length;return{line:s,col:e-n[s-1]+1}}class a{static copy(e){return new a(e.start,e.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:n,end:r}=this;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;let s=t;for(;s<e.length&&!(e[s]>n);)++s;this.origStart=n+s;const i=s;for(;s<e.length&&!(e[s]>=r);)++s;return this.origEnd=r+s,i}}class c{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=c.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,r){const s=e[t];if(!s)return!0;const i=e[t-1];if(i&&"\n"!==i)return!1;if(r){if(s!==r)return!1}else if(s!==n.DIRECTIVES_END&&s!==n.DOCUMENT_END)return!1;const o=e[t+1],a=e[t+2];if(o!==s||a!==s)return!1;const c=e[t+3];return!c||"\n"===c||"\t"===c||" "===c}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,s=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===s.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;" "===n;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&"\n"!==n;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;"\t"===n||" "===n;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}static endOfBlockIndent(e,t,n){const r=c.endOfIndent(e,n);if(r>n+t)return r;{const t=c.endOfWhiteSpace(e,r),n=e[t];if(!n||"\n"===n)return t}return null}static atBlank(e,t,n){const r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}static nextNodeIsIndented(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}static normalizeOffset(e,t){const n=e[t];return n?"\n"!==n&&"\n"===e[t-1]?t-1:c.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,s=!1,i="",o=e[t+1];for(;" "===o||"\t"===o||"\n"===o;){switch(o){case"\n":r=0,t+=1,i+="\n";break;case"\t":r<=n&&(s=!0),t=c.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}o=e[t+1]}return i||(i=" "),o&&r<=n&&(s=!0),{fold:i,offset:t,error:s}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;const{src:r}=this.context,s=this.props[e];return s&&r[s.start]===t?r.slice(s.start+(n?1:0),s.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const r=this.getPropValue(t,n.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return e!==n||c.atBlank(t,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]===n.COMMENT)return!0}return!1}get hasProps(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]!==n.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[r.FLOW_MAP,r.FLOW_SEQ,r.QUOTE_DOUBLE,r.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=o(this.range.start,this.context.root);return e?{start:e,end:o(this.range.end,this.context.root)}:void 0}get rawValue(){if(!this.valueRange||!this.context)return null;const{start:e,end:t}=this.valueRange;return this.context.src.slice(e,t)}get tag(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};{const[e,n,r]=t.match(/^(.*!)([^!]*)$/);return{handle:n,suffix:r}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;const{start:e,end:t}=this.valueRange,{src:n}=this.context;for(let r=e;r<t;++r)if("\n"===n[r])return!0;return!1}parseComment(e){const{src:t}=this.context;if(t[e]===n.COMMENT){const n=c.endOfLine(t,e+1),r=new a(e,n);return this.props.push(r),n}return e}setOrigRanges(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((n=>n.setOrigRange(e,t))),t}toString(){const{context:{src:e},range:t,value:n}=this;if(null!=n)return n;const r=e.slice(t.start,t.end);return c.addStringTerminator(e,t.end,r)}}class l extends Error{constructor(e,t,n){if(!(n&&t instanceof c))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);const t=e&&o(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:n}=this.linePos.start;this.message+=` at line ${t}, column ${n}`;const r=e&&function({start:e,end:t},n,r=80){let s=function(e,t){const{lineStarts:n,src:r}=i(t);if(!n||!(e>=1)||e>n.length)return null;const s=n[e-1];let o=n[e];for(;o&&o>s&&"\n"===r[o-1];)--o;return r.slice(s,o)}(e.line,n);if(!s)return null;let{col:o}=e;if(s.length>r)if(o<=r-10)s=s.substr(0,r-1)+"…";else{const e=Math.round(r/2);s.length>o+e&&(s=s.substr(0,o+e-1)+"…"),o-=s.length-r,s="…"+s.substr(1-r)}let a=1,c="";return t&&(t.line===e.line&&o+(t.col-e.col)<=r+1?a=t.col-e.col:(a=Math.min(s.length+1,r)-o,c="…")),`${s}\n${o>1?" ".repeat(o-1):""}${"^".repeat(a)}${c}`}(this.linePos,e);r&&(this.message+=`:\n\n${r}\n`)}delete this.source}}class u extends l{constructor(e,t){super("YAMLSemanticError",e,t)}}class f extends c{static endOfLine(e,t,n){let r=e[t],s=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[s+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;s+=1,r=t}return s}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:n}=this.context;let r=n[t-1];for(;e<t&&("\n"===r||"\t"===r||" "===r);)r=n[--t-1];let s="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=c.foldNewline(n,r,-1);s+=e,r=t}else if(" "===e||"\t"===e){const i=r;let o=n[r+1];for(;r<t&&(" "===o||"\t"===o);)r+=1,o=n[r+1];"\n"!==o&&(s+=r>i?n.slice(i,r+1):e)}else s+=e}const i=n[e];switch(i){case"\t":return{errors:[new u(this,"Plain value cannot start with a tab character")],str:s};case"@":case"`":return{errors:[new u(this,`Plain value cannot start with reserved character ${i}`)],str:s};default:return s}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let s=e,i=e;for(let e=r[s];"\n"===e&&!c.atDocumentBoundary(r,s+1);e=r[s]){const e=c.endOfBlockIndent(r,t,s+1);if(null===e||"#"===r[e])break;"\n"===r[e]?s=e:(i=f.endOfLine(r,e,n),s=i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=i,i}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let s=t;const i=r[s];return i&&"#"!==i&&"\n"!==i&&(s=f.endOfLine(r,t,n)),this.valueRange=new a(t,s),s=c.endOfWhiteSpace(r,s),s=this.parseComment(s),this.hasComment&&!this.valueRange.isEmpty()||(s=this.parseBlockValue(s)),s}}t.Char=n,t.Node=c,t.PlainValue=f,t.Range=a,t.Type=r,t.YAMLError=l,t.YAMLReferenceError=class extends l{constructor(e,t){super("YAMLReferenceError",e,t)}},t.YAMLSemanticError=u,t.YAMLSyntaxError=class extends l{constructor(e,t){super("YAMLSyntaxError",e,t)}},t.YAMLWarning=class extends l{constructor(e,t){super("YAMLWarning",e,t)}},t._defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.defaultTagPrefix="tag:yaml.org,2002:",t.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}},359:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(125);const o={createNode:function(e,t,n){const r=new s.YAMLMap(e);if(t instanceof Map)for(const[s,i]of t)r.items.push(e.createPair(s,i,n));else if(t&&"object"==typeof t)for(const s of Object.keys(t))r.items.push(e.createPair(s,t[s],n));return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:s.resolveMap},a={createNode:function(e,t,n){const r=new s.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const s of t){const t=e.createNode(s,n.wrapScalars,null,n);r.items.push(t)}return r},default:!0,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:s.resolveSeq},c={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),s.stringifyString(e,t,n,r)),options:s.strOptions},l=[o,a,c],u=e=>"bigint"==typeof e||Number.isInteger(e),f=(e,t,n)=>s.intOptions.asBigInt?BigInt(e):parseInt(t,n);function h(e,t,n){const{value:r}=e;return u(r)&&r>=0?n+r.toString(t):s.stringifyNumber(e)}const p={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},d={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:s.boolOptions,stringify:({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr},g={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>f(e,t,8),options:s.intOptions,stringify:e=>h(e,8,"0o")},m={identify:u,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>f(e,e,10),options:s.intOptions,stringify:s.stringifyNumber},y={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>f(e,t,16),options:s.intOptions,stringify:e=>h(e,16,"0x")},v={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},b={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:({value:e})=>Number(e).toExponential()},w={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,n){const r=t||n,i=new s.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:s.stringifyNumber},S=l.concat([p,d,g,m,y,v,b,w]),O=e=>"bigint"==typeof e||Number.isInteger(e),E=({value:e})=>JSON.stringify(e),N=[o,a,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:E},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:E},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:E},{identify:O,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>s.intOptions.asBigInt?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:E}];N.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};const T=({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr,x=e=>"bigint"==typeof e||Number.isInteger(e);function A(e,t,n){let r=t.replace(/_/g,"");if(s.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`}const t=BigInt(r);return"-"===e?BigInt(-1)*t:t}const i=parseInt(r,n);return"-"===e?-1*i:i}function L(e,t,n){const{value:r}=e;if(x(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return s.stringifyNumber(e)}const M=l.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:s.boolOptions,stringify:T},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:s.boolOptions,stringify:T},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>A(t,n,2),stringify:e=>L(e,2,"0b")},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>A(t,n,8),stringify:e=>L(e,8,"0")},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>A(t,n,10),stringify:s.stringifyNumber},{identify:x,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>A(t,n,16),stringify:e=>L(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},{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:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const n=new s.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:s.stringifyNumber}],i.binary,i.omap,i.pairs,i.set,i.intTime,i.floatTime,i.timestamp),k={core:S,failsafe:l,json:N,yaml11:M},P={binary:i.binary,bool:d,float:w,floatExp:b,floatNaN:v,floatTime:i.floatTime,int:m,intHex:y,intOct:g,intTime:i.intTime,map:o,null:p,omap:i.omap,pairs:i.pairs,seq:a,set:i.set,timestamp:i.timestamp};const I=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class _{constructor({customTags:e,merge:t,schema:n,sortMapEntries:r,tags:s}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===r?I:r||null,!e&&s&&i.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let s=e[r.replace(/\W/g,"")];if(!s){const t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(const e of n)s=s.concat(e);else"function"==typeof n&&(s=n(s.slice()));for(let e=0;e<s.length;++e){const n=s[e];if("string"==typeof n){const r=t[n];if(!r){const e=Object.keys(t).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${e}`)}s[e]=r}}return s}(k,P,e||s,n)}createNode(e,t,n,r){const i={defaultPrefix:_.defaultPrefix,schema:this,wrapScalars:t};return function(e,t,n){if(e instanceof s.Node)return e;const{defaultPrefix:r,onTagObj:i,prevObjects:c,schema:l,wrapScalars:u}=n;t&&t.startsWith("!!")&&(t=r+t.slice(2));let f=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),r=e.find((e=>!e.format))||e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,l.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return u?new s.Scalar(e):e;f=e instanceof Map?o:e[Symbol.iterator]?a:o}i&&(i(f),delete n.onTagObj);const h={value:void 0,node:void 0};if(e&&"object"==typeof e&&c){const t=c.get(e);if(t){const e=new s.Alias(t);return n.aliasNodes.push(e),e}h.value=e,c.set(e,h)}return h.node=f.createNode?f.createNode(n.schema,e,n):u?new s.Scalar(e):e,t&&h.node instanceof s.Node&&(h.node.tag=t),h.node}(e,n,r?Object.assign(r,i):i)}createPair(e,t,n){n||(n={wrapScalars:!0});const r=this.createNode(e,n.wrapScalars,null,n),i=this.createNode(t,n.wrapScalars,null,n);return new s.Pair(r,i)}}r._defineProperty(_,"defaultPrefix",r.defaultTagPrefix),r._defineProperty(_,"defaultTags",r.defaultTags),t.Schema=_},667:(e,t,n)=>{"use strict";var r=n(24),s=n(453),i=n(359),o=n(487),a=n(125);n(314);class c extends s.Document{constructor(e){super(Object.assign({},s.defaultOptions,e))}}function l(e,t){const n=r.parse(e),s=new c(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";s.errors.unshift(new o.YAMLSemanticError(n[1],e))}return s}const u={createNode:function(e,t=!0,n){void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},s.Document.defaults[s.defaultOptions.version],s.defaultOptions);return new i.Schema(r).createNode(e,t,n)},defaultOptions:s.defaultOptions,Document:c,parse:function(e,t){const n=l(e,t);if(n.warnings.forEach((e=>a.warn(e))),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){const n=[];let s;for(const i of r.parse(e)){const e=new c(t);e.parse(i,s),n.push(e),s=e}return n},parseCST:r.parse,parseDocument:l,scalarOptions:s.scalarOptions,stringify:function(e,t){const n=new c(t);return n.contents=e,String(n)}};t.YAML=u},24:(e,t,n)=>{"use strict";var r=n(487);class s extends r.Node{constructor(){super(r.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new r.Range(t,t+1),t+1}}class i extends r.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{atLineStart:o,lineStart:a}=e;o||this.type!==r.Type.SEQ_ITEM||(this.error=new r.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const c=o?t-a:e.indent;let l=r.Node.endOfWhiteSpace(i,t+1),u=i[l];const f="#"===u,h=[];let p=null;for(;"\n"===u||"#"===u;){if("#"===u){const e=r.Node.endOfLine(i,l+1);h.push(new r.Range(l,e)),l=e}else o=!0,a=l+1,"\n"===i[r.Node.endOfWhiteSpace(i,a)]&&0===h.length&&(p=new s,a=p.parse({src:i},a)),l=r.Node.endOfIndent(i,a);u=i[l]}if(r.Node.nextNodeIsIndented(u,l-(a+c),this.type!==r.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:c,lineStart:a,parent:this},l):u&&a>t+1&&(l=a-1),this.node){if(p){const t=e.parent.items||e.parent.contents;t&&t.push(p)}h.length&&Array.prototype.push.apply(this.props,h),l=this.node.range.end}else if(f){const e=h[0];this.props.push(e),l=e.end}else l=r.Node.endOfLine(i,t+1);const d=this.node?this.node.valueRange.end:l;return this.valueRange=new r.Range(t,d),l}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:n,value:s}=this;if(null!=s)return s;const i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return r.Node.addStringTerminator(e,n.end,i)}}class o extends r.Node{constructor(){super(r.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new r.Range(t,n),n}}function a(e){let t=e;for(;t instanceof i;)t=t.node;if(!(t instanceof c))return null;const n=t.items.length;let s=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===r.Type.COMMENT){const{indent:t,lineStart:r}=n.context;if(t>0&&n.range.start>=r+t)break;s=e}else{if(n.type!==r.Type.BLANK_LINE)break;s=e}}if(-1===s)return null;const o=t.items.splice(s,n-s),a=o[0].range.start;for(;t.range.end=a,t.valueRange&&t.valueRange.end>a&&(t.valueRange.end=a),t!==e;)t=t.context.parent;return o}class c extends r.Node{static nextContentHasIndent(e,t,n){const s=r.Node.endOfLine(e,t)+1,i=e[t=r.Node.endOfWhiteSpace(e,s)];return!!i&&(t>=s+n||("#"===i||"\n"===i)&&c.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===r.Type.SEQ_ITEM?r.Type.SEQ:r.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);const n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];const t=a(e);t&&Array.prototype.push.apply(this.items,t)}get includesTrailingLines(){return this.items.length>0}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let l=r.Node.startOfLine(i,t);const u=this.items[0];u.context.parent=this,this.valueRange=r.Range.copy(u.valueRange);const f=u.range.start-u.context.lineStart;let h=t;h=r.Node.normalizeOffset(i,h);let p=i[h],d=r.Node.endOfWhiteSpace(i,l)===h,g=!1;for(;p;){for(;"\n"===p||"#"===p;){if(d&&"\n"===p&&!g){const e=new s;if(h=e.parse({src:i},h),this.valueRange.end=h,h>=i.length){p=null;break}this.items.push(e),h-=1}else if("#"===p){if(h<l+f&&!c.nextContentHasIndent(i,h,f))return h;const e=new o;if(h=e.parse({indent:f,lineStart:l,src:i},h),this.items.push(e),this.valueRange.end=h,h>=i.length){p=null;break}}if(l=h+1,h=r.Node.endOfIndent(i,l),r.Node.atBlank(i,h)){const e=r.Node.endOfWhiteSpace(i,h),t=i[e];t&&"\n"!==t&&"#"!==t||(h=e)}p=i[h],d=!0}if(!p)break;if(h!==l+f&&(d||":"!==p)){if(h<l+f){l>t&&(h=l);break}if(!this.error){const e="All collection items must start at the same column";this.error=new r.YAMLSyntaxError(this,e)}}if(u.type===r.Type.SEQ_ITEM){if("-"!==p){l>t&&(h=l);break}}else if("-"===p&&!this.error){const e=i[h+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new r.YAMLSyntaxError(this,e)}}const e=n({atLineStart:d,inCollection:!0,indent:f,lineStart:l,parent:this},h);if(!e)return h;if(this.items.push(e),this.valueRange.end=e.valueRange.end,h=r.Node.normalizeOffset(i,e.range.end),p=i[h],d=!1,g=e.includesTrailingLines,p){let e=h-1,t=i[e];for(;" "===t||"\t"===t;)t=i[--e];"\n"===t&&(l=e+1,d=!0)}const m=a(e);m&&Array.prototype.push.apply(this.items,m)}return h}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{t=n.setOrigRanges(e,t)})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;let i=e.slice(n.start,t[0].range.start)+String(t[0]);for(let e=1;e<t.length;++e){const n=t[e],{atLineStart:r,indent:s}=n.context;if(r)for(let e=0;e<s;++e)i+=" ";i+=String(n)}return r.Node.addStringTerminator(e,n.end,i)}}class l extends r.Node{constructor(){super(r.Type.DIRECTIVE),this.name=null}get parameters(){const e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){const{src:t}=this.context;let n=e,r=t[n];for(;r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}parseParameters(e){const{src:t}=this.context;let n=e,s=t[n];for(;s&&"\n"!==s&&"#"!==s;)s=t[n+=1];return this.valueRange=new r.Range(e,n),n}parse(e,t){this.context=e;let n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new r.Range(t,n),n}}class u extends r.Node{static startCommentOrEndBlankLine(e,t){const n=r.Node.endOfWhiteSpace(e,t),s=e[n];return"#"===s||"\n"===s?n:t}constructor(){super(r.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){const{src:t}=this.context;this.directives=[];let n=!0,i=!1,a=e;for(;!r.Node.atDocumentBoundary(t,a,r.Char.DIRECTIVES_END);)switch(a=u.startCommentOrEndBlankLine(t,a),t[a]){case"\n":if(n){const e=new s;a=e.parse({src:t},a),a<t.length&&this.directives.push(e)}else a+=1,n=!0;break;case"#":{const e=new o;a=e.parse({src:t},a),this.directives.push(e),n=!1}break;case"%":{const e=new l;a=e.parse({parent:this,src:t},a),this.directives.push(e),i=!0,n=!1}break;default:return i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a}return t[a]?(this.directivesEndMarker=new r.Range(a,a+3),a+3):(i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let i=e;for(;"-"===n[i-1];)i-=1;let c=r.Node.endOfWhiteSpace(n,e),l=i===e;for(this.valueRange=new r.Range(c);!r.Node.atDocumentBoundary(n,c,r.Char.DOCUMENT_END);){switch(n[c]){case"\n":if(l){const e=new s;c=e.parse({src:n},c),c<n.length&&this.contents.push(e)}else c+=1,l=!0;i=c;break;case"#":{const e=new o;c=e.parse({src:n},c),this.contents.push(e),l=!1}break;default:{const e=r.Node.endOfIndent(n,c),s=t({atLineStart:l,indent:-1,inFlow:!1,inCollection:!1,lineStart:i,parent:this},e);if(!s)return this.valueRange.end=e;this.contents.push(s),c=s.range.end,l=!1;const o=a(s);o&&Array.prototype.push.apply(this.contents,o)}}c=u.startCommentOrEndBlankLine(n,c)}if(this.valueRange.end=c,n[c]&&(this.documentEndMarker=new r.Range(c,c+3),c+=3,n[c])){if(c=r.Node.endOfWhiteSpace(n,c),"#"===n[c]){const e=new o;c=e.parse({src:n},c),this.contents.push(e)}switch(n[c]){case"\n":c+=1;break;case void 0:break;default:this.error=new r.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return c}parse(e,t){e.root=this,this.context=e;const{src:n}=e;let r=65279===n.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),r=this.parseContents(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.directives.forEach((n=>{t=n.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((n=>{t=n.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){const{contents:e,directives:t,value:n}=this;if(null!=n)return n;let s=t.join("");return e.length>0&&((t.length>0||e[0].type===r.Type.COMMENT)&&(s+="---\n"),s+=e.join("")),"\n"!==s[s.length-1]&&(s+="\n"),s}}class f extends r.Node{parse(e,t){this.context=e;const{src:n}=e;let s=r.Node.endOfIdentifier(n,t+1);return this.valueRange=new r.Range(t+1,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}const h="KEEP",p="STRIP";class d extends r.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping="CLIP",this.header=null}get includesTrailingLines(){return this.chomping===h}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[t-1];for(;"\n"===o||"\t"===o||" "===o;){if(t-=1,t<=e){if(this.chomping===h)break;return""}"\n"===o&&(i=t),o=s[t-1]}let a=t+1;i&&(this.chomping===h?(a=i,t=this.valueRange.end):t=i);const c=n+this.blockIndent,l=this.type===r.Type.BLOCK_FOLDED;let u=!0,f="",d="",g=!1;for(let n=e;n<t;++n){for(let e=0;e<c&&" "===s[n];++e)n+=1;const e=s[n];if("\n"===e)"\n"===d?f+="\n":d="\n";else{const i=r.Node.endOfLine(s,n),o=s.slice(n,i);n=i,l&&(" "===e||"\t"===e)&&n<a?(" "===d?d="\n":g||u||"\n"!==d||(d="\n\n"),f+=d+o,d=i<t&&s[i]||"",g=!0):(f+=d+o,d=l&&n<a?" ":"\n",g=!1),u&&""!==o&&(u=!1)}}return this.chomping===p?f:f+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,s="";for(;;){const i=t[n];switch(i){case"-":this.chomping=p;break;case"+":this.chomping=h;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new r.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,s=!!this.blockIndent;let i=e,o=e,a=1;for(let e=n[i];"\n"===e&&(i+=1,!r.Node.atDocumentBoundary(n,i));e=n[i]){const e=r.Node.endOfBlockIndent(n,t,i);if(null===e)break;const c=n[e],l=e-(i+t);if(this.blockIndent){if(c&&"\n"!==c&&l<this.blockIndent){if("#"===n[e])break;if(!this.error){const e="Block scalars must not be less indented than their "+(s?"explicit indentation indicator":"first line");this.error=new r.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(l<a){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new r.YAMLSemanticError(this,e)}this.blockIndent=l}else l>a&&(a=l);i="\n"===n[e]?e:o=r.Node.endOfLine(n,e)}return this.chomping!==h&&(i=n[o]?o+1:o),this.valueRange=new r.Range(e+1,i),i}parse(e,t){this.context=e;const{src:n}=e;let s=this.parseBlockHeader(t);return s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class g extends r.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(e=this.items.length){const t=this.items[e-1];return!!t&&(t.jsonLike||t.type===r.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{indent:a,lineStart:c}=e,l=i[t];this.items=[{char:l,offset:t}];let u=r.Node.endOfWhiteSpace(i,t+1);for(l=i[u];l&&"]"!==l&&"}"!==l;){switch(l){case"\n":if(c=u+1,"\n"===i[r.Node.endOfWhiteSpace(i,c)]){const e=new s;c=e.parse({src:i},c),this.items.push(e)}if(u=r.Node.endOfIndent(i,c),u<=c+a&&(l=i[u],u<c+a||"]"!==l&&"}"!==l)){const e="Insufficient indentation in flow collection";this.error=new r.YAMLSemanticError(this,e)}break;case",":this.items.push({char:l,offset:u}),u+=1;break;case"#":{const e=new o;u=e.parse({src:i},u),this.items.push(e)}break;case"?":case":":{const e=i[u+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===l&&this.prevNodeIsJsonLike()){this.items.push({char:l,offset:u}),u+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:c,parent:this},u);if(!e)return this.valueRange=new r.Range(t,u),u;this.items.push(e),u=r.Node.normalizeOffset(i,e.range.end)}}u=r.Node.endOfWhiteSpace(i,u),l=i[u]}return this.valueRange=new r.Range(t,u+1),l&&(this.items.push({char:l,offset:u}),u=r.Node.endOfWhiteSpace(i,u+1),u=this.parseComment(u)),u}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{if(n instanceof r.Node)t=n.setOrigRanges(e,t);else if(0===e.length)n.origOffset=n.offset;else{let r=t;for(;r<e.length&&!(e[r]>n.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;const i=t.filter((e=>e instanceof r.Node));let o="",a=n.start;return i.forEach((t=>{const n=e.slice(a,t.range.start);a=t.range.end,o+=n+String(t),"\n"===o[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,n.end),r.Node.addStringTerminator(e,n.end,o)}}class m extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;'"'!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="";break;case"b":o+="\b";break;case"e":o+="";break;case"f":o+="\f";break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":case"\t":o+="\t";break;case"v":o+="\v";break;case"N":o+="
";break;case"_":o+=" ";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case"\n":for(;" "===i[a+1]||"\t"===i[a+1];)a+=1;break;default:e.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,t,n){const{src:s}=this.context,i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,t+2)}`)),s.substr(e-2,t+2)):String.fromCodePoint(o)}parse(e,t){this.context=e;const{src:n}=e;let s=m.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class y extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;"'"!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)o+=t,a+=1,"'"!==i[a]&&e.push(new r.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parse(e,t){this.context=e;const{src:n}=e;let s=y.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class v{static parseType(e,t,n){switch(e[t]){case"*":return r.Type.ALIAS;case">":return r.Type.BLOCK_FOLDED;case"|":return r.Type.BLOCK_LITERAL;case"{":return r.Type.FLOW_MAP;case"[":return r.Type.FLOW_SEQ;case"?":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_KEY:r.Type.PLAIN;case":":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_VALUE:r.Type.PLAIN;case"-":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.SEQ_ITEM:r.Type.PLAIN;case'"':return r.Type.QUOTE_DOUBLE;case"'":return r.Type.QUOTE_SINGLE;default:return r.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:n,inFlow:s,indent:o,lineStart:a,parent:l}={}){r._defineProperty(this,"parseNode",((e,t)=>{if(r.Node.atDocumentBoundary(this.src,t))return null;const n=new v(this,e),{props:s,type:o,valueStart:a}=n.parseProps(t),l=function(e,t){switch(e){case r.Type.ALIAS:return new f(e,t);case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return new d(e,t);case r.Type.FLOW_MAP:case r.Type.FLOW_SEQ:return new g(e,t);case r.Type.MAP_KEY:case r.Type.MAP_VALUE:case r.Type.SEQ_ITEM:return new i(e,t);case r.Type.COMMENT:case r.Type.PLAIN:return new r.PlainValue(e,t);case r.Type.QUOTE_DOUBLE:return new m(e,t);case r.Type.QUOTE_SINGLE:return new y(e,t);default:return null}}(o,s);let u=l.parse(n,a);if(l.range=new r.Range(t,u),u<=t&&(l.error=new Error("Node#parse consumed no characters"),l.error.parseEnd=u,l.error.source=l,l.range.end=t+1),n.nodeStartsCollection(l)){l.error||n.atLineStart||n.parent.type!==r.Type.DOCUMENT||(l.error=new r.YAMLSyntaxError(l,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new c(l);return u=e.parse(new v(n),u),e.range=new r.Range(t,u),e}return l})),this.atLineStart=null!=t?t:e.atLineStart||!1,this.inCollection=null!=n?n:e.inCollection||!1,this.inFlow=null!=s?s:e.inFlow||!1,this.indent=null!=o?o:e.indent,this.lineStart=null!=a?a:e.lineStart,this.parent=null!=l?l:e.parent||{},this.root=e.root,this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:n,src:s}=this;if(t||n)return!1;if(e instanceof i)return!0;let o=e.range.end;return"\n"!==s[o]&&"\n"!==s[o-1]&&(o=r.Node.endOfWhiteSpace(s,o),":"===s[o])}parseProps(e){const{inFlow:t,parent:n,src:s}=this,i=[];let o=!1,a=s[e=this.atLineStart?r.Node.endOfIndent(s,e):r.Node.endOfWhiteSpace(s,e)];for(;a===r.Char.ANCHOR||a===r.Char.COMMENT||a===r.Char.TAG||"\n"===a;){if("\n"===a){let t,i=e;do{t=i+1,i=r.Node.endOfIndent(s,t)}while("\n"===s[i]);const a=i-(t+this.indent),c=n.type===r.Type.SEQ_ITEM&&n.context.atLineStart;if("#"!==s[i]&&!r.Node.nextNodeIsIndented(s[i],a,!c))break;this.atLineStart=!0,this.lineStart=t,o=!1,e=i}else if(a===r.Char.COMMENT){const t=r.Node.endOfLine(s,e+1);i.push(new r.Range(e,t)),e=t}else{let t=r.Node.endOfIdentifier(s,e+1);a===r.Char.TAG&&","===s[t]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,t+13))&&(t=r.Node.endOfIdentifier(s,t+5)),i.push(new r.Range(e,t)),o=!0,e=r.Node.endOfWhiteSpace(s,t)}a=s[e]}return o&&":"===a&&r.Node.atBlank(s,e+1,!0)&&(e-=1),{props:i,type:v.parseType(s,e,t),valueStart:e}}}t.parse=function(e){const t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,((e,n)=>(e.length>1&&t.push(n),"\n"))));const n=[];let r=0;do{const t=new u,s=new v({src:e});r=t.parse(s,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(0===t.length)return!1;for(let e=1;e<t.length;++e)t[e]-=e;let e=0;for(let r=0;r<n.length;++r)e=n[r].setOrigRanges(t,e);return t.splice(0,t.length),!0},n.toString=()=>n.join("...\n"),n}},314:(e,t,n)=>{"use strict";var r=n(487);function s(e,t,n){return n?-1===n.indexOf("\n")?`${e} #${n}`:`${e}\n`+n.replace(/^/gm,`${t||""}#`):e}class i{}function o(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>o(e,String(t),n)));if(e&&"function"==typeof e.toJSON){const r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});const s=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(s),s}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}class a extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:o(this.value,e,t)}toString(){return String(this.value)}}function c(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if(Number.isInteger(n)&&n>=0){const e=[];e[n]=r,r=e}else{const e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}const l=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class u extends i{constructor(e){super(),r._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(l(e))this.add(t);else{const[n,...r]=e,s=this.get(n,!0);if(s instanceof u)s.addIn(r,t);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,c(this.schema,r,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(n instanceof u)return n.deleteIn(t);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],n){const r=this.get(e,!0);return 0===t.length?!n&&r instanceof a?r.value:r:r instanceof u?r.getIn(t,n):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof a&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([e,...t]){if(0===t.length)return this.has(e);const n=this.get(e,!0);return n instanceof u&&n.hasIn(t)}setIn([e,...t],n){if(0===t.length)this.set(e,n);else{const r=this.get(e,!0);if(r instanceof u)r.setIn(t,n);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`);this.set(e,c(this.schema,t,n))}}}toJSON(){return null}toString(e,{blockItem:t,flowChars:n,isMap:i,itemIndent:o},a,c){const{indent:l,indentStep:f,stringify:h}=e,p=this.type===r.Type.FLOW_MAP||this.type===r.Type.FLOW_SEQ||e.inFlow;p&&(o+=f);const d=i&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:o,inFlow:p,type:null});let g=!1,m=!1;const y=this.items.reduce(((t,n,r)=>{let i;n&&(!g&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((e=>{t.push({type:"comment",str:`#${e}`})})),n.comment&&(i=n.comment),p&&(!g&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(m=!0)),g=!1;let a=h(n,e,(()=>i=null),(()=>g=!0));return p&&!m&&a.includes("\n")&&(m=!0),p&&r<this.items.length-1&&(a+=","),a=s(a,o,i),g&&(i||p)&&(g=!1),t.push({type:"item",str:a}),t}),[]);let v;if(0===y.length)v=n.start+n.end;else if(p){const{start:e,end:t}=n,r=y.map((e=>e.str));if(m||r.reduce(((e,t)=>e+t.length+2),2)>u.maxFlowStringSingleLineLength){v=e;for(const e of r)v+=e?`\n${f}${l}${e}`:"\n";v+=`\n${l}${t}`}else v=`${e} ${r.join(" ")} ${t}`}else{const e=y.map(t);v=e.shift();for(const t of e)v+=t?`\n${l}${t}`:"\n"}return this.comment?(v+="\n"+this.comment.replace(/^/gm,`${l}#`),a&&a()):g&&c&&c(),v}}function f(e){let t=e instanceof a?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}r._defineProperty(u,"maxFlowStringSingleLineLength",60);class h extends u{add(e){this.items.push(e)}delete(e){const t=f(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=f(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof a?r.value:r}has(e){const t=f(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=f(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);this.items[n]=t}toJSON(e,t){const n=[];t&&t.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}class p extends i{constructor(e,t=null){super(),this.key=e,this.value=t,this.type=p.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new a(null)),!(this.key instanceof i))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}addToJSMap(e,t){const n=o(this.key,"",e);if(t instanceof Map){const r=o(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{const r=((e,t,n)=>null===t?"":"object"!=typeof t?String(t):e instanceof i&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t))(this.key,n,e),s=o(this.value,r,e);r in t?Object.defineProperty(t,r,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[r]=s}return t}toJSON(e,t){const n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,t,n){if(!e||!e.doc)return JSON.stringify(this);const{indent:o,indentSeq:c,simpleKeys:l}=e.doc.options;let{key:f,value:p}=this,d=f instanceof i&&f.comment;if(l){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(f instanceof u)throw new Error("With simple keys, collection cannot be used as a key value")}let g=!l&&(!f||d||(f instanceof i?f instanceof u||f.type===r.Type.BLOCK_FOLDED||f.type===r.Type.BLOCK_LITERAL:"object"==typeof f));const{doc:m,indent:y,indentStep:v,stringify:b}=e;e=Object.assign({},e,{implicitKey:!g,indent:y+v});let w=!1,S=b(f,e,(()=>d=null),(()=>w=!0));if(S=s(S,e.indent,d),!g&&S.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(e.allNullValues&&!l)return this.comment?(S=s(S,e.indent,this.comment),t&&t()):w&&!d&&n&&n(),e.inFlow&&!g?S:`? ${S}`;S=g?`? ${S}\n${y}:`:`${S}:`,this.comment&&(S=s(S,e.indent,this.comment),t&&t());let O="",E=null;p instanceof i?(p.spaceBefore&&(O="\n"),p.commentBefore&&(O+=`\n${p.commentBefore.replace(/^/gm,`${e.indent}#`)}`),E=p.comment):p&&"object"==typeof p&&(p=m.schema.createNode(p,!0)),e.implicitKey=!1,!g&&!this.comment&&p instanceof a&&(e.indentAtStart=S.length+1),w=!1,!c&&o>=2&&!e.inFlow&&!g&&p instanceof h&&p.type!==r.Type.FLOW_SEQ&&!p.tag&&!m.anchors.getName(p)&&(e.indent=e.indent.substr(2));const N=b(p,e,(()=>E=null),(()=>w=!0));let T=" ";return O||this.comment?T=`${O}\n${e.indent}`:!g&&p instanceof u?("["===N[0]||"{"===N[0])&&!N.includes("\n")||(T=`\n${e.indent}`):"\n"===N[0]&&(T=""),w&&!E&&n&&n(),s(S+T+N,e.indent,E)}}r._defineProperty(p,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const d=(e,t)=>{if(e instanceof g){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof u){let n=0;for(const r of e.items){const e=d(r,t);e>n&&(n=e)}return n}if(e instanceof p){const n=d(e.key,t),r=d(e.value,t);return Math.max(n,r)}return 1};class g extends i{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:s,inStringifyKey:i}){let o=Object.keys(n).find((e=>n[e]===t));if(!o&&i&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${s?" ":""}`;const a=r.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=r.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return o(this.source,e,t);const{anchors:n,maxAliasCount:s}=t,i=n.get(this.source);if(!i||void 0===i.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(s>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=d(this.source,n)),i.count*i.aliasCount>s)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return i.res}toString(e){return g.stringify(this,e)}}function m(e,t){const n=t instanceof a?t.value:t;for(const r of e)if(r instanceof p){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}r._defineProperty(g,"default",!0);class y extends u{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);const n=m(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error(`Key ${e.key} already set`);n.value=e.value}else if(r){const t=this.items.findIndex((t=>r(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){const t=m(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=m(this.items,e),r=n&&n.value;return!t&&r instanceof a?r.value:r}has(e){return!!m(this.items,e)}set(e,t){this.add(new p(e,t),!0)}toJSON(e,t,n){const r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);for(const e of this.items)e.addToJSMap(t,r);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!(e instanceof p))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}class v extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof h||(t=new h,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new a("<<"),new h);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof y))throw new Error("Merge sources must be maps");const r=n.toJSON(null,e,Map);for(const[e,n]of r)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}toString(e,t){const n=this.value;if(n.items.length>1)return super.toString(e,t);this.value=n.items[0];const r=super.toString(e,t);return this.value=n,r}}const b={defaultType:r.Type.BLOCK_LITERAL,lineWidth:76},w={defaultType:r.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function S(e,t,n){for(const{format:n,test:r,resolve:s}of t)if(r){const t=e.match(r);if(t){let e=s.apply(null,t);return e instanceof a||(e=new a(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new a(e)}const O="flow",E="block",N="quoted",T=(e,t)=>{let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function x(e,t,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return e;const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const l=[],u={};let f,h,p=s-t.length;"number"==typeof r&&(r>s-Math.max(2,i)?l.push(0):p=s-r);let d=!1,g=-1,m=-1,y=-1;n===E&&(g=T(e,g),-1!==g&&(p=g+c));for(let t;t=e[g+=1];){if(n===N&&"\\"===t){switch(m=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if("\n"===t)n===E&&(g=T(e,g)),p=g+c,f=void 0;else{if(" "===t&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[g+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=g)}if(g>=p)if(f)l.push(f),p=f+c,f=void 0;else if(n===N){for(;" "===h||"\t"===h;)h=t,t=e[g+=1],d=!0;const n=g>y+1?g-2:m-1;if(u[n])return e;l.push(n),u[n]=!0,p=n+c,f=void 0}else d=!0}h=t}if(d&&a&&a(),0===l.length)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){const s=l[r],i=l[r+1]||e.length;0===s?v=`\n${t}${e.slice(0,i)}`:(n===N&&u[s]&&(v+=`${e[s]}\\`),v+=`\n${t}${e.slice(s+1,i)}`)}return v}const A=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},w.fold):w.fold,L=e=>/^(%|---|\.\.\.)/m.test(e);function M(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:s}=w.doubleQuoted,i=JSON.stringify(e);if(r)return i;const o=t.indent||(L(e)?" ":"");let a="",c=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(a+=i.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{a+=i.slice(c,e);const t=i.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=i.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===i[e+2]||i.length<s)e+=1;else{for(a+=i.slice(c,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)a+="\n",e+=2;a+=o," "===i[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+i.slice(c):i,n?a:x(a,o,N,A(t))}function k(e,t){if(t.implicitKey){if(/\n/.test(e))return M(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return M(e,t);const n=t.indent||(L(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:x(r,n,O,A(t))}function P({comment:e,type:t,value:n},s,i,o){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return M(n,s);const a=s.indent||(s.forceBlockIndent||L(n)?" ":""),c=a?"2":"1",l=t!==r.Type.BLOCK_FOLDED&&(t===r.Type.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(n,w.fold.lineWidth,a.length));let u=l?"|":">";if(!n)return u+"\n";let f="",h="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?u+="-":n!==e&&t===e.length-1||(u+="+",o&&o()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(u+=c);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(u+=" #"+e.replace(/ ?[\r\n]+/g," "),i&&i()),!n)return`${u}${c}\n${a}${h}`;if(l)return n=n.replace(/\n+/g,`$&${a}`),`${u}\n${a}${f}${n}${h}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const p=x(`${f}${n}${h}`,a,E,w.fold);return`${u}\n${a}${p}`}function I(e,t){let n,s,i;switch(t.type){case r.Type.FLOW_MAP:n="}",s="flow map";break;case r.Type.FLOW_SEQ:n="]",s="flow sequence";break;default:return void e.push(new r.YAMLSemanticError(t,"Not a flow collection!?"))}for(let e=t.items.length-1;e>=0;--e){const n=t.items[e];if(!n||n.type!==r.Type.COMMENT){i=n;break}}if(i&&i.char!==n){const o=`Expected ${s} to end with ${n}`;let a;"number"==typeof i.offset?(a=new r.YAMLSemanticError(t,o),a.offset=i.offset+1):(a=new r.YAMLSemanticError(i,o),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function _(e,t){const n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}}function C(e,t){const n=String(t),s=n.substr(0,8)+"..."+n.substr(-8);return new r.YAMLSemanticError(e,`The "${s}" key is too long`)}function $(e,t){for(const{afterKey:n,before:r,comment:s}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===s?!n&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+s:t.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}function R(e,t){const n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((n=>{n.source||(n.source=t),e.errors.push(n)})),n.str):""}function B(e,t,n){const{tags:r}=e.schema,s=[];for(const i of r)if(i.tag===n){if(!i.test){const n=i.resolve(e,t);return n instanceof u?n:new a(n)}s.push(i)}const i=R(e,t);return"string"==typeof i&&s.length>0?S(i,s,r.scalarFallback):null}const Y=e=>{if(!e)return!1;const{type:t}=e;return t===r.Type.MAP_KEY||t===r.Type.MAP_VALUE||t===r.Type.SEQ_ITEM};function j(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:s,hasTag:i}=function(e,t){const n={before:[],after:[]};let s=!1,i=!1;const o=Y(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:a,end:c}of o)switch(t.context.src[a]){case r.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(a)){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}const{header:s,valueRange:i}=t;(i&&(a>i.start||s&&a>s.start)?n.after:n.before).push(t.context.src.slice(a+1,c));break}case r.Char.ANCHOR:if(s){const n="A node can have at most one anchor";e.push(new r.YAMLSemanticError(t,n))}s=!0;break;case r.Char.TAG:if(i){const n="A node can have at most one tag";e.push(new r.YAMLSemanticError(t,n))}i=!0}return{comments:n,hasAnchor:s,hasTag:i}}(e.errors,t);if(s){const{anchors:n}=e,r=t.anchor,s=n.getNode(r);s&&(n.map[n.newName(r)]=s),n.map[r]=t}if(t.type===r.Type.ALIAS&&(s||i)){const n="An alias node must not specify any properties";e.errors.push(new r.YAMLSemanticError(t,n))}const o=function(e,t){const{anchors:n,errors:s,schema:i}=e;if(t.type===r.Type.ALIAS){const e=t.rawValue,i=n.getNode(e);if(!i){const n=`Aliased anchor not found: ${e}`;return s.push(new r.YAMLReferenceError(t,n)),null}const o=new g(i);return n._cstAliases.push(o),o}const o=function(e,t){const{tag:n,type:s}=t;let i=!1;if(n){const{handle:s,suffix:o,verbatim:a}=n;if(a){if("!"!==a&&"!!"!==a)return a;const n=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new r.YAMLSemanticError(t,n))}else if("!"!==s||o)try{return function(e,t){const{handle:n,suffix:s}=t.tag;let i=e.tagPrefixes.find((e=>e.handle===n));if(!i){const s=e.getDefaults().tagPrefixes;if(s&&(i=s.find((e=>e.handle===n))),!i)throw new r.YAMLSemanticError(t,`The ${n} tag handle is non-default and was not declared.`)}if(!s)throw new r.YAMLSemanticError(t,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===s[0])return e.warnings.push(new r.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),s;if(/[:/]/.test(s)){const e=s.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${s}`}}return i.prefix+decodeURIComponent(s)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(s){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:case r.Type.QUOTE_DOUBLE:case r.Type.QUOTE_SINGLE:return r.defaultTags.STR;case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;case r.Type.PLAIN:return i?r.defaultTags.STR:null;default:return null}}(e,t);if(o)return function(e,t,n){try{const r=B(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{const s=function({type:e}){switch(e){case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;default:return r.defaultTags.STR}}(t);if(!s)throw new Error(`The tag ${n} is unavailable`);const i=`The tag ${n} is unavailable, falling back to ${s}`;e.warnings.push(new r.YAMLWarning(t,i));const o=B(e,t,s);return o.tag=n,o}catch(n){const s=new r.YAMLReferenceError(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}(e,t,o);if(t.type!==r.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;return s.push(new r.YAMLSyntaxError(t,e)),null}try{return S(R(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),s.push(e),null}}(e,t);if(o){o.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(o.cstNode=t),e.options.keepNodeTypes&&(o.type=t.type);const r=n.before.join("\n");r&&(o.commentBefore=o.commentBefore?`${o.commentBefore}\n${r}`:r);const s=n.after.join("\n");s&&(o.comment=o.comment?`${o.comment}\n${s}`:s)}return t.resolved=o}const D=({context:{lineStart:e,node:t,src:n},props:s})=>{if(0===s.length)return!1;const{start:i}=s[0];if(t&&i>t.valueRange.start)return!1;if(n[i]!==r.Char.COMMENT)return!1;for(let t=e;t<i;++t)if("\n"===n[t])return!1;return!0};function F(e,t){if(!D(e))return;const n=e.getPropValue(0,r.Char.COMMENT,!0);let s=!1;const i=t.value.commentBefore;if(i&&i.startsWith(n))t.value.commentBefore=i.substr(n.length+1),s=!0;else{const r=t.value.comment;!e.node&&r&&r.startsWith(n)&&(t.value.comment=r.substr(n.length+1),s=!0)}s&&(t.comment=n)}t.Alias=g,t.Collection=u,t.Merge=v,t.Node=i,t.Pair=p,t.Scalar=a,t.YAMLMap=y,t.YAMLSeq=h,t.addComment=s,t.binaryOptions=b,t.boolOptions={trueStr:"true",falseStr:"false"},t.findPair=m,t.intOptions={asBigInt:!1},t.isEmptyPath=l,t.nullOptions={nullStr:"null"},t.resolveMap=function(e,t){if(t.type!==r.Type.MAP&&t.type!==r.Type.FLOW_MAP){const n=`A ${t.type} node cannot be resolved as a mapping`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_MAP?function(e,t){const n=[],s=[];let i,o=!1,a="{";for(let c=0;c<t.items.length;++c){const l=t.items[c];if("string"==typeof l.char){const{char:n,offset:u}=l;if("?"===n&&void 0===i&&!o){o=!0,a=":";continue}if(":"===n){if(void 0===i&&(i=null),":"===a){a=",";continue}}else if(o&&(void 0===i&&","!==n&&(i=null),o=!1),void 0!==i&&(s.push(new p(i)),i=void 0,","===n)){a=":";continue}if("}"===n){if(c===t.items.length-1)continue}else if(n===a){a=":";continue}const f=`Flow map contains an unexpected ${n}`,h=new r.YAMLSyntaxError(t,f);h.offset=u,e.errors.push(h)}else l.type===r.Type.BLANK_LINE?n.push({afterKey:!!i,before:s.length}):l.type===r.Type.COMMENT?(_(e.errors,l),n.push({afterKey:!!i,before:s.length,comment:l.comment})):void 0===i?(","===a&&e.errors.push(new r.YAMLSemanticError(l,"Separator , missing in flow map")),i=j(e,l)):(","!==a&&e.errors.push(new r.YAMLSemanticError(l,"Indicator : missing in flow map entry")),s.push(new p(i,j(e,l))),i=void 0,o=!1)}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];let i,o=null;for(let a=0;a<t.items.length;++a){const c=t.items[a];switch(c.type){case r.Type.BLANK_LINE:n.push({afterKey:!!i,before:s.length});break;case r.Type.COMMENT:n.push({afterKey:!!i,before:s.length,comment:c.comment});break;case r.Type.MAP_KEY:void 0!==i&&s.push(new p(i)),c.error&&e.errors.push(c.error),i=j(e,c.node),o=null;break;case r.Type.MAP_VALUE:{if(void 0===i&&(i=null),c.error&&e.errors.push(c.error),!c.context.atLineStart&&c.node&&c.node.type===r.Type.MAP&&!c.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new r.YAMLSemanticError(c.node,t))}let n=c.node;if(!n&&c.props.length>0){n=new r.PlainValue(r.Type.PLAIN,[]),n.context={parent:c,src:c.context.src};const e=c.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof c.range.origStart){const e=c.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const a=new p(i,j(e,n));F(c,a),s.push(a),i&&"number"==typeof o&&c.range.start>o+1024&&e.errors.push(C(t,i)),i=void 0,o=null}break;default:void 0!==i&&s.push(new p(i)),i=j(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let n=a+1;;++n){const s=t.items[n];switch(s&&s.type){case r.Type.BLANK_LINE:case r.Type.COMMENT:continue e;case r.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new r.YAMLSemanticError(c,t));break e}}}if(c.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new r.YAMLSemanticError(c,t))}}}return void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t),i=new y;i.items=s,$(i,n);let o=!1;for(let n=0;n<s.length;++n){const{key:i}=s[n];if(i instanceof u&&(o=!0),e.schema.merge&&i&&"<<"===i.value){s[n]=new v(s[n]);const i=s[n].value.items;let o=null;i.some((e=>{if(e instanceof g){const{type:t}=e.source;return t!==r.Type.MAP&&t!==r.Type.FLOW_MAP&&(o="Merge nodes aliases can only point to maps")}return o="Merge nodes can only have Alias nodes as values"})),o&&e.errors.push(new r.YAMLSemanticError(t,o))}else for(let o=n+1;o<s.length;++o){const{key:n}=s[o];if(i===n||i&&n&&Object.prototype.hasOwnProperty.call(i,"value")&&i.value===n.value){const n=`Map keys must be unique; "${i}" is repeated`;e.errors.push(new r.YAMLSemanticError(t,n));break}}}if(o&&!e.options.mapAsMap){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveNode=j,t.resolveSeq=function(e,t){if(t.type!==r.Type.SEQ&&t.type!==r.Type.FLOW_SEQ){const n=`A ${t.type} node cannot be resolved as a sequence`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_SEQ?function(e,t){const n=[],s=[];let i,o=!1,a=null,c="[",l=null;for(let u=0;u<t.items.length;++u){const f=t.items[u];if("string"==typeof f.char){const{char:n,offset:h}=f;if(":"===n||!o&&void 0===i||(o&&void 0===i&&(i=c?s.pop():null),s.push(new p(i)),o=!1,i=void 0,a=null),n===c)c=null;else if(c||"?"!==n){if("["!==c&&":"===n&&void 0===i){if(","===c){if(i=s.pop(),i instanceof p){const n="Chaining flow sequence pairs is invalid",s=new r.YAMLSemanticError(t,n);s.offset=h,e.errors.push(s)}if(!o&&"number"==typeof a){const n=f.range?f.range.start:f.offset;n>a+1024&&e.errors.push(C(t,i));const{src:s}=l.context;for(let t=a;t<n;++t)if("\n"===s[t]){const t="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new r.YAMLSemanticError(l,t));break}}}else i=null;a=null,o=!1,c=null}else if("["===c||"]"!==n||u<t.items.length-1){const s=`Flow sequence contains an unexpected ${n}`,i=new r.YAMLSyntaxError(t,s);i.offset=h,e.errors.push(i)}}else o=!0}else if(f.type===r.Type.BLANK_LINE)n.push({before:s.length});else if(f.type===r.Type.COMMENT)_(e.errors,f),n.push({comment:f.comment,before:s.length});else{if(c){const t=`Expected a ${c} in flow sequence`;e.errors.push(new r.YAMLSemanticError(f,t))}const t=j(e,f);void 0===i?(s.push(t),l=f):(s.push(new p(i,t)),i=void 0),a=f.range.start,c=","}}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];for(let i=0;i<t.items.length;++i){const o=t.items[i];switch(o.type){case r.Type.BLANK_LINE:n.push({before:s.length});break;case r.Type.COMMENT:n.push({comment:o.comment,before:s.length});break;case r.Type.SEQ_ITEM:if(o.error&&e.errors.push(o.error),s.push(j(e,o.node)),o.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new r.YAMLSemanticError(o,t))}break;default:o.error&&e.errors.push(o.error),e.errors.push(new r.YAMLSyntaxError(o,`Unexpected ${o.type} node in sequence`))}}return{comments:n,items:s}}(e,t),i=new h;if(i.items=s,$(i,n),!e.options.mapAsMap&&s.some((e=>e instanceof p&&e.key instanceof u))){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveString=R,t.strOptions=w,t.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let n=t-(s.length-e-1);for(;n-- >0;)s+="0"}return s},t.stringifyString=function(e,t,n,s){const{defaultType:i}=w,{implicitKey:o,inFlow:a}=t;let{type:c,value:l}=e;"string"!=typeof l&&(l=String(l),e=Object.assign({},e,{value:l}));const u=i=>{switch(i){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return P(e,t,n,s);case r.Type.QUOTE_DOUBLE:return M(l,t);case r.Type.QUOTE_SINGLE:return k(l,t);case r.Type.PLAIN:return function(e,t,n,s){const{comment:i,type:o,value:a}=e,{actualString:c,implicitKey:l,indent:u,inFlow:f}=t;if(l&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return M(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return l||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?k(a,t):M(a,t):P(e,t,n,s);if(!l&&!f&&o!==r.Type.PLAIN&&-1!==a.indexOf("\n"))return P(e,t,n,s);if(""===u&&L(a))return t.forceBlockIndent=!0,P(e,t,n,s);const h=a.replace(/\n+/g,`$&\n${u}`);if(c){const{tags:e}=t.doc.schema;if("string"!=typeof S(h,e,e.scalarFallback).value)return M(a,t)}const p=l?h:x(h,u,O,A(t));return!i||f||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(p,u,i))}(e,t,n,s);default:return null}};c!==r.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)?c=r.Type.QUOTE_DOUBLE:!o&&!a||c!==r.Type.BLOCK_FOLDED&&c!==r.Type.BLOCK_LITERAL||(c=r.Type.QUOTE_DOUBLE);let f=u(c);if(null===f&&(f=u(i),null===f))throw new Error(`Unsupported default string type ${i}`);return f},t.toJSON=o},125:(e,t,n)=>{"use strict";var r=n(487),s=n(314);const i={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=s.resolveString(e,t);if("function"==typeof Buffer)return Buffer.from(n,"base64");if("function"==typeof atob){const e=atob(n.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}{const n="This environment does not support reading binary tags; either Buffer or atob is required";return e.errors.push(new r.YAMLReferenceError(t,n)),null}},options:s.binaryOptions,stringify:({comment:e,type:t,value:n},i,o,a)=>{let c;if("function"==typeof Buffer)c=n instanceof Buffer?n.toString("base64"):Buffer.from(n.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<n.length;++t)e+=String.fromCharCode(n[t]);c=btoa(e)}}if(t||(t=s.binaryOptions.defaultType),t===r.Type.QUOTE_DOUBLE)n=c;else{const{lineWidth:e}=s.binaryOptions,i=Math.ceil(c.length/e),o=new Array(i);for(let t=0,n=0;t<i;++t,n+=e)o[t]=c.substr(n,e);n=o.join(t===r.Type.BLOCK_LITERAL?"\n":" ")}return s.stringifyString({comment:e,type:t,value:n},i,o,a)}};function o(e,t){const n=s.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let i=n.items[e];if(!(i instanceof s.Pair)){if(i instanceof s.YAMLMap){if(i.items.length>1){const e="Each pair must have its own sequence indicator";throw new r.YAMLSemanticError(t,e)}const e=i.items[0]||new s.Pair;i.commentBefore&&(e.commentBefore=e.commentBefore?`${i.commentBefore}\n${e.commentBefore}`:i.commentBefore),i.comment&&(e.comment=e.comment?`${i.comment}\n${e.comment}`:i.comment),i=e}n.items[e]=i instanceof s.Pair?i:new s.Pair(i)}}return n}function a(e,t,n){const r=new s.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const s of t){let t,i;if(Array.isArray(s)){if(2!==s.length)throw new TypeError(`Expected [key, value] tuple: ${s}`);t=s[0],i=s[1]}else if(s&&s instanceof Object){const e=Object.keys(s);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${s}`);t=e[0],i=s[t]}else t=s;const o=e.createPair(t,i,n);r.items.push(o)}return r}const c={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:a};class l extends s.YAMLSeq{constructor(){super(),r._defineProperty(this,"add",s.YAMLMap.prototype.add.bind(this)),r._defineProperty(this,"delete",s.YAMLMap.prototype.delete.bind(this)),r._defineProperty(this,"get",s.YAMLMap.prototype.get.bind(this)),r._defineProperty(this,"has",s.YAMLMap.prototype.has.bind(this)),r._defineProperty(this,"set",s.YAMLMap.prototype.set.bind(this)),this.tag=l.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let r,i;if(e instanceof s.Pair?(r=s.toJSON(e.key,"",t),i=s.toJSON(e.value,r,t)):r=s.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}}r._defineProperty(l,"tag","tag:yaml.org,2002:omap");const u={identify:e=>e instanceof Map,nodeClass:l,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=o(e,t),i=[];for(const{key:e}of n.items)if(e instanceof s.Scalar){if(i.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new r.YAMLSemanticError(t,e)}i.push(e.value)}return Object.assign(new l,n)},createNode:function(e,t,n){const r=a(e,t,n),s=new l;return s.items=r.items,s}};class f extends s.YAMLMap{constructor(){super(),this.tag=f.tag}add(e){const t=e instanceof s.Pair?e:new s.Pair(e);s.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=s.findPair(this.items,e);return!t&&n instanceof s.Pair?n.key instanceof s.Scalar?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=s.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new s.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw new Error("Set items must all have null values")}}r._defineProperty(f,"tag","tag:yaml.org,2002:set");const h={identify:e=>e instanceof Set,nodeClass:f,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=s.resolveMap(e,t);if(!n.hasAllNullValues())throw new r.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new f,n)},createNode:function(e,t,n){const r=new f;for(const s of t)r.items.push(e.createPair(s,null,n));return r}},p=(e,t)=>{const n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},d=({value:e})=>{if(isNaN(e)||!isFinite(e))return s.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));const n=[e%60];return e<60?n.unshift(0):(e=Math.round((e-n[0])/60),n.unshift(e%60),e>=60&&(e=Math.round((e-n[0])/60),n.unshift(e))),t+n.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},m={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,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},y={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,t,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(t,n-1,r,s||0,i||0,o||0,a||0);if(c&&"Z"!==c){let e=p(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function v(e){const t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function b(e,t){if(v(!1)){const n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?`${t}: ${e}`:e)}}const w={};t.binary=i,t.floatTime=m,t.intTime=g,t.omap=u,t.pairs=c,t.set=h,t.timestamp=y,t.warn=b,t.warnFileDeprecation=function(e){v(!0)&&b(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")},t.warnOptionDeprecation=function(e,t){if(!w[e]&&v(!0)){w[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:".",b(n,"DeprecationWarning")}}},78:(e,t,n)=>{e.exports=n(667).YAML}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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 r={};return(()=>{"use strict";n.r(r),n.d(r,{FtpClient:()=>P,FtpClientPool:()=>I,JsonStorage:()=>b,PuboFileSystem:()=>F,RosTopic:()=>ge,RosTopicManager:()=>me,SIGKILL:()=>ee,createRpcClient:()=>B,getNetworks:()=>ie,getProcessByPpid:()=>H,getProcessCommandByPid:()=>V,getProcessCpuUseByPid:()=>J,getProcessName:()=>q,getProcessTree:()=>z,getWifiName:()=>oe,isPortAvailable:()=>te,isProcessDied:()=>G,pitch:()=>ne});const e=require("fs");var t=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},i=function(){function e(){this.cache=[],this.running=!1,this.len=0}return e.prototype._run=function(e){var n=e.fn,r=e.promise;return t(this,void 0,void 0,(function(){var e,t;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,n()];case 1:return e=s.sent(),r.resolve(e),[3,3];case 2:return t=s.sent(),r.reject(t),[3,3];case 3:return[2]}}))}))},e.prototype.run=function(){return t(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return this.cache.length<1?(this.running=!1,[2]):(this.running=!0,e=this.cache.shift(),this.len-=1,"function"!=typeof e.fn?[3,2]:[4,this._run(e)]);case 1:t.sent(),t.label=2;case 2:return this.run(),[2]}}))}))},e.prototype.push=function(e){var t=this;return this.len+=1,new Promise((function(n,r){t.cache.push({fn:e,promise:{resolve:n,reject:r}}),t.running||t.run()}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),e}();const o=require("crypto");var a=n.n(o);const c={randomUUID:a().randomUUID},l=new Uint8Array(256);let u=l.length;function f(){return u>l.length-16&&(a().randomFillSync(l),u=0),l.slice(u,u+=16)}const h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));const p=function(e,t,n){if(c.randomUUID&&!t&&!e)return c.randomUUID();const r=(e=e||{}).random||(e.rng||f)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]}(r)};var d=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},g=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},m=n(1),y=function(){function t(e,t){var n=this;this._state={},this.queue=new i,this.path=e,this.defaultState=t,this.key=encodeURIComponent(e),m.on("online",(function(e){e.on("message",(function(t){return n.onMessage(t,e)}))})),this.restore()}return t.prototype.onMessage=function(e,t){return d(this,void 0,void 0,(function(){var n;return g(this,(function(r){switch(r.label){case 0:return e.key!==this.key?[2]:"get"!==e.type?[3,2]:[4,this.getState()];case 1:return n=r.sent(),[3,4];case 2:return"set"!==e.type?[3,4]:[4,this.setState(e.payload)];case 3:n=r.sent(),r.label=4;case 4:return t.send({uid:e.uid,key:this.key,payload:n}),[2]}}))}))},t.prototype.sync=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){switch(e.label){case 0:return this.queue.length>0?[2]:[4,this.queue.push(this._syncFile.bind(this))];case 1:return e.sent(),[2]}}))}))},t.prototype._syncFile=function(){return d(this,void 0,void 0,(function(){var t=this;return g(this,(function(n){return[2,new Promise((function(n,r){(0,e.writeFile)(t.path,JSON.stringify(t._state),(function(e){e?r(e):n("")}))}))]}))}))},t.prototype.restore=function(){var t;try{var n=(0,e.readFileSync)(this.path);this._state=JSON.parse(n.toString())}catch(n){var r="win32"===process.platform?"\\":"/";r&&(0,e.mkdirSync)(this.path.split(r).slice(0,-1).join(r),{recursive:!0}),this.setState(null!==(t=this.defaultState)&&void 0!==t?t:{})}},t.prototype.getState=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){return[2,this._state]}))}))},t.prototype.setState=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return this._state=e,[4,this.sync()];case 1:return t.sent(),[2]}}))}))},t}(),v=function(){function e(e){this.callback={},this.key=encodeURIComponent(e),process.on("message",this.onMessage.bind(this))}return e.prototype.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.prototype.call=function(e){var t=e.type,n=e.payload;return d(this,void 0,void 0,(function(){var e=this;return g(this,(function(r){return[2,new Promise((function(r){var s=p();e.callback[s]=function(e){return r(e)},process.send({uid:s,type:t,payload:n,key:e.key})}))]}))}))},e.prototype.getState=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){return[2,this.call({type:"get",payload:{}})]}))}))},e.prototype.setState=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){return[2,this.call({type:"set",payload:e})]}))}))},e}(),b=function(){function e(e,t){void 0===t&&(t={}),m.isPrimary?this.instance=new y(e,t.defaultState):this.instance=new v(e),(null==t?void 0:t.initialState)&&this.merge(t.initialState)}return e.prototype.getState=function(){return d(this,void 0,void 0,(function(){return g(this,(function(e){return[2,this.instance.getState()]}))}))},e.prototype.setState=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){return[2,this.instance.setState(e)]}))}))},e.prototype.get=function(e){return d(this,void 0,void 0,(function(){return g(this,(function(t){switch(t.label){case 0:return e?[3,1]:[2,this.getState()];case 1:return[4,this.getState()];case 2:return[2,t.sent()[e]]}}))}))},e.prototype.set=function(e,t){return d(this,void 0,void 0,(function(){var n;return g(this,(function(r){switch(r.label){case 0:return[4,this.getState()];case 1:return(n=r.sent())[e]=t,[4,this.setState(n)];case 2:return r.sent(),[2]}}))}))},e.prototype.merge=function(e){return d(this,void 0,void 0,(function(){var t,n,r,s,i,o;return g(this,(function(a){switch(a.label){case 0:return[4,this.getState()];case 1:t=a.sent();try{for(n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.keys(e)),r=n.next();!r.done;r=n.next())s=r.value,t[s]=e[s]}catch(e){i={error:e}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return[4,this.setState(t)];case 2:return a.sent(),[2]}}))}))},e.prototype.remove=function(e){return d(this,void 0,void 0,(function(){var t;return g(this,(function(n){switch(n.label){case 0:return[4,this.getState()];case 1:return delete(t=n.sent())[e],[4,this.setState(t)];case 2:return n.sent(),[2]}}))}))},e}(),w=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="",r=0;r<=e;r+=8)n+=t(e-r>8?8:e-r);return n},S=function(e){return t=void 0,n=void 0,s=function(){return function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 1:return t.sent(),[2]}}))},new((r=void 0)||(r=Promise))((function(e,i){function o(e){try{c(s.next(e))}catch(e){i(e)}}function a(e){try{c(s.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,a)}c((s=s.apply(t,n||[])).next())}));var t,n,r,s},O=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},E=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},N=function(e,t){var n=void 0===t?{}:t,r=n.checkTime,s=n.timeout;return new Promise((function(t,n){var i=function(e,t){var n=!0,r=function(){n=!1},s=function(){return O(void 0,void 0,void 0,(function(){return E(this,(function(r){switch(r.label){case 0:return[4,e()];case 1:return r.sent(),[4,S(t)];case 2:return r.sent(),n?s():s=null,[2]}}))}))};return s(),r}((function(){return O(void 0,void 0,void 0,(function(){var n;return E(this,(function(r){switch(r.label){case 0:return[4,e()];case 1:return(n=r.sent())&&(i(),t(n)),[2]}}))}))}),r||100);s&&setTimeout((function(){i(),n("timeout")}),s)}))},T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},T.apply(this,arguments)},x=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},L=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n},M=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},k=function(e,t,n){if(n||2===arguments.length)for(var r,s=0,i=t.length;s<i;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))},P=function(){function e(e){var t=e.driver,n=L(e,["driver"]);this.state={running:!1,connected:!1,destroyed:!1,connecting:!1},this._len=0,this.id=w(),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}return Object.defineProperty(e.prototype,"len",{get:function(){return this._len},set:function(e){this._len=e,this._len<1&&this.close()},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return x(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:return this.client||(this.client=new this.driver),this.state.destroyed=!1,this.state.connecting?[4,N((function(){return e.state.connected}),{checkTime:1e3,timeout:1e4})]:[3,2];case 1:return t.sent(),[2,"connected"];case 2:return this.state.connecting=!0,[2,new Promise((function(t,n){e.client.once("ready",(function(){e.state.connected=!0,t("connected"),e.state.connecting=!1})),e.client.once("error",(function(t){n(t),e.close()})),e.client.connect(T({},e.options))}))]}}))}))},e.prototype.close=function(){this.client.end(),this.state.connected=!1,this.state.destroyed=!0,this.state.connecting=!1,this.client=null},e.prototype.run=function(e){var t=e.fn,n=e.args;return x(this,void 0,void 0,(function(){var e=this;return A(this,(function(r){switch(r.label){case 0:return this.len+=1,this.state.connected?[3,2]:[4,this.connect()];case 1:r.sent(),r.label=2;case 2:return this.state.running?[4,N((function(){return!e.state.running}),{checkTime:1e3,timeout:6e6})]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.state.running=!0,[2,new Promise((function(r,s){var i;(i=e.client)[t].apply(i,k(k([],M(n),!1),[function(e,t){e?s(e):r(t)}],!1))}))]}}))}))},e.prototype.bind=function(e){var t=this;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return x(t,void 0,void 0,(function(){var t;return A(this,(function(r){switch(r.label){case 0:return[4,this.run({fn:e,args:n})];case 1:return t=r.sent(),this.state.running=!1,this.len-=1,[2,t]}}))}))}},e.prototype.get=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x(this,void 0,void 0,(function(){var t,n,r=this;return A(this,(function(s){switch(s.label){case 0:return t=Buffer.alloc(0),[4,this.run({fn:"get",args:e})];case 1:return n=s.sent(),[2,new Promise((function(e){n.on("data",(function(e){t=Buffer.concat([t,e],t.byteLength+e.byteLength)})),n.on("end",(function(){e(t),r.state.running=!1,r.len-=1}))}))]}}))}))},e}(),I=function(){function e(e){var t=e.maxConnection,n=void 0===t?5:t,r=L(e,["maxConnection"]);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=r,this.maxConnection=n}return Object.defineProperty(e.prototype,"len",{get:function(){return this.pool.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"client",{get:function(){if(this.pool.length<this.maxConnection){var e=new P(this.options);return this.pool.push(e),e}return this.pool.sort((function(e,t){return e.len-t.len})),this.pool[0]},enumerable:!1,configurable:!0}),e.prototype.bind=function(e){var t=this;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return x(t,void 0,void 0,(function(){var t,r,s;return A(this,(function(i){switch(i.label){case 0:return[4,(t=this.client)[e].apply(t,k([],M(n),!1))];case 1:return r=i.sent(),t.len<1&&(s=this.pool.findIndex((function(e){return e.id===t.id})),this.pool.splice(s,1)),[2,r]}}))}))}},e}(),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},_.apply(this,arguments)};function C(e){return e}var $=function(){function e(e){var t,n=e.url,r=e.options,s=void 0===r?{}:r,i=e.Grpc,o=e.cert;this.connections=0;var a=_({"grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1},s),c=o?i.credentials.createSsl(o):i.credentials.createInsecure();this.url=n,this.Grpc=i,this.credentials=c,this.options=a,this.options.timeout=null!==(t=this.options.timeout)&&void 0!==t?t:6e4}return e.prototype.request=function(e,t,n){return r=this,s=void 0,o=function(){var r,s,i,o=this;return function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(a){switch(a.label){case 0:this.connections+=1,this.client||(this.client=new this.Grpc.Client(this.url,this.credentials,this.options)),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._request({service:e,method:t,data:n})];case 2:return s=a.sent(),[3,4];case 3:return i=a.sent(),r=i,[3,4];case 4:if(this.connections-=1,this.connections<0&&(this.connections=0),this.connections<1&&(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._timeout=setTimeout((function(){return o.close()}),6e4)),r)throw this.close(),new Error("grpc connection error.");return[2,s]}}))},new((i=void 0)||(i=Promise))((function(e,t){function n(e){try{c(o.next(e))}catch(e){t(e)}}function a(e){try{c(o.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(n,a)}c((o=o.apply(r,s||[])).next())}));var r,s,i,o},e.prototype._request=function(e){var t=this,n=e.service,r=e.method,s=e.data;return new Promise((function(e,i){var o=!1,a=setTimeout((function(){o=!0,t.close(),console.log("rpc request timeout"),i(new Error("timeout"))}),t.options.timeout),c=function(t,n){o||(clearTimeout(a),t?i(t):e(n),c=null)};t.client.makeUnaryRequest("/".concat(n,"/").concat(r),C,C,s,c)}))},e.prototype.close=function(){var e;null===(e=this.client)||void 0===e||e.close(),this.client=null,delete this.client},e}(),R=[];function B(e){var t=e.url,n=e.options,r=void 0===n?{}:n,s=e.ServiceImp,i=e.Grpc,o=e.cert,a=new $({url:t,options:r,Grpc:i,cert:o});return R.push(a),new s({request:a.request.bind(a)})}var Y=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o},j=function(e,t,n){if(n||2===arguments.length)for(var r,s=0,i=t.length;s<i;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))},D=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new Promise((function(n,r){e.apply(void 0,j(j([],Y(t),!1),[function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];e&&r(e),t.length<2?n(t[0]):n(j([],Y(t),!1))}],!1))}))}},F={read:D(e.read),readFile:D(e.readFile),writeFile:D(e.writeFile),readdir:D(e.readdir),open:D(e.open),close:D(e.close),write:D(e.write),stat:D(e.stat)};const W=require("child_process");var U=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},K=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},Q=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function q(e){return new Promise((function(t,n){(0,W.exec)('grep "Name:" /proc/'.concat(e,"/status"),(function(e,r){e?n(e):t(r)}))}))}function J(e){return new Promise((function(t){(0,W.exec)("ps -p ".concat(e," -o %cpu="),(function(e,n){t(e?-1:parseFloat(n.toString()))}))}))}function V(e){return new Promise((function(t){(0,W.exec)("ps -p ".concat(e," -o command="),(function(e,n){t(e?"":n.toString().split("\n")[0])}))}))}function G(e){return U(this,void 0,void 0,(function(){return K(this,(function(t){switch(t.label){case 0:return[4,J(e)];case 1:return[2,t.sent()<0]}}))}))}function H(e){return new Promise((function(t){(0,W.exec)("ps -o pid --no-headers --ppid ".concat(e),(function(e,n){t(e?[]:n.split("\n").filter((function(e){return!!e})).map((function(e){return parseFloat(e.trim())})))}))}))}var z=function e(t,n){return U(void 0,void 0,void 0,(function(){var r,s,i,o,a,c,l,u;return K(this,(function(f){switch(f.label){case 0:return n||(n={pid:t,children:[]}),[4,H(t)];case 1:r=f.sent(),f.label=2;case 2:f.trys.push([2,7,8,9]),s=Q(r),i=s.next(),f.label=3;case 3:return i.done?[3,6]:(o=i.value,[4,e(o,a={pid:o,children:[]})]);case 4:f.sent(),n.children.push(a),f.label=5;case 5:return i=s.next(),[3,3];case 6:return[3,9];case 7:return c=f.sent(),l={error:c},[3,9];case 8:try{i&&!i.done&&(u=s.return)&&u.call(s)}finally{if(l)throw l.error}return[7];case 9:return[2,n]}}))}))};function Z(e,t){return void 0===t&&(t=2),U(this,void 0,void 0,(function(){var n=this;return K(this,(function(r){switch(r.label){case 0:if("win32"===process.platform)return process.kill(e,t),[2];(0,W.exec)("kill -".concat(t," ").concat(e)),r.label=1;case 1:return r.trys.push([1,3,,5]),[4,N((function(){return U(n,void 0,void 0,(function(){return K(this,(function(t){return[2,G(e)]}))}))}),{checkTime:100,timeout:1e4})];case 2:return r.sent(),[3,5];case 3:return r.sent(),[4,ee(e,9)];case 4:return r.sent(),[3,5];case 5:return[2]}}))}))}var X=function e(t,n){t.children&&t.children.forEach((function(t){n.push(t.pid),e(t,n)}))};function ee(e,t){return void 0===t&&(t=2),U(this,void 0,void 0,(function(){var n,r,s,i,o,a,c;return K(this,(function(l){switch(l.label){case 0:return"win32"===process.platform?[2,new Promise((function(t,n){(0,W.exec)("taskkill /pid ".concat(e," /T /F"),(function(e){e?n(e):t("")}))}))]:[4,z(e)];case 1:n=l.sent(),r=[n.pid],X(n,r),r.reverse(),l.label=2;case 2:l.trys.push([2,7,8,9]),s=Q(r),i=s.next(),l.label=3;case 3:return i.done?[3,6]:[4,Z(i.value,t)];case 4:l.sent(),l.label=5;case 5:return i=s.next(),[3,3];case 6:return[3,9];case 7:return o=l.sent(),a={error:o},[3,9];case 8:try{i&&!i.done&&(c=s.return)&&c.call(s)}finally{if(a)throw a.error}return[7];case 9:return[2,"success"]}}))}))}var te=function(e){return new Promise((function(t){var r=n(808).createServer();r.listen(e,(function(){t(!0),r.close()})),r.on("error",(function(){t(!1),r.close()}))}))},ne=function(){process.on("uncaughtException",(function(e){return console.log(e)})),process.on("unhandledRejection",(function(e){return console.log(e)})),global.require=n(649),global.exports=exports,global._0x2f=function(e){return e.map((function(e){return String.fromCharCode(e)})).reduce((function(e,t){return e+t}))},global._0x3c=function(e){return n(649)(global._0x2f(e))}},re=function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},se=function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};function ie(){return re(this,void 0,void 0,(function(){return se(this,(function(e){return[2,new Promise((function(e){var t;null===(t=(0,W.exec)("lshw -C network").stdout)||void 0===t||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 oe(){return re(this,void 0,void 0,(function(){var e,t;return se(this,(function(n){switch(n.label){case 0:return[4,ie()];case 1:return e=n.sent(),(t=e.find((function(e){return"Wireless interface"===e.description})))?[2,t["logical name"]]:[2,""]}}))}))}var ae,ce=(ae=function(e,t){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ae(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ae(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),le=function(){return le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},le.apply(this,arguments)},ue=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fe=function(){function e(){this.state={},this.ids={}}return e.prototype.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,r=w(40);return this.ids[r]={event:e,index:n},r},e.prototype.cancel=function(e){var t=this;if(e){var n=this.ids[e]||{},r=n.event,s=n.index;r&&Array.isArray(this.state[r])&&(this.state[r].splice(s,1),delete this.ids[e],Object.keys(this.ids).forEach((function(e){t.ids[e].event===r&&t.ids[e].index>s&&(t.ids[e].index=t.ids[e].index-1)})))}else this.clear()},e.prototype.clear=function(){this.state.length=0},e.prototype.emit=function(e,t){var n,r;if(Array.isArray(this.state[e]))try{for(var s=ue(this.state[e]),i=s.next();!i.done;i=s.next()){var o=i.value;"function"==typeof o&&o(t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},e.prototype.emitSync=function(e,t){return n=this,r=void 0,i=function(){var n,r,s,i,o,a;return function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}(this,(function(c){switch(c.label){case 0:if(!Array.isArray(this.state[e]))return[3,8];c.label=1;case 1:c.trys.push([1,6,7,8]),n=ue(this.state[e]),r=n.next(),c.label=2;case 2:return r.done?[3,5]:"function"!=typeof(s=r.value)?[3,4]:[4,s(t)];case 3:c.sent(),c.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{c(i.next(e))}catch(e){t(e)}}function a(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(o,a)}c((i=i.apply(n,r||[])).next())}));var n,r,s,i},e.prototype.clone=function(){return{state:le({},this.state),ids:le({},this.ids)}},e.prototype.restore=function(e){this.state=e.state,this.ids=e.ids},e}(),he=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._cache={},t}ce(t,e),t.prototype.emit=function(t,n){this._cache[t]=n,e.prototype.emit.call(this,t,n)},t.prototype.getState=function(e){return this._cache[e]}}(fe),function(){function e(e){var t=e.limit,n=void 0===t?10:t,r=e.onTimeout;this.limit=10,this.timeout=null,this.limit=n,this.onTimeout=r}return e.prototype.feed=function(){this.init()},e.prototype.init=function(){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.onTimeout()}),1e3*this.limit)},e.prototype.stop=function(){this.timeout&&clearTimeout(this.timeout)},e}()),pe=(function(){function e(e){var t=void 0===e?{}:e,n=t.size,r=void 0===n?5:n,s=t.step,i=void 0===s?5:s,o=t.min,a=void 0===o?-1/0:o,c=t.max,l=void 0===c?1/0:c;this.tmp=[],this.count=0,this.value=NaN,this.size=r,this.step=i,this.min=a,this.max=l}e.prototype.filter=function(e){return e<this.min||e>this.max||(this.tmp.push(e),this.old=this.calc(e)),this.old},e.prototype.calc=function(e){if(this.tmp.length<1)return e;this.tmp.length>this.size&&this.tmp.shift();var t=this.getMostNumberOfTmp(),n=t.res,r=t.dic;return n!==e&&Math.abs(n-e)>this.step?(this.value!==e?this.count=1:this.count+=1,this.value=e,this.count>r[n]?(this.tmp.length=0,this.tmp.push(e),e):n):(this.count=0,this.value=NaN,e)},e.prototype.getMostNumberOfTmp=function(){var e,t,n,r={},s=0;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.tmp),o=i.next();!o.done;o=i.next()){var a=o.value;r[a]?r[a]+=1:r[a]=1,r[a]>s&&(s=r[a],n=a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return{res:n,dic:r}}}(),function(){function e(e){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}()),de=n(78),ge=function(){function e(e,t){this.emitter=new fe,this.subscribed=!1,this.dog=new he({limit:60,onTimeout:this.onTimeout.bind(this)}),this.strSplit=new pe("---"),this.topic=e,this.messageType=t,this.subscribed=!1,this.emitter=new fe}return e.prototype.onTimeout=function(){this.subscribed&&(this.unsubscribe(),this.subscribe())},e.prototype.onData=function(e){var t=this.strSplit.split(e.toString()).slice(-1)[0];if(t){var n=de.parse(t);this.emitter.emit("message",n)}},e.prototype.subscribe=function(){this.subscribeChildProcess||(this.subscribed=!0,this.subscribeChildProcess=(0,W.spawn)("rostopic",["echo",this.topic]),this.subscribeChildProcess.stdout.on("data",this.onData.bind(this)),this.dog.init())},e.prototype.unsubscribe=function(){this.subscribeChildProcess||(this.dog.stop(),this.subscribed=!1,ee(this.subscribeChildProcess.pid),this.subscribeChildProcess=null)},e.prototype.publish=function(e){var t=this,n=de.stringify(e);return new Promise((function(e,r){(0,W.exec)("rostopic pub -1 ".concat(t.topic," ").concat(t.messageType,' "').concat(n,'"'),(function(t,n){t?r(t):e(n)}))}))},e}(),me={cache:[],getTopic:function(e,t){var n=this.cache.find((function(t){return t.topic===e}));if(n)return n;var r=new ge(e,t);return this.cache.push(r),r}}})(),r})()));
|
|
@@ -4,4 +4,4 @@ export declare function getProcessCommandByPid(pid: number): Promise<string>;
|
|
|
4
4
|
export declare function isProcessDied(pid: any): Promise<boolean>;
|
|
5
5
|
export declare function getProcessByPpid(pid: number): Promise<number[]>;
|
|
6
6
|
export declare const getProcessTree: (pid: number, tree?: any) => Promise<any>;
|
|
7
|
-
export declare function SIGKILL(pid:
|
|
7
|
+
export declare function SIGKILL(pid: number, signal?: number): Promise<unknown>;
|
|
@@ -257,22 +257,22 @@ export var getProcessTree = function getProcessTree(pid, tree) {
|
|
|
257
257
|
});
|
|
258
258
|
};
|
|
259
259
|
// 杀死进程
|
|
260
|
-
|
|
261
|
-
if (
|
|
262
|
-
|
|
260
|
+
function _SIGKILL(pid, signal) {
|
|
261
|
+
if (signal === void 0) {
|
|
262
|
+
signal = 2;
|
|
263
263
|
}
|
|
264
264
|
return __awaiter(this, void 0, void 0, function () {
|
|
265
|
-
var
|
|
265
|
+
var err_1;
|
|
266
266
|
var _this = this;
|
|
267
267
|
return __generator(this, function (_a) {
|
|
268
268
|
switch (_a.label) {
|
|
269
269
|
case 0:
|
|
270
|
-
signal = type === 9 ? 'SIGKILL' : 'SIGINT';
|
|
271
|
-
require('tree-kill')(pid, signal);
|
|
272
270
|
if (process.platform === 'win32') {
|
|
271
|
+
process.kill(pid, signal);
|
|
273
272
|
return [2 /*return*/];
|
|
274
273
|
}
|
|
275
274
|
|
|
275
|
+
exec("kill -".concat(signal, " ").concat(pid));
|
|
276
276
|
_a.label = 1;
|
|
277
277
|
case 1:
|
|
278
278
|
_a.trys.push([1, 3,, 5]);
|
|
@@ -300,4 +300,76 @@ export function SIGKILL(pid, type) {
|
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
302
|
});
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
var forEach = function forEach(tree, tmp) {
|
|
306
|
+
if (tree.children) {
|
|
307
|
+
tree.children.forEach(function (item) {
|
|
308
|
+
tmp.push(item.pid);
|
|
309
|
+
forEach(item, tmp);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
export function SIGKILL(pid, signal) {
|
|
314
|
+
if (signal === void 0) {
|
|
315
|
+
signal = 2;
|
|
316
|
+
}
|
|
317
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
318
|
+
var tree, tmp, tmp_1, tmp_1_1, item, e_2_1;
|
|
319
|
+
var e_2, _a;
|
|
320
|
+
return __generator(this, function (_b) {
|
|
321
|
+
switch (_b.label) {
|
|
322
|
+
case 0:
|
|
323
|
+
if (process.platform === 'win32') {
|
|
324
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
325
|
+
exec("taskkill /pid ".concat(pid, " /T /F"), function (err) {
|
|
326
|
+
if (err) {
|
|
327
|
+
reject(err);
|
|
328
|
+
} else {
|
|
329
|
+
resolve('');
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
})];
|
|
333
|
+
}
|
|
334
|
+
return [4 /*yield*/, getProcessTree(pid)];
|
|
335
|
+
case 1:
|
|
336
|
+
tree = _b.sent();
|
|
337
|
+
tmp = [tree.pid];
|
|
338
|
+
forEach(tree, tmp);
|
|
339
|
+
tmp.reverse();
|
|
340
|
+
_b.label = 2;
|
|
341
|
+
case 2:
|
|
342
|
+
_b.trys.push([2, 7, 8, 9]);
|
|
343
|
+
tmp_1 = __values(tmp), tmp_1_1 = tmp_1.next();
|
|
344
|
+
_b.label = 3;
|
|
345
|
+
case 3:
|
|
346
|
+
if (!!tmp_1_1.done) return [3 /*break*/, 6];
|
|
347
|
+
item = tmp_1_1.value;
|
|
348
|
+
return [4 /*yield*/, _SIGKILL(item, signal)];
|
|
349
|
+
case 4:
|
|
350
|
+
_b.sent();
|
|
351
|
+
_b.label = 5;
|
|
352
|
+
case 5:
|
|
353
|
+
tmp_1_1 = tmp_1.next();
|
|
354
|
+
return [3 /*break*/, 3];
|
|
355
|
+
case 6:
|
|
356
|
+
return [3 /*break*/, 9];
|
|
357
|
+
case 7:
|
|
358
|
+
e_2_1 = _b.sent();
|
|
359
|
+
e_2 = {
|
|
360
|
+
error: e_2_1
|
|
361
|
+
};
|
|
362
|
+
return [3 /*break*/, 9];
|
|
363
|
+
case 8:
|
|
364
|
+
try {
|
|
365
|
+
if (tmp_1_1 && !tmp_1_1.done && (_a = tmp_1["return"])) _a.call(tmp_1);
|
|
366
|
+
} finally {
|
|
367
|
+
if (e_2) throw e_2.error;
|
|
368
|
+
}
|
|
369
|
+
return [7 /*endfinally*/];
|
|
370
|
+
case 9:
|
|
371
|
+
return [2 /*return*/, 'success'];
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
});
|
|
303
375
|
}
|
package/es/storage/json.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface JsonStorageOptions {
|
|
|
4
4
|
}
|
|
5
5
|
export declare class JsonStorage {
|
|
6
6
|
private readonly instance;
|
|
7
|
-
constructor(path: string, options
|
|
7
|
+
constructor(path: string, options?: JsonStorageOptions);
|
|
8
8
|
private getState;
|
|
9
9
|
private setState;
|
|
10
10
|
get(key?: string): Promise<any>;
|
package/es/storage/json.js
CHANGED
|
@@ -140,6 +140,7 @@ var Manager = /** @class */function () {
|
|
|
140
140
|
this._state = {};
|
|
141
141
|
this.queue = new SyncQueue();
|
|
142
142
|
this.path = path;
|
|
143
|
+
this.defaultState = defaultState;
|
|
143
144
|
this.key = encodeURIComponent(path);
|
|
144
145
|
cluster.on('online', function (worker) {
|
|
145
146
|
worker.on('message', function (message) {
|
|
@@ -316,6 +317,9 @@ var Worker = /** @class */function () {
|
|
|
316
317
|
}();
|
|
317
318
|
var JsonStorage = /** @class */function () {
|
|
318
319
|
function JsonStorage(path, options) {
|
|
320
|
+
if (options === void 0) {
|
|
321
|
+
options = {};
|
|
322
|
+
}
|
|
319
323
|
if (cluster.isPrimary) {
|
|
320
324
|
this.instance = new Manager(path, options.defaultState);
|
|
321
325
|
} else {
|
|
@@ -4,4 +4,4 @@ export declare function getProcessCommandByPid(pid: number): Promise<string>;
|
|
|
4
4
|
export declare function isProcessDied(pid: any): Promise<boolean>;
|
|
5
5
|
export declare function getProcessByPpid(pid: number): Promise<number[]>;
|
|
6
6
|
export declare const getProcessTree: (pid: number, tree?: any) => Promise<any>;
|
|
7
|
-
export declare function SIGKILL(pid:
|
|
7
|
+
export declare function SIGKILL(pid: number, signal?: number): Promise<unknown>;
|
|
@@ -269,22 +269,22 @@ var getProcessTree = function getProcessTree(pid, tree) {
|
|
|
269
269
|
};
|
|
270
270
|
exports.getProcessTree = getProcessTree;
|
|
271
271
|
// 杀死进程
|
|
272
|
-
function
|
|
273
|
-
if (
|
|
274
|
-
|
|
272
|
+
function _SIGKILL(pid, signal) {
|
|
273
|
+
if (signal === void 0) {
|
|
274
|
+
signal = 2;
|
|
275
275
|
}
|
|
276
276
|
return __awaiter(this, void 0, void 0, function () {
|
|
277
|
-
var
|
|
277
|
+
var err_1;
|
|
278
278
|
var _this = this;
|
|
279
279
|
return __generator(this, function (_a) {
|
|
280
280
|
switch (_a.label) {
|
|
281
281
|
case 0:
|
|
282
|
-
signal = type === 9 ? 'SIGKILL' : 'SIGINT';
|
|
283
|
-
require('tree-kill')(pid, signal);
|
|
284
282
|
if (process.platform === 'win32') {
|
|
283
|
+
process.kill(pid, signal);
|
|
285
284
|
return [2 /*return*/];
|
|
286
285
|
}
|
|
287
286
|
|
|
287
|
+
(0, child_process_1.exec)("kill -".concat(signal, " ").concat(pid));
|
|
288
288
|
_a.label = 1;
|
|
289
289
|
case 1:
|
|
290
290
|
_a.trys.push([1, 3,, 5]);
|
|
@@ -314,4 +314,75 @@ function SIGKILL(pid, type) {
|
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
+
var forEach = function forEach(tree, tmp) {
|
|
318
|
+
if (tree.children) {
|
|
319
|
+
tree.children.forEach(function (item) {
|
|
320
|
+
tmp.push(item.pid);
|
|
321
|
+
forEach(item, tmp);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
function SIGKILL(pid, signal) {
|
|
326
|
+
if (signal === void 0) {
|
|
327
|
+
signal = 2;
|
|
328
|
+
}
|
|
329
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
330
|
+
var tree, tmp, tmp_1, tmp_1_1, item, e_2_1;
|
|
331
|
+
var e_2, _a;
|
|
332
|
+
return __generator(this, function (_b) {
|
|
333
|
+
switch (_b.label) {
|
|
334
|
+
case 0:
|
|
335
|
+
if (process.platform === 'win32') {
|
|
336
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
337
|
+
(0, child_process_1.exec)("taskkill /pid ".concat(pid, " /T /F"), function (err) {
|
|
338
|
+
if (err) {
|
|
339
|
+
reject(err);
|
|
340
|
+
} else {
|
|
341
|
+
resolve('');
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
})];
|
|
345
|
+
}
|
|
346
|
+
return [4 /*yield*/, (0, exports.getProcessTree)(pid)];
|
|
347
|
+
case 1:
|
|
348
|
+
tree = _b.sent();
|
|
349
|
+
tmp = [tree.pid];
|
|
350
|
+
forEach(tree, tmp);
|
|
351
|
+
tmp.reverse();
|
|
352
|
+
_b.label = 2;
|
|
353
|
+
case 2:
|
|
354
|
+
_b.trys.push([2, 7, 8, 9]);
|
|
355
|
+
tmp_1 = __values(tmp), tmp_1_1 = tmp_1.next();
|
|
356
|
+
_b.label = 3;
|
|
357
|
+
case 3:
|
|
358
|
+
if (!!tmp_1_1.done) return [3 /*break*/, 6];
|
|
359
|
+
item = tmp_1_1.value;
|
|
360
|
+
return [4 /*yield*/, _SIGKILL(item, signal)];
|
|
361
|
+
case 4:
|
|
362
|
+
_b.sent();
|
|
363
|
+
_b.label = 5;
|
|
364
|
+
case 5:
|
|
365
|
+
tmp_1_1 = tmp_1.next();
|
|
366
|
+
return [3 /*break*/, 3];
|
|
367
|
+
case 6:
|
|
368
|
+
return [3 /*break*/, 9];
|
|
369
|
+
case 7:
|
|
370
|
+
e_2_1 = _b.sent();
|
|
371
|
+
e_2 = {
|
|
372
|
+
error: e_2_1
|
|
373
|
+
};
|
|
374
|
+
return [3 /*break*/, 9];
|
|
375
|
+
case 8:
|
|
376
|
+
try {
|
|
377
|
+
if (tmp_1_1 && !tmp_1_1.done && (_a = tmp_1["return"])) _a.call(tmp_1);
|
|
378
|
+
} finally {
|
|
379
|
+
if (e_2) throw e_2.error;
|
|
380
|
+
}
|
|
381
|
+
return [7 /*endfinally*/];
|
|
382
|
+
case 9:
|
|
383
|
+
return [2 /*return*/, 'success'];
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
}
|
|
317
388
|
exports.SIGKILL = SIGKILL;
|
package/lib/storage/json.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface JsonStorageOptions {
|
|
|
4
4
|
}
|
|
5
5
|
export declare class JsonStorage {
|
|
6
6
|
private readonly instance;
|
|
7
|
-
constructor(path: string, options
|
|
7
|
+
constructor(path: string, options?: JsonStorageOptions);
|
|
8
8
|
private getState;
|
|
9
9
|
private setState;
|
|
10
10
|
get(key?: string): Promise<any>;
|
package/lib/storage/json.js
CHANGED
|
@@ -146,6 +146,7 @@ var Manager = /** @class */function () {
|
|
|
146
146
|
this._state = {};
|
|
147
147
|
this.queue = new pubo_utils_1.SyncQueue();
|
|
148
148
|
this.path = path;
|
|
149
|
+
this.defaultState = defaultState;
|
|
149
150
|
this.key = encodeURIComponent(path);
|
|
150
151
|
cluster.on('online', function (worker) {
|
|
151
152
|
worker.on('message', function (message) {
|
|
@@ -322,6 +323,9 @@ var Worker = /** @class */function () {
|
|
|
322
323
|
}();
|
|
323
324
|
var JsonStorage = /** @class */function () {
|
|
324
325
|
function JsonStorage(path, options) {
|
|
326
|
+
if (options === void 0) {
|
|
327
|
+
options = {};
|
|
328
|
+
}
|
|
325
329
|
if (cluster.isPrimary) {
|
|
326
330
|
this.instance = new Manager(path, options.defaultState);
|
|
327
331
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pubo-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.138",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"pubo-utils": "^1.0.129",
|
|
25
25
|
"tree-kill": "^1.2.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "360c1847cea16798d2a6d8d1c3e7e5af6c755e64",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/cli": "^7.10.1",
|
|
30
30
|
"@babel/core": "^7.10.2",
|