@lib-feedit/commons
Version:
Reusable components, scripts, styles, hooks & more
3 lines • 98.8 kB
JavaScript
"use strict";var e=require("child_process"),t=require("fs"),u=require("process"),n=require("path"),i=require("node:util"),r=require("node:process"),o=require("node:readline"),D=require("node:async_hooks"),l=require("stream"),s=require("tty");function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(u){if("default"!==u){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(t,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}}),t.default=e,Object.freeze(t)}var c=a(n),p=a(o);function F(e,t,u,n){return new(u||(u=Promise))(function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function D(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof u?t:new u(function(e){e(t)})).then(o,D)}l((n=n.apply(e,t||[])).next())})}
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
function d(e){return null==e}"function"==typeof SuppressedError&&SuppressedError;var h={isNothing:d,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:d(e)?[]:[e]},repeat:function(e,t){var u,n="";for(u=0;u<t;u+=1)n+=e;return n},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var u,n,i,r;if(t)for(u=0,n=(r=Object.keys(t)).length;u<n;u+=1)e[i=r[u]]=t[i];return e}};function f(e,t){var u="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(u+='in "'+e.mark.name+'" '),u+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(u+="\n\n"+e.mark.snippet),n+" "+u):n}function g(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=f(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}g.prototype=Object.create(Error.prototype),g.prototype.constructor=g,g.prototype.toString=function(e){return this.name+": "+f(this,e)};var C=g;function m(e,t,u,n,i){var r="",o="",D=Math.floor(i/2)-1;return n-t>D&&(t=n-D+(r=" ... ").length),u-n>D&&(u=n+D-(o=" ...").length),{str:r+e.slice(t,u).replace(/\t/g,"→")+o,pos:n-t+r.length}}function E(e,t){return h.repeat(" ",t-e.length)+e}var b=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var u,n=/\r?\n|\r|\0/g,i=[0],r=[],o=-1;u=n.exec(e.buffer);)r.push(u.index),i.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var D,l,s="",a=Math.min(e.line+t.linesAfter,r.length).toString().length,c=t.maxLength-(t.indent+a+3);for(D=1;D<=t.linesBefore&&!(o-D<0);D++)l=m(e.buffer,i[o-D],r[o-D],e.position-(i[o]-i[o-D]),c),s=h.repeat(" ",t.indent)+E((e.line-D+1).toString(),a)+" | "+l.str+"\n"+s;for(l=m(e.buffer,i[o],r[o],e.position,c),s+=h.repeat(" ",t.indent)+E((e.line+1).toString(),a)+" | "+l.str+"\n",s+=h.repeat("-",t.indent+a+3+l.pos)+"^\n",D=1;D<=t.linesAfter&&!(o+D>=r.length);D++)l=m(e.buffer,i[o+D],r[o+D],e.position-(i[o]-i[o+D]),c),s+=h.repeat(" ",t.indent)+E((e.line+D+1).toString(),a)+" | "+l.str+"\n";return s.replace(/\n$/,"")},B=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],y=["scalar","sequence","mapping"];var A=function(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===B.indexOf(t))throw new C('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach(function(u){e[u].forEach(function(e){t[String(e)]=u})}),t}(t.styleAliases||null),-1===y.indexOf(this.kind))throw new C('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function v(e,t){var u=[];return e[t].forEach(function(e){var t=u.length;u.forEach(function(u,n){u.tag===e.tag&&u.kind===e.kind&&u.multi===e.multi&&(t=n)}),u[t]=e}),u}function w(e){return this.extend(e)}w.prototype.extend=function(e){var t=[],u=[];if(e instanceof A)u.push(e);else if(Array.isArray(e))u=u.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new C("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(u=u.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof A))throw new C("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new C("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new C("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(e){if(!(e instanceof A))throw new C("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(w.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(u),n.compiledImplicit=v(n,"implicit"),n.compiledExplicit=v(n,"explicit"),n.compiledTypeMap=function(){var e,t,u={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(u.multi[e.kind].push(e),u.multi.fallback.push(e)):u[e.kind][e.tag]=u.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return u}(n.compiledImplicit,n.compiledExplicit),n};var x=w,k=new A("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),S=new A("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),T=new A("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),L=new x({explicit:[k,S,T]});var I=new A("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var O=new A("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function j(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function R(e){return 48<=e&&e<=55}function M(e){return 48<=e&&e<=57}var U=new A("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,u=e.length,n=0,i=!1;if(!u)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===u)return!0;if("b"===(t=e[++n])){for(n++;n<u;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<u;n++)if("_"!==(t=e[n])){if(!j(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<u;n++)if("_"!==(t=e[n])){if(!R(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<u;n++)if("_"!==(t=e[n])){if(!M(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,u=e,n=1;if(-1!==u.indexOf("_")&&(u=u.replace(/_/g,"")),"-"!==(t=u[0])&&"+"!==t||("-"===t&&(n=-1),t=(u=u.slice(1))[0]),"0"===u)return 0;if("0"===t){if("b"===u[1])return n*parseInt(u.slice(2),2);if("x"===u[1])return n*parseInt(u.slice(2),16);if("o"===u[1])return n*parseInt(u.slice(2),8)}return n*parseInt(u,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!h.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var N=/^[-+]?[0-9]+e/;var _=new A("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!$.test(e)||"_"===e[e.length-1])},construct:function(e){var t,u;return u="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===u?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:u*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||h.isNegativeZero(e))},represent:function(e,t){var u;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(h.isNegativeZero(e))return"-0.0";return u=e.toString(10),N.test(u)?u.replace("e",".e"):u},defaultStyle:"lowercase"}),P=L.extend({implicit:[I,O,U,_]}),q=P,Y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),G=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var W=new A("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==Y.exec(e)||null!==G.exec(e))},construct:function(e){var t,u,n,i,r,o,D,l,s=0,a=null;if(null===(t=Y.exec(e))&&(t=G.exec(e)),null===t)throw new Error("Date resolve error");if(u=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(u,n,i));if(r=+t[4],o=+t[5],D=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(a=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(a=-a)),l=new Date(Date.UTC(u,n,i,r,o,D,s)),a&&l.setTime(l.getTime()-a),l},instanceOf:Date,represent:function(e){return e.toISOString()}});var V=new A("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var H=new A("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,u,n=0,i=e.length,r=z;for(u=0;u<i;u++)if(!((t=r.indexOf(e.charAt(u)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,u,n=e.replace(/[\r\n=]/g,""),i=n.length,r=z,o=0,D=[];for(t=0;t<i;t++)t%4==0&&t&&(D.push(o>>16&255),D.push(o>>8&255),D.push(255&o)),o=o<<6|r.indexOf(n.charAt(t));return 0===(u=i%4*6)?(D.push(o>>16&255),D.push(o>>8&255),D.push(255&o)):18===u?(D.push(o>>10&255),D.push(o>>2&255)):12===u&&D.push(o>>4&255),new Uint8Array(D)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,u,n="",i=0,r=e.length,o=z;for(t=0;t<r;t++)t%3==0&&t&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return 0===(u=r%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===u?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===u&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}}),K=Object.prototype.hasOwnProperty,Z=Object.prototype.toString;var Q=new A("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,u,n,i,r,o=[],D=e;for(t=0,u=D.length;t<u;t+=1){if(n=D[t],r=!1,"[object Object]"!==Z.call(n))return!1;for(i in n)if(K.call(n,i)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0},construct:function(e){return null!==e?e:[]}}),J=Object.prototype.toString;var X=new A("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,u,n,i,r,o=e;for(r=new Array(o.length),t=0,u=o.length;t<u;t+=1){if(n=o[t],"[object Object]"!==J.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;r[t]=[i[0],n[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,u,n,i,r,o=e;for(r=new Array(o.length),t=0,u=o.length;t<u;t+=1)n=o[t],i=Object.keys(n),r[t]=[i[0],n[i[0]]];return r}}),ee=Object.prototype.hasOwnProperty;var te=new A("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,u=e;for(t in u)if(ee.call(u,t)&&null!==u[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),ue=q.extend({implicit:[W,V],explicit:[H,Q,X,te]}),ne=Object.prototype.hasOwnProperty,ie=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,re=/[\x85\u2028\u2029]/,oe=/[,\[\]\{\}]/,De=/^(?:!|!!|![a-z\-]+!)$/i,le=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function se(e){return Object.prototype.toString.call(e)}function ae(e){return 10===e||13===e}function ce(e){return 9===e||32===e}function pe(e){return 9===e||32===e||10===e||13===e}function Fe(e){return 44===e||91===e||93===e||123===e||125===e}function de(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function he(e){return 120===e?2:117===e?4:85===e?8:0}function fe(e){return 48<=e&&e<=57?e-48:-1}function ge(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function Ce(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function me(e,t,u){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:u}):e[t]=u}for(var Ee=new Array(256),be=new Array(256),Be=0;Be<256;Be++)Ee[Be]=ge(Be)?1:0,be[Be]=ge(Be);function ye(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ue,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ae(e,t){var u={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return u.snippet=b(u),new C(t,u)}function ve(e,t){throw Ae(e,t)}function we(e,t){e.onWarning&&e.onWarning.call(null,Ae(e,t))}var xe={YAML:function(e,t,u){var n,i,r;null!==e.version&&ve(e,"duplication of %YAML directive"),1!==u.length&&ve(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(u[0]))&&ve(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),r=parseInt(n[2],10),1!==i&&ve(e,"unacceptable YAML version of the document"),e.version=u[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&we(e,"unsupported YAML version of the document")},TAG:function(e,t,u){var n,i;2!==u.length&&ve(e,"TAG directive accepts exactly two arguments"),n=u[0],i=u[1],De.test(n)||ve(e,"ill-formed tag handle (first argument) of the TAG directive"),ne.call(e.tagMap,n)&&ve(e,'there is a previously declared suffix for "'+n+'" tag handle'),le.test(i)||ve(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){ve(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function ke(e,t,u,n){var i,r,o,D;if(t<u){if(D=e.input.slice(t,u),n)for(i=0,r=D.length;i<r;i+=1)9===(o=D.charCodeAt(i))||32<=o&&o<=1114111||ve(e,"expected valid JSON character");else ie.test(D)&&ve(e,"the stream contains non-printable characters");e.result+=D}}function Se(e,t,u,n){var i,r,o,D;for(h.isObject(u)||ve(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,D=(i=Object.keys(u)).length;o<D;o+=1)r=i[o],ne.call(t,r)||(me(t,r,u[r]),n[r]=!0)}function Te(e,t,u,n,i,r,o,D,l){var s,a;if(Array.isArray(i))for(s=0,a=(i=Array.prototype.slice.call(i)).length;s<a;s+=1)Array.isArray(i[s])&&ve(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===se(i[s])&&(i[s]="[object Object]");if("object"==typeof i&&"[object Object]"===se(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(s=0,a=r.length;s<a;s+=1)Se(e,t,r[s],u);else Se(e,t,r,u);else e.json||ne.call(u,i)||!ne.call(t,i)||(e.line=o||e.line,e.lineStart=D||e.lineStart,e.position=l||e.position,ve(e,"duplicated mapping key")),me(t,i,r),delete u[i];return t}function Le(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):ve(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ie(e,t,u){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;ce(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!ae(i))break;for(Le(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==u&&0!==n&&e.lineIndent<u&&we(e,"deficient indentation"),n}function Oe(e){var t,u=e.position;return!(45!==(t=e.input.charCodeAt(u))&&46!==t||t!==e.input.charCodeAt(u+1)||t!==e.input.charCodeAt(u+2)||(u+=3,0!==(t=e.input.charCodeAt(u))&&!pe(t)))}function je(e,t){1===t?e.result+=" ":t>1&&(e.result+=h.repeat("\n",t-1))}function Re(e,t){var u,n,i=e.tag,r=e.anchor,o=[],D=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ve(e,"tab characters must not be used in indentation")),45===n)&&pe(e.input.charCodeAt(e.position+1));)if(D=!0,e.position++,Ie(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(u=e.line,$e(e,t,3,!1,!0),o.push(e.result),Ie(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===u||e.lineIndent>t)&&0!==n)ve(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!D&&(e.tag=i,e.anchor=r,e.kind="sequence",e.result=o,!0)}function Me(e){var t,u,n,i,r=!1,o=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&ve(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(r=!0,i=e.input.charCodeAt(++e.position)):33===i?(o=!0,u="!!",i=e.input.charCodeAt(++e.position)):u="!",t=e.position,r){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):ve(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!pe(i);)33===i&&(o?ve(e,"tag suffix cannot contain exclamation marks"):(u=e.input.slice(t-1,e.position+1),De.test(u)||ve(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),oe.test(n)&&ve(e,"tag suffix cannot contain flow indicator characters")}n&&!le.test(n)&&ve(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){ve(e,"tag name is malformed: "+n)}return r?e.tag=n:ne.call(e.tagMap,u)?e.tag=e.tagMap[u]+n:"!"===u?e.tag="!"+n:"!!"===u?e.tag="tag:yaml.org,2002:"+n:ve(e,'undeclared tag handle "'+u+'"'),!0}function Ue(e){var t,u;if(38!==(u=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&ve(e,"duplication of an anchor property"),u=e.input.charCodeAt(++e.position),t=e.position;0!==u&&!pe(u)&&!Fe(u);)u=e.input.charCodeAt(++e.position);return e.position===t&&ve(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function $e(e,t,u,n,i){var r,o,D,l,s,a,c,p,F,d=1,f=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=o=D=4===u||3===u,n&&Ie(e,!0,-1)&&(f=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;Me(e)||Ue(e);)Ie(e,!0,-1)?(f=!0,D=r,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):D=!1;if(D&&(D=f||i),1!==d&&4!==u||(p=1===u||2===u?t:t+1,F=e.position-e.lineStart,1===d?D&&(Re(e,F)||function(e,t,u){var n,i,r,o,D,l,s,a=e.tag,c=e.anchor,p={},F=Object.create(null),d=null,h=null,f=null,g=!1,C=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),s=e.input.charCodeAt(e.position);0!==s;){if(g||-1===e.firstTabInLine||(e.position=e.firstTabInLine,ve(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),r=e.line,63!==s&&58!==s||!pe(n)){if(o=e.line,D=e.lineStart,l=e.position,!$e(e,u,2,!1,!0))break;if(e.line===r){for(s=e.input.charCodeAt(e.position);ce(s);)s=e.input.charCodeAt(++e.position);if(58===s)pe(s=e.input.charCodeAt(++e.position))||ve(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Te(e,p,F,d,h,null,o,D,l),d=h=f=null),C=!0,g=!1,i=!1,d=e.tag,h=e.result;else{if(!C)return e.tag=a,e.anchor=c,!0;ve(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return e.tag=a,e.anchor=c,!0;ve(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(g&&(Te(e,p,F,d,h,null,o,D,l),d=h=f=null),C=!0,g=!0,i=!0):g?(g=!1,i=!0):ve(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=n;if((e.line===r||e.lineIndent>t)&&(g&&(o=e.line,D=e.lineStart,l=e.position),$e(e,t,4,!0,i)&&(g?h=e.result:f=e.result),g||(Te(e,p,F,d,h,f,o,D,l),d=h=f=null),Ie(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==s)ve(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&Te(e,p,F,d,h,null,o,D,l),C&&(e.tag=a,e.anchor=c,e.kind="mapping",e.result=p),C}(e,F,p))||function(e,t){var u,n,i,r,o,D,l,s,a,c,p,F,d=!0,h=e.tag,f=e.anchor,g=Object.create(null);if(91===(F=e.input.charCodeAt(e.position)))o=93,s=!1,r=[];else{if(123!==F)return!1;o=125,s=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),F=e.input.charCodeAt(++e.position);0!==F;){if(Ie(e,!0,t),(F=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=h,e.anchor=f,e.kind=s?"mapping":"sequence",e.result=r,!0;d?44===F&&ve(e,"expected the node content, but found ','"):ve(e,"missed comma between flow collection entries"),p=null,D=l=!1,63===F&&pe(e.input.charCodeAt(e.position+1))&&(D=l=!0,e.position++,Ie(e,!0,t)),u=e.line,n=e.lineStart,i=e.position,$e(e,t,1,!1,!0),c=e.tag,a=e.result,Ie(e,!0,t),F=e.input.charCodeAt(e.position),!l&&e.line!==u||58!==F||(D=!0,F=e.input.charCodeAt(++e.position),Ie(e,!0,t),$e(e,t,1,!1,!0),p=e.result),s?Te(e,r,g,c,a,p,u,n,i):D?r.push(Te(e,null,g,c,a,p,u,n,i)):r.push(a),Ie(e,!0,t),44===(F=e.input.charCodeAt(e.position))?(d=!0,F=e.input.charCodeAt(++e.position)):d=!1}ve(e,"unexpected end of the stream within a flow collection")}(e,p)?g=!0:(o&&function(e,t){var u,n,i,r,o=1,D=!1,l=!1,s=t,a=0,c=!1;if(124===(r=e.input.charCodeAt(e.position)))n=!1;else{if(62!==r)return!1;n=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)1===o?o=43===r?3:2:ve(e,"repeat of a chomping mode identifier");else{if(!((i=fe(r))>=0))break;0===i?ve(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?ve(e,"repeat of an indentation width identifier"):(s=t+i-1,l=!0)}if(ce(r)){do{r=e.input.charCodeAt(++e.position)}while(ce(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!ae(r)&&0!==r)}for(;0!==r;){for(Le(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!l||e.lineIndent<s)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>s&&(s=e.lineIndent),ae(r))a++;else{if(e.lineIndent<s){3===o?e.result+=h.repeat("\n",D?1+a:a):1===o&&D&&(e.result+="\n");break}for(n?ce(r)?(c=!0,e.result+=h.repeat("\n",D?1+a:a)):c?(c=!1,e.result+=h.repeat("\n",a+1)):0===a?D&&(e.result+=" "):e.result+=h.repeat("\n",a):e.result+=h.repeat("\n",D?1+a:a),D=!0,l=!0,a=0,u=e.position;!ae(r)&&0!==r;)r=e.input.charCodeAt(++e.position);ke(e,u,e.position,!1)}}return!0}(e,p)||function(e,t){var u,n,i;if(39!==(u=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(u=e.input.charCodeAt(e.position));)if(39===u){if(ke(e,n,e.position,!0),39!==(u=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else ae(u)?(ke(e,n,i,!0),je(e,Ie(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Oe(e)?ve(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);ve(e,"unexpected end of the stream within a single quoted scalar")}(e,p)||function(e,t){var u,n,i,r,o,D;if(34!==(D=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,u=n=e.position;0!==(D=e.input.charCodeAt(e.position));){if(34===D)return ke(e,u,e.position,!0),e.position++,!0;if(92===D){if(ke(e,u,e.position,!0),ae(D=e.input.charCodeAt(++e.position)))Ie(e,!1,t);else if(D<256&&Ee[D])e.result+=be[D],e.position++;else if((o=he(D))>0){for(i=o,r=0;i>0;i--)(o=de(D=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+o:ve(e,"expected hexadecimal character");e.result+=Ce(r),e.position++}else ve(e,"unknown escape sequence");u=n=e.position}else ae(D)?(ke(e,u,n,!0),je(e,Ie(e,!1,t)),u=n=e.position):e.position===e.lineStart&&Oe(e)?ve(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ve(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?g=!0:!function(e){var t,u,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!pe(n)&&!Fe(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ve(e,"name of an alias node must contain at least one character"),u=e.input.slice(t,e.position),ne.call(e.anchorMap,u)||ve(e,'unidentified alias "'+u+'"'),e.result=e.anchorMap[u],Ie(e,!0,-1),!0}(e)?function(e,t,u){var n,i,r,o,D,l,s,a,c=e.kind,p=e.result;if(pe(a=e.input.charCodeAt(e.position))||Fe(a)||35===a||38===a||42===a||33===a||124===a||62===a||39===a||34===a||37===a||64===a||96===a)return!1;if((63===a||45===a)&&(pe(n=e.input.charCodeAt(e.position+1))||u&&Fe(n)))return!1;for(e.kind="scalar",e.result="",i=r=e.position,o=!1;0!==a;){if(58===a){if(pe(n=e.input.charCodeAt(e.position+1))||u&&Fe(n))break}else if(35===a){if(pe(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Oe(e)||u&&Fe(a))break;if(ae(a)){if(D=e.line,l=e.lineStart,s=e.lineIndent,Ie(e,!1,-1),e.lineIndent>=t){o=!0,a=e.input.charCodeAt(e.position);continue}e.position=r,e.line=D,e.lineStart=l,e.lineIndent=s;break}}o&&(ke(e,i,r,!1),je(e,e.line-D),i=r=e.position,o=!1),ce(a)||(r=e.position+1),a=e.input.charCodeAt(++e.position)}return ke(e,i,r,!1),!!e.result||(e.kind=c,e.result=p,!1)}(e,p,1===u)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||ve(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=D&&Re(e,F))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ve(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,s=e.implicitTypes.length;l<s;l+=1)if((c=e.implicitTypes[l]).resolve(e.result)){e.result=c.construct(e.result),e.tag=c.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ne.call(e.typeMap[e.kind||"fallback"],e.tag))c=e.typeMap[e.kind||"fallback"][e.tag];else for(c=null,l=0,s=(a=e.typeMap.multi[e.kind||"fallback"]).length;l<s;l+=1)if(e.tag.slice(0,a[l].tag.length)===a[l].tag){c=a[l];break}c||ve(e,"unknown tag !<"+e.tag+">"),null!==e.result&&c.kind!==e.kind&&ve(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result,e.tag)?(e.result=c.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ve(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function Ne(e){var t,u,n,i,r=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(Ie(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!pe(i);)i=e.input.charCodeAt(++e.position);for(n=[],(u=e.input.slice(t,e.position)).length<1&&ve(e,"directive name must not be less than one character in length");0!==i;){for(;ce(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!ae(i));break}if(ae(i))break;for(t=e.position;0!==i&&!pe(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&Le(e),ne.call(xe,u)?xe[u](e,u,n):we(e,'unknown document directive "'+u+'"')}Ie(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Ie(e,!0,-1)):o&&ve(e,"directives end mark is expected"),$e(e,e.lineIndent-1,4,!1,!0),Ie(e,!0,-1),e.checkLineBreaks&&re.test(e.input.slice(r,e.position))&&we(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Oe(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Ie(e,!0,-1)):e.position<e.length-1&&ve(e,"end of the stream or a document separator is expected")}function _e(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var u=new ye(e,t),n=e.indexOf("\0");for(-1!==n&&(u.position=n,ve(u,"null byte is not allowed in input")),u.input+="\0";32===u.input.charCodeAt(u.position);)u.lineIndent+=1,u.position+=1;for(;u.position<u.length-1;)Ne(u);return u.documents}var Pe={loadAll:function(e,t,u){null!==t&&"object"==typeof t&&void 0===u&&(u=t,t=null);var n=_e(e,u);if("function"!=typeof t)return n;for(var i=0,r=n.length;i<r;i+=1)t(n[i])},load:function(e,t){var u=_e(e,t);if(0!==u.length){if(1===u.length)return u[0];throw new C("expected a single document in the stream, but found more")}}},qe=Object.prototype.toString,Ye=Object.prototype.hasOwnProperty,Ge=65279,We={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Ve=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ze=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function He(e){var t,u,n;if(t=e.toString(16).toUpperCase(),e<=255)u="x",n=2;else if(e<=65535)u="u",n=4;else{if(!(e<=4294967295))throw new C("code point within a string may not be greater than 0xFFFFFFFF");u="U",n=8}return"\\"+u+h.repeat("0",n-t.length)+t}function Ke(e){this.schema=e.schema||ue,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=h.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var u,n,i,r,o,D,l;if(null===t)return{};for(u={},i=0,r=(n=Object.keys(t)).length;i<r;i+=1)o=n[i],D=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=e.compiledTypeMap.fallback[o])&&Ye.call(l.styleAliases,D)&&(D=l.styleAliases[D]),u[o]=D;return u}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ze(e,t){for(var u,n=h.repeat(" ",t),i=0,r=-1,o="",D=e.length;i<D;)-1===(r=e.indexOf("\n",i))?(u=e.slice(i),i=D):(u=e.slice(i,r+1),i=r+1),u.length&&"\n"!==u&&(o+=n),o+=u;return o}function Qe(e,t){return"\n"+h.repeat(" ",e.indent*t)}function Je(e){return 32===e||9===e}function Xe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Ge||65536<=e&&e<=1114111}function et(e){return Xe(e)&&e!==Ge&&13!==e&&10!==e}function tt(e,t,u){var n=et(e),i=n&&!Je(e);return(u?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||et(t)&&!Je(t)&&35===e||58===t&&i}function ut(e,t){var u,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(u=e.charCodeAt(t+1))>=56320&&u<=57343?1024*(n-55296)+u-56320+65536:n}function nt(e){return/^\n* /.test(e)}function it(e,t,u,n,i,r,o,D){var l,s,a=0,c=null,p=!1,F=!1,d=-1!==n,h=-1,f=Xe(s=ut(e,0))&&s!==Ge&&!Je(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!Je(e)&&58!==e}(ut(e,e.length-1));if(t||o)for(l=0;l<e.length;a>=65536?l+=2:l++){if(!Xe(a=ut(e,l)))return 5;f=f&&tt(a,c,D),c=a}else{for(l=0;l<e.length;a>=65536?l+=2:l++){if(10===(a=ut(e,l)))p=!0,d&&(F=F||l-h-1>n&&" "!==e[h+1],h=l);else if(!Xe(a))return 5;f=f&&tt(a,c,D),c=a}F=F||d&&l-h-1>n&&" "!==e[h+1]}return p||F?u>9&&nt(e)?5:o?2===r?5:2:F?4:3:!f||o||i(e)?2===r?5:2:1}function rt(e,t,u,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Ve.indexOf(t)||ze.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var r=e.indent*Math.max(1,u),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),D=n||e.flowLevel>-1&&u>=e.flowLevel;switch(it(t,D,e.indent,o,function(t){return function(e,t){var u,n;for(u=0,n=e.implicitTypes.length;u<n;u+=1)if(e.implicitTypes[u].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!n,i)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+ot(t,e.indent)+Dt(Ze(t,r));case 4:return">"+ot(t,e.indent)+Dt(Ze(function(e,t){var u,n,i=/(\n+)([^\n]*)/g,r=(D=e.indexOf("\n"),D=-1!==D?D:e.length,i.lastIndex=D,lt(e.slice(0,D),t)),o="\n"===e[0]||" "===e[0];var D;for(;n=i.exec(e);){var l=n[1],s=n[2];u=" "===s[0],r+=l+(o||u||""===s?"":"\n")+lt(s,t),o=u}return r}(t,o),r));case 5:return'"'+function(e){for(var t,u="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=ut(e,i),!(t=We[n])&&Xe(n)?(u+=e[i],n>=65536&&(u+=e[i+1])):u+=t||He(n);return u}(t)+'"';default:throw new C("impossible error: invalid scalar style")}}()}function ot(e,t){var u=nt(e)?String(t):"",n="\n"===e[e.length-1];return u+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function Dt(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function lt(e,t){if(""===e||" "===e[0])return e;for(var u,n,i=/ [^ ]/g,r=0,o=0,D=0,l="";u=i.exec(e);)(D=u.index)-r>t&&(n=o>r?o:D,l+="\n"+e.slice(r,n),r=n+1),o=D;return l+="\n",e.length-r>t&&o>r?l+=e.slice(r,o)+"\n"+e.slice(o+1):l+=e.slice(r),l.slice(1)}function st(e,t,u,n){var i,r,o,D="",l=e.tag;for(i=0,r=u.length;i<r;i+=1)o=u[i],e.replacer&&(o=e.replacer.call(u,String(i),o)),(ct(e,t+1,o,!0,!0,!1,!0)||void 0===o&&ct(e,t+1,null,!0,!0,!1,!0))&&(n&&""===D||(D+=Qe(e,t)),e.dump&&10===e.dump.charCodeAt(0)?D+="-":D+="- ",D+=e.dump);e.tag=l,e.dump=D||"[]"}function at(e,t,u){var n,i,r,o,D,l;for(r=0,o=(i=u?e.explicitTypes:e.implicitTypes).length;r<o;r+=1)if(((D=i[r]).instanceOf||D.predicate)&&(!D.instanceOf||"object"==typeof t&&t instanceof D.instanceOf)&&(!D.predicate||D.predicate(t))){if(u?D.multi&&D.representName?e.tag=D.representName(t):e.tag=D.tag:e.tag="?",D.represent){if(l=e.styleMap[D.tag]||D.defaultStyle,"[object Function]"===qe.call(D.represent))n=D.represent(t,l);else{if(!Ye.call(D.represent,l))throw new C("!<"+D.tag+'> tag resolver accepts not "'+l+'" style');n=D.represent[l](t,l)}e.dump=n}return!0}return!1}function ct(e,t,u,n,i,r,o){e.tag=null,e.dump=u,at(e,u,!1)||at(e,u,!0);var D,l=qe.call(e.dump),s=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var a,c,p="[object Object]"===l||"[object Array]"===l;if(p&&(c=-1!==(a=e.duplicates.indexOf(u))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(i=!1),c&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(p&&c&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===l)n&&0!==Object.keys(e.dump).length?(!function(e,t,u,n){var i,r,o,D,l,s,a="",c=e.tag,p=Object.keys(u);if(!0===e.sortKeys)p.sort();else if("function"==typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new C("sortKeys must be a boolean or a function");for(i=0,r=p.length;i<r;i+=1)s="",n&&""===a||(s+=Qe(e,t)),D=u[o=p[i]],e.replacer&&(D=e.replacer.call(u,o,D)),ct(e,t+1,o,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,l&&(s+=Qe(e,t)),ct(e,t+1,D,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?s+=":":s+=": ",a+=s+=e.dump));e.tag=c,e.dump=a||"{}"}(e,t,e.dump,i),c&&(e.dump="&ref_"+a+e.dump)):(!function(e,t,u){var n,i,r,o,D,l="",s=e.tag,a=Object.keys(u);for(n=0,i=a.length;n<i;n+=1)D="",""!==l&&(D+=", "),e.condenseFlow&&(D+='"'),o=u[r=a[n]],e.replacer&&(o=e.replacer.call(u,r,o)),ct(e,t,r,!1,!1)&&(e.dump.length>1024&&(D+="? "),D+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ct(e,t,o,!1,!1)&&(l+=D+=e.dump));e.tag=s,e.dump="{"+l+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===l)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?st(e,t-1,e.dump,i):st(e,t,e.dump,i),c&&(e.dump="&ref_"+a+e.dump)):(!function(e,t,u){var n,i,r,o="",D=e.tag;for(n=0,i=u.length;n<i;n+=1)r=u[n],e.replacer&&(r=e.replacer.call(u,String(n),r)),(ct(e,t,r,!1,!1)||void 0===r&&ct(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=D,e.dump="["+o+"]"}(e,t,e.dump),c&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(e.skipInvalid)return!1;throw new C("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&rt(e,e.dump,t,r,s)}null!==e.tag&&"?"!==e.tag&&(D=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),D="!"===e.tag[0]?"!"+D:"tag:yaml.org,2002:"===D.slice(0,18)?"!!"+D.slice(18):"!<"+D+">",e.dump=D+" "+e.dump)}return!0}function pt(e,t){var u,n,i=[],r=[];for(Ft(e,i,r),u=0,n=r.length;u<n;u+=1)t.duplicates.push(i[r[u]]);t.usedDuplicates=new Array(n)}function Ft(e,t,u){var n,i,r;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===u.indexOf(i)&&u.push(i);else if(t.push(e),Array.isArray(e))for(i=0,r=e.length;i<r;i+=1)Ft(e[i],t,u);else for(i=0,r=(n=Object.keys(e)).length;i<r;i+=1)Ft(e[n[i]],t,u)}function dt(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var ht={Type:A,Schema:x,FAILSAFE_SCHEMA:L,JSON_SCHEMA:P,CORE_SCHEMA:q,DEFAULT_SCHEMA:ue,load:Pe.load,loadAll:Pe.loadAll,dump:{dump:function(e,t){var u=new Ke(t=t||{});u.noRefs||pt(e,u);var n=e;return u.replacer&&(n=u.replacer.call({"":n},"",n)),ct(u,0,n,!0,!0)?u.dump+"\n":""}}.dump,YAMLException:C,types:{binary:H,float:_,map:T,null:I,pairs:X,set:te,timestamp:W,bool:O,int:U,merge:V,omap:Q,seq:S,str:k},safeLoad:dt("safeLoad","load"),safeLoadAll:dt("safeLoadAll","loadAll"),safeDump:dt("safeDump","dump")};const ft=(e,t=[])=>"up"===e.name||t.includes("vim")&&"k"===e.name||t.includes("emacs")&&e.ctrl&&"p"===e.name,gt=(e,t=[])=>"down"===e.name||t.includes("vim")&&"j"===e.name||t.includes("emacs")&&e.ctrl&&"n"===e.name,Ct=e=>"1234567890".includes(e.name),mt=e=>"enter"===e.name||"return"===e.name;class Et extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}}class bt extends Error{name="CancelPromptError";message="Prompt was canceled"}class Bt extends Error{name="ExitPromptError"}class yt extends Error{name="HookError"}class At extends Error{name="ValidationError"}const vt=new D.AsyncLocalStorage;function wt(){const e=vt.getStore();if(!e)throw new yt("[Inquirer] Hook functions can only be called from within a prompt");return e}function xt(){return wt().rl}function kt(e){return D.AsyncResource.bind((...t)=>{const u=wt();let n=!1;const i=u.handleChange;u.handleChange=()=>{n=!0};const r=e(...t);return n&&i(),u.handleChange=i,r})}function St(e){const t=wt(),{index:u}=t,n=e({get:()=>t.hooks[u],set(e){t.hooks[u]=e},initialized:u in t.hooks});return t.index++,n}const Tt={queue(e){const t=wt(),{index:u}=t;t.hooksEffect.push(()=>{t.hooksCleanup[u]?.();const n=e(xt());if(null!=n&&"function"!=typeof n)throw new At("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[u]=n})},run(){const e=wt();kt(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){const e=wt();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function Lt(e){return St(t=>{const u=D.AsyncResource.bind(function(e){t.get()!==e&&(t.set(e),wt().handleChange())});if(t.initialized)return[t.get(),u];const n="function"==typeof e?e():e;return t.set(n),[n,u]})}function It(e,t){St(u=>{const n=u.get(),i=!Array.isArray(n)||t.some((e,t)=>!Object.is(e,n[t]));i&&Tt.queue(e),u.set(t)})}const Ot={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},jt={...Ot,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},Rt={...Ot,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Mt=("win32"!==r.platform?"linux"!==r.env.TERM:Boolean(r.env.WT_SESSION)||Boolean(r.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===r.env.ConEmuTask||"Terminus-Sublime"===r.env.TERM_PROGRAM||"vscode"===r.env.TERM_PROGRAM||"xterm-256color"===r.env.TERM||"alacritty"===r.env.TERM||"JetBrains-JediTerm"===r.env.TERMINAL_EMULATOR)?jt:Rt,Ut={prefix:{idle:i.styleText("blue","?"),done:i.styleText("green",Mt.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>i.styleText("yellow",e))},style:{answer:e=>i.styleText("cyan",e),message:e=>i.styleText("bold",e),error:e=>i.styleText("red",`> ${e}`),defaultAnswer:e=>i.styleText("dim",`(${e})`),help:e=>i.styleText("dim",e),highlight:e=>i.styleText("cyan",e),key:e=>i.styleText("cyan",i.styleText("bold",`<${e}>`))}};function $t(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Nt(...e){const t={};for(const u of e)for(const[e,n]of Object.entries(u)){const u=t[e];t[e]=$t(u)&&$t(n)?Nt(u,n):n}return t}function _t(...e){return Nt(...[Ut,...e.filter(e=>null!=e)])}function Pt({status:e="idle",theme:t}){const[u,n]=Lt(!1),[i,r]=Lt(0),{prefix:o,spinner:D}=_t(t);if(It(()=>{if("loading"===e){let e,t=-1;const u=setTimeout(()=>{n(!0),e=setInterval(()=>{t+=1,r(t%D.frames.length)},D.interval)},300);return()=>{clearTimeout(u),clearInterval(e)}}n(!1)},[e]),u)return D.frames[i];return"string"==typeof o?o:o["loading"===e?"idle":e]??o.idle}function qt(e,t){return St(u=>{const n=u.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((e,u)=>e!==t[u])){const n=e();return u.set({value:n,dependencies:t}),n}return n.value})}function Yt(e){return Lt({current:e})[0]}function Gt(e){const t=Yt(e);t.current=e,It(e=>{let u=!1;const n=kt((n,i)=>{u||t.current(i,e)});return e.input.on("keypress",n),()=>{u=!0,e.input.removeListener("keypress",n)}},[])}function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt,zt;var Ht=Wt(zt?Vt:(zt=1,Vt=function(e){const t=function(e){const t={defaultWidth:0,output:process.stdout,tty:s};return e?(Object.keys(t).forEach(function(u){e[u]||(e[u]=t[u])}),e):t}(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){const e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&0!==e)return e}return t.defaultWidth}));const Kt=function({onlyFirst:e=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}();function Zt(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Kt,"")}function Qt(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Numbe