UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

33 lines (31 loc) • 47.3 kB
import{a as r}from"./chunk-V3YWWTDH.mjs";function Jn(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}r(Jn,"getDefaultExportFromCjs");var P={},ke={},z={},fn;function me(){if(fn)return z;fn=1;function w(d){return typeof d>"u"||d===null}r(w,"isNothing");function _(d){return typeof d=="object"&&d!==null}r(_,"isObject");function E(d){return Array.isArray(d)?d:w(d)?[]:[d]}r(E,"toArray");function R(d,s){if(s){let T=Object.keys(s);for(let t=0,f=T.length;t<f;t+=1){let S=T[t];d[S]=s[S]}}return d}r(R,"extend");function m(d,s){let T="";for(let t=0;t<s;t+=1)T+=d;return T}r(m,"repeat");function y(d){return d===0&&Number.NEGATIVE_INFINITY===1/d}return r(y,"isNegativeZero"),z.isNothing=w,z.isObject=_,z.toArray=E,z.repeat=m,z.isNegativeZero=y,z.extend=R,z}r(me,"requireCommon");var De,pn;function ge(){if(pn)return De;pn=1;function w(E,R){let m="",y=E.reason||"(unknown reason)";return E.mark?(E.mark.name&&(m+='in "'+E.mark.name+'" '),m+="("+(E.mark.line+1)+":"+(E.mark.column+1)+")",!R&&E.mark.snippet&&(m+=` `+E.mark.snippet),y+" "+m):y}r(w,"formatError");function _(E,R){Error.call(this),this.name="YAMLException",this.reason=E,this.mark=R,this.message=w(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return r(_,"YAMLException2"),_.prototype=Object.create(Error.prototype),_.prototype.constructor=_,_.prototype.toString=r(function(R){return this.name+": "+w(this,R)},"toString"),De=_,De}r(ge,"requireException");var je,an;function Zn(){if(an)return je;an=1;let w=me();function _(m,y,d,s,T){let t="",f="",S=Math.floor(T/2)-1;return s-y>S&&(t=" ... ",y=s-S+t.length),d-s>S&&(f=" ...",d=s+S-f.length),{str:t+m.slice(y,d).replace(/\t/g,"\u2192")+f,pos:s-y+t.length}}r(_,"getLine");function E(m,y){return w.repeat(" ",y-m.length)+m}r(E,"padStart");function R(m,y){if(y=Object.create(y||null),!m.buffer)return null;y.maxLength||(y.maxLength=79),typeof y.indent!="number"&&(y.indent=1),typeof y.linesBefore!="number"&&(y.linesBefore=3),typeof y.linesAfter!="number"&&(y.linesAfter=2);let d=/\r?\n|\r|\0/g,s=[0],T=[],t,f=-1;for(;t=d.exec(m.buffer);)T.push(t.index),s.push(t.index+t[0].length),m.position<=t.index&&f<0&&(f=s.length-2);f<0&&(f=s.length-1);let S="",k=Math.min(m.line+y.linesAfter,T.length).toString().length,M=y.maxLength-(y.indent+k+3);for(let v=1;v<=y.linesBefore&&!(f-v<0);v++){let U=_(m.buffer,s[f-v],T[f-v],m.position-(s[f]-s[f-v]),M);S=w.repeat(" ",y.indent)+E((m.line-v+1).toString(),k)+" | "+U.str+` `+S}let Q=_(m.buffer,s[f],T[f],m.position,M);S+=w.repeat(" ",y.indent)+E((m.line+1).toString(),k)+" | "+Q.str+` `,S+=w.repeat("-",y.indent+k+3+Q.pos)+`^ `;for(let v=1;v<=y.linesAfter&&!(f+v>=T.length);v++){let U=_(m.buffer,s[f+v],T[f+v],m.position-(s[f]-s[f+v]),M);S+=w.repeat(" ",y.indent)+E((m.line+v+1).toString(),k)+" | "+U.str+` `}return S.replace(/\n$/,"")}return r(R,"makeSnippet"),je=R,je}r(Zn,"requireSnippet");var He,sn;function D(){if(sn)return He;sn=1;let w=ge(),_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],E=["scalar","sequence","mapping"];function R(y){let d={};return y!==null&&Object.keys(y).forEach(function(s){y[s].forEach(function(T){d[String(T)]=s})}),d}r(R,"compileStyleAliases");function m(y,d){if(d=d||{},Object.keys(d).forEach(function(s){if(_.indexOf(s)===-1)throw new w('Unknown option "'+s+'" is met in definition of "'+y+'" YAML type.')}),this.options=d,this.tag=y,this.kind=d.kind||null,this.resolve=d.resolve||function(){return!0},this.construct=d.construct||function(s){return s},this.instanceOf=d.instanceOf||null,this.predicate=d.predicate||null,this.represent=d.represent||null,this.representName=d.representName||null,this.defaultStyle=d.defaultStyle||null,this.multi=d.multi||!1,this.styleAliases=R(d.styleAliases||null),E.indexOf(this.kind)===-1)throw new w('Unknown kind "'+this.kind+'" is specified for "'+y+'" YAML type.')}return r(m,"Type2"),He=m,He}r(D,"requireType");var Be,hn;function vn(){if(hn)return Be;hn=1;let w=ge(),_=D();function E(y,d){let s=[];return y[d].forEach(function(T){let t=s.length;s.forEach(function(f,S){f.tag===T.tag&&f.kind===T.kind&&f.multi===T.multi&&(t=S)}),s[t]=T}),s}r(E,"compileList");function R(){let y={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function d(s){s.multi?(y.multi[s.kind].push(s),y.multi.fallback.push(s)):y[s.kind][s.tag]=y.fallback[s.tag]=s}r(d,"collectType");for(let s=0,T=arguments.length;s<T;s+=1)arguments[s].forEach(d);return y}r(R,"compileMap");function m(y){return this.extend(y)}return r(m,"Schema2"),m.prototype.extend=r(function(d){let s=[],T=[];if(d instanceof _)T.push(d);else if(Array.isArray(d))T=T.concat(d);else if(d&&(Array.isArray(d.implicit)||Array.isArray(d.explicit)))d.implicit&&(s=s.concat(d.implicit)),d.explicit&&(T=T.concat(d.explicit));else throw new w("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");s.forEach(function(f){if(!(f instanceof _))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new w("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new w("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),T.forEach(function(f){if(!(f instanceof _))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let t=Object.create(m.prototype);return t.implicit=(this.implicit||[]).concat(s),t.explicit=(this.explicit||[]).concat(T),t.compiledImplicit=E(t,"implicit"),t.compiledExplicit=E(t,"explicit"),t.compiledTypeMap=R(t.compiledImplicit,t.compiledExplicit),t},"extend"),Be=m,Be}r(vn,"requireSchema");var Ue,dn;function Fn(){if(dn)return Ue;dn=1;let w=D();return Ue=new w("tag:yaml.org,2002:str",{kind:"scalar",construct:r(function(_){return _!==null?_:""},"construct")}),Ue}r(Fn,"requireStr");var Ke,mn;function qn(){if(mn)return Ke;mn=1;let w=D();return Ke=new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:r(function(_){return _!==null?_:[]},"construct")}),Ke}r(qn,"requireSeq");var Ge,gn;function Yn(){if(gn)return Ge;gn=1;let w=D();return Ge=new w("tag:yaml.org,2002:map",{kind:"mapping",construct:r(function(_){return _!==null?_:{}},"construct")}),Ge}r(Yn,"requireMap");var We,An;function Pn(){if(An)return We;An=1;let w=vn();return We=new w({explicit:[Fn(),qn(),Yn()]}),We}r(Pn,"requireFailsafe");var Qe,yn;function Dn(){if(yn)return Qe;yn=1;let w=D();function _(m){if(m===null)return!0;let y=m.length;return y===1&&m==="~"||y===4&&(m==="null"||m==="Null"||m==="NULL")}r(_,"resolveYamlNull");function E(){return null}r(E,"constructYamlNull");function R(m){return m===null}return r(R,"isNull"),Qe=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:_,construct:E,predicate:R,represent:{canonical:r(function(){return"~"},"canonical"),lowercase:r(function(){return"null"},"lowercase"),uppercase:r(function(){return"NULL"},"uppercase"),camelcase:r(function(){return"Null"},"camelcase"),empty:r(function(){return""},"empty")},defaultStyle:"lowercase"}),Qe}r(Dn,"require_null");var Ve,Cn;function jn(){if(Cn)return Ve;Cn=1;let w=D();function _(m){if(m===null)return!1;let y=m.length;return y===4&&(m==="true"||m==="True"||m==="TRUE")||y===5&&(m==="false"||m==="False"||m==="FALSE")}r(_,"resolveYamlBoolean");function E(m){return m==="true"||m==="True"||m==="TRUE"}r(E,"constructYamlBoolean");function R(m){return Object.prototype.toString.call(m)==="[object Boolean]"}return r(R,"isBoolean"),Ve=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_,construct:E,predicate:R,represent:{lowercase:r(function(m){return m?"true":"false"},"lowercase"),uppercase:r(function(m){return m?"TRUE":"FALSE"},"uppercase"),camelcase:r(function(m){return m?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Ve}r(jn,"requireBool");var Xe,Sn;function Hn(){if(Sn)return Xe;Sn=1;let w=me(),_=D();function E(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}r(E,"isHexCode");function R(t){return t>=48&&t<=55}r(R,"isOctCode");function m(t){return t>=48&&t<=57}r(m,"isDecCode");function y(t){if(t===null)return!1;let f=t.length,S=0,k=!1;if(!f)return!1;let M=t[S];if((M==="-"||M==="+")&&(M=t[++S]),M==="0"){if(S+1===f)return!0;if(M=t[++S],M==="b"){for(S++;S<f;S++){if(M=t[S],M!=="0"&&M!=="1")return!1;k=!0}return k&&isFinite(d(t))}if(M==="x"){for(S++;S<f;S++){if(!E(t.charCodeAt(S)))return!1;k=!0}return k&&isFinite(d(t))}if(M==="o"){for(S++;S<f;S++){if(!R(t.charCodeAt(S)))return!1;k=!0}return k&&isFinite(d(t))}}for(;S<f;S++){if(!m(t.charCodeAt(S)))return!1;k=!0}return k?isFinite(d(t)):!1}r(y,"resolveYamlInteger");function d(t){let f=t,S=1,k=f[0];if((k==="-"||k==="+")&&(k==="-"&&(S=-1),f=f.slice(1),k=f[0]),f==="0")return 0;if(k==="0"){if(f[1]==="b")return S*parseInt(f.slice(2),2);if(f[1]==="x")return S*parseInt(f.slice(2),16);if(f[1]==="o")return S*parseInt(f.slice(2),8)}return S*parseInt(f,10)}r(d,"parseYamlInteger");function s(t){return d(t)}r(s,"constructYamlInteger");function T(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!w.isNegativeZero(t)}return r(T,"isInteger"),Xe=new _("tag:yaml.org,2002:int",{kind:"scalar",resolve:y,construct:s,predicate:T,represent:{binary:r(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:r(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:r(function(t){return t.toString(10)},"decimal"),hexadecimal:r(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Xe}r(Hn,"requireInt");var $e,Tn;function Bn(){if(Tn)return $e;Tn=1;let w=me(),_=D(),E=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),R=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function m(t){return t===null||!E.test(t)?!1:isFinite(parseFloat(t,10))?!0:R.test(t)}r(m,"resolveYamlFloat");function y(t){let f=t.toLowerCase(),S=f[0]==="-"?-1:1;return"+-".indexOf(f[0])>=0&&(f=f.slice(1)),f===".inf"?S===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:f===".nan"?NaN:S*parseFloat(f,10)}r(y,"constructYamlFloat");let d=/^[-+]?[0-9]+e/;function s(t,f){if(isNaN(t))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(w.isNegativeZero(t))return"-0.0";let S=t.toString(10);return d.test(S)?S.replace("e",".e"):S}r(s,"representYamlFloat");function T(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||w.isNegativeZero(t))}return r(T,"isFloat"),$e=new _("tag:yaml.org,2002:float",{kind:"scalar",resolve:m,construct:y,predicate:T,represent:s,defaultStyle:"lowercase"}),$e}r(Bn,"requireFloat");var Je,wn;function Un(){return wn||(wn=1,Je=Pn().extend({implicit:[Dn(),jn(),Hn(),Bn()]})),Je}r(Un,"requireJson");var Ze,bn;function Kn(){return bn||(bn=1,Ze=Un()),Ze}r(Kn,"requireCore");var ze,xn;function Gn(){if(xn)return ze;xn=1;let w=D(),_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),E=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]))?))?$");function R(d){return d===null?!1:_.exec(d)!==null||E.exec(d)!==null}r(R,"resolveYamlTimestamp");function m(d){let s=0,T=null,t=_.exec(d);if(t===null&&(t=E.exec(d)),t===null)throw new Error("Date resolve error");let f=+t[1],S=+t[2]-1,k=+t[3];if(!t[4])return new Date(Date.UTC(f,S,k));let M=+t[4],Q=+t[5],v=+t[6];if(t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}if(t[9]){let ee=+t[10],j=+(t[11]||0);T=(ee*60+j)*6e4,t[9]==="-"&&(T=-T)}let U=new Date(Date.UTC(f,S,k,M,Q,v,s));return T&&U.setTime(U.getTime()-T),U}r(m,"constructYamlTimestamp");function y(d){return d.toISOString()}return r(y,"representYamlTimestamp"),ze=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:R,construct:m,instanceOf:Date,represent:y}),ze}r(Gn,"requireTimestamp");var en,_n;function Wn(){if(_n)return en;_n=1;let w=D();function _(E){return E==="<<"||E===null}return r(_,"resolveYamlMerge"),en=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_}),en}r(Wn,"requireMerge");var nn,En;function Qn(){if(En)return nn;En=1;let w=D(),_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function E(d){if(d===null)return!1;let s=0,T=d.length,t=_;for(let f=0;f<T;f++){let S=t.indexOf(d.charAt(f));if(!(S>64)){if(S<0)return!1;s+=6}}return s%8===0}r(E,"resolveYamlBinary");function R(d){let s=d.replace(/[\r\n=]/g,""),T=s.length,t=_,f=0,S=[];for(let M=0;M<T;M++)M%4===0&&M&&(S.push(f>>16&255),S.push(f>>8&255),S.push(f&255)),f=f<<6|t.indexOf(s.charAt(M));let k=T%4*6;return k===0?(S.push(f>>16&255),S.push(f>>8&255),S.push(f&255)):k===18?(S.push(f>>10&255),S.push(f>>2&255)):k===12&&S.push(f>>4&255),new Uint8Array(S)}r(R,"constructYamlBinary");function m(d){let s="",T=0,t=d.length,f=_;for(let k=0;k<t;k++)k%3===0&&k&&(s+=f[T>>18&63],s+=f[T>>12&63],s+=f[T>>6&63],s+=f[T&63]),T=(T<<8)+d[k];let S=t%3;return S===0?(s+=f[T>>18&63],s+=f[T>>12&63],s+=f[T>>6&63],s+=f[T&63]):S===2?(s+=f[T>>10&63],s+=f[T>>4&63],s+=f[T<<2&63],s+=f[64]):S===1&&(s+=f[T>>2&63],s+=f[T<<4&63],s+=f[64],s+=f[64]),s}r(m,"representYamlBinary");function y(d){return Object.prototype.toString.call(d)==="[object Uint8Array]"}return r(y,"isBinary"),nn=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:E,construct:R,predicate:y,represent:m}),nn}r(Qn,"requireBinary");var rn,In;function Vn(){if(In)return rn;In=1;let w=D(),_=Object.prototype.hasOwnProperty,E=Object.prototype.toString;function R(y){if(y===null)return!0;let d={},s=y;for(let T=0,t=s.length;T<t;T+=1){let f=s[T],S=!1;if(E.call(f)!=="[object Object]")return!1;let k;for(k in f)if(_.call(f,k))if(!S)S=!0;else return!1;if(!S||_.call(d,k))return!1;Object.defineProperty(d,k,{value:!0})}return!0}r(R,"resolveYamlOmap");function m(y){return y!==null?y:[]}return r(m,"constructYamlOmap"),rn=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:R,construct:m}),rn}r(Vn,"requireOmap");var ln,On;function Xn(){if(On)return ln;On=1;let w=D(),_=Object.prototype.toString;function E(m){if(m===null)return!0;let y=m,d=new Array(y.length);for(let s=0,T=y.length;s<T;s+=1){let t=y[s];if(_.call(t)!=="[object Object]")return!1;let f=Object.keys(t);if(f.length!==1)return!1;d[s]=[f[0],t[f[0]]]}return!0}r(E,"resolveYamlPairs");function R(m){if(m===null)return[];let y=m,d=new Array(y.length);for(let s=0,T=y.length;s<T;s+=1){let t=y[s],f=Object.keys(t);d[s]=[f[0],t[f[0]]]}return d}return r(R,"constructYamlPairs"),ln=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:E,construct:R}),ln}r(Xn,"requirePairs");var on,kn;function $n(){if(kn)return on;kn=1;let w=D(),_=Object.prototype.hasOwnProperty;function E(m){if(m===null)return!0;let y=m;for(let d in y)if(_.call(y,d)&&y[d]!==null)return!1;return!0}r(E,"resolveYamlSet");function R(m){return m!==null?m:{}}return r(R,"constructYamlSet"),on=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:E,construct:R}),on}r($n,"requireSet");var tn,Ln;function un(){return Ln||(Ln=1,tn=Kn().extend({implicit:[Gn(),Wn()],explicit:[Qn(),Vn(),Xn(),$n()]})),tn}r(un,"require_default");var Nn;function zn(){if(Nn)return ke;Nn=1;let w=me(),_=ge(),E=Zn(),R=un(),m=Object.prototype.hasOwnProperty,y=1,d=2,s=3,T=4,t=1,f=2,S=3,k=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M=/[\x85\u2028\u2029]/,Q=/[,\[\]{}]/,v=/^(?:!|!!|![0-9A-Za-z-]+!)$/,U=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function ee(e){return Object.prototype.toString.call(e)}r(ee,"_class");function j(e){return e===10||e===13}r(j,"isEol");function H(e){return e===9||e===32}r(H,"isWhiteSpace");function Y(e){return e===9||e===32||e===10||e===13}r(Y,"isWsOrEol");function V(e){return e===44||e===91||e===93||e===123||e===125}r(V,"isFlowIndicator");function Le(e){if(e>=48&&e<=57)return e-48;let i=e|32;return i>=97&&i<=102?i-97+10:-1}r(Le,"fromHexCode");function Ne(e){return e===120?2:e===117?4:e===85?8:0}r(Ne,"escapedHexLen");function Ae(e){return e>=48&&e<=57?e-48:-1}r(Ae,"fromDecimalCode");function oe(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return` `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}r(oe,"simpleEscapeSequence");function Re(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}r(Re,"charFromCodepoint");function te(e,i,p){i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:p}):e[i]=p}r(te,"setProperty");let ye=new Array(256),ce=new Array(256);for(let e=0;e<256;e++)ye[e]=oe(e)?1:0,ce[e]=oe(e);function q(e,i){this.input=e,this.filename=i.filename||null,this.schema=i.schema||R,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.maxDepth=typeof i.maxDepth=="number"?i.maxDepth:100,this.maxTotalMergeKeys=typeof i.maxTotalMergeKeys=="number"?i.maxTotalMergeKeys:1e4,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.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}r(q,"State");function Ce(e,i){let p={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return p.snippet=E(p),new _(i,p)}r(Ce,"generateError");function x(e,i){throw Ce(e,i)}r(x,"throwError");function ie(e,i){e.onWarning&&e.onWarning.call(null,Ce(e,i))}r(ie,"throwWarning");function G(e,i,p){let a=e.anchorMapTransactions;if(a.length!==0){let c=a[a.length-1];m.call(c,i)||(c[i]={existed:m.call(e.anchorMap,i),value:e.anchorMap[i]})}e.anchorMap[i]=p}r(G,"storeAnchor");function Me(e){e.anchorMapTransactions.push(Object.create(null))}r(Me,"beginAnchorTransaction");function ne(e){let i=e.anchorMapTransactions.pop(),p=e.anchorMapTransactions;if(p.length===0)return;let a=p[p.length-1],c=Object.keys(i);for(let n=0,l=c.length;n<l;n+=1){let o=c[n];m.call(a,o)||(a[o]=i[o])}}r(ne,"commitAnchorTransaction");function ve(e){let i=e.anchorMapTransactions.pop(),p=Object.keys(i);for(let a=p.length-1;a>=0;a-=1){let c=i[p[a]];c.existed?e.anchorMap[p[a]]=c.value:delete e.anchorMap[p[a]]}}r(ve,"rollbackAnchorTransaction");function ue(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}r(ue,"snapshotState");function re(e,i){e.position=i.position,e.line=i.line,e.lineStart=i.lineStart,e.lineIndent=i.lineIndent,e.firstTabInLine=i.firstTabInLine,e.tag=i.tag,e.anchor=i.anchor,e.kind=i.kind,e.result=i.result}r(re,"restoreState");let Se={YAML:r(function(i,p,a){i.version!==null&&x(i,"duplication of %YAML directive"),a.length!==1&&x(i,"YAML directive accepts exactly one argument");let c=/^([0-9]+)\.([0-9]+)$/.exec(a[0]);c===null&&x(i,"ill-formed argument of the YAML directive");let n=parseInt(c[1],10),l=parseInt(c[2],10);n!==1&&x(i,"unacceptable YAML version of the document"),i.version=a[0],i.checkLineBreaks=l<2,l!==1&&l!==2&&ie(i,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:r(function(i,p,a){let c;a.length!==2&&x(i,"TAG directive accepts exactly two arguments");let n=a[0];c=a[1],v.test(n)||x(i,"ill-formed tag handle (first argument) of the TAG directive"),m.call(i.tagMap,n)&&x(i,'there is a previously declared suffix for "'+n+'" tag handle'),U.test(c)||x(i,"ill-formed tag prefix (second argument) of the TAG directive");try{c=decodeURIComponent(c)}catch{x(i,"tag prefix is malformed: "+c)}i.tagMap[n]=c},"handleTagDirective")};function B(e,i,p,a){if(i<p){let c=e.input.slice(i,p);if(a)for(let n=0,l=c.length;n<l;n+=1){let o=c.charCodeAt(n);o===9||o>=32&&o<=1114111||x(e,"expected valid JSON character")}else k.test(c)&&x(e,"the stream contains non-printable characters");e.result+=c}}r(B,"captureSegment");function X(e){e.totalMergeKeys++,e.maxTotalMergeKeys!==-1&&e.totalMergeKeys>e.maxTotalMergeKeys&&x(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")")}r(X,"chargeMergeWork");function fe(e,i,p,a){w.isObject(p)||x(e,"cannot merge mappings; the provided source object is unacceptable"),X(e);let c=Object.keys(p);for(let n=0,l=c.length;n<l;n+=1){let o=c[n];X(e),m.call(i,o)||(te(i,o,p[o]),a[o]=!0)}}r(fe,"mergeMappings");function W(e,i,p,a,c,n,l,o,h){if(Array.isArray(c)){c=Array.prototype.slice.call(c);for(let g=0,A=c.length;g<A;g+=1)Array.isArray(c[g])&&x(e,"nested arrays are not supported inside keys"),typeof c=="object"&&ee(c[g])==="[object Object]"&&(c[g]="[object Object]")}if(typeof c=="object"&&ee(c)==="[object Object]"&&(c="[object Object]"),c=String(c),i===null&&(i={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(n)){n.length>100&&x(e,"abnormal merge sequence size");for(let g=0,A=n.length;g<A;g+=1)fe(e,i,n[g],p)}else fe(e,i,n,p);else!e.json&&!m.call(p,c)&&m.call(i,c)&&(e.line=l||e.line,e.lineStart=o||e.lineStart,e.position=h||e.position,x(e,"duplicated mapping key")),te(i,c,n),delete p[c];return i}r(W,"storeMappingPair");function pe(e){let i=e.input.charCodeAt(e.position);i===10?e.position++:i===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):x(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}r(pe,"readLineBreak");function F(e,i,p){let a=0,c=e.input.charCodeAt(e.position);for(;c!==0;){for(;H(c);)c===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),c=e.input.charCodeAt(++e.position);if(i&&c===35)do c=e.input.charCodeAt(++e.position);while(c!==10&&c!==13&&c!==0);if(j(c))for(pe(e),c=e.input.charCodeAt(e.position),a++,e.lineIndent=0;c===32;)e.lineIndent++,c=e.input.charCodeAt(++e.position);else break}return p!==-1&&a!==0&&e.lineIndent<p&&ie(e,"deficient indentation"),a}r(F,"skipSeparationSpace");function K(e){let i=e.position,p=e.input.charCodeAt(i);return!!((p===45||p===46)&&p===e.input.charCodeAt(i+1)&&p===e.input.charCodeAt(i+2)&&(i+=3,p=e.input.charCodeAt(i),p===0||Y(p)))}r(K,"testDocumentSeparator");function le(e,i){i===1?e.result+=" ":i>1&&(e.result+=w.repeat(` `,i-1))}r(le,"writeFoldedLines");function Te(e,i,p){let a,c,n,l,o,h,g=e.kind,A=e.result,u=e.input.charCodeAt(e.position);if(Y(u)||V(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96)return!1;if(u===63||u===45){let C=e.input.charCodeAt(e.position+1);if(Y(C)||p&&V(C))return!1}for(e.kind="scalar",e.result="",a=c=e.position,n=!1;u!==0;){if(u===58){let C=e.input.charCodeAt(e.position+1);if(Y(C)||p&&V(C))break}else if(u===35){let C=e.input.charCodeAt(e.position-1);if(Y(C))break}else{if(e.position===e.lineStart&&K(e)||p&&V(u))break;if(j(u))if(l=e.line,o=e.lineStart,h=e.lineIndent,F(e,!1,-1),e.lineIndent>=i){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=l,e.lineStart=o,e.lineIndent=h;break}}n&&(B(e,a,c,!1),le(e,e.line-l),a=c=e.position,n=!1),H(u)||(c=e.position+1),u=e.input.charCodeAt(++e.position)}return B(e,a,c,!1),e.result?!0:(e.kind=g,e.result=A,!1)}r(Te,"readPlainScalar");function ae(e,i){let p,a,c=e.input.charCodeAt(e.position);if(c!==39)return!1;for(e.kind="scalar",e.result="",e.position++,p=a=e.position;(c=e.input.charCodeAt(e.position))!==0;)if(c===39)if(B(e,p,e.position,!0),c=e.input.charCodeAt(++e.position),c===39)p=e.position,e.position++,a=e.position;else return!0;else j(c)?(B(e,p,a,!0),le(e,F(e,!1,i)),p=a=e.position):e.position===e.lineStart&&K(e)?x(e,"unexpected end of the document within a single quoted scalar"):(e.position++,H(c)||(a=e.position));x(e,"unexpected end of the stream within a single quoted scalar")}r(ae,"readSingleQuotedScalar");function we(e,i){let p,a,c,n=e.input.charCodeAt(e.position);if(n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,p=a=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return B(e,p,e.position,!0),e.position++,!0;if(n===92){if(B(e,p,e.position,!0),n=e.input.charCodeAt(++e.position),j(n))F(e,!1,i);else if(n<256&&ye[n])e.result+=ce[n],e.position++;else if((c=Ne(n))>0){let l=c,o=0;for(;l>0;l--)n=e.input.charCodeAt(++e.position),(c=Le(n))>=0?o=(o<<4)+c:x(e,"expected hexadecimal character");e.result+=Re(o),e.position++}else x(e,"unknown escape sequence");p=a=e.position}else j(n)?(B(e,p,a,!0),le(e,F(e,!1,i)),p=a=e.position):e.position===e.lineStart&&K(e)?x(e,"unexpected end of the document within a double quoted scalar"):(e.position++,H(n)||(a=e.position))}x(e,"unexpected end of the stream within a double quoted scalar")}r(we,"readDoubleQuotedScalar");function be(e,i){let p=!0,a,c,n,l=e.tag,o,h=e.anchor,g,A,u,C,b=Object.create(null),I,O,L,N=e.input.charCodeAt(e.position);if(N===91)g=93,C=!1,o=[];else if(N===123)g=125,C=!0,o={};else return!1;for(e.anchor!==null&&G(e,e.anchor,o),N=e.input.charCodeAt(++e.position);N!==0;){if(F(e,!0,i),N=e.input.charCodeAt(e.position),N===g)return e.position++,e.tag=l,e.anchor=h,e.kind=C?"mapping":"sequence",e.result=o,!0;if(p?N===44&&x(e,"expected the node content, but found ','"):x(e,"missed comma between flow collection entries"),O=I=L=null,A=u=!1,N===63){let Z=e.input.charCodeAt(e.position+1);Y(Z)&&(A=u=!0,e.position++,F(e,!0,i))}a=e.line,c=e.lineStart,n=e.position,J(e,i,y,!1,!0),O=e.tag,I=e.result,F(e,!0,i),N=e.input.charCodeAt(e.position),(u||e.line===a)&&N===58&&(A=!0,N=e.input.charCodeAt(++e.position),F(e,!0,i),J(e,i,y,!1,!0),L=e.result),C?W(e,o,b,O,I,L,a,c,n):A?o.push(W(e,null,b,O,I,L,a,c,n)):o.push(I),F(e,!0,i),N=e.input.charCodeAt(e.position),N===44?(p=!0,N=e.input.charCodeAt(++e.position)):p=!1}x(e,"unexpected end of the stream within a flow collection")}r(be,"readFlowCollection");function $(e,i){let p,a=t,c=!1,n=!1,l=i,o=0,h=!1,g,A=e.input.charCodeAt(e.position);if(A===124)p=!1;else if(A===62)p=!0;else return!1;for(e.kind="scalar",e.result="";A!==0;)if(A=e.input.charCodeAt(++e.position),A===43||A===45)t===a?a=A===43?S:f:x(e,"repeat of a chomping mode identifier");else if((g=Ae(A))>=0)g===0?x(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?x(e,"repeat of an indentation width identifier"):(l=i+g-1,n=!0);else break;if(H(A)){do A=e.input.charCodeAt(++e.position);while(H(A));if(A===35)do A=e.input.charCodeAt(++e.position);while(!j(A)&&A!==0)}for(;A!==0;){for(pe(e),e.lineIndent=0,A=e.input.charCodeAt(e.position);(!n||e.lineIndent<l)&&A===32;)e.lineIndent++,A=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>l&&(l=e.lineIndent),j(A)){o++;continue}if(!n&&l===0&&x(e,"missing indentation for block scalar"),e.lineIndent<l){a===S?e.result+=w.repeat(` `,c?1+o:o):a===t&&c&&(e.result+=` `);break}p?H(A)?(h=!0,e.result+=w.repeat(` `,c?1+o:o)):h?(h=!1,e.result+=w.repeat(` `,o+1)):o===0?c&&(e.result+=" "):e.result+=w.repeat(` `,o):e.result+=w.repeat(` `,c?1+o:o),c=!0,n=!0,o=0;let u=e.position;for(;!j(A)&&A!==0;)A=e.input.charCodeAt(++e.position);B(e,u,e.position,!1)}return!0}r($,"readBlockScalar");function xe(e,i){let p=e.tag,a=e.anchor,c=[],n=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&G(e,e.anchor,c);let l=e.input.charCodeAt(e.position);for(;l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation")),l===45);){let o=e.input.charCodeAt(e.position+1);if(!Y(o))break;if(n=!0,e.position++,F(e,!0,-1)&&e.lineIndent<=i){c.push(null),l=e.input.charCodeAt(e.position);continue}let h=e.line;if(J(e,i,s,!1,!0),c.push(e.result),F(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===h||e.lineIndent>i)&&l!==0)x(e,"bad indentation of a sequence entry");else if(e.lineIndent<i)break}return n?(e.tag=p,e.anchor=a,e.kind="sequence",e.result=c,!0):!1}r(xe,"readBlockSequence");function _e(e,i,p){let a,c,n,l,o=e.tag,h=e.anchor,g={},A=Object.create(null),u=null,C=null,b=null,I=!1,O=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&G(e,e.anchor,g);let L=e.input.charCodeAt(e.position);for(;L!==0;){!I&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation"));let N=e.input.charCodeAt(e.position+1),Z=e.line;if((L===63||L===58)&&Y(N))L===63?(I&&(W(e,g,A,u,C,null,c,n,l),u=C=b=null),O=!0,I=!0,a=!0):I?(I=!1,a=!0):x(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,L=N;else{if(c=e.line,n=e.lineStart,l=e.position,!J(e,p,d,!1,!0))break;if(e.line===Z){for(L=e.input.charCodeAt(e.position);H(L);)L=e.input.charCodeAt(++e.position);if(L===58)L=e.input.charCodeAt(++e.position),Y(L)||x(e,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(W(e,g,A,u,C,null,c,n,l),u=C=b=null),O=!0,I=!1,a=!1,u=e.tag,C=e.result;else if(O)x(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=o,e.anchor=h,!0}else if(O)x(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=o,e.anchor=h,!0}if((e.line===Z||e.lineIndent>i)&&(I&&(c=e.line,n=e.lineStart,l=e.position),J(e,i,T,!0,a)&&(I?C=e.result:b=e.result),I||(W(e,g,A,u,C,b,c,n,l),u=C=b=null),F(e,!0,-1),L=e.input.charCodeAt(e.position)),(e.line===Z||e.lineIndent>i)&&L!==0)x(e,"bad indentation of a mapping entry");else if(e.lineIndent<i)break}return I&&W(e,g,A,u,C,null,c,n,l),O&&(e.tag=o,e.anchor=h,e.kind="mapping",e.result=g),O}r(_e,"readBlockMapping");function Ee(e){let i=!1,p=!1,a,c,n=e.input.charCodeAt(e.position);if(n!==33)return!1;e.tag!==null&&x(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(i=!0,n=e.input.charCodeAt(++e.position)):n===33?(p=!0,a="!!",n=e.input.charCodeAt(++e.position)):a="!";let l=e.position;if(i){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(c=e.input.slice(l,e.position),n=e.input.charCodeAt(++e.position)):x(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!Y(n);)n===33&&(p?x(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(l-1,e.position+1),v.test(a)||x(e,"named tag handle cannot contain such characters"),p=!0,l=e.position+1)),n=e.input.charCodeAt(++e.position);c=e.input.slice(l,e.position),Q.test(c)&&x(e,"tag suffix cannot contain flow indicator characters")}c&&!U.test(c)&&x(e,"tag name cannot contain such characters: "+c);try{c=decodeURIComponent(c)}catch{x(e,"tag name is malformed: "+c)}return i?e.tag=c:m.call(e.tagMap,a)?e.tag=e.tagMap[a]+c:a==="!"?e.tag="!"+c:a==="!!"?e.tag="tag:yaml.org,2002:"+c:x(e,'undeclared tag handle "'+a+'"'),!0}r(Ee,"readTagProperty");function Ie(e){let i=e.input.charCodeAt(e.position);if(i!==38)return!1;e.anchor!==null&&x(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position);let p=e.position;for(;i!==0&&!Y(i)&&!V(i);)i=e.input.charCodeAt(++e.position);return e.position===p&&x(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(p,e.position),!0}r(Ie,"readAnchorProperty");function Fe(e){let i=e.input.charCodeAt(e.position);if(i!==42)return!1;i=e.input.charCodeAt(++e.position);let p=e.position;for(;i!==0&&!Y(i)&&!V(i);)i=e.input.charCodeAt(++e.position);e.position===p&&x(e,"name of an alias node must contain at least one character");let a=e.input.slice(p,e.position);return m.call(e.anchorMap,a)||x(e,'unidentified alias "'+a+'"'),e.result=e.anchorMap[a],F(e,!0,-1),!0}r(Fe,"readAlias");function Oe(e,i,p,a){let c=ue(e);return Me(e),re(e,i),e.tag=null,e.anchor=null,e.kind=null,e.result=null,_e(e,p,a)&&e.kind==="mapping"?(ne(e),!0):(ve(e),re(e,c),!1)}r(Oe,"tryReadBlockMappingFromProperty");function J(e,i,p,a,c){let n,l,o=1,h=!1,g=!1,A=null,u,C,b;e.depth>=e.maxDepth&&x(e,"nesting exceeded maxDepth ("+e.maxDepth+")"),e.depth+=1,e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let I=n=l=T===p||s===p;if(a&&F(e,!0,-1)&&(h=!0,e.lineIndent>i?o=1:e.lineIndent===i?o=0:e.lineIndent<i&&(o=-1)),o===1)for(;;){let O=e.input.charCodeAt(e.position),L=ue(e);if(h&&(O===33&&e.tag!==null||O===38&&e.anchor!==null)||!Ee(e)&&!Ie(e))break;A===null&&(A=L),F(e,!0,-1)?(h=!0,l=I,e.lineIndent>i?o=1:e.lineIndent===i?o=0:e.lineIndent<i&&(o=-1)):l=!1}if(l&&(l=h||c),o===1||T===p)if(y===p||d===p?C=i:C=i+1,b=e.position-e.lineStart,o===1)if(l&&(xe(e,b)||_e(e,b,C))||be(e,C))g=!0;else{let O=e.input.charCodeAt(e.position);A!==null&&I&&!l&&O!==124&&O!==62&&Oe(e,A,A.position-A.lineStart,C)||n&&$(e,C)||ae(e,C)||we(e,C)?g=!0:Fe(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&x(e,"alias node should not have any properties")):Te(e,C,y===p)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&G(e,e.anchor,e.result)}else o===0&&(g=l&&xe(e,b));if(e.tag===null)e.anchor!==null&&G(e,e.anchor,e.result);else if(e.tag==="?"){e.result!==null&&e.kind!=="scalar"&&x(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"');for(let O=0,L=e.implicitTypes.length;O<L;O+=1)if(u=e.implicitTypes[O],u.resolve(e.result)){e.result=u.construct(e.result),e.tag=u.tag,e.anchor!==null&&G(e,e.anchor,e.result);break}}else if(e.tag!=="!"){if(m.call(e.typeMap[e.kind||"fallback"],e.tag))u=e.typeMap[e.kind||"fallback"][e.tag];else{u=null;let O=e.typeMap.multi[e.kind||"fallback"];for(let L=0,N=O.length;L<N;L+=1)if(e.tag.slice(0,O[L].tag.length)===O[L].tag){u=O[L];break}}u||x(e,"unknown tag !<"+e.tag+">"),e.result!==null&&u.kind!==e.kind&&x(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result,e.tag)?(e.result=u.construct(e.result,e.tag),e.anchor!==null&&G(e,e.anchor,e.result)):x(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.depth-=1,e.tag!==null||e.anchor!==null||g}r(J,"composeNode");function qe(e){let i=e.position,p=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(F(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){p=!0,a=e.input.charCodeAt(++e.position);let c=e.position;for(;a!==0&&!Y(a);)a=e.input.charCodeAt(++e.position);let n=e.input.slice(c,e.position),l=[];for(n.length<1&&x(e,"directive name must not be less than one character in length");a!==0;){for(;H(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!j(a));break}if(j(a))break;for(c=e.position;a!==0&&!Y(a);)a=e.input.charCodeAt(++e.position);l.push(e.input.slice(c,e.position))}a!==0&&pe(e),m.call(Se,n)?Se[n](e,n,l):ie(e,'unknown document directive "'+n+'"')}if(F(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,F(e,!0,-1)):p&&x(e,"directives end mark is expected"),J(e,e.lineIndent-1,T,!1,!0),F(e,!0,-1),e.checkLineBreaks&&M.test(e.input.slice(i,e.position))&&ie(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&K(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,F(e,!0,-1));return}e.position<e.length-1&&x(e,"end of the stream or a document separator is expected")}r(qe,"readDocument");function se(e,i){e=String(e),i=i||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=` `),e.charCodeAt(0)===65279&&(e=e.slice(1)));let p=new q(e,i),a=e.indexOf("\0");for(a!==-1&&(p.position=a,x(p,"null byte is not allowed in input")),p.input+="\0";p.input.charCodeAt(p.position)===32;)p.lineIndent+=1,p.position+=1;for(;p.position<p.length-1;)qe(p);return p.documents}r(se,"loadDocuments");function Ye(e,i,p){i!==null&&typeof i=="object"&&typeof p>"u"&&(p=i,i=null);let a=se(e,p);if(typeof i!="function")return a;for(let c=0,n=a.length;c<n;c+=1)i(a[c])}r(Ye,"loadAll2");function Pe(e,i){let p=se(e,i);if(p.length!==0){if(p.length===1)return p[0];throw new _("expected a single document in the stream, but found more")}}return r(Pe,"load2"),ke.loadAll=Ye,ke.load=Pe,ke}r(zn,"requireLoader");var cn={},Rn;function ei(){if(Rn)return cn;Rn=1;let w=me(),_=ge(),E=un(),R=Object.prototype.toString,m=Object.prototype.hasOwnProperty,y=65279,d=9,s=10,T=13,t=32,f=33,S=34,k=35,M=37,Q=38,v=39,U=42,ee=44,j=45,H=58,Y=61,V=62,Le=63,Ne=64,Ae=91,oe=93,Re=96,te=123,ye=124,ce=125,q={};q[0]="\\0",q[7]="\\a",q[8]="\\b",q[9]="\\t",q[10]="\\n",q[11]="\\v",q[12]="\\f",q[13]="\\r",q[27]="\\e",q[34]='\\"',q[92]="\\\\",q[133]="\\N",q[160]="\\_",q[8232]="\\L",q[8233]="\\P";let Ce=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],x=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ie(n,l){if(l===null)return{};let o={},h=Object.keys(l);for(let g=0,A=h.length;g<A;g+=1){let u=h[g],C=String(l[u]);u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2));let b=n.compiledTypeMap.fallback[u];b&&m.call(b.styleAliases,C)&&(C=b.styleAliases[C]),o[u]=C}return o}r(ie,"compileStyleMap");function G(n){let l,o,h=n.toString(16).toUpperCase();if(n<=255)l="x",o=2;else if(n<=65535)l="u",o=4;else if(n<=4294967295)l="U",o=8;else throw new _("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+l+w.repeat("0",o-h.length)+h}r(G,"encodeHex");let Me=1,ne=2;function ve(n){this.schema=n.schema||E,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=w.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=ie(this.schema,n.styles||null),this.sortKeys=n.sortKeys||!1,this.lineWidth=n.lineWidth||80,this.noRefs=n.noRefs||!1,this.noCompatMode=n.noCompatMode||!1,this.condenseFlow=n.condenseFlow||!1,this.quotingType=n.quotingType==='"'?ne:Me,this.forceQuotes=n.forceQuotes||!1,this.replacer=typeof n.replacer=="function"?n.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}r(ve,"State");function ue(n,l){let o=w.repeat(" ",l),h=0,g="",A=n.length;for(;h<A;){let u,C=n.indexOf(` `,h);C===-1?(u=n.slice(h),h=A):(u=n.slice(h,C+1),h=C+1),u.length&&u!==` `&&(g+=o),g+=u}return g}r(ue,"indentString");function re(n,l){return` `+w.repeat(" ",n.indent*l)}r(re,"generateNextLine");function Se(n,l){for(let o=0,h=n.implicitTypes.length;o<h;o+=1)if(n.implicitTypes[o].resolve(l))return!0;return!1}r(Se,"testImplicitResolving");function B(n){return n===t||n===d}r(B,"isWhitespace");function X(n){return n>=32&&n<=126||n>=161&&n<=55295&&n!==8232&&n!==8233||n>=57344&&n<=65533&&n!==y||n>=65536&&n<=1114111}r(X,"isPrintable");function fe(n){return X(n)&&n!==y&&n!==T&&n!==s}r(fe,"isNsCharOrWhitespace");function W(n,l,o){let h=fe(n),g=h&&!B(n);return(o?h:h&&n!==ee&&n!==Ae&&n!==oe&&n!==te&&n!==ce)&&n!==k&&!(l===H&&!g)||fe(l)&&!B(l)&&n===k||l===H&&g}r(W,"isPlainSafe");function pe(n){return X(n)&&n!==y&&!B(n)&&n!==j&&n!==Le&&n!==H&&n!==ee&&n!==Ae&&n!==oe&&n!==te&&n!==ce&&n!==k&&n!==Q&&n!==U&&n!==f&&n!==ye&&n!==Y&&n!==V&&n!==v&&n!==S&&n!==M&&n!==Ne&&n!==Re}r(pe,"isPlainSafeFirst");function F(n){return!B(n)&&n!==H}r(F,"isPlainSafeLast");function K(n,l){let o=n.charCodeAt(l),h;return o>=55296&&o<=56319&&l+1<n.length&&(h=n.charCodeAt(l+1),h>=56320&&h<=57343)?(o-55296)*1024+h-56320+65536:o}r(K,"codePointAt");function le(n){return/^\n* /.test(n)}r(le,"needIndentIndicator");let Te=1,ae=2,we=3,be=4,$=5;function xe(n,l,o,h,g,A,u,C){let b,I=0,O=null,L=!1,N=!1,Z=h!==-1,he=-1,de=pe(K(n,0))&&F(K(n,n.length-1));if(l||u)for(b=0;b<n.length;I>=65536?b+=2:b++){if(I=K(n,b),!X(I))return $;de=de&&W(I,O,C),O=I}else{for(b=0;b<n.length;I>=65536?b+=2:b++){if(I=K(n,b),I===s)L=!0,Z&&(N=N||b-he-1>h&&n[he+1]!==" ",he=b);else if(!X(I))return $;de=de&&W(I,O,C),O=I}N=N||Z&&b-he-1>h&&n[he+1]!==" "}return!L&&!N?de&&!u&&!g(n)?Te:A===ne?$:ae:o>9&&le(n)?$:u?A===ne?$:ae:N?be:we}r(xe,"chooseScalarStyle");function _e(n,l,o,h,g){n.dump=(function(){if(l.length===0)return n.quotingType===ne?'""':"''";if(!n.noCompatMode&&(Ce.indexOf(l)!==-1||x.test(l)))return n.quotingType===ne?'"'+l+'"':"'"+l+"'";let A=n.indent*Math.max(1,o),u=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-A),C=h||n.flowLevel>-1&&o>=n.flowLevel;function b(I){return Se(n,I)}switch(r(b,"testAmbiguity"),xe(l,C,n.indent,u,b,n.quotingType,n.forceQuotes&&!h,g)){case Te:return l;case ae:return"'"+l.replace(/'/g,"''")+"'";case we:return"|"+Ee(l,n.indent)+Ie(ue(l,A));case be:return">"+Ee(l,n.indent)+Ie(ue(Fe(l,u),A));case $:return'"'+J(l)+'"';default:throw new _("impossible error: invalid scalar style")}})()}r(_e,"writeScalar");function Ee(n,l){let o=le(n)?String(l):"",h=n[n.length-1]===` `,A=h&&(n[n.length-2]===` `||n===` `)?"+":h?"":"-";return o+A+` `}r(Ee,"blockHeader");function Ie(n){return n[n.length-1]===` `?n.slice(0,-1):n}r(Ie,"dropEndingNewline");function Fe(n,l){let o=/(\n+)([^\n]*)/g,h=(function(){let C=n.indexOf(` `);return C=C!==-1?C:n.length,o.lastIndex=C,Oe(n.slice(0,C),l)})(),g=n[0]===` `||n[0]===" ",A,u;for(;u=o.exec(n);){let C=u[1],b=u[2];A=b[0]===" ",h+=C+(!g&&!A&&b!==""?` `:"")+Oe(b,l),g=A}return h}r(Fe,"foldString");function Oe(n,l){if(n===""||n[0]===" ")return n;let o=/ [^ ]/g,h,g=0,A,u=0,C=0,b="";for(;h=o.exec(n);)C=h.index,C-g>l&&(A=u>g?u:C,b+=` `+n.slice(g,A),g=A+1),u=C;return b+=` `,n.length-g>l&&u>g?b+=n.slice(g,u)+` `+n.slice(u+1):b+=n.slice(g),b.slice(1)}r(Oe,"foldLine");function J(n){let l="",o=0;for(let h=0;h<n.length;o>=65536?h+=2:h++){o=K(n,h);let g=q[o];!g&&X(o)?(l+=n[h],o>=65536&&(l+=n[h+1])):l+=g||G(o)}return l}r(J,"escapeString");function qe(n,l,o){let h="",g=n.tag;for(let A=0,u=o.length;A<u;A+=1){let C=o[A];n.replacer&&(C=n.replacer.call(o,String(A),C)),(i(n,l,C,!1,!1)||typeof C>"u"&&i(n,l,null,!1,!1))&&(h!==""&&(h+=","+(n.condenseFlow?"":" ")),h+=n.dump)}n.tag=g,n.dump="["+h+"]"}r(qe,"writeFlowSequence");function se(n,l,o,h){let g="",A=n.tag;for(let u=0,C=o.length;u<C;u+=1){let b=o[u];n.replacer&&(b=n.replacer.call(o,String(u),b)),(i(n,l+1,b,!0,!0,!1,!0)||typeof b>"u"&&i(n,l+1,null,!0,!0,!1,!0))&&((!h||g!=="")&&(g+=re(n,l)),n.dump&&s===n.dump.charCodeAt(0)?g+="-":g+="- ",g+=n.dump)}n.tag=A,n.dump=g||"[]"}r(se,"writeBlockSequence");function Ye(n,l,o){let h="",g=n.tag,A=Object.keys(o);for(let u=0,C=A.length;u<C;u+=1){let b="";h!==""&&(b+=", "),n.condenseFlow&&(b+='"');let I=A[u],O=o[I];n.replacer&&(O=n.replacer.call(o,I,O)),i(n,l,I,!1,!1)&&(n.dump.length>1024&&(b+="? "),b+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),i(n,l,O,!1,!1)&&(b+=n.dump,h+=b))}n.tag=g,n.dump="{"+h+"}"}r(Ye,"writeFlowMapping");function Pe(n,l,o,h){let g="",A=n.tag,u=Object.keys(o);if(n.sortKeys===!0)u.sort();else if(typeof n.sortKeys=="function")u.sort(n.sortKeys);else if(n.sortKeys)throw new _("sortKeys must be a boolean or a function");for(let C=0,b=u.length;C<b;C+=1){let I="";(!h||g!=="")&&(I+=re(n,l));let O=u[C],L=o[O];if(n.replacer&&(L=n.replacer.call(o,O,L)),!i(n,l+1,O,!0,!0,!0))continue;let N=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024;N&&(n.dump&&s===n.dump.charCodeAt(0)?I+="?":I+="? "),I+=n.dump,N&&(I+=re(n,l)),i(n,l+1,L,!0,N)&&(n.dump&&s===n.dump.charCodeAt(0)?I+=":":I+=": ",I+=n.dump,g+=I)}n.tag=A,n.dump=g||"{}"}r(Pe,"writeBlockMapping");function e(n,l,o){let h=o?n.explicitTypes:n.implicitTypes;for(let g=0,A=h.length;g<A;g+=1){let u=h[g];if((u.instanceOf||u.predicate)&&(!u.instanceOf||typeof l=="object"&&l instanceof u.instanceOf)&&(!u.predicate||u.predicate(l))){if(o?u.multi&&u.representName?n.tag=u.representName(l):n.tag=u.tag:n.tag="?",u.represent){let C=n.styleMap[u.tag]||u.defaultStyle,b;if(R.call(u.represent)==="[object Function]")b=u.represent(l,C);else if(m.call(u.represent,C))b=u.represent[C](l,C);else throw new _("!<"+u.tag+'> tag resolver accepts not "'+C+'" style');n.dump=b}return!0}}return!1}r(e,"detectType");function i(n,l,o,h,g,A,u){n.tag=null,n.dump=o,e(n,o,!1)||e(n,o,!0);let C=R.call(n.dump),b=h;h&&(h=n.flowLevel<0||n.flowLevel>l);let I=C==="[object Object]"||C==="[object Array]",O,L;if(I&&(O=n.duplicates.indexOf(o),L=O!==-1),(n.tag!==null&&n.tag!=="?"||L||n.indent!==2&&l>0)&&(g=!1),L&&n.usedDuplicates[O])n.dump="*ref_"+O;else{if(I&&L&&!n.usedDuplicates[O]&&(n.usedDuplicates[O]=!0),C==="[object Object]")h&&Object.keys(n.dump).length!==0?(Pe(n,l,n.dump,g),L&&(n.dump="&ref_"+O+n.dump)):(Ye(n,l,n.dump),L&&(n.dump="&ref_"+O+" "+n.dump));else if(C==="[object Array]")h&&n.dump.length!==0?(n.noArrayIndent&&!u&&l>0?se(n,l-1,n.dump,g):se(n,l,n.dump,g),L&&(n.dump="&ref_"+O+n.dump)):(qe(n,l,n.dump),L&&(n.dump="&ref_"+O+" "+n.dump));else if(C==="[object String]")n.tag!=="?"&&_e(n,n.dump,l,A,b);else{if(C==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new _("unacceptable kind of an object to dump "+C)}if(n.tag!==null&&n.tag!=="?"){let N=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21");n.tag[0]==="!"?N="!"+N:N.slice(0,18)==="tag:yaml.org,2002:"?N="!!"+N.slice(18):N="!<"+N+">",n.dump=N+" "+n.dump}}return!0}r(i,"writeNode");function p(n,l){let o=[],h=[];a(n,o,h);let g=h.length;for(let A=0;A<g;A+=1)l.duplicates.push(o[h[A]]);l.usedDuplicates=new Array(g)}r(p,"getDuplicateReferences");function a(n,l,o){if(n!==null&&typeof n=="object"){let h=l.indexOf(n);if(h!==-1)o.indexOf(h)===-1&&o.push(h);else if(l.push(n),Array.isArray(n))for(let g=0,A=n.length;g<A;g+=1)a(n[g],l,o);else{let g=Object.keys(n);for(let A=0,u=g.length;A<u;A+=1)a(n[g[A]],l,o)}}}r(a,"inspectNode");function c(n,l){l=l||{};let o=new ve(l);o.noRefs||p(n,o);let h=n;return o.replacer&&(h=o.replacer.call({"":h},"",h)),i(o,0,h,!0,!0)?o.dump+` `:""}return r(c,"dump2"),cn.dump=c,cn}r(ei,"requireDumper");var Mn;function ni(){if(Mn)return P;Mn=1;let w=zn(),_=ei();function E(R,m){return function(){throw new Error("Function yaml."+R+" is removed in js-yaml 4. Use yaml."+m+" instead, which is now safe by default.")}}return r(E,"renamed"),P.Type=D(),P.Schema=vn(),P.FAILSAFE_SCHEMA=Pn(),P.JSON_SCHEMA=Un(),P.CORE_SCHEMA=Kn(),P.DEFAULT_SCHEMA=un(),P.load=w.load,P.loadAll=w.loadAll,P.dump=_.dump,P.YAMLException=ge(),P.types={binary:Qn(),float:Bn(),map:Yn(),null:Dn(),pairs:Xn(),set:$n(),timestamp:Gn(),bool:jn(),int:Hn(),merge:Wn(),omap:Vn(),seq:qn(),str:Fn()},P.safeLoad=E("safeLoad","load"),P.safeLoadAll=E("safeLoadAll","loadAll"),P.safeDump=E("safeDump","dump"),P}r(ni,"requireJsYaml");var ii=ni(),ri=Jn(ii),{Type:li,Schema:oi,FAILSAFE_SCHEMA:ti,JSON_SCHEMA:ci,CORE_SCHEMA:ui,DEFAULT_SCHEMA:fi,load:pi,loadAll:ai,dump:si,YAMLException:hi,types:di,safeLoad:mi,safeLoadAll:gi,safeDump:Ai}=ri;export{ci as a,pi as b};