@redocly/replay 0.27.0-next.0 → 0.27.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/replay-AiChatProvider-BE-ZL36G.js +1006 -0
  2. package/dist/replay-AiChatProvider-p8gI7YOY.js +6 -0
  3. package/dist/replay-AiChatSqliteDBStorage-BQ6Wa-wM.js +1 -0
  4. package/dist/replay-AiChatSqliteDBStorage-Cz3VF3-9.js +88 -0
  5. package/dist/replay-AiPanel-BfZAn-u-.js +868 -0
  6. package/dist/replay-AiPanel-Bk8ug1Kj.js +2993 -0
  7. package/dist/replay-HistorySqliteDBStorage-BrILW8Fu.js +1 -0
  8. package/dist/replay-HistorySqliteDBStorage-CtF6-vY8.js +113 -0
  9. package/dist/replay-SqliteDBStorage-BvgGuUGt.js +2857 -0
  10. package/dist/replay-SqliteDBStorage-FlJdOj7b.js +14 -0
  11. package/dist/replay-StepContextSqliteDBStorage-BSepLyBI.js +1 -0
  12. package/dist/replay-StepContextSqliteDBStorage-BfAAKDwA.js +83 -0
  13. package/dist/replay-agent-loop-CvoG_00Q.js +1 -0
  14. package/dist/replay-agent-loop-DNZ4sJ_x.js +1533 -0
  15. package/dist/replay-ai-chat-mappers-5HmBA_7v.js +1 -0
  16. package/dist/replay-ai-chat-mappers-_wgxZgyq.js +99 -0
  17. package/dist/replay-ai-message-parts.schema-BBdjwldJ.js +1 -0
  18. package/dist/replay-ai-message-parts.schema-E9u9-nqr.js +60 -0
  19. package/dist/replay-create-model-DA7LaBbt.js +38224 -0
  20. package/dist/replay-create-model-Ip1c2zon.js +104 -0
  21. package/dist/replay-db-DLzFrSl9.js +306 -0
  22. package/dist/replay-db-DntsO9SX.js +64 -0
  23. package/dist/replay-defaults-CzR6jw9a.js +32 -0
  24. package/dist/replay-defaults-DVvOnvnR.js +27 -0
  25. package/dist/replay-external-resolver-BbDECYqj.js +2 -0
  26. package/dist/replay-external-resolver-C7GA6Rvj.js +34 -0
  27. package/dist/replay-history.schema-5ce6X0R1.js +28 -0
  28. package/dist/replay-history.schema-miM3Etuf.js +1 -0
  29. package/dist/{replay-index-Dd3hfnpm.js → replay-index-BO0w255N.js} +6 -6
  30. package/dist/replay-index-BaoIJsKs.js +6913 -0
  31. package/dist/{replay-index-bml1oBZ7.js → replay-index-Bi7n4Ttf.js} +1 -1
  32. package/dist/replay-index-ByP0XvOv.js +1 -0
  33. package/dist/replay-index-CAm7zMO1.js +504 -0
  34. package/dist/replay-index-CX5xPDIH.js +1 -0
  35. package/dist/replay-index-D4CMWh6y.js +93877 -0
  36. package/dist/replay-index-XIOEiPo3.js +1 -0
  37. package/dist/replay-indexes-CfsvVMi_.js +1242 -0
  38. package/dist/replay-indexes-Dqjl8m6C.js +1 -0
  39. package/dist/replay-lint-CalxF1V5.js +184 -0
  40. package/dist/replay-lint-DL60Fo7H.js +33754 -0
  41. package/dist/{replay-lint-graphql-DwlvYtaR.js → replay-lint-graphql-B6Qm8gCF.js} +2 -2
  42. package/dist/{replay-lint-graphql-DCRYETpK.js → replay-lint-graphql-CWrHAjLb.js} +5 -5
  43. package/dist/replay-resolve-LzWFNTke.js +3719 -0
  44. package/dist/replay-resolve-PXLrswKS.js +47 -0
  45. package/dist/replay-respect-run-B9aIJ9Lj.js +78 -0
  46. package/dist/{replay-respect-run-B9zEA6wE.js → replay-respect-run-Dzf42Upi.js} +1620 -1568
  47. package/dist/replay-step-context.schema-BuuXkAck.js +1 -0
  48. package/dist/replay-step-context.schema-DBk4jufr.js +21 -0
  49. package/dist/{replay-tauri-path-Bg12qycN.js → replay-tauri-path-BtdUgEVI.js} +5 -5
  50. package/dist/{replay-tauri-path-B3H0WbIo.js → replay-tauri-path-DR4Vdirg.js} +1 -1
  51. package/dist/replay-useAiChatQueries-BHl1W3Zx.js +215 -0
  52. package/dist/replay-useAiChatQueries-nXi3kofA.js +3589 -0
  53. package/dist/replay-validate-key-Cjn0vVcT.js +28 -0
  54. package/dist/replay-validate-key-vTRfteXF.js +1 -0
  55. package/dist/replay.cjs +1 -1
  56. package/dist/replay.d.ts +41 -9
  57. package/dist/replay.js +18 -18
  58. package/package.json +34 -36
  59. package/dist/replay-index-CBXHoXYE.js +0 -1
  60. package/dist/replay-index-CWHIM2op.js +0 -169736
  61. package/dist/replay-index-CyzwJ9W3.js +0 -8243
  62. package/dist/replay-index-D00xDUne.js +0 -1
  63. package/dist/replay-respect-run-Cloy00tl.js +0 -78
@@ -0,0 +1,47 @@
1
+ "use strict";const le=require("./replay-index-BaoIJsKs.js");function Hn(e){return!!e}var bt={},vt,fn;function ht(){if(fn)return vt;fn=1;const e="\\\\/",t=`[^${e}]`,n=0,r="\\.",i="\\+",o="\\?",a="\\/",s="(?=.)",l="[^/]",u=`(?:${a}|$)`,c=`(?:^|${a})`,E=`${r}{1,2}${u}`,m=`(?!${r})`,T=`(?!${c}${E})`,S=`(?!${r}{0,1}${u})`,w=`(?!${E})`,F=`[^.${a}]`,N=`${l}*?`,v={DOT_LITERAL:r,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:s,QMARK:l,END_ANCHOR:u,DOTS_SLASH:E,NO_DOT:m,NO_DOTS:T,NO_DOT_SLASH:S,NO_DOTS_SLASH:w,QMARK_NO_DOT:F,STAR:N,START_ANCHOR:c,SEP:"/"},p={...v,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${e}])${r}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"},x={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return vt={DEFAULT_MAX_EXTGLOB_RECURSION:n,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:x,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(_){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${_.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(_){return _===!0?p:v}},vt}var pn;function gt(){return pn||(pn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=ht();e.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),e.hasRegexChars=o=>r.test(o),e.isRegexChar=o=>o.length===1&&e.hasRegexChars(o),e.escapeRegex=o=>o.replace(i,"\\$1"),e.toPosixSlashes=o=>o.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const o=navigator.platform.toLowerCase();return o==="win32"||o==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1},e.removeBackslashes=o=>o.replace(n,a=>a==="\\"?"":a),e.escapeLast=(o,a,s)=>{const l=o.lastIndexOf(a,s);return l===-1?o:o[l-1]==="\\"?e.escapeLast(o,a,l-1):`${o.slice(0,l)}\\${o.slice(l)}`},e.removePrefix=(o,a={})=>{let s=o;return s.startsWith("./")&&(s=s.slice(2),a.prefix="./"),s},e.wrapOutput=(o,a={},s={})=>{const l=s.contains?"":"^",u=s.contains?"":"$";let c=`${l}(?:${o})${u}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},e.basename=(o,{windows:a}={})=>{const s=o.split(a?/[\\/]/:"/"),l=s[s.length-1];return l===""?s[s.length-2]:l}})(bt)),bt}var Rt,dn;function br(){if(dn)return Rt;dn=1;const e=gt(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:s,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:E,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:T,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:w}=ht(),F=v=>v===s||v===r,N=v=>{v.isPrefix!==!0&&(v.depth=v.isGlobstar?1/0:1)};return Rt=(v,p)=>{const x=p||{},_=v.length-1,R=x.parts===!0||x.scanToEnd===!0,A=[],g=[],z=[];let j=v,L=-1,G=0,J=0,ce=!1,ue=!1,W=!1,Se=!1,ve=!1,B=!1,ae=!1,Re=!1,Pe=!1,q=!1,se=0,Ae,O,f={value:"",depth:0,isGlob:!1};const Z=()=>L>=_,he=()=>j.charCodeAt(L+1),ee=()=>(Ae=O,j.charCodeAt(++L));for(;L<_;){O=ee();let V;if(O===r){ae=f.backslashes=!0,O=ee(),O===l&&(B=!0);continue}if(B===!0||O===l){for(se++;Z()!==!0&&(O=ee());){if(O===r){ae=f.backslashes=!0,ee();continue}if(O===l){se++;continue}if(B!==!0&&O===o&&(O=ee())===o){if(ce=f.isBrace=!0,W=f.isGlob=!0,q=!0,R===!0)continue;break}if(B!==!0&&O===i){if(ce=f.isBrace=!0,W=f.isGlob=!0,q=!0,R===!0)continue;break}if(O===T&&(se--,se===0)){B=!1,ce=f.isBrace=!0,q=!0;break}}if(R===!0)continue;break}if(O===s){if(A.push(L),g.push(f),f={value:"",depth:0,isGlob:!1},q===!0)continue;if(Ae===o&&L===G+1){G+=2;continue}J=L+1;continue}if(x.noext!==!0&&(O===E||O===n||O===t||O===m||O===a)===!0&&he()===u){if(W=f.isGlob=!0,Se=f.isExtglob=!0,q=!0,O===a&&L===G&&(Pe=!0),R===!0){for(;Z()!==!0&&(O=ee());){if(O===r){ae=f.backslashes=!0,O=ee();continue}if(O===S){W=f.isGlob=!0,q=!0;break}}continue}break}if(O===t){if(Ae===t&&(ve=f.isGlobstar=!0),W=f.isGlob=!0,q=!0,R===!0)continue;break}if(O===m){if(W=f.isGlob=!0,q=!0,R===!0)continue;break}if(O===c){for(;Z()!==!0&&(V=ee());){if(V===r){ae=f.backslashes=!0,ee();continue}if(V===w){ue=f.isBracket=!0,W=f.isGlob=!0,q=!0;break}}if(R===!0)continue;break}if(x.nonegate!==!0&&O===a&&L===G){Re=f.negated=!0,G++;continue}if(x.noparen!==!0&&O===u){if(W=f.isGlob=!0,R===!0){for(;Z()!==!0&&(O=ee());){if(O===u){ae=f.backslashes=!0,O=ee();continue}if(O===S){q=!0;break}}continue}break}if(W===!0){if(q=!0,R===!0)continue;break}}x.noext===!0&&(Se=!1,W=!1);let d=j,h="",fe="";G>0&&(h=j.slice(0,G),j=j.slice(G),J-=G),d&&W===!0&&J>0?(d=j.slice(0,J),fe=j.slice(J)):W===!0?(d="",fe=j):d=j,d&&d!==""&&d!=="/"&&d!==j&&F(d.charCodeAt(d.length-1))&&(d=d.slice(0,-1)),x.unescape===!0&&(fe&&(fe=e.removeBackslashes(fe)),d&&ae===!0&&(d=e.removeBackslashes(d)));const D={prefix:h,input:v,start:G,base:d,glob:fe,isBrace:ce,isBracket:ue,isGlob:W,isExtglob:Se,isGlobstar:ve,negated:Re,negatedExtglob:Pe};if(x.tokens===!0&&(D.maxDepth=0,F(O)||g.push(f),D.tokens=g),x.parts===!0||x.tokens===!0){let V;for(let Y=0;Y<A.length;Y++){const pe=V?V+1:G,xe=A[Y],qe=v.slice(pe,xe);x.tokens&&(Y===0&&G!==0?(g[Y].isPrefix=!0,g[Y].value=h):g[Y].value=qe,N(g[Y]),D.maxDepth+=g[Y].depth),(Y!==0||qe!=="")&&z.push(qe),V=xe}if(V&&V+1<v.length){const Y=v.slice(V+1);z.push(Y),x.tokens&&(g[g.length-1].value=Y,N(g[g.length-1]),D.maxDepth+=g[g.length-1].depth)}D.slashes=A,D.parts=z}return D},Rt}var xt,hn;function vr(){if(hn)return xt;hn=1;const e=ht(),t=gt(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(y,v)=>{if(typeof v.expandRange=="function")return v.expandRange(...y,v);y.sort();const p=`[${y.join("-")}]`;try{new RegExp(p)}catch{return y.map(_=>t.escapeRegex(_)).join("..")}return p},l=(y,v)=>`Missing ${y}: "${v}" - use "\\\\${v}" to match literal characters`,u=y=>{const v=[];let p=0,x=0,_=0,R="",A=!1;for(const g of y){if(A===!0){R+=g,A=!1;continue}if(g==="\\"){R+=g,A=!0;continue}if(g==='"'){_=_===1?0:1,R+=g;continue}if(_===0){if(g==="[")p++;else if(g==="]"&&p>0)p--;else if(p===0){if(g==="(")x++;else if(g===")"&&x>0)x--;else if(g==="|"&&x===0){v.push(R),R="";continue}}}R+=g}return v.push(R),v},c=y=>{let v=!1;for(const p of y){if(v===!0){v=!1;continue}if(p==="\\"){v=!0;continue}if(/[?*+@!()[\]{}]/.test(p))return!1}return!0},E=y=>{let v=y.trim(),p=!0;for(;p===!0;)p=!1,/^@\([^\\()[\]{}|]+\)$/.test(v)&&(v=v.slice(2,-1),p=!0);if(c(v))return v.replace(/\\(.)/g,"$1")},m=y=>{const v=y.map(E).filter(Boolean);for(let p=0;p<v.length;p++)for(let x=p+1;x<v.length;x++){const _=v[p],R=v[x],A=_[0];if(!(!A||_!==A.repeat(_.length)||R!==A.repeat(R.length))&&(_===R||_.startsWith(R)||R.startsWith(_)))return!0}return!1},T=(y,v=!0)=>{if(y[0]!=="+"&&y[0]!=="*"||y[1]!=="(")return;let p=0,x=0,_=0,R=!1;for(let A=1;A<y.length;A++){const g=y[A];if(R===!0){R=!1;continue}if(g==="\\"){R=!0;continue}if(g==='"'){_=_===1?0:1;continue}if(_!==1){if(g==="["){p++;continue}if(g==="]"&&p>0){p--;continue}if(!(p>0)){if(g==="("){x++;continue}if(g===")"&&(x--,x===0))return v===!0&&A!==y.length-1?void 0:{type:y[0],body:y.slice(2,A),end:A}}}}},S=y=>{let v=0;const p=[];for(;v<y.length;){const _=T(y.slice(v),!1);if(!_||_.type!=="*")return;const R=u(_.body).map(g=>g.trim());if(R.length!==1)return;const A=E(R[0]);if(!A||A.length!==1)return;p.push(A),v+=_.end+1}return p.length<1?void 0:`${p.length===1?t.escapeRegex(p[0]):`[${p.map(_=>t.escapeRegex(_)).join("")}]`}*`},w=y=>{let v=0,p=y.trim(),x=T(p);for(;x;)v++,p=x.body.trim(),x=T(p);return v},F=(y,v)=>{if(v.maxExtglobRecursion===!1)return{risky:!1};const p=typeof v.maxExtglobRecursion=="number"?v.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,x=u(y).map(_=>_.trim());if(x.length>1&&(x.some(_=>_==="")||x.some(_=>/^[*?]+$/.test(_))||m(x)))return{risky:!0};for(const _ of x){const R=S(_);if(R)return{risky:!0,safeOutput:R};if(w(_)>p)return{risky:!0}}return{risky:!1}},N=(y,v)=>{if(typeof y!="string")throw new TypeError("Expected a string");y=a[y]||y;const p={...v},x=typeof p.maxLength=="number"?Math.min(n,p.maxLength):n;let _=y.length;if(_>x)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);const R={type:"bos",value:"",output:p.prepend||""},A=[R],g=p.capture?"":"?:",z=e.globChars(p.windows),j=e.extglobChars(z),{DOT_LITERAL:L,PLUS_LITERAL:G,SLASH_LITERAL:J,ONE_CHAR:ce,DOTS_SLASH:ue,NO_DOT:W,NO_DOT_SLASH:Se,NO_DOTS_SLASH:ve,QMARK:B,QMARK_NO_DOT:ae,STAR:Re,START_ANCHOR:Pe}=z,q=b=>`(${g}(?:(?!${Pe}${b.dot?ue:L}).)*?)`,se=p.dot?"":W,Ae=p.dot?B:ae;let O=p.bash===!0?q(p):Re;p.capture&&(O=`(${O})`),typeof p.noext=="boolean"&&(p.noextglob=p.noext);const f={input:y,index:-1,start:0,dot:p.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:A};y=t.removePrefix(y,f),_=y.length;const Z=[],he=[],ee=[];let d=R,h;const fe=()=>f.index===_-1,D=f.peek=(b=1)=>y[f.index+b],V=f.advance=()=>y[++f.index]||"",Y=()=>y.slice(f.index+1),pe=(b="",K=0)=>{f.consumed+=b,f.index+=K},xe=b=>{f.output+=b.output!=null?b.output:b.value,pe(b.value)},qe=()=>{let b=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)V(),f.start++,b++;return b%2===0?!1:(f.negated=!0,f.start++,!0)},rt=b=>{f[b]++,ee.push(b)},Te=b=>{f[b]--,ee.pop()},$=b=>{if(d.type==="globstar"){const K=f.braces>0&&(b.type==="comma"||b.type==="brace"),C=b.extglob===!0||Z.length&&(b.type==="pipe"||b.type==="paren");b.type!=="slash"&&b.type!=="paren"&&!K&&!C&&(f.output=f.output.slice(0,-d.output.length),d.type="star",d.value="*",d.output=O,f.output+=d.output)}if(Z.length&&b.type!=="paren"&&(Z[Z.length-1].inner+=b.value),(b.value||b.output)&&xe(b),d&&d.type==="text"&&b.type==="text"){d.output=(d.output||d.value)+b.value,d.value+=b.value;return}b.prev=d,A.push(b),d=b},it=(b,K)=>{const C={...j[K],conditions:1,inner:""};C.prev=d,C.parens=f.parens,C.output=f.output,C.startIndex=f.index,C.tokensIndex=A.length;const k=(p.capture?"(":"")+C.open;rt("parens"),$({type:b,value:K,output:f.output?"":ce}),$({type:"paren",extglob:!0,value:V(),output:k}),Z.push(C)},Cr=b=>{const K=y.slice(b.startIndex,f.index+1),C=y.slice(b.startIndex+2,f.index),k=F(C,p);if((b.type==="plus"||b.type==="star")&&k.risky){const M=k.safeOutput?(b.output?"":ce)+(p.capture?`(${k.safeOutput})`:k.safeOutput):void 0,ge=A[b.tokensIndex];ge.type="text",ge.value=K,ge.output=M||t.escapeRegex(K);for(let me=b.tokensIndex+1;me<A.length;me++)A[me].value="",A[me].output="",delete A[me].suffix;f.output=b.output+ge.output,f.backtrack=!0,$({type:"paren",extglob:!0,value:h,output:""}),Te("parens");return}let U=b.close+(p.capture?")":""),X;if(b.type==="negate"){let M=O;if(b.inner&&b.inner.length>1&&b.inner.includes("/")&&(M=q(p)),(M!==O||fe()||/^\)+$/.test(Y()))&&(U=b.close=`)$))${M}`),b.inner.includes("*")&&(X=Y())&&/^\.[^\\/.]+$/.test(X)){const ge=N(X,{...v,fastpaths:!1}).output;U=b.close=`)${ge})${M})`}b.prev.type==="bos"&&(f.negatedExtglob=!0)}$({type:"paren",extglob:!0,value:h,output:U}),Te("parens")};if(p.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(y)){let b=!1,K=y.replace(o,(C,k,U,X,M,ge)=>X==="\\"?(b=!0,C):X==="?"?k?k+X+(M?B.repeat(M.length):""):ge===0?Ae+(M?B.repeat(M.length):""):B.repeat(U.length):X==="."?L.repeat(U.length):X==="*"?k?k+X+(M?O:""):O:k?C:`\\${C}`);return b===!0&&(p.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),K===y&&p.contains===!0?(f.output=y,f):(f.output=t.wrapOutput(K,f,v),f)}for(;!fe();){if(h=V(),h==="\0")continue;if(h==="\\"){const C=D();if(C==="/"&&p.bash!==!0||C==="."||C===";")continue;if(!C){h+="\\",$({type:"text",value:h});continue}const k=/^\\+/.exec(Y());let U=0;if(k&&k[0].length>2&&(U=k[0].length,f.index+=U,U%2!==0&&(h+="\\")),p.unescape===!0?h=V():h+=V(),f.brackets===0){$({type:"text",value:h});continue}}if(f.brackets>0&&(h!=="]"||d.value==="["||d.value==="[^")){if(p.posix!==!1&&h===":"){const C=d.value.slice(1);if(C.includes("[")&&(d.posix=!0,C.includes(":"))){const k=d.value.lastIndexOf("["),U=d.value.slice(0,k),X=d.value.slice(k+2),M=r[X];if(M){d.value=U+M,f.backtrack=!0,V(),!R.output&&A.indexOf(d)===1&&(R.output=ce);continue}}}(h==="["&&D()!==":"||h==="-"&&D()==="]")&&(h=`\\${h}`),h==="]"&&(d.value==="["||d.value==="[^")&&(h=`\\${h}`),p.posix===!0&&h==="!"&&d.value==="["&&(h="^"),d.value+=h,xe({value:h});continue}if(f.quotes===1&&h!=='"'){h=t.escapeRegex(h),d.value+=h,xe({value:h});continue}if(h==='"'){f.quotes=f.quotes===1?0:1,p.keepQuotes===!0&&$({type:"text",value:h});continue}if(h==="("){rt("parens"),$({type:"paren",value:h});continue}if(h===")"){if(f.parens===0&&p.strictBrackets===!0)throw new SyntaxError(l("opening","("));const C=Z[Z.length-1];if(C&&f.parens===C.parens+1){Cr(Z.pop());continue}$({type:"paren",value:h,output:f.parens?")":"\\)"}),Te("parens");continue}if(h==="["){if(p.nobracket===!0||!Y().includes("]")){if(p.nobracket!==!0&&p.strictBrackets===!0)throw new SyntaxError(l("closing","]"));h=`\\${h}`}else rt("brackets");$({type:"bracket",value:h});continue}if(h==="]"){if(p.nobracket===!0||d&&d.type==="bracket"&&d.value.length===1){$({type:"text",value:h,output:`\\${h}`});continue}if(f.brackets===0){if(p.strictBrackets===!0)throw new SyntaxError(l("opening","["));$({type:"text",value:h,output:`\\${h}`});continue}Te("brackets");const C=d.value.slice(1);if(d.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(h=`/${h}`),d.value+=h,xe({value:h}),p.literalBrackets===!1||t.hasRegexChars(C))continue;const k=t.escapeRegex(d.value);if(f.output=f.output.slice(0,-d.value.length),p.literalBrackets===!0){f.output+=k,d.value=k;continue}d.value=`(${g}${k}|${d.value})`,f.output+=d.value;continue}if(h==="{"&&p.nobrace!==!0){rt("braces");const C={type:"brace",value:h,output:"(",outputIndex:f.output.length,tokensIndex:f.tokens.length};he.push(C),$(C);continue}if(h==="}"){const C=he[he.length-1];if(p.nobrace===!0||!C){$({type:"text",value:h,output:h});continue}let k=")";if(C.dots===!0){const U=A.slice(),X=[];for(let M=U.length-1;M>=0&&(A.pop(),U[M].type!=="brace");M--)U[M].type!=="dots"&&X.unshift(U[M].value);k=s(X,p),f.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const U=f.output.slice(0,C.outputIndex),X=f.tokens.slice(C.tokensIndex);C.value=C.output="\\{",h=k="\\}",f.output=U;for(const M of X)f.output+=M.output||M.value}$({type:"brace",value:h,output:k}),Te("braces"),he.pop();continue}if(h==="|"){Z.length>0&&Z[Z.length-1].conditions++,$({type:"text",value:h});continue}if(h===","){let C=h;const k=he[he.length-1];k&&ee[ee.length-1]==="braces"&&(k.comma=!0,C="|"),$({type:"comma",value:h,output:C});continue}if(h==="/"){if(d.type==="dot"&&f.index===f.start+1){f.start=f.index+1,f.consumed="",f.output="",A.pop(),d=R;continue}$({type:"slash",value:h,output:J});continue}if(h==="."){if(f.braces>0&&d.type==="dot"){d.value==="."&&(d.output=L);const C=he[he.length-1];d.type="dots",d.output+=h,d.value+=h,C.dots=!0;continue}if(f.braces+f.parens===0&&d.type!=="bos"&&d.type!=="slash"){$({type:"text",value:h,output:L});continue}$({type:"dot",value:h,output:L});continue}if(h==="?"){if(!(d&&d.value==="(")&&p.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("qmark",h);continue}if(d&&d.type==="paren"){const k=D();let U=h;(d.value==="("&&!/[!=<:]/.test(k)||k==="<"&&!/<([!=]|\w+>)/.test(Y()))&&(U=`\\${h}`),$({type:"text",value:h,output:U});continue}if(p.dot!==!0&&(d.type==="slash"||d.type==="bos")){$({type:"qmark",value:h,output:ae});continue}$({type:"qmark",value:h,output:B});continue}if(h==="!"){if(p.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){it("negate",h);continue}if(p.nonegate!==!0&&f.index===0){qe();continue}}if(h==="+"){if(p.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("plus",h);continue}if(d&&d.value==="("||p.regex===!1){$({type:"plus",value:h,output:G});continue}if(d&&(d.type==="bracket"||d.type==="paren"||d.type==="brace")||f.parens>0){$({type:"plus",value:h});continue}$({type:"plus",value:G});continue}if(h==="@"){if(p.noextglob!==!0&&D()==="("&&D(2)!=="?"){$({type:"at",extglob:!0,value:h,output:""});continue}$({type:"text",value:h});continue}if(h!=="*"){(h==="$"||h==="^")&&(h=`\\${h}`);const C=i.exec(Y());C&&(h+=C[0],f.index+=C[0].length),$({type:"text",value:h});continue}if(d&&(d.type==="globstar"||d.star===!0)){d.type="star",d.star=!0,d.value+=h,d.output=O,f.backtrack=!0,f.globstar=!0,pe(h);continue}let b=Y();if(p.noextglob!==!0&&/^\([^?]/.test(b)){it("star",h);continue}if(d.type==="star"){if(p.noglobstar===!0){pe(h);continue}const C=d.prev,k=C.prev,U=C.type==="slash"||C.type==="bos",X=k&&(k.type==="star"||k.type==="globstar");if(p.bash===!0&&(!U||b[0]&&b[0]!=="/")){$({type:"star",value:h,output:""});continue}const M=f.braces>0&&(C.type==="comma"||C.type==="brace"),ge=Z.length&&(C.type==="pipe"||C.type==="paren");if(!U&&C.type!=="paren"&&!M&&!ge){$({type:"star",value:h,output:""});continue}for(;b.slice(0,3)==="/**";){const me=y[f.index+4];if(me&&me!=="/")break;b=b.slice(3),pe("/**",3)}if(C.type==="bos"&&fe()){d.type="globstar",d.value+=h,d.output=q(p),f.output=d.output,f.globstar=!0,pe(h);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!X&&fe()){f.output=f.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=q(p)+(p.strictSlashes?")":"|$)"),d.value+=h,f.globstar=!0,f.output+=C.output+d.output,pe(h);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&b[0]==="/"){const me=b[1]!==void 0?"|$":"";f.output=f.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=`${q(p)}${J}|${J}${me})`,d.value+=h,f.output+=C.output+d.output,f.globstar=!0,pe(h+V()),$({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&b[0]==="/"){d.type="globstar",d.value+=h,d.output=`(?:^|${J}|${q(p)}${J})`,f.output=d.output,f.globstar=!0,pe(h+V()),$({type:"slash",value:"/",output:""});continue}f.output=f.output.slice(0,-d.output.length),d.type="globstar",d.output=q(p),d.value+=h,f.output+=d.output,f.globstar=!0,pe(h);continue}const K={type:"star",value:h,output:O};if(p.bash===!0){K.output=".*?",(d.type==="bos"||d.type==="slash")&&(K.output=se+K.output),$(K);continue}if(d&&(d.type==="bracket"||d.type==="paren")&&p.regex===!0){K.output=h,$(K);continue}(f.index===f.start||d.type==="slash"||d.type==="dot")&&(d.type==="dot"?(f.output+=Se,d.output+=Se):p.dot===!0?(f.output+=ve,d.output+=ve):(f.output+=se,d.output+=se),D()!=="*"&&(f.output+=ce,d.output+=ce)),$(K)}for(;f.brackets>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing","]"));f.output=t.escapeLast(f.output,"["),Te("brackets")}for(;f.parens>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing",")"));f.output=t.escapeLast(f.output,"("),Te("parens")}for(;f.braces>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing","}"));f.output=t.escapeLast(f.output,"{"),Te("braces")}if(p.strictSlashes!==!0&&(d.type==="star"||d.type==="bracket")&&$({type:"maybe_slash",value:"",output:`${J}?`}),f.backtrack===!0){f.output="";for(const b of f.tokens)f.output+=b.output!=null?b.output:b.value,b.suffix&&(f.output+=b.suffix)}return f};return N.fastpaths=(y,v)=>{const p={...v},x=typeof p.maxLength=="number"?Math.min(n,p.maxLength):n,_=y.length;if(_>x)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);y=a[y]||y;const{DOT_LITERAL:R,SLASH_LITERAL:A,ONE_CHAR:g,DOTS_SLASH:z,NO_DOT:j,NO_DOTS:L,NO_DOTS_SLASH:G,STAR:J,START_ANCHOR:ce}=e.globChars(p.windows),ue=p.dot?L:j,W=p.dot?G:j,Se=p.capture?"":"?:",ve={negated:!1,prefix:""};let B=p.bash===!0?".*?":J;p.capture&&(B=`(${B})`);const ae=se=>se.noglobstar===!0?B:`(${Se}(?:(?!${ce}${se.dot?z:R}).)*?)`,Re=se=>{switch(se){case"*":return`${ue}${g}${B}`;case".*":return`${R}${g}${B}`;case"*.*":return`${ue}${B}${R}${g}${B}`;case"*/*":return`${ue}${B}${A}${g}${W}${B}`;case"**":return ue+ae(p);case"**/*":return`(?:${ue}${ae(p)}${A})?${W}${g}${B}`;case"**/*.*":return`(?:${ue}${ae(p)}${A})?${W}${B}${R}${g}${B}`;case"**/.*":return`(?:${ue}${ae(p)}${A})?${R}${g}${B}`;default:{const Ae=/^(.*?)\.(\w+)$/.exec(se);if(!Ae)return;const O=Re(Ae[1]);return O?O+R+Ae[2]:void 0}}},Pe=t.removePrefix(y,ve);let q=Re(Pe);return q&&p.strictSlashes!==!0&&(q+=`${A}?`),q},xt=N,xt}var _t,gn;function Rr(){if(gn)return _t;gn=1;const e=br(),t=vr(),n=gt(),r=ht(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,s,l=!1)=>{if(Array.isArray(a)){const F=a.map(y=>o(y,s,l));return y=>{for(const v of F){const p=v(y);if(p)return p}return!1}}const u=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const c=s||{},E=c.windows,m=u?o.compileRe(a,s):o.makeRe(a,s,!1,!0),T=m.state;delete m.state;let S=()=>!1;if(c.ignore){const F={...s,ignore:null,onMatch:null,onResult:null};S=o(c.ignore,F,l)}const w=(F,N=!1)=>{const{isMatch:y,match:v,output:p}=o.test(F,m,s,{glob:a,posix:E}),x={glob:a,state:T,regex:m,posix:E,input:F,output:p,match:v,isMatch:y};return typeof c.onResult=="function"&&c.onResult(x),y===!1?(x.isMatch=!1,N?x:!1):S(F)?(typeof c.onIgnore=="function"&&c.onIgnore(x),x.isMatch=!1,N?x:!1):(typeof c.onMatch=="function"&&c.onMatch(x),N?x:!0)};return l&&(w.state=T),w};return o.test=(a,s,l,{glob:u,posix:c}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const E=l||{},m=E.format||(c?n.toPosixSlashes:null);let T=a===u,S=T&&m?m(a):a;return T===!1&&(S=m?m(a):a,T=S===u),(T===!1||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?T=o.matchBase(a,s,l,c):T=s.exec(S)),{isMatch:!!T,match:T,output:S}},o.matchBase=(a,s,l)=>(s instanceof RegExp?s:o.makeRe(s,l)).test(n.basename(a)),o.isMatch=(a,s,l)=>o(s,l)(a),o.parse=(a,s)=>Array.isArray(a)?a.map(l=>o.parse(l,s)):t(a,{...s,fastpaths:!1}),o.scan=(a,s)=>e(a,s),o.compileRe=(a,s,l=!1,u=!1)=>{if(l===!0)return a.output;const c=s||{},E=c.contains?"":"^",m=c.contains?"":"$";let T=`${E}(?:${a.output})${m}`;a&&a.negated===!0&&(T=`^(?!${T}).*$`);const S=o.toRegex(T,s);return u===!0&&(S.state=a),S},o.makeRe=(a,s={},l=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let c={negated:!1,fastpaths:!0};return s.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(c.output=t.fastpaths(a,s)),c.output||(c=t(a,s)),o.compileRe(c,s,l,u)},o.toRegex=(a,s)=>{try{const l=s||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(s&&s.debug===!0)throw l;return/$^/}},o.constants=r,_t=o,_t}var It,mn;function xr(){if(mn)return It;mn=1;const e=Rr(),t=gt();function n(r,i,o=!1){return i&&(i.windows===null||i.windows===void 0)&&(i={...i,windows:t.isWindows()}),e(r,i,o)}return Object.assign(n,e),It=n,It}var _r=xr();const Ir=le.getDefaultExportFromCjs(_r),Mn=typeof window<"u"||typeof process>"u"||process?.platform==="browser",Bn=Mn?{}:process.env||{};async function Dn(e,t){const n={};for(const i of t.headers)wr(e,i.matches)&&(n[i.name]=i.envVariable!==void 0?Bn[i.envVariable]||"":i.value);const r=await(t.customFetch||fetch)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:await r.text(),mimeType:r.headers.get("content-type")}}function wr(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),Ir.isMatch(e,t)}function Nr(e,t={}){return{name:`${e}List`,properties:{},items:e,...t}}function Or(e,t={}){return{name:`${e}Map`,properties:{},additionalProperties:()=>e,...t}}const We={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}};function $r(e,t={}){const n={};for(const o of Object.keys(e))n[o]={...e[o],name:o};for(const o of Object.values(n))r(o);return n.SpecExtension=We,n;function r(o){if(o.additionalProperties&&(o.additionalProperties=i(o.additionalProperties)),o.items&&(o.items=i(o.items)),o.properties){const a={};for(const[s,l]of Object.entries(o.properties))a[s]=i(l),t.doNotResolveExamples&&l&&l.isExample&&(a[s]={...l,resolvable:!1});o.properties=a}}function i(o){if(typeof o=="string"){if(!n[o])throw new Error(`Unknown type name found: ${o}`);return n[o]}else return typeof o=="function"?(a,s)=>i(o(a,s)):Ve(o)?(o={...o},r(o),o):o?.directResolveAs!==void 0?{...o,directResolveAs:i(o.directResolveAs)??void 0}:o}}function Ve(e){return typeof e?.name=="string"}function Ce(e,t){return e===""&&(e="#/"),e[e.length-1]==="/"?e+t:e+"/"+t}function Xe(e){return le.isPlainObject(e)&&typeof e.$ref=="string"}function Un(e){return Xe(e)&&Object.keys(e).length>1}function Kn(e){return le.isPlainObject(e)&&typeof e.externalValue=="string"}class mt{source;pointer;constructor(t,n){this.source=t,this.pointer=n}child(t){return new mt(this.source,Ce(this.pointer,(Array.isArray(t)?t:[t]).map(Ie).join("/")))}key(){return{...this,reportOnKey:!0}}get absolutePointer(){return this.source.absoluteRef+(this.pointer==="#/"?"":this.pointer)}}function qn(e){const t=e.indexOf("~")===-1?e:e.replaceAll("~1","/").replaceAll("~0","~");try{return decodeURIComponent(t)}catch{return t}}function Ie(e){return typeof e=="number"||e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replaceAll("~","~0").replaceAll("/","~1")}function Gn(e){const[t,n=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:Yn(n)}}function Yn(e){return e.split("/").map(qn).filter(Hn)}function kr(e){const t=e.split("/");return t[t.length-1]}function Lr(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")}function we(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("data:")}function Pr(e){return le.pathBrowserifyExports.extname(e)?we(e)?e.substring(0,e.lastIndexOf("/")):le.pathBrowserifyExports.dirname(e):e}function Fr(e,t){return we(e)?new URL(t,e.endsWith("/")?e:`${e}/`).href:le.pathBrowserifyExports.resolve(e,t)}function Hr(e){return typeof e=="string"&&(e.startsWith("#")||we(e)||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1||/\.(ya?ml|json)$/i.test(e))}function Mr(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}function Br(e,t,n){if(!le.isPlainObject(t.node)&&n.parent){n.parent[n.key]=t.node;return}delete e.$ref,le.isPlainObject(t.node)&&Object.assign(e,{...t.node,...e})}var P=Symbol("NOT_RESOLVED"),Qt=Symbol("MERGE_KEY");function te(e,t){return{tagName:e,nodeKind:"scalar",implicit:t.implicit??!1,matchByTagPrefix:t.matchByTagPrefix??!1,implicitFirstChars:t.implicitFirstChars??null,resolve:t.resolve,identify:t.identify??null,represent:t.represent??(n=>String(n)),representTagName:t.representTagName??null}}function Zt(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"sequence",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addItem:t.addItem,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}function At(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"mapping",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}var Dr=te("tag:yaml.org,2002:str",{resolve:e=>e,identify:e=>typeof e=="string"}),Ur=["","~","null","Null","NULL"],Kr=te("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Ur.indexOf(e)!==-1?null:P,identify:e=>e===null,represent:()=>"null"}),qr=te("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>e==="null"||t&&e===""?null:P,identify:e=>e===null,represent:()=>"null"}),Gr=["","~","null","Null","NULL"],Yr=te("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Gr.indexOf(e)!==-1?null:P,identify:e=>e===null,represent:()=>"null"}),jr=["true","True","TRUE"],Wr=["false","False","FALSE"],Vr=te("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:e=>jr.indexOf(e)!==-1?!0:Wr.indexOf(e)!==-1?!1:P,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Xr=["true"],zr=["false"],Qr=te("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:e=>Xr.indexOf(e)!==-1?!0:zr.indexOf(e)!==-1?!1:P,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Zr=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],Jr=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],ei=te("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:e=>Zr.indexOf(e)!==-1?!0:Jr.indexOf(e)!==-1?!1:P,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),ti=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),ni=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function ri(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function ii(e,t){if(t){if(!ni.test(e))return P}else if(!ti.test(e))return P;const n=ri(e);return Number.isFinite(n)?n:P}var jn=te("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:ii,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),oi=new RegExp("^-?(?:0|[1-9][0-9]*)$"),ai=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function si(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function li(e,t){if(t){if(!ai.test(e))return P}else if(!oi.test(e))return P;const n=si(e);return Number.isFinite(n)?n:P}var ci=te("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:li,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),ui=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function fi(e){let t=e.replace(/_/g,""),n=1;if((t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b"))return n*parseInt(t.slice(2),2);if(t.startsWith("0x"))return n*parseInt(t.slice(2),16);if(t.includes(":")){let r=0;for(const i of t.split(":"))r=r*60+Number(i);return n*r}return t!=="0"&&t[0]==="0"?n*parseInt(t,8):n*parseInt(t,10)}function pi(e){if(!ui.test(e))return P;const t=fi(e);return Number.isFinite(t)?t:P}var Pt=te("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:pi,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),di=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),hi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function gi(e){if(!di.test(e))return P;let t=e.toLowerCase();const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;const r=n*parseFloat(t);return Number.isFinite(r)||hi.test(e)?r:P}function mi(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Wn=te("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:gi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:mi}),Ai=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),yi=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ei(e,t){if(t){if(!yi.test(e))return P;let r=e.toLowerCase();const i=r[0]==="-"?-1:1;if("+-".includes(r[0])&&(r=r.slice(1)),r===".inf")return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(r===".nan")return NaN;const o=i*parseFloat(r);return Number.isFinite(o)?o:P}if(!Ai.test(e))return P;const n=Number(e);return Number.isFinite(n)?n:P}function Si(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ti=te("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Ei,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Si}),Ci=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),bi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vi(e){if(!Ci.test(e))return P;let t=e.toLowerCase().replace(/_/g,"");const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;let r=0;if(t.includes(":")){for(const i of t.split(":"))r=r*60+Number(i);r*=n}else r=n*parseFloat(t);return Number.isFinite(r)||bi.test(e)?r:P}function Ri(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ft=te("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:vi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ri}),Vn=te("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>e==="<<"||t&&e===""?Qt:P}),xi=/^[A-Za-z0-9+/]*={0,2}$/;function _i(e){const t=e.replace(/\s/g,"");if(t.length%4!==0||!xi.test(t))return P;const n=atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}function Ii(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Xn=te("tag:yaml.org,2002:binary",{resolve:_i,identify:e=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:Ii}),wi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ni=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function An(e,t,n,r=0,i=0,o=0,a=0){const s=new Date(Date.UTC(e,t,n,r,i,o,a));return s.setUTCFullYear(e,t,n),s}function Oi(e){let t=wi.exec(e);if(t===null&&(t=Ni.exec(e)),t===null)return P;const n=+t[1],r=+t[2]-1,i=+t[3];if(!t[4]){const c=An(n,r,i);return c.getUTCFullYear()!==n||c.getUTCMonth()!==r||c.getUTCDate()!==i?P:c}const o=+t[4],a=+t[5],s=+t[6];let l=0;if(o>23||a>59||s>59)return P;if(t[7]){let c=t[7].slice(0,3);for(;c.length<3;)c+="0";l=+c}const u=An(n,r,i,o,a,s,l);if(u.getUTCFullYear()!==n||u.getUTCMonth()!==r||u.getUTCDate()!==i)return P;if(t[9]){const c=+t[10],E=+(t[11]||0);if(c>23||E>59)return P;const m=(c*60+E)*6e4;u.setTime(u.getTime()-(t[9]==="-"?-m:m))}return u}var $i=te("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:Oi,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),ki=Zt("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function yt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var zn=Zt("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return"cannot resolve an ordered map item";n=t.keys().next().value}else if(yt(t)){const r=Object.keys(t);if(r.length!==1)return"cannot resolve an ordered map item";n=r[0]}else return"cannot resolve an ordered map item";return e.seen.has(n)?"duplicate key in ordered map":(e.seen.add(n),e.list.push(t),"")},finalize:e=>e.list}),Qn=Zt("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size!==1?"cannot resolve a pairs item":(e.push(t.entries().next().value),"");if(Object.prototype.toString.call(t)!=="[object Object]")return"cannot resolve a pairs item";const n=t,r=Object.keys(n);return r.length!==1?"cannot resolve a pairs item":(e.push([r[0],n[r[0]]]),"")}}),Li=At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(t!==null&&typeof t=="object")return"object-based map does not support complex keys";const r=String(t);return r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,""},has:(e,t)=>t!==null&&typeof t=="object"?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),Zn=At("tag:yaml.org,2002:set",{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{const t=new Map;for(const n of e)t.set(n,null);return t},addPair:(e,t,n)=>n!==null?"cannot resolve a set item":(e.add(t),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function Pi(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function Fi(){return{scalar:[],sequence:[],mapping:[]}}function Hi(e){const t=[];for(const n of e){let r=t.length;for(let i=0;i<t.length;i++){const o=t[i];if(o.nodeKind===n.nodeKind&&o.tagName===n.tagName&&o.matchByTagPrefix===n.matchByTagPrefix){r=i;break}}t[r]=n}return t}var Et=class Jn{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){const n=Hi(t),r=[],i=Pi(),o=Fi();for(const c of n){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");r.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?o.scalar.push(c):i.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?o.sequence.push(c):i.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?o.mapping.push(c):i.mapping[c.tagName]=c;break}}const a=r.filter(c=>c.implicitFirstChars===null),s=new Set;for(const c of r)if(c.implicitFirstChars!==null)for(const E of c.implicitFirstChars)s.add(E);const l=new Map;for(const c of s)l.set(c,r.filter(E=>E.implicitFirstChars===null||E.implicitFirstChars.indexOf(c)!==-1));const u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=n,this.implicitScalarTags=r,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=o}withTags(...t){let n=[];for(const r of t)n=n.concat(r);return new Jn([...this.tags,...n])}},Jt=new Et([Dr,ki,Li]);new Et([...Jt.tags,qr,Qr,ci,Ti]);var er=new Et([...Jt.tags,Kr,Vr,jn,Wn]),Mi=new Et([...Jt.tags,Yr,ei,Pt,Ft,$i,Vn,Xn,zn,Qn,Zn]);At("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||yt(e),represent:e=>{if(e instanceof Map)return e;const t=new Map,n=e;for(const r of Object.keys(n))t.set(r,n[r]);return t}});function yn(e){if(Array.isArray(e)){const t=Array.prototype.slice.call(e);for(let n=0;n<t.length;n++){if(Array.isArray(t[n]))return null;typeof t[n]=="object"&&Object.prototype.toString.call(t[n])==="[object Object]"&&(t[n]="[object Object]")}return String(t)}return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"?"[object Object]":String(e)}At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{const r=yn(t);return r===null?"nested arrays are not supported inside keys":(r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,"")},has:(e,t)=>{const n=yn(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}});var Bi={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function wt(e,t,n,r,i){let o="",a="";const s=Math.floor(i/2)-1;return r-t>s&&(o=" ... ",t=r-s+o.length),n-r>s&&(a=" ...",n=r+s-a.length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function Nt(e,t){return" ".repeat(Math.max(t-e.length,0))+e}function Di(e,t){if(!e.buffer)return null;const n={...Bi,...t},r=/\r?\n|\r|\0/g,i=[0],o=[];let a,s=-1;for(;a=r.exec(e.buffer);)o.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let l="";const u=Math.min(e.line+n.linesAfter,o.length).toString().length,c=n.maxLength-(n.indent+u+3);for(let m=1;m<=n.linesBefore&&!(s-m<0);m++){const T=wt(e.buffer,i[s-m],o[s-m],e.position-(i[s]-i[s-m]),c);l=`${" ".repeat(n.indent)}${Nt((e.line-m+1).toString(),u)} | ${T.str}
2
+ ${l}`}const E=wt(e.buffer,i[s],o[s],e.position,c);l+=`${" ".repeat(n.indent)}${Nt((e.line+1).toString(),u)} | ${E.str}
3
+ `,l+=`${"-".repeat(n.indent+u+3+E.pos)}^
4
+ `;for(let m=1;m<=n.linesAfter&&!(s+m>=o.length);m++){const T=wt(e.buffer,i[s+m],o[s+m],e.position-(i[s]-i[s+m]),c);l+=`${" ".repeat(n.indent)}${Nt((e.line+m+1).toString(),u)} | ${T.str}
5
+ `}return l.replace(/\n$/,"")}function En(e,t){let n="";return e.mark?(e.mark.name&&(n+=`in "${e.mark.name}" `),n+=`(${e.mark.line+1}:${e.mark.column+1})`,!t&&e.mark.snippet&&(n+=`
6
+
7
+ ${e.mark.snippet}`),`${e.reason} ${n}`):e.reason}var St=class extends Error{reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=En(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${En(this,e)}`}};function Tt(e,t,n,r=""){let i=0,o=0;for(let s=0;s<t;s++){const l=e.charCodeAt(s);l===10?(i++,o=s+1):l===13&&(i++,e.charCodeAt(s+1)===10&&s++,o=s+1)}const a={name:r,buffer:e,position:t,line:i,column:t-o};throw a.snippet=Di(a),new St(n,a)}var Ui=-1;function Sn(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
8
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}var tr=new Array(256),nr=new Array(256);for(let e=0;e<256;e++)tr[e]=Sn(e)?1:0,nr[e]=Sn(e);function Ki(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function qi(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function Gi(e){return e===120?2:e===117?4:8}function ut(e,t,n){let r=0;for(;t<n;){const i=e.charCodeAt(t);if(i===10)r++,t++;else if(i===13)r++,t++,e.charCodeAt(t)===10&&t++;else if(i===32||i===9)t++;else break}return{position:t,breaks:r}}function en(e){return e===1?" ":`
9
+ `.repeat(e-1)}function Yi(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===10||s===13){r+=e.slice(o,a);const l=ut(e,i,n);r+=en(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,a)}function ji(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===39)r+=e.slice(o,i)+"'",i+=2,o=a=i;else if(s===10||s===13){r+=e.slice(o,a);const l=ut(e,i,n);r+=en(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Wi(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===92){r+=e.slice(o,i),i++;const l=e.charCodeAt(i);if(l===10||l===13)i=ut(e,i,n).position;else if(l<256&&tr[l])r+=nr[l],i++;else{let u=Gi(l),c=0;for(;u>0;u--){i++;const E=qi(e.charCodeAt(i));c=(c<<4)+E}r+=Ki(c),i++}o=a=i}else if(s===10||s===13){r+=e.slice(o,a);const l=ut(e,i,n);r+=en(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Tn(e,t,n,r,i,o){const a=r<0?0:r,s=e.slice(t,n).replace(/\r\n?/g,`
10
+ `),l=s===""?[]:(s.endsWith(`
11
+ `)?s.slice(0,-1):s).split(`
12
+ `);let u="",c=!1,E=0,m=!1;for(const T of l){let S=0;for(;S<a&&T.charCodeAt(S)===32;)S++;if(r<0||S>=T.length){E++;continue}const w=T.slice(a),F=w.charCodeAt(0);o?F===32||F===9?(m=!0,u+=`
13
+ `.repeat(c?1+E:E)):m?(m=!1,u+=`
14
+ `.repeat(E+1)):E===0?c&&(u+=" "):u+=`
15
+ `.repeat(E):u+=`
16
+ `.repeat(c?1+E:E),u+=w,c=!0,E=0}return i===3?u+=`
17
+ `.repeat(c?1+E:E):i!==2&&c&&(u+=`
18
+ `),u}function Vi(e,t){if(t.valueStart===Ui)return"";const{valueStart:n,valueEnd:r}=t;if(t.fast)return e.slice(n,r);switch(t.style){case 2:return ji(e,n,r);case 3:return Wi(e,n,r);case 4:return Tn(e,n,r,t.indent,t.chomping,!1);case 5:return Tn(e,n,r,t.indent,t.chomping,!0);default:return Yi(e,n,r)}}var Xi=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});function Ot(e){return encodeURI(e).replace(/!/g,"%21")}function rr(e,t){if(e.startsWith("!<")&&e.endsWith(">"))return decodeURIComponent(e.slice(2,-1));const n=e.indexOf("!",1),r=n===-1?"!":e.slice(0,n+1),i=t?.[r]??Xi[r]??r;return decodeURIComponent(i)+decodeURIComponent(e.slice(r.length))}function ir(e){let t=e;return t.charCodeAt(0)===33?(t=t.slice(1),`!${Ot(t)}`):t.slice(0,18)==="tag:yaml.org,2002:"?`!!${Ot(t.slice(18))}`:`!<${Ot(t)}>`}var Fe=-1,tn={filename:"",schema:er,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function zi(e){return"tagStart"in e&&e.tagStart!==Fe?e.tagStart:"anchorStart"in e&&e.anchorStart!==Fe?e.anchorStart:"valueStart"in e&&e.valueStart!==Fe?e.valueStart:"start"in e?e.start:0}function oe(e,t){Tt(e.source,e.position,t,e.filename)}function or(e,t,n,r){try{return n.finalize(r)}catch(i){if(i instanceof St)throw i;Tt(e.source,t,i instanceof Error?i.message:String(i),e.filename)}}function st(e,t,n){const r=e[n];if(r)return r;for(const i of t)if(n.startsWith(i.tagName))return i}function Qi(e,t,n,r,i){const o=st(t,n,r);if(o)return o;oe(e,`unknown ${i} tag !<${r}>`)}function Zi(e,t){const n=Vi(e.source,t),r=t.tagStart===Fe?"":e.source.slice(t.tagStart,t.tagEnd),i=e.schema.defaultScalarTag;if(r!==""){if(r==="!")return{value:n,tag:i};const o=rr(r,e.tagHandlers),a=st(e.schema.exact.scalar,e.schema.prefix.scalar,o);if(a){const l=a.resolve(n,!0,o);return l===P&&oe(e,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}const s=st(e.schema.exact.mapping,e.schema.prefix.mapping,o)??st(e.schema.exact.sequence,e.schema.prefix.sequence,o);if(s){n!==""&&oe(e,`cannot resolve a node with !<${o}> explicit tag`);const l=s.create(o);return{value:s.carrierIsResult?l:or(e,e.position,s,l),tag:s}}oe(e,`unknown scalar tag !<${o}>`)}if(t.style===1){const o=e.schema.implicitScalarByFirstChar.get(n.charAt(0))??e.schema.implicitScalarAnyFirstChar;for(const a of o){const s=a.resolve(n,!1,a.tagName);if(s!==P)return{value:s,tag:a}}}return{value:i.resolve(n,!1,i.tagName),tag:i}}function Cn(e,t,n,r,i,o){const a=t.tagStart===Fe?"":e.source.slice(t.tagStart,t.tagEnd),s=a===""||a==="!"?i:rr(a,e.tagHandlers);return{tagName:s,tag:Qi(e,n,r,s,o)}}function ar(e){return e.nodeKind==="mapping"}function bn(e,t,n,r){for(const i of r.keys(n)){if(e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&oe(e,`merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`),t.tag.has(t.value,i))continue;const o=t.tag.addPair(t.value,i,r.get(n,i));o&&oe(e,o),(t.overridable??=new Set).add(i)}}function Ji(e,t,n,r){if(e.position=t.keyPosition,ar(r))bn(e,t,n,r);else if(r.nodeKind==="sequence"&&Array.isArray(n))for(const i of n)bn(e,t,i,t.tag);else oe(e,"cannot merge mappings; the provided source object is unacceptable")}function eo(e,t,n,r,i){if(e.position=t.keyPosition,n===Qt){Ji(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!t.overridable?.has(n)&&oe(e,"duplicated mapping key");const o=t.tag.addPair(t.value,n,r);o&&oe(e,o),t.overridable?.delete(n)}function $t(e,t,n){const r=e.frames[e.frames.length-1];if(r.kind==="document")r.value=t,r.hasValue=!0;else if(r.kind==="sequence"){r.merge&&(ar(n)||oe(e,"cannot merge mappings; the provided source object is unacceptable"));const i=r.tag.addItem(r.value,t,r.index++);i&&oe(e,i)}else if(r.hasKey){const i=r.key;r.key=void 0,r.hasKey=!1,eo(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0}function kt(e,t,n,r,i){if(t.anchorStart!==Fe){const o={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),o),o}return null}function to(e,t){const n={...tn,...t,events:e,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;n.eventIndex<n.events.length;){const r=n.events[n.eventIndex++];switch(n.position=zi(r),r.type){case 1:n.anchors=new Map,n.aliasCount=0,n.tagHandlers=Object.create(null);for(const i of r.directives)i.kind==="tag"&&(n.tagHandlers[i.handle]=i.prefix);n.frames.push({kind:"document",position:n.position,value:void 0,hasValue:!1});break;case 4:{const{value:i,tag:o}=Zi(n,r);kt(n,r,i,o,!0),$t(n,i,o);break}case 2:{const i=Cn(n,r,n.schema.exact.sequence,n.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),o=i.tag.create(i.tagName),a=kt(n,r,o,i.tag,i.tag.carrierIsResult),s=n.frames[n.frames.length-1],l=s!==void 0&&s.kind==="mapping"&&s.hasKey&&s.key===Qt;n.frames.push({kind:"sequence",position:n.position,value:o,tag:i.tag,anchor:a,index:0,merge:l});break}case 3:{const i=Cn(n,r,n.schema.exact.mapping,n.schema.prefix.mapping,"tag:yaml.org,2002:map","mapping"),o=i.tag.create(i.tagName),a=kt(n,r,o,i.tag,i.tag.carrierIsResult);n.frames.push({kind:"mapping",position:n.position,value:o,tag:i.tag,anchor:a,key:void 0,keyPosition:n.position,hasKey:!1,overridable:null});break}case 5:{n.maxAliases!==-1&&++n.aliasCount>n.maxAliases&&oe(n,`aliases exceeded maxAliases (${n.maxAliases})`);const i=n.source.slice(r.anchorStart,r.anchorEnd),o=n.anchors.get(i);o||oe(n,`unidentified alias "${i}"`),o.isValueFinal||oe(n,`recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),$t(n,o.value,o.tag);break}case 6:{const i=n.frames.pop();if(i.kind==="mapping"&&i.hasKey&&(n.position=i.keyPosition,oe(n,"incomplete mapping pair in event stream")),i.kind==="document")n.documents.push(i.value);else{const o=i.tag.carrierIsResult?i.value:or(n,i.position,i.tag,i.value);i.anchor&&(i.anchor.value=o,i.anchor.isValueFinal=!0),$t(n,o,i.tag)}break}}}return n.documents}var H=-1,sr=Object.prototype.hasOwnProperty,De=1,Mt=2,lr=3,ft=4,no=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ro=/[,\[\]{}]/,cr=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Bt=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,ur=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,io=new RegExp(`^(?:${Bt})*$`),oo=new RegExp(`^(?:${ur})+$`),ao=new RegExp(`^(?:!(?:${Bt})*|${ur}(?:${Bt})*)$`),nn={filename:"",maxDepth:100};function so(e,t,n){e.events.push({type:1,explicitStart:t,explicitEnd:n,directives:e.directives})}function fr(e,t,n,r,i,o,a){e.events.push({type:2,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:o,style:a})}function Dt(e,t,n,r,i,o,a){e.events.push({type:3,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:o,style:a})}function vn(e,t){e.events.splice(t.eventsLength,0,{type:3,start:t.position,anchorStart:H,anchorEnd:H,tagStart:H,tagEnd:H,style:2})}function Ke(e,t,n,r,i,o,a,s,l=1,u=-1,c=!1){e.events.push({type:4,valueStart:t,valueEnd:n,anchorStart:r,anchorEnd:i,tagStart:o,tagEnd:a,style:s,chomping:l,indent:u,fast:c})}function lo(e,t,n){e.events.push({type:5,anchorStart:t,anchorEnd:n})}function He(e){e.events.push({type:6})}function re(e){Ke(e,H,H,H,H,H,H,1)}function Rn(){return{anchorStart:H,anchorEnd:H,tagStart:H,tagEnd:H}}function ze(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,eventsLength:e.events.length}}function Me(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.events.length=t.eventsLength}function I(e,t){Tt(e.input.slice(0,e.length),e.position,t,e.filename)}function Q(e){return e===10||e===13}function $e(e){return e===9||e===32}function de(e){return $e(e)||Q(e)}function ye(e){return e===0||de(e)}function ke(e){return e===44||e===91||e===93||e===123||e===125}function co(e){return e>=48&&e<=57?e-48:-1}function uo(e){if(e>=48&&e<=57)return e-48;const t=e|32;return t>=97&&t<=102?t-97+10:-1}function fo(e){return e===120?2:e===117?4:e===85?8:0}function po(e){return e===48||e===97||e===98||e===116||e===9||e===110||e===118||e===102||e===114||e===101||e===32||e===34||e===47||e===92||e===78||e===95||e===76||e===80}function pt(e){e.input.charCodeAt(e.position)===10?e.position++:(e.position++,e.input.charCodeAt(e.position)===10&&e.position++),e.line++,e.lineStart=e.position,e.lineIndent=0,e.firstTabInLine=-1}function ie(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||de(e.input.charCodeAt(e.position-1));for(;r!==0;){for(;$e(r);)i=!0,r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&i&&r===35)do r=e.input.charCodeAt(++e.position);while(!Q(r)&&r!==0);if(!Q(r))break;for(pt(e),n++,i=!0,r=e.input.charCodeAt(e.position);r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return n}function Ne(e,t=e.position){const n=e.input.charCodeAt(t);if((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)){const r=e.input.charCodeAt(t+3);return r===0||de(r)}return!1}function xn(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!Q(t);)t=e.input.charCodeAt(++e.position)}function pr(e,t,n){no.test(e.input.slice(t,n))&&I(e,"the stream contains non-printable characters")}function ho(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==H&&I(e,"duplication of a tag property");const r=e.position;let i=!1,o=!1,a="!",s=e.input.charCodeAt(++e.position);s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33&&(o=!0,a="!!",s=e.input.charCodeAt(++e.position));let l=e.position,u;if(i){for(;s!==0&&s!==62;)s=e.input.charCodeAt(++e.position);s!==62&&I(e,"unexpected end of the stream within a verbatim tag"),u=e.input.slice(l,e.position),e.position++}else{for(;s!==0&&!de(s)&&!(n&&ke(s));)s===33&&(o?I(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(l-1,e.position+1),cr.test(a)||I(e,"named tag handle cannot contain such characters"),o=!0,l=e.position+1)),s=e.input.charCodeAt(++e.position);u=e.input.slice(l,e.position),ro.test(u)&&I(e,"tag suffix cannot contain flow indicator characters")}return u&&!(i?io.test(u):oo.test(u))&&I(e,`tag name cannot contain such characters: ${u}`),!i&&a!=="!"&&a!=="!!"&&!sr.call(e.tagHandlers,a)&&I(e,`undeclared tag handle "${a}"`),t.tagStart=r,t.tagEnd=e.position,!0}function go(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==H&&I(e,"duplication of an anchor property"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position))&&!ke(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&I(e,"name of an anchor node must contain at least one character"),t.anchorStart=n,t.anchorEnd=e.position,!0}function mo(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==H||t.tagStart!==H)&&I(e,"alias node should not have any properties"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position))&&!ke(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&I(e,"name of an alias node must contain at least one character"),lo(e,n,e.position),!0}function Ut(e,t){ie(e,!1),e.lineIndent<t&&I(e,"deficient indentation")}function Ao(e,t,n){if(e.input.charCodeAt(e.position)!==39)return!1;e.position++;const r=e.position;let i=!0;for(;e.input.charCodeAt(e.position)!==0;){const o=e.input.charCodeAt(e.position);if(o===39){if(e.input.charCodeAt(e.position+1)===39){i=!1,e.position+=2;continue}const a=e.position;return e.position++,Ke(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2,1,-1,i),!0}Q(o)?(i=!1,Ut(e,t)):e.position===e.lineStart&&Ne(e)?I(e,"unexpected end of the document within a single quoted scalar"):o!==9&&o<32?I(e,"expected valid JSON character"):e.position++}I(e,"unexpected end of the stream within a single quoted scalar")}function yo(e,t,n){if(e.input.charCodeAt(e.position)!==34)return!1;e.position++;const r=e.position;let i=!0;for(;e.input.charCodeAt(e.position)!==0;){const o=e.input.charCodeAt(e.position);if(o===34){const a=e.position;return e.position++,Ke(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,3,1,-1,i),!0}if(o===92){i=!1;const a=e.input.charCodeAt(++e.position);if(Q(a))Ut(e,t);else if(po(a))e.position++;else{let s=fo(a);for(s===0&&I(e,"unknown escape sequence");s-- >0;)e.position++,uo(e.input.charCodeAt(e.position))<0&&I(e,"expected hexadecimal character");e.position++}}else Q(o)?(i=!1,Ut(e,t)):e.position===e.lineStart&&Ne(e)?I(e,"unexpected end of the document within a double quoted scalar"):o!==9&&o<32?I(e,"expected valid JSON character"):e.position++}I(e,"unexpected end of the stream within a double quoted scalar")}function Eo(e,t,n){const r=e.input.charCodeAt(e.position);let i=1,o=-1,a=!1;if(r!==124&&r!==62)return!1;const s=r===124?4:5;for(e.position++;e.input.charCodeAt(e.position)!==0;){const T=e.input.charCodeAt(e.position),S=co(T);if(T===43||T===45)i!==1&&I(e,"repeat of a chomping mode identifier"),i=T===43?3:2,e.position++;else if(S>=0)S===0&&I(e,"bad explicit indentation width of a block scalar; it cannot be less than one"),a&&I(e,"repeat of an indentation width identifier"),o=t+S-1,a=!0,e.position++;else break}let l=!1;for(;$e(e.input.charCodeAt(e.position));)l=!0,e.position++;l&&e.input.charCodeAt(e.position)===35&&xn(e),Q(e.input.charCodeAt(e.position))?pt(e):e.input.charCodeAt(e.position)!==0&&I(e,"a line break is expected");let u=a?o:-1,c=0;const E=e.position;let m=e.position;for(;e.input.charCodeAt(e.position)!==0;){const T=e.position;let S=0;for(;e.input.charCodeAt(T+S)===32;)S++;const w=e.input.charCodeAt(T+S);if(w===0){u>=0?S>u&&(m=T+S):S>0&&(m=T+S);break}if(T===e.lineStart&&Ne(e,T))break;if(!a&&u===-1&&Q(w)&&(c=Math.max(c,S)),!a&&u===-1&&!Q(w)&&(w===9&&S<t&&(e.position=T+S,I(e,"tab characters must not be used in indentation")),S<c&&(e.position=T+S,I(e,"bad indentation of a mapping entry"))),u===-1&&w!==0&&!Q(w)&&S<t){e.lineIndent=S,e.position=T+S;break}!a&&w!==0&&!Q(w)&&u===-1&&(u=S);const F=u===-1?t+1:u;if(w!==0&&!Q(w)&&S<F){e.lineIndent=S,e.position=T+S;break}xn(e),m=e.position,Q(e.input.charCodeAt(e.position))&&(pt(e),m=e.position)}return pr(e,E,m),Ke(e,E,m,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,s,i,u),!0}function So(e,t){const n=e.input.charCodeAt(e.position),r=t===De;if(n===0||de(n)||n===35||n===38||n===42||n===33||n===124||n===62||n===39||n===34||n===37||n===64||n===96||r&&ke(n))return!1;if(n===63||n===45){const i=e.input.charCodeAt(e.position+1);if(ye(i)||r&&ke(i))return!1}return!0}function To(e,t,n,r){if(!So(e,n))return!1;const i=e.position;let o=e.position,a=e.input.charCodeAt(e.position);const s=n===De;let l=!1;for(;a!==0&&!(e.position===e.lineStart&&Ne(e));){if(a===58){const u=e.input.charCodeAt(e.position+1);if(ye(u)||s&&ke(u))break}else if(a===35){if(de(e.input.charCodeAt(e.position-1)))break}else{if(s&&ke(a))break;if(Q(a)){const u=e.position,c=e.line,E=e.lineStart,m=e.lineIndent;if(ie(e,!1),e.lineIndent>=t){l=!0,a=e.input.charCodeAt(e.position);continue}e.position=u,e.line=c,e.lineStart=E,e.lineIndent=m;break}}$e(a)||(o=e.position+1),a=e.input.charCodeAt(++e.position)}return o===i?!1:(pr(e,i,o),Ke(e,i,o,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1,1,-1,!l),!0)}function Ge(e,t){const n=e.line;ie(e,!0),(e.line>n&&e.lineIndent<t||e.firstTabInLine!==-1&&e.lineIndent<t)&&I(e,"deficient indentation")}function Co(e,t,n){const r=e.input.charCodeAt(e.position),i=r===123,o=e.position;let a=!0;if(r!==91&&r!==123)return!1;const s=i?125:93;for(i?Dt(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2):fr(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2),e.position++;e.input.charCodeAt(e.position)!==0;){Ge(e,t);let l=e.input.charCodeAt(e.position);if(l===s)return e.position++,He(e),!0;a?l===44&&I(e,"expected the node content, but found ','"):I(e,"missed comma between flow collection entries");let u=!1,c=!1;l===63&&de(e.input.charCodeAt(e.position+1))&&(u=c=!0,e.position+=1,Ge(e,t));const E=e.line,m=ze(e),T=Oe(e,t,De,!1,!0);Ge(e,t),l=e.input.charCodeAt(e.position),(i||c||e.line===E)&&l===58?(u=!0,e.position++,Ge(e,t),i||vn(e,m),T||re(e),Oe(e,t,De,!1,!0)||re(e),Ge(e,t),i||He(e)):i&&u?(T||re(e),re(e)):i?re(e):u&&(vn(e,m),T||re(e),re(e),He(e)),l=e.input.charCodeAt(e.position),l===44?(a=!0,e.position++):a=!1}I(e,"unexpected end of the stream within a flow collection")}function _n(e,t,n){if(e.firstTabInLine!==-1||e.input.charCodeAt(e.position)!==45||!ye(e.input.charCodeAt(e.position+1)))return!1;for(fr(e,e.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1);e.input.charCodeAt(e.position)===45&&ye(e.input.charCodeAt(e.position+1));){e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation"));const r=e.line;e.position++;const i=ie(e,!0)>0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&ye(e.input.charCodeAt(e.position+1))&&I(e,"bad indentation of a sequence entry"),i&&e.lineIndent<=t?re(e):Oe(e,t,lr,!1,!0),ie(e,!0),e.lineIndent<t||e.position>=e.length)break;e.lineIndent>t&&I(e,"bad indentation of a sequence entry"),e.line===r&&e.input.charCodeAt(e.position)===45&&ye(e.input.charCodeAt(e.position+1))&&I(e,"bad indentation of a sequence entry")}return He(e),!0}function Lt(e,t,n,r){let i=!1,o=!1,a=!1,s=!1;if(e.firstTabInLine!==-1)return!1;let l=e.input.charCodeAt(e.position);for(;l!==0;){!i&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation"));const u=e.input.charCodeAt(e.position+1),c=e.line;if((l===63||l===58)&&ye(u))a||(Dt(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0),l===63?(i&&re(e),o=!0,i=!0):(i||(re(e),o=!0),i=!1),e.position+=1,s=!0;else{i&&(re(e),i=!1);const E=ze(e);if(!Oe(e,n,Mt,!1,!0))break;if(e.line===c){for(l=e.input.charCodeAt(e.position);$e(l);)l=e.input.charCodeAt(++e.position);if(l===58){if(l=e.input.charCodeAt(++e.position),ye(l)||I(e,"a whitespace character is expected after the key-value separator within a block mapping"),!a){for(Me(e,E),Dt(e,E.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0,Oe(e,n,Mt,!1,!0),l=e.input.charCodeAt(e.position);$e(l);)l=e.input.charCodeAt(++e.position);e.position++}o=!0,i=!1,s=!1}else if(o)I(e,"expected ':' after a mapping key");else return r.anchorStart!==H||r.tagStart!==H?(Me(e,E),!1):!0}else if(o)I(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.anchorStart!==H||r.tagStart!==H?(Me(e,E),!1):!0}if(Oe(e,t,ft,!0,s)&&(s=!1),i||s&&(re(e),s=!1),ie(e,!0),l=e.input.charCodeAt(e.position),(e.line===c||e.lineIndent>t)&&l!==0)I(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return o?(i&&re(e),a&&He(e),!0):!1}function Oe(e,t,n,r,i,o=!0){e.depth>=e.maxDepth&&I(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let a=1,s=!1,l=!1,u=null;const c=Rn();let E=n===ft||n===lr,m=E;const T=E;if(r&&ie(e,!0)&&(s=!0,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1),a===1)for(;;){const S=e.input.charCodeAt(e.position),w=ze(e);if(s&&a!==1&&(S===33||S===38))break;if(s&&T&&(c.tagStart!==H||c.anchorStart!==H)&&(S===33||S===38)){const F=ze(e),N=t+1;if(Lt(e,e.position-e.lineStart,N,c)&&e.events[F.eventsLength]?.type===3)return e.depth--,!0;Me(e,F)}if(s&&(S===33&&c.tagStart!==H||S===38&&c.anchorStart!==H)||!ho(e,c,n===De)&&!go(e,c))break;u===null&&(u=w),ie(e,!0)?(s=!0,m=T,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1):m=!1}if(m&&(m=s||i),a===1||n===ft){const S=n===De||n===Mt?t:t+1,w=e.position-e.lineStart;if(a===1)if(m&&(_n(e,w,c)||Lt(e,w,S,c))||Co(e,S,c))l=!0;else{const F=e.input.charCodeAt(e.position);if(u!==null&&o&&T&&!m&&F!==124&&F!==62){const N=ze(e),y=u.position-u.lineStart;Me(e,u),Lt(e,y,S,Rn())&&e.events[N.eventsLength]?.type===3?l=!0:Me(e,N)}!l&&(E&&Eo(e,S,c)||Ao(e,S,c)||yo(e,S,c)||mo(e,c)||To(e,S,n,c))&&(l=!0)}else a===0&&(l=m&&_n(e,w,c))}return E=E&&!l,!l&&(c.anchorStart!==H||c.tagStart!==H||E)&&(Ke(e,H,H,c.anchorStart,c.anchorEnd,c.tagStart,c.tagEnd,1),l=!0),e.depth--,l||c.anchorStart!==H||c.tagStart!==H}function bo(e){if(e.lineIndent>0||e.input.charCodeAt(e.position)!==37)return!1;e.position++;const t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position));)e.position++;const n=e.input.slice(t,e.position),r=[];for(n.length===0&&I(e,"directive name must not be less than one character in length");e.input.charCodeAt(e.position)!==0&&!Q(e.input.charCodeAt(e.position));){for(;$e(e.input.charCodeAt(e.position));)e.position++;if(e.input.charCodeAt(e.position)===35||Q(e.input.charCodeAt(e.position))||e.input.charCodeAt(e.position)===0)break;const i=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(i,e.position))}if(Q(e.input.charCodeAt(e.position))&&pt(e),n==="YAML"){e.directives.some(o=>o.kind==="yaml")&&I(e,"duplication of %YAML directive"),r.length!==1&&I(e,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);i===null&&I(e,"ill-formed argument of the YAML directive"),parseInt(i[1],10)!==1&&I(e,"unacceptable YAML version of the document"),e.directives.push({kind:"yaml",version:r[0]})}else if(n==="TAG"){r.length!==2&&I(e,"TAG directive accepts exactly two arguments");const[i,o]=r;cr.test(i)||I(e,"ill-formed tag handle (first argument) of the TAG directive"),sr.call(e.tagHandlers,i)&&I(e,`there is a previously declared suffix for "${i}" tag handle`),ao.test(o)||I(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagHandlers[i]=o,e.directives.push({kind:"tag",handle:i,prefix:o})}return!0}function vo(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(ie(e,!0);bo(e);)t=!0,ie(e,!0);let n=!1,r=!1,i=!0;if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45&&ye(e.input.charCodeAt(e.position+3))){n=!0;const s=e.line;e.position+=3,ie(e,!0),i=e.line>s}else t&&I(e,"directives end mark is expected");const o=e.events.length;if(!n&&e.position===e.lineStart&&e.input.charCodeAt(e.position)===46&&Ne(e)){e.position+=3,ie(e,!0);return}if(so(e,n,!1),Oe(e,e.lineIndent-1,ft,!1,i,i)||re(e),ie(e,!0),e.position===e.lineStart&&Ne(e)&&(r=e.input.charCodeAt(e.position)===46,r)){const s=e.line;e.position+=3,ie(e,!0),e.line===s&&e.position<e.length&&I(e,"end of the stream or a document separator is expected")}const a=e.events[o];a?.type===1&&(a.explicitEnd=r),He(e),!r&&e.position<e.length&&!(e.position===e.lineStart&&Ne(e))&&I(e,"end of the stream or a document separator is expected")}function Ro(e,t){const n=e.length,r={...nn,...t,input:`${e}\0`,length:n,position:0,line:0,lineStart:0,lineIndent:0,firstTabInLine:-1,depth:0,directives:[],tagHandlers:Object.create(null),events:[]},i=e.indexOf("\0");for(i!==-1&&Tt(e,i,"null byte is not allowed in input",r.filename),r.input.charCodeAt(r.position)===65279&&r.position++;r.position<r.length&&(ie(r,!0),!(r.position>=r.length));){const o=r.position;vo(r),r.position===o&&I(r,"can not read a document")}return r.events}var xo={...nn,...tn};function _o(e,t={}){const n={...xo,...t},r=String(e),i=Object.keys(nn),o=Object.keys(tn);return to(Ro(r,Ht(n,i)),{...Ht(n,o),source:r})}function Io(e,t,n){let r=null;typeof t=="function"?r=t:t!==null&&typeof t=="object"&&(n=t);const i=_o(e,n);if(r===null)return i;for(const o of i)r(o)}var ot=class{tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},_e=Symbol("INVALID");function wo(e){const t=new Set([e.defaultScalarTag,e.defaultSequenceTag,e.defaultMappingTag].filter(o=>o!==void 0)),n=e.implicitScalarTags,r=e.tags.filter(o=>!(o.nodeKind==="scalar"&&o.implicit)&&!t.has(o)),i=e.tags.filter(o=>t.has(o));return[...n.map(o=>({tag:o,implicitTag:!0})),...r.map(o=>({tag:o,implicitTag:!1})),...i.map(o=>({tag:o,implicitTag:!0}))]}function No(e,t){for(let n=0,r=e.representTypes.length;n<r;n+=1){const{tag:i,implicitTag:o}=e.representTypes[n];if(i.identify&&i.identify(t)){let a;return i.matchByTagPrefix&&i.representTagName?a=i.representTagName(t):a=i.tagName,{tag:i,tagName:a,implicitTag:o}}}return null}function je(e,t){if(!e.noRefs&&t!==null&&typeof t=="object"){const c=e.refs.get(t);if(c)return c.anchor===void 0&&(c.anchor=`ref_${e.refCounter++}`),{kind:"alias",tag:"",style:new ot,anchor:c.anchor}}const n=No(e,t);if(!n){if(t===void 0||e.skipInvalid)return _e;throw new St(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`)}const{tag:r,tagName:i,implicitTag:o}=n,a=o?i:ir(i);if(r.nodeKind==="scalar"){const c=new ot;return c.tagged=!o,{kind:"scalar",tag:a,style:c,value:r.represent(t)}}if(r.nodeKind==="sequence"){const c=r.represent(t),E=new ot;E.tagged=!o;const m={kind:"sequence",tag:a,style:E,items:[]};e.noRefs||e.refs.set(t,m);for(let T=0,S=c.length;T<S;T+=1){let w=je(e,c[T]);w===_e&&c[T]===void 0&&(w=je(e,null)),w!==_e&&m.items.push(w)}return m}const s=r.represent(t),l=new ot;l.tagged=!o;const u={kind:"mapping",tag:a,style:l,items:[]};e.noRefs||e.refs.set(t,u);for(const[c,E]of s){const m=je(e,c);if(m===_e)continue;const T=je(e,E);T!==_e&&u.items.push({key:m,value:T})}return u}function Oo(e,t,n={}){const r=je({representTypes:wo(t),noRefs:n.noRefs??!1,skipInvalid:n.skipInvalid??!1,refs:new Map,refCounter:0},e);return[{contents:r===_e?null:r,directives:[]}]}var $o=Symbol("visit:break"),dr=Symbol("visit:skip");function lt(e,t,n){const r=t(e,n);if(r===$o)return!0;if(r===dr)return!1;const i=n.depth+1;switch(e.kind){case"sequence":for(const o of e.items)if(lt(o,t,{depth:i,parent:e,isKey:!1}))return!0;break;case"mapping":for(const{key:o,value:a}of e.items)if(lt(o,t,{depth:i,parent:e,isKey:!0})||lt(a,t,{depth:i,parent:e,isKey:!1}))return!0;break}return!1}function ko(e,t){for(const n of e)if(n.contents&&lt(n.contents,t,{depth:0,parent:null,isKey:!1}))return}var rn=65279,Lo=9,Le=10,hr=13,Po=32,Fo=33,gr=34,Kt=35,Ho=37,Mo=38,mr=39,Bo=42,qt=44,on=45,Ze=58,Do=61,Uo=62,Ar=63,Ko=64,Gt=91,Yt=93,qo=96,jt=123,Go=124,Wt=125,ne={};ne[0]="\\0";ne[7]="\\a";ne[8]="\\b";ne[9]="\\t";ne[10]="\\n";ne[11]="\\v";ne[12]="\\f";ne[13]="\\r";ne[27]="\\e";ne[34]='\\"';ne[92]="\\\\";ne[133]="\\N";ne[160]="\\_";ne[8232]="\\L";ne[8233]="\\P";var an={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};function Yo(e){return e.style.tagged?e.tag:ir(e.tag)}function jo(e){const t={...an,...e};return{...t,defaultScalarTagName:t.schema.defaultScalarTag.tagName,implicitResolvers:t.schema.implicitScalarTags}}function Wo(e){const t=e.toString(16).toUpperCase(),n=e<=255?"x":"u",r=e<=255?2:4;return`\\${n}${"0".repeat(r-t.length)}${t}`}function In(e,t){const n=" ".repeat(t);let r=0,i="";const o=e.length;for(;r<o;){let a;const s=e.indexOf(`
19
+ `,r);s===-1?(a=e.slice(r),r=o):(a=e.slice(r,s+1),r=s+1),a.length&&a!==`
20
+ `&&(i+=n),i+=a}return i}function Vt(e,t){return`
21
+ ${" ".repeat(e.indent*t)}`}function Vo(e,t){const n=e.indent*Math.max(1,t);return{indent:n,blockIndent:t===0?e.indent+1:e.indent,lineWidth:e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n)}}function wn(e,t){for(let n=0,r=e.implicitResolvers.length;n<r;n+=1){const i=e.implicitResolvers[n];if(i.resolve(t,!1,i.tagName)!==P)return i.tagName}return e.defaultScalarTagName}function Ue(e){return e===Po||e===Lo}function Xo(e){const t=e.charCodeAt(0);if(t!==on&&t!==46||e.charCodeAt(1)!==t||e.charCodeAt(2)!==t)return!1;if(e.length===3)return!0;const n=e.charCodeAt(3);return Ue(n)||n===hr||n===Le}function Je(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==rn||e>=65536&&e<=1114111}function Nn(e){return Je(e)&&e!==rn&&e!==hr&&e!==Le}function Xt(e,t,n){const r=Nn(e),i=r&&!Ue(e);return(n?r:r&&e!==qt&&e!==Gt&&e!==Yt&&e!==jt&&e!==Wt)&&e!==Kt&&!(t===Ze&&!i)||Nn(t)&&!Ue(t)&&e===Kt||t===Ze&&i&&(n||e!==qt&&e!==Gt&&e!==Yt&&e!==jt&&e!==Wt)}function zo(e){return Je(e)&&e!==rn&&!Ue(e)&&e!==on&&e!==Ar&&e!==Ze&&e!==qt&&e!==Gt&&e!==Yt&&e!==jt&&e!==Wt&&e!==Kt&&e!==Mo&&e!==Bo&&e!==Fo&&e!==Go&&e!==Do&&e!==Uo&&e!==mr&&e!==gr&&e!==Ho&&e!==Ko&&e!==qo}function Qo(e,t){const n=Be(e,0);if(zo(n))return!0;if(e.length>1&&(n===on||n===Ar||n===Ze)){const r=Be(e,1);return!Ue(r)&&Xt(r,n,t)}return!1}function Zo(e){return!Ue(e)&&e!==Ze}function Be(e,t){const n=e.charCodeAt(t);let r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function yr(e){return/^\n* /.test(e)}var et=1,Qe=2,sn=3,ln=4,be=5;function Jo(e,t,n,r,i,o){const{blockIndent:a,lineWidth:s}=n;let l,u=0,c=-1,E=!1,m=!1;const T=s!==-1;let S=-1,w=!Xo(t)&&Qo(t,o)&&Zo(Be(t,t.length-1));if(r||i)for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=Be(t,l),!Je(u))return be;w=w&&Xt(u,c,o),c=u}else{for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=Be(t,l),u===Le)E=!0,T&&(m=m||l-S-1>s&&!tt(t[S+1]),S=l);else if(!Je(u))return be;w=w&&Xt(u,c,o),c=u}m=m||T&&l-S-1>s&&!tt(t[S+1])}return!E&&!m?w&&!i?et:e.quoteStyle==="double"?be:Qe:a>9&&yr(t)?be:m?ln:sn}function ea(e,t,n){const{indent:r,blockIndent:i,lineWidth:o}=n;switch(t){case et:return $n(e,r);case Qe:return`'${$n(e,r).replace(/'/g,"''")}'`;case sn:return"|"+On(e,i)+kn(In(e,r));case ln:return">"+On(e,i)+kn(In(na(e,o),r));case be:return`"${ra(e)}"`}}function ta(e,t,n,r,i){const o=r||!i;if(t.style.singleQuoted)return Qe;if(t.style.doubleQuoted)return be;if(!o){if(t.style.literal)return sn;if(t.style.folded)return ln}const a=t.value;if(a.length===0)return t.style.tagged||wn(e,a)===t.tag?et:e.quoteStyle==="double"?be:Qe;const s=Jo(e,a,n,o,e.forceQuotes&&!r,i);return s===et&&!t.style.tagged&&wn(e,a)!==t.tag?e.quoteStyle==="double"?be:Qe:s}function On(e,t){const n=yr(e)?String(t):"",r=e[e.length-1]===`
22
+ `;return`${n}${r&&(e[e.length-2]===`
23
+ `||e===`
24
+ `)?"+":r?"":"-"}
25
+ `}function $n(e,t){let n=e.indexOf(`
26
+ `);if(n===-1)return e;const r=" ".repeat(t);let i=e.slice(0,n);const o=/(\n+)([^\n]*)/g;o.lastIndex=n;let a;for(;a=o.exec(e);){const s=a[1].length,l=a[2];i+=`
27
+ `.repeat(s+1)+r+l}return i}function kn(e){return e[e.length-1]===`
28
+ `?e.slice(0,-1):e}function tt(e){return e===" "||e===" "}function na(e,t){const n=/(\n+)([^\n]*)/g;let r=e.indexOf(`
29
+ `);r===-1&&(r=e.length),n.lastIndex=r;let i=Ln(e.slice(0,r),t),o=e[0]===`
30
+ `||tt(e[0]),a,s;for(;s=n.exec(e);){const l=s[1],u=s[2];a=u!==""&&tt(u[0]),i+=l+(!o&&!a&&u!==""?`
31
+ `:"")+Ln(u,t),o=a}return i}function Ln(e,t){if(e===""||tt(e[0]))return e;const n=/ [^ \t]/g;let r,i=0,o,a=0,s=0,l="";for(;r=n.exec(e);)s=r.index,s-i>t&&(o=a>i?a:s,l+=`
32
+ ${e.slice(i,o)}`,i=o+1),a=s;return l+=`
33
+ `,e.length-i>t&&a>i?l+=`${e.slice(i,a)}
34
+ ${e.slice(a+1)}`:l+=e.slice(i),l.slice(1)}function ra(e){let t="",n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=Be(e,r);const i=ne[n];if(i){t+=i;continue}if(Je(n)){t+=e[r],n>=65536&&(t+=e[r+1]);continue}t+=Wo(n)}return t}function ia(e,t,n){let r="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Ee(e,t,n.items[o],{});r!==""&&(r+=`,${e.flowSkipCommaSpace?"":" "}`),r+=s}const i=e.flowBracketPadding&&r!==""?" ":"";return`[${i}${r}${i}]`}function Pn(e,t,n,r){let i="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Ee(e,t+1,n.items[o],{block:!0,compact:e.seqInlineFirst,isblockseq:!0});(!r||i!=="")&&(i+=Vt(e,t)),s===""||Le===s.charCodeAt(0)?i+="-":i+="- ",i+=s}return i}function oa(e,t,n){let r="";const i=Er(e,n.items);for(const{key:a,value:s}of i){let l="";r!==""&&(l+=`,${e.flowSkipCommaSpace?"":" "}`);const u=Ee(e,t,a,{iskey:!0}),c=u.length>1024;c?l+="? ":e.quoteFlowKeys&&(l+='"');const E=Ee(e,t,s,{}),m=e.flowSkipColonSpace||E===""?"":" ";l+=`${u}${e.quoteFlowKeys&&!c?'"':""}:${m}${E}`,r+=l}const o=e.flowBracketPadding&&r!==""?" ":"";return`{${o}${r}${o}}`}function at(e){return e.kind==="scalar"?e.value:e}function Er(e,t){if(!e.sortKeys)return t;const n=t.slice();if(e.sortKeys===!0)n.sort((r,i)=>{const o=at(r.key),a=at(i.key);return o<a?-1:o>a?1:0});else{const r=e.sortKeys;n.sort((i,o)=>r(at(i.key),at(o.key)))}return n}function aa(e,t,n,r){let i="";const o=Er(e,n.items);for(let a=0,s=o.length;a<s;a+=1){let l="";(!r||i!=="")&&(l+=Vt(e,t));const{key:u,value:c}=o[a],E=(u.kind==="mapping"||u.kind==="sequence")&&!u.style.flow&&u.items.length!==0||u.kind==="scalar"&&(u.style.literal||u.style.folded),m=E?Ee(e,t+1,u,{block:!0,compact:!0,isblockseq:!zt(e,u,t+1)}):Ee(e,t+1,u,{block:!0,compact:!0,iskey:!0}),T=u.kind==="scalar"&&u.value.indexOf(`
35
+ `)!==-1,S=E||T||m.length>1024;S&&(m&&Le===m.charCodeAt(0)?l+="?":l+="? "),l+=m,S&&(l+=Vt(e,t));const w=Ee(e,t+1,c,{block:!0,compact:S,isblockseq:S&&!zt(e,c,t+1)}),F=u.kind==="scalar"&&u.value===""&&m!==""&&m.charCodeAt(m.length-1)!==mr&&m.charCodeAt(m.length-1)!==gr,N=!S&&(u.kind==="alias"||F)?" ":"";w===""||Le===w.charCodeAt(0)?l+=`${N}:`:l+=`${N}: `,l+=w,i+=l}return i}function zt(e,t,n){return t.style.tagged||t.anchor!==void 0||e.indent<2&&n>0}function Ee(e,t,n,r){if(n.kind==="alias")return`*${n.anchor}`;const{block:i=!1,iskey:o=!1,isblockseq:a=!1}=r;let s=r.compact??!1;const l=n.anchor!==void 0;zt(e,n,t)&&(s=!1);let u,c=n.style.tagged;const E=i&&(n.kind==="mapping"||n.kind==="sequence")&&!n.style.flow&&n.items.length!==0;if(n.kind==="mapping")E?u=aa(e,t,n,s):u=oa(e,t,n);else if(n.kind==="sequence")E?e.seqNoIndent&&!a&&t>0?u=Pn(e,t-1,n,s):u=Pn(e,t,n,s):u=ia(e,t,n);else{const m=Vo(e,t),T=ta(e,n,m,o,i);u=ea(n.value,T,m),c=n.style.tagged||T!==et&&n.tag!==e.defaultScalarTagName}if(E&&s&&t>0&&e.indent>2&&(u=`${" ".repeat(e.indent-2)}${u}`),c||l){const m=[],T=c?Yo(n):null,S=l?`&${n.anchor}`:null;e.tagBeforeAnchor?(T!==null&&m.push(T),S!==null&&m.push(S)):(S!==null&&m.push(S),T!==null&&m.push(T));const w=u===""||u.charCodeAt(0)===Le?"":" ";u=`${m.join(" ")}${w}${u}`}return u}function sa(e){return(e.kind==="sequence"||e.kind==="mapping")&&!e.style.flow&&e.items.length!==0&&!e.style.tagged&&e.anchor===void 0}function la(e){let t=e;for(;(t.kind==="sequence"||t.kind==="mapping")&&!t.style.flow&&t.items.length!==0;)t=t.kind==="sequence"?t.items[t.items.length-1]:t.items[t.items.length-1].value;if(t.kind!=="scalar"||!(t.style.literal||t.style.folded))return!1;const{value:n}=t;return n.endsWith(`
36
+
37
+ `)||n===`
38
+ `}function ca(e){let t="";for(const n of e.directives){if(n.kind==="yaml"){t+=`%YAML ${n.version}
39
+ `;continue}const{handle:r,prefix:i}=n;t+=`%TAG ${r} ${i}
40
+ `}return t}function ua(e,t){const n=jo(t);let r="",i=!1;for(let o=0;o<e.length;o+=1){const a=e[o],s=ca(a),l=s!=="",u=a.explicitStart||l||o>0&&!i;if(r+=s,a.contents===null)u&&(r+=`---
41
+ `);else if(u){const c=Ee(n,0,a.contents,{block:!0,compact:!0}),E=c===""?"":l||sa(a.contents)?`
42
+ `:" ";r+=`---${E}${c}
43
+ `}else r+=Ee(n,0,a.contents,{block:!0,compact:!0})+`
44
+ `;i=a.explicitEnd||a.contents!==null&&la(a.contents),i&&(r+=`...
45
+ `)}return r}var fa=Mi.withTags({...Pt,resolve:(e,t,n)=>{const r=Pt.resolve(e,t,n);return r===P?jn.resolve(e,t,n):r}},{...Ft,resolve:(e,t,n)=>{const r=Ft.resolve(e,t,n);return r===P?Wn.resolve(e,t,n):r}}),pa={...an,schema:fa,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:()=>{}};function da(e,t={}){const n={...pa,...t},r=Oo(e,n.schema,{noRefs:n.noRefs,skipInvalid:n.skipInvalid});return n.flowLevel>=0&&ko(r,(i,o)=>{if(!(o.depth<n.flowLevel))return i.style.flow=!0,dr}),n.transform(r),ua(r,{...Ht(n,Object.keys(an)),schema:n.schema})}const ha=er.withTags(Vn,Xn,zn,Qn,Zn),cn=(e,t)=>{const n=Io(e,{schema:ha,...t});if(n.length===0)return e.trim()===""?void 0:null;if(n.length>1)throw new St("expected a single document in the stream, but found more");return n[0]},ga=(e,t)=>da(e,t);function Sr(e,t){return e.hasOwnProperty(t)?e[t]:void 0}const ma=/\((\d+):(\d+)\)$/;class nt extends Error{originalError;source;col;line;constructor(t,n){super(t.message.split(`
46
+ `)[0]),this.originalError=t,this.source=n,Object.setPrototypeOf(this,nt.prototype);const[,r,i]=this.message.match(ma)||[];this.line=parseInt(r,10),this.col=parseInt(i,10)}}function Tr(e){return e.endsWith(".yaml")||e.endsWith(".yml")||e.endsWith(".json")}const Aa=[".graphql",".gql"];function un(e){const t=e.toLowerCase();return Aa.some(n=>t.endsWith(n))}function ct(e,t){return e+"::"+t}function ya(){return new Promise(e=>{setTimeout(e)})}class dt{absoluteRef;body;mimeType;constructor(t,n,r){this.absoluteRef=t,this.body=n,this.mimeType=r}#e;#t;getAst(t){return this.#e===void 0&&(this.#e=t(this.body,{filename:this.absoluteRef})??void 0,this.#e&&this.#e.kind===0&&this.#e.value===""&&this.#e.startPosition!==1&&(this.#e.startPosition=1,this.#e.endPosition=1)),this.#e}getLines(){return this.#t===void 0&&(this.#t=this.body.split(/\r\n|[\n\r]/g)),this.#t}}class Ct extends Error{originalError;constructor(t){super(t.message),this.originalError=t,Object.setPrototypeOf(this,Ct.prototype)}}function Ea(e,t){const n=new dt(t,e);if(un(t))return{source:n,parsed:e};try{return{source:n,parsed:cn(e,{filename:t})}}catch(r){throw new nt(r,n)}}class Sa{config;cache=new Map;constructor(t={http:{headers:[]}}){this.config=t}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(t,n){return we(n)?n:t&&we(t)?new URL(n,t).href:le.pathBrowserifyExports.resolve(t?le.pathBrowserifyExports.dirname(t):process.cwd(),n)}async loadExternalRef(t){try{if(we(t)){const{body:n,mimeType:r}=await Dn(t,this.config.http);return new dt(t,n,r)}else{if((void 0)(t).isDirectory())throw new Error(`Expected a file but received a folder at ${t}.`);const n=await(void 0).readFile(t,"utf-8");return new dt(t,n.replace(/\r\n/g,`
47
+ `))}}catch(n){throw n.message=n.message.replace(", lstat",""),new Ct(n)}}parseDocument(t,n=!1){if(un(t.absoluteRef))return{source:t,parsed:t.body};if(!Tr(t.absoluteRef)&&!t.mimeType?.match(/(json|yaml|openapi)/)&&!n)return{source:t,parsed:t.body};try{return{source:t,parsed:cn(t.body,{filename:t.absoluteRef})}}catch(r){throw new nt(r,t)}}async resolveDocument(t,n,r=!1){const i=this.resolveExternalRef(t,n),o=this.cache.get(i);if(o)return o;const a=this.loadExternalRef(i).then(s=>this.parseDocument(s,r));return this.cache.set(i,a),a}}function Fn(e,t){return{prev:e,node:t}}function Ta(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}const Ye={name:"unknown",properties:{}},Ca={name:"scalar",properties:{}};async function ba(e){const{rootDocument:t,externalRefResolver:n,rootType:r}=e,i=new Map,o=new Set,a=[];l(t.parsed,t,"#/",r);let s;do s=await Promise.all(a);while(a.length!==s.length);return i;function l(u,c,E,m){const T=c.source.absoluteRef,S=new Map;w(u,m,T+E);function w(N,y,v){if(!le.isPlainObject(N)&&!Array.isArray(N))return;const p=`${y.name}::${v}`;if(o.has(p))return;if(o.add(p),Array.isArray(N)){const R=y.items;if(R===void 0&&y!==Ye&&y!==We)return;const A=typeof R=="function";for(let g=0;g<N.length;g++){let z=A?R(N[g],Ce(v,g)):R;if(z===void 0&&y!==Ye&&y!==We)continue;const j=z?.directResolveAs?{$ref:N[g]}:N[g];z=z?.directResolveAs||z,w(j,Ve(z)?z:Ye,Ce(v,g))}return}const[x,_]=Object.entries(N).find(([R])=>R==="$anchor")||[];_&&S.set(`#${_}`,N);for(const R of Object.keys(N)){let A=N[R],g=Sr(y.properties,R);g===void 0&&(g=y.additionalProperties),typeof g=="function"&&(g=g(A,R)),g===void 0&&(g=Ye),y.extensionsPrefix&&R.startsWith(y.extensionsPrefix)&&g===Ye&&(g=We),!Ve(g)&&g?.directResolveAs&&(g=g.directResolveAs,A={$ref:A}),g&&g.name===void 0&&g.resolvable!==!1&&(g=Ca),!(!Ve(g)||!(le.isPlainObject(A)||Array.isArray(A)))&&w(A,g,Ce(v,Ie(R)))}if(Xe(N)){const R=F(c,N,{prev:null,node:N}).then(A=>{if(A.resolved){l(A.node,A.document,A.nodePointer,y);for(const g of A.chain??[])l(g.node,g.document,g.location.pointer,y)}});a.push(R)}if(Kn(N)){const R=F(c,{$ref:N.externalValue},{prev:null,node:N}).then(A=>{A.resolved&&l(A.node,A.document,A.nodePointer,y)});a.push(R)}}async function F(N,y,v){if(Ta(v.prev,y))throw new Error("Self-referencing circular pointer");if(Mr(y.$ref)){await ya();const L={resolved:!0,isRemote:!1,node:S.get(y.$ref),document:N,nodePointer:y.$ref},G=ct(N.source.absoluteRef,y.$ref);return i.set(G,L),L}const{uri:p,pointer:x}=Gn(y.$ref),_=p!==null&&n.resolveExternalRef(N.source.absoluteRef,p)!==N.source.absoluteRef;let R;try{R=_?await n.resolveDocument(N.source.absoluteRef,p):N}catch(L){const G={resolved:!1,isRemote:_,document:void 0,error:L},J=ct(N.source.absoluteRef,y.$ref);return i.set(J,G),G}let A={resolved:!0,document:R,isRemote:_,node:N.parsed,nodePointer:"#/"},g=R.parsed;const z=x;for(const L of z)if(le.isPlainObject(g)&&g[L]!==void 0)g=g[L],A.nodePointer=Ce(A.nodePointer,Ie(L));else if(Array.isArray(g)&&g[+L]!==void 0)g=g[+L],A.nodePointer=Ce(A.nodePointer,Ie(L));else if(Xe(g))if(A=await F(R,g,Fn(v,g)),A.chain=void 0,R=A.document||R,le.isPlainObject(A.node))g=A.node[L],A.nodePointer=Ce(A.nodePointer,Ie(L));else if(Array.isArray(A.node))g=A.node[+L],A.nodePointer=Ce(A.nodePointer,Ie(L));else{g=void 0;break}else{g=void 0;break}A.node=g,A.document=R;const j=ct(N.source.absoluteRef,y.$ref);if(A.document&&Xe(g)){const L=Un(g)?{node:g,document:A.document,location:new mt(A.document.source,A.nodePointer)}:void 0;A=await F(A.document,g,Fn(v,g)),L&&A.resolved&&(A={...A,chain:[L,...A.chain??[]]})}return i.set(j,A),{...A}}}}exports.BaseResolver=Sa;exports.Location=mt;exports.ResolveError=Ct;exports.Source=dt;exports.SpecExtension=We;exports.YamlParseError=nt;exports.env=Bn;exports.escapePointerFragment=Ie;exports.getDir=Pr;exports.getOwn=Sr;exports.isAbsoluteUrl=we;exports.isBrowser=Mn;exports.isExternalValue=Kn;exports.isGraphqlRef=un;exports.isMappingRef=Hr;exports.isNamedType=Ve;exports.isRef=Xe;exports.isRefWithSiblings=Un;exports.isSupportedExtension=Tr;exports.isTruthy=Hn;exports.listOf=Nr;exports.makeDocumentFromString=Ea;exports.makeRefId=ct;exports.mapOf=Or;exports.normalizeTypes=$r;exports.parsePointer=Yn;exports.parseRef=Gn;exports.parseYaml=cn;exports.pointerBaseName=kr;exports.readFileFromUrl=Dn;exports.refBaseName=Lr;exports.replaceRef=Br;exports.resolveDocument=ba;exports.resolvePath=Fr;exports.stringifyYaml=ga;exports.unescapePointerFragment=qn;