-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
1 lines (1 loc) · 129 KB
/
index.js
1
(()=>{"use strict";var e={2621:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t.createS3SPA=void 0;const n=s(8760);const i=s(9651);const r=s(3573);const o=s(4688);const a=s(9664);const createS3SPA=({BucketName:e,Aliases:t,AcmCertificateArn:s,HostedZoneId:l})=>{const c=[];const f=(0,a.createS3)({ResourceName:"S3Bucket"},{BucketName:e});const u=(0,r.createOAC)({ResourceName:"OAC"},{Name:`S3-${e}-OAC`});const d=(0,i.createCloudFront)({ResourceName:"CDN"},{...t&&t.length>0&&s&&l?{Aliases:t,AcmCertificateArn:s}:{},Comment:`Endpoint For S3 ${e}`,HttpVersion:"http2",Origins:[{Id:e,DomainName:`!GetAtt ${f.ResourceName}.RegionalDomainName`,OriginAccessControlId:`!Ref ${u.ResourceName}`}],Enabled:true,DefaultCacheBehavior:{TargetOriginId:e,ViewerProtocolPolicy:"redirect-to-https",AllowedMethods:["GET","HEAD","OPTIONS"],Compress:true}});const h=(0,a.createS3Policy)({ResourceName:"S3BucketPolicy"},{BucketName:e,Distribution:d.ResourceName});c.push(f,u,d,h);if(t&&t.length>0&&s&&l){const e=(0,o.createRecordSetGroup)({ResourceName:"RecordSetGroup"},{DNSName:`!GetAtt ${d.ResourceName}.DomainName`,HostedZoneId:l,Aliases:t});c.push(e)}return(0,n.createTemplate)(c)};t.createS3SPA=createS3SPA},8760:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseYML=t.createTemplate=void 0;const n=s(8815);const createTemplate=e=>{const t=e.find((e=>e.Type==="AWS::CloudFront::Distribution"));const s=`!GetAtt ${t?.Properties["Aliases"]??"CDN"}.DomainName`;const n=t?.Properties["DistributionConfig"]?.["Aliases"]?.at(0);const i={DistributionId:{Description:"The Id of the Cloudfront Distribution",Value:`!Ref ${t?.ResourceName??"CDN"}`},DomainName:{Description:"Domain Name of SPA",Value:n??s}};return{AWSTemplateFormatVersion:"2010-09-09",Transform:"AWS::Serverless-2016-10-31",Description:"Generated by @deploy-actions/s3-spa",Resources:Object.fromEntries(e.map((e=>[e.ResourceName,{Type:e.Type,DependsOn:e.DependsOn,DeletionPolicy:e.DeletionPolicy,Properties:e.Properties}]))),Outputs:i}};t.createTemplate=createTemplate;const parseYML=e=>(0,n.stringify)(e).replaceAll(/"(!.*?)"/g,"$1");t.parseYML=parseYML},4037:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t.createTemplateOptions=void 0;const n=s(6982);const i=s(2847);const r=s(8929);const o=s(7434);const createTemplateOptions=()=>({BucketName:(0,i.assertString)((0,o.parseEnv)("BucketName"))??`s3-${(0,n.randomUUID)()}`,Aliases:(0,r.assertStringArray)((0,o.parseEnv)("Aliases")),AcmCertificateArn:(0,i.assertString)((0,o.parseEnv)("AcmCertificateArn")),HostedZoneId:(0,i.assertString)((0,o.parseEnv)("HostedZoneId"))});t.createTemplateOptions=createTemplateOptions},9651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createCloudFront=void 0;const createCloudFront=({ResourceName:e,DependsOn:t},{Aliases:s,Comment:n,DefaultCacheBehavior:i,Enabled:r,HttpVersion:o,IPV6Enabled:a,Origins:l,AcmCertificateArn:c})=>({Type:"AWS::CloudFront::Distribution",ResourceName:e,DependsOn:t,Properties:{DistributionConfig:{Aliases:s,Comment:n,DefaultRootObject:"index.html",DefaultCacheBehavior:{...i,CachePolicyId:"658327ea-f89d-4fab-a63d-7e88639e58f6"},Enabled:r,HttpVersion:o,IPV6Enabled:a,CustomErrorResponses:[{ErrorCachingMinTTL:10,ErrorCode:404,ResponseCode:200,ResponsePagePath:"/index.html"}],Origins:l.map((e=>({...e,S3OriginConfig:{}}))),...c?{ViewerCertificate:{AcmCertificateArn:c,SslSupportMethod:"sni-only",MinimumProtocolVersion:"TLSv1.2_2021"}}:{}}}});t.createCloudFront=createCloudFront},3573:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createOAC=void 0;const createOAC=({ResourceName:e},{Name:t})=>({Type:"AWS::CloudFront::OriginAccessControl",ResourceName:e,Properties:{OriginAccessControlConfig:{Name:t,OriginAccessControlOriginType:"s3",SigningBehavior:"always",SigningProtocol:"sigv4"}}});t.createOAC=createOAC},4688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createRecordSetGroup=void 0;const createRecordSetGroup=({ResourceName:e},{HostedZoneId:t,Aliases:s,DNSName:n})=>({Type:"AWS::Route53::RecordSetGroup",ResourceName:e,Properties:{HostedZoneId:t,RecordSets:s.map((e=>({Name:e,Type:"A",AliasTarget:{DNSName:n,HostedZoneId:"Z2FDTNDATAQYW2"}})))}});t.createRecordSetGroup=createRecordSetGroup},9664:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.createS3Policy=t.createS3=void 0;const createS3=({ResourceName:e},{BucketName:t})=>({Type:"AWS::S3::Bucket",ResourceName:e,Properties:{BucketName:t,PublicAccessBlockConfiguration:{BlockPublicAcls:true,BlockPublicPolicy:true,IgnorePublicAcls:true,RestrictPublicBuckets:true}}});t.createS3=createS3;const createS3Policy=({ResourceName:e},{BucketName:t,Distribution:s})=>({Type:"AWS::S3::BucketPolicy",ResourceName:e,Properties:{Bucket:t,PolicyDocument:{Version:"2012-10-17",Id:"PolicyForCloudFrontPrivateContent",Statement:[{Sid:"AllowCloudFrontServicePrincipal",Effect:"Allow",Principal:{Service:"cloudfront.amazonaws.com"},Action:"s3:GetObject",Resource:`!Sub arn:aws:s3:::${t}/*`,Condition:{StringEquals:{"AWS:SourceArn":`!Sub arn:aws:cloudfront::${"${AWS::AccountId}"}:distribution/${"${"+s+"}"}`}}}]}}});t.createS3Policy=createS3Policy},2847:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t.assertKeyword=t.assertString=void 0;const n=s(8109);const assertString=e=>(0,n.isNotEmptyString)(e)?e:undefined;t.assertString=assertString;const assertKeyword=(e,t)=>e(t)?t:undefined;t.assertKeyword=assertKeyword},8929:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t.assertKeywordArray=t.assertStringArray=void 0;const n=s(8109);const assertStringArray=e=>{if(!Array.isArray(e))return(0,n.isNotEmptyString)(e)?[e]:undefined;const t=e.filter(n.isNotEmptyString);return t.length>0?t:undefined};t.assertStringArray=assertStringArray;const assertKeywordArray=(e,t)=>{if(!Array.isArray(t))return e(t)?[t]:undefined;const s=t.filter(e);return s.length>0?s:undefined};t.assertKeywordArray=assertKeywordArray},8109:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isNotEmptyString=void 0;const isNotEmptyString=e=>typeof e==="string"&&e!=="";t.isNotEmptyString=isNotEmptyString},7434:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseEnv=void 0;const n=s(8815);const parseEnv=e=>{const t=process.env[e];if(t===undefined)return undefined;return(0,n.parse)(t)};t.parseEnv=parseEnv},6982:e=>{e.exports=require("crypto")},9896:e=>{e.exports=require("fs")},4573:e=>{e.exports=require("node:buffer")},1708:e=>{e.exports=require("node:process")},6928:e=>{e.exports=require("path")},7349:(e,t,s)=>{var n=s(1127);var i=s(3301);var r=s(4454);var o=s(2223);var a=s(7103);var l=s(334);var c=s(3142);function resolveCollection(e,t,s,n,i,r){const o=s.type==="block-map"?a.resolveBlockMap(e,t,s,n,r):s.type==="block-seq"?l.resolveBlockSeq(e,t,s,n,r):c.resolveFlowCollection(e,t,s,n,r);const f=o.constructor;if(i==="!"||i===f.tagName){o.tag=f.tagName;return o}if(i)o.tag=i;return o}function composeCollection(e,t,s,a,l){const c=a.tag;const f=!c?null:t.directives.tagName(c.source,(e=>l(c,"TAG_RESOLVE_FAILED",e)));if(s.type==="block-seq"){const{anchor:e,newlineAfterProp:t}=a;const s=e&&c?e.offset>c.offset?e:c:e??c;if(s&&(!t||t.offset<s.offset)){const e="Missing newline after block sequence props";l(s,"MISSING_CHAR",e)}}const u=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!c||!f||f==="!"||f===r.YAMLMap.tagName&&u==="map"||f===o.YAMLSeq.tagName&&u==="seq"){return resolveCollection(e,t,s,l,f)}let d=t.schema.tags.find((e=>e.tag===f&&e.collection===u));if(!d){const n=t.schema.knownTags[f];if(n&&n.collection===u){t.schema.tags.push(Object.assign({},n,{default:false}));d=n}else{if(n?.collection){l(c,"BAD_COLLECTION_TYPE",`${n.tag} used for ${u} collection, but expects ${n.collection}`,true)}else{l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,true)}return resolveCollection(e,t,s,l,f)}}const h=resolveCollection(e,t,s,l,f,d);const p=d.resolve?.(h,(e=>l(c,"TAG_RESOLVE_FAILED",e)),t.options)??h;const m=n.isNode(p)?p:new i.Scalar(p);m.range=h.range;m.tag=f;if(d?.format)m.format=d.format;return m}t.composeCollection=composeCollection},3683:(e,t,s)=>{var n=s(3021);var i=s(5937);var r=s(7788);var o=s(4631);function composeDoc(e,t,{offset:s,start:a,value:l,end:c},f){const u=Object.assign({_directives:t},e);const d=new n.Document(undefined,u);const h={atKey:false,atRoot:true,directives:d.directives,options:d.options,schema:d.schema};const p=o.resolveProps(a,{indicator:"doc-start",next:l??c?.[0],offset:s,onError:f,parentIndent:0,startOnNewline:true});if(p.found){d.directives.docStart=true;if(l&&(l.type==="block-map"||l.type==="block-seq")&&!p.hasNewline)f(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}d.contents=l?i.composeNode(h,l,p,f):i.composeEmptyNode(h,p.end,a,null,p,f);const m=d.contents.range[2];const y=r.resolveEnd(c,m,false,f);if(y.comment)d.comment=y.comment;d.range=[s,m,y.offset];return d}t.composeDoc=composeDoc},5937:(e,t,s)=>{var n=s(4065);var i=s(1127);var r=s(7349);var o=s(5413);var a=s(7788);var l=s(2599);const c={composeNode:composeNode,composeEmptyNode:composeEmptyNode};function composeNode(e,t,s,n){const a=e.atKey;const{spaceBefore:l,comment:f,anchor:u,tag:d}=s;let h;let p=true;switch(t.type){case"alias":h=composeAlias(e,t,n);if(u||d)n(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":h=o.composeScalar(e,t,d,n);if(u)h.anchor=u.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":h=r.composeCollection(c,e,t,s,n);if(u)h.anchor=u.source.substring(1);break;default:{const i=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",i);h=composeEmptyNode(e,t.offset,undefined,null,s,n);p=false}}if(u&&h.anchor==="")n(u,"BAD_ALIAS","Anchor cannot be an empty string");if(a&&e.options.stringKeys&&(!i.isScalar(h)||typeof h.value!=="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")){const e="With stringKeys, all keys must be strings";n(d??t,"NON_STRING_KEY",e)}if(l)h.spaceBefore=true;if(f){if(t.type==="scalar"&&t.source==="")h.comment=f;else h.commentBefore=f}if(e.options.keepSourceTokens&&p)h.srcToken=t;return h}function composeEmptyNode(e,t,s,n,{spaceBefore:i,comment:r,anchor:a,tag:c,end:f},u){const d={type:"scalar",offset:l.emptyScalarPosition(t,s,n),indent:-1,source:""};const h=o.composeScalar(e,d,c,u);if(a){h.anchor=a.source.substring(1);if(h.anchor==="")u(a,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)h.spaceBefore=true;if(r){h.comment=r;h.range[2]=f}return h}function composeAlias({options:e},{offset:t,source:s,end:i},r){const o=new n.Alias(s.substring(1));if(o.source==="")r(t,"BAD_ALIAS","Alias cannot be an empty string");if(o.source.endsWith(":"))r(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);const l=t+s.length;const c=a.resolveEnd(i,l,e.strict,r);o.range=[t,l,c.offset];if(c.comment)o.comment=c.comment;return o}t.composeEmptyNode=composeEmptyNode;t.composeNode=composeNode},5413:(e,t,s)=>{var n=s(1127);var i=s(3301);var r=s(8913);var o=s(6842);function composeScalar(e,t,s,a){const{value:l,type:c,comment:f,range:u}=t.type==="block-scalar"?r.resolveBlockScalar(e,t,a):o.resolveFlowScalar(t,e.options.strict,a);const d=s?e.directives.tagName(s.source,(e=>a(s,"TAG_RESOLVE_FAILED",e))):null;let h;if(e.options.stringKeys&&e.atKey){h=e.schema[n.SCALAR]}else if(d)h=findScalarTagByName(e.schema,l,d,s,a);else if(t.type==="scalar")h=findScalarTagByTest(e,l,t,a);else h=e.schema[n.SCALAR];let p;try{const r=h.resolve(l,(e=>a(s??t,"TAG_RESOLVE_FAILED",e)),e.options);p=n.isScalar(r)?r:new i.Scalar(r)}catch(e){const n=e instanceof Error?e.message:String(e);a(s??t,"TAG_RESOLVE_FAILED",n);p=new i.Scalar(l)}p.range=u;p.source=l;if(c)p.type=c;if(d)p.tag=d;if(h.format)p.format=h.format;if(f)p.comment=f;return p}function findScalarTagByName(e,t,s,i,r){if(s==="!")return e[n.SCALAR];const o=[];for(const t of e.tags){if(!t.collection&&t.tag===s){if(t.default&&t.test)o.push(t);else return t}}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[s];if(a&&!a.collection){e.tags.push(Object.assign({},a,{default:false,test:undefined}));return a}r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str");return e[n.SCALAR]}function findScalarTagByTest({atKey:e,directives:t,schema:s},i,r,o){const a=s.tags.find((t=>(t.default===true||e&&t.default==="key")&&t.test?.test(i)))||s[n.SCALAR];if(s.compat){const e=s.compat.find((e=>e.default&&e.test?.test(i)))??s[n.SCALAR];if(a.tag!==e.tag){const s=t.tagString(a.tag);const n=t.tagString(e.tag);const i=`Value may be parsed as either ${s} or ${n}`;o(r,"TAG_RESOLVE_FAILED",i,true)}}return a}t.composeScalar=composeScalar},9984:(e,t,s)=>{var n=s(1708);var i=s(1342);var r=s(3021);var o=s(1464);var a=s(1127);var l=s(3683);var c=s(7788);function getErrorPos(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:s}=e;return[t,t+(typeof s==="string"?s.length:1)]}function parsePrelude(e){let t="";let s=false;let n=false;for(let i=0;i<e.length;++i){const r=e[i];switch(r[0]){case"#":t+=(t===""?"":n?"\n\n":"\n")+(r.substring(1)||" ");s=true;n=false;break;case"%":if(e[i+1]?.[0]!=="#")i+=1;s=false;break;default:if(!s)n=true;s=false}}return{comment:t,afterEmptyLine:n}}class Composer{constructor(e={}){this.doc=null;this.atDirectives=false;this.prelude=[];this.errors=[];this.warnings=[];this.onError=(e,t,s,n)=>{const i=getErrorPos(e);if(n)this.warnings.push(new o.YAMLWarning(i,t,s));else this.errors.push(new o.YAMLParseError(i,t,s))};this.directives=new i.Directives({version:e.version||"1.2"});this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=parsePrelude(this.prelude);if(s){const i=e.contents;if(t){e.comment=e.comment?`${e.comment}\n${s}`:s}else if(n||e.directives.docStart||!i){e.commentBefore=s}else if(a.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];if(a.isPair(e))e=e.key;const t=e.commentBefore;e.commentBefore=t?`${s}\n${t}`:s}else{const e=i.commentBefore;i.commentBefore=e?`${s}\n${e}`:s}}if(t){Array.prototype.push.apply(e.errors,this.errors);Array.prototype.push.apply(e.warnings,this.warnings)}else{e.errors=this.errors;e.warnings=this.warnings}this.prelude=[];this.errors=[];this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=false,s=-1){for(const t of e)yield*this.next(t);yield*this.end(t,s)}*next(e){if(n.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,((t,s,n)=>{const i=getErrorPos(e);i[0]+=t;this.onError(i,"BAD_DIRECTIVE",s,n)}));this.prelude.push(e.source);this.atDirectives=true;break;case"document":{const t=l.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");this.decorate(t,false);if(this.doc)yield this.doc;this.doc=t;this.atDirectives=false;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message;const s=new o.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(s);else this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new o.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=true;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);this.decorate(this.doc,true);if(t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new o.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=false,t=-1){if(this.doc){this.decorate(this.doc,true);yield this.doc;this.doc=null}else if(e){const e=Object.assign({_directives:this.directives},this.options);const s=new r.Document(undefined,e);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");s.range=[0,t,t];this.decorate(s,false);yield s}}}t.Composer=Composer},7103:(e,t,s)=>{var n=s(7165);var i=s(4454);var r=s(4631);var o=s(9499);var a=s(4051);var l=s(1187);const c="All mapping items must start at the same column";function resolveBlockMap({composeNode:e,composeEmptyNode:t},s,f,u,d){const h=d?.nodeClass??i.YAMLMap;const p=new h(s.schema);if(s.atRoot)s.atRoot=false;let m=f.offset;let y=null;for(const i of f.items){const{start:d,key:h,sep:g,value:v}=i;const b=r.resolveProps(d,{indicator:"explicit-key-ind",next:h??g?.[0],offset:m,onError:u,parentIndent:f.indent,startOnNewline:true});const S=!b.found;if(S){if(h){if(h.type==="block-seq")u(m,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in h&&h.indent!==f.indent)u(m,"BAD_INDENT",c)}if(!b.anchor&&!b.tag&&!g){y=b.end;if(b.comment){if(p.comment)p.comment+="\n"+b.comment;else p.comment=b.comment}continue}if(b.newlineAfterProp||o.containsNewline(h)){u(h??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}}else if(b.found?.indent!==f.indent){u(m,"BAD_INDENT",c)}s.atKey=true;const w=b.end;const k=h?e(s,h,b,u):t(s,w,d,null,b,u);if(s.schema.compat)a.flowIndentCheck(f.indent,h,u);s.atKey=false;if(l.mapIncludes(s,p.items,k))u(w,"DUPLICATE_KEY","Map keys must be unique");const A=r.resolveProps(g??[],{indicator:"map-value-ind",next:v,offset:k.range[2],onError:u,parentIndent:f.indent,startOnNewline:!h||h.type==="block-scalar"});m=A.end;if(A.found){if(S){if(v?.type==="block-map"&&!A.hasNewline)u(m,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(s.options.strict&&b.start<A.found.offset-1024)u(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}const r=v?e(s,v,A,u):t(s,m,g,null,A,u);if(s.schema.compat)a.flowIndentCheck(f.indent,v,u);m=r.range[2];const o=new n.Pair(k,r);if(s.options.keepSourceTokens)o.srcToken=i;p.items.push(o)}else{if(S)u(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(A.comment){if(k.comment)k.comment+="\n"+A.comment;else k.comment=A.comment}const e=new n.Pair(k);if(s.options.keepSourceTokens)e.srcToken=i;p.items.push(e)}}if(y&&y<m)u(y,"IMPOSSIBLE","Map comment with trailing content");p.range=[f.offset,m,y??m];return p}t.resolveBlockMap=resolveBlockMap},8913:(e,t,s)=>{var n=s(3301);function resolveBlockScalar(e,t,s){const i=t.offset;const r=parseBlockScalarHeader(t,e.options.strict,s);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const o=r.mode===">"?n.Scalar.BLOCK_FOLDED:n.Scalar.BLOCK_LITERAL;const a=t.source?splitLines(t.source):[];let l=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(t===""||t==="\r")l=e;else break}if(l===0){const e=r.chomp==="+"&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let s=i+r.length;if(t.source)s+=t.source.length;return{value:e,type:o,comment:r.comment,range:[i,s,s]}}let c=t.indent+r.indent;let f=t.offset+r.length;let u=0;for(let t=0;t<l;++t){const[n,i]=a[t];if(i===""||i==="\r"){if(r.indent===0&&n.length>c)c=n.length}else{if(n.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";s(f+n.length,"MISSING_CHAR",e)}if(r.indent===0)c=n.length;u=t;if(c===0&&!e.atRoot){const e="Block scalar values in collections must be indented";s(f,"BAD_INDENT",e)}break}f+=n.length+i.length+1}for(let e=a.length-1;e>=l;--e){if(a[e][0].length>c)l=e+1}let d="";let h="";let p=false;for(let e=0;e<u;++e)d+=a[e][0].slice(c)+"\n";for(let e=u;e<l;++e){let[t,i]=a[e];f+=t.length+i.length+1;const l=i[i.length-1]==="\r";if(l)i=i.slice(0,-1);if(i&&t.length<c){const e=r.indent?"explicit indentation indicator":"first line";const n=`Block scalar lines must not be less indented than their ${e}`;s(f-i.length-(l?2:1),"BAD_INDENT",n);t=""}if(o===n.Scalar.BLOCK_LITERAL){d+=h+t.slice(c)+i;h="\n"}else if(t.length>c||i[0]==="\t"){if(h===" ")h="\n";else if(!p&&h==="\n")h="\n\n";d+=h+t.slice(c)+i;h="\n";p=true}else if(i===""){if(h==="\n")d+="\n";else h="\n"}else{d+=h+i;h=" ";p=false}}switch(r.chomp){case"-":break;case"+":for(let e=l;e<a.length;++e)d+="\n"+a[e][0].slice(c);if(d[d.length-1]!=="\n")d+="\n";break;default:d+="\n"}const m=i+r.length+t.source.length;return{value:d,type:o,comment:r.comment,range:[i,m,m]}}function parseBlockScalarHeader({offset:e,props:t},s,n){if(t[0].type!=="block-scalar-header"){n(t[0],"IMPOSSIBLE","Block scalar header not found");return null}const{source:i}=t[0];const r=i[0];let o=0;let a="";let l=-1;for(let t=1;t<i.length;++t){const s=i[t];if(!a&&(s==="-"||s==="+"))a=s;else{const n=Number(s);if(!o&&n)o=n;else if(l===-1)l=e+t}}if(l!==-1)n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=false;let f="";let u=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":c=true;case"newline":u+=i.source.length;break;case"comment":if(s&&!c){const e="Comments must be separated from other tokens by white space characters";n(i,"MISSING_CHAR",e)}u+=i.source.length;f=i.source.substring(1);break;case"error":n(i,"UNEXPECTED_TOKEN",i.message);u+=i.source.length;break;default:{const e=`Unexpected token in block scalar header: ${i.type}`;n(i,"UNEXPECTED_TOKEN",e);const t=i.source;if(t&&typeof t==="string")u+=t.length}}}return{mode:r,indent:o,chomp:a,comment:f,length:u}}function splitLines(e){const t=e.split(/\n( *)/);const s=t[0];const n=s.match(/^( *)/);const i=n?.[1]?[n[1],s.slice(n[1].length)]:["",s];const r=[i];for(let e=1;e<t.length;e+=2)r.push([t[e],t[e+1]]);return r}t.resolveBlockScalar=resolveBlockScalar},334:(e,t,s)=>{var n=s(2223);var i=s(4631);var r=s(4051);function resolveBlockSeq({composeNode:e,composeEmptyNode:t},s,o,a,l){const c=l?.nodeClass??n.YAMLSeq;const f=new c(s.schema);if(s.atRoot)s.atRoot=false;if(s.atKey)s.atKey=false;let u=o.offset;let d=null;for(const{start:n,value:l}of o.items){const c=i.resolveProps(n,{indicator:"seq-item-ind",next:l,offset:u,onError:a,parentIndent:o.indent,startOnNewline:true});if(!c.found){if(c.anchor||c.tag||l){if(l&&l.type==="block-seq")a(c.end,"BAD_INDENT","All sequence items must start at the same column");else a(u,"MISSING_CHAR","Sequence item without - indicator")}else{d=c.end;if(c.comment)f.comment=c.comment;continue}}const h=l?e(s,l,c,a):t(s,c.end,n,null,c,a);if(s.schema.compat)r.flowIndentCheck(o.indent,l,a);u=h.range[2];f.items.push(h)}f.range=[o.offset,u,d??u];return f}t.resolveBlockSeq=resolveBlockSeq},7788:(e,t)=>{function resolveEnd(e,t,s,n){let i="";if(e){let r=false;let o="";for(const a of e){const{source:e,type:l}=a;switch(l){case"space":r=true;break;case"comment":{if(s&&!r)n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";if(!i)i=t;else i+=o+t;o="";break}case"newline":if(i)o+=e;r=true;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}t.resolveEnd=resolveEnd},3142:(e,t,s)=>{var n=s(1127);var i=s(7165);var r=s(4454);var o=s(2223);var a=s(7788);var l=s(4631);var c=s(9499);var f=s(1187);const u="Block collections are not allowed within flow collections";const isBlock=e=>e&&(e.type==="block-map"||e.type==="block-seq");function resolveFlowCollection({composeNode:e,composeEmptyNode:t},s,d,h,p){const m=d.start.source==="{";const y=m?"flow map":"flow sequence";const g=p?.nodeClass??(m?r.YAMLMap:o.YAMLSeq);const v=new g(s.schema);v.flow=true;const b=s.atRoot;if(b)s.atRoot=false;if(s.atKey)s.atKey=false;let S=d.offset+d.start.source.length;for(let o=0;o<d.items.length;++o){const a=d.items[o];const{start:p,key:g,sep:b,value:w}=a;const k=l.resolveProps(p,{flow:y,indicator:"explicit-key-ind",next:g??b?.[0],offset:S,onError:h,parentIndent:d.indent,startOnNewline:false});if(!k.found){if(!k.anchor&&!k.tag&&!b&&!w){if(o===0&&k.comma)h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(o<d.items.length-1)h(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`);if(k.comment){if(v.comment)v.comment+="\n"+k.comment;else v.comment=k.comment}S=k.end;continue}if(!m&&s.options.strict&&c.containsNewline(g))h(g,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(o===0){if(k.comma)h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`)}else{if(!k.comma)h(k.start,"MISSING_CHAR",`Missing , between ${y} items`);if(k.comment){let e="";e:for(const t of p){switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}}if(e){let t=v.items[v.items.length-1];if(n.isPair(t))t=t.value??t.key;if(t.comment)t.comment+="\n"+e;else t.comment=e;k.comment=k.comment.substring(e.length+1)}}}if(!m&&!b&&!k.found){const n=w?e(s,w,k,h):t(s,k.end,b,null,k,h);v.items.push(n);S=n.range[2];if(isBlock(w))h(n.range,"BLOCK_IN_FLOW",u)}else{s.atKey=true;const n=k.end;const o=g?e(s,g,k,h):t(s,n,p,null,k,h);if(isBlock(g))h(o.range,"BLOCK_IN_FLOW",u);s.atKey=false;const c=l.resolveProps(b??[],{flow:y,indicator:"map-value-ind",next:w,offset:o.range[2],onError:h,parentIndent:d.indent,startOnNewline:false});if(c.found){if(!m&&!k.found&&s.options.strict){if(b)for(const e of b){if(e===c.found)break;if(e.type==="newline"){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(k.start<c.found.offset-1024)h(c.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(w){if("source"in w&&w.source&&w.source[0]===":")h(w,"MISSING_CHAR",`Missing space after : in ${y}`);else h(c.start,"MISSING_CHAR",`Missing , or : between ${y} items`)}const A=w?e(s,w,c,h):c.found?t(s,c.end,b,null,c,h):null;if(A){if(isBlock(w))h(A.range,"BLOCK_IN_FLOW",u)}else if(c.comment){if(o.comment)o.comment+="\n"+c.comment;else o.comment=c.comment}const N=new i.Pair(o,A);if(s.options.keepSourceTokens)N.srcToken=a;if(m){const e=v;if(f.mapIncludes(s,e.items,o))h(n,"DUPLICATE_KEY","Map keys must be unique");e.items.push(N)}else{const e=new r.YAMLMap(s.schema);e.flow=true;e.items.push(N);const t=(A??o).range;e.range=[o.range[0],t[1],t[2]];v.items.push(e)}S=A?A.range[2]:c.end}}const w=m?"}":"]";const[k,...A]=d.end;let N=S;if(k&&k.source===w)N=k.offset+k.source.length;else{const e=y[0].toUpperCase()+y.substring(1);const t=b?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`;h(S,b?"MISSING_CHAR":"BAD_INDENT",t);if(k&&k.source.length!==1)A.unshift(k)}if(A.length>0){const e=a.resolveEnd(A,N,s.options.strict,h);if(e.comment){if(v.comment)v.comment+="\n"+e.comment;else v.comment=e.comment}v.range=[d.offset,N,e.offset]}else{v.range=[d.offset,N,N]}return v}t.resolveFlowCollection=resolveFlowCollection},6842:(e,t,s)=>{var n=s(3301);var i=s(7788);function resolveFlowScalar(e,t,s){const{offset:r,type:o,source:a,end:l}=e;let c;let f;const _onError=(e,t,n)=>s(r+e,t,n);switch(o){case"scalar":c=n.Scalar.PLAIN;f=plainValue(a,_onError);break;case"single-quoted-scalar":c=n.Scalar.QUOTE_SINGLE;f=singleQuotedValue(a,_onError);break;case"double-quoted-scalar":c=n.Scalar.QUOTE_DOUBLE;f=doubleQuotedValue(a,_onError);break;default:s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`);return{value:"",type:null,comment:"",range:[r,r+a.length,r+a.length]}}const u=r+a.length;const d=i.resolveEnd(l,u,t,s);return{value:f,type:c,comment:d.comment,range:[r,u,d.offset]}}function plainValue(e,t){let s="";switch(e[0]){case"\t":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${e[0]}`;break}case"@":case"`":{s=`reserved character ${e[0]}`;break}}if(s)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`);return foldLines(e)}function singleQuotedValue(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}function foldLines(e){let t,s;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy");s=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy;s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let i=n[1];let r=" ";let o=t.lastIndex;s.lastIndex=o;while(n=s.exec(e)){if(n[1]===""){if(r==="\n")i+=r;else r="\n"}else{i+=r+n[1];r=" "}o=s.lastIndex}const a=/[ \t]*(.*)/sy;a.lastIndex=o;n=a.exec(e);return i+r+(n?.[1]??"")}function doubleQuotedValue(e,t){let s="";for(let n=1;n<e.length-1;++n){const i=e[n];if(i==="\r"&&e[n+1]==="\n")continue;if(i==="\n"){const{fold:t,offset:i}=foldNewline(e,n);s+=t;n=i}else if(i==="\\"){let i=e[++n];const o=r[i];if(o)s+=o;else if(i==="\n"){i=e[n+1];while(i===" "||i==="\t")i=e[++n+1]}else if(i==="\r"&&e[n+1]==="\n"){i=e[++n+1];while(i===" "||i==="\t")i=e[++n+1]}else if(i==="x"||i==="u"||i==="U"){const r={x:2,u:4,U:8}[i];s+=parseCharCode(e,n+1,r,t);n+=r}else{const i=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`);s+=i}}else if(i===" "||i==="\t"){const t=n;let r=e[n+1];while(r===" "||r==="\t")r=e[++n+1];if(r!=="\n"&&!(r==="\r"&&e[n+2]==="\n"))s+=n>t?e.slice(t,n+1):i}else{s+=i}}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return s}function foldNewline(e,t){let s="";let n=e[t+1];while(n===" "||n==="\t"||n==="\n"||n==="\r"){if(n==="\r"&&e[t+2]!=="\n")break;if(n==="\n")s+="\n";t+=1;n=e[t+1]}if(!s)s=" ";return{fold:s,offset:t}}const r={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,s,n){const i=e.substr(t,s);const r=i.length===s&&/^[0-9a-fA-F]+$/.test(i);const o=r?parseInt(i,16):NaN;if(isNaN(o)){const i=e.substr(t-2,s+2);n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`);return i}return String.fromCodePoint(o)}t.resolveFlowScalar=resolveFlowScalar},4631:(e,t)=>{function resolveProps(e,{flow:t,indicator:s,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let l=false;let c=a;let f=a;let u="";let d="";let h=false;let p=false;let m=null;let y=null;let g=null;let v=null;let b=null;let S=null;let w=null;for(const i of e){if(p){if(i.type!=="space"&&i.type!=="newline"&&i.type!=="comma")r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");p=false}if(m){if(c&&i.type!=="comment"&&i.type!=="newline"){r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation")}m=null}switch(i.type){case"space":if(!t&&(s!=="doc-start"||n?.type!=="flow-collection")&&i.source.includes("\t")){m=i}f=true;break;case"comment":{if(!f)r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=i.source.substring(1)||" ";if(!u)u=e;else u+=d+e;d="";c=false;break}case"newline":if(c){if(u)u+=i.source;else if(!S||s!=="seq-item-ind")l=true}else d+=i.source;c=true;h=true;if(y||g)v=i;f=true;break;case"anchor":if(y)r(i,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(i.source.endsWith(":"))r(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true);y=i;if(w===null)w=i.offset;c=false;f=false;p=true;break;case"tag":{if(g)r(i,"MULTIPLE_TAGS","A node can have at most one tag");g=i;if(w===null)w=i.offset;c=false;f=false;p=true;break}case s:if(y||g)r(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`);if(S)r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`);S=i;c=s==="seq-item-ind"||s==="explicit-key-ind";f=false;break;case"comma":if(t){if(b)r(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);b=i;c=false;f=false;break}default:r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`);c=false;f=false}}const k=e[e.length-1];const A=k?k.offset+k.source.length:i;if(p&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")){r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space")}if(m&&(c&&m.indent<=o||n?.type==="block-map"||n?.type==="block-seq"))r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:b,found:S,spaceBefore:l,comment:u,hasNewline:h,anchor:y,tag:g,newlineAfterProp:v,end:A,start:w??A}}t.resolveProps=resolveProps},9499:(e,t)=>{function containsNewline(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 true;if(e.end)for(const t of e.end)if(t.type==="newline")return true;return false;case"flow-collection":for(const t of e.items){for(const e of t.start)if(e.type==="newline")return true;if(t.sep)for(const e of t.sep)if(e.type==="newline")return true;if(containsNewline(t.key)||containsNewline(t.value))return true}return false;default:return true}}t.containsNewline=containsNewline},2599:(e,t)=>{function emptyScalarPosition(e,t,s){if(t){if(s===null)s=t.length;for(let n=s-1;n>=0;--n){let s=t[n];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}s=t[++n];while(s?.type==="space"){e+=s.source.length;s=t[++n]}break}}return e}t.emptyScalarPosition=emptyScalarPosition},4051:(e,t,s)=>{var n=s(9499);function flowIndentCheck(e,t,s){if(t?.type==="flow-collection"){const i=t.end[0];if(i.indent===e&&(i.source==="]"||i.source==="}")&&n.containsNewline(t)){const e="Flow end indicator should be more indented than parent";s(i,"BAD_INDENT",e,true)}}}t.flowIndentCheck=flowIndentCheck},1187:(e,t,s)=>{var n=s(1127);function mapIncludes(e,t,s){const{uniqueKeys:i}=e.options;if(i===false)return false;const r=typeof i==="function"?i:(e,t)=>e===t||n.isScalar(e)&&n.isScalar(t)&&e.value===t.value;return t.some((e=>r(e.key,s)))}t.mapIncludes=mapIncludes},3021:(e,t,s)=>{var n=s(4065);var i=s(101);var r=s(1127);var o=s(7165);var a=s(4043);var l=s(5840);var c=s(6829);var f=s(1596);var u=s(3661);var d=s(2404);var h=s(1342);class Document{constructor(e,t,s){this.commentBefore=null;this.comment=null;this.errors=[];this.warnings=[];Object.defineProperty(this,r.NODE_TYPE,{value:r.DOC});let n=null;if(typeof t==="function"||Array.isArray(t)){n=t}else if(s===undefined&&t){s=t;t=undefined}const i=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,stringKeys:false,uniqueKeys:true,version:"1.2"},s);this.options=i;let{version:o}=i;if(s?._directives){this.directives=s._directives.atDocument();if(this.directives.yaml.explicit)o=this.directives.yaml.version}else this.directives=new h.Directives({version:o});this.setSchema(o,s);this.contents=e===undefined?null:this.createNode(e,n,s)}clone(){const e=Object.create(Document.prototype,{[r.NODE_TYPE]:{value:r.DOC}});e.commentBefore=this.commentBefore;e.comment=this.comment;e.errors=this.errors.slice();e.warnings=this.warnings.slice();e.options=Object.assign({},this.options);if(this.directives)e.directives=this.directives.clone();e.schema=this.schema.clone();e.contents=r.isNode(this.contents)?this.contents.clone(e.schema):this.contents;if(this.range)e.range=this.range.slice();return e}add(e){if(assertCollection(this.contents))this.contents.add(e)}addIn(e,t){if(assertCollection(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=f.anchorNames(this);e.anchor=!t||s.has(t)?f.findNewAnchor(t||"a",s):t}return new n.Alias(e.anchor)}createNode(e,t,s){let n=undefined;if(typeof t==="function"){e=t.call({"":e},"",e);n=t}else if(Array.isArray(t)){const keyToStr=e=>typeof e==="number"||e instanceof String||e instanceof Number;const e=t.filter(keyToStr).map(String);if(e.length>0)t=t.concat(e);n=t}else if(s===undefined&&t){s=t;t=undefined}const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{};const{onAnchor:h,setAnchors:p,sourceObjects:m}=f.createNodeAnchors(this,o||"a");const y={aliasDuplicateObjects:i??true,keepUndefined:l??false,onAnchor:h,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:m};const g=d.createNode(e,u,y);if(a&&r.isCollection(g))g.flow=true;p();return g}createPair(e,t,s={}){const n=this.createNode(e,null,s);const i=this.createNode(t,null,s);return new o.Pair(n,i)}delete(e){return assertCollection(this.contents)?this.contents.delete(e):false}deleteIn(e){if(i.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}return assertCollection(this.contents)?this.contents.deleteIn(e):false}get(e,t){return r.isCollection(this.contents)?this.contents.get(e,t):undefined}getIn(e,t){if(i.isEmptyPath(e))return!t&&r.isScalar(this.contents)?this.contents.value:this.contents;return r.isCollection(this.contents)?this.contents.getIn(e,t):undefined}has(e){return r.isCollection(this.contents)?this.contents.has(e):false}hasIn(e){if(i.isEmptyPath(e))return this.contents!==undefined;return r.isCollection(this.contents)?this.contents.hasIn(e):false}set(e,t){if(this.contents==null){this.contents=i.collectionFromPath(this.schema,[e],t)}else if(assertCollection(this.contents)){this.contents.set(e,t)}}setIn(e,t){if(i.isEmptyPath(e)){this.contents=t}else if(this.contents==null){this.contents=i.collectionFromPath(this.schema,Array.from(e),t)}else if(assertCollection(this.contents)){this.contents.setIn(e,t)}}setSchema(e,t={}){if(typeof e==="number")e=String(e);let s;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new h.Directives({version:"1.1"});s={resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new h.Directives({version:e});s={resolveKnownTags:true,schema:"core"};break;case null:if(this.directives)delete this.directives;s=null;break;default:{const t=JSON.stringify(e);throw new 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(s)this.schema=new l.Schema(Object.assign(s,t));else throw new Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const l=a.toJS(this.contents,t??"",o);if(typeof i==="function")for(const{count:e,res:t}of o.anchors.values())i(t,e);return typeof r==="function"?u.applyReviver(r,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:true,jsonArg:e,mapAsMap:false,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return c.stringifyDocument(this,e)}}function assertCollection(e){if(r.isCollection(e))return true;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},1596:(e,t,s)=>{var n=s(1127);var i=s(204);function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const s=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(s)}return true}function anchorNames(e){const t=new Set;i.visit(e,{Value(e,s){if(s.anchor)t.add(s.anchor)}});return t}function findNewAnchor(e,t){for(let s=1;true;++s){const n=`${e}${s}`;if(!t.has(n))return n}}function createNodeAnchors(e,t){const s=[];const i=new Map;let r=null;return{onAnchor:n=>{s.push(n);if(!r)r=anchorNames(e);const i=findNewAnchor(t,r);r.add(i);return i},setAnchors:()=>{for(const e of s){const t=i.get(e);if(typeof t==="object"&&t.anchor&&(n.isScalar(t.node)||n.isCollection(t.node))){t.node.anchor=t.anchor}else{const t=new Error("Failed to resolve repeated object (this should not happen)");t.source=e;throw t}}},sourceObjects:i}}t.anchorIsValid=anchorIsValid;t.anchorNames=anchorNames;t.createNodeAnchors=createNodeAnchors;t.findNewAnchor=findNewAnchor},3661:(e,t)=>{function applyReviver(e,t,s,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let t=0,s=n.length;t<s;++t){const s=n[t];const i=applyReviver(e,n,String(t),s);if(i===undefined)delete n[t];else if(i!==s)n[t]=i}}else if(n instanceof Map){for(const t of Array.from(n.keys())){const s=n.get(t);const i=applyReviver(e,n,t,s);if(i===undefined)n.delete(t);else if(i!==s)n.set(t,i)}}else if(n instanceof Set){for(const t of Array.from(n)){const s=applyReviver(e,n,t,t);if(s===undefined)n.delete(t);else if(s!==t){n.delete(t);n.add(s)}}}else{for(const[t,s]of Object.entries(n)){const i=applyReviver(e,n,t,s);if(i===undefined)delete n[t];else if(i!==s)n[t]=i}}}return e.call(t,s,n)}t.applyReviver=applyReviver},2404:(e,t,s)=>{var n=s(4065);var i=s(1127);var r=s(3301);const o="tag:yaml.org,2002:";function findTagObject(e,t,s){if(t){const e=s.filter((e=>e.tag===t));const n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return s.find((t=>t.identify?.(e)&&!t.format))}function createNode(e,t,s){if(i.isDocument(e))e=e.contents;if(i.isNode(e))return e;if(i.isPair(e)){const t=s.schema[i.MAP].createNode?.(s.schema,null,s);t.items.push(e);return t}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:a,onAnchor:l,onTagObj:c,schema:f,sourceObjects:u}=s;let d=undefined;if(a&&e&&typeof e==="object"){d=u.get(e);if(d){if(!d.anchor)d.anchor=l(e);return new n.Alias(d.anchor)}else{d={anchor:null,node:null};u.set(e,d)}}if(t?.startsWith("!!"))t=o+t.slice(2);let h=findTagObject(e,t,f.tags);if(!h){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const t=new r.Scalar(e);if(d)d.node=t;return t}h=e instanceof Map?f[i.MAP]:Symbol.iterator in Object(e)?f[i.SEQ]:f[i.MAP]}if(c){c(h);delete s.onTagObj}const p=h?.createNode?h.createNode(s.schema,e,s):typeof h?.nodeClass?.from==="function"?h.nodeClass.from(s.schema,e,s):new r.Scalar(e);if(t)p.tag=t;else if(!h.default)p.tag=h.tag;if(d)d.node=p;return p}t.createNode=createNode},1342:(e,t,s)=>{var n=s(1127);var i=s(204);const r={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};const escapeTagName=e=>e.replace(/[!,[\]{}]/g,(e=>r[e]));class Directives{constructor(e,t){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},Directives.defaultYaml,e);this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},Directives.defaultTags);break}return e}add(e,t){if(this.atNextDocument){this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},Directives.defaultTags);this.atNextDocument=false}const s=e.trim().split(/[ \t]+/);const n=s.shift();switch(n){case"%TAG":{if(s.length!==2){t(0,"%TAG directive should contain exactly two parts");if(s.length<2)return false}const[e,n]=s;this.tags[e]=n;return true}case"%YAML":{this.yaml.explicit=true;if(s.length!==1){t(0,"%YAML directive should contain exactly one part");return false}const[e]=s;if(e==="1.1"||e==="1.2"){this.yaml.version=e;return true}else{const s=/^\d+\.\d+$/.test(e);t(6,`Unsupported YAML version ${e}`,s);return false}}default:t(0,`Unknown directive ${n}`,true);return false}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!"){t(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const s=e.slice(2,-1);if(s==="!"||s==="!!"){t(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return s}const[,s,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);const i=this.tags[s];if(i){try{return i+decodeURIComponent(n)}catch(e){t(String(e));return null}}if(s==="!")return e;t(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[t,s]of Object.entries(this.tags)){if(e.startsWith(s))return t+escapeTagName(e.substring(s.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const s=Object.entries(this.tags);let r;if(e&&s.length>0&&n.isNode(e.contents)){const t={};i.visit(e.contents,((e,s)=>{if(n.isNode(s)&&s.tag)t[s.tag]=true}));r=Object.keys(t)}else r=[];for(const[n,i]of s){if(n==="!!"&&i==="tag:yaml.org,2002:")continue;if(!e||r.some((e=>e.startsWith(i))))t.push(`%TAG ${n} ${i}`)}return t.join("\n")}}Directives.defaultYaml={explicit:false,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};t.Directives=Directives},1464:(e,t)=>{class YAMLError extends Error{constructor(e,t,s,n){super();this.name=e;this.code=s;this.message=n;this.pos=t}}class YAMLParseError extends YAMLError{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class YAMLWarning extends YAMLError{constructor(e,t,s){super("YAMLWarning",e,t,s)}}const prettifyError=(e,t)=>s=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map((e=>t.linePos(e)));const{line:n,col:i}=s.linePos[0];s.message+=` at line ${n}, column ${i}`;let r=i-1;let o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const e=Math.min(r-39,o.length-79);o="…"+o.substring(e);r-=e-1}if(o.length>80)o=o.substring(0,79)+"…";if(n>1&&/^ *$/.test(o.substring(0,r))){let s=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(s.length>80)s=s.substring(0,79)+"…\n";o=s+o}if(/[^ ]/.test(o)){let e=1;const t=s.linePos[1];if(t&&t.line===n&&t.col>i){e=Math.max(1,Math.min(t.col-i,80-r))}const a=" ".repeat(r)+"^".repeat(e);s.message+=`:\n\n${o}\n${a}\n`}};t.YAMLError=YAMLError;t.YAMLParseError=YAMLParseError;t.YAMLWarning=YAMLWarning;t.prettifyError=prettifyError},8815:(e,t,s)=>{var n=s(9984);var i=s(3021);var r=s(5840);var o=s(1464);var a=s(4065);var l=s(1127);var c=s(7165);var f=s(3301);var u=s(4454);var d=s(2223);var h=s(3461);var p=s(361);var m=s(6628);var y=s(3456);var g=s(4047);var v=s(204);t.Composer=n.Composer;t.Document=i.Document;t.Schema=r.Schema;t.YAMLError=o.YAMLError;t.YAMLParseError=o.YAMLParseError;t.YAMLWarning=o.YAMLWarning;t.Alias=a.Alias;t.isAlias=l.isAlias;t.isCollection=l.isCollection;t.isDocument=l.isDocument;t.isMap=l.isMap;t.isNode=l.isNode;t.isPair=l.isPair;t.isScalar=l.isScalar;t.isSeq=l.isSeq;t.Pair=c.Pair;t.Scalar=f.Scalar;t.YAMLMap=u.YAMLMap;t.YAMLSeq=d.YAMLSeq;t.CST=h;t.Lexer=p.Lexer;t.LineCounter=m.LineCounter;t.Parser=y.Parser;t.parse=g.parse;t.parseAllDocuments=g.parseAllDocuments;t.parseDocument=g.parseDocument;t.stringify=g.stringify;t.visit=v.visit;t.visitAsync=v.visitAsync},7249:(e,t,s)=>{var n=s(1708);function debug(e,...t){if(e==="debug")console.log(...t)}function warn(e,t){if(e==="debug"||e==="warn"){if(typeof n.emitWarning==="function")n.emitWarning(t);else console.warn(t)}}t.debug=debug;t.warn=warn},4065:(e,t,s)=>{var n=s(1596);var i=s(204);var r=s(1127);var o=s(6673);var a=s(4043);class Alias extends o.NodeBase{constructor(e){super(r.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t=undefined;i.visit(e,{Node:(e,s)=>{if(s===this)return i.visit.BREAK;if(s.anchor===this.source)t=s}});return t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:n,maxAliasCount:i}=t;const r=this.resolve(n);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=s.get(r);if(!o){a.toJS(r,null,t);o=s.get(r)}if(!o||o.res===undefined){const e="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(e)}if(i>=0){o.count+=1;if(o.aliasCount===0)o.aliasCount=getAliasCount(n,r,s);if(o.count*o.aliasCount>i){const e="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(e)}}return o.res}toString(e,t,s){const i=`*${this.source}`;if(e){n.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${i} `}return i}}function getAliasCount(e,t,s){if(r.isAlias(t)){const n=t.resolve(e);const i=s&&n&&s.get(n);return i?i.count*i.aliasCount:0}else if(r.isCollection(t)){let n=0;for(const i of t.items){const t=getAliasCount(e,i,s);if(t>n)n=t}return n}else if(r.isPair(t)){const n=getAliasCount(e,t.key,s);const i=getAliasCount(e,t.value,s);return Math.max(n,i)}return 1}t.Alias=Alias},101:(e,t,s)=>{var n=s(2404);var i=s(1127);var r=s(6673);function collectionFromPath(e,t,s){let i=s;for(let e=t.length-1;e>=0;--e){const s=t[e];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const e=[];e[s]=i;i=e}else{i=new Map([[s,i]])}}return n.createNode(i,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Collection extends r.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:true,enumerable:false,writable:true})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;t.items=t.items.map((t=>i.isNode(t)||i.isPair(t)?t.clone(e):t));if(this.range)t.range=this.range.slice();return t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[s,...n]=e;const r=this.get(s,true);if(i.isCollection(r))r.addIn(n,t);else if(r===undefined&&this.schema)this.set(s,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}deleteIn(e){const[t,...s]=e;if(s.length===0)return this.delete(t);const n=this.get(t,true);if(i.isCollection(n))return n.deleteIn(s);else throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...n]=e;const r=this.get(s,true);if(n.length===0)return!t&&i.isScalar(r)?r.value:r;else return i.isCollection(r)?r.getIn(n,t):undefined}hasAllNullValues(e){return this.items.every((t=>{if(!i.isPair(t))return false;const s=t.value;return s==null||e&&i.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag}))}hasIn(e){const[t,...s]=e;if(s.length===0)return this.has(t);const n=this.get(t,true);return i.isCollection(n)?n.hasIn(s):false}setIn(e,t){const[s,...n]=e;if(n.length===0){this.set(s,t)}else{const e=this.get(s,true);if(i.isCollection(e))e.setIn(n,t);else if(e===undefined&&this.schema)this.set(s,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}}t.Collection=Collection;t.collectionFromPath=collectionFromPath;t.isEmptyPath=isEmptyPath},6673:(e,t,s)=>{var n=s(3661);var i=s(1127);var r=s(4043);class NodeBase{constructor(e){Object.defineProperty(this,i.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:o,reviver:a}={}){if(!i.isDocument(e))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:e,keep:true,mapAsMap:t===true,mapKeyWarned:false,maxAliasCount:typeof s==="number"?s:100};const c=r.toJS(this,"",l);if(typeof o==="function")for(const{count:e,res:t}of l.anchors.values())o(t,e);return typeof a==="function"?n.applyReviver(a,{"":c},"",c):c}}t.NodeBase=NodeBase},7165:(e,t,s)=>{var n=s(2404);var i=s(9748);var r=s(7104);var o=s(1127);function createPair(e,t,s){const i=n.createNode(e,undefined,s);const r=n.createNode(t,undefined,s);return new Pair(i,r)}class Pair{constructor(e,t=null){Object.defineProperty(this,o.NODE_TYPE,{value:o.PAIR});this.key=e;this.value=t}clone(e){let{key:t,value:s}=this;if(o.isNode(t))t=t.clone(e);if(o.isNode(s))s=s.clone(e);return new Pair(t,s)}toJSON(e,t){const s=t?.mapAsMap?new Map:{};return r.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?i.stringifyPair(this,e,t,s):JSON.stringify(this)}}t.Pair=Pair;t.createPair=createPair},3301:(e,t,s)=>{var n=s(1127);var i=s(6673);var r=s(4043);const isScalarValue=e=>!e||typeof e!=="function"&&typeof e!=="object";class Scalar extends i.NodeBase{constructor(e){super(n.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:r.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";t.Scalar=Scalar;t.isScalarValue=isScalarValue},4454:(e,t,s)=>{var n=s(1212);var i=s(7104);var r=s(101);var o=s(1127);var a=s(7165);var l=s(3301);function findPair(e,t){const s=o.isScalar(t)?t.value:t;for(const n of e){if(o.isPair(n)){if(n.key===t||n.key===s)return n;if(o.isScalar(n.key)&&n.key.value===s)return n}}return undefined}class YAMLMap extends r.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e);this.items=[]}static from(e,t,s){const{keepUndefined:n,replacer:i}=s;const r=new this(e);const add=(e,o)=>{if(typeof i==="function")o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;if(o!==undefined||n)r.items.push(a.createPair(e,o,s))};if(t instanceof Map){for(const[e,s]of t)add(e,s)}else if(t&&typeof t==="object"){for(const e of Object.keys(t))add(e,t[e])}if(typeof e.sortMapEntries==="function"){r.items.sort(e.sortMapEntries)}return r}add(e,t){let s;if(o.isPair(e))s=e;else if(!e||typeof e!=="object"||!("key"in e)){s=new a.Pair(e,e?.value)}else s=new a.Pair(e.key,e.value);const n=findPair(this.items,s.key);const i=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${s.key} already set`);if(o.isScalar(n.value)&&l.isScalarValue(s.value))n.value.value=s.value;else n.value=s.value}else if(i){const e=this.items.findIndex((e=>i(s,e)<0));if(e===-1)this.items.push(s);else this.items.splice(e,0,s)}else{this.items.push(s)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const s=this.items.splice(this.items.indexOf(t),1);return s.length>0}get(e,t){const s=findPair(this.items,e);const n=s?.value;return(!t&&o.isScalar(n)?n.value:n)??undefined}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new a.Pair(e,t),true)}toJSON(e,t,s){const n=s?new s:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(const e of this.items)i.addPairToJSMap(t,n,e);return n}toString(e,t,s){if(!e)return JSON.stringify(this);for(const e of this.items){if(!o.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`)}if(!e.allNullValues&&this.hasAllNullValues(false))e=Object.assign({},e,{allNullValues:true});return n.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}t.YAMLMap=YAMLMap;t.findPair=findPair},2223:(e,t,s)=>{var n=s(2404);var i=s(1212);var r=s(101);var o=s(1127);var a=s(3301);var l=s(4043);class YAMLSeq extends r.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(o.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if(typeof t!=="number")return false;const s=this.items.splice(t,1);return s.length>0}get(e,t){const s=asItemIndex(e);if(typeof s!=="number")return undefined;const n=this.items[s];return!t&&o.isScalar(n)?n.value:n}has(e){const t=asItemIndex(e);return typeof t==="number"&&t<this.items.length}set(e,t){const s=asItemIndex(e);if(typeof s!=="number")throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[s];if(o.isScalar(n)&&a.isScalarValue(t))n.value=t;else this.items[s]=t}toJSON(e,t){const s=[];if(t?.onCreate)t.onCreate(s);let n=0;for(const e of this.items)s.push(l.toJS(e,String(n++),t));return s}toString(e,t,s){if(!e)return JSON.stringify(this);return i.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t})}static from(e,t,s){const{replacer:i}=s;const r=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if(typeof i==="function"){const s=t instanceof Set?o:String(e++);o=i.call(t,s,o)}r.items.push(n.createNode(o,undefined,s))}}return r}}function asItemIndex(e){let t=o.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=YAMLSeq},7104:(e,t,s)=>{var n=s(7249);var i=s(452);var r=s(2148);var o=s(1127);var a=s(4043);function addPairToJSMap(e,t,{key:s,value:n}){if(o.isNode(s)&&s.addToJSMap)s.addToJSMap(e,t,n);else if(i.isMergeKey(e,s))i.addMergeToJSMap(e,t,n);else{const i=a.toJS(s,"",e);if(t instanceof Map){t.set(i,a.toJS(n,i,e))}else if(t instanceof Set){t.add(i)}else{const r=stringifyKey(s,i,e);const o=a.toJS(n,r,e);if(r in t)Object.defineProperty(t,r,{value:o,writable:true,enumerable:true,configurable:true});else t[r]=o}}return t}function stringifyKey(e,t,s){if(t===null)return"";if(typeof t!=="object")return String(t);if(o.isNode(e)&&s?.doc){const t=r.createStringifyContext(s.doc,{});t.anchors=new Set;for(const e of s.anchors.keys())t.anchors.add(e.anchor);t.inFlow=true;t.inStringifyKey=true;const i=e.toString(t);if(!s.mapKeyWarned){let e=JSON.stringify(i);if(e.length>40)e=e.substring(0,36)+'..."';n.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`);s.mapKeyWarned=true}return i}return JSON.stringify(t)}t.addPairToJSMap=addPairToJSMap},1127:(e,t)=>{const s=Symbol.for("yaml.alias");const n=Symbol.for("yaml.document");const i=Symbol.for("yaml.map");const r=Symbol.for("yaml.pair");const o=Symbol.for("yaml.scalar");const a=Symbol.for("yaml.seq");const l=Symbol.for("yaml.node.type");const isAlias=e=>!!e&&typeof e==="object"&&e[l]===s;const isDocument=e=>!!e&&typeof e==="object"&&e[l]===n;const isMap=e=>!!e&&typeof e==="object"&&e[l]===i;const isPair=e=>!!e&&typeof e==="object"&&e[l]===r;const isScalar=e=>!!e&&typeof e==="object"&&e[l]===o;const isSeq=e=>!!e&&typeof e==="object"&&e[l]===a;function isCollection(e){if(e&&typeof e==="object")switch(e[l]){case i:case a:return true}return false}function isNode(e){if(e&&typeof e==="object")switch(e[l]){case s:case i:case o:case a:return true}return false}const hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor;t.ALIAS=s;t.DOC=n;t.MAP=i;t.NODE_TYPE=l;t.PAIR=r;t.SCALAR=o;t.SEQ=a;t.hasAnchor=hasAnchor;t.isAlias=isAlias;t.isCollection=isCollection;t.isDocument=isDocument;t.isMap=isMap;t.isNode=isNode;t.isPair=isPair;t.isScalar=isScalar;t.isSeq=isSeq},4043:(e,t,s)=>{var n=s(1127);function toJS(e,t,s){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),s)));if(e&&typeof e.toJSON==="function"){if(!s||!n.hasAnchor(e))return e.toJSON(t,s);const i={aliasCount:0,count:1,res:undefined};s.anchors.set(e,i);s.onCreate=e=>{i.res=e;delete s.onCreate};const r=e.toJSON(t,s);if(s.onCreate)s.onCreate(r);return r}if(typeof e==="bigint"&&!s?.keep)return Number(e);return e}t.toJS=toJS},110:(e,t,s)=>{var n=s(8913);var i=s(6842);var r=s(1464);var o=s(3069);function resolveAsScalar(e,t=true,s){if(e){const _onError=(e,t,n)=>{const i=typeof e==="number"?e:Array.isArray(e)?e[0]:e.offset;if(s)s(i,t,n);else throw new r.YAMLParseError([i,i+1],t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(e,t,_onError);case"block-scalar":return n.resolveBlockScalar({options:{strict:t}},e,_onError)}}return null}function createScalarToken(e,t){const{implicitKey:s=false,indent:n,inFlow:i=false,offset:r=-1,type:a="PLAIN"}=t;const l=o.stringifyString({type:a,value:e},{implicitKey:s,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:true,lineWidth:-1}});const c=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n");const t=l.substring(0,e);const s=l.substring(e+1)+"\n";const i=[{type:"block-scalar-header",offset:r,indent:n,source:t}];if(!addEndtoBlockProps(i,c))i.push({type:"newline",offset:-1,indent:n,source:"\n"});return{type:"block-scalar",offset:r,indent:n,props:i,source:s}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:c};default:return{type:"scalar",offset:r,indent:n,source:l,end:c}}}function setScalarValue(e,t,s={}){let{afterKey:n=false,implicitKey:i=false,inFlow:r=false,type:a}=s;let l="indent"in e?e.indent:null;if(n&&typeof l==="number")l+=2;if(!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=t.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=o.stringifyString({type:a,value:t},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:true,lineWidth:-1}});switch(c[0]){case"|":case">":setBlockScalarValue(e,c);break;case'"':setFlowScalarValue(e,c,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,c,"single-quoted-scalar");break;default:setFlowScalarValue(e,c,"scalar")}}function setBlockScalarValue(e,t){const s=t.indexOf("\n");const n=t.substring(0,s);const i=t.substring(s+1)+"\n";if(e.type==="block-scalar"){const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");t.source=n;e.source=i}else{const{offset:t}=e;const s="indent"in e?e.indent:-1;const r=[{type:"block-scalar-header",offset:t,indent:s,source:n}];if(!addEndtoBlockProps(r,"end"in e?e.end:undefined))r.push({type:"newline",offset:-1,indent:s,source:"\n"});for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:"block-scalar",indent:s,props:r,source:i})}}function addEndtoBlockProps(e,t){if(t)for(const s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":e.push(s);return true}return false}function setFlowScalarValue(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s;e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let i=t.length;if(e.props[0].type==="block-scalar-header")i-=e.props[0].source.length;for(const e of n)e.offset+=i;delete e.props;Object.assign(e,{type:s,source:t,end:n});break}case"block-map":case"block-seq":{const n=e.offset+t.length;const i={type:"newline",offset:n,indent:e.indent,source:"\n"};delete e.items;Object.assign(e,{type:s,source:t,end:[i]});break}default:{const n="indent"in e?e.indent:-1;const i="end"in e&&Array.isArray(e.end)?e.end.filter((e=>e.type==="space"||e.type==="comment"||e.type==="newline")):[];for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:s,indent:n,source:t,end:i})}}}t.createScalarToken=createScalarToken;t.resolveAsScalar=resolveAsScalar;t.setScalarValue=setScalarValue},1733:(e,t)=>{const stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e);function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const s of e.props)t+=stringifyToken(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(const s of e.items)t+=stringifyItem(s);return t}case"flow-collection":{let t=e.start.source;for(const s of e.items)t+=stringifyItem(s);for(const s of e.end)t+=s.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const s of e.end)t+=s.source;return t}}}function stringifyItem({start:e,key:t,sep:s,value:n}){let i="";for(const t of e)i+=t.source;if(t)i+=stringifyToken(t);if(s)for(const e of s)i+=e.source;if(n)i+=stringifyToken(n);return i}t.stringify=stringify},7715:(e,t)=>{const s=Symbol("break visit");const n=Symbol("skip children");const i=Symbol("remove item");function visit(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};_visit(Object.freeze([]),e,t)}visit.BREAK=s;visit.SKIP=n;visit.REMOVE=i;visit.itemAtPath=(e,t)=>{let s=e;for(const[e,n]of t){const t=s?.[e];if(t&&"items"in t){s=t.items[n]}else return undefined}return s};visit.parentCollection=(e,t)=>{const s=visit.itemAtPath(e,t.slice(0,-1));const n=t[t.length-1][0];const i=s?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function _visit(e,t,n){let r=n(t,e);if(typeof r==="symbol")return r;for(const o of["key","value"]){const a=t[o];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const r=_visit(Object.freeze(e.concat([[o,t]])),a.items[t],n);if(typeof r==="number")t=r-1;else if(r===s)return s;else if(r===i){a.items.splice(t,1);t-=1}}if(typeof r==="function"&&o==="key")r=r(t,e)}}return typeof r==="function"?r(t,e):r}t.visit=visit},3461:(e,t,s)=>{var n=s(110);var i=s(1733);var r=s(7715);const o="\ufeff";const a="";const l="";const c="";const isCollection=e=>!!e&&"items"in e;const isScalar=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function prettyToken(e){switch(e){case o:return"<BOM>";case a:return"<DOC>";case l:return"<FLOW_END>";case c:return"<SCALAR>";default:return JSON.stringify(e)}}function tokenType(e){switch(e){case o:return"byte-order-mark";case a:return"doc-mode";case l:return"flow-error-end";case c: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"\t":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}t.createScalarToken=n.createScalarToken;t.resolveAsScalar=n.resolveAsScalar;t.setScalarValue=n.setScalarValue;t.stringify=i.stringify;t.visit=r.visit;t.BOM=o;t.DOCUMENT=a;t.FLOW_END=l;t.SCALAR=c;t.isCollection=isCollection;t.isScalar=isScalar;t.prettyToken=prettyToken;t.tokenType=tokenType},361:(e,t,s)=>{var n=s(3461);function isEmpty(e){switch(e){case undefined:case" ":case"\n":case"\r":case"\t":return true;default:return false}}const i=new Set("0123456789ABCDEFabcdef");const r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");const o=new Set(",[]{}");const a=new Set(" ,[]{}\n\r\t");const isNotAnchorChar=e=>!e||a.has(e);class Lexer{constructor(){this.atEnd=false;this.blockScalarIndent=-1;this.blockScalarKeep=false;this.buffer="";this.flowKey=false;this.flowLevel=0;this.indentNext=0;this.indentValue=0;this.lineEndPos=null;this.next=null;this.pos=0}*lex(e,t=false){if(e){if(typeof e!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e;this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";while(s&&(t||this.hasChars(1)))s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos;let t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t==="\n")return true;if(t==="\r")return this.buffer[e+1]==="\n";return false}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;while(t===" ")t=this.buffer[++s+e];if(t==="\r"){const t=this.buffer[s+e+1];if(t==="\n"||!t&&!this.atEnd)return e+s+1}return t==="\n"||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){const t=this.buffer.substr(e,3);if((t==="---"||t==="...")&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos){e=this.buffer.indexOf("\n",this.pos);this.lineEndPos=e}if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){this.buffer=this.buffer.substring(this.pos);this.pos=0;this.lineEndPos=null;this.next=e;return 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(e===null)return this.setNext("stream");if(e[0]===n.BOM){yield*this.pushCount(1);e=e.substring(1)}if(e[0]==="%"){let t=e.length;let s=e.indexOf("#");while(s!==-1){const n=e[s-1];if(n===" "||n==="\t"){t=s-1;break}else{s=e.indexOf("#",s+1)}}while(true){const s=e[t-1];if(s===" "||s==="\t")t-=1;else break}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(true));yield*this.pushCount(e.length-n);this.pushNewline();return"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(true);yield*this.pushCount(e.length-t);yield*this.pushNewline();return"stream"}yield n.DOCUMENT;return yield*this.parseLineStart()}*parseLineStart(){const 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");const e=this.peek(3);if((e==="---"||e==="...")&&isEmpty(this.charAt(3))){yield*this.pushCount(3);this.indentValue=0;this.indentNext=0;return e==="---"?"doc":"stream"}}this.indentValue=yield*this.pushSpaces(false);if(this.indentNext>this.indentValue&&!isEmpty(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));this.indentNext=this.indentValue+1;this.indentValue+=e;return yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(true);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case undefined:yield*this.pushNewline();return yield*this.parseLineStart();case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel=1;return"flow";case"}":case"]":yield*this.pushCount(1);return"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":t+=(yield*this.parseBlockScalarHeader());t+=(yield*this.pushSpaces(true));yield*this.pushCount(e.length-t);yield*this.pushNewline();return yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t;let s=-1;do{e=yield*this.pushNewline();if(e>0){t=yield*this.pushSpaces(false);this.indentValue=s=t}else{t=0}t+=(yield*this.pushSpaces(true))}while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if(s!==-1&&s<this.indentNext&&i[0]!=="#"||s===0&&(i.startsWith("---")||i.startsWith("..."))&&isEmpty(i[3])){const e=s===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}");if(!e){this.flowLevel=0;yield n.FLOW_END;return yield*this.parseLineStart()}}let r=0;while(i[r]===","){r+=(yield*this.pushCount(1));r+=(yield*this.pushSpaces(true));this.flowKey=false}r+=(yield*this.pushIndicators());switch(i[r]){case undefined:return"flow";case"#":yield*this.pushCount(i.length-r);return"flow";case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel+=1;return"flow";case"}":case"]":yield*this.pushCount(1);this.flowKey=true;this.flowLevel-=1;return this.flowLevel?"flow":"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"flow";case'"':case"'":this.flowKey=true;return yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||isEmpty(e)||e===","){this.flowKey=false;yield*this.pushCount(1);yield*this.pushSpaces(true);return"flow"}}default:this.flowKey=false;return yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'"){while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2)}else{while(t!==-1){let e=0;while(this.buffer[t-1-e]==="\\")e+=1;if(e%2===0)break;t=this.buffer.indexOf('"',t+1)}}const s=this.buffer.substring(0,t);let n=s.indexOf("\n",this.pos);if(n!==-1){while(n!==-1){const e=this.continueScalar(n+1);if(e===-1)break;n=s.indexOf("\n",e)}if(n!==-1){t=n-(s[n-1]==="\r"?2:1)}}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}yield*this.pushToIndex(t+1,false);return this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1;this.blockScalarKeep=false;let e=this.pos;while(true){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=true;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((e=>isEmpty(e)||e==="#"))}*parseBlockScalar(){let e=this.pos-1;let t=0;let s;e:for(let n=this.pos;s=this.buffer[n];++n){switch(s){case" ":t+=1;break;case"\n":e=n;t=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if(e==="\n")break}default:break e}}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else{this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext)}do{const t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf("\n",t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;s=this.buffer[i];while(s===" ")s=this.buffer[++i];if(s==="\t"){while(s==="\t"||s===" "||s==="\r"||s==="\n")s=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep){do{let s=e-1;let n=this.buffer[s];if(n==="\r")n=this.buffer[--s];const i=s;while(n===" ")n=this.buffer[--s];if(n==="\n"&&s>=this.pos&&s+1+t>i)e=s;else break}while(true)}yield n.SCALAR;yield*this.pushToIndex(e+1,true);return yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1;let s=this.pos-1;let i;while(i=this.buffer[++s]){if(i===":"){const n=this.buffer[s+1];if(isEmpty(n)||e&&o.has(n))break;t=s}else if(isEmpty(i)){let n=this.buffer[s+1];if(i==="\r"){if(n==="\n"){s+=1;i="\n";n=this.buffer[s+1]}else t=s}if(n==="#"||e&&o.has(n))break;if(i==="\n"){const e=this.continueScalar(s+1);if(e===-1)break;s=Math.max(s,e-2)}}else{if(e&&o.has(i))break;t=s}}if(!i&&!this.atEnd)return this.setNext("plain-scalar");yield n.SCALAR;yield*this.pushToIndex(t+1,true);return e?"flow":"doc"}*pushCount(e){if(e>0){yield this.buffer.substr(this.pos,e);this.pos+=e;return e}return 0}*pushToIndex(e,t){const s=this.buffer.slice(this.pos,e);if(s){yield s;this.pos+=s.length;return s.length}else if(t)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0;const t=this.charAt(1);if(isEmpty(t)||e&&o.has(t)){if(!e)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=false;return(yield*this.pushCount(1))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2;let t=this.buffer[e];while(!isEmpty(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,false)}else{let e=this.pos+1;let t=this.buffer[e];while(t){if(r.has(t))t=this.buffer[++e];else if(t==="%"&&i.has(this.buffer[e+1])&&i.has(this.buffer[e+2])){t=this.buffer[e+=3]}else break}return yield*this.pushToIndex(e,false)}}*pushNewline(){const e=this.buffer[this.pos];if(e==="\n")return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1;let s;do{s=this.buffer[++t]}while(s===" "||e&&s==="\t");const n=t-this.pos;if(n>0){yield this.buffer.substr(this.pos,n);this.pos=t}return n}*pushUntil(e){let t=this.pos;let s=this.buffer[t];while(!e(s))s=this.buffer[++t];return yield*this.pushToIndex(t,false)}}t.Lexer=Lexer},6628:(e,t)=>{class LineCounter{constructor(){this.lineStarts=[];this.addNewLine=e=>this.lineStarts.push(e);this.linePos=e=>{let t=0;let s=this.lineStarts.length;while(t<s){const n=t+s>>1;if(this.lineStarts[n]<e)t=n+1;else s=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}t.LineCounter=LineCounter},3456:(e,t,s)=>{var n=s(1708);var i=s(3461);var r=s(361);function includesToken(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return true;return false}function findNonEmptyIndex(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 isFlowToken(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return true;default:return false}}function getPrevProps(e){switch(e.type){case"document":return e.start;case"block-map":{const 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 getFirstKeyStartProps(e){if(e.length===0)return[];let t=e.length;e:while(--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}}while(e[++t]?.type==="space"){}return e.splice(t,e.length)}function fixFlowSeqItems(e){if(e.start.type==="flow-seq-start"){for(const t of e.items){if(t.sep&&!t.value&&!includesToken(t.start,"explicit-key-ind")&&!includesToken(t.sep,"map-value-ind")){if(t.key)t.value=t.key;delete t.key;if(isFlowToken(t.value)){if(t.value.end)Array.prototype.push.apply(t.value.end,t.sep);else t.value.end=t.sep}else Array.prototype.push.apply(t.start,t.sep);delete t.sep}}}}class Parser{constructor(e){this.atNewLine=true;this.atScalar=false;this.indent=0;this.offset=0;this.onKeyLine=false;this.stack=[];this.source="";this.type="";this.lexer=new r.Lexer;this.onNewLine=e}*parse(e,t=false){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);if(!t)yield*this.end()}*next(e){this.source=e;if(n.env.LOG_TOKENS)console.log("|",i.prettyToken(e));if(this.atScalar){this.atScalar=false;yield*this.step();this.offset+=e.length;return}const t=i.tokenType(e);if(!t){const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e});this.offset+=e.length}else if(t==="scalar"){this.atNewLine=false;this.atScalar=true;this.type="scalar"}else{this.type=t;yield*this.step();switch(t){case"newline":this.atNewLine=true;this.indent=0;if(this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=false}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){const e={type:this.type,offset:this.offset,indent:this.indent,source:this.source};return e}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){while(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){const t=e??this.stack.pop();if(!t){const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}else if(this.stack.length===0){yield t}else{const e=this.peek(1);if(t.type==="block-scalar"){t.indent="indent"in e?e.indent:0}else if(t.type==="flow-collection"&&e.type==="document"){t.indent=0}if(t.type==="flow-collection")fixFlowSeqItems(t);switch(e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const s=e.items[e.items.length-1];if(s.value){e.items.push({start:[],key:t,sep:[]});this.onKeyLine=true;return}else if(s.sep){s.value=t}else{Object.assign(s,{key:t,sep:[]});this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=e.items[e.items.length-1];if(s.value)e.items.push({start:[],value:t});else s.value=t;break}case"flow-collection":{const s=e.items[e.items.length-1];if(!s||s.value)e.items.push({start:[],key:t,sep:[]});else if(s.sep)s.value=t;else Object.assign(s,{key:t,sep:[]});return}default:yield*this.pop();yield*this.pop(t)}if((e.type==="document"||e.type==="block-map"||e.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const s=t.items[t.items.length-1];if(s&&!s.sep&&!s.value&&s.start.length>0&&findNonEmptyIndex(s.start)===-1&&(t.indent===0||s.start.every((e=>e.type!=="comment"||e.indent<t.indent)))){if(e.type==="document")e.end=s.start;else e.items.push({start:s.start});t.items.splice(-1,1)}}}}*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":{const e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")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":{if(findNonEmptyIndex(e.start)!==-1){yield*this.pop();yield*this.step()}else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);if(t)this.stack.push(t);else{yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}}*scalar(e){if(this.type==="map-value-ind"){const t=getPrevProps(this.peek(2));const s=getFirstKeyStartProps(t);let n;if(e.end){n=e.end;n.push(this.sourceToken);delete e.end}else n=[this.sourceToken];const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:n}]};this.onKeyLine=true;this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":e.source=this.source;this.atNewLine=true;this.indent=0;if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){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){const t=e.items[e.items.length-1];switch(this.type){case"newline":this.onKeyLine=false;if(t.value){const s="end"in t.value?t.value.end:undefined;const n=Array.isArray(s)?s[s.length-1]:undefined;if(n?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep){t.sep.push(this.sourceToken)}else{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)){const s=e.items[e.items.length-2];const n=s?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start);n.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent;const n=s&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let i=[];if(n&&t.sep&&!t.value){const s=[];for(let n=0;n<t.sep.length;++n){const i=t.sep[n];switch(i.type){case"newline":s.push(n);break;case"space":break;case"comment":if(i.indent>e.indent)s.length=0;break;default:s.length=0}}if(s.length>=2)i=t.sep.splice(s[1])}switch(this.type){case"anchor":case"tag":if(n||t.value){i.push(this.sourceToken);e.items.push({start:i});this.onKeyLine=true}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey){t.start.push(this.sourceToken);t.explicitKey=true}else if(n||t.value){i.push(this.sourceToken);e.items.push({start:i,explicitKey:true})}else{this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:true}]})}this.onKeyLine=true;return;case"map-value-ind":if(t.explicitKey){if(!t.sep){if(includesToken(t.start,"newline")){Object.assign(t,{key:null,sep:[this.sourceToken]})}else{const e=getFirstKeyStartProps(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value){e.items.push({start:[],key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]})}else if(isFlowToken(t.key)&&!includesToken(t.sep,"newline")){const e=getFirstKeyStartProps(t.start);const s=t.key;const n=t.sep;n.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:s,sep:n}]})}else if(i.length>0){t.sep=t.sep.concat(i,this.sourceToken)}else{t.sep.push(this.sourceToken)}}else{if(!t.sep){Object.assign(t,{key:null,sep:[this.sourceToken]})}else if(t.value||n){e.items.push({start:i,key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]})}else{t.sep.push(this.sourceToken)}}this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);if(n||t.value){e.items.push({start:i,key:s,sep:[]});this.onKeyLine=true}else if(t.sep){this.stack.push(s)}else{Object.assign(t,{key:s,sep:[]});this.onKeyLine=true}return}default:{const t=this.startBlockValue(e);if(t){if(s&&t.type!=="block-seq"){e.items.push({start:i})}this.stack.push(t);return}}}}yield*this.pop();yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const s="end"in t.value?t.value.end:undefined;const n=Array.isArray(s)?s[s.length-1]:undefined;if(n?.type==="comment")s?.push(this.sourceToken);else 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)){const s=e.items[e.items.length-2];const n=s?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start);n.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;if(t.value||includesToken(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop();yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let e;do{yield*this.pop();e=this.peek(1)}while(e&&e.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:s,sep:[]});else if(t.sep)this.stack.push(s);else Object.assign(t,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);if(s)this.stack.push(s);else{yield*this.pop();yield*this.step()}}else{const t=this.peek(2);if(t.type==="block-map"&&(this.type==="map-value-ind"&&t.indent===e.indent||this.type==="newline"&&!t.items[t.items.length-1].sep)){yield*this.pop();yield*this.step()}else if(this.type==="map-value-ind"&&t.type!=="flow-collection"){const s=getPrevProps(t);const n=getFirstKeyStartProps(s);fixFlowSeqItems(e);const i=e.end.splice(1,e.end.length);i.push(this.sourceToken);const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=true;this.stack[this.stack.length-1]=r}else{yield*this.lineEnd(e)}}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){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=true;const t=getPrevProps(e);const s=getFirstKeyStartProps(t);s.push(this.sourceToken);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:true}]}}case"map-value-ind":{this.onKeyLine=true;const t=getPrevProps(e);const s=getFirstKeyStartProps(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return false;if(this.indent<=t)return false;return e.every((e=>e.type==="newline"||e.type==="space"))}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")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=false;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}t.Parser=Parser},4047:(e,t,s)=>{var n=s(9984);var i=s(3021);var r=s(1464);var o=s(7249);var a=s(1127);var l=s(6628);var c=s(3456);function parseOptions(e){const t=e.prettyErrors!==false;const s=e.lineCounter||t&&new l.LineCounter||null;return{lineCounter:s,prettyErrors:t}}function parseAllDocuments(e,t={}){const{lineCounter:s,prettyErrors:i}=parseOptions(t);const o=new c.Parser(s?.addNewLine);const a=new n.Composer(t);const l=Array.from(a.compose(o.parse(e)));if(i&&s)for(const t of l){t.errors.forEach(r.prettifyError(e,s));t.warnings.forEach(r.prettifyError(e,s))}if(l.length>0)return l;return Object.assign([],{empty:true},a.streamInfo())}function parseDocument(e,t={}){const{lineCounter:s,prettyErrors:i}=parseOptions(t);const o=new c.Parser(s?.addNewLine);const a=new n.Composer(t);let l=null;for(const t of a.compose(o.parse(e),true,e.length)){if(!l)l=t;else if(l.options.logLevel!=="silent"){l.errors.push(new r.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}if(i&&s){l.errors.forEach(r.prettifyError(e,s));l.warnings.forEach(r.prettifyError(e,s))}return l}function parse(e,t,s){let n=undefined;if(typeof t==="function"){n=t}else if(s===undefined&&t&&typeof t==="object"){s=t}const i=parseDocument(e,s);if(!i)return null;i.warnings.forEach((e=>o.warn(i.options.logLevel,e)));if(i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[]}return i.toJS(Object.assign({reviver:n},s))}function stringify(e,t,s){let n=null;if(typeof t==="function"||Array.isArray(t)){n=t}else if(s===undefined&&t){s=t}if(typeof s==="string")s=s.length;if(typeof s==="number"){const e=Math.round(s);s=e<1?undefined:e>8?{indent:8}:{indent:e}}if(e===undefined){const{keepUndefined:e}=s??t??{};if(!e)return undefined}if(a.isDocument(e)&&!n)return e.toString(s);return new i.Document(e,n,s).toString(s)}t.parse=parse;t.parseAllDocuments=parseAllDocuments;t.parseDocument=parseDocument;t.stringify=stringify},5840:(e,t,s)=>{var n=s(1127);var i=s(7451);var r=s(1706);var o=s(6464);var a=s(18);const sortMapEntriesByKey=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:l,schema:c,sortMapEntries:f,toStringDefaults:u}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null;this.name=typeof c==="string"&&c||"core";this.knownTags=l?a.coreKnownTags:{};this.tags=a.getTags(t,this.name,s);this.toStringOptions=u??null;Object.defineProperty(this,n.MAP,{value:i.map});Object.defineProperty(this,n.SCALAR,{value:o.string});Object.defineProperty(this,n.SEQ,{value:r.seq});this.sortMapEntries=typeof f==="function"?f:f===true?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));e.tags=this.tags.slice();return e}}t.Schema=Schema},7451:(e,t,s)=>{var n=s(1127);var i=s(4454);const r={collection:"map",default:true,nodeClass:i.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!n.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,s)=>i.YAMLMap.from(e,t,s)};t.map=r},3632:(e,t,s)=>{var n=s(3301);const i={identify:e=>e==null,createNode:()=>new n.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new n.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&i.test.test(e)?e:t.options.nullStr};t.nullTag=i},1706:(e,t,s)=>{var n=s(1127);var i=s(2223);const r={collection:"seq",default:true,nodeClass:i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!n.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,s)=>i.YAMLSeq.from(e,t,s)};t.seq=r},6464:(e,t,s)=>{var n=s(3069);const i={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,s,i){t=Object.assign({actualString:true},t);return n.stringifyString(e,t,s,i)}};t.string=i},3959:(e,t,s)=>{var n=s(3301);const i={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new n.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},s){if(e&&i.test.test(e)){const s=e[0]==="t"||e[0]==="T";if(t===s)return e}return t?s.options.trueStr:s.options.falseStr}};t.boolTag=i},8405:(e,t,s)=>{var n=s(3301);var i=s(8689);const r={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber};const o={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new n.Scalar(parseFloat(e));const s=e.indexOf(".");if(s!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-s-1;return t},stringify:i.stringifyNumber};t.float=a;t.floatExp=o;t.floatNaN=r},9874:(e,t,s)=>{var n=s(8689);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);const intResolve=(e,t,s,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),s);function intStringify(e,t,s){const{value:i}=e;if(intIdentify(i)&&i>=0)return s+i.toString(t);return n.stringifyNumber(e)}const i={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>intResolve(e,2,8,s),stringify:e=>intStringify(e,8,"0o")};const r={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>intResolve(e,0,10,s),stringify:n.stringifyNumber};const o={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>intResolve(e,2,16,s),stringify:e=>intStringify(e,16,"0x")};t.int=r;t.intHex=o;t.intOct=i},896:(e,t,s)=>{var n=s(7451);var i=s(3632);var r=s(1706);var o=s(6464);var a=s(3959);var l=s(8405);var c=s(9874);const f=[n.map,r.seq,o.string,i.nullTag,a.boolTag,c.intOct,c.int,c.intHex,l.floatNaN,l.floatExp,l.float];t.schema=f},3559:(e,t,s)=>{var n=s(3301);var i=s(7451);var r=s(1706);function intIdentify(e){return typeof e==="bigint"||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e);const o=[{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>e==null,createNode:()=>new n.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:stringifyJSON},{identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}];const a={default:true,tag:"",test:/^/,resolve(e,t){t(`Unresolved plain scalar ${JSON.stringify(e)}`);return e}};const l=[i.map,r.seq].concat(o,a);t.schema=l},18:(e,t,s)=>{var n=s(7451);var i=s(3632);var r=s(1706);var o=s(6464);var a=s(3959);var l=s(8405);var c=s(9874);var f=s(896);var u=s(3559);var d=s(6083);var h=s(452);var p=s(303);var m=s(8385);var y=s(5913);var g=s(1528);var v=s(6752);const b=new Map([["core",f.schema],["failsafe",[n.map,r.seq,o.string]],["json",u.schema],["yaml11",y.schema],["yaml-1.1",y.schema]]);const S={binary:d.binary,bool:a.boolTag,float:l.float,floatExp:l.floatExp,floatNaN:l.floatNaN,floatTime:v.floatTime,int:c.int,intHex:c.intHex,intOct:c.intOct,intTime:v.intTime,map:n.map,merge:h.merge,null:i.nullTag,omap:p.omap,pairs:m.pairs,seq:r.seq,set:g.set,timestamp:v.timestamp};const w={"tag:yaml.org,2002:binary":d.binary,"tag:yaml.org,2002:merge":h.merge,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":m.pairs,"tag:yaml.org,2002:set":g.set,"tag:yaml.org,2002:timestamp":v.timestamp};function getTags(e,t,s){const n=b.get(t);if(n&&!e){return s&&!n.includes(h.merge)?n.concat(h.merge):n.slice()}let i=n;if(!i){if(Array.isArray(e))i=[];else{const e=Array.from(b.keys()).filter((e=>e!=="yaml11")).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e)){for(const t of e)i=i.concat(t)}else if(typeof e==="function"){i=e(i.slice())}if(s)i=i.concat(h.merge);return i.reduce(((e,t)=>{const s=typeof t==="string"?S[t]:t;if(!s){const e=JSON.stringify(t);const s=Object.keys(S).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${s}`)}if(!e.includes(s))e.push(s);return e}),[])}t.coreKnownTags=w;t.getTags=getTags},6083:(e,t,s)=>{var n=s(4573);var i=s(3301);var r=s(3069);const o={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof n.Buffer==="function"){return n.Buffer.from(e,"base64")}else if(typeof atob==="function"){const t=atob(e.replace(/[\n\r]/g,""));const s=new Uint8Array(t.length);for(let e=0;e<t.length;++e)s[e]=t.charCodeAt(e);return s}else{t("This environment does not support reading binary tags; either Buffer or atob is required");return e}},stringify({comment:e,type:t,value:s},o,a,l){const c=s;let f;if(typeof n.Buffer==="function"){f=c instanceof n.Buffer?c.toString("base64"):n.Buffer.from(c.buffer).toString("base64")}else if(typeof btoa==="function"){let e="";for(let t=0;t<c.length;++t)e+=String.fromCharCode(c[t]);f=btoa(e)}else{throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required")}if(!t)t=i.Scalar.BLOCK_LITERAL;if(t!==i.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth);const s=Math.ceil(f.length/e);const n=new Array(s);for(let t=0,i=0;t<s;++t,i+=e){n[t]=f.substr(i,e)}f=n.join(t===i.Scalar.BLOCK_LITERAL?"\n":" ")}return r.stringifyString({comment:e,type:t,value:f},o,a,l)}};t.binary=o},8398:(e,t,s)=>{var n=s(3301);function boolStringify({value:e,source:t},s){const n=e?i:r;if(t&&n.test.test(t))return t;return e?s.options.trueStr:s.options.falseStr}const i={identify:e=>e===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new n.Scalar(true),stringify:boolStringify};const r={identify:e=>e===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new n.Scalar(false),stringify:boolStringify};t.falseTag=r;t.trueTag=i},5782:(e,t,s)=>{var n=s(3301);var i=s(8689);const r={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber};const o={identify:e=>typeof e==="number",default:true,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){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new n.Scalar(parseFloat(e.replace(/_/g,"")));const s=e.indexOf(".");if(s!==-1){const n=e.substring(s+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:i.stringifyNumber};t.float=a;t.floatExp=o;t.floatNaN=r},873:(e,t,s)=>{var n=s(8689);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve(e,t,s,{intAsBigInt:n}){const i=e[0];if(i==="-"||i==="+")t+=1;e=e.substring(t).replace(/_/g,"");if(n){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const t=BigInt(e);return i==="-"?BigInt(-1)*t:t}const r=parseInt(e,s);return i==="-"?-1*r:r}function intStringify(e,t,s){const{value:i}=e;if(intIdentify(i)){const e=i.toString(t);return i<0?"-"+s+e.substr(1):s+e}return n.stringifyNumber(e)}const i={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>intResolve(e,2,2,s),stringify:e=>intStringify(e,2,"0b")};const r={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>intResolve(e,1,8,s),stringify:e=>intStringify(e,8,"0")};const o={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>intResolve(e,0,10,s),stringify:n.stringifyNumber};const a={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>intResolve(e,2,16,s),stringify:e=>intStringify(e,16,"0x")};t.int=o;t.intBin=i;t.intHex=a;t.intOct=r},452:(e,t,s)=>{var n=s(1127);var i=s(3301);const r="<<";const o={identify:e=>e===r||typeof e==="symbol"&&e.description===r,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new i.Scalar(Symbol(r)),{addToJSMap:addMergeToJSMap}),stringify:()=>r};const isMergeKey=(e,t)=>(o.identify(t)||n.isScalar(t)&&(!t.type||t.type===i.Scalar.PLAIN)&&o.identify(t.value))&&e?.doc.schema.tags.some((e=>e.tag===o.tag&&e.default));function addMergeToJSMap(e,t,s){s=e&&n.isAlias(s)?s.resolve(e.doc):s;if(n.isSeq(s))for(const n of s.items)mergeValue(e,t,n);else if(Array.isArray(s))for(const n of s)mergeValue(e,t,n);else mergeValue(e,t,s)}function mergeValue(e,t,s){const i=e&&n.isAlias(s)?s.resolve(e.doc):s;if(!n.isMap(i))throw new Error("Merge sources must be maps or map aliases");const r=i.toJSON(null,e,Map);for(const[e,s]of r){if(t instanceof Map){if(!t.has(e))t.set(e,s)}else if(t instanceof Set){t.add(e)}else if(!Object.prototype.hasOwnProperty.call(t,e)){Object.defineProperty(t,e,{value:s,writable:true,enumerable:true,configurable:true})}}return t}t.addMergeToJSMap=addMergeToJSMap;t.isMergeKey=isMergeKey;t.merge=o},303:(e,t,s)=>{var n=s(1127);var i=s(4043);var r=s(4454);var o=s(2223);var a=s(8385);class YAMLOMap extends o.YAMLSeq{constructor(){super();this.add=r.YAMLMap.prototype.add.bind(this);this.delete=r.YAMLMap.prototype.delete.bind(this);this.get=r.YAMLMap.prototype.get.bind(this);this.has=r.YAMLMap.prototype.has.bind(this);this.set=r.YAMLMap.prototype.set.bind(this);this.tag=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;if(t?.onCreate)t.onCreate(s);for(const e of this.items){let r,o;if(n.isPair(e)){r=i.toJS(e.key,"",t);o=i.toJS(e.value,r,t)}else{r=i.toJS(e,"",t)}if(s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}static from(e,t,s){const n=a.createPairs(e,t,s);const i=new this;i.items=n.items;return i}}YAMLOMap.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve(e,t){const s=a.resolvePairs(e,t);const i=[];for(const{key:e}of s.items){if(n.isScalar(e)){if(i.includes(e.value)){t(`Ordered maps must not include duplicate keys: ${e.value}`)}else{i.push(e.value)}}}return Object.assign(new YAMLOMap,s)},createNode:(e,t,s)=>YAMLOMap.from(e,t,s)};t.YAMLOMap=YAMLOMap;t.omap=l},8385:(e,t,s)=>{var n=s(1127);var i=s(7165);var r=s(3301);var o=s(2223);function resolvePairs(e,t){if(n.isSeq(e)){for(let s=0;s<e.items.length;++s){let o=e.items[s];if(n.isPair(o))continue;else if(n.isMap(o)){if(o.items.length>1)t("Each pair must have its own sequence indicator");const e=o.items[0]||new i.Pair(new r.Scalar(null));if(o.commentBefore)e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore;if(o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[s]=n.isPair(o)?o:new i.Pair(o)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,s){const{replacer:n}=s;const r=new o.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof n==="function")e=n.call(t,String(a++),e);let o,l;if(Array.isArray(e)){if(e.length===2){o=e[0];l=e[1]}else throw new TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){const t=Object.keys(e);if(t.length===1){o=t[0];l=e[o]}else{throw new TypeError(`Expected tuple with one key, not ${t.length} keys`)}}else{o=e}r.items.push(i.createPair(o,l,s))}return r}const a={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs;t.pairs=a;t.resolvePairs=resolvePairs},5913:(e,t,s)=>{var n=s(7451);var i=s(3632);var r=s(1706);var o=s(6464);var a=s(6083);var l=s(8398);var c=s(5782);var f=s(873);var u=s(452);var d=s(303);var h=s(8385);var p=s(1528);var m=s(6752);const y=[n.map,r.seq,o.string,i.nullTag,l.trueTag,l.falseTag,f.intBin,f.intOct,f.int,f.intHex,c.floatNaN,c.floatExp,c.float,a.binary,u.merge,d.omap,h.pairs,p.set,m.intTime,m.floatTime,m.timestamp];t.schema=y},1528:(e,t,s)=>{var n=s(1127);var i=s(7165);var r=s(4454);class YAMLSet extends r.YAMLMap{constructor(e){super(e);this.tag=YAMLSet.tag}add(e){let t;if(n.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new i.Pair(e.key,null);else t=new i.Pair(e,null);const s=r.findPair(this.items,t.key);if(!s)this.items.push(t)}get(e,t){const s=r.findPair(this.items,e);return!t&&n.isPair(s)?n.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const s=r.findPair(this.items,e);if(s&&!t){this.items.splice(this.items.indexOf(s),1)}else if(!s&&t){this.items.push(new i.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},e,{allNullValues:true}),t,s);else throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:n}=s;const r=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof n==="function")e=n.call(t,e,e);r.items.push(i.createPair(e,null,s))}return r}}YAMLSet.tag="tag:yaml.org,2002:set";const o={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>YAMLSet.from(e,t,s),resolve(e,t){if(n.isMap(e)){if(e.hasAllNullValues(true))return Object.assign(new YAMLSet,e);else t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=YAMLSet;t.set=o},6752:(e,t,s)=>{var n=s(8689);function parseSexagesimal(e,t){const s=e[0];const n=s==="-"||s==="+"?e.substring(1):e;const num=e=>t?BigInt(e):Number(e);const i=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return s==="-"?num(-1)*i:i}function stringifySexagesimal(e){let{value:t}=e;let num=e=>e;if(typeof t==="bigint")num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return n.stringifyNumber(e);let s="";if(t<0){s="-";t*=num(-1)}const i=num(60);const r=[t%i];if(t<60){r.unshift(0)}else{t=(t-r[0])/i;r.unshift(t%i);if(t>=60){t=(t-r[0])/i;r.unshift(t)}}return s+r.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const i={identify:e=>typeof e==="bigint"||Number.isInteger(e),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>parseSexagesimal(e,s),stringify:stringifySexagesimal};const r={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,false),stringify:stringifySexagesimal};const o={identify:e=>e instanceof Date,default:true,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){const t=e.match(o.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,n,i,r,a,l]=t.map(Number);const c=t[7]?Number((t[7]+"00").substr(1,3)):0;let f=Date.UTC(s,n-1,i,r||0,a||0,l||0,c);const u=t[8];if(u&&u!=="Z"){let e=parseSexagesimal(u,false);if(Math.abs(e)<30)e*=60;f-=6e4*e}return new Date(f)},stringify:({value:e})=>e.toISOString().replace(/(T00:00:00)?\.000Z$/,"")};t.floatTime=r;t.intTime=i;t.timestamp=o},4475:(e,t)=>{const s="flow";const n="block";const i="quoted";function foldFlowLines(e,t,s="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:a=20,onFold:l,onOverflow:c}={}){if(!o||o<0)return e;if(o<a)a=0;const f=Math.max(1+a,1+o-t.length);if(e.length<=f)return e;const u=[];const d={};let h=o-t.length;if(typeof r==="number"){if(r>o-Math.max(2,a))u.push(0);else h=o-r}let p=undefined;let m=undefined;let y=false;let g=-1;let v=-1;let b=-1;if(s===n){g=consumeMoreIndentedLines(e,g,t.length);if(g!==-1)h=g+f}for(let r;r=e[g+=1];){if(s===i&&r==="\\"){v=g;switch(e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if(r==="\n"){if(s===n)g=consumeMoreIndentedLines(e,g,t.length);h=g+t.length+f;p=undefined}else{if(r===" "&&m&&m!==" "&&m!=="\n"&&m!=="\t"){const t=e[g+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")p=g}if(g>=h){if(p){u.push(p);h=p+f;p=undefined}else if(s===i){while(m===" "||m==="\t"){m=r;r=e[g+=1];y=true}const t=g>b+1?g-2:v-1;if(d[t])return e;u.push(t);d[t]=true;h=t+f;p=undefined}else{y=true}}}m=r}if(y&&c)c();if(u.length===0)return e;if(l)l();let S=e.slice(0,u[0]);for(let n=0;n<u.length;++n){const r=u[n];const o=u[n+1]||e.length;if(r===0)S=`\n${t}${e.slice(0,o)}`;else{if(s===i&&d[r])S+=`${e[r]}\\`;S+=`\n${t}${e.slice(r+1,o)}`}}return S}function consumeMoreIndentedLines(e,t,s){let n=t;let i=t+1;let r=e[i];while(r===" "||r==="\t"){if(t<i+s){r=e[++t]}else{do{r=e[++t]}while(r&&r!=="\n");n=t;i=t+1;r=e[i]}}return n}t.FOLD_BLOCK=n;t.FOLD_FLOW=s;t.FOLD_QUOTED=i;t.foldFlowLines=foldFlowLines},2148:(e,t,s)=>{var n=s(1596);var i=s(1127);var r=s(9799);var o=s(3069);function createStringifyContext(e,t){const s=Object.assign({blockQuote:true,commentString:r.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trueStr:"true",verifyAliasOrder:true},e.schema.toStringOptions,t);let n;switch(s.collectionStyle){case"block":n=false;break;case"flow":n=true;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent==="number"?" ".repeat(s.indent):" ",inFlow:n,options:s}}function getTagObject(e,t){if(t.tag){const s=e.filter((e=>e.tag===t.tag));if(s.length>0)return s.find((e=>e.format===t.format))??s[0]}let s=undefined;let n;if(i.isScalar(t)){n=t.value;let i=e.filter((e=>e.identify?.(n)));if(i.length>1){const e=i.filter((e=>e.test));if(e.length>0)i=e}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){const e=n?.constructor?.name??typeof n;throw new Error(`Tag not resolved for ${e} value`)}return s}function stringifyProps(e,t,{anchors:s,doc:r}){if(!r.directives)return"";const o=[];const a=(i.isScalar(e)||i.isCollection(e))&&e.anchor;if(a&&n.anchorIsValid(a)){s.add(a);o.push(`&${a}`)}const l=e.tag?e.tag:t.default?null:t.tag;if(l)o.push(r.directives.tagString(l));return o.join(" ")}function stringify(e,t,s,n){if(i.isPair(e))return e.toString(t,s,n);if(i.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e)){throw new TypeError(`Cannot stringify circular structure without alias nodes`)}else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let r=undefined;const a=i.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>r=e});if(!r)r=getTagObject(t.doc.schema.tags,a);const l=stringifyProps(a,r,t);if(l.length>0)t.indentAtStart=(t.indentAtStart??0)+l.length+1;const c=typeof r.stringify==="function"?r.stringify(a,t,s,n):i.isScalar(a)?o.stringifyString(a,t,s,n):a.toString(t,s,n);if(!l)return c;return i.isScalar(a)||c[0]==="{"||c[0]==="["?`${l} ${c}`:`${l}\n${t.indent}${c}`}t.createStringifyContext=createStringifyContext;t.stringify=stringify},1212:(e,t,s)=>{var n=s(1127);var i=s(2148);var r=s(9799);function stringifyCollection(e,t,s){const n=t.inFlow??e.flow;const i=n?stringifyFlowCollection:stringifyBlockCollection;return i(e,t,s)}function stringifyBlockCollection({comment:e,items:t},s,{blockItemPrefix:o,flowChars:a,itemIndent:l,onChompKeep:c,onComment:f}){const{indent:u,options:{commentString:d}}=s;const h=Object.assign({},s,{indent:l,type:null});let p=false;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let c=null;if(n.isNode(a)){if(!p&&a.spaceBefore)m.push("");addCommentBefore(s,m,a.commentBefore,p);if(a.comment)c=a.comment}else if(n.isPair(a)){const e=n.isNode(a.key)?a.key:null;if(e){if(!p&&e.spaceBefore)m.push("");addCommentBefore(s,m,e.commentBefore,p)}}p=false;let f=i.stringify(a,h,(()=>c=null),(()=>p=true));if(c)f+=r.lineComment(f,l,d(c));if(p&&c)p=false;m.push(o+f)}let y;if(m.length===0){y=a.start+a.end}else{y=m[0];for(let e=1;e<m.length;++e){const t=m[e];y+=t?`\n${u}${t}`:"\n"}}if(e){y+="\n"+r.indentComment(d(e),u);if(f)f()}else if(p&&c)c();return y}function stringifyFlowCollection({items:e},t,{flowChars:s,itemIndent:o}){const{indent:a,indentStep:l,flowCollectionPadding:c,options:{commentString:f}}=t;o+=l;const u=Object.assign({},t,{indent:o,inFlow:true,type:null});let d=false;let h=0;const p=[];for(let s=0;s<e.length;++s){const a=e[s];let l=null;if(n.isNode(a)){if(a.spaceBefore)p.push("");addCommentBefore(t,p,a.commentBefore,false);if(a.comment)l=a.comment}else if(n.isPair(a)){const e=n.isNode(a.key)?a.key:null;if(e){if(e.spaceBefore)p.push("");addCommentBefore(t,p,e.commentBefore,false);if(e.comment)d=true}const s=n.isNode(a.value)?a.value:null;if(s){if(s.comment)l=s.comment;if(s.commentBefore)d=true}else if(a.value==null&&e?.comment){l=e.comment}}if(l)d=true;let c=i.stringify(a,u,(()=>l=null));if(s<e.length-1)c+=",";if(l)c+=r.lineComment(c,o,f(l));if(!d&&(p.length>h||c.includes("\n")))d=true;p.push(c);h=p.length}const{start:m,end:y}=s;if(p.length===0){return m+y}else{if(!d){const e=p.reduce(((e,t)=>e+t.length+2),2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(d){let e=m;for(const t of p)e+=t?`\n${l}${a}${t}`:"\n";return`${e}\n${a}${y}`}else{return`${m}${c}${p.join(" ")}${c}${y}`}}}function addCommentBefore({indent:e,options:{commentString:t}},s,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){const i=r.indentComment(t(n),e);s.push(i.trimStart())}}t.stringifyCollection=stringifyCollection},9799:(e,t)=>{const stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}const lineComment=(e,t,s)=>e.endsWith("\n")?indentComment(s,t):s.includes("\n")?"\n"+indentComment(s,t):(e.endsWith(" ")?"":" ")+s;t.indentComment=indentComment;t.lineComment=lineComment;t.stringifyComment=stringifyComment},6829:(e,t,s)=>{var n=s(1127);var i=s(2148);var r=s(9799);function stringifyDocument(e,t){const s=[];let o=t.directives===true;if(t.directives!==false&&e.directives){const t=e.directives.toString(e);if(t){s.push(t);o=true}else if(e.directives.docStart)o=true}if(o)s.push("---");const a=i.createStringifyContext(e,t);const{commentString:l}=a.options;if(e.commentBefore){if(s.length!==1)s.unshift("");const t=l(e.commentBefore);s.unshift(r.indentComment(t,""))}let c=false;let f=null;if(e.contents){if(n.isNode(e.contents)){if(e.contents.spaceBefore&&o)s.push("");if(e.contents.commentBefore){const t=l(e.contents.commentBefore);s.push(r.indentComment(t,""))}a.forceBlockIndent=!!e.comment;f=e.contents.comment}const t=f?undefined:()=>c=true;let u=i.stringify(e.contents,a,(()=>f=null),t);if(f)u+=r.lineComment(u,"",l(f));if((u[0]==="|"||u[0]===">")&&s[s.length-1]==="---"){s[s.length-1]=`--- ${u}`}else s.push(u)}else{s.push(i.stringify(e.contents,a))}if(e.directives?.docEnd){if(e.comment){const t=l(e.comment);if(t.includes("\n")){s.push("...");s.push(r.indentComment(t,""))}else{s.push(`... ${t}`)}}else{s.push("...")}}else{let t=e.comment;if(t&&c)t=t.replace(/^\n+/,"");if(t){if((!c||f)&&s[s.length-1]!=="")s.push("");s.push(r.indentComment(l(t),""))}}return s.join("\n")+"\n"}t.stringifyDocument=stringifyDocument},8689:(e,t)=>{function stringifyNumber({format:e,minFractionDigits:t,tag:s,value:n}){if(typeof n==="bigint")return String(n);const i=typeof n==="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(n);if(!e&&t&&(!s||s==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let e=r.indexOf(".");if(e<0){e=r.length;r+="."}let s=t-(r.length-e-1);while(s-- >0)r+="0"}return r}t.stringifyNumber=stringifyNumber},9748:(e,t,s)=>{var n=s(1127);var i=s(3301);var r=s(2148);var o=s(9799);function stringifyPair({key:e,value:t},s,a,l){const{allNullValues:c,doc:f,indent:u,indentStep:d,options:{commentString:h,indentSeq:p,simpleKeys:m}}=s;let y=n.isNode(e)&&e.comment||null;if(m){if(y){throw new Error("With simple keys, key nodes cannot have comments")}if(n.isCollection(e)||!n.isNode(e)&&typeof e==="object"){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}let g=!m&&(!e||y&&t==null&&!s.inFlow||n.isCollection(e)||(n.isScalar(e)?e.type===i.Scalar.BLOCK_FOLDED||e.type===i.Scalar.BLOCK_LITERAL:typeof e==="object"));s=Object.assign({},s,{allNullValues:false,implicitKey:!g&&(m||!c),indent:u+d});let v=false;let b=false;let S=r.stringify(e,s,(()=>v=true),(()=>b=true));if(!g&&!s.inFlow&&S.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=true}if(s.inFlow){if(c||t==null){if(v&&a)a();return S===""?"?":g?`? ${S}`:S}}else if(c&&!m||t==null&&g){S=`? ${S}`;if(y&&!v){S+=o.lineComment(S,s.indent,h(y))}else if(b&&l)l();return S}if(v)y=null;if(g){if(y)S+=o.lineComment(S,s.indent,h(y));S=`? ${S}\n${u}:`}else{S=`${S}:`;if(y)S+=o.lineComment(S,s.indent,h(y))}let w,k,A;if(n.isNode(t)){w=!!t.spaceBefore;k=t.commentBefore;A=t.comment}else{w=false;k=null;A=null;if(t&&typeof t==="object")t=f.createNode(t)}s.implicitKey=false;if(!g&&!y&&n.isScalar(t))s.indentAtStart=S.length+1;b=false;if(!p&&d.length>=2&&!s.inFlow&&!g&&n.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor){s.indent=s.indent.substring(2)}let N=false;const E=r.stringify(t,s,(()=>N=true),(()=>b=true));let O=" ";if(y||w||k){O=w?"\n":"";if(k){const e=h(k);O+=`\n${o.indentComment(e,s.indent)}`}if(E===""&&!s.inFlow){if(O==="\n")O="\n\n"}else{O+=`\n${s.indent}`}}else if(!g&&n.isCollection(t)){const e=E[0];const n=E.indexOf("\n");const i=n!==-1;const r=s.inFlow??t.flow??t.items.length===0;if(i||!r){let t=false;if(i&&(e==="&"||e==="!")){let s=E.indexOf(" ");if(e==="&"&&s!==-1&&s<n&&E[s+1]==="!"){s=E.indexOf(" ",s+1)}if(s===-1||n<s)t=true}if(!t)O=`\n${s.indent}`}}else if(E===""||E[0]==="\n"){O=""}S+=O+E;if(s.inFlow){if(N&&a)a()}else if(A&&!N){S+=o.lineComment(S,s.indent,h(A))}else if(b&&l){l()}return S}t.stringifyPair=stringifyPair},3069:(e,t,s)=>{var n=s(3301);var i=s(4475);const getFoldOptions=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});const containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t,s){if(!t||t<0)return false;const n=t-s;const i=e.length;if(i<=n)return false;for(let t=0,s=0;t<i;++t){if(e[t]==="\n"){if(t-s>n)return true;s=t+1;if(i-s<=n)return false}}return true}function doubleQuotedString(e,t){const s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;const{implicitKey:n}=t;const r=t.options.doubleQuotedMinMultiLineLength;const o=t.indent||(containsDocumentMarker(e)?" ":"");let a="";let l=0;for(let e=0,t=s[e];t;t=s[++e]){if(t===" "&&s[e+1]==="\\"&&s[e+2]==="n"){a+=s.slice(l,e)+"\\ ";e+=1;l=e;t="\\"}if(t==="\\")switch(s[e+1]){case"u":{a+=s.slice(l,e);const t=s.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:if(t.substr(0,2)==="00")a+="\\x"+t.substr(2);else a+=s.substr(e,6)}e+=5;l=e+1}break;case"n":if(n||s[e+2]==='"'||s.length<r){e+=1}else{a+=s.slice(l,e)+"\n\n";while(s[e+2]==="\\"&&s[e+3]==="n"&&s[e+4]!=='"'){a+="\n";e+=2}a+=o;if(s[e+2]===" ")a+="\\";e+=1;l=e+1}break;default:e+=1}}a=l?a+s.slice(l):s;return n?a:i.foldFlowLines(a,o,i.FOLD_QUOTED,getFoldOptions(t,false))}function singleQuotedString(e,t){if(t.options.singleQuote===false||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return doubleQuotedString(e,t);const s=t.indent||(containsDocumentMarker(e)?" ":"");const n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${s}`)+"'";return t.implicitKey?n:i.foldFlowLines(n,s,i.FOLD_FLOW,getFoldOptions(t,false))}function quotedString(e,t){const{singleQuote:s}=t.options;let n;if(s===false)n=doubleQuotedString;else{const t=e.includes('"');const i=e.includes("'");if(t&&!i)n=singleQuotedString;else if(i&&!t)n=doubleQuotedString;else n=s?singleQuotedString:doubleQuotedString}return n(e,t)}let r;try{r=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{r=/\n+(?!\n|$)/g}function blockString({comment:e,type:t,value:s},o,a,l){const{blockQuote:c,commentString:f,lineWidth:u}=o.options;if(!c||/\n[\t ]+$/.test(s)||/^\s*$/.test(s)){return quotedString(s,o)}const d=o.indent||(o.forceBlockIndent||containsDocumentMarker(s)?" ":"");const h=c==="literal"?true:c==="folded"||t===n.Scalar.BLOCK_FOLDED?false:t===n.Scalar.BLOCK_LITERAL?true:!lineLengthOverLimit(s,u,d.length);if(!s)return h?"|\n":">\n";let p;let m;for(m=s.length;m>0;--m){const e=s[m-1];if(e!=="\n"&&e!=="\t"&&e!==" ")break}let y=s.substring(m);const g=y.indexOf("\n");if(g===-1){p="-"}else if(s===y||g!==y.length-1){p="+";if(l)l()}else{p=""}if(y){s=s.slice(0,-y.length);if(y[y.length-1]==="\n")y=y.slice(0,-1);y=y.replace(r,`$&${d}`)}let v=false;let b;let S=-1;for(b=0;b<s.length;++b){const e=s[b];if(e===" ")v=true;else if(e==="\n")S=b;else break}let w=s.substring(0,S<b?S+1:b);if(w){s=s.substring(w.length);w=w.replace(/\n+/g,`$&${d}`)}const k=d?"2":"1";let A=(v?k:"")+p;if(e){A+=" "+f(e.replace(/ ?[\r\n]+/g," "));if(a)a()}if(!h){const e=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let r=false;const a=getFoldOptions(o,true);if(c!=="folded"&&t!==n.Scalar.BLOCK_FOLDED){a.onOverflow=()=>{r=true}}const l=i.foldFlowLines(`${w}${e}${y}`,d,i.FOLD_BLOCK,a);if(!r)return`>${A}\n${d}${l}`}s=s.replace(/\n+/g,`$&${d}`);return`|${A}\n${d}${w}${s}${y}`}function plainString(e,t,s,r){const{type:o,value:a}=e;const{actualString:l,implicitKey:c,indent:f,indentStep:u,inFlow:d}=t;if(c&&a.includes("\n")||d&&/[[\]{},]/.test(a)){return quotedString(a,t)}if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)){return c||d||!a.includes("\n")?quotedString(a,t):blockString(e,t,s,r)}if(!c&&!d&&o!==n.Scalar.PLAIN&&a.includes("\n")){return blockString(e,t,s,r)}if(containsDocumentMarker(a)){if(f===""){t.forceBlockIndent=true;return blockString(e,t,s,r)}else if(c&&f===u){return quotedString(a,t)}}const h=a.replace(/\n+/g,`$&\n${f}`);if(l){const test=e=>e.default&&e.tag!=="tag:yaml.org,2002:str"&&e.test?.test(h);const{compat:e,tags:s}=t.doc.schema;if(s.some(test)||e?.some(test))return quotedString(a,t)}return c?h:i.foldFlowLines(h,f,i.FOLD_FLOW,getFoldOptions(t,false))}function stringifyString(e,t,s,i){const{implicitKey:r,inFlow:o}=t;const a=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;if(l!==n.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value))l=n.Scalar.QUOTE_DOUBLE}const _stringify=e=>{switch(e){case n.Scalar.BLOCK_FOLDED:case n.Scalar.BLOCK_LITERAL:return r||o?quotedString(a.value,t):blockString(a,t,s,i);case n.Scalar.QUOTE_DOUBLE:return doubleQuotedString(a.value,t);case n.Scalar.QUOTE_SINGLE:return singleQuotedString(a.value,t);case n.Scalar.PLAIN:return plainString(a,t,s,i);default:return null}};let c=_stringify(l);if(c===null){const{defaultKeyType:e,defaultStringType:s}=t.options;const n=r&&e||s;c=_stringify(n);if(c===null)throw new Error(`Unsupported default string type ${n}`)}return c}t.stringifyString=stringifyString},204:(e,t,s)=>{var n=s(1127);const i=Symbol("break visit");const r=Symbol("skip children");const o=Symbol("remove node");function visit(e,t){const s=initVisitor(t);if(n.isDocument(e)){const t=visit_(null,e.contents,s,Object.freeze([e]));if(t===o)e.contents=null}else visit_(null,e,s,Object.freeze([]))}visit.BREAK=i;visit.SKIP=r;visit.REMOVE=o;function visit_(e,t,s,r){const a=callVisitor(e,t,s,r);if(n.isNode(a)||n.isPair(a)){replaceNode(e,r,a);return visit_(e,a,s,r)}if(typeof a!=="symbol"){if(n.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const n=visit_(e,t.items[e],s,r);if(typeof n==="number")e=n-1;else if(n===i)return i;else if(n===o){t.items.splice(e,1);e-=1}}}else if(n.isPair(t)){r=Object.freeze(r.concat(t));const e=visit_("key",t.key,s,r);if(e===i)return i;else if(e===o)t.key=null;const n=visit_("value",t.value,s,r);if(n===i)return i;else if(n===o)t.value=null}}return a}async function visitAsync(e,t){const s=initVisitor(t);if(n.isDocument(e)){const t=await visitAsync_(null,e.contents,s,Object.freeze([e]));if(t===o)e.contents=null}else await visitAsync_(null,e,s,Object.freeze([]))}visitAsync.BREAK=i;visitAsync.SKIP=r;visitAsync.REMOVE=o;async function visitAsync_(e,t,s,r){const a=await callVisitor(e,t,s,r);if(n.isNode(a)||n.isPair(a)){replaceNode(e,r,a);return visitAsync_(e,a,s,r)}if(typeof a!=="symbol"){if(n.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const n=await visitAsync_(e,t.items[e],s,r);if(typeof n==="number")e=n-1;else if(n===i)return i;else if(n===o){t.items.splice(e,1);e-=1}}}else if(n.isPair(t)){r=Object.freeze(r.concat(t));const e=await visitAsync_("key",t.key,s,r);if(e===i)return i;else if(e===o)t.key=null;const n=await visitAsync_("value",t.value,s,r);if(n===i)return i;else if(n===o)t.value=null}}return a}function initVisitor(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return 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)}return e}function callVisitor(e,t,s,i){if(typeof s==="function")return s(e,t,i);if(n.isMap(t))return s.Map?.(e,t,i);if(n.isSeq(t))return s.Seq?.(e,t,i);if(n.isPair(t))return s.Pair?.(e,t,i);if(n.isScalar(t))return s.Scalar?.(e,t,i);if(n.isAlias(t))return s.Alias?.(e,t,i);return undefined}function replaceNode(e,t,s){const i=t[t.length-1];if(n.isCollection(i)){i.items[e]=s}else if(n.isPair(i)){if(e==="key")i.key=s;else i.value=s}else if(n.isDocument(i)){i.contents=s}else{const e=n.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}}t.visit=visit;t.visitAsync=visitAsync}};var t={};function __nccwpck_require__(s){var n=t[s];if(n!==undefined){return n.exports}var i=t[s]={exports:{}};var r=true;try{e[s](i,i.exports,__nccwpck_require__);r=false}finally{if(r)delete t[s]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(9896);const n=__nccwpck_require__(6928);const i=__nccwpck_require__(2621);const r=__nccwpck_require__(8760);const o=__nccwpck_require__(4037);const generateTemplate=()=>{try{const e=(0,o.createTemplateOptions)();try{const s=(0,i.createS3SPA)(e);(0,t.writeFileSync)((0,n.resolve)(process.cwd(),"template.yml"),(0,r.parseYML)(s),"utf-8")}catch(e){if(e instanceof Error)console.error("Error:",e.message);else console.error(e);process.exitCode=1}}catch(e){console.error(e instanceof Error?`${e.name}: ${e.message}`:e);process.exitCode=1}};generateTemplate()})();module.exports=s})();