"use strict";const _format=require("./shared/confbox.3768c7e9.cjs");/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(e){return typeof e>"u"||e===null}function isObject(e){return typeof e=="object"&&e!==null}function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]}function extend(e,n){var r,o,l,f;if(n)for(f=Object.keys(n),r=0,o=f.length;rc&&(f=" ... ",n=o-c+f.length),r-o>c&&(u=" ...",r=o+c-u.length),{str:f+e.slice(n,r).replace(/\t/g,"\u2192")+u,pos:o-n+f.length}}function padStart(e,n){return common.repeat(" ",n-e.length)+e}function makeSnippet(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],l=[],f,u=-1;f=r.exec(e.buffer);)l.push(f.index),o.push(f.index+f[0].length),e.position<=f.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);var c="",a,p,h=Math.min(e.line+n.linesAfter,l.length).toString().length,t=n.maxLength-(n.indent+h+3);for(a=1;a<=n.linesBefore&&!(u-a<0);a++)p=getLine(e.buffer,o[u-a],l[u-a],e.position-(o[u]-o[u-a]),t),c=common.repeat(" ",n.indent)+padStart((e.line-a+1).toString(),h)+" | "+p.str+` `+c;for(p=getLine(e.buffer,o[u],l[u],e.position,t),c+=common.repeat(" ",n.indent)+padStart((e.line+1).toString(),h)+" | "+p.str+` `,c+=common.repeat("-",n.indent+h+3+p.pos)+`^ `,a=1;a<=n.linesAfter&&!(u+a>=l.length);a++)p=getLine(e.buffer,o[u+a],l[u+a],e.position-(o[u]-o[u+a]),t),c+=common.repeat(" ",n.indent)+padStart((e.line+a+1).toString(),h)+" | "+p.str+` `;return c.replace(/\n$/,"")}var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){n[String(o)]=r})}),n}function Type$1(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(r)===-1)throw new exception('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=compileStyleAliases(n.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var type=Type$1;function compileList(e,n){var r=[];return e[n].forEach(function(o){var l=r.length;r.forEach(function(f,u){f.tag===o.tag&&f.kind===o.kind&&f.multi===o.multi&&(l=u)}),r[l]=o}),r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function o(l){l.multi?(e.multi[l.kind].push(l),e.multi.fallback.push(l)):e[l.kind][l.tag]=e.fallback[l.tag]=l}for(n=0,r=arguments.length;n=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"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){return!(e===null||!YAML_FLOAT_PATTERN.test(e)||e[e.length-1]==="_")}function constructYamlFloat(e){var n,r;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:r*parseFloat(n,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(e))return"-0.0";return r=e.toString(10),SCIENTIFIC_WITHOUT_DOT.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||common.isNegativeZero(e))}var float=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json=failsafe.extend({implicit:[_null,bool,int,float]}),core=json,YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=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 resolveYamlTimestamp(e){return e===null?!1:YAML_DATE_REGEXP.exec(e)!==null||YAML_TIMESTAMP_REGEXP.exec(e)!==null}function constructYamlTimestamp(e){var n,r,o,l,f,u,c,a=0,p=null,h,t,d;if(n=YAML_DATE_REGEXP.exec(e),n===null&&(n=YAML_TIMESTAMP_REGEXP.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],o=+n[2]-1,l=+n[3],!n[4])return new Date(Date.UTC(r,o,l));if(f=+n[4],u=+n[5],c=+n[6],n[7]){for(a=n[7].slice(0,3);a.length<3;)a+="0";a=+a}return n[9]&&(h=+n[10],t=+(n[11]||0),p=(h*60+t)*6e4,n[9]==="-"&&(p=-p)),d=new Date(Date.UTC(r,o,l,f,u,c,a)),p&&d.setTime(d.getTime()-p),d}function representYamlTimestamp(e){return e.toISOString()}var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(e){return e==="<<"||e===null}var merge=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function resolveYamlBinary(e){if(e===null)return!1;var n,r,o=0,l=e.length,f=BASE64_MAP;for(r=0;r64)){if(n<0)return!1;o+=6}return o%8===0}function constructYamlBinary(e){var n,r,o=e.replace(/[\r\n=]/g,""),l=o.length,f=BASE64_MAP,u=0,c=[];for(n=0;n>16&255),c.push(u>>8&255),c.push(u&255)),u=u<<6|f.indexOf(o.charAt(n));return r=l%4*6,r===0?(c.push(u>>16&255),c.push(u>>8&255),c.push(u&255)):r===18?(c.push(u>>10&255),c.push(u>>2&255)):r===12&&c.push(u>>4&255),new Uint8Array(c)}function representYamlBinary(e){var n="",r=0,o,l,f=e.length,u=BASE64_MAP;for(o=0;o>18&63],n+=u[r>>12&63],n+=u[r>>6&63],n+=u[r&63]),r=(r<<8)+e[o];return l=f%3,l===0?(n+=u[r>>18&63],n+=u[r>>12&63],n+=u[r>>6&63],n+=u[r&63]):l===2?(n+=u[r>>10&63],n+=u[r>>4&63],n+=u[r<<2&63],n+=u[64]):l===1&&(n+=u[r>>2&63],n+=u[r<<4&63],n+=u[64],n+=u[64]),n}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var binary=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return!0;var n=[],r,o,l,f,u,c=e;for(r=0,o=c.length;r>10)+55296,(e-65536&1023)+56320)}for(var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256),i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);function State$1(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||_default,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.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 generateError(e,n){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=snippet(r),new exception(n,r)}function throwError(e,n){throw generateError(e,n)}function throwWarning(e,n){e.onWarning&&e.onWarning.call(null,generateError(e,n))}var directiveHandlers={YAML:function(n,r,o){var l,f,u;n.version!==null&&throwError(n,"duplication of %YAML directive"),o.length!==1&&throwError(n,"YAML directive accepts exactly one argument"),l=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),l===null&&throwError(n,"ill-formed argument of the YAML directive"),f=parseInt(l[1],10),u=parseInt(l[2],10),f!==1&&throwError(n,"unacceptable YAML version of the document"),n.version=o[0],n.checkLineBreaks=u<2,u!==1&&u!==2&&throwWarning(n,"unsupported YAML version of the document")},TAG:function(n,r,o){var l,f;o.length!==2&&throwError(n,"TAG directive accepts exactly two arguments"),l=o[0],f=o[1],PATTERN_TAG_HANDLE.test(l)||throwError(n,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$1.call(n.tagMap,l)&&throwError(n,'there is a previously declared suffix for "'+l+'" tag handle'),PATTERN_TAG_URI.test(f)||throwError(n,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch{throwError(n,"tag prefix is malformed: "+f)}n.tagMap[l]=f}};function captureSegment(e,n,r,o){var l,f,u,c;if(n1&&(e.result+=common.repeat(` `,n-1))}function readPlainScalar(e,n,r){var o,l,f,u,c,a,p,h,t=e.kind,d=e.result,s;if(s=e.input.charCodeAt(e.position),is_WS_OR_EOL(s)||is_FLOW_INDICATOR(s)||s===35||s===38||s===42||s===33||s===124||s===62||s===39||s===34||s===37||s===64||s===96||(s===63||s===45)&&(l=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(l)||r&&is_FLOW_INDICATOR(l)))return!1;for(e.kind="scalar",e.result="",f=u=e.position,c=!1;s!==0;){if(s===58){if(l=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(l)||r&&is_FLOW_INDICATOR(l))break}else if(s===35){if(o=e.input.charCodeAt(e.position-1),is_WS_OR_EOL(o))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(s))break;if(is_EOL(s))if(a=e.line,p=e.lineStart,h=e.lineIndent,skipSeparationSpace(e,!1,-1),e.lineIndent>=n){c=!0,s=e.input.charCodeAt(e.position);continue}else{e.position=u,e.line=a,e.lineStart=p,e.lineIndent=h;break}}c&&(captureSegment(e,f,u,!1),writeFoldedLines(e,e.line-a),f=u=e.position,c=!1),is_WHITE_SPACE(s)||(u=e.position+1),s=e.input.charCodeAt(++e.position)}return captureSegment(e,f,u,!1),e.result?!0:(e.kind=t,e.result=d,!1)}function readSingleQuotedScalar(e,n){var r,o,l;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=l=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(captureSegment(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,l=e.position;else return!0;else is_EOL(r)?(captureSegment(e,o,l,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,n)),o=l=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a single quoted scalar"):(e.position++,l=e.position);throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,n){var r,o,l,f,u,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return captureSegment(e,r,e.position,!0),e.position++,!0;if(c===92){if(captureSegment(e,r,e.position,!0),c=e.input.charCodeAt(++e.position),is_EOL(c))skipSeparationSpace(e,!1,n);else if(c<256&&simpleEscapeCheck[c])e.result+=simpleEscapeMap[c],e.position++;else if((u=escapedHexLen(c))>0){for(l=u,f=0;l>0;l--)c=e.input.charCodeAt(++e.position),(u=fromHexCode(c))>=0?f=(f<<4)+u:throwError(e,"expected hexadecimal character");e.result+=charFromCodepoint(f),e.position++}else throwError(e,"unknown escape sequence");r=o=e.position}else is_EOL(c)?(captureSegment(e,r,o,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,n)),r=o=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,n){var r=!0,o,l,f,u=e.tag,c,a=e.anchor,p,h,t,d,s,x=Object.create(null),g,A,v,m;if(m=e.input.charCodeAt(e.position),m===91)h=93,s=!1,c=[];else if(m===123)h=125,s=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),m=e.input.charCodeAt(++e.position);m!==0;){if(skipSeparationSpace(e,!0,n),m=e.input.charCodeAt(e.position),m===h)return e.position++,e.tag=u,e.anchor=a,e.kind=s?"mapping":"sequence",e.result=c,!0;r?m===44&&throwError(e,"expected the node content, but found ','"):throwError(e,"missed comma between flow collection entries"),A=g=v=null,t=d=!1,m===63&&(p=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(p)&&(t=d=!0,e.position++,skipSeparationSpace(e,!0,n))),o=e.line,l=e.lineStart,f=e.position,composeNode(e,n,CONTEXT_FLOW_IN,!1,!0),A=e.tag,g=e.result,skipSeparationSpace(e,!0,n),m=e.input.charCodeAt(e.position),(d||e.line===o)&&m===58&&(t=!0,m=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,n),composeNode(e,n,CONTEXT_FLOW_IN,!1,!0),v=e.result),s?storeMappingPair(e,c,x,A,g,v,o,l,f):t?c.push(storeMappingPair(e,null,x,A,g,v,o,l,f)):c.push(g),skipSeparationSpace(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(r=!0,m=e.input.charCodeAt(++e.position)):r=!1}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,n){var r,o,l=CHOMPING_CLIP,f=!1,u=!1,c=n,a=0,p=!1,h,t;if(t=e.input.charCodeAt(e.position),t===124)o=!1;else if(t===62)o=!0;else return!1;for(e.kind="scalar",e.result="";t!==0;)if(t=e.input.charCodeAt(++e.position),t===43||t===45)CHOMPING_CLIP===l?l=t===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(e,"repeat of a chomping mode identifier");else if((h=fromDecimalCode(t))>=0)h===0?throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?throwError(e,"repeat of an indentation width identifier"):(c=n+h-1,u=!0);else break;if(is_WHITE_SPACE(t)){do t=e.input.charCodeAt(++e.position);while(is_WHITE_SPACE(t));if(t===35)do t=e.input.charCodeAt(++e.position);while(!is_EOL(t)&&t!==0)}for(;t!==0;){for(readLineBreak(e),e.lineIndent=0,t=e.input.charCodeAt(e.position);(!u||e.lineIndentc&&(c=e.lineIndent),is_EOL(t)){a++;continue}if(e.lineIndentn)&&a!==0)throwError(e,"bad indentation of a sequence entry");else if(e.lineIndentn)&&(A&&(u=e.line,c=e.lineStart,a=e.position),composeNode(e,n,CONTEXT_BLOCK_OUT,!0,l)&&(A?x=e.result:g=e.result),A||(storeMappingPair(e,t,d,s,x,g,u,c,a),s=x=g=null),skipSeparationSpace(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===f||e.lineIndent>n)&&m!==0)throwError(e,"bad indentation of a mapping entry");else if(e.lineIndentn?a=1:e.lineIndent===n?a=0:e.lineIndentn?a=1:e.lineIndent===n?a=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),t=0,d=e.implicitTypes.length;t"),e.result!==null&&x.kind!==e.kind&&throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function readDocument(e){var n=e.position,r,o,l,f=!1,u;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(u=e.input.charCodeAt(e.position))!==0&&(skipSeparationSpace(e,!0,-1),u=e.input.charCodeAt(e.position),!(e.lineIndent>0||u!==37));){for(f=!0,u=e.input.charCodeAt(++e.position),r=e.position;u!==0&&!is_WS_OR_EOL(u);)u=e.input.charCodeAt(++e.position);for(o=e.input.slice(r,e.position),l=[],o.length<1&&throwError(e,"directive name must not be less than one character in length");u!==0;){for(;is_WHITE_SPACE(u);)u=e.input.charCodeAt(++e.position);if(u===35){do u=e.input.charCodeAt(++e.position);while(u!==0&&!is_EOL(u));break}if(is_EOL(u))break;for(r=e.position;u!==0&&!is_WS_OR_EOL(u);)u=e.input.charCodeAt(++e.position);l.push(e.input.slice(r,e.position))}u!==0&&readLineBreak(e),_hasOwnProperty$1.call(directiveHandlers,o)?directiveHandlers[o](e,o,l):throwWarning(e,'unknown document directive "'+o+'"')}if(skipSeparationSpace(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,skipSeparationSpace(e,!0,-1)):f&&throwError(e,"directives end mark is expected"),composeNode(e,e.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(e.input.slice(n,e.position))&&throwWarning(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,skipSeparationSpace(e,!0,-1));return}if(e.position"u"&&(r=n,n=null);var o=loadDocuments(e,r);if(typeof n!="function")return o;for(var l=0,f=o.length;l=55296&&r<=56319&&n+1=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function needIndentIndicator(e){var n=/^\n* /;return n.test(e)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(e,n,r,o,l,f,u,c){var a,p=0,h=null,t=!1,d=!1,s=o!==-1,x=-1,g=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(n||u)for(a=0;a=65536?a+=2:a++){if(p=codePointAt(e,a),!isPrintable(p))return STYLE_DOUBLE;g=g&&isPlainSafe(p,h,c),h=p}else{for(a=0;a=65536?a+=2:a++){if(p=codePointAt(e,a),p===CHAR_LINE_FEED)t=!0,s&&(d=d||a-x-1>o&&e[x+1]!==" ",x=a);else if(!isPrintable(p))return STYLE_DOUBLE;g=g&&isPlainSafe(p,h,c),h=p}d=d||s&&a-x-1>o&&e[x+1]!==" "}return!t&&!d?g&&!u&&!l(e)?STYLE_PLAIN:f===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:r>9&&needIndentIndicator(e)?STYLE_DOUBLE:u?f===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:d?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(e,n,r,o,l){e.dump=function(){if(n.length===0)return e.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!e.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(n)!==-1||DEPRECATED_BASE60_SYNTAX.test(n)))return e.quotingType===QUOTING_TYPE_DOUBLE?'"'+n+'"':"'"+n+"'";var f=e.indent*Math.max(1,r),u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-f),c=o||e.flowLevel>-1&&r>=e.flowLevel;function a(p){return testImplicitResolving(e,p)}switch(chooseScalarStyle(n,c,e.indent,u,a,e.quotingType,e.forceQuotes&&!o,l)){case STYLE_PLAIN:return n;case STYLE_SINGLE:return"'"+n.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(n,e.indent)+dropEndingNewline(indentString(n,f));case STYLE_FOLDED:return">"+blockHeader(n,e.indent)+dropEndingNewline(indentString(foldString(n,u),f));case STYLE_DOUBLE:return'"'+escapeString(n)+'"';default:throw new exception("impossible error: invalid scalar style")}}()}function blockHeader(e,n){var r=needIndentIndicator(e)?String(n):"",o=e[e.length-1]===` `,l=o&&(e[e.length-2]===` `||e===` `),f=l?"+":o?"":"-";return r+f+` `}function dropEndingNewline(e){return e[e.length-1]===` `?e.slice(0,-1):e}function foldString(e,n){for(var r=/(\n+)([^\n]*)/g,o=function(){var p=e.indexOf(` `);return p=p!==-1?p:e.length,r.lastIndex=p,foldLine(e.slice(0,p),n)}(),l=e[0]===` `||e[0]===" ",f,u;u=r.exec(e);){var c=u[1],a=u[2];f=a[0]===" ",o+=c+(!l&&!f&&a!==""?` `:"")+foldLine(a,n),l=f}return o}function foldLine(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,l=0,f,u=0,c=0,a="";o=r.exec(e);)c=o.index,c-l>n&&(f=u>l?u:c,a+=` `+e.slice(l,f),l=f+1),u=c;return a+=` `,e.length-l>n&&u>l?a+=e.slice(l,u)+` `+e.slice(u+1):a+=e.slice(l),a.slice(1)}function escapeString(e){for(var n="",r=0,o,l=0;l=65536?l+=2:l++)r=codePointAt(e,l),o=ESCAPE_SEQUENCES[r],!o&&isPrintable(r)?(n+=e[l],r>=65536&&(n+=e[l+1])):n+=o||encodeHex(r);return n}function writeFlowSequence(e,n,r){var o="",l=e.tag,f,u,c;for(f=0,u=r.length;f"u"&&writeNode(e,n,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=l,e.dump="["+o+"]"}function writeBlockSequence(e,n,r,o){var l="",f=e.tag,u,c,a;for(u=0,c=r.length;u"u"&&writeNode(e,n+1,null,!0,!0,!1,!0))&&((!o||l!=="")&&(l+=generateNextLine(e,n)),e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=f,e.dump=l||"[]"}function writeFlowMapping(e,n,r){var o="",l=e.tag,f=Object.keys(r),u,c,a,p,h;for(u=0,c=f.length;u1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),writeNode(e,n,p,!1,!1)&&(h+=e.dump,o+=h));e.tag=l,e.dump="{"+o+"}"}function writeBlockMapping(e,n,r,o){var l="",f=e.tag,u=Object.keys(r),c,a,p,h,t,d;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(c=0,a=u.length;c1024,t&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,t&&(d+=generateNextLine(e,n)),writeNode(e,n+1,h,!0,t)&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,l+=d));e.tag=f,e.dump=l||"{}"}function detectType(e,n,r){var o,l,f,u,c,a;for(l=r?e.explicitTypes:e.implicitTypes,f=0,u=l.length;f tag resolver accepts not "'+a+'" style');e.dump=o}return!0}return!1}function writeNode(e,n,r,o,l,f,u){e.tag=null,e.dump=r,detectType(e,r,!1)||detectType(e,r,!0);var c=_toString.call(e.dump),a=o,p;o&&(o=e.flowLevel<0||e.flowLevel>n);var h=c==="[object Object]"||c==="[object Array]",t,d;if(h&&(t=e.duplicates.indexOf(r),d=t!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&n>0)&&(l=!1),d&&e.usedDuplicates[t])e.dump="*ref_"+t;else{if(h&&d&&!e.usedDuplicates[t]&&(e.usedDuplicates[t]=!0),c==="[object Object]")o&&Object.keys(e.dump).length!==0?(writeBlockMapping(e,n,e.dump,l),d&&(e.dump="&ref_"+t+e.dump)):(writeFlowMapping(e,n,e.dump),d&&(e.dump="&ref_"+t+" "+e.dump));else if(c==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!u&&n>0?writeBlockSequence(e,n-1,e.dump,l):writeBlockSequence(e,n,e.dump,l),d&&(e.dump="&ref_"+t+e.dump)):(writeFlowSequence(e,n,e.dump),d&&(e.dump="&ref_"+t+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&writeScalar(e,e.dump,n,f,a);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new exception("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(p=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?p="!"+p:p.slice(0,18)==="tag:yaml.org,2002:"?p="!!"+p.slice(18):p="!<"+p+">",e.dump=p+" "+e.dump)}return!0}function getDuplicateReferences(e,n){var r=[],o=[],l,f;for(inspectNode(e,r,o),l=0,f=o.length;l