@karmaniverous/stan-cli 0.10.1 → 0.10.2

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.
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("node:fs"),t=require("node:fs/promises"),n=require("node:path"),r=require("fs-extra"),s=require("node:process"),i=require("node:url"),o=require("process"),a=require("buffer"),c=require("node:crypto"),u=require("node:child_process"),l=require("os"),f=require("path"),p=require("util"),d=require("stream"),h=require("events"),m=require("fs"),g=require("node:os"),y=require("node:tty"),b=require("child_process"),v=require("node:module"),D=require("node:readline"),w="undefined"!=typeof document?document.currentScript:null;const _="archive.tar",k="archive.prev.tar",E=e=>e.replace(/\\/g,"/"),S=(e,t)=>{const n=E(e).replace(/\/+$/,""),r=E(t);return r===n||r.startsWith(`${n}/`)},A=(e,t)=>{const n=E(e);return S(`${n}/diff`,t)||S(`${n}/patch`,t)},C=S,P=e=>{const t=e.replace(/\\/g,"/");return e=>!(A(t,e)||((e,t)=>{const n=E(e);return E(t)===`${n}/output/${_}`||E(t)===`${n}/output/archive.diff.tar`||E(t)===`${n}/output/archive.warnings.txt`})(t,e))},O=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},x=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)},T=1048576,$=async(e,r)=>{const s=[],i=[],o=[];await Promise.all(r.map(async r=>{const a=r.replace(/\\/g,"/"),c=n.resolve(e,r);let u=null;try{u=await t.stat(c)}catch{return}const l=u?.size??0;let f,p=!1;try{p=await(async e=>{try{const n=await t.open(e,"r");try{const e=Buffer.allocUnsafe(8192),{bytesRead:t}=await n.read(e,0,e.length,0);for(let n=0;n<t;n+=1)if(0===e[n])return!0;return!1}finally{await n.close().catch(()=>{})}}catch{return!1}})(c)}catch{p=!1}if(p)i.push({path:a,size:l});else{s.push(a);try{(l<=T||l<5*T)&&(f=(e=>{const t=e.replace(/\r\n/g,"\n");return 0===t.length?0:t.split("\n").length})(await t.readFile(c,"utf8")))}catch{}(l>T||"number"==typeof f&&f>3e3)&&o.push({path:a,size:l,loc:f})}}));const a=[];if(i.length>0){a.push(`Binary files excluded from archive (${i.length.toString()}):`);for(const e of i)a.push(` - ${e.path} (${e.size.toString()} bytes)`);a.push("")}if(o.length>0){a.push(`Large text files (included; consider excludes if unwanted) (${o.length.toString()}):`);for(const e of o){const t=[` - ${e.path}`,`(${e.size.toString()} bytes)`];"number"==typeof e.loc&&t.push(`${e.loc.toString()} LOC`),a.push(t.join(" "))}a.push(""),a.push(`Thresholds: size > ${T.toString()} bytes or LOC > ${3e3.toString()}`)}0===a.length&&a.push("No archive warnings.");const c=a.join("\n")+(a.length?"\n":"");return{textFiles:s,excludedBinaries:i,largeText:o,warningsBody:c}};var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,F,I,M,j,B,z,H,K,q,U,Z,G={exports:{}},W=(L||(L=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,r=/(?:[^\\]|^)\\$/,s=/^\\!/,i=/^\\#/,o=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,c=/\/$/,u="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const f=l,p=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,m=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,s)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${s}`:"]"===s&&r.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],g=/(^|\\\/)?\\\*$/,y="regex",b="checkRegex",v={[y]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[b]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},D=e=>"string"==typeof e;class w{constructor(e,t,n,r,s,i){this.pattern=e,this.mark=t,this.negative=s,p(this,"body",n),p(this,"ignoreCase",r),p(this,"regexPrefix",i)}get regex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){const e="_"+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){const n=this.regexPrefix.replace(g,v[e]),r=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return p(this,t,r)}}class _{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[f])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(D(e)&&(e={pattern:e}),(e=>e&&D(e)&&!n.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=(({pattern:e,mark:t},n)=>{let r=!1,o=e;0===o.indexOf("!")&&(r=!0,o=o.substr(1)),o=o.replace(s,"!").replace(i,"#");const a=(e=>m.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e))(o);return new w(e,t,o,n,r,a)})(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(D(e)?(e=>e.split(o).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let r,s=!1,i=!1;this._rules.forEach(o=>{const{negative:a}=o;i===a&&s!==i||a&&!s&&!i&&!t||o[n].test(e)&&(s=!a,i=a,r=a?void 0:o)});const o={ignored:s,unignored:i};return r&&(o.rule=r),o}}const k=(e,t)=>{throw new t(e)},E=(e,t,n)=>D(e)?e?!E.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n("path must not be empty",TypeError):n(`path must be a string, but got \`${t}\``,TypeError),S=e=>a.test(e);E.isNotRelative=S,E.convert=e=>e;class A{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){p(this,f,!0),this._rules=new _(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){const s=e&&E.convert(e);return E(s,e,this._strictPathCheck?k:h),this._t(s,t,n,r)}checkIgnore(e){if(!c.test(e))return this.test(e);const t=e.split(u).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(u)+u,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(u).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);const s=this._t(r.join(u)+u,t,n,r);return t[e]=s.ignored?s:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const C=e=>new A(e),P=()=>{E.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;E.isNotRelative=t=>e.test(t)||S(t)};"undefined"!=typeof process&&"win32"===process.platform&&P(),e.exports=C,C.default=C,e.exports.isPathValid=e=>E(e&&E.convert(e),e,h),p(e.exports,Symbol.for("setupWindows"),P)}(G)),G.exports),V=R(W),J={};function Y(){if(I)return F;I=1;const e="\\\\/",t=`[^${e}]`,n="\\.",r="\\/",s="[^/]",i=`(?:${r}|$)`,o=`(?:^|${r})`,a=`${n}{1,2}${i}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:i,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${s}*?`,START_ANCHOR:o,SEP:"/"},u={...c,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return F={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{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"},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:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function Q(){return M||(M=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:s}=Y();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(s,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(J)),J}function X(){if(q)return K;q=1;const e=function(){if(B)return j;B=1;const e=Q(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=Y(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return j=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,k=[],E=[],S=[];let A,C,P=b,O=-1,x=0,T=0,$=!1,N=!1,R=!1,L=!1,F=!1,I=!1,M=!1,j=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const q=()=>O>=w,U=()=>P.charCodeAt(O+1),Z=()=>(A=C,P.charCodeAt(++O));for(;O<w;){let e;if(C=Z(),C!==r){if(!0===I||C===c){for(H++;!0!==q()&&(C=Z());)if(C!==r)if(C!==c){if(!0!==I&&C===i&&(C=Z())===i){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,$=K.isBrace=!0,z=!0;break}}else H++;else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===o)&&U()===u){if(R=K.isGlob=!0,L=K.isExtglob=!0,z=!0,C===o&&O===x&&(B=!0),!0===_){for(;!0!==q()&&(C=Z());)if(C!==r){if(C===h){R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==q()&&(e=Z());)if(e!==r){if(e===m){N=K.isBracket=!0,R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==x){if(!0!==D.noparen&&C===u){if(R=K.isGlob=!0,!0===_){for(;!0!==q()&&(C=Z());)if(C!==u){if(C===h){z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(!0===R){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,x++}else{if(k.push(O),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===x+1){x+=2;continue}T=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(L=!1,R=!1);let G=P,W="",V="";x>0&&(W=P.slice(0,x),P=P.slice(x),T-=x),G&&!0===R&&T>0?(G=P.slice(0,T),V=P.slice(T)):!0===R?(G="",V=P):G=P,G&&""!==G&&"/"!==G&&G!==P&&g(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===D.unescape&&(V&&(V=e.removeBackslashes(V)),G&&!0===M&&(G=e.removeBackslashes(G)));const J={prefix:W,input:b,start:x,base:G,glob:V,isBrace:$,isBracket:N,isGlob:R,isExtglob:L,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(J.maxDepth=0,g(C)||E.push(K),J.tokens=E),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<k.length;t++){const n=e?e+1:x,r=k[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==x?(E[t].isPrefix=!0,E[t].value=W):E[t].value=s,y(E[t]),J.maxDepth+=E[t].depth),0===t&&""===s||S.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);S.push(t),D.tokens&&(E[E.length-1].value=t,y(E[E.length-1]),J.maxDepth+=E[E.length-1].depth)}J.slashes=k,J.parts=S}return J},j}(),t=function(){if(H)return z;H=1;const e=Y(),t=Q(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=e.globChars(p.windows),v=e.extglobChars(b),{DOT_LITERAL:D,PLUS_LITERAL:w,SLASH_LITERAL:_,ONE_CHAR:k,DOTS_SLASH:E,NO_DOT:S,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:P,QMARK_NO_DOT:O,STAR:x,START_ANCHOR:T}=b,$=e=>`(${y}(?:(?!${T}${e.dot?E:D}).)*?)`,N=p.dot?"":S,R=p.dot?P:O;let L=!0===p.bash?$(p):x;p.capture&&(L=`(${L})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const F={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,F),h=l.length;const I=[],M=[],j=[];let B,z=m;const H=()=>F.index===h-1,K=F.peek=(e=1)=>l[F.index+e],q=F.advance=()=>l[++F.index]||"",U=()=>l.slice(F.index+1),Z=(e="",t=0)=>{F.consumed+=e,F.index+=t},G=e=>{F.output+=null!=e.output?e.output:e.value,Z(e.value)},W=()=>{let e=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)q(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},V=e=>{F[e]++,j.push(e)},J=e=>{F[e]--,j.pop()},Y=e=>{if("globstar"===z.type){const t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||I.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-z.output.length),z.type="star",z.value="*",z.output=L,F.output+=z.output)}if(I.length&&"paren"!==e.type&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&G(e),z&&"text"===z.type&&"text"===e.type)return z.output=(z.output||z.value)+e.value,void(z.value+=e.value);e.prev=z,g.push(e),z=e},Q=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=z,n.parens=F.parens,n.output=F.output;const r=(p.capture?"(":"")+n.open;V("parens"),Y({type:e,value:t,output:F.output?"":k}),Y({type:"paren",extglob:!0,value:q(),output:r}),I.push(n)},X=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=$(p)),(r!==L||H()||/^\)+$/.test(U()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=U())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(F.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:B,output:n}),J("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,s,i,o)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(i?P.repeat(i.length):""):0===o?R+(i?P.repeat(i.length):""):P.repeat(r.length):"."===s?D.repeat(r.length):"*"===s?n?n+s+(i?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(F.output=l,F):(F.output=t.wrapOutput(n,F,f),F)}for(;!H();){if(B=q(),"\0"===B)continue;if("\\"===B){const e=K();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",Y({type:"text",value:B});continue}const t=/^\\+/.exec(U());let n=0;if(t&&t[0].length>2&&(n=t[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===p.unescape?B=q():B+=q(),0===F.brackets){Y({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===z.value||"[^"===z.value)){if(!1!==p.posix&&":"===B){const e=z.value.slice(1);if(e.includes("[")&&(z.posix=!0,e.includes(":"))){const e=z.value.lastIndexOf("["),t=z.value.slice(0,e),n=z.value.slice(e+2),s=r[n];if(s){z.value=t+s,F.backtrack=!0,q(),m.output||1!==g.indexOf(z)||(m.output=k);continue}}}("["===B&&":"!==K()||"-"===B&&"]"===K())&&(B=`\\${B}`),"]"!==B||"["!==z.value&&"[^"!==z.value||(B=`\\${B}`),!0===p.posix&&"!"===B&&"["===z.value&&(B="^"),z.value+=B,G({value:B});continue}if(1===F.quotes&&'"'!==B){B=t.escapeRegex(B),z.value+=B,G({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===p.keepQuotes&&Y({type:"text",value:B});continue}if("("===B){V("parens"),Y({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=I[I.length-1];if(e&&F.parens===e.parens+1){X(I.pop());continue}Y({type:"paren",value:B,output:F.parens?")":"\\)"}),J("parens");continue}if("["===B){if(!0!==p.nobracket&&U().includes("]"))V("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));B=`\\${B}`}Y({type:"bracket",value:B});continue}if("]"===B){if(!0===p.nobracket||z&&"bracket"===z.type&&1===z.value.length){Y({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Y({type:"text",value:B,output:`\\${B}`});continue}J("brackets");const e=z.value.slice(1);if(!0===z.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),z.value+=B,G({value:B}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(z.value);if(F.output=F.output.slice(0,-z.value.length),!0===p.literalBrackets){F.output+=n,z.value=n;continue}z.value=`(${y}${n}|${z.value})`,F.output+=z.value;continue}if("{"===B&&!0!==p.nobrace){V("braces");const e={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};M.push(e),Y(e);continue}if("}"===B){const e=M[M.length-1];if(!0===p.nobrace||!e){Y({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=F.output.slice(0,e.outputIndex),r=F.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",F.output=n;for(const e of r)F.output+=e.output||e.value}Y({type:"brace",value:B,output:t}),J("braces"),M.pop();continue}if("|"===B){I.length>0&&I[I.length-1].conditions++,Y({type:"text",value:B});continue}if(","===B){let e=B;const t=M[M.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===z.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",g.pop(),z=m;continue}Y({type:"slash",value:B,output:_});continue}if("."===B){if(F.braces>0&&"dot"===z.type){"."===z.value&&(z.output=D);const e=M[M.length-1];z.type="dots",z.output+=B,z.value+=B,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==z.type&&"slash"!==z.type){Y({type:"text",value:B,output:D});continue}Y({type:"dot",value:B,output:D});continue}if("?"===B){if((!z||"("!==z.value)&&!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("qmark",B);continue}if(z&&"paren"===z.type){const e=K();let t=B;("("===z.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(U()))&&(t=`\\${B}`),Y({type:"text",value:B,output:t});continue}if(!0!==p.dot&&("slash"===z.type||"bos"===z.type)){Y({type:"qmark",value:B,output:O});continue}Y({type:"qmark",value:B,output:P});continue}if("!"===B){if(!0!==p.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){Q("negate",B);continue}if(!0!==p.nonegate&&0===F.index){W();continue}}if("+"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("plus",B);continue}if(z&&"("===z.value||!1===p.regex){Y({type:"plus",value:B,output:w});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||F.parens>0){Y({type:"plus",value:B});continue}Y({type:"plus",value:w});continue}if("@"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Y({type:"at",extglob:!0,value:B,output:""});continue}Y({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(U());e&&(B+=e[0],F.index+=e[0].length),Y({type:"text",value:B});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=B,z.output=L,F.backtrack=!0,F.globstar=!0,Z(B);continue}let e=U();if(!0!==p.noextglob&&/^\([^?]/.test(e)){Q("star",B);continue}if("star"===z.type){if(!0===p.noglobstar){Z(B);continue}const t=z.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Y({type:"star",value:B,output:""});continue}const i=F.braces>0&&("comma"===t.type||"brace"===t.type),o=I.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!o){Y({type:"star",value:B,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[F.index+4];if(t&&"/"!==t)break;e=e.slice(3),Z("/**",3)}if("bos"===t.type&&H()){z.type="globstar",z.value+=B,z.output=$(p),F.output=z.output,F.globstar=!0,Z(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&H()){F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=$(p)+(p.strictSlashes?")":"|$)"),z.value+=B,F.globstar=!0,F.output+=t.output+z.output,Z(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=`${$(p)}${_}|${_}${n})`,z.value+=B,F.output+=t.output+z.output,F.globstar=!0,Z(B+q()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){z.type="globstar",z.value+=B,z.output=`(?:^|${_}|${$(p)}${_})`,F.output=z.output,F.globstar=!0,Z(B+q()),Y({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-z.output.length),z.type="globstar",z.output=$(p),z.value+=B,F.output+=z.output,F.globstar=!0,Z(B);continue}const n={type:"star",value:B,output:L};!0!==p.bash?!z||"bracket"!==z.type&&"paren"!==z.type||!0!==p.regex?(F.index!==F.start&&"slash"!==z.type&&"dot"!==z.type||("dot"===z.type?(F.output+=A,z.output+=A):!0===p.dot?(F.output+=C,z.output+=C):(F.output+=N,z.output+=N),"*"!==K()&&(F.output+=k,z.output+=k)),Y(n)):(n.output=B,Y(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=N+n.output),Y(n))}for(;F.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));F.output=t.escapeLast(F.output,"["),J("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));F.output=t.escapeLast(F.output,"("),J("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));F.output=t.escapeLast(F.output,"{"),J("braces")}if(!0===p.strictSlashes||"star"!==z.type&&"bracket"!==z.type||Y({type:"maybe_slash",value:"",output:`${_}?`}),!0===F.backtrack){F.output="";for(const e of F.tokens)F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix)}return F};return u.fastpaths=(r,s)=>{const i={...s},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=o[r]||r;const{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(i.windows),b=i.dot?h:d,v=i.dot?m:d,D=i.capture?"":"?:";let w=!0===i.bash?".*?":g;i.capture&&(w=`(${w})`);const _=e=>!0===e.noglobstar?w:`(${D}(?:(?!${y}${e.dot?p:u}).)*?)`,k=e=>{switch(e){case"*":return`${b}${f}${w}`;case".*":return`${u}${f}${w}`;case"*.*":return`${b}${w}${u}${f}${w}`;case"*/*":return`${b}${w}${l}${f}${v}${w}`;case"**":return b+_(i);case"**/*":return`(?:${b}${_(i)}${l})?${v}${f}${w}`;case"**/*.*":return`(?:${b}${_(i)}${l})?${v}${w}${u}${f}${w}`;case"**/.*":return`(?:${b}${_(i)}${l})?${u}${f}${w}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=k(t[1]);if(!n)return;return n+u+t[2]}}},E=t.removePrefix(r,{negated:!1,prefix:""});let S=k(E);return S&&!0!==i.strictSlashes&&(S+=`${l}?`),S},z=u}(),n=Q(),r=Y(),s=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>s(e,t,n)),i=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return i}const r=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=c.state;delete c.state;let l=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=s(o.ignore,e,n)}const f=(n,r=!1)=>{const{isMatch:i,match:f,output:p}=s.test(n,c,t,{glob:e,posix:a}),d={glob:e,state:u,regex:c,posix:a,input:n,output:p,match:f,isMatch:i};return"function"==typeof o.onResult&&o.onResult(d),!1===i?(d.isMatch=!1,!!r&&d):l(n)?("function"==typeof o.onIgnore&&o.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof o.onMatch&&o.onMatch(d),!r||d)};return n&&(f.state=u),f};return s.test=(e,t,r,{glob:i,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(o?n.toPosixSlashes:null);let u=e===i,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===i),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,o):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},s.matchBase=(e,t,r)=>(t instanceof RegExp?t:s.makeRe(t,r)).test(n.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,n)=>Array.isArray(e)?e.map(e=>s.parse(e,n)):t(e,{...n,fastpaths:!1}),s.scan=(t,n)=>e(t,n),s.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const i=t||{},o=i.contains?"":"^",a=i.contains?"":"$";let c=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=s.toRegex(c,t);return!0===r&&(u.state=e),u},s.makeRe=(e,n={},r=!1,i=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),s.compileRe(o,n,r,i)},s.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=r,K=s}var ee=R(function(){if(Z)return U;Z=1;const e=X(),t=Q();function n(n,r,s=!1){return!r||null!==r.windows&&void 0!==r.windows||(r={...r,windows:t.isWindows()}),e(n,r,s)}return Object.assign(n,e),U=n}());const te=(e,t)=>{const r=t.replace(/\\/g,"/").replace(/^\.\/+/,""),s=`${r}/system`,i=`${r}/output`,o=`${r}/diff`,a=`${r}/dist`,c=`${r}/patch`,u=`${r}/imports`;return{rootRel:r,systemRel:s,outputRel:i,diffRel:o,distRel:a,patchRel:c,importsRel:u,rootAbs:n.resolve(e,r),systemAbs:n.resolve(e,s),outputAbs:n.resolve(e,i),diffAbs:n.resolve(e,o),distAbs:n.resolve(e,a),patchAbs:n.resolve(e,c),importsAbs:n.resolve(e,u)}},ne=async e=>{const r=[],s=["."];for(;s.length;){const i=s.pop(),o=n.resolve(e,i),a=await t.readdir(o,{withFileTypes:!0});for(const e of a){const t="."===i?e.name:n.join(i,e.name);e.isDirectory()?s.push(t):r.push(t.replace(/\\/g,"/"))}}return r},re=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},se=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>re(e,t):()=>!1;var n;const r=ee(t,{dot:!0});return e=>r(e)},ie=async(r,{cwd:s,stanPath:i,includeOutputDir:o,includes:a=[],excludes:c=[]})=>{const u=i.replace(/\\/g,"/"),l=((e,t)=>{const n=new Set;for(const r of e){if("package.json"===r)continue;if(!r.endsWith("/package.json"))continue;const e=r.slice(0,-13);e.startsWith("node_modules/")||e.startsWith(".git/")||e===t||e.startsWith(`${t}/`)||e.length>0&&n.add(e)}return Array.from(n)})(r,u),f=await(async r=>{const s=n.resolve(r,".gitignore");if(!e.existsSync(s))return null;try{const e=await t.readFile(s,"utf8"),n=V();return n.add(e),n}catch{return null}})(s),p=[e=>re(e,"node_modules"),e=>re(e,".git"),...f?[e=>f.ignores(e)]:[],...c.map(se),...l.map(e=>t=>re(t,e)),e=>A(u,e)];o||p.push(e=>C(`${u}/output`,e));const d=r.filter(e=>!p.some(t=>t(e)));if(a.length>0){const e=a.map(se),t=[e=>A(u,e),...o?[]:[e=>C(`${u}/output`,e)]],n=new Set(d);for(const t of r)e.some(e=>e(t))&&n.add(t);const s=c.map(se);return r.filter(e=>n.has(e)&&!t.some(t=>t(e))&&!s.some(t=>t(e)))}return d},oe=async(e,t)=>{const n=te(e,t);return await r.ensureDir(n.rootAbs),await r.ensureDir(n.outputAbs),await r.ensureDir(n.diffAbs),await r.ensureDir(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}},ae=async(e,t)=>{const n=await oe(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}},ce=async(r,s,i={})=>{const{includeOutputDir:o=!1,fileName:a,includes:c=[],excludes:u=[]}=i;let l=a??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:f,diffDir:p}=await ae(r,s),d=await ne(r),h=await ie(d,{cwd:r,stanPath:s,includeOutputDir:o,includes:c,excludes:u}),m=n.resolve(f,l),g=n.resolve(p,k);if(e.existsSync(m))try{await t.copyFile(m,g)}catch{}const{textFiles:y,warningsBody:b}=await $(r,h),v=y;x(b,i.onArchiveWarnings);const D=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(o?await D.create({file:m,cwd:r,filter:P(s)},O(v,s)):await D.create({file:m,cwd:r,filter:P(s)},v),!e.existsSync(g))try{await t.copyFile(m,g)}catch{}return m},ue="code -g {file}",le=e=>e instanceof URL?i.fileURLToPath(e):e;function fe({cwd:t}={}){const r=function(t,{cwd:r=s.cwd(),type:i="file",stopAt:o}={}){let a=n.resolve(le(r)??"");const{root:c}=n.parse(a);o=n.resolve(a,le(o)??c);const u=n.isAbsolute(t);for(;a;){const r=u?t:n.join(a,t);try{const t=e.statSync(r,{throwIfNoEntry:!1});if("file"===i&&t?.isFile()||"directory"===i&&t?.isDirectory())return r}catch{}if(a===o||a===c)break;a=n.dirname(a)}}("package.json",{cwd:t});return r&&n.dirname(r)}const pe=["stan.config.yml","stan.config.yaml","stan.config.json"],de=t=>{for(const r of pe){const s=n.resolve(t,r);if(e.existsSync(s))return s}return null};var he,me={},ge={},ye={},be={};function ve(){if(he)return be;he=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),o=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[o]===s;function c(e){if(e&&"object"==typeof e)switch(e[o]){case n:case i:return!0}return!1}return be.ALIAS=e,be.DOC=t,be.MAP=n,be.NODE_TYPE=o,be.PAIR=r,be.SCALAR=s,be.SEQ=i,be.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,be.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,be.isCollection=c,be.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,be.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,be.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},be.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,be.isScalar=a,be.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,be}var De,we,_e={};function ke(){if(De)return _e;De=1;var e=ve();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);e.isDocument(t)?i(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):i(null,t,s,Object.freeze([]))}function i(n,s,o,a){const c=u(n,s,o,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),i(n,c,o,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=i(e,s.items[e],o,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=i("key",s.key,o,a);if(e===t)return t;e===r&&(s.key=null);const n=i("value",s.value,o,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function o(t,n){const s=c(n);e.isDocument(t)?await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):await a(null,t,s,Object.freeze([]))}async function a(n,s,i,o){const c=await u(n,s,i,o);if(e.isNode(c)||e.isPair(c))return l(n,o,c),a(n,c,i,o);if("symbol"!=typeof c)if(e.isCollection(s)){o=Object.freeze(o.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],i,o);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){o=Object.freeze(o.concat(s));const e=await a("key",s.key,i,o);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,i,o);if(n===t)return t;n===r&&(s.value=null)}return c}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,o.BREAK=t,o.SKIP=n,o.REMOVE=r,_e.visit=s,_e.visitAsync=o,_e}function Ee(){if(we)return ye;we=1;var e=ve(),t=ke();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},ye.Directives=s,ye}var Se,Ae={},Ce={},Pe={};function Oe(){if(Se)return Pe;Se=1;var e=ve(),t=ke();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Pe.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Pe.anchorNames=n,Pe.createNodeAnchors=function(t,s){const i=[],o=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const o=r(s,a);return a.add(o),o},setAnchors:()=>{for(const t of i){const n=o.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:o}},Pe.findNewAnchor=r,Pe}var xe,Te={},$e={};function Ne(){return xe||(xe=1,$e.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],i=e(t,s,String(n),r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),i=e(t,s,n,r);void 0===i?s.delete(n):i!==r&&s.set(n,i)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const i=e(t,s,n,r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}return t.call(n,r,s)}),$e}var Re,Le,Fe,Ie={};function Me(){if(Re)return Ie;Re=1;var e=ve();return Ie.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const i=n.toJSON(r,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof n||s?.keep?n:Number(n)},Ie}function je(){if(Le)return Te;Le=1;var e=Ne(),t=ve(),n=Me();return Te.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:i,onAnchor:o,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},u=n.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},Te}function Be(){if(Fe)return Ce;Fe=1;var e=Oe(),t=ke(),n=ve(),r=je(),s=Me();let i=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,i;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(i=e)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),!c||void 0===c.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=o(r,a,n)),c.count*c.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function o(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=o(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=o(e,t.key,r),s=o(e,t.value,r);return Math.max(n,s)}return 1}return Ce.Alias=i,Ce}var ze,He,Ke,qe={},Ue={},Ze={};function Ge(){if(ze)return Ze;ze=1;var e=ve(),t=je(),n=Me();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",Ze.Scalar=r,Ze.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,Ze}function We(){if(He)return Ue;He=1;var e=Be(),t=ve(),n=Ge();return Ue.createNode=function(r,s,i){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=i;let f;if(o&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete i.onTagObj);const d=p?.createNode?p.createNode(i.schema,r,i):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(i.schema,r,i):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},Ue}function Ve(){if(Ke)return qe;Ke=1;var e=We(),t=ve(),n=je();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let i=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...i]=e,o=this.get(s,!0);if(t.isCollection(o))o.addIn(i,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,i=this.get(r,!0);return 0===s.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...i]=e;if(0===i.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}};return qe.Collection=i,qe.collectionFromPath=r,qe.isEmptyPath=s,qe}var Je,Ye={},Qe={},Xe={},et={};function tt(){if(Je)return et;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return Je=1,et.indentComment=e,et.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,et.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),et}var nt,rt,st,it,ot={},at={};function ct(){if(rt)return ot;rt=1;var e=Ge(),t=function(){if(nt)return at;nt=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,i=e[s];for(;" "===i||"\t"===i;)if(t<s+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);r=t,s=t+1,i=e[s]}return r}return at.FOLD_BLOCK=e,at.FOLD_FLOW="flow",at.FOLD_QUOTED=t,at.foldFlowLines=function(r,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof o&&(o>a-Math.max(2,c)?p.push(0):g=a-o);let y=!1,b=-1,v=-1,D=-1;i===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let o;o=r[b+=1];){if(i===t&&"\\"===o){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===o)i===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(i===t){for(;" "===m||"\t"===m;)m=o,o=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=o}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],o=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,o)}`:(i===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,o)}`)}return w},at}();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const i=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return i;const{implicitKey:o}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(u+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{u+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(o||'"'===i[e+2]||i.length<a)e+=1;else{for(u+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)u+="\n",e+=2;u+=c," "===i[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+i.slice(l):i,o?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,i);const o=i.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${o}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,o,t.FOLD_FLOW,n(i,!1))}function o(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),o=e.includes("'");r=t&&!o?i:o&&!t?s:n?i:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:i,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return o(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,k=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;k=w}}let E=c.substring(0,k<w?k+1:w);E&&(c=c.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let S=(_?m?"2":"1":"")+y;if(s&&(S+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const o=n(u,!0);"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${E}${r}${v}`,m,t.FOLD_BLOCK,o);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${E}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return ot.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?o(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return i(h.value,u);case e.Scalar.PLAIN:return function(s,i,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=i;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return o(f,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?o(f,i):c(s,i,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,i,a,u);if(r(f)){if(""===h)return i.forceBlockIndent=!0,c(s,i,a,u);if(d&&h===m)return o(f,i)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=i.doc.schema;if(n.some(e)||t?.some(e))return o(f,i)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(i,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},ot}function ut(){if(st)return Xe;st=1;var e=Oe(),t=ve(),n=tt(),r=ct();return Xe.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},Xe.stringify=function(n,s,i,o){if(t.isPair(n))return n.toString(s,i,o);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:i}){if(!i.directives)return"";const o=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,i,o):t.isScalar(c)?r.stringifyString(c,s,i,o):c.toString(s,i,o);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},Xe}var lt,ft={},pt={};function dt(){if(lt)return pt;lt=1;var e=o;return pt.debug=function(e,...t){"debug"===e&&console.log(...t)},pt.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},pt}var ht,mt,gt,yt={};function bt(){if(ht)return yt;ht=1;var e=ve(),t=Ge();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)i(t,n,e);else if(Array.isArray(r))for(const e of r)i(t,n,e);else i(t,n,r)}function i(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,t,Map);for(const[e,t]of i)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return yt.addMergeToJSMap=s,yt.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),yt.merge=r,yt}function vt(){if(mt)return ft;mt=1;var e=dt(),t=bt(),n=ut(),r=ve(),s=Me();return ft.addPairToJSMap=function(i,o,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(i,o,c);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,o,c);else{const t=s.toJS(a,"",i);if(o instanceof Map)o.set(t,s.toJS(c,t,i));else if(o instanceof Set)o.add(t);else{const u=function(t,s,i){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&i?.doc){const r=n.createStringifyContext(i.doc,{});r.anchors=new Set;for(const e of i.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!i.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,i),l=s.toJS(c,u,i);u in o?Object.defineProperty(o,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[u]=l}}return o},ft}function Dt(){if(gt)return Ye;gt=1;var e=We(),t=function(){if(it)return Qe;it=1;var e=ve(),t=Ge(),n=ut(),r=tt();return Qe.stringifyPair=function({key:s,value:i},o,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=o;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s)throw new Error("With simple keys, collection cannot be used as a key value")}let y=!m&&(!s||g&&null==i&&!o.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));o=Object.assign({},o,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,k=n.stringify(s,o,()=>w=!0,()=>_=!0);if(!y&&!o.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(o.inFlow){if(u||null==i)return w&&a&&a(),""===k?"?":y?`? ${k}`:k}else if(u&&!m||null==i&&y)return k=`? ${k}`,g&&!w?k+=r.lineComment(k,o.indent,d(g)):_&&c&&c(),k;w&&(g=null),y?(g&&(k+=r.lineComment(k,o.indent,d(g))),k=`? ${k}\n${f}:`):(k=`${k}:`,g&&(k+=r.lineComment(k,o.indent,d(g)))),e.isNode(i)?(b=!!i.spaceBefore,v=i.commentBefore,D=i.comment):(b=!1,v=null,D=null,i&&"object"==typeof i&&(i=l.createNode(i))),o.implicitKey=!1,y||g||!e.isScalar(i)||(o.indentAtStart=k.length+1),_=!1,h||!(p.length>=2)||o.inFlow||y||!e.isSeq(i)||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let E=!1;const S=n.stringify(i,o,()=>E=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,o.indent)}`}""!==S||o.inFlow?A+=`\n${o.indent}`:"\n"===A&&(A="\n\n")}else if(!y&&e.isCollection(i)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=o.inFlow??i.flow??0===i.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${o.indent}`)}}else""!==S&&"\n"!==S[0]||(A="");return k+=A+S,o.inFlow?E&&a&&a():D&&!E?k+=r.lineComment(k,o.indent,d(D)):_&&c&&c(),k},Qe}(),n=vt(),r=ve();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return Ye.Pair=s,Ye.createPair=function(t,n,r){const i=e.createNode(t,void 0,r),o=e.createNode(n,void 0,r);return new s(i,o)},Ye}var wt,_t,kt,Et={},St={},At={},Ct={};function Pt(){if(wt)return Ct;wt=1;var e=ve(),t=ut(),n=tt();function r({comment:r,items:s},o,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=o,h=Object.assign({},o,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),i(o,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),i(o,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:o,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let o=0;o<r.length;++o){const c=r[o];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),i(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),i(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);o<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=o;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function i({indent:e,options:{commentString:t}},r,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const i=n.indentComment(t(s),e);r.push(i.trimStart())}}return Ct.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Ct}function Ot(){if(_t)return At;_t=1;var e=Pt(),t=vt(),n=Ve(),r=ve(),s=Dt(),i=Ge();function o(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:i}=n,o=new this(e),a=(e,a)=>{if("function"==typeof i)a=i.call(t,e,a);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==a||r)&&o.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=o(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=o(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=o(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!o(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return At.YAMLMap=a,At.findPair=o,At}function xt(){if(kt)return St;kt=1;var e=ve(),t=Ot();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return St.map=n,St}var Tt,$t,Nt={},Rt={};function Lt(){if(Tt)return Rt;Tt=1;var e=We(),t=Pt(),n=Ve(),r=ve(),s=Ge(),i=Me();let o=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];r.isScalar(i)&&s.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(i.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let o of n){if("function"==typeof s){const e=n instanceof Set?o:String(t++);o=s.call(n,e,o)}i.items.push(e.createNode(o,void 0,r))}}return i}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return Rt.YAMLSeq=o,Rt}function Ft(){if($t)return Nt;$t=1;var e=ve(),t=Lt();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Nt.seq=n,Nt}var It,Mt={};function jt(){if(It)return Mt;It=1;var e=ct();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return Mt.string=t,Mt}var Bt,zt={},Ht={};function Kt(){if(Bt)return Ht;Bt=1;var e=Ge();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return Ht.nullTag=t,Ht}var qt,Ut={};function Zt(){if(qt)return Ut;qt=1;var e=Ge();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify:({source:e,value:n},r)=>e&&t.test.test(e)&&n===("t"===e[0]||"T"===e[0])?e:n?r.options.trueStr:r.options.falseStr};return Ut.boolTag=t,Ut}var Gt,Wt,Vt={},Jt={};function Yt(){return Gt||(Gt=1,Jt.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i}),Jt}function Qt(){if(Wt)return Vt;Wt=1;var e=Ge(),t=Yt();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return Vt.float=s,Vt.floatExp=r,Vt.floatNaN=n,Vt}var Xt,en={};function tn(){if(Xt)return en;Xt=1;var e=Yt();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:i}=n;return t(i)&&i>=0?s+i.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return en.int=i,en.intHex=o,en.intOct=s,en}var nn,rn={};var sn,on={};var an,cn={};function un(){if(an)return cn;an=1;var e=a,t=Ge(),n=ct();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:i},o,a,c){if(!i)return"";const u=i;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},o,a,c)}};return cn.binary=r,cn}var ln,fn,pn={},dn={};function hn(){if(ln)return dn;ln=1;var e=ve(),t=Dt(),n=Ge(),r=Lt();function s(r,s){if(e.isSeq(r))for(let i=0;i<r.items.length;++i){let o=r.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&s("Each pair must have its own sequence indicator");const e=o.items[0]||new t.Pair(new n.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}r.items[i]=e.isPair(o)?o:new t.Pair(o)}}else s("Expected a sequence for this tag");return r}function i(e,n,s){const{replacer:i}=s,o=new r.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof i&&(e=i.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;o.items.push(t.createPair(r,c,s))}return o}const o={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i};return dn.createPairs=i,dn.pairs=o,dn.resolvePairs=s,dn}function mn(){if(fn)return pn;fn=1;var e=ve(),t=Me(),n=Ot(),r=Lt(),s=hn();class i extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let i,o;if(e.isPair(n)?(i=t.toJS(n.key,"",r),o=t.toJS(n.value,i,r)):i=t.toJS(n,"",r),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),i=new this;return i.items=r.items,i}}i.tag="tag:yaml.org,2002:omap";const o={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),o=[];for(const{key:t}of r.items)e.isScalar(t)&&(o.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):o.push(t.value));return Object.assign(new i,r)},createNode:(e,t,n)=>i.from(e,t,n)};return pn.YAMLOMap=i,pn.omap=o,pn}var gn,yn={},bn={};var vn,Dn={};var wn,_n={};var kn,En={};function Sn(){if(kn)return En;kn=1;var e=ve(),t=Dt(),n=Ot();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null),n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),i.items.push(t.createPair(e,null,r));return i}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return En.YAMLSet=r,En.set=s,En}var An,Cn,Pn,On,xn={};function Tn(){if(An)return xn;An=1;var e=Yt();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*i:i}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const i=r(60),o=[n%i];return n<60?o.unshift(0):(n=(n-o[0])/i,o.unshift(n%i),n>=60&&(n=(n-o[0])/i,o.unshift(n))),s+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:n},i={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const n=e.match(i.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,o,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,o,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return xn.floatTime=s,xn.intTime=r,xn.timestamp=i,xn}function $n(){if(Cn)return yn;Cn=1;var e=xt(),t=Kt(),n=Ft(),r=jt(),s=un(),i=function(){if(gn)return bn;gn=1;var e=Ge();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},r={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return bn.falseTag=r,bn.trueTag=n,bn}(),o=function(){if(vn)return Dn;vn=1;var e=Ge(),t=Yt();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Dn.float=s,Dn.floatExp=r,Dn.floatNaN=n,Dn}(),a=function(){if(wn)return _n;wn=1;var e=Yt();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===s?-1*i:i}function r(n,r,s){const{value:i}=n;if(t(i)){const e=i.toString(r);return i<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return _n.int=o,_n.intBin=s,_n.intHex=a,_n.intOct=i,_n}(),c=bt(),u=mn(),l=hn(),f=Sn(),p=Tn();const d=[e.map,n.seq,r.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return yn.schema=d,yn}function Nn(){if(Pn)return zt;Pn=1;var e=xt(),t=Kt(),n=Ft(),r=jt(),s=Zt(),i=Qt(),o=tn(),a=function(){if(nn)return rn;nn=1;var e=xt(),t=Kt(),n=Ft(),r=jt(),s=Zt(),i=Qt(),o=tn();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float];return rn.schema=a,rn}(),c=function(){if(sn)return on;sn=1;var e=Ge(),t=xt(),n=Ft();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>r(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s}],o={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,o);return on.schema=a,on}(),u=un(),l=bt(),f=mn(),p=hn(),d=$n(),h=Sn(),m=Tn();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:m.floatTime,int:o.int,intHex:o.intHex,intOct:o.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return zt.coreKnownTags=b,zt.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},zt}function Rn(){if(On)return Et;On=1;var e=ve(),t=xt(),n=Ft(),r=jt(),s=Nn();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Et.Schema=class o{constructor({compat:o,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(o)?s.getTags(o,"compat"):o?s.getTags(null,o):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?i:null}clone(){const e=Object.create(o.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Et}var Ln,Fn,In={};function Mn(){if(Fn)return Ae;Fn=1;var e=Be(),t=Ve(),n=ve(),r=Dt(),s=Me(),i=Rn(),o=function(){if(Ln)return In;Ln=1;var e=ve(),t=ut(),n=tt();return In.stringifyDocument=function(r,s){const i=[];let o=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(i.push(e),o=!0):r.directives.docStart&&(o=!0)}o&&i.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==i.length&&i.unshift("");const e=c(r.commentBefore);i.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&o&&i.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==i[i.length-1]?i.push(f):i[i.length-1]=`--- ${f}`}else i.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(c(e),"")))}return i.join("\n")+"\n"},In}(),a=Oe(),c=Ne(),u=We(),l=Ee();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ae.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new l.Directives({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),i=this.createNode(t,null,n);return new r.Pair(s,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new l.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new i.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof i)for(const{count:e,res:t}of a.anchors.values())i(t,e);return"function"==typeof o?c.applyReviver(o,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return o.stringifyDocument(this,e)}},Ae}var jn,Bn={};function zn(){if(jn)return Bn;jn=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Bn.YAMLError=e,Bn.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Bn.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Bn.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}},Bn}var Hn,Kn={},qn={},Un={},Zn={},Gn={};function Wn(){return Hn||(Hn=1,Gn.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&i(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&i(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&i(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&i(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&i(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],k=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||"block-map"===r?.type||"block-seq"===r?.type)&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:k,start:w??k}}),Gn}var Vn,Jn={};function Yn(){return Vn||(Vn=1,Jn.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}}),Jn}var Qn,Xn={};function er(){if(Qn)return Xn;Qn=1;var e=Yn();return Xn.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];s.indent!==t||"]"!==s.source&&"}"!==s.source||!e.containsNewline(n)||r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},Xn}var tr,nr,rr={};function sr(){if(tr)return rr;tr=1;var e=ve();return rr.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const i="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,r))},rr}var ir,or={};var ar,cr,ur,lr={},fr={};function pr(){return ar||(ar=1,fr.resolveEnd=function(e,t,n,r){let s="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}}),fr}function dr(){if(ur)return Un;ur=1;var e=ve(),t=Ge(),n=Ot(),r=Lt(),s=function(){if(nr)return Zn;nr=1;var e=Dt(),t=Ot(),n=Wn(),r=Yn(),s=er(),i=sr();const o="All mapping items must start at the same column";return Zn.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",o)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",o);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,i.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const k=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=k.end,k.found){D&&("block-map"!==b?.type||k.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<k.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,k,f):c(u,h,y,null,k,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(_.comment?_.comment+="\n"+k.comment:_.comment=k.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},Zn}(),i=function(){if(ir)return or;ir=1;var e=Lt(),t=Wn(),n=er();return or.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},i,o,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=o.offset,f=null;for(const{start:e,value:c}of o.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}c&&"block-seq"===c.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(i,c,p,a):s(i,p.end,e,null,p,a);i.schema.compat&&n.flowIndentCheck(o.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[o.offset,l,f??l],u},or}(),o=function(){if(cr)return lr;cr=1;var e=ve(),t=Dt(),n=Ot(),r=Lt(),s=pr(),i=Wn(),o=Yn(),a=sr();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return lr.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,k=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!k.found){if(!(k.anchor||k.tag||w||_)){0===r&&k.comma?h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),k.comment&&(b.comment?b.comment+="\n"+k.comment:b.comment=k.comment),D=k.end;continue}!g&&p.options.strict&&o.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)k.comma&&h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(k.comma||h(k.start,"MISSING_CHAR",`Missing , between ${y} items`),k.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,k.comment=k.comment.substring(t.length+1)}}if(g||w||k.found){p.atKey=!0;const e=k.end,r=v?l(p,v,k,h):f(p,e,m,null,k,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(o.found){if(!g&&!k.found&&p.options.strict){if(w)for(const e of w){if(e===o.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<o.found.offset-1024&&h(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&":"===_.source[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const E=_?l(p,_,o,h):o.found?f(p,o.end,w,null,o,h):null;E?u(_)&&h(E.range,"BLOCK_IN_FLOW",c):o.comment&&(r.comment?r.comment+="\n"+o.comment:r.comment=o.comment);const S=new t.Pair(r,E);if(p.options.keepSourceTokens&&(S.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(S);const t=(E??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=E?E.range[2]:o.end}else{const e=_?l(p,_,k,h):f(p,k.end,w,null,k,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...k]=d.end;let E=D;if(_&&_.source===w)E=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&k.unshift(_)}if(k.length>0){const e=s.resolveEnd(k,E,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},lr}();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,r,c):o.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return Un.composeCollection=function(s,i,o,c,u){const l=c.tag,f=l?i.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&u(n,"MISSING_CHAR","Missing newline after block sequence props")}const p="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,i,o,u,f);let d=i.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=i.schema.knownTags[f];if(!e||e.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,i,o,u,f);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,i,o,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},Un}var hr,mr={},gr={};function yr(){if(hr)return gr;hr=1;var e=Ge();return gr.resolveBlockScalar=function(t,n,r){const s=n.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let o=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!o&&r?o=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":n&&!u&&r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+i.length;return n.source&&(t+=n.source.length),{value:e,type:o,comment:i.comment,range:[s,t,t]}}let u=n.indent+i.indent,l=n.offset+i.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===i.indent&&(u=n.length),f=e,0!==u||t.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e="Block scalar lines must not be less indented than their "+(i.indent?"explicit indentation indicator":"first line");r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}o===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+i.length+n.source.length;return{value:p,type:o,comment:i.comment,range:[s,m,m]}},gr}var br,vr,Dr={};function wr(){if(br)return Dr;br=1;var e=Ge(),t=pr();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],i=" ",o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)""===r[1]?"\n"===i?s+=i:i="\n":(s+=i+r[1],i=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(e),s+i+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function i(e,t,n,r){const s=e.substr(t,n),i=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(i)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(i)}return Dr.resolveFlowScalar=function(o,a,c){const{offset:u,type:l,source:f,end:p}=o;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let o=1;o<e.length-1;++o){const a=e[o];if("\r"!==a||"\n"!==e[o+1])if("\n"===a){const{fold:t,offset:s}=r(e,o);n+=t,o=s}else if("\\"===a){let r=e[++o];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[o+1];" "===r||"\t"===r;)r=e[1+ ++o];else if("\r"===r&&"\n"===e[o+1])for(r=e[1+ ++o];" "===r||"\t"===r;)r=e[1+ ++o];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=i(e,o+1,s,t),o+=s}else{const r=e.substr(o-1,2);t(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=o;let r=e[o+1];for(;" "===r||"\t"===r;)r=e[1+ ++o];"\n"===r||"\r"===r&&"\n"===e[o+2]||(n+=o>t?e.slice(t,o+1):a)}else n+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(f,m);break;default:return c(o,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},Dr}var _r,kr,Er,Sr,Ar={};function Cr(){if(kr)return qn;kr=1;var e=Be(),t=ve(),n=dr(),r=function(){if(vr)return mr;vr=1;var e=ve(),t=Ge(),n=yr(),r=wr();return mr.composeScalar=function(s,i,o,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===i.type?n.resolveBlockScalar(s,i,a):r.resolveFlowScalar(i,s.options.strict,a),p=o?s.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,i){if("!"===r)return t[e.SCALAR];const o=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;o.push(e)}for(const e of o)if(e.test?.test(n))return e;const a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR])}(s.schema,c,p,o,a):"scalar"===i.type?function({atKey:t,directives:n,schema:r},s,i,o){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];a.tag!==t.tag&&o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}return a}(s,c,i,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(o??i,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(o??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},mr}(),s=pr(),i=(_r||(_r=1,Ar.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}),Ar);const o={composeNode:a,composeEmptyNode:c};function a(i,a,u,l){const f=i.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:i},o){const a=new e.Alias(r.substring(1));""===a.source&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&o(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(i,c,t.strict,o);return a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment),a}(i,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(i,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(o,i,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(i,a.offset,void 0,null,u,l),y=!1}return h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)&&l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:o,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:i.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return qn.composeEmptyNode=c,qn.composeNode=a,qn}function Pr(){if(Sr)return ge;Sr=1;var e=o,t=Ee(),n=Mn(),r=zn(),s=ve(),i=function(){if(Er)return Kn;Er=1;var e=Mn(),t=Cr(),n=pr(),r=Wn();return Kn.composeDoc=function(s,i,{offset:o,start:a,value:c,end:u},l){const f=Object.assign({_directives:i},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:o,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[o,m,g.offset],p},Kn}(),a=pr();function c(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function u(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const i=e[s];switch(i[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(i.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return ge.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=c(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=u(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(s.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=c(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=i.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=a.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},ge}var Or,xr={},Tr={};var $r,Nr={};var Rr,Lr,Fr={};function Ir(){if(Lr)return xr;Lr=1;var e=function(){if(Or)return Tr;Or=1;var e=yr(),t=wr(),n=zn(),r=ct();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function i(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return Tr.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:u,end:l};default:return{type:"scalar",offset:a,indent:i,source:u,end:l}}},Tr.resolveAsScalar=function(r,s=!0,i){if(r){const o=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([s,s+1],t,r);i(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,o)}}return null},Tr.setScalarValue=function(e,t,n={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(o&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,f);break;case'"':i(e,f,"double-quoted-scalar");break;case"'":i(e,f,"single-quoted-scalar");break;default:i(e,f,"scalar")}},Tr}(),t=function(){if($r)return Nr;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),r)for(const e of r)i+=e.source;return s&&(i+=e(s)),i}return $r=1,Nr.stringify=n=>"type"in n?e(n):t(n),Nr}(),n=function(){if(Rr)return Fr;Rr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,i){let o=i(r,t);if("symbol"==typeof o)return o;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const o=s(Object.freeze(t.concat([[a,r]])),c.items[r],i);if("number"==typeof o)r=o-1;else{if(o===e)return e;o===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof o&&"key"===a&&(o=o(r,t))}}return"function"==typeof o?o(r,t):o}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},Fr.visit=r,Fr}();return xr.createScalarToken=e.createScalarToken,xr.resolveAsScalar=e.resolveAsScalar,xr.setScalarValue=e.setScalarValue,xr.stringify=t.stringify,xr.visit=n.visit,xr.BOM="\ufeff",xr.DOCUMENT="",xr.FLOW_END="",xr.SCALAR="",xr.isCollection=e=>!!e&&"items"in e,xr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),xr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},xr.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},xr}var Mr,jr={};function Br(){if(Mr)return jr;Mr=1;var e=Ir();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),o=e=>!e||i.has(e);return jr.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&t(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(o),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==i[0]&&"}"!==i[0]))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart();let a=0;for(;","===i[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),i[a]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(o),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,i=this.pos-1,o=this.pos-1;for(;r=this.buffer[++o];)if(":"===r){const e=this.buffer[o+1];if(t(e)||n&&s.has(e))break;i=o}else if(t(r)){let e=this.buffer[o+1];if("\r"===r&&("\n"===e?(o+=1,r="\n",e=this.buffer[o+1]):i=o),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&s.has(r))break;i=o}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(i+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(o))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},jr}var zr,Hr={};function Kr(){return zr||(zr=1,Hr.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}),Hr}var qr,Ur={};function Zr(){if(qr)return Ur;qr=1;var e=o,t=Ir(),n=Br();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function i(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function a(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function c(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,i(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return Ur.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=c(a(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!r(t.sep,"newline")){const e=c(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=c(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:o,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:o});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=c(a(t));u(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=c(a(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=c(a(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}},Ur}var Gr,Wr,Vr={};var Jr=function(){if(Wr)return me;Wr=1;var e=Pr(),t=Mn(),n=Rn(),r=zn(),s=Be(),i=ve(),o=Dt(),a=Ge(),c=Ot(),u=Lt(),l=Ir(),f=Br(),p=Kr(),d=Zr(),h=function(){if(Gr)return Vr;Gr=1;var e=Pr(),t=Mn(),n=zn(),r=dt(),s=ve(),i=Kr(),o=Zr();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return i&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return Vr.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=c(e,n);if(!i)return null;if(i.warnings.forEach(e=>r.warn(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))},Vr.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(i&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},Vr.parseDocument=c,Vr.stringify=function(e,n,r){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!i?e.toString(r):new t.Document(e,i,r).toString(r)},Vr}(),m=ke();return me.Composer=e.Composer,me.Document=t.Document,me.Schema=n.Schema,me.YAMLError=r.YAMLError,me.YAMLParseError=r.YAMLParseError,me.YAMLWarning=r.YAMLWarning,me.Alias=s.Alias,me.isAlias=i.isAlias,me.isCollection=i.isCollection,me.isDocument=i.isDocument,me.isMap=i.isMap,me.isNode=i.isNode,me.isPair=i.isPair,me.isScalar=i.isScalar,me.isSeq=i.isSeq,me.Pair=o.Pair,me.Scalar=a.Scalar,me.YAMLMap=c.YAMLMap,me.YAMLSeq=u.YAMLSeq,me.CST=l,me.Lexer=f.Lexer,me.LineCounter=p.LineCounter,me.Parser=d.Parser,me.parse=h.parse,me.parseAllDocuments=h.parseAllDocuments,me.parseDocument=h.parseDocument,me.stringify=h.stringify,me.visit=m.visit,me.visitAsync=m.visitAsync,me}();function Yr(e,t,n){function r(n,r){var s;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(s=n._zod).traits??(s.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}const s=n?.Parent??Object;class i extends s{}function o(e){var t;const s=n?.Parent?new i:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}R(Jr);class Qr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xr extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const es={};function ts(e){return es}function ns(e,t){return"bigint"==typeof t?t.toString():t}function rs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ss(e){return null==e}function is(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const os=Symbol("evaluating");function as(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==os)return void 0===r&&(r=os,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function cs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function us(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ls(e){return JSON.stringify(e)}const fs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ps(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const ds=rs(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function hs(e){if(!1===ps(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==ps(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function ms(e){return hs(e)?{...e}:Array.isArray(e)?[...e]:e}const gs=new Set(["string","number","symbol"]);function ys(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bs(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function vs(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Ds(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function ws(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _s(e){return"string"==typeof e?e:e?.message}function ks(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Es(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Ss(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const As=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ns,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Cs=Yr("$ZodError",As),Ps=Yr("$ZodError",As,{Parent:Error}),Os=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Qr;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>ks(e,i,ts())));throw fs(t,s?.callee),t}return o.value},xs=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>ks(e,i,ts())));throw fs(t,s?.callee),t}return o.value},Ts=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Qr;return i.issues.length?{success:!1,error:new(e??Cs)(i.issues.map(e=>ks(e,s,ts())))}:{success:!0,data:i.value}},$s=Ts(Ps),Ns=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>ks(e,s,ts())))}:{success:!0,data:i.value}},Rs=Ns(Ps),Ls=/^[cC][^\s-]{8,}$/,Fs=/^[0-9a-z]+$/,Is=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ms=/^[0-9a-vA-V]{20}$/,js=/^[A-Za-z0-9]{27}$/,Bs=/^[a-zA-Z0-9_-]{21}$/,zs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ks=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qs=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Us=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Gs=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ws=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vs=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Js=/^[A-Za-z0-9_-]*$/,Ys=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Qs=/^\+(?:[0-9]){6,14}[0-9]$/,Xs="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ei=new RegExp(`^${Xs}$`);function ti(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ni=/^[^A-Z]*$/,ri=/^[^a-z]*$/,si=Yr("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ii=Yr("$ZodCheckMaxLength",(e,t)=>{var n;si.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ss(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Es(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oi=Yr("$ZodCheckMinLength",(e,t)=>{var n;si.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ss(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Es(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ai=Yr("$ZodCheckLengthEquals",(e,t)=>{var n;si.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ss(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const i=Es(r),o=s>t.length;n.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ci=Yr("$ZodCheckStringFormat",(e,t)=>{var n,r;si.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ui=Yr("$ZodCheckRegex",(e,t)=>{ci.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),li=Yr("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ni),ci.init(e,t)}),fi=Yr("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ri),ci.init(e,t)}),pi=Yr("$ZodCheckIncludes",(e,t)=>{si.init(e,t);const n=ys(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),di=Yr("$ZodCheckStartsWith",(e,t)=>{si.init(e,t);const n=new RegExp(`^${ys(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hi=Yr("$ZodCheckEndsWith",(e,t)=>{si.init(e,t);const n=new RegExp(`.*${ys(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mi=Yr("$ZodCheckOverwrite",(e,t)=>{si.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class gi{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const yi={major:4,minor:1,patch:11},bi=Yr("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yi;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=Ds(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,o=i._zod.check(e);if(o instanceof Promise&&!1===n?.async)throw new Qr;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(s||(s=Ds(e,t)))});else{if(e.issues.length===t)continue;s||(s=Ds(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(Ds(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new Qr;return o.then(t=>e._zod.parse(t,i))}return e._zod.parse(o,i)};e._zod.run=(s,i)=>{if(i.skipChecks)return e._zod.parse(s,i);if("backward"===i.direction){const t=e._zod.parse({value:s.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,i)):n(t,s,i)}const o=e._zod.parse(s,i);if(o instanceof Promise){if(!1===i.async)throw new Qr;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=$s(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Rs(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),vi=Yr("$ZodString",(e,t)=>{var n;bi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Di=Yr("$ZodStringFormat",(e,t)=>{ci.init(e,t),vi.init(e,t)}),wi=Yr("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Hs),Di.init(e,t)}),_i=Yr("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ks(e))}else t.pattern??(t.pattern=Ks());Di.init(e,t)}),ki=Yr("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qs),Di.init(e,t)}),Ei=Yr("$ZodURL",(e,t)=>{Di.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Ys.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Si=Yr("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Di.init(e,t)}),Ai=Yr("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bs),Di.init(e,t)}),Ci=Yr("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ls),Di.init(e,t)}),Pi=Yr("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Fs),Di.init(e,t)}),Oi=Yr("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Is),Di.init(e,t)}),xi=Yr("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ms),Di.init(e,t)}),Ti=Yr("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=js),Di.init(e,t)}),$i=Yr("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=ti({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Xs}T(?:${r})$`)}(t)),Di.init(e,t)}),Ni=Yr("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ei),Di.init(e,t)}),Ri=Yr("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ti(t)}$`)),Di.init(e,t)}),Li=Yr("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zs),Di.init(e,t)}),Fi=Yr("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Us),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Ii=Yr("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Zs),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Mi=Yr("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Gs),Di.init(e,t)}),ji=Yr("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ws),Di.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Bi(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zi=Yr("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Vs),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Bi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Hi=Yr("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Js),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Js.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Bi(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Ki=Yr("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qs),Di.init(e,t)}),qi=Yr("$ZodJWT",(e,t)=>{Di.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ui=Yr("$ZodUnknown",(e,t)=>{bi.init(e,t),e._zod.parse=e=>e}),Zi=Yr("$ZodNever",(e,t)=>{bi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Gi(e,t,n){e.issues.length&&t.issues.push(...ws(n,e.issues)),t.value[n]=e.value}const Wi=Yr("$ZodArray",(e,t)=>{bi.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let e=0;e<s.length;e++){const o=s[e],a=t.element._zod.run({value:o,issues:[]},r);a instanceof Promise?i.push(a.then(t=>Gi(t,n,e))):Gi(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Vi(e,t,n,r){e.issues.length&&t.issues.push(...ws(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Ji(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yi(e,t,n,r,s,i){const o=[],a=s.keySet,c=s.catchall._zod,u=c.def.type;for(const s of Object.keys(t)){if(a.has(s))continue;if("never"===u){o.push(s);continue}const i=c.run({value:t[s],issues:[]},r);i instanceof Promise?e.push(i.then(e=>Vi(e,n,s,t))):Vi(i,n,s,t)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Qi=Yr("$ZodObject",(e,t)=>{bi.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=rs(()=>Ji(t));as(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=ps,i=t.catchall;let o;e._zod.parse=(t,n)=>{o??(o=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=o.shape;for(const e of o.keys){const r=u[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?c.push(r.then(n=>Vi(n,t,e,a))):Vi(r,t,e,a)}return i?Yi(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),Xi=Yr("$ZodObjectJIT",(e,t)=>{Qi.init(e,t);const n=e._zod.parse,r=rs(()=>Ji(t));let s;const i=ps,o=!es.jitless,a=o&&ds.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return i(p)?o&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new gi(["shape","payload","ctx"]),n=r.value,s=e=>{const t=ls(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let o=0;for(const e of n.keys)i[e]="key_"+o++;t.write("const newResult = {};");for(const e of n.keys){const n=i[e],r=ls(e);t.write(`const ${n} = ${s(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?Yi([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function eo(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!Ds(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ks(e,r,ts())))}),t)}const to=Yr("$ZodUnion",(e,t)=>{bi.init(e,t),as(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),as(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),as(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),as(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>is(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>eo(t,s,e,i)):eo(a,s,e,i)}}),no=Yr("$ZodIntersection",(e,t)=>{bi.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([t,n])=>so(e,t,n)):so(e,s,i)}});function ro(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(hs(e)&&hs(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=ro(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=ro(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function so(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Ds(e))return e;const r=ro(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const io=Yr("$ZodRecord",(e,t)=>{bi.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!hs(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const o=t.valueType._zod.run({value:s[e],issues:[]},r);o instanceof Promise?i.push(o.then(t=>{t.issues.length&&n.issues.push(...ws(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...ws(e,o.issues)),n.value[e]=o.value)}let a;for(const e in s)o.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const o of Reflect.ownKeys(s)){if("__proto__"===o)continue;const a=t.keyType._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>ks(e,r,ts())),input:o,path:[o],inst:e}),n.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:s[o],issues:[]},r);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...ws(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...ws(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),oo=Yr("$ZodEnum",(e,t)=>{bi.init(e,t);const n=function(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>gs.has(typeof e)).map(e=>"string"==typeof e?ys(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),ao=Yr("$ZodTransform",(e,t)=>{bi.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Xr(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n));if(s instanceof Promise)throw new Qr;return n.value=s,n}});function co(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const uo=Yr("$ZodOptional",(e,t)=>{bi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",as(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),as(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${is(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>co(t,e.value)):co(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),lo=Yr("$ZodNullable",(e,t)=>{bi.init(e,t),as(e._zod,"optin",()=>t.innerType._zod.optin),as(e._zod,"optout",()=>t.innerType._zod.optout),as(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${is(e.source)}|null)$`):void 0}),as(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),fo=Yr("$ZodDefault",(e,t)=>{bi.init(e,t),e._zod.optin="optional",as(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>po(e,t)):po(r,t)}});function po(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const ho=Yr("$ZodPrefault",(e,t)=>{bi.init(e,t),e._zod.optin="optional",as(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),mo=Yr("$ZodNonOptional",(e,t)=>{bi.init(e,t),as(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>go(t,e)):go(s,e)}});function go(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yo=Yr("$ZodCatch",(e,t)=>{bi.init(e,t),as(e._zod,"optin",()=>t.innerType._zod.optin),as(e._zod,"optout",()=>t.innerType._zod.optout),as(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ks(e,n,ts()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ks(e,n,ts()))},input:e.value}),e.issues=[]),e)}}),bo=Yr("$ZodPipe",(e,t)=>{bi.init(e,t),as(e._zod,"values",()=>t.in._zod.values),as(e._zod,"optin",()=>t.in._zod.optin),as(e._zod,"optout",()=>t.out._zod.optout),as(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>vo(e,t.in,n)):vo(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>vo(e,t.out,n)):vo(r,t.out,n)}});function vo(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Do=Yr("$ZodReadonly",(e,t)=>{bi.init(e,t),as(e._zod,"propValues",()=>t.innerType._zod.propValues),as(e._zod,"values",()=>t.innerType._zod.values),as(e._zod,"optin",()=>t.innerType._zod.optin),as(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(wo):wo(r)}});function wo(e){return e.value=Object.freeze(e.value),e}const _o=Yr("$ZodCustom",(e,t)=>{si.init(e,t),bi.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>ko(t,n,r,e));ko(s,n,r,e)}});function ko(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ss(e))}}class Eo{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}const So=new Eo;function Ao(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...vs(t)})}function Co(e,t){return new ii({check:"max_length",...vs(t),maximum:e})}function Po(e,t){return new oi({check:"min_length",...vs(t),minimum:e})}function Oo(e,t){return new ai({check:"length_equals",...vs(t),length:e})}function xo(e){return new mi({check:"overwrite",tx:e})}const To=Yr("ZodISODateTime",(e,t)=>{$i.init(e,t),ea.init(e,t)});const $o=Yr("ZodISODate",(e,t)=>{Ni.init(e,t),ea.init(e,t)});const No=Yr("ZodISOTime",(e,t)=>{Ri.init(e,t),ea.init(e,t)});const Ro=Yr("ZodISODuration",(e,t)=>{Li.init(e,t),ea.init(e,t)});const Lo=(e,t)=>{Cs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},r={_errors:[]},s=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>s({issues:e}));else if("invalid_key"===t.code)s({issues:t.issues});else if("invalid_element"===t.code)s({issues:t.issues});else if(0===t.path.length)r._errors.push(n(t));else{let e=r,s=0;for(;s<t.path.length;){const r=t.path[s];s===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],s++}}};return s(e),r}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ns,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ns,2)}},isEmpty:{get:()=>0===e.issues.length}})};Yr("ZodError",Lo);const Fo=Yr("ZodError",Lo,{Parent:Error}),Io=Os(Fo),Mo=xs(Fo),jo=Ts(Fo),Bo=Ns(Fo),zo=(Qo=Fo,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Os(Qo)(e,t,r)}),Ho=(e=>(t,n,r)=>Os(e)(t,n,r))(Fo),Ko=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xs(e)(t,n,s)})(Fo),qo=(e=>async(t,n,r)=>xs(e)(t,n,r))(Fo),Uo=(e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ts(e)(t,n,s)})(Fo),Zo=(e=>(t,n,r)=>Ts(e)(t,n,r))(Fo),Go=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ns(e)(t,n,s)})(Fo),Wo=(e=>async(t,n,r)=>Ns(e)(t,n,r))(Fo),Vo=Yr("ZodType",(e,t)=>(bi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(us(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>bs(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Io(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>jo(e,t,n),e.parseAsync=async(t,n)=>Mo(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Bo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>zo(e,t,n),e.decode=(t,n)=>Ho(e,t,n),e.encodeAsync=async(t,n)=>Ko(e,t,n),e.decodeAsync=async(t,n)=>qo(e,t,n),e.safeEncode=(t,n)=>Uo(e,t,n),e.safeDecode=(t,n)=>Zo(e,t,n),e.safeEncodeAsync=async(t,n)=>Go(e,t,n),e.safeDecodeAsync=async(t,n)=>Wo(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new qa({type:"custom",check:"custom",fn:t,...vs(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new si({check:"custom",...vs(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Ss(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Ss(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(xo(t)),e.optional=()=>Ra(e),e.nullable=()=>Fa(e),e.nullish=()=>Ra(Fa(e)),e.nonoptional=t=>function(e,t){return new ja({type:"nonoptional",innerType:e,...vs(t)})}(e,t),e.array=()=>Sa(e),e.or=t=>Pa([e,t]),e.and=t=>new Oa({type:"intersection",left:e,right:t}),e.transform=t=>Ha(e,new $a({type:"transform",transform:t})),e.default=t=>{return n=t,new Ia({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():ms(n)}});var n},e.prefault=t=>{return n=t,new Ma({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():ms(n)}});var n},e.catch=t=>{return new Ba({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Ha(e,t),e.readonly=()=>new Ka({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return So.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>So.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return So.get(e);const n=e.clone();return So.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Jo=Yr("_ZodString",(e,t)=>{vi.init(e,t),Vo.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new ui({check:"string_format",format:"regex",...vs(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new pi({check:"string_format",format:"includes",...vs(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new di({check:"string_format",format:"starts_with",...vs(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new hi({check:"string_format",format:"ends_with",...vs(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Po(...t)),e.max=(...t)=>e.check(Co(...t)),e.length=(...t)=>e.check(Oo(...t)),e.nonempty=(...t)=>e.check(Po(1,...t)),e.lowercase=t=>e.check(function(e){return new li({check:"string_format",format:"lowercase",...vs(e)})}(t)),e.uppercase=t=>e.check(function(e){return new fi({check:"string_format",format:"uppercase",...vs(e)})}(t)),e.trim=()=>e.check(xo(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return xo(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(xo(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(xo(e=>e.toUpperCase()))}),Yo=Yr("ZodString",(e,t)=>{vi.init(e,t),Jo.init(e,t),e.email=t=>e.check(function(e,t){return new ta({type:"string",format:"email",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new sa({type:"string",format:"url",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new va({type:"string",format:"jwt",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ia({type:"string",format:"emoji",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.guid=t=>e.check(Ao(na,t)),e.uuid=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...vs(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...vs(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...vs(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new oa({type:"string",format:"nanoid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.guid=t=>e.check(Ao(na,t)),e.cuid=t=>e.check(function(e,t){return new aa({type:"string",format:"cuid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new ca({type:"string",format:"cuid2",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new ua({type:"string",format:"ulid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new ga({type:"string",format:"base64",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new ya({type:"string",format:"base64url",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new la({type:"string",format:"xid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new fa({type:"string",format:"ksuid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new pa({type:"string",format:"ipv4",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new da({type:"string",format:"ipv6",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new ha({type:"string",format:"cidrv4",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new ma({type:"string",format:"cidrv6",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new ba({type:"string",format:"e164",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new To({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...vs(e)})}(t)),e.date=t=>e.check(function(e){return new $o({type:"string",format:"date",check:"string_format",...vs(e)})}(t)),e.time=t=>e.check(function(e){return new No({type:"string",format:"time",check:"string_format",precision:null,...vs(e)})}(t)),e.duration=t=>e.check(function(e){return new Ro({type:"string",format:"duration",check:"string_format",...vs(e)})}(t))});var Qo;function Xo(e){return new Yo({type:"string",...vs(e)})}const ea=Yr("ZodStringFormat",(e,t)=>{Di.init(e,t),Jo.init(e,t)}),ta=Yr("ZodEmail",(e,t)=>{ki.init(e,t),ea.init(e,t)}),na=Yr("ZodGUID",(e,t)=>{wi.init(e,t),ea.init(e,t)}),ra=Yr("ZodUUID",(e,t)=>{_i.init(e,t),ea.init(e,t)}),sa=Yr("ZodURL",(e,t)=>{Ei.init(e,t),ea.init(e,t)}),ia=Yr("ZodEmoji",(e,t)=>{Si.init(e,t),ea.init(e,t)}),oa=Yr("ZodNanoID",(e,t)=>{Ai.init(e,t),ea.init(e,t)}),aa=Yr("ZodCUID",(e,t)=>{Ci.init(e,t),ea.init(e,t)}),ca=Yr("ZodCUID2",(e,t)=>{Pi.init(e,t),ea.init(e,t)}),ua=Yr("ZodULID",(e,t)=>{Oi.init(e,t),ea.init(e,t)}),la=Yr("ZodXID",(e,t)=>{xi.init(e,t),ea.init(e,t)}),fa=Yr("ZodKSUID",(e,t)=>{Ti.init(e,t),ea.init(e,t)}),pa=Yr("ZodIPv4",(e,t)=>{Fi.init(e,t),ea.init(e,t)}),da=Yr("ZodIPv6",(e,t)=>{Ii.init(e,t),ea.init(e,t)}),ha=Yr("ZodCIDRv4",(e,t)=>{Mi.init(e,t),ea.init(e,t)}),ma=Yr("ZodCIDRv6",(e,t)=>{ji.init(e,t),ea.init(e,t)}),ga=Yr("ZodBase64",(e,t)=>{zi.init(e,t),ea.init(e,t)}),ya=Yr("ZodBase64URL",(e,t)=>{Hi.init(e,t),ea.init(e,t)}),ba=Yr("ZodE164",(e,t)=>{Ki.init(e,t),ea.init(e,t)}),va=Yr("ZodJWT",(e,t)=>{qi.init(e,t),ea.init(e,t)}),Da=Yr("ZodUnknown",(e,t)=>{Ui.init(e,t),Vo.init(e,t)});function wa(){return new Da({type:"unknown"})}const _a=Yr("ZodNever",(e,t)=>{Zi.init(e,t),Vo.init(e,t)});function ka(e){return new _a({type:"never",...vs(e)})}const Ea=Yr("ZodArray",(e,t)=>{Wi.init(e,t),Vo.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Po(t,n)),e.nonempty=t=>e.check(Po(1,t)),e.max=(t,n)=>e.check(Co(t,n)),e.length=(t,n)=>e.check(Oo(t,n)),e.unwrap=()=>e.element});function Sa(e,t){return function(e,t,n){return new Ea({type:"array",element:t,...vs(n)})}(0,e,t)}const Aa=Yr("ZodObject",(e,t)=>{Xi.init(e,t),Vo.init(e,t),as(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ta({type:"enum",entries:t,...vs(void 0)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:wa()}),e.loose=()=>e.clone({...e._zod.def,catchall:wa()}),e.strict=()=>e.clone({...e._zod.def,catchall:ka()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!hs(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=us(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return cs(this,"shape",n),n},checks:[]});return bs(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!hs(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return cs(this,"shape",n),n},checks:e._zod.def.checks};return bs(e,n)}(e,t),e.merge=t=>function(e,t){const n=us(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return cs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return bs(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return bs(e,us(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return cs(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=us(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return cs(this,"shape",r),r},checks:[]});return bs(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=us(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return cs(this,"shape",s),s},checks:[]});return bs(t,r)}(Na,e,t[0]),e.required=(...t)=>function(e,t,n){const r=us(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return cs(this,"shape",s),s},checks:[]});return bs(t,r)}(ja,e,t[0])}),Ca=Yr("ZodUnion",(e,t)=>{to.init(e,t),Vo.init(e,t),e.options=t.options});function Pa(e,t){return new Ca({type:"union",options:e,...vs(t)})}const Oa=Yr("ZodIntersection",(e,t)=>{no.init(e,t),Vo.init(e,t)}),xa=Yr("ZodRecord",(e,t)=>{io.init(e,t),Vo.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),Ta=Yr("ZodEnum",(e,t)=>{oo.init(e,t),Vo.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Ta({...t,checks:[],...vs(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Ta({...t,checks:[],...vs(r),entries:s})}}),$a=Yr("ZodTransform",(e,t)=>{ao.init(e,t),Vo.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Xr(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Ss(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Ss(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}}),Na=Yr("ZodOptional",(e,t)=>{uo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ra(e){return new Na({type:"optional",innerType:e})}const La=Yr("ZodNullable",(e,t)=>{lo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Fa(e){return new La({type:"nullable",innerType:e})}const Ia=Yr("ZodDefault",(e,t)=>{fo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Ma=Yr("ZodPrefault",(e,t)=>{ho.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType}),ja=Yr("ZodNonOptional",(e,t)=>{mo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ba=Yr("ZodCatch",(e,t)=>{yo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),za=Yr("ZodPipe",(e,t)=>{bo.init(e,t),Vo.init(e,t),e.in=t.in,e.out=t.out});function Ha(e,t){return new za({type:"pipe",in:e,out:t})}const Ka=Yr("ZodReadonly",(e,t)=>{Do.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType}),qa=Yr("ZodCustom",(e,t)=>{_o.init(e,t),Vo.init(e,t)}),Ua=Sa(Xo()).default([]).optional(),Za=Pa([Xo(),Sa(Xo())]),Ga=(Wa=Xo(),Va=Za,new xa({type:"record",keyType:Wa,valueType:Va,...vs(undefined)})).optional();var Wa,Va;(function(){const e={type:"object",shape:{stanPath:Xo().min(1,{message:"stanPath must be a non-empty string"}),includes:Ua,excludes:Ua,imports:Ga}??{},...vs(void 0)};return new Aa(e)})().strict();const Ja=async({cwd:r,stanPath:s,baseName:i,includes:o,excludes:a,updateSnapshot:u="createIfMissing",includeOutputDirInDiff:l=!1,onArchiveWarnings:f})=>{const{outDir:p,diffDir:d}=await ae(r,s),h=await ne(r),m=await ie(h,{cwd:r,stanPath:s,includeOutputDir:!1,includes:o??[],excludes:a??[]}),g=await(async(e,r)=>{const s={};for(const i of r){const r=n.resolve(e,i),o=await t.readFile(r),a=c.createHash("sha256").update(o).digest("hex");s[i]=a}return s})(r,m),y=(e=>n.join(e,".archive.snapshot.json"))(d),b=e.existsSync(y),v=b?JSON.parse(await t.readFile(y,"utf8")):{},D=b?m.filter(e=>!v[e]||v[e]!==g[e]):[...m],{textFiles:w,warningsBody:_}=await $(r,D),k=w;x(_,f);const E=n.join(p,`${i}.diff.tar`),S=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(l)await S.create({file:E,cwd:r,filter:P(s)},O(k,s));else if(0===k.length){const e=(e=>n.join(e,".stan_no_changes"))(d);await t.writeFile(e,"no changes","utf8");const i=[`${s.replace(/\\/g,"/")}/diff/.stan_no_changes`];await S.create({file:E,cwd:r},i)}else{const e=Array.from(new Set([...k]));await S.create({file:E,cwd:r},e)}return"replace"===u?await t.writeFile(y,JSON.stringify(g,null,2),"utf8"):"createIfMissing"!==u||b||await t.writeFile(y,JSON.stringify(g,null,2),"utf8"),{diffPath:E}};var Ya,Qa={},Xa={},ec={};var tc,nc={};var rc,sc,ic={},oc={};var ac,cc,uc,lc,fc,pc,dc={};function hc(){if(lc)return uc;lc=1;var e=cc?ac:(cc=1,ac=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,s=-2,i=-2,o=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==s&&"["===e[n]&&"]"!==e[n+1]&&(s<n&&(s=e.indexOf("]",n)),s>n)){if(-1===a||a>s)return!0;if(-1===(a=e.indexOf("\\",n))||a>s)return!0}if(-1!==i&&"{"===e[n]&&"}"!==e[n+1]&&(i=e.indexOf("}",n))>n&&(-1===(a=e.indexOf("\\",n))||a>i))return!0;if(-1!==o&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(o=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>o))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(o=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>o)))return!0;if("\\"===e[n]){var c=e[n+1];n+=2;var u=t[c];if(u){var l=e.indexOf(u,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var s=t[r];if(s){var i=e.indexOf(s,n);-1!==i&&(n=i+1)}if("!"===e[n])return!0}else n++}return!1};return uc=function(t,s){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var i=n;return s&&!1===s.strict&&(i=r),i(t)}}var mc,gc,yc,bc,vc,Dc,wc,_c,kc,Ec,Sc,Ac,Cc,Pc,Oc,xc,Tc,$c,Nc,Rc={};function Lc(){return mc||(mc=1,(e=Rc).isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,s)=>!1!==s&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=s,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges|0||(e.invalid=!0,0)),e.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges|0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,e.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){const s=e[r];Array.isArray(s)?n(s):void 0!==s&&t.push(s)}return t};return n(e),t}),Rc;var e}function Fc(){if(yc)return gc;yc=1;const e=Lc();return gc=(t,n={})=>{const r=(t,s={})=>{const i=n.escapeInvalid&&e.isInvalidBrace(s),o=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(i||o)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}}function Ic(){if(wc)return Dc;wc=1;const e=vc?bc:(vc=1,bc=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}),t=(n,i,o)=>{if(!1===e(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||n===i)return String(n);if(!1===e(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...o};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let u=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(u-l)){let e=n+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=f(n)||f(i),d={min:n,max:i,a:u,b:l},h=[],m=[];return p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0&&(m=r(l<0?Math.abs(l):1,Math.abs(u),d,a),u=d.a=0),l>=0&&(h=r(u,l,d,a)),d.negatives=m,d.positives=h,d.result=function(e,t){let n=s(e,t,"-",!1)||[],r=s(t,e,"",!1)||[],i=s(e,t,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(m,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+m.length>1&&(d.result=`(?:${d.result})`),t.cache[c]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),s=r.length,i="",o=0;for(let e=0;e<s;e++){let[t,n]=r[e];t===n?i+=t:"0"!==t||"9"!==n?i+=l(t,n):o++}return o&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:s}}function r(e,t,r,s){let o,l=function(e,t){let n=1,r=1,s=a(e,n),o=new Set([t]);for(;e<=s&&s<=t;)o.add(s),n+=1,s=a(e,n);for(s=c(t+1,r)-1;e<s&&s<=t;)o.add(s),r+=1,s=c(t+1,r)-1;return o=[...o],o.sort(i),o}(e,t),f=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],i=n(String(d),String(t),s),a="";r.isPadded||!o||o.pattern!==i.pattern?(r.isPadded&&(a=p(t,r,s)),i.string=a+i.pattern+u(i.count),f.push(i),d=t+1,o=i):(o.count.length>1&&o.count.pop(),o.count.push(i.count[0]),o.string=o.pattern+u(o.count),d=t+1)}return f}function s(e,t,n,r,s){let i=[];for(let s of e){let{string:e}=s;r||o(t,"string",e)||i.push(n+e),r&&o(t,"string",e)&&i.push(n+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function o(e,t,n){return e.some(e=>e[t]===n)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function l(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function f(e){return/^-?(0+)\d/.test(e)}function p(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),s=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},Dc=t}function Mc(){if(kc)return _c;kc=1;const e=p,t=Ic(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),i=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},o=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},a=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},c=(e,n,r,s)=>{if(r)return t(e,n,{wrap:!1,...s});let i=String.fromCharCode(e);return e===n?i:`[${i}-${String.fromCharCode(n)}]`},u=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),f=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},d=(e,t,n=1,r={})=>{let s=Number(e),f=Number(t);if(!Number.isInteger(s)||!Number.isInteger(f)){if(!0===r.strictRanges)throw l([e,t]);return[]}0===s&&(s=0),0===f&&(f=0);let p=s>f,d=String(e),h=String(t),m=String(n);n=Math.max(Math.abs(n),1);let g=i(d)||i(h)||i(m),y=g?Math.max(d.length,h.length,m.length):0,b=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),v=r.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(r.toRegex&&1===n)return c(a(e,y),a(t,y),!0,r);let D={negatives:[],positives:[]},w=e=>D[e<0?"negatives":"positives"].push(Math.abs(e)),_=[],k=0;for(;p?s>=f:s<=f;)!0===r.toRegex&&n>1?w(s):_.push(o(v(s,k),y,b)),s=p?s-n:s+n,k++;return!0===r.toRegex?n>1?((e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,s=t.capture?"":"?:",i="",o="";return e.positives.length&&(i=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(o=`-(${s}${e.negatives.map(e=>a(String(e),n)).join("|")})`),r=i&&o?`${i}|${o}`:i||o,t.wrap?`(${s}${r})`:r})(D,r,y):u(_,null,{wrap:!1,...r}):_},h=(e,t,i,o={})=>{if(null==t&&r(e))return[e];if(!r(e)||!r(t))return f(e,t,o);if("function"==typeof i)return h(e,t,1,{transform:i});if(n(i))return h(e,t,0,i);let a={...o};return!0===a.capture&&(a.wrap=!0),i=i||a.step||1,s(i)?s(e)&&s(t)?d(e,t,i,a):((e,t,n=1,r={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return f(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),o=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=o>a,p=Math.min(o,a),d=Math.max(o,a);if(r.toRegex&&1===n)return c(p,d,!1,r);let h=[],m=0;for(;l?o>=a:o<=a;)h.push(i(o,m)),o=l?o-n:o+n,m++;return!0===r.toRegex?u(h,null,{wrap:!1,options:r}):h})(e,t,Math.max(Math.abs(i),1),a):null==i||n(i)?h(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return _c=h}function jc(){if(Nc)return $c;Nc=1;const e=Fc(),t=function(){if(Sc)return Ec;Sc=1;const e=Mc(),t=Lc();return Ec=(n,r={})=>{const s=(n,i={})=>{const o=t.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,c=!0===o||!0===a,u=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return u+n.value;if(!0===n.isClose)return console.log("node.isClose",u,n.value),u+n.value;if("open"===n.type)return c?u+n.value:"(";if("close"===n.type)return c?u+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const s=t.reduce(n.nodes),i=e(...s,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return s.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const e of n.nodes)l+=s(e,n);return l};return s(n)}}(),n=function(){if(Cc)return Ac;Cc=1;const e=Mc(),t=Fc(),n=Lc(),r=(e="",t="",s=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return s?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)i.push(r(e,t,s));else for(let e of t)!0===s&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?r(n,e,s):n+e);return n.flatten(i)};return Ac=(s,i={})=>{const o=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(s,c={})=>{s.queue=[];let u=c,l=c.queue;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar)return void l.push(r(l.pop(),t(s,i)));if("brace"===s.type&&!0!==s.invalid&&2===s.nodes.length)return void l.push(r(l.pop(),["{}"]));if(s.nodes&&s.ranges>0){const a=n.reduce(s.nodes);if(n.exceedsLimit(...a,i.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(s,i)),l.push(r(l.pop(),c)),void(s.nodes=[])}const f=n.encloseBrace(s);let p=s.queue,d=s;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,p=d.queue;for(let e=0;e<s.nodes.length;e++){const t=s.nodes[e];"comma"!==t.type||"brace"!==s.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(r(p.pop(),t.value)):t.nodes&&a(t,s):l.push(r(l.pop(),p,f)):(1===e&&p.push(""),p.push(""))}return p};return n.flatten(a(s))},Ac}(),r=function(){if(Tc)return xc;Tc=1;const e=Fc(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:m}=Oc?Pc:(Oc=1,Pc={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return xc=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const D={type:"root",input:g,nodes:[]},w=[D];let _=D,k=D,E=0;const S=g.length;let A,C=0,P=0;const O=()=>g[C++],x=e=>{if("text"===e.type&&"dot"===k.type&&(k.type="text"),!k||"text"!==k.type||"text"!==e.type)return _.nodes.push(e),e.parent=_,e.prev=k,k=e,e;k.value+=e.value};for(x({type:"bos"});C<S;)if(_=w[w.length-1],A=O(),A!==m&&A!==h)if(A!==n)if(A!==f){if(A===l){let e;for(E++;C<S&&(e=O());)if(A+=e,e!==l)if(e!==n){if(e===f&&(E--,0===E))break}else A+=O();else E++;x({type:"text",value:A});continue}if(A!==o)if(A!==a){if(A===p||A===d||A===r){const e=A;let t;for(!0!==y.keepQuotes&&(A="");C<S&&(t=O());)if(t!==n){if(t===e){!0===y.keepQuotes&&(A+=t);break}A+=t}else A+=t+O();x({type:"text",value:A});continue}if(A===c){P++;const e=k.value&&"$"===k.value.slice(-1)||!0===_.dollar;_=x({type:"brace",open:!0,close:!1,dollar:e,depth:P,commas:0,ranges:0,nodes:[]}),w.push(_),x({type:"open",value:A});continue}if(A===u){if("brace"!==_.type){x({type:"text",value:A});continue}const e="close";_=w.pop(),_.close=!0,x({type:e,value:A}),P--,_=w[w.length-1];continue}if(A===s&&P>0){if(_.ranges>0){_.ranges=0;const t=_.nodes.shift();_.nodes=[t,{type:"text",value:e(_)}]}x({type:"comma",value:A}),_.commas++}else{if(A===i&&P>0&&0===_.commas){const e=_.nodes;if(0===P||0===e.length){x({type:"text",value:A});continue}if("dot"===k.type){if(_.range=[],k.value+=A,k.type="range",3!==_.nodes.length&&5!==_.nodes.length){_.invalid=!0,_.ranges=0,k.type="text";continue}_.ranges++,_.args=[];continue}if("range"===k.type){e.pop();const t=e[e.length-1];t.value+=k.value+A,k=t,_.ranges--;continue}x({type:"dot",value:A});continue}x({type:"text",value:A})}}else{if("paren"!==_.type){x({type:"text",value:A});continue}_=w.pop(),x({type:"text",value:A}),_=w[w.length-1]}else _=x({type:"paren",nodes:[]}),w.push(_),x({type:"text",value:A})}else x({type:"text",value:"\\"+A});else x({type:"text",value:(y.keepEscaping?A:"")+O()});do{if(_=w.pop(),"root"!==_.type){_.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=w[w.length-1],t=e.nodes.indexOf(_);e.nodes.splice(t,1,..._.nodes)}}while(w.length>0);return x({type:"eos"}),D},xc}(),s=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=s.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return s.parse=(e,t={})=>r(e,t),s.stringify=(t,n={})=>e("string"==typeof t?s.parse(t,n):t,n),s.compile=(e,n={})=>("string"==typeof e&&(e=s.parse(e,n)),t(e,n)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),$c=s}var Bc,zc,Hc,Kc,qc,Uc,Zc,Gc,Wc,Vc,Jc,Yc,Qc,Xc,eu={};function tu(){if(zc)return Bc;zc=1;const e=f,t="\\\\/",n=`[^${t}]`,r="\\.",s="\\/",i="[^/]",o=`(?:${s}|$)`,a=`(?:^|${s})`,c=`${r}{1,2}${o}`,u={DOT_LITERAL:r,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!${r})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${r}{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:a},l={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${t}])${r}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return Bc={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{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"},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:{"***":"*","**/**":"**","**/**/**":"**"},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,SEP:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?l:u}}function nu(){return Hc||(Hc=1,function(e){const t=f,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=tu();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>i.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(o,"\\$1"),e.toPosixSlashes=e=>e.replace(r,"/"),e.removeBackslashes=e=>e.replace(s,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(eu)),eu}function ru(){return Jc?Vc:(Jc=1,Vc=function(){if(Wc)return Gc;Wc=1;const e=f,t=function(){if(qc)return Kc;qc=1;const e=nu(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=tu(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Kc=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,k=[],E=[],S=[];let A,C,P=b,O=-1,x=0,T=0,$=!1,N=!1,R=!1,L=!1,F=!1,I=!1,M=!1,j=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const q=()=>O>=w,U=()=>P.charCodeAt(O+1),Z=()=>(A=C,P.charCodeAt(++O));for(;O<w;){let e;if(C=Z(),C!==r){if(!0===I||C===c){for(H++;!0!==q()&&(C=Z());)if(C!==r)if(C!==c){if(!0!==I&&C===i&&(C=Z())===i){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,$=K.isBrace=!0,z=!0;break}}else H++;else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===o)&&U()===u){if(R=K.isGlob=!0,L=K.isExtglob=!0,z=!0,C===o&&O===x&&(B=!0),!0===_){for(;!0!==q()&&(C=Z());)if(C!==r){if(C===h){R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==q()&&(e=Z());)if(e!==r){if(e===m){N=K.isBracket=!0,R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==x){if(!0!==D.noparen&&C===u){if(R=K.isGlob=!0,!0===_){for(;!0!==q()&&(C=Z());)if(C!==u){if(C===h){z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(!0===R){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,x++}else{if(k.push(O),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===x+1){x+=2;continue}T=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(L=!1,R=!1);let G=P,W="",V="";x>0&&(W=P.slice(0,x),P=P.slice(x),T-=x),G&&!0===R&&T>0?(G=P.slice(0,T),V=P.slice(T)):!0===R?(G="",V=P):G=P,G&&""!==G&&"/"!==G&&G!==P&&g(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===D.unescape&&(V&&(V=e.removeBackslashes(V)),G&&!0===M&&(G=e.removeBackslashes(G)));const J={prefix:W,input:b,start:x,base:G,glob:V,isBrace:$,isBracket:N,isGlob:R,isExtglob:L,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(J.maxDepth=0,g(C)||E.push(K),J.tokens=E),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<k.length;t++){const n=e?e+1:x,r=k[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==x?(E[t].isPrefix=!0,E[t].value=W):E[t].value=s,y(E[t]),J.maxDepth+=E[t].depth),0===t&&""===s||S.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);S.push(t),D.tokens&&(E[E.length-1].value=t,y(E[E.length-1]),J.maxDepth+=E[E.length-1].depth)}J.slashes=k,J.parts=S}return J},Kc}(),n=function(){if(Zc)return Uc;Zc=1;const e=tu(),t=nu(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=t.isWindows(f),v=e.globChars(b),D=e.extglobChars(v),{DOT_LITERAL:w,PLUS_LITERAL:_,SLASH_LITERAL:k,ONE_CHAR:E,DOTS_SLASH:S,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:P,QMARK:O,QMARK_NO_DOT:x,STAR:T,START_ANCHOR:$}=v,N=e=>`(${y}(?:(?!${$}${e.dot?S:w}).)*?)`,R=p.dot?"":A,L=p.dot?O:x;let F=!0===p.bash?N(p):T;p.capture&&(F=`(${F})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const I={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,I),h=l.length;const M=[],j=[],B=[];let z,H=m;const K=()=>I.index===h-1,q=I.peek=(e=1)=>l[I.index+e],U=I.advance=()=>l[++I.index]||"",Z=()=>l.slice(I.index+1),G=(e="",t=0)=>{I.consumed+=e,I.index+=t},W=e=>{I.output+=null!=e.output?e.output:e.value,G(e.value)},V=()=>{let e=1;for(;"!"===q()&&("("!==q(2)||"?"===q(3));)U(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},J=e=>{I[e]++,B.push(e)},Y=e=>{I[e]--,B.pop()},Q=e=>{if("globstar"===H.type){const t=I.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||M.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(I.output=I.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=F,I.output+=H.output)}if(M.length&&"paren"!==e.type&&(M[M.length-1].inner+=e.value),(e.value||e.output)&&W(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,g.push(e),H=e},X=(e,t)=>{const n={...D[t],conditions:1,inner:""};n.prev=H,n.parens=I.parens,n.output=I.output;const r=(p.capture?"(":"")+n.open;J("parens"),Q({type:e,value:t,output:I.output?"":E}),Q({type:"paren",extglob:!0,value:U(),output:r}),M.push(n)},ee=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=F;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=N(p)),(r!==F||K()||/^\)+$/.test(Z()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=Z())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(I.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:z,output:n}),Y("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,s,i,o)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(i?O.repeat(i.length):""):0===o?L+(i?O.repeat(i.length):""):O.repeat(r.length):"."===s?w.repeat(r.length):"*"===s?n?n+s+(i?F:""):F:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(I.output=l,I):(I.output=t.wrapOutput(n,I,f),I)}for(;!K();){if(z=U(),"\0"===z)continue;if("\\"===z){const e=q();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){z+="\\",Q({type:"text",value:z});continue}const t=/^\\+/.exec(Z());let n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(z+="\\")),!0===p.unescape?z=U():z+=U(),0===I.brackets){Q({type:"text",value:z});continue}}if(I.brackets>0&&("]"!==z||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===z){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),s=r[n];if(s){H.value=t+s,I.backtrack=!0,U(),m.output||1!==g.indexOf(H)||(m.output=E);continue}}}("["===z&&":"!==q()||"-"===z&&"]"===q())&&(z=`\\${z}`),"]"!==z||"["!==H.value&&"[^"!==H.value||(z=`\\${z}`),!0===p.posix&&"!"===z&&"["===H.value&&(z="^"),H.value+=z,W({value:z});continue}if(1===I.quotes&&'"'!==z){z=t.escapeRegex(z),H.value+=z,W({value:z});continue}if('"'===z){I.quotes=1===I.quotes?0:1,!0===p.keepQuotes&&Q({type:"text",value:z});continue}if("("===z){J("parens"),Q({type:"paren",value:z});continue}if(")"===z){if(0===I.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=M[M.length-1];if(e&&I.parens===e.parens+1){ee(M.pop());continue}Q({type:"paren",value:z,output:I.parens?")":"\\)"}),Y("parens");continue}if("["===z){if(!0!==p.nobracket&&Z().includes("]"))J("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));z=`\\${z}`}Q({type:"bracket",value:z});continue}if("]"===z){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){Q({type:"text",value:z,output:`\\${z}`});continue}if(0===I.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Q({type:"text",value:z,output:`\\${z}`});continue}Y("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(z=`/${z}`),H.value+=z,W({value:z}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(I.output=I.output.slice(0,-H.value.length),!0===p.literalBrackets){I.output+=n,H.value=n;continue}H.value=`(${y}${n}|${H.value})`,I.output+=H.value;continue}if("{"===z&&!0!==p.nobrace){J("braces");const e={type:"brace",value:z,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};j.push(e),Q(e);continue}if("}"===z){const e=j[j.length-1];if(!0===p.nobrace||!e){Q({type:"text",value:z,output:z});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),I.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{",z=t="\\}",I.output=n;for(const e of r)I.output+=e.output||e.value}Q({type:"brace",value:z,output:t}),Y("braces"),j.pop();continue}if("|"===z){M.length>0&&M[M.length-1].conditions++,Q({type:"text",value:z});continue}if(","===z){let e=z;const t=j[j.length-1];t&&"braces"===B[B.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:z,output:e});continue}if("/"===z){if("dot"===H.type&&I.index===I.start+1){I.start=I.index+1,I.consumed="",I.output="",g.pop(),H=m;continue}Q({type:"slash",value:z,output:k});continue}if("."===z){if(I.braces>0&&"dot"===H.type){"."===H.value&&(H.output=w);const e=j[j.length-1];H.type="dots",H.output+=z,H.value+=z,e.dots=!0;continue}if(I.braces+I.parens===0&&"bos"!==H.type&&"slash"!==H.type){Q({type:"text",value:z,output:w});continue}Q({type:"dot",value:z,output:w});continue}if("?"===z){if((!H||"("!==H.value)&&!0!==p.noextglob&&"("===q()&&"?"!==q(2)){X("qmark",z);continue}if(H&&"paren"===H.type){const e=q();let n=z;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(Z()))&&(n=`\\${z}`),Q({type:"text",value:z,output:n});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){Q({type:"qmark",value:z,output:x});continue}Q({type:"qmark",value:z,output:O});continue}if("!"===z){if(!0!==p.noextglob&&"("===q()&&("?"!==q(2)||!/[!=<:]/.test(q(3)))){X("negate",z);continue}if(!0!==p.nonegate&&0===I.index){V();continue}}if("+"===z){if(!0!==p.noextglob&&"("===q()&&"?"!==q(2)){X("plus",z);continue}if(H&&"("===H.value||!1===p.regex){Q({type:"plus",value:z,output:_});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||I.parens>0){Q({type:"plus",value:z});continue}Q({type:"plus",value:_});continue}if("@"===z){if(!0!==p.noextglob&&"("===q()&&"?"!==q(2)){Q({type:"at",extglob:!0,value:z,output:""});continue}Q({type:"text",value:z});continue}if("*"!==z){"$"!==z&&"^"!==z||(z=`\\${z}`);const e=s.exec(Z());e&&(z+=e[0],I.index+=e[0].length),Q({type:"text",value:z});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=z,H.output=F,I.backtrack=!0,I.globstar=!0,G(z);continue}let e=Z();if(!0!==p.noextglob&&/^\([^?]/.test(e)){X("star",z);continue}if("star"===H.type){if(!0===p.noglobstar){G(z);continue}const t=H.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Q({type:"star",value:z,output:""});continue}const i=I.braces>0&&("comma"===t.type||"brace"===t.type),o=M.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!o){Q({type:"star",value:z,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[I.index+4];if(t&&"/"!==t)break;e=e.slice(3),G("/**",3)}if("bos"===t.type&&K()){H.type="globstar",H.value+=z,H.output=N(p),I.output=H.output,I.globstar=!0,G(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&K()){I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=N(p)+(p.strictSlashes?")":"|$)"),H.value+=z,I.globstar=!0,I.output+=t.output+H.output,G(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${N(p)}${k}|${k}${n})`,H.value+=z,I.output+=t.output+H.output,I.globstar=!0,G(z+U()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=z,H.output=`(?:^|${k}|${N(p)}${k})`,I.output=H.output,I.globstar=!0,G(z+U()),Q({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-H.output.length),H.type="globstar",H.output=N(p),H.value+=z,I.output+=H.output,I.globstar=!0,G(z);continue}const n={type:"star",value:z,output:F};!0!==p.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==p.regex?(I.index!==I.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(I.output+=C,H.output+=C):!0===p.dot?(I.output+=P,H.output+=P):(I.output+=R,H.output+=R),"*"!==q()&&(I.output+=E,H.output+=E)),Q(n)):(n.output=z,Q(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=R+n.output),Q(n))}for(;I.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));I.output=t.escapeLast(I.output,"["),Y("brackets")}for(;I.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));I.output=t.escapeLast(I.output,"("),Y("parens")}for(;I.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));I.output=t.escapeLast(I.output,"{"),Y("braces")}if(!0===p.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Q({type:"maybe_slash",value:"",output:`${k}?`}),!0===I.backtrack){I.output="";for(const e of I.tokens)I.output+=null!=e.output?e.output:e.value,e.suffix&&(I.output+=e.suffix)}return I};return u.fastpaths=(r,s)=>{const i={...s},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=o[r]||r;const u=t.isWindows(s),{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(u),v=i.dot?m:h,D=i.dot?g:h,w=i.capture?"":"?:";let _=!0===i.bash?".*?":y;i.capture&&(_=`(${_})`);const k=e=>!0===e.noglobstar?_:`(${w}(?:(?!${b}${e.dot?d:l}).)*?)`,E=e=>{switch(e){case"*":return`${v}${p}${_}`;case".*":return`${l}${p}${_}`;case"*.*":return`${v}${_}${l}${p}${_}`;case"*/*":return`${v}${_}${f}${p}${D}${_}`;case"**":return v+k(i);case"**/*":return`(?:${v}${k(i)}${f})?${D}${p}${_}`;case"**/*.*":return`(?:${v}${k(i)}${f})?${D}${_}${l}${p}${_}`;case"**/.*":return`(?:${v}${k(i)}${f})?${l}${p}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+l+t[2]}}},S=t.removePrefix(r,{negated:!1,prefix:""});let A=E(S);return A&&!0!==i.strictSlashes&&(A+=`${f}?`),A},Uc=u}(),r=nu(),s=tu(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>i(e,t,n)),s=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return s}const s=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=r.isWindows(t),u=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=u.state;delete u.state;let f=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};f=i(a.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:s,match:o,output:p}=i.test(n,u,t,{glob:e,posix:c}),d={glob:e,state:l,regex:u,posix:c,input:n,output:p,match:o,isMatch:s};return"function"==typeof a.onResult&&a.onResult(d),!1===s?(d.isMatch=!1,!!r&&d):f(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof a.onMatch&&a.onMatch(d),!r||d)};return n&&(p.state=l),p};return i.test=(e,t,n,{glob:s,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},c=a.format||(o?r.toPosixSlashes:null);let u=e===s,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===s),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},i.matchBase=(t,n,s,o=r.isWindows(s))=>(n instanceof RegExp?n:i.makeRe(n,s)).test(e.basename(t)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,t)=>Array.isArray(e)?e.map(e=>i.parse(e,t)):n(e,{...t,fastpaths:!1}),i.scan=(e,n)=>t(e,n),i.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const s=t||{},o=s.contains?"":"^",a=s.contains?"":"$";let c=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=i.toRegex(c,t);return!0===r&&(u.state=e),u},i.makeRe=(e,t={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=n.fastpaths(e,t)),o.output||(o=n(e,t)),i.compileRe(o,t,r,s)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,Gc=i}())}var su,iu,ou,au={};function cu(){if(iu)return su;iu=1;const e=d.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,s=t.length;e<s;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return su=function(){const r=[],s=t.call(arguments);let i=!1,o=s[s.length-1];o&&!Array.isArray(o)&&null==o.pipe?s.pop():o={};const a=!1!==o.end,c=!0===o.pipeError;null==o.objectMode&&(o.objectMode=!0),null==o.highWaterMark&&(o.highWaterMark=65536);const u=e(o);function l(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],o));return f(),this}function f(){if(i)return;i=!0;let e=r.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(i=!1,f())}function s(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",r),n()}function r(e){u.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",r),e.pipe(u,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)s(e[t]);n()}function p(){i=!1,u.emit("queueDrain"),a&&u.end()}return u.setMaxListeners(0),u.add=l,u.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),s.length&&l.apply(null,s),u},su}var uu,lu,fu,pu={};function du(){if(lu)return Xa;lu=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.string=Xa.stream=Xa.pattern=Xa.path=Xa.fs=Xa.errno=Xa.array=void 0;const e=(Ya||(Ya=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.splitWhen=ec.flatten=void 0,ec.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},ec.splitWhen=function(e,t){const n=[[]];let r=0;for(const s of e)t(s)?(r++,n[r]=[]):n[r].push(s);return n}),ec);Xa.array=e;const t=(tc||(tc=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.isEnoentCodeError=void 0,nc.isEnoentCodeError=function(e){return"ENOENT"===e.code}),nc);Xa.errno=t;const n=function(){if(rc)return ic;rc=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return ic.createDirentFromStats=function(t,n){return new e(t,n)},ic}();Xa.fs=n;const r=function(){if(sc)return oc;sc=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.convertPosixPathToPattern=oc.convertWindowsPathToPattern=oc.convertPathToPattern=oc.escapePosixPath=oc.escapeWindowsPath=oc.escape=oc.removeLeadingDotSegment=oc.makeAbsolute=oc.unixify=void 0;const e=f,t="win32"===l.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,r=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,s=/^\\\\([.?])/,i=/\\(?![!()+@[\]{}])/g;function o(e){return e.replace(r,"\\$2")}function a(e){return e.replace(n,"\\$2")}function c(e){return o(e).replace(s,"//$1").replace(i,"/")}function u(e){return a(e)}return oc.unixify=function(e){return e.replace(/\\/g,"/")},oc.makeAbsolute=function(t,n){return e.resolve(t,n)},oc.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},oc.escape=t?o:a,oc.escapeWindowsPath=o,oc.escapePosixPath=a,oc.convertPathToPattern=t?c:u,oc.convertWindowsPathToPattern=c,oc.convertPosixPathToPattern=u,oc}();Xa.path=r;const s=function(){if(Xc)return dc;Xc=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.isAbsolute=dc.partitionAbsoluteAndRelative=dc.removeDuplicateSlashes=dc.matchAny=dc.convertPatternsToRe=dc.makeRe=dc.getPatternParts=dc.expandBraceExpansion=dc.expandPatternsWithBraceExpansion=dc.isAffectDepthOfReadingPattern=dc.endsWithSlashGlobStar=dc.hasGlobStar=dc.getBaseDirectory=dc.isPatternRelatedToParentDirectory=dc.getPatternsOutsideCurrentDirectory=dc.getPatternsInsideCurrentDirectory=dc.getPositivePatterns=dc.getNegativePatterns=dc.isPositivePattern=dc.isNegativePattern=dc.convertToNegativePattern=dc.convertToPositivePattern=dc.isDynamicPattern=dc.isStaticPattern=void 0;const e=f,t=function(){if(pc)return fc;pc=1;var e=hc(),t=f.posix.dirname,n="win32"===l.platform(),r=/\\/g,s=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return fc=function(a,c){Object.assign({flipBackslashes:!0},c).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(r,"/")),s.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||i.test(a));return a.replace(o,"$1")}}(),n=function(){if(Qc)return Yc;Qc=1;const e=p,t=jc(),n=ru(),r=nu(),s=e=>""===e||"./"===e,i=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},o=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let s=new Set,i=new Set,o=new Set,a=0,c=e=>{o.add(e.output),r&&r.onResult&&r.onResult(e)};for(let o=0;o<t.length;o++){let u=n(String(t[o]),{...r,onResult:c},!0),l=u.state.negated||u.state.negatedExtglob;l&&a++;for(let t of e){let e=u(t,!0);(l?!e.isMatch:e.isMatch)&&(l?s.add(e.output):(s.delete(e.output),i.add(e.output)))}}let u=(a===t.length?[...o]:[...i]).filter(e=>!s.has(e));if(r&&0===u.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return u};return o.match=o,o.matcher=(e,t)=>n(e,t),o.any=o.isMatch=(e,t,r)=>n(t,r)(e),o.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,s=[],i=new Set(o(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),s.push(e.output)}}));for(let e of s)i.has(e)||r.add(e);return[...r]},o.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>o.contains(t,e,r));if("string"==typeof n){if(s(t)||s(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return o.isMatch(t,n,{...r,contains:!0})},o.matchKeys=(e,t,n)=>{if(!r.isObject(e))throw new TypeError("Expected the first argument to be an object");let s=o(Object.keys(e),t,n),i={};for(let t of s)i[t]=e[t];return i},o.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(s.some(e=>t(e)))return!0}return!1},o.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!s.every(e=>t(e)))return!1}return!0},o.all=(t,r,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,s)(t))},o.capture=(e,t,s)=>{let i=r.isWindows(s),o=n.makeRe(String(e),{...s,capture:!0}).exec(i?r.toPosixSlashes(t):t);if(o)return o.slice(1).map(e=>void 0===e?"":e)},o.makeRe=(...e)=>n.makeRe(...e),o.scan=(...e)=>n.scan(...e),o.parse=(e,r)=>{let s=[];for(let i of[].concat(e||[]))for(let e of t(String(i),r))s.push(n.parse(e,r));return s},o.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(e)?[e]:t(e,n)},o.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return o.braces(e,{...t,expand:!0})},o.hasBraces=i,Yc=o}(),r=/[*?]|^!/,s=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!d(e,t)}function d(e,t={}){return!(""===e||!(!1===t.caseSensitiveMatch||e.includes("\\")||r.test(e)||s.test(e)||i.test(e)||!1!==t.extglob&&o.test(e)||!1!==t.braceExpansion&&function(e){const t=e.indexOf("{");if(-1===t)return!1;const n=e.indexOf("}",t+1);if(-1===n)return!1;const r=e.slice(t,n);return a.test(r)}(e)))}function h(e){return e.startsWith("!")&&"("!==e[1]}function m(e){return!h(e)}function g(e){return e.startsWith("..")||e.startsWith("./..")}function y(e){return e.endsWith("/**")}function b(e){const t=n.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function v(e,t){return n.makeRe(e,t)}function D(t){return e.isAbsolute(t)}return dc.isStaticPattern=u,dc.isDynamicPattern=d,dc.convertToPositivePattern=function(e){return h(e)?e.slice(1):e},dc.convertToNegativePattern=function(e){return"!"+e},dc.isNegativePattern=h,dc.isPositivePattern=m,dc.getNegativePatterns=function(e){return e.filter(h)},dc.getPositivePatterns=function(e){return e.filter(m)},dc.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!g(e))},dc.getPatternsOutsideCurrentDirectory=function(e){return e.filter(g)},dc.isPatternRelatedToParentDirectory=g,dc.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},dc.hasGlobStar=function(e){return e.includes("**")},dc.endsWithSlashGlobStar=y,dc.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return y(t)||u(n)},dc.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(b(t)),[])},dc.expandBraceExpansion=b,dc.getPatternParts=function(e,t){let{parts:r}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},dc.makeRe=v,dc.convertPatternsToRe=function(e,t){return e.map(e=>v(e,t))},dc.matchAny=function(e,t){return t.some(t=>t.test(e))},dc.removeDuplicateSlashes=function(e){return e.replace(c,"/")},dc.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)D(r)?t.push(r):n.push(r);return[t,n]},dc.isAbsolute=D,dc}();Xa.pattern=s;const i=function(){if(ou)return au;ou=1,Object.defineProperty(au,"__esModule",{value:!0}),au.merge=void 0;const e=cu();function t(e){e.forEach(e=>e.emit("close"))}return au.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},au}();Xa.stream=i;const o=(uu||(uu=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.isEmpty=pu.isString=void 0,pu.isString=function(e){return"string"==typeof e},pu.isEmpty=function(e){return""===e}),pu);return Xa.string=o,Xa}var hu,mu={},gu={},yu={},bu={},vu={},Du={},wu={},_u={},ku={};var Eu,Su,Au,Cu,Pu,Ou,xu,Tu,$u={},Nu={},Ru={};function Lu(){if(Cu)return _u;Cu=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.statSync=_u.stat=_u.Settings=void 0;const e=function(){if(hu)return ku;function e(e,t){e(t)}function t(e,t){e(null,t)}return hu=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.read=void 0,ku.read=function(n,r,s){r.fs.lstat(n,(i,o)=>{null===i?o.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(s,n):void t(s,o);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(s,i)}):t(s,o):e(s,i)})},ku}(),t=(Eu||(Eu=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.read=void 0,$u.read=function(e,t){const n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{const n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}),$u),n=function(){if(Au)return Nu;Au=1,Object.defineProperty(Nu,"__esModule",{value:!0});const e=(Su||(Su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=m;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Ru)),Ru);return Nu.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},Nu}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return _u.Settings=n.default,_u.stat=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},_u.statSync=function(e,n){const s=r(n);return t.read(e,s)},_u}var Fu,Iu={};function Mu(){if(Fu)return Iu;Fu=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),n=Number.parseInt(e[1],10),r=t>10,s=10===t&&n>=10;return Iu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,Iu}var ju,Bu,zu={},Hu={};function Ku(){if(Bu)return zu;Bu=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.fs=void 0;const e=function(){if(ju)return Hu;ju=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return Hu.createDirentFromStats=function(t,n){return new e(t,n)},Hu}();return zu.fs=e,zu}var qu,Uu,Zu={};function Gu(){return qu||(qu=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.joinPathSegments=void 0,Zu.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),Zu}function Wu(){if(Uu)return wu;Uu=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.readdir=wu.readdirWithFileTypes=wu.read=void 0;const e=Lu(),t=function(){if(Tu)return xu;Tu=1,xu=function(t,n){let r,s,i,o=!0;function a(t){function s(){n&&n(t,r),n=null}o?e(s):s()}function c(e,t,n){r[e]=n,(0===--s||t)&&a(t)}Array.isArray(t)?(r=[],s=t.length):(i=Object.keys(t),r={},s=i.length),s?i?i.forEach(function(e){t[e](function(t,n){c(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):a(null),o=!1};const e=function(){if(Ou)return Pu;let e;return Ou=1,Pu="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:N):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return xu}(),n=Mu(),r=Ku(),s=Gu();function i(e,n,i){n.fs.readdir(e,{withFileTypes:!0},(o,u)=>{if(null!==o)return void a(i,o);const l=u.map(t=>({dirent:t,name:t.name,path:s.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void c(i,l);const f=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(s,i)=>{if(null!==s)return t.throwErrorOnBrokenSymbolicLink?void n(s):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,i),n(null,e)}):n(null,e)}}(e,n));t(f,(e,t)=>{null===e?c(i,t):a(i,e)})})}function o(n,i,o){i.fs.readdir(n,(u,l)=>{if(null!==u)return void a(o,u);const f=l.map(t=>{const o=s.joinPathSegments(n,t,i.pathSegmentSeparator);return n=>{e.stat(o,i.fsStatSettings,(e,s)=>{if(null!==e)return void n(e);const a={name:t,path:o,dirent:r.fs.createDirentFromStats(t,s)};i.stats&&(a.stats=s),n(null,a)})}});t(f,(e,t)=>{null===e?c(o,t):a(o,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return wu.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t,r):i(e,t,r)},wu.readdirWithFileTypes=i,wu.readdir=o,wu}var Vu,Ju,Yu,Qu,Xu={},el={},tl={};function nl(){if(Qu)return Du;Qu=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.Settings=Du.scandirSync=Du.scandir=void 0;const e=Wu(),t=function(){if(Vu)return Xu;Vu=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.readdir=Xu.readdirWithFileTypes=Xu.read=void 0;const e=Lu(),t=Mu(),n=Ku(),r=Gu();function s(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(s=>{const i={dirent:s,name:s.name,path:r.joinPathSegments(e,s.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=n.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,s){return s.fs.readdirSync(t).map(i=>{const o=r.joinPathSegments(t,i,s.pathSegmentSeparator),a=e.statSync(o,s.fsStatSettings),c={name:i,path:o,dirent:n.fs.createDirentFromStats(i,a)};return s.stats&&(c.stats=a),c})}return Xu.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,n):i(e,n)},Xu.readdirWithFileTypes=s,Xu.readdir=i,Xu}(),n=function(){if(Yu)return el;Yu=1,Object.defineProperty(el,"__esModule",{value:!0});const e=f,t=Lu(),n=(Ju||(Ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=m;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(tl)),tl);return el.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},el}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Du.Settings=n.default,Du.scandir=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Du.scandirSync=function(e,n){const s=r(n);return t.read(e,s)},Du}var rl,sl,il,ol={exports:{}};var al,cl={};function ul(){return al||(al=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.joinPathSegments=cl.replacePathSegmentSeparator=cl.isAppliedFilter=cl.isFatalError=void 0,cl.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},cl.isAppliedFilter=function(e,t){return null===e||e(t)},cl.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},cl.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),cl}var ll,fl,pl,dl={};function hl(){if(ll)return dl;ll=1,Object.defineProperty(dl,"__esModule",{value:!0});const e=ul();return dl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},dl}function ml(){if(fl)return vu;fl=1,Object.defineProperty(vu,"__esModule",{value:!0});const e=h,t=nl(),n=function(){if(il)return ol.exports;il=1;var e=sl?rl:(sl=1,rl=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}});function t(t,s,i){if("function"==typeof t&&(i=s,s=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var o=e(r),a=null,c=null,u=0,l=null,f={push:function(e,r){var d=o.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=i||f.paused?c?(c.next=d,c=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){f.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!f.paused)for(;a&&u<i;)u++,p()},running:function(){return u},resume:function(){if(f.paused){if(f.paused=!1,null===a)return u++,void p();for(;a&&u<i;)u++,p()}},idle:function(){return 0===u&&0===f.length()},length:function(){for(var e=a,t=0;e;)e=e.next,t++;return t},getQueue:function(){for(var e=a,t=[];e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var d=o.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=i||f.paused?a?(d.next=a,a=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,c=null,f.drain=n},killAndDrain:function(){a=null,c=null,f.drain(),f.drain=n},error:function(e){l=e}};return f;function p(e){e&&o.release(e);var n=a;n&&u<=i?f.paused?u--:(c===a&&(c=null),a=n.next,n.next=null,s.call(t,n.value,n.worked),null===c&&f.empty()):0===--u&&f.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,r){var s=e.callback,i=e.errorHandler,o=e.value;e.value=null,e.callback=n,e.errorHandler&&i(t,o),s.call(e.context,t,r),e.release(e)}}return ol.exports=t,ol.exports.promise=function(e,r,s){"function"==typeof e&&(s=r,r=e,e=null);var i=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},s),o=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,n){o(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.drained=function(){var e=new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})});return e},i},ol.exports}(),r=ul(),s=hl();class i extends s.default{constructor(r,s){super(r,s),this._settings=s,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const n={directory:e,base:t};this._queue.push(n,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const n=e.path;void 0!==t&&(e.path=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return vu.default=i,vu}var gl,yl,bl,vl={},Dl={},wl={};var _l,kl,El={};function Sl(){if(kl)return yu;kl=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.Settings=yu.walkStream=yu.walkSync=yu.walk=void 0;const e=function(){if(pl)return bu;pl=1,Object.defineProperty(bu,"__esModule",{value:!0});const e=ml();return bu.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},bu}(),t=function(){if(gl)return vl;gl=1,Object.defineProperty(vl,"__esModule",{value:!0});const e=d,t=ml();return vl.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},vl}(),n=function(){if(bl)return Dl;bl=1,Object.defineProperty(Dl,"__esModule",{value:!0});const e=function(){if(yl)return wl;yl=1,Object.defineProperty(wl,"__esModule",{value:!0});const e=nl(),t=ul(),n=hl();class r extends n.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,n){const r=e.path;void 0!==n&&(e.path=t.joinPathSegments(n,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return wl.default=r,wl}();return Dl.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},Dl}(),r=function(){if(_l)return El;_l=1,Object.defineProperty(El,"__esModule",{value:!0});const e=f,t=nl();return El.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},El}();function s(e={}){return e instanceof r.default?e:new r.default(e)}return yu.Settings=r.default,yu.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},yu.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},yu.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},yu}var Al,Cl={};function Pl(){if(Al)return Cl;Al=1,Object.defineProperty(Cl,"__esModule",{value:!0});const e=f,t=Lu(),n=du();return Cl.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},Cl}var Ol,xl,Tl={};function $l(){if(Ol)return Tl;Ol=1,Object.defineProperty(Tl,"__esModule",{value:!0});const e=d,t=Lu(),n=Sl(),r=Pl();class s extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),s=new e.PassThrough({objectMode:!0});s._write=(e,i,o)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&s.push(t),e===r.length-1&&s.end(),o()}).catch(o);for(let e=0;e<r.length;e++)s.write(e);return s}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>null===e?t(r):n(e))})}}return Tl.default=s,Tl}var Nl,Rl,Ll,Fl={},Il={},Ml={},jl={};var Bl,zl,Hl,Kl,ql,Ul={},Zl={},Gl={};function Wl(){if(Kl)return Fl;Kl=1,Object.defineProperty(Fl,"__esModule",{value:!0});const e=f,t=function(){if(Ll)return Il;Ll=1,Object.defineProperty(Il,"__esModule",{value:!0});const e=du(),t=function(){if(Rl)return Ml;Rl=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=function(){if(Nl)return jl;Nl=1,Object.defineProperty(jl,"__esModule",{value:!0});const e=du();return jl.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},jl}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return Ml.default=t,Ml}();return Il.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),s=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,s)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const n=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(t,n,r,s){if(this._isSkippedByDeep(t,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const i=e.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const n=t.split("/").length;return""===e?n:n-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,n){return!e.pattern.matchAny(t,n)}},Il}(),n=function(){if(Bl)return Ul;Bl=1,Object.defineProperty(Ul,"__esModule",{value:!0});const e=du();return Ul.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,s]=e.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const s=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(r),s}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!!this._isMatchToPatterns(e,t.positive.all,n)&&!this._isMatchToPatterns(e,t.negative.relative,n)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,n)}_isMatchToAbsoluteNegative(t,n,r){if(0===n.length)return!1;const s=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(s,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const s=e.pattern.matchAny(t,n);return!s&&r?e.pattern.matchAny(t+"/",n):s}},Ul}(),r=function(){if(zl)return Zl;zl=1,Object.defineProperty(Zl,"__esModule",{value:!0});const e=du();return Zl.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},Zl}(),s=function(){if(Hl)return Gl;Hl=1,Object.defineProperty(Gl,"__esModule",{value:!0});const e=du();return Gl.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let n=t.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&t.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:n}):n}},Gl}();return Fl.default=class{constructor(e){this._settings=e,this.errorFilter=new r.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},Fl}var Vl,Jl,Yl,Ql={},Xl={},ef={};var tf,nf,rf,sf,of,af={},cf=function(){if(rf)return nf;rf=1;const e=function(){if(fu)return Qa;fu=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.convertPatternGroupToTask=Qa.convertPatternGroupsToTasks=Qa.groupPatternsByBaseDirectory=Qa.getNegativePatternsAsPositive=Qa.getPositivePatterns=Qa.convertPatternsToTasks=Qa.generate=void 0;const e=du();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const s=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),u=e.pattern.getPatternsInsideCurrentDirectory(t),l=i(c),f=i(u);return s.push(...o(l,n,r)),"."in f?s.push(a(".",u,n,r)):s.push(...o(f,n,r)),s}function r(t){return e.pattern.getPositivePatterns(t)}function s(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function o(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,s){return{dynamic:s,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return Qa.generate=function(i,o){const a=t(i,o),c=t(o.ignore,o),u=r(a),l=s(a,c),f=u.filter(t=>e.pattern.isStaticPattern(t,o)),p=u.filter(t=>e.pattern.isDynamicPattern(t,o)),d=n(f,l,!1),h=n(p,l,!0);return d.concat(h)},Qa.convertPatternsToTasks=n,Qa.getPositivePatterns=r,Qa.getNegativePatternsAsPositive=s,Qa.groupPatternsByBaseDirectory=i,Qa.convertPatternGroupsToTasks=o,Qa.convertPatternGroupToTask=a,Qa}(),t=function(){if(ql)return mu;ql=1,Object.defineProperty(mu,"__esModule",{value:!0});const e=function(){if(xl)return gu;xl=1,Object.defineProperty(gu,"__esModule",{value:!0});const e=Sl(),t=Pl(),n=$l();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return gu.default=r,gu}(),t=Wl();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return mu.default=n,mu}(),n=function(){if(Vl)return Ql;Vl=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=d,t=$l(),n=Wl();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),s=this.api(n,t,r),i=new e.Readable({objectMode:!0,read:()=>{}});return s.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",r.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>s.destroy()),i}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Ql.default=r,Ql}(),r=function(){if(Yl)return Xl;Yl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=function(){if(Jl)return ef;Jl=1,Object.defineProperty(ef,"__esModule",{value:!0});const e=Lu(),t=Sl(),n=Pl();class r extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const n=[];for(const r of e){const e=this._getFullEntryPath(r),s=this._getEntry(e,r,t);null!==s&&t.entryFilter(s)&&n.push(s)}return n}_getEntry(e,t,n){try{const n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return ef.default=r,ef}(),t=Wl();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Xl.default=n,Xl}(),s=(tf||(tf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=m,n=l,r=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,r),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(af)),af),i=du();async function o(e,n){c(e);const r=a(e,t.default,n),s=await Promise.all(r);return i.array.flatten(s)}function a(t,n,r){const i=[].concat(t),o=new s.default(r),a=e.generate(i,o),c=new n(o);return a.map(c.read,c)}function c(e){if(![].concat(e).every(e=>i.string.isString(e)&&!i.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function o(e,t){c(e);const n=a(e,r.default,t);return i.array.flatten(n)}function u(e,t){c(e);const r=a(e,n.default,t);return i.stream.merge(r)}var l,f;t.glob=t,t.globSync=o,t.globStream=u,t.async=t,t.sync=o,t.stream=u,t.generateTasks=function(t,n){c(t);const r=[].concat(t),i=new s.default(n);return e.generate(r,i)},t.isDynamicPattern=function(e,t){c(e);const n=new s.default(t);return i.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return c(e),i.path.escape(e)},t.convertPathToPattern=function(e){return c(e),i.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return c(e),i.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return c(e),i.path.convertPosixPathToPattern(e)},(f=t.win32||(t.win32={})).escapePath=function(e){return c(e),i.path.escapeWindowsPath(e)},f.convertPathToPattern=function(e){return c(e),i.path.convertWindowsPathToPattern(e)}}(o||(o={})),nf=o}(),uf=R(cf),lf=function(){if(of)return sf;of=1;var e=hc(),t=f.posix.dirname,n="win32"===l.platform(),r="/",s=/\\/g,i=/\\([!*?|[\](){}])/g;function o(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return sf=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(r)<0&&(e=e.replace(s,r)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);return!(n<0)&&e.slice(n+1,-1).includes(r)}(e)&&(e+=r),e+="a";do{e=t(e)}while(o(e));return e.replace(i,"$1")}}(),ff=R(lf);const pf=e=>""!==e&&".."!==e,df=e=>{if("string"!=typeof e||!e.trim())return null;const t=e.trim().replace(/[^A-Za-z0-9@/_-]/g,"_").replace(/\/{2,}/g,"/").trim().split("/").filter(e=>e.length>0);if(0===t.length)return null;for(const e of t)if(!pf(e))return null;return t.join("/")},hf=async e=>{try{return(await t.stat(e)).isFile()}catch{return!1}},mf=()=>{const t=(()=>{try{const e=i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:w&&"SCRIPT"===w.tagName.toUpperCase()&&w.src||new URL("index.js",document.baseURI).href);return fe({cwd:n.dirname(e)})??null}catch{return null}})();if(!t)return null;const r=n.join(t,"dist","stan.system.md");return e.existsSync(r)?r:null},gf="0.3.0-0";var yf="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vf,Df={},wf={},_f={},kf={};function Ef(){if(vf)return kf;vf=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),o=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[o]===s;function c(e){if(e&&"object"==typeof e)switch(e[o]){case n:case i:return!0}return!1}return kf.ALIAS=e,kf.DOC=t,kf.MAP=n,kf.NODE_TYPE=o,kf.PAIR=r,kf.SCALAR=s,kf.SEQ=i,kf.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,kf.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,kf.isCollection=c,kf.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,kf.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,kf.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},kf.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,kf.isScalar=a,kf.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,kf}var Sf,Af,Cf={};function Pf(){if(Sf)return Cf;Sf=1;var e=Ef();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);if(e.isDocument(t)){i(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else i(null,t,s,Object.freeze([]))}function i(n,s,o,a){const c=u(n,s,o,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),i(n,c,o,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=i(e,s.items[e],o,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=i("key",s.key,o,a);if(e===t)return t;e===r&&(s.key=null);const n=i("value",s.value,o,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function o(t,n){const s=c(n);if(e.isDocument(t)){await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else await a(null,t,s,Object.freeze([]))}async function a(n,s,i,o){const c=await u(n,s,i,o);if(e.isNode(c)||e.isPair(c))return l(n,o,c),a(n,c,i,o);if("symbol"!=typeof c)if(e.isCollection(s)){o=Object.freeze(o.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],i,o);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){o=Object.freeze(o.concat(s));const e=await a("key",s.key,i,o);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,i,o);if(n===t)return t;n===r&&(s.value=null)}return c}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,o.BREAK=t,o.SKIP=n,o.REMOVE=r,Cf.visit=s,Cf.visitAsync=o,Cf}function Of(){if(Af)return _f;Af=1;var e=Ef(),t=Pf();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},_f.Directives=s,_f}var xf,Tf={},$f={},Nf={};function Rf(){if(xf)return Nf;xf=1;var e=Ef(),t=Pf();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Nf.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Nf.anchorNames=n,Nf.createNodeAnchors=function(t,s){const i=[],o=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const o=r(s,a);return a.add(o),o},setAnchors:()=>{for(const t of i){const n=o.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:o}},Nf.findNewAnchor=r,Nf}var Lf,Ff={},If={};function Mf(){if(Lf)return If;return Lf=1,If.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],i=e(t,s,String(n),r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),i=e(t,s,n,r);void 0===i?s.delete(n):i!==r&&s.set(n,i)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const i=e(t,s,n,r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}return t.call(n,r,s)},If}var jf,Bf,zf,Hf={};function Kf(){if(jf)return Hf;jf=1;var e=Ef();return Hf.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const i=n.toJSON(r,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof n||s?.keep?n:Number(n)},Hf}function qf(){if(Bf)return Ff;Bf=1;var e=Mf(),t=Ef(),n=Kf();return Ff.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:i,onAnchor:o,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},u=n.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},Ff}function Uf(){if(zf)return $f;zf=1;var e=Rf(),t=Pf(),n=Ef(),r=qf(),s=Kf();let i=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,i;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(i=e)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),!c||void 0===c.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(i>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=o(r,a,n)),c.count*c.aliasCount>i)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function o(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=o(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=o(e,t.key,r),s=o(e,t.value,r);return Math.max(n,s)}return 1}return $f.Alias=i,$f}var Zf,Gf,Wf,Vf={},Jf={},Yf={};function Qf(){if(Zf)return Yf;Zf=1;var e=Ef(),t=qf(),n=Kf();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",Yf.Scalar=r,Yf.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,Yf}function Xf(){if(Gf)return Jf;Gf=1;var e=Uf(),t=Ef(),n=Qf();return Jf.createNode=function(r,s,i){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=i;let f;if(o&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete i.onTagObj);const d=p?.createNode?p.createNode(i.schema,r,i):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(i.schema,r,i):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},Jf}function ep(){if(Wf)return Vf;Wf=1;var e=Xf(),t=Ef(),n=qf();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let i=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...i]=e,o=this.get(s,!0);if(t.isCollection(o))o.addIn(i,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,i=this.get(r,!0);return 0===s.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...i]=e;if(0===i.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}};return Vf.Collection=i,Vf.collectionFromPath=r,Vf.isEmptyPath=s,Vf}var tp,np={},rp={},sp={},ip={};function op(){if(tp)return ip;tp=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return ip.indentComment=e,ip.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,ip.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),ip}var ap,cp,up,lp,fp={},pp={};function dp(){if(ap)return pp;ap=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,i=e[s];for(;" "===i||"\t"===i;)if(t<s+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);r=t,s=t+1,i=e[s]}return r}return pp.FOLD_BLOCK=e,pp.FOLD_FLOW="flow",pp.FOLD_QUOTED=t,pp.foldFlowLines=function(r,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof o&&(o>a-Math.max(2,c)?p.push(0):g=a-o);let y=!1,b=-1,v=-1,D=-1;i===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let o;o=r[b+=1];){if(i===t&&"\\"===o){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===o)i===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(i===t){for(;" "===m||"\t"===m;)m=o,o=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=o}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],o=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,o)}`:(i===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,o)}`)}return w},pp}function hp(){if(cp)return fp;cp=1;var e=Qf(),t=dp();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const i=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return i;const{implicitKey:o}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(u+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{u+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(o||'"'===i[e+2]||i.length<a)e+=1;else{for(u+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)u+="\n",e+=2;u+=c," "===i[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+i.slice(l):i,o?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,i);const o=i.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${o}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,o,t.FOLD_FLOW,n(i,!1))}function o(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),o=e.includes("'");r=t&&!o?i:o&&!t?s:n?i:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:i,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return o(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,k=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;k=w}}let E=c.substring(0,k<w?k+1:w);E&&(c=c.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let S=(_?m?"2":"1":"")+y;if(s&&(S+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const o=n(u,!0);"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${E}${r}${v}`,m,t.FOLD_BLOCK,o);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${E}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return fp.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?o(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return i(h.value,u);case e.Scalar.PLAIN:return function(s,i,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=i;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return o(f,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?o(f,i):c(s,i,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,i,a,u);if(r(f)){if(""===h)return i.forceBlockIndent=!0,c(s,i,a,u);if(d&&h===m)return o(f,i)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=i.doc.schema;if(n.some(e)||t?.some(e))return o(f,i)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(i,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},fp}function mp(){if(up)return sp;up=1;var e=Rf(),t=Ef(),n=op(),r=hp();return sp.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},sp.stringify=function(n,s,i,o){if(t.isPair(n))return n.toString(s,i,o);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:i}){if(!i.directives)return"";const o=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,i,o):t.isScalar(c)?r.stringifyString(c,s,i,o):c.toString(s,i,o);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},sp}function gp(){if(lp)return rp;lp=1;var e=Ef(),t=Qf(),n=mp(),r=op();return rp.stringifyPair=function({key:s,value:i},o,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=o;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!s||g&&null==i&&!o.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));o=Object.assign({},o,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,k=n.stringify(s,o,()=>w=!0,()=>_=!0);if(!y&&!o.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(o.inFlow){if(u||null==i)return w&&a&&a(),""===k?"?":y?`? ${k}`:k}else if(u&&!m||null==i&&y)return k=`? ${k}`,g&&!w?k+=r.lineComment(k,o.indent,d(g)):_&&c&&c(),k;w&&(g=null),y?(g&&(k+=r.lineComment(k,o.indent,d(g))),k=`? ${k}\n${f}:`):(k=`${k}:`,g&&(k+=r.lineComment(k,o.indent,d(g)))),e.isNode(i)?(b=!!i.spaceBefore,v=i.commentBefore,D=i.comment):(b=!1,v=null,D=null,i&&"object"==typeof i&&(i=l.createNode(i))),o.implicitKey=!1,y||g||!e.isScalar(i)||(o.indentAtStart=k.length+1),_=!1,h||!(p.length>=2)||o.inFlow||y||!e.isSeq(i)||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let E=!1;const S=n.stringify(i,o,()=>E=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,o.indent)}`}""!==S||o.inFlow?A+=`\n${o.indent}`:"\n"===A&&(A="\n\n")}else if(!y&&e.isCollection(i)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=o.inFlow??i.flow??0===i.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${o.indent}`)}}else""!==S&&"\n"!==S[0]||(A="");return k+=A+S,o.inFlow?E&&a&&a():D&&!E?k+=r.lineComment(k,o.indent,d(D)):_&&c&&c(),k},rp}var yp,bp={},vp={};function Dp(){if(yp)return vp;yp=1;var e=o;return vp.debug=function(e,...t){"debug"===e&&console.log(...t)},vp.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},vp}var wp,_p,kp,Ep={};function Sp(){if(wp)return Ep;wp=1;var e=Ef(),t=Qf();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)i(t,n,e);else if(Array.isArray(r))for(const e of r)i(t,n,e);else i(t,n,r)}function i(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,t,Map);for(const[e,t]of i)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return Ep.addMergeToJSMap=s,Ep.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),Ep.merge=r,Ep}function Ap(){if(_p)return bp;_p=1;var e=Dp(),t=Sp(),n=mp(),r=Ef(),s=Kf();return bp.addPairToJSMap=function(i,o,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(i,o,c);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,o,c);else{const t=s.toJS(a,"",i);if(o instanceof Map)o.set(t,s.toJS(c,t,i));else if(o instanceof Set)o.add(t);else{const u=function(t,s,i){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&i?.doc){const r=n.createStringifyContext(i.doc,{});r.anchors=new Set;for(const e of i.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!i.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,i),l=s.toJS(c,u,i);u in o?Object.defineProperty(o,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[u]=l}}return o},bp}function Cp(){if(kp)return np;kp=1;var e=Xf(),t=gp(),n=Ap(),r=Ef();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return np.Pair=s,np.createPair=function(t,n,r){const i=e.createNode(t,void 0,r),o=e.createNode(n,void 0,r);return new s(i,o)},np}var Pp,Op,xp,Tp={},$p={},Np={},Rp={};function Lp(){if(Pp)return Rp;Pp=1;var e=Ef(),t=mp(),n=op();function r({comment:r,items:s},o,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=o,h=Object.assign({},o,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),i(o,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),i(o,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:o,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let o=0;o<r.length;++o){const c=r[o];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),i(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),i(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);o<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=o;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function i({indent:e,options:{commentString:t}},r,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const i=n.indentComment(t(s),e);r.push(i.trimStart())}}return Rp.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Rp}function Fp(){if(Op)return Np;Op=1;var e=Lp(),t=Ap(),n=ep(),r=Ef(),s=Cp(),i=Qf();function o(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:i}=n,o=new this(e),a=(e,a)=>{if("function"==typeof i)a=i.call(t,e,a);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==a||r)&&o.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=o(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=o(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=o(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!o(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return Np.YAMLMap=a,Np.findPair=o,Np}function Ip(){if(xp)return $p;xp=1;var e=Ef(),t=Fp();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return $p.map=n,$p}var Mp,jp,Bp={},zp={};function Hp(){if(Mp)return zp;Mp=1;var e=Xf(),t=Lp(),n=ep(),r=Ef(),s=Qf(),i=Kf();let o=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];r.isScalar(i)&&s.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(i.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let o of n){if("function"==typeof s){const e=n instanceof Set?o:String(t++);o=s.call(n,e,o)}i.items.push(e.createNode(o,void 0,r))}}return i}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return zp.YAMLSeq=o,zp}function Kp(){if(jp)return Bp;jp=1;var e=Ef(),t=Hp();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Bp.seq=n,Bp}var qp,Up={};function Zp(){if(qp)return Up;qp=1;var e=hp();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return Up.string=t,Up}var Gp,Wp={},Vp={};function Jp(){if(Gp)return Vp;Gp=1;var e=Qf();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return Vp.nullTag=t,Vp}var Yp,Qp={};function Xp(){if(Yp)return Qp;Yp=1;var e=Qf();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify({source:e,value:n},r){if(e&&t.test.test(e)){if(n===("t"===e[0]||"T"===e[0]))return e}return n?r.options.trueStr:r.options.falseStr}};return Qp.boolTag=t,Qp}var ed,td,nd={},rd={};function sd(){if(ed)return rd;return ed=1,rd.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i},rd}function id(){if(td)return nd;td=1;var e=Qf(),t=sd();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return nd.float=s,nd.floatExp=r,nd.floatNaN=n,nd}var od,ad={};function cd(){if(od)return ad;od=1;var e=sd();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:i}=n;return t(i)&&i>=0?s+i.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return ad.int=i,ad.intHex=o,ad.intOct=s,ad}var ud,ld={};function fd(){if(ud)return ld;ud=1;var e=Ip(),t=Jp(),n=Kp(),r=Zp(),s=Xp(),i=id(),o=cd();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float];return ld.schema=a,ld}var pd,dd={};function hd(){if(pd)return dd;pd=1;var e=Qf(),t=Ip(),n=Kp();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>r(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s}],o={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,o);return dd.schema=a,dd}var md,gd={};function yd(){if(md)return gd;md=1;var e=a,t=Qf(),n=hp();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:i},o,a,c){if(!i)return"";const u=i;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},o,a,c)}};return gd.binary=r,gd}var bd,vd,Dd={},wd={};function _d(){if(bd)return wd;bd=1;var e=Ef(),t=Cp(),n=Qf(),r=Hp();function s(r,s){if(e.isSeq(r))for(let i=0;i<r.items.length;++i){let o=r.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&s("Each pair must have its own sequence indicator");const e=o.items[0]||new t.Pair(new n.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}r.items[i]=e.isPair(o)?o:new t.Pair(o)}}else s("Expected a sequence for this tag");return r}function i(e,n,s){const{replacer:i}=s,o=new r.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof i&&(e=i.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;o.items.push(t.createPair(r,c,s))}return o}const o={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i};return wd.createPairs=i,wd.pairs=o,wd.resolvePairs=s,wd}function kd(){if(vd)return Dd;vd=1;var e=Ef(),t=Kf(),n=Fp(),r=Hp(),s=_d();class i extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let i,o;if(e.isPair(n)?(i=t.toJS(n.key,"",r),o=t.toJS(n.value,i,r)):i=t.toJS(n,"",r),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),i=new this;return i.items=r.items,i}}i.tag="tag:yaml.org,2002:omap";const o={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),o=[];for(const{key:t}of r.items)e.isScalar(t)&&(o.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):o.push(t.value));return Object.assign(new i,r)},createNode:(e,t,n)=>i.from(e,t,n)};return Dd.YAMLOMap=i,Dd.omap=o,Dd}var Ed,Sd={},Ad={};function Cd(){if(Ed)return Ad;Ed=1;var e=Qf();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},r={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return Ad.falseTag=r,Ad.trueTag=n,Ad}var Pd,Od={};function xd(){if(Pd)return Od;Pd=1;var e=Qf(),t=sd();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Od.float=s,Od.floatExp=r,Od.floatNaN=n,Od}var Td,$d={};var Nd,Rd={};function Ld(){if(Nd)return Rd;Nd=1;var e=Ef(),t=Cp(),n=Fp();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null);n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),i.items.push(t.createPair(e,null,r));return i}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return Rd.YAMLSet=r,Rd.set=s,Rd}var Fd,Id,Md,jd,Bd={};function zd(){if(Fd)return Bd;Fd=1;var e=sd();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*i:i}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const i=r(60),o=[n%i];return n<60?o.unshift(0):(n=(n-o[0])/i,o.unshift(n%i),n>=60&&(n=(n-o[0])/i,o.unshift(n))),s+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:n},i={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const n=e.match(i.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,o,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,o,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return Bd.floatTime=s,Bd.intTime=r,Bd.timestamp=i,Bd}function Hd(){if(Id)return Sd;Id=1;var e=Ip(),t=Jp(),n=Kp(),r=Zp(),s=yd(),i=Cd(),o=xd(),a=function(){if(Td)return $d;Td=1;var e=sd();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===s?-1*i:i}function r(n,r,s){const{value:i}=n;if(t(i)){const e=i.toString(r);return i<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return $d.int=o,$d.intBin=s,$d.intHex=a,$d.intOct=i,$d}(),c=Sp(),u=kd(),l=_d(),f=Ld(),p=zd();const d=[e.map,n.seq,r.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return Sd.schema=d,Sd}function Kd(){if(Md)return Wp;Md=1;var e=Ip(),t=Jp(),n=Kp(),r=Zp(),s=Xp(),i=id(),o=cd(),a=fd(),c=hd(),u=yd(),l=Sp(),f=kd(),p=_d(),d=Hd(),h=Ld(),m=zd();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:m.floatTime,int:o.int,intHex:o.intHex,intOct:o.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return Wp.coreKnownTags=b,Wp.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},Wp}function qd(){if(jd)return Tp;jd=1;var e=Ef(),t=Ip(),n=Kp(),r=Zp(),s=Kd();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Tp.Schema=class o{constructor({compat:o,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(o)?s.getTags(o,"compat"):o?s.getTags(null,o):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?i:null}clone(){const e=Object.create(o.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Tp}var Ud,Zd,Gd={};function Wd(){if(Ud)return Gd;Ud=1;var e=Ef(),t=mp(),n=op();return Gd.stringifyDocument=function(r,s){const i=[];let o=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(i.push(e),o=!0):r.directives.docStart&&(o=!0)}o&&i.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==i.length&&i.unshift("");const e=c(r.commentBefore);i.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&o&&i.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==i[i.length-1]?i.push(f):i[i.length-1]=`--- ${f}`}else i.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(c(e),"")))}return i.join("\n")+"\n"},Gd}function Vd(){if(Zd)return Tf;Zd=1;var e=Uf(),t=ep(),n=Ef(),r=Cp(),s=Kf(),i=qd(),o=Wd(),a=Rf(),c=Mf(),u=Xf(),l=Of();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Tf.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new l.Directives({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),i=this.createNode(t,null,n);return new r.Pair(s,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new l.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new i.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof i)for(const{count:e,res:t}of a.anchors.values())i(t,e);return"function"==typeof o?c.applyReviver(o,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return o.stringifyDocument(this,e)}},Tf}var Jd,Yd={};function Qd(){if(Jd)return Yd;Jd=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Yd.YAMLError=e,Yd.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Yd.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Yd.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}},Yd}var Xd,eh={},th={},nh={},rh={},sh={};function ih(){if(Xd)return sh;return Xd=1,sh.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&i(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&i(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&i(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&i(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&i(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],k=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||"block-map"===r?.type||"block-seq"===r?.type)&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:k,start:w??k}},sh}var oh,ah={};function ch(){if(oh)return ah;return oh=1,ah.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}},ah}var uh,lh={};function fh(){if(uh)return lh;uh=1;var e=ch();return lh.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];if(s.indent===t&&("]"===s.source||"}"===s.source)&&e.containsNewline(n)){r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},lh}var ph,dh,hh={};function mh(){if(ph)return hh;ph=1;var e=Ef();return hh.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const i="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,r))},hh}function gh(){if(dh)return rh;dh=1;var e=Cp(),t=Fp(),n=ih(),r=ch(),s=fh(),i=mh();const o="All mapping items must start at the same column";return rh.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",o)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",o);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,i.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const k=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=k.end,k.found){D&&("block-map"!==b?.type||k.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<k.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,k,f):c(u,h,y,null,k,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(_.comment?_.comment+="\n"+k.comment:_.comment=k.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},rh}var yh,bh={};function vh(){if(yh)return bh;yh=1;var e=Hp(),t=ih(),n=fh();return bh.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},i,o,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=o.offset,f=null;for(const{start:e,value:c}of o.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}c&&"block-seq"===c.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(i,c,p,a):s(i,p.end,e,null,p,a);i.schema.compat&&n.flowIndentCheck(o.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[o.offset,l,f??l],u},bh}var Dh,wh,_h,kh={},Eh={};function Sh(){if(Dh)return Eh;return Dh=1,Eh.resolveEnd=function(e,t,n,r){let s="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}},Eh}function Ah(){if(wh)return kh;wh=1;var e=Ef(),t=Cp(),n=Fp(),r=Hp(),s=Sh(),i=ih(),o=ch(),a=mh();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return kh.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,k=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!k.found){if(!(k.anchor||k.tag||w||_)){0===r&&k.comma?h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),k.comment&&(b.comment?b.comment+="\n"+k.comment:b.comment=k.comment),D=k.end;continue}!g&&p.options.strict&&o.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)k.comma&&h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(k.comma||h(k.start,"MISSING_CHAR",`Missing , between ${y} items`),k.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,k.comment=k.comment.substring(t.length+1)}}if(g||w||k.found){p.atKey=!0;const e=k.end,r=v?l(p,v,k,h):f(p,e,m,null,k,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(o.found){if(!g&&!k.found&&p.options.strict){if(w)for(const e of w){if(e===o.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<o.found.offset-1024&&h(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&":"===_.source[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const E=_?l(p,_,o,h):o.found?f(p,o.end,w,null,o,h):null;E?u(_)&&h(E.range,"BLOCK_IN_FLOW",c):o.comment&&(r.comment?r.comment+="\n"+o.comment:r.comment=o.comment);const S=new t.Pair(r,E);if(p.options.keepSourceTokens&&(S.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(S);const t=(E??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=E?E.range[2]:o.end}else{const e=_?l(p,_,k,h):f(p,k.end,w,null,k,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...k]=d.end;let E=D;if(_&&_.source===w)E=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&k.unshift(_)}if(k.length>0){const e=s.resolveEnd(k,E,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},kh}function Ch(){if(_h)return nh;_h=1;var e=Ef(),t=Qf(),n=Fp(),r=Hp(),s=gh(),i=vh(),o=Ah();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,r,c):o.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return nh.composeCollection=function(s,i,o,c,u){const l=c.tag,f=l?i.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;if(n&&(!t||t.offset<n.offset)){u(n,"MISSING_CHAR","Missing newline after block sequence props")}}const p="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,i,o,u,f);let d=i.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=i.schema.knownTags[f];if(!e||e.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,i,o,u,f);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,i,o,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},nh}var Ph,Oh={},xh={};function Th(){if(Ph)return xh;Ph=1;var e=Qf();return xh.resolveBlockScalar=function(t,n,r){const s=n.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let o=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!o&&r?o=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":if(n&&!u){r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+i.length;return n.source&&(t+=n.source.length),{value:e,type:o,comment:i.comment,range:[s,t,t]}}let u=n.indent+i.indent,l=n.offset+i.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}if(0===i.indent&&(u=n.length),f=e,0===u&&!t.atRoot){r(l,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===i.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}o===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+i.length+n.source.length;return{value:p,type:o,comment:i.comment,range:[s,m,m]}},xh}var $h,Nh,Rh={};function Lh(){if($h)return Rh;$h=1;var e=Qf(),t=Sh();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],i=" ",o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)""===r[1]?"\n"===i?s+=i:i="\n":(s+=i+r[1],i=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(e),s+i+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function i(e,t,n,r){const s=e.substr(t,n),i=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(i)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(i)}return Rh.resolveFlowScalar=function(o,a,c){const{offset:u,type:l,source:f,end:p}=o;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let o=1;o<e.length-1;++o){const a=e[o];if("\r"!==a||"\n"!==e[o+1])if("\n"===a){const{fold:t,offset:s}=r(e,o);n+=t,o=s}else if("\\"===a){let r=e[++o];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[o+1];" "===r||"\t"===r;)r=e[1+ ++o];else if("\r"===r&&"\n"===e[o+1])for(r=e[1+ ++o];" "===r||"\t"===r;)r=e[1+ ++o];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=i(e,o+1,s,t),o+=s}else{const r=e.substr(o-1,2);t(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=o;let r=e[o+1];for(;" "===r||"\t"===r;)r=e[1+ ++o];"\n"===r||"\r"===r&&"\n"===e[o+2]||(n+=o>t?e.slice(t,o+1):a)}else n+=a}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(f,m);break;default:return c(o,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},Rh}function Fh(){if(Nh)return Oh;Nh=1;var e=Ef(),t=Qf(),n=Th(),r=Lh();return Oh.composeScalar=function(s,i,o,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===i.type?n.resolveBlockScalar(s,i,a):r.resolveFlowScalar(i,s.options.strict,a),p=o?s.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,i){if("!"===r)return t[e.SCALAR];const o=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;o.push(e)}for(const e of o)if(e.test?.test(n))return e;const a=t.knownTags[r];if(a&&!a.collection)return t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR]}(s.schema,c,p,o,a):"scalar"===i.type?function({atKey:t,directives:n,schema:r},s,i,o){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];if(a.tag!==t.tag){o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}}return a}(s,c,i,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(o??i,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(o??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Oh}var Ih,Mh,jh,Bh,zh={};function Hh(){if(Ih)return zh;return Ih=1,zh.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e},zh}function Kh(){if(Mh)return th;Mh=1;var e=Uf(),t=Ef(),n=Ch(),r=Fh(),s=Sh(),i=Hh();const o={composeNode:a,composeEmptyNode:c};function a(i,a,u,l){const f=i.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:i},o){const a=new e.Alias(r.substring(1));""===a.source&&o(n,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&o(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(i,c,t.strict,o);a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment);return a}(i,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(i,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(o,i,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(i,a.offset,void 0,null,u,l),y=!1}if(h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)){l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings")}return p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:o,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:i.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return th.composeEmptyNode=c,th.composeNode=a,th}function qh(){if(jh)return eh;jh=1;var e=Vd(),t=Kh(),n=Sh(),r=ih();return eh.composeDoc=function(s,i,{offset:o,start:a,value:c,end:u},l){const f=Object.assign({_directives:i},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:o,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[o,m,g.offset],p},eh}function Uh(){if(Bh)return wf;Bh=1;var e=o,t=Of(),n=Vd(),r=Qd(),s=Ef(),i=qh(),a=Sh();function c(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function u(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const i=e[s];switch(i[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(i.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return wf.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=c(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=u(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(s.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=c(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=i.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=a.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},wf}var Zh,Gh={},Wh={};function Vh(){if(Zh)return Wh;Zh=1;var e=Th(),t=Lh(),n=Qd(),r=hp();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function i(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return Wh.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:u,end:l};default:return{type:"scalar",offset:a,indent:i,source:u,end:l}}},Wh.resolveAsScalar=function(r,s=!0,i){if(r){const o=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([s,s+1],t,r);i(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,o)}}return null},Wh.setScalarValue=function(e,t,n={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(o&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,f);break;case'"':i(e,f,"double-quoted-scalar");break;case"'":i(e,f,"single-quoted-scalar");break;default:i(e,f,"scalar")}},Wh}var Jh,Yh={};function Qh(){if(Jh)return Yh;Jh=1;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),r)for(const e of r)i+=e.source;return s&&(i+=e(s)),i}return Yh.stringify=n=>"type"in n?e(n):t(n),Yh}var Xh,em,tm={};function nm(){if(Xh)return tm;Xh=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,i){let o=i(r,t);if("symbol"==typeof o)return o;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const o=s(Object.freeze(t.concat([[a,r]])),c.items[r],i);if("number"==typeof o)r=o-1;else{if(o===e)return e;o===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof o&&"key"===a&&(o=o(r,t))}}return"function"==typeof o?o(r,t):o}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},tm.visit=r,tm}function rm(){if(em)return Gh;em=1;var e=Vh(),t=Qh(),n=nm();return Gh.createScalarToken=e.createScalarToken,Gh.resolveAsScalar=e.resolveAsScalar,Gh.setScalarValue=e.setScalarValue,Gh.stringify=t.stringify,Gh.visit=n.visit,Gh.BOM="\ufeff",Gh.DOCUMENT="",Gh.FLOW_END="",Gh.SCALAR="",Gh.isCollection=e=>!!e&&"items"in e,Gh.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),Gh.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},Gh.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},Gh}var sm,im={};function om(){if(sm)return im;sm=1;var e=rm();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),o=e=>!e||i.has(e);return im.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&t(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(o),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const i=this.getLine();if(null===i)return this.setNext("flow");if(-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3])){if(!(s===this.indentNext-1&&1===this.flowLevel&&("]"===i[0]||"}"===i[0])))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart()}let a=0;for(;","===i[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),i[a]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(o),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,i=this.pos-1,o=this.pos-1;for(;r=this.buffer[++o];)if(":"===r){const e=this.buffer[o+1];if(t(e)||n&&s.has(e))break;i=o}else if(t(r)){let e=this.buffer[o+1];if("\r"===r&&("\n"===e?(o+=1,r="\n",e=this.buffer[o+1]):i=o),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&s.has(r))break;i=o}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(i+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(o))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},im}var am,cm={};function um(){if(am)return cm;am=1;return cm.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}},cm}var lm,fm={};function pm(){if(lm)return fm;lm=1;var e=o,t=rm(),n=om();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function i(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function a(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function c(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,i(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return fm.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=c(a(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!r(t.sep,"newline")){const e=c(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=c(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:o,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:o});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=c(a(t));u(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=c(a(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=c(a(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}},fm}var dm,hm,mm={};function gm(){if(dm)return mm;dm=1;var e=Uh(),t=Vd(),n=Qd(),r=Dp(),s=Ef(),i=um(),o=pm();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return i&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return mm.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=c(e,n);if(!i)return null;if(i.warnings.forEach(e=>r.warn(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))},mm.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(i&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},mm.parseDocument=c,mm.stringify=function(e,n,r){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!i?e.toString(r):new t.Document(e,i,r).toString(r)},mm}var ym=function(){if(hm)return Df;hm=1;var e=Uh(),t=Vd(),n=qd(),r=Qd(),s=Uf(),i=Ef(),o=Cp(),a=Qf(),c=Fp(),u=Hp(),l=rm(),f=om(),p=um(),d=pm(),h=gm(),m=Pf();return Df.Composer=e.Composer,Df.Document=t.Document,Df.Schema=n.Schema,Df.YAMLError=r.YAMLError,Df.YAMLParseError=r.YAMLParseError,Df.YAMLWarning=r.YAMLWarning,Df.Alias=s.Alias,Df.isAlias=i.isAlias,Df.isCollection=i.isCollection,Df.isDocument=i.isDocument,Df.isMap=i.isMap,Df.isNode=i.isNode,Df.isPair=i.isPair,Df.isScalar=i.isScalar,Df.isSeq=i.isSeq,Df.Pair=o.Pair,Df.Scalar=a.Scalar,Df.YAMLMap=c.YAMLMap,Df.YAMLSeq=u.YAMLSeq,Df.CST=l,Df.Lexer=f.Lexer,Df.LineCounter=p.LineCounter,Df.Parser=d.Parser,Df.parse=h.parse,Df.parseAllDocuments=h.parseAllDocuments,Df.parseDocument=h.parseDocument,Df.stringify=h.stringify,Df.visit=m.visit,Df.visitAsync=m.visitAsync,Df}(),bm=bf(ym);function vm(e,t,n){function r(n,r){var s;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(s=n._zod).traits??(s.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}const s=n?.Parent??Object;class i extends s{}function o(e){var t;const s=n?.Parent?new i:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}class Dm extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class wm extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const _m={};function km(e){return _m}function Em(e,t){return"bigint"==typeof t?t.toString():t}function Sm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Am(e){return null==e}function Cm(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Pm=Symbol("evaluating");function Om(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Pm)return void 0===r&&(r=Pm,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function xm(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Tm(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function $m(e){return JSON.stringify(e)}const Nm="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rm(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Lm=Sm(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Fm(e){if(!1===Rm(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Rm(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Im(e){return Fm(e)?{...e}:Array.isArray(e)?[...e]:e}const Mm=new Set(["string","number","symbol"]);function jm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bm(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function zm(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const Hm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Km(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function qm(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Um(e){return"string"==typeof e?e:e?.message}function Zm(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=Um(e.inst?._zod.def?.error?.(e))??Um(t?.error?.(e))??Um(n.customError?.(e))??Um(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Gm(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Wm(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Vm=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Em,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Jm=vm("$ZodError",Vm),Ym=vm("$ZodError",Vm,{Parent:Error});const Qm=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Dm;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>Zm(e,i,km())));throw Nm(t,s?.callee),t}return o.value},Xm=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>Zm(e,i,km())));throw Nm(t,s?.callee),t}return o.value},eg=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Dm;return i.issues.length?{success:!1,error:new(e??Jm)(i.issues.map(e=>Zm(e,s,km())))}:{success:!0,data:i.value}},tg=eg(Ym),ng=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Zm(e,s,km())))}:{success:!0,data:i.value}},rg=ng(Ym),sg=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Qm(e)(t,n,s)},ig=e=>(t,n,r)=>Qm(e)(t,n,r),og=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xm(e)(t,n,s)},ag=e=>async(t,n,r)=>Xm(e)(t,n,r),cg=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return eg(e)(t,n,s)},ug=e=>(t,n,r)=>eg(e)(t,n,r),lg=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ng(e)(t,n,s)},fg=e=>async(t,n,r)=>ng(e)(t,n,r),pg=/^[cC][^\s-]{8,}$/,dg=/^[0-9a-z]+$/,hg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mg=/^[0-9a-vA-V]{20}$/,gg=/^[A-Za-z0-9]{27}$/,yg=/^[a-zA-Z0-9_-]{21}$/,bg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vg=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dg=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,wg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const _g=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Eg=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Sg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ag=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cg=/^[A-Za-z0-9_-]*$/,Pg=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Og=/^\+(?:[0-9]){6,14}[0-9]$/,xg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Tg=new RegExp(`^${xg}$`);function $g(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const Ng=/^-?\d+$/,Rg=/^-?\d+(?:\.\d+)?/,Lg=/^(?:true|false)$/i,Fg=/^[^A-Z]*$/,Ig=/^[^a-z]*$/,Mg=vm("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),jg={number:"number",bigint:"bigint",object:"date"},Bg=vm("$ZodCheckLessThan",(e,t)=>{Mg.init(e,t);const n=jg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),zg=vm("$ZodCheckGreaterThan",(e,t)=>{Mg.init(e,t);const n=jg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hg=vm("$ZodCheckMultipleOf",(e,t)=>{Mg.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(0===s&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(s=Number.parseInt(e[1]))}const i=n>s?n:s;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Kg=vm("$ZodCheckNumberFormat",(e,t)=>{Mg.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=Hm[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,n&&(r.pattern=Ng)}),e._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a))return void o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<s&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),a>i&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),qg=vm("$ZodCheckMaxLength",(e,t)=>{var n;Mg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Am(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Gm(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ug=vm("$ZodCheckMinLength",(e,t)=>{var n;Mg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Am(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Gm(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zg=vm("$ZodCheckLengthEquals",(e,t)=>{var n;Mg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Am(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const i=Gm(r),o=s>t.length;n.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Gg=vm("$ZodCheckStringFormat",(e,t)=>{var n,r;Mg.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Wg=vm("$ZodCheckRegex",(e,t)=>{Gg.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vg=vm("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Fg),Gg.init(e,t)}),Jg=vm("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ig),Gg.init(e,t)}),Yg=vm("$ZodCheckIncludes",(e,t)=>{Mg.init(e,t);const n=jm(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Qg=vm("$ZodCheckStartsWith",(e,t)=>{Mg.init(e,t);const n=new RegExp(`^${jm(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xg=vm("$ZodCheckEndsWith",(e,t)=>{Mg.init(e,t);const n=new RegExp(`.*${jm(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ey=vm("$ZodCheckOverwrite",(e,t)=>{Mg.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class ty{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args,n=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,n.join("\n"))}}const ny={major:4,minor:1,patch:12},ry=vm("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ny;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=Km(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,o=i._zod.check(e);if(o instanceof Promise&&!1===n?.async)throw new Dm;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o;e.issues.length!==t&&(s||(s=Km(e,t)))});else{if(e.issues.length===t)continue;s||(s=Km(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(Km(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new Dm;return o.then(t=>e._zod.parse(t,i))}return e._zod.parse(o,i)};e._zod.run=(s,i)=>{if(i.skipChecks)return e._zod.parse(s,i);if("backward"===i.direction){const t=e._zod.parse({value:s.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,i)):n(t,s,i)}const o=e._zod.parse(s,i);if(o instanceof Promise){if(!1===i.async)throw new Dm;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=tg(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return rg(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),sy=vm("$ZodString",(e,t)=>{var n;ry.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),iy=vm("$ZodStringFormat",(e,t)=>{Gg.init(e,t),sy.init(e,t)}),oy=vm("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=vg),iy.init(e,t)}),ay=vm("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Dg(e))}else t.pattern??(t.pattern=Dg());iy.init(e,t)}),cy=vm("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wg),iy.init(e,t)}),uy=vm("$ZodURL",(e,t)=>{iy.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Pg.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ly=vm("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),iy.init(e,t)}),fy=vm("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=yg),iy.init(e,t)}),py=vm("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pg),iy.init(e,t)}),dy=vm("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=dg),iy.init(e,t)}),hy=vm("$ZodULID",(e,t)=>{t.pattern??(t.pattern=hg),iy.init(e,t)}),my=vm("$ZodXID",(e,t)=>{t.pattern??(t.pattern=mg),iy.init(e,t)}),gy=vm("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=gg),iy.init(e,t)}),yy=vm("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=$g({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${xg}T(?:${r})$`)}(t)),iy.init(e,t)}),by=vm("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Tg),iy.init(e,t)}),vy=vm("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${$g(t)}$`)),iy.init(e,t)}),Dy=vm("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=bg),iy.init(e,t)}),wy=vm("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=_g),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),_y=vm("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kg),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),ky=vm("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Eg),iy.init(e,t)}),Ey=vm("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Sg),iy.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Sy(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Ay=vm("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ag),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Sy(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Cy=vm("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Cg),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Cg.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Sy(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Py=vm("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Og),iy.init(e,t)});const Oy=vm("$ZodJWT",(e,t)=>{iy.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),xy=vm("$ZodNumber",(e,t)=>{ry.init(e,t),e._zod.pattern=e._zod.bag.pattern??Rg,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const s=n.value;if("number"==typeof s&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i="number"==typeof s?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),Ty=vm("$ZodNumber",(e,t)=>{Kg.init(e,t),xy.init(e,t)}),$y=vm("$ZodBoolean",(e,t)=>{ry.init(e,t),e._zod.pattern=Lg,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const s=n.value;return"boolean"==typeof s||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Ny=vm("$ZodUnknown",(e,t)=>{ry.init(e,t),e._zod.parse=e=>e}),Ry=vm("$ZodNever",(e,t)=>{ry.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ly(e,t,n){e.issues.length&&t.issues.push(...qm(n,e.issues)),t.value[n]=e.value}const Fy=vm("$ZodArray",(e,t)=>{ry.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let e=0;e<s.length;e++){const o=s[e],a=t.element._zod.run({value:o,issues:[]},r);a instanceof Promise?i.push(a.then(t=>Ly(t,n,e))):Ly(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Iy(e,t,n,r){e.issues.length&&t.issues.push(...qm(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function My(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function jy(e,t,n,r,s,i){const o=[],a=s.keySet,c=s.catchall._zod,u=c.def.type;for(const s of Object.keys(t)){if(a.has(s))continue;if("never"===u){o.push(s);continue}const i=c.run({value:t[s],issues:[]},r);i instanceof Promise?e.push(i.then(e=>Iy(e,n,s,t))):Iy(i,n,s,t)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const By=vm("$ZodObject",(e,t)=>{ry.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=Sm(()=>My(t));Om(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=Rm,i=t.catchall;let o;e._zod.parse=(t,n)=>{o??(o=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=o.shape;for(const e of o.keys){const r=u[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?c.push(r.then(n=>Iy(n,t,e,a))):Iy(r,t,e,a)}return i?jy(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),zy=vm("$ZodObjectJIT",(e,t)=>{By.init(e,t);const n=e._zod.parse,r=Sm(()=>My(t));let s;const i=Rm,o=!_m.jitless,a=o&&Lm.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return i(p)?o&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new ty(["shape","payload","ctx"]),n=r.value,s=e=>{const t=$m(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let o=0;for(const e of n.keys)i[e]="key_"+o++;t.write("const newResult = {};");for(const e of n.keys){const n=i[e],r=$m(e);t.write(`const ${n} = ${s(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?jy([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function Hy(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!Km(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Zm(e,r,km())))}),t)}const Ky=vm("$ZodUnion",(e,t)=>{ry.init(e,t),Om(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Om(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Om(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Om(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>Cm(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>Hy(t,s,e,i)):Hy(a,s,e,i)}}),qy=vm("$ZodIntersection",(e,t)=>{ry.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([t,n])=>Zy(e,t,n)):Zy(e,s,i)}});function Uy(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Fm(e)&&Fm(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=Uy(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=Uy(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zy(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Km(e))return e;const r=Uy(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Gy=vm("$ZodRecord",(e,t)=>{ry.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Fm(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const o=t.valueType._zod.run({value:s[e],issues:[]},r);o instanceof Promise?i.push(o.then(t=>{t.issues.length&&n.issues.push(...qm(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...qm(e,o.issues)),n.value[e]=o.value)}let a;for(const e in s)o.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const o of Reflect.ownKeys(s)){if("__proto__"===o)continue;const a=t.keyType._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Zm(e,r,km())),input:o,path:[o],inst:e}),n.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:s[o],issues:[]},r);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...qm(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...qm(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Wy=vm("$ZodEnum",(e,t)=>{ry.init(e,t);const n=function(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>Mm.has(typeof e)).map(e=>"string"==typeof e?jm(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),Vy=vm("$ZodTransform",(e,t)=>{ry.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new wm(e.constructor.name);const s=t.transform(n.value,n);if(r.async){return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n))}if(s instanceof Promise)throw new Dm;return n.value=s,n}});function Jy(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Yy=vm("$ZodOptional",(e,t)=>{ry.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Om(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Om(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Cm(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Jy(t,e.value)):Jy(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Qy=vm("$ZodNullable",(e,t)=>{ry.init(e,t),Om(e._zod,"optin",()=>t.innerType._zod.optin),Om(e._zod,"optout",()=>t.innerType._zod.optout),Om(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Cm(e.source)}|null)$`):void 0}),Om(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Xy=vm("$ZodDefault",(e,t)=>{ry.init(e,t),e._zod.optin="optional",Om(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>eb(e,t)):eb(r,t)}});function eb(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const tb=vm("$ZodPrefault",(e,t)=>{ry.init(e,t),e._zod.optin="optional",Om(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nb=vm("$ZodNonOptional",(e,t)=>{ry.init(e,t),Om(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>rb(t,e)):rb(s,e)}});function rb(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const sb=vm("$ZodCatch",(e,t)=>{ry.init(e,t),Om(e._zod,"optin",()=>t.innerType._zod.optin),Om(e._zod,"optout",()=>t.innerType._zod.optout),Om(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Zm(e,n,km()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Zm(e,n,km()))},input:e.value}),e.issues=[]),e)}}),ib=vm("$ZodPipe",(e,t)=>{ry.init(e,t),Om(e._zod,"values",()=>t.in._zod.values),Om(e._zod,"optin",()=>t.in._zod.optin),Om(e._zod,"optout",()=>t.out._zod.optout),Om(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ob(e,t.in,n)):ob(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ob(e,t.out,n)):ob(r,t.out,n)}});function ob(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ab=vm("$ZodReadonly",(e,t)=>{ry.init(e,t),Om(e._zod,"propValues",()=>t.innerType._zod.propValues),Om(e._zod,"values",()=>t.innerType._zod.values),Om(e._zod,"optin",()=>t.innerType._zod.optin),Om(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(cb):cb(r)}});function cb(e){return e.value=Object.freeze(e.value),e}const ub=vm("$ZodCustom",(e,t)=>{Mg.init(e,t),ry.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>lb(t,n,r,e));lb(s,n,r,e)}});function lb(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Wm(e))}}class fb{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function pb(){return new fb}const db=pb();function hb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...zm(t)})}function mb(e,t){return new Bg({check:"less_than",...zm(t),value:e,inclusive:!1})}function gb(e,t){return new Bg({check:"less_than",...zm(t),value:e,inclusive:!0})}function yb(e,t){return new zg({check:"greater_than",...zm(t),value:e,inclusive:!1})}function bb(e,t){return new zg({check:"greater_than",...zm(t),value:e,inclusive:!0})}function vb(e,t){return new Hg({check:"multiple_of",...zm(t),value:e})}function Db(e,t){return new qg({check:"max_length",...zm(t),maximum:e})}function wb(e,t){return new Ug({check:"min_length",...zm(t),minimum:e})}function _b(e,t){return new Zg({check:"length_equals",...zm(t),length:e})}function kb(e){return new ey({check:"overwrite",tx:e})}function Eb(e){const t=function(e,t){const n=new Mg({check:"custom",...zm(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Wm(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Wm(r))}},e(n.value,n)));return t}const Sb=vm("ZodISODateTime",(e,t)=>{yy.init(e,t),Qb.init(e,t)});function Ab(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...zm(t)})}(Sb,e)}const Cb=vm("ZodISODate",(e,t)=>{by.init(e,t),Qb.init(e,t)});function Pb(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...zm(t)})}(Cb,e)}const Ob=vm("ZodISOTime",(e,t)=>{vy.init(e,t),Qb.init(e,t)});function xb(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...zm(t)})}(Ob,e)}const Tb=vm("ZodISODuration",(e,t)=>{Dy.init(e,t),Qb.init(e,t)});function $b(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...zm(t)})}(Tb,e)}const Nb=(e,t)=>{Jm.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>r({issues:e}));else if("invalid_key"===s.code)r({issues:s.issues});else if("invalid_element"===s.code)r({issues:s.issues});else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Em,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Em,2)}},isEmpty:{get:()=>0===e.issues.length}})},Rb=vm("ZodError",Nb),Lb=vm("ZodError",Nb,{Parent:Error}),Fb=Qm(Lb),Ib=Xm(Lb),Mb=eg(Lb),jb=ng(Lb),Bb=sg(Lb),zb=ig(Lb),Hb=og(Lb),Kb=ag(Lb),qb=cg(Lb),Ub=ug(Lb),Zb=lg(Lb),Gb=fg(Lb),Wb=vm("ZodType",(e,t)=>(ry.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Tm(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Bm(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Fb(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Mb(e,t,n),e.parseAsync=async(t,n)=>Ib(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>jb(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Bb(e,t,n),e.decode=(t,n)=>zb(e,t,n),e.encodeAsync=async(t,n)=>Hb(e,t,n),e.decodeAsync=async(t,n)=>Kb(e,t,n),e.safeEncode=(t,n)=>qb(e,t,n),e.safeDecode=(t,n)=>Ub(e,t,n),e.safeEncodeAsync=async(t,n)=>Zb(e,t,n),e.safeDecodeAsync=async(t,n)=>Gb(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...zm(n)})}(Wv,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){return Eb(e)}(t)),e.overwrite=t=>e.check(kb(t)),e.optional=()=>Mv(e),e.nullable=()=>Bv(e),e.nullish=()=>Mv(Bv(e)),e.nonoptional=t=>function(e,t){return new Kv({type:"nonoptional",innerType:e,...zm(t)})}(e,t),e.array=()=>Pv(e),e.or=t=>$v([e,t]),e.and=t=>new Nv({type:"intersection",left:e,right:t}),e.transform=t=>Zv(e,function(e){return new Fv({type:"transform",transform:e})}(t)),e.default=t=>{return n=t,new zv({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Im(n)}});var n},e.prefault=t=>{return n=t,new Hv({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Im(n)}});var n},e.catch=t=>{return new qv({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Zv(e,t),e.readonly=()=>new Gv({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return db.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>db.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return db.get(e);const n=e.clone();return db.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Vb=vm("_ZodString",(e,t)=>{sy.init(e,t),Wb.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new Wg({check:"string_format",format:"regex",...zm(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Yg({check:"string_format",format:"includes",...zm(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Qg({check:"string_format",format:"starts_with",...zm(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Xg({check:"string_format",format:"ends_with",...zm(t),suffix:e})}(...t)),e.min=(...t)=>e.check(wb(...t)),e.max=(...t)=>e.check(Db(...t)),e.length=(...t)=>e.check(_b(...t)),e.nonempty=(...t)=>e.check(wb(1,...t)),e.lowercase=t=>e.check(function(e){return new Vg({check:"string_format",format:"lowercase",...zm(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Jg({check:"string_format",format:"uppercase",...zm(e)})}(t)),e.trim=()=>e.check(kb(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return kb(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(kb(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(kb(e=>e.toUpperCase()))}),Jb=vm("ZodString",(e,t)=>{sy.init(e,t),Vb.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...zm(t)})}(Xb,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...zm(t)})}(nv,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...zm(t)})}(yv,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...zm(t)})}(rv,t)),e.guid=t=>e.check(hb(ev,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...zm(t)})}(tv,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...zm(t)})}(tv,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...zm(t)})}(tv,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...zm(t)})}(tv,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...zm(t)})}(sv,t)),e.guid=t=>e.check(hb(ev,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...zm(t)})}(iv,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...zm(t)})}(ov,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...zm(t)})}(av,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...zm(t)})}(hv,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...zm(t)})}(mv,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...zm(t)})}(cv,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...zm(t)})}(uv,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...zm(t)})}(lv,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...zm(t)})}(fv,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...zm(t)})}(pv,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...zm(t)})}(dv,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...zm(t)})}(gv,t)),e.datetime=t=>e.check(Ab(t)),e.date=t=>e.check(Pb(t)),e.time=t=>e.check(xb(t)),e.duration=t=>e.check($b(t))});function Yb(e){return function(e,t){return new e({type:"string",...zm(t)})}(Jb,e)}const Qb=vm("ZodStringFormat",(e,t)=>{iy.init(e,t),Vb.init(e,t)}),Xb=vm("ZodEmail",(e,t)=>{cy.init(e,t),Qb.init(e,t)}),ev=vm("ZodGUID",(e,t)=>{oy.init(e,t),Qb.init(e,t)}),tv=vm("ZodUUID",(e,t)=>{ay.init(e,t),Qb.init(e,t)}),nv=vm("ZodURL",(e,t)=>{uy.init(e,t),Qb.init(e,t)}),rv=vm("ZodEmoji",(e,t)=>{ly.init(e,t),Qb.init(e,t)}),sv=vm("ZodNanoID",(e,t)=>{fy.init(e,t),Qb.init(e,t)}),iv=vm("ZodCUID",(e,t)=>{py.init(e,t),Qb.init(e,t)}),ov=vm("ZodCUID2",(e,t)=>{dy.init(e,t),Qb.init(e,t)}),av=vm("ZodULID",(e,t)=>{hy.init(e,t),Qb.init(e,t)}),cv=vm("ZodXID",(e,t)=>{my.init(e,t),Qb.init(e,t)}),uv=vm("ZodKSUID",(e,t)=>{gy.init(e,t),Qb.init(e,t)}),lv=vm("ZodIPv4",(e,t)=>{wy.init(e,t),Qb.init(e,t)}),fv=vm("ZodIPv6",(e,t)=>{_y.init(e,t),Qb.init(e,t)}),pv=vm("ZodCIDRv4",(e,t)=>{ky.init(e,t),Qb.init(e,t)}),dv=vm("ZodCIDRv6",(e,t)=>{Ey.init(e,t),Qb.init(e,t)}),hv=vm("ZodBase64",(e,t)=>{Ay.init(e,t),Qb.init(e,t)}),mv=vm("ZodBase64URL",(e,t)=>{Cy.init(e,t),Qb.init(e,t)}),gv=vm("ZodE164",(e,t)=>{Py.init(e,t),Qb.init(e,t)}),yv=vm("ZodJWT",(e,t)=>{Oy.init(e,t),Qb.init(e,t)}),bv=vm("ZodNumber",(e,t)=>{xy.init(e,t),Wb.init(e,t),e.gt=(t,n)=>e.check(yb(t,n)),e.gte=(t,n)=>e.check(bb(t,n)),e.min=(t,n)=>e.check(bb(t,n)),e.lt=(t,n)=>e.check(mb(t,n)),e.lte=(t,n)=>e.check(gb(t,n)),e.max=(t,n)=>e.check(gb(t,n)),e.int=t=>e.check(Dv(t)),e.safe=t=>e.check(Dv(t)),e.positive=t=>e.check(yb(0,t)),e.nonnegative=t=>e.check(bb(0,t)),e.negative=t=>e.check(mb(0,t)),e.nonpositive=t=>e.check(gb(0,t)),e.multipleOf=(t,n)=>e.check(vb(t,n)),e.step=(t,n)=>e.check(vb(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});const vv=vm("ZodNumberFormat",(e,t)=>{Ty.init(e,t),bv.init(e,t)});function Dv(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...zm(t)})}(vv,e)}const wv=vm("ZodBoolean",(e,t)=>{$y.init(e,t),Wb.init(e,t)});function _v(e){return function(e,t){return new e({type:"boolean",...zm(t)})}(wv,e)}const kv=vm("ZodUnknown",(e,t)=>{Ny.init(e,t),Wb.init(e,t)});function Ev(){return new kv({type:"unknown"})}const Sv=vm("ZodNever",(e,t)=>{Ry.init(e,t),Wb.init(e,t)});function Av(e){return function(e,t){return new e({type:"never",...zm(t)})}(Sv,e)}const Cv=vm("ZodArray",(e,t)=>{Fy.init(e,t),Wb.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(wb(t,n)),e.nonempty=t=>e.check(wb(1,t)),e.max=(t,n)=>e.check(Db(t,n)),e.length=(t,n)=>e.check(_b(t,n)),e.unwrap=()=>e.element});function Pv(e,t){return function(e,t,n){return new e({type:"array",element:t,...zm(n)})}(Cv,e,t)}const Ov=vm("ZodObject",(e,t)=>{zy.init(e,t),Wb.init(e,t),Om(e,"shape",()=>t.shape),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Lv({type:"enum",entries:n,...zm(t)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ev()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ev()}),e.strict=()=>e.clone({...e._zod.def,catchall:Av()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Fm(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=Tm(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return xm(this,"shape",n),n},checks:[]});return Bm(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Fm(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return xm(this,"shape",n),n},checks:e._zod.def.checks};return Bm(e,n)}(e,t),e.merge=t=>function(e,t){const n=Tm(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return xm(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Bm(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Bm(e,Tm(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return xm(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Tm(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return xm(this,"shape",r),r},checks:[]});return Bm(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Tm(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return xm(this,"shape",s),s},checks:[]});return Bm(t,r)}(Iv,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Tm(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return xm(this,"shape",s),s},checks:[]});return Bm(t,r)}(Kv,e,t[0])});function xv(e,t){const n={type:"object",shape:e??{},...zm(t)};return new Ov(n)}const Tv=vm("ZodUnion",(e,t)=>{Ky.init(e,t),Wb.init(e,t),e.options=t.options});function $v(e,t){return new Tv({type:"union",options:e,...zm(t)})}const Nv=vm("ZodIntersection",(e,t)=>{qy.init(e,t),Wb.init(e,t)});const Rv=vm("ZodRecord",(e,t)=>{Gy.init(e,t),Wb.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});const Lv=vm("ZodEnum",(e,t)=>{Wy.init(e,t),Wb.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Lv({...t,checks:[],...zm(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Lv({...t,checks:[],...zm(r),entries:s})}});const Fv=vm("ZodTransform",(e,t)=>{Vy.init(e,t),Wb.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new wm(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Wm(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Wm(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}});const Iv=vm("ZodOptional",(e,t)=>{Yy.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mv(e){return new Iv({type:"optional",innerType:e})}const jv=vm("ZodNullable",(e,t)=>{Qy.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Bv(e){return new jv({type:"nullable",innerType:e})}const zv=vm("ZodDefault",(e,t)=>{Xy.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Hv=vm("ZodPrefault",(e,t)=>{tb.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Kv=vm("ZodNonOptional",(e,t)=>{nb.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});const qv=vm("ZodCatch",(e,t)=>{sb.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const Uv=vm("ZodPipe",(e,t)=>{ib.init(e,t),Wb.init(e,t),e.in=t.in,e.out=t.out});function Zv(e,t){return new Uv({type:"pipe",in:e,out:t})}const Gv=vm("ZodReadonly",(e,t)=>{ab.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Wv=vm("ZodCustom",(e,t)=>{ub.init(e,t),Wb.init(e,t)});function Vv(e){return function(e,t){return new e({type:"number",coerce:!0,checks:[],...zm(t)})}(bv,e)}const Jv=$v([_v(),Yb(),function(e,t){return new e({type:"number",checks:[],...zm(t)})}(bv,Yv)]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=String(e).trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();var Yv;const Qv=xv({script:Yb().min(1,{message:"script must be a non-empty string"}),warnPattern:Yb().min(1,{message:"warnPattern must be a non-empty string"}).optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp(e),!0}catch{return!1}})(e),{message:"warnPattern: invalid regular expression"})}).strict(),Xv=function(e,t,n){return new Rv({type:"record",keyType:e,valueType:t,...zm(n)})}(Yb(),$v([Yb().min(1),Qv])).default({}),eD=xv({archive:Jv,combine:Jv,keep:Jv,sequential:Jv,live:Jv,plan:Jv,hangWarn:Vv().int().positive().optional(),hangKill:Vv().int().positive().optional(),hangKillGrace:Vv().int().positive().optional(),scripts:$v([_v(),Pv(Yb())]).optional(),prompt:Yb().optional()}).strict().optional(),tD=xv({file:Yb().optional()}).strict().optional(),nD=xv({stash:Jv}).strict().optional(),rD=xv({debug:Jv,boring:Jv,patch:tD,run:eD,snap:nD}).strict().optional(),sD=xv({scripts:Xv,cliDefaults:rD,patchOpenCommand:Yb().optional(),maxUndos:Vv().int().positive().optional(),devMode:Jv}).strict(),iD=(e,t)=>{if((()=>{try{return"1"===process.env.STAN_DEBUG}catch{return!1}})())try{console.error(`stan: debug: fallback: ${e}: ${t}`)}catch{}},oD=(e,t)=>{const n=e&&"object"==typeof e?e:{};let r;try{r=sD.parse(n)}catch(e){const n=t.replace(/\\/g,"/");throw new Error(`stan-cli: invalid config in ${n}\n${(e=>e instanceof Rb?e.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("\n"):String(e))(e)}`)}return(e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e??{},t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')})(r.scripts??{}),{scripts:r.scripts??{},cliDefaults:r.cliDefaults,patchOpenCommand:r.patchOpenCommand??ue,maxUndos:r.maxUndos,devMode:r.devMode}},aD=t=>{const r=(e=>{const t=de(e);if(t)return t;const r=new Set;let s=e;for(;s;){const e=fe({cwd:s});if(!e||r.has(e))break;r.add(e);const t=de(e);if(t)return t;const i=n.dirname(e);if(i===e||r.has(i))break;s=i}return null})(t);if(!r)return{scripts:{},patchOpenCommand:ue};const s=((e,t)=>e.endsWith(".json")?JSON.parse(t):bm.parse(t))(r,e.readFileSync(r,"utf8")),i=s&&"object"==typeof s?s:{};if(i["stan-cli"]&&"object"==typeof i["stan-cli"])return oD(i["stan-cli"],r);const o=(e=>{const t=["scripts","cliDefaults","patchOpenCommand","maxUndos","devMode"],n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n})(i);return Object.keys(o).length>0?(iD("cli.config:loadSync",`using legacy top-level CLI keys from ${r.replace(/\\/g,"/")}; run "stan init" to migrate`),Object.prototype.hasOwnProperty.call(i,"stan-core")||iD("run.action:engine-legacy",`detected legacy root keys (no "stan-core") in ${r.replace(/\\/g,"/")}`),oD(o,r)):{scripts:{},patchOpenCommand:ue}},cD=(e=0)=>t=>`[${t+e}m`,uD=(e=0)=>t=>`[${38+e};5;${t}m`,lD=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,fD={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(fD.modifier);Object.keys(fD.color),Object.keys(fD.bgColor);const pD=function(){const e=new Map;for(const[t,n]of Object.entries(fD)){for(const[t,r]of Object.entries(n))fD[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=fD[t],e.set(r[0],r[1]);Object.defineProperty(fD,t,{value:n,enumerable:!1})}return Object.defineProperty(fD,"codes",{value:e,enumerable:!1}),fD.color.close="",fD.bgColor.close="",fD.color.ansi=cD(),fD.color.ansi256=uD(),fD.color.ansi16m=lD(),fD.bgColor.ansi=cD(10),fD.bgColor.ansi256=uD(10),fD.bgColor.ansi16m=lD(10),Object.defineProperties(fD,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>fD.rgbToAnsi256(...fD.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const s=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(t,n,r);if(0===s)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===s&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>fD.ansi256ToAnsi(fD.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>fD.ansi256ToAnsi(fD.hexToAnsi256(e)),enumerable:!1}}),fD}();function dD(e,t=(globalThis.Deno?globalThis.Deno.args:s.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}const{env:hD}=s;let mD;function gD(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in hD)return"true"===hD.FORCE_COLOR?1:"false"===hD.FORCE_COLOR?0:0===hD.FORCE_COLOR.length?1:Math.min(Number.parseInt(hD.FORCE_COLOR,10),3)}();void 0!==r&&(mD=r);const i=n?mD:r;if(0===i)return 0;if(n){if(dD("color=16m")||dD("color=full")||dD("color=truecolor"))return 3;if(dD("color=256"))return 2}if("TF_BUILD"in hD&&"AGENT_NAME"in hD)return 1;if(e&&!t&&void 0===i)return 0;const o=i||0;if("dumb"===hD.TERM)return o;if("win32"===s.platform){const e=g.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in hD)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in hD)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in hD)||"codeship"===hD.CI_NAME?1:o;if("TEAMCITY_VERSION"in hD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(hD.TEAMCITY_VERSION)?1:0;if("truecolor"===hD.COLORTERM)return 3;if("xterm-kitty"===hD.TERM)return 3;if("xterm-ghostty"===hD.TERM)return 3;if("wezterm"===hD.TERM)return 3;if("TERM_PROGRAM"in hD){const e=Number.parseInt((hD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(hD.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(hD.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(hD.TERM)||"COLORTERM"in hD?1:o}function yD(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(gD(e,{streamIsTTY:e&&e.isTTY,...t}))}dD("no-color")||dD("no-colors")||dD("color=false")||dD("color=never")?mD=0:(dD("color")||dD("colors")||dD("color=true")||dD("color=always"))&&(mD=1);const bD={stdout:yD({isTTY:y.isatty(1)}),stderr:yD({isTTY:y.isatty(2)})};function vD(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const s=t.length;let i=0,o="";do{o+=e.slice(i,r)+t+n,i=r+s,r=e.indexOf(t,i)}while(-1!==r);return o+=e.slice(i),o}const{stdout:DD,stderr:wD}=bD,_D=Symbol("GENERATOR"),kD=Symbol("STYLER"),ED=Symbol("IS_EMPTY"),SD=["ansi","ansi","ansi256","ansi16m"],AD=Object.create(null),CD=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=DD?DD.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,PD.prototype),t};function PD(e){return CD(e)}Object.setPrototypeOf(PD.prototype,Function.prototype);for(const[e,t]of Object.entries(pD))AD[e]={get(){const n=ND(this,$D(t.open,t.close,this[kD]),this[ED]);return Object.defineProperty(this,e,{value:n}),n}};AD.visible={get(){const e=ND(this,this[kD],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const OD=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?pD[n].ansi16m(...r):"ansi256"===t?pD[n].ansi256(pD.rgbToAnsi256(...r)):pD[n].ansi(pD.rgbToAnsi(...r)):"hex"===e?OD("rgb",t,n,...pD.hexToRgb(...r)):pD[n][e](...r),xD=["rgb","hex","ansi256"];for(const e of xD){AD[e]={get(){const{level:t}=this;return function(...n){const r=$D(OD(e,SD[t],"color",...n),pD.color.close,this[kD]);return ND(this,r,this[ED])}}};AD["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=$D(OD(e,SD[t],"bgColor",...n),pD.bgColor.close,this[kD]);return ND(this,r,this[ED])}}}}const TD=Object.defineProperties(()=>{},{...AD,level:{enumerable:!0,get(){return this[_D].level},set(e){this[_D].level=e}}}),$D=(e,t,n)=>{let r,s;return void 0===n?(r=e,s=t):(r=n.openAll+e,s=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:s,parent:n}},ND=(e,t,n)=>{const r=(...e)=>RD(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,TD),r[_D]=e,r[kD]=t,r[ED]=n,r},RD=(e,t)=>{if(e.level<=0||!t)return e[ED]?"":t;let n=e[kD];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=vD(t,n.close,n.open),n=n.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(e,t,n,r){let s=0,i="";do{const o="\r"===e[r-1];i+=e.slice(s,o?r-1:r)+t+(o?"\r\n":"\n")+n,s=r+1,r=e.indexOf("\n",s)}while(-1!==r);return i+=e.slice(s),i}(t,s,r,i)),r+t+s};Object.defineProperties(PD.prototype,AD);const LD=PD();PD({level:wD?wD.level:0});const FD=()=>{const e=Boolean(process.stdout?.isTTY);return"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!e},ID=e=>FD()?e:LD.green(e),MD=e=>FD()?e:LD.cyan(e),jD=e=>FD()?e:LD.blue(e),BD=e=>FD()?e:LD.red(e),zD=e=>FD()?e:LD.black(e),HD=e=>FD()?e:LD.gray(e),KD=e=>FD()?e:LD.hex("#FFA500")(e),qD=e=>FD()?e:LD.bold(e),UD=e=>FD()?e:LD.dim(e),ZD=(e,t)=>{const{selection:r,config:s,mode:i,behavior:o}=t,a=(null==r?Object.keys(s.scripts):r)??[],c=n.join(s.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[qD("STAN run plan"),"mode: "+("sequential"===i?"sequential":"concurrent"),`output: ${c}/`,..."string"==typeof o.prompt&&o.prompt.trim().length?[`prompt: ${o.prompt}`]:[],`scripts: ${a.length?a.join(", "):"none"}`,"archive: "+(o.archive?"yes":"no"),"combine: "+(o.combine?"yes":"no"),"keep output dir: "+(o.keep?"yes":"no"),"live: "+(o.live?"yes":"no"),`hang warn: ${"number"==typeof o.hangWarn?o.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof o.hangKill?o.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof o.hangKillGrace?o.hangKillGrace.toString():"n/a"}s`].join("\n ")}`};var GD,WD;var VD=function(){if(WD)return GD;WD=1;var e=b,t=e.spawn,n=e.exec;function r(e,t,n){var r={};try{Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[e]||(s(e,t),r[e]=1)}),r[n]||(s(n,t),r[n]=1)})}catch(e){if(n)return n(e);throw e}if(n)return n()}function s(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function i(e,t,n,r,s){var o=r(e),a="";o.stdout.on("data",function(e){e=e.toString("ascii");a+=e});o.on("close",function(o){delete n[e],0==o?a.match(/\d+/g).forEach(function(o){o=parseInt(o,10),t[e].push(o),t[o]=[],n[o]=1,i(o,t,n,r,s)}):0==Object.keys(n).length&&s()})}return GD=function(e,s,o){if("function"==typeof s&&void 0===o&&(o=s,s=void 0),e=parseInt(e),Number.isNaN(e)){if(o)return o(new Error("pid must be a number"));throw new Error("pid must be a number")}var a={},c={};switch(a[e]=[],c[e]=1,process.platform){case"win32":n("taskkill /pid "+e+" /T /F",o);break;case"darwin":i(e,a,c,function(e){return t("pgrep",["-P",e])},function(){r(a,s,o)});break;default:i(e,a,c,function(e){return t("ps",["-o","pid","--no-headers","--ppid",e])},function(){r(a,s,o)})}}}(),JD=bf(VD);class YD{behavior;constructor(e){this.behavior=e}pids=new Map;lastCancelled=[];track(e,t){this.pids.set(e,t)}cancelAll(e){const t="number"==typeof this.behavior.hangKillGrace?this.behavior.hangKillGrace:10,n=e?.immediate?0:Math.max(0,1e3*t),r=Array.from(this.pids.entries()),s=Array.from(this.pids.values());this.lastCancelled=s;for(const[,e]of r)try{Number.isFinite(e)&&process.kill(e,"SIGTERM")}catch{}const i=()=>{for(const[,e]of r)try{Number.isFinite(e)&&JD(e,"SIGKILL")}catch{}};n<=0?setTimeout(i,0):setTimeout(i,n),this.pids.clear()}async waitAll(e=2e3){const t=this.lastCancelled.length>0?[...this.lastCancelled]:Array.from(this.pids.values());if(0===t.length)return;const n=Date.now()+Math.max(0,e),r=e=>{try{return process.kill(e,0)}catch{return!1}};for(;Date.now()<n;){if(0===t.filter(e=>r(e)).length)break;await new Promise(e=>setTimeout(e,50))}this.lastCancelled=[]}}const QD=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),XD=(e,t,n)=>{if(QD)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},ew={get enabled(){return QD},renderer:{start(e){XD("renderer","start()",e)},update(e){XD("renderer","update()",e)},render(e){XD("renderer","render()",e)},headerOnly(e){XD("renderer","render(header-only)",e)},flush(){XD("renderer","flush()")},clear(){XD("renderer","clear()")},stop(){XD("renderer","stop()")},done(){XD("renderer","stop():done()")}},ui:{start(){XD("UI","start()")},installCancellation(){XD("UI","installCancellation(): control.attach()")},onCancelled(e){XD("UI","onCancelled()",{mode:e})},stop(){XD("UI","stop() -> sink.stop()")}},session:{info(e,t){XD("session",e,t)},exitHook(){XD("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}},tw=(e,t)=>{const r=n.join(e,t),s=n.join(r,"system");return{base:r,system:s,output:n.join(r,"output"),diff:n.join(r,"diff"),patch:n.join(r,"patch"),systemFile:n.join(s,"stan.system.md")}},nw=async(e,s,i)=>{if(i&&"object"==typeof i)try{await(async e=>{const{cwd:s,stanPath:i,map:o,onStage:a}=e;if(!o||"object"!=typeof o)return;const c=te(s,i),u=n.join(c.rootAbs,"imports");await r.ensureDir(u);const l=Object.keys(o).sort();for(const e of l){const i=o[e]??[];if(!Array.isArray(i)||0===i.length)continue;const c=df(e);if(!c)continue;const l=n.join(u,c);await t.rm(l,{recursive:!0,force:!0}).catch(()=>{}),await r.ensureDir(l).catch(()=>{});const f=[];for(const e of i){const i=String(e??"").trim();if(!i)continue;const o=ff(i.replace(/\\/g,"/"));try{const e=await uf(i,{cwd:s,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const i of e){if(!await hf(i))continue;const e=n.relative(n.isAbsolute(o)?o:n.resolve(s,o),i).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const a=n.join(l,e);await r.ensureDir(n.dirname(a)).catch(()=>{});try{await t.copyFile(i,a),f.push(a)}catch{}}}catch{}}try{"function"==typeof a&&a(c,f.map(e=>n.relative(s,e).replace(/\\/g,"/")))}catch{}}})({cwd:e,stanPath:s,map:i})}catch{}},rw=async e=>{try{const r=await t.readdir(e,{withFileTypes:!0}),s=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(r.map(async r=>{s.has(r.name)||await t.rm(n.resolve(e,r.name),{recursive:!0,force:!0})}))}catch{}},sw=async(e,r)=>{const s=n.join(e,r,"patch");try{const e=await t.readdir(s,{withFileTypes:!0});await Promise.all(e.map(e=>t.rm(n.resolve(s,e.name),{recursive:!0,force:!0})))}catch{}},iw=e=>n.join(e,"system","stan.system.md"),ow=async e=>{const n=await t.readFile(e);return Buffer.from(n)},aw=(t,r,s)=>{const i=n.join(t,iw(r)),o=(()=>{try{const t=mf();if(t&&e.existsSync(t))return t}catch{}try{const t=v.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:w&&"SCRIPT"===w.tagName.toUpperCase()&&w.src||new URL("index.js",document.baseURI).href).resolve("@karmaniverous/stan-core/package.json"),r=n.dirname(t),s=n.join(r,"dist","stan.system.md");return e.existsSync(s)?s:null}catch{return null}})();if("local"===s){if(!e.existsSync(i))throw new Error(`system prompt not found at ${n.join(r,"system","stan.system.md").replace(/\\/g,"/")}`);return{abs:i,display:`${n.join(r,"system","stan.system.md").replace(/\\/g,"/")}`,kind:"local"}}if("core"===s){if(!o||!e.existsSync(o))throw new Error("packaged system prompt not found in @karmaniverous/stan-core");return{abs:o,display:`@karmaniverous/stan-core@${gf}`,kind:"core"}}if("auto"===s){if(e.existsSync(i))return{abs:i,display:`${n.join(r,"system","stan.system.md").replace(/\\/g,"/")}`,kind:"local"};if(o&&e.existsSync(o))return{abs:o,display:`@karmaniverous/stan-core@${gf}`,kind:"core"};throw new Error("unable to resolve system prompt (auto: local and core unavailable)")}const a=n.isAbsolute(s)?s:n.join(t,s);if(!e.existsSync(a))throw new Error(`system prompt not found at ${a.replace(/\\/g,"/")}`);return{abs:a,display:`${a.replace(/\\/g,"/")}`,kind:"path"}},cw=async(r,s,i)=>{const o=n.join(r,iw(s)),a=n.dirname(o),c=e.existsSync(o);let u=null;if(c)try{u=await ow(o)}catch{u=null}const l=await ow(i.abs),f=c&&null!==u&&u.length===l.length&&u.equals(l);return f||(await t.mkdir(a,{recursive:!0}),await t.writeFile(o,l)),{changed:!f,restore:async()=>{if(!f)try{c&&null!==u?await t.writeFile(o,u):await t.rm(o,{force:!0})}catch{}}}},uw=async e=>{const{cwd:t,config:n,includeOutputs:r,ui:s}=e,{archivePath:i,diffPath:o}=await(async(e,t)=>{const{cwd:n,config:r,includeOutputs:s}=e,i=Boolean(t?.silent),o=tw(n,r.stanPath);i||console.log(`stan: start "${MD("archive")}"`);let a="",c="";try{await nw(n,r.stanPath,r.imports),t?.progress?.start?.("full");const e=Date.now();a=await ce(n,r.stanPath,{includeOutputDir:s,includes:r.includes??[],excludes:r.excludes??[]}),t?.progress?.done?.("full",a,e,Date.now()),i||console.log(`stan: ${ID("done")} "${MD("archive")}" -> ${MD(a.replace(/\\/g,"/"))}`),i||console.log(`stan: start "${MD("archive (diff)")}"`),t?.progress?.start?.("diff");const o=Date.now();({diffPath:c}=await Ja({cwd:n,stanPath:r.stanPath,baseName:"archive",includes:r.includes??[],excludes:r.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:s})),t?.progress?.done?.("diff",c,o,Date.now()),i||console.log(`stan: ${ID("done")} "${MD("archive (diff)")}" -> ${MD(c.replace(/\\/g,"/"))}`)}finally{}return s&&await rw(o.output),await sw(n,r.stanPath),{archivePath:a,diffPath:c}})({cwd:t,config:n,includeOutputs:r},{silent:!0,progress:{start:e=>s.onArchiveStart(e),done:(e,n,r,i)=>s.onArchiveEnd(e,n,t,r,i)}});return{archivePath:i,diffPath:o}},lw=async(e,r)=>{try{const s=await t.readFile(((e,t)=>n.join(e,t,"system",".docs.meta.json"))(e,r),"utf8"),i=JSON.parse(s);if(i&&"object"==typeof i)return i}catch{}return null},fw=async e=>{const{cwd:r,config:s,behavior:i,ui:o,promptAbs:a,promptDisplay:u}=e,l=[],f=tw(r,s.stanPath),p=f.systemFile;if(Boolean(a)&&n.resolve(a)!==n.resolve(p)){let e,n=!0;try{a&&(e=await(async e=>c.createHash("sha256").update(await t.readFile(e)).digest("hex"))(a))}catch{e=void 0}try{const t=await lw(r,s.stanPath),i=t?.prompt&&"object"==typeof t.prompt?t.prompt.hash:void 0;i&&e?n=i!==e:i?e||(n=!1):n=!0}catch{n=!0}if(await nw(r,s.stanPath,s.imports),n){let e=null;try{if(a){const{restore:t}=await cw(r,s.stanPath,{abs:a,display:u,kind:"path"});e=t}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{o.stop()}catch{}return{created:l,cancelled:!0}}try{try{o.onArchiveStart("diff")}catch{}const e=Date.now(),{diffPath:t}=await Ja({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:s.includes??[],excludes:s.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:Boolean(i.combine)});try{o.onArchiveEnd("diff",t,r,e,Date.now())}catch{}l.push(t);try{o.onArchiveStart("full")}catch{}const n=Date.now(),a=await ce(r,s.stanPath,{includeOutputDir:Boolean(i.combine),includes:s.includes??[],excludes:s.excludes??[]});try{o.onArchiveEnd("full",a,r,n,Date.now())}catch{}l.push(a)}finally{await(e?.().catch(()=>{}))}}else{try{o.onArchiveStart("diff")}catch{}const e=Date.now(),{diffPath:t}=await Ja({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:s.includes??[],excludes:s.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:Boolean(i.combine)});try{o.onArchiveEnd("diff",t,r,e,Date.now())}catch{}l.push(t);let n=null;try{if(a){const{restore:e}=await cw(r,s.stanPath,{abs:a,display:u,kind:"path"});n=e}try{o.onArchiveStart("full")}catch{}const e=Date.now(),t=await ce(r,s.stanPath,{includeOutputDir:Boolean(i.combine),includes:s.includes??[],excludes:s.excludes??[]});try{o.onArchiveEnd("full",t,r,e,Date.now())}catch{}l.push(t)}finally{await(n?.().catch(()=>{}))}}return i.combine&&await rw(f.output),await sw(r,s.stanPath),{created:l,cancelled:!1}}let d=null;try{if(a){const{restore:e}=await cw(r,s.stanPath,{abs:a,display:u,kind:"path"});d=e}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{o.stop()}catch{}return{created:l,cancelled:!0}}try{const{archivePath:e,diffPath:t}=await uw({cwd:r,config:s,includeOutputs:Boolean(i.combine),ui:o});l.push(e,t)}finally{await(d?.().catch(()=>{}))}return{created:l,cancelled:!1}},pw=[];pw.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&pw.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&pw.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const dw=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,hw=Symbol.for("signal-exit emitter"),mw=globalThis,gw=Object.defineProperty.bind(Object);class yw{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(mw[hw])return mw[hw];gw(mw,hw,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const s of this.listeners[e])r=!0===s(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class bw{}const vw=globalThis.process,{onExit:Dw}=(ww=dw(vw)?new class extends bw{#e="win32"===vw.platform?"SIGINT":"SIGHUP";#t=new yw;#n;#r;#s;#i={};#o=!1;constructor(e){super(),this.#n=e,this.#i={};for(const t of pw)this.#i[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const s=e;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#s=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!dw(this.#n))return()=>{};!1===this.#o&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const e of pw)try{const t=this.#i[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#a(e,...t),this.#n.reallyExit=e=>this.#c(e)}}unload(){this.#o&&(this.#o=!1,pw.forEach(e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#c(e){return dw(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#a(e,...t){const n=this.#r;if("exit"===e&&dw(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(vw):new class extends bw{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>ww.onExit(e,t),load:()=>ww.load(),unload:()=>ww.unload()});var ww;const _w=(e,t)=>{try{ew.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,Dw(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{ew.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{ew.session.info("uninstall exit hook"),n()}catch{}}};class kw{ui;supervisor;cancelled=!1;restartRequested=!1;cancelledKeys=new Set;wake=null;waitP;constructor(e,t){this.ui=e,this.supervisor=t,this.waitP=new Promise(e=>this.wake=e)}markQueued(e){for(const t of e)this.cancelledKeys.add(`script:${t}`)}async wait(){await this.waitP}isCancelled(){return this.cancelled}isRestart(){return this.restartRequested}wasKeyCancelled(e){return this.cancelled&&this.cancelledKeys.has(`script:${e}`)}triggerCancel(){if(!this.cancelled){this.cancelled=!0;try{this.ui.onCancelled("cancel")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{process.exitCode=1,"test"!==process.env.NODE_ENV&&process.exit(1)}catch{}try{this.wake?.()}catch{}}}triggerRestart(){if(!this.restartRequested){this.restartRequested=!0,this.cancelled=!0;try{this.ui.onCancelled("restart")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{this.wake?.()}catch{}}}detachUiKeys(){try{ew.session.info("restart: detach keys")}catch{}}}const Ew=(t,r)=>{const s=r.PATH??r.Path??"",i=(t=>{const r=[];let s=t;for(;;){const t=n.join(s,"node_modules",".bin");try{e.existsSync(t)&&r.push(t)}catch{}const i=n.dirname(s);if(i===s)break;s=i}return r})(t);return{...r,PATH:[...i,s].filter(Boolean).join(n.delimiter)}},Sw=()=>new Promise(e=>setImmediate(e)),Aw=async(r,s,i,o,a,c,l,f,p)=>{const d=n.resolve(s,`${o}.txt`),h=Date.now();l?.onStart?.(o);const m=e.createWriteStream(d,{encoding:"utf8"}),g=u.spawn(a,{cwd:r,shell:!0,windowsHide:!0,env:Ew(r,process.env)}),y="1"===process.env.STAN_DEBUG;let b="";const v="number"==typeof f?.hangWarn&&f.hangWarn>0?f.hangWarn:0,D="number"==typeof f?.hangKill&&f.hangKill>0?f.hangKill:0,w="number"==typeof f?.hangKillGrace&&f.hangKillGrace>0?f.hangKillGrace:10;let _,k,E=Date.now(),S=!1,A=!1;try{"number"==typeof g.pid&&p&&p.track(`script:${o}`,g.pid)}catch{}g.stdout.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stdout.write(e),E=Date.now()}),g.stderr.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stderr.write(e),E=Date.now()}),(v>0||D>0)&&(_=setInterval(()=>{const e=Date.now()-E;if(!S&&v>0&&e>=1e3*v&&(S=!0,l?.onHangWarn?.(o,v)),!A&&D>0&&e>=1e3*D){A=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}l?.onHangTimeout?.(o,D);const e=Math.max(0,1e3*w);k=setTimeout(()=>{try{"number"==typeof g.pid&&JD(g.pid,"SIGKILL")}catch{}l?.onHangKilled?.(o,w)},e)}},1e3));const C=await new Promise((e,t)=>{g.on("error",e=>t(e instanceof Error?e:new Error(String(e)))),g.on("close",t=>e(t??0))});_&&clearInterval(_),k&&clearTimeout(k),m.end(),await(e=>new Promise((t,n)=>{e.on("close",()=>t()),e.on("error",e=>n(e instanceof Error?e:new Error(String(e))))}))(m);let P="ok";if("number"==typeof C&&0!==C)P="error";else if(f?.warnPatterns&&f.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let n=!1;if(b.length>0&&e(f.warnPatterns,b))n=!0;else try{const r=await t.readFile(d,"utf8");e(f.warnPatterns,r)&&(n=!0)}catch{}n&&(P="warn")}return l?.onEnd?.(o,d,h,Date.now(),C,P),c&&await t.appendFile(c,o.slice(0,1).toUpperCase(),"utf8"),d},Cw=async(e,t,n,r,s,i,o,a,c,u,l)=>{const f=[],p=async n=>{try{if("function"==typeof u&&!u())return}catch{}const s=r.scripts[n],i="string"==typeof s?s:"object"==typeof s&&s&&"script"in s?String(s.script):"",p=s&&"object"==typeof s&&"warnPattern"in s?(e=>{if("string"!=typeof e||!e.trim())return[];const t=e.trim(),n=[];try{n.push(new RegExp(t))}catch{}try{const e=t.replace(/\\\\/g,"\\");e!==t&&n.push(new RegExp(e))}catch{}try{n.push(new RegExp(t,"i"))}catch{}return n})(s.warnPattern):[],d=await Aw(e,t,0,n,i,o,a,{silent:a.silent,hangWarn:c?.hangWarn,hangKill:c?.hangKill,hangKillGrace:c?.hangKillGrace,warnPatterns:p},l);f.push(d)};if("sequential"===i)for(const e of s){const t=e=>new Promise(t=>setTimeout(t,e));if("function"==typeof u){if(!u())break;if(await Sw(),!u())break;if(await t(25),!u())break}if(await p(e),"function"==typeof u&&(await Sw(),!u()))break}else{const e="function"==typeof u?s.filter(()=>u()):s;await Promise.all(e.map(e=>p(e).then(()=>{})))}return f};let Pw=null;const Ow=e=>Pw===e,xw="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,Tw=async e=>{const{cwd:r,config:s,selection:i,mode:o,behavior:a,liveEnabled:c,planBody:u,printPlan:l,ui:f,promptChoice:p}=e,d=Symbol("session-epoch");Pw=d;const h=n.resolve(r,s.stanPath,"output"),m=n.resolve(s.stanPath,"output").replace(/\\/g,"/"),g=await(async(e,r,s)=>{if(!e)return;const i=n.resolve(r,"order.txt");return s||await t.writeFile(i,"","utf8"),i})(xw,h,Boolean(a.keep));let y="",b=null;try{const e=((e,t,n)=>{const r=(n??"auto").trim(),s=aw(e,t,r);return{display:"auto"===r?`auto → ${s.display}`:s.display,abs:s.abs}})(r,s.stanPath,p);y=e.display,b=e.abs}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: unable to resolve system prompt (${t})`),console.log("");try{f.stop()}catch{}return{created:[],cancelled:!0,restartRequested:!1}}l&&u&&((e,t)=>{const{selection:n,config:r,mode:s,behavior:i,planBody:o,ui:a,promptDisplay:c}=t;try{const e=ZD(0,{selection:n,config:r,mode:s,behavior:{...i,prompt:c}});a.onPlan(e)}catch{"string"==typeof o&&o.length&&a.onPlan(o)}console.log("")})(0,{selection:i,config:s,mode:o,behavior:a,planBody:u,ui:f,promptDisplay:y}),f.start();const v=new YD({hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace}),D=new kw(f,v);try{f.installCancellation(()=>D.triggerCancel(),c?()=>D.triggerRestart():void 0)}catch{}const w=_w(()=>D.triggerCancel(),async()=>{ew.session.exitHook();try{f.stop()}catch{}try{v.cancelAll({immediate:!0})}catch{}try{await v.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}});try{f?.prepareForNewSession?.()}catch{}const _=((e,t,n,r)=>{const s=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of s)e.onScriptQueued(t);return r&&(e.onArchiveQueued("full"),e.onArchiveQueued("diff")),s})(f,i,s,Boolean(a.archive));D.markQueued(_);try{f?.flushNow?.()}catch{}const k=[];if(_.length>0){const e=await(async e=>{const{cwd:t,outAbs:n,outRel:r,config:s,toRun:i,mode:o,orderFile:a,ui:c,epoch:u,isActive:l,shouldContinue:f,supervisor:p,liveEnabled:d,hangWarn:h,hangKill:m,hangKillGrace:g}=e,y=[],b=Cw(t,n,0,s,i,o,a,{onStart:e=>{l(u)&&c.onScriptStart(e)},onEnd:(e,n,r,s,i,o)=>{if(l(u)&&(c.onScriptEnd(e,n,t,r,s,i,o),"error"===o||"number"==typeof i&&0!==i))try{process.exitCode=1}catch{}},silent:!0,onHangWarn:(e,t)=>{if(l(u)&&!d)try{console.log(`stan: ⏱ stalled "${e}" after ${t}s of inactivity`)}catch{}},onHangTimeout:(e,t)=>{if(l(u)&&!d)try{console.log(`stan: ⏱ timeout "${e}" after ${t}s; sending SIGTERM`)}catch{}},onHangKilled:(e,t)=>{if(l(u)&&!d)try{console.log(`stan: ◼ killed "${e}" after ${t}s grace`)}catch{}}},{hangWarn:h,hangKill:m,hangKillGrace:g},f,p).then(e=>{y.push(...e)});return await b.catch(()=>{}),y})({cwd:r,outAbs:h,outRel:m,config:s,toRun:_,mode:o,orderFile:g,ui:f,epoch:d,isActive:Ow,shouldContinue:()=>!D.isCancelled(),supervisor:v,liveEnabled:c,hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace});k.push(...e)}if(D.isCancelled()&&!D.isRestart()){try{f.stop()}catch{}c&&console.log("");try{await v.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}try{const e="win32"===process.platform?1600:400;await new Promise(t=>setTimeout(t,e))}catch{}return w(),{created:k,cancelled:!0,restartRequested:!1}}if(D.isRestart())return w(),{created:k,cancelled:!0,restartRequested:!0};if(a.archive){const e=await fw({cwd:r,config:s,behavior:a,ui:f,promptAbs:b,promptDisplay:y});if(e.cancelled)return w(),{created:k,cancelled:!0,restartRequested:!1};k.push(...e.created)}return ew.session.info("normal path: detach signals, returning to caller"),w(),{created:k,cancelled:!1,restartRequested:!1}};class $w{onCancel;onRestart;attached=!1;keyHandler;dataHandler;constructor(e){this.onCancel=e.onCancel,this.onRestart=e.onRestart}attach(){if(this.attached)return;this.attached=!0;const e=process.stdin,t=Boolean(process.stdout.isTTY),n=Boolean(e.isTTY);if(t&&n){try{D.emitKeypressEvents(e),e.setRawMode?.(!0),e.resume?.()}catch{}this.keyHandler=(e,t)=>{const n=((t??{}).name??"").toLowerCase();"q"!==n?"r"===n&&this.onRestart?.():this.onCancel()},this.dataHandler=e=>{try{if("string"==typeof e){const t=e.toLowerCase();return void(""===t||"q"===t?this.onCancel():"r"===t&&this.onRestart?.())}if(Buffer.isBuffer(e)){if(e.includes(3))return void this.onCancel();const t=e.toString("utf8").toLowerCase();"q"===t?this.onCancel():"r"===t&&this.onRestart?.()}}catch{}},e.on?.("keypress",this.keyHandler),e.on?.("data",this.dataHandler)}}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off?.bind(e)??e.removeListener?.bind(e);try{t&&this.keyHandler&&t("keypress",this.keyHandler),t&&this.dataHandler&&t("data",this.dataHandler)}catch{}try{e.setRawMode?.(!1),e.pause?.()}catch{}}}const Nw=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,Rw=e=>{const t={warn:0,waiting:0,running:0,quiet:0,stalled:0,ok:0,cancelled:0,fail:0,timeout:0};for(const{state:n}of e)"warn"===n.kind?t.warn+=1:"waiting"===n.kind?t.waiting+=1:"running"===n.kind?t.running+=1:"quiet"===n.kind?t.quiet+=1:"stalled"===n.kind?t.stalled+=1:"done"===n.kind?t.ok+=1:"timedout"===n.kind?t.timeout+=1:"cancelled"===n.kind?t.cancelled+=1:"error"!==n.kind&&"killed"!==n.kind||(t.fail+=1);return t};class Lw{rows=new Map;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}clearAll(){this.rows.clear()}update(e,t,n){const r=this.rows.get(e),s=n??r?.meta;if(!s){const n=Nw(e)??(e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:{type:"script",item:e.replace(/^script:/,"")||"(unnamed)"});return this.rows.set(e,{meta:n,state:t}),void this.emit(e,n,t)}this.rows.set(e,{meta:s,state:t}),this.emit(e,s,t)}emit(e,t,n){for(const r of this.listeners)try{r({key:e,meta:t,state:n})}catch{}}counts(){return Rw(Array.from(this.rows.values()).map(e=>({state:e.state})))}}const Fw="[",Iw=`${Fw}?25l`,Mw=`${Fw}?25h`,jw=`${Fw}K`,Bw=e=>e>0?`${Fw}${e}F`:"",zw=`${Fw}1E`,Hw=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(Iw)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=Bw(t));for(let e=0;e<n.length;e+=1){const s=n[e]??"";r+=0===t&&0===e&&""===s?"\n":`\r${jw}${s}\n`}const s=t-n.length;for(let e=0;e<s;e+=1)r+=`\r${jw}`,e<s-1&&(r+=zw);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=Bw(t));for(let e=0;e<t;e+=1)n+=`\r${jw}\n`;e.write(n),t=0}catch{}},done(){try{e.write(Mw)}catch{}}}},Kw=e=>{if(FD()){if("warn"===e)return"[WARN]";switch(e){case"waiting":return"[WAIT]";case"run":return"[RUN]";case"ok":return"[OK]";case"error":return"[FAIL]";case"cancelled":return"[CANCELLED]";case"timeout":return"[TIMEOUT]";case"quiet":return"[QUIET]";case"stalled":return"[STALLED]";case"killed":return"[KILLED]";default:return""}}switch(e){case"warn":return KD("⚠︎ warn");case"waiting":return HD("⏸︎ waiting");case"run":return jD("▶︎ run");case"ok":return ID("✔︎ ok");case"error":return BD("✖︎ fail");case"cancelled":return zD("◼︎ cancelled");case"timeout":return BD("⏱︎ timeout");case"quiet":return MD("⏱︎ quiet");case"stalled":return KD("⏱︎ stalled");case"killed":return BD("◼︎ killed");default:return""}};var qw,Uw,Zw,Gw,Ww={},Vw={},Jw={},Yw={},Qw={exports:{}};function Xw(){return Uw?qw:(Uw=1,qw=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})}function e_(){if(Gw)return Zw;Gw=1;const e=Xw();return Zw=t=>"string"==typeof t?t.replace(e(),""):t,Zw}var t_,n_,r_,s_,i_={exports:{}};function o_(){if(t_)return i_.exports;t_=1;const e=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));return i_.exports=e,i_.exports.default=e,i_.exports}function a_(){return r_?n_:(r_=1,n_=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g})}function c_(){if(s_)return Qw.exports;s_=1;const e=e_(),t=o_(),n=a_(),r=r=>{if("string"!=typeof r||0===r.length)return 0;if(0===(r=e(r)).length)return 0;r=r.replace(n()," ");let s=0;for(let e=0;e<r.length;e++){const n=r.codePointAt(e);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&e++,s+=t(n)?2:1))}return s};return Qw.exports=r,Qw.exports.default=r,Qw.exports}var u_,l_,f_={};var p_,d_,h_,m_,g_,y_,b_,v_,D_,w_,__,k_={exports:{}};function E_(){if(m_)return h_;m_=1;const e=d_?p_:(d_=1,p_={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};h_=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(t,n,r),i=Math.max(t,n,r),o=i-s;let a,c;i===s?a=0:t===i?a=(n-r)/o:n===i?a=2+(r-t)/o:r===i&&(a=4+(t-n)/o),a=Math.min(60*a,360),a<0&&(a+=360);const u=(s+i)/2;return c=i===s?0:u<=.5?o/(i+s):o/(2-i-s),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,s,i;const o=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(o,a,c),l=u-Math.min(o,a,c),f=function(e){return(u-e)/6/l+.5};return 0===l?(s=0,i=0):(i=l/u,t=f(o),n=f(a),r=f(c),o===u?s=r-n:a===u?s=1/3+t-r:c===u&&(s=2/3+n-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*i,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let s=e[2];const i=n.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[i,100*o,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(1-t,1-n,1-r);return[100*((1-t-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*((1-r-s)/(1-s)||0),100*s]},n.rgb.keyword=function(n){const s=t[n];if(s)return s;let i,o=1/0;for(const t of Object.keys(e)){const s=r(n,e[t]);s<o&&(o=s,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],s=t[1],i=t[2];r/=95.047,s/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*s-16,500*(r-s),200*(s-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let s,i,o;if(0===n)return o=255*r,[o,o,o];s=r<.5?r*(1+n):r+n-r*n;const a=2*r-s,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,o=6*i<1?a+6*(s-a)*i:2*i<1?s:3*i<2?a+(s-a)*(2/3-i)*6:a,c[e]=255*o;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,s=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,s*=i<=1?i:2-i;return[t,100*(0===r?2*s/(i+s):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const s=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*i),c=255*r*(1-n*(1-i));switch(r*=255,s){case 0:return[r,c,o];case 1:return[a,r,o];case 2:return[o,r,c];case 3:return[o,a,r];case 4:return[c,o,r];case 5:return[r,o,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,s=Math.max(r,.01);let i,o;o=(2-n)*r;const a=(2-n)*s;return i=n*s,i/=a<=1?a:2-a,i=i||0,o/=2,[t,100*i,100*o]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const s=n+r;let i;s>1&&(n/=s,r/=s);const o=Math.floor(6*t),a=1-r;i=6*t-o,1&o&&(i=1-i);const c=n+i*(a-n);let u,l,f;switch(o){default:case 6:case 0:u=a,l=c,f=n;break;case 1:u=c,l=a,f=n;break;case 2:u=n,l=a,f=c;break;case 3:u=n,l=c,f=a;break;case 4:u=c,l=n,f=a;break;case 5:u=a,l=n,f=c}return[255*u,255*l,255*f]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s)),255*(1-Math.min(1,r*(1-s)+s))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let s,i,o;return s=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[255*s,255*i,255*o]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const s=n**3,i=t**3,o=r**3;return n=s>.008856?s:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let s;s=360*Math.atan2(r,n)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(n*n+r*r),s]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,s,i]=e;let o=null===t?n.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return 2===o&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),o=s-i;let a,c;return a=o<1?i/(1-o):0,c=o<=0?0:s===t?(n-r)/o%6:s===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let s=0;return r<1&&(s=(n-.5*r)/(1-r)),[e[0],100*r,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const s=[0,0,0],i=t%1*6,o=i%1,a=1-o;let c=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-n)*r,[255*(n*s[0]+c),255*(n*s[1]+c),255*(n*s[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},h_}function S_(){if(y_)return g_;y_=1;const e=E_();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),s=Object.keys(e[t]);for(let e=s.length,i=0;i<e;i++){const e=s[i],o=n[e];-1===o.distance&&(o.distance=n[t].distance+1,o.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const s=[r[t].parent,t];let i=e[r[t].parent][t],o=r[t].parent;for(;r[o].parent;)s.unshift(r[o].parent),i=n(e[r[o].parent][o],i),o=r[o].parent;return i.conversion=s,i}return g_=function(e){const n=t(e),s={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(s[e]=r(e,n))}return s},g_}function A_(){if(v_)return b_;v_=1;const e=E_(),t=S_(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const s=t(r);Object.keys(s).forEach(e=>{const t=s[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),b_=n}function C_(){return D_||(D_=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},s=e=>e,i=(e,t,n)=>[e,t,n],o=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=A_());const s=r?10:0,i={};for(const[r,o]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?i[a]=e(n,s):"object"==typeof o&&(i[a]=e(o[t],s))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",o(a.color,"ansi",()=>c(t,"ansi16",s,!1)),o(a.color,"ansi256",()=>c(n,"ansi256",s,!1)),o(a.color,"ansi16m",()=>c(r,"rgb",i,!1)),o(a.bgColor,"ansi",()=>c(t,"ansi16",s,!0)),o(a.bgColor,"ansi256",()=>c(n,"ansi256",s,!0)),o(a.bgColor,"ansi16m",()=>c(r,"rgb",i,!0)),a}})}(k_)),k_.exports}function P_(){if(__)return w_;__=1;const e=o_(),t=function(){if(l_)return u_;l_=1;const e="[\ud800-\udbff][\udc00-\udfff]";return u_=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=C_(),r=["","›"],s=e=>`${r[0]}[${e}m`,i=(e,t,r)=>{let i=[];e=[...e];for(let r of e){const o=r;r.includes(";")&&(r=r.split(";")[0][0]+"0");const a=n.codes.get(Number.parseInt(r,10));if(a){const n=e.indexOf(a.toString());-1===n?i.push(s(t?a:o)):e.splice(n,1)}else{if(t){i.push(s(0));break}i.push(s(o))}}if(t&&(i=i.filter((e,t)=>i.indexOf(e)===t),void 0!==r)){const e=s(n.codes.get(Number.parseInt(r,10)));i=i.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return i.join("")};return w_=(n,s,o)=>{const a=[...n],c=[];let u,l="number"==typeof o?o:a.length,f=!1,p=0,d="";for(const[h,m]of a.entries()){let a=!1;if(r.includes(m)){const e=/\d[^m]*/.exec(n.slice(h,h+18));u=e&&e.length>0?e[0]:void 0,p<l&&(f=!0,void 0!==u&&c.push(u))}else f&&"m"===m&&(f=!1,a=!0);if(f||a||p++,!t({exact:!0}).test(m)&&e(m.codePointAt())&&(p++,"number"!=typeof o&&l++),p>s&&p<=l)d+=m;else if(p!==s||f||void 0===u){if(p>=l){d+=i(c,!0,u);break}}else d=i(c)}return d},w_}var O_,x_,T_,$_,N_={};function R_(){if(O_)return N_;O_=1,Object.defineProperty(N_,"__esModule",{value:!0}),N_.getBorderCharacters=void 0;return N_.getBorderCharacters=e=>{if("honeywell"===e)return{topBody:"═",topJoin:"╤",topLeft:"╔",topRight:"╗",bottomBody:"═",bottomJoin:"╧",bottomLeft:"╚",bottomRight:"╝",bodyLeft:"║",bodyRight:"║",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"╟",joinRight:"╢",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("norc"===e)return{topBody:"─",topJoin:"┬",topLeft:"┌",topRight:"┐",bottomBody:"─",bottomJoin:"┴",bottomLeft:"└",bottomRight:"┘",bodyLeft:"│",bodyRight:"│",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"├",joinRight:"┤",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("ramac"===e)return{topBody:"-",topJoin:"+",topLeft:"+",topRight:"+",bottomBody:"-",bottomJoin:"+",bottomLeft:"+",bottomRight:"+",bodyLeft:"|",bodyRight:"|",bodyJoin:"|",headerJoin:"+",joinBody:"-",joinLeft:"|",joinRight:"|",joinJoin:"|",joinMiddleDown:"+",joinMiddleUp:"+",joinMiddleLeft:"+",joinMiddleRight:"+"};if("void"===e)return{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",headerJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:"",joinMiddleDown:"",joinMiddleUp:"",joinMiddleLeft:"",joinMiddleRight:""};throw new Error('Unknown border template "'+e+'".')},N_}function L_(){if(x_)return f_;x_=1;var e=f_&&f_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(f_,"__esModule",{value:!0}),f_.isCellInRange=f_.areCellEqual=f_.calculateRangeCoordinate=f_.flatten=f_.extractTruncates=f_.sumArray=f_.sequence=f_.distributeUnevenly=f_.countSpaceSequence=f_.groupBySizes=f_.makeBorderConfig=f_.splitAnsi=f_.normalizeString=void 0;const t=e(P_()),n=e(c_()),r=e(e_()),s=R_();f_.normalizeString=e=>e.replace(/\r\n/g,"\n");f_.splitAnsi=e=>{const s=(0,r.default)(e).split("\n").map(n.default),i=[];let o=0;return s.forEach(n=>{i.push(0===n?"":(0,t.default)(e,o,o+n)),o+=n+1}),i};f_.makeBorderConfig=e=>({...(0,s.getBorderCharacters)("honeywell"),...e});f_.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};f_.countSpaceSequence=e=>{var t,n;return null!==(n=null===(t=e.match(/\s+/g))||void 0===t?void 0:t.length)&&void 0!==n?n:0};f_.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));f_.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);f_.sumArray=e=>e.reduce((e,t)=>e+t,0);f_.extractTruncates=e=>e.columns.map(({truncate:e})=>e);f_.flatten=e=>[].concat(...e);f_.calculateRangeCoordinate=e=>{const{row:t,col:n,colSpan:r=1,rowSpan:s=1}=e;return{bottomRight:{col:n+r-1,row:t+s-1},topLeft:{col:n,row:t}}};f_.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return f_.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,f_}function F_(){if(T_)return Yw;T_=1;var e=Yw&&Yw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yw,"__esModule",{value:!0}),Yw.alignString=void 0;const t=e(c_()),n=L_(),r=(e,t)=>e+" ".repeat(t);return Yw.alignString=(e,s,i)=>{const o=(0,t.default)(e);if(o===s)return e;if(o>s)throw new Error("Subject parameter value width cannot be greater than the container width.");if(0===o)return" ".repeat(s);const a=s-o;return"left"===i?r(e,a):"right"===i?((e,t)=>" ".repeat(t)+e)(e,a):"justify"===i?((e,t)=>{const s=(0,n.countSpaceSequence)(e);if(0===s)return r(e,t);const i=(0,n.distributeUnevenly)(t,s);if(Math.max(...i)>3)return r(e,t);let o=0;return e.replace(/\s+/g,e=>e+" ".repeat(i[o++]))})(e,a):((e,t)=>" ".repeat(Math.floor(t/2))+e+" ".repeat(Math.ceil(t/2)))(e,a)},Yw}function I_(){if($_)return Jw;$_=1,Object.defineProperty(Jw,"__esModule",{value:!0}),Jw.alignTableData=void 0;const e=F_();return Jw.alignTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var i;const{width:o,alignment:a}=n.columns[s];return(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:s,row:r},{mapped:!0}))?t:(0,e.alignString)(t,o,a)})),Jw}var M_,j_={},B_={},z_={},H_={};function K_(){if(M_)return H_;M_=1;var e=H_&&H_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(H_,"__esModule",{value:!0}),H_.wrapString=void 0;const t=e(P_()),n=e(c_());return H_.wrapString=(e,r)=>{let s=e;const i=[];do{i.push((0,t.default)(s,0,r)),s=(0,t.default)(s,r).trim()}while((0,n.default)(s));return i},H_}var q_,U_,Z_,G_,W_={};function V_(){if(q_)return W_;q_=1;var e=W_&&W_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(W_,"__esModule",{value:!0}),W_.wrapWord=void 0;const t=e(P_()),n=e(e_());return W_.wrapWord=(e,r)=>{const s=[];let i=0;return((e,t)=>{let r=(0,n.default)(e);const s=[],i=new RegExp("(^.{1,"+String(Math.max(t,1))+"}(\\s+|$))|(^.{1,"+String(Math.max(t-1,1))+"}(\\\\|/|_|\\.|,|;|-))");do{let e;const n=i.exec(r);if(n){e=n[0],r=r.slice(e.length);const t=e.trim().length,i=e.length-t;s.push([t,i])}else e=r.slice(0,t),r=r.slice(t),s.push([e.length,0])}while(r.length);return s})(e,r).forEach(([n,r])=>{s.push((0,t.default)(e,i,i+n)),i+=n+r}),s},W_}function J_(){if(U_)return z_;U_=1,Object.defineProperty(z_,"__esModule",{value:!0}),z_.wrapCell=void 0;const e=L_(),t=K_(),n=V_();return z_.wrapCell=(r,s,i)=>{const o=(0,e.splitAnsi)(r);for(let e=0;e<o.length;){let r;r=i?(0,n.wrapWord)(o[e],s):(0,t.wrapString)(o[e],s),o.splice(e,1,...r),e+=r.length}return o},z_}function Y_(){if(Z_)return B_;Z_=1,Object.defineProperty(B_,"__esModule",{value:!0}),B_.calculateCellHeight=void 0;const e=J_();return B_.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,B_}function Q_(){if(G_)return j_;G_=1,Object.defineProperty(j_,"__esModule",{value:!0}),j_.calculateRowHeights=void 0;const e=Y_(),t=L_();return j_.calculateRowHeights=(n,r)=>{const s=[];for(const[i,o]of n.entries()){let a=1;o.forEach((o,c)=>{var u;const l=null===(u=r.spanningCellManager)||void 0===u?void 0:u.getContainingRange({col:c,row:i});if(!l){const t=(0,e.calculateCellHeight)(o,r.columns[c].width,r.columns[c].wrapWord);return void(a=Math.max(a,t))}const{topLeft:f,bottomRight:p,height:d}=l;if(i===p.row){const e=(0,t.sumArray)(s.slice(f.row)),i=p.row-f.row,o=(0,t.sequence)(f.row+1,p.row).filter(e=>{var t;return!(null===(t=r.drawHorizontalLine)||void 0===t?void 0:t.call(r,e,n.length))}).length,c=d-e-i+o;a=Math.max(a,c)}}),s.push(a)}return s},j_}var X_,ek,tk={},nk={};function rk(){if(X_)return nk;X_=1,Object.defineProperty(nk,"__esModule",{value:!0}),nk.drawContent=void 0;return nk.drawContent=e=>{const{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:s,rowIndex:i,elementType:o}=e,a=t.length,c=[];return r(0,a)&&c.push(n(0,a)),t.forEach((e,t)=>{if(o&&"border"!==o&&"row"!==o||c.push(e),"cell"===o&&void 0===i&&c.push(e),"cell"===o&&void 0!==i){const n=null==s?void 0:s.getContainingRange({col:t,row:i});n&&t!==n.topLeft.col||c.push(e)}if(t+1<a&&r(t+1,a)){const e=n(t+1,a);if("cell"===o&&void 0!==i){const n={col:t+1,row:i},r=null==s?void 0:s.getContainingRange(n);r&&r.topLeft.col!==n.col||c.push(e)}else c.push(e)}}),r(a,a)&&c.push(n(a,a)),c.join("")},nk}function sk(){return ek||(ek=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;const t=rk();e.drawBorderSegments=(e,t)=>{const{separator:n,horizontalBorderIndex:r,spanningCellManager:s}=t;return e.map((e,t)=>{const i=n.body.repeat(e);if(void 0===r)return i;const o=null==s?void 0:s.getContainingRange({col:t,row:r});if(!o)return i;const{topLeft:a}=o;return r===a.row?i:t!==a.col?"":o.extractBorderContent(r)})};e.createSeparatorGetter=e=>{const{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:s}=e;return(e,i)=>{const o=null==n?void 0:n.inSameRange;if(void 0!==r&&o){const n={col:e,row:r-1},a={col:e-1,row:r},c={col:e-1,row:r-1},u={col:e,row:r},l=[[c,n],[n,u],[u,a],[a,c]];if(0===e)return o(u,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===i)return o(c,a)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(0===r)return o(u,a)?t.body:t.join;if(r===s)return o(n,c)?t.body:t.join;const f=l.map(e=>o(...e)).filter(Boolean).length;if(0===f)return t.join;if(4===f)return"";if(2===f)return o(...l[1])&&o(...l[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(1===f){if(!(t.joinRight&&t.joinLeft&&t.joinUp&&t.joinDown))throw new Error(`Can not get border separator for position [${r}, ${e}]`);return o(...l[0])?t.joinDown:o(...l[1])?t.joinLeft:o(...l[2])?t.joinUp:t.joinRight}throw new Error("Invalid case")}return 0===e?t.left:e===i?t.right:t.join}};e.drawBorder=(n,r)=>{const s=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:i,horizontalBorderIndex:o,spanningCellManager:a}=r;return(0,t.drawContent)({contents:s,drawSeparator:i,elementType:"border",rowIndex:o,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:a})+"\n"};e.drawBorderTop=(t,n)=>{const{border:r}=n,s=(0,e.drawBorder)(t,{...n,separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}});return"\n"===s?"":s};e.drawBorderJoin=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};e.drawBorderBottom=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};e.createTableBorderGetter=(t,n)=>(r,s)=>{const i={...n,horizontalBorderIndex:r};return 0===r?(0,e.drawBorderTop)(t,i):r===s?(0,e.drawBorderBottom)(t,i):(0,e.drawBorderJoin)(t,i)}}(tk)),tk}var ik,ok={};function ak(){if(ik)return ok;ik=1,Object.defineProperty(ok,"__esModule",{value:!0}),ok.drawRow=void 0;const e=rk();return ok.drawRow=(t,n)=>{const{border:r,drawVerticalLine:s,rowIndex:i,spanningCellManager:o}=n;return(0,e.drawContent)({contents:t,drawSeparator:s,elementType:"cell",rowIndex:i,separatorGetter:(e,t)=>0===e?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:o})+"\n"},ok}var ck,uk,lk,fk,pk,dk,hk={},mk={},gk={},yk={};function bk(){if(lk)return yk;lk=1,Object.defineProperty(yk,"__esModule",{value:!0});const e=(uk||(uk=1,ck=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(s=r;0!==s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=r;0!==s--;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;0!==s--;){var o=i[s];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}),ck);return e.code='require("ajv/dist/runtime/equal").default',yk.default=e,yk}function vk(){return fk||(fk=1,function(e){e["config.json"]=function e(n,{instancePath:s="",parentData:o,parentDataProperty:c,rootData:u=n}={}){let l=null,f=0;if(n&&"object"==typeof n&&!Array.isArray(n)){for(const e in n)if("border"!==e&&"header"!==e&&"columns"!==e&&"columnDefault"!==e&&"drawVerticalLine"!==e&&"drawHorizontalLine"!==e&&"singleLine"!==e&&"spanningCells"!==e){const t={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.border&&(i(n.border,{instancePath:s+"/border",parentData:n,parentDataProperty:"border",rootData:u})||(l=null===l?i.errors:l.concat(i.errors),f=l.length)),void 0!==n.header){let e=n.header;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.content){const e={instancePath:s+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};null===l?l=[e]:l.push(e),f++}for(const t in e)if("content"!==t&&"alignment"!==t&&"wrapWord"!==t&&"truncate"!==t&&"paddingLeft"!==t&&"paddingRight"!==t){const e={instancePath:s+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:t},message:"must NOT have additional properties"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.content&&"string"!=typeof e.content){const e={instancePath:s+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.alignment&&(a(e.alignment,{instancePath:s+"/header/alignment",parentData:e,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:s+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.truncate){let t=e.truncate;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingLeft){let t=e.paddingLeft;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingRight){let t=e.paddingRight;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.columns&&(d(n.columns,{instancePath:s+"/columns",parentData:n,parentDataProperty:"columns",rootData:u})||(l=null===l?d.errors:l.concat(d.errors),f=l.length)),void 0!==n.columnDefault&&(h(n.columnDefault,{instancePath:s+"/columnDefault",parentData:n,parentDataProperty:"columnDefault",rootData:u})||(l=null===l?h.errors:l.concat(h.errors),f=l.length)),void 0!==n.drawVerticalLine&&"function"!=typeof n.drawVerticalLine){const e={instancePath:s+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.drawHorizontalLine&&"function"!=typeof n.drawHorizontalLine){const e={instancePath:s+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.singleLine&&"boolean"!=typeof n.singleLine){const e={instancePath:s+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.spanningCells){let e=n.spanningCells;if(Array.isArray(e)){const n=e.length;for(let i=0;i<n;i++){let n=e[i];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.row){const e={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};null===l?l=[e]:l.push(e),f++}if(void 0===n.col){const e={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};null===l?l=[e]:l.push(e),f++}for(const e in n)if(!r.call(t.properties.spanningCells.items.properties,e)){const t={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.col){let e=n.col;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.row){let e=n.row;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.colSpan){let e=n.colSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.rowSpan){let e=n.rowSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.alignment&&(a(n.alignment,{instancePath:s+"/spanningCells/"+i+"/alignment",parentData:n,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==n.verticalAlignment&&(m(n.verticalAlignment,{instancePath:s+"/spanningCells/"+i+"/verticalAlignment",parentData:n,parentDataProperty:"verticalAlignment",rootData:u})||(l=null===l?m.errors:l.concat(m.errors),f=l.length)),void 0!==n.wrapWord&&"boolean"!=typeof n.wrapWord){const e={instancePath:s+"/spanningCells/"+i+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==n.truncate){let e=n.truncate;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingLeft){let e=n.paddingLeft;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingRight){let e=n.paddingRight;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}return e.errors=l,0===f};const t={properties:{spanningCells:{items:{properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}}}}}},n={properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}}},r=Object.prototype.hasOwnProperty;function s(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let o=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),a++}return s.errors=o,0===a}function i(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:c=e}={}){let u=null,l=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===u?u=[e]:u.push(e),l++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===u?u=[e]:u.push(e),l++}return i.errors=u,0===l}const o={enum:["left","right","center","justify"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,c=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),c++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:o.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),c++}return a.errors=i,0===c}bk().default;const c=new RegExp("^[0-9]+$","u");function u(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),a++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:o.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),a++}return u.errors=i,0===a}const l={enum:["top","middle","bottom"]};function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),o++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),o++}return f.errors=i,0===o}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(i=null===i?u.errors:i.concat(u.errors),o=i.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(i=null===i?f.errors:i.concat(f.errors),o=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}return p.errors=i,0===o}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;const a=o;let u=!1,l=null;const f=o;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}(m=f===o)&&(u=!0,l=0);const h=o;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),o++}var m;if((m=h===o)&&u?(u=!1,l=[l,1]):m&&(u=!0,l=1),u)o=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),o++}return d.errors=i,0===o}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(i=null===i?u.errors:i.concat(u.errors),o=i.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(i=null===i?f.errors:i.concat(f.errors),o=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}return h.errors=i,0===o}function m(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),o++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),o++}return m.errors=i,0===o}function g(e,{instancePath:t="",parentData:i,parentDataProperty:o,rootData:a=e}={}){let c=null,u=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===c?c=[e]:c.push(e),u++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===c?c=[e]:c.push(e),u++}return g.errors=c,0===u}function y(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;const a=o;let u=!1,l=null;const f=o;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}(h=f===o)&&(u=!0,l=0);const d=o;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),o++}var h;if((h=d===o)&&u?(u=!1,l=[l,1]):h&&(u=!0,l=1),u)o=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),o++}return y.errors=i,0===o}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(i=null===i?u.errors:i.concat(u.errors),o=i.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(i=null===i?f.errors:i.concat(f.errors),o=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}return b.errors=i,0===o}e["streamConfig.json"]=function e(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:i=t}={}){let o=null,a=0;if(t&&"object"==typeof t&&!Array.isArray(t)){if(void 0===t.columnDefault){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};null===o?o=[e]:o.push(e),a++}if(void 0===t.columnCount){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};null===o?o=[e]:o.push(e),a++}for(const e in t)if("border"!==e&&"columns"!==e&&"columnDefault"!==e&&"columnCount"!==e&&"drawVerticalLine"!==e){const t={instancePath:n,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===o?o=[t]:o.push(t),a++}if(void 0!==t.border&&(g(t.border,{instancePath:n+"/border",parentData:t,parentDataProperty:"border",rootData:i})||(o=null===o?g.errors:o.concat(g.errors),a=o.length)),void 0!==t.columns&&(y(t.columns,{instancePath:n+"/columns",parentData:t,parentDataProperty:"columns",rootData:i})||(o=null===o?y.errors:o.concat(y.errors),a=o.length)),void 0!==t.columnDefault&&(b(t.columnDefault,{instancePath:n+"/columnDefault",parentData:t,parentDataProperty:"columnDefault",rootData:i})||(o=null===o?b.errors:o.concat(b.errors),a=o.length)),void 0!==t.columnCount){let e=t.columnCount;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),a++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),a++}}if(void 0!==t.drawVerticalLine&&"function"!=typeof t.drawVerticalLine){const e={instancePath:n+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===o?o=[e]:o.push(e),a++}}else{const e={instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),a++}return e.errors=o,0===a}}(gk)),gk}function Dk(){if(pk)return mk;pk=1;var e=mk&&mk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mk,"__esModule",{value:!0}),mk.validateConfig=void 0;const t=e(vk());return mk.validateConfig=(e,n)=>{const r=t.default[e];if(!r(n)&&r.errors){const e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log("config",n),console.log("errors",e),new Error("Invalid config.")}},mk}function wk(){if(dk)return hk;dk=1,Object.defineProperty(hk,"__esModule",{value:!0}),hk.makeStreamConfig=void 0;const e=L_(),t=Dk(),n=(e,t={},n)=>Array.from({length:e}).map((e,r)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...n,...t[r]}));return hk.makeStreamConfig=r=>{if((0,t.validateConfig)("streamConfig.json",r),void 0===r.columnDefault.width)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...r,border:(0,e.makeBorderConfig)(r.border),columns:n(r.columnCount,r.columns,r.columnDefault)}},hk}var _k,kk={};function Ek(){return _k||(_k=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=L_(),n=J_(),r=e=>new Array(e).fill("");e.padCellVertically=(e,t,n)=>{const s=t-e.length;return"top"===n?[...e,...r(s)]:"bottom"===n?[...r(s),...e]:[...r(Math.floor(s/2)),...e,...r(Math.ceil(s/2))]};e.mapDataUsingRowHeights=(r,s,i)=>{const o=r[0].length,a=r.map((t,r)=>{const a=s[r],c=Array.from({length:a},()=>new Array(o).fill(""));return t.forEach((t,s)=>{var o;const u=null===(o=i.spanningCellManager)||void 0===o?void 0:o.getContainingRange({col:s,row:r});if(u)return void u.extractCellContent(r).forEach((e,t)=>{c[t][s]=e});const l=(0,n.wrapCell)(t,i.columns[s].width,i.columns[s].wrapWord);(0,e.padCellVertically)(l,a,i.columns[s].verticalAlignment).forEach((e,t)=>{c[t][s]=e})}),c});return(0,t.flatten)(a)}}(kk)),kk}var Sk,Ak={};function Ck(){return Sk||(Sk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padTableData=e.padString=void 0;e.padString=(e,t,n)=>" ".repeat(t)+e+" ".repeat(n);e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var i;if(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:s,row:r},{mapped:!0}))return t;const{paddingLeft:o,paddingRight:a}=n.columns[s];return(0,e.padString)(t,o,a)}))}(Ak)),Ak}var Pk,Ok={};function xk(){if(Pk)return Ok;Pk=1,Object.defineProperty(Ok,"__esModule",{value:!0}),Ok.stringifyTableData=void 0;const e=L_();return Ok.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),Ok}var Tk,$k,Nk,Rk={},Lk={exports:{}};function Fk(){return Tk||(Tk=1,function(e,t){var n,r=1/0,s=NaN,i=/^\s+|\s+$/g,o=/\w*$/,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l="\\ud800-\\udfff",f="\\u0300-\\u036f\\ufe20-\\ufe23",p="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",h="["+l+"]",m="["+f+p+"]",g="\\ud83c[\\udffb-\\udfff]",y="[^"+l+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",D="\\u200d",w="(?:"+m+"|"+g+")"+"?",_="["+d+"]?",k=_+w+("(?:"+D+"(?:"+[y,b,v].join("|")+")"+_+w+")*"),E="(?:"+[y+m+"?",m,b,v,h].join("|")+")",S=RegExp(g+"(?="+g+")|"+E+k,"g"),A=RegExp("["+D+l+f+p+d+"]"),C=parseInt,P="object"==typeof yf&&yf&&yf.Object===Object&&yf,O="object"==typeof self&&self&&self.Object===Object&&self,x=P||O||Function("return this")(),T=t&&!t.nodeType&&t,$=T&&e&&!e.nodeType&&e,N=$&&$.exports===T&&P.process,R=function(){try{return N&&N.binding("util")}catch(e){}}(),L=R&&R.isRegExp,F=(n="length",function(e){return null==e?void 0:e[n]});function I(e){return A.test(e)}function M(e){return I(e)?function(e){var t=S.lastIndex=0;for(;S.test(e);)t++;return t}(e):F(e)}function j(e){return I(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var B=Object.prototype.toString,z=x.Symbol,H=z?z.prototype:void 0,K=H?H.toString:void 0;function q(e){if("string"==typeof e)return e;if(V(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function U(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(s);++r<s;)i[r]=e[r+t];return i}(e,t,n)}function Z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var G,W=L?(G=L,function(e){return G(e)}):function(e){return Z(e)&&"[object RegExp]"==B.call(e)};function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==B.call(e)}function J(e){return e?(e=function(e){if("number"==typeof e)return e;if(V(e))return s;if(Z(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Z(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=c.test(e);return n||u.test(e)?C(e.slice(2),n?2:8):a.test(e)?s:+e}(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Y(e){return null==e?"":q(e)}e.exports=function(e,t){var n=30,r="...";if(Z(t)){var s="separator"in t?t.separator:s;n="length"in t?function(e){var t=J(e),n=t%1;return t==t?n?t-n:t:0}(t.length):n,r="omission"in t?q(t.omission):r}var i=(e=Y(e)).length;if(I(e)){var a=j(e);i=a.length}if(n>=i)return e;var c=n-M(r);if(c<1)return r;var u=a?U(a,0,c).join(""):e.slice(0,c);if(void 0===s)return u+r;if(a&&(c+=u.length-c),W(s)){if(e.slice(c).search(s)){var l,f=u;for(s.global||(s=RegExp(s.source,Y(o.exec(s))+"g")),s.lastIndex=0;l=s.exec(f);)var p=l.index;u=u.slice(0,void 0===p?c:p)}}else if(e.indexOf(q(s),c)!=c){var d=u.lastIndexOf(s);d>-1&&(u=u.slice(0,d))}return u+r}}(Lk,Lk.exports)),Lk.exports}function Ik(){return $k||($k=1,function(e){var t=Rk&&Rk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.truncateTableData=e.truncateString=void 0;const n=t(Fk());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:"…"});e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))}(Rk)),Rk}function Mk(){if(Nk)return Vw;Nk=1,Object.defineProperty(Vw,"__esModule",{value:!0}),Vw.createStream=void 0;const e=I_(),t=Q_(),n=sk(),r=ak(),s=wk(),i=Ek(),o=Ck(),a=xk(),c=Ik(),u=L_(),l=(n,r)=>{let s=(0,a.stringifyTableData)(n);s=(0,c.truncateTableData)(s,(0,u.extractTruncates)(r));const l=(0,t.calculateRowHeights)(s,r);return s=(0,i.mapDataUsingRowHeights)(s,l,r),s=(0,e.alignTableData)(s,r),s=(0,o.padTableData)(s,r),s};return Vw.createStream=e=>{const t=(0,s.makeStreamConfig)(e),i=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight);let o=!0;return{write:e=>{if(e.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");o?(o=!1,((e,t,s)=>{const i=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let o;o="",o+=(0,n.drawBorderTop)(t,s),o+=i,o+=(0,n.drawBorderBottom)(t,s),o=o.trimEnd(),process.stdout.write(o)})(e,i,t)):((e,t,s)=>{const i=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let o="";const a=(0,n.drawBorderBottom)(t,s);"\n"!==a&&(o="\r"),o+=(0,n.drawBorderJoin)(t,s),o+=i,o+=a,o=o.trimEnd(),process.stdout.write(o)})(e,i,t)}}},Vw}var jk,Bk={},zk={};function Hk(){if(jk)return zk;jk=1,Object.defineProperty(zk,"__esModule",{value:!0}),zk.calculateOutputColumnWidths=void 0;return zk.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),zk}var Kk,qk={};function Uk(){if(Kk)return qk;Kk=1,Object.defineProperty(qk,"__esModule",{value:!0}),qk.drawTable=void 0;const e=sk(),t=rk(),n=ak(),r=L_();return qk.drawTable=(s,i,o,a)=>{const{drawHorizontalLine:c,singleLine:u}=a,l=(0,r.groupBySizes)(s,o).map((e,t)=>e.map(e=>(0,n.drawRow)(e,{...a,rowIndex:t})).join(""));return(0,t.drawContent)({contents:l,drawSeparator:(e,t)=>(0===e||e===t||!u)&&c(e,t),elementType:"row",rowIndex:-1,separatorGetter:(0,e.createTableBorderGetter)(i,{...a,rowCount:l.length}),spanningCellManager:a.spanningCellManager})},qk}var Zk,Gk={};function Wk(){if(Zk)return Gk;Zk=1,Object.defineProperty(Gk,"__esModule",{value:!0}),Gk.injectHeaderConfig=void 0;return Gk.injectHeaderConfig=(e,t)=>{var n;let r=null!==(n=t.spanningCells)&&void 0!==n?n:[];const s=t.header,i=[...e];if(s){r=r.map(({row:e,...t})=>({...t,row:e+1}));const{content:t,...n}=s;r.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...n}),i.unshift([t,...Array.from({length:e[0].length-1}).fill("")])}return[i,r]},Gk}var Vk,Jk={},Yk={};function Qk(){return Vk||(Vk=1,function(e){var t=Yk&&Yk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;const n=t(c_()),r=L_();e.calculateMaximumCellWidth=e=>Math.max(...e.split("\n").map(n.default));e.calculateMaximumColumnWidths=(t,n=[])=>{const s=new Array(t[0].length).fill(0),i=n.map(r.calculateRangeCoordinate);return t.forEach((t,n)=>{t.forEach((t,o)=>{((e,t)=>i.some(n=>(0,r.isCellInRange)({col:t,row:e},n)))(n,o)||(s[o]=Math.max(s[o],(0,e.calculateMaximumCellWidth)(t)))})}),s}}(Yk)),Yk}var Xk,eE={},tE={};function nE(){if(Xk)return tE;Xk=1;var e=tE&&tE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tE,"__esModule",{value:!0}),tE.alignVerticalRangeContent=tE.wrapRangeContent=void 0;const t=e(c_()),n=F_(),r=Ek(),s=Ck(),i=Ik(),o=L_(),a=J_();tE.wrapRangeContent=(e,t,r)=>{const{topLeft:o,paddingRight:c,paddingLeft:u,truncate:l,wrapWord:f,alignment:p}=e,d=r.rows[o.row][o.col],h=t-u-c;return(0,a.wrapCell)((0,i.truncateString)(d,l),h,f).map(e=>{const t=(0,n.alignString)(e,h,p);return(0,s.padString)(t,u,c)})};return tE.alignVerticalRangeContent=(e,n,s)=>{const{rows:i,drawHorizontalLine:a,rowHeights:c}=s,{topLeft:u,bottomRight:l,verticalAlignment:f}=e;if(0===c.length)return[];const p=(0,o.sumArray)(c.slice(u.row,l.row+1))+(l.row-u.row)-(0,o.sequence)(u.row+1,l.row).filter(e=>!a(e,i.length)).length;return(0,r.padCellVertically)(n,p,f).map(e=>0===e.length?" ".repeat((0,t.default)(n[0])):e)},tE}var rE,sE={};function iE(){if(rE)return sE;rE=1,Object.defineProperty(sE,"__esModule",{value:!0}),sE.calculateSpanningCellWidth=void 0;const e=L_();return sE.calculateSpanningCellWidth=(t,n)=>{const{columnsConfig:r,drawVerticalLine:s}=n,{topLeft:i,bottomRight:o}=t;return(0,e.sumArray)(r.slice(i.col,o.col+1).map(({width:e})=>e))+(i.col===o.col?r[i.col].paddingRight+r[o.col].paddingLeft:(0,e.sumArray)(r.slice(i.col,o.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)))+(o.col-i.col)-(0,e.sequence)(i.col+1,o.col).filter(e=>!s(e,r.length)).length},sE}var oE,aE,cE={};function uE(){if(oE)return cE;oE=1,Object.defineProperty(cE,"__esModule",{value:!0}),cE.makeRangeConfig=void 0;const e=L_();return cE.makeRangeConfig=(t,n)=>{var r;const{topLeft:s,bottomRight:i}=(0,e.calculateRangeCoordinate)(t);return{...{...n[s.col],...t,paddingRight:null!==(r=t.paddingRight)&&void 0!==r?r:n[i.col].paddingRight},bottomRight:i,topLeft:s}},cE}function lE(){if(aE)return eE;aE=1,Object.defineProperty(eE,"__esModule",{value:!0}),eE.createSpanningCellManager=void 0;const e=nE(),t=iE(),n=uE(),r=L_(),s=(e,t)=>t.find(t=>(0,r.isCellInRange)(e,t)),i=(n,s)=>{const i=(0,t.calculateSpanningCellWidth)(n,s),o=(0,e.wrapRangeContent)(n,i,s),a=(0,e.alignVerticalRangeContent)(n,o,s);return{...n,extractBorderContent:e=>{const{topLeft:t}=n,i=(0,r.sumArray)(s.rowHeights.slice(t.row,e))+(e-t.row-1);return a[i]},extractCellContent:e=>{const{topLeft:t}=n,{drawHorizontalLine:i,rowHeights:o}=s,c=e-t.row,u=(0,r.sequence)(t.row+1,e).filter(e=>!(null==i?void 0:i(e,o.length))).length,l=(0,r.sumArray)(o.slice(t.row,e))+c-u;return a.slice(l,l+o[e])},height:o.length,width:i}};return eE.createSpanningCellManager=e=>{const{spanningCellConfigs:t,columnsConfig:o}=e,a=t.map(e=>(0,n.makeRangeConfig)(e,o)),c={};let u=[],l=[];return{getContainingRange:(t,n)=>{var r;const o=(null==n?void 0:n.mapped)?l[t.row]:t.row,f=s({...t,row:o},a);if(!f)return;if(0===u.length)return i(f,{...e,rowHeights:u});const p=(e=>{const{row:t,col:n}=e.topLeft;return`${t}/${n}`})(f);return null!==(r=c[p])&&void 0!==r||(c[p]=i(f,{...e,rowHeights:u})),c[p]},inSameRange:(e,t)=>((e,t,n)=>{const i=s(e,n),o=s(t,n);return!(!i||!o)&&(0,r.areCellEqual)(i.topLeft,o.topLeft)})(e,t,a),rowHeights:u,rowIndexMapping:l,setRowHeights:e=>{u=e},setRowIndexMapping:e=>{l=(0,r.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}},eE}var fE,pE,dE={};function hE(){if(fE)return dE;fE=1,Object.defineProperty(dE,"__esModule",{value:!0}),dE.validateSpanningCellConfig=void 0;const e=L_(),t=(e,t,n)=>e<=n&&n<=t;return dE.validateSpanningCellConfig=(n,r)=>{const[s,i]=[n.length,n[0].length];r.forEach((e,t)=>{const{colSpan:n,rowSpan:r}=e;if(void 0===n&&void 0===r)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(void 0!==n&&n<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(void 0!==r&&r<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});const o=r.map(e.calculateRangeCoordinate);o.forEach(({topLeft:e,bottomRight:n},r)=>{if(!(t(0,i-1,e.col)&&t(0,s-1,e.row)&&t(0,i-1,n.col)&&t(0,s-1,n.row)))throw new Error(`Some cells in config.spanningCells[${r}] are out of the table`)});const a=Array.from({length:s},()=>Array.from({length:i}));o.forEach(({topLeft:t,bottomRight:n},r)=>{(0,e.sequence)(t.row,n.row).forEach(s=>{(0,e.sequence)(t.col,n.col).forEach(e=>{if(void 0!==a[s][e])throw new Error(`Spanning cells in config.spanningCells[${a[s][e]}] and config.spanningCells[${r}] are overlap each other`);a[s][e]=r})})})},dE}function mE(){if(pE)return Jk;pE=1,Object.defineProperty(Jk,"__esModule",{value:!0}),Jk.makeTableConfig=void 0;const e=Qk(),t=lE(),n=L_(),r=Dk(),s=hE();return Jk.makeTableConfig=(i,o={},a)=>{var c,u,l,f,p;(0,r.validateConfig)("config.json",o),(0,s.validateSpanningCellConfig)(i,null!==(c=o.spanningCells)&&void 0!==c?c:[]);const d=null!==(u=null!=a?a:o.spanningCells)&&void 0!==u?u:[],h=((t,n,r,s)=>{const i=(0,e.calculateMaximumColumnWidths)(t,s);return t[0].map((e,t)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:i[t],wrapWord:!1,...r,...null==n?void 0:n[t]}))})(i,o.columns,o.columnDefault,d),m=null!==(l=o.drawVerticalLine)&&void 0!==l?l:()=>!0,g=null!==(f=o.drawHorizontalLine)&&void 0!==f?f:()=>!0;return{...o,border:(0,n.makeBorderConfig)(o.border),columns:h,drawHorizontalLine:g,drawVerticalLine:m,singleLine:null!==(p=o.singleLine)&&void 0!==p&&p,spanningCellManager:(0,t.createSpanningCellManager)({columnsConfig:h,drawHorizontalLine:g,drawVerticalLine:m,rows:i,spanningCellConfigs:d})}},Jk}var gE,yE,bE={};function vE(){if(gE)return bE;gE=1,Object.defineProperty(bE,"__esModule",{value:!0}),bE.validateTableData=void 0;const e=L_();return bE.validateTableData=t=>{if(!Array.isArray(t))throw new TypeError("Table data must be an array.");if(0===t.length)throw new Error("Table must define at least one row.");if(0===t[0].length)throw new Error("Table must define at least one column.");const n=t[0].length;for(const r of t){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==n)throw new Error("Table must have a consistent number of cells.");for(const t of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,e.normalizeString)(String(t))))throw new Error("Table data must not contain control characters.")}},bE}function DE(){if(yE)return Bk;yE=1,Object.defineProperty(Bk,"__esModule",{value:!0}),Bk.table=void 0;const e=I_(),t=Hk(),n=Q_(),r=Uk(),s=Wk(),i=mE(),o=Ek(),a=Ck(),c=xk(),u=Ik(),l=L_(),f=vE();return Bk.table=(p,d={})=>{(0,f.validateTableData)(p);let h=(0,c.stringifyTableData)(p);const[m,g]=(0,s.injectHeaderConfig)(h,d),y=(0,i.makeTableConfig)(m,d,g);h=(0,u.truncateTableData)(m,(0,l.extractTruncates)(y));const b=(0,n.calculateRowHeights)(h,y);y.spanningCellManager.setRowHeights(b),y.spanningCellManager.setRowIndexMapping(b),h=(0,o.mapDataUsingRowHeights)(h,b,y),h=(0,e.alignTableData)(h,y),h=(0,a.padTableData)(h,y);const v=(0,t.calculateOutputColumnWidths)(y);return(0,r.drawTable)(h,v,b,y)},Bk}var wE,_E,kE={};function EE(){return wE||(wE=1,Object.defineProperty(kE,"__esModule",{value:!0})),kE}function SE(){return _E||(_E=1,function(e){var t=Ww&&Ww.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Ww&&Ww.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;const r=Mk();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const s=R_();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return s.getBorderCharacters}});const i=DE();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return i.table}}),n(EE(),e)}(Ww)),Ww}var AE=SE();const CE=e=>e.toString().padStart(2,"0"),PE=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${CE(n)}:${CE(r)}`},OE=e=>{const{rows:t,startedAt:n,boring:r,uiId:s,includeHint:i}=e,o=["Type","Item","Status","Time","Output"].map(e=>qD(e)),a=[];if(a.push(o),0===t.length){const e=PE(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state;let n="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:Date.now();n=PE(Math.max(0,Date.now()-e))}else"number"==typeof t.durationMs&&(n=PE(Math.max(0,t.durationMs)));const r="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?t.outputPath??"":"",s="warn"===t.kind?"warn":"waiting"===t.kind?"waiting":"running"===t.kind?"run":"quiet"===t.kind?"quiet":"stalled"===t.kind?"stalled":"done"===t.kind?"ok":"error"===t.kind?"error":"timedout"===t.kind?"timeout":"cancelled"===t.kind?"cancelled":"killed";a.push([e.type,e.item,Kw(s),n,r??""])}const c=(e=>AE.table(e,{columnDefault:{paddingLeft:0,paddingRight:2},border:{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:""},drawHorizontalLine:()=>!1,columns:{0:{alignment:"left"},1:{alignment:"left"},2:{alignment:"left"},3:{alignment:"left"},4:{alignment:"left"}}}))(a),u=((e,t,n)=>n?[`${e}`,`waiting ${t.waiting.toString()}`,`running ${t.running.toString()}`,`quiet ${t.quiet.toString()}`,`stalled ${t.stalled.toString()}`,`timeout ${t.timeout.toString()}`,`ok ${t.ok.toString()}`,`warn ${t.warn.toString()}`,`fail ${t.fail.toString()}`,`cancelled ${t.cancelled.toString()}`].join(" • "):[`${e}`,HD(`⏸︎ ${t.waiting.toString()}`),jD(`▶︎ ${t.running.toString()}`),MD(`⏱︎ ${t.quiet.toString()}`),KD(`⏱︎ ${t.stalled.toString()}`),BD(`⏱︎ ${t.timeout.toString()}`),ID(`✔︎ ${t.ok.toString()}`),KD(`⚠︎ ${t.warn.toString()}`),BD(`✖︎ ${t.fail.toString()}`),zD(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(PE(Date.now()-n),Rw(t.map(e=>({state:e.state}))),r),l=i?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${UD("Press")} ${qD("q")} ${UD("to cancel,")} ${qD("r")} ${UD("to restart")}${t}`})(s)}`:"",f=`\n${`${c.trimEnd()}\n\n${u}${l}`}\n`;if("1"===process.env.STAN_LIVE_DEBUG)try{const e=/(?:^|\n)Type\s+Item\s+Status\s+Time\s+Output(?:\n|$)/g,t=((e=>{try{return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}catch{return e}})(f).match(e)??[]).length;console.error("[stan:live:frame]",{headerMatches:t,includeHint:i})}catch{}return f};let xE=1;const TE=()=>Date.now();class $E{rows=new Map;opts;frameNo=0;timer;startedAt=TE();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=xE++}resetElapsed(){this.startedAt=TE(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),ew.renderer.stop(),ew.renderer.done(),this.writer?.done()}flush(){ew.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){ew.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=Hw()),this.writer.start(),this.timer=setInterval(()=>this.render(),this.opts.refreshMs))}clear(){ew.renderer.clear(),this.writer?.clear()}stop(){ew.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,ew.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),s=n??Nw(e)??(r?.type?{type:r.type,item:r.item}:void 0);if(!s){const n={type:"script",item:e};return void this.rows.set(e,{...n,state:{...r?.state??{},...t}})}this.rows.set(e,{...s,state:{...r?.state??{},...t}}),ew.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=TE();for(const[t,n]of this.rows.entries()){const r=n.state;switch(r.kind){case"waiting":this.update(t,{kind:"cancelled"});break;case"running":case"quiet":case"stalled":{const n="number"==typeof r.startedAt?r.startedAt:void 0,s="number"==typeof n?Math.max(0,e-n):0;this.update(t,{kind:"cancelled",durationMs:s});break}}}}renderFinalNoHint(){let e=OE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!1});e.endsWith("\n")||(e+="\n"),e+="\n",this.writer?.write(e)}render(){const e=OE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,ew.enabled)try{const e=Rw(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);ew.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}class NE{model;opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;unsubscribe;stopped=!1;constructor(e,t){this.model=e,this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new $E({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.key,e.meta,e.state)))}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;"function"==typeof e?.finalize&&(this.dbg("stop() finalize(full)"),e.finalize?.())}catch{}this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}}flushNow(){try{this.renderer?.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()"),this.renderer?.resetRows?.()}catch{}}resetElapsed(){try{this.renderer?.resetElapsed?.()}catch{}}cancelPending(){this.dbg("cancelPending()"),this.renderer?.cancelPending?.()}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer?.update(`${t.type}:${t.item}`,n,t)}}const RE=e=>e.replace(/\\/g,"/"),LE=(e,t)=>{if(!t)return"";const r=t;return n.isAbsolute(r)?RE(n.relative(e,r)):RE(r)};class FE{opts;renderer=null;control=null;model=new Lw;sink;stopped=!1;constructor(e){this.opts=e,this.sink=new NE(this.model,{boring:Boolean(e?.boring)})}start(){ew.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,n,r,s,i,o){const a=LE(n,t),c="error"===o||"number"==typeof i&&0!==i?{kind:"error",durationMs:Math.max(0,s-r),outputPath:a}:"warn"===o?{kind:"warn",durationMs:Math.max(0,s-r),outputPath:a}:{kind:"done",durationMs:Math.max(0,s-r),outputPath:a};this.model.update(`script:${e}`,c,{type:"script",item:e})}onArchiveQueued(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"waiting"},{type:"archive",item:t})}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,n,r,s){const i="full"===e?"full":"diff",o=LE(n,t);this.model.update(`archive:${i}`,{kind:"done",durationMs:Math.max(0,s-r),outputPath:o},{type:"archive",item:i})}onCancelled(e="cancel"){ew.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){ew.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}this.control?.detach(),this.control=null}else ew.ui.stop(),this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}prepareForNewSession(){try{this.model?.clearAll?.()}catch{}try{this.sink.resetElapsed()}catch{}try{this.sink.resetForRestart()}catch{}}flushNow(){try{this.sink.flushNow()}catch{}}installCancellation(e,t){try{this.control=new $w({onCancel:e,onRestart:t}),ew.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,ew.ui.stop();try{this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}}}class IE{model;cwd;unsubscribe;constructor(e,t){this.model=e,this.cwd=t}start(){this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.meta,e.state))}stop(){this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}onUpdate(e,t){const n=e.item,r="archive"===e.type?"diff"===n?"archive (diff)":"archive":n;if("waiting"!==t.kind)if("running"!==t.kind){if("warn"===t.kind){const e=LE(this.cwd,t.outputPath);return void console.log(`stan: ${Kw("warn")} "${r}" -> ${e}`)}if("done"===t.kind||"error"===t.kind){const e="done"===t.kind,n=LE(this.cwd,t.outputPath),s=Kw(e?"ok":"error"),i=e?"":" (exit 1)",o=n||"";return void console.log(`stan: ${s} "${r}" -> ${o}${i}`)}}else console.log(`stan: ${Kw("run")} "${r}"`);else console.log(`stan: ${Kw("waiting")} "${r}"`)}}class ME{model=new Lw;sink;constructor(){this.sink=new IE(this.model,process.cwd())}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,n,r,s,i,o){const a=LE(n,t),c="error"===o?{kind:"error",durationMs:0,outputPath:a}:"warn"===o?{kind:"warn",durationMs:0,outputPath:a}:{kind:"done",durationMs:0,outputPath:a};this.model.update(`script:${e}`,c,{type:"script",item:e})}onArchiveQueued(){}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,n){const r=LE(n,t),s="full"===e?"full":"diff";this.model.update(`archive:${s}`,{kind:"done",durationMs:0,outputPath:r},{type:"archive",item:s})}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}exports.renderAvailableScriptsHelp=e=>{try{const t=aD(e),n=Object.keys(t.scripts??{});if(!n.length)return"";const r=n[0]??"lint";return["","Default: runs all scripts and writes archives.","","Available script keys:",` ${n.join(", ")}`,"","Examples:"," stan run # all scripts, with archives",` stan run -s ${r}`,` stan run -q -x ${r}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${r}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},exports.runSelected=async(r,s,i=null,o="concurrent",a)=>{const c=a??{};await(async(r,s,i=!1)=>{const o=te(r,s);if(await oe(r,s),!i){const r=n.resolve(o.outputAbs,_);if(e.existsSync(r))try{await t.copyFile(r,n.resolve(o.diffAbs,k))}catch{}const s=await t.readdir(o.outputAbs,{withFileTypes:!0});for(const t of s)e.rmSync(n.resolve(o.outputAbs,t.name),{recursive:!0,force:!0})}return o.rootAbs})(r,s.stanPath,Boolean(c.keep));const u=ZD(0,{selection:i,config:s,mode:o,behavior:c}),l=process.stdout,f=Boolean(l?.isTTY),p=(c.live??!0)&&f,d=null==i?Object.keys(s.scripts):i,h=p?new FE({boring:"1"===process.env.STAN_BORING}):new ME;let m=!1;for(;;){const{created:e,cancelled:t,restartRequested:n}=await Tw({cwd:r,config:s,selection:d,mode:o,behavior:c,liveEnabled:p,planBody:u,printPlan:!m&&!1!==c.plan,ui:h});if(m=!0,!n){if(t)return e;try{h.stop()}catch{}return e}}};
1
+ "use strict";var e=require("node:fs"),t=require("node:fs/promises"),n=require("node:path"),r=require("fs-extra"),s=require("node:process"),i=require("node:url"),o=require("process"),a=require("buffer"),c=require("node:crypto"),u=require("node:child_process"),l=require("os"),f=require("path"),p=require("util"),d=require("stream"),h=require("events"),m=require("fs"),g=require("node:os"),y=require("node:tty"),b=require("child_process"),v=require("node:module"),D=require("node:readline"),w="undefined"!=typeof document?document.currentScript:null;const _="archive.tar",k="archive.prev.tar",E=e=>e.replace(/\\/g,"/"),S=(e,t)=>{const n=E(e).replace(/\/+$/,""),r=E(t);return r===n||r.startsWith(`${n}/`)},A=(e,t)=>{const n=E(e);return S(`${n}/diff`,t)||S(`${n}/patch`,t)},C=S,P=e=>{const t=e.replace(/\\/g,"/");return e=>!(A(t,e)||((e,t)=>{const n=E(e);return E(t)===`${n}/output/${_}`||E(t)===`${n}/output/archive.diff.tar`||E(t)===`${n}/output/archive.warnings.txt`})(t,e))},O=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},x=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)},T=1048576,$=async(e,r)=>{const s=[],i=[],o=[];await Promise.all(r.map(async r=>{const a=r.replace(/\\/g,"/"),c=n.resolve(e,r);let u=null;try{u=await t.stat(c)}catch{return}const l=u?.size??0;let f,p=!1;try{p=await(async e=>{try{const n=await t.open(e,"r");try{const e=Buffer.allocUnsafe(8192),{bytesRead:t}=await n.read(e,0,e.length,0);for(let n=0;n<t;n+=1)if(0===e[n])return!0;return!1}finally{await n.close().catch(()=>{})}}catch{return!1}})(c)}catch{p=!1}if(p)i.push({path:a,size:l});else{s.push(a);try{(l<=T||l<5*T)&&(f=(e=>{const t=e.replace(/\r\n/g,"\n");return 0===t.length?0:t.split("\n").length})(await t.readFile(c,"utf8")))}catch{}(l>T||"number"==typeof f&&f>3e3)&&o.push({path:a,size:l,loc:f})}}));const a=[];if(i.length>0){a.push(`Binary files excluded from archive (${i.length.toString()}):`);for(const e of i)a.push(` - ${e.path} (${e.size.toString()} bytes)`);a.push("")}if(o.length>0){a.push(`Large text files (included; consider excludes if unwanted) (${o.length.toString()}):`);for(const e of o){const t=[` - ${e.path}`,`(${e.size.toString()} bytes)`];"number"==typeof e.loc&&t.push(`${e.loc.toString()} LOC`),a.push(t.join(" "))}a.push(""),a.push(`Thresholds: size > ${T.toString()} bytes or LOC > ${3e3.toString()}`)}0===a.length&&a.push("No archive warnings.");const c=a.join("\n")+(a.length?"\n":"");return{textFiles:s,excludedBinaries:i,largeText:o,warningsBody:c}};var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,F,I,M,j,B,z,H,K,U,q,Z,G={exports:{}},W=(L||(L=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,r=/(?:[^\\]|^)\\$/,s=/^\\!/,i=/^\\#/,o=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,c=/\/$/,u="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const f=l,p=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,m=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,s)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${s}`:"]"===s&&r.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],g=/(^|\\\/)?\\\*$/,y="regex",b="checkRegex",v={[y]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[b]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},D=e=>"string"==typeof e;class w{constructor(e,t,n,r,s,i){this.pattern=e,this.mark=t,this.negative=s,p(this,"body",n),p(this,"ignoreCase",r),p(this,"regexPrefix",i)}get regex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){const e="_"+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){const n=this.regexPrefix.replace(g,v[e]),r=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return p(this,t,r)}}class _{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[f])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(D(e)&&(e={pattern:e}),(e=>e&&D(e)&&!n.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=(({pattern:e,mark:t},n)=>{let r=!1,o=e;0===o.indexOf("!")&&(r=!0,o=o.substr(1)),o=o.replace(s,"!").replace(i,"#");const a=(e=>m.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e))(o);return new w(e,t,o,n,r,a)})(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(D(e)?(e=>e.split(o).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let r,s=!1,i=!1;this._rules.forEach(o=>{const{negative:a}=o;i===a&&s!==i||a&&!s&&!i&&!t||o[n].test(e)&&(s=!a,i=a,r=a?void 0:o)});const o={ignored:s,unignored:i};return r&&(o.rule=r),o}}const k=(e,t)=>{throw new t(e)},E=(e,t,n)=>D(e)?e?!E.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n("path must not be empty",TypeError):n(`path must be a string, but got \`${t}\``,TypeError),S=e=>a.test(e);E.isNotRelative=S,E.convert=e=>e;class A{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){p(this,f,!0),this._rules=new _(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){const s=e&&E.convert(e);return E(s,e,this._strictPathCheck?k:h),this._t(s,t,n,r)}checkIgnore(e){if(!c.test(e))return this.test(e);const t=e.split(u).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(u)+u,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(u).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);const s=this._t(r.join(u)+u,t,n,r);return t[e]=s.ignored?s:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const C=e=>new A(e),P=()=>{E.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;E.isNotRelative=t=>e.test(t)||S(t)};"undefined"!=typeof process&&"win32"===process.platform&&P(),e.exports=C,C.default=C,e.exports.isPathValid=e=>E(e&&E.convert(e),e,h),p(e.exports,Symbol.for("setupWindows"),P)}(G)),G.exports),V=R(W),J={};function Y(){if(I)return F;I=1;const e="\\\\/",t=`[^${e}]`,n="\\.",r="\\/",s="[^/]",i=`(?:${r}|$)`,o=`(?:^|${r})`,a=`${n}{1,2}${i}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:i,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${s}*?`,START_ANCHOR:o,SEP:"/"},u={...c,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return F={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{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"},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:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function Q(){return M||(M=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:s}=Y();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(s,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(J)),J}function X(){if(U)return K;U=1;const e=function(){if(B)return j;B=1;const e=Q(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=Y(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return j=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,k=[],E=[],S=[];let A,C,P=b,O=-1,x=0,T=0,$=!1,N=!1,R=!1,L=!1,F=!1,I=!1,M=!1,j=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const U=()=>O>=w,q=()=>P.charCodeAt(O+1),Z=()=>(A=C,P.charCodeAt(++O));for(;O<w;){let e;if(C=Z(),C!==r){if(!0===I||C===c){for(H++;!0!==U()&&(C=Z());)if(C!==r)if(C!==c){if(!0!==I&&C===i&&(C=Z())===i){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,$=K.isBrace=!0,z=!0;break}}else H++;else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===o)&&q()===u){if(R=K.isGlob=!0,L=K.isExtglob=!0,z=!0,C===o&&O===x&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==U()&&(e=Z());)if(e!==r){if(e===m){N=K.isBracket=!0,R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==x){if(!0!==D.noparen&&C===u){if(R=K.isGlob=!0,!0===_){for(;!0!==U()&&(C=Z());)if(C!==u){if(C===h){z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(!0===R){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,x++}else{if(k.push(O),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===x+1){x+=2;continue}T=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(L=!1,R=!1);let G=P,W="",V="";x>0&&(W=P.slice(0,x),P=P.slice(x),T-=x),G&&!0===R&&T>0?(G=P.slice(0,T),V=P.slice(T)):!0===R?(G="",V=P):G=P,G&&""!==G&&"/"!==G&&G!==P&&g(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===D.unescape&&(V&&(V=e.removeBackslashes(V)),G&&!0===M&&(G=e.removeBackslashes(G)));const J={prefix:W,input:b,start:x,base:G,glob:V,isBrace:$,isBracket:N,isGlob:R,isExtglob:L,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(J.maxDepth=0,g(C)||E.push(K),J.tokens=E),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<k.length;t++){const n=e?e+1:x,r=k[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==x?(E[t].isPrefix=!0,E[t].value=W):E[t].value=s,y(E[t]),J.maxDepth+=E[t].depth),0===t&&""===s||S.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);S.push(t),D.tokens&&(E[E.length-1].value=t,y(E[E.length-1]),J.maxDepth+=E[E.length-1].depth)}J.slashes=k,J.parts=S}return J},j}(),t=function(){if(H)return z;H=1;const e=Y(),t=Q(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=e.globChars(p.windows),v=e.extglobChars(b),{DOT_LITERAL:D,PLUS_LITERAL:w,SLASH_LITERAL:_,ONE_CHAR:k,DOTS_SLASH:E,NO_DOT:S,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:P,QMARK_NO_DOT:O,STAR:x,START_ANCHOR:T}=b,$=e=>`(${y}(?:(?!${T}${e.dot?E:D}).)*?)`,N=p.dot?"":S,R=p.dot?P:O;let L=!0===p.bash?$(p):x;p.capture&&(L=`(${L})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const F={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,F),h=l.length;const I=[],M=[],j=[];let B,z=m;const H=()=>F.index===h-1,K=F.peek=(e=1)=>l[F.index+e],U=F.advance=()=>l[++F.index]||"",q=()=>l.slice(F.index+1),Z=(e="",t=0)=>{F.consumed+=e,F.index+=t},G=e=>{F.output+=null!=e.output?e.output:e.value,Z(e.value)},W=()=>{let e=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)U(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},V=e=>{F[e]++,j.push(e)},J=e=>{F[e]--,j.pop()},Y=e=>{if("globstar"===z.type){const t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||I.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-z.output.length),z.type="star",z.value="*",z.output=L,F.output+=z.output)}if(I.length&&"paren"!==e.type&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&G(e),z&&"text"===z.type&&"text"===e.type)return z.output=(z.output||z.value)+e.value,void(z.value+=e.value);e.prev=z,g.push(e),z=e},Q=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=z,n.parens=F.parens,n.output=F.output;const r=(p.capture?"(":"")+n.open;V("parens"),Y({type:e,value:t,output:F.output?"":k}),Y({type:"paren",extglob:!0,value:U(),output:r}),I.push(n)},X=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=$(p)),(r!==L||H()||/^\)+$/.test(q()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=q())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(F.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:B,output:n}),J("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,s,i,o)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(i?P.repeat(i.length):""):0===o?R+(i?P.repeat(i.length):""):P.repeat(r.length):"."===s?D.repeat(r.length):"*"===s?n?n+s+(i?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(F.output=l,F):(F.output=t.wrapOutput(n,F,f),F)}for(;!H();){if(B=U(),"\0"===B)continue;if("\\"===B){const e=K();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",Y({type:"text",value:B});continue}const t=/^\\+/.exec(q());let n=0;if(t&&t[0].length>2&&(n=t[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===p.unescape?B=U():B+=U(),0===F.brackets){Y({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===z.value||"[^"===z.value)){if(!1!==p.posix&&":"===B){const e=z.value.slice(1);if(e.includes("[")&&(z.posix=!0,e.includes(":"))){const e=z.value.lastIndexOf("["),t=z.value.slice(0,e),n=z.value.slice(e+2),s=r[n];if(s){z.value=t+s,F.backtrack=!0,U(),m.output||1!==g.indexOf(z)||(m.output=k);continue}}}("["===B&&":"!==K()||"-"===B&&"]"===K())&&(B=`\\${B}`),"]"!==B||"["!==z.value&&"[^"!==z.value||(B=`\\${B}`),!0===p.posix&&"!"===B&&"["===z.value&&(B="^"),z.value+=B,G({value:B});continue}if(1===F.quotes&&'"'!==B){B=t.escapeRegex(B),z.value+=B,G({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===p.keepQuotes&&Y({type:"text",value:B});continue}if("("===B){V("parens"),Y({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=I[I.length-1];if(e&&F.parens===e.parens+1){X(I.pop());continue}Y({type:"paren",value:B,output:F.parens?")":"\\)"}),J("parens");continue}if("["===B){if(!0!==p.nobracket&&q().includes("]"))V("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));B=`\\${B}`}Y({type:"bracket",value:B});continue}if("]"===B){if(!0===p.nobracket||z&&"bracket"===z.type&&1===z.value.length){Y({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Y({type:"text",value:B,output:`\\${B}`});continue}J("brackets");const e=z.value.slice(1);if(!0===z.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),z.value+=B,G({value:B}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(z.value);if(F.output=F.output.slice(0,-z.value.length),!0===p.literalBrackets){F.output+=n,z.value=n;continue}z.value=`(${y}${n}|${z.value})`,F.output+=z.value;continue}if("{"===B&&!0!==p.nobrace){V("braces");const e={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};M.push(e),Y(e);continue}if("}"===B){const e=M[M.length-1];if(!0===p.nobrace||!e){Y({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=F.output.slice(0,e.outputIndex),r=F.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",F.output=n;for(const e of r)F.output+=e.output||e.value}Y({type:"brace",value:B,output:t}),J("braces"),M.pop();continue}if("|"===B){I.length>0&&I[I.length-1].conditions++,Y({type:"text",value:B});continue}if(","===B){let e=B;const t=M[M.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===z.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",g.pop(),z=m;continue}Y({type:"slash",value:B,output:_});continue}if("."===B){if(F.braces>0&&"dot"===z.type){"."===z.value&&(z.output=D);const e=M[M.length-1];z.type="dots",z.output+=B,z.value+=B,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==z.type&&"slash"!==z.type){Y({type:"text",value:B,output:D});continue}Y({type:"dot",value:B,output:D});continue}if("?"===B){if((!z||"("!==z.value)&&!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("qmark",B);continue}if(z&&"paren"===z.type){const e=K();let t=B;("("===z.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(t=`\\${B}`),Y({type:"text",value:B,output:t});continue}if(!0!==p.dot&&("slash"===z.type||"bos"===z.type)){Y({type:"qmark",value:B,output:O});continue}Y({type:"qmark",value:B,output:P});continue}if("!"===B){if(!0!==p.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){Q("negate",B);continue}if(!0!==p.nonegate&&0===F.index){W();continue}}if("+"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("plus",B);continue}if(z&&"("===z.value||!1===p.regex){Y({type:"plus",value:B,output:w});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||F.parens>0){Y({type:"plus",value:B});continue}Y({type:"plus",value:w});continue}if("@"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Y({type:"at",extglob:!0,value:B,output:""});continue}Y({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(q());e&&(B+=e[0],F.index+=e[0].length),Y({type:"text",value:B});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=B,z.output=L,F.backtrack=!0,F.globstar=!0,Z(B);continue}let e=q();if(!0!==p.noextglob&&/^\([^?]/.test(e)){Q("star",B);continue}if("star"===z.type){if(!0===p.noglobstar){Z(B);continue}const t=z.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Y({type:"star",value:B,output:""});continue}const i=F.braces>0&&("comma"===t.type||"brace"===t.type),o=I.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!o){Y({type:"star",value:B,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[F.index+4];if(t&&"/"!==t)break;e=e.slice(3),Z("/**",3)}if("bos"===t.type&&H()){z.type="globstar",z.value+=B,z.output=$(p),F.output=z.output,F.globstar=!0,Z(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&H()){F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=$(p)+(p.strictSlashes?")":"|$)"),z.value+=B,F.globstar=!0,F.output+=t.output+z.output,Z(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=`${$(p)}${_}|${_}${n})`,z.value+=B,F.output+=t.output+z.output,F.globstar=!0,Z(B+U()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){z.type="globstar",z.value+=B,z.output=`(?:^|${_}|${$(p)}${_})`,F.output=z.output,F.globstar=!0,Z(B+U()),Y({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-z.output.length),z.type="globstar",z.output=$(p),z.value+=B,F.output+=z.output,F.globstar=!0,Z(B);continue}const n={type:"star",value:B,output:L};!0!==p.bash?!z||"bracket"!==z.type&&"paren"!==z.type||!0!==p.regex?(F.index!==F.start&&"slash"!==z.type&&"dot"!==z.type||("dot"===z.type?(F.output+=A,z.output+=A):!0===p.dot?(F.output+=C,z.output+=C):(F.output+=N,z.output+=N),"*"!==K()&&(F.output+=k,z.output+=k)),Y(n)):(n.output=B,Y(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=N+n.output),Y(n))}for(;F.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));F.output=t.escapeLast(F.output,"["),J("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));F.output=t.escapeLast(F.output,"("),J("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));F.output=t.escapeLast(F.output,"{"),J("braces")}if(!0===p.strictSlashes||"star"!==z.type&&"bracket"!==z.type||Y({type:"maybe_slash",value:"",output:`${_}?`}),!0===F.backtrack){F.output="";for(const e of F.tokens)F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix)}return F};return u.fastpaths=(r,s)=>{const i={...s},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=o[r]||r;const{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(i.windows),b=i.dot?h:d,v=i.dot?m:d,D=i.capture?"":"?:";let w=!0===i.bash?".*?":g;i.capture&&(w=`(${w})`);const _=e=>!0===e.noglobstar?w:`(${D}(?:(?!${y}${e.dot?p:u}).)*?)`,k=e=>{switch(e){case"*":return`${b}${f}${w}`;case".*":return`${u}${f}${w}`;case"*.*":return`${b}${w}${u}${f}${w}`;case"*/*":return`${b}${w}${l}${f}${v}${w}`;case"**":return b+_(i);case"**/*":return`(?:${b}${_(i)}${l})?${v}${f}${w}`;case"**/*.*":return`(?:${b}${_(i)}${l})?${v}${w}${u}${f}${w}`;case"**/.*":return`(?:${b}${_(i)}${l})?${u}${f}${w}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=k(t[1]);if(!n)return;return n+u+t[2]}}},E=t.removePrefix(r,{negated:!1,prefix:""});let S=k(E);return S&&!0!==i.strictSlashes&&(S+=`${l}?`),S},z=u}(),n=Q(),r=Y(),s=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>s(e,t,n)),i=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return i}const r=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=c.state;delete c.state;let l=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=s(o.ignore,e,n)}const f=(n,r=!1)=>{const{isMatch:i,match:f,output:p}=s.test(n,c,t,{glob:e,posix:a}),d={glob:e,state:u,regex:c,posix:a,input:n,output:p,match:f,isMatch:i};return"function"==typeof o.onResult&&o.onResult(d),!1===i?(d.isMatch=!1,!!r&&d):l(n)?("function"==typeof o.onIgnore&&o.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof o.onMatch&&o.onMatch(d),!r||d)};return n&&(f.state=u),f};return s.test=(e,t,r,{glob:i,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(o?n.toPosixSlashes:null);let u=e===i,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===i),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,o):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},s.matchBase=(e,t,r)=>(t instanceof RegExp?t:s.makeRe(t,r)).test(n.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,n)=>Array.isArray(e)?e.map(e=>s.parse(e,n)):t(e,{...n,fastpaths:!1}),s.scan=(t,n)=>e(t,n),s.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const i=t||{},o=i.contains?"":"^",a=i.contains?"":"$";let c=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=s.toRegex(c,t);return!0===r&&(u.state=e),u},s.makeRe=(e,n={},r=!1,i=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),s.compileRe(o,n,r,i)},s.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=r,K=s}var ee=R(function(){if(Z)return q;Z=1;const e=X(),t=Q();function n(n,r,s=!1){return!r||null!==r.windows&&void 0!==r.windows||(r={...r,windows:t.isWindows()}),e(n,r,s)}return Object.assign(n,e),q=n}());const te=(e,t)=>{const r=t.replace(/\\/g,"/").replace(/^\.\/+/,""),s=`${r}/system`,i=`${r}/output`,o=`${r}/diff`,a=`${r}/dist`,c=`${r}/patch`,u=`${r}/imports`;return{rootRel:r,systemRel:s,outputRel:i,diffRel:o,distRel:a,patchRel:c,importsRel:u,rootAbs:n.resolve(e,r),systemAbs:n.resolve(e,s),outputAbs:n.resolve(e,i),diffAbs:n.resolve(e,o),distAbs:n.resolve(e,a),patchAbs:n.resolve(e,c),importsAbs:n.resolve(e,u)}},ne=async e=>{const r=[],s=["."];for(;s.length;){const i=s.pop(),o=n.resolve(e,i),a=await t.readdir(o,{withFileTypes:!0});for(const e of a){const t="."===i?e.name:n.join(i,e.name);e.isDirectory()?s.push(t):r.push(t.replace(/\\/g,"/"))}}return r},re=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},se=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>re(e,t):()=>!1;var n;const r=ee(t,{dot:!0});return e=>r(e)},ie=async(r,{cwd:s,stanPath:i,includeOutputDir:o,includes:a=[],excludes:c=[]})=>{const u=i.replace(/\\/g,"/"),l=((e,t)=>{const n=new Set;for(const r of e){if("package.json"===r)continue;if(!r.endsWith("/package.json"))continue;const e=r.slice(0,-13);e.startsWith("node_modules/")||e.startsWith(".git/")||e===t||e.startsWith(`${t}/`)||e.length>0&&n.add(e)}return Array.from(n)})(r,u),f=await(async r=>{const s=n.resolve(r,".gitignore");if(!e.existsSync(s))return null;try{const e=await t.readFile(s,"utf8"),n=V();return n.add(e),n}catch{return null}})(s),p=[e=>re(e,"node_modules"),e=>re(e,".git"),...f?[e=>f.ignores(e)]:[],...c.map(se),...l.map(e=>t=>re(t,e)),e=>A(u,e)];o||p.push(e=>C(`${u}/output`,e));const d=r.filter(e=>!p.some(t=>t(e)));if(a.length>0){const e=a.map(se),t=[e=>A(u,e),...o?[]:[e=>C(`${u}/output`,e)]],n=new Set(d);for(const t of r)e.some(e=>e(t))&&n.add(t);const s=c.map(se);return r.filter(e=>n.has(e)&&!t.some(t=>t(e))&&!s.some(t=>t(e)))}return d},oe=async(e,t)=>{const n=te(e,t);return await r.ensureDir(n.rootAbs),await r.ensureDir(n.outputAbs),await r.ensureDir(n.diffAbs),await r.ensureDir(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}},ae=async(e,t)=>{const n=await oe(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}},ce=async(r,s,i={})=>{const{includeOutputDir:o=!1,fileName:a,includes:c=[],excludes:u=[]}=i;let l=a??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:f,diffDir:p}=await ae(r,s),d=await ne(r),h=await ie(d,{cwd:r,stanPath:s,includeOutputDir:o,includes:c,excludes:u}),m=n.resolve(f,l),g=n.resolve(p,k);if(e.existsSync(m))try{await t.copyFile(m,g)}catch{}const{textFiles:y,warningsBody:b}=await $(r,h),v=y;x(b,i.onArchiveWarnings);const D=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(o?await D.create({file:m,cwd:r,filter:P(s)},O(v,s)):await D.create({file:m,cwd:r,filter:P(s)},v),!e.existsSync(g))try{await t.copyFile(m,g)}catch{}return m},ue="code -g {file}",le=e=>e instanceof URL?i.fileURLToPath(e):e;function fe({cwd:t}={}){const r=function(t,{cwd:r=s.cwd(),type:i="file",stopAt:o}={}){let a=n.resolve(le(r)??"");const{root:c}=n.parse(a);o=n.resolve(a,le(o)??c);const u=n.isAbsolute(t);for(;a;){const r=u?t:n.join(a,t);try{const t=e.statSync(r,{throwIfNoEntry:!1});if("file"===i&&t?.isFile()||"directory"===i&&t?.isDirectory())return r}catch{}if(a===o||a===c)break;a=n.dirname(a)}}("package.json",{cwd:t});return r&&n.dirname(r)}const pe=["stan.config.yml","stan.config.yaml","stan.config.json"],de=t=>{for(const r of pe){const s=n.resolve(t,r);if(e.existsSync(s))return s}return null};var he,me={},ge={},ye={},be={};function ve(){if(he)return be;he=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),o=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[o]===s;function c(e){if(e&&"object"==typeof e)switch(e[o]){case n:case i:return!0}return!1}return be.ALIAS=e,be.DOC=t,be.MAP=n,be.NODE_TYPE=o,be.PAIR=r,be.SCALAR=s,be.SEQ=i,be.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,be.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,be.isCollection=c,be.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,be.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,be.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},be.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,be.isScalar=a,be.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,be}var De,we,_e={};function ke(){if(De)return _e;De=1;var e=ve();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);e.isDocument(t)?i(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):i(null,t,s,Object.freeze([]))}function i(n,s,o,a){const c=u(n,s,o,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),i(n,c,o,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=i(e,s.items[e],o,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=i("key",s.key,o,a);if(e===t)return t;e===r&&(s.key=null);const n=i("value",s.value,o,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function o(t,n){const s=c(n);e.isDocument(t)?await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):await a(null,t,s,Object.freeze([]))}async function a(n,s,i,o){const c=await u(n,s,i,o);if(e.isNode(c)||e.isPair(c))return l(n,o,c),a(n,c,i,o);if("symbol"!=typeof c)if(e.isCollection(s)){o=Object.freeze(o.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],i,o);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){o=Object.freeze(o.concat(s));const e=await a("key",s.key,i,o);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,i,o);if(n===t)return t;n===r&&(s.value=null)}return c}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,o.BREAK=t,o.SKIP=n,o.REMOVE=r,_e.visit=s,_e.visitAsync=o,_e}function Ee(){if(we)return ye;we=1;var e=ve(),t=ke();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},ye.Directives=s,ye}var Se,Ae={},Ce={},Pe={};function Oe(){if(Se)return Pe;Se=1;var e=ve(),t=ke();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Pe.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Pe.anchorNames=n,Pe.createNodeAnchors=function(t,s){const i=[],o=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const o=r(s,a);return a.add(o),o},setAnchors:()=>{for(const t of i){const n=o.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:o}},Pe.findNewAnchor=r,Pe}var xe,Te={},$e={};function Ne(){return xe||(xe=1,$e.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],i=e(t,s,String(n),r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),i=e(t,s,n,r);void 0===i?s.delete(n):i!==r&&s.set(n,i)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const i=e(t,s,n,r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}return t.call(n,r,s)}),$e}var Re,Le,Fe,Ie={};function Me(){if(Re)return Ie;Re=1;var e=ve();return Ie.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const i=n.toJSON(r,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof n||s?.keep?n:Number(n)},Ie}function je(){if(Le)return Te;Le=1;var e=Ne(),t=ve(),n=Me();return Te.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:i,onAnchor:o,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},u=n.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},Te}function Be(){if(Fe)return Ce;Fe=1;var e=Oe(),t=ke(),n=ve(),r=je(),s=Me();let i=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,i;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(i=e)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),!c||void 0===c.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=o(r,a,n)),c.count*c.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function o(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=o(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=o(e,t.key,r),s=o(e,t.value,r);return Math.max(n,s)}return 1}return Ce.Alias=i,Ce}var ze,He,Ke,Ue={},qe={},Ze={};function Ge(){if(ze)return Ze;ze=1;var e=ve(),t=je(),n=Me();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",Ze.Scalar=r,Ze.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,Ze}function We(){if(He)return qe;He=1;var e=Be(),t=ve(),n=Ge();return qe.createNode=function(r,s,i){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=i;let f;if(o&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete i.onTagObj);const d=p?.createNode?p.createNode(i.schema,r,i):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(i.schema,r,i):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},qe}function Ve(){if(Ke)return Ue;Ke=1;var e=We(),t=ve(),n=je();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let i=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...i]=e,o=this.get(s,!0);if(t.isCollection(o))o.addIn(i,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,i=this.get(r,!0);return 0===s.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...i]=e;if(0===i.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}};return Ue.Collection=i,Ue.collectionFromPath=r,Ue.isEmptyPath=s,Ue}var Je,Ye={},Qe={},Xe={},et={};function tt(){if(Je)return et;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return Je=1,et.indentComment=e,et.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,et.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),et}var nt,rt,st,it,ot={},at={};function ct(){if(rt)return ot;rt=1;var e=Ge(),t=function(){if(nt)return at;nt=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,i=e[s];for(;" "===i||"\t"===i;)if(t<s+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);r=t,s=t+1,i=e[s]}return r}return at.FOLD_BLOCK=e,at.FOLD_FLOW="flow",at.FOLD_QUOTED=t,at.foldFlowLines=function(r,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof o&&(o>a-Math.max(2,c)?p.push(0):g=a-o);let y=!1,b=-1,v=-1,D=-1;i===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let o;o=r[b+=1];){if(i===t&&"\\"===o){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===o)i===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(i===t){for(;" "===m||"\t"===m;)m=o,o=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=o}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],o=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,o)}`:(i===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,o)}`)}return w},at}();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const i=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return i;const{implicitKey:o}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(u+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{u+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(o||'"'===i[e+2]||i.length<a)e+=1;else{for(u+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)u+="\n",e+=2;u+=c," "===i[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+i.slice(l):i,o?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,i);const o=i.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${o}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,o,t.FOLD_FLOW,n(i,!1))}function o(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),o=e.includes("'");r=t&&!o?i:o&&!t?s:n?i:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:i,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return o(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,k=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;k=w}}let E=c.substring(0,k<w?k+1:w);E&&(c=c.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let S=(_?m?"2":"1":"")+y;if(s&&(S+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const o=n(u,!0);"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${E}${r}${v}`,m,t.FOLD_BLOCK,o);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${E}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return ot.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?o(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return i(h.value,u);case e.Scalar.PLAIN:return function(s,i,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=i;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return o(f,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?o(f,i):c(s,i,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,i,a,u);if(r(f)){if(""===h)return i.forceBlockIndent=!0,c(s,i,a,u);if(d&&h===m)return o(f,i)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=i.doc.schema;if(n.some(e)||t?.some(e))return o(f,i)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(i,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},ot}function ut(){if(st)return Xe;st=1;var e=Oe(),t=ve(),n=tt(),r=ct();return Xe.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},Xe.stringify=function(n,s,i,o){if(t.isPair(n))return n.toString(s,i,o);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:i}){if(!i.directives)return"";const o=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,i,o):t.isScalar(c)?r.stringifyString(c,s,i,o):c.toString(s,i,o);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},Xe}var lt,ft={},pt={};function dt(){if(lt)return pt;lt=1;var e=o;return pt.debug=function(e,...t){"debug"===e&&console.log(...t)},pt.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},pt}var ht,mt,gt,yt={};function bt(){if(ht)return yt;ht=1;var e=ve(),t=Ge();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)i(t,n,e);else if(Array.isArray(r))for(const e of r)i(t,n,e);else i(t,n,r)}function i(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,t,Map);for(const[e,t]of i)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return yt.addMergeToJSMap=s,yt.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),yt.merge=r,yt}function vt(){if(mt)return ft;mt=1;var e=dt(),t=bt(),n=ut(),r=ve(),s=Me();return ft.addPairToJSMap=function(i,o,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(i,o,c);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,o,c);else{const t=s.toJS(a,"",i);if(o instanceof Map)o.set(t,s.toJS(c,t,i));else if(o instanceof Set)o.add(t);else{const u=function(t,s,i){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&i?.doc){const r=n.createStringifyContext(i.doc,{});r.anchors=new Set;for(const e of i.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!i.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,i),l=s.toJS(c,u,i);u in o?Object.defineProperty(o,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[u]=l}}return o},ft}function Dt(){if(gt)return Ye;gt=1;var e=We(),t=function(){if(it)return Qe;it=1;var e=ve(),t=Ge(),n=ut(),r=tt();return Qe.stringifyPair=function({key:s,value:i},o,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=o;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s)throw new Error("With simple keys, collection cannot be used as a key value")}let y=!m&&(!s||g&&null==i&&!o.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));o=Object.assign({},o,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,k=n.stringify(s,o,()=>w=!0,()=>_=!0);if(!y&&!o.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(o.inFlow){if(u||null==i)return w&&a&&a(),""===k?"?":y?`? ${k}`:k}else if(u&&!m||null==i&&y)return k=`? ${k}`,g&&!w?k+=r.lineComment(k,o.indent,d(g)):_&&c&&c(),k;w&&(g=null),y?(g&&(k+=r.lineComment(k,o.indent,d(g))),k=`? ${k}\n${f}:`):(k=`${k}:`,g&&(k+=r.lineComment(k,o.indent,d(g)))),e.isNode(i)?(b=!!i.spaceBefore,v=i.commentBefore,D=i.comment):(b=!1,v=null,D=null,i&&"object"==typeof i&&(i=l.createNode(i))),o.implicitKey=!1,y||g||!e.isScalar(i)||(o.indentAtStart=k.length+1),_=!1,h||!(p.length>=2)||o.inFlow||y||!e.isSeq(i)||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let E=!1;const S=n.stringify(i,o,()=>E=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,o.indent)}`}""!==S||o.inFlow?A+=`\n${o.indent}`:"\n"===A&&(A="\n\n")}else if(!y&&e.isCollection(i)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=o.inFlow??i.flow??0===i.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${o.indent}`)}}else""!==S&&"\n"!==S[0]||(A="");return k+=A+S,o.inFlow?E&&a&&a():D&&!E?k+=r.lineComment(k,o.indent,d(D)):_&&c&&c(),k},Qe}(),n=vt(),r=ve();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return Ye.Pair=s,Ye.createPair=function(t,n,r){const i=e.createNode(t,void 0,r),o=e.createNode(n,void 0,r);return new s(i,o)},Ye}var wt,_t,kt,Et={},St={},At={},Ct={};function Pt(){if(wt)return Ct;wt=1;var e=ve(),t=ut(),n=tt();function r({comment:r,items:s},o,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=o,h=Object.assign({},o,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),i(o,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),i(o,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:o,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let o=0;o<r.length;++o){const c=r[o];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),i(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),i(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);o<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=o;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function i({indent:e,options:{commentString:t}},r,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const i=n.indentComment(t(s),e);r.push(i.trimStart())}}return Ct.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Ct}function Ot(){if(_t)return At;_t=1;var e=Pt(),t=vt(),n=Ve(),r=ve(),s=Dt(),i=Ge();function o(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:i}=n,o=new this(e),a=(e,a)=>{if("function"==typeof i)a=i.call(t,e,a);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==a||r)&&o.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=o(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=o(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=o(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!o(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return At.YAMLMap=a,At.findPair=o,At}function xt(){if(kt)return St;kt=1;var e=ve(),t=Ot();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return St.map=n,St}var Tt,$t,Nt={},Rt={};function Lt(){if(Tt)return Rt;Tt=1;var e=We(),t=Pt(),n=Ve(),r=ve(),s=Ge(),i=Me();let o=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];r.isScalar(i)&&s.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(i.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let o of n){if("function"==typeof s){const e=n instanceof Set?o:String(t++);o=s.call(n,e,o)}i.items.push(e.createNode(o,void 0,r))}}return i}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return Rt.YAMLSeq=o,Rt}function Ft(){if($t)return Nt;$t=1;var e=ve(),t=Lt();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Nt.seq=n,Nt}var It,Mt={};function jt(){if(It)return Mt;It=1;var e=ct();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return Mt.string=t,Mt}var Bt,zt={},Ht={};function Kt(){if(Bt)return Ht;Bt=1;var e=Ge();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return Ht.nullTag=t,Ht}var Ut,qt={};function Zt(){if(Ut)return qt;Ut=1;var e=Ge();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify:({source:e,value:n},r)=>e&&t.test.test(e)&&n===("t"===e[0]||"T"===e[0])?e:n?r.options.trueStr:r.options.falseStr};return qt.boolTag=t,qt}var Gt,Wt,Vt={},Jt={};function Yt(){return Gt||(Gt=1,Jt.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i}),Jt}function Qt(){if(Wt)return Vt;Wt=1;var e=Ge(),t=Yt();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return Vt.float=s,Vt.floatExp=r,Vt.floatNaN=n,Vt}var Xt,en={};function tn(){if(Xt)return en;Xt=1;var e=Yt();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:i}=n;return t(i)&&i>=0?s+i.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return en.int=i,en.intHex=o,en.intOct=s,en}var nn,rn={};var sn,on={};var an,cn={};function un(){if(an)return cn;an=1;var e=a,t=Ge(),n=ct();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:i},o,a,c){if(!i)return"";const u=i;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},o,a,c)}};return cn.binary=r,cn}var ln,fn,pn={},dn={};function hn(){if(ln)return dn;ln=1;var e=ve(),t=Dt(),n=Ge(),r=Lt();function s(r,s){if(e.isSeq(r))for(let i=0;i<r.items.length;++i){let o=r.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&s("Each pair must have its own sequence indicator");const e=o.items[0]||new t.Pair(new n.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}r.items[i]=e.isPair(o)?o:new t.Pair(o)}}else s("Expected a sequence for this tag");return r}function i(e,n,s){const{replacer:i}=s,o=new r.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof i&&(e=i.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;o.items.push(t.createPair(r,c,s))}return o}const o={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i};return dn.createPairs=i,dn.pairs=o,dn.resolvePairs=s,dn}function mn(){if(fn)return pn;fn=1;var e=ve(),t=Me(),n=Ot(),r=Lt(),s=hn();class i extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let i,o;if(e.isPair(n)?(i=t.toJS(n.key,"",r),o=t.toJS(n.value,i,r)):i=t.toJS(n,"",r),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),i=new this;return i.items=r.items,i}}i.tag="tag:yaml.org,2002:omap";const o={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),o=[];for(const{key:t}of r.items)e.isScalar(t)&&(o.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):o.push(t.value));return Object.assign(new i,r)},createNode:(e,t,n)=>i.from(e,t,n)};return pn.YAMLOMap=i,pn.omap=o,pn}var gn,yn={},bn={};var vn,Dn={};var wn,_n={};var kn,En={};function Sn(){if(kn)return En;kn=1;var e=ve(),t=Dt(),n=Ot();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null),n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),i.items.push(t.createPair(e,null,r));return i}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return En.YAMLSet=r,En.set=s,En}var An,Cn,Pn,On,xn={};function Tn(){if(An)return xn;An=1;var e=Yt();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*i:i}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const i=r(60),o=[n%i];return n<60?o.unshift(0):(n=(n-o[0])/i,o.unshift(n%i),n>=60&&(n=(n-o[0])/i,o.unshift(n))),s+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:n},i={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const n=e.match(i.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,o,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,o,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return xn.floatTime=s,xn.intTime=r,xn.timestamp=i,xn}function $n(){if(Cn)return yn;Cn=1;var e=xt(),t=Kt(),n=Ft(),r=jt(),s=un(),i=function(){if(gn)return bn;gn=1;var e=Ge();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},r={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return bn.falseTag=r,bn.trueTag=n,bn}(),o=function(){if(vn)return Dn;vn=1;var e=Ge(),t=Yt();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Dn.float=s,Dn.floatExp=r,Dn.floatNaN=n,Dn}(),a=function(){if(wn)return _n;wn=1;var e=Yt();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===s?-1*i:i}function r(n,r,s){const{value:i}=n;if(t(i)){const e=i.toString(r);return i<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return _n.int=o,_n.intBin=s,_n.intHex=a,_n.intOct=i,_n}(),c=bt(),u=mn(),l=hn(),f=Sn(),p=Tn();const d=[e.map,n.seq,r.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return yn.schema=d,yn}function Nn(){if(Pn)return zt;Pn=1;var e=xt(),t=Kt(),n=Ft(),r=jt(),s=Zt(),i=Qt(),o=tn(),a=function(){if(nn)return rn;nn=1;var e=xt(),t=Kt(),n=Ft(),r=jt(),s=Zt(),i=Qt(),o=tn();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float];return rn.schema=a,rn}(),c=function(){if(sn)return on;sn=1;var e=Ge(),t=xt(),n=Ft();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>r(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s}],o={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,o);return on.schema=a,on}(),u=un(),l=bt(),f=mn(),p=hn(),d=$n(),h=Sn(),m=Tn();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:m.floatTime,int:o.int,intHex:o.intHex,intOct:o.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return zt.coreKnownTags=b,zt.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},zt}function Rn(){if(On)return Et;On=1;var e=ve(),t=xt(),n=Ft(),r=jt(),s=Nn();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Et.Schema=class o{constructor({compat:o,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(o)?s.getTags(o,"compat"):o?s.getTags(null,o):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?i:null}clone(){const e=Object.create(o.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Et}var Ln,Fn,In={};function Mn(){if(Fn)return Ae;Fn=1;var e=Be(),t=Ve(),n=ve(),r=Dt(),s=Me(),i=Rn(),o=function(){if(Ln)return In;Ln=1;var e=ve(),t=ut(),n=tt();return In.stringifyDocument=function(r,s){const i=[];let o=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(i.push(e),o=!0):r.directives.docStart&&(o=!0)}o&&i.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==i.length&&i.unshift("");const e=c(r.commentBefore);i.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&o&&i.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==i[i.length-1]?i.push(f):i[i.length-1]=`--- ${f}`}else i.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(c(e),"")))}return i.join("\n")+"\n"},In}(),a=Oe(),c=Ne(),u=We(),l=Ee();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ae.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new l.Directives({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),i=this.createNode(t,null,n);return new r.Pair(s,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new l.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new i.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof i)for(const{count:e,res:t}of a.anchors.values())i(t,e);return"function"==typeof o?c.applyReviver(o,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return o.stringifyDocument(this,e)}},Ae}var jn,Bn={};function zn(){if(jn)return Bn;jn=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Bn.YAMLError=e,Bn.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Bn.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Bn.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}},Bn}var Hn,Kn={},Un={},qn={},Zn={},Gn={};function Wn(){return Hn||(Hn=1,Gn.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&i(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&i(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&i(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&i(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&i(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],k=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||"block-map"===r?.type||"block-seq"===r?.type)&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:k,start:w??k}}),Gn}var Vn,Jn={};function Yn(){return Vn||(Vn=1,Jn.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}}),Jn}var Qn,Xn={};function er(){if(Qn)return Xn;Qn=1;var e=Yn();return Xn.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];s.indent!==t||"]"!==s.source&&"}"!==s.source||!e.containsNewline(n)||r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},Xn}var tr,nr,rr={};function sr(){if(tr)return rr;tr=1;var e=ve();return rr.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const i="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,r))},rr}var ir,or={};var ar,cr,ur,lr={},fr={};function pr(){return ar||(ar=1,fr.resolveEnd=function(e,t,n,r){let s="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}}),fr}function dr(){if(ur)return qn;ur=1;var e=ve(),t=Ge(),n=Ot(),r=Lt(),s=function(){if(nr)return Zn;nr=1;var e=Dt(),t=Ot(),n=Wn(),r=Yn(),s=er(),i=sr();const o="All mapping items must start at the same column";return Zn.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",o)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",o);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,i.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const k=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=k.end,k.found){D&&("block-map"!==b?.type||k.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<k.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,k,f):c(u,h,y,null,k,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(_.comment?_.comment+="\n"+k.comment:_.comment=k.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},Zn}(),i=function(){if(ir)return or;ir=1;var e=Lt(),t=Wn(),n=er();return or.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},i,o,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=o.offset,f=null;for(const{start:e,value:c}of o.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}c&&"block-seq"===c.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(i,c,p,a):s(i,p.end,e,null,p,a);i.schema.compat&&n.flowIndentCheck(o.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[o.offset,l,f??l],u},or}(),o=function(){if(cr)return lr;cr=1;var e=ve(),t=Dt(),n=Ot(),r=Lt(),s=pr(),i=Wn(),o=Yn(),a=sr();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return lr.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,k=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!k.found){if(!(k.anchor||k.tag||w||_)){0===r&&k.comma?h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),k.comment&&(b.comment?b.comment+="\n"+k.comment:b.comment=k.comment),D=k.end;continue}!g&&p.options.strict&&o.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)k.comma&&h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(k.comma||h(k.start,"MISSING_CHAR",`Missing , between ${y} items`),k.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,k.comment=k.comment.substring(t.length+1)}}if(g||w||k.found){p.atKey=!0;const e=k.end,r=v?l(p,v,k,h):f(p,e,m,null,k,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(o.found){if(!g&&!k.found&&p.options.strict){if(w)for(const e of w){if(e===o.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<o.found.offset-1024&&h(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&":"===_.source[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const E=_?l(p,_,o,h):o.found?f(p,o.end,w,null,o,h):null;E?u(_)&&h(E.range,"BLOCK_IN_FLOW",c):o.comment&&(r.comment?r.comment+="\n"+o.comment:r.comment=o.comment);const S=new t.Pair(r,E);if(p.options.keepSourceTokens&&(S.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(S);const t=(E??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=E?E.range[2]:o.end}else{const e=_?l(p,_,k,h):f(p,k.end,w,null,k,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...k]=d.end;let E=D;if(_&&_.source===w)E=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&k.unshift(_)}if(k.length>0){const e=s.resolveEnd(k,E,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},lr}();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,r,c):o.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return qn.composeCollection=function(s,i,o,c,u){const l=c.tag,f=l?i.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&u(n,"MISSING_CHAR","Missing newline after block sequence props")}const p="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,i,o,u,f);let d=i.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=i.schema.knownTags[f];if(!e||e.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,i,o,u,f);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,i,o,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},qn}var hr,mr={},gr={};function yr(){if(hr)return gr;hr=1;var e=Ge();return gr.resolveBlockScalar=function(t,n,r){const s=n.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let o=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!o&&r?o=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":n&&!u&&r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+i.length;return n.source&&(t+=n.source.length),{value:e,type:o,comment:i.comment,range:[s,t,t]}}let u=n.indent+i.indent,l=n.offset+i.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===i.indent&&(u=n.length),f=e,0!==u||t.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e="Block scalar lines must not be less indented than their "+(i.indent?"explicit indentation indicator":"first line");r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}o===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+i.length+n.source.length;return{value:p,type:o,comment:i.comment,range:[s,m,m]}},gr}var br,vr,Dr={};function wr(){if(br)return Dr;br=1;var e=Ge(),t=pr();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],i=" ",o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)""===r[1]?"\n"===i?s+=i:i="\n":(s+=i+r[1],i=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(e),s+i+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function i(e,t,n,r){const s=e.substr(t,n),i=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(i)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(i)}return Dr.resolveFlowScalar=function(o,a,c){const{offset:u,type:l,source:f,end:p}=o;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let o=1;o<e.length-1;++o){const a=e[o];if("\r"!==a||"\n"!==e[o+1])if("\n"===a){const{fold:t,offset:s}=r(e,o);n+=t,o=s}else if("\\"===a){let r=e[++o];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[o+1];" "===r||"\t"===r;)r=e[1+ ++o];else if("\r"===r&&"\n"===e[o+1])for(r=e[1+ ++o];" "===r||"\t"===r;)r=e[1+ ++o];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=i(e,o+1,s,t),o+=s}else{const r=e.substr(o-1,2);t(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=o;let r=e[o+1];for(;" "===r||"\t"===r;)r=e[1+ ++o];"\n"===r||"\r"===r&&"\n"===e[o+2]||(n+=o>t?e.slice(t,o+1):a)}else n+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(f,m);break;default:return c(o,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},Dr}var _r,kr,Er,Sr,Ar={};function Cr(){if(kr)return Un;kr=1;var e=Be(),t=ve(),n=dr(),r=function(){if(vr)return mr;vr=1;var e=ve(),t=Ge(),n=yr(),r=wr();return mr.composeScalar=function(s,i,o,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===i.type?n.resolveBlockScalar(s,i,a):r.resolveFlowScalar(i,s.options.strict,a),p=o?s.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,i){if("!"===r)return t[e.SCALAR];const o=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;o.push(e)}for(const e of o)if(e.test?.test(n))return e;const a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR])}(s.schema,c,p,o,a):"scalar"===i.type?function({atKey:t,directives:n,schema:r},s,i,o){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];a.tag!==t.tag&&o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}return a}(s,c,i,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(o??i,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(o??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},mr}(),s=pr(),i=(_r||(_r=1,Ar.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}),Ar);const o={composeNode:a,composeEmptyNode:c};function a(i,a,u,l){const f=i.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:i},o){const a=new e.Alias(r.substring(1));""===a.source&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&o(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(i,c,t.strict,o);return a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment),a}(i,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(i,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(o,i,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(i,a.offset,void 0,null,u,l),y=!1}return h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)&&l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:o,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:i.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return Un.composeEmptyNode=c,Un.composeNode=a,Un}function Pr(){if(Sr)return ge;Sr=1;var e=o,t=Ee(),n=Mn(),r=zn(),s=ve(),i=function(){if(Er)return Kn;Er=1;var e=Mn(),t=Cr(),n=pr(),r=Wn();return Kn.composeDoc=function(s,i,{offset:o,start:a,value:c,end:u},l){const f=Object.assign({_directives:i},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:o,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[o,m,g.offset],p},Kn}(),a=pr();function c(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function u(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const i=e[s];switch(i[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(i.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return ge.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=c(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=u(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(s.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=c(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=i.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=a.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},ge}var Or,xr={},Tr={};var $r,Nr={};var Rr,Lr,Fr={};function Ir(){if(Lr)return xr;Lr=1;var e=function(){if(Or)return Tr;Or=1;var e=yr(),t=wr(),n=zn(),r=ct();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function i(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return Tr.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:u,end:l};default:return{type:"scalar",offset:a,indent:i,source:u,end:l}}},Tr.resolveAsScalar=function(r,s=!0,i){if(r){const o=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([s,s+1],t,r);i(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,o)}}return null},Tr.setScalarValue=function(e,t,n={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(o&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,f);break;case'"':i(e,f,"double-quoted-scalar");break;case"'":i(e,f,"single-quoted-scalar");break;default:i(e,f,"scalar")}},Tr}(),t=function(){if($r)return Nr;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),r)for(const e of r)i+=e.source;return s&&(i+=e(s)),i}return $r=1,Nr.stringify=n=>"type"in n?e(n):t(n),Nr}(),n=function(){if(Rr)return Fr;Rr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,i){let o=i(r,t);if("symbol"==typeof o)return o;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const o=s(Object.freeze(t.concat([[a,r]])),c.items[r],i);if("number"==typeof o)r=o-1;else{if(o===e)return e;o===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof o&&"key"===a&&(o=o(r,t))}}return"function"==typeof o?o(r,t):o}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},Fr.visit=r,Fr}();return xr.createScalarToken=e.createScalarToken,xr.resolveAsScalar=e.resolveAsScalar,xr.setScalarValue=e.setScalarValue,xr.stringify=t.stringify,xr.visit=n.visit,xr.BOM="\ufeff",xr.DOCUMENT="",xr.FLOW_END="",xr.SCALAR="",xr.isCollection=e=>!!e&&"items"in e,xr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),xr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},xr.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},xr}var Mr,jr={};function Br(){if(Mr)return jr;Mr=1;var e=Ir();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),o=e=>!e||i.has(e);return jr.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&t(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(o),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==i[0]&&"}"!==i[0]))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart();let a=0;for(;","===i[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),i[a]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(o),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,i=this.pos-1,o=this.pos-1;for(;r=this.buffer[++o];)if(":"===r){const e=this.buffer[o+1];if(t(e)||n&&s.has(e))break;i=o}else if(t(r)){let e=this.buffer[o+1];if("\r"===r&&("\n"===e?(o+=1,r="\n",e=this.buffer[o+1]):i=o),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&s.has(r))break;i=o}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(i+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(o))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},jr}var zr,Hr={};function Kr(){return zr||(zr=1,Hr.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}),Hr}var Ur,qr={};function Zr(){if(Ur)return qr;Ur=1;var e=o,t=Ir(),n=Br();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function i(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function a(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function c(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,i(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return qr.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=c(a(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!r(t.sep,"newline")){const e=c(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=c(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:o,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:o});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=c(a(t));u(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=c(a(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=c(a(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}},qr}var Gr,Wr,Vr={};var Jr=function(){if(Wr)return me;Wr=1;var e=Pr(),t=Mn(),n=Rn(),r=zn(),s=Be(),i=ve(),o=Dt(),a=Ge(),c=Ot(),u=Lt(),l=Ir(),f=Br(),p=Kr(),d=Zr(),h=function(){if(Gr)return Vr;Gr=1;var e=Pr(),t=Mn(),n=zn(),r=dt(),s=ve(),i=Kr(),o=Zr();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return i&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return Vr.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=c(e,n);if(!i)return null;if(i.warnings.forEach(e=>r.warn(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))},Vr.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(i&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},Vr.parseDocument=c,Vr.stringify=function(e,n,r){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!i?e.toString(r):new t.Document(e,i,r).toString(r)},Vr}(),m=ke();return me.Composer=e.Composer,me.Document=t.Document,me.Schema=n.Schema,me.YAMLError=r.YAMLError,me.YAMLParseError=r.YAMLParseError,me.YAMLWarning=r.YAMLWarning,me.Alias=s.Alias,me.isAlias=i.isAlias,me.isCollection=i.isCollection,me.isDocument=i.isDocument,me.isMap=i.isMap,me.isNode=i.isNode,me.isPair=i.isPair,me.isScalar=i.isScalar,me.isSeq=i.isSeq,me.Pair=o.Pair,me.Scalar=a.Scalar,me.YAMLMap=c.YAMLMap,me.YAMLSeq=u.YAMLSeq,me.CST=l,me.Lexer=f.Lexer,me.LineCounter=p.LineCounter,me.Parser=d.Parser,me.parse=h.parse,me.parseAllDocuments=h.parseAllDocuments,me.parseDocument=h.parseDocument,me.stringify=h.stringify,me.visit=m.visit,me.visitAsync=m.visitAsync,me}();function Yr(e,t,n){function r(n,r){var s;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(s=n._zod).traits??(s.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}const s=n?.Parent??Object;class i extends s{}function o(e){var t;const s=n?.Parent?new i:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}R(Jr);class Qr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xr extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const es={};function ts(e){return es}function ns(e,t){return"bigint"==typeof t?t.toString():t}function rs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ss(e){return null==e}function is(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const os=Symbol("evaluating");function as(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==os)return void 0===r&&(r=os,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function cs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function us(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ls(e){return JSON.stringify(e)}const fs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ps(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const ds=rs(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function hs(e){if(!1===ps(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==ps(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function ms(e){return hs(e)?{...e}:Array.isArray(e)?[...e]:e}const gs=new Set(["string","number","symbol"]);function ys(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bs(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function vs(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Ds(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function ws(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _s(e){return"string"==typeof e?e:e?.message}function ks(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Es(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Ss(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const As=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ns,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Cs=Yr("$ZodError",As),Ps=Yr("$ZodError",As,{Parent:Error}),Os=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Qr;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>ks(e,i,ts())));throw fs(t,s?.callee),t}return o.value},xs=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>ks(e,i,ts())));throw fs(t,s?.callee),t}return o.value},Ts=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Qr;return i.issues.length?{success:!1,error:new(e??Cs)(i.issues.map(e=>ks(e,s,ts())))}:{success:!0,data:i.value}},$s=Ts(Ps),Ns=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>ks(e,s,ts())))}:{success:!0,data:i.value}},Rs=Ns(Ps),Ls=/^[cC][^\s-]{8,}$/,Fs=/^[0-9a-z]+$/,Is=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ms=/^[0-9a-vA-V]{20}$/,js=/^[A-Za-z0-9]{27}$/,Bs=/^[a-zA-Z0-9_-]{21}$/,zs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ks=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Us=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Gs=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ws=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vs=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Js=/^[A-Za-z0-9_-]*$/,Ys=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Qs=/^\+(?:[0-9]){6,14}[0-9]$/,Xs="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ei=new RegExp(`^${Xs}$`);function ti(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ni=/^[^A-Z]*$/,ri=/^[^a-z]*$/,si=Yr("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ii=Yr("$ZodCheckMaxLength",(e,t)=>{var n;si.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ss(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Es(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oi=Yr("$ZodCheckMinLength",(e,t)=>{var n;si.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ss(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Es(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ai=Yr("$ZodCheckLengthEquals",(e,t)=>{var n;si.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ss(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const i=Es(r),o=s>t.length;n.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ci=Yr("$ZodCheckStringFormat",(e,t)=>{var n,r;si.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ui=Yr("$ZodCheckRegex",(e,t)=>{ci.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),li=Yr("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ni),ci.init(e,t)}),fi=Yr("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ri),ci.init(e,t)}),pi=Yr("$ZodCheckIncludes",(e,t)=>{si.init(e,t);const n=ys(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),di=Yr("$ZodCheckStartsWith",(e,t)=>{si.init(e,t);const n=new RegExp(`^${ys(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hi=Yr("$ZodCheckEndsWith",(e,t)=>{si.init(e,t);const n=new RegExp(`.*${ys(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mi=Yr("$ZodCheckOverwrite",(e,t)=>{si.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class gi{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const yi={major:4,minor:1,patch:11},bi=Yr("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yi;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=Ds(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,o=i._zod.check(e);if(o instanceof Promise&&!1===n?.async)throw new Qr;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(s||(s=Ds(e,t)))});else{if(e.issues.length===t)continue;s||(s=Ds(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(Ds(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new Qr;return o.then(t=>e._zod.parse(t,i))}return e._zod.parse(o,i)};e._zod.run=(s,i)=>{if(i.skipChecks)return e._zod.parse(s,i);if("backward"===i.direction){const t=e._zod.parse({value:s.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,i)):n(t,s,i)}const o=e._zod.parse(s,i);if(o instanceof Promise){if(!1===i.async)throw new Qr;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=$s(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Rs(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),vi=Yr("$ZodString",(e,t)=>{var n;bi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Di=Yr("$ZodStringFormat",(e,t)=>{ci.init(e,t),vi.init(e,t)}),wi=Yr("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Hs),Di.init(e,t)}),_i=Yr("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ks(e))}else t.pattern??(t.pattern=Ks());Di.init(e,t)}),ki=Yr("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Us),Di.init(e,t)}),Ei=Yr("$ZodURL",(e,t)=>{Di.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Ys.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Si=Yr("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Di.init(e,t)}),Ai=Yr("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bs),Di.init(e,t)}),Ci=Yr("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ls),Di.init(e,t)}),Pi=Yr("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Fs),Di.init(e,t)}),Oi=Yr("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Is),Di.init(e,t)}),xi=Yr("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ms),Di.init(e,t)}),Ti=Yr("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=js),Di.init(e,t)}),$i=Yr("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=ti({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Xs}T(?:${r})$`)}(t)),Di.init(e,t)}),Ni=Yr("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ei),Di.init(e,t)}),Ri=Yr("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ti(t)}$`)),Di.init(e,t)}),Li=Yr("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zs),Di.init(e,t)}),Fi=Yr("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=qs),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Ii=Yr("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Zs),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Mi=Yr("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Gs),Di.init(e,t)}),ji=Yr("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ws),Di.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Bi(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zi=Yr("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Vs),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Bi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Hi=Yr("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Js),Di.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Js.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Bi(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Ki=Yr("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qs),Di.init(e,t)}),Ui=Yr("$ZodJWT",(e,t)=>{Di.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),qi=Yr("$ZodUnknown",(e,t)=>{bi.init(e,t),e._zod.parse=e=>e}),Zi=Yr("$ZodNever",(e,t)=>{bi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Gi(e,t,n){e.issues.length&&t.issues.push(...ws(n,e.issues)),t.value[n]=e.value}const Wi=Yr("$ZodArray",(e,t)=>{bi.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let e=0;e<s.length;e++){const o=s[e],a=t.element._zod.run({value:o,issues:[]},r);a instanceof Promise?i.push(a.then(t=>Gi(t,n,e))):Gi(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Vi(e,t,n,r){e.issues.length&&t.issues.push(...ws(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Ji(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yi(e,t,n,r,s,i){const o=[],a=s.keySet,c=s.catchall._zod,u=c.def.type;for(const s of Object.keys(t)){if(a.has(s))continue;if("never"===u){o.push(s);continue}const i=c.run({value:t[s],issues:[]},r);i instanceof Promise?e.push(i.then(e=>Vi(e,n,s,t))):Vi(i,n,s,t)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Qi=Yr("$ZodObject",(e,t)=>{bi.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=rs(()=>Ji(t));as(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=ps,i=t.catchall;let o;e._zod.parse=(t,n)=>{o??(o=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=o.shape;for(const e of o.keys){const r=u[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?c.push(r.then(n=>Vi(n,t,e,a))):Vi(r,t,e,a)}return i?Yi(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),Xi=Yr("$ZodObjectJIT",(e,t)=>{Qi.init(e,t);const n=e._zod.parse,r=rs(()=>Ji(t));let s;const i=ps,o=!es.jitless,a=o&&ds.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return i(p)?o&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new gi(["shape","payload","ctx"]),n=r.value,s=e=>{const t=ls(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let o=0;for(const e of n.keys)i[e]="key_"+o++;t.write("const newResult = {};");for(const e of n.keys){const n=i[e],r=ls(e);t.write(`const ${n} = ${s(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?Yi([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function eo(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!Ds(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ks(e,r,ts())))}),t)}const to=Yr("$ZodUnion",(e,t)=>{bi.init(e,t),as(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),as(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),as(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),as(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>is(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>eo(t,s,e,i)):eo(a,s,e,i)}}),no=Yr("$ZodIntersection",(e,t)=>{bi.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([t,n])=>so(e,t,n)):so(e,s,i)}});function ro(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(hs(e)&&hs(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=ro(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=ro(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function so(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Ds(e))return e;const r=ro(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const io=Yr("$ZodRecord",(e,t)=>{bi.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!hs(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const o=t.valueType._zod.run({value:s[e],issues:[]},r);o instanceof Promise?i.push(o.then(t=>{t.issues.length&&n.issues.push(...ws(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...ws(e,o.issues)),n.value[e]=o.value)}let a;for(const e in s)o.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const o of Reflect.ownKeys(s)){if("__proto__"===o)continue;const a=t.keyType._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>ks(e,r,ts())),input:o,path:[o],inst:e}),n.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:s[o],issues:[]},r);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...ws(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...ws(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),oo=Yr("$ZodEnum",(e,t)=>{bi.init(e,t);const n=function(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>gs.has(typeof e)).map(e=>"string"==typeof e?ys(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),ao=Yr("$ZodTransform",(e,t)=>{bi.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Xr(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n));if(s instanceof Promise)throw new Qr;return n.value=s,n}});function co(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const uo=Yr("$ZodOptional",(e,t)=>{bi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",as(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),as(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${is(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>co(t,e.value)):co(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),lo=Yr("$ZodNullable",(e,t)=>{bi.init(e,t),as(e._zod,"optin",()=>t.innerType._zod.optin),as(e._zod,"optout",()=>t.innerType._zod.optout),as(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${is(e.source)}|null)$`):void 0}),as(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),fo=Yr("$ZodDefault",(e,t)=>{bi.init(e,t),e._zod.optin="optional",as(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>po(e,t)):po(r,t)}});function po(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const ho=Yr("$ZodPrefault",(e,t)=>{bi.init(e,t),e._zod.optin="optional",as(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),mo=Yr("$ZodNonOptional",(e,t)=>{bi.init(e,t),as(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>go(t,e)):go(s,e)}});function go(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yo=Yr("$ZodCatch",(e,t)=>{bi.init(e,t),as(e._zod,"optin",()=>t.innerType._zod.optin),as(e._zod,"optout",()=>t.innerType._zod.optout),as(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ks(e,n,ts()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ks(e,n,ts()))},input:e.value}),e.issues=[]),e)}}),bo=Yr("$ZodPipe",(e,t)=>{bi.init(e,t),as(e._zod,"values",()=>t.in._zod.values),as(e._zod,"optin",()=>t.in._zod.optin),as(e._zod,"optout",()=>t.out._zod.optout),as(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>vo(e,t.in,n)):vo(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>vo(e,t.out,n)):vo(r,t.out,n)}});function vo(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Do=Yr("$ZodReadonly",(e,t)=>{bi.init(e,t),as(e._zod,"propValues",()=>t.innerType._zod.propValues),as(e._zod,"values",()=>t.innerType._zod.values),as(e._zod,"optin",()=>t.innerType._zod.optin),as(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(wo):wo(r)}});function wo(e){return e.value=Object.freeze(e.value),e}const _o=Yr("$ZodCustom",(e,t)=>{si.init(e,t),bi.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>ko(t,n,r,e));ko(s,n,r,e)}});function ko(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ss(e))}}class Eo{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}const So=new Eo;function Ao(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...vs(t)})}function Co(e,t){return new ii({check:"max_length",...vs(t),maximum:e})}function Po(e,t){return new oi({check:"min_length",...vs(t),minimum:e})}function Oo(e,t){return new ai({check:"length_equals",...vs(t),length:e})}function xo(e){return new mi({check:"overwrite",tx:e})}const To=Yr("ZodISODateTime",(e,t)=>{$i.init(e,t),ea.init(e,t)});const $o=Yr("ZodISODate",(e,t)=>{Ni.init(e,t),ea.init(e,t)});const No=Yr("ZodISOTime",(e,t)=>{Ri.init(e,t),ea.init(e,t)});const Ro=Yr("ZodISODuration",(e,t)=>{Li.init(e,t),ea.init(e,t)});const Lo=(e,t)=>{Cs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},r={_errors:[]},s=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>s({issues:e}));else if("invalid_key"===t.code)s({issues:t.issues});else if("invalid_element"===t.code)s({issues:t.issues});else if(0===t.path.length)r._errors.push(n(t));else{let e=r,s=0;for(;s<t.path.length;){const r=t.path[s];s===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],s++}}};return s(e),r}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ns,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ns,2)}},isEmpty:{get:()=>0===e.issues.length}})};Yr("ZodError",Lo);const Fo=Yr("ZodError",Lo,{Parent:Error}),Io=Os(Fo),Mo=xs(Fo),jo=Ts(Fo),Bo=Ns(Fo),zo=(Qo=Fo,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Os(Qo)(e,t,r)}),Ho=(e=>(t,n,r)=>Os(e)(t,n,r))(Fo),Ko=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xs(e)(t,n,s)})(Fo),Uo=(e=>async(t,n,r)=>xs(e)(t,n,r))(Fo),qo=(e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ts(e)(t,n,s)})(Fo),Zo=(e=>(t,n,r)=>Ts(e)(t,n,r))(Fo),Go=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ns(e)(t,n,s)})(Fo),Wo=(e=>async(t,n,r)=>Ns(e)(t,n,r))(Fo),Vo=Yr("ZodType",(e,t)=>(bi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(us(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>bs(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Io(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>jo(e,t,n),e.parseAsync=async(t,n)=>Mo(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Bo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>zo(e,t,n),e.decode=(t,n)=>Ho(e,t,n),e.encodeAsync=async(t,n)=>Ko(e,t,n),e.decodeAsync=async(t,n)=>Uo(e,t,n),e.safeEncode=(t,n)=>qo(e,t,n),e.safeDecode=(t,n)=>Zo(e,t,n),e.safeEncodeAsync=async(t,n)=>Go(e,t,n),e.safeDecodeAsync=async(t,n)=>Wo(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new Ua({type:"custom",check:"custom",fn:t,...vs(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new si({check:"custom",...vs(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Ss(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Ss(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(xo(t)),e.optional=()=>Ra(e),e.nullable=()=>Fa(e),e.nullish=()=>Ra(Fa(e)),e.nonoptional=t=>function(e,t){return new ja({type:"nonoptional",innerType:e,...vs(t)})}(e,t),e.array=()=>Sa(e),e.or=t=>Pa([e,t]),e.and=t=>new Oa({type:"intersection",left:e,right:t}),e.transform=t=>Ha(e,new $a({type:"transform",transform:t})),e.default=t=>{return n=t,new Ia({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():ms(n)}});var n},e.prefault=t=>{return n=t,new Ma({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():ms(n)}});var n},e.catch=t=>{return new Ba({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Ha(e,t),e.readonly=()=>new Ka({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return So.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>So.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return So.get(e);const n=e.clone();return So.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Jo=Yr("_ZodString",(e,t)=>{vi.init(e,t),Vo.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new ui({check:"string_format",format:"regex",...vs(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new pi({check:"string_format",format:"includes",...vs(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new di({check:"string_format",format:"starts_with",...vs(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new hi({check:"string_format",format:"ends_with",...vs(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Po(...t)),e.max=(...t)=>e.check(Co(...t)),e.length=(...t)=>e.check(Oo(...t)),e.nonempty=(...t)=>e.check(Po(1,...t)),e.lowercase=t=>e.check(function(e){return new li({check:"string_format",format:"lowercase",...vs(e)})}(t)),e.uppercase=t=>e.check(function(e){return new fi({check:"string_format",format:"uppercase",...vs(e)})}(t)),e.trim=()=>e.check(xo(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return xo(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(xo(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(xo(e=>e.toUpperCase()))}),Yo=Yr("ZodString",(e,t)=>{vi.init(e,t),Jo.init(e,t),e.email=t=>e.check(function(e,t){return new ta({type:"string",format:"email",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new sa({type:"string",format:"url",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new va({type:"string",format:"jwt",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ia({type:"string",format:"emoji",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.guid=t=>e.check(Ao(na,t)),e.uuid=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...vs(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...vs(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ra({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...vs(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new oa({type:"string",format:"nanoid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.guid=t=>e.check(Ao(na,t)),e.cuid=t=>e.check(function(e,t){return new aa({type:"string",format:"cuid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new ca({type:"string",format:"cuid2",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new ua({type:"string",format:"ulid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new ga({type:"string",format:"base64",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new ya({type:"string",format:"base64url",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new la({type:"string",format:"xid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new fa({type:"string",format:"ksuid",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new pa({type:"string",format:"ipv4",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new da({type:"string",format:"ipv6",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new ha({type:"string",format:"cidrv4",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new ma({type:"string",format:"cidrv6",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new ba({type:"string",format:"e164",check:"string_format",abort:!1,...vs(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new To({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...vs(e)})}(t)),e.date=t=>e.check(function(e){return new $o({type:"string",format:"date",check:"string_format",...vs(e)})}(t)),e.time=t=>e.check(function(e){return new No({type:"string",format:"time",check:"string_format",precision:null,...vs(e)})}(t)),e.duration=t=>e.check(function(e){return new Ro({type:"string",format:"duration",check:"string_format",...vs(e)})}(t))});var Qo;function Xo(e){return new Yo({type:"string",...vs(e)})}const ea=Yr("ZodStringFormat",(e,t)=>{Di.init(e,t),Jo.init(e,t)}),ta=Yr("ZodEmail",(e,t)=>{ki.init(e,t),ea.init(e,t)}),na=Yr("ZodGUID",(e,t)=>{wi.init(e,t),ea.init(e,t)}),ra=Yr("ZodUUID",(e,t)=>{_i.init(e,t),ea.init(e,t)}),sa=Yr("ZodURL",(e,t)=>{Ei.init(e,t),ea.init(e,t)}),ia=Yr("ZodEmoji",(e,t)=>{Si.init(e,t),ea.init(e,t)}),oa=Yr("ZodNanoID",(e,t)=>{Ai.init(e,t),ea.init(e,t)}),aa=Yr("ZodCUID",(e,t)=>{Ci.init(e,t),ea.init(e,t)}),ca=Yr("ZodCUID2",(e,t)=>{Pi.init(e,t),ea.init(e,t)}),ua=Yr("ZodULID",(e,t)=>{Oi.init(e,t),ea.init(e,t)}),la=Yr("ZodXID",(e,t)=>{xi.init(e,t),ea.init(e,t)}),fa=Yr("ZodKSUID",(e,t)=>{Ti.init(e,t),ea.init(e,t)}),pa=Yr("ZodIPv4",(e,t)=>{Fi.init(e,t),ea.init(e,t)}),da=Yr("ZodIPv6",(e,t)=>{Ii.init(e,t),ea.init(e,t)}),ha=Yr("ZodCIDRv4",(e,t)=>{Mi.init(e,t),ea.init(e,t)}),ma=Yr("ZodCIDRv6",(e,t)=>{ji.init(e,t),ea.init(e,t)}),ga=Yr("ZodBase64",(e,t)=>{zi.init(e,t),ea.init(e,t)}),ya=Yr("ZodBase64URL",(e,t)=>{Hi.init(e,t),ea.init(e,t)}),ba=Yr("ZodE164",(e,t)=>{Ki.init(e,t),ea.init(e,t)}),va=Yr("ZodJWT",(e,t)=>{Ui.init(e,t),ea.init(e,t)}),Da=Yr("ZodUnknown",(e,t)=>{qi.init(e,t),Vo.init(e,t)});function wa(){return new Da({type:"unknown"})}const _a=Yr("ZodNever",(e,t)=>{Zi.init(e,t),Vo.init(e,t)});function ka(e){return new _a({type:"never",...vs(e)})}const Ea=Yr("ZodArray",(e,t)=>{Wi.init(e,t),Vo.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Po(t,n)),e.nonempty=t=>e.check(Po(1,t)),e.max=(t,n)=>e.check(Co(t,n)),e.length=(t,n)=>e.check(Oo(t,n)),e.unwrap=()=>e.element});function Sa(e,t){return function(e,t,n){return new Ea({type:"array",element:t,...vs(n)})}(0,e,t)}const Aa=Yr("ZodObject",(e,t)=>{Xi.init(e,t),Vo.init(e,t),as(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ta({type:"enum",entries:t,...vs(void 0)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:wa()}),e.loose=()=>e.clone({...e._zod.def,catchall:wa()}),e.strict=()=>e.clone({...e._zod.def,catchall:ka()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!hs(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=us(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return cs(this,"shape",n),n},checks:[]});return bs(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!hs(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return cs(this,"shape",n),n},checks:e._zod.def.checks};return bs(e,n)}(e,t),e.merge=t=>function(e,t){const n=us(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return cs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return bs(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return bs(e,us(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return cs(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=us(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return cs(this,"shape",r),r},checks:[]});return bs(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=us(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return cs(this,"shape",s),s},checks:[]});return bs(t,r)}(Na,e,t[0]),e.required=(...t)=>function(e,t,n){const r=us(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return cs(this,"shape",s),s},checks:[]});return bs(t,r)}(ja,e,t[0])}),Ca=Yr("ZodUnion",(e,t)=>{to.init(e,t),Vo.init(e,t),e.options=t.options});function Pa(e,t){return new Ca({type:"union",options:e,...vs(t)})}const Oa=Yr("ZodIntersection",(e,t)=>{no.init(e,t),Vo.init(e,t)}),xa=Yr("ZodRecord",(e,t)=>{io.init(e,t),Vo.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),Ta=Yr("ZodEnum",(e,t)=>{oo.init(e,t),Vo.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Ta({...t,checks:[],...vs(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Ta({...t,checks:[],...vs(r),entries:s})}}),$a=Yr("ZodTransform",(e,t)=>{ao.init(e,t),Vo.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Xr(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Ss(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Ss(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}}),Na=Yr("ZodOptional",(e,t)=>{uo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ra(e){return new Na({type:"optional",innerType:e})}const La=Yr("ZodNullable",(e,t)=>{lo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Fa(e){return new La({type:"nullable",innerType:e})}const Ia=Yr("ZodDefault",(e,t)=>{fo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Ma=Yr("ZodPrefault",(e,t)=>{ho.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType}),ja=Yr("ZodNonOptional",(e,t)=>{mo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ba=Yr("ZodCatch",(e,t)=>{yo.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),za=Yr("ZodPipe",(e,t)=>{bo.init(e,t),Vo.init(e,t),e.in=t.in,e.out=t.out});function Ha(e,t){return new za({type:"pipe",in:e,out:t})}const Ka=Yr("ZodReadonly",(e,t)=>{Do.init(e,t),Vo.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ua=Yr("ZodCustom",(e,t)=>{_o.init(e,t),Vo.init(e,t)}),qa=Sa(Xo()).default([]).optional(),Za=Pa([Xo(),Sa(Xo())]),Ga=(Wa=Xo(),Va=Za,new xa({type:"record",keyType:Wa,valueType:Va,...vs(undefined)})).optional();var Wa,Va;(function(){const e={type:"object",shape:{stanPath:Xo().min(1,{message:"stanPath must be a non-empty string"}),includes:qa,excludes:qa,imports:Ga}??{},...vs(void 0)};return new Aa(e)})().strict();const Ja=async({cwd:r,stanPath:s,baseName:i,includes:o,excludes:a,updateSnapshot:u="createIfMissing",includeOutputDirInDiff:l=!1,onArchiveWarnings:f})=>{const{outDir:p,diffDir:d}=await ae(r,s),h=await ne(r),m=await ie(h,{cwd:r,stanPath:s,includeOutputDir:!1,includes:o??[],excludes:a??[]}),g=await(async(e,r)=>{const s={};for(const i of r){const r=n.resolve(e,i),o=await t.readFile(r),a=c.createHash("sha256").update(o).digest("hex");s[i]=a}return s})(r,m),y=(e=>n.join(e,".archive.snapshot.json"))(d),b=e.existsSync(y),v=b?JSON.parse(await t.readFile(y,"utf8")):{},D=b?m.filter(e=>!v[e]||v[e]!==g[e]):[...m],{textFiles:w,warningsBody:_}=await $(r,D),k=w;x(_,f);const E=n.join(p,`${i}.diff.tar`),S=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(l)await S.create({file:E,cwd:r,filter:P(s)},O(k,s));else if(0===k.length){const e=(e=>n.join(e,".stan_no_changes"))(d);await t.writeFile(e,"no changes","utf8");const i=[`${s.replace(/\\/g,"/")}/diff/.stan_no_changes`];await S.create({file:E,cwd:r},i)}else{const e=Array.from(new Set([...k]));await S.create({file:E,cwd:r},e)}return"replace"===u?await t.writeFile(y,JSON.stringify(g,null,2),"utf8"):"createIfMissing"!==u||b||await t.writeFile(y,JSON.stringify(g,null,2),"utf8"),{diffPath:E}};var Ya,Qa={},Xa={},ec={};var tc,nc={};var rc,sc,ic={},oc={};var ac,cc,uc,lc,fc,pc,dc={};function hc(){if(lc)return uc;lc=1;var e=cc?ac:(cc=1,ac=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,s=-2,i=-2,o=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==s&&"["===e[n]&&"]"!==e[n+1]&&(s<n&&(s=e.indexOf("]",n)),s>n)){if(-1===a||a>s)return!0;if(-1===(a=e.indexOf("\\",n))||a>s)return!0}if(-1!==i&&"{"===e[n]&&"}"!==e[n+1]&&(i=e.indexOf("}",n))>n&&(-1===(a=e.indexOf("\\",n))||a>i))return!0;if(-1!==o&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(o=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>o))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(o=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>o)))return!0;if("\\"===e[n]){var c=e[n+1];n+=2;var u=t[c];if(u){var l=e.indexOf(u,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var s=t[r];if(s){var i=e.indexOf(s,n);-1!==i&&(n=i+1)}if("!"===e[n])return!0}else n++}return!1};return uc=function(t,s){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var i=n;return s&&!1===s.strict&&(i=r),i(t)}}var mc,gc,yc,bc,vc,Dc,wc,_c,kc,Ec,Sc,Ac,Cc,Pc,Oc,xc,Tc,$c,Nc,Rc={};function Lc(){return mc||(mc=1,(e=Rc).isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,s)=>!1!==s&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=s,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges|0||(e.invalid=!0,0)),e.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges|0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,e.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){const s=e[r];Array.isArray(s)?n(s):void 0!==s&&t.push(s)}return t};return n(e),t}),Rc;var e}function Fc(){if(yc)return gc;yc=1;const e=Lc();return gc=(t,n={})=>{const r=(t,s={})=>{const i=n.escapeInvalid&&e.isInvalidBrace(s),o=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(i||o)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}}function Ic(){if(wc)return Dc;wc=1;const e=vc?bc:(vc=1,bc=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}),t=(n,i,o)=>{if(!1===e(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||n===i)return String(n);if(!1===e(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...o};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let u=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(u-l)){let e=n+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=f(n)||f(i),d={min:n,max:i,a:u,b:l},h=[],m=[];return p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0&&(m=r(l<0?Math.abs(l):1,Math.abs(u),d,a),u=d.a=0),l>=0&&(h=r(u,l,d,a)),d.negatives=m,d.positives=h,d.result=function(e,t){let n=s(e,t,"-",!1)||[],r=s(t,e,"",!1)||[],i=s(e,t,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(m,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+m.length>1&&(d.result=`(?:${d.result})`),t.cache[c]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),s=r.length,i="",o=0;for(let e=0;e<s;e++){let[t,n]=r[e];t===n?i+=t:"0"!==t||"9"!==n?i+=l(t,n):o++}return o&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:s}}function r(e,t,r,s){let o,l=function(e,t){let n=1,r=1,s=a(e,n),o=new Set([t]);for(;e<=s&&s<=t;)o.add(s),n+=1,s=a(e,n);for(s=c(t+1,r)-1;e<s&&s<=t;)o.add(s),r+=1,s=c(t+1,r)-1;return o=[...o],o.sort(i),o}(e,t),f=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],i=n(String(d),String(t),s),a="";r.isPadded||!o||o.pattern!==i.pattern?(r.isPadded&&(a=p(t,r,s)),i.string=a+i.pattern+u(i.count),f.push(i),d=t+1,o=i):(o.count.length>1&&o.count.pop(),o.count.push(i.count[0]),o.string=o.pattern+u(o.count),d=t+1)}return f}function s(e,t,n,r,s){let i=[];for(let s of e){let{string:e}=s;r||o(t,"string",e)||i.push(n+e),r&&o(t,"string",e)&&i.push(n+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function o(e,t,n){return e.some(e=>e[t]===n)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function l(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function f(e){return/^-?(0+)\d/.test(e)}function p(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),s=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},Dc=t}function Mc(){if(kc)return _c;kc=1;const e=p,t=Ic(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),i=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},o=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},a=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},c=(e,n,r,s)=>{if(r)return t(e,n,{wrap:!1,...s});let i=String.fromCharCode(e);return e===n?i:`[${i}-${String.fromCharCode(n)}]`},u=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),f=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},d=(e,t,n=1,r={})=>{let s=Number(e),f=Number(t);if(!Number.isInteger(s)||!Number.isInteger(f)){if(!0===r.strictRanges)throw l([e,t]);return[]}0===s&&(s=0),0===f&&(f=0);let p=s>f,d=String(e),h=String(t),m=String(n);n=Math.max(Math.abs(n),1);let g=i(d)||i(h)||i(m),y=g?Math.max(d.length,h.length,m.length):0,b=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),v=r.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(r.toRegex&&1===n)return c(a(e,y),a(t,y),!0,r);let D={negatives:[],positives:[]},w=e=>D[e<0?"negatives":"positives"].push(Math.abs(e)),_=[],k=0;for(;p?s>=f:s<=f;)!0===r.toRegex&&n>1?w(s):_.push(o(v(s,k),y,b)),s=p?s-n:s+n,k++;return!0===r.toRegex?n>1?((e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,s=t.capture?"":"?:",i="",o="";return e.positives.length&&(i=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(o=`-(${s}${e.negatives.map(e=>a(String(e),n)).join("|")})`),r=i&&o?`${i}|${o}`:i||o,t.wrap?`(${s}${r})`:r})(D,r,y):u(_,null,{wrap:!1,...r}):_},h=(e,t,i,o={})=>{if(null==t&&r(e))return[e];if(!r(e)||!r(t))return f(e,t,o);if("function"==typeof i)return h(e,t,1,{transform:i});if(n(i))return h(e,t,0,i);let a={...o};return!0===a.capture&&(a.wrap=!0),i=i||a.step||1,s(i)?s(e)&&s(t)?d(e,t,i,a):((e,t,n=1,r={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return f(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),o=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=o>a,p=Math.min(o,a),d=Math.max(o,a);if(r.toRegex&&1===n)return c(p,d,!1,r);let h=[],m=0;for(;l?o>=a:o<=a;)h.push(i(o,m)),o=l?o-n:o+n,m++;return!0===r.toRegex?u(h,null,{wrap:!1,options:r}):h})(e,t,Math.max(Math.abs(i),1),a):null==i||n(i)?h(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return _c=h}function jc(){if(Nc)return $c;Nc=1;const e=Fc(),t=function(){if(Sc)return Ec;Sc=1;const e=Mc(),t=Lc();return Ec=(n,r={})=>{const s=(n,i={})=>{const o=t.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,c=!0===o||!0===a,u=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return u+n.value;if(!0===n.isClose)return console.log("node.isClose",u,n.value),u+n.value;if("open"===n.type)return c?u+n.value:"(";if("close"===n.type)return c?u+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const s=t.reduce(n.nodes),i=e(...s,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return s.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const e of n.nodes)l+=s(e,n);return l};return s(n)}}(),n=function(){if(Cc)return Ac;Cc=1;const e=Mc(),t=Fc(),n=Lc(),r=(e="",t="",s=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return s?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)i.push(r(e,t,s));else for(let e of t)!0===s&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?r(n,e,s):n+e);return n.flatten(i)};return Ac=(s,i={})=>{const o=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(s,c={})=>{s.queue=[];let u=c,l=c.queue;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar)return void l.push(r(l.pop(),t(s,i)));if("brace"===s.type&&!0!==s.invalid&&2===s.nodes.length)return void l.push(r(l.pop(),["{}"]));if(s.nodes&&s.ranges>0){const a=n.reduce(s.nodes);if(n.exceedsLimit(...a,i.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(s,i)),l.push(r(l.pop(),c)),void(s.nodes=[])}const f=n.encloseBrace(s);let p=s.queue,d=s;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,p=d.queue;for(let e=0;e<s.nodes.length;e++){const t=s.nodes[e];"comma"!==t.type||"brace"!==s.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(r(p.pop(),t.value)):t.nodes&&a(t,s):l.push(r(l.pop(),p,f)):(1===e&&p.push(""),p.push(""))}return p};return n.flatten(a(s))},Ac}(),r=function(){if(Tc)return xc;Tc=1;const e=Fc(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:m}=Oc?Pc:(Oc=1,Pc={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return xc=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const D={type:"root",input:g,nodes:[]},w=[D];let _=D,k=D,E=0;const S=g.length;let A,C=0,P=0;const O=()=>g[C++],x=e=>{if("text"===e.type&&"dot"===k.type&&(k.type="text"),!k||"text"!==k.type||"text"!==e.type)return _.nodes.push(e),e.parent=_,e.prev=k,k=e,e;k.value+=e.value};for(x({type:"bos"});C<S;)if(_=w[w.length-1],A=O(),A!==m&&A!==h)if(A!==n)if(A!==f){if(A===l){let e;for(E++;C<S&&(e=O());)if(A+=e,e!==l)if(e!==n){if(e===f&&(E--,0===E))break}else A+=O();else E++;x({type:"text",value:A});continue}if(A!==o)if(A!==a){if(A===p||A===d||A===r){const e=A;let t;for(!0!==y.keepQuotes&&(A="");C<S&&(t=O());)if(t!==n){if(t===e){!0===y.keepQuotes&&(A+=t);break}A+=t}else A+=t+O();x({type:"text",value:A});continue}if(A===c){P++;const e=k.value&&"$"===k.value.slice(-1)||!0===_.dollar;_=x({type:"brace",open:!0,close:!1,dollar:e,depth:P,commas:0,ranges:0,nodes:[]}),w.push(_),x({type:"open",value:A});continue}if(A===u){if("brace"!==_.type){x({type:"text",value:A});continue}const e="close";_=w.pop(),_.close=!0,x({type:e,value:A}),P--,_=w[w.length-1];continue}if(A===s&&P>0){if(_.ranges>0){_.ranges=0;const t=_.nodes.shift();_.nodes=[t,{type:"text",value:e(_)}]}x({type:"comma",value:A}),_.commas++}else{if(A===i&&P>0&&0===_.commas){const e=_.nodes;if(0===P||0===e.length){x({type:"text",value:A});continue}if("dot"===k.type){if(_.range=[],k.value+=A,k.type="range",3!==_.nodes.length&&5!==_.nodes.length){_.invalid=!0,_.ranges=0,k.type="text";continue}_.ranges++,_.args=[];continue}if("range"===k.type){e.pop();const t=e[e.length-1];t.value+=k.value+A,k=t,_.ranges--;continue}x({type:"dot",value:A});continue}x({type:"text",value:A})}}else{if("paren"!==_.type){x({type:"text",value:A});continue}_=w.pop(),x({type:"text",value:A}),_=w[w.length-1]}else _=x({type:"paren",nodes:[]}),w.push(_),x({type:"text",value:A})}else x({type:"text",value:"\\"+A});else x({type:"text",value:(y.keepEscaping?A:"")+O()});do{if(_=w.pop(),"root"!==_.type){_.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=w[w.length-1],t=e.nodes.indexOf(_);e.nodes.splice(t,1,..._.nodes)}}while(w.length>0);return x({type:"eos"}),D},xc}(),s=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=s.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return s.parse=(e,t={})=>r(e,t),s.stringify=(t,n={})=>e("string"==typeof t?s.parse(t,n):t,n),s.compile=(e,n={})=>("string"==typeof e&&(e=s.parse(e,n)),t(e,n)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),$c=s}var Bc,zc,Hc,Kc,Uc,qc,Zc,Gc,Wc,Vc,Jc,Yc,Qc,Xc,eu={};function tu(){if(zc)return Bc;zc=1;const e=f,t="\\\\/",n=`[^${t}]`,r="\\.",s="\\/",i="[^/]",o=`(?:${s}|$)`,a=`(?:^|${s})`,c=`${r}{1,2}${o}`,u={DOT_LITERAL:r,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!${r})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${r}{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:a},l={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${t}])${r}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return Bc={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{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"},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:{"***":"*","**/**":"**","**/**/**":"**"},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,SEP:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?l:u}}function nu(){return Hc||(Hc=1,function(e){const t=f,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=tu();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>i.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(o,"\\$1"),e.toPosixSlashes=e=>e.replace(r,"/"),e.removeBackslashes=e=>e.replace(s,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(eu)),eu}function ru(){return Jc?Vc:(Jc=1,Vc=function(){if(Wc)return Gc;Wc=1;const e=f,t=function(){if(Uc)return Kc;Uc=1;const e=nu(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=tu(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Kc=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,k=[],E=[],S=[];let A,C,P=b,O=-1,x=0,T=0,$=!1,N=!1,R=!1,L=!1,F=!1,I=!1,M=!1,j=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const U=()=>O>=w,q=()=>P.charCodeAt(O+1),Z=()=>(A=C,P.charCodeAt(++O));for(;O<w;){let e;if(C=Z(),C!==r){if(!0===I||C===c){for(H++;!0!==U()&&(C=Z());)if(C!==r)if(C!==c){if(!0!==I&&C===i&&(C=Z())===i){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,$=K.isBrace=!0,z=!0;break}}else H++;else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===o)&&q()===u){if(R=K.isGlob=!0,L=K.isExtglob=!0,z=!0,C===o&&O===x&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(R=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==U()&&(e=Z());)if(e!==r){if(e===m){N=K.isBracket=!0,R=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==x){if(!0!==D.noparen&&C===u){if(R=K.isGlob=!0,!0===_){for(;!0!==U()&&(C=Z());)if(C!==u){if(C===h){z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(!0===R){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,x++}else{if(k.push(O),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===x+1){x+=2;continue}T=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(L=!1,R=!1);let G=P,W="",V="";x>0&&(W=P.slice(0,x),P=P.slice(x),T-=x),G&&!0===R&&T>0?(G=P.slice(0,T),V=P.slice(T)):!0===R?(G="",V=P):G=P,G&&""!==G&&"/"!==G&&G!==P&&g(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===D.unescape&&(V&&(V=e.removeBackslashes(V)),G&&!0===M&&(G=e.removeBackslashes(G)));const J={prefix:W,input:b,start:x,base:G,glob:V,isBrace:$,isBracket:N,isGlob:R,isExtglob:L,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(J.maxDepth=0,g(C)||E.push(K),J.tokens=E),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<k.length;t++){const n=e?e+1:x,r=k[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==x?(E[t].isPrefix=!0,E[t].value=W):E[t].value=s,y(E[t]),J.maxDepth+=E[t].depth),0===t&&""===s||S.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);S.push(t),D.tokens&&(E[E.length-1].value=t,y(E[E.length-1]),J.maxDepth+=E[E.length-1].depth)}J.slashes=k,J.parts=S}return J},Kc}(),n=function(){if(Zc)return qc;Zc=1;const e=tu(),t=nu(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=t.isWindows(f),v=e.globChars(b),D=e.extglobChars(v),{DOT_LITERAL:w,PLUS_LITERAL:_,SLASH_LITERAL:k,ONE_CHAR:E,DOTS_SLASH:S,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:P,QMARK:O,QMARK_NO_DOT:x,STAR:T,START_ANCHOR:$}=v,N=e=>`(${y}(?:(?!${$}${e.dot?S:w}).)*?)`,R=p.dot?"":A,L=p.dot?O:x;let F=!0===p.bash?N(p):T;p.capture&&(F=`(${F})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const I={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,I),h=l.length;const M=[],j=[],B=[];let z,H=m;const K=()=>I.index===h-1,U=I.peek=(e=1)=>l[I.index+e],q=I.advance=()=>l[++I.index]||"",Z=()=>l.slice(I.index+1),G=(e="",t=0)=>{I.consumed+=e,I.index+=t},W=e=>{I.output+=null!=e.output?e.output:e.value,G(e.value)},V=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)q(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},J=e=>{I[e]++,B.push(e)},Y=e=>{I[e]--,B.pop()},Q=e=>{if("globstar"===H.type){const t=I.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||M.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(I.output=I.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=F,I.output+=H.output)}if(M.length&&"paren"!==e.type&&(M[M.length-1].inner+=e.value),(e.value||e.output)&&W(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,g.push(e),H=e},X=(e,t)=>{const n={...D[t],conditions:1,inner:""};n.prev=H,n.parens=I.parens,n.output=I.output;const r=(p.capture?"(":"")+n.open;J("parens"),Q({type:e,value:t,output:I.output?"":E}),Q({type:"paren",extglob:!0,value:q(),output:r}),M.push(n)},ee=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=F;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=N(p)),(r!==F||K()||/^\)+$/.test(Z()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=Z())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(I.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:z,output:n}),Y("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,s,i,o)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(i?O.repeat(i.length):""):0===o?L+(i?O.repeat(i.length):""):O.repeat(r.length):"."===s?w.repeat(r.length):"*"===s?n?n+s+(i?F:""):F:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(I.output=l,I):(I.output=t.wrapOutput(n,I,f),I)}for(;!K();){if(z=q(),"\0"===z)continue;if("\\"===z){const e=U();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){z+="\\",Q({type:"text",value:z});continue}const t=/^\\+/.exec(Z());let n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(z+="\\")),!0===p.unescape?z=q():z+=q(),0===I.brackets){Q({type:"text",value:z});continue}}if(I.brackets>0&&("]"!==z||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===z){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),s=r[n];if(s){H.value=t+s,I.backtrack=!0,q(),m.output||1!==g.indexOf(H)||(m.output=E);continue}}}("["===z&&":"!==U()||"-"===z&&"]"===U())&&(z=`\\${z}`),"]"!==z||"["!==H.value&&"[^"!==H.value||(z=`\\${z}`),!0===p.posix&&"!"===z&&"["===H.value&&(z="^"),H.value+=z,W({value:z});continue}if(1===I.quotes&&'"'!==z){z=t.escapeRegex(z),H.value+=z,W({value:z});continue}if('"'===z){I.quotes=1===I.quotes?0:1,!0===p.keepQuotes&&Q({type:"text",value:z});continue}if("("===z){J("parens"),Q({type:"paren",value:z});continue}if(")"===z){if(0===I.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=M[M.length-1];if(e&&I.parens===e.parens+1){ee(M.pop());continue}Q({type:"paren",value:z,output:I.parens?")":"\\)"}),Y("parens");continue}if("["===z){if(!0!==p.nobracket&&Z().includes("]"))J("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));z=`\\${z}`}Q({type:"bracket",value:z});continue}if("]"===z){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){Q({type:"text",value:z,output:`\\${z}`});continue}if(0===I.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Q({type:"text",value:z,output:`\\${z}`});continue}Y("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(z=`/${z}`),H.value+=z,W({value:z}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(I.output=I.output.slice(0,-H.value.length),!0===p.literalBrackets){I.output+=n,H.value=n;continue}H.value=`(${y}${n}|${H.value})`,I.output+=H.value;continue}if("{"===z&&!0!==p.nobrace){J("braces");const e={type:"brace",value:z,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};j.push(e),Q(e);continue}if("}"===z){const e=j[j.length-1];if(!0===p.nobrace||!e){Q({type:"text",value:z,output:z});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),I.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{",z=t="\\}",I.output=n;for(const e of r)I.output+=e.output||e.value}Q({type:"brace",value:z,output:t}),Y("braces"),j.pop();continue}if("|"===z){M.length>0&&M[M.length-1].conditions++,Q({type:"text",value:z});continue}if(","===z){let e=z;const t=j[j.length-1];t&&"braces"===B[B.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:z,output:e});continue}if("/"===z){if("dot"===H.type&&I.index===I.start+1){I.start=I.index+1,I.consumed="",I.output="",g.pop(),H=m;continue}Q({type:"slash",value:z,output:k});continue}if("."===z){if(I.braces>0&&"dot"===H.type){"."===H.value&&(H.output=w);const e=j[j.length-1];H.type="dots",H.output+=z,H.value+=z,e.dots=!0;continue}if(I.braces+I.parens===0&&"bos"!==H.type&&"slash"!==H.type){Q({type:"text",value:z,output:w});continue}Q({type:"dot",value:z,output:w});continue}if("?"===z){if((!H||"("!==H.value)&&!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("qmark",z);continue}if(H&&"paren"===H.type){const e=U();let n=z;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(Z()))&&(n=`\\${z}`),Q({type:"text",value:z,output:n});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){Q({type:"qmark",value:z,output:x});continue}Q({type:"qmark",value:z,output:O});continue}if("!"===z){if(!0!==p.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){X("negate",z);continue}if(!0!==p.nonegate&&0===I.index){V();continue}}if("+"===z){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("plus",z);continue}if(H&&"("===H.value||!1===p.regex){Q({type:"plus",value:z,output:_});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||I.parens>0){Q({type:"plus",value:z});continue}Q({type:"plus",value:_});continue}if("@"===z){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){Q({type:"at",extglob:!0,value:z,output:""});continue}Q({type:"text",value:z});continue}if("*"!==z){"$"!==z&&"^"!==z||(z=`\\${z}`);const e=s.exec(Z());e&&(z+=e[0],I.index+=e[0].length),Q({type:"text",value:z});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=z,H.output=F,I.backtrack=!0,I.globstar=!0,G(z);continue}let e=Z();if(!0!==p.noextglob&&/^\([^?]/.test(e)){X("star",z);continue}if("star"===H.type){if(!0===p.noglobstar){G(z);continue}const t=H.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Q({type:"star",value:z,output:""});continue}const i=I.braces>0&&("comma"===t.type||"brace"===t.type),o=M.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!o){Q({type:"star",value:z,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[I.index+4];if(t&&"/"!==t)break;e=e.slice(3),G("/**",3)}if("bos"===t.type&&K()){H.type="globstar",H.value+=z,H.output=N(p),I.output=H.output,I.globstar=!0,G(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&K()){I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=N(p)+(p.strictSlashes?")":"|$)"),H.value+=z,I.globstar=!0,I.output+=t.output+H.output,G(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${N(p)}${k}|${k}${n})`,H.value+=z,I.output+=t.output+H.output,I.globstar=!0,G(z+q()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=z,H.output=`(?:^|${k}|${N(p)}${k})`,I.output=H.output,I.globstar=!0,G(z+q()),Q({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-H.output.length),H.type="globstar",H.output=N(p),H.value+=z,I.output+=H.output,I.globstar=!0,G(z);continue}const n={type:"star",value:z,output:F};!0!==p.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==p.regex?(I.index!==I.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(I.output+=C,H.output+=C):!0===p.dot?(I.output+=P,H.output+=P):(I.output+=R,H.output+=R),"*"!==U()&&(I.output+=E,H.output+=E)),Q(n)):(n.output=z,Q(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=R+n.output),Q(n))}for(;I.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));I.output=t.escapeLast(I.output,"["),Y("brackets")}for(;I.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));I.output=t.escapeLast(I.output,"("),Y("parens")}for(;I.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));I.output=t.escapeLast(I.output,"{"),Y("braces")}if(!0===p.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Q({type:"maybe_slash",value:"",output:`${k}?`}),!0===I.backtrack){I.output="";for(const e of I.tokens)I.output+=null!=e.output?e.output:e.value,e.suffix&&(I.output+=e.suffix)}return I};return u.fastpaths=(r,s)=>{const i={...s},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=o[r]||r;const u=t.isWindows(s),{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(u),v=i.dot?m:h,D=i.dot?g:h,w=i.capture?"":"?:";let _=!0===i.bash?".*?":y;i.capture&&(_=`(${_})`);const k=e=>!0===e.noglobstar?_:`(${w}(?:(?!${b}${e.dot?d:l}).)*?)`,E=e=>{switch(e){case"*":return`${v}${p}${_}`;case".*":return`${l}${p}${_}`;case"*.*":return`${v}${_}${l}${p}${_}`;case"*/*":return`${v}${_}${f}${p}${D}${_}`;case"**":return v+k(i);case"**/*":return`(?:${v}${k(i)}${f})?${D}${p}${_}`;case"**/*.*":return`(?:${v}${k(i)}${f})?${D}${_}${l}${p}${_}`;case"**/.*":return`(?:${v}${k(i)}${f})?${l}${p}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+l+t[2]}}},S=t.removePrefix(r,{negated:!1,prefix:""});let A=E(S);return A&&!0!==i.strictSlashes&&(A+=`${f}?`),A},qc=u}(),r=nu(),s=tu(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>i(e,t,n)),s=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return s}const s=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=r.isWindows(t),u=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=u.state;delete u.state;let f=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};f=i(a.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:s,match:o,output:p}=i.test(n,u,t,{glob:e,posix:c}),d={glob:e,state:l,regex:u,posix:c,input:n,output:p,match:o,isMatch:s};return"function"==typeof a.onResult&&a.onResult(d),!1===s?(d.isMatch=!1,!!r&&d):f(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof a.onMatch&&a.onMatch(d),!r||d)};return n&&(p.state=l),p};return i.test=(e,t,n,{glob:s,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},c=a.format||(o?r.toPosixSlashes:null);let u=e===s,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===s),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},i.matchBase=(t,n,s,o=r.isWindows(s))=>(n instanceof RegExp?n:i.makeRe(n,s)).test(e.basename(t)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,t)=>Array.isArray(e)?e.map(e=>i.parse(e,t)):n(e,{...t,fastpaths:!1}),i.scan=(e,n)=>t(e,n),i.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const s=t||{},o=s.contains?"":"^",a=s.contains?"":"$";let c=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=i.toRegex(c,t);return!0===r&&(u.state=e),u},i.makeRe=(e,t={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=n.fastpaths(e,t)),o.output||(o=n(e,t)),i.compileRe(o,t,r,s)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,Gc=i}())}var su,iu,ou,au={};function cu(){if(iu)return su;iu=1;const e=d.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,s=t.length;e<s;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return su=function(){const r=[],s=t.call(arguments);let i=!1,o=s[s.length-1];o&&!Array.isArray(o)&&null==o.pipe?s.pop():o={};const a=!1!==o.end,c=!0===o.pipeError;null==o.objectMode&&(o.objectMode=!0),null==o.highWaterMark&&(o.highWaterMark=65536);const u=e(o);function l(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],o));return f(),this}function f(){if(i)return;i=!0;let e=r.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(i=!1,f())}function s(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",r),n()}function r(e){u.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",r),e.pipe(u,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)s(e[t]);n()}function p(){i=!1,u.emit("queueDrain"),a&&u.end()}return u.setMaxListeners(0),u.add=l,u.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),s.length&&l.apply(null,s),u},su}var uu,lu,fu,pu={};function du(){if(lu)return Xa;lu=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.string=Xa.stream=Xa.pattern=Xa.path=Xa.fs=Xa.errno=Xa.array=void 0;const e=(Ya||(Ya=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.splitWhen=ec.flatten=void 0,ec.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},ec.splitWhen=function(e,t){const n=[[]];let r=0;for(const s of e)t(s)?(r++,n[r]=[]):n[r].push(s);return n}),ec);Xa.array=e;const t=(tc||(tc=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.isEnoentCodeError=void 0,nc.isEnoentCodeError=function(e){return"ENOENT"===e.code}),nc);Xa.errno=t;const n=function(){if(rc)return ic;rc=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return ic.createDirentFromStats=function(t,n){return new e(t,n)},ic}();Xa.fs=n;const r=function(){if(sc)return oc;sc=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.convertPosixPathToPattern=oc.convertWindowsPathToPattern=oc.convertPathToPattern=oc.escapePosixPath=oc.escapeWindowsPath=oc.escape=oc.removeLeadingDotSegment=oc.makeAbsolute=oc.unixify=void 0;const e=f,t="win32"===l.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,r=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,s=/^\\\\([.?])/,i=/\\(?![!()+@[\]{}])/g;function o(e){return e.replace(r,"\\$2")}function a(e){return e.replace(n,"\\$2")}function c(e){return o(e).replace(s,"//$1").replace(i,"/")}function u(e){return a(e)}return oc.unixify=function(e){return e.replace(/\\/g,"/")},oc.makeAbsolute=function(t,n){return e.resolve(t,n)},oc.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},oc.escape=t?o:a,oc.escapeWindowsPath=o,oc.escapePosixPath=a,oc.convertPathToPattern=t?c:u,oc.convertWindowsPathToPattern=c,oc.convertPosixPathToPattern=u,oc}();Xa.path=r;const s=function(){if(Xc)return dc;Xc=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.isAbsolute=dc.partitionAbsoluteAndRelative=dc.removeDuplicateSlashes=dc.matchAny=dc.convertPatternsToRe=dc.makeRe=dc.getPatternParts=dc.expandBraceExpansion=dc.expandPatternsWithBraceExpansion=dc.isAffectDepthOfReadingPattern=dc.endsWithSlashGlobStar=dc.hasGlobStar=dc.getBaseDirectory=dc.isPatternRelatedToParentDirectory=dc.getPatternsOutsideCurrentDirectory=dc.getPatternsInsideCurrentDirectory=dc.getPositivePatterns=dc.getNegativePatterns=dc.isPositivePattern=dc.isNegativePattern=dc.convertToNegativePattern=dc.convertToPositivePattern=dc.isDynamicPattern=dc.isStaticPattern=void 0;const e=f,t=function(){if(pc)return fc;pc=1;var e=hc(),t=f.posix.dirname,n="win32"===l.platform(),r=/\\/g,s=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return fc=function(a,c){Object.assign({flipBackslashes:!0},c).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(r,"/")),s.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||i.test(a));return a.replace(o,"$1")}}(),n=function(){if(Qc)return Yc;Qc=1;const e=p,t=jc(),n=ru(),r=nu(),s=e=>""===e||"./"===e,i=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},o=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let s=new Set,i=new Set,o=new Set,a=0,c=e=>{o.add(e.output),r&&r.onResult&&r.onResult(e)};for(let o=0;o<t.length;o++){let u=n(String(t[o]),{...r,onResult:c},!0),l=u.state.negated||u.state.negatedExtglob;l&&a++;for(let t of e){let e=u(t,!0);(l?!e.isMatch:e.isMatch)&&(l?s.add(e.output):(s.delete(e.output),i.add(e.output)))}}let u=(a===t.length?[...o]:[...i]).filter(e=>!s.has(e));if(r&&0===u.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return u};return o.match=o,o.matcher=(e,t)=>n(e,t),o.any=o.isMatch=(e,t,r)=>n(t,r)(e),o.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,s=[],i=new Set(o(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),s.push(e.output)}}));for(let e of s)i.has(e)||r.add(e);return[...r]},o.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>o.contains(t,e,r));if("string"==typeof n){if(s(t)||s(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return o.isMatch(t,n,{...r,contains:!0})},o.matchKeys=(e,t,n)=>{if(!r.isObject(e))throw new TypeError("Expected the first argument to be an object");let s=o(Object.keys(e),t,n),i={};for(let t of s)i[t]=e[t];return i},o.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(s.some(e=>t(e)))return!0}return!1},o.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!s.every(e=>t(e)))return!1}return!0},o.all=(t,r,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,s)(t))},o.capture=(e,t,s)=>{let i=r.isWindows(s),o=n.makeRe(String(e),{...s,capture:!0}).exec(i?r.toPosixSlashes(t):t);if(o)return o.slice(1).map(e=>void 0===e?"":e)},o.makeRe=(...e)=>n.makeRe(...e),o.scan=(...e)=>n.scan(...e),o.parse=(e,r)=>{let s=[];for(let i of[].concat(e||[]))for(let e of t(String(i),r))s.push(n.parse(e,r));return s},o.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(e)?[e]:t(e,n)},o.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return o.braces(e,{...t,expand:!0})},o.hasBraces=i,Yc=o}(),r=/[*?]|^!/,s=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!d(e,t)}function d(e,t={}){return!(""===e||!(!1===t.caseSensitiveMatch||e.includes("\\")||r.test(e)||s.test(e)||i.test(e)||!1!==t.extglob&&o.test(e)||!1!==t.braceExpansion&&function(e){const t=e.indexOf("{");if(-1===t)return!1;const n=e.indexOf("}",t+1);if(-1===n)return!1;const r=e.slice(t,n);return a.test(r)}(e)))}function h(e){return e.startsWith("!")&&"("!==e[1]}function m(e){return!h(e)}function g(e){return e.startsWith("..")||e.startsWith("./..")}function y(e){return e.endsWith("/**")}function b(e){const t=n.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function v(e,t){return n.makeRe(e,t)}function D(t){return e.isAbsolute(t)}return dc.isStaticPattern=u,dc.isDynamicPattern=d,dc.convertToPositivePattern=function(e){return h(e)?e.slice(1):e},dc.convertToNegativePattern=function(e){return"!"+e},dc.isNegativePattern=h,dc.isPositivePattern=m,dc.getNegativePatterns=function(e){return e.filter(h)},dc.getPositivePatterns=function(e){return e.filter(m)},dc.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!g(e))},dc.getPatternsOutsideCurrentDirectory=function(e){return e.filter(g)},dc.isPatternRelatedToParentDirectory=g,dc.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},dc.hasGlobStar=function(e){return e.includes("**")},dc.endsWithSlashGlobStar=y,dc.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return y(t)||u(n)},dc.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(b(t)),[])},dc.expandBraceExpansion=b,dc.getPatternParts=function(e,t){let{parts:r}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},dc.makeRe=v,dc.convertPatternsToRe=function(e,t){return e.map(e=>v(e,t))},dc.matchAny=function(e,t){return t.some(t=>t.test(e))},dc.removeDuplicateSlashes=function(e){return e.replace(c,"/")},dc.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)D(r)?t.push(r):n.push(r);return[t,n]},dc.isAbsolute=D,dc}();Xa.pattern=s;const i=function(){if(ou)return au;ou=1,Object.defineProperty(au,"__esModule",{value:!0}),au.merge=void 0;const e=cu();function t(e){e.forEach(e=>e.emit("close"))}return au.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},au}();Xa.stream=i;const o=(uu||(uu=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.isEmpty=pu.isString=void 0,pu.isString=function(e){return"string"==typeof e},pu.isEmpty=function(e){return""===e}),pu);return Xa.string=o,Xa}var hu,mu={},gu={},yu={},bu={},vu={},Du={},wu={},_u={},ku={};var Eu,Su,Au,Cu,Pu,Ou,xu,Tu,$u={},Nu={},Ru={};function Lu(){if(Cu)return _u;Cu=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.statSync=_u.stat=_u.Settings=void 0;const e=function(){if(hu)return ku;function e(e,t){e(t)}function t(e,t){e(null,t)}return hu=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.read=void 0,ku.read=function(n,r,s){r.fs.lstat(n,(i,o)=>{null===i?o.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(s,n):void t(s,o);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(s,i)}):t(s,o):e(s,i)})},ku}(),t=(Eu||(Eu=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.read=void 0,$u.read=function(e,t){const n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{const n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}),$u),n=function(){if(Au)return Nu;Au=1,Object.defineProperty(Nu,"__esModule",{value:!0});const e=(Su||(Su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=m;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Ru)),Ru);return Nu.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},Nu}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return _u.Settings=n.default,_u.stat=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},_u.statSync=function(e,n){const s=r(n);return t.read(e,s)},_u}var Fu,Iu={};function Mu(){if(Fu)return Iu;Fu=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),n=Number.parseInt(e[1],10),r=t>10,s=10===t&&n>=10;return Iu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,Iu}var ju,Bu,zu={},Hu={};function Ku(){if(Bu)return zu;Bu=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.fs=void 0;const e=function(){if(ju)return Hu;ju=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return Hu.createDirentFromStats=function(t,n){return new e(t,n)},Hu}();return zu.fs=e,zu}var Uu,qu,Zu={};function Gu(){return Uu||(Uu=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.joinPathSegments=void 0,Zu.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),Zu}function Wu(){if(qu)return wu;qu=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.readdir=wu.readdirWithFileTypes=wu.read=void 0;const e=Lu(),t=function(){if(Tu)return xu;Tu=1,xu=function(t,n){let r,s,i,o=!0;function a(t){function s(){n&&n(t,r),n=null}o?e(s):s()}function c(e,t,n){r[e]=n,(0===--s||t)&&a(t)}Array.isArray(t)?(r=[],s=t.length):(i=Object.keys(t),r={},s=i.length),s?i?i.forEach(function(e){t[e](function(t,n){c(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):a(null),o=!1};const e=function(){if(Ou)return Pu;let e;return Ou=1,Pu="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:N):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return xu}(),n=Mu(),r=Ku(),s=Gu();function i(e,n,i){n.fs.readdir(e,{withFileTypes:!0},(o,u)=>{if(null!==o)return void a(i,o);const l=u.map(t=>({dirent:t,name:t.name,path:s.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void c(i,l);const f=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(s,i)=>{if(null!==s)return t.throwErrorOnBrokenSymbolicLink?void n(s):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,i),n(null,e)}):n(null,e)}}(e,n));t(f,(e,t)=>{null===e?c(i,t):a(i,e)})})}function o(n,i,o){i.fs.readdir(n,(u,l)=>{if(null!==u)return void a(o,u);const f=l.map(t=>{const o=s.joinPathSegments(n,t,i.pathSegmentSeparator);return n=>{e.stat(o,i.fsStatSettings,(e,s)=>{if(null!==e)return void n(e);const a={name:t,path:o,dirent:r.fs.createDirentFromStats(t,s)};i.stats&&(a.stats=s),n(null,a)})}});t(f,(e,t)=>{null===e?c(o,t):a(o,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return wu.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t,r):i(e,t,r)},wu.readdirWithFileTypes=i,wu.readdir=o,wu}var Vu,Ju,Yu,Qu,Xu={},el={},tl={};function nl(){if(Qu)return Du;Qu=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.Settings=Du.scandirSync=Du.scandir=void 0;const e=Wu(),t=function(){if(Vu)return Xu;Vu=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.readdir=Xu.readdirWithFileTypes=Xu.read=void 0;const e=Lu(),t=Mu(),n=Ku(),r=Gu();function s(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(s=>{const i={dirent:s,name:s.name,path:r.joinPathSegments(e,s.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=n.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,s){return s.fs.readdirSync(t).map(i=>{const o=r.joinPathSegments(t,i,s.pathSegmentSeparator),a=e.statSync(o,s.fsStatSettings),c={name:i,path:o,dirent:n.fs.createDirentFromStats(i,a)};return s.stats&&(c.stats=a),c})}return Xu.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,n):i(e,n)},Xu.readdirWithFileTypes=s,Xu.readdir=i,Xu}(),n=function(){if(Yu)return el;Yu=1,Object.defineProperty(el,"__esModule",{value:!0});const e=f,t=Lu(),n=(Ju||(Ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=m;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(tl)),tl);return el.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},el}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Du.Settings=n.default,Du.scandir=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Du.scandirSync=function(e,n){const s=r(n);return t.read(e,s)},Du}var rl,sl,il,ol={exports:{}};var al,cl={};function ul(){return al||(al=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.joinPathSegments=cl.replacePathSegmentSeparator=cl.isAppliedFilter=cl.isFatalError=void 0,cl.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},cl.isAppliedFilter=function(e,t){return null===e||e(t)},cl.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},cl.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),cl}var ll,fl,pl,dl={};function hl(){if(ll)return dl;ll=1,Object.defineProperty(dl,"__esModule",{value:!0});const e=ul();return dl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},dl}function ml(){if(fl)return vu;fl=1,Object.defineProperty(vu,"__esModule",{value:!0});const e=h,t=nl(),n=function(){if(il)return ol.exports;il=1;var e=sl?rl:(sl=1,rl=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}});function t(t,s,i){if("function"==typeof t&&(i=s,s=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var o=e(r),a=null,c=null,u=0,l=null,f={push:function(e,r){var d=o.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=i||f.paused?c?(c.next=d,c=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){f.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!f.paused)for(;a&&u<i;)u++,p()},running:function(){return u},resume:function(){if(f.paused){if(f.paused=!1,null===a)return u++,void p();for(;a&&u<i;)u++,p()}},idle:function(){return 0===u&&0===f.length()},length:function(){for(var e=a,t=0;e;)e=e.next,t++;return t},getQueue:function(){for(var e=a,t=[];e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var d=o.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=i||f.paused?a?(d.next=a,a=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,c=null,f.drain=n},killAndDrain:function(){a=null,c=null,f.drain(),f.drain=n},error:function(e){l=e}};return f;function p(e){e&&o.release(e);var n=a;n&&u<=i?f.paused?u--:(c===a&&(c=null),a=n.next,n.next=null,s.call(t,n.value,n.worked),null===c&&f.empty()):0===--u&&f.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,r){var s=e.callback,i=e.errorHandler,o=e.value;e.value=null,e.callback=n,e.errorHandler&&i(t,o),s.call(e.context,t,r),e.release(e)}}return ol.exports=t,ol.exports.promise=function(e,r,s){"function"==typeof e&&(s=r,r=e,e=null);var i=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},s),o=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,n){o(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.drained=function(){var e=new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})});return e},i},ol.exports}(),r=ul(),s=hl();class i extends s.default{constructor(r,s){super(r,s),this._settings=s,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const n={directory:e,base:t};this._queue.push(n,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const n=e.path;void 0!==t&&(e.path=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return vu.default=i,vu}var gl,yl,bl,vl={},Dl={},wl={};var _l,kl,El={};function Sl(){if(kl)return yu;kl=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.Settings=yu.walkStream=yu.walkSync=yu.walk=void 0;const e=function(){if(pl)return bu;pl=1,Object.defineProperty(bu,"__esModule",{value:!0});const e=ml();return bu.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},bu}(),t=function(){if(gl)return vl;gl=1,Object.defineProperty(vl,"__esModule",{value:!0});const e=d,t=ml();return vl.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},vl}(),n=function(){if(bl)return Dl;bl=1,Object.defineProperty(Dl,"__esModule",{value:!0});const e=function(){if(yl)return wl;yl=1,Object.defineProperty(wl,"__esModule",{value:!0});const e=nl(),t=ul(),n=hl();class r extends n.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,n){const r=e.path;void 0!==n&&(e.path=t.joinPathSegments(n,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return wl.default=r,wl}();return Dl.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},Dl}(),r=function(){if(_l)return El;_l=1,Object.defineProperty(El,"__esModule",{value:!0});const e=f,t=nl();return El.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},El}();function s(e={}){return e instanceof r.default?e:new r.default(e)}return yu.Settings=r.default,yu.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},yu.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},yu.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},yu}var Al,Cl={};function Pl(){if(Al)return Cl;Al=1,Object.defineProperty(Cl,"__esModule",{value:!0});const e=f,t=Lu(),n=du();return Cl.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},Cl}var Ol,xl,Tl={};function $l(){if(Ol)return Tl;Ol=1,Object.defineProperty(Tl,"__esModule",{value:!0});const e=d,t=Lu(),n=Sl(),r=Pl();class s extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),s=new e.PassThrough({objectMode:!0});s._write=(e,i,o)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&s.push(t),e===r.length-1&&s.end(),o()}).catch(o);for(let e=0;e<r.length;e++)s.write(e);return s}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>null===e?t(r):n(e))})}}return Tl.default=s,Tl}var Nl,Rl,Ll,Fl={},Il={},Ml={},jl={};var Bl,zl,Hl,Kl,Ul,ql={},Zl={},Gl={};function Wl(){if(Kl)return Fl;Kl=1,Object.defineProperty(Fl,"__esModule",{value:!0});const e=f,t=function(){if(Ll)return Il;Ll=1,Object.defineProperty(Il,"__esModule",{value:!0});const e=du(),t=function(){if(Rl)return Ml;Rl=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=function(){if(Nl)return jl;Nl=1,Object.defineProperty(jl,"__esModule",{value:!0});const e=du();return jl.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},jl}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return Ml.default=t,Ml}();return Il.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),s=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,s)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const n=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(t,n,r,s){if(this._isSkippedByDeep(t,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const i=e.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const n=t.split("/").length;return""===e?n:n-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,n){return!e.pattern.matchAny(t,n)}},Il}(),n=function(){if(Bl)return ql;Bl=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=du();return ql.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,s]=e.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const s=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(r),s}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!!this._isMatchToPatterns(e,t.positive.all,n)&&!this._isMatchToPatterns(e,t.negative.relative,n)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,n)}_isMatchToAbsoluteNegative(t,n,r){if(0===n.length)return!1;const s=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(s,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const s=e.pattern.matchAny(t,n);return!s&&r?e.pattern.matchAny(t+"/",n):s}},ql}(),r=function(){if(zl)return Zl;zl=1,Object.defineProperty(Zl,"__esModule",{value:!0});const e=du();return Zl.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},Zl}(),s=function(){if(Hl)return Gl;Hl=1,Object.defineProperty(Gl,"__esModule",{value:!0});const e=du();return Gl.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let n=t.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&t.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:n}):n}},Gl}();return Fl.default=class{constructor(e){this._settings=e,this.errorFilter=new r.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},Fl}var Vl,Jl,Yl,Ql={},Xl={},ef={};var tf,nf,rf,sf,of,af={},cf=function(){if(rf)return nf;rf=1;const e=function(){if(fu)return Qa;fu=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.convertPatternGroupToTask=Qa.convertPatternGroupsToTasks=Qa.groupPatternsByBaseDirectory=Qa.getNegativePatternsAsPositive=Qa.getPositivePatterns=Qa.convertPatternsToTasks=Qa.generate=void 0;const e=du();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const s=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),u=e.pattern.getPatternsInsideCurrentDirectory(t),l=i(c),f=i(u);return s.push(...o(l,n,r)),"."in f?s.push(a(".",u,n,r)):s.push(...o(f,n,r)),s}function r(t){return e.pattern.getPositivePatterns(t)}function s(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function o(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,s){return{dynamic:s,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return Qa.generate=function(i,o){const a=t(i,o),c=t(o.ignore,o),u=r(a),l=s(a,c),f=u.filter(t=>e.pattern.isStaticPattern(t,o)),p=u.filter(t=>e.pattern.isDynamicPattern(t,o)),d=n(f,l,!1),h=n(p,l,!0);return d.concat(h)},Qa.convertPatternsToTasks=n,Qa.getPositivePatterns=r,Qa.getNegativePatternsAsPositive=s,Qa.groupPatternsByBaseDirectory=i,Qa.convertPatternGroupsToTasks=o,Qa.convertPatternGroupToTask=a,Qa}(),t=function(){if(Ul)return mu;Ul=1,Object.defineProperty(mu,"__esModule",{value:!0});const e=function(){if(xl)return gu;xl=1,Object.defineProperty(gu,"__esModule",{value:!0});const e=Sl(),t=Pl(),n=$l();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return gu.default=r,gu}(),t=Wl();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return mu.default=n,mu}(),n=function(){if(Vl)return Ql;Vl=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=d,t=$l(),n=Wl();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),s=this.api(n,t,r),i=new e.Readable({objectMode:!0,read:()=>{}});return s.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",r.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>s.destroy()),i}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Ql.default=r,Ql}(),r=function(){if(Yl)return Xl;Yl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=function(){if(Jl)return ef;Jl=1,Object.defineProperty(ef,"__esModule",{value:!0});const e=Lu(),t=Sl(),n=Pl();class r extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const n=[];for(const r of e){const e=this._getFullEntryPath(r),s=this._getEntry(e,r,t);null!==s&&t.entryFilter(s)&&n.push(s)}return n}_getEntry(e,t,n){try{const n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return ef.default=r,ef}(),t=Wl();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Xl.default=n,Xl}(),s=(tf||(tf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=m,n=l,r=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,r),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(af)),af),i=du();async function o(e,n){c(e);const r=a(e,t.default,n),s=await Promise.all(r);return i.array.flatten(s)}function a(t,n,r){const i=[].concat(t),o=new s.default(r),a=e.generate(i,o),c=new n(o);return a.map(c.read,c)}function c(e){if(![].concat(e).every(e=>i.string.isString(e)&&!i.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function o(e,t){c(e);const n=a(e,r.default,t);return i.array.flatten(n)}function u(e,t){c(e);const r=a(e,n.default,t);return i.stream.merge(r)}var l,f;t.glob=t,t.globSync=o,t.globStream=u,t.async=t,t.sync=o,t.stream=u,t.generateTasks=function(t,n){c(t);const r=[].concat(t),i=new s.default(n);return e.generate(r,i)},t.isDynamicPattern=function(e,t){c(e);const n=new s.default(t);return i.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return c(e),i.path.escape(e)},t.convertPathToPattern=function(e){return c(e),i.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return c(e),i.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return c(e),i.path.convertPosixPathToPattern(e)},(f=t.win32||(t.win32={})).escapePath=function(e){return c(e),i.path.escapeWindowsPath(e)},f.convertPathToPattern=function(e){return c(e),i.path.convertWindowsPathToPattern(e)}}(o||(o={})),nf=o}(),uf=R(cf),lf=function(){if(of)return sf;of=1;var e=hc(),t=f.posix.dirname,n="win32"===l.platform(),r="/",s=/\\/g,i=/\\([!*?|[\](){}])/g;function o(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return sf=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(r)<0&&(e=e.replace(s,r)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);return!(n<0)&&e.slice(n+1,-1).includes(r)}(e)&&(e+=r),e+="a";do{e=t(e)}while(o(e));return e.replace(i,"$1")}}(),ff=R(lf);const pf=e=>""!==e&&".."!==e,df=e=>{if("string"!=typeof e||!e.trim())return null;const t=e.trim().replace(/[^A-Za-z0-9@/_-]/g,"_").replace(/\/{2,}/g,"/").trim().split("/").filter(e=>e.length>0);if(0===t.length)return null;for(const e of t)if(!pf(e))return null;return t.join("/")},hf=async e=>{try{return(await t.stat(e)).isFile()}catch{return!1}},mf=()=>{const t=(()=>{try{const e=i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:w&&"SCRIPT"===w.tagName.toUpperCase()&&w.src||new URL("index.js",document.baseURI).href);return fe({cwd:n.dirname(e)})??null}catch{return null}})();if(!t)return null;const r=n.join(t,"dist","stan.system.md");return e.existsSync(r)?r:null},gf="0.3.0-0";var yf="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vf,Df={},wf={},_f={},kf={};function Ef(){if(vf)return kf;vf=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),o=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[o]===s;function c(e){if(e&&"object"==typeof e)switch(e[o]){case n:case i:return!0}return!1}return kf.ALIAS=e,kf.DOC=t,kf.MAP=n,kf.NODE_TYPE=o,kf.PAIR=r,kf.SCALAR=s,kf.SEQ=i,kf.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,kf.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,kf.isCollection=c,kf.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,kf.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,kf.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},kf.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,kf.isScalar=a,kf.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,kf}var Sf,Af,Cf={};function Pf(){if(Sf)return Cf;Sf=1;var e=Ef();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);if(e.isDocument(t)){i(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else i(null,t,s,Object.freeze([]))}function i(n,s,o,a){const c=u(n,s,o,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),i(n,c,o,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=i(e,s.items[e],o,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=i("key",s.key,o,a);if(e===t)return t;e===r&&(s.key=null);const n=i("value",s.value,o,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function o(t,n){const s=c(n);if(e.isDocument(t)){await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else await a(null,t,s,Object.freeze([]))}async function a(n,s,i,o){const c=await u(n,s,i,o);if(e.isNode(c)||e.isPair(c))return l(n,o,c),a(n,c,i,o);if("symbol"!=typeof c)if(e.isCollection(s)){o=Object.freeze(o.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],i,o);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){o=Object.freeze(o.concat(s));const e=await a("key",s.key,i,o);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,i,o);if(n===t)return t;n===r&&(s.value=null)}return c}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,o.BREAK=t,o.SKIP=n,o.REMOVE=r,Cf.visit=s,Cf.visitAsync=o,Cf}function Of(){if(Af)return _f;Af=1;var e=Ef(),t=Pf();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},_f.Directives=s,_f}var xf,Tf={},$f={},Nf={};function Rf(){if(xf)return Nf;xf=1;var e=Ef(),t=Pf();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Nf.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Nf.anchorNames=n,Nf.createNodeAnchors=function(t,s){const i=[],o=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const o=r(s,a);return a.add(o),o},setAnchors:()=>{for(const t of i){const n=o.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:o}},Nf.findNewAnchor=r,Nf}var Lf,Ff={},If={};function Mf(){if(Lf)return If;return Lf=1,If.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],i=e(t,s,String(n),r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),i=e(t,s,n,r);void 0===i?s.delete(n):i!==r&&s.set(n,i)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const i=e(t,s,n,r);void 0===i?delete s[n]:i!==r&&(s[n]=i)}return t.call(n,r,s)},If}var jf,Bf,zf,Hf={};function Kf(){if(jf)return Hf;jf=1;var e=Ef();return Hf.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const i=n.toJSON(r,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof n||s?.keep?n:Number(n)},Hf}function Uf(){if(Bf)return Ff;Bf=1;var e=Mf(),t=Ef(),n=Kf();return Ff.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:i,onAnchor:o,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},u=n.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},Ff}function qf(){if(zf)return $f;zf=1;var e=Rf(),t=Pf(),n=Ef(),r=Uf(),s=Kf();let i=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,i;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(i=e)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),!c||void 0===c.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(i>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=o(r,a,n)),c.count*c.aliasCount>i)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function o(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=o(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=o(e,t.key,r),s=o(e,t.value,r);return Math.max(n,s)}return 1}return $f.Alias=i,$f}var Zf,Gf,Wf,Vf={},Jf={},Yf={};function Qf(){if(Zf)return Yf;Zf=1;var e=Ef(),t=Uf(),n=Kf();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",Yf.Scalar=r,Yf.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,Yf}function Xf(){if(Gf)return Jf;Gf=1;var e=qf(),t=Ef(),n=Qf();return Jf.createNode=function(r,s,i){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=i;let f;if(o&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete i.onTagObj);const d=p?.createNode?p.createNode(i.schema,r,i):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(i.schema,r,i):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},Jf}function ep(){if(Wf)return Vf;Wf=1;var e=Xf(),t=Ef(),n=Uf();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let i=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...i]=e,o=this.get(s,!0);if(t.isCollection(o))o.addIn(i,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,i=this.get(r,!0);return 0===s.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...i]=e;if(0===i.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`);this.set(s,r(this.schema,i,n))}}}};return Vf.Collection=i,Vf.collectionFromPath=r,Vf.isEmptyPath=s,Vf}var tp,np={},rp={},sp={},ip={};function op(){if(tp)return ip;tp=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return ip.indentComment=e,ip.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,ip.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),ip}var ap,cp,up,lp,fp={},pp={};function dp(){if(ap)return pp;ap=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,i=e[s];for(;" "===i||"\t"===i;)if(t<s+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);r=t,s=t+1,i=e[s]}return r}return pp.FOLD_BLOCK=e,pp.FOLD_FLOW="flow",pp.FOLD_QUOTED=t,pp.foldFlowLines=function(r,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof o&&(o>a-Math.max(2,c)?p.push(0):g=a-o);let y=!1,b=-1,v=-1,D=-1;i===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let o;o=r[b+=1];){if(i===t&&"\\"===o){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===o)i===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(i===t){for(;" "===m||"\t"===m;)m=o,o=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=o}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],o=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,o)}`:(i===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,o)}`)}return w},pp}function hp(){if(cp)return fp;cp=1;var e=Qf(),t=dp();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const i=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return i;const{implicitKey:o}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(u+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{u+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(o||'"'===i[e+2]||i.length<a)e+=1;else{for(u+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)u+="\n",e+=2;u+=c," "===i[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+i.slice(l):i,o?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,i);const o=i.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${o}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,o,t.FOLD_FLOW,n(i,!1))}function o(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),o=e.includes("'");r=t&&!o?i:o&&!t?s:n?i:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:i,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return o(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,k=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;k=w}}let E=c.substring(0,k<w?k+1:w);E&&(c=c.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let S=(_?m?"2":"1":"")+y;if(s&&(S+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const o=n(u,!0);"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${E}${r}${v}`,m,t.FOLD_BLOCK,o);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${E}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return fp.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?o(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return i(h.value,u);case e.Scalar.PLAIN:return function(s,i,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=i;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return o(f,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?o(f,i):c(s,i,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,i,a,u);if(r(f)){if(""===h)return i.forceBlockIndent=!0,c(s,i,a,u);if(d&&h===m)return o(f,i)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=i.doc.schema;if(n.some(e)||t?.some(e))return o(f,i)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(i,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},fp}function mp(){if(up)return sp;up=1;var e=Rf(),t=Ef(),n=op(),r=hp();return sp.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},sp.stringify=function(n,s,i,o){if(t.isPair(n))return n.toString(s,i,o);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:i}){if(!i.directives)return"";const o=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,i,o):t.isScalar(c)?r.stringifyString(c,s,i,o):c.toString(s,i,o);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},sp}function gp(){if(lp)return rp;lp=1;var e=Ef(),t=Qf(),n=mp(),r=op();return rp.stringifyPair=function({key:s,value:i},o,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=o;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!s||g&&null==i&&!o.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));o=Object.assign({},o,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,k=n.stringify(s,o,()=>w=!0,()=>_=!0);if(!y&&!o.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(o.inFlow){if(u||null==i)return w&&a&&a(),""===k?"?":y?`? ${k}`:k}else if(u&&!m||null==i&&y)return k=`? ${k}`,g&&!w?k+=r.lineComment(k,o.indent,d(g)):_&&c&&c(),k;w&&(g=null),y?(g&&(k+=r.lineComment(k,o.indent,d(g))),k=`? ${k}\n${f}:`):(k=`${k}:`,g&&(k+=r.lineComment(k,o.indent,d(g)))),e.isNode(i)?(b=!!i.spaceBefore,v=i.commentBefore,D=i.comment):(b=!1,v=null,D=null,i&&"object"==typeof i&&(i=l.createNode(i))),o.implicitKey=!1,y||g||!e.isScalar(i)||(o.indentAtStart=k.length+1),_=!1,h||!(p.length>=2)||o.inFlow||y||!e.isSeq(i)||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let E=!1;const S=n.stringify(i,o,()=>E=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,o.indent)}`}""!==S||o.inFlow?A+=`\n${o.indent}`:"\n"===A&&(A="\n\n")}else if(!y&&e.isCollection(i)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=o.inFlow??i.flow??0===i.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${o.indent}`)}}else""!==S&&"\n"!==S[0]||(A="");return k+=A+S,o.inFlow?E&&a&&a():D&&!E?k+=r.lineComment(k,o.indent,d(D)):_&&c&&c(),k},rp}var yp,bp={},vp={};function Dp(){if(yp)return vp;yp=1;var e=o;return vp.debug=function(e,...t){"debug"===e&&console.log(...t)},vp.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},vp}var wp,_p,kp,Ep={};function Sp(){if(wp)return Ep;wp=1;var e=Ef(),t=Qf();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)i(t,n,e);else if(Array.isArray(r))for(const e of r)i(t,n,e);else i(t,n,r)}function i(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,t,Map);for(const[e,t]of i)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return Ep.addMergeToJSMap=s,Ep.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),Ep.merge=r,Ep}function Ap(){if(_p)return bp;_p=1;var e=Dp(),t=Sp(),n=mp(),r=Ef(),s=Kf();return bp.addPairToJSMap=function(i,o,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(i,o,c);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,o,c);else{const t=s.toJS(a,"",i);if(o instanceof Map)o.set(t,s.toJS(c,t,i));else if(o instanceof Set)o.add(t);else{const u=function(t,s,i){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&i?.doc){const r=n.createStringifyContext(i.doc,{});r.anchors=new Set;for(const e of i.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!i.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,i),l=s.toJS(c,u,i);u in o?Object.defineProperty(o,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[u]=l}}return o},bp}function Cp(){if(kp)return np;kp=1;var e=Xf(),t=gp(),n=Ap(),r=Ef();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return np.Pair=s,np.createPair=function(t,n,r){const i=e.createNode(t,void 0,r),o=e.createNode(n,void 0,r);return new s(i,o)},np}var Pp,Op,xp,Tp={},$p={},Np={},Rp={};function Lp(){if(Pp)return Rp;Pp=1;var e=Ef(),t=mp(),n=op();function r({comment:r,items:s},o,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=o,h=Object.assign({},o,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),i(o,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),i(o,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:o,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let o=0;o<r.length;++o){const c=r[o];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),i(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),i(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);o<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=o;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function i({indent:e,options:{commentString:t}},r,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const i=n.indentComment(t(s),e);r.push(i.trimStart())}}return Rp.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Rp}function Fp(){if(Op)return Np;Op=1;var e=Lp(),t=Ap(),n=ep(),r=Ef(),s=Cp(),i=Qf();function o(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:i}=n,o=new this(e),a=(e,a)=>{if("function"==typeof i)a=i.call(t,e,a);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==a||r)&&o.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=o(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=o(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=o(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!o(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return Np.YAMLMap=a,Np.findPair=o,Np}function Ip(){if(xp)return $p;xp=1;var e=Ef(),t=Fp();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return $p.map=n,$p}var Mp,jp,Bp={},zp={};function Hp(){if(Mp)return zp;Mp=1;var e=Xf(),t=Lp(),n=ep(),r=Ef(),s=Qf(),i=Kf();let o=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];r.isScalar(i)&&s.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(i.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let o of n){if("function"==typeof s){const e=n instanceof Set?o:String(t++);o=s.call(n,e,o)}i.items.push(e.createNode(o,void 0,r))}}return i}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return zp.YAMLSeq=o,zp}function Kp(){if(jp)return Bp;jp=1;var e=Ef(),t=Hp();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Bp.seq=n,Bp}var Up,qp={};function Zp(){if(Up)return qp;Up=1;var e=hp();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return qp.string=t,qp}var Gp,Wp={},Vp={};function Jp(){if(Gp)return Vp;Gp=1;var e=Qf();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return Vp.nullTag=t,Vp}var Yp,Qp={};function Xp(){if(Yp)return Qp;Yp=1;var e=Qf();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify({source:e,value:n},r){if(e&&t.test.test(e)){if(n===("t"===e[0]||"T"===e[0]))return e}return n?r.options.trueStr:r.options.falseStr}};return Qp.boolTag=t,Qp}var ed,td,nd={},rd={};function sd(){if(ed)return rd;return ed=1,rd.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i},rd}function id(){if(td)return nd;td=1;var e=Qf(),t=sd();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return nd.float=s,nd.floatExp=r,nd.floatNaN=n,nd}var od,ad={};function cd(){if(od)return ad;od=1;var e=sd();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:i}=n;return t(i)&&i>=0?s+i.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return ad.int=i,ad.intHex=o,ad.intOct=s,ad}var ud,ld={};function fd(){if(ud)return ld;ud=1;var e=Ip(),t=Jp(),n=Kp(),r=Zp(),s=Xp(),i=id(),o=cd();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float];return ld.schema=a,ld}var pd,dd={};function hd(){if(pd)return dd;pd=1;var e=Qf(),t=Ip(),n=Kp();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>r(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s}],o={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,o);return dd.schema=a,dd}var md,gd={};function yd(){if(md)return gd;md=1;var e=a,t=Qf(),n=hp();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:i},o,a,c){if(!i)return"";const u=i;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},o,a,c)}};return gd.binary=r,gd}var bd,vd,Dd={},wd={};function _d(){if(bd)return wd;bd=1;var e=Ef(),t=Cp(),n=Qf(),r=Hp();function s(r,s){if(e.isSeq(r))for(let i=0;i<r.items.length;++i){let o=r.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&s("Each pair must have its own sequence indicator");const e=o.items[0]||new t.Pair(new n.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}r.items[i]=e.isPair(o)?o:new t.Pair(o)}}else s("Expected a sequence for this tag");return r}function i(e,n,s){const{replacer:i}=s,o=new r.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof i&&(e=i.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;o.items.push(t.createPair(r,c,s))}return o}const o={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i};return wd.createPairs=i,wd.pairs=o,wd.resolvePairs=s,wd}function kd(){if(vd)return Dd;vd=1;var e=Ef(),t=Kf(),n=Fp(),r=Hp(),s=_d();class i extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let i,o;if(e.isPair(n)?(i=t.toJS(n.key,"",r),o=t.toJS(n.value,i,r)):i=t.toJS(n,"",r),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),i=new this;return i.items=r.items,i}}i.tag="tag:yaml.org,2002:omap";const o={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),o=[];for(const{key:t}of r.items)e.isScalar(t)&&(o.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):o.push(t.value));return Object.assign(new i,r)},createNode:(e,t,n)=>i.from(e,t,n)};return Dd.YAMLOMap=i,Dd.omap=o,Dd}var Ed,Sd={},Ad={};function Cd(){if(Ed)return Ad;Ed=1;var e=Qf();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},r={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return Ad.falseTag=r,Ad.trueTag=n,Ad}var Pd,Od={};function xd(){if(Pd)return Od;Pd=1;var e=Qf(),t=sd();const n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Od.float=s,Od.floatExp=r,Od.floatNaN=n,Od}var Td,$d={};var Nd,Rd={};function Ld(){if(Nd)return Rd;Nd=1;var e=Ef(),t=Cp(),n=Fp();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null);n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),i.items.push(t.createPair(e,null,r));return i}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return Rd.YAMLSet=r,Rd.set=s,Rd}var Fd,Id,Md,jd,Bd={};function zd(){if(Fd)return Bd;Fd=1;var e=sd();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*i:i}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const i=r(60),o=[n%i];return n<60?o.unshift(0):(n=(n-o[0])/i,o.unshift(n%i),n>=60&&(n=(n-o[0])/i,o.unshift(n))),s+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:n},i={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const n=e.match(i.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,o,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,o,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return Bd.floatTime=s,Bd.intTime=r,Bd.timestamp=i,Bd}function Hd(){if(Id)return Sd;Id=1;var e=Ip(),t=Jp(),n=Kp(),r=Zp(),s=yd(),i=Cd(),o=xd(),a=function(){if(Td)return $d;Td=1;var e=sd();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===s?-1*i:i}function r(n,r,s){const{value:i}=n;if(t(i)){const e=i.toString(r);return i<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return $d.int=o,$d.intBin=s,$d.intHex=a,$d.intOct=i,$d}(),c=Sp(),u=kd(),l=_d(),f=Ld(),p=zd();const d=[e.map,n.seq,r.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return Sd.schema=d,Sd}function Kd(){if(Md)return Wp;Md=1;var e=Ip(),t=Jp(),n=Kp(),r=Zp(),s=Xp(),i=id(),o=cd(),a=fd(),c=hd(),u=yd(),l=Sp(),f=kd(),p=_d(),d=Hd(),h=Ld(),m=zd();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:m.floatTime,int:o.int,intHex:o.intHex,intOct:o.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return Wp.coreKnownTags=b,Wp.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},Wp}function Ud(){if(jd)return Tp;jd=1;var e=Ef(),t=Ip(),n=Kp(),r=Zp(),s=Kd();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Tp.Schema=class o{constructor({compat:o,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(o)?s.getTags(o,"compat"):o?s.getTags(null,o):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?i:null}clone(){const e=Object.create(o.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Tp}var qd,Zd,Gd={};function Wd(){if(qd)return Gd;qd=1;var e=Ef(),t=mp(),n=op();return Gd.stringifyDocument=function(r,s){const i=[];let o=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(i.push(e),o=!0):r.directives.docStart&&(o=!0)}o&&i.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==i.length&&i.unshift("");const e=c(r.commentBefore);i.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&o&&i.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==i[i.length-1]?i.push(f):i[i.length-1]=`--- ${f}`}else i.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(c(e),"")))}return i.join("\n")+"\n"},Gd}function Vd(){if(Zd)return Tf;Zd=1;var e=qf(),t=ep(),n=Ef(),r=Cp(),s=Kf(),i=Ud(),o=Wd(),a=Rf(),c=Mf(),u=Xf(),l=Of();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Tf.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new l.Directives({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),i=this.createNode(t,null,n);return new r.Pair(s,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new l.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new i.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof i)for(const{count:e,res:t}of a.anchors.values())i(t,e);return"function"==typeof o?c.applyReviver(o,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return o.stringifyDocument(this,e)}},Tf}var Jd,Yd={};function Qd(){if(Jd)return Yd;Jd=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Yd.YAMLError=e,Yd.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Yd.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Yd.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}},Yd}var Xd,eh={},th={},nh={},rh={},sh={};function ih(){if(Xd)return sh;return Xd=1,sh.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&i(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&i(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&i(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&i(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&i(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],k=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||"block-map"===r?.type||"block-seq"===r?.type)&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:k,start:w??k}},sh}var oh,ah={};function ch(){if(oh)return ah;return oh=1,ah.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}},ah}var uh,lh={};function fh(){if(uh)return lh;uh=1;var e=ch();return lh.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];if(s.indent===t&&("]"===s.source||"}"===s.source)&&e.containsNewline(n)){r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},lh}var ph,dh,hh={};function mh(){if(ph)return hh;ph=1;var e=Ef();return hh.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const i="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,r))},hh}function gh(){if(dh)return rh;dh=1;var e=Cp(),t=Fp(),n=ih(),r=ch(),s=fh(),i=mh();const o="All mapping items must start at the same column";return rh.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",o)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",o);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,i.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const k=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=k.end,k.found){D&&("block-map"!==b?.type||k.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<k.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,k,f):c(u,h,y,null,k,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(_.comment?_.comment+="\n"+k.comment:_.comment=k.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},rh}var yh,bh={};function vh(){if(yh)return bh;yh=1;var e=Hp(),t=ih(),n=fh();return bh.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},i,o,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=o.offset,f=null;for(const{start:e,value:c}of o.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}c&&"block-seq"===c.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(i,c,p,a):s(i,p.end,e,null,p,a);i.schema.compat&&n.flowIndentCheck(o.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[o.offset,l,f??l],u},bh}var Dh,wh,_h,kh={},Eh={};function Sh(){if(Dh)return Eh;return Dh=1,Eh.resolveEnd=function(e,t,n,r){let s="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}},Eh}function Ah(){if(wh)return kh;wh=1;var e=Ef(),t=Cp(),n=Fp(),r=Hp(),s=Sh(),i=ih(),o=ch(),a=mh();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return kh.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,k=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!k.found){if(!(k.anchor||k.tag||w||_)){0===r&&k.comma?h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),k.comment&&(b.comment?b.comment+="\n"+k.comment:b.comment=k.comment),D=k.end;continue}!g&&p.options.strict&&o.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)k.comma&&h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(k.comma||h(k.start,"MISSING_CHAR",`Missing , between ${y} items`),k.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,k.comment=k.comment.substring(t.length+1)}}if(g||w||k.found){p.atKey=!0;const e=k.end,r=v?l(p,v,k,h):f(p,e,m,null,k,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(o.found){if(!g&&!k.found&&p.options.strict){if(w)for(const e of w){if(e===o.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<o.found.offset-1024&&h(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&":"===_.source[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const E=_?l(p,_,o,h):o.found?f(p,o.end,w,null,o,h):null;E?u(_)&&h(E.range,"BLOCK_IN_FLOW",c):o.comment&&(r.comment?r.comment+="\n"+o.comment:r.comment=o.comment);const S=new t.Pair(r,E);if(p.options.keepSourceTokens&&(S.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(S);const t=(E??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=E?E.range[2]:o.end}else{const e=_?l(p,_,k,h):f(p,k.end,w,null,k,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...k]=d.end;let E=D;if(_&&_.source===w)E=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&k.unshift(_)}if(k.length>0){const e=s.resolveEnd(k,E,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},kh}function Ch(){if(_h)return nh;_h=1;var e=Ef(),t=Qf(),n=Fp(),r=Hp(),s=gh(),i=vh(),o=Ah();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,r,c):o.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return nh.composeCollection=function(s,i,o,c,u){const l=c.tag,f=l?i.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;if(n&&(!t||t.offset<n.offset)){u(n,"MISSING_CHAR","Missing newline after block sequence props")}}const p="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,i,o,u,f);let d=i.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=i.schema.knownTags[f];if(!e||e.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,i,o,u,f);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,i,o,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},nh}var Ph,Oh={},xh={};function Th(){if(Ph)return xh;Ph=1;var e=Qf();return xh.resolveBlockScalar=function(t,n,r){const s=n.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let o=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!o&&r?o=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":if(n&&!u){r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+i.length;return n.source&&(t+=n.source.length),{value:e,type:o,comment:i.comment,range:[s,t,t]}}let u=n.indent+i.indent,l=n.offset+i.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}if(0===i.indent&&(u=n.length),f=e,0===u&&!t.atRoot){r(l,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===i.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}o===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+i.length+n.source.length;return{value:p,type:o,comment:i.comment,range:[s,m,m]}},xh}var $h,Nh,Rh={};function Lh(){if($h)return Rh;$h=1;var e=Qf(),t=Sh();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],i=" ",o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)""===r[1]?"\n"===i?s+=i:i="\n":(s+=i+r[1],i=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(e),s+i+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function i(e,t,n,r){const s=e.substr(t,n),i=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(i)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(i)}return Rh.resolveFlowScalar=function(o,a,c){const{offset:u,type:l,source:f,end:p}=o;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let o=1;o<e.length-1;++o){const a=e[o];if("\r"!==a||"\n"!==e[o+1])if("\n"===a){const{fold:t,offset:s}=r(e,o);n+=t,o=s}else if("\\"===a){let r=e[++o];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[o+1];" "===r||"\t"===r;)r=e[1+ ++o];else if("\r"===r&&"\n"===e[o+1])for(r=e[1+ ++o];" "===r||"\t"===r;)r=e[1+ ++o];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=i(e,o+1,s,t),o+=s}else{const r=e.substr(o-1,2);t(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=o;let r=e[o+1];for(;" "===r||"\t"===r;)r=e[1+ ++o];"\n"===r||"\r"===r&&"\n"===e[o+2]||(n+=o>t?e.slice(t,o+1):a)}else n+=a}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(f,m);break;default:return c(o,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},Rh}function Fh(){if(Nh)return Oh;Nh=1;var e=Ef(),t=Qf(),n=Th(),r=Lh();return Oh.composeScalar=function(s,i,o,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===i.type?n.resolveBlockScalar(s,i,a):r.resolveFlowScalar(i,s.options.strict,a),p=o?s.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,i){if("!"===r)return t[e.SCALAR];const o=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;o.push(e)}for(const e of o)if(e.test?.test(n))return e;const a=t.knownTags[r];if(a&&!a.collection)return t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR]}(s.schema,c,p,o,a):"scalar"===i.type?function({atKey:t,directives:n,schema:r},s,i,o){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];if(a.tag!==t.tag){o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}}return a}(s,c,i,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(o??i,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(o??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Oh}var Ih,Mh,jh,Bh,zh={};function Hh(){if(Ih)return zh;return Ih=1,zh.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e},zh}function Kh(){if(Mh)return th;Mh=1;var e=qf(),t=Ef(),n=Ch(),r=Fh(),s=Sh(),i=Hh();const o={composeNode:a,composeEmptyNode:c};function a(i,a,u,l){const f=i.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:i},o){const a=new e.Alias(r.substring(1));""===a.source&&o(n,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&o(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(i,c,t.strict,o);a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment);return a}(i,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(i,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(o,i,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(i,a.offset,void 0,null,u,l),y=!1}if(h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)){l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings")}return p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:o,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:i.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return th.composeEmptyNode=c,th.composeNode=a,th}function Uh(){if(jh)return eh;jh=1;var e=Vd(),t=Kh(),n=Sh(),r=ih();return eh.composeDoc=function(s,i,{offset:o,start:a,value:c,end:u},l){const f=Object.assign({_directives:i},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:o,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[o,m,g.offset],p},eh}function qh(){if(Bh)return wf;Bh=1;var e=o,t=Of(),n=Vd(),r=Qd(),s=Ef(),i=Uh(),a=Sh();function c(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function u(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const i=e[s];switch(i[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(i.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return wf.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=c(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=u(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(s.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=c(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=i.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=a.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(c(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},wf}var Zh,Gh={},Wh={};function Vh(){if(Zh)return Wh;Zh=1;var e=Th(),t=Lh(),n=Qd(),r=hp();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function i(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return Wh.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:u,end:l};default:return{type:"scalar",offset:a,indent:i,source:u,end:l}}},Wh.resolveAsScalar=function(r,s=!0,i){if(r){const o=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([s,s+1],t,r);i(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,o)}}return null},Wh.setScalarValue=function(e,t,n={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(o&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,f);break;case'"':i(e,f,"double-quoted-scalar");break;case"'":i(e,f,"single-quoted-scalar");break;default:i(e,f,"scalar")}},Wh}var Jh,Yh={};function Qh(){if(Jh)return Yh;Jh=1;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),r)for(const e of r)i+=e.source;return s&&(i+=e(s)),i}return Yh.stringify=n=>"type"in n?e(n):t(n),Yh}var Xh,em,tm={};function nm(){if(Xh)return tm;Xh=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,i){let o=i(r,t);if("symbol"==typeof o)return o;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const o=s(Object.freeze(t.concat([[a,r]])),c.items[r],i);if("number"==typeof o)r=o-1;else{if(o===e)return e;o===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof o&&"key"===a&&(o=o(r,t))}}return"function"==typeof o?o(r,t):o}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},tm.visit=r,tm}function rm(){if(em)return Gh;em=1;var e=Vh(),t=Qh(),n=nm();return Gh.createScalarToken=e.createScalarToken,Gh.resolveAsScalar=e.resolveAsScalar,Gh.setScalarValue=e.setScalarValue,Gh.stringify=t.stringify,Gh.visit=n.visit,Gh.BOM="\ufeff",Gh.DOCUMENT="",Gh.FLOW_END="",Gh.SCALAR="",Gh.isCollection=e=>!!e&&"items"in e,Gh.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),Gh.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},Gh.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},Gh}var sm,im={};function om(){if(sm)return im;sm=1;var e=rm();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),o=e=>!e||i.has(e);return im.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&t(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(o),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const i=this.getLine();if(null===i)return this.setNext("flow");if(-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3])){if(!(s===this.indentNext-1&&1===this.flowLevel&&("]"===i[0]||"}"===i[0])))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart()}let a=0;for(;","===i[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),i[a]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(o),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,i=this.pos-1,o=this.pos-1;for(;r=this.buffer[++o];)if(":"===r){const e=this.buffer[o+1];if(t(e)||n&&s.has(e))break;i=o}else if(t(r)){let e=this.buffer[o+1];if("\r"===r&&("\n"===e?(o+=1,r="\n",e=this.buffer[o+1]):i=o),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&s.has(r))break;i=o}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(i+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(o))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},im}var am,cm={};function um(){if(am)return cm;am=1;return cm.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}},cm}var lm,fm={};function pm(){if(lm)return fm;lm=1;var e=o,t=rm(),n=om();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function i(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function a(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function c(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,i(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return fm.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=c(a(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!r(t.sep,"newline")){const e=c(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=c(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:o,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:o});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=c(a(t));u(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=c(a(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=c(a(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}},fm}var dm,hm,mm={};function gm(){if(dm)return mm;dm=1;var e=qh(),t=Vd(),n=Qd(),r=Dp(),s=Ef(),i=um(),o=pm();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return i&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return mm.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=c(e,n);if(!i)return null;if(i.warnings.forEach(e=>r.warn(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))},mm.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:i}=a(r),c=new o.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(i&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},mm.parseDocument=c,mm.stringify=function(e,n,r){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!i?e.toString(r):new t.Document(e,i,r).toString(r)},mm}var ym=function(){if(hm)return Df;hm=1;var e=qh(),t=Vd(),n=Ud(),r=Qd(),s=qf(),i=Ef(),o=Cp(),a=Qf(),c=Fp(),u=Hp(),l=rm(),f=om(),p=um(),d=pm(),h=gm(),m=Pf();return Df.Composer=e.Composer,Df.Document=t.Document,Df.Schema=n.Schema,Df.YAMLError=r.YAMLError,Df.YAMLParseError=r.YAMLParseError,Df.YAMLWarning=r.YAMLWarning,Df.Alias=s.Alias,Df.isAlias=i.isAlias,Df.isCollection=i.isCollection,Df.isDocument=i.isDocument,Df.isMap=i.isMap,Df.isNode=i.isNode,Df.isPair=i.isPair,Df.isScalar=i.isScalar,Df.isSeq=i.isSeq,Df.Pair=o.Pair,Df.Scalar=a.Scalar,Df.YAMLMap=c.YAMLMap,Df.YAMLSeq=u.YAMLSeq,Df.CST=l,Df.Lexer=f.Lexer,Df.LineCounter=p.LineCounter,Df.Parser=d.Parser,Df.parse=h.parse,Df.parseAllDocuments=h.parseAllDocuments,Df.parseDocument=h.parseDocument,Df.stringify=h.stringify,Df.visit=m.visit,Df.visitAsync=m.visitAsync,Df}(),bm=bf(ym);function vm(e,t,n){function r(n,r){var s;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(s=n._zod).traits??(s.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}const s=n?.Parent??Object;class i extends s{}function o(e){var t;const s=n?.Parent?new i:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}class Dm extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class wm extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const _m={};function km(e){return _m}function Em(e,t){return"bigint"==typeof t?t.toString():t}function Sm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Am(e){return null==e}function Cm(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Pm=Symbol("evaluating");function Om(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Pm)return void 0===r&&(r=Pm,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function xm(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Tm(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function $m(e){return JSON.stringify(e)}const Nm="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rm(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Lm=Sm(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Fm(e){if(!1===Rm(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Rm(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Im(e){return Fm(e)?{...e}:Array.isArray(e)?[...e]:e}const Mm=new Set(["string","number","symbol"]);function jm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bm(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function zm(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const Hm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Km(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Um(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function qm(e){return"string"==typeof e?e:e?.message}function Zm(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=qm(e.inst?._zod.def?.error?.(e))??qm(t?.error?.(e))??qm(n.customError?.(e))??qm(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Gm(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Wm(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Vm=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Em,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Jm=vm("$ZodError",Vm),Ym=vm("$ZodError",Vm,{Parent:Error});const Qm=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Dm;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>Zm(e,i,km())));throw Nm(t,s?.callee),t}return o.value},Xm=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>Zm(e,i,km())));throw Nm(t,s?.callee),t}return o.value},eg=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Dm;return i.issues.length?{success:!1,error:new(e??Jm)(i.issues.map(e=>Zm(e,s,km())))}:{success:!0,data:i.value}},tg=eg(Ym),ng=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Zm(e,s,km())))}:{success:!0,data:i.value}},rg=ng(Ym),sg=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Qm(e)(t,n,s)},ig=e=>(t,n,r)=>Qm(e)(t,n,r),og=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xm(e)(t,n,s)},ag=e=>async(t,n,r)=>Xm(e)(t,n,r),cg=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return eg(e)(t,n,s)},ug=e=>(t,n,r)=>eg(e)(t,n,r),lg=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ng(e)(t,n,s)},fg=e=>async(t,n,r)=>ng(e)(t,n,r),pg=/^[cC][^\s-]{8,}$/,dg=/^[0-9a-z]+$/,hg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mg=/^[0-9a-vA-V]{20}$/,gg=/^[A-Za-z0-9]{27}$/,yg=/^[a-zA-Z0-9_-]{21}$/,bg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vg=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dg=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,wg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const _g=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Eg=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Sg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ag=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cg=/^[A-Za-z0-9_-]*$/,Pg=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Og=/^\+(?:[0-9]){6,14}[0-9]$/,xg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Tg=new RegExp(`^${xg}$`);function $g(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const Ng=/^-?\d+$/,Rg=/^-?\d+(?:\.\d+)?/,Lg=/^(?:true|false)$/i,Fg=/^[^A-Z]*$/,Ig=/^[^a-z]*$/,Mg=vm("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),jg={number:"number",bigint:"bigint",object:"date"},Bg=vm("$ZodCheckLessThan",(e,t)=>{Mg.init(e,t);const n=jg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),zg=vm("$ZodCheckGreaterThan",(e,t)=>{Mg.init(e,t);const n=jg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hg=vm("$ZodCheckMultipleOf",(e,t)=>{Mg.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(0===s&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(s=Number.parseInt(e[1]))}const i=n>s?n:s;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Kg=vm("$ZodCheckNumberFormat",(e,t)=>{Mg.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=Hm[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,n&&(r.pattern=Ng)}),e._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a))return void o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<s&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),a>i&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),Ug=vm("$ZodCheckMaxLength",(e,t)=>{var n;Mg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Am(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Gm(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qg=vm("$ZodCheckMinLength",(e,t)=>{var n;Mg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Am(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Gm(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zg=vm("$ZodCheckLengthEquals",(e,t)=>{var n;Mg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Am(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const i=Gm(r),o=s>t.length;n.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Gg=vm("$ZodCheckStringFormat",(e,t)=>{var n,r;Mg.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Wg=vm("$ZodCheckRegex",(e,t)=>{Gg.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vg=vm("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Fg),Gg.init(e,t)}),Jg=vm("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ig),Gg.init(e,t)}),Yg=vm("$ZodCheckIncludes",(e,t)=>{Mg.init(e,t);const n=jm(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Qg=vm("$ZodCheckStartsWith",(e,t)=>{Mg.init(e,t);const n=new RegExp(`^${jm(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xg=vm("$ZodCheckEndsWith",(e,t)=>{Mg.init(e,t);const n=new RegExp(`.*${jm(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ey=vm("$ZodCheckOverwrite",(e,t)=>{Mg.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class ty{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args,n=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,n.join("\n"))}}const ny={major:4,minor:1,patch:12},ry=vm("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ny;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=Km(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,o=i._zod.check(e);if(o instanceof Promise&&!1===n?.async)throw new Dm;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o;e.issues.length!==t&&(s||(s=Km(e,t)))});else{if(e.issues.length===t)continue;s||(s=Km(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(Km(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new Dm;return o.then(t=>e._zod.parse(t,i))}return e._zod.parse(o,i)};e._zod.run=(s,i)=>{if(i.skipChecks)return e._zod.parse(s,i);if("backward"===i.direction){const t=e._zod.parse({value:s.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,i)):n(t,s,i)}const o=e._zod.parse(s,i);if(o instanceof Promise){if(!1===i.async)throw new Dm;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=tg(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return rg(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),sy=vm("$ZodString",(e,t)=>{var n;ry.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),iy=vm("$ZodStringFormat",(e,t)=>{Gg.init(e,t),sy.init(e,t)}),oy=vm("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=vg),iy.init(e,t)}),ay=vm("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Dg(e))}else t.pattern??(t.pattern=Dg());iy.init(e,t)}),cy=vm("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wg),iy.init(e,t)}),uy=vm("$ZodURL",(e,t)=>{iy.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Pg.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ly=vm("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),iy.init(e,t)}),fy=vm("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=yg),iy.init(e,t)}),py=vm("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pg),iy.init(e,t)}),dy=vm("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=dg),iy.init(e,t)}),hy=vm("$ZodULID",(e,t)=>{t.pattern??(t.pattern=hg),iy.init(e,t)}),my=vm("$ZodXID",(e,t)=>{t.pattern??(t.pattern=mg),iy.init(e,t)}),gy=vm("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=gg),iy.init(e,t)}),yy=vm("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=$g({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${xg}T(?:${r})$`)}(t)),iy.init(e,t)}),by=vm("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Tg),iy.init(e,t)}),vy=vm("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${$g(t)}$`)),iy.init(e,t)}),Dy=vm("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=bg),iy.init(e,t)}),wy=vm("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=_g),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),_y=vm("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kg),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),ky=vm("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Eg),iy.init(e,t)}),Ey=vm("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Sg),iy.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Sy(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Ay=vm("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ag),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Sy(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Cy=vm("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Cg),iy.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Cg.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Sy(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Py=vm("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Og),iy.init(e,t)});const Oy=vm("$ZodJWT",(e,t)=>{iy.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),xy=vm("$ZodNumber",(e,t)=>{ry.init(e,t),e._zod.pattern=e._zod.bag.pattern??Rg,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const s=n.value;if("number"==typeof s&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i="number"==typeof s?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),Ty=vm("$ZodNumber",(e,t)=>{Kg.init(e,t),xy.init(e,t)}),$y=vm("$ZodBoolean",(e,t)=>{ry.init(e,t),e._zod.pattern=Lg,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const s=n.value;return"boolean"==typeof s||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Ny=vm("$ZodUnknown",(e,t)=>{ry.init(e,t),e._zod.parse=e=>e}),Ry=vm("$ZodNever",(e,t)=>{ry.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ly(e,t,n){e.issues.length&&t.issues.push(...Um(n,e.issues)),t.value[n]=e.value}const Fy=vm("$ZodArray",(e,t)=>{ry.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let e=0;e<s.length;e++){const o=s[e],a=t.element._zod.run({value:o,issues:[]},r);a instanceof Promise?i.push(a.then(t=>Ly(t,n,e))):Ly(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Iy(e,t,n,r){e.issues.length&&t.issues.push(...Um(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function My(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function jy(e,t,n,r,s,i){const o=[],a=s.keySet,c=s.catchall._zod,u=c.def.type;for(const s of Object.keys(t)){if(a.has(s))continue;if("never"===u){o.push(s);continue}const i=c.run({value:t[s],issues:[]},r);i instanceof Promise?e.push(i.then(e=>Iy(e,n,s,t))):Iy(i,n,s,t)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const By=vm("$ZodObject",(e,t)=>{ry.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=Sm(()=>My(t));Om(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=Rm,i=t.catchall;let o;e._zod.parse=(t,n)=>{o??(o=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=o.shape;for(const e of o.keys){const r=u[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?c.push(r.then(n=>Iy(n,t,e,a))):Iy(r,t,e,a)}return i?jy(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),zy=vm("$ZodObjectJIT",(e,t)=>{By.init(e,t);const n=e._zod.parse,r=Sm(()=>My(t));let s;const i=Rm,o=!_m.jitless,a=o&&Lm.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return i(p)?o&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new ty(["shape","payload","ctx"]),n=r.value,s=e=>{const t=$m(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let o=0;for(const e of n.keys)i[e]="key_"+o++;t.write("const newResult = {};");for(const e of n.keys){const n=i[e],r=$m(e);t.write(`const ${n} = ${s(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?jy([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function Hy(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!Km(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Zm(e,r,km())))}),t)}const Ky=vm("$ZodUnion",(e,t)=>{ry.init(e,t),Om(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Om(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Om(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Om(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>Cm(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>Hy(t,s,e,i)):Hy(a,s,e,i)}}),Uy=vm("$ZodIntersection",(e,t)=>{ry.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([t,n])=>Zy(e,t,n)):Zy(e,s,i)}});function qy(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Fm(e)&&Fm(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=qy(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=qy(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zy(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Km(e))return e;const r=qy(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Gy=vm("$ZodRecord",(e,t)=>{ry.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Fm(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const o=t.valueType._zod.run({value:s[e],issues:[]},r);o instanceof Promise?i.push(o.then(t=>{t.issues.length&&n.issues.push(...Um(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...Um(e,o.issues)),n.value[e]=o.value)}let a;for(const e in s)o.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const o of Reflect.ownKeys(s)){if("__proto__"===o)continue;const a=t.keyType._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Zm(e,r,km())),input:o,path:[o],inst:e}),n.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:s[o],issues:[]},r);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...Um(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...Um(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Wy=vm("$ZodEnum",(e,t)=>{ry.init(e,t);const n=function(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>Mm.has(typeof e)).map(e=>"string"==typeof e?jm(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),Vy=vm("$ZodTransform",(e,t)=>{ry.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new wm(e.constructor.name);const s=t.transform(n.value,n);if(r.async){return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n))}if(s instanceof Promise)throw new Dm;return n.value=s,n}});function Jy(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Yy=vm("$ZodOptional",(e,t)=>{ry.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Om(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Om(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Cm(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Jy(t,e.value)):Jy(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Qy=vm("$ZodNullable",(e,t)=>{ry.init(e,t),Om(e._zod,"optin",()=>t.innerType._zod.optin),Om(e._zod,"optout",()=>t.innerType._zod.optout),Om(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Cm(e.source)}|null)$`):void 0}),Om(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Xy=vm("$ZodDefault",(e,t)=>{ry.init(e,t),e._zod.optin="optional",Om(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>eb(e,t)):eb(r,t)}});function eb(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const tb=vm("$ZodPrefault",(e,t)=>{ry.init(e,t),e._zod.optin="optional",Om(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nb=vm("$ZodNonOptional",(e,t)=>{ry.init(e,t),Om(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>rb(t,e)):rb(s,e)}});function rb(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const sb=vm("$ZodCatch",(e,t)=>{ry.init(e,t),Om(e._zod,"optin",()=>t.innerType._zod.optin),Om(e._zod,"optout",()=>t.innerType._zod.optout),Om(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Zm(e,n,km()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Zm(e,n,km()))},input:e.value}),e.issues=[]),e)}}),ib=vm("$ZodPipe",(e,t)=>{ry.init(e,t),Om(e._zod,"values",()=>t.in._zod.values),Om(e._zod,"optin",()=>t.in._zod.optin),Om(e._zod,"optout",()=>t.out._zod.optout),Om(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ob(e,t.in,n)):ob(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ob(e,t.out,n)):ob(r,t.out,n)}});function ob(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ab=vm("$ZodReadonly",(e,t)=>{ry.init(e,t),Om(e._zod,"propValues",()=>t.innerType._zod.propValues),Om(e._zod,"values",()=>t.innerType._zod.values),Om(e._zod,"optin",()=>t.innerType._zod.optin),Om(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(cb):cb(r)}});function cb(e){return e.value=Object.freeze(e.value),e}const ub=vm("$ZodCustom",(e,t)=>{Mg.init(e,t),ry.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>lb(t,n,r,e));lb(s,n,r,e)}});function lb(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Wm(e))}}class fb{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function pb(){return new fb}const db=pb();function hb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...zm(t)})}function mb(e,t){return new Bg({check:"less_than",...zm(t),value:e,inclusive:!1})}function gb(e,t){return new Bg({check:"less_than",...zm(t),value:e,inclusive:!0})}function yb(e,t){return new zg({check:"greater_than",...zm(t),value:e,inclusive:!1})}function bb(e,t){return new zg({check:"greater_than",...zm(t),value:e,inclusive:!0})}function vb(e,t){return new Hg({check:"multiple_of",...zm(t),value:e})}function Db(e,t){return new Ug({check:"max_length",...zm(t),maximum:e})}function wb(e,t){return new qg({check:"min_length",...zm(t),minimum:e})}function _b(e,t){return new Zg({check:"length_equals",...zm(t),length:e})}function kb(e){return new ey({check:"overwrite",tx:e})}function Eb(e){const t=function(e,t){const n=new Mg({check:"custom",...zm(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Wm(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Wm(r))}},e(n.value,n)));return t}const Sb=vm("ZodISODateTime",(e,t)=>{yy.init(e,t),Qb.init(e,t)});function Ab(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...zm(t)})}(Sb,e)}const Cb=vm("ZodISODate",(e,t)=>{by.init(e,t),Qb.init(e,t)});function Pb(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...zm(t)})}(Cb,e)}const Ob=vm("ZodISOTime",(e,t)=>{vy.init(e,t),Qb.init(e,t)});function xb(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...zm(t)})}(Ob,e)}const Tb=vm("ZodISODuration",(e,t)=>{Dy.init(e,t),Qb.init(e,t)});function $b(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...zm(t)})}(Tb,e)}const Nb=(e,t)=>{Jm.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>r({issues:e}));else if("invalid_key"===s.code)r({issues:s.issues});else if("invalid_element"===s.code)r({issues:s.issues});else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Em,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Em,2)}},isEmpty:{get:()=>0===e.issues.length}})},Rb=vm("ZodError",Nb),Lb=vm("ZodError",Nb,{Parent:Error}),Fb=Qm(Lb),Ib=Xm(Lb),Mb=eg(Lb),jb=ng(Lb),Bb=sg(Lb),zb=ig(Lb),Hb=og(Lb),Kb=ag(Lb),Ub=cg(Lb),qb=ug(Lb),Zb=lg(Lb),Gb=fg(Lb),Wb=vm("ZodType",(e,t)=>(ry.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Tm(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Bm(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Fb(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Mb(e,t,n),e.parseAsync=async(t,n)=>Ib(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>jb(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Bb(e,t,n),e.decode=(t,n)=>zb(e,t,n),e.encodeAsync=async(t,n)=>Hb(e,t,n),e.decodeAsync=async(t,n)=>Kb(e,t,n),e.safeEncode=(t,n)=>Ub(e,t,n),e.safeDecode=(t,n)=>qb(e,t,n),e.safeEncodeAsync=async(t,n)=>Zb(e,t,n),e.safeDecodeAsync=async(t,n)=>Gb(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...zm(n)})}(Wv,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){return Eb(e)}(t)),e.overwrite=t=>e.check(kb(t)),e.optional=()=>Mv(e),e.nullable=()=>Bv(e),e.nullish=()=>Mv(Bv(e)),e.nonoptional=t=>function(e,t){return new Kv({type:"nonoptional",innerType:e,...zm(t)})}(e,t),e.array=()=>Pv(e),e.or=t=>$v([e,t]),e.and=t=>new Nv({type:"intersection",left:e,right:t}),e.transform=t=>Zv(e,function(e){return new Fv({type:"transform",transform:e})}(t)),e.default=t=>{return n=t,new zv({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Im(n)}});var n},e.prefault=t=>{return n=t,new Hv({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Im(n)}});var n},e.catch=t=>{return new Uv({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Zv(e,t),e.readonly=()=>new Gv({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return db.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>db.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return db.get(e);const n=e.clone();return db.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Vb=vm("_ZodString",(e,t)=>{sy.init(e,t),Wb.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new Wg({check:"string_format",format:"regex",...zm(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Yg({check:"string_format",format:"includes",...zm(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Qg({check:"string_format",format:"starts_with",...zm(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Xg({check:"string_format",format:"ends_with",...zm(t),suffix:e})}(...t)),e.min=(...t)=>e.check(wb(...t)),e.max=(...t)=>e.check(Db(...t)),e.length=(...t)=>e.check(_b(...t)),e.nonempty=(...t)=>e.check(wb(1,...t)),e.lowercase=t=>e.check(function(e){return new Vg({check:"string_format",format:"lowercase",...zm(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Jg({check:"string_format",format:"uppercase",...zm(e)})}(t)),e.trim=()=>e.check(kb(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return kb(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(kb(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(kb(e=>e.toUpperCase()))}),Jb=vm("ZodString",(e,t)=>{sy.init(e,t),Vb.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...zm(t)})}(Xb,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...zm(t)})}(nv,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...zm(t)})}(yv,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...zm(t)})}(rv,t)),e.guid=t=>e.check(hb(ev,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...zm(t)})}(tv,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...zm(t)})}(tv,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...zm(t)})}(tv,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...zm(t)})}(tv,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...zm(t)})}(sv,t)),e.guid=t=>e.check(hb(ev,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...zm(t)})}(iv,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...zm(t)})}(ov,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...zm(t)})}(av,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...zm(t)})}(hv,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...zm(t)})}(mv,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...zm(t)})}(cv,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...zm(t)})}(uv,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...zm(t)})}(lv,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...zm(t)})}(fv,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...zm(t)})}(pv,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...zm(t)})}(dv,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...zm(t)})}(gv,t)),e.datetime=t=>e.check(Ab(t)),e.date=t=>e.check(Pb(t)),e.time=t=>e.check(xb(t)),e.duration=t=>e.check($b(t))});function Yb(e){return function(e,t){return new e({type:"string",...zm(t)})}(Jb,e)}const Qb=vm("ZodStringFormat",(e,t)=>{iy.init(e,t),Vb.init(e,t)}),Xb=vm("ZodEmail",(e,t)=>{cy.init(e,t),Qb.init(e,t)}),ev=vm("ZodGUID",(e,t)=>{oy.init(e,t),Qb.init(e,t)}),tv=vm("ZodUUID",(e,t)=>{ay.init(e,t),Qb.init(e,t)}),nv=vm("ZodURL",(e,t)=>{uy.init(e,t),Qb.init(e,t)}),rv=vm("ZodEmoji",(e,t)=>{ly.init(e,t),Qb.init(e,t)}),sv=vm("ZodNanoID",(e,t)=>{fy.init(e,t),Qb.init(e,t)}),iv=vm("ZodCUID",(e,t)=>{py.init(e,t),Qb.init(e,t)}),ov=vm("ZodCUID2",(e,t)=>{dy.init(e,t),Qb.init(e,t)}),av=vm("ZodULID",(e,t)=>{hy.init(e,t),Qb.init(e,t)}),cv=vm("ZodXID",(e,t)=>{my.init(e,t),Qb.init(e,t)}),uv=vm("ZodKSUID",(e,t)=>{gy.init(e,t),Qb.init(e,t)}),lv=vm("ZodIPv4",(e,t)=>{wy.init(e,t),Qb.init(e,t)}),fv=vm("ZodIPv6",(e,t)=>{_y.init(e,t),Qb.init(e,t)}),pv=vm("ZodCIDRv4",(e,t)=>{ky.init(e,t),Qb.init(e,t)}),dv=vm("ZodCIDRv6",(e,t)=>{Ey.init(e,t),Qb.init(e,t)}),hv=vm("ZodBase64",(e,t)=>{Ay.init(e,t),Qb.init(e,t)}),mv=vm("ZodBase64URL",(e,t)=>{Cy.init(e,t),Qb.init(e,t)}),gv=vm("ZodE164",(e,t)=>{Py.init(e,t),Qb.init(e,t)}),yv=vm("ZodJWT",(e,t)=>{Oy.init(e,t),Qb.init(e,t)}),bv=vm("ZodNumber",(e,t)=>{xy.init(e,t),Wb.init(e,t),e.gt=(t,n)=>e.check(yb(t,n)),e.gte=(t,n)=>e.check(bb(t,n)),e.min=(t,n)=>e.check(bb(t,n)),e.lt=(t,n)=>e.check(mb(t,n)),e.lte=(t,n)=>e.check(gb(t,n)),e.max=(t,n)=>e.check(gb(t,n)),e.int=t=>e.check(Dv(t)),e.safe=t=>e.check(Dv(t)),e.positive=t=>e.check(yb(0,t)),e.nonnegative=t=>e.check(bb(0,t)),e.negative=t=>e.check(mb(0,t)),e.nonpositive=t=>e.check(gb(0,t)),e.multipleOf=(t,n)=>e.check(vb(t,n)),e.step=(t,n)=>e.check(vb(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});const vv=vm("ZodNumberFormat",(e,t)=>{Ty.init(e,t),bv.init(e,t)});function Dv(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...zm(t)})}(vv,e)}const wv=vm("ZodBoolean",(e,t)=>{$y.init(e,t),Wb.init(e,t)});function _v(e){return function(e,t){return new e({type:"boolean",...zm(t)})}(wv,e)}const kv=vm("ZodUnknown",(e,t)=>{Ny.init(e,t),Wb.init(e,t)});function Ev(){return new kv({type:"unknown"})}const Sv=vm("ZodNever",(e,t)=>{Ry.init(e,t),Wb.init(e,t)});function Av(e){return function(e,t){return new e({type:"never",...zm(t)})}(Sv,e)}const Cv=vm("ZodArray",(e,t)=>{Fy.init(e,t),Wb.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(wb(t,n)),e.nonempty=t=>e.check(wb(1,t)),e.max=(t,n)=>e.check(Db(t,n)),e.length=(t,n)=>e.check(_b(t,n)),e.unwrap=()=>e.element});function Pv(e,t){return function(e,t,n){return new e({type:"array",element:t,...zm(n)})}(Cv,e,t)}const Ov=vm("ZodObject",(e,t)=>{zy.init(e,t),Wb.init(e,t),Om(e,"shape",()=>t.shape),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Lv({type:"enum",entries:n,...zm(t)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ev()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ev()}),e.strict=()=>e.clone({...e._zod.def,catchall:Av()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Fm(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=Tm(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return xm(this,"shape",n),n},checks:[]});return Bm(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Fm(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return xm(this,"shape",n),n},checks:e._zod.def.checks};return Bm(e,n)}(e,t),e.merge=t=>function(e,t){const n=Tm(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return xm(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Bm(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Bm(e,Tm(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return xm(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Tm(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return xm(this,"shape",r),r},checks:[]});return Bm(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Tm(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return xm(this,"shape",s),s},checks:[]});return Bm(t,r)}(Iv,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Tm(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return xm(this,"shape",s),s},checks:[]});return Bm(t,r)}(Kv,e,t[0])});function xv(e,t){const n={type:"object",shape:e??{},...zm(t)};return new Ov(n)}const Tv=vm("ZodUnion",(e,t)=>{Ky.init(e,t),Wb.init(e,t),e.options=t.options});function $v(e,t){return new Tv({type:"union",options:e,...zm(t)})}const Nv=vm("ZodIntersection",(e,t)=>{Uy.init(e,t),Wb.init(e,t)});const Rv=vm("ZodRecord",(e,t)=>{Gy.init(e,t),Wb.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});const Lv=vm("ZodEnum",(e,t)=>{Wy.init(e,t),Wb.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Lv({...t,checks:[],...zm(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Lv({...t,checks:[],...zm(r),entries:s})}});const Fv=vm("ZodTransform",(e,t)=>{Vy.init(e,t),Wb.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new wm(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Wm(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Wm(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}});const Iv=vm("ZodOptional",(e,t)=>{Yy.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mv(e){return new Iv({type:"optional",innerType:e})}const jv=vm("ZodNullable",(e,t)=>{Qy.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Bv(e){return new jv({type:"nullable",innerType:e})}const zv=vm("ZodDefault",(e,t)=>{Xy.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Hv=vm("ZodPrefault",(e,t)=>{tb.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Kv=vm("ZodNonOptional",(e,t)=>{nb.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Uv=vm("ZodCatch",(e,t)=>{sb.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const qv=vm("ZodPipe",(e,t)=>{ib.init(e,t),Wb.init(e,t),e.in=t.in,e.out=t.out});function Zv(e,t){return new qv({type:"pipe",in:e,out:t})}const Gv=vm("ZodReadonly",(e,t)=>{ab.init(e,t),Wb.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Wv=vm("ZodCustom",(e,t)=>{ub.init(e,t),Wb.init(e,t)});function Vv(e){return function(e,t){return new e({type:"number",coerce:!0,checks:[],...zm(t)})}(bv,e)}const Jv=$v([_v(),Yb(),function(e,t){return new e({type:"number",checks:[],...zm(t)})}(bv,Yv)]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=String(e).trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();var Yv;const Qv=xv({script:Yb().min(1,{message:"script must be a non-empty string"}),warnPattern:Yb().min(1,{message:"warnPattern must be a non-empty string"}).optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp(e),!0}catch{return!1}})(e),{message:"warnPattern: invalid regular expression"})}).strict(),Xv=function(e,t,n){return new Rv({type:"record",keyType:e,valueType:t,...zm(n)})}(Yb(),$v([Yb().min(1),Qv])).default({}),eD=xv({archive:Jv,combine:Jv,keep:Jv,sequential:Jv,live:Jv,plan:Jv,hangWarn:Vv().int().positive().optional(),hangKill:Vv().int().positive().optional(),hangKillGrace:Vv().int().positive().optional(),scripts:$v([_v(),Pv(Yb())]).optional(),prompt:Yb().optional()}).strict().optional(),tD=xv({file:Yb().optional()}).strict().optional(),nD=xv({stash:Jv}).strict().optional(),rD=xv({debug:Jv,boring:Jv,patch:tD,run:eD,snap:nD}).strict().optional(),sD=xv({scripts:Xv,cliDefaults:rD,patchOpenCommand:Yb().optional(),maxUndos:Vv().int().positive().optional(),devMode:Jv}).strict(),iD=(e,t)=>{if((()=>{try{return"1"===process.env.STAN_DEBUG}catch{return!1}})())try{console.error(`stan: debug: fallback: ${e}: ${t}`)}catch{}},oD=(e,t)=>{const n=e&&"object"==typeof e?e:{};let r;try{r=sD.parse(n)}catch(e){const n=t.replace(/\\/g,"/");throw new Error(`stan-cli: invalid config in ${n}\n${(e=>e instanceof Rb?e.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("\n"):String(e))(e)}`)}return(e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e??{},t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')})(r.scripts??{}),{scripts:r.scripts??{},cliDefaults:r.cliDefaults,patchOpenCommand:r.patchOpenCommand??ue,maxUndos:r.maxUndos,devMode:r.devMode}},aD=t=>{const r=(e=>{const t=de(e);if(t)return t;const r=new Set;let s=e;for(;s;){const e=fe({cwd:s});if(!e||r.has(e))break;r.add(e);const t=de(e);if(t)return t;const i=n.dirname(e);if(i===e||r.has(i))break;s=i}return null})(t);if(!r)return{scripts:{},patchOpenCommand:ue};const s=((e,t)=>e.endsWith(".json")?JSON.parse(t):bm.parse(t))(r,e.readFileSync(r,"utf8")),i=s&&"object"==typeof s?s:{};if(i["stan-cli"]&&"object"==typeof i["stan-cli"])return oD(i["stan-cli"],r);const o=(e=>{const t=["scripts","cliDefaults","patchOpenCommand","maxUndos","devMode"],n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n})(i);return Object.keys(o).length>0?(iD("cli.config:loadSync",`using legacy top-level CLI keys from ${r.replace(/\\/g,"/")}; run "stan init" to migrate`),Object.prototype.hasOwnProperty.call(i,"stan-core")||iD("run.action:engine-legacy",`detected legacy root keys (no "stan-core") in ${r.replace(/\\/g,"/")}`),oD(o,r)):{scripts:{},patchOpenCommand:ue}},cD=(e=0)=>t=>`[${t+e}m`,uD=(e=0)=>t=>`[${38+e};5;${t}m`,lD=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,fD={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(fD.modifier);Object.keys(fD.color),Object.keys(fD.bgColor);const pD=function(){const e=new Map;for(const[t,n]of Object.entries(fD)){for(const[t,r]of Object.entries(n))fD[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=fD[t],e.set(r[0],r[1]);Object.defineProperty(fD,t,{value:n,enumerable:!1})}return Object.defineProperty(fD,"codes",{value:e,enumerable:!1}),fD.color.close="",fD.bgColor.close="",fD.color.ansi=cD(),fD.color.ansi256=uD(),fD.color.ansi16m=lD(),fD.bgColor.ansi=cD(10),fD.bgColor.ansi256=uD(10),fD.bgColor.ansi16m=lD(10),Object.defineProperties(fD,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>fD.rgbToAnsi256(...fD.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const s=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(t,n,r);if(0===s)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===s&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>fD.ansi256ToAnsi(fD.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>fD.ansi256ToAnsi(fD.hexToAnsi256(e)),enumerable:!1}}),fD}();function dD(e,t=(globalThis.Deno?globalThis.Deno.args:s.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}const{env:hD}=s;let mD;function gD(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in hD)return"true"===hD.FORCE_COLOR?1:"false"===hD.FORCE_COLOR?0:0===hD.FORCE_COLOR.length?1:Math.min(Number.parseInt(hD.FORCE_COLOR,10),3)}();void 0!==r&&(mD=r);const i=n?mD:r;if(0===i)return 0;if(n){if(dD("color=16m")||dD("color=full")||dD("color=truecolor"))return 3;if(dD("color=256"))return 2}if("TF_BUILD"in hD&&"AGENT_NAME"in hD)return 1;if(e&&!t&&void 0===i)return 0;const o=i||0;if("dumb"===hD.TERM)return o;if("win32"===s.platform){const e=g.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in hD)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in hD)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in hD)||"codeship"===hD.CI_NAME?1:o;if("TEAMCITY_VERSION"in hD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(hD.TEAMCITY_VERSION)?1:0;if("truecolor"===hD.COLORTERM)return 3;if("xterm-kitty"===hD.TERM)return 3;if("xterm-ghostty"===hD.TERM)return 3;if("wezterm"===hD.TERM)return 3;if("TERM_PROGRAM"in hD){const e=Number.parseInt((hD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(hD.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(hD.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(hD.TERM)||"COLORTERM"in hD?1:o}function yD(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(gD(e,{streamIsTTY:e&&e.isTTY,...t}))}dD("no-color")||dD("no-colors")||dD("color=false")||dD("color=never")?mD=0:(dD("color")||dD("colors")||dD("color=true")||dD("color=always"))&&(mD=1);const bD={stdout:yD({isTTY:y.isatty(1)}),stderr:yD({isTTY:y.isatty(2)})};function vD(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const s=t.length;let i=0,o="";do{o+=e.slice(i,r)+t+n,i=r+s,r=e.indexOf(t,i)}while(-1!==r);return o+=e.slice(i),o}const{stdout:DD,stderr:wD}=bD,_D=Symbol("GENERATOR"),kD=Symbol("STYLER"),ED=Symbol("IS_EMPTY"),SD=["ansi","ansi","ansi256","ansi16m"],AD=Object.create(null),CD=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=DD?DD.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,PD.prototype),t};function PD(e){return CD(e)}Object.setPrototypeOf(PD.prototype,Function.prototype);for(const[e,t]of Object.entries(pD))AD[e]={get(){const n=ND(this,$D(t.open,t.close,this[kD]),this[ED]);return Object.defineProperty(this,e,{value:n}),n}};AD.visible={get(){const e=ND(this,this[kD],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const OD=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?pD[n].ansi16m(...r):"ansi256"===t?pD[n].ansi256(pD.rgbToAnsi256(...r)):pD[n].ansi(pD.rgbToAnsi(...r)):"hex"===e?OD("rgb",t,n,...pD.hexToRgb(...r)):pD[n][e](...r),xD=["rgb","hex","ansi256"];for(const e of xD){AD[e]={get(){const{level:t}=this;return function(...n){const r=$D(OD(e,SD[t],"color",...n),pD.color.close,this[kD]);return ND(this,r,this[ED])}}};AD["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=$D(OD(e,SD[t],"bgColor",...n),pD.bgColor.close,this[kD]);return ND(this,r,this[ED])}}}}const TD=Object.defineProperties(()=>{},{...AD,level:{enumerable:!0,get(){return this[_D].level},set(e){this[_D].level=e}}}),$D=(e,t,n)=>{let r,s;return void 0===n?(r=e,s=t):(r=n.openAll+e,s=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:s,parent:n}},ND=(e,t,n)=>{const r=(...e)=>RD(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,TD),r[_D]=e,r[kD]=t,r[ED]=n,r},RD=(e,t)=>{if(e.level<=0||!t)return e[ED]?"":t;let n=e[kD];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=vD(t,n.close,n.open),n=n.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(e,t,n,r){let s=0,i="";do{const o="\r"===e[r-1];i+=e.slice(s,o?r-1:r)+t+(o?"\r\n":"\n")+n,s=r+1,r=e.indexOf("\n",s)}while(-1!==r);return i+=e.slice(s),i}(t,s,r,i)),r+t+s};Object.defineProperties(PD.prototype,AD);const LD=PD();PD({level:wD?wD.level:0});const FD=()=>{const e=Boolean(process.stdout?.isTTY);return"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!e},ID=e=>FD()?e:LD.green(e),MD=e=>FD()?e:LD.cyan(e),jD=e=>FD()?e:LD.blue(e),BD=e=>FD()?e:LD.red(e),zD=e=>FD()?e:LD.black(e),HD=e=>FD()?e:LD.gray(e),KD=e=>FD()?e:LD.hex("#FFA500")(e),UD=e=>FD()?e:LD.bold(e),qD=e=>FD()?e:LD.dim(e),ZD=(e,t)=>{const{selection:r,config:s,mode:i,behavior:o}=t,a=(null==r?Object.keys(s.scripts):r)??[],c=n.join(s.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[UD("STAN run plan"),"mode: "+("sequential"===i?"sequential":"concurrent"),`output: ${c}/`,..."string"==typeof o.prompt&&o.prompt.trim().length?[`prompt: ${o.prompt}`]:[],`scripts: ${a.length?a.join(", "):"none"}`,"archive: "+(o.archive?"yes":"no"),"combine: "+(o.combine?"yes":"no"),"keep output dir: "+(o.keep?"yes":"no"),"live: "+(o.live?"yes":"no"),`hang warn: ${"number"==typeof o.hangWarn?o.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof o.hangKill?o.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof o.hangKillGrace?o.hangKillGrace.toString():"n/a"}s`].join("\n ")}`};var GD,WD;var VD=function(){if(WD)return GD;WD=1;var e=b,t=e.spawn,n=e.exec;function r(e,t,n){var r={};try{Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[e]||(s(e,t),r[e]=1)}),r[n]||(s(n,t),r[n]=1)})}catch(e){if(n)return n(e);throw e}if(n)return n()}function s(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function i(e,t,n,r,s){var o=r(e),a="";o.stdout.on("data",function(e){e=e.toString("ascii");a+=e});o.on("close",function(o){delete n[e],0==o?a.match(/\d+/g).forEach(function(o){o=parseInt(o,10),t[e].push(o),t[o]=[],n[o]=1,i(o,t,n,r,s)}):0==Object.keys(n).length&&s()})}return GD=function(e,s,o){if("function"==typeof s&&void 0===o&&(o=s,s=void 0),e=parseInt(e),Number.isNaN(e)){if(o)return o(new Error("pid must be a number"));throw new Error("pid must be a number")}var a={},c={};switch(a[e]=[],c[e]=1,process.platform){case"win32":n("taskkill /pid "+e+" /T /F",o);break;case"darwin":i(e,a,c,function(e){return t("pgrep",["-P",e])},function(){r(a,s,o)});break;default:i(e,a,c,function(e){return t("ps",["-o","pid","--no-headers","--ppid",e])},function(){r(a,s,o)})}}}(),JD=bf(VD);class YD{behavior;constructor(e){this.behavior=e}pids=new Map;lastCancelled=[];track(e,t){this.pids.set(e,t)}cancelAll(e){const t="number"==typeof this.behavior.hangKillGrace?this.behavior.hangKillGrace:10,n=e?.immediate?0:Math.max(0,1e3*t),r=Array.from(this.pids.entries()),s=Array.from(this.pids.values());this.lastCancelled=s;for(const[,e]of r)try{Number.isFinite(e)&&process.kill(e,"SIGTERM")}catch{}const i=()=>{for(const[,e]of r)try{Number.isFinite(e)&&JD(e,"SIGKILL")}catch{}};n<=0?setTimeout(i,0):setTimeout(i,n),this.pids.clear()}async waitAll(e=2e3){const t=this.lastCancelled.length>0?[...this.lastCancelled]:Array.from(this.pids.values());if(0===t.length)return;const n=Date.now()+Math.max(0,e),r=e=>{try{return process.kill(e,0)}catch{return!1}};for(;Date.now()<n;){if(0===t.filter(e=>r(e)).length)break;await new Promise(e=>setTimeout(e,50))}this.lastCancelled=[]}}const QD=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),XD=(e,t,n)=>{if(QD)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},ew={get enabled(){return QD},renderer:{start(e){XD("renderer","start()",e)},update(e){XD("renderer","update()",e)},render(e){XD("renderer","render()",e)},headerOnly(e){XD("renderer","render(header-only)",e)},flush(){XD("renderer","flush()")},clear(){XD("renderer","clear()")},stop(){XD("renderer","stop()")},done(){XD("renderer","stop():done()")}},ui:{start(){XD("UI","start()")},installCancellation(){XD("UI","installCancellation(): control.attach()")},onCancelled(e){XD("UI","onCancelled()",{mode:e})},stop(){XD("UI","stop() -> sink.stop()")}},session:{info(e,t){XD("session",e,t)},exitHook(){XD("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}},tw=(e,t)=>{const r=n.join(e,t),s=n.join(r,"system");return{base:r,system:s,output:n.join(r,"output"),diff:n.join(r,"diff"),patch:n.join(r,"patch"),systemFile:n.join(s,"stan.system.md")}},nw=async(e,s,i)=>{if(i&&"object"==typeof i)try{await(async e=>{const{cwd:s,stanPath:i,map:o,onStage:a}=e;if(!o||"object"!=typeof o)return;const c=te(s,i),u=n.join(c.rootAbs,"imports");await r.ensureDir(u);const l=Object.keys(o).sort();for(const e of l){const i=o[e]??[];if(!Array.isArray(i)||0===i.length)continue;const c=df(e);if(!c)continue;const l=n.join(u,c);await t.rm(l,{recursive:!0,force:!0}).catch(()=>{}),await r.ensureDir(l).catch(()=>{});const f=[];for(const e of i){const i=String(e??"").trim();if(!i)continue;const o=ff(i.replace(/\\/g,"/"));try{const e=await uf(i,{cwd:s,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const i of e){if(!await hf(i))continue;const e=n.relative(n.isAbsolute(o)?o:n.resolve(s,o),i).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const a=n.join(l,e);await r.ensureDir(n.dirname(a)).catch(()=>{});try{await t.copyFile(i,a),f.push(a)}catch{}}}catch{}}try{"function"==typeof a&&a(c,f.map(e=>n.relative(s,e).replace(/\\/g,"/")))}catch{}}})({cwd:e,stanPath:s,map:i})}catch{}},rw=async e=>{try{const r=await t.readdir(e,{withFileTypes:!0}),s=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(r.map(async r=>{s.has(r.name)||await t.rm(n.resolve(e,r.name),{recursive:!0,force:!0})}))}catch{}},sw=async(e,r)=>{const s=n.join(e,r,"patch");try{const e=await t.readdir(s,{withFileTypes:!0});await Promise.all(e.map(e=>t.rm(n.resolve(s,e.name),{recursive:!0,force:!0})))}catch{}},iw=e=>n.join(e,"system","stan.system.md"),ow=async e=>{const n=await t.readFile(e);return Buffer.from(n)},aw=(t,r,s)=>{const o=n.join(t,iw(r)),a=(()=>{try{const t=mf();if(t&&e.existsSync(t))return t}catch{}try{const t=v.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:w&&"SCRIPT"===w.tagName.toUpperCase()&&w.src||new URL("index.js",document.baseURI).href).resolve("@karmaniverous/stan-core");let r=n.dirname(t);for(let t=0;t<10;t+=1){if("stan-core"===n.basename(r)){const t=n.join(r,"dist","stan.system.md");if(e.existsSync(t))return t;break}const t=n.dirname(r);if(t===r)break;r=t}}catch{}try{const t=v.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:w&&"SCRIPT"===w.tagName.toUpperCase()&&w.src||new URL("index.js",document.baseURI).href).resolve("@karmaniverous/stan-core/dist/stan.system.md");if(t&&e.existsSync(t))return t}catch{}return null})();if("local"===s){if(!e.existsSync(o))throw new Error(`system prompt not found at ${n.join(r,"system","stan.system.md").replace(/\\/g,"/")}`);return{abs:o,display:`${n.join(r,"system","stan.system.md").replace(/\\/g,"/")}`,kind:"local"}}if("core"===s){if(!a||!e.existsSync(a))throw new Error("packaged system prompt not found in @karmaniverous/stan-core");return{abs:a,display:`@karmaniverous/stan-core@${gf}`,kind:"core"}}if("auto"===s){if(e.existsSync(o))return{abs:o,display:`${n.join(r,"system","stan.system.md").replace(/\\/g,"/")}`,kind:"local"};if(a&&e.existsSync(a))return{abs:a,display:`@karmaniverous/stan-core@${gf}`,kind:"core"};try{const t=(()=>{try{const t=i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:w&&"SCRIPT"===w.tagName.toUpperCase()&&w.src||new URL("index.js",document.baseURI).href);let r=n.dirname(t);for(let t=0;t<8;t+=1){const t=n.join(r,"dist"),s=n.join(t,"stan.system.md");if(e.existsSync(s))return s;const i=n.dirname(r);if(i===r)break;r=i}}catch{}return null})();if(t&&e.existsSync(t))return{abs:t,display:`${t.replace(/\\/g,"/")}`,kind:"path"}}catch{}throw new Error("unable to resolve system prompt (auto: local and core unavailable)")}const c=n.isAbsolute(s)?s:n.join(t,s);if(!e.existsSync(c))throw new Error(`system prompt not found at ${c.replace(/\\/g,"/")}`);return{abs:c,display:`${c.replace(/\\/g,"/")}`,kind:"path"}},cw=async(r,s,i)=>{const o=n.join(r,iw(s)),a=n.dirname(o),c=e.existsSync(o);let u=null;if(c)try{u=await ow(o)}catch{u=null}const l=await ow(i.abs),f=c&&null!==u&&u.length===l.length&&u.equals(l);return f||(await t.mkdir(a,{recursive:!0}),await t.writeFile(o,l)),{changed:!f,restore:async()=>{if(!f)try{c&&null!==u?await t.writeFile(o,u):await t.rm(o,{force:!0})}catch{}}}},uw=async e=>{const{cwd:t,config:n,includeOutputs:r,ui:s}=e,{archivePath:i,diffPath:o}=await(async(e,t)=>{const{cwd:n,config:r,includeOutputs:s}=e,i=Boolean(t?.silent),o=tw(n,r.stanPath);i||console.log(`stan: start "${MD("archive")}"`);let a="",c="";try{await nw(n,r.stanPath,r.imports),t?.progress?.start?.("full");const e=Date.now();a=await ce(n,r.stanPath,{includeOutputDir:s,includes:r.includes??[],excludes:r.excludes??[]}),t?.progress?.done?.("full",a,e,Date.now()),i||console.log(`stan: ${ID("done")} "${MD("archive")}" -> ${MD(a.replace(/\\/g,"/"))}`),i||console.log(`stan: start "${MD("archive (diff)")}"`),t?.progress?.start?.("diff");const o=Date.now();({diffPath:c}=await Ja({cwd:n,stanPath:r.stanPath,baseName:"archive",includes:r.includes??[],excludes:r.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:s})),t?.progress?.done?.("diff",c,o,Date.now()),i||console.log(`stan: ${ID("done")} "${MD("archive (diff)")}" -> ${MD(c.replace(/\\/g,"/"))}`)}finally{}return s&&await rw(o.output),await sw(n,r.stanPath),{archivePath:a,diffPath:c}})({cwd:t,config:n,includeOutputs:r},{silent:!0,progress:{start:e=>s.onArchiveStart(e),done:(e,n,r,i)=>s.onArchiveEnd(e,n,t,r,i)}});return{archivePath:i,diffPath:o}},lw=async(e,r)=>{try{const s=await t.readFile(((e,t)=>n.join(e,t,"system",".docs.meta.json"))(e,r),"utf8"),i=JSON.parse(s);if(i&&"object"==typeof i)return i}catch{}return null},fw=async e=>{const{cwd:r,config:s,behavior:i,ui:o,promptAbs:a,promptDisplay:u}=e,l=[],f=tw(r,s.stanPath),p=f.systemFile;if(Boolean(a)&&n.resolve(a)!==n.resolve(p)){let e,n=!0;try{a&&(e=await(async e=>c.createHash("sha256").update(await t.readFile(e)).digest("hex"))(a))}catch{e=void 0}try{const t=await lw(r,s.stanPath),i=t?.prompt&&"object"==typeof t.prompt?t.prompt.hash:void 0;i&&e?n=i!==e:i?e||(n=!1):n=!0}catch{n=!0}if(await nw(r,s.stanPath,s.imports),n){let e=null;try{if(a){const{restore:t}=await cw(r,s.stanPath,{abs:a,display:u,kind:"path"});e=t}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{o.stop()}catch{}return{created:l,cancelled:!0}}try{try{o.onArchiveStart("diff")}catch{}const e=Date.now(),{diffPath:t}=await Ja({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:s.includes??[],excludes:s.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:Boolean(i.combine)});try{o.onArchiveEnd("diff",t,r,e,Date.now())}catch{}l.push(t);try{o.onArchiveStart("full")}catch{}const n=Date.now(),a=await ce(r,s.stanPath,{includeOutputDir:Boolean(i.combine),includes:s.includes??[],excludes:s.excludes??[]});try{o.onArchiveEnd("full",a,r,n,Date.now())}catch{}l.push(a)}finally{await(e?.().catch(()=>{}))}}else{try{o.onArchiveStart("diff")}catch{}const e=Date.now(),{diffPath:t}=await Ja({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:s.includes??[],excludes:s.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:Boolean(i.combine)});try{o.onArchiveEnd("diff",t,r,e,Date.now())}catch{}l.push(t);let n=null;try{if(a){const{restore:e}=await cw(r,s.stanPath,{abs:a,display:u,kind:"path"});n=e}try{o.onArchiveStart("full")}catch{}const e=Date.now(),t=await ce(r,s.stanPath,{includeOutputDir:Boolean(i.combine),includes:s.includes??[],excludes:s.excludes??[]});try{o.onArchiveEnd("full",t,r,e,Date.now())}catch{}l.push(t)}finally{await(n?.().catch(()=>{}))}}return i.combine&&await rw(f.output),await sw(r,s.stanPath),{created:l,cancelled:!1}}let d=null;try{if(a){const{restore:e}=await cw(r,s.stanPath,{abs:a,display:u,kind:"path"});d=e}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{o.stop()}catch{}return{created:l,cancelled:!0}}try{const{archivePath:e,diffPath:t}=await uw({cwd:r,config:s,includeOutputs:Boolean(i.combine),ui:o});l.push(e,t)}finally{await(d?.().catch(()=>{}))}return{created:l,cancelled:!1}},pw=[];pw.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&pw.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&pw.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const dw=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,hw=Symbol.for("signal-exit emitter"),mw=globalThis,gw=Object.defineProperty.bind(Object);class yw{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(mw[hw])return mw[hw];gw(mw,hw,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const s of this.listeners[e])r=!0===s(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class bw{}const vw=globalThis.process,{onExit:Dw}=(ww=dw(vw)?new class extends bw{#e="win32"===vw.platform?"SIGINT":"SIGHUP";#t=new yw;#n;#r;#s;#i={};#o=!1;constructor(e){super(),this.#n=e,this.#i={};for(const t of pw)this.#i[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const s=e;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#s=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!dw(this.#n))return()=>{};!1===this.#o&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const e of pw)try{const t=this.#i[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#a(e,...t),this.#n.reallyExit=e=>this.#c(e)}}unload(){this.#o&&(this.#o=!1,pw.forEach(e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#c(e){return dw(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#a(e,...t){const n=this.#r;if("exit"===e&&dw(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(vw):new class extends bw{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>ww.onExit(e,t),load:()=>ww.load(),unload:()=>ww.unload()});var ww;const _w=(e,t)=>{try{ew.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,Dw(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{ew.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{ew.session.info("uninstall exit hook"),n()}catch{}}};class kw{ui;supervisor;cancelled=!1;restartRequested=!1;cancelledKeys=new Set;wake=null;waitP;constructor(e,t){this.ui=e,this.supervisor=t,this.waitP=new Promise(e=>this.wake=e)}markQueued(e){for(const t of e)this.cancelledKeys.add(`script:${t}`)}async wait(){await this.waitP}isCancelled(){return this.cancelled}isRestart(){return this.restartRequested}wasKeyCancelled(e){return this.cancelled&&this.cancelledKeys.has(`script:${e}`)}triggerCancel(){if(!this.cancelled){this.cancelled=!0;try{this.ui.onCancelled("cancel")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{process.exitCode=1,"test"!==process.env.NODE_ENV&&process.exit(1)}catch{}try{this.wake?.()}catch{}}}triggerRestart(){if(!this.restartRequested){this.restartRequested=!0,this.cancelled=!0;try{this.ui.onCancelled("restart")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{this.wake?.()}catch{}}}detachUiKeys(){try{ew.session.info("restart: detach keys")}catch{}}}const Ew=(t,r)=>{const s=r.PATH??r.Path??"",i=(t=>{const r=[];let s=t;for(;;){const t=n.join(s,"node_modules",".bin");try{e.existsSync(t)&&r.push(t)}catch{}const i=n.dirname(s);if(i===s)break;s=i}return r})(t);return{...r,PATH:[...i,s].filter(Boolean).join(n.delimiter)}},Sw=()=>new Promise(e=>setImmediate(e)),Aw=async(r,s,i,o,a,c,l,f,p)=>{const d=n.resolve(s,`${o}.txt`),h=Date.now();l?.onStart?.(o);const m=e.createWriteStream(d,{encoding:"utf8"}),g=u.spawn(a,{cwd:r,shell:!0,windowsHide:!0,env:Ew(r,process.env)}),y="1"===process.env.STAN_DEBUG;let b="";const v="number"==typeof f?.hangWarn&&f.hangWarn>0?f.hangWarn:0,D="number"==typeof f?.hangKill&&f.hangKill>0?f.hangKill:0,w="number"==typeof f?.hangKillGrace&&f.hangKillGrace>0?f.hangKillGrace:10;let _,k,E=Date.now(),S=!1,A=!1;try{"number"==typeof g.pid&&p&&p.track(`script:${o}`,g.pid)}catch{}g.stdout.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stdout.write(e),E=Date.now()}),g.stderr.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stderr.write(e),E=Date.now()}),(v>0||D>0)&&(_=setInterval(()=>{const e=Date.now()-E;if(!S&&v>0&&e>=1e3*v&&(S=!0,l?.onHangWarn?.(o,v)),!A&&D>0&&e>=1e3*D){A=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}l?.onHangTimeout?.(o,D);const e=Math.max(0,1e3*w);k=setTimeout(()=>{try{"number"==typeof g.pid&&JD(g.pid,"SIGKILL")}catch{}l?.onHangKilled?.(o,w)},e)}},1e3));const C=await new Promise((e,t)=>{g.on("error",e=>t(e instanceof Error?e:new Error(String(e)))),g.on("close",t=>e(t??0))});_&&clearInterval(_),k&&clearTimeout(k),m.end(),await(e=>new Promise((t,n)=>{e.on("close",()=>t()),e.on("error",e=>n(e instanceof Error?e:new Error(String(e))))}))(m);let P="ok";if("number"==typeof C&&0!==C)P="error";else if(f?.warnPatterns&&f.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let n=!1;if(b.length>0&&e(f.warnPatterns,b))n=!0;else try{const r=await t.readFile(d,"utf8");e(f.warnPatterns,r)&&(n=!0)}catch{}n&&(P="warn")}return l?.onEnd?.(o,d,h,Date.now(),C,P),c&&await t.appendFile(c,o.slice(0,1).toUpperCase(),"utf8"),d},Cw=async(e,t,n,r,s,i,o,a,c,u,l)=>{const f=[],p=async n=>{try{if("function"==typeof u&&!u())return}catch{}const s=r.scripts[n],i="string"==typeof s?s:"object"==typeof s&&s&&"script"in s?String(s.script):"",p=s&&"object"==typeof s&&"warnPattern"in s?(e=>{if("string"!=typeof e||!e.trim())return[];const t=e.trim(),n=[];try{n.push(new RegExp(t))}catch{}try{const e=t.replace(/\\\\/g,"\\");e!==t&&n.push(new RegExp(e))}catch{}try{n.push(new RegExp(t,"i"))}catch{}return n})(s.warnPattern):[],d=await Aw(e,t,0,n,i,o,a,{silent:a.silent,hangWarn:c?.hangWarn,hangKill:c?.hangKill,hangKillGrace:c?.hangKillGrace,warnPatterns:p},l);f.push(d)};if("sequential"===i)for(const e of s){const t=e=>new Promise(t=>setTimeout(t,e));if("function"==typeof u){if(!u())break;if(await Sw(),!u())break;if(await t(25),!u())break}if(await p(e),"function"==typeof u&&(await Sw(),!u()))break}else{const e="function"==typeof u?s.filter(()=>u()):s;await Promise.all(e.map(e=>p(e).then(()=>{})))}return f};let Pw=null;const Ow=e=>Pw===e,xw="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,Tw=async e=>{const{cwd:r,config:s,selection:i,mode:o,behavior:a,liveEnabled:c,planBody:u,printPlan:l,ui:f,promptChoice:p}=e,d=Symbol("session-epoch");Pw=d;const h=n.resolve(r,s.stanPath,"output"),m=n.resolve(s.stanPath,"output").replace(/\\/g,"/"),g=await(async(e,r,s)=>{if(!e)return;const i=n.resolve(r,"order.txt");return s||await t.writeFile(i,"","utf8"),i})(xw,h,Boolean(a.keep));let y="",b=null;try{const e=((e,t,n)=>{const r=(n??"auto").trim(),s=aw(e,t,r);return{display:"auto"===r?`auto → ${s.display}`:s.display,abs:s.abs,kind:s.kind}})(r,s.stanPath,p);y=e.display,b=e.abs;try{if("1"===process.env.STAN_DEBUG){const t=e.kind??"path",n=String(b??"").replace(/\\/g,"/");console.error(`stan: debug: prompt: ${t} ${n}`)}}catch{}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: unable to resolve system prompt (${t})`),console.log("");try{f.stop()}catch{}return{created:[],cancelled:!0,restartRequested:!1}}l&&u&&((e,t)=>{const{selection:n,config:r,mode:s,behavior:i,planBody:o,ui:a,promptDisplay:c}=t;try{const e=ZD(0,{selection:n,config:r,mode:s,behavior:{...i,prompt:c}});a.onPlan(e)}catch{"string"==typeof o&&o.length&&a.onPlan(o)}console.log("")})(0,{selection:i,config:s,mode:o,behavior:a,planBody:u,ui:f,promptDisplay:y}),f.start();const v=new YD({hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace}),D=new kw(f,v);try{f.installCancellation(()=>D.triggerCancel(),c?()=>D.triggerRestart():void 0)}catch{}const w=_w(()=>D.triggerCancel(),async()=>{ew.session.exitHook();try{f.stop()}catch{}try{v.cancelAll({immediate:!0})}catch{}try{await v.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}});try{f?.prepareForNewSession?.()}catch{}const _=((e,t,n,r)=>{const s=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of s)e.onScriptQueued(t);return r&&(e.onArchiveQueued("full"),e.onArchiveQueued("diff")),s})(f,i,s,Boolean(a.archive));D.markQueued(_);try{f?.flushNow?.()}catch{}const k=[];if(_.length>0){const e=await(async e=>{const{cwd:t,outAbs:n,outRel:r,config:s,toRun:i,mode:o,orderFile:a,ui:c,epoch:u,isActive:l,shouldContinue:f,supervisor:p,liveEnabled:d,hangWarn:h,hangKill:m,hangKillGrace:g}=e,y=[],b=Cw(t,n,0,s,i,o,a,{onStart:e=>{l(u)&&c.onScriptStart(e)},onEnd:(e,n,r,s,i,o)=>{if(l(u)&&(c.onScriptEnd(e,n,t,r,s,i,o),"error"===o||"number"==typeof i&&0!==i))try{process.exitCode=1}catch{}},silent:!0,onHangWarn:(e,t)=>{if(l(u)&&!d)try{console.log(`stan: ⏱ stalled "${e}" after ${t}s of inactivity`)}catch{}},onHangTimeout:(e,t)=>{if(l(u)&&!d)try{console.log(`stan: ⏱ timeout "${e}" after ${t}s; sending SIGTERM`)}catch{}},onHangKilled:(e,t)=>{if(l(u)&&!d)try{console.log(`stan: ◼ killed "${e}" after ${t}s grace`)}catch{}}},{hangWarn:h,hangKill:m,hangKillGrace:g},f,p).then(e=>{y.push(...e)});return await b.catch(()=>{}),y})({cwd:r,outAbs:h,outRel:m,config:s,toRun:_,mode:o,orderFile:g,ui:f,epoch:d,isActive:Ow,shouldContinue:()=>!D.isCancelled(),supervisor:v,liveEnabled:c,hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace});k.push(...e)}if(D.isCancelled()&&!D.isRestart()){try{f.stop()}catch{}c&&console.log("");try{await v.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}try{const e="win32"===process.platform?1600:400;await new Promise(t=>setTimeout(t,e))}catch{}return w(),{created:k,cancelled:!0,restartRequested:!1}}if(D.isRestart())return w(),{created:k,cancelled:!0,restartRequested:!0};if(a.archive){const e=await fw({cwd:r,config:s,behavior:a,ui:f,promptAbs:b,promptDisplay:y});if(e.cancelled)return w(),{created:k,cancelled:!0,restartRequested:!1};k.push(...e.created)}return ew.session.info("normal path: detach signals, returning to caller"),w(),{created:k,cancelled:!1,restartRequested:!1}};class $w{onCancel;onRestart;attached=!1;keyHandler;dataHandler;constructor(e){this.onCancel=e.onCancel,this.onRestart=e.onRestart}attach(){if(this.attached)return;this.attached=!0;const e=process.stdin,t=Boolean(process.stdout.isTTY),n=Boolean(e.isTTY);if(t&&n){try{D.emitKeypressEvents(e),e.setRawMode?.(!0),e.resume?.()}catch{}this.keyHandler=(e,t)=>{const n=((t??{}).name??"").toLowerCase();"q"!==n?"r"===n&&this.onRestart?.():this.onCancel()},this.dataHandler=e=>{try{if("string"==typeof e){const t=e.toLowerCase();return void(""===t||"q"===t?this.onCancel():"r"===t&&this.onRestart?.())}if(Buffer.isBuffer(e)){if(e.includes(3))return void this.onCancel();const t=e.toString("utf8").toLowerCase();"q"===t?this.onCancel():"r"===t&&this.onRestart?.()}}catch{}},e.on?.("keypress",this.keyHandler),e.on?.("data",this.dataHandler)}}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off?.bind(e)??e.removeListener?.bind(e);try{t&&this.keyHandler&&t("keypress",this.keyHandler),t&&this.dataHandler&&t("data",this.dataHandler)}catch{}try{e.setRawMode?.(!1),e.pause?.()}catch{}}}const Nw=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,Rw=e=>{const t={warn:0,waiting:0,running:0,quiet:0,stalled:0,ok:0,cancelled:0,fail:0,timeout:0};for(const{state:n}of e)"warn"===n.kind?t.warn+=1:"waiting"===n.kind?t.waiting+=1:"running"===n.kind?t.running+=1:"quiet"===n.kind?t.quiet+=1:"stalled"===n.kind?t.stalled+=1:"done"===n.kind?t.ok+=1:"timedout"===n.kind?t.timeout+=1:"cancelled"===n.kind?t.cancelled+=1:"error"!==n.kind&&"killed"!==n.kind||(t.fail+=1);return t};class Lw{rows=new Map;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}clearAll(){this.rows.clear()}update(e,t,n){const r=this.rows.get(e),s=n??r?.meta;if(!s){const n=Nw(e)??(e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:{type:"script",item:e.replace(/^script:/,"")||"(unnamed)"});return this.rows.set(e,{meta:n,state:t}),void this.emit(e,n,t)}this.rows.set(e,{meta:s,state:t}),this.emit(e,s,t)}emit(e,t,n){for(const r of this.listeners)try{r({key:e,meta:t,state:n})}catch{}}counts(){return Rw(Array.from(this.rows.values()).map(e=>({state:e.state})))}}const Fw="[",Iw=`${Fw}?25l`,Mw=`${Fw}?25h`,jw=`${Fw}K`,Bw=e=>e>0?`${Fw}${e}F`:"",zw=`${Fw}1E`,Hw=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(Iw)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=Bw(t));for(let e=0;e<n.length;e+=1){const s=n[e]??"";r+=0===t&&0===e&&""===s?"\n":`\r${jw}${s}\n`}const s=t-n.length;for(let e=0;e<s;e+=1)r+=`\r${jw}`,e<s-1&&(r+=zw);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=Bw(t));for(let e=0;e<t;e+=1)n+=`\r${jw}\n`;e.write(n),t=0}catch{}},done(){try{e.write(Mw)}catch{}}}},Kw=e=>{if(FD()){if("warn"===e)return"[WARN]";switch(e){case"waiting":return"[WAIT]";case"run":return"[RUN]";case"ok":return"[OK]";case"error":return"[FAIL]";case"cancelled":return"[CANCELLED]";case"timeout":return"[TIMEOUT]";case"quiet":return"[QUIET]";case"stalled":return"[STALLED]";case"killed":return"[KILLED]";default:return""}}switch(e){case"warn":return KD("⚠︎ warn");case"waiting":return HD("⏸︎ waiting");case"run":return jD("▶︎ run");case"ok":return ID("✔︎ ok");case"error":return BD("✖︎ fail");case"cancelled":return zD("◼︎ cancelled");case"timeout":return BD("⏱︎ timeout");case"quiet":return MD("⏱︎ quiet");case"stalled":return KD("⏱︎ stalled");case"killed":return BD("◼︎ killed");default:return""}};var Uw,qw,Zw,Gw,Ww={},Vw={},Jw={},Yw={},Qw={exports:{}};function Xw(){return qw?Uw:(qw=1,Uw=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})}function e_(){if(Gw)return Zw;Gw=1;const e=Xw();return Zw=t=>"string"==typeof t?t.replace(e(),""):t,Zw}var t_,n_,r_,s_,i_={exports:{}};function o_(){if(t_)return i_.exports;t_=1;const e=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));return i_.exports=e,i_.exports.default=e,i_.exports}function a_(){return r_?n_:(r_=1,n_=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g})}function c_(){if(s_)return Qw.exports;s_=1;const e=e_(),t=o_(),n=a_(),r=r=>{if("string"!=typeof r||0===r.length)return 0;if(0===(r=e(r)).length)return 0;r=r.replace(n()," ");let s=0;for(let e=0;e<r.length;e++){const n=r.codePointAt(e);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&e++,s+=t(n)?2:1))}return s};return Qw.exports=r,Qw.exports.default=r,Qw.exports}var u_,l_,f_={};var p_,d_,h_,m_,g_,y_,b_,v_,D_,w_,__,k_={exports:{}};function E_(){if(m_)return h_;m_=1;const e=d_?p_:(d_=1,p_={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};h_=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(t,n,r),i=Math.max(t,n,r),o=i-s;let a,c;i===s?a=0:t===i?a=(n-r)/o:n===i?a=2+(r-t)/o:r===i&&(a=4+(t-n)/o),a=Math.min(60*a,360),a<0&&(a+=360);const u=(s+i)/2;return c=i===s?0:u<=.5?o/(i+s):o/(2-i-s),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,s,i;const o=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(o,a,c),l=u-Math.min(o,a,c),f=function(e){return(u-e)/6/l+.5};return 0===l?(s=0,i=0):(i=l/u,t=f(o),n=f(a),r=f(c),o===u?s=r-n:a===u?s=1/3+t-r:c===u&&(s=2/3+n-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*i,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let s=e[2];const i=n.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[i,100*o,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(1-t,1-n,1-r);return[100*((1-t-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*((1-r-s)/(1-s)||0),100*s]},n.rgb.keyword=function(n){const s=t[n];if(s)return s;let i,o=1/0;for(const t of Object.keys(e)){const s=r(n,e[t]);s<o&&(o=s,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],s=t[1],i=t[2];r/=95.047,s/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*s-16,500*(r-s),200*(s-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let s,i,o;if(0===n)return o=255*r,[o,o,o];s=r<.5?r*(1+n):r+n-r*n;const a=2*r-s,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,o=6*i<1?a+6*(s-a)*i:2*i<1?s:3*i<2?a+(s-a)*(2/3-i)*6:a,c[e]=255*o;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,s=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,s*=i<=1?i:2-i;return[t,100*(0===r?2*s/(i+s):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const s=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*i),c=255*r*(1-n*(1-i));switch(r*=255,s){case 0:return[r,c,o];case 1:return[a,r,o];case 2:return[o,r,c];case 3:return[o,a,r];case 4:return[c,o,r];case 5:return[r,o,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,s=Math.max(r,.01);let i,o;o=(2-n)*r;const a=(2-n)*s;return i=n*s,i/=a<=1?a:2-a,i=i||0,o/=2,[t,100*i,100*o]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const s=n+r;let i;s>1&&(n/=s,r/=s);const o=Math.floor(6*t),a=1-r;i=6*t-o,1&o&&(i=1-i);const c=n+i*(a-n);let u,l,f;switch(o){default:case 6:case 0:u=a,l=c,f=n;break;case 1:u=c,l=a,f=n;break;case 2:u=n,l=a,f=c;break;case 3:u=n,l=c,f=a;break;case 4:u=c,l=n,f=a;break;case 5:u=a,l=n,f=c}return[255*u,255*l,255*f]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s)),255*(1-Math.min(1,r*(1-s)+s))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let s,i,o;return s=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[255*s,255*i,255*o]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const s=n**3,i=t**3,o=r**3;return n=s>.008856?s:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let s;s=360*Math.atan2(r,n)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(n*n+r*r),s]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,s,i]=e;let o=null===t?n.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return 2===o&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),o=s-i;let a,c;return a=o<1?i/(1-o):0,c=o<=0?0:s===t?(n-r)/o%6:s===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let s=0;return r<1&&(s=(n-.5*r)/(1-r)),[e[0],100*r,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const s=[0,0,0],i=t%1*6,o=i%1,a=1-o;let c=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-n)*r,[255*(n*s[0]+c),255*(n*s[1]+c),255*(n*s[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},h_}function S_(){if(y_)return g_;y_=1;const e=E_();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),s=Object.keys(e[t]);for(let e=s.length,i=0;i<e;i++){const e=s[i],o=n[e];-1===o.distance&&(o.distance=n[t].distance+1,o.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const s=[r[t].parent,t];let i=e[r[t].parent][t],o=r[t].parent;for(;r[o].parent;)s.unshift(r[o].parent),i=n(e[r[o].parent][o],i),o=r[o].parent;return i.conversion=s,i}return g_=function(e){const n=t(e),s={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(s[e]=r(e,n))}return s},g_}function A_(){if(v_)return b_;v_=1;const e=E_(),t=S_(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const s=t(r);Object.keys(s).forEach(e=>{const t=s[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),b_=n}function C_(){return D_||(D_=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},s=e=>e,i=(e,t,n)=>[e,t,n],o=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=A_());const s=r?10:0,i={};for(const[r,o]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?i[a]=e(n,s):"object"==typeof o&&(i[a]=e(o[t],s))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",o(a.color,"ansi",()=>c(t,"ansi16",s,!1)),o(a.color,"ansi256",()=>c(n,"ansi256",s,!1)),o(a.color,"ansi16m",()=>c(r,"rgb",i,!1)),o(a.bgColor,"ansi",()=>c(t,"ansi16",s,!0)),o(a.bgColor,"ansi256",()=>c(n,"ansi256",s,!0)),o(a.bgColor,"ansi16m",()=>c(r,"rgb",i,!0)),a}})}(k_)),k_.exports}function P_(){if(__)return w_;__=1;const e=o_(),t=function(){if(l_)return u_;l_=1;const e="[\ud800-\udbff][\udc00-\udfff]";return u_=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=C_(),r=["","›"],s=e=>`${r[0]}[${e}m`,i=(e,t,r)=>{let i=[];e=[...e];for(let r of e){const o=r;r.includes(";")&&(r=r.split(";")[0][0]+"0");const a=n.codes.get(Number.parseInt(r,10));if(a){const n=e.indexOf(a.toString());-1===n?i.push(s(t?a:o)):e.splice(n,1)}else{if(t){i.push(s(0));break}i.push(s(o))}}if(t&&(i=i.filter((e,t)=>i.indexOf(e)===t),void 0!==r)){const e=s(n.codes.get(Number.parseInt(r,10)));i=i.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return i.join("")};return w_=(n,s,o)=>{const a=[...n],c=[];let u,l="number"==typeof o?o:a.length,f=!1,p=0,d="";for(const[h,m]of a.entries()){let a=!1;if(r.includes(m)){const e=/\d[^m]*/.exec(n.slice(h,h+18));u=e&&e.length>0?e[0]:void 0,p<l&&(f=!0,void 0!==u&&c.push(u))}else f&&"m"===m&&(f=!1,a=!0);if(f||a||p++,!t({exact:!0}).test(m)&&e(m.codePointAt())&&(p++,"number"!=typeof o&&l++),p>s&&p<=l)d+=m;else if(p!==s||f||void 0===u){if(p>=l){d+=i(c,!0,u);break}}else d=i(c)}return d},w_}var O_,x_,T_,$_,N_={};function R_(){if(O_)return N_;O_=1,Object.defineProperty(N_,"__esModule",{value:!0}),N_.getBorderCharacters=void 0;return N_.getBorderCharacters=e=>{if("honeywell"===e)return{topBody:"═",topJoin:"╤",topLeft:"╔",topRight:"╗",bottomBody:"═",bottomJoin:"╧",bottomLeft:"╚",bottomRight:"╝",bodyLeft:"║",bodyRight:"║",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"╟",joinRight:"╢",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("norc"===e)return{topBody:"─",topJoin:"┬",topLeft:"┌",topRight:"┐",bottomBody:"─",bottomJoin:"┴",bottomLeft:"└",bottomRight:"┘",bodyLeft:"│",bodyRight:"│",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"├",joinRight:"┤",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("ramac"===e)return{topBody:"-",topJoin:"+",topLeft:"+",topRight:"+",bottomBody:"-",bottomJoin:"+",bottomLeft:"+",bottomRight:"+",bodyLeft:"|",bodyRight:"|",bodyJoin:"|",headerJoin:"+",joinBody:"-",joinLeft:"|",joinRight:"|",joinJoin:"|",joinMiddleDown:"+",joinMiddleUp:"+",joinMiddleLeft:"+",joinMiddleRight:"+"};if("void"===e)return{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",headerJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:"",joinMiddleDown:"",joinMiddleUp:"",joinMiddleLeft:"",joinMiddleRight:""};throw new Error('Unknown border template "'+e+'".')},N_}function L_(){if(x_)return f_;x_=1;var e=f_&&f_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(f_,"__esModule",{value:!0}),f_.isCellInRange=f_.areCellEqual=f_.calculateRangeCoordinate=f_.flatten=f_.extractTruncates=f_.sumArray=f_.sequence=f_.distributeUnevenly=f_.countSpaceSequence=f_.groupBySizes=f_.makeBorderConfig=f_.splitAnsi=f_.normalizeString=void 0;const t=e(P_()),n=e(c_()),r=e(e_()),s=R_();f_.normalizeString=e=>e.replace(/\r\n/g,"\n");f_.splitAnsi=e=>{const s=(0,r.default)(e).split("\n").map(n.default),i=[];let o=0;return s.forEach(n=>{i.push(0===n?"":(0,t.default)(e,o,o+n)),o+=n+1}),i};f_.makeBorderConfig=e=>({...(0,s.getBorderCharacters)("honeywell"),...e});f_.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};f_.countSpaceSequence=e=>{var t,n;return null!==(n=null===(t=e.match(/\s+/g))||void 0===t?void 0:t.length)&&void 0!==n?n:0};f_.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));f_.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);f_.sumArray=e=>e.reduce((e,t)=>e+t,0);f_.extractTruncates=e=>e.columns.map(({truncate:e})=>e);f_.flatten=e=>[].concat(...e);f_.calculateRangeCoordinate=e=>{const{row:t,col:n,colSpan:r=1,rowSpan:s=1}=e;return{bottomRight:{col:n+r-1,row:t+s-1},topLeft:{col:n,row:t}}};f_.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return f_.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,f_}function F_(){if(T_)return Yw;T_=1;var e=Yw&&Yw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yw,"__esModule",{value:!0}),Yw.alignString=void 0;const t=e(c_()),n=L_(),r=(e,t)=>e+" ".repeat(t);return Yw.alignString=(e,s,i)=>{const o=(0,t.default)(e);if(o===s)return e;if(o>s)throw new Error("Subject parameter value width cannot be greater than the container width.");if(0===o)return" ".repeat(s);const a=s-o;return"left"===i?r(e,a):"right"===i?((e,t)=>" ".repeat(t)+e)(e,a):"justify"===i?((e,t)=>{const s=(0,n.countSpaceSequence)(e);if(0===s)return r(e,t);const i=(0,n.distributeUnevenly)(t,s);if(Math.max(...i)>3)return r(e,t);let o=0;return e.replace(/\s+/g,e=>e+" ".repeat(i[o++]))})(e,a):((e,t)=>" ".repeat(Math.floor(t/2))+e+" ".repeat(Math.ceil(t/2)))(e,a)},Yw}function I_(){if($_)return Jw;$_=1,Object.defineProperty(Jw,"__esModule",{value:!0}),Jw.alignTableData=void 0;const e=F_();return Jw.alignTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var i;const{width:o,alignment:a}=n.columns[s];return(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:s,row:r},{mapped:!0}))?t:(0,e.alignString)(t,o,a)})),Jw}var M_,j_={},B_={},z_={},H_={};function K_(){if(M_)return H_;M_=1;var e=H_&&H_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(H_,"__esModule",{value:!0}),H_.wrapString=void 0;const t=e(P_()),n=e(c_());return H_.wrapString=(e,r)=>{let s=e;const i=[];do{i.push((0,t.default)(s,0,r)),s=(0,t.default)(s,r).trim()}while((0,n.default)(s));return i},H_}var U_,q_,Z_,G_,W_={};function V_(){if(U_)return W_;U_=1;var e=W_&&W_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(W_,"__esModule",{value:!0}),W_.wrapWord=void 0;const t=e(P_()),n=e(e_());return W_.wrapWord=(e,r)=>{const s=[];let i=0;return((e,t)=>{let r=(0,n.default)(e);const s=[],i=new RegExp("(^.{1,"+String(Math.max(t,1))+"}(\\s+|$))|(^.{1,"+String(Math.max(t-1,1))+"}(\\\\|/|_|\\.|,|;|-))");do{let e;const n=i.exec(r);if(n){e=n[0],r=r.slice(e.length);const t=e.trim().length,i=e.length-t;s.push([t,i])}else e=r.slice(0,t),r=r.slice(t),s.push([e.length,0])}while(r.length);return s})(e,r).forEach(([n,r])=>{s.push((0,t.default)(e,i,i+n)),i+=n+r}),s},W_}function J_(){if(q_)return z_;q_=1,Object.defineProperty(z_,"__esModule",{value:!0}),z_.wrapCell=void 0;const e=L_(),t=K_(),n=V_();return z_.wrapCell=(r,s,i)=>{const o=(0,e.splitAnsi)(r);for(let e=0;e<o.length;){let r;r=i?(0,n.wrapWord)(o[e],s):(0,t.wrapString)(o[e],s),o.splice(e,1,...r),e+=r.length}return o},z_}function Y_(){if(Z_)return B_;Z_=1,Object.defineProperty(B_,"__esModule",{value:!0}),B_.calculateCellHeight=void 0;const e=J_();return B_.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,B_}function Q_(){if(G_)return j_;G_=1,Object.defineProperty(j_,"__esModule",{value:!0}),j_.calculateRowHeights=void 0;const e=Y_(),t=L_();return j_.calculateRowHeights=(n,r)=>{const s=[];for(const[i,o]of n.entries()){let a=1;o.forEach((o,c)=>{var u;const l=null===(u=r.spanningCellManager)||void 0===u?void 0:u.getContainingRange({col:c,row:i});if(!l){const t=(0,e.calculateCellHeight)(o,r.columns[c].width,r.columns[c].wrapWord);return void(a=Math.max(a,t))}const{topLeft:f,bottomRight:p,height:d}=l;if(i===p.row){const e=(0,t.sumArray)(s.slice(f.row)),i=p.row-f.row,o=(0,t.sequence)(f.row+1,p.row).filter(e=>{var t;return!(null===(t=r.drawHorizontalLine)||void 0===t?void 0:t.call(r,e,n.length))}).length,c=d-e-i+o;a=Math.max(a,c)}}),s.push(a)}return s},j_}var X_,ek,tk={},nk={};function rk(){if(X_)return nk;X_=1,Object.defineProperty(nk,"__esModule",{value:!0}),nk.drawContent=void 0;return nk.drawContent=e=>{const{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:s,rowIndex:i,elementType:o}=e,a=t.length,c=[];return r(0,a)&&c.push(n(0,a)),t.forEach((e,t)=>{if(o&&"border"!==o&&"row"!==o||c.push(e),"cell"===o&&void 0===i&&c.push(e),"cell"===o&&void 0!==i){const n=null==s?void 0:s.getContainingRange({col:t,row:i});n&&t!==n.topLeft.col||c.push(e)}if(t+1<a&&r(t+1,a)){const e=n(t+1,a);if("cell"===o&&void 0!==i){const n={col:t+1,row:i},r=null==s?void 0:s.getContainingRange(n);r&&r.topLeft.col!==n.col||c.push(e)}else c.push(e)}}),r(a,a)&&c.push(n(a,a)),c.join("")},nk}function sk(){return ek||(ek=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;const t=rk();e.drawBorderSegments=(e,t)=>{const{separator:n,horizontalBorderIndex:r,spanningCellManager:s}=t;return e.map((e,t)=>{const i=n.body.repeat(e);if(void 0===r)return i;const o=null==s?void 0:s.getContainingRange({col:t,row:r});if(!o)return i;const{topLeft:a}=o;return r===a.row?i:t!==a.col?"":o.extractBorderContent(r)})};e.createSeparatorGetter=e=>{const{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:s}=e;return(e,i)=>{const o=null==n?void 0:n.inSameRange;if(void 0!==r&&o){const n={col:e,row:r-1},a={col:e-1,row:r},c={col:e-1,row:r-1},u={col:e,row:r},l=[[c,n],[n,u],[u,a],[a,c]];if(0===e)return o(u,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===i)return o(c,a)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(0===r)return o(u,a)?t.body:t.join;if(r===s)return o(n,c)?t.body:t.join;const f=l.map(e=>o(...e)).filter(Boolean).length;if(0===f)return t.join;if(4===f)return"";if(2===f)return o(...l[1])&&o(...l[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(1===f){if(!(t.joinRight&&t.joinLeft&&t.joinUp&&t.joinDown))throw new Error(`Can not get border separator for position [${r}, ${e}]`);return o(...l[0])?t.joinDown:o(...l[1])?t.joinLeft:o(...l[2])?t.joinUp:t.joinRight}throw new Error("Invalid case")}return 0===e?t.left:e===i?t.right:t.join}};e.drawBorder=(n,r)=>{const s=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:i,horizontalBorderIndex:o,spanningCellManager:a}=r;return(0,t.drawContent)({contents:s,drawSeparator:i,elementType:"border",rowIndex:o,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:a})+"\n"};e.drawBorderTop=(t,n)=>{const{border:r}=n,s=(0,e.drawBorder)(t,{...n,separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}});return"\n"===s?"":s};e.drawBorderJoin=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};e.drawBorderBottom=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};e.createTableBorderGetter=(t,n)=>(r,s)=>{const i={...n,horizontalBorderIndex:r};return 0===r?(0,e.drawBorderTop)(t,i):r===s?(0,e.drawBorderBottom)(t,i):(0,e.drawBorderJoin)(t,i)}}(tk)),tk}var ik,ok={};function ak(){if(ik)return ok;ik=1,Object.defineProperty(ok,"__esModule",{value:!0}),ok.drawRow=void 0;const e=rk();return ok.drawRow=(t,n)=>{const{border:r,drawVerticalLine:s,rowIndex:i,spanningCellManager:o}=n;return(0,e.drawContent)({contents:t,drawSeparator:s,elementType:"cell",rowIndex:i,separatorGetter:(e,t)=>0===e?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:o})+"\n"},ok}var ck,uk,lk,fk,pk,dk,hk={},mk={},gk={},yk={};function bk(){if(lk)return yk;lk=1,Object.defineProperty(yk,"__esModule",{value:!0});const e=(uk||(uk=1,ck=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(s=r;0!==s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=r;0!==s--;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;0!==s--;){var o=i[s];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}),ck);return e.code='require("ajv/dist/runtime/equal").default',yk.default=e,yk}function vk(){return fk||(fk=1,function(e){e["config.json"]=function e(n,{instancePath:s="",parentData:o,parentDataProperty:c,rootData:u=n}={}){let l=null,f=0;if(n&&"object"==typeof n&&!Array.isArray(n)){for(const e in n)if("border"!==e&&"header"!==e&&"columns"!==e&&"columnDefault"!==e&&"drawVerticalLine"!==e&&"drawHorizontalLine"!==e&&"singleLine"!==e&&"spanningCells"!==e){const t={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.border&&(i(n.border,{instancePath:s+"/border",parentData:n,parentDataProperty:"border",rootData:u})||(l=null===l?i.errors:l.concat(i.errors),f=l.length)),void 0!==n.header){let e=n.header;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.content){const e={instancePath:s+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};null===l?l=[e]:l.push(e),f++}for(const t in e)if("content"!==t&&"alignment"!==t&&"wrapWord"!==t&&"truncate"!==t&&"paddingLeft"!==t&&"paddingRight"!==t){const e={instancePath:s+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:t},message:"must NOT have additional properties"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.content&&"string"!=typeof e.content){const e={instancePath:s+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.alignment&&(a(e.alignment,{instancePath:s+"/header/alignment",parentData:e,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:s+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.truncate){let t=e.truncate;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingLeft){let t=e.paddingLeft;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingRight){let t=e.paddingRight;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.columns&&(d(n.columns,{instancePath:s+"/columns",parentData:n,parentDataProperty:"columns",rootData:u})||(l=null===l?d.errors:l.concat(d.errors),f=l.length)),void 0!==n.columnDefault&&(h(n.columnDefault,{instancePath:s+"/columnDefault",parentData:n,parentDataProperty:"columnDefault",rootData:u})||(l=null===l?h.errors:l.concat(h.errors),f=l.length)),void 0!==n.drawVerticalLine&&"function"!=typeof n.drawVerticalLine){const e={instancePath:s+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.drawHorizontalLine&&"function"!=typeof n.drawHorizontalLine){const e={instancePath:s+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.singleLine&&"boolean"!=typeof n.singleLine){const e={instancePath:s+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.spanningCells){let e=n.spanningCells;if(Array.isArray(e)){const n=e.length;for(let i=0;i<n;i++){let n=e[i];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.row){const e={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};null===l?l=[e]:l.push(e),f++}if(void 0===n.col){const e={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};null===l?l=[e]:l.push(e),f++}for(const e in n)if(!r.call(t.properties.spanningCells.items.properties,e)){const t={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.col){let e=n.col;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.row){let e=n.row;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.colSpan){let e=n.colSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.rowSpan){let e=n.rowSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.alignment&&(a(n.alignment,{instancePath:s+"/spanningCells/"+i+"/alignment",parentData:n,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==n.verticalAlignment&&(m(n.verticalAlignment,{instancePath:s+"/spanningCells/"+i+"/verticalAlignment",parentData:n,parentDataProperty:"verticalAlignment",rootData:u})||(l=null===l?m.errors:l.concat(m.errors),f=l.length)),void 0!==n.wrapWord&&"boolean"!=typeof n.wrapWord){const e={instancePath:s+"/spanningCells/"+i+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==n.truncate){let e=n.truncate;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingLeft){let e=n.paddingLeft;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingRight){let e=n.paddingRight;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+i+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}return e.errors=l,0===f};const t={properties:{spanningCells:{items:{properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}}}}}},n={properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}}},r=Object.prototype.hasOwnProperty;function s(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let o=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),a++}return s.errors=o,0===a}function i(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:c=e}={}){let u=null,l=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===u?u=[e]:u.push(e),l++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===u?u=[e]:u.push(e),l++}return i.errors=u,0===l}const o={enum:["left","right","center","justify"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,c=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),c++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:o.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),c++}return a.errors=i,0===c}bk().default;const c=new RegExp("^[0-9]+$","u");function u(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),a++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:o.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),a++}return u.errors=i,0===a}const l={enum:["top","middle","bottom"]};function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),o++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),o++}return f.errors=i,0===o}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(i=null===i?u.errors:i.concat(u.errors),o=i.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(i=null===i?f.errors:i.concat(f.errors),o=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}return p.errors=i,0===o}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;const a=o;let u=!1,l=null;const f=o;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}(m=f===o)&&(u=!0,l=0);const h=o;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),o++}var m;if((m=h===o)&&u?(u=!1,l=[l,1]):m&&(u=!0,l=1),u)o=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),o++}return d.errors=i,0===o}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(i=null===i?u.errors:i.concat(u.errors),o=i.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(i=null===i?f.errors:i.concat(f.errors),o=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}return h.errors=i,0===o}function m(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),o++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),o++}return m.errors=i,0===o}function g(e,{instancePath:t="",parentData:i,parentDataProperty:o,rootData:a=e}={}){let c=null,u=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===c?c=[e]:c.push(e),u++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===c?c=[e]:c.push(e),u++}return g.errors=c,0===u}function y(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;const a=o;let u=!1,l=null;const f=o;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}(h=f===o)&&(u=!0,l=0);const d=o;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(i=null===i?p.errors:i.concat(p.errors),o=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),o++}var h;if((h=d===o)&&u?(u=!1,l=[l,1]):h&&(u=!0,l=1),u)o=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),o++}return y.errors=i,0===o}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let i=null,o=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(i=null===i?u.errors:i.concat(u.errors),o=i.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(i=null===i?f.errors:i.concat(f.errors),o=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),o++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),o++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),o++}return b.errors=i,0===o}e["streamConfig.json"]=function e(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:i=t}={}){let o=null,a=0;if(t&&"object"==typeof t&&!Array.isArray(t)){if(void 0===t.columnDefault){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};null===o?o=[e]:o.push(e),a++}if(void 0===t.columnCount){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};null===o?o=[e]:o.push(e),a++}for(const e in t)if("border"!==e&&"columns"!==e&&"columnDefault"!==e&&"columnCount"!==e&&"drawVerticalLine"!==e){const t={instancePath:n,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===o?o=[t]:o.push(t),a++}if(void 0!==t.border&&(g(t.border,{instancePath:n+"/border",parentData:t,parentDataProperty:"border",rootData:i})||(o=null===o?g.errors:o.concat(g.errors),a=o.length)),void 0!==t.columns&&(y(t.columns,{instancePath:n+"/columns",parentData:t,parentDataProperty:"columns",rootData:i})||(o=null===o?y.errors:o.concat(y.errors),a=o.length)),void 0!==t.columnDefault&&(b(t.columnDefault,{instancePath:n+"/columnDefault",parentData:t,parentDataProperty:"columnDefault",rootData:i})||(o=null===o?b.errors:o.concat(b.errors),a=o.length)),void 0!==t.columnCount){let e=t.columnCount;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),a++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),a++}}if(void 0!==t.drawVerticalLine&&"function"!=typeof t.drawVerticalLine){const e={instancePath:n+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===o?o=[e]:o.push(e),a++}}else{const e={instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),a++}return e.errors=o,0===a}}(gk)),gk}function Dk(){if(pk)return mk;pk=1;var e=mk&&mk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mk,"__esModule",{value:!0}),mk.validateConfig=void 0;const t=e(vk());return mk.validateConfig=(e,n)=>{const r=t.default[e];if(!r(n)&&r.errors){const e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log("config",n),console.log("errors",e),new Error("Invalid config.")}},mk}function wk(){if(dk)return hk;dk=1,Object.defineProperty(hk,"__esModule",{value:!0}),hk.makeStreamConfig=void 0;const e=L_(),t=Dk(),n=(e,t={},n)=>Array.from({length:e}).map((e,r)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...n,...t[r]}));return hk.makeStreamConfig=r=>{if((0,t.validateConfig)("streamConfig.json",r),void 0===r.columnDefault.width)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...r,border:(0,e.makeBorderConfig)(r.border),columns:n(r.columnCount,r.columns,r.columnDefault)}},hk}var _k,kk={};function Ek(){return _k||(_k=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=L_(),n=J_(),r=e=>new Array(e).fill("");e.padCellVertically=(e,t,n)=>{const s=t-e.length;return"top"===n?[...e,...r(s)]:"bottom"===n?[...r(s),...e]:[...r(Math.floor(s/2)),...e,...r(Math.ceil(s/2))]};e.mapDataUsingRowHeights=(r,s,i)=>{const o=r[0].length,a=r.map((t,r)=>{const a=s[r],c=Array.from({length:a},()=>new Array(o).fill(""));return t.forEach((t,s)=>{var o;const u=null===(o=i.spanningCellManager)||void 0===o?void 0:o.getContainingRange({col:s,row:r});if(u)return void u.extractCellContent(r).forEach((e,t)=>{c[t][s]=e});const l=(0,n.wrapCell)(t,i.columns[s].width,i.columns[s].wrapWord);(0,e.padCellVertically)(l,a,i.columns[s].verticalAlignment).forEach((e,t)=>{c[t][s]=e})}),c});return(0,t.flatten)(a)}}(kk)),kk}var Sk,Ak={};function Ck(){return Sk||(Sk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padTableData=e.padString=void 0;e.padString=(e,t,n)=>" ".repeat(t)+e+" ".repeat(n);e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var i;if(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:s,row:r},{mapped:!0}))return t;const{paddingLeft:o,paddingRight:a}=n.columns[s];return(0,e.padString)(t,o,a)}))}(Ak)),Ak}var Pk,Ok={};function xk(){if(Pk)return Ok;Pk=1,Object.defineProperty(Ok,"__esModule",{value:!0}),Ok.stringifyTableData=void 0;const e=L_();return Ok.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),Ok}var Tk,$k,Nk,Rk={},Lk={exports:{}};function Fk(){return Tk||(Tk=1,function(e,t){var n,r=1/0,s=NaN,i=/^\s+|\s+$/g,o=/\w*$/,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l="\\ud800-\\udfff",f="\\u0300-\\u036f\\ufe20-\\ufe23",p="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",h="["+l+"]",m="["+f+p+"]",g="\\ud83c[\\udffb-\\udfff]",y="[^"+l+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",D="\\u200d",w="(?:"+m+"|"+g+")"+"?",_="["+d+"]?",k=_+w+("(?:"+D+"(?:"+[y,b,v].join("|")+")"+_+w+")*"),E="(?:"+[y+m+"?",m,b,v,h].join("|")+")",S=RegExp(g+"(?="+g+")|"+E+k,"g"),A=RegExp("["+D+l+f+p+d+"]"),C=parseInt,P="object"==typeof yf&&yf&&yf.Object===Object&&yf,O="object"==typeof self&&self&&self.Object===Object&&self,x=P||O||Function("return this")(),T=t&&!t.nodeType&&t,$=T&&e&&!e.nodeType&&e,N=$&&$.exports===T&&P.process,R=function(){try{return N&&N.binding("util")}catch(e){}}(),L=R&&R.isRegExp,F=(n="length",function(e){return null==e?void 0:e[n]});function I(e){return A.test(e)}function M(e){return I(e)?function(e){var t=S.lastIndex=0;for(;S.test(e);)t++;return t}(e):F(e)}function j(e){return I(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var B=Object.prototype.toString,z=x.Symbol,H=z?z.prototype:void 0,K=H?H.toString:void 0;function U(e){if("string"==typeof e)return e;if(V(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(s);++r<s;)i[r]=e[r+t];return i}(e,t,n)}function Z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var G,W=L?(G=L,function(e){return G(e)}):function(e){return Z(e)&&"[object RegExp]"==B.call(e)};function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==B.call(e)}function J(e){return e?(e=function(e){if("number"==typeof e)return e;if(V(e))return s;if(Z(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Z(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=c.test(e);return n||u.test(e)?C(e.slice(2),n?2:8):a.test(e)?s:+e}(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Y(e){return null==e?"":U(e)}e.exports=function(e,t){var n=30,r="...";if(Z(t)){var s="separator"in t?t.separator:s;n="length"in t?function(e){var t=J(e),n=t%1;return t==t?n?t-n:t:0}(t.length):n,r="omission"in t?U(t.omission):r}var i=(e=Y(e)).length;if(I(e)){var a=j(e);i=a.length}if(n>=i)return e;var c=n-M(r);if(c<1)return r;var u=a?q(a,0,c).join(""):e.slice(0,c);if(void 0===s)return u+r;if(a&&(c+=u.length-c),W(s)){if(e.slice(c).search(s)){var l,f=u;for(s.global||(s=RegExp(s.source,Y(o.exec(s))+"g")),s.lastIndex=0;l=s.exec(f);)var p=l.index;u=u.slice(0,void 0===p?c:p)}}else if(e.indexOf(U(s),c)!=c){var d=u.lastIndexOf(s);d>-1&&(u=u.slice(0,d))}return u+r}}(Lk,Lk.exports)),Lk.exports}function Ik(){return $k||($k=1,function(e){var t=Rk&&Rk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.truncateTableData=e.truncateString=void 0;const n=t(Fk());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:"…"});e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))}(Rk)),Rk}function Mk(){if(Nk)return Vw;Nk=1,Object.defineProperty(Vw,"__esModule",{value:!0}),Vw.createStream=void 0;const e=I_(),t=Q_(),n=sk(),r=ak(),s=wk(),i=Ek(),o=Ck(),a=xk(),c=Ik(),u=L_(),l=(n,r)=>{let s=(0,a.stringifyTableData)(n);s=(0,c.truncateTableData)(s,(0,u.extractTruncates)(r));const l=(0,t.calculateRowHeights)(s,r);return s=(0,i.mapDataUsingRowHeights)(s,l,r),s=(0,e.alignTableData)(s,r),s=(0,o.padTableData)(s,r),s};return Vw.createStream=e=>{const t=(0,s.makeStreamConfig)(e),i=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight);let o=!0;return{write:e=>{if(e.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");o?(o=!1,((e,t,s)=>{const i=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let o;o="",o+=(0,n.drawBorderTop)(t,s),o+=i,o+=(0,n.drawBorderBottom)(t,s),o=o.trimEnd(),process.stdout.write(o)})(e,i,t)):((e,t,s)=>{const i=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let o="";const a=(0,n.drawBorderBottom)(t,s);"\n"!==a&&(o="\r"),o+=(0,n.drawBorderJoin)(t,s),o+=i,o+=a,o=o.trimEnd(),process.stdout.write(o)})(e,i,t)}}},Vw}var jk,Bk={},zk={};function Hk(){if(jk)return zk;jk=1,Object.defineProperty(zk,"__esModule",{value:!0}),zk.calculateOutputColumnWidths=void 0;return zk.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),zk}var Kk,Uk={};function qk(){if(Kk)return Uk;Kk=1,Object.defineProperty(Uk,"__esModule",{value:!0}),Uk.drawTable=void 0;const e=sk(),t=rk(),n=ak(),r=L_();return Uk.drawTable=(s,i,o,a)=>{const{drawHorizontalLine:c,singleLine:u}=a,l=(0,r.groupBySizes)(s,o).map((e,t)=>e.map(e=>(0,n.drawRow)(e,{...a,rowIndex:t})).join(""));return(0,t.drawContent)({contents:l,drawSeparator:(e,t)=>(0===e||e===t||!u)&&c(e,t),elementType:"row",rowIndex:-1,separatorGetter:(0,e.createTableBorderGetter)(i,{...a,rowCount:l.length}),spanningCellManager:a.spanningCellManager})},Uk}var Zk,Gk={};function Wk(){if(Zk)return Gk;Zk=1,Object.defineProperty(Gk,"__esModule",{value:!0}),Gk.injectHeaderConfig=void 0;return Gk.injectHeaderConfig=(e,t)=>{var n;let r=null!==(n=t.spanningCells)&&void 0!==n?n:[];const s=t.header,i=[...e];if(s){r=r.map(({row:e,...t})=>({...t,row:e+1}));const{content:t,...n}=s;r.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...n}),i.unshift([t,...Array.from({length:e[0].length-1}).fill("")])}return[i,r]},Gk}var Vk,Jk={},Yk={};function Qk(){return Vk||(Vk=1,function(e){var t=Yk&&Yk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;const n=t(c_()),r=L_();e.calculateMaximumCellWidth=e=>Math.max(...e.split("\n").map(n.default));e.calculateMaximumColumnWidths=(t,n=[])=>{const s=new Array(t[0].length).fill(0),i=n.map(r.calculateRangeCoordinate);return t.forEach((t,n)=>{t.forEach((t,o)=>{((e,t)=>i.some(n=>(0,r.isCellInRange)({col:t,row:e},n)))(n,o)||(s[o]=Math.max(s[o],(0,e.calculateMaximumCellWidth)(t)))})}),s}}(Yk)),Yk}var Xk,eE={},tE={};function nE(){if(Xk)return tE;Xk=1;var e=tE&&tE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tE,"__esModule",{value:!0}),tE.alignVerticalRangeContent=tE.wrapRangeContent=void 0;const t=e(c_()),n=F_(),r=Ek(),s=Ck(),i=Ik(),o=L_(),a=J_();tE.wrapRangeContent=(e,t,r)=>{const{topLeft:o,paddingRight:c,paddingLeft:u,truncate:l,wrapWord:f,alignment:p}=e,d=r.rows[o.row][o.col],h=t-u-c;return(0,a.wrapCell)((0,i.truncateString)(d,l),h,f).map(e=>{const t=(0,n.alignString)(e,h,p);return(0,s.padString)(t,u,c)})};return tE.alignVerticalRangeContent=(e,n,s)=>{const{rows:i,drawHorizontalLine:a,rowHeights:c}=s,{topLeft:u,bottomRight:l,verticalAlignment:f}=e;if(0===c.length)return[];const p=(0,o.sumArray)(c.slice(u.row,l.row+1))+(l.row-u.row)-(0,o.sequence)(u.row+1,l.row).filter(e=>!a(e,i.length)).length;return(0,r.padCellVertically)(n,p,f).map(e=>0===e.length?" ".repeat((0,t.default)(n[0])):e)},tE}var rE,sE={};function iE(){if(rE)return sE;rE=1,Object.defineProperty(sE,"__esModule",{value:!0}),sE.calculateSpanningCellWidth=void 0;const e=L_();return sE.calculateSpanningCellWidth=(t,n)=>{const{columnsConfig:r,drawVerticalLine:s}=n,{topLeft:i,bottomRight:o}=t;return(0,e.sumArray)(r.slice(i.col,o.col+1).map(({width:e})=>e))+(i.col===o.col?r[i.col].paddingRight+r[o.col].paddingLeft:(0,e.sumArray)(r.slice(i.col,o.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)))+(o.col-i.col)-(0,e.sequence)(i.col+1,o.col).filter(e=>!s(e,r.length)).length},sE}var oE,aE,cE={};function uE(){if(oE)return cE;oE=1,Object.defineProperty(cE,"__esModule",{value:!0}),cE.makeRangeConfig=void 0;const e=L_();return cE.makeRangeConfig=(t,n)=>{var r;const{topLeft:s,bottomRight:i}=(0,e.calculateRangeCoordinate)(t);return{...{...n[s.col],...t,paddingRight:null!==(r=t.paddingRight)&&void 0!==r?r:n[i.col].paddingRight},bottomRight:i,topLeft:s}},cE}function lE(){if(aE)return eE;aE=1,Object.defineProperty(eE,"__esModule",{value:!0}),eE.createSpanningCellManager=void 0;const e=nE(),t=iE(),n=uE(),r=L_(),s=(e,t)=>t.find(t=>(0,r.isCellInRange)(e,t)),i=(n,s)=>{const i=(0,t.calculateSpanningCellWidth)(n,s),o=(0,e.wrapRangeContent)(n,i,s),a=(0,e.alignVerticalRangeContent)(n,o,s);return{...n,extractBorderContent:e=>{const{topLeft:t}=n,i=(0,r.sumArray)(s.rowHeights.slice(t.row,e))+(e-t.row-1);return a[i]},extractCellContent:e=>{const{topLeft:t}=n,{drawHorizontalLine:i,rowHeights:o}=s,c=e-t.row,u=(0,r.sequence)(t.row+1,e).filter(e=>!(null==i?void 0:i(e,o.length))).length,l=(0,r.sumArray)(o.slice(t.row,e))+c-u;return a.slice(l,l+o[e])},height:o.length,width:i}};return eE.createSpanningCellManager=e=>{const{spanningCellConfigs:t,columnsConfig:o}=e,a=t.map(e=>(0,n.makeRangeConfig)(e,o)),c={};let u=[],l=[];return{getContainingRange:(t,n)=>{var r;const o=(null==n?void 0:n.mapped)?l[t.row]:t.row,f=s({...t,row:o},a);if(!f)return;if(0===u.length)return i(f,{...e,rowHeights:u});const p=(e=>{const{row:t,col:n}=e.topLeft;return`${t}/${n}`})(f);return null!==(r=c[p])&&void 0!==r||(c[p]=i(f,{...e,rowHeights:u})),c[p]},inSameRange:(e,t)=>((e,t,n)=>{const i=s(e,n),o=s(t,n);return!(!i||!o)&&(0,r.areCellEqual)(i.topLeft,o.topLeft)})(e,t,a),rowHeights:u,rowIndexMapping:l,setRowHeights:e=>{u=e},setRowIndexMapping:e=>{l=(0,r.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}},eE}var fE,pE,dE={};function hE(){if(fE)return dE;fE=1,Object.defineProperty(dE,"__esModule",{value:!0}),dE.validateSpanningCellConfig=void 0;const e=L_(),t=(e,t,n)=>e<=n&&n<=t;return dE.validateSpanningCellConfig=(n,r)=>{const[s,i]=[n.length,n[0].length];r.forEach((e,t)=>{const{colSpan:n,rowSpan:r}=e;if(void 0===n&&void 0===r)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(void 0!==n&&n<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(void 0!==r&&r<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});const o=r.map(e.calculateRangeCoordinate);o.forEach(({topLeft:e,bottomRight:n},r)=>{if(!(t(0,i-1,e.col)&&t(0,s-1,e.row)&&t(0,i-1,n.col)&&t(0,s-1,n.row)))throw new Error(`Some cells in config.spanningCells[${r}] are out of the table`)});const a=Array.from({length:s},()=>Array.from({length:i}));o.forEach(({topLeft:t,bottomRight:n},r)=>{(0,e.sequence)(t.row,n.row).forEach(s=>{(0,e.sequence)(t.col,n.col).forEach(e=>{if(void 0!==a[s][e])throw new Error(`Spanning cells in config.spanningCells[${a[s][e]}] and config.spanningCells[${r}] are overlap each other`);a[s][e]=r})})})},dE}function mE(){if(pE)return Jk;pE=1,Object.defineProperty(Jk,"__esModule",{value:!0}),Jk.makeTableConfig=void 0;const e=Qk(),t=lE(),n=L_(),r=Dk(),s=hE();return Jk.makeTableConfig=(i,o={},a)=>{var c,u,l,f,p;(0,r.validateConfig)("config.json",o),(0,s.validateSpanningCellConfig)(i,null!==(c=o.spanningCells)&&void 0!==c?c:[]);const d=null!==(u=null!=a?a:o.spanningCells)&&void 0!==u?u:[],h=((t,n,r,s)=>{const i=(0,e.calculateMaximumColumnWidths)(t,s);return t[0].map((e,t)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:i[t],wrapWord:!1,...r,...null==n?void 0:n[t]}))})(i,o.columns,o.columnDefault,d),m=null!==(l=o.drawVerticalLine)&&void 0!==l?l:()=>!0,g=null!==(f=o.drawHorizontalLine)&&void 0!==f?f:()=>!0;return{...o,border:(0,n.makeBorderConfig)(o.border),columns:h,drawHorizontalLine:g,drawVerticalLine:m,singleLine:null!==(p=o.singleLine)&&void 0!==p&&p,spanningCellManager:(0,t.createSpanningCellManager)({columnsConfig:h,drawHorizontalLine:g,drawVerticalLine:m,rows:i,spanningCellConfigs:d})}},Jk}var gE,yE,bE={};function vE(){if(gE)return bE;gE=1,Object.defineProperty(bE,"__esModule",{value:!0}),bE.validateTableData=void 0;const e=L_();return bE.validateTableData=t=>{if(!Array.isArray(t))throw new TypeError("Table data must be an array.");if(0===t.length)throw new Error("Table must define at least one row.");if(0===t[0].length)throw new Error("Table must define at least one column.");const n=t[0].length;for(const r of t){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==n)throw new Error("Table must have a consistent number of cells.");for(const t of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,e.normalizeString)(String(t))))throw new Error("Table data must not contain control characters.")}},bE}function DE(){if(yE)return Bk;yE=1,Object.defineProperty(Bk,"__esModule",{value:!0}),Bk.table=void 0;const e=I_(),t=Hk(),n=Q_(),r=qk(),s=Wk(),i=mE(),o=Ek(),a=Ck(),c=xk(),u=Ik(),l=L_(),f=vE();return Bk.table=(p,d={})=>{(0,f.validateTableData)(p);let h=(0,c.stringifyTableData)(p);const[m,g]=(0,s.injectHeaderConfig)(h,d),y=(0,i.makeTableConfig)(m,d,g);h=(0,u.truncateTableData)(m,(0,l.extractTruncates)(y));const b=(0,n.calculateRowHeights)(h,y);y.spanningCellManager.setRowHeights(b),y.spanningCellManager.setRowIndexMapping(b),h=(0,o.mapDataUsingRowHeights)(h,b,y),h=(0,e.alignTableData)(h,y),h=(0,a.padTableData)(h,y);const v=(0,t.calculateOutputColumnWidths)(y);return(0,r.drawTable)(h,v,b,y)},Bk}var wE,_E,kE={};function EE(){return wE||(wE=1,Object.defineProperty(kE,"__esModule",{value:!0})),kE}function SE(){return _E||(_E=1,function(e){var t=Ww&&Ww.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Ww&&Ww.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;const r=Mk();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const s=R_();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return s.getBorderCharacters}});const i=DE();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return i.table}}),n(EE(),e)}(Ww)),Ww}var AE=SE();const CE=e=>e.toString().padStart(2,"0"),PE=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${CE(n)}:${CE(r)}`},OE=e=>{const{rows:t,startedAt:n,boring:r,uiId:s,includeHint:i}=e,o=["Type","Item","Status","Time","Output"].map(e=>UD(e)),a=[];if(a.push(o),0===t.length){const e=PE(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state;let n="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:Date.now();n=PE(Math.max(0,Date.now()-e))}else"number"==typeof t.durationMs&&(n=PE(Math.max(0,t.durationMs)));const r="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?t.outputPath??"":"",s="warn"===t.kind?"warn":"waiting"===t.kind?"waiting":"running"===t.kind?"run":"quiet"===t.kind?"quiet":"stalled"===t.kind?"stalled":"done"===t.kind?"ok":"error"===t.kind?"error":"timedout"===t.kind?"timeout":"cancelled"===t.kind?"cancelled":"killed";a.push([e.type,e.item,Kw(s),n,r??""])}const c=(e=>AE.table(e,{columnDefault:{paddingLeft:0,paddingRight:2},border:{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:""},drawHorizontalLine:()=>!1,columns:{0:{alignment:"left"},1:{alignment:"left"},2:{alignment:"left"},3:{alignment:"left"},4:{alignment:"left"}}}))(a),u=((e,t,n)=>n?[`${e}`,`waiting ${t.waiting.toString()}`,`running ${t.running.toString()}`,`quiet ${t.quiet.toString()}`,`stalled ${t.stalled.toString()}`,`timeout ${t.timeout.toString()}`,`ok ${t.ok.toString()}`,`warn ${t.warn.toString()}`,`fail ${t.fail.toString()}`,`cancelled ${t.cancelled.toString()}`].join(" • "):[`${e}`,HD(`⏸︎ ${t.waiting.toString()}`),jD(`▶︎ ${t.running.toString()}`),MD(`⏱︎ ${t.quiet.toString()}`),KD(`⏱︎ ${t.stalled.toString()}`),BD(`⏱︎ ${t.timeout.toString()}`),ID(`✔︎ ${t.ok.toString()}`),KD(`⚠︎ ${t.warn.toString()}`),BD(`✖︎ ${t.fail.toString()}`),zD(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(PE(Date.now()-n),Rw(t.map(e=>({state:e.state}))),r),l=i?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${qD("Press")} ${UD("q")} ${qD("to cancel,")} ${UD("r")} ${qD("to restart")}${t}`})(s)}`:"",f=`\n${`${c.trimEnd()}\n\n${u}${l}`}\n`;if("1"===process.env.STAN_LIVE_DEBUG)try{const e=/(?:^|\n)Type\s+Item\s+Status\s+Time\s+Output(?:\n|$)/g,t=((e=>{try{return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}catch{return e}})(f).match(e)??[]).length;console.error("[stan:live:frame]",{headerMatches:t,includeHint:i})}catch{}return f};let xE=1;const TE=()=>Date.now();class $E{rows=new Map;opts;frameNo=0;timer;startedAt=TE();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=xE++}resetElapsed(){this.startedAt=TE(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),ew.renderer.stop(),ew.renderer.done(),this.writer?.done()}flush(){ew.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){ew.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=Hw()),this.writer.start(),this.timer=setInterval(()=>this.render(),this.opts.refreshMs))}clear(){ew.renderer.clear(),this.writer?.clear()}stop(){ew.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,ew.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),s=n??Nw(e)??(r?.type?{type:r.type,item:r.item}:void 0);if(!s){const n={type:"script",item:e};return void this.rows.set(e,{...n,state:{...r?.state??{},...t}})}this.rows.set(e,{...s,state:{...r?.state??{},...t}}),ew.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=TE();for(const[t,n]of this.rows.entries()){const r=n.state;switch(r.kind){case"waiting":this.update(t,{kind:"cancelled"});break;case"running":case"quiet":case"stalled":{const n="number"==typeof r.startedAt?r.startedAt:void 0,s="number"==typeof n?Math.max(0,e-n):0;this.update(t,{kind:"cancelled",durationMs:s});break}}}}renderFinalNoHint(){let e=OE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!1});e.endsWith("\n")||(e+="\n"),e+="\n",this.writer?.write(e)}render(){const e=OE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,ew.enabled)try{const e=Rw(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);ew.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}class NE{model;opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;unsubscribe;stopped=!1;constructor(e,t){this.model=e,this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new $E({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.key,e.meta,e.state)))}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;"function"==typeof e?.finalize&&(this.dbg("stop() finalize(full)"),e.finalize?.())}catch{}this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}}flushNow(){try{this.renderer?.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()"),this.renderer?.resetRows?.()}catch{}}resetElapsed(){try{this.renderer?.resetElapsed?.()}catch{}}cancelPending(){this.dbg("cancelPending()"),this.renderer?.cancelPending?.()}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer?.update(`${t.type}:${t.item}`,n,t)}}const RE=e=>e.replace(/\\/g,"/"),LE=(e,t)=>{if(!t)return"";const r=t;return n.isAbsolute(r)?RE(n.relative(e,r)):RE(r)};class FE{opts;renderer=null;control=null;model=new Lw;sink;stopped=!1;constructor(e){this.opts=e,this.sink=new NE(this.model,{boring:Boolean(e?.boring)})}start(){ew.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,n,r,s,i,o){const a=LE(n,t),c="error"===o||"number"==typeof i&&0!==i?{kind:"error",durationMs:Math.max(0,s-r),outputPath:a}:"warn"===o?{kind:"warn",durationMs:Math.max(0,s-r),outputPath:a}:{kind:"done",durationMs:Math.max(0,s-r),outputPath:a};this.model.update(`script:${e}`,c,{type:"script",item:e})}onArchiveQueued(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"waiting"},{type:"archive",item:t})}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,n,r,s){const i="full"===e?"full":"diff",o=LE(n,t);this.model.update(`archive:${i}`,{kind:"done",durationMs:Math.max(0,s-r),outputPath:o},{type:"archive",item:i})}onCancelled(e="cancel"){ew.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){ew.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}this.control?.detach(),this.control=null}else ew.ui.stop(),this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}prepareForNewSession(){try{this.model?.clearAll?.()}catch{}try{this.sink.resetElapsed()}catch{}try{this.sink.resetForRestart()}catch{}}flushNow(){try{this.sink.flushNow()}catch{}}installCancellation(e,t){try{this.control=new $w({onCancel:e,onRestart:t}),ew.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,ew.ui.stop();try{this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}}}class IE{model;cwd;unsubscribe;constructor(e,t){this.model=e,this.cwd=t}start(){this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.meta,e.state))}stop(){this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}onUpdate(e,t){const n=e.item,r="archive"===e.type?"diff"===n?"archive (diff)":"archive":n;if("waiting"!==t.kind)if("running"!==t.kind){if("warn"===t.kind){const e=LE(this.cwd,t.outputPath);return void console.log(`stan: ${Kw("warn")} "${r}" -> ${e}`)}if("done"===t.kind||"error"===t.kind){const e="done"===t.kind,n=LE(this.cwd,t.outputPath),s=Kw(e?"ok":"error"),i=e?"":" (exit 1)",o=n||"";return void console.log(`stan: ${s} "${r}" -> ${o}${i}`)}}else console.log(`stan: ${Kw("run")} "${r}"`);else console.log(`stan: ${Kw("waiting")} "${r}"`)}}class ME{model=new Lw;sink;constructor(){this.sink=new IE(this.model,process.cwd())}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,n,r,s,i,o){const a=LE(n,t),c="error"===o?{kind:"error",durationMs:0,outputPath:a}:"warn"===o?{kind:"warn",durationMs:0,outputPath:a}:{kind:"done",durationMs:0,outputPath:a};this.model.update(`script:${e}`,c,{type:"script",item:e})}onArchiveQueued(){}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,n){const r=LE(n,t),s="full"===e?"full":"diff";this.model.update(`archive:${s}`,{kind:"done",durationMs:0,outputPath:r},{type:"archive",item:s})}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}exports.renderAvailableScriptsHelp=e=>{try{const t=aD(e),n=Object.keys(t.scripts??{});if(!n.length)return"";const r=n[0]??"lint";return["","Default: runs all scripts and writes archives.","","Available script keys:",` ${n.join(", ")}`,"","Examples:"," stan run # all scripts, with archives",` stan run -s ${r}`,` stan run -q -x ${r}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${r}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},exports.runSelected=async(r,s,i=null,o="concurrent",a,c)=>{const u=a??{};await(async(r,s,i=!1)=>{const o=te(r,s);if(await oe(r,s),!i){const r=n.resolve(o.outputAbs,_);if(e.existsSync(r))try{await t.copyFile(r,n.resolve(o.diffAbs,k))}catch{}const s=await t.readdir(o.outputAbs,{withFileTypes:!0});for(const t of s)e.rmSync(n.resolve(o.outputAbs,t.name),{recursive:!0,force:!0})}return o.rootAbs})(r,s.stanPath,Boolean(u.keep));const l=ZD(0,{selection:i,config:s,mode:o,behavior:u}),f=process.stdout,p=Boolean(f?.isTTY),d=(u.live??!0)&&p,h=null==i?Object.keys(s.scripts):i,m=d?new FE({boring:"1"===process.env.STAN_BORING}):new ME;let g=!1;for(;;){const{created:e,cancelled:t,restartRequested:n}=await Tw({cwd:r,config:s,selection:h,mode:o,behavior:u,liveEnabled:d,planBody:l,printPlan:!g&&!1!==u.plan,ui:m,promptChoice:c});if(g=!0,!n){if(t)return e;try{m.stop()}catch{}return e}}};