UNPKG

144 kBJavaScriptView Raw
1var e=function(e,t){const n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n};var t={isPragma:function(e){return/^\s*@(prettier|format)\s*$/.test(e)},hasPragma:function(e){return/^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n".concat(e)}};var n={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}};function r(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
2/*! *****************************************************************************
3Copyright (c) Microsoft Corporation.
4
5Permission to use, copy, modify, and/or distribute this software for any
6purpose with or without fee is hereby granted.
7
8THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14PERFORMANCE OF THIS SOFTWARE.
15***************************************************************************** */(null==t&&n.path)}},n.exports),n.exports}var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i}function c(e){return this instanceof c?(this.v=e,this):new c(e)}var u=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return s},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},__decorate:function(e,t,n,r){var o,s=arguments.length,i=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},__values:i,__read:a,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,o++)r[o]=s[i];return r},__await:c,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof c?Promise.resolve(n.value.v).then(u,l):f(s[0][2],n)}catch(e){f(s[0][3],e)}var n}function u(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:c(e[r](t)),done:"return"===r}:o?o(t):t}:o}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=i(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),l=r((function(e,t){var n="\n",r=function(){function e(e){this.string=e;for(var t=[0],r=0;r<e.length;)switch(e[r]){case n:r+=n.length,t.push(r);break;case"\r":e[r+="\r".length]===n&&(r+=n.length),t.push(r);break;default:r++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=r})),f=r((function(e,t){t.__esModule=!0,t.defineParents=function e(t,n){void 0===n&&(n=null),"children"in t&&t.children.forEach((function(n){return e(n,t)})),"anchor"in t&&t.anchor&&e(t.anchor,t),"tag"in t&&t.tag&&e(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach((function(n){return e(n,t)})),"middleComments"in t&&t.middleComments.forEach((function(n){return e(n,t)})),"indicatorComment"in t&&t.indicatorComment&&e(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&e(t.trailingComment,t),"endComments"in t&&t.endComments.forEach((function(n){return e(n,t)})),Object.defineProperty(t,"_parent",{value:n,enumerable:!1})}})),h=r((function(e,t){t.__esModule=!0,t.getPointText=function(e){return e.line+":"+e.column}})),p=r((function(e,t){function n(e,t){if(t.position.start.offset!==t.position.end.offset){if("leadingComments"in t){var r=t.position.start,o=e[r.line-1].leadingAttachableNode;(!o||r.column<o.position.start.column)&&(e[r.line-1].leadingAttachableNode=t)}if("trailingComment"in t&&t.position.end.column>1&&"document"!==t.type&&"documentHead"!==t.type){var s=t.position.end,i=e[s.line-1].trailingAttachableNode;(!i||s.column>=i.position.end.column)&&(e[s.line-1].trailingAttachableNode=t)}if("root"!==t.type&&"document"!==t.type&&"documentHead"!==t.type&&"documentBody"!==t.type)for(var a=t.position,c=(r=a.start,0),u=[(s=a.end).line].concat(r.line===s.line?[]:r.line);c<u.length;c++){var l=u[c],f=e[l-1].trailingNode;(!f||s.column>=f.position.end.column)&&(e[l-1].trailingNode=t)}"children"in t&&t.children.forEach((function(t){n(e,t)}))}}function r(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case"flowMapping":case"flowSequence":return 0===e.children.length||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case"sequenceItem":return t.position.start.column>e.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&(0===e.children.length||1===e.children.length&&"blockFolded"!==e.children[0].type&&"blockLiteral"!==e.children[0].type)&&("mappingValue"===e.type||o(e));default:return!1}}function o(e){return e.position.start!==e.position.end&&(0===e.children.length||e.position.start.offset!==e.children[0].position.start.offset)}t.__esModule=!0,t.attachComments=function(e){f.defineParents(e);var t=function(e){for(var t=Array.from(new Array(e.position.end.line),(function(){return{}})),r=0,o=e.comments;r<o.length;r++){var s=o[r];t[s.position.start.line-1].comment=s}return n(t,e),t}(e),s=e.children.slice();e.comments.sort((function(e,t){return e.position.start.offset-t.position.end.offset})).filter((function(e){return!e._parent})).forEach((function(e){for(;s.length>1&&e.position.start.line>s[0].position.end.line;)s.shift();!function(e,t,n){var s=e.position.start.line,i=t[s-1].trailingAttachableNode;if(i){if(i.trailingComment)throw new Error("Unexpected multiple trailing comment at "+h.getPointText(e.position.start));return f.defineParents(e,i),void(i.trailingComment=e)}for(var a=s;a>=n.position.start.line;a--){var c=t[a-1].trailingNode,u=void 0;if(c)u=c;else{if(a===s||!t[a-1].comment)continue;u=t[a-1].comment._parent}if("sequence"!==u.type&&"mapping"!==u.type||(u=u.children[0]),"mappingItem"===u.type){var l=u.children,p=l[0],d=l[1];u=o(p)?p:d}for(;;){if(r(u,e))return f.defineParents(e,u),void u.endComments.push(e);if(!u._parent)break;u=u._parent}break}for(a=s+1;a<=n.position.end.line;a++){var g=t[a-1].leadingAttachableNode;if(g)return f.defineParents(e,g),void g.leadingComments.push(e)}var m=n.children[1];f.defineParents(e,m),m.endComments.push(e)}(e,t,s[0])}))}})),d=r((function(e,t){t.__esModule=!0,t.createNode=function(e,t){return{type:e,position:t}}})),g=r((function(e,t){t.__esModule=!0,t.createRoot=function(e,t,n){return u.__assign(u.__assign({},d.createNode("root",e)),{children:t,comments:n})}})),m=r((function(e,t){t.__esModule=!0,t.removeCstBlankLine=function e(t){switch(t.type){case"DOCUMENT":for(var n=t.contents.length-1;n>=0;n--)"BLANK_LINE"===t.contents[n].type?t.contents.splice(n,1):e(t.contents[n]);for(n=t.directives.length-1;n>=0;n--)"BLANK_LINE"===t.directives[n].type&&t.directives.splice(n,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(n=t.items.length-1;n>=0;n--){var r=t.items[n];"char"in r||("BLANK_LINE"===r.type?t.items.splice(n,1):e(r))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&e(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error("Unexpected node type "+JSON.stringify(t.type))}}})),y=r((function(e,t){t.__esModule=!0,t.createLeadingCommentAttachable=function(){return{leadingComments:[]}}})),v=r((function(e,t){t.__esModule=!0,t.createTrailingCommentAttachable=function(e){return void 0===e&&(e=null),{trailingComment:e}}})),_=r((function(e,t){t.__esModule=!0,t.createCommentAttachable=function(){return u.__assign(u.__assign({},y.createLeadingCommentAttachable()),v.createTrailingCommentAttachable())}})),w=r((function(e,t){t.__esModule=!0,t.createAlias=function(e,t,n){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("alias",e)),_.createCommentAttachable()),t),{value:n})}})),E=r((function(e,t){t.__esModule=!0,t.transformAlias=function(e,t){var n=e.cstNode;return w.createAlias(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}})),S=r((function(e,t){t.__esModule=!0,t.createBlockFolded=function(e){return u.__assign(u.__assign({},e),{type:"blockFolded"})}})),b=r((function(e,t){t.__esModule=!0,t.createBlockValue=function(e,t,n,r,o,s){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("blockValue",e)),y.createLeadingCommentAttachable()),t),{chomping:n,indent:r,value:o,indicatorComment:s})}})),A=r((function(e,t){t.__esModule=!0,function(e){e.Tag="!",e.Anchor="&",e.Comment="#"}(t.PropLeadingCharacter||(t.PropLeadingCharacter={}))})),M=r((function(e,t){t.__esModule=!0,t.createAnchor=function(e,t){return u.__assign(u.__assign({},d.createNode("anchor",e)),{value:t})}})),O=r((function(e,t){t.__esModule=!0,t.createComment=function(e,t){return u.__assign(u.__assign({},d.createNode("comment",e)),{value:t})}})),L=r((function(e,t){t.__esModule=!0,t.createContent=function(e,t,n){return{anchor:t,tag:e,middleComments:n}}})),N=r((function(e,t){t.__esModule=!0,t.createTag=function(e,t){return u.__assign(u.__assign({},d.createNode("tag",e)),{value:t})}})),T=r((function(e,t){t.__esModule=!0,t.transformContent=function(e,t,n){void 0===n&&(n=function(){return!1});for(var r=e.cstNode,o=[],s=null,i=null,a=null,c=0,u=r.props;c<u.length;c++){var l=u[c],f=t.text[l.origStart];switch(f){case A.PropLeadingCharacter.Tag:s=s||l,i=N.createTag(t.transformRange(l),e.tag);break;case A.PropLeadingCharacter.Anchor:s=s||l,a=M.createAnchor(t.transformRange(l),r.anchor);break;case A.PropLeadingCharacter.Comment:var h=O.createComment(t.transformRange(l),t.text.slice(l.origStart+1,l.origEnd));t.comments.push(h),!n(h)&&s&&s.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&o.push(h);break;default:throw new Error("Unexpected leading character "+JSON.stringify(f))}}return L.createContent(i,a,o)}})),C=r((function(e,t){var n;t.__esModule=!0,function(e){e.CLIP="clip",e.STRIP="strip",e.KEEP="keep"}(n||(n={})),t.transformAstBlockValue=function(e,t){var r=e.cstNode,o="CLIP"===r.chomping?0:1,s=r.header.origEnd-r.header.origStart-1-o!=0,i=t.transformRange({origStart:r.header.origStart,origEnd:r.valueRange.origEnd}),a=null,c=T.transformContent(e,t,(function(e){if(!(i.start.offset<e.position.start.offset&&e.position.end.offset<i.end.offset))return!1;if(a)throw new Error("Unexpected multiple indicator comments at "+h.getPointText(e.position.start));return a=e,!0}));return b.createBlockValue(i,c,n[r.chomping],s?r.blockIndent:null,r.strValue,a)}})),x=r((function(e,t){t.__esModule=!0,t.transformBlockFolded=function(e,t){return S.createBlockFolded(C.transformAstBlockValue(e,t))}})),P=r((function(e,t){t.__esModule=!0,t.createBlockLiteral=function(e){return u.__assign(u.__assign({},e),{type:"blockLiteral"})}})),R=r((function(e,t){t.__esModule=!0,t.transformBlockLiteral=function(e,t){return P.createBlockLiteral(C.transformAstBlockValue(e,t))}})),I=r((function(e,t){t.__esModule=!0,t.transformComment=function(e,t){return O.createComment(t.transformRange(e.range),e.comment)}})),k=r((function(e,t){t.__esModule=!0,t.createDirective=function(e,t,n){return u.__assign(u.__assign(u.__assign({},d.createNode("directive",e)),_.createCommentAttachable()),{name:t,parameters:n})}})),B=r((function(e,t){t.__esModule=!0,t.extractPropComments=function(e,t){for(var n=0,r=e.props;n<r.length;n++){var o=r[n],s=t.text[o.origStart];switch(s){case A.PropLeadingCharacter.Comment:t.comments.push(O.createComment(t.transformRange(o),t.text.slice(o.origStart+1,o.origEnd)));break;default:throw new Error("Unexpected leading character "+JSON.stringify(s))}}}})),Y=r((function(e,t){t.__esModule=!0,t.transformDirective=function(e,t){return B.extractPropComments(e,t),k.createDirective(t.transformRange(e.range),e.name,e.parameters)}})),D=r((function(e,t){t.__esModule=!0,t.createDocument=function(e,t,n,r){return u.__assign(u.__assign(u.__assign({},d.createNode("document",e)),v.createTrailingCommentAttachable(r)),{children:[t,n]})}})),U=r((function(e,t){t.__esModule=!0,t.createPosition=function(e,t){return{start:e,end:t}},t.createEmptyPosition=function(e){return{start:e,end:e}}})),F=r((function(e,t){t.__esModule=!0,t.createEndCommentAttachable=function(e){return void 0===e&&(e=[]),{endComments:e}}})),j=r((function(e,t){t.__esModule=!0,t.createDocumentBody=function(e,t,n){return u.__assign(u.__assign(u.__assign({},d.createNode("documentBody",e)),F.createEndCommentAttachable(n)),{children:t?[t]:[]})}})),W=r((function(e,t){t.__esModule=!0,t.getLast=function(e){return e[e.length-1]}})),Q=r((function(e,t){t.__esModule=!0,t.getMatchIndex=function(e,t){var n=e.match(t);return n?n.index:-1}})),V=r((function(e,t){t.__esModule=!0,t.transformDocumentBody=function(e,t,n){var r,o=e.cstNode,s=function(e,t,n){for(var r=[],o=[],s=[],i=[],a=!1,c=e.contents.length-1;c>=0;c--){var u=e.contents[c];if("COMMENT"===u.type){var l=t.transformNode(u);n&&n.line===l.position.start.line?i.unshift(l):a?r.unshift(l):l.position.start.offset>=e.valueRange.origEnd?s.unshift(l):r.unshift(l)}else a=!0}if(s.length>1)throw new Error("Unexpected multiple document trailing comments at "+h.getPointText(s[1].position.start));if(i.length>1)throw new Error("Unexpected multiple documentHead trailing comments at "+h.getPointText(i[1].position.start));return{comments:r,endComments:o,documentTrailingComment:W.getLast(s)||null,documentHeadTrailingComment:W.getLast(i)||null}}(o,t,n),i=s.comments,a=s.endComments,c=s.documentTrailingComment,l=s.documentHeadTrailingComment,f=t.transformNode(e.contents),p=function(e,t,n){var r=Q.getMatchIndex(n.text.slice(e.valueRange.origEnd),/^\.\.\./),o=-1===r?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);"\r"===n.text[o-1]&&o--;var s=n.transformRange({origStart:null!==t?t.position.start.offset:o,origEnd:o}),i=-1===r?s.end:n.transformOffset(e.valueRange.origEnd+3);return{position:s,documentEndPoint:i}}(o,f,t),d=p.position,g=p.documentEndPoint;return(r=t.comments).push.apply(r,u.__spreadArrays(i,a)),{documentBody:j.createDocumentBody(d,f,a),documentEndPoint:g,documentTrailingComment:c,documentHeadTrailingComment:l}}})),K=r((function(e,t){t.__esModule=!0,t.createDocumentHead=function(e,t,n,r){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("documentHead",e)),F.createEndCommentAttachable(n)),v.createTrailingCommentAttachable(r)),{children:t})}})),q=r((function(e,t){t.__esModule=!0,t.transformDocumentHead=function(e,t){var n,r=e.cstNode,o=function(e,t){for(var n=[],r=[],o=[],s=!1,i=e.directives.length-1;i>=0;i--){var a=t.transformNode(e.directives[i]);"comment"===a.type?s?r.unshift(a):o.unshift(a):(s=!0,n.unshift(a))}return{directives:n,comments:r,endComments:o}}(r,t),s=o.directives,i=o.comments,a=o.endComments,c=function(e,t,n){var r=Q.getMatchIndex(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);var o=-1===r?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};0!==t.length&&(o.origStart=t[0].position.start.offset);return{position:n.transformRange(o),endMarkerPoint:-1===r?null:n.transformOffset(r)}}(r,s,t),l=c.position,f=c.endMarkerPoint;return(n=t.comments).push.apply(n,u.__spreadArrays(i,a)),{createDocumentHeadWithTrailingComment:function(e){return e&&t.comments.push(e),K.createDocumentHead(l,s,a,e)},documentHeadEndMarkerPoint:f}}})),J=r((function(e,t){t.__esModule=!0,t.transformDocument=function(e,t){var n=q.transformDocumentHead(e,t),r=n.createDocumentHeadWithTrailingComment,o=n.documentHeadEndMarkerPoint,s=V.transformDocumentBody(e,t,o),i=s.documentBody,a=s.documentEndPoint,c=s.documentTrailingComment,u=r(s.documentHeadTrailingComment);return c&&t.comments.push(c),D.createDocument(U.createPosition(u.position.start,a),u,i,c)}})),$=r((function(e,t){t.__esModule=!0,t.createFlowCollection=function(e,t,n){return u.__assign(u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("flowCollection",e)),_.createCommentAttachable()),F.createEndCommentAttachable()),t),{children:n})}})),G=r((function(e,t){t.__esModule=!0,t.createFlowMapping=function(e,t,n){return u.__assign(u.__assign({},$.createFlowCollection(e,t,n)),{type:"flowMapping"})}})),H=r((function(e,t){t.__esModule=!0,t.createFlowMappingItem=function(e,t,n){return u.__assign(u.__assign(u.__assign({},d.createNode("flowMappingItem",e)),y.createLeadingCommentAttachable()),{children:[t,n]})}})),z=r((function(e,t){t.__esModule=!0,t.extractComments=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var s=o[r];s&&"type"in s&&"COMMENT"===s.type?t.comments.push(t.transformNode(s)):n.push(s)}return n}})),Z=r((function(e,t){t.__esModule=!0,t.getFlowMapItemAdditionalRanges=function(e){var t=["?",":"].map((function(t){var n=e.find((function(e){return"char"in e&&e.char===t}));return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null}));return{additionalKeyRange:t[0],additionalValueRange:t[1]}}})),X=r((function(e,t){t.__esModule=!0,t.createSlicer=function(e,t){var n=t;return function(t){return e.slice(n,n=t)}}})),ee=r((function(e,t){t.__esModule=!0,t.groupCstFlowCollectionItems=function(e){for(var t=[],n=X.createSlicer(e,1),r=!1,o=1;o<e.length-1;o++){var s=e[o];"char"in s&&","===s.char?(t.push(n(o)),n(o+1),r=!1):r=!0}return r&&t.push(n(e.length-1)),t}})),te=r((function(e,t){t.__esModule=!0,t.createMappingKey=function(e,t){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("mappingKey",e)),v.createTrailingCommentAttachable()),F.createEndCommentAttachable()),{children:t?[t]:[]})}})),ne=r((function(e,t){t.__esModule=!0,t.createMappingValue=function(e,t){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("mappingValue",e)),_.createCommentAttachable()),F.createEndCommentAttachable()),{children:t?[t]:[]})}})),re=r((function(e,t){t.__esModule=!0,t.transformAstPair=function(e,t,n,r,o){var s=t.transformNode(e.key),i=t.transformNode(e.value),a=s||r?te.createMappingKey(t.transformRange({origStart:r?r.origStart:s.position.start.offset,origEnd:s?s.position.end.offset:r.origStart+1}),s):null,c=i||o?ne.createMappingValue(t.transformRange({origStart:o?o.origStart:i.position.start.offset,origEnd:i?i.position.end.offset:o.origStart+1}),i):null;return n(U.createPosition(a?a.position.start:c.position.start,c?c.position.end:a.position.end),a||te.createMappingKey(U.createEmptyPosition(c.position.start),null),c||ne.createMappingValue(U.createEmptyPosition(a.position.end),null))}})),oe=r((function(e,t){t.__esModule=!0,t.transformFlowMap=function(e,t){var n=z.extractComments(e.cstNode.items,t),r=ee.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){var o=r[n],s=Z.getFlowMapItemAdditionalRanges(o),i=s.additionalKeyRange,a=s.additionalValueRange;return re.transformAstPair(e,t,H.createFlowMappingItem,i,a)})),s=n[0],i=W.getLast(n);return G.createFlowMapping(t.transformRange({origStart:s.origOffset,origEnd:i.origOffset+1}),t.transformContent(e),o)}})),se=r((function(e,t){t.__esModule=!0,t.createFlowSequence=function(e,t,n){return u.__assign(u.__assign({},$.createFlowCollection(e,t,n)),{type:"flowSequence"})}})),ie=r((function(e,t){t.__esModule=!0,t.createFlowSequenceItem=function(e,t){return u.__assign(u.__assign({},d.createNode("flowSequenceItem",e)),{children:[t]})}})),ae=r((function(e,t){t.__esModule=!0,t.transformFlowSeq=function(e,t){var n=z.extractComments(e.cstNode.items,t),r=ee.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){if("PAIR"!==e.type){var o=t.transformNode(e);return ie.createFlowSequenceItem(U.createPosition(o.position.start,o.position.end),o)}var s=r[n],i=Z.getFlowMapItemAdditionalRanges(s),a=i.additionalKeyRange,c=i.additionalValueRange;return re.transformAstPair(e,t,H.createFlowMappingItem,a,c)})),s=n[0],i=W.getLast(n);return se.createFlowSequence(t.transformRange({origStart:s.origOffset,origEnd:i.origOffset+1}),t.transformContent(e),o)}})),ce=r((function(e,t){t.__esModule=!0,t.createMapping=function(e,t,n){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("mapping",e)),y.createLeadingCommentAttachable()),t),{children:n})}})),ue=r((function(e,t){t.__esModule=!0,t.createMappingItem=function(e,t,n){return u.__assign(u.__assign(u.__assign({},d.createNode("mappingItem",e)),y.createLeadingCommentAttachable()),{children:[t,n]})}})),le=r((function(e,t){t.__esModule=!0,t.transformMap=function(e,t){var n=e.cstNode;n.items.filter((function(e){return"MAP_KEY"===e.type||"MAP_VALUE"===e.type})).forEach((function(e){return B.extractPropComments(e,t)}));var r=function(e){for(var t=[],n=X.createSlicer(e,0),r=!1,o=0;o<e.length;o++){"MAP_VALUE"!==e[o].type?(r&&t.push(n(o)),r=!0):(t.push(n(o+1)),r=!1)}r&&t.push(n(1/0));return t}(z.extractComments(n.items,t)),o=e.items.map((function(e,n){var o=r[n],s="MAP_VALUE"===o[0].type?[null,o[0].range]:[o[0].range,1===o.length?null:o[1].range],i=s[0],a=s[1];return re.transformAstPair(e,t,ue.createMappingItem,i,a)}));return ce.createMapping(U.createPosition(o[0].position.start,W.getLast(o).position.end),t.transformContent(e),o)}})),fe=r((function(e,t){t.__esModule=!0,t.createPlain=function(e,t,n){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("plain",e)),_.createCommentAttachable()),t),{value:n})}})),he=r((function(e,t){t.__esModule=!0,t.findLastCharIndex=function(e,t,n){for(var r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}})),pe=r((function(e,t){t.__esModule=!0,t.transformPlain=function(e,t){var n=e.cstNode;return fe.createPlain(t.transformRange({origStart:n.valueRange.origStart,origEnd:he.findLastCharIndex(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}})),de=r((function(e,t){t.__esModule=!0,t.createQuoteDouble=function(e){return u.__assign(u.__assign({},e),{type:"quoteDouble"})}})),ge=r((function(e,t){t.__esModule=!0,t.createQuoteValue=function(e,t,n){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("quoteValue",e)),t),_.createCommentAttachable()),{value:n})}})),me=r((function(e,t){t.__esModule=!0,t.transformAstQuoteValue=function(e,t){var n=e.cstNode;return ge.createQuoteValue(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}})),ye=r((function(e,t){t.__esModule=!0,t.transformQuoteDouble=function(e,t){return de.createQuoteDouble(me.transformAstQuoteValue(e,t))}})),ve=r((function(e,t){t.__esModule=!0,t.createQuoteSingle=function(e){return u.__assign(u.__assign({},e),{type:"quoteSingle"})}})),_e=r((function(e,t){t.__esModule=!0,t.transformQuoteSingle=function(e,t){return ve.createQuoteSingle(me.transformAstQuoteValue(e,t))}})),we=r((function(e,t){t.__esModule=!0,t.createSequence=function(e,t,n){return u.__assign(u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("sequence",e)),y.createLeadingCommentAttachable()),F.createEndCommentAttachable()),t),{children:n})}})),Ee=r((function(e,t){t.__esModule=!0,t.createSequenceItem=function(e,t){return u.__assign(u.__assign(u.__assign(u.__assign({},d.createNode("sequenceItem",e)),_.createCommentAttachable()),F.createEndCommentAttachable()),{children:t?[t]:[]})}})),Se=r((function(e,t){t.__esModule=!0,t.transformSeq=function(e,t){var n=z.extractComments(e.cstNode.items,t).map((function(n,r){B.extractPropComments(n,t);var o=t.transformNode(e.items[r]);return Ee.createSequenceItem(U.createPosition(t.transformOffset(n.valueRange.origStart),null===o?t.transformOffset(n.valueRange.origStart+1):o.position.end),o)}));return we.createSequence(U.createPosition(n[0].position.start,W.getLast(n).position.end),t.transformContent(e),n)}})),be=r((function(e,t){t.__esModule=!0,t.transformNode=function(e,t){if(null===e||void 0===e.type&&null===e.value)return null;switch(e.type){case"ALIAS":return E.transformAlias(e,t);case"BLOCK_FOLDED":return x.transformBlockFolded(e,t);case"BLOCK_LITERAL":return R.transformBlockLiteral(e,t);case"COMMENT":return I.transformComment(e,t);case"DIRECTIVE":return Y.transformDirective(e,t);case"DOCUMENT":return J.transformDocument(e,t);case"FLOW_MAP":return oe.transformFlowMap(e,t);case"FLOW_SEQ":return ae.transformFlowSeq(e,t);case"MAP":return le.transformMap(e,t);case"PLAIN":return pe.transformPlain(e,t);case"QUOTE_DOUBLE":return ye.transformQuoteDouble(e,t);case"QUOTE_SINGLE":return _e.transformQuoteSingle(e,t);case"SEQ":return Se.transformSeq(e,t);default:throw new Error("Unexpected node type "+e.type)}}})),Ae=r((function(e,t){t.__esModule=!0,t.createError=function(e,t,n){var r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r}})),Me=r((function(e,t){t.__esModule=!0,t.transformError=function(e,t){var n=e.source.range||e.source.valueRange;return Ae.createError(e.message,t.text,t.transformRange(n))}})),Oe=r((function(e,t){t.__esModule=!0,t.createPoint=function(e,t,n){return{offset:e,line:t,column:n}}})),Le=r((function(e,t){t.__esModule=!0,t.transformOffset=function(e,t){e<0?e=0:e>t.text.length&&(e=t.text.length);var n=t.locator.locationForIndex(e);return Oe.createPoint(e,n.line+1,n.column+1)}})),Ne=r((function(e,t){t.__esModule=!0,t.transformRange=function(e,t){return U.createPosition(t.transformOffset(e.origStart),t.transformOffset(e.origEnd))}})),Te=r((function(e,t){t.__esModule=!0;var n=!0;function r(e,t){if(e&&"object"==typeof e&&t(e)!==n)for(var o=0,s=Object.keys(e);o<s.length;o++){var i=s[o];if("context"!==i&&"error"!==i){var a=e[i];Array.isArray(a)?a.forEach((function(e){return r(e,t)})):r(a,t)}}}t.addOrigRange=function(e){if(!e.setOrigRanges()){var t=function(e){return function(e){return"number"==typeof e.start}(e)?(e.origStart=e.start,e.origEnd=e.end,n):function(e){return"number"==typeof e.offset}(e)?(e.origOffset=e.offset,n):void 0};e.forEach((function(e){return r(e,t)}))}}})),Ce=r((function(e,t){t.__esModule=!0,t.removeFakeNodes=function e(t){if("children"in t){if(1===t.children.length){var n=t.children[0];if("plain"===n.type&&null===n.tag&&null===n.anchor&&""===n.value)return t.children.splice(0,1),t}t.children.forEach(e)}return t}})),xe=r((function(e,t){t.__esModule=!0,t.createUpdater=function(e,t,n,r){var o=t(e);return function(t){r(o,t)&&n(e,o=t)}}})),Pe=r((function(e,t){function n(e){return e.start}function r(e,t){e.start=t}function o(e){return e.end}function s(e,t){e.end=t}function i(e,t){return t.offset<e.offset}function a(e,t){return t.offset>e.offset}t.__esModule=!0,t.updatePositions=function e(t){if(null!==t&&"children"in t){var c=t.children;if(c.forEach(e),"document"===t.type){var u=t.children,l=u[0],f=u[1];l.position.start.offset===l.position.end.offset?l.position.start=l.position.end=f.position.start:f.position.start.offset===f.position.end.offset&&(f.position.start=f.position.end=l.position.end)}var h=xe.createUpdater(t.position,n,r,i),p=xe.createUpdater(t.position,o,s,a);"endComments"in t&&0!==t.endComments.length&&(h(t.endComments[0].position.start),p(W.getLast(t.endComments).position.end));var d=c.filter((function(e){return null!==e}));if(0!==d.length){var g=d[0],m=W.getLast(d);h(g.position.start),p(m.position.end),"leadingComments"in g&&0!==g.leadingComments.length&&h(g.leadingComments[0].position.start),"tag"in g&&g.tag&&h(g.tag.position.start),"anchor"in g&&g.anchor&&h(g.anchor.position.start),"trailingComment"in m&&m.trailingComment&&p(m.trailingComment.position.end)}}}}));const Re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},Ie={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};function ke(e){const t=[0];let n=e.indexOf("\n");for(;-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function Be(e){let t,n;return"string"==typeof e?(t=ke(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=ke(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function Ye(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=Be(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){const r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}const o=n.length;return{line:o,col:e-n[o-1]+1}}function De({start:e,end:t},n,r=80){let o=function(e,t){const{lineStarts:n,src:r}=Be(t);if(!n||!(e>=1)||e>n.length)return null;const o=n[e-1];let s=n[e];for(;s&&s>o&&"\n"===r[s-1];)--s;return r.slice(o,s)}(e.line,n);if(!o)return null;let{col:s}=e;if(o.length>r)if(s<=r-10)o=o.substr(0,r-1)+"\u2026";else{const e=Math.round(r/2);o.length>s+e&&(o=o.substr(0,s+e-1)+"\u2026"),s-=o.length-r,o="\u2026"+o.substr(1-r)}let i=1,a="";t&&(t.line===e.line&&s+(t.col-e.col)<=r+1?i=t.col-e.col:(i=Math.min(o.length+1,r)-s,a="\u2026"));const c=s>1?" ".repeat(s-1):"",u="^".repeat(i);return"".concat(o,"\n").concat(c).concat(u).concat(a)}class Ue{static copy(e){return new Ue(e.start,e.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:n,end:r}=this;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;let o=t;for(;o<e.length&&!(e[o]>n);)++o;this.origStart=n+o;const s=o;for(;o<e.length&&!(e[o]>=r);)++o;return this.origEnd=r+o,s}}class Fe{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=Fe.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,n){const r=e[t];if(!r)return!0;const o=e[t-1];if(o&&"\n"!==o)return!1;if(n){if(r!==n)return!1}else if(r!==Re.DIRECTIVES_END&&r!==Re.DOCUMENT_END)return!1;const s=e[t+1],i=e[t+2];if(s!==r||i!==r)return!1;const a=e[t+3];return!a||"\n"===a||"\t"===a||" "===a}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,o=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===o.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;" "===n;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&"\n"!==n;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;"\t"===n||" "===n;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}static endOfBlockIndent(e,t,n){const r=Fe.endOfIndent(e,n);if(r>n+t)return r;{const t=Fe.endOfWhiteSpace(e,r),n=e[t];if(!n||"\n"===n)return t}return null}static atBlank(e,t,n){const r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}static nextNodeIsIndented(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}static normalizeOffset(e,t){const n=e[t];return n?"\n"!==n&&"\n"===e[t-1]?t-1:Fe.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,o=!1,s="",i=e[t+1];for(;" "===i||"\t"===i||"\n"===i;){switch(i){case"\n":r=0,t+=1,s+="\n";break;case"\t":r<=n&&(o=!0),t=Fe.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}i=e[t+1]}return s||(s=" "),i&&r<=n&&(o=!0),{fold:s,offset:t,error:o}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;const{src:r}=this.context,o=this.props[e];return o&&r[o.start]===t?r.slice(o.start+(n?1:0),o.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,Re.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const n=this.getPropValue(t,Re.COMMENT,!0);null!=n&&e.push(n)}return e.length>0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return e!==n||Fe.atBlank(t,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]===Re.COMMENT)return!0}return!1}get hasProps(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]!==Re.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[Ie.FLOW_MAP,Ie.FLOW_SEQ,Ie.QUOTE_DOUBLE,Ie.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=Ye(this.range.start,this.context.root);if(!e)return;return{start:e,end:Ye(this.range.end,this.context.root)}}get rawValue(){if(!this.valueRange||!this.context)return null;const{start:e,end:t}=this.valueRange;return this.context.src.slice(e,t)}get tag(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,Re.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};{const[e,n,r]=t.match(/^(.*!)([^!]*)$/);return{handle:n,suffix:r}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;const{start:e,end:t}=this.valueRange,{src:n}=this.context;for(let r=e;r<t;++r)if("\n"===n[r])return!0;return!1}parseComment(e){const{src:t}=this.context;if(t[e]===Re.COMMENT){const n=Fe.endOfLine(t,e+1),r=new Ue(e,n);return this.props.push(r),n}return e}setOrigRanges(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((n=>n.setOrigRange(e,t))),t}toString(){const{context:{src:e},range:t,value:n}=this;if(null!=n)return n;const r=e.slice(t.start,t.end);return Fe.addStringTerminator(e,t.end,r)}}class je extends Error{constructor(e,t,n){if(!(n&&t instanceof Fe))throw new Error("Invalid arguments for new ".concat(e));super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new Ue(this.offset,this.offset+1);const t=e&&Ye(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:n}=this.linePos.start;this.message+=" at line ".concat(t,", column ").concat(n);const r=e&&De(this.linePos,e);r&&(this.message+=":\n\n".concat(r,"\n"))}delete this.source}}class We extends je{constructor(e,t){super("YAMLSemanticError",e,t)}}class Qe extends Fe{static endOfLine(e,t,n){let r=e[t],o=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[o+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;o+=1,r=t}return o}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:n}=this.context;let r=n[t-1];for(;e<t&&("\n"===r||"\t"===r||" "===r);)r=n[--t-1];let o="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=Fe.foldNewline(n,r,-1);o+=e,r=t}else if(" "===e||"\t"===e){const s=r;let i=n[r+1];for(;r<t&&(" "===i||"\t"===i);)r+=1,i=n[r+1];"\n"!==i&&(o+=r>s?n.slice(s,r+1):e)}else o+=e}const s=n[e];switch(s){case"\t":return{errors:[new We(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":{const e="Plain value cannot start with reserved character ".concat(s);return{errors:[new We(this,e)],str:o}}default:return o}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let o=e,s=e;for(let e=r[o];"\n"===e&&!Fe.atDocumentBoundary(r,o+1);e=r[o]){const e=Fe.endOfBlockIndent(r,t,o+1);if(null===e||"#"===r[e])break;"\n"===r[e]?o=e:(s=Qe.endOfLine(r,e,n),o=s)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let o=t;const s=r[o];return s&&"#"!==s&&"\n"!==s&&(o=Qe.endOfLine(r,t,n)),this.valueRange=new Ue(t,o),o=Fe.endOfWhiteSpace(r,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}var Ve={Char:Re,Node:Fe,PlainValue:Qe,Range:Ue,Type:Ie,YAMLError:je,YAMLReferenceError:class extends je{constructor(e,t){super("YAMLReferenceError",e,t)}},YAMLSemanticError:We,YAMLSyntaxError:class extends je{constructor(e,t){super("YAMLSyntaxError",e,t)}},YAMLWarning:class extends je{constructor(e,t){super("YAMLWarning",e,t)}},_defineProperty:function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},defaultTagPrefix:"tag:yaml.org,2002:",defaultTags:{MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}};class Ke extends Ve.Node{constructor(){super(Ve.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new Ve.Range(t,t+1),t+1}}class qe extends Ve.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:n,src:r}=e;let{atLineStart:o,lineStart:s}=e;o||this.type!==Ve.Type.SEQ_ITEM||(this.error=new Ve.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const i=o?t-s:e.indent;let a=Ve.Node.endOfWhiteSpace(r,t+1),c=r[a];const u="#"===c,l=[];let f=null;for(;"\n"===c||"#"===c;){if("#"===c){const e=Ve.Node.endOfLine(r,a+1);l.push(new Ve.Range(a,e)),a=e}else{o=!0,s=a+1;"\n"===r[Ve.Node.endOfWhiteSpace(r,s)]&&0===l.length&&(f=new Ke,s=f.parse({src:r},s)),a=Ve.Node.endOfIndent(r,s)}c=r[a]}if(Ve.Node.nextNodeIsIndented(c,a-(s+i),this.type!==Ve.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:i,lineStart:s,parent:this},a):c&&s>t+1&&(a=s-1),this.node){if(f){const t=e.parent.items||e.parent.contents;t&&t.push(f)}l.length&&Array.prototype.push.apply(this.props,l),a=this.node.range.end}else if(u){const e=l[0];this.props.push(e),a=e.end}else a=Ve.Node.endOfLine(r,t+1);const h=this.node?this.node.valueRange.end:a;return this.valueRange=new Ve.Range(t,h),a}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:n,value:r}=this;if(null!=r)return r;const o=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return Ve.Node.addStringTerminator(e,n.end,o)}}class Je extends Ve.Node{constructor(){super(Ve.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new Ve.Range(t,n),n}}function $e(e){let t=e;for(;t instanceof qe;)t=t.node;if(!(t instanceof Ge))return null;const n=t.items.length;let r=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===Ve.Type.COMMENT){const{indent:t,lineStart:o}=n.context;if(t>0&&n.range.start>=o+t)break;r=e}else{if(n.type!==Ve.Type.BLANK_LINE)break;r=e}}if(-1===r)return null;const o=t.items.splice(r,n-r),s=o[0].range.start;for(;t.range.end=s,t.valueRange&&t.valueRange.end>s&&(t.valueRange.end=s),t!==e;)t=t.context.parent;return o}class Ge extends Ve.Node{static nextContentHasIndent(e,t,n){const r=Ve.Node.endOfLine(e,t)+1,o=e[t=Ve.Node.endOfWhiteSpace(e,r)];return!!o&&(t>=r+n||("#"===o||"\n"===o)&&Ge.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===Ve.Type.SEQ_ITEM?Ve.Type.SEQ:Ve.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);const n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];const t=$e(e);t&&Array.prototype.push.apply(this.items,t)}get includesTrailingLines(){return this.items.length>0}parse(e,t){this.context=e;const{parseNode:n,src:r}=e;let o=Ve.Node.startOfLine(r,t);const s=this.items[0];s.context.parent=this,this.valueRange=Ve.Range.copy(s.valueRange);const i=s.range.start-s.context.lineStart;let a=t;a=Ve.Node.normalizeOffset(r,a);let c=r[a],u=Ve.Node.endOfWhiteSpace(r,o)===a,l=!1;for(;c;){for(;"\n"===c||"#"===c;){if(u&&"\n"===c&&!l){const e=new Ke;if(a=e.parse({src:r},a),this.valueRange.end=a,a>=r.length){c=null;break}this.items.push(e),a-=1}else if("#"===c){if(a<o+i&&!Ge.nextContentHasIndent(r,a,i))return a;const e=new Je;if(a=e.parse({indent:i,lineStart:o,src:r},a),this.items.push(e),this.valueRange.end=a,a>=r.length){c=null;break}}if(o=a+1,a=Ve.Node.endOfIndent(r,o),Ve.Node.atBlank(r,a)){const e=Ve.Node.endOfWhiteSpace(r,a),t=r[e];t&&"\n"!==t&&"#"!==t||(a=e)}c=r[a],u=!0}if(!c)break;if(a!==o+i&&(u||":"!==c)){if(a<o+i){o>t&&(a=o);break}if(!this.error){const e="All collection items must start at the same column";this.error=new Ve.YAMLSyntaxError(this,e)}}if(s.type===Ve.Type.SEQ_ITEM){if("-"!==c){o>t&&(a=o);break}}else if("-"===c&&!this.error){const e=r[a+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new Ve.YAMLSyntaxError(this,e)}}const e=n({atLineStart:u,inCollection:!0,indent:i,lineStart:o,parent:this},a);if(!e)return a;if(this.items.push(e),this.valueRange.end=e.valueRange.end,a=Ve.Node.normalizeOffset(r,e.range.end),c=r[a],u=!1,l=e.includesTrailingLines,c){let e=a-1,t=r[e];for(;" "===t||"\t"===t;)t=r[--e];"\n"===t&&(o=e+1,u=!0)}const f=$e(e);f&&Array.prototype.push.apply(this.items,f)}return a}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{t=n.setOrigRanges(e,t)})),t}toString(){const{context:{src:e},items:t,range:n,value:r}=this;if(null!=r)return r;let o=e.slice(n.start,t[0].range.start)+String(t[0]);for(let e=1;e<t.length;++e){const n=t[e],{atLineStart:r,indent:s}=n.context;if(r)for(let e=0;e<s;++e)o+=" ";o+=String(n)}return Ve.Node.addStringTerminator(e,n.end,o)}}class He extends Ve.Node{constructor(){super(Ve.Type.DIRECTIVE),this.name=null}get parameters(){const e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){const{src:t}=this.context;let n=e,r=t[n];for(;r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}parseParameters(e){const{src:t}=this.context;let n=e,r=t[n];for(;r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new Ve.Range(e,n),n}parse(e,t){this.context=e;let n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new Ve.Range(t,n),n}}class ze extends Ve.Node{static startCommentOrEndBlankLine(e,t){const n=Ve.Node.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}constructor(){super(Ve.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){const{src:t}=this.context;this.directives=[];let n=!0,r=!1,o=e;for(;!Ve.Node.atDocumentBoundary(t,o,Ve.Char.DIRECTIVES_END);)switch(o=ze.startCommentOrEndBlankLine(t,o),t[o]){case"\n":if(n){const e=new Ke;o=e.parse({src:t},o),o<t.length&&this.directives.push(e)}else o+=1,n=!0;break;case"#":{const e=new Je;o=e.parse({src:t},o),this.directives.push(e),n=!1}break;case"%":{const e=new He;o=e.parse({parent:this,src:t},o),this.directives.push(e),r=!0,n=!1}break;default:return r?this.error=new Ve.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new Ve.Range(o,o+3),o+3):(r?this.error=new Ve.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let r=e;for(;"-"===n[r-1];)r-=1;let o=Ve.Node.endOfWhiteSpace(n,e),s=r===e;for(this.valueRange=new Ve.Range(o);!Ve.Node.atDocumentBoundary(n,o,Ve.Char.DOCUMENT_END);){switch(n[o]){case"\n":if(s){const e=new Ke;o=e.parse({src:n},o),o<n.length&&this.contents.push(e)}else o+=1,s=!0;r=o;break;case"#":{const e=new Je;o=e.parse({src:n},o),this.contents.push(e),s=!1}break;default:{const e=Ve.Node.endOfIndent(n,o),i=t({atLineStart:s,indent:-1,inFlow:!1,inCollection:!1,lineStart:r,parent:this},e);if(!i)return this.valueRange.end=e;this.contents.push(i),o=i.range.end,s=!1;const a=$e(i);a&&Array.prototype.push.apply(this.contents,a)}}o=ze.startCommentOrEndBlankLine(n,o)}if(this.valueRange.end=o,n[o]&&(this.documentEndMarker=new Ve.Range(o,o+3),o+=3,n[o])){if(o=Ve.Node.endOfWhiteSpace(n,o),"#"===n[o]){const e=new Je;o=e.parse({src:n},o),this.contents.push(e)}switch(n[o]){case"\n":o+=1;break;case void 0:break;default:this.error=new Ve.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return o}parse(e,t){e.root=this,this.context=e;const{src:n}=e;let r=65279===n.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),r=this.parseContents(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.directives.forEach((n=>{t=n.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((n=>{t=n.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){const{contents:e,directives:t,value:n}=this;if(null!=n)return n;let r=t.join("");return e.length>0&&((t.length>0||e[0].type===Ve.Type.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}class Ze extends Ve.Node{parse(e,t){this.context=e;const{src:n}=e;let r=Ve.Node.endOfIdentifier(n,t+1);return this.valueRange=new Ve.Range(t+1,r),r=Ve.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}const Xe="CLIP",et="KEEP",tt="STRIP";class nt extends Ve.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=Xe,this.header=null}get includesTrailingLines(){return this.chomping===et}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:r}=this.context;if(this.valueRange.isEmpty())return"";let o=null,s=r[t-1];for(;"\n"===s||"\t"===s||" "===s;){if(t-=1,t<=e){if(this.chomping===et)break;return""}"\n"===s&&(o=t),s=r[t-1]}let i=t+1;o&&(this.chomping===et?(i=o,t=this.valueRange.end):t=o);const a=n+this.blockIndent,c=this.type===Ve.Type.BLOCK_FOLDED;let u=!0,l="",f="",h=!1;for(let n=e;n<t;++n){for(let e=0;e<a&&" "===r[n];++e)n+=1;const e=r[n];if("\n"===e)"\n"===f?l+="\n":f="\n";else{const o=Ve.Node.endOfLine(r,n),s=r.slice(n,o);n=o,c&&(" "===e||"\t"===e)&&n<i?(" "===f?f="\n":h||u||"\n"!==f||(f="\n\n"),l+=f+s,f=o<t&&r[o]||"",h=!0):(l+=f+s,f=c&&n<i?" ":"\n",h=!1),u&&""!==s&&(u=!1)}}return this.chomping===tt?l:l+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,r="";for(;;){const o=t[n];switch(o){case"-":this.chomping=tt;break;case"+":this.chomping=et;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=o;break;default:return this.blockIndent=Number(r)||null,this.header=new Ve.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,r=!!this.blockIndent;let o=e,s=e,i=1;for(let e=n[o];"\n"===e&&(o+=1,!Ve.Node.atDocumentBoundary(n,o));e=n[o]){const e=Ve.Node.endOfBlockIndent(n,t,o);if(null===e)break;const a=n[e],c=e-(o+t);if(this.blockIndent){if(a&&"\n"!==a&&c<this.blockIndent){if("#"===n[e])break;if(!this.error){const e="Block scalars must not be less indented than their ".concat(r?"explicit indentation indicator":"first line");this.error=new Ve.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(c<i){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new Ve.YAMLSemanticError(this,e)}this.blockIndent=c}else c>i&&(i=c);o="\n"===n[e]?e:s=Ve.Node.endOfLine(n,e)}return this.chomping!==et&&(o=n[s]?s+1:s),this.valueRange=new Ve.Range(e+1,o),o}parse(e,t){this.context=e;const{src:n}=e;let r=this.parseBlockHeader(t);return r=Ve.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class rt extends Ve.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(e=this.items.length){const t=this.items[e-1];return!!t&&(t.jsonLike||t.type===Ve.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:r}=e;let{indent:o,lineStart:s}=e,i=r[t];this.items=[{char:i,offset:t}];let a=Ve.Node.endOfWhiteSpace(r,t+1);for(i=r[a];i&&"]"!==i&&"}"!==i;){switch(i){case"\n":s=a+1;if("\n"===r[Ve.Node.endOfWhiteSpace(r,s)]){const e=new Ke;s=e.parse({src:r},s),this.items.push(e)}if(a=Ve.Node.endOfIndent(r,s),a<=s+o&&(i=r[a],a<s+o||"]"!==i&&"}"!==i)){const e="Insufficient indentation in flow collection";this.error=new Ve.YAMLSemanticError(this,e)}break;case",":this.items.push({char:i,offset:a}),a+=1;break;case"#":{const e=new Je;a=e.parse({src:r},a),this.items.push(e)}break;case"?":case":":{const e=r[a+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===i&&this.prevNodeIsJsonLike()){this.items.push({char:i,offset:a}),a+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:s,parent:this},a);if(!e)return this.valueRange=new Ve.Range(t,a),a;this.items.push(e),a=Ve.Node.normalizeOffset(r,e.range.end)}}a=Ve.Node.endOfWhiteSpace(r,a),i=r[a]}return this.valueRange=new Ve.Range(t,a+1),i&&(this.items.push({char:i,offset:a}),a=Ve.Node.endOfWhiteSpace(r,a+1),a=this.parseComment(a)),a}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{if(n instanceof Ve.Node)t=n.setOrigRanges(e,t);else if(0===e.length)n.origOffset=n.offset;else{let r=t;for(;r<e.length&&!(e[r]>n.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}toString(){const{context:{src:e},items:t,range:n,value:r}=this;if(null!=r)return r;const o=t.filter((e=>e instanceof Ve.Node));let s="",i=n.start;return o.forEach((t=>{const n=e.slice(i,t.range.start);i=t.range.end,s+=n+String(t),"\n"===s[s.length-1]&&"\n"!==e[i-1]&&"\n"===e[i]&&(i+=1)})),s+=e.slice(i,n.end),Ve.Node.addStringTerminator(e,n.end,s)}}class ot extends Ve.Node{static endOfQuote(e,t){let n=e[t];for(;n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:r,src:o}=this.context;'"'!==o[n-1]&&e.push(new Ve.YAMLSyntaxError(this,'Missing closing "quote'));let s="";for(let i=t+1;i<n-1;++i){const t=o[i];if("\n"===t){Ve.Node.atDocumentBoundary(o,i+1)&&e.push(new Ve.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=Ve.Node.foldNewline(o,i,r);s+=t,i=n,a&&e.push(new Ve.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(i+=1,o[i]){case"0":s+="\0";break;case"a":s+="\x07";break;case"b":s+="\b";break;case"e":s+="\x1b";break;case"f":s+="\f";break;case"n":s+="\n";break;case"r":s+="\r";break;case"t":s+="\t";break;case"v":s+="\v";break;case"N":s+="\x85";break;case"_":s+="\xa0";break;case"L":s+="\u2028";break;case"P":s+="\u2029";break;case" ":s+=" ";break;case'"':s+='"';break;case"/":s+="/";break;case"\\":s+="\\";break;case"\t":s+="\t";break;case"x":s+=this.parseCharCode(i+1,2,e),i+=2;break;case"u":s+=this.parseCharCode(i+1,4,e),i+=4;break;case"U":s+=this.parseCharCode(i+1,8,e),i+=8;break;case"\n":for(;" "===o[i+1]||"\t"===o[i+1];)i+=1;break;default:e.push(new Ve.YAMLSyntaxError(this,"Invalid escape sequence ".concat(o.substr(i-1,2)))),s+="\\"+o[i]}else if(" "===t||"\t"===t){const e=i;let n=o[i+1];for(;" "===n||"\t"===n;)i+=1,n=o[i+1];"\n"!==n&&(s+=i>e?o.slice(e,i+1):t)}else s+=t}return e.length>0?{errors:e,str:s}:s}parseCharCode(e,t,n){const{src:r}=this.context,o=r.substr(e,t),s=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(s)?(n.push(new Ve.YAMLSyntaxError(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(s)}parse(e,t){this.context=e;const{src:n}=e;let r=ot.endOfQuote(n,t+1);return this.valueRange=new Ve.Range(t,r),r=Ve.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class st extends Ve.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:r,src:o}=this.context;"'"!==o[n-1]&&e.push(new Ve.YAMLSyntaxError(this,"Missing closing 'quote"));let s="";for(let i=t+1;i<n-1;++i){const t=o[i];if("\n"===t){Ve.Node.atDocumentBoundary(o,i+1)&&e.push(new Ve.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=Ve.Node.foldNewline(o,i,r);s+=t,i=n,a&&e.push(new Ve.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)s+=t,i+=1,"'"!==o[i]&&e.push(new Ve.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=i;let n=o[i+1];for(;" "===n||"\t"===n;)i+=1,n=o[i+1];"\n"!==n&&(s+=i>e?o.slice(e,i+1):t)}else s+=t}return e.length>0?{