(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7913],{22495:function(e){var t;t=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,s){var i=n.prototype,r=i.format;s.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n,s,i=this.$locale().formats,o=(n=t,s=void 0===i?{}:i,n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,i){var r=i&&i.toUpperCase();return n||s[i]||e[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}));return r.call(this,o)}}},e.exports=t()},33145:function(e,t,n){"use strict";n.d(t,{default:function(){return i.a}});var s=n(48461),i=n.n(s)},27648:function(e,t,n){"use strict";n.d(t,{default:function(){return i.a}});var s=n(72972),i=n.n(s)},48461:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return a},getImageProps:function(){return l}});let s=n(47043),i=n(55346),r=n(65878),o=s._(n(5084));function l(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let a=r.Image},24454:function(e,t,n){"use strict";function s(){return"undefined"!=typeof window}function i(){return(s()?window.vam:"production")||"production"}function r(){return"production"===i()}function o(e,t,n){var o,l;if(!s()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(r())console.warn(e);else throw Error(e);return}if(!t){null==(o=window.va)||o.call(window,"event",{name:e,options:n});return}try{let s=function(e,t){if(!e)return;let n=e,s=[];for(let[i,r]of Object.entries(e))"object"==typeof r&&null!==r&&(t.strip?n=function(e,{[e]:t,...n}){return n}(i,n):s.push(i));if(s.length>0&&!t.strip)throw Error(`The following properties are not valid: ${s.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return n}(t,{strip:r()});null==(l=window.va)||l.call(window,"event",{name:e,data:s,options:n})}catch(e){e instanceof Error&&"development"===i()&&console.error(e)}}n.d(t,{j:function(){return o}})},97631:function(e,t,n){"use strict";n.d(t,{CH:function(){return A}});let s=new Set(["<",">","{","}","[","]"]),i=new Set(["for","do","while","if","else","return","function","var","let","const","true","false","undefined","this","new","delete","typeof","in","instanceof","void","break","continue","switch","case","default","throw","try","catch","finally","debugger","with","yield","async","await","class","extends","super","import","export","from","static"]),r=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...s]),o=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[l,a,c,u,f,h,d,p,m,y,g]=o.map((e,t)=>t);function b(e){return/^[^\S\r\n]+$/g.test(e)}function k(e){return r.has(e)}function w(e){return/^[\w_]+$/.test(e)||v(e)}function v(e){return/[^\u0000-\u007f]/.test(e)}function S(e){return/^[a-zA-Z]$/.test(e)}function E(e){var t;return(S(t=e[0])||v(t))&&(1===e.length||w(e.slice(1)))}function N(e){return'"'===e||"'"===e}function O(e){return"//"===(e=e.slice(0,2))||"/*"===e}function A(e){return(function(e){let t=[],n=e=>({type:"element",tagName:"span",children:e,properties:{className:"sh__line"}});function s(e){let s=e.map(([e,t])=>({type:"element",tagName:"span",children:[{type:"text",value:t}],properties:{className:`sh__token--${o[e]}`,style:`color: var(--sh-${o[e]})`}}));t.push(n(s))}let i=[];for(let t=0;t<e.length;t++){let n=e[t],[r,o]=n;if(r!==y){if(o.includes("\n")){let e=o.split("\n");for(let t=0;t<e.length;t++)i.push([r,e[t]]),t<e.length-1&&(s(i),i.length=0)}else i.push(n)}else i.push([r,""]),s(i),i.length=0}return i.length&&s(i),t})(function(e){let t="",n=-1,o=[-1,""],A=[-2,""],L=[],T=!1,I=0,$=!1,x=0,C=()=>T&&!$&&!I,_=()=>I&&!C(),M=()=>!I&&C()&&!$&&x>0,j=null,B=0,D=0,P=()=>null!==j,q=()=>D>B,K=()=>D>0&&D===B,U=()=>P()||q(),R=(e,s)=>{if(s&&(t=s),t){let s=[n=e||function(e){let t="\n"===e;if(_()){if(P())return c;let[,t]=o;if(E(e)&&("<"===t||"</"===t))return h}if(M())return d;if(P())return c;if(i.has(e))return"."===o[1]?l:a;if(t)return y;if(b(e))return g;if(e.split("").every(k))return p;if(function(e){let t=e[0];return w(t)&&t===t.toUpperCase()||"null"===e}(e))return _()?l:u;if(E(e)){let e="."===o[1]&&E(A[1]);if(!U()&&!e)return l;if(e)return f}return c}(t),t];n!==g&&n!==y&&(A=o,o=s),L.push(s)}t=""};for(let n=0;n<e.length;n++){var F;let i=e[n],l=e[n-1],a=e[n+1],u=l+i,h=i+a;if(N(i)&&!M()){R(),"\\"===l||(j&&i===j?j=null:j||(j=i)),R(c,i);continue}if(!q()&&"\\n"!==l&&"`"===i){R(),R(c,i),D++;continue}if(q()){if("\\n"!==l&&"`"===i&&D>0){R(),D--,R(c,i);continue}if("${"===h){B++,R(c),R(p,h),n++;continue}}if(K()&&"}"===i){R(),B--,R(p,i);continue}if(C()&&"{"===i){R(),R(p,i),$=!0;continue}if(T){if(!I&&"<"===i){R(),"/"===a?(I=2,t=h,n++):(I=1,t=i),R(p);continue}if(I){if(">"===i&&!"/=".includes(l)){R(),1===I?(I=0,x++):(I=0,T=!1),R(p,i);continue}if("/>"===h||"</"===h){"<"!==t&&"/"!==t&&R(),"/>"===h?I=0:x--,x||(T=!1),t=h,n++,R(p);continue}if("<"===i){R(),t=i,R(p);continue}if("-"===a&&!U()&&!M()&&t){R(f,t+i+a),n+=1;continue}if("="===a&&!U()){b(t)&&(R(g,t),t="");let e=t?t+i:i;E(e)&&(t=e,R(f));continue}}}!I&&("<"===i&&(S(a)||v(a))||"</"===h)&&(I="/"===a?2:1,"<"===i&&("/"===a||S(a))&&(T=!0));let d=N(i)||"`"===i,y=q(),k=!T&&"/"===(F=h)[0]&&!O(F[0]+F[1]),A=M();if(d||y||N(j))t+=i;else if(k){R();let[s,r]=o;if(k&&-1!==s&&!(s===p&&")"!==r||s===m)){t=i,R();continue}let l=n++,a=()=>n>=e.length,u=()=>a()||"\n"===e[n],f=!1;for(;!u();n++)if("/"===e[n]&&"\\"!==e[n-1]){for(f=!0;l!==n&&/^[a-z]$/.test(e[n+1])&&!u();)n++;break}l!==n&&f?(t=e.slice(l,n+1),R(c)):(t=i,R(),n=l)}else if(O(h)){R();let s=n;if("/"===a)for(;n<e.length&&"\n"!==e[n];n++);else for(;n<e.length&&e[n-1]+e[n]!=="*/";n++);t=e.slice(s,n+1),R(m)}else" "===i||"\n"===i?" "===i&&(b(t)||!t||A)?(t+=i,"<"===a&&R()):(R(),t=i,R()):$&&"}"===i?(R(),t=i,R(),$=!1):A&&!s.has(i)||(w(i)===w(t[t.length-1])||C())&&!r.has(i)?t+=i:("</"===u&&(t=u),R(),"</"!==u&&(t=i),"</"===h||"/>"===h?(t=h,R(),n++):s.has(i)&&R())}return R(),L}(e)).map(e=>{let{tagName:t}=e,n=e.children.map(e=>{let{tagName:t,children:n,properties:s}=e;return`<${t} class="${s.className}" style="${s.style}">${n[0].value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}</${t}>`}).join("");return`<${t} class="${e.properties.className}">${n}</${t}>`}).join("\n")}o.map((e,t)=>[e,t])},78703:function(e,t,n){"use strict";let s;n.d(t,{Y:function(){return nc}});var i={};n.r(i),n.d(i,{BOM:function(){return tY},DOCUMENT:function(){return tV},FLOW_END:function(){return tJ},SCALAR:function(){return tW},createScalarToken:function(){return t_},isCollection:function(){return tG},isScalar:function(){return tH},prettyToken:function(){return tQ},resolveAsScalar:function(){return tC},setScalarValue:function(){return tM},stringify:function(){return tD},tokenType:function(){return tX},visit:function(){return tF}});var r={};n.r(r),n.d(r,{Alias:function(){return U},CST:function(){return i},Composer:function(){return tx},Document:function(){return to},Lexer:function(){return t4},LineCounter:function(){return t8},Pair:function(){return eg},Parser:function(){return nn},Scalar:function(){return F},Schema:function(){return tr},YAMLError:function(){return ta},YAMLMap:function(){return ev},YAMLParseError:function(){return tc},YAMLSeq:function(){return eE},YAMLWarning:function(){return tu},isAlias:function(){return d},isCollection:function(){return k},isDocument:function(){return p},isMap:function(){return m},isNode:function(){return w},isPair:function(){return y},isScalar:function(){return g},isSeq:function(){return b},parse:function(){return no},parseAllDocuments:function(){return ni},parseDocument:function(){return nr},stringify:function(){return nl},visit:function(){return O},visitAsync:function(){return L}});let o=Symbol.for("yaml.alias"),l=Symbol.for("yaml.document"),a=Symbol.for("yaml.map"),c=Symbol.for("yaml.pair"),u=Symbol.for("yaml.scalar"),f=Symbol.for("yaml.seq"),h=Symbol.for("yaml.node.type"),d=e=>!!e&&"object"==typeof e&&e[h]===o,p=e=>!!e&&"object"==typeof e&&e[h]===l,m=e=>!!e&&"object"==typeof e&&e[h]===a,y=e=>!!e&&"object"==typeof e&&e[h]===c,g=e=>!!e&&"object"==typeof e&&e[h]===u,b=e=>!!e&&"object"==typeof e&&e[h]===f;function k(e){if(e&&"object"==typeof e)switch(e[h]){case a:case f:return!0}return!1}function w(e){if(e&&"object"==typeof e)switch(e[h]){case o:case a:case u:case f:return!0}return!1}let v=e=>(g(e)||k(e))&&!!e.anchor,S=Symbol("break visit"),E=Symbol("skip children"),N=Symbol("remove node");function O(e,t){let n=I(t);p(e)?A(null,e.contents,n,Object.freeze([e]))===N&&(e.contents=null):A(null,e,n,Object.freeze([]))}function A(e,t,n,s){let i=$(e,t,n,s);if(w(i)||y(i))return x(e,s,i),A(e,i,n,s);if("symbol"!=typeof i){if(k(t)){s=Object.freeze(s.concat(t));for(let e=0;e<t.items.length;++e){let i=A(e,t.items[e],n,s);if("number"==typeof i)e=i-1;else{if(i===S)return S;i===N&&(t.items.splice(e,1),e-=1)}}}else if(y(t)){s=Object.freeze(s.concat(t));let e=A("key",t.key,n,s);if(e===S)return S;e===N&&(t.key=null);let i=A("value",t.value,n,s);if(i===S)return S;i===N&&(t.value=null)}}return i}async function L(e,t){let n=I(t);p(e)?await T(null,e.contents,n,Object.freeze([e]))===N&&(e.contents=null):await T(null,e,n,Object.freeze([]))}async function T(e,t,n,s){let i=await $(e,t,n,s);if(w(i)||y(i))return x(e,s,i),T(e,i,n,s);if("symbol"!=typeof i){if(k(t)){s=Object.freeze(s.concat(t));for(let e=0;e<t.items.length;++e){let i=await T(e,t.items[e],n,s);if("number"==typeof i)e=i-1;else{if(i===S)return S;i===N&&(t.items.splice(e,1),e-=1)}}}else if(y(t)){s=Object.freeze(s.concat(t));let e=await T("key",t.key,n,s);if(e===S)return S;e===N&&(t.key=null);let i=await T("value",t.value,n,s);if(i===S)return S;i===N&&(t.value=null)}}return i}function I(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function $(e,t,n,s){return"function"==typeof n?n(e,t,s):m(t)?n.Map?.(e,t,s):b(t)?n.Seq?.(e,t,s):y(t)?n.Pair?.(e,t,s):g(t)?n.Scalar?.(e,t,s):d(t)?n.Alias?.(e,t,s):void 0}function x(e,t,n){let s=t[t.length-1];if(k(s))s.items[e]=n;else if(y(s))"key"===e?s.key=n:s.value=n;else if(p(s))s.contents=n;else{let e=d(s)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}O.BREAK=S,O.SKIP=E,O.REMOVE=N,L.BREAK=S,L.SKIP=E,L.REMOVE=N;let C={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_=e=>e.replace(/[!,[\]{}]/g,e=>C[e]);class M{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},M.defaultYaml,e),this.tags=Object.assign({},M.defaultTags,t)}clone(){let e=new M(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new M(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:M.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},M.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:M.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},M.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),s=n.shift();switch(s){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[e,s]=n;return this.tags[e]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let n=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,n),!1}}default:return t(0,`Unknown directive ${s}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}let[,n,s]=e.match(/^(.*!)([^!]*)$/s);s||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(s)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+_(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t;let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);if(e&&s.length>0&&w(e.contents)){let n={};O(e.contents,(e,t)=>{w(t)&&t.tag&&(n[t.tag]=!0)}),t=Object.keys(n)}else t=[];for(let[i,r]of s)("!!"!==i||"tag:yaml.org,2002:"!==r)&&(!e||t.some(e=>e.startsWith(r)))&&n.push(`%TAG ${i} ${r}`);return n.join("\n")}}function j(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function B(e){let t=new Set;return O(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function D(e,t){for(let n=1;;++n){let s=`${e}${n}`;if(!t.has(s))return s}}function P(e,t,n,s){if(s&&"object"==typeof s){if(Array.isArray(s))for(let t=0,n=s.length;t<n;++t){let n=s[t],i=P(e,s,String(t),n);void 0===i?delete s[t]:i!==n&&(s[t]=i)}else if(s instanceof Map)for(let t of Array.from(s.keys())){let n=s.get(t),i=P(e,s,t,n);void 0===i?s.delete(t):i!==n&&s.set(t,i)}else if(s instanceof Set)for(let t of Array.from(s)){let n=P(e,s,t,t);void 0===n?s.delete(t):n!==t&&(s.delete(t),s.add(n))}else for(let[t,n]of Object.entries(s)){let i=P(e,s,t,n);void 0===i?delete s[t]:i!==n&&(s[t]=i)}}return e.call(t,n,s)}function q(e,t,n){if(Array.isArray(e))return e.map((e,t)=>q(e,String(t),n));if(e&&"function"==typeof e.toJSON){if(!n||!v(e))return e.toJSON(t,n);let s={aliasCount:0,count:1,res:void 0};n.anchors.set(e,s),n.onCreate=e=>{s.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return"bigint"!=typeof e||n?.keep?e:Number(e)}M.defaultYaml={explicit:!1,version:"1.2"},M.defaultTags={"!!":"tag:yaml.org,2002:"};class K{constructor(e){Object.defineProperty(this,h,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:s,reviver:i}={}){if(!p(e))throw TypeError("A document argument is required");let r={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=q(this,"",r);if("function"==typeof s)for(let{count:e,res:t}of r.anchors.values())s(t,e);return"function"==typeof i?P(i,{"":o},"",o):o}}class U extends K{constructor(e){super(o),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e){let t;return O(e,{Node:(e,n)=>{if(n===this)return O.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:s,maxAliasCount:i}=t,r=this.resolve(s);if(!r)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let o=n.get(r);if(o||(q(r,null,t),o=n.get(r)),!o||void 0===o.res)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=function e(t,n,s){if(d(n)){let e=n.resolve(t),i=s&&e&&s.get(e);return i?i.count*i.aliasCount:0}if(k(n)){let i=0;for(let r of n.items){let n=e(t,r,s);n>i&&(i=n)}return i}return y(n)?Math.max(e(t,n.key,s),e(t,n.value,s)):1}(s,r,n)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");return o.res}toString(e,t,n){let s=`*${this.source}`;if(e){if(j(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${s} `}return s}}let R=e=>!e||"function"!=typeof e&&"object"!=typeof e;class F extends K{constructor(e){super(u),this.value=e}toJSON(e,t){return t?.keep?this.value:q(this.value,e,t)}toString(){return String(this.value)}}function Y(e,t,n){let s;if(p(e)&&(e=e.contents),w(e))return e;if(y(e)){let t=n.schema[a].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:r,onTagObj:o,schema:l,sourceObjects:c}=n;if(i&&e&&"object"==typeof e){if(s=c.get(e))return s.anchor||(s.anchor=r(e)),new U(s.anchor);s={anchor:null,node:null},c.set(e,s)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,n){if(t){let e=n.filter(e=>e.tag===t),s=e.find(e=>!e.format)??e[0];if(!s)throw Error(`Tag ${t} not found`);return s}return n.find(t=>t.identify?.(e)&&!t.format)}(e,t,l.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new F(e);return s&&(s.node=t),t}u=e instanceof Map?l[a]:Symbol.iterator in Object(e)?l[f]:l[a]}o&&(o(u),delete n.onTagObj);let h=u?.createNode?u.createNode(n.schema,e,n):"function"==typeof u?.nodeClass?.from?u.nodeClass.from(n.schema,e,n):new F(e);return t?h.tag=t:u.default||(h.tag=u.tag),s&&(s.node=h),h}function V(e,t,n){let s=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){let e=[];e[n]=s,s=e}else s=new Map([[n,s]])}return Y(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}F.BLOCK_FOLDED="BLOCK_FOLDED",F.BLOCK_LITERAL="BLOCK_LITERAL",F.PLAIN="PLAIN",F.QUOTE_DOUBLE="QUOTE_DOUBLE",F.QUOTE_SINGLE="QUOTE_SINGLE";let J=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class W extends K{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>w(t)||y(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(J(e))this.add(t);else{let[n,...s]=e,i=this.get(n,!0);if(k(i))i.addIn(s,t);else if(void 0===i&&this.schema)this.set(n,V(this.schema,s,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let s=this.get(t,!0);if(k(s))return s.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...s]=e,i=this.get(n,!0);return 0===s.length?!t&&g(i)?i.value:i:k(i)?i.getIn(s,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!y(t))return!1;let n=t.value;return null==n||e&&g(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let s=this.get(t,!0);return!!k(s)&&s.hasIn(n)}setIn(e,t){let[n,...s]=e;if(0===s.length)this.set(n,t);else{let e=this.get(n,!0);if(k(e))e.setIn(s,t);else if(void 0===e&&this.schema)this.set(n,V(this.schema,s,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}}W.maxFlowStringSingleLineLength=60;let G=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function H(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let Q=(e,t,n)=>e.endsWith("\n")?H(n,t):n.includes("\n")?"\n"+H(n,t):(e.endsWith(" ")?"":" ")+n,X="flow",z="block",Z="quoted";function ee(e,t,n="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){let a,c,u;if(!i||i<0)return e;let f=Math.max(1+r,1+i-t.length);if(e.length<=f)return e;let h=[],d={},p=i-t.length;"number"==typeof s&&(s>i-Math.max(2,r)?h.push(0):p=i-s);let m=!1,y=-1,g=-1,b=-1;for(n===z&&-1!==(y=et(e,y,t.length))&&(p=y+f);u=e[y+=1];){if(n===Z&&"\\"===u){switch(g=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}b=y}if("\n"===u)n===z&&(y=et(e,y,t.length)),p=y+t.length+f,a=void 0;else{if(" "===u&&c&&" "!==c&&"\n"!==c&&"	"!==c){let t=e[y+1];t&&" "!==t&&"\n"!==t&&"	"!==t&&(a=y)}if(y>=p){if(a)h.push(a),p=a+f,a=void 0;else if(n===Z){for(;" "===c||"	"===c;)c=u,u=e[y+=1],m=!0;let t=y>b+1?y-2:g-1;if(d[t])return e;h.push(t),d[t]=!0,p=t+f,a=void 0}else m=!0}}c=u}if(m&&l&&l(),0===h.length)return e;o&&o();let k=e.slice(0,h[0]);for(let s=0;s<h.length;++s){let i=h[s],r=h[s+1]||e.length;0===i?k=`
${t}${e.slice(0,r)}`:(n===Z&&d[i]&&(k+=`${e[i]}\\`),k+=`
${t}${e.slice(i+1,r)}`)}return k}function et(e,t,n){let s=t,i=t+1,r=e[i];for(;" "===r||"	"===r;)if(t<i+n)r=e[++t];else{do r=e[++t];while(r&&"\n"!==r);s=t,r=e[i=t+1]}return s}let en=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),es=e=>/^(%|---|\.\.\.)/m.test(e);function ei(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=t,i=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(es(e)?"  ":""),o="",l=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(o+=n.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{o+=n.slice(l,e);let t=n.substr(e+2,4);switch(t){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:"00"===t.substr(0,2)?o+="\\x"+t.substr(2):o+=n.substr(e,6)}e+=5,l=e+1}break;case"n":if(s||'"'===n[e+2]||n.length<i)e+=1;else{for(o+=n.slice(l,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)o+="\n",e+=2;o+=r," "===n[e+2]&&(o+="\\"),e+=1,l=e+1}break;default:e+=1}return o=l?o+n.slice(l):n,s?o:ee(o,r,Z,en(t,!1))}function er(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ei(e,t);let n=t.indent||(es(e)?"  ":""),s="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${n}`)+"'";return t.implicitKey?s:ee(s,n,X,en(t,!1))}function eo(e,t){let n;let{singleQuote:s}=t.options;if(!1===s)n=ei;else{let t=e.includes('"'),i=e.includes("'");n=t&&!i?er:i&&!t?ei:s?er:ei}return n(e,t)}try{s=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{s=/\n+(?!\n|$)/g}function el({comment:e,type:t,value:n},i,r,o){let l,a,c;let{blockQuote:u,commentString:f,lineWidth:h}=i.options;if(!u||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return eo(n,i);let d=i.indent||(i.forceBlockIndent||es(n)?"  ":""),p="literal"===u||"folded"!==u&&t!==F.BLOCK_FOLDED&&(t===F.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;let s=t-n,i=e.length;if(i<=s)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>s)return!0;if(i-(n=t+1)<=s)return!1}return!0}(n,h,d.length));if(!n)return p?"|\n":">\n";for(a=n.length;a>0;--a){let e=n[a-1];if("\n"!==e&&"	"!==e&&" "!==e)break}let m=n.substring(a),y=m.indexOf("\n");-1===y?l="-":n===m||y!==m.length-1?(l="+",o&&o()):l="",m&&(n=n.slice(0,-m.length),"\n"===m[m.length-1]&&(m=m.slice(0,-1)),m=m.replace(s,`$&${d}`));let g=!1,b=-1;for(c=0;c<n.length;++c){let e=n[c];if(" "===e)g=!0;else if("\n"===e)b=c;else break}let k=n.substring(0,b<c?b+1:c);k&&(n=n.substring(k.length),k=k.replace(/\n+/g,`$&${d}`));let w=d?"2":"1",v=(p?"|":">")+(g?w:"")+l;if(e&&(v+=" "+f(e.replace(/ ?[\r\n]+/g," ")),r&&r()),p)return n=n.replace(/\n+/g,`$&${d}`),`${v}
${d}${k}${n}${m}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let S=ee(`${k}${n}${m}`,d,z,en(i,!0));return`${v}
${d}${S}`}function ea(e,t,n,s){let{implicitKey:i,inFlow:r}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:l}=e;l!==F.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=F.QUOTE_DOUBLE);let a=e=>{switch(e){case F.BLOCK_FOLDED:case F.BLOCK_LITERAL:return i||r?eo(o.value,t):el(o,t,n,s);case F.QUOTE_DOUBLE:return ei(o.value,t);case F.QUOTE_SINGLE:return er(o.value,t);case F.PLAIN:return function(e,t,n,s){let{type:i,value:r}=e,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:u}=t;if(l&&r.includes("\n")||u&&/[[\]{},]/.test(r))return eo(r,t);if(!r||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||u||!r.includes("\n")?eo(r,t):el(e,t,n,s);if(!l&&!u&&i!==F.PLAIN&&r.includes("\n"))return el(e,t,n,s);if(es(r)){if(""===a)return t.forceBlockIndent=!0,el(e,t,n,s);if(l&&a===c)return eo(r,t)}let f=r.replace(/\n+/g,`$&
${a}`);if(o){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(f),{compat:n,tags:s}=t.doc.schema;if(s.some(e)||n?.some(e))return eo(r,t)}return l?f:ee(f,a,X,en(t,!1))}(o,t,n,s);default:return null}},c=a(l);if(null===c){let{defaultKeyType:e,defaultStringType:n}=t.options,s=i&&e||n;if(null===(c=a(s)))throw Error(`Unsupported default string type ${s}`)}return c}function ec(e,t){let n;let s=Object.assign({blockQuote:!0,commentString:G,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(s.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof s.indent?" ".repeat(s.indent):"  ",inFlow:n,options:s}}function eu(e,t,n,s){let i;if(y(e))return e.toString(t,n,s);if(d(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r=w(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i||(i=function(e,t){let n,s;if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}if(g(t)){n=t.value;let i=e.filter(e=>e.identify?.(n));s=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else n=t,s=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!s){let e=n?.constructor?.name??typeof n;throw Error(`Tag not resolved for ${e} value`)}return s}(t.doc.schema.tags,r));let o=function(e,t,{anchors:n,doc:s}){if(!s.directives)return"";let i=[],r=(g(e)||k(e))&&e.anchor;r&&j(r)&&(n.add(r),i.push(`&${r}`));let o=e.tag?e.tag:t.default?null:t.tag;return o&&i.push(s.directives.tagString(o)),i.join(" ")}(r,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let l="function"==typeof i.stringify?i.stringify(r,t,n,s):g(r)?ea(r,t,n,s):r.toString(t,n,s);return o?g(r)||"{"===l[0]||"["===l[0]?`${o} ${l}`:`${o}
${t.indent}${l}`:l}var ef=n(25566);function eh(e,t){("debug"===e||"warn"===e)&&(void 0!==ef&&ef.emitWarning?ef.emitWarning(t):console.warn(t))}function ed(e,t,{key:n,value:s}){if(e?.doc.schema.merge&&ep(n)){if(b(s=d(s)?s.resolve(e.doc):s))for(let n of s.items)em(e,t,n);else if(Array.isArray(s))for(let n of s)em(e,t,n);else em(e,t,s)}else{let i=q(n,"",e);if(t instanceof Map)t.set(i,q(s,i,e));else if(t instanceof Set)t.add(i);else{let r=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(w(e)&&n?.doc){let t=ec(n.doc,{});for(let e of(t.anchors=new Set,n.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let s=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(s);e.length>40&&(e=e.substring(0,36)+'..."'),eh(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}(n,i,e),o=q(s,r,e);r in t?Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[r]=o}}return t}let ep=e=>"<<"===e||g(e)&&"<<"===e.value&&(!e.type||e.type===F.PLAIN);function em(e,t,n){let s=e&&d(n)?n.resolve(e.doc):n;if(!m(s))throw Error("Merge sources must be maps or map aliases");for(let[n,i]of s.toJSON(null,e,Map))t instanceof Map?t.has(n)||t.set(n,i):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function ey(e,t,n){return new eg(Y(e,void 0,n),Y(t,void 0,n))}class eg{constructor(e,t=null){Object.defineProperty(this,h,{value:c}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return w(t)&&(t=t.clone(e)),w(n)&&(n=n.clone(e)),new eg(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return ed(t,n,this)}toString(e,t,n){return e?.doc?function({key:e,value:t},n,s,i){let r,o,l;let{allNullValues:a,doc:c,indent:u,indentStep:f,options:{commentString:h,indentSeq:d,simpleKeys:p}}=n,m=w(e)&&e.comment||null;if(p){if(m)throw Error("With simple keys, key nodes cannot have comments");if(k(e))throw Error("With simple keys, collection cannot be used as a key value")}let y=!p&&(!e||m&&null==t&&!n.inFlow||k(e)||(g(e)?e.type===F.BLOCK_FOLDED||e.type===F.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!y&&(p||!a),indent:u+f});let v=!1,S=!1,E=eu(e,n,()=>v=!0,()=>S=!0);if(!y&&!n.inFlow&&E.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(n.inFlow){if(a||null==t)return v&&s&&s(),""===E?"?":y?`? ${E}`:E}else if(a&&!p||null==t&&y)return E=`? ${E}`,m&&!v?E+=Q(E,n.indent,h(m)):S&&i&&i(),E;v&&(m=null),y?(m&&(E+=Q(E,n.indent,h(m))),E=`? ${E}
${u}:`):(E=`${E}:`,m&&(E+=Q(E,n.indent,h(m)))),w(t)?(r=!!t.spaceBefore,o=t.commentBefore,l=t.comment):(r=!1,o=null,l=null,t&&"object"==typeof t&&(t=c.createNode(t))),n.implicitKey=!1,!y&&!m&&g(t)&&(n.indentAtStart=E.length+1),S=!1,!(!d&&f.length>=2&&!n.inFlow&&!y&&b(t))||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let N=!1,O=eu(t,n,()=>N=!0,()=>S=!0),A=" ";if(m||r||o){if(A=r?"\n":"",o){let e=h(o);A+=`
${H(e,n.indent)}`}""!==O||n.inFlow?A+=`
${n.indent}`:"\n"===A&&(A="\n\n")}else if(!y&&k(t)){let e=O[0],s=O.indexOf("\n"),i=-1!==s,r=n.inFlow??t.flow??0===t.items.length;if(i||!r){let t=!1;if(i&&("&"===e||"!"===e)){let n=O.indexOf(" ");"&"===e&&-1!==n&&n<s&&"!"===O[n+1]&&(n=O.indexOf(" ",n+1)),(-1===n||s<n)&&(t=!0)}t||(A=`
${n.indent}`)}}else(""===O||"\n"===O[0])&&(A="");return E+=A+O,n.inFlow?N&&s&&s():l&&!N?E+=Q(E,n.indent,h(l)):S&&i&&i(),E}(this,e,t,n):JSON.stringify(this)}}function eb(e,t,n){return(t.inFlow??e.flow?function({items:e},t,{flowChars:n,itemIndent:s}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=t,a=Object.assign({},t,{indent:s+=r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let n=0;n<e.length;++n){let i=e[n],r=null;if(w(i))i.spaceBefore&&f.push(""),ek(t,f,i.commentBefore,!1),i.comment&&(r=i.comment);else if(y(i)){let e=w(i.key)?i.key:null;e&&(e.spaceBefore&&f.push(""),ek(t,f,e.commentBefore,!1),e.comment&&(c=!0));let n=w(i.value)?i.value:null;n?(n.comment&&(r=n.comment),n.commentBefore&&(c=!0)):null==i.value&&e?.comment&&(r=e.comment)}r&&(c=!0);let o=eu(i,a,()=>r=null);n<e.length-1&&(o+=","),r&&(o+=Q(o,s,l(r))),!c&&(f.length>u||o.includes("\n"))&&(c=!0),f.push(o),u=f.length}let{start:h,end:d}=n;if(0===f.length)return h+d;if(!c){let e=f.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(!c)return`${h}${o}${f.join(" ")}${o}${d}`;{let e=h;for(let t of f)e+=t?`
${r}${i}${t}`:"\n";return`${e}
${i}${d}`}}:function({comment:e,items:t},n,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){let a;let{indent:c,options:{commentString:u}}=n,f=Object.assign({},n,{indent:r,type:null}),h=!1,d=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(w(i))!h&&i.spaceBefore&&d.push(""),ek(n,d,i.commentBefore,h),i.comment&&(o=i.comment);else if(y(i)){let e=w(i.key)?i.key:null;e&&(!h&&e.spaceBefore&&d.push(""),ek(n,d,e.commentBefore,h))}h=!1;let l=eu(i,f,()=>o=null,()=>h=!0);o&&(l+=Q(l,r,u(o))),h&&o&&(h=!1),d.push(s+l)}if(0===d.length)a=i.start+i.end;else{a=d[0];for(let e=1;e<d.length;++e){let t=d[e];a+=t?`
${c}${t}`:"\n"}}return e?(a+="\n"+H(u(e),c),l&&l()):h&&o&&o(),a})(e,t,n)}function ek({indent:e,options:{commentString:t}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){let i=H(t(s),e);n.push(i.trimStart())}}function ew(e,t){let n=g(t)?t.value:t;for(let s of e)if(y(s)&&(s.key===t||s.key===n||g(s.key)&&s.key.value===n))return s}class ev extends W{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(a,e),this.items=[]}static from(e,t,n){let{keepUndefined:s,replacer:i}=n,r=new this(e),o=(e,o)=>{if("function"==typeof i)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==o||s)&&r.items.push(ey(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&"object"==typeof t)for(let e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r}add(e,t){let n;n=y(e)?e:e&&"object"==typeof e&&"key"in e?new eg(e.key,e.value):new eg(e,e?.value);let s=ew(this.items,n.key),i=this.schema?.sortMapEntries;if(s){if(!t)throw Error(`Key ${n.key} already set`);g(s.value)&&R(n.value)?s.value.value=n.value:s.value=n.value}else if(i){let e=this.items.findIndex(e=>0>i(n,e));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=ew(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=ew(this.items,e),s=n?.value;return(!t&&g(s)?s.value:s)??void 0}has(e){return!!ew(this.items,e)}set(e,t){this.add(new eg(e,t),!0)}toJSON(e,t,n){let s=n?new n:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(s),this.items))ed(t,s,e);return s}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!y(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),eb(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}let eS={collection:"map",default:!0,nodeClass:ev,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(m(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>ev.from(e,t,n)};class eE extends W{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(f,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=eN(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let n=eN(e);if("number"!=typeof n)return;let s=this.items[n];return!t&&g(s)?s.value:s}has(e){let t=eN(e);return"number"==typeof t&&t<this.items.length}set(e,t){let n=eN(e);if("number"!=typeof n)throw Error(`Expected a valid index, not ${e}.`);let s=this.items[n];g(s)&&R(t)?s.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let s=0;for(let e of this.items)n.push(q(e,String(s++),t));return n}toString(e,t,n){return e?eb(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:s}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let r of t){if("function"==typeof s){let n=t instanceof Set?r:String(e++);r=s.call(t,n,r)}i.items.push(Y(r,void 0,n))}}return i}}function eN(e){let t=g(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}let eO={collection:"seq",default:!0,nodeClass:eE,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(b(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>eE.from(e,t,n)},eA={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,s)=>ea(e,t=Object.assign({actualString:!0},t),n,s)},eL={identify:e=>null==e,createNode:()=>new F(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new F(null),stringify:({source:e},t)=>"string"==typeof e&&eL.test.test(e)?e:t.options.nullStr},eT={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new F("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&eT.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};function eI({format:e,minFractionDigits:t,tag:n,value:s}){if("bigint"==typeof s)return String(s);let i="number"==typeof s?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(s);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(r)){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let n=t-(r.length-e-1);for(;n-- >0;)r+="0"}return r}let e$={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:eI},ex={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():eI(e)}},eC={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new F(parseFloat(e)),n=e.indexOf(".");return -1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:eI},e_=e=>"bigint"==typeof e||Number.isInteger(e),eM=(e,t,n,{intAsBigInt:s})=>s?BigInt(e):parseInt(e.substring(t),n);function ej(e,t,n){let{value:s}=e;return e_(s)&&s>=0?n+s.toString(t):eI(e)}let eB={identify:e=>e_(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>eM(e,2,8,n),stringify:e=>ej(e,8,"0o")},eD={identify:e_,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>eM(e,0,10,n),stringify:eI},eP={identify:e=>e_(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>eM(e,2,16,n),stringify:e=>ej(e,16,"0x")},eq=[eS,eO,eA,eL,eT,eB,eD,eP,e$,ex,eC];function eK(e){return"bigint"==typeof e||Number.isInteger(e)}let eU=({value:e})=>JSON.stringify(e),eR=[eS,eO].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:eU},{identify:e=>null==e,createNode:()=>new F(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:eU},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:eU},{identify:eK,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>eK(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:eU}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)});var eF=n(82957).lW;let eY={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof eF)return eF.from(e,"base64");if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}},stringify({comment:e,type:t,value:n},s,i,r){let o;if("function"==typeof eF)o=n instanceof eF?n.toString("base64"):eF.from(n.buffer).toString("base64");else if("function"==typeof btoa){let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);o=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t||(t=F.BLOCK_LITERAL),t!==F.QUOTE_DOUBLE){let e=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),n=Math.ceil(o.length/e),i=Array(n);for(let t=0,s=0;t<n;++t,s+=e)i[t]=o.substr(s,e);o=i.join(t===F.BLOCK_LITERAL?"\n":" ")}return ea({comment:e,type:t,value:o},s,i,r)}};function eV(e,t){if(b(e))for(let n=0;n<e.items.length;++n){let s=e.items[n];if(!y(s)){if(m(s)){s.items.length>1&&t("Each pair must have its own sequence indicator");let e=s.items[0]||new eg(new F(null));if(s.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${s.commentBefore}
${e.key.commentBefore}`:s.commentBefore),s.comment){let t=e.value??e.key;t.comment=t.comment?`${s.comment}
${t.comment}`:s.comment}s=e}e.items[n]=y(s)?s:new eg(s)}}else t("Expected a sequence for this tag");return e}function eJ(e,t,n){let{replacer:s}=n,i=new eE(e);i.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,l;if("function"==typeof s&&(e=s.call(t,String(r++),e)),Array.isArray(e)){if(2===e.length)o=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[o=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(ey(o,l,n))}return i}let eW={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:eV,createNode:eJ};class eG extends eE{constructor(){super(),this.add=ev.prototype.add.bind(this),this.delete=ev.prototype.delete.bind(this),this.get=ev.prototype.get.bind(this),this.has=ev.prototype.has.bind(this),this.set=ev.prototype.set.bind(this),this.tag=eG.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;for(let e of(t?.onCreate&&t.onCreate(n),this.items)){let s,i;if(y(e)?(s=q(e.key,"",t),i=q(e.value,s,t)):s=q(e,"",t),n.has(s))throw Error("Ordered maps must not include duplicate keys");n.set(s,i)}return n}static from(e,t,n){let s=eJ(e,t,n),i=new this;return i.items=s.items,i}}eG.tag="tag:yaml.org,2002:omap";let eH={collection:"seq",identify:e=>e instanceof Map,nodeClass:eG,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=eV(e,t),s=[];for(let{key:e}of n.items)g(e)&&(s.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):s.push(e.value));return Object.assign(new eG,n)},createNode:(e,t,n)=>eG.from(e,t,n)};function eQ({value:e,source:t},n){return t&&(e?eX:ez).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let eX={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new F(!0),stringify:eQ},ez={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new F(!1),stringify:eQ},eZ=e=>"bigint"==typeof e||Number.isInteger(e);function e0(e,t,n,{intAsBigInt:s}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let r=parseInt(e,n);return"-"===i?-1*r:r}function e1(e,t,n){let{value:s}=e;if(eZ(s)){let e=s.toString(t);return s<0?"-"+n+e.substr(1):n+e}return eI(e)}class e2 extends ev{constructor(e){super(e),this.tag=e2.tag}add(e){let t;t=y(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new eg(e.key,null):new eg(e,null),ew(this.items,t.key)||this.items.push(t)}get(e,t){let n=ew(this.items,e);return!t&&y(n)?g(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=ew(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new eg(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error("Set items must all have null values")}static from(e,t,n){let{replacer:s}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof s&&(e=s.call(t,e,e)),i.items.push(ey(e,null,n));return i}}e2.tag="tag:yaml.org,2002:set";let e9={collection:"map",identify:e=>e instanceof Set,nodeClass:e2,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>e2.from(e,t,n),resolve(e,t){if(m(e)){if(e.hasAllNullValues(!0))return Object.assign(new e2,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function e4(e,t){let n=e[0],s="-"===n||"+"===n?e.substring(1):e,i=e=>t?BigInt(e):Number(e),r=s.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===n?i(-1)*r:r}function e8(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return eI(e);let s="";t<0&&(s="-",t*=n(-1));let i=n(60),r=[t%i];return t<60?r.unshift(0):(t=(t-r[0])/i,r.unshift(t%i),t>=60&&(t=(t-r[0])/i,r.unshift(t))),s+r.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let e6={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>e4(e,n),stringify:e8},e3={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>e4(e,!1),stringify:e8},e7={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(e7.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,s,i,r,o,l]=t.map(Number),a=Date.UTC(n,s-1,i,r||0,o||0,l||0,t[7]?Number((t[7]+"00").substr(1,3)):0),c=t[8];if(c&&"Z"!==c){let e=e4(c,!1);30>Math.abs(e)&&(e*=60),a-=6e4*e}return new Date(a)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},e5=[eS,eO,eA,eL,eX,ez,{identify:eZ,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>e0(e,2,2,n),stringify:e=>e1(e,2,"0b")},{identify:eZ,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>e0(e,1,8,n),stringify:e=>e1(e,8,"0")},{identify:eZ,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>e0(e,0,10,n),stringify:eI},{identify:eZ,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>e0(e,2,16,n),stringify:e=>e1(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:eI},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():eI(e)}},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new F(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){let s=e.substring(n+1).replace(/_/g,"");"0"===s[s.length-1]&&(t.minFractionDigits=s.length)}return t},stringify:eI},eY,eH,eW,e9,e6,e3,e7],te=new Map([["core",eq],["failsafe",[eS,eO,eA]],["json",eR],["yaml11",e5],["yaml-1.1",e5]]),tt={binary:eY,bool:eT,float:eC,floatExp:ex,floatNaN:e$,floatTime:e3,int:eD,intHex:eP,intOct:eB,intTime:e6,map:eS,null:eL,omap:eH,pairs:eW,seq:eO,set:e9,timestamp:e7},tn={"tag:yaml.org,2002:binary":eY,"tag:yaml.org,2002:omap":eH,"tag:yaml.org,2002:pairs":eW,"tag:yaml.org,2002:set":e9,"tag:yaml.org,2002:timestamp":e7};function ts(e,t){let n=te.get(t);if(!n){if(Array.isArray(e))n=[];else{let e=Array.from(te.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)n=n.concat(t);else"function"==typeof e&&(n=e(n.slice()));return n.map(e=>{if("string"!=typeof e)return e;let t=tt[e];if(t)return t;let n=Object.keys(tt).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag "${e}"; use one of ${n}`)})}let ti=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class tr{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:s,schema:i,sortMapEntries:r,toStringDefaults:o}){this.compat=Array.isArray(e)?ts(e,"compat"):e?ts(null,e):null,this.merge=!!n,this.name="string"==typeof i&&i||"core",this.knownTags=s?tn:{},this.tags=ts(t,this.name),this.toStringOptions=o??null,Object.defineProperty(this,a,{value:eS}),Object.defineProperty(this,u,{value:eA}),Object.defineProperty(this,f,{value:eO}),this.sortMapEntries="function"==typeof r?r:!0===r?ti:null}clone(){let e=Object.create(tr.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class to{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,h,{value:l});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===n&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:r}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(r=this.directives.yaml.version)):this.directives=new M({version:r}),this.setSchema(r,n),this.contents=void 0===e?null:this.createNode(e,s,n)}clone(){let e=Object.create(to.prototype,{[h]:{value:l}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=w(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){tl(this.contents)&&this.contents.add(e)}addIn(e,t){tl(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=B(this);e.anchor=!t||n.has(t)?D(t||"a",n):t}return new U(e.anchor)}createNode(e,t,n){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),s=t}else void 0===n&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:r,flow:o,keepUndefined:l,onTagObj:a,tag:c}=n??{},{onAnchor:u,setAnchors:f,sourceObjects:h}=function(e,t){let n=[],s=new Map,i=null;return{onAnchor:s=>{n.push(s),i||(i=B(e));let r=D(t,i);return i.add(r),r},setAnchors:()=>{for(let e of n){let t=s.get(e);if("object"==typeof t&&t.anchor&&(g(t.node)||k(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:s}}(this,r||"a"),d={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:u,onTagObj:a,replacer:s,schema:this.schema,sourceObjects:h},p=Y(e,c,d);return o&&k(p)&&(p.flow=!0),f(),p}createPair(e,t,n={}){return new eg(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return!!tl(this.contents)&&this.contents.delete(e)}deleteIn(e){return J(e)?null!=this.contents&&(this.contents=null,!0):!!tl(this.contents)&&this.contents.deleteIn(e)}get(e,t){return k(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return J(e)?!t&&g(this.contents)?this.contents.value:this.contents:k(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!k(this.contents)&&this.contents.has(e)}hasIn(e){return J(e)?void 0!==this.contents:!!k(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=V(this.schema,[e],t):tl(this.contents)&&this.contents.set(e,t)}setIn(e,t){J(e)?this.contents=t:null==this.contents?this.contents=V(this.schema,Array.from(e),t):tl(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new M({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new M({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new tr(Object.assign(n,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:r}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},l=q(this.contents,t??"",o);if("function"==typeof i)for(let{count:e,res:t}of o.anchors.values())i(t,e);return"function"==typeof r?P(r,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){let n=[],s=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(n.push(t),s=!0):e.directives.docStart&&(s=!0)}s&&n.push("---");let i=ec(e,t),{commentString:r}=i.options;if(e.commentBefore){1!==n.length&&n.unshift("");let t=r(e.commentBefore);n.unshift(H(t,""))}let o=!1,l=null;if(e.contents){if(w(e.contents)){if(e.contents.spaceBefore&&s&&n.push(""),e.contents.commentBefore){let t=r(e.contents.commentBefore);n.push(H(t,""))}i.forceBlockIndent=!!e.comment,l=e.contents.comment}let t=l?void 0:()=>o=!0,a=eu(e.contents,i,()=>l=null,t);l&&(a+=Q(a,"",r(l))),("|"===a[0]||">"===a[0])&&"---"===n[n.length-1]?n[n.length-1]=`--- ${a}`:n.push(a)}else n.push(eu(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=r(e.comment);t.includes("\n")?(n.push("..."),n.push(H(t,""))):n.push(`... ${t}`)}else n.push("...")}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,"")),t&&((!o||l)&&""!==n[n.length-1]&&n.push(""),n.push(H(r(t),"")))}return n.join("\n")+"\n"}(this,e)}}function tl(e){if(k(e))return!0;throw Error("Expected a YAML collection as document contents")}class ta extends Error{constructor(e,t,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=t}}class tc extends ta{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class tu extends ta{constructor(e,t,n){super("YAMLWarning",e,t,n)}}let tf=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:s,col:i}=n.linePos[0];n.message+=` at line ${s}, column ${i}`;let r=i-1,o=e.substring(t.lineStarts[s-1],t.lineStarts[s]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let e=Math.min(r-39,o.length-79);o="…"+o.substring(e),r-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,r))){let n=e.substring(t.lineStarts[s-2],t.lineStarts[s-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t&&t.line===s&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-r)));let l=" ".repeat(r)+"^".repeat(e);n.message+=`:

${o}
${l}
`}};function th(e,{flow:t,indicator:n,next:s,offset:i,onError:r,startOnNewline:o}){let l=!1,a=o,c=o,u="",f="",h=!1,d=!1,p=!1,m=null,y=null,g=null,b=null,k=null;for(let s of e)switch(p&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),s.type){case"space":!t&&a&&"doc-start"!==n&&"	"===s.source[0]&&r(s,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=s.source.substring(1)||" ";u?u+=f+e:u=e,f="",a=!1;break}case"newline":a?u?u+=s.source:l=!0:f+=s.source,a=!0,h=!0,(m||y)&&(d=!0),c=!0;break;case"anchor":m&&r(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&r(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=s,null===k&&(k=s.offset),a=!1,c=!1,p=!0;break;case"tag":y&&r(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,null===k&&(k=s.offset),a=!1,c=!1,p=!0;break;case n:(m||y)&&r(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),b&&r(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),b=s,a=!1,c=!1;break;case"comma":if(t){g&&r(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),g=s,a=!1,c=!1;break}default:r(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),a=!1,c=!1}let w=e[e.length-1],v=w?w.offset+w.source.length:i;return p&&s&&"space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&("scalar"!==s.type||""!==s.source)&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:g,found:b,spaceBefore:l,comment:u,hasNewline:h,hasNewlineAfterProp:d,anchor:m,tag:y,end:v,start:k??v}}function td(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end){for(let t of e.end)if("newline"===t.type)return!0}return!1;case"flow-collection":for(let t of e.items){for(let e of t.start)if("newline"===e.type)return!0;if(t.sep){for(let e of t.sep)if("newline"===e.type)return!0}if(td(t.key)||td(t.value))return!0}return!1;default:return!0}}function tp(e,t,n){if(t?.type==="flow-collection"){let s=t.end[0];s.indent===e&&("]"===s.source||"}"===s.source)&&td(t)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function tm(e,t,n){let{uniqueKeys:s}=e.options;if(!1===s)return!1;let i="function"==typeof s?s:(t,n)=>t===n||g(t)&&g(n)&&t.value===n.value&&!("<<"===t.value&&e.schema.merge);return t.some(e=>i(e.key,n))}let ty="All mapping items must start at the same column";function tg(e,t,n,s){let i="";if(e){let r=!1,o="";for(let l of e){let{source:e,type:a}=l;switch(a){case"space":r=!0;break;case"comment":{n&&!r&&s(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";i?i+=o+t:i=t,o="";break}case"newline":i&&(o+=e),r=!0;break;default:s(l,"UNEXPECTED_TOKEN",`Unexpected ${a} at node end`)}t+=e.length}}return{comment:i,offset:t}}let tb="Block collections are not allowed within flow collections",tk=e=>e&&("block-map"===e.type||"block-seq"===e.type);function tw(e,t,n,s,i,r){let o="block-map"===n.type?function({composeNode:e,composeEmptyNode:t},n,s,i,r){let o=new(r?.nodeClass??ev)(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,a=null;for(let r of s.items){let{start:c,key:u,sep:f,value:h}=r,d=th(c,{indicator:"explicit-key-ind",next:u??f?.[0],offset:l,onError:i,startOnNewline:!0}),p=!d.found;if(p){if(u&&("block-seq"===u.type?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==s.indent&&i(l,"BAD_INDENT",ty)),!d.anchor&&!d.tag&&!f){a=d.end,d.comment&&(o.comment?o.comment+="\n"+d.comment:o.comment=d.comment);continue}(d.hasNewlineAfterProp||td(u))&&i(u??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==s.indent&&i(l,"BAD_INDENT",ty);let m=d.end,y=u?e(n,u,d,i):t(n,m,c,null,d,i);n.schema.compat&&tp(s.indent,u,i),tm(n,o.items,y)&&i(m,"DUPLICATE_KEY","Map keys must be unique");let g=th(f??[],{indicator:"map-value-ind",next:h,offset:y.range[2],onError:i,startOnNewline:!u||"block-scalar"===u.type});if(l=g.end,g.found){p&&(h?.type!=="block-map"||g.hasNewline||i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&d.start<g.found.offset-1024&&i(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let a=h?e(n,h,g,i):t(n,l,f,null,g,i);n.schema.compat&&tp(s.indent,h,i),l=a.range[2];let c=new eg(y,a);n.options.keepSourceTokens&&(c.srcToken=r),o.items.push(c)}else{p&&i(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),g.comment&&(y.comment?y.comment+="\n"+g.comment:y.comment=g.comment);let e=new eg(y);n.options.keepSourceTokens&&(e.srcToken=r),o.items.push(e)}}return a&&a<l&&i(a,"IMPOSSIBLE","Map comment with trailing content"),o.range=[s.offset,l,a??l],o}(e,t,n,s,r):"block-seq"===n.type?function({composeNode:e,composeEmptyNode:t},n,s,i,r){let o=new(r?.nodeClass??eE)(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,a=null;for(let{start:r,value:c}of s.items){let u=th(r,{indicator:"seq-item-ind",next:c,offset:l,onError:i,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||c)c&&"block-seq"===c.type?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{a=u.end,u.comment&&(o.comment=u.comment);continue}}let f=c?e(n,c,u,i):t(n,u.end,r,null,u,i);n.schema.compat&&tp(s.indent,c,i),l=f.range[2],o.items.push(f)}return o.range=[s.offset,l,a??l],o}(e,t,n,s,r):function({composeNode:e,composeEmptyNode:t},n,s,i,r){let o="{"===s.start.source,l=o?"flow map":"flow sequence",a=new(r?.nodeClass??(o?ev:eE))(n.schema);a.flow=!0;let c=n.atRoot;c&&(n.atRoot=!1);let u=s.offset+s.start.source.length;for(let r=0;r<s.items.length;++r){let c=s.items[r],{start:f,key:h,sep:d,value:p}=c,m=th(f,{flow:l,indicator:"explicit-key-ind",next:h??d?.[0],offset:u,onError:i,startOnNewline:!1});if(!m.found){if(!m.anchor&&!m.tag&&!d&&!p){0===r&&m.comma?i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):r<s.items.length-1&&i(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),m.comment&&(a.comment?a.comment+="\n"+m.comment:a.comment=m.comment),u=m.end;continue}!o&&n.options.strict&&td(h)&&i(h,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)m.comma&&i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(m.comma||i(m.start,"MISSING_CHAR",`Missing , between ${l} items`),m.comment){let e="";e:for(let t of f)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=a.items[a.items.length-1];y(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,m.comment=m.comment.substring(e.length+1)}}if(o||d||m.found){let s=m.end,r=h?e(n,h,m,i):t(n,s,f,null,m,i);tk(h)&&i(r.range,"BLOCK_IN_FLOW",tb);let y=th(d??[],{flow:l,indicator:"map-value-ind",next:p,offset:r.range[2],onError:i,startOnNewline:!1});if(y.found){if(!o&&!m.found&&n.options.strict){if(d)for(let e of d){if(e===y.found)break;if("newline"===e.type){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<y.found.offset-1024&&i(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else p&&("source"in p&&p.source&&":"===p.source[0]?i(p,"MISSING_CHAR",`Missing space after : in ${l}`):i(y.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let g=p?e(n,p,y,i):y.found?t(n,y.end,d,null,y,i):null;g?tk(p)&&i(g.range,"BLOCK_IN_FLOW",tb):y.comment&&(r.comment?r.comment+="\n"+y.comment:r.comment=y.comment);let b=new eg(r,g);if(n.options.keepSourceTokens&&(b.srcToken=c),o)tm(n,a.items,r)&&i(s,"DUPLICATE_KEY","Map keys must be unique"),a.items.push(b);else{let e=new ev(n.schema);e.flow=!0,e.items.push(b),a.items.push(e)}u=g?g.range[2]:y.end}else{let s=p?e(n,p,m,i):t(n,m.end,d,null,m,i);a.items.push(s),u=s.range[2],tk(p)&&i(s.range,"BLOCK_IN_FLOW",tb)}}let f=o?"}":"]",[h,...d]=s.end,p=u;if(h&&h.source===f)p=h.offset+h.source.length;else{let e=l[0].toUpperCase()+l.substring(1),t=c?`${e} must end with a ${f}`:`${e} in block collection must be sufficiently indented and end with a ${f}`;i(u,c?"MISSING_CHAR":"BAD_INDENT",t),h&&1!==h.source.length&&d.unshift(h)}if(d.length>0){let e=tg(d,p,n.options.strict,i);e.comment&&(a.comment?a.comment+="\n"+e.comment:a.comment=e.comment),a.range=[s.offset,p,e.offset]}else a.range=[s.offset,p,p];return a}(e,t,n,s,r),l=o.constructor;return"!"===i||i===l.tagName?o.tag=l.tagName:i&&(o.tag=i),o}function tv(e,t,n){let s=e.offset,i=function({offset:e,props:t},n,s){if("block-scalar-header"!==t[0].type)return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],r=i[0],o=0,l="",a=-1;for(let t=1;t<i.length;++t){let n=i[t];if(l||"-"!==n&&"+"!==n){let s=Number(n);!o&&s?o=s:-1===a&&(a=e+t)}else l=n}-1!==a&&s(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",f=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case"space":c=!0;case"newline":f+=i.source.length;break;case"comment":n&&!c&&s(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=i.source.length,u=i.source.substring(1);break;case"error":s(i,"UNEXPECTED_TOKEN",i.message),f+=i.source.length;break;default:{let e=`Unexpected token in block scalar header: ${i.type}`;s(i,"UNEXPECTED_TOKEN",e);let t=i.source;t&&"string"==typeof t&&(f+=t.length)}}}return{mode:r,indent:o,chomp:l,comment:u,length:f}}(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};let r=">"===i.mode?F.BLOCK_FOLDED:F.BLOCK_LITERAL,o=e.source?function(e){let t=e.split(/\n( *)/),n=t[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(e.source):[],l=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let t="+"===i.chomp&&o.length>0?"\n".repeat(Math.max(1,o.length-1)):"",n=s+i.length;return e.source&&(n+=e.source.length),{value:t,type:r,comment:i.comment,range:[s,n,n]}}let a=e.indent+i.indent,c=e.offset+i.length,u=0;for(let e=0;e<l;++e){let[t,s]=o[e];if(""===s||"\r"===s)0===i.indent&&t.length>a&&(a=t.length);else{t.length<a&&n(c+t.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(a=t.length),u=e;break}c+=t.length+s.length+1}for(let e=o.length-1;e>=l;--e)o[e][0].length>a&&(l=e+1);let f="",h="",d=!1;for(let e=0;e<u;++e)f+=o[e][0].slice(a)+"\n";for(let e=u;e<l;++e){let[t,s]=o[e];c+=t.length+s.length+1;let l="\r"===s[s.length-1];if(l&&(s=s.slice(0,-1)),s&&t.length<a){let e=i.indent?"explicit indentation indicator":"first line",r=`Block scalar lines must not be less indented than their ${e}`;n(c-s.length-(l?2:1),"BAD_INDENT",r),t=""}r===F.BLOCK_LITERAL?(f+=h+t.slice(a)+s,h="\n"):t.length>a||"	"===s[0]?(" "===h?h="\n":d||"\n"!==h||(h="\n\n"),f+=h+t.slice(a)+s,h="\n",d=!0):""===s?"\n"===h?f+="\n":h="\n":(f+=h+s,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let e=l;e<o.length;++e)f+="\n"+o[e][0].slice(a);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}let p=s+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[s,p,p]}}function tS(e,t,n){let s,i;let{offset:r,type:o,source:l,end:a}=e,c=(e,t,s)=>n(r+e,t,s);switch(o){case"scalar":s=F.PLAIN,i=function(e,t){let n="";switch(e[0]){case"	":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),tE(e)}(l,c);break;case"single-quoted-scalar":s=F.QUOTE_SINGLE,("'"!==l[l.length-1]||1===l.length)&&c(l.length,"MISSING_CHAR","Missing closing 'quote"),i=tE(l.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":s=F.QUOTE_DOUBLE,i=function(e,t){let n="";for(let s=1;s<e.length-1;++s){let i=e[s];if("\r"!==i||"\n"!==e[s+1]){if("\n"===i){let{fold:t,offset:i}=function(e,t){let n="",s=e[t+1];for(;(" "===s||"	"===s||"\n"===s||"\r"===s)&&("\r"!==s||"\n"===e[t+2]);)"\n"===s&&(n+="\n"),t+=1,s=e[t+1];return n||(n=" "),{fold:n,offset:t}}(e,s);n+=t,s=i}else if("\\"===i){let i=e[++s],r=tN[i];if(r)n+=r;else if("\n"===i)for(i=e[s+1];" "===i||"	"===i;)i=e[++s+1];else if("\r"===i&&"\n"===e[s+1])for(i=e[++s+1];" "===i||"	"===i;)i=e[++s+1];else if("x"===i||"u"===i||"U"===i){let r={x:2,u:4,U:8}[i];n+=function(e,t,n,s){let i=e.substr(t,n),r=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(r)){let i=e.substr(t-2,n+2);return s(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(r)}(e,s+1,r,t),s+=r}else{let i=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||"	"===i){let t=s,r=e[s+1];for(;" "===r||"	"===r;)r=e[++s+1];"\n"===r||"\r"===r&&"\n"===e[s+2]||(n+=s>t?e.slice(t,s+1):i)}else n+=i}}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(l,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}let u=r+l.length,f=tg(a,u,t,n);return{value:i,type:s,comment:f.comment,range:[r,u,f.offset]}}function tE(e){let t,n;try{t=RegExp("(.*?)(?<![ 	])[ 	]*\r?\n","sy"),n=RegExp("[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?\n","sy")}catch(e){t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=t.exec(e);if(!s)return e;let i=s[1],r=" ",o=t.lastIndex;for(n.lastIndex=o;s=n.exec(e);)""===s[1]?"\n"===r?i+=r:r="\n":(i+=r+s[1],r=" "),o=n.lastIndex;let l=/[ \t]*(.*)/sy;return l.lastIndex=o,s=l.exec(e),i+r+(s?.[1]??"")}let tN={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:"	",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function tO(e,t,n,s){let i;let{value:r,type:o,comment:l,range:a}="block-scalar"===t.type?tv(t,e.options.strict,s):tS(t,e.options.strict,s),c=n?e.directives.tagName(n.source,e=>s(n,"TAG_RESOLVE_FAILED",e)):null,f=n&&c?function(e,t,n,s,i){if("!"===n)return e[u];let r=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(!t.default||!t.test)return t;r.push(t)}for(let e of r)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[u])}(e.schema,r,c,n,s):"scalar"===t.type?function({directives:e,schema:t},n,s,i){let r=t.tags.find(e=>e.default&&e.test?.test(n))||t[u];if(t.compat){let o=t.compat.find(e=>e.default&&e.test?.test(n))??t[u];if(r.tag!==o.tag){let t=e.tagString(r.tag),n=e.tagString(o.tag);i(s,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t} or ${n}`,!0)}}return r}(e,r,t,s):e.schema[u];try{let o=f.resolve(r,e=>s(n??t,"TAG_RESOLVE_FAILED",e),e.options);i=g(o)?o:new F(o)}catch(e){s(n??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),i=new F(r)}return i.range=a,i.source=r,o&&(i.type=o),c&&(i.tag=c),f.format&&(i.format=f.format),l&&(i.comment=l),i}let tA={composeNode:tL,composeEmptyNode:tT};function tL(e,t,n,s){let i;let{spaceBefore:r,comment:o,anchor:l,tag:a}=n,c=!0;switch(t.type){case"alias":i=function({options:e},{offset:t,source:n,end:s},i){let r=new U(n.substring(1));""===r.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+n.length,l=tg(s,o,e.strict,i);return r.range=[t,o,l.offset],l.comment&&(r.comment=l.comment),r}(e,t,s),(l||a)&&s(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":i=tO(e,t,a,s),l&&(i.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":i=function(e,t,n,s,i){let r=s?t.directives.tagName(s.source,e=>i(s,"TAG_RESOLVE_FAILED",e)):null,o="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!s||!r||"!"===r||r===ev.tagName&&"map"===o||r===eE.tagName&&"seq"===o||!o)return tw(e,t,n,i,r);let l=t.schema.tags.find(e=>e.tag===r&&e.collection===o);if(!l){let a=t.schema.knownTags[r];if(!a||a.collection!==o)return a?.collection?i(s,"BAD_COLLECTION_TYPE",`${a.tag} used for ${o} collection, but expects ${a.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),tw(e,t,n,i,r);t.schema.tags.push(Object.assign({},a,{default:!1})),l=a}let a=tw(e,t,n,i,r,l),c=l.resolve?.(a,e=>i(s,"TAG_RESOLVE_FAILED",e),t.options)??a,u=w(c)?c:new F(c);return u.range=a.range,u.tag=r,l?.format&&(u.format=l.format),u}(tA,e,t,a,s),l&&(i.anchor=l.source.substring(1));break;default:{let r="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;s(t,"UNEXPECTED_TOKEN",r),i=tT(e,t.offset,void 0,null,n,s),c=!1}}return l&&""===i.anchor&&s(l,"BAD_ALIAS","Anchor cannot be an empty string"),r&&(i.spaceBefore=!0),o&&("scalar"===t.type&&""===t.source?i.comment=o:i.commentBefore=o),e.options.keepSourceTokens&&c&&(i.srcToken=t),i}function tT(e,t,n,s,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){let u=tO(e,{type:"scalar",offset:function(e,t,n){if(t){null===n&&(n=t.length);for(let s=n-1;s>=0;--s){let n=t[s];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++s];n?.type==="space";)e+=n.source.length,n=t[++s];break}}return e}(t,n,s),indent:-1,source:""},l,c);return o&&(u.anchor=o.source.substring(1),""===u.anchor&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=a),u}function tI(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function t$(e){let t="",n=!1,s=!1;for(let i=0;i<e.length;++i){let r=e[i];switch(r[0]){case"#":t+=(""===t?"":s?"\n\n":"\n")+(r.substring(1)||" "),n=!0,s=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:t,afterEmptyLine:s}}class tx{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{let i=tI(e);s?this.warnings.push(new tu(i,t,n)):this.errors.push(new tc(i,t,n))},this.directives=new M({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:s}=t$(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
${n}`:n;else if(s||e.directives.docStart||!i)e.commentBefore=n;else if(k(i)&&!i.flow&&i.items.length>0){let e=i.items[0];y(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}
${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:t$(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,s)=>{let i=tI(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=function(e,t,{offset:n,start:s,value:i,end:r},o){let l=new to(void 0,Object.assign({_directives:t},e)),a={atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=th(s,{indicator:"doc-start",next:i??r?.[0],offset:n,onError:o,startOnNewline:!0});c.found&&(l.directives.docStart=!0,i&&("block-map"===i.type||"block-seq"===i.type)&&!c.hasNewline&&o(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?tL(a,i,c,o):tT(a,c.end,s,null,c,o);let u=l.contents.range[2],f=tg(r,u,!1,o);return f.comment&&(l.comment=f.comment),l.range=[n,u,f.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new tc(tI(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new tc(tI(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=tg(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new tc(tI(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new to(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),e.range=[0,t,t],this.decorate(e,!1),yield e}}}function tC(e,t=!0,n){if(e){let s=(e,t,s)=>{let i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(n)n(i,t,s);else throw new tc([i,i+1],t,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return tS(e,t,s);case"block-scalar":return tv(e,t,s)}}return null}function t_(e,t){let{implicitKey:n=!1,indent:s,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=t,l=ea({type:o,value:e},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=t.end??[{type:"newline",offset:-1,indent:s,source:"\n"}];switch(l[0]){case"|":case">":{let e=l.indexOf("\n"),t=l.substring(0,e),n=l.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:r,indent:s,source:t}];return tj(i,a)||i.push({type:"newline",offset:-1,indent:s,source:"\n"}),{type:"block-scalar",offset:r,indent:s,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:r,indent:s,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:r,indent:s,source:l,end:a};default:return{type:"scalar",offset:r,indent:s,source:l,end:a}}}function tM(e,t,n={}){let{afterKey:s=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=n,l="indent"in e?e.indent:null;if(s&&"number"==typeof l&&(l+=2),!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");o=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let a=ea({type:o,value:t},{implicitKey:i||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":!function(e,t){let n=t.indexOf("\n"),s=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=s,e.source=i}else{let{offset:t}=e,n="indent"in e?e.indent:-1,r=[{type:"block-scalar-header",offset:t,indent:n,source:s}];for(let t of(tj(r,"end"in e?e.end:void 0)||r.push({type:"newline",offset:-1,indent:n,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:r,source:i})}}(e,a);break;case'"':tB(e,a,"double-quoted-scalar");break;case"'":tB(e,a,"single-quoted-scalar");break;default:tB(e,a,"scalar")}}function tj(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function tB(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let s=e.props.slice(1),i=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length),s))t.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:s});break}case"block-map":case"block-seq":{let s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{let s="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:s,source:t,end:i})}}}let tD=e=>"type"in e?tP(e):tq(e);function tP(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=tP(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=tq(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=tq(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=tq(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function tq({start:e,key:t,sep:n,value:s}){let i="";for(let t of e)i+=t.source;if(t&&(i+=tP(t)),n)for(let e of n)i+=e.source;return s&&(i+=tP(s)),i}let tK=Symbol("break visit"),tU=Symbol("skip children"),tR=Symbol("remove item");function tF(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,n,s){let i=s(n,t);if("symbol"==typeof i)return i;for(let r of["key","value"]){let o=n[r];if(o&&"items"in o){for(let n=0;n<o.items.length;++n){let i=e(Object.freeze(t.concat([[r,n]])),o.items[n],s);if("number"==typeof i)n=i-1;else{if(i===tK)return tK;i===tR&&(o.items.splice(n,1),n-=1)}}"function"==typeof i&&"key"===r&&(i=i(n,t))}}return"function"==typeof i?i(n,t):i}(Object.freeze([]),e,t)}tF.BREAK=tK,tF.SKIP=tU,tF.REMOVE=tR,tF.itemAtPath=(e,t)=>{let n=e;for(let[e,s]of t){let t=n?.[e];if(!t||!("items"in t))return;n=t.items[s]}return n},tF.parentCollection=(e,t)=>{let n=tF.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw Error("Parent collection not found")};let tY="\uFEFF",tV="\x02",tJ="\x18",tW="\x1f",tG=e=>!!e&&"items"in e,tH=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function tQ(e){switch(e){case tY:return"<BOM>";case tV:return"<DOC>";case tJ:return"<FLOW_END>";case tW:return"<SCALAR>";default:return JSON.stringify(e)}}function tX(e){switch(e){case tY:return"byte-order-mark";case tV:return"doc-mode";case tJ:return"flow-error-end";case tW:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"	":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function tz(e){switch(e){case void 0:case" ":case"\n":case"\r":case"	":return!0;default:return!1}}let tZ="0123456789ABCDEFabcdef".split(""),t0="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),t1=",[]{}".split(""),t2=" ,[]{}\n\r	".split(""),t9=e=>!e||t2.includes(e);class t4{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"	"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){let t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"!==t&&!(n>=this.indentNext)&&(t||this.atEnd)?-1:e+n}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&tz(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===tY&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");if(-1!==n){let s=e[n-1];(" "===s||"	"===s)&&(t=n-1)}for(;;){let n=e[t-1];if(" "===n||"	"===n)t-=1;else break}let s=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield tV,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if("---"===e&&tz(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&tz(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!tz(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&tz(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(t9),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader())+(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t;let n=-1;do(e=yield*this.pushNewline())>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let s=this.getLine();if(null===s)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==s[0]||0===n&&(s.startsWith("---")||s.startsWith("..."))&&tz(s[3]))&&!(n===this.indentNext-1&&1===this.flowLevel&&("]"===s[0]||"}"===s[0])))return this.flowLevel=0,yield tJ,yield*this.parseLineStart();let i=0;for(;","===s[i];)i+=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(s[i+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(t9),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||tz(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),s=n.indexOf("\n",this.pos);if(-1!==s){for(;-1!==s;){let e=this.continueScalar(s+1);if(-1===e)break;s=n.indexOf("\n",e)}-1!==s&&(t=s-("\r"===n[s-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>tz(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let s=this.pos;e=this.buffer[s];++s)switch(e){case" ":n+=1;break;case"\n":t=s,n=0;break;case"\r":{let e=this.buffer[s+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)for(;;){let e=t-1,s=this.buffer[e];"\r"===s&&(s=this.buffer[--e]);let i=e;for(;" "===s||"	"===s;)s=this.buffer[--e];if("\n"===s&&e>=this.pos&&e+1+n>i)t=e;else break}return yield tW,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e;let t=this.flowLevel>0,n=this.pos-1,s=this.pos-1;for(;e=this.buffer[++s];)if(":"===e){let e=this.buffer[s+1];if(tz(e)||t&&","===e)break;n=s}else if(tz(e)){let i=this.buffer[s+1];if("\r"===e&&("\n"===i?(s+=1,e="\n",i=this.buffer[s+1]):n=s),"#"===i||t&&t1.includes(i))break;if("\n"===e){let e=this.continueScalar(s+1);if(-1===e)break;s=Math.max(s,e-2)}}else{if(t&&t1.includes(e))break;n=s}return e||this.atEnd?(yield tW,yield*this.pushToIndex(n+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(t9))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(tz(t)||e&&t1.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!tz(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(t0.includes(t))t=this.buffer[++e];else if("%"===t&&tZ.includes(this.buffer[e+1])&&tZ.includes(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do t=this.buffer[++n];while(" "===t||e&&"	"===t);let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class t8{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let s=this.lineStarts[t-1];return{line:t,col:e-s+1}}}}function t6(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function t3(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function t7(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function t5(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function ne(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function nt(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||t6(t.start,"explicit-key-ind")||t6(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,t7(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class nn{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new t4,this.onNewLine=e}*parse(e,t=!1){for(let n of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=tX(e);if(t){if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&(!e||"doc-end"!==e.type)){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t){if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&nt(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!t6(n.start,"explicit-key-ind");return}break}case"block-seq":{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===t3(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==t3(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t;let n=ne(t5(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;s?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent&&t.sep&&"seq-item-ind"!==this.type,s=[];if(n&&t.sep&&!t.value){let n=[];for(let s=0;s<t.sep.length;++s){let i=t.sep[s];switch(i.type){case"newline":n.push(s);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(s=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":n||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t6(t.start,"explicit-key-ind")?n||t.value?(s.push(this.sourceToken),e.items.push({start:s})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}):t.start.push(this.sourceToken),this.onKeyLine=!0;return;case"map-value-ind":if(t6(t.start,"explicit-key-ind")){if(t.sep){if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t6(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(t7(t.key)&&!t6(t.sep,"newline")){let e=ne(t.start),n=t.key,s=t.sep;s.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:s}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken)}else if(t6(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=ne(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else t.sep?t.value||n?e.items.push({start:s,key:null,sep:[this.sourceToken]}):t6(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);n||t.value?(e.items.push({start:s,key:i,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(i):(Object.assign(t,{key:i,sep:[]}),this.onKeyLine=!0);return}default:{let i=this.startBlockValue(e);if(i){n&&"block-seq"!==i.type&&t6(t.start,"explicit-key-ind")&&e.items.push({start:s}),this.stack.push(i);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;s?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||t6(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep)){if("map-value-ind"===this.type&&"flow-collection"!==t.type){let n=ne(t5(t));nt(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=ne(t5(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ne(t5(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function ns(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new t8||null,prettyErrors:t}}function ni(e,t={}){let{lineCounter:n,prettyErrors:s}=ns(t),i=new nn(n?.addNewLine),r=new tx(t),o=Array.from(r.compose(i.parse(e)));if(s&&n)for(let t of o)t.errors.forEach(tf(e,n)),t.warnings.forEach(tf(e,n));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function nr(e,t={}){let{lineCounter:n,prettyErrors:s}=ns(t),i=new nn(n?.addNewLine),r=new tx(t),o=null;for(let t of r.compose(i.parse(e),!0,e.length))if(o){if("silent"!==o.options.logLevel){o.errors.push(new tc(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else o=t;return s&&n&&(o.errors.forEach(tf(e,n)),o.warnings.forEach(tf(e,n))),o}function no(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);let i=nr(e,n);if(!i)return null;if(i.warnings.forEach(e=>eh(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))}function nl(e,t,n){let s=null;if("function"==typeof t||Array.isArray(t)?s=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=n??t??{};if(!e)return}return new to(e,s,n).toString(n)}let na=/^---(?:\r?\n|\r)(?:([\s\S]*?)(?:\r?\n|\r))?---(?:\r?\n|\r|$)/;function nc(e,t){let n=t||{},s=n.strip,i=n.yaml||{},o=String(e),l=na.exec(o);l?(e.data.matter=r.parse(l[1],i),s&&(o=o.slice(l[0].length),e.value=e.value&&"object"==typeof e.value?new TextEncoder().encode(o):o)):e.data.matter={}}}}]);