@karmaniverous/stan-cli 0.11.2 → 0.11.3

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/mjs/index.js CHANGED
@@ -1 +1 @@
1
- import e,{existsSync as t,rmSync as n,readFileSync as r,createWriteStream as s}from"node:fs";import{copyFile as i,readdir as o,readFile as a,writeFile as c,rm as u,stat as l,appendFile as f,mkdir as p}from"node:fs/promises";import d,{resolve as h,dirname as m,join as g,delimiter as y}from"node:path";import{ensureDir as b}from"fs-extra";import v from"node:process";import{fileURLToPath as D}from"node:url";import w from"process";import _ from"buffer";import{createHash as E}from"node:crypto";import{spawn as k}from"node:child_process";import S from"os";import A from"path";import C from"util";import P from"stream";import O from"events";import T from"fs";import x from"node:os";import $ from"node:tty";import N from"child_process";import{createRequire as L}from"node:module";import{emitKeypressEvents as R}from"node:readline";const F="archive.tar",I="archive.prev.tar",M=e=>e.replace(/\\/g,"/"),j=(e,t)=>{const n=M(e).replace(/\/+$/,""),r=M(t);return r===n||r.startsWith(`${n}/`)},B=(e,t)=>{const n=M(e);return j(`${n}/diff`,t)||j(`${n}/patch`,t)},z=j,H=e=>{const t=e.replace(/\\/g,"/");return e=>!(B(t,e)||((e,t)=>{const n=M(e);return M(t)===`${n}/output/${F}`||M(t)===`${n}/output/archive.diff.tar`||M(t)===`${n}/output/archive.warnings.txt`})(t,e))},K=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},U=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)};var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G,W,V,Y,J,Q,X,ee,te,ne,re,se,ie={exports:{}},oe=(G||(G=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 E=(e,t)=>{throw new t(e)},k=(e,t,n)=>D(e)?e?!k.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);k.isNotRelative=S,k.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&&k.convert(e);return k(s,e,this._strictPathCheck?E: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=()=>{k.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;k.isNotRelative=t=>e.test(t)||S(t)};"undefined"!=typeof process&&"win32"===process.platform&&P(),e.exports=C,C.default=C,e.exports.isPathValid=e=>k(e&&k.convert(e),e,h),p(e.exports,Symbol.for("setupWindows"),P)}(ie)),ie.exports),ae=Z(oe),ce={};function ue(){if(V)return W;V=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 W={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 le(){return Y||(Y=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:s}=ue();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}}(ce)),ce}function fe(){if(ne)return te;ne=1;const e=function(){if(Q)return J;Q=1;const e=le(),{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}=ue(),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,E=[],k=[],S=[];let A,C,P=b,O=-1,T=0,x=0,$=!1,N=!1,L=!1,R=!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,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,L=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(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===o&&O===T&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){L=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),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=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,L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==T){if(!0!==D.noparen&&C===u){if(L=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===L){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,T++}else{if(E.push(O),k.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===T+1){T+=2;continue}x=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let G=P,W="",V="";T>0&&(W=P.slice(0,T),P=P.slice(T),x-=T),G&&!0===L&&x>0?(G=P.slice(0,x),V=P.slice(x)):!0===L?(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 Y={prefix:W,input:b,start:T,base:G,glob:V,isBrace:$,isBracket:N,isGlob:L,isExtglob:R,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(Y.maxDepth=0,g(C)||k.push(K),Y.tokens=k),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<E.length;t++){const n=e?e+1:T,r=E[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(k[t].isPrefix=!0,k[t].value=W):k[t].value=s,y(k[t]),Y.maxDepth+=k[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&&(k[k.length-1].value=t,y(k[k.length-1]),Y.maxDepth+=k[k.length-1].depth)}Y.slashes=E,Y.parts=S}return Y},J}(),t=function(){if(ee)return X;ee=1;const e=ue(),t=le(),{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:E,DOTS_SLASH:k,NO_DOT:S,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:P,QMARK_NO_DOT:O,STAR:T,START_ANCHOR:x}=b,$=e=>`(${y}(?:(?!${x}${e.dot?k:D}).)*?)`,N=p.dot?"":S,L=p.dot?P:O;let R=!0===p.bash?$(p):T;p.capture&&(R=`(${R})`),"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)},Y=e=>{F[e]--,j.pop()},J=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=R,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"),J({type:e,value:t,output:F.output?"":E}),J({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=R;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=$(p)),(r!==R||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)}J({type:"paren",extglob:!0,value:B,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?P.repeat(i.length):""):0===o?L+(i?P.repeat(i.length):""):P.repeat(r.length):"."===s?D.repeat(r.length):"*"===s?n?n+s+(i?R:""):R: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+="\\",J({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){J({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=E);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&&J({type:"text",value:B});continue}if("("===B){V("parens"),J({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}J({type:"paren",value:B,output:F.parens?")":"\\)"}),Y("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}`}J({type:"bracket",value:B});continue}if("]"===B){if(!0===p.nobracket||z&&"bracket"===z.type&&1===z.value.length){J({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));J({type:"text",value:B,output:`\\${B}`});continue}Y("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),J(e);continue}if("}"===B){const e=M[M.length-1];if(!0===p.nobrace||!e){J({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}J({type:"brace",value:B,output:t}),Y("braces"),M.pop();continue}if("|"===B){I.length>0&&I[I.length-1].conditions++,J({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="|"),J({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}J({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){J({type:"text",value:B,output:D});continue}J({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}`),J({type:"text",value:B,output:t});continue}if(!0!==p.dot&&("slash"===z.type||"bos"===z.type)){J({type:"qmark",value:B,output:O});continue}J({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){J({type:"plus",value:B,output:w});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||F.parens>0){J({type:"plus",value:B});continue}J({type:"plus",value:w});continue}if("@"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){J({type:"at",extglob:!0,value:B,output:""});continue}J({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),J({type:"text",value:B});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=B,z.output=R,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])){J({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){J({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()),J({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()),J({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:R};!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+=E,z.output+=E)),J(n)):(n.output=B,J(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=N+n.output),J(n))}for(;F.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));F.output=t.escapeLast(F.output,"["),Y("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));F.output=t.escapeLast(F.output,"("),Y("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));F.output=t.escapeLast(F.output,"{"),Y("braces")}if(!0===p.strictSlashes||"star"!==z.type&&"bracket"!==z.type||J({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}).)*?)`,E=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=E(t[1]);if(!n)return;return n+u+t[2]}}},k=t.removePrefix(r,{negated:!1,prefix:""});let S=E(k);return S&&!0!==i.strictSlashes&&(S+=`${l}?`),S},X=u}(),n=le(),r=ue(),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,te=s}var pe=Z(function(){if(se)return re;se=1;const e=fe(),t=le();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),re=n}());const de=async e=>{const t=[],n=["."];for(;n.length;){const r=n.pop(),s=h(e,r),i=await o(s,{withFileTypes:!0});for(const e of i){const s="."===r?e.name:g(r,e.name);e.isDirectory()?n.push(s):t.push(s.replace(/\\/g,"/"))}}return t},he=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},me=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>he(e,t):()=>!1;var n;const r=pe(t,{dot:!0});return e=>r(e)},ge=async(e,{cwd:n,stanPath:r,includeOutputDir:s,includes:i=[],excludes:o=[],anchors:c=[]})=>{const u=r.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)})(e,u),f=await(async e=>{const n=h(e,".gitignore");if(!t(n))return null;try{const e=await a(n,"utf8"),t=ae();return t.add(e),t}catch{return null}})(n),p=[e=>he(e,"node_modules"),e=>he(e,".git"),...f?[e=>f.ignores(e)]:[],...o.map(me),...l.map(e=>t=>he(t,e)),e=>B(u,e)];s||p.push(e=>z(`${u}/output`,e));const d=e.filter(e=>!p.some(t=>t(e)));if(i.length>0){const t=i.map(me),n=[e=>B(u,e),...s?[]:[e=>z(`${u}/output`,e)]],r=new Set(d);for(const n of e)t.some(e=>e(n))&&r.add(n);const a=o.map(me),l=new Set(e.filter(e=>r.has(e)&&!n.some(t=>t(e))&&!a.some(t=>t(e))));if(c.length>0){const t=c.map(me);for(const n of e)!(B(u,n)||!s&&z(`${u}/output`,n))&&t.some(e=>e(n))&&l.add(n)}return e.filter(e=>l.has(e))}if(c.length>0){const t=c.map(me),n=new Set(d);for(const r of e)!(B(u,r)||!s&&z(`${u}/output`,r))&&t.some(e=>e(r))&&n.add(r);return e.filter(e=>n.has(e))}return d},ye=async(e,t)=>{const n=(await(async()=>{try{const e=await Promise.resolve().then(function(){return uc}),t=e.makeStanDirs,n=e.default?.makeStanDirs,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("makeStanDirs export not found in ./paths")})())(e,t);return await b(n.rootAbs),await b(n.outputAbs),await b(n.diffAbs),await b(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}},be=async(e,t)=>{const n=await ye(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}},ve="code -g {file}",De=e=>e instanceof URL?D(e):e;function we({cwd:t}={}){const n=function(t,{cwd:n=v.cwd(),type:r="file",stopAt:s}={}){let i=d.resolve(De(n)??"");const{root:o}=d.parse(i);s=d.resolve(i,De(s)??o);const a=d.isAbsolute(t);for(;i;){const n=a?t:d.join(i,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===r&&t?.isFile()||"directory"===r&&t?.isDirectory())return n}catch{}if(i===s||i===o)break;i=d.dirname(i)}}("package.json",{cwd:t});return n&&d.dirname(n)}const _e=["stan.config.yml","stan.config.yaml","stan.config.json"],Ee=e=>{for(const n of _e){const r=h(e,n);if(t(r))return r}return null},ke=e=>{const t=Ee(e);if(t)return t;const n=new Set;let r=e;for(;r;){const e=we({cwd:r});if(!e||n.has(e))break;n.add(e);const t=Ee(e);if(t)return t;const s=m(e);if(s===e||n.has(s))break;r=s}return null};var Se,Ae={},Ce={},Pe={},Oe={};function Te(){if(Se)return Oe;Se=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 Oe.ALIAS=e,Oe.DOC=t,Oe.MAP=n,Oe.NODE_TYPE=o,Oe.PAIR=r,Oe.SCALAR=s,Oe.SEQ=i,Oe.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Oe.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,Oe.isCollection=c,Oe.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,Oe.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,Oe.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},Oe.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,Oe.isScalar=a,Oe.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,Oe}var xe,$e,Ne={};function Le(){if(xe)return Ne;xe=1;var e=Te();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,Ne.visit=s,Ne.visitAsync=o,Ne}function Re(){if($e)return Pe;$e=1;var e=Te(),t=Le();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:"},Pe.Directives=s,Pe}var Fe,Ie={},Me={},je={};function Be(){if(Fe)return je;Fe=1;var e=Te(),t=Le();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 je.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},je.anchorNames=n,je.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}},je.findNewAnchor=r,je}var ze,He={},Ke={};function Ue(){return ze||(ze=1,Ke.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)}),Ke}var qe,Ze,Ge,We={};function Ve(){if(qe)return We;qe=1;var e=Te();return We.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)},We}function Ye(){if(Ze)return He;Ze=1;var e=Ue(),t=Te(),n=Ve();return He.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}},He}function Je(){if(Ge)return Me;Ge=1;var e=Be(),t=Le(),n=Te(),r=Ye(),s=Ve();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 Me.Alias=i,Me}var Qe,Xe,et,tt={},nt={},rt={};function st(){if(Qe)return rt;Qe=1;var e=Te(),t=Ye(),n=Ve();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",rt.Scalar=r,rt.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,rt}function it(){if(Xe)return nt;Xe=1;var e=Je(),t=Te(),n=st();return nt.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},nt}function ot(){if(et)return tt;et=1;var e=it(),t=Te(),n=Ye();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 tt.Collection=i,tt.collectionFromPath=r,tt.isEmptyPath=s,tt}var at,ct={},ut={},lt={},ft={};function pt(){if(at)return ft;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return at=1,ft.indentComment=e,ft.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,ft.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),ft}var dt,ht,mt,gt,yt={},bt={};function vt(){if(ht)return yt;ht=1;var e=st(),t=function(){if(dt)return bt;dt=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 bt.FOLD_BLOCK=e,bt.FOLD_FLOW="flow",bt.FOLD_QUOTED=t,bt.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},bt}();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,E=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;E=w}}let k=c.substring(0,E<w?E+1:w);k&&(c=c.substring(k.length),k=k.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(`${k}${r}${v}`,m,t.FOLD_BLOCK,o);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${k}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return yt.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},yt}function Dt(){if(mt)return lt;mt=1;var e=Be(),t=Te(),n=pt(),r=vt();return lt.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}},lt.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},lt}var wt,_t={},Et={};function kt(){if(wt)return Et;wt=1;var e=w;return Et.debug=function(e,...t){"debug"===e&&console.log(...t)},Et.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},Et}var St,At,Ct,Pt={};function Ot(){if(St)return Pt;St=1;var e=Te(),t=st();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 Pt.addMergeToJSMap=s,Pt.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),Pt.merge=r,Pt}function Tt(){if(At)return _t;At=1;var e=kt(),t=Ot(),n=Dt(),r=Te(),s=Ve();return _t.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},_t}function xt(){if(Ct)return ct;Ct=1;var e=it(),t=function(){if(gt)return ut;gt=1;var e=Te(),t=st(),n=Dt(),r=pt();return ut.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,E=n.stringify(s,o,()=>w=!0,()=>_=!0);if(!y&&!o.inFlow&&E.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(),""===E?"?":y?`? ${E}`:E}else if(u&&!m||null==i&&y)return E=`? ${E}`,g&&!w?E+=r.lineComment(E,o.indent,d(g)):_&&c&&c(),E;w&&(g=null),y?(g&&(E+=r.lineComment(E,o.indent,d(g))),E=`? ${E}\n${f}:`):(E=`${E}:`,g&&(E+=r.lineComment(E,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=E.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 k=!1;const S=n.stringify(i,o,()=>k=!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 E+=A+S,o.inFlow?k&&a&&a():D&&!k?E+=r.lineComment(E,o.indent,d(D)):_&&c&&c(),E},ut}(),n=Tt(),r=Te();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 ct.Pair=s,ct.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)},ct}var $t,Nt,Lt,Rt={},Ft={},It={},Mt={};function jt(){if($t)return Mt;$t=1;var e=Te(),t=Dt(),n=pt();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 Mt.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Mt}function Bt(){if(Nt)return It;Nt=1;var e=jt(),t=Tt(),n=ot(),r=Te(),s=xt(),i=st();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 It.YAMLMap=a,It.findPair=o,It}function zt(){if(Lt)return Ft;Lt=1;var e=Te(),t=Bt();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 Ft.map=n,Ft}var Ht,Kt,Ut={},qt={};function Zt(){if(Ht)return qt;Ht=1;var e=it(),t=jt(),n=ot(),r=Te(),s=st(),i=Ve();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 qt.YAMLSeq=o,qt}function Gt(){if(Kt)return Ut;Kt=1;var e=Te(),t=Zt();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 Ut.seq=n,Ut}var Wt,Vt={};function Yt(){if(Wt)return Vt;Wt=1;var e=vt();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 Vt.string=t,Vt}var Jt,Qt={},Xt={};function en(){if(Jt)return Xt;Jt=1;var e=st();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 Xt.nullTag=t,Xt}var tn,nn={};function rn(){if(tn)return nn;tn=1;var e=st();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 nn.boolTag=t,nn}var sn,on,an={},cn={};function un(){return sn||(sn=1,cn.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}),cn}function ln(){if(on)return an;on=1;var e=st(),t=un();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 an.float=s,an.floatExp=r,an.floatNaN=n,an}var fn,pn={};function dn(){if(fn)return pn;fn=1;var e=un();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 pn.int=i,pn.intHex=o,pn.intOct=s,pn}var hn,mn={};var gn,yn={};var bn,vn={};function Dn(){if(bn)return vn;bn=1;var e=_,t=st(),n=vt();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 vn.binary=r,vn}var wn,_n,En={},kn={};function Sn(){if(wn)return kn;wn=1;var e=Te(),t=xt(),n=st(),r=Zt();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 kn.createPairs=i,kn.pairs=o,kn.resolvePairs=s,kn}function An(){if(_n)return En;_n=1;var e=Te(),t=Ve(),n=Bt(),r=Zt(),s=Sn();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 En.YAMLOMap=i,En.omap=o,En}var Cn,Pn={},On={};var Tn,xn={};var $n,Nn={};var Ln,Rn={};function Fn(){if(Ln)return Rn;Ln=1;var e=Te(),t=xt(),n=Bt();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 Rn.YAMLSet=r,Rn.set=s,Rn}var In,Mn,jn,Bn,zn={};function Hn(){if(In)return zn;In=1;var e=un();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 zn.floatTime=s,zn.intTime=r,zn.timestamp=i,zn}function Kn(){if(Mn)return Pn;Mn=1;var e=zt(),t=en(),n=Gt(),r=Yt(),s=Dn(),i=function(){if(Cn)return On;Cn=1;var e=st();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 On.falseTag=r,On.trueTag=n,On}(),o=function(){if(Tn)return xn;Tn=1;var e=st(),t=un();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 xn.float=s,xn.floatExp=r,xn.floatNaN=n,xn}(),a=function(){if($n)return Nn;$n=1;var e=un();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 Nn.int=o,Nn.intBin=s,Nn.intHex=a,Nn.intOct=i,Nn}(),c=Ot(),u=An(),l=Sn(),f=Fn(),p=Hn();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 Pn.schema=d,Pn}function Un(){if(jn)return Qt;jn=1;var e=zt(),t=en(),n=Gt(),r=Yt(),s=rn(),i=ln(),o=dn(),a=function(){if(hn)return mn;hn=1;var e=zt(),t=en(),n=Gt(),r=Yt(),s=rn(),i=ln(),o=dn();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 mn.schema=a,mn}(),c=function(){if(gn)return yn;gn=1;var e=st(),t=zt(),n=Gt();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 yn.schema=a,yn}(),u=Dn(),l=Ot(),f=An(),p=Sn(),d=Kn(),h=Fn(),m=Hn();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 Qt.coreKnownTags=b,Qt.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},[])},Qt}function qn(){if(Bn)return Rt;Bn=1;var e=Te(),t=zt(),n=Gt(),r=Yt(),s=Un();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Rt.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}},Rt}var Zn,Gn,Wn={};function Vn(){if(Gn)return Ie;Gn=1;var e=Je(),t=ot(),n=Te(),r=xt(),s=Ve(),i=qn(),o=function(){if(Zn)return Wn;Zn=1;var e=Te(),t=Dt(),n=pt();return Wn.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"},Wn}(),a=Be(),c=Ue(),u=it(),l=Re();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ie.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)}},Ie}var Yn,Jn={};function Qn(){if(Yn)return Jn;Yn=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Jn.YAMLError=e,Jn.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Jn.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Jn.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`}},Jn}var Xn,er={},tr={},nr={},rr={},sr={};function ir(){return Xn||(Xn=1,sr.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],E=_?_.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:E,start:w??E}}),sr}var or,ar={};function cr(){return or||(or=1,ar.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}}),ar}var ur,lr={};function fr(){if(ur)return lr;ur=1;var e=cr();return lr.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)}},lr}var pr,dr,hr={};function mr(){if(pr)return hr;pr=1;var e=Te();return hr.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))},hr}var gr,yr={};var br,vr,Dr,wr={},_r={};function Er(){return br||(br=1,_r.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}}),_r}function kr(){if(Dr)return nr;Dr=1;var e=Te(),t=st(),n=Bt(),r=Zt(),s=function(){if(dr)return rr;dr=1;var e=xt(),t=Bt(),n=ir(),r=cr(),s=fr(),i=mr();const o="All mapping items must start at the same column";return rr.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 E=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=E.end,E.found){D&&("block-map"!==b?.type||E.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<E.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,E,f):c(u,h,y,null,E,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"),E.comment&&(_.comment?_.comment+="\n"+E.comment:_.comment=E.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},rr}(),i=function(){if(gr)return yr;gr=1;var e=Zt(),t=ir(),n=fr();return yr.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},yr}(),o=function(){if(vr)return wr;vr=1;var e=Te(),t=xt(),n=Bt(),r=Zt(),s=Er(),i=ir(),o=cr(),a=mr();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return wr.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,E=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!E.found){if(!(E.anchor||E.tag||w||_)){0===r&&E.comma?h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),E.comment&&(b.comment?b.comment+="\n"+E.comment:b.comment=E.comment),D=E.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)E.comma&&h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(E.comma||h(E.start,"MISSING_CHAR",`Missing , between ${y} items`),E.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,E.comment=E.comment.substring(t.length+1)}}if(g||w||E.found){p.atKey=!0;const e=E.end,r=v?l(p,v,E,h):f(p,e,m,null,E,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&&!E.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}}E.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 k=_?l(p,_,o,h):o.found?f(p,o.end,w,null,o,h):null;k?u(_)&&h(k.range,"BLOCK_IN_FLOW",c):o.comment&&(r.comment?r.comment+="\n"+o.comment:r.comment=o.comment);const S=new t.Pair(r,k);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=(k??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=k?k.range[2]:o.end}else{const e=_?l(p,_,E,h):f(p,E.end,w,null,E,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...E]=d.end;let k=D;if(_&&_.source===w)k=_.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&&E.unshift(_)}if(E.length>0){const e=s.resolveEnd(E,k,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,k,e.offset]}else b.range=[d.offset,k,k];return b},wr}();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 nr.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},nr}var Sr,Ar={},Cr={};function Pr(){if(Sr)return Cr;Sr=1;var e=st();return Cr.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]}},Cr}var Or,Tr,xr={};function $r(){if(Or)return xr;Or=1;var e=st(),t=Er();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 xr.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]}},xr}var Nr,Lr,Rr,Fr,Ir={};function Mr(){if(Lr)return tr;Lr=1;var e=Je(),t=Te(),n=kr(),r=function(){if(Tr)return Ar;Tr=1;var e=Te(),t=st(),n=Pr(),r=$r();return Ar.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},Ar}(),s=Er(),i=(Nr||(Nr=1,Ir.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}),Ir);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 tr.composeEmptyNode=c,tr.composeNode=a,tr}function jr(){if(Fr)return Ce;Fr=1;var e=w,t=Re(),n=Vn(),r=Qn(),s=Te(),i=function(){if(Rr)return er;Rr=1;var e=Vn(),t=Mr(),n=Er(),r=ir();return er.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},er}(),o=Er();function a(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 c(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 Ce.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=a(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}=c(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:c(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=a(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(a(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(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=o.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(a(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}}},Ce}var Br,zr={},Hr={};var Kr,Ur={};var qr,Zr,Gr={};function Wr(){if(Zr)return zr;Zr=1;var e=function(){if(Br)return Hr;Br=1;var e=Pr(),t=$r(),n=Qn(),r=vt();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 Hr.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}}},Hr.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},Hr.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")}},Hr}(),t=function(){if(Kr)return Ur;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 Kr=1,Ur.stringify=n=>"type"in n?e(n):t(n),Ur}(),n=function(){if(qr)return Gr;qr=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")},Gr.visit=r,Gr}();return zr.createScalarToken=e.createScalarToken,zr.resolveAsScalar=e.resolveAsScalar,zr.setScalarValue=e.setScalarValue,zr.stringify=t.stringify,zr.visit=n.visit,zr.BOM="\ufeff",zr.DOCUMENT="",zr.FLOW_END="",zr.SCALAR="",zr.isCollection=e=>!!e&&"items"in e,zr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),zr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},zr.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},zr}var Vr,Yr={};function Jr(){if(Vr)return Yr;Vr=1;var e=Wr();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 Yr.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)}},Yr}var Qr,Xr={};function es(){return Qr||(Qr=1,Xr.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}}}}),Xr}var ts,ns={};function rs(){if(ts)return ns;ts=1;var e=w,t=Wr(),n=Jr();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 o(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 a(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 c(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 ns.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&&c(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=a(o(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=a(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=a(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=a(o(t));c(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=a(o(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=a(o(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())}}},ns}var ss,is,os={};var as=function(){if(is)return Ae;is=1;var e=jr(),t=Vn(),n=qn(),r=Qn(),s=Je(),i=Te(),o=xt(),a=st(),c=Bt(),u=Zt(),l=Wr(),f=Jr(),p=es(),d=rs(),h=function(){if(ss)return os;ss=1;var e=jr(),t=Vn(),n=Qn(),r=kt(),s=Te(),i=es(),o=rs();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 os.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))},os.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())},os.parseDocument=c,os.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)},os}(),m=Le();return Ae.Composer=e.Composer,Ae.Document=t.Document,Ae.Schema=n.Schema,Ae.YAMLError=r.YAMLError,Ae.YAMLParseError=r.YAMLParseError,Ae.YAMLWarning=r.YAMLWarning,Ae.Alias=s.Alias,Ae.isAlias=i.isAlias,Ae.isCollection=i.isCollection,Ae.isDocument=i.isDocument,Ae.isMap=i.isMap,Ae.isNode=i.isNode,Ae.isPair=i.isPair,Ae.isScalar=i.isScalar,Ae.isSeq=i.isSeq,Ae.Pair=o.Pair,Ae.Scalar=a.Scalar,Ae.YAMLMap=c.YAMLMap,Ae.YAMLSeq=u.YAMLSeq,Ae.CST=l,Ae.Lexer=f.Lexer,Ae.LineCounter=p.LineCounter,Ae.Parser=d.Parser,Ae.parse=h.parse,Ae.parseAllDocuments=h.parseAllDocuments,Ae.parseDocument=h.parseDocument,Ae.stringify=h.stringify,Ae.visit=m.visit,Ae.visitAsync=m.visitAsync,Ae}();function cs(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}Z(as);class us extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ls extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const fs={};function ps(e){return fs}function ds(e,t){return"bigint"==typeof t?t.toString():t}function hs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ms(e){return null==e}function gs(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const ys=Symbol("evaluating");function bs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ys)return void 0===r&&(r=ys,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function vs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ds(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ws(e){return JSON.stringify(e)}const _s="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Es(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const ks=hs(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Ss(e){if(!1===Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Es(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function As(e){return Ss(e)?{...e}:Array.isArray(e)?[...e]:e}const Cs=new Set(["string","number","symbol"]);function Ps(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Os(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Ts(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 xs(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 $s(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ns(e){return"string"==typeof e?e:e?.message}function Ls(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=Ns(e.inst?._zod.def?.error?.(e))??Ns(t?.error?.(e))??Ns(n.customError?.(e))??Ns(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Rs(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Fs(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Is=(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,ds,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ms=cs("$ZodError",Is),js=cs("$ZodError",Is,{Parent:Error}),Bs=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 us;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>Ls(e,i,ps())));throw _s(t,s?.callee),t}return o.value},zs=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=>Ls(e,i,ps())));throw _s(t,s?.callee),t}return o.value},Hs=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 us;return i.issues.length?{success:!1,error:new(e??Ms)(i.issues.map(e=>Ls(e,s,ps())))}:{success:!0,data:i.value}},Ks=Hs(js),Us=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=>Ls(e,s,ps())))}:{success:!0,data:i.value}},qs=Us(js),Zs=/^[cC][^\s-]{8,}$/,Gs=/^[0-9a-z]+$/,Ws=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vs=/^[0-9a-vA-V]{20}$/,Ys=/^[A-Za-z0-9]{27}$/,Js=/^[a-zA-Z0-9_-]{21}$/,Qs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xs=/^([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})$/,ei=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)$/,ti=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ni=/^(?:(?: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])$/,ri=/^(([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}|:))$/,si=/^((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])$/,ii=/^(([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])$/,oi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ai=/^[A-Za-z0-9_-]*$/,ci=/^(?=.{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])?)*\.?$/,ui=/^\+(?:[0-9]){6,14}[0-9]$/,li="(?:(?:\\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])))",fi=new RegExp(`^${li}$`);function pi(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 di=/^[^A-Z]*$/,hi=/^[^a-z]*$/,mi=cs("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gi=cs("$ZodCheckMaxLength",(e,t)=>{var n;mi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(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=Rs(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yi=cs("$ZodCheckMinLength",(e,t)=>{var n;mi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(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=Rs(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bi=cs("$ZodCheckLengthEquals",(e,t)=>{var n;mi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(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=Rs(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})}}),vi=cs("$ZodCheckStringFormat",(e,t)=>{var n,r;mi.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=()=>{})}),Di=cs("$ZodCheckRegex",(e,t)=>{vi.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})}}),wi=cs("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=di),vi.init(e,t)}),_i=cs("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=hi),vi.init(e,t)}),Ei=cs("$ZodCheckIncludes",(e,t)=>{mi.init(e,t);const n=Ps(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})}}),ki=cs("$ZodCheckStartsWith",(e,t)=>{mi.init(e,t);const n=new RegExp(`^${Ps(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})}}),Si=cs("$ZodCheckEndsWith",(e,t)=>{mi.init(e,t);const n=new RegExp(`.*${Ps(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})}}),Ai=cs("$ZodCheckOverwrite",(e,t)=>{mi.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Ci{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 Pi={major:4,minor:1,patch:12},Oi=cs("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pi;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=xs(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 us;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(s||(s=xs(e,t)))});else{if(e.issues.length===t)continue;s||(s=xs(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(xs(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new us;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 us;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=Ks(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return qs(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),Ti=cs("$ZodString",(e,t)=>{var n;Oi.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}}),xi=cs("$ZodStringFormat",(e,t)=>{vi.init(e,t),Ti.init(e,t)}),$i=cs("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xs),xi.init(e,t)}),Ni=cs("$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=ei(e))}else t.pattern??(t.pattern=ei());xi.init(e,t)}),Li=cs("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ti),xi.init(e,t)}),Ri=cs("$ZodURL",(e,t)=>{xi.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:ci.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})}}}),Fi=cs("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),xi.init(e,t)}),Ii=cs("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Js),xi.init(e,t)}),Mi=cs("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zs),xi.init(e,t)}),ji=cs("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gs),xi.init(e,t)}),Bi=cs("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ws),xi.init(e,t)}),zi=cs("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Vs),xi.init(e,t)}),Hi=cs("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ys),xi.init(e,t)}),Ki=cs("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=pi({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(`^${li}T(?:${r})$`)}(t)),xi.init(e,t)}),Ui=cs("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fi),xi.init(e,t)}),qi=cs("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${pi(t)}$`)),xi.init(e,t)}),Zi=cs("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Qs),xi.init(e,t)}),Gi=cs("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ni),xi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Wi=cs("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ri),xi.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})}}}),Vi=cs("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=si),xi.init(e,t)}),Yi=cs("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ii),xi.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 Ji(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Qi=cs("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=oi),xi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Ji(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Xi=cs("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ai),xi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!ai.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Ji(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})}}),eo=cs("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ui),xi.init(e,t)}),to=cs("$ZodJWT",(e,t)=>{xi.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})}}),no=cs("$ZodUnknown",(e,t)=>{Oi.init(e,t),e._zod.parse=e=>e}),ro=cs("$ZodNever",(e,t)=>{Oi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function so(e,t,n){e.issues.length&&t.issues.push(...$s(n,e.issues)),t.value[n]=e.value}const io=cs("$ZodArray",(e,t)=>{Oi.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=>so(t,n,e))):so(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function oo(e,t,n,r){e.issues.length&&t.issues.push(...$s(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ao(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 co(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=>oo(e,n,s,t))):oo(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 uo=cs("$ZodObject",(e,t)=>{Oi.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=hs(()=>ao(t));bs(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=Es,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=>oo(n,t,e,a))):oo(r,t,e,a)}return i?co(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),lo=cs("$ZodObjectJIT",(e,t)=>{uo.init(e,t);const n=e._zod.parse,r=hs(()=>ao(t));let s;const i=Es,o=!fs.jitless,a=o&&ks.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 Ci(["shape","payload","ctx"]),n=r.value,s=e=>{const t=ws(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=ws(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?co([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function fo(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=>!xs(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=>Ls(e,r,ps())))}),t)}const po=cs("$ZodUnion",(e,t)=>{Oi.init(e,t),bs(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),bs(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),bs(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),bs(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=>gs(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=>fo(t,s,e,i)):fo(a,s,e,i)}}),ho=cs("$ZodIntersection",(e,t)=>{Oi.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])=>go(e,t,n)):go(e,s,i)}});function mo(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(Ss(e)&&Ss(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=mo(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=mo(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 go(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),xs(e))return e;const r=mo(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 yo=cs("$ZodRecord",(e,t)=>{Oi.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Ss(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(...$s(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...$s(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=>Ls(e,r,ps())),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(...$s(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...$s(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),bo=cs("$ZodEnum",(e,t)=>{Oi.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=>Cs.has(typeof e)).map(e=>"string"==typeof e?Ps(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}}),vo=cs("$ZodTransform",(e,t)=>{Oi.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(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 us;return n.value=s,n}});function Do(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const wo=cs("$ZodOptional",(e,t)=>{Oi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",bs(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),bs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${gs(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=>Do(t,e.value)):Do(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),_o=cs("$ZodNullable",(e,t)=>{Oi.init(e,t),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),bs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${gs(e.source)}|null)$`):void 0}),bs(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)}),Eo=cs("$ZodDefault",(e,t)=>{Oi.init(e,t),e._zod.optin="optional",bs(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=>ko(e,t)):ko(r,t)}});function ko(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const So=cs("$ZodPrefault",(e,t)=>{Oi.init(e,t),e._zod.optin="optional",bs(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))}),Ao=cs("$ZodNonOptional",(e,t)=>{Oi.init(e,t),bs(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=>Co(t,e)):Co(s,e)}});function Co(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 Po=cs("$ZodCatch",(e,t)=>{Oi.init(e,t),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),bs(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=>Ls(e,n,ps()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ls(e,n,ps()))},input:e.value}),e.issues=[]),e)}}),Oo=cs("$ZodPipe",(e,t)=>{Oi.init(e,t),bs(e._zod,"values",()=>t.in._zod.values),bs(e._zod,"optin",()=>t.in._zod.optin),bs(e._zod,"optout",()=>t.out._zod.optout),bs(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=>To(e,t.in,n)):To(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>To(e,t.out,n)):To(r,t.out,n)}});function To(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const xo=cs("$ZodReadonly",(e,t)=>{Oi.init(e,t),bs(e._zod,"propValues",()=>t.innerType._zod.propValues),bs(e._zod,"values",()=>t.innerType._zod.values),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(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($o):$o(r)}});function $o(e){return e.value=Object.freeze(e.value),e}const No=cs("$ZodCustom",(e,t)=>{mi.init(e,t),Oi.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=>Lo(t,n,r,e));Lo(s,n,r,e)}});function Lo(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(Fs(e))}}class Ro{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 Fo=new Ro;function Io(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ts(t)})}function Mo(e,t){return new gi({check:"max_length",...Ts(t),maximum:e})}function jo(e,t){return new yi({check:"min_length",...Ts(t),minimum:e})}function Bo(e,t){return new bi({check:"length_equals",...Ts(t),length:e})}function zo(e){return new Ai({check:"overwrite",tx:e})}const Ho=cs("ZodISODateTime",(e,t)=>{Ki.init(e,t),fa.init(e,t)});const Ko=cs("ZodISODate",(e,t)=>{Ui.init(e,t),fa.init(e,t)});const Uo=cs("ZodISOTime",(e,t)=>{qi.init(e,t),fa.init(e,t)});const qo=cs("ZodISODuration",(e,t)=>{Zi.init(e,t),fa.init(e,t)});const Zo=(e,t)=>{Ms.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,ds,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ds,2)}},isEmpty:{get:()=>0===e.issues.length}})};cs("ZodError",Zo);const Go=cs("ZodError",Zo,{Parent:Error}),Wo=Bs(Go),Vo=zs(Go),Yo=Hs(Go),Jo=Us(Go),Qo=(ua=Go,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Bs(ua)(e,t,r)}),Xo=(e=>(t,n,r)=>Bs(e)(t,n,r))(Go),ea=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zs(e)(t,n,s)})(Go),ta=(e=>async(t,n,r)=>zs(e)(t,n,r))(Go),na=(e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hs(e)(t,n,s)})(Go),ra=(e=>(t,n,r)=>Hs(e)(t,n,r))(Go),sa=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Us(e)(t,n,s)})(Go),ia=(e=>async(t,n,r)=>Us(e)(t,n,r))(Go),oa=cs("ZodType",(e,t)=>(Oi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ds(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Os(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Wo(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Yo(e,t,n),e.parseAsync=async(t,n)=>Vo(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Qo(e,t,n),e.decode=(t,n)=>Xo(e,t,n),e.encodeAsync=async(t,n)=>ea(e,t,n),e.decodeAsync=async(t,n)=>ta(e,t,n),e.safeEncode=(t,n)=>na(e,t,n),e.safeDecode=(t,n)=>ra(e,t,n),e.safeEncodeAsync=async(t,n)=>sa(e,t,n),e.safeDecodeAsync=async(t,n)=>ia(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new tc({type:"custom",check:"custom",fn:t,...Ts(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new mi({check:"custom",...Ts(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Fs(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(Fs(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(zo(t)),e.optional=()=>qa(e),e.nullable=()=>Ga(e),e.nullish=()=>qa(Ga(e)),e.nonoptional=t=>function(e,t){return new Ya({type:"nonoptional",innerType:e,...Ts(t)})}(e,t),e.array=()=>Fa(e),e.or=t=>ja([e,t]),e.and=t=>new Ba({type:"intersection",left:e,right:t}),e.transform=t=>Xa(e,new Ka({type:"transform",transform:t})),e.default=t=>{return n=t,new Wa({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():As(n)}});var n},e.prefault=t=>{return n=t,new Va({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():As(n)}});var n},e.catch=t=>{return new Ja({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Xa(e,t),e.readonly=()=>new ec({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Fo.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Fo.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Fo.get(e);const n=e.clone();return Fo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),aa=cs("_ZodString",(e,t)=>{Ti.init(e,t),oa.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 Di({check:"string_format",format:"regex",...Ts(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Ei({check:"string_format",format:"includes",...Ts(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new ki({check:"string_format",format:"starts_with",...Ts(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Si({check:"string_format",format:"ends_with",...Ts(t),suffix:e})}(...t)),e.min=(...t)=>e.check(jo(...t)),e.max=(...t)=>e.check(Mo(...t)),e.length=(...t)=>e.check(Bo(...t)),e.nonempty=(...t)=>e.check(jo(1,...t)),e.lowercase=t=>e.check(function(e){return new wi({check:"string_format",format:"lowercase",...Ts(e)})}(t)),e.uppercase=t=>e.check(function(e){return new _i({check:"string_format",format:"uppercase",...Ts(e)})}(t)),e.trim=()=>e.check(zo(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return zo(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(zo(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(zo(e=>e.toUpperCase()))}),ca=cs("ZodString",(e,t)=>{Ti.init(e,t),aa.init(e,t),e.email=t=>e.check(function(e,t){return new pa({type:"string",format:"email",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new ma({type:"string",format:"url",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new Ta({type:"string",format:"jwt",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ga({type:"string",format:"emoji",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.guid=t=>e.check(Io(da,t)),e.uuid=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ts(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ts(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ts(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new ya({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.guid=t=>e.check(Io(da,t)),e.cuid=t=>e.check(function(e,t){return new ba({type:"string",format:"cuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new va({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Da({type:"string",format:"ulid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new Ca({type:"string",format:"base64",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new Pa({type:"string",format:"base64url",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new wa({type:"string",format:"xid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new _a({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new Ea({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new ka({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new Sa({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Aa({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Oa({type:"string",format:"e164",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new Ho({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ts(e)})}(t)),e.date=t=>e.check(function(e){return new Ko({type:"string",format:"date",check:"string_format",...Ts(e)})}(t)),e.time=t=>e.check(function(e){return new Uo({type:"string",format:"time",check:"string_format",precision:null,...Ts(e)})}(t)),e.duration=t=>e.check(function(e){return new qo({type:"string",format:"duration",check:"string_format",...Ts(e)})}(t))});var ua;function la(e){return new ca({type:"string",...Ts(e)})}const fa=cs("ZodStringFormat",(e,t)=>{xi.init(e,t),aa.init(e,t)}),pa=cs("ZodEmail",(e,t)=>{Li.init(e,t),fa.init(e,t)}),da=cs("ZodGUID",(e,t)=>{$i.init(e,t),fa.init(e,t)}),ha=cs("ZodUUID",(e,t)=>{Ni.init(e,t),fa.init(e,t)}),ma=cs("ZodURL",(e,t)=>{Ri.init(e,t),fa.init(e,t)}),ga=cs("ZodEmoji",(e,t)=>{Fi.init(e,t),fa.init(e,t)}),ya=cs("ZodNanoID",(e,t)=>{Ii.init(e,t),fa.init(e,t)}),ba=cs("ZodCUID",(e,t)=>{Mi.init(e,t),fa.init(e,t)}),va=cs("ZodCUID2",(e,t)=>{ji.init(e,t),fa.init(e,t)}),Da=cs("ZodULID",(e,t)=>{Bi.init(e,t),fa.init(e,t)}),wa=cs("ZodXID",(e,t)=>{zi.init(e,t),fa.init(e,t)}),_a=cs("ZodKSUID",(e,t)=>{Hi.init(e,t),fa.init(e,t)}),Ea=cs("ZodIPv4",(e,t)=>{Gi.init(e,t),fa.init(e,t)}),ka=cs("ZodIPv6",(e,t)=>{Wi.init(e,t),fa.init(e,t)}),Sa=cs("ZodCIDRv4",(e,t)=>{Vi.init(e,t),fa.init(e,t)}),Aa=cs("ZodCIDRv6",(e,t)=>{Yi.init(e,t),fa.init(e,t)}),Ca=cs("ZodBase64",(e,t)=>{Qi.init(e,t),fa.init(e,t)}),Pa=cs("ZodBase64URL",(e,t)=>{Xi.init(e,t),fa.init(e,t)}),Oa=cs("ZodE164",(e,t)=>{eo.init(e,t),fa.init(e,t)}),Ta=cs("ZodJWT",(e,t)=>{to.init(e,t),fa.init(e,t)}),xa=cs("ZodUnknown",(e,t)=>{no.init(e,t),oa.init(e,t)});function $a(){return new xa({type:"unknown"})}const Na=cs("ZodNever",(e,t)=>{ro.init(e,t),oa.init(e,t)});function La(e){return new Na({type:"never",...Ts(e)})}const Ra=cs("ZodArray",(e,t)=>{io.init(e,t),oa.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(jo(t,n)),e.nonempty=t=>e.check(jo(1,t)),e.max=(t,n)=>e.check(Mo(t,n)),e.length=(t,n)=>e.check(Bo(t,n)),e.unwrap=()=>e.element});function Fa(e,t){return function(e,t,n){return new Ra({type:"array",element:t,...Ts(n)})}(0,e,t)}const Ia=cs("ZodObject",(e,t)=>{lo.init(e,t),oa.init(e,t),bs(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ha({type:"enum",entries:t,...Ts(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:$a()}),e.loose=()=>e.clone({...e._zod.def,catchall:$a()}),e.strict=()=>e.clone({...e._zod.def,catchall:La()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Ss(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=Ds(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return vs(this,"shape",n),n},checks:[]});return Os(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Ss(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 vs(this,"shape",n),n},checks:e._zod.def.checks};return Os(e,n)}(e,t),e.merge=t=>function(e,t){const n=Ds(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return vs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Os(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Os(e,Ds(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 vs(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Ds(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 vs(this,"shape",r),r},checks:[]});return Os(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Ds(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 vs(this,"shape",s),s},checks:[]});return Os(t,r)}(Ua,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Ds(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 vs(this,"shape",s),s},checks:[]});return Os(t,r)}(Ya,e,t[0])}),Ma=cs("ZodUnion",(e,t)=>{po.init(e,t),oa.init(e,t),e.options=t.options});function ja(e,t){return new Ma({type:"union",options:e,...Ts(t)})}const Ba=cs("ZodIntersection",(e,t)=>{ho.init(e,t),oa.init(e,t)}),za=cs("ZodRecord",(e,t)=>{yo.init(e,t),oa.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),Ha=cs("ZodEnum",(e,t)=>{bo.init(e,t),oa.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 Ha({...t,checks:[],...Ts(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 Ha({...t,checks:[],...Ts(r),entries:s})}}),Ka=cs("ZodTransform",(e,t)=>{vo.init(e,t),oa.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Fs(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(Fs(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}}),Ua=cs("ZodOptional",(e,t)=>{wo.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new Ua({type:"optional",innerType:e})}const Za=cs("ZodNullable",(e,t)=>{_o.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Za({type:"nullable",innerType:e})}const Wa=cs("ZodDefault",(e,t)=>{Eo.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Va=cs("ZodPrefault",(e,t)=>{So.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ya=cs("ZodNonOptional",(e,t)=>{Ao.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ja=cs("ZodCatch",(e,t)=>{Po.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Qa=cs("ZodPipe",(e,t)=>{Oo.init(e,t),oa.init(e,t),e.in=t.in,e.out=t.out});function Xa(e,t){return new Qa({type:"pipe",in:e,out:t})}const ec=cs("ZodReadonly",(e,t)=>{xo.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType}),tc=cs("ZodCustom",(e,t)=>{No.init(e,t),oa.init(e,t)}),nc=Fa(la()).default([]).optional(),rc=ja([la(),Fa(la())]),sc=(ic=la(),oc=rc,new za({type:"record",keyType:ic,valueType:oc,...Ts(undefined)})).optional();var ic,oc;(function(){const e={type:"object",shape:{stanPath:la().min(1,{message:"stanPath must be a non-empty string"}),includes:nc,excludes:nc,imports:sc}??{},...Ts(void 0)};return new Ia(e)})().strict();const ac=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/^\.\/+/,""),r=`${n}/system`,s=`${n}/output`,i=`${n}/diff`,o=`${n}/dist`,a=`${n}/patch`,c=`${n}/imports`;return{rootRel:n,systemRel:r,outputRel:s,diffRel:i,distRel:o,patchRel:a,importsRel:c,rootAbs:h(e,n),systemAbs:h(e,r),outputAbs:h(e,s),diffAbs:h(e,i),distAbs:h(e,o),patchAbs:h(e,a),importsAbs:h(e,c)}};var cc={makeStanDirs:ac},uc=Object.freeze({__proto__:null,default:cc,makeStanDirs:ac});const lc=async({cwd:e,stanPath:n,baseName:r,includes:s,excludes:i,updateSnapshot:o="createIfMissing",includeOutputDirInDiff:u=!1,anchors:l,onArchiveWarnings:f})=>{const{outDir:p,diffDir:d}=await be(e,n),m=await de(e),y=await ge(m,{cwd:e,stanPath:n,includeOutputDir:!1,includes:s??[],excludes:i??[],anchors:l??[]}),b=await(async(e,t)=>{const n={};for(const r of t){const t=h(e,r),s=await a(t),i=E("sha256").update(s).digest("hex");n[r]=i}return n})(e,y),v=(e=>g(e,".archive.snapshot.json"))(d),D=t(v),w=D?JSON.parse(await a(v,"utf8")):{},_=D?y.filter(e=>!w[e]||w[e]!==b[e]):[...y],k=await(async()=>{try{const e=await import("./classifier-DeYwffC_-C7wwqop3.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:S,warningsBody:A}=await k(e,_),C=S;U(A,f);const P=g(p,`${r}.diff.tar`),O=await import("./index-ucZa1KMb-DZqceYU7.js");if(u)await O.create({file:P,cwd:e,filter:H(n)},K(C,n));else if(0===C.length){const t=(e=>g(e,".stan_no_changes"))(d);await c(t,"no changes","utf8");const r=[`${n.replace(/\\/g,"/")}/diff/.stan_no_changes`];await O.create({file:P,cwd:e},r)}else{const t=Array.from(new Set([...C]));await O.create({file:P,cwd:e},t)}return"replace"===o?await c(v,JSON.stringify(b,null,2),"utf8"):"createIfMissing"!==o||D||await c(v,JSON.stringify(b,null,2),"utf8"),{diffPath:P}};var fc,pc={},dc={},hc={};var mc,gc={};var yc,bc,vc={},Dc={};var wc,_c,Ec,kc,Sc,Ac,Cc={};function Pc(){if(kc)return Ec;kc=1;var e=_c?wc:(_c=1,wc=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 Ec=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 Oc,Tc,xc,$c,Nc,Lc,Rc,Fc,Ic,Mc,jc,Bc,zc,Hc,Kc,Uc,qc,Zc,Gc,Wc={};function Vc(){return Oc||(Oc=1,(e=Wc).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}),Wc;var e}function Yc(){if(xc)return Tc;xc=1;const e=Vc();return Tc=(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 Jc(){if(Rc)return Lc;Rc=1;const e=Nc?$c:(Nc=1,$c=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={},Lc=t}function Qc(){if(Ic)return Fc;Ic=1;const e=C,t=Jc(),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[]},p=(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)),_=[],E=0;for(;p?s>=f:s<=f;)!0===r.toRegex&&n>1?w(s):_.push(o(v(s,E),y,b)),s=p?s-n:s+n,E++;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}):_},d=(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 d(e,t,1,{transform:i});if(n(i))return d(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)?p(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)?d(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return Fc=d}function Xc(){if(Gc)return Zc;Gc=1;const e=Yc(),t=function(){if(jc)return Mc;jc=1;const e=Qc(),t=Vc();return Mc=(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(zc)return Bc;zc=1;const e=Qc(),t=Yc(),n=Vc(),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 Bc=(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))},Bc}(),r=function(){if(qc)return Uc;qc=1;const e=Yc(),{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}=Kc?Hc:(Kc=1,Hc={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 Uc=(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,E=D,k=0;const S=g.length;let A,C=0,P=0;const O=()=>g[C++],T=e=>{if("text"===e.type&&"dot"===E.type&&(E.type="text"),!E||"text"!==E.type||"text"!==e.type)return _.nodes.push(e),e.parent=_,e.prev=E,E=e,e;E.value+=e.value};for(T({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(k++;C<S&&(e=O());)if(A+=e,e!==l)if(e!==n){if(e===f&&(k--,0===k))break}else A+=O();else k++;T({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();T({type:"text",value:A});continue}if(A===c){P++;const e=E.value&&"$"===E.value.slice(-1)||!0===_.dollar;_=T({type:"brace",open:!0,close:!1,dollar:e,depth:P,commas:0,ranges:0,nodes:[]}),w.push(_),T({type:"open",value:A});continue}if(A===u){if("brace"!==_.type){T({type:"text",value:A});continue}const e="close";_=w.pop(),_.close=!0,T({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(_)}]}T({type:"comma",value:A}),_.commas++}else{if(A===i&&P>0&&0===_.commas){const e=_.nodes;if(0===P||0===e.length){T({type:"text",value:A});continue}if("dot"===E.type){if(_.range=[],E.value+=A,E.type="range",3!==_.nodes.length&&5!==_.nodes.length){_.invalid=!0,_.ranges=0,E.type="text";continue}_.ranges++,_.args=[];continue}if("range"===E.type){e.pop();const t=e[e.length-1];t.value+=E.value+A,E=t,_.ranges--;continue}T({type:"dot",value:A});continue}T({type:"text",value:A})}}else{if("paren"!==_.type){T({type:"text",value:A});continue}_=w.pop(),T({type:"text",value:A}),_=w[w.length-1]}else _=T({type:"paren",nodes:[]}),w.push(_),T({type:"text",value:A})}else T({type:"text",value:"\\"+A});else T({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 T({type:"eos"}),D}}(),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),Zc=s}var eu,tu,nu,ru,su,iu,ou,au,cu,uu,lu,fu,pu,du,hu={};function mu(){if(tu)return eu;tu=1;const e=A,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 eu={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 gu(){return nu||(nu=1,function(e){const t=A,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=mu();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}}(hu)),hu}function yu(){return lu?uu:(lu=1,uu=function(){if(cu)return au;cu=1;const e=A,t=function(){if(su)return ru;su=1;const e=gu(),{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}=mu(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return ru=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,E=[],k=[],S=[];let A,C,P=b,O=-1,T=0,x=0,$=!1,N=!1,L=!1,R=!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,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,L=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(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===o&&O===T&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){L=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),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=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,L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==T){if(!0!==D.noparen&&C===u){if(L=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===L){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,T++}else{if(E.push(O),k.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===T+1){T+=2;continue}x=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let G=P,W="",V="";T>0&&(W=P.slice(0,T),P=P.slice(T),x-=T),G&&!0===L&&x>0?(G=P.slice(0,x),V=P.slice(x)):!0===L?(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 Y={prefix:W,input:b,start:T,base:G,glob:V,isBrace:$,isBracket:N,isGlob:L,isExtglob:R,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(Y.maxDepth=0,g(C)||k.push(K),Y.tokens=k),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<E.length;t++){const n=e?e+1:T,r=E[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(k[t].isPrefix=!0,k[t].value=W):k[t].value=s,y(k[t]),Y.maxDepth+=k[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&&(k[k.length-1].value=t,y(k[k.length-1]),Y.maxDepth+=k[k.length-1].depth)}Y.slashes=E,Y.parts=S}return Y},ru}(),n=function(){if(ou)return iu;ou=1;const e=mu(),t=gu(),{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:E,ONE_CHAR:k,DOTS_SLASH:S,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:P,QMARK:O,QMARK_NO_DOT:T,STAR:x,START_ANCHOR:$}=v,N=e=>`(${y}(?:(?!${$}${e.dot?S:w}).)*?)`,L=p.dot?"":A,R=p.dot?O:T;let F=!0===p.bash?N(p):x;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)},Y=e=>{I[e]++,B.push(e)},J=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;Y("parens"),Q({type:e,value:t,output:I.output?"":k}),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}),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?O.repeat(i.length):""):0===o?R+(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=k);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){Y("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?")":"\\)"}),J("parens");continue}if("["===z){if(!0!==p.nobracket&&Z().includes("]"))Y("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}J("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){Y("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}),J("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:E});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:T});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)}${E}|${E}${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=`(?:^|${E}|${N(p)}${E})`,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+=L,H.output+=L),"*"!==U()&&(I.output+=k,H.output+=k)),Q(n)):(n.output=z,Q(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=L+n.output),Q(n))}for(;I.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));I.output=t.escapeLast(I.output,"["),J("brackets")}for(;I.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));I.output=t.escapeLast(I.output,"("),J("parens")}for(;I.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));I.output=t.escapeLast(I.output,"{"),J("braces")}if(!0===p.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Q({type:"maybe_slash",value:"",output:`${E}?`}),!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 E=e=>!0===e.noglobstar?_:`(${w}(?:(?!${b}${e.dot?d:l}).)*?)`,k=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+E(i);case"**/*":return`(?:${v}${E(i)}${f})?${D}${p}${_}`;case"**/*.*":return`(?:${v}${E(i)}${f})?${D}${_}${l}${p}${_}`;case"**/.*":return`(?:${v}${E(i)}${f})?${l}${p}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=k(t[1]);if(!n)return;return n+l+t[2]}}},S=t.removePrefix(r,{negated:!1,prefix:""});let A=k(S);return A&&!0!==i.strictSlashes&&(A+=`${f}?`),A},iu=u}(),r=gu(),s=mu(),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,au=i}())}var bu,vu,Du,wu={};function _u(){if(vu)return bu;vu=1;const e=P.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 bu=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},bu}var Eu,ku,Su,Au={};function Cu(){if(ku)return dc;ku=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.string=dc.stream=dc.pattern=dc.path=dc.fs=dc.errno=dc.array=void 0;const e=(fc||(fc=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.splitWhen=hc.flatten=void 0,hc.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},hc.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}),hc);dc.array=e;const t=(mc||(mc=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.isEnoentCodeError=void 0,gc.isEnoentCodeError=function(e){return"ENOENT"===e.code}),gc);dc.errno=t;const n=function(){if(yc)return vc;yc=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.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 vc.createDirentFromStats=function(t,n){return new e(t,n)},vc}();dc.fs=n;const r=function(){if(bc)return Dc;bc=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.convertPosixPathToPattern=Dc.convertWindowsPathToPattern=Dc.convertPathToPattern=Dc.escapePosixPath=Dc.escapeWindowsPath=Dc.escape=Dc.removeLeadingDotSegment=Dc.makeAbsolute=Dc.unixify=void 0;const e=A,t="win32"===S.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 Dc.unixify=function(e){return e.replace(/\\/g,"/")},Dc.makeAbsolute=function(t,n){return e.resolve(t,n)},Dc.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},Dc.escape=t?o:a,Dc.escapeWindowsPath=o,Dc.escapePosixPath=a,Dc.convertPathToPattern=t?c:u,Dc.convertWindowsPathToPattern=c,Dc.convertPosixPathToPattern=u,Dc}();dc.path=r;const s=function(){if(du)return Cc;du=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.isAbsolute=Cc.partitionAbsoluteAndRelative=Cc.removeDuplicateSlashes=Cc.matchAny=Cc.convertPatternsToRe=Cc.makeRe=Cc.getPatternParts=Cc.expandBraceExpansion=Cc.expandPatternsWithBraceExpansion=Cc.isAffectDepthOfReadingPattern=Cc.endsWithSlashGlobStar=Cc.hasGlobStar=Cc.getBaseDirectory=Cc.isPatternRelatedToParentDirectory=Cc.getPatternsOutsideCurrentDirectory=Cc.getPatternsInsideCurrentDirectory=Cc.getPositivePatterns=Cc.getNegativePatterns=Cc.isPositivePattern=Cc.isNegativePattern=Cc.convertToNegativePattern=Cc.convertToPositivePattern=Cc.isDynamicPattern=Cc.isStaticPattern=void 0;const e=A,t=function(){if(Ac)return Sc;Ac=1;var e=Pc(),t=A.posix.dirname,n="win32"===S.platform(),r=/\\/g,s=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Sc=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(pu)return fu;pu=1;const e=C,t=Xc(),n=yu(),r=gu(),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,fu=o}(),r=/[*?]|^!/,s=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!l(e,t)}function l(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 f(e){return e.startsWith("!")&&"("!==e[1]}function p(e){return!f(e)}function d(e){return e.startsWith("..")||e.startsWith("./..")}function h(e){return e.endsWith("/**")}function m(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 g(e,t){return n.makeRe(e,t)}function y(t){return e.isAbsolute(t)}return Cc.isStaticPattern=u,Cc.isDynamicPattern=l,Cc.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Cc.convertToNegativePattern=function(e){return"!"+e},Cc.isNegativePattern=f,Cc.isPositivePattern=p,Cc.getNegativePatterns=function(e){return e.filter(f)},Cc.getPositivePatterns=function(e){return e.filter(p)},Cc.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!d(e))},Cc.getPatternsOutsideCurrentDirectory=function(e){return e.filter(d)},Cc.isPatternRelatedToParentDirectory=d,Cc.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Cc.hasGlobStar=function(e){return e.includes("**")},Cc.endsWithSlashGlobStar=h,Cc.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return h(t)||u(n)},Cc.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(m(t)),[])},Cc.expandBraceExpansion=m,Cc.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},Cc.makeRe=g,Cc.convertPatternsToRe=function(e,t){return e.map(e=>g(e,t))},Cc.matchAny=function(e,t){return t.some(t=>t.test(e))},Cc.removeDuplicateSlashes=function(e){return e.replace(c,"/")},Cc.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)y(r)?t.push(r):n.push(r);return[t,n]},Cc.isAbsolute=y,Cc}();dc.pattern=s;const i=function(){if(Du)return wu;Du=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.merge=void 0;const e=_u();function t(e){e.forEach(e=>e.emit("close"))}return wu.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},wu}();dc.stream=i;const o=(Eu||(Eu=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.isEmpty=Au.isString=void 0,Au.isString=function(e){return"string"==typeof e},Au.isEmpty=function(e){return""===e}),Au);return dc.string=o,dc}var Pu,Ou={},Tu={},xu={},$u={},Nu={},Lu={},Ru={},Fu={},Iu={};var Mu,ju,Bu,zu,Hu,Ku,Uu,qu,Zu={},Gu={},Wu={};function Vu(){if(zu)return Fu;zu=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.statSync=Fu.stat=Fu.Settings=void 0;const e=function(){if(Pu)return Iu;function e(e,t){e(t)}function t(e,t){e(null,t)}return Pu=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.read=void 0,Iu.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)})},Iu}(),t=(Mu||(Mu=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.read=void 0,Zu.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}}),Zu),n=function(){if(Bu)return Gu;Bu=1,Object.defineProperty(Gu,"__esModule",{value:!0});const e=(ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;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)}}(Wu)),Wu);return Gu.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}},Gu}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Fu.Settings=n.default,Fu.stat=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Fu.statSync=function(e,n){const s=r(n);return t.read(e,s)},Fu}var Yu,Ju={};function Qu(){if(Yu)return Ju;Yu=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.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 Ju.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,Ju}var Xu,el,tl={},nl={};function rl(){if(el)return tl;el=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.fs=void 0;const e=function(){if(Xu)return nl;Xu=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.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 nl.createDirentFromStats=function(t,n){return new e(t,n)},nl}();return tl.fs=e,tl}var sl,il,ol={};function al(){return sl||(sl=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.joinPathSegments=void 0,ol.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),ol}function cl(){if(il)return Ru;il=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.readdir=Ru.readdirWithFileTypes=Ru.read=void 0;const e=Vu(),t=function(){if(qu)return Uu;qu=1,Uu=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(Ku)return Hu;let e;return Ku=1,Hu="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:q):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return Uu}(),n=Qu(),r=rl(),s=al();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 Ru.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t,r):i(e,t,r)},Ru.readdirWithFileTypes=i,Ru.readdir=o,Ru}var ul,ll,fl,pl,dl={},hl={},ml={};function gl(){if(pl)return Lu;pl=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.Settings=Lu.scandirSync=Lu.scandir=void 0;const e=cl(),t=function(){if(ul)return dl;ul=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.readdir=dl.readdirWithFileTypes=dl.read=void 0;const e=Vu(),t=Qu(),n=rl(),r=al();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 dl.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,n):i(e,n)},dl.readdirWithFileTypes=s,dl.readdir=i,dl}(),n=function(){if(fl)return hl;fl=1,Object.defineProperty(hl,"__esModule",{value:!0});const e=A,t=Vu(),n=(ll||(ll=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;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)}}(ml)),ml);return hl.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}},hl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Lu.Settings=n.default,Lu.scandir=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Lu.scandirSync=function(e,n){const s=r(n);return t.read(e,s)},Lu}var yl,bl,vl,Dl={exports:{}};var wl,_l={};function El(){return wl||(wl=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.joinPathSegments=_l.replacePathSegmentSeparator=_l.isAppliedFilter=_l.isFatalError=void 0,_l.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},_l.isAppliedFilter=function(e,t){return null===e||e(t)},_l.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},_l.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),_l}var kl,Sl,Al,Cl={};function Pl(){if(kl)return Cl;kl=1,Object.defineProperty(Cl,"__esModule",{value:!0});const e=El();return Cl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},Cl}function Ol(){if(Sl)return Nu;Sl=1,Object.defineProperty(Nu,"__esModule",{value:!0});const e=O,t=gl(),n=function(){if(vl)return Dl.exports;vl=1;var e=bl?yl:(bl=1,yl=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 Dl.exports=t,Dl.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},Dl.exports}(),r=El(),s=Pl();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 Nu.default=i,Nu}var Tl,xl,$l,Nl={},Ll={},Rl={};var Fl,Il,Ml={};function jl(){if(Il)return xu;Il=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.Settings=xu.walkStream=xu.walkSync=xu.walk=void 0;const e=function(){if(Al)return $u;Al=1,Object.defineProperty($u,"__esModule",{value:!0});const e=Ol();return $u.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()}},$u}(),t=function(){if(Tl)return Nl;Tl=1,Object.defineProperty(Nl,"__esModule",{value:!0});const e=P,t=Ol();return Nl.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}},Nl}(),n=function(){if($l)return Ll;$l=1,Object.defineProperty(Ll,"__esModule",{value:!0});const e=function(){if(xl)return Rl;xl=1,Object.defineProperty(Rl,"__esModule",{value:!0});const e=gl(),t=El(),n=Pl();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 Rl.default=r,Rl}();return Ll.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()}},Ll}(),r=function(){if(Fl)return Ml;Fl=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=A,t=gl();return Ml.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}},Ml}();function s(e={}){return e instanceof r.default?e:new r.default(e)}return xu.Settings=r.default,xu.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},xu.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},xu.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},xu}var Bl,zl={};function Hl(){if(Bl)return zl;Bl=1,Object.defineProperty(zl,"__esModule",{value:!0});const e=A,t=Vu(),n=Cu();return zl.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}},zl}var Kl,Ul,ql={};function Zl(){if(Kl)return ql;Kl=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=P,t=Vu(),n=jl(),r=Hl();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 ql.default=s,ql}var Gl,Wl,Vl,Yl={},Jl={},Ql={},Xl={};var ef,tf,nf,rf,sf,of={},af={},cf={};function uf(){if(rf)return Yl;rf=1,Object.defineProperty(Yl,"__esModule",{value:!0});const e=A,t=function(){if(Vl)return Jl;Vl=1,Object.defineProperty(Jl,"__esModule",{value:!0});const e=Cu(),t=function(){if(Wl)return Ql;Wl=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=function(){if(Gl)return Xl;Gl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=Cu();return Xl.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))}},Xl}();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 Ql.default=t,Ql}();return Jl.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)}},Jl}(),n=function(){if(ef)return of;ef=1,Object.defineProperty(of,"__esModule",{value:!0});const e=Cu();return of.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}},of}(),r=function(){if(tf)return af;tf=1,Object.defineProperty(af,"__esModule",{value:!0});const e=Cu();return af.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},af}(),s=function(){if(nf)return cf;nf=1,Object.defineProperty(cf,"__esModule",{value:!0});const e=Cu();return cf.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}},cf}();return Yl.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}}},Yl}var lf,ff,pf,df={},hf={},mf={};var gf,yf,bf,vf,Df,wf={},_f=function(){if(bf)return yf;bf=1;const e=function(){if(Su)return pc;Su=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.convertPatternGroupToTask=pc.convertPatternGroupsToTasks=pc.groupPatternsByBaseDirectory=pc.getNegativePatternsAsPositive=pc.getPositivePatterns=pc.convertPatternsToTasks=pc.generate=void 0;const e=Cu();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 pc.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)},pc.convertPatternsToTasks=n,pc.getPositivePatterns=r,pc.getNegativePatternsAsPositive=s,pc.groupPatternsByBaseDirectory=i,pc.convertPatternGroupsToTasks=o,pc.convertPatternGroupToTask=a,pc}(),t=function(){if(sf)return Ou;sf=1,Object.defineProperty(Ou,"__esModule",{value:!0});const e=function(){if(Ul)return Tu;Ul=1,Object.defineProperty(Tu,"__esModule",{value:!0});const e=jl(),t=Hl(),n=Zl();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 Tu.default=r,Tu}(),t=uf();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 Ou.default=n,Ou}(),n=function(){if(lf)return df;lf=1,Object.defineProperty(df,"__esModule",{value:!0});const e=P,t=Zl(),n=uf();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 df.default=r,df}(),r=function(){if(pf)return hf;pf=1,Object.defineProperty(hf,"__esModule",{value:!0});const e=function(){if(ff)return mf;ff=1,Object.defineProperty(mf,"__esModule",{value:!0});const e=Vu(),t=jl(),n=Hl();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 mf.default=r,mf}(),t=uf();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 hf.default=n,hf}(),s=(gf||(gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=T,n=S,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)}}}(wf)),wf),i=Cu();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={})),yf=o}(),Ef=Z(_f),kf=function(){if(Df)return vf;Df=1;var e=Pc(),t=A.posix.dirname,n="win32"===S.platform(),r="/",s=/\\/g,i=/\\([!*?|[\](){}])/g;function o(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return vf=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")}}(),Sf=Z(kf);const Af=e=>""!==e&&".."!==e,Cf=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(!Af(e))return null;return t.join("/")},Pf=async e=>{try{return(await l(e)).isFile()}catch{return!1}},Of="0.4.4";function Tf(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 xf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $f extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Nf={};function Lf(e){return Nf}function Rf(e,t){return"bigint"==typeof t?t.toString():t}function Ff(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function If(e){return null==e}function Mf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const jf=Symbol("evaluating");function Bf(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==jf)return void 0===r&&(r=jf,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function zf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Hf(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Kf(e){return JSON.stringify(e)}const Uf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qf(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Zf=Ff(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Gf(e){if(!1===qf(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==qf(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Wf(e){return Gf(e)?{...e}:Array.isArray(e)?[...e]:e}const Vf=new Set(["string","number","symbol"]);function Yf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jf(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Qf(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 Xf={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 ep(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 tp(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function np(e){return"string"==typeof e?e:e?.message}function rp(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=np(e.inst?._zod.def?.error?.(e))??np(t?.error?.(e))??np(n.customError?.(e))??np(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function sp(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ip(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const op=(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,Rf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ap=Tf("$ZodError",op),cp=Tf("$ZodError",op,{Parent:Error});const up=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 xf;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>rp(e,i,Lf())));throw Uf(t,s?.callee),t}return o.value},lp=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=>rp(e,i,Lf())));throw Uf(t,s?.callee),t}return o.value},fp=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 xf;return i.issues.length?{success:!1,error:new(e??ap)(i.issues.map(e=>rp(e,s,Lf())))}:{success:!0,data:i.value}},pp=fp(cp),dp=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=>rp(e,s,Lf())))}:{success:!0,data:i.value}},hp=dp(cp),mp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return up(e)(t,n,s)},gp=e=>(t,n,r)=>up(e)(t,n,r),yp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return lp(e)(t,n,s)},bp=e=>async(t,n,r)=>lp(e)(t,n,r),vp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fp(e)(t,n,s)},Dp=e=>(t,n,r)=>fp(e)(t,n,r),wp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return dp(e)(t,n,s)},_p=e=>async(t,n,r)=>dp(e)(t,n,r),Ep=/^[cC][^\s-]{8,}$/,kp=/^[0-9a-z]+$/,Sp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ap=/^[0-9a-vA-V]{20}$/,Cp=/^[A-Za-z0-9]{27}$/,Pp=/^[a-zA-Z0-9_-]{21}$/,Op=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tp=/^([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})$/,xp=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)$/,$p=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Np=/^(?:(?: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])$/,Lp=/^(([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}|:))$/,Rp=/^((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])$/,Fp=/^(([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])$/,Ip=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mp=/^[A-Za-z0-9_-]*$/,jp=/^(?=.{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])?)*\.?$/,Bp=/^\+(?:[0-9]){6,14}[0-9]$/,zp="(?:(?:\\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])))",Hp=new RegExp(`^${zp}$`);function Kp(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 Up=/^-?\d+$/,qp=/^-?\d+(?:\.\d+)?/,Zp=/^(?:true|false)$/i,Gp=/^[^A-Z]*$/,Wp=/^[^a-z]*$/,Vp=Tf("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Yp={number:"number",bigint:"bigint",object:"date"},Jp=Tf("$ZodCheckLessThan",(e,t)=>{Vp.init(e,t);const n=Yp[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})}}),Qp=Tf("$ZodCheckGreaterThan",(e,t)=>{Vp.init(e,t);const n=Yp[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})}}),Xp=Tf("$ZodCheckMultipleOf",(e,t)=>{Vp.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})}}),ed=Tf("$ZodCheckNumberFormat",(e,t)=>{Vp.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=Xf[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=Up)}),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})}}),td=Tf("$ZodCheckMaxLength",(e,t)=>{var n;Vp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!If(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=sp(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nd=Tf("$ZodCheckMinLength",(e,t)=>{var n;Vp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!If(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=sp(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rd=Tf("$ZodCheckLengthEquals",(e,t)=>{var n;Vp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!If(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=sp(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})}}),sd=Tf("$ZodCheckStringFormat",(e,t)=>{var n,r;Vp.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=()=>{})}),id=Tf("$ZodCheckRegex",(e,t)=>{sd.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})}}),od=Tf("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Gp),sd.init(e,t)}),ad=Tf("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wp),sd.init(e,t)}),cd=Tf("$ZodCheckIncludes",(e,t)=>{Vp.init(e,t);const n=Yf(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})}}),ud=Tf("$ZodCheckStartsWith",(e,t)=>{Vp.init(e,t);const n=new RegExp(`^${Yf(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})}}),ld=Tf("$ZodCheckEndsWith",(e,t)=>{Vp.init(e,t);const n=new RegExp(`.*${Yf(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})}}),fd=Tf("$ZodCheckOverwrite",(e,t)=>{Vp.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class pd{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 dd={major:4,minor:1,patch:12},hd=Tf("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dd;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=ep(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 xf;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o;e.issues.length!==t&&(s||(s=ep(e,t)))});else{if(e.issues.length===t)continue;s||(s=ep(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(ep(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new xf;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 xf;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=pp(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return hp(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),md=Tf("$ZodString",(e,t)=>{var n;hd.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}}),gd=Tf("$ZodStringFormat",(e,t)=>{sd.init(e,t),md.init(e,t)}),yd=Tf("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Tp),gd.init(e,t)}),bd=Tf("$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=xp(e))}else t.pattern??(t.pattern=xp());gd.init(e,t)}),vd=Tf("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$p),gd.init(e,t)}),Dd=Tf("$ZodURL",(e,t)=>{gd.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:jp.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})}}}),wd=Tf("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),gd.init(e,t)}),_d=Tf("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Pp),gd.init(e,t)}),Ed=Tf("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ep),gd.init(e,t)}),kd=Tf("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=kp),gd.init(e,t)}),Sd=Tf("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sp),gd.init(e,t)}),Ad=Tf("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ap),gd.init(e,t)}),Cd=Tf("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Cp),gd.init(e,t)}),Pd=Tf("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=Kp({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(`^${zp}T(?:${r})$`)}(t)),gd.init(e,t)}),Od=Tf("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Hp),gd.init(e,t)}),Td=Tf("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Kp(t)}$`)),gd.init(e,t)}),xd=Tf("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Op),gd.init(e,t)}),$d=Tf("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Np),gd.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Nd=Tf("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Lp),gd.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})}}}),Ld=Tf("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Rp),gd.init(e,t)}),Rd=Tf("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Fp),gd.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 Fd(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Id=Tf("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ip),gd.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Fd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Md=Tf("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Mp),gd.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Mp.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Fd(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})}}),jd=Tf("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Bp),gd.init(e,t)});const Bd=Tf("$ZodJWT",(e,t)=>{gd.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})}}),zd=Tf("$ZodNumber",(e,t)=>{hd.init(e,t),e._zod.pattern=e._zod.bag.pattern??qp,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}}),Hd=Tf("$ZodNumber",(e,t)=>{ed.init(e,t),zd.init(e,t)}),Kd=Tf("$ZodBoolean",(e,t)=>{hd.init(e,t),e._zod.pattern=Zp,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}}),Ud=Tf("$ZodUnknown",(e,t)=>{hd.init(e,t),e._zod.parse=e=>e}),qd=Tf("$ZodNever",(e,t)=>{hd.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Zd(e,t,n){e.issues.length&&t.issues.push(...tp(n,e.issues)),t.value[n]=e.value}const Gd=Tf("$ZodArray",(e,t)=>{hd.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=>Zd(t,n,e))):Zd(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Wd(e,t,n,r){e.issues.length&&t.issues.push(...tp(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Vd(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 Yd(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=>Wd(e,n,s,t))):Wd(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 Jd=Tf("$ZodObject",(e,t)=>{hd.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=Ff(()=>Vd(t));Bf(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=qf,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=>Wd(n,t,e,a))):Wd(r,t,e,a)}return i?Yd(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),Qd=Tf("$ZodObjectJIT",(e,t)=>{Jd.init(e,t);const n=e._zod.parse,r=Ff(()=>Vd(t));let s;const i=qf,o=!Nf.jitless,a=o&&Zf.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 pd(["shape","payload","ctx"]),n=r.value,s=e=>{const t=Kf(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=Kf(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?Yd([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function Xd(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=>!ep(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=>rp(e,r,Lf())))}),t)}const eh=Tf("$ZodUnion",(e,t)=>{hd.init(e,t),Bf(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Bf(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Bf(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Bf(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=>Mf(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=>Xd(t,s,e,i)):Xd(a,s,e,i)}}),th=Tf("$ZodIntersection",(e,t)=>{hd.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])=>rh(e,t,n)):rh(e,s,i)}});function nh(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(Gf(e)&&Gf(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=nh(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=nh(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 rh(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),ep(e))return e;const r=nh(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 sh=Tf("$ZodRecord",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Gf(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(...tp(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...tp(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=>rp(e,r,Lf())),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(...tp(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...tp(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ih=Tf("$ZodEnum",(e,t)=>{hd.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=>Vf.has(typeof e)).map(e=>"string"==typeof e?Yf(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}}),oh=Tf("$ZodTransform",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new $f(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 xf;return n.value=s,n}});function ah(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ch=Tf("$ZodOptional",(e,t)=>{hd.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Bf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Bf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Mf(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=>ah(t,e.value)):ah(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),uh=Tf("$ZodNullable",(e,t)=>{hd.init(e,t),Bf(e._zod,"optin",()=>t.innerType._zod.optin),Bf(e._zod,"optout",()=>t.innerType._zod.optout),Bf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Mf(e.source)}|null)$`):void 0}),Bf(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)}),lh=Tf("$ZodDefault",(e,t)=>{hd.init(e,t),e._zod.optin="optional",Bf(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=>fh(e,t)):fh(r,t)}});function fh(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const ph=Tf("$ZodPrefault",(e,t)=>{hd.init(e,t),e._zod.optin="optional",Bf(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))}),dh=Tf("$ZodNonOptional",(e,t)=>{hd.init(e,t),Bf(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=>hh(t,e)):hh(s,e)}});function hh(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 mh=Tf("$ZodCatch",(e,t)=>{hd.init(e,t),Bf(e._zod,"optin",()=>t.innerType._zod.optin),Bf(e._zod,"optout",()=>t.innerType._zod.optout),Bf(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=>rp(e,n,Lf()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>rp(e,n,Lf()))},input:e.value}),e.issues=[]),e)}}),gh=Tf("$ZodPipe",(e,t)=>{hd.init(e,t),Bf(e._zod,"values",()=>t.in._zod.values),Bf(e._zod,"optin",()=>t.in._zod.optin),Bf(e._zod,"optout",()=>t.out._zod.optout),Bf(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=>yh(e,t.in,n)):yh(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>yh(e,t.out,n)):yh(r,t.out,n)}});function yh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const bh=Tf("$ZodReadonly",(e,t)=>{hd.init(e,t),Bf(e._zod,"propValues",()=>t.innerType._zod.propValues),Bf(e._zod,"values",()=>t.innerType._zod.values),Bf(e._zod,"optin",()=>t.innerType._zod.optin),Bf(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(vh):vh(r)}});function vh(e){return e.value=Object.freeze(e.value),e}const Dh=Tf("$ZodCustom",(e,t)=>{Vp.init(e,t),hd.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=>wh(t,n,r,e));wh(s,n,r,e)}});function wh(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(ip(e))}}class _h{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 Eh(){return new _h}const kh=Eh();function Sh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qf(t)})}function Ah(e,t){return new Jp({check:"less_than",...Qf(t),value:e,inclusive:!1})}function Ch(e,t){return new Jp({check:"less_than",...Qf(t),value:e,inclusive:!0})}function Ph(e,t){return new Qp({check:"greater_than",...Qf(t),value:e,inclusive:!1})}function Oh(e,t){return new Qp({check:"greater_than",...Qf(t),value:e,inclusive:!0})}function Th(e,t){return new Xp({check:"multiple_of",...Qf(t),value:e})}function xh(e,t){return new td({check:"max_length",...Qf(t),maximum:e})}function $h(e,t){return new nd({check:"min_length",...Qf(t),minimum:e})}function Nh(e,t){return new rd({check:"length_equals",...Qf(t),length:e})}function Lh(e){return new fd({check:"overwrite",tx:e})}function Rh(e){const t=function(e,t){const n=new Vp({check:"custom",...Qf(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(ip(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(ip(r))}},e(n.value,n)));return t}const Fh=Tf("ZodISODateTime",(e,t)=>{Pd.init(e,t),um.init(e,t)});function Ih(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qf(t)})}(Fh,e)}const Mh=Tf("ZodISODate",(e,t)=>{Od.init(e,t),um.init(e,t)});function jh(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Qf(t)})}(Mh,e)}const Bh=Tf("ZodISOTime",(e,t)=>{Td.init(e,t),um.init(e,t)});function zh(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qf(t)})}(Bh,e)}const Hh=Tf("ZodISODuration",(e,t)=>{xd.init(e,t),um.init(e,t)});function Kh(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qf(t)})}(Hh,e)}const Uh=(e,t)=>{ap.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,Rf,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Rf,2)}},isEmpty:{get:()=>0===e.issues.length}})},qh=Tf("ZodError",Uh),Zh=Tf("ZodError",Uh,{Parent:Error}),Gh=up(Zh),Wh=lp(Zh),Vh=fp(Zh),Yh=dp(Zh),Jh=mp(Zh),Qh=gp(Zh),Xh=yp(Zh),em=bp(Zh),tm=vp(Zh),nm=Dp(Zh),rm=wp(Zh),sm=_p(Zh),im=Tf("ZodType",(e,t)=>(hd.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Hf(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Jf(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Gh(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Vh(e,t,n),e.parseAsync=async(t,n)=>Wh(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Yh(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Jh(e,t,n),e.decode=(t,n)=>Qh(e,t,n),e.encodeAsync=async(t,n)=>Xh(e,t,n),e.decodeAsync=async(t,n)=>em(e,t,n),e.safeEncode=(t,n)=>tm(e,t,n),e.safeDecode=(t,n)=>nm(e,t,n),e.safeEncodeAsync=async(t,n)=>rm(e,t,n),e.safeDecodeAsync=async(t,n)=>sm(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,...Qf(n)})}(ig,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){return Rh(e)}(t)),e.overwrite=t=>e.check(Lh(t)),e.optional=()=>Vm(e),e.nullable=()=>Jm(e),e.nullish=()=>Vm(Jm(e)),e.nonoptional=t=>function(e,t){return new eg({type:"nonoptional",innerType:e,...Qf(t)})}(e,t),e.array=()=>jm(e),e.or=t=>Km([e,t]),e.and=t=>new Um({type:"intersection",left:e,right:t}),e.transform=t=>rg(e,function(e){return new Gm({type:"transform",transform:e})}(t)),e.default=t=>{return n=t,new Qm({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Wf(n)}});var n},e.prefault=t=>{return n=t,new Xm({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Wf(n)}});var n},e.catch=t=>{return new tg({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>rg(e,t),e.readonly=()=>new sg({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return kh.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>kh.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return kh.get(e);const n=e.clone();return kh.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),om=Tf("_ZodString",(e,t)=>{md.init(e,t),im.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 id({check:"string_format",format:"regex",...Qf(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new cd({check:"string_format",format:"includes",...Qf(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new ud({check:"string_format",format:"starts_with",...Qf(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new ld({check:"string_format",format:"ends_with",...Qf(t),suffix:e})}(...t)),e.min=(...t)=>e.check($h(...t)),e.max=(...t)=>e.check(xh(...t)),e.length=(...t)=>e.check(Nh(...t)),e.nonempty=(...t)=>e.check($h(1,...t)),e.lowercase=t=>e.check(function(e){return new od({check:"string_format",format:"lowercase",...Qf(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ad({check:"string_format",format:"uppercase",...Qf(e)})}(t)),e.trim=()=>e.check(Lh(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Lh(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Lh(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Lh(e=>e.toUpperCase()))}),am=Tf("ZodString",(e,t)=>{md.init(e,t),om.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qf(t)})}(lm,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qf(t)})}(dm,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qf(t)})}(Pm,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qf(t)})}(hm,t)),e.guid=t=>e.check(Sh(fm,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qf(t)})}(pm,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qf(t)})}(pm,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qf(t)})}(pm,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qf(t)})}(pm,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qf(t)})}(mm,t)),e.guid=t=>e.check(Sh(fm,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qf(t)})}(gm,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qf(t)})}(ym,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qf(t)})}(bm,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qf(t)})}(Sm,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qf(t)})}(Am,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qf(t)})}(vm,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qf(t)})}(Dm,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qf(t)})}(wm,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qf(t)})}(_m,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qf(t)})}(Em,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qf(t)})}(km,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qf(t)})}(Cm,t)),e.datetime=t=>e.check(Ih(t)),e.date=t=>e.check(jh(t)),e.time=t=>e.check(zh(t)),e.duration=t=>e.check(Kh(t))});function cm(e){return function(e,t){return new e({type:"string",...Qf(t)})}(am,e)}const um=Tf("ZodStringFormat",(e,t)=>{gd.init(e,t),om.init(e,t)}),lm=Tf("ZodEmail",(e,t)=>{vd.init(e,t),um.init(e,t)}),fm=Tf("ZodGUID",(e,t)=>{yd.init(e,t),um.init(e,t)}),pm=Tf("ZodUUID",(e,t)=>{bd.init(e,t),um.init(e,t)}),dm=Tf("ZodURL",(e,t)=>{Dd.init(e,t),um.init(e,t)}),hm=Tf("ZodEmoji",(e,t)=>{wd.init(e,t),um.init(e,t)}),mm=Tf("ZodNanoID",(e,t)=>{_d.init(e,t),um.init(e,t)}),gm=Tf("ZodCUID",(e,t)=>{Ed.init(e,t),um.init(e,t)}),ym=Tf("ZodCUID2",(e,t)=>{kd.init(e,t),um.init(e,t)}),bm=Tf("ZodULID",(e,t)=>{Sd.init(e,t),um.init(e,t)}),vm=Tf("ZodXID",(e,t)=>{Ad.init(e,t),um.init(e,t)}),Dm=Tf("ZodKSUID",(e,t)=>{Cd.init(e,t),um.init(e,t)}),wm=Tf("ZodIPv4",(e,t)=>{$d.init(e,t),um.init(e,t)}),_m=Tf("ZodIPv6",(e,t)=>{Nd.init(e,t),um.init(e,t)}),Em=Tf("ZodCIDRv4",(e,t)=>{Ld.init(e,t),um.init(e,t)}),km=Tf("ZodCIDRv6",(e,t)=>{Rd.init(e,t),um.init(e,t)}),Sm=Tf("ZodBase64",(e,t)=>{Id.init(e,t),um.init(e,t)}),Am=Tf("ZodBase64URL",(e,t)=>{Md.init(e,t),um.init(e,t)}),Cm=Tf("ZodE164",(e,t)=>{jd.init(e,t),um.init(e,t)}),Pm=Tf("ZodJWT",(e,t)=>{Bd.init(e,t),um.init(e,t)}),Om=Tf("ZodNumber",(e,t)=>{zd.init(e,t),im.init(e,t),e.gt=(t,n)=>e.check(Ph(t,n)),e.gte=(t,n)=>e.check(Oh(t,n)),e.min=(t,n)=>e.check(Oh(t,n)),e.lt=(t,n)=>e.check(Ah(t,n)),e.lte=(t,n)=>e.check(Ch(t,n)),e.max=(t,n)=>e.check(Ch(t,n)),e.int=t=>e.check(xm(t)),e.safe=t=>e.check(xm(t)),e.positive=t=>e.check(Ph(0,t)),e.nonnegative=t=>e.check(Oh(0,t)),e.negative=t=>e.check(Ah(0,t)),e.nonpositive=t=>e.check(Ch(0,t)),e.multipleOf=(t,n)=>e.check(Th(t,n)),e.step=(t,n)=>e.check(Th(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 Tm=Tf("ZodNumberFormat",(e,t)=>{Hd.init(e,t),Om.init(e,t)});function xm(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Qf(t)})}(Tm,e)}const $m=Tf("ZodBoolean",(e,t)=>{Kd.init(e,t),im.init(e,t)});function Nm(e){return function(e,t){return new e({type:"boolean",...Qf(t)})}($m,e)}const Lm=Tf("ZodUnknown",(e,t)=>{Ud.init(e,t),im.init(e,t)});function Rm(){return new Lm({type:"unknown"})}const Fm=Tf("ZodNever",(e,t)=>{qd.init(e,t),im.init(e,t)});function Im(e){return function(e,t){return new e({type:"never",...Qf(t)})}(Fm,e)}const Mm=Tf("ZodArray",(e,t)=>{Gd.init(e,t),im.init(e,t),e.element=t.element,e.min=(t,n)=>e.check($h(t,n)),e.nonempty=t=>e.check($h(1,t)),e.max=(t,n)=>e.check(xh(t,n)),e.length=(t,n)=>e.check(Nh(t,n)),e.unwrap=()=>e.element});function jm(e,t){return function(e,t,n){return new e({type:"array",element:t,...Qf(n)})}(Mm,e,t)}const Bm=Tf("ZodObject",(e,t)=>{Qd.init(e,t),im.init(e,t),Bf(e,"shape",()=>t.shape),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Zm({type:"enum",entries:n,...Qf(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:Rm()}),e.loose=()=>e.clone({...e._zod.def,catchall:Rm()}),e.strict=()=>e.clone({...e._zod.def,catchall:Im()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Gf(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=Hf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return zf(this,"shape",n),n},checks:[]});return Jf(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Gf(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 zf(this,"shape",n),n},checks:e._zod.def.checks};return Jf(e,n)}(e,t),e.merge=t=>function(e,t){const n=Hf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return zf(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Jf(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Jf(e,Hf(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 zf(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Hf(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 zf(this,"shape",r),r},checks:[]});return Jf(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Hf(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 zf(this,"shape",s),s},checks:[]});return Jf(t,r)}(Wm,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Hf(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 zf(this,"shape",s),s},checks:[]});return Jf(t,r)}(eg,e,t[0])});function zm(e,t){const n={type:"object",shape:e??{},...Qf(t)};return new Bm(n)}const Hm=Tf("ZodUnion",(e,t)=>{eh.init(e,t),im.init(e,t),e.options=t.options});function Km(e,t){return new Hm({type:"union",options:e,...Qf(t)})}const Um=Tf("ZodIntersection",(e,t)=>{th.init(e,t),im.init(e,t)});const qm=Tf("ZodRecord",(e,t)=>{sh.init(e,t),im.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});const Zm=Tf("ZodEnum",(e,t)=>{ih.init(e,t),im.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 Zm({...t,checks:[],...Qf(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 Zm({...t,checks:[],...Qf(r),entries:s})}});const Gm=Tf("ZodTransform",(e,t)=>{oh.init(e,t),im.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new $f(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(ip(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(ip(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}});const Wm=Tf("ZodOptional",(e,t)=>{ch.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Vm(e){return new Wm({type:"optional",innerType:e})}const Ym=Tf("ZodNullable",(e,t)=>{uh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Jm(e){return new Ym({type:"nullable",innerType:e})}const Qm=Tf("ZodDefault",(e,t)=>{lh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Xm=Tf("ZodPrefault",(e,t)=>{ph.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});const eg=Tf("ZodNonOptional",(e,t)=>{dh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});const tg=Tf("ZodCatch",(e,t)=>{mh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const ng=Tf("ZodPipe",(e,t)=>{gh.init(e,t),im.init(e,t),e.in=t.in,e.out=t.out});function rg(e,t){return new ng({type:"pipe",in:e,out:t})}const sg=Tf("ZodReadonly",(e,t)=>{bh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});const ig=Tf("ZodCustom",(e,t)=>{Dh.init(e,t),im.init(e,t)});function og(e){return function(e,t){return new e({type:"number",coerce:!0,checks:[],...Qf(t)})}(Om,e)}const ag=Km([Nm(),cm(),function(e,t){return new e({type:"number",checks:[],...Qf(t)})}(Om,cg)]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=e.trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();var cg;const ug=zm({script:cm().min(1,{message:"script must be a non-empty string"}),warnPattern:cm().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"}),warnPatternFlags:cm().optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp("",e),!0}catch{return!1}})(e),{message:"warnPatternFlags: invalid regex flags"})}).strict(),lg=function(e,t,n){return new qm({type:"record",keyType:e,valueType:t,...Qf(n)})}(cm(),Km([cm().min(1),ug])).default({}),fg=zm({archive:ag,combine:ag,keep:ag,sequential:ag,live:ag,plan:ag,facets:ag,hangWarn:og().int().positive().optional(),hangKill:og().int().positive().optional(),hangKillGrace:og().int().positive().optional(),scripts:Km([Nm(),jm(cm())]).optional(),prompt:cm().optional()}).strict().optional(),pg=zm({file:cm().optional()}).strict().optional(),dg=zm({stash:ag}).strict().optional(),hg=zm({debug:ag,boring:ag,patch:pg,run:fg,snap:dg}).strict().optional(),mg=zm({scripts:lg,cliDefaults:hg,patchOpenCommand:cm().optional(),maxUndos:og().int().positive().optional(),devMode:ag}).strict(),gg=e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e,t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')};var yg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vg,Dg={},wg={},_g={},Eg={};function kg(){if(vg)return Eg;vg=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 Eg.ALIAS=e,Eg.DOC=t,Eg.MAP=n,Eg.NODE_TYPE=o,Eg.PAIR=r,Eg.SCALAR=s,Eg.SEQ=i,Eg.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Eg.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,Eg.isCollection=c,Eg.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,Eg.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,Eg.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},Eg.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,Eg.isScalar=a,Eg.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,Eg}var Sg,Ag,Cg={};function Pg(){if(Sg)return Cg;Sg=1;var e=kg();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,Cg.visit=s,Cg.visitAsync=o,Cg}function Og(){if(Ag)return _g;Ag=1;var e=kg(),t=Pg();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:"},_g.Directives=s,_g}var Tg,xg={},$g={},Ng={};function Lg(){if(Tg)return Ng;Tg=1;var e=kg(),t=Pg();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 Ng.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},Ng.anchorNames=n,Ng.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}},Ng.findNewAnchor=r,Ng}var Rg,Fg={},Ig={};function Mg(){if(Rg)return Ig;return Rg=1,Ig.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)},Ig}var jg,Bg,zg,Hg={};function Kg(){if(jg)return Hg;jg=1;var e=kg();return Hg.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)},Hg}function Ug(){if(Bg)return Fg;Bg=1;var e=Mg(),t=kg(),n=Kg();return Fg.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}},Fg}function qg(){if(zg)return $g;zg=1;var e=Lg(),t=Pg(),n=kg(),r=Ug(),s=Kg();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 $g.Alias=i,$g}var Zg,Gg,Wg,Vg={},Yg={},Jg={};function Qg(){if(Zg)return Jg;Zg=1;var e=kg(),t=Ug(),n=Kg();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",Jg.Scalar=r,Jg.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,Jg}function Xg(){if(Gg)return Yg;Gg=1;var e=qg(),t=kg(),n=Qg();return Yg.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},Yg}function ey(){if(Wg)return Vg;Wg=1;var e=Xg(),t=kg(),n=Ug();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 Vg.Collection=i,Vg.collectionFromPath=r,Vg.isEmptyPath=s,Vg}var ty,ny={},ry={},sy={},iy={};function oy(){if(ty)return iy;ty=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return iy.indentComment=e,iy.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,iy.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),iy}var ay,cy,uy,ly,fy={},py={};function dy(){if(ay)return py;ay=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 py.FOLD_BLOCK=e,py.FOLD_FLOW="flow",py.FOLD_QUOTED=t,py.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},py}function hy(){if(cy)return fy;cy=1;var e=Qg(),t=dy();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,E=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;E=w}}let k=c.substring(0,E<w?E+1:w);k&&(c=c.substring(k.length),k=k.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(`${k}${r}${v}`,m,t.FOLD_BLOCK,o);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${k}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return fy.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},fy}function my(){if(uy)return sy;uy=1;var e=Lg(),t=kg(),n=oy(),r=hy();return sy.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}},sy.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},sy}function gy(){if(ly)return ry;ly=1;var e=kg(),t=Qg(),n=my(),r=oy();return ry.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,E=n.stringify(s,o,()=>w=!0,()=>_=!0);if(!y&&!o.inFlow&&E.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(),""===E?"?":y?`? ${E}`:E}else if(u&&!m||null==i&&y)return E=`? ${E}`,g&&!w?E+=r.lineComment(E,o.indent,d(g)):_&&c&&c(),E;w&&(g=null),y?(g&&(E+=r.lineComment(E,o.indent,d(g))),E=`? ${E}\n${f}:`):(E=`${E}:`,g&&(E+=r.lineComment(E,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=E.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 k=!1;const S=n.stringify(i,o,()=>k=!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 E+=A+S,o.inFlow?k&&a&&a():D&&!k?E+=r.lineComment(E,o.indent,d(D)):_&&c&&c(),E},ry}var yy,by={},vy={};function Dy(){if(yy)return vy;yy=1;var e=w;return vy.debug=function(e,...t){"debug"===e&&console.log(...t)},vy.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},vy}var wy,_y,Ey,ky={};function Sy(){if(wy)return ky;wy=1;var e=kg(),t=Qg();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 ky.addMergeToJSMap=s,ky.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),ky.merge=r,ky}function Ay(){if(_y)return by;_y=1;var e=Dy(),t=Sy(),n=my(),r=kg(),s=Kg();return by.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},by}function Cy(){if(Ey)return ny;Ey=1;var e=Xg(),t=gy(),n=Ay(),r=kg();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 ny.Pair=s,ny.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)},ny}var Py,Oy,Ty,xy={},$y={},Ny={},Ly={};function Ry(){if(Py)return Ly;Py=1;var e=kg(),t=my(),n=oy();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 Ly.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Ly}function Fy(){if(Oy)return Ny;Oy=1;var e=Ry(),t=Ay(),n=ey(),r=kg(),s=Cy(),i=Qg();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 Ny.YAMLMap=a,Ny.findPair=o,Ny}function Iy(){if(Ty)return $y;Ty=1;var e=kg(),t=Fy();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 $y.map=n,$y}var My,jy,By={},zy={};function Hy(){if(My)return zy;My=1;var e=Xg(),t=Ry(),n=ey(),r=kg(),s=Qg(),i=Kg();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 zy.YAMLSeq=o,zy}function Ky(){if(jy)return By;jy=1;var e=kg(),t=Hy();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 By.seq=n,By}var Uy,qy={};function Zy(){if(Uy)return qy;Uy=1;var e=hy();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 qy.string=t,qy}var Gy,Wy={},Vy={};function Yy(){if(Gy)return Vy;Gy=1;var e=Qg();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 Vy.nullTag=t,Vy}var Jy,Qy={};function Xy(){if(Jy)return Qy;Jy=1;var e=Qg();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 Qy.boolTag=t,Qy}var eb,tb,nb={},rb={};function sb(){if(eb)return rb;return eb=1,rb.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},rb}function ib(){if(tb)return nb;tb=1;var e=Qg(),t=sb();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 nb.float=s,nb.floatExp=r,nb.floatNaN=n,nb}var ob,ab={};function cb(){if(ob)return ab;ob=1;var e=sb();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 ab.int=i,ab.intHex=o,ab.intOct=s,ab}var ub,lb={};function fb(){if(ub)return lb;ub=1;var e=Iy(),t=Yy(),n=Ky(),r=Zy(),s=Xy(),i=ib(),o=cb();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 lb.schema=a,lb}var pb,db={};function hb(){if(pb)return db;pb=1;var e=Qg(),t=Iy(),n=Ky();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 db.schema=a,db}var mb,gb={};function yb(){if(mb)return gb;mb=1;var e=_,t=Qg(),n=hy();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 gb.binary=r,gb}var bb,vb,Db={},wb={};function _b(){if(bb)return wb;bb=1;var e=kg(),t=Cy(),n=Qg(),r=Hy();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 wb.createPairs=i,wb.pairs=o,wb.resolvePairs=s,wb}function Eb(){if(vb)return Db;vb=1;var e=kg(),t=Kg(),n=Fy(),r=Hy(),s=_b();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 Db.YAMLOMap=i,Db.omap=o,Db}var kb,Sb={},Ab={};function Cb(){if(kb)return Ab;kb=1;var e=Qg();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 Ab.falseTag=r,Ab.trueTag=n,Ab}var Pb,Ob={};function Tb(){if(Pb)return Ob;Pb=1;var e=Qg(),t=sb();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 Ob.float=s,Ob.floatExp=r,Ob.floatNaN=n,Ob}var xb,$b={};function Nb(){if(xb)return $b;xb=1;var e=sb();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 $b.int=o,$b.intBin=s,$b.intHex=a,$b.intOct=i,$b}var Lb,Rb={};function Fb(){if(Lb)return Rb;Lb=1;var e=kg(),t=Cy(),n=Fy();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 Rb.YAMLSet=r,Rb.set=s,Rb}var Ib,Mb,jb,Bb,zb={};function Hb(){if(Ib)return zb;Ib=1;var e=sb();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 zb.floatTime=s,zb.intTime=r,zb.timestamp=i,zb}function Kb(){if(Mb)return Sb;Mb=1;var e=Iy(),t=Yy(),n=Ky(),r=Zy(),s=yb(),i=Cb(),o=Tb(),a=Nb(),c=Sy(),u=Eb(),l=_b(),f=Fb(),p=Hb();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 Sb.schema=d,Sb}function Ub(){if(jb)return Wy;jb=1;var e=Iy(),t=Yy(),n=Ky(),r=Zy(),s=Xy(),i=ib(),o=cb(),a=fb(),c=hb(),u=yb(),l=Sy(),f=Eb(),p=_b(),d=Kb(),h=Fb(),m=Hb();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 Wy.coreKnownTags=b,Wy.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},[])},Wy}function qb(){if(Bb)return xy;Bb=1;var e=kg(),t=Iy(),n=Ky(),r=Zy(),s=Ub();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return xy.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}},xy}var Zb,Gb,Wb={};function Vb(){if(Zb)return Wb;Zb=1;var e=kg(),t=my(),n=oy();return Wb.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"},Wb}function Yb(){if(Gb)return xg;Gb=1;var e=qg(),t=ey(),n=kg(),r=Cy(),s=Kg(),i=qb(),o=Vb(),a=Lg(),c=Mg(),u=Xg(),l=Og();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return xg.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)}},xg}var Jb,Qb={};function Xb(){if(Jb)return Qb;Jb=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Qb.YAMLError=e,Qb.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Qb.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Qb.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`}},Qb}var ev,tv={},nv={},rv={},sv={},iv={};function ov(){if(ev)return iv;return ev=1,iv.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],E=_?_.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:E,start:w??E}},iv}var av,cv={};function uv(){if(av)return cv;return av=1,cv.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}},cv}var lv,fv={};function pv(){if(lv)return fv;lv=1;var e=uv();return fv.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)}}},fv}var dv,hv,mv={};function gv(){if(dv)return mv;dv=1;var e=kg();return mv.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))},mv}function yv(){if(hv)return sv;hv=1;var e=Cy(),t=Fy(),n=ov(),r=uv(),s=pv(),i=gv();const o="All mapping items must start at the same column";return sv.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 E=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=E.end,E.found){D&&("block-map"!==b?.type||E.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<E.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,E,f):c(u,h,y,null,E,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"),E.comment&&(_.comment?_.comment+="\n"+E.comment:_.comment=E.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},sv}var bv,vv={};function Dv(){if(bv)return vv;bv=1;var e=Hy(),t=ov(),n=pv();return vv.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},vv}var wv,_v,Ev,kv={},Sv={};function Av(){if(wv)return Sv;return wv=1,Sv.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}},Sv}function Cv(){if(_v)return kv;_v=1;var e=kg(),t=Cy(),n=Fy(),r=Hy(),s=Av(),i=ov(),o=uv(),a=gv();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return kv.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,E=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!E.found){if(!(E.anchor||E.tag||w||_)){0===r&&E.comma?h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),E.comment&&(b.comment?b.comment+="\n"+E.comment:b.comment=E.comment),D=E.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)E.comma&&h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(E.comma||h(E.start,"MISSING_CHAR",`Missing , between ${y} items`),E.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,E.comment=E.comment.substring(t.length+1)}}if(g||w||E.found){p.atKey=!0;const e=E.end,r=v?l(p,v,E,h):f(p,e,m,null,E,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&&!E.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}}E.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 k=_?l(p,_,o,h):o.found?f(p,o.end,w,null,o,h):null;k?u(_)&&h(k.range,"BLOCK_IN_FLOW",c):o.comment&&(r.comment?r.comment+="\n"+o.comment:r.comment=o.comment);const S=new t.Pair(r,k);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=(k??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=k?k.range[2]:o.end}else{const e=_?l(p,_,E,h):f(p,E.end,w,null,E,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...E]=d.end;let k=D;if(_&&_.source===w)k=_.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&&E.unshift(_)}if(E.length>0){const e=s.resolveEnd(E,k,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,k,e.offset]}else b.range=[d.offset,k,k];return b},kv}function Pv(){if(Ev)return rv;Ev=1;var e=kg(),t=Qg(),n=Fy(),r=Hy(),s=yv(),i=Dv(),o=Cv();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 rv.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},rv}var Ov,Tv={},xv={};function $v(){if(Ov)return xv;Ov=1;var e=Qg();return xv.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]}},xv}var Nv,Lv,Rv={};function Fv(){if(Nv)return Rv;Nv=1;var e=Qg(),t=Av();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 Rv.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]}},Rv}function Iv(){if(Lv)return Tv;Lv=1;var e=kg(),t=Qg(),n=$v(),r=Fv();return Tv.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},Tv}var Mv,jv,Bv,zv,Hv={};function Kv(){if(Mv)return Hv;return Mv=1,Hv.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},Hv}function Uv(){if(jv)return nv;jv=1;var e=qg(),t=kg(),n=Pv(),r=Iv(),s=Av(),i=Kv();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 nv.composeEmptyNode=c,nv.composeNode=a,nv}function qv(){if(Bv)return tv;Bv=1;var e=Yb(),t=Uv(),n=Av(),r=ov();return tv.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},tv}function Zv(){if(zv)return wg;zv=1;var e=w,t=Og(),n=Yb(),r=Xb(),s=kg(),i=qv(),o=Av();function a(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 c(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 wg.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=a(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}=c(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:c(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=a(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(a(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(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=o.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(a(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}}},wg}var Gv,Wv={},Vv={};function Yv(){if(Gv)return Vv;Gv=1;var e=$v(),t=Fv(),n=Xb(),r=hy();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 Vv.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}}},Vv.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},Vv.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")}},Vv}var Jv,Qv={};function Xv(){if(Jv)return Qv;Jv=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 Qv.stringify=n=>"type"in n?e(n):t(n),Qv}var eD,tD,nD={};function rD(){if(eD)return nD;eD=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")},nD.visit=r,nD}function sD(){if(tD)return Wv;tD=1;var e=Yv(),t=Xv(),n=rD();return Wv.createScalarToken=e.createScalarToken,Wv.resolveAsScalar=e.resolveAsScalar,Wv.setScalarValue=e.setScalarValue,Wv.stringify=t.stringify,Wv.visit=n.visit,Wv.BOM="\ufeff",Wv.DOCUMENT="",Wv.FLOW_END="",Wv.SCALAR="",Wv.isCollection=e=>!!e&&"items"in e,Wv.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),Wv.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},Wv.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},Wv}var iD,oD={};function aD(){if(iD)return oD;iD=1;var e=sD();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 oD.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)}},oD}var cD,uD={};function lD(){if(cD)return uD;cD=1;return uD.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}}}},uD}var fD,pD={};function dD(){if(fD)return pD;fD=1;var e=w,t=sD(),n=aD();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 o(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 a(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 c(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 pD.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&&c(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=a(o(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=a(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=a(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=a(o(t));c(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=a(o(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=a(o(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())}}},pD}var hD,mD,gD={};function yD(){if(hD)return gD;hD=1;var e=Zv(),t=Yb(),n=Xb(),r=Dy(),s=kg(),i=lD(),o=dD();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 gD.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))},gD.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())},gD.parseDocument=c,gD.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)},gD}var bD=function(){if(mD)return Dg;mD=1;var e=Zv(),t=Yb(),n=qb(),r=Xb(),s=qg(),i=kg(),o=Cy(),a=Qg(),c=Fy(),u=Hy(),l=sD(),f=aD(),p=lD(),d=dD(),h=yD(),m=Pg();return Dg.Composer=e.Composer,Dg.Document=t.Document,Dg.Schema=n.Schema,Dg.YAMLError=r.YAMLError,Dg.YAMLParseError=r.YAMLParseError,Dg.YAMLWarning=r.YAMLWarning,Dg.Alias=s.Alias,Dg.isAlias=i.isAlias,Dg.isCollection=i.isCollection,Dg.isDocument=i.isDocument,Dg.isMap=i.isMap,Dg.isNode=i.isNode,Dg.isPair=i.isPair,Dg.isScalar=i.isScalar,Dg.isSeq=i.isSeq,Dg.Pair=o.Pair,Dg.Scalar=a.Scalar,Dg.YAMLMap=c.YAMLMap,Dg.YAMLSeq=u.YAMLSeq,Dg.CST=l,Dg.Lexer=f.Lexer,Dg.LineCounter=p.LineCounter,Dg.Parser=d.Parser,Dg.parse=h.parse,Dg.parseAllDocuments=h.parseAllDocuments,Dg.parseDocument=h.parseDocument,Dg.stringify=h.stringify,Dg.visit=m.visit,Dg.visitAsync=m.visitAsync,Dg}(),vD=bg(bD);const DD=(e,t)=>e.endsWith(".json")?JSON.parse(t):vD.parse(t),wD=(e,t)=>{if((()=>{try{return"1"===process.env.STAN_DEBUG}catch{return!1}})())try{console.error(`stan: debug: fallback: ${e}: ${t}`)}catch{}},_D=e=>{try{"function"==typeof gg&&gg(e)}catch{}},ED=(e,t)=>{const n=e&&"object"==typeof e?e:{};let r;try{if(!("function"==typeof mg.parse)){const e=n.scripts,t=e&&"object"==typeof e?e:{};_D(t);const r=n.patchOpenCommand,s="string"==typeof r&&r.length>0?r:ve;return{scripts:t,cliDefaults:n.cliDefaults,patchOpenCommand:s,maxUndos:n.maxUndos,devMode:n.devMode}}r=mg.parse(n)}catch(e){const n=t.replace(/\\/g,"/");throw new Error(`stan-cli: invalid config in ${n}\n${(e=>e instanceof qh?e.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("\n"):String(e))(e)}`)}return _D(r.scripts),{scripts:r.scripts,cliDefaults:r.cliDefaults,patchOpenCommand:"string"==typeof r.patchOpenCommand&&r.patchOpenCommand.length>0?r.patchOpenCommand:ve,maxUndos:r.maxUndos,devMode:r.devMode}},kD=e=>{const t=ke(e);if(!t)return{scripts:{},patchOpenCommand:ve};const n=r(t,"utf8"),s=DD(t,n),i=s&&"object"==typeof s?s:{};if(i["stan-cli"]&&"object"==typeof i["stan-cli"])return ED(i["stan-cli"],t);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);if(Object.keys(o).length>0){if(!(()=>{try{const e=process.env.STAN_ACCEPT_LEGACY,t=("string"==typeof e?e:"").trim().toLowerCase();return"1"===t||"true"===t}catch{return!1}})()){const e=t.replace(/\\/g,"/");throw new Error([`stan-cli: legacy configuration detected in ${e} (missing top-level "stan-cli").`,'Run "stan init" to migrate your config (a .bak is written next to the file),',"or set STAN_ACCEPT_LEGACY=1 to temporarily accept legacy keys during the transition."].join(" "))}return wD("cli.config:loadSync",`using legacy top-level CLI keys from ${t.replace(/\\/g,"/")}; run "stan init" to migrate`),Object.prototype.hasOwnProperty.call(i,"stan-core")||wD("run.action:engine-legacy",`detected legacy root keys (no "stan-core") in ${t.replace(/\\/g,"/")}`),ED(o,t)}return{scripts:{},patchOpenCommand:ve}},SD=e=>{try{const t=kD(e);let n=Object.keys(t.scripts);if(!n.length)try{const t=(e=>{try{const t=ke(e??process.cwd());if(!t)return{};const n=r(t,"utf8"),s=DD(t,n);return s&&"object"==typeof s?s:{}}catch{return{}}})(e),s=(e=>{const t=e["stan-cli"];return t&&"object"==typeof t?t:null})(t),i=(s&&"object"==typeof s.scripts?s.scripts:t.scripts)??{};n=Object.keys((e=>{const t={};if(!e||"object"!=typeof e)return t;for(const[n,r]of Object.entries(e))"string"==typeof r&&r.trim().length?t[n]=r:r&&"object"==typeof r&&"string"==typeof r.script&&(t[n]=String(r.script));return t})(i))}catch{}if(!n.length)return"";const s=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 ${s}`,` stan run -q -x ${s}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${s}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},AD=()=>new Promise(e=>setImmediate(e)),CD=(e=0)=>t=>`[${t+e}m`,PD=(e=0)=>t=>`[${38+e};5;${t}m`,OD=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,TD={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(TD.modifier);Object.keys(TD.color),Object.keys(TD.bgColor);const xD=function(){const e=new Map;for(const[t,n]of Object.entries(TD)){for(const[t,r]of Object.entries(n))TD[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=TD[t],e.set(r[0],r[1]);Object.defineProperty(TD,t,{value:n,enumerable:!1})}return Object.defineProperty(TD,"codes",{value:e,enumerable:!1}),TD.color.close="",TD.bgColor.close="",TD.color.ansi=CD(),TD.color.ansi256=PD(),TD.color.ansi16m=OD(),TD.bgColor.ansi=CD(10),TD.bgColor.ansi256=PD(10),TD.bgColor.ansi16m=OD(10),Object.defineProperties(TD,{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=>TD.rgbToAnsi256(...TD.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)=>TD.ansi256ToAnsi(TD.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>TD.ansi256ToAnsi(TD.hexToAnsi256(e)),enumerable:!1}}),TD}();function $D(e,t=(globalThis.Deno?globalThis.Deno.args:v.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),s=t.indexOf("--");return-1!==r&&(-1===s||r<s)}const{env:ND}=v;let LD;function RD(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in ND)return"true"===ND.FORCE_COLOR?1:"false"===ND.FORCE_COLOR?0:0===ND.FORCE_COLOR.length?1:Math.min(Number.parseInt(ND.FORCE_COLOR,10),3)}();void 0!==r&&(LD=r);const s=n?LD:r;if(0===s)return 0;if(n){if($D("color=16m")||$D("color=full")||$D("color=truecolor"))return 3;if($D("color=256"))return 2}if("TF_BUILD"in ND&&"AGENT_NAME"in ND)return 1;if(e&&!t&&void 0===s)return 0;const i=s||0;if("dumb"===ND.TERM)return i;if("win32"===v.platform){const e=x.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in ND)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in ND)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in ND)||"codeship"===ND.CI_NAME?1:i;if("TEAMCITY_VERSION"in ND)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ND.TEAMCITY_VERSION)?1:0;if("truecolor"===ND.COLORTERM)return 3;if("xterm-kitty"===ND.TERM)return 3;if("xterm-ghostty"===ND.TERM)return 3;if("wezterm"===ND.TERM)return 3;if("TERM_PROGRAM"in ND){const e=Number.parseInt((ND.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ND.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ND.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ND.TERM)||"COLORTERM"in ND?1:i}function FD(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(RD(e,{streamIsTTY:e&&e.isTTY,...t}))}$D("no-color")||$D("no-colors")||$D("color=false")||$D("color=never")?LD=0:($D("color")||$D("colors")||$D("color=true")||$D("color=always"))&&(LD=1);const ID={stdout:FD({isTTY:$.isatty(1)}),stderr:FD({isTTY:$.isatty(2)})};function MD(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:jD,stderr:BD}=ID,zD=Symbol("GENERATOR"),HD=Symbol("STYLER"),KD=Symbol("IS_EMPTY"),UD=["ansi","ansi","ansi256","ansi16m"],qD=Object.create(null),ZD=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=jD?jD.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,GD.prototype),t};function GD(e){return ZD(e)}Object.setPrototypeOf(GD.prototype,Function.prototype);for(const[e,t]of Object.entries(xD))qD[e]={get(){const n=QD(this,JD(t.open,t.close,this[HD]),this[KD]);return Object.defineProperty(this,e,{value:n}),n}};qD.visible={get(){const e=QD(this,this[HD],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const WD=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?xD[n].ansi16m(...r):"ansi256"===t?xD[n].ansi256(xD.rgbToAnsi256(...r)):xD[n].ansi(xD.rgbToAnsi(...r)):"hex"===e?WD("rgb",t,n,...xD.hexToRgb(...r)):xD[n][e](...r),VD=["rgb","hex","ansi256"];for(const e of VD){qD[e]={get(){const{level:t}=this;return function(...n){const r=JD(WD(e,UD[t],"color",...n),xD.color.close,this[HD]);return QD(this,r,this[KD])}}};qD["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=JD(WD(e,UD[t],"bgColor",...n),xD.bgColor.close,this[HD]);return QD(this,r,this[KD])}}}}const YD=Object.defineProperties(()=>{},{...qD,level:{enumerable:!0,get(){return this[zD].level},set(e){this[zD].level=e}}}),JD=(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}},QD=(e,t,n)=>{const r=(...e)=>XD(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,YD),r[zD]=e,r[HD]=t,r[KD]=n,r},XD=(e,t)=>{if(e.level<=0||!t)return e[KD]?"":t;let n=e[HD];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=MD(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(GD.prototype,qD);const ew=GD();function tw(){const e=Boolean(process.stdout.isTTY);return"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!e}function nw(e){return tw()?e:ew.green(e)}function rw(e){return tw()?e:ew.cyan(e)}function sw(e){return tw()?e:ew.blue(e)}function iw(e){return tw()?e:ew.red(e)}function ow(e){return tw()?e:ew.black(e)}function aw(e){return tw()?e:ew.gray(e)}function cw(e){return tw()?e:ew.hex("#FFA500")(e)}function uw(e){return tw()?e:ew.bold(e)}function lw(e){return tw()?e:ew.dim(e)}GD({level:BD?BD.level:0});const fw=(e,t)=>{const{selection:n,config:r,mode:s,behavior:i}=t,o=null==n?Object.keys(r.scripts):n,a=d.join(r.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[tw()?"STAN run plan":uw("STAN run plan"),"mode: "+("sequential"===s?"sequential":"concurrent"),`output: ${a}/`,..."string"==typeof i.prompt&&i.prompt.trim().length?[`prompt: ${i.prompt}`]:[],`scripts: ${o.length?o.join(", "):"none"}`,"archive: "+(i.archive?"yes":"no"),"combine: "+(i.combine?"yes":"no"),"keep output dir: "+(i.keep?"yes":"no"),"live: "+(i.live?"yes":"no"),`hang warn: ${"number"==typeof i.hangWarn?i.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof i.hangKill?i.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof i.hangKillGrace?i.hangKillGrace.toString():"n/a"}s`,...Array.isArray(r.overlayPlan)&&r.overlayPlan.length?["facet view:",...r.overlayPlan.map(e=>` ${e}`)]:[]].join("\n ")}`};var pw,dw,hw,mw,gw={},yw={},bw={},vw={},Dw={exports:{}};function ww(){return dw?pw:(dw=1,pw=({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 _w(){if(mw)return hw;mw=1;const e=ww();return hw=t=>"string"==typeof t?t.replace(e(),""):t,hw}var Ew,kw,Sw,Aw,Cw={exports:{}};function Pw(){if(Ew)return Cw.exports;Ew=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 Cw.exports=e,Cw.exports.default=e,Cw.exports}function Ow(){return Sw?kw:(Sw=1,kw=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 Tw(){if(Aw)return Dw.exports;Aw=1;const e=_w(),t=Pw(),n=Ow(),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 Dw.exports=r,Dw.exports.default=r,Dw.exports}var xw,$w,Nw={};var Lw,Rw,Fw,Iw,Mw,jw,Bw,zw,Hw,Kw,Uw,qw={exports:{}};function Zw(){if(Iw)return Fw;Iw=1;const e=Rw?Lw:(Rw=1,Lw={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"]}};Fw=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]},Fw}function Gw(){if(jw)return Mw;jw=1;const e=Zw();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 Mw=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},Mw}function Ww(){if(zw)return Bw;zw=1;const e=Zw(),t=Gw(),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)})}),Bw=n}function Vw(){return Hw||(Hw=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=Ww());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}})}(qw)),qw.exports}function Yw(){if(Uw)return Kw;Uw=1;const e=Pw(),t=function(){if($w)return xw;$w=1;const e="[\ud800-\udbff][\udc00-\udfff]";return xw=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=Vw(),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 Kw=(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},Kw}var Jw,Qw,Xw,e_,t_={};function n_(){if(Jw)return t_;Jw=1,Object.defineProperty(t_,"__esModule",{value:!0}),t_.getBorderCharacters=void 0;return t_.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+'".')},t_}function r_(){if(Qw)return Nw;Qw=1;var e=Nw&&Nw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nw,"__esModule",{value:!0}),Nw.isCellInRange=Nw.areCellEqual=Nw.calculateRangeCoordinate=Nw.flatten=Nw.extractTruncates=Nw.sumArray=Nw.sequence=Nw.distributeUnevenly=Nw.countSpaceSequence=Nw.groupBySizes=Nw.makeBorderConfig=Nw.splitAnsi=Nw.normalizeString=void 0;const t=e(Yw()),n=e(Tw()),r=e(_w()),s=n_();Nw.normalizeString=e=>e.replace(/\r\n/g,"\n");Nw.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};Nw.makeBorderConfig=e=>({...(0,s.getBorderCharacters)("honeywell"),...e});Nw.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};Nw.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};Nw.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));Nw.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);Nw.sumArray=e=>e.reduce((e,t)=>e+t,0);Nw.extractTruncates=e=>e.columns.map(({truncate:e})=>e);Nw.flatten=e=>[].concat(...e);Nw.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}}};Nw.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return Nw.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,Nw}function s_(){if(Xw)return vw;Xw=1;var e=vw&&vw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vw,"__esModule",{value:!0}),vw.alignString=void 0;const t=e(Tw()),n=r_(),r=(e,t)=>e+" ".repeat(t);return vw.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)},vw}function i_(){if(e_)return bw;e_=1,Object.defineProperty(bw,"__esModule",{value:!0}),bw.alignTableData=void 0;const e=s_();return bw.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)})),bw}var o_,a_={},c_={},u_={},l_={};function f_(){if(o_)return l_;o_=1;var e=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0}),l_.wrapString=void 0;const t=e(Yw()),n=e(Tw());return l_.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},l_}var p_,d_,h_,m_,g_={};function y_(){if(p_)return g_;p_=1;var e=g_&&g_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g_,"__esModule",{value:!0}),g_.wrapWord=void 0;const t=e(Yw()),n=e(_w());return g_.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},g_}function b_(){if(d_)return u_;d_=1,Object.defineProperty(u_,"__esModule",{value:!0}),u_.wrapCell=void 0;const e=r_(),t=f_(),n=y_();return u_.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},u_}function v_(){if(h_)return c_;h_=1,Object.defineProperty(c_,"__esModule",{value:!0}),c_.calculateCellHeight=void 0;const e=b_();return c_.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,c_}function D_(){if(m_)return a_;m_=1,Object.defineProperty(a_,"__esModule",{value:!0}),a_.calculateRowHeights=void 0;const e=v_(),t=r_();return a_.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},a_}var w_,__,E_={},k_={};function S_(){if(w_)return k_;w_=1,Object.defineProperty(k_,"__esModule",{value:!0}),k_.drawContent=void 0;return k_.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("")},k_}function A_(){return __||(__=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=S_();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)}}(E_)),E_}var C_,P_={};function O_(){if(C_)return P_;C_=1,Object.defineProperty(P_,"__esModule",{value:!0}),P_.drawRow=void 0;const e=S_();return P_.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"},P_}var T_,x_,$_,N_,L_,R_,F_={},I_={},M_={},j_={};function B_(){if($_)return j_;$_=1,Object.defineProperty(j_,"__esModule",{value:!0});const e=(x_||(x_=1,T_=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}),T_);return e.code='require("ajv/dist/runtime/equal").default',j_.default=e,j_}function z_(){return N_||(N_=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}B_().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}}(M_)),M_}function H_(){if(L_)return I_;L_=1;var e=I_&&I_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I_,"__esModule",{value:!0}),I_.validateConfig=void 0;const t=e(z_());return I_.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.")}},I_}function K_(){if(R_)return F_;R_=1,Object.defineProperty(F_,"__esModule",{value:!0}),F_.makeStreamConfig=void 0;const e=r_(),t=H_(),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 F_.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)}},F_}var U_,q_={};function Z_(){return U_||(U_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=r_(),n=b_(),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)}}(q_)),q_}var G_,W_={};function V_(){return G_||(G_=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)}))}(W_)),W_}var Y_,J_={};function Q_(){if(Y_)return J_;Y_=1,Object.defineProperty(J_,"__esModule",{value:!0}),J_.stringifyTableData=void 0;const e=r_();return J_.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),J_}var X_,eE,tE,nE={},rE={exports:{}};function sE(){return X_||(X_=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+"]?",E=_+w+("(?:"+D+"(?:"+[y,b,v].join("|")+")"+_+w+")*"),k="(?:"+[y+m+"?",m,b,v,h].join("|")+")",S=RegExp(g+"(?="+g+")|"+k+E,"g"),A=RegExp("["+D+l+f+p+d+"]"),C=parseInt,P="object"==typeof yg&&yg&&yg.Object===Object&&yg,O="object"==typeof self&&self&&self.Object===Object&&self,T=P||O||Function("return this")(),x=t&&!t.nodeType&&t,$=x&&e&&!e.nodeType&&e,N=$&&$.exports===x&&P.process,L=function(){try{return N&&N.binding("util")}catch(e){}}(),R=L&&L.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=T.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=R?(G=R,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 Y(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 J(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=Y(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=J(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,J(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}}(rE,rE.exports)),rE.exports}function iE(){return eE||(eE=1,function(e){var t=nE&&nE.__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(sE());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])))}(nE)),nE}function oE(){if(tE)return yw;tE=1,Object.defineProperty(yw,"__esModule",{value:!0}),yw.createStream=void 0;const e=i_(),t=D_(),n=A_(),r=O_(),s=K_(),i=Z_(),o=V_(),a=Q_(),c=iE(),u=r_(),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 yw.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)}}},yw}var aE,cE={},uE={};function lE(){if(aE)return uE;aE=1,Object.defineProperty(uE,"__esModule",{value:!0}),uE.calculateOutputColumnWidths=void 0;return uE.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),uE}var fE,pE={};function dE(){if(fE)return pE;fE=1,Object.defineProperty(pE,"__esModule",{value:!0}),pE.drawTable=void 0;const e=A_(),t=S_(),n=O_(),r=r_();return pE.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})},pE}var hE,mE={};function gE(){if(hE)return mE;hE=1,Object.defineProperty(mE,"__esModule",{value:!0}),mE.injectHeaderConfig=void 0;return mE.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]},mE}var yE,bE={},vE={};function DE(){return yE||(yE=1,function(e){var t=vE&&vE.__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(Tw()),r=r_();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}}(vE)),vE}var wE,_E={},EE={};function kE(){if(wE)return EE;wE=1;var e=EE&&EE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(EE,"__esModule",{value:!0}),EE.alignVerticalRangeContent=EE.wrapRangeContent=void 0;const t=e(Tw()),n=s_(),r=Z_(),s=V_(),i=iE(),o=r_(),a=b_();EE.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 EE.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)},EE}var SE,AE={};function CE(){if(SE)return AE;SE=1,Object.defineProperty(AE,"__esModule",{value:!0}),AE.calculateSpanningCellWidth=void 0;const e=r_();return AE.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},AE}var PE,OE,TE={};function xE(){if(PE)return TE;PE=1,Object.defineProperty(TE,"__esModule",{value:!0}),TE.makeRangeConfig=void 0;const e=r_();return TE.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}},TE}function $E(){if(OE)return _E;OE=1,Object.defineProperty(_E,"__esModule",{value:!0}),_E.createSpanningCellManager=void 0;const e=kE(),t=CE(),n=xE(),r=r_(),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 _E.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)))}}},_E}var NE,LE,RE={};function FE(){if(NE)return RE;NE=1,Object.defineProperty(RE,"__esModule",{value:!0}),RE.validateSpanningCellConfig=void 0;const e=r_(),t=(e,t,n)=>e<=n&&n<=t;return RE.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})})})},RE}function IE(){if(LE)return bE;LE=1,Object.defineProperty(bE,"__esModule",{value:!0}),bE.makeTableConfig=void 0;const e=DE(),t=$E(),n=r_(),r=H_(),s=FE();return bE.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})}},bE}var ME,jE,BE={};function zE(){if(ME)return BE;ME=1,Object.defineProperty(BE,"__esModule",{value:!0}),BE.validateTableData=void 0;const e=r_();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 HE(){if(jE)return cE;jE=1,Object.defineProperty(cE,"__esModule",{value:!0}),cE.table=void 0;const e=i_(),t=lE(),n=D_(),r=dE(),s=gE(),i=IE(),o=Z_(),a=V_(),c=Q_(),u=iE(),l=r_(),f=zE();return cE.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)},cE}var KE,UE,qE={};function ZE(){return KE||(KE=1,Object.defineProperty(qE,"__esModule",{value:!0})),qE}function GE(){return UE||(UE=1,function(e){var t=gw&&gw.__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=gw&&gw.__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=oE();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const s=n_();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return s.getBorderCharacters}});const i=HE();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return i.table}}),n(ZE(),e)}(gw)),gw}var WE=GE();const VE=e=>e.toString().padStart(2,"0"),YE=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${VE(n)}:${VE(r)}`},JE=e=>{if(tw()){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 cw("⚠︎ warn");case"waiting":return aw("⏸︎ waiting");case"run":return sw("▶︎ run");case"ok":return nw("✔︎ ok");case"error":return iw("✖︎ fail");case"cancelled":return ow("◼︎ cancelled");case"timeout":return iw("⏱︎ timeout");case"quiet":return rw("⏱︎ quiet");case"stalled":return cw("⏱︎ stalled");case"killed":return iw("◼︎ killed");default:return""}},QE=e=>e.replace(/\\/g,"/"),XE=(e,t)=>{if(!t)return"";const n=t;return d.isAbsolute(n)?QE(d.relative(e,n)):QE(n)},ek=e=>{const{state:t,cwd:n,now:r}=e,s=(e=>{switch(e.kind){case"warn":return"warn";case"waiting":default:return"waiting";case"running":return"run";case"quiet":return"quiet";case"stalled":return"stalled";case"done":return"ok";case"error":return"error";case"timedout":return"timeout";case"cancelled":return"cancelled";case"killed":return"killed"}})(t);let i="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:(r??Date.now)();i=YE(Math.max(0,(r??Date.now)()-e))}else"number"==typeof t.durationMs&&(i=YE(Math.max(0,t.durationMs)));const o="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?XE(n,t.outputPath):"";return{label:JE(s),time:i,output:o}},tk=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,nk=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","killed"].includes(n.kind)&&(t.fail+=1);return t},rk=e=>{const{rows:t,startedAt:n,boring:r,uiId:s,includeHint:i}=e,o=["Type","Item","Status","Time","Output"].map(e=>uw(e)),a=[];if(a.push(o),0===t.length){const e=YE(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state,n=ek({state:t,cwd:process.cwd(),now:()=>Date.now()});a.push([e.type,e.item,n.label,n.time,n.output])}const c=(e=>WE.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,aw(`⏸︎ ${t.waiting.toString()}`),sw(`▶︎ ${t.running.toString()}`),rw(`⏱︎ ${t.quiet.toString()}`),cw(`⏱︎ ${t.stalled.toString()}`),iw(`⏱︎ ${t.timeout.toString()}`),nw(`✔︎ ${t.ok.toString()}`),cw(`⚠︎ ${t.warn.toString()}`),iw(`✖︎ ${t.fail.toString()}`),ow(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(YE(Date.now()-n),nk(t.map(e=>({state:e.state}))),r),l=i?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${lw("Press")} ${uw("q")} ${lw("to cancel,")} ${uw("r")} ${lw("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},sk="[",ik=`${sk}?25l`,ok=`${sk}?25h`,ak=`${sk}K`,ck=e=>e>0?`${sk}${String(e)}F`:"",uk=`${sk}1E`,lk=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(ik)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=ck(t));for(let e=0;e<n.length;e+=1){const s=n[e]??"";r+=0===t&&0===e&&""===s?"\n":`\r${ak}${s}\n`}const s=t-n.length;for(let e=0;e<s;e+=1)r+=`\r${ak}`,e<s-1&&(r+=uk);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=ck(t));for(let e=0;e<t;e+=1)n+=`\r${ak}\n`;e.write(n),t=0}catch{}},done(){try{e.write(ok)}catch{}}}},fk=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),pk=(e,t,n)=>{if(fk)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},dk={get enabled(){return fk},renderer:{start(e){pk("renderer","start()",e)},update(e){pk("renderer","update()",e)},render(e){pk("renderer","render()",e)},headerOnly(e){pk("renderer","render(header-only)",e)},flush(){pk("renderer","flush()")},clear(){pk("renderer","clear()")},stop(){pk("renderer","stop()")},done(){pk("renderer","stop():done()")}},ui:{start(){pk("UI","start()")},installCancellation(){pk("UI","installCancellation(): control.attach()")},onCancelled(e){pk("UI","onCancelled()",{mode:e})},stop(){pk("UI","stop() -> sink.stop()")}},session:{info(e,t){pk("session",e,t)},exitHook(){pk("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}};let hk=1;const mk=()=>Date.now();class gk{rows=new Map;opts;frameNo=0;timer;startedAt=mk();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=hk++}resetElapsed(){this.startedAt=mk(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),dk.renderer.stop(),dk.renderer.done(),this.writer?.done()}flush(){dk.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){dk.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=lk()),this.writer.start(),this.timer=setInterval(()=>{this.render()},this.opts.refreshMs))}clear(){dk.renderer.clear(),this.writer?.clear()}stop(){dk.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,dk.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),s=n??tk(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}}),dk.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=mk();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=rk({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=rk({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,dk.enabled)try{const e=nk(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);dk.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}var yk,bk;var vk=function(){if(bk)return yk;bk=1;var e=N,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 yk=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)})}}}(),Dk=bg(vk);class wk{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)&&Dk(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=[]}}class _k{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{dk.session.info("restart: detach keys")}catch{}}}let Ek=null;function kk(e){return Ek===e}const Sk=(e,n)=>{const r=n.PATH??n.Path??"",s=(e=>{const n=[];let r=e;for(;;){const e=g(r,"node_modules",".bin");try{t(e)&&n.push(e)}catch{}const s=m(r);if(s===r)break;r=s}return n})(e);return{...n,PATH:[...s,r].filter(Boolean).join(y)}},Ak=async(e,t,n,r,i,o,c,u,l)=>{const p=h(t,`${r}.txt`),d=Date.now();c?.onStart?.(r);const m=s(p,{encoding:"utf8"}),g=k(i,{cwd:e,shell:!0,windowsHide:!0,env:Sk(e,process.env)}),y="1"===process.env.STAN_DEBUG;let b="";const v="number"==typeof u?.hangWarn&&u.hangWarn>0?u.hangWarn:0,D="number"==typeof u?.hangKill&&u.hangKill>0?u.hangKill:0,w="number"==typeof u?.hangKillGrace&&u.hangKillGrace>0?u.hangKillGrace:10;let _,E,S=Date.now(),A=!1,C=!1;try{"number"==typeof g.pid&&l&&l.track(`script:${r}`,g.pid)}catch{}g.stdout.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stdout.write(e),S=Date.now()}),g.stderr.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stderr.write(e),S=Date.now()}),(v>0||D>0)&&(_=setInterval(()=>{const e=Date.now()-S;if(!A&&v>0&&e>=1e3*v&&(A=!0,c?.onHangWarn?.(r,v)),!C&&D>0&&e>=1e3*D){C=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}c?.onHangTimeout?.(r,D);const e=Math.max(0,1e3*w);E=setTimeout(()=>{try{"number"==typeof g.pid&&Dk(g.pid,"SIGKILL")}catch{}c?.onHangKilled?.(r,w)},e)}},1e3));const P=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(_),E&&clearTimeout(E),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 O="ok";if("number"==typeof P&&0!==P)O="error";else if(u?.warnPatterns&&u.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let t=!1;if(b.length>0&&e(u.warnPatterns,b))t=!0;else try{const n=await a(p,"utf8");e(u.warnPatterns,n)&&(t=!0)}catch{}t&&(O="warn")}return c?.onEnd?.(r,p,d,Date.now(),P,O),o&&await f(o,r.slice(0,1).toUpperCase(),"utf8"),p},Ck=()=>{let e=0;return(()=>{try{const e=process.env.CI,t=("string"==typeof e?e:"").trim().toLowerCase();return""!==t&&"0"!==t&&"false"!==t}catch{return!1}})()&&(e+=25),"win32"!==process.platform&&(e+=10),25+e},Pk=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?s.script:"",p=s&&"object"==typeof s&&"warnPattern"in s?((e,t)=>{if("string"!=typeof e||!e.trim())return[];const n=e.trim(),r=[],s=(e,t)=>{try{r.push(new RegExp(e,t))}catch{}};if("string"==typeof t&&t.length>0){s(n,t);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e,t)}else{s(n);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e),s(n,"i")}return r})(s.warnPattern,s.warnPatternFlags):[],d=await Ak(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 AD(),!u())break;if(await t(Ck()),!u())break;if(await AD(),!u())break}if(await p(e),"function"==typeof u){if(await AD(),!u())break;if(await t(Math.max(5,Ck()/2)),!u())break;if(await AD(),!u())break}}else{const e="function"==typeof u?s.filter(()=>u()):s;await Promise.all(e.map(e=>p(e).then(()=>{})))}return f},Ok=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=Pk(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)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ stalled "${e}" after ${t.toString()}s of inactivity`)}catch{}})(e,t))},onHangTimeout:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ timeout "${e}" after ${t.toString()}s; sending SIGTERM`)}catch{}})(e,t))},onHangKilled:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ◼ killed "${e}" after ${t.toString()}s grace`)}catch{}})(e,t))}},{hangWarn:h,hangKill:m,hangKillGrace:g},f,p).then(e=>{y.push(...e)});return await b.catch(()=>{}),y},Tk=[];Tk.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Tk.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Tk.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const xk=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,$k=Symbol.for("signal-exit emitter"),Nk=globalThis,Lk=Object.defineProperty.bind(Object);class Rk{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Nk[$k])return Nk[$k];Lk(Nk,$k,{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 Fk{}const Ik=globalThis.process,{onExit:Mk}=(jk=xk(Ik)?new class extends Fk{#e="win32"===Ik.platform?"SIGINT":"SIGHUP";#t=new Rk;#n;#r;#s;#i={};#o=!1;constructor(e){super(),this.#n=e,this.#i={};for(const t of Tk)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(!xk(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 Tk)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,Tk.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 xk(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&&xk(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)}}(Ik):new class extends Fk{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>jk.onExit(e,t),load:()=>jk.load(),unload:()=>jk.unload()});var jk;const Bk=(e,t)=>{try{dk.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,Mk(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{dk.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{dk.session.info("uninstall exit hook"),n()}catch{}}},zk=async(e,t,n)=>{if(n&&"object"==typeof n)try{await(async e=>{const{cwd:t,stanPath:n,map:r,onStage:s}=e;if(!r||"object"!=typeof r)return;const o=ac(t,n),a=d.join(o.rootAbs,"imports");await b(a);const c=Object.keys(r).sort();for(const e of c){const n=r[e]??[];if(!Array.isArray(n)||0===n.length)continue;const o=Cf(e);if(!o)continue;const c=d.join(a,o);await u(c,{recursive:!0,force:!0}).catch(()=>{}),await b(c).catch(()=>{});const l=[];for(const e of n){const n=e.trim();if(!n)continue;const r=Sf(n.replace(/\\/g,"/"));try{const e=await Ef(n,{cwd:t,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const n of e){if(!await Pf(n))continue;const e=d.relative(d.isAbsolute(r)?r:d.resolve(t,r),n).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const s=d.join(c,e);await b(d.dirname(s)).catch(()=>{});try{await i(n,s),l.push(s)}catch{}}}catch{}}try{"function"==typeof s&&s(o,l.map(e=>d.relative(t,e).replace(/\\/g,"/")))}catch{}}})({cwd:e,stanPath:t,map:n})}catch{}},Hk=async e=>{try{const t=await o(e,{withFileTypes:!0}),n=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(t.map(async t=>{n.has(t.name)||await u(h(e,t.name),{recursive:!0,force:!0})}))}catch{}},Kk=async(e,t)=>{const n=d.join(e,t,"patch");try{const e=await o(n,{withFileTypes:!0});await Promise.all(e.map(e=>u(h(n,e.name),{recursive:!0,force:!0})))}catch{}},Uk=e=>"diff"===e?"archive (diff)":"archive";var qk=Object.freeze({__proto__:null,archivePhase:async(e,n)=>{const{cwd:r,config:s,includeOutputs:o}=e,a=Boolean(n?.silent),c=n?.which??"both",l=!1!==n?.stage,f=!1!==n?.cleanup,p=((e,t)=>{const n=d.join(e,t),r=d.join(n,"system");return{base:n,system:r,output:d.join(n,"output"),diff:d.join(n,"diff"),patch:d.join(n,"patch"),systemFile:d.join(r,"stan.system.md")}})(r,s.stanPath),m="function"==typeof n?.shouldContinue?n.shouldContinue:void 0;let g,y;a||"both"!==c&&"full"!==c||console.log(`stan: start "${rw("archive")}"`);try{if(l){if(m&&!m())return{archivePath:g,diffPath:y};await zk(r,s.stanPath,s.imports)}if("both"===c||"full"===c){if(m&&!m())return{archivePath:g,diffPath:y};n?.progress?.start?.("full");const e=Date.now();if(g=await(async(e,n,r={})=>{const{includeOutputDir:s=!1,fileName:o,includes:a=[],excludes:c=[],anchors:u=[]}=r;let l=o??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:f,diffDir:p}=await be(e,n),d=await de(e),m=await ge(d,{cwd:e,stanPath:n,includeOutputDir:s,includes:a,excludes:c,anchors:u}),g=h(f,l),y=h(p,I);if(t(g))try{await i(g,y)}catch{}const b=await(async()=>{try{const e=await import("./classifier-DeYwffC_-C7wwqop3.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:v,warningsBody:D}=await b(e,m),w=v;U(D,r.onArchiveWarnings);const _=await import("./index-ucZa1KMb-DZqceYU7.js");if(s?await _.create({file:g,cwd:e,filter:H(n)},K(w,n)):await _.create({file:g,cwd:e,filter:H(n)},w),!t(y))try{await i(g,y)}catch{}return g})(r,s.stanPath,{includeOutputDir:o,includes:s.includes??[],excludes:s.excludes??[],anchors:s.anchors??[]}),n?.progress?.done?.("full",g,e,Date.now()),m&&!m()){try{await u(g,{force:!0})}catch{}return{archivePath:void 0,diffPath:y}}a||console.log(`stan: ${nw("done")} "${rw("archive")}" -> ${rw(g.replace(/\\/g,"/"))}`)}if(a||"both"!==c&&"diff"!==c||console.log(`stan: start "${rw("archive (diff)")}"`),"both"===c||"diff"===c){if(m&&!m())return{archivePath:g,diffPath:y};n?.progress?.start?.("diff");const e=Date.now();if(y=(await lc({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:s.includes??[],excludes:s.excludes??[],anchors:s.anchors??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:o})).diffPath,n?.progress?.done?.("diff",y,e,Date.now()),m&&!m()){try{await u(y,{force:!0})}catch{}return{archivePath:g,diffPath:void 0}}a||console.log(`stan: ${nw("done")} "${rw("archive (diff)")}" -> ${rw(y.replace(/\\/g,"/"))}`)}}finally{}return f&&(o&&await Hk(p.output),await Kk(r,s.stanPath)),{archivePath:g,diffPath:y}},archivePrintable:Uk,cleanupOutputsAfterCombine:Hk,cleanupPatchDirAfterArchive:Kk,stageImports:zk});const Zk=async(e,t)=>{try{const n=await a(((e,t)=>d.join(e,t,"system",".docs.meta.json"))(e,t),"utf8"),r=JSON.parse(n);if(r&&"object"==typeof r)return r}catch{}return null},Gk=async e=>{const{cwd:t,stanPath:n,promptAbs:r}=e;let s,i=!0;try{r&&(s=await(async e=>E("sha256").update(await a(e)).digest("hex"))(r))}catch{s=void 0}try{const e=await Zk(t,n),r=e?.prompt&&"object"==typeof e.prompt?e.prompt.hash:void 0;r&&s?i=r!==s:r?s||(i=!1):i=!0}catch{i=!0}return i},Wk=()=>{try{const e=(()=>{const e=(()=>{try{const e=D(import.meta.url);return we({cwd:d.dirname(e)})??null}catch{return null}})();if(!e)return null;const n=d.join(e,"dist","stan.system.md");return t(n)?n:null})();if(e&&t(e))return e}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core");let n=d.dirname(e);for(let e=0;e<10;e+=1){if("stan-core"===d.basename(n)){const e=d.join(n,"dist","stan.system.md");if(t(e))return e;break}const e=d.dirname(n);if(e===n)break;n=e}}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core/dist/stan.system.md");if(e&&t(e))return e}catch{}return null},Vk=e=>d.join(e,"system","stan.system.md"),Yk=async e=>{const t=await a(e);return Buffer.from(t)},Jk=(e,n,r)=>{const s=d.join(e,Vk(n)),i=Wk();if("local"===r){if(!t(s))throw new Error(`system prompt not found at ${d.join(n,"system","stan.system.md").replace(/\\/g,"/")}`);return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"}}if("core"===r){if(!i||!t(i))throw new Error("packaged system prompt not found in @karmaniverous/stan-core");return{abs:i,display:`@karmaniverous/stan-core@${Of}`,kind:"core"}}if("auto"===r){if(t(s))return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"};if(i&&t(i))return{abs:i,display:`@karmaniverous/stan-core@${Of}`,kind:"core"};try{const e=(()=>{try{const e=D(import.meta.url);let n=d.dirname(e);for(let e=0;e<8;e+=1){const e=d.join(n,"dist"),r=d.join(e,"stan.system.md");if(t(r))return r;const s=d.dirname(n);if(s===n)break;n=s}}catch{}return null})();if(e&&t(e))return{abs:e,display:e.replace(/\\/g,"/"),kind:"path"}}catch{}throw new Error("unable to resolve system prompt (auto: local and core unavailable)")}const o=d.isAbsolute(r)?r:d.join(e,r);if(!t(o))throw new Error(`system prompt not found at ${o.replace(/\\/g,"/")}`);return{abs:o,display:o.replace(/\\/g,"/"),kind:"path"}},Qk=async e=>{const{cwd:n,stanPath:r,promptAbs:s,promptDisplay:i}=e;try{const{restore:e}=await(async(e,n,r)=>{const s=d.join(e,Vk(n)),i=d.dirname(s),o=t(s);let a=null;if(o)try{a=await Yk(s)}catch{a=null}const l=await Yk(r.abs),f=o&&null!==a&&a.length===l.length&&a.equals(l);return f||(await p(i,{recursive:!0}),await c(s,l)),{changed:!f,restore:async()=>{if(!f)try{o&&null!==a?await c(s,a):await u(s,{force:!0})}catch{}}}})(n,r,{abs:s,display:i,kind:"path"});return e}catch(e){throw new Error(e instanceof Error?e.message:String(e))}},Xk=async e=>{const{cwd:t,stanPath:n,behavior:r,promptAbs:s,promptDisplay:i,baseFull:o,baseDiff:a,archivePhase:c,stageImports:u,preparePrompt:l,prepareIfNeeded:f,shouldContinue:p,progress:d,ephemeral:h,includeOnChange:m,importsMap:g}=e,y=[],b=Boolean(r.combine);if(h&&"function"==typeof u){if("function"==typeof p&&!p())return y;await u(t,n,g)}const v=async()=>{if("function"==typeof p&&!p())return;const e=await c({cwd:t,config:a,includeOutputs:b},{silent:!0,which:"diff",progress:d,shouldContinue:p});e.diffPath&&y.push(e.diffPath)},D=async()=>{if("function"==typeof p&&!p())return;const e=await c({cwd:t,config:o,includeOutputs:b},{silent:!0,which:"full",progress:d,shouldContinue:p});e.archivePath&&y.push(e.archivePath)};if(h){if(!s||"function"!=typeof l)return y;if(m){const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:i});try{await v(),await D()}finally{await e().catch(()=>{})}return y}await v();const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:i});try{await D()}finally{await e().catch(()=>{})}return y}const w="function"==typeof f?await f({cwd:t,stanPath:n,promptAbs:s,promptDisplay:i}):null;try{await v(),await D()}finally{await(w?.().catch(()=>{}))}return y};var eS=Object.freeze({__proto__:null,runArchiveStage:async e=>{const{cwd:t,config:n,behavior:r,ui:s,promptAbs:i,promptDisplay:o}=e,a="function"==typeof e.shouldContinue?e.shouldContinue:()=>!0,c=[];if(!a())return{created:c,cancelled:!0};const u=(()=>{const e=qk,t=e.archivePhase;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.archivePhase;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof qk)return qk;throw new Error("archivePhase not found")})(),l=(()=>{const e=qk,t=e.stageImports;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.stageImports;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof qk)return qk;throw new Error("stageImports not found")})(),f=d.join(t,n.stanPath,"system","stan.system.md"),{full:p,diff:h}=(e=>({full:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports,anchors:e.anchors??[]},diff:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports}}))(n),m=((e,t)=>({start:t=>{e.onArchiveStart(t)},done:(n,r,s,i)=>{e.onArchiveEnd(n,r,t,s,i)}}))(s,t),g=((e,t)=>{if(!t)return!1;try{return d.resolve(t)!==d.resolve(e)}catch{return!0}})(f,i);if(g){if(!a())return{created:c,cancelled:!0};let e=!0;try{e=await Gk({cwd:t,stanPath:n.stanPath,promptAbs:i})}catch{e=!0}try{const s=await Xk({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:i,promptDisplay:o,baseFull:p,baseDiff:h,archivePhase:u,stageImports:async(e,t,n)=>{try{await l(e,t,n)}catch{}},preparePrompt:({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>Qk({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}),shouldContinue:a,progress:m,ephemeral:!0,includeOnChange:e,importsMap:n.imports});return c.push(...s),{created:c,cancelled:!1}}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{s.stop()}catch{}return{created:c,cancelled:!0}}}try{if(!a())return{created:c,cancelled:!0};const e=await Xk({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:i,promptDisplay:o,baseFull:p,baseDiff:h,archivePhase:u,prepareIfNeeded:async({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>n?Qk({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}):null,shouldContinue:a,progress:m,ephemeral:!1});return c.push(...e),{created:c,cancelled:!1}}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{s.stop()}catch{}return{created:c,cancelled:!0}}}});const tS=async e=>{const t=h(e,"archive.tar"),n=h(e,"archive.diff.tar");await Promise.allSettled([u(t,{force:!0}),u(n,{force:!0})])},nS=async e=>new Promise(t=>setTimeout(t,Math.max(0,e))),rS=()=>"win32"===process.platform,sS=async e=>{const{created:n,ui:r,supervisor:s,detachSignals:i,liveEnabled:o,outAbs:a}=e,c=h(a,"archive.tar"),u=h(a,"archive.diff.tar"),l=()=>!t(c)&&!t(u),f=async()=>{await tS(a).catch(()=>{})};if(await f(),!l()){const e=rS()?10:6;for(let t=0;t<e&&(await nS(rS()?200:40),await f(),!l());t+=1);try{await nS(rS()?120:25)}catch{}}try{r.stop()}catch{}if(o)try{console.log("")}catch{}try{await s.waitAll(3e3)}catch{}(()=>{try{process.stdin.pause?.()}catch{}})();try{await nS(rS()?160:40)}catch{}try{i()}catch{}return{created:n,cancelled:!0,restartRequested:!1}};async function iS(e,t){return e.isCancelled()&&!e.isRestart()?await sS(t):e.isRestart()?(e=>{try{e.detachSignals()}catch{}return{created:e.created,cancelled:!0,restartRequested:!0}})({created:t.created,detachSignals:t.detachSignals}):null}async function oS(e){const{cancelCtl:t,deps:n,cwd:r,config:s,behavior:i,ui:o,promptAbs:a,promptDisplay:c,supervisor:l}=e,f=await async function(e,t){try{await AD()}catch{}const n=await iS(e,t);if(n)return n;try{await nS(rS()?300:30)}catch{}return iS(e,t)}(t,{created:n.created,ui:n.ui,supervisor:l,detachSignals:n.detachSignals,liveEnabled:!0,outAbs:n.outAbs});if(f)return{short:f};const p=(()=>{const e=eS,t=e.runArchiveStage,n=e.default?.runArchiveStage,r="function"==typeof t?t:"function"==typeof n?n:void 0;if(!r)throw new Error("runArchiveStage not found");return r})(),d=await p({cwd:r,config:s,behavior:i,ui:o,promptAbs:a,promptDisplay:c,shouldContinue:()=>!t.isCancelled()});if(d.cancelled)return{short:{created:n.created,cancelled:!0,restartRequested:!0}};if(t.isCancelled()&&!t.isRestart()){await Promise.all(d.created.map(e=>u(e,{force:!0}))).catch(()=>{}),await tS(n.outAbs).catch(()=>{});try{n.detachSignals()}catch{}return{short:{created:n.created,cancelled:!0,restartRequested:!1}}}return{added:d.created}}async function aS(e,t){const n=await iS(e,t);if(n)return n;const r=await async function(e,t){try{await AD()}catch{}return iS(e,t)}(e,t);if(r)return r;const s=await async function(e,t){try{await nS(rS()?25:process.env.CI?20:10),await AD()}catch{}return iS(e,t)}(e,t);return s}function cS(e){const{cwd:t,config:n,selection:r,mode:s,behavior:i,ui:o,planBody:a,printPlan:c,promptChoice:u}=e;let l="",f=null;try{const e=((e,t,n)=>{const r=(n??"auto").trim(),s=Jk(e,t,r);return{display:"auto"===r?`auto → ${s.display}`:s.display,abs:s.abs,kind:s.kind}})(t,n.stanPath,u);l=e.display,f=e.abs;try{if("1"===process.env.STAN_DEBUG){const t=e.kind||"path",n=(f||"").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: warn: proceeding without resolved system prompt (${t})`),console.log(""),l="auto (unresolved)",f=null}if(c&&a)try{((e,t)=>{const{selection:n,config:r,mode:s,behavior:i,planBody:o,ui:a,promptDisplay:c}=t;try{const e=fw(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:r,config:n,mode:s,behavior:i,planBody:a,ui:o,promptDisplay:l})}catch{}return{display:l,abs:f}}function uS(e){const{ui:t,selection:n,config:r,includeArchives:s,cancelCtl:i}=e,o=((e,t,n,r)=>{const s=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of s)try{e.onScriptQueued(t)}catch{}if(r){try{e.onArchiveQueued("full")}catch{}try{e.onArchiveQueued("diff")}catch{}}return s})(t,n,r,s);i.markQueued(o);try{const e=t.flushNow;"function"==typeof e&&e()}catch{}return o}const lS="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,fS=async e=>{const{cwd:t,config:n,selection:r,mode:s,behavior:i,liveEnabled:o,planBody:a,printPlan:u,ui:l,promptChoice:f}=e,p=function(){const e=Symbol("session-epoch");return Ek=e,e}(),d=h(t,n.stanPath,"output"),m=h(n.stanPath,"output").replace(/\\/g,"/"),g=await(async(e,t,n)=>{if(!e)return;const r=h(t,"order.txt");return n||await c(r,"","utf8"),r})(lS,d,Boolean(i.keep)),{display:y,abs:b}=cS({cwd:t,config:n,selection:r,mode:s,behavior:i,ui:l,planBody:a,printPlan:u,promptChoice:f});!function(e){e.start();try{const t=e.flushNow;"function"==typeof t&&t()}catch{}}(l);const v=new wk({hangWarn:i.hangWarn,hangKill:i.hangKill,hangKillGrace:i.hangKillGrace}),D=new _k(l,v);try{l.installCancellation(()=>{D.triggerCancel()},o?()=>{D.triggerRestart()}:void 0)}catch{}const w=Bk(()=>{D.triggerCancel()},async()=>{dk.session.exitHook();try{l.stop()}catch{}try{v.cancelAll({immediate:!0})}catch{}try{await v.waitAll(3e3)}catch{}try{const e=process.stdin.pause;"function"==typeof e&&e()}catch{}});!function(e){try{const t=e.prepareForNewSession;"function"==typeof t&&t()}catch{}}(l);const _=uS({ui:l,selection:r,config:n,includeArchives:Boolean(i.archive),cancelCtl:D}),E=[];if(_.length>0){const e=await Ok({cwd:t,outAbs:d,outRel:m,config:n,toRun:_,mode:s,orderFile:g,ui:l,epoch:p,isActive:kk,shouldContinue:()=>!D.isCancelled(),supervisor:v,liveEnabled:o,hangWarn:i.hangWarn,hangKill:i.hangKill,hangKillGrace:i.hangKillGrace});E.push(...e)}const k={created:E,ui:l,supervisor:v,detachSignals:w,liveEnabled:o,outAbs:d},S=await aS(D,k);if(S)return S;if(i.archive){const{short:e,added:r}=await oS({cancelCtl:D,deps:k,cwd:t,config:n,behavior:i,ui:l,promptAbs:b,promptDisplay:y,supervisor:v});if(e)return e;r?.length&&E.push(...r)}await(async()=>{try{const e="win32"===process.platform?140:process.env.CI?25:15;await new Promise(t=>setTimeout(t,e)),await AD()}catch{}})(),await(async e=>{try{await AD()}catch{}try{const t=e.flushNow;"function"==typeof t&&t()}catch{}})(l),dk.session.info("normal path: detach signals, returning to caller");try{w()}catch{}return{created:E,cancelled:!1,restartRequested:!1}};class pS{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),r=t&&n;if(r)try{R(e);const t=e.setRawMode;"function"==typeof t&&t(!0);const n=e.resume;"function"==typeof n&&n()}catch{}if(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{}},r){const t=e.on;"function"==typeof t&&t("keypress",this.keyHandler)}const s=e.on;"function"==typeof s&&s("data",this.dataHandler)}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off,n=e.removeListener,r="function"==typeof t?t.bind(e):"function"==typeof n?n.bind(e):null;try{r&&"function"==typeof this.keyHandler&&r("keypress",this.keyHandler),r&&"function"==typeof this.dataHandler&&r("data",this.dataHandler)}catch{}try{const t=e.setRawMode;"function"==typeof t&&t(!1);const n=e.pause;"function"==typeof n&&n()}catch{}}}class dS{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=tk(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 nk(Array.from(this.rows.values()).map(e=>({state:e.state})))}}class hS{model;constructor(e){this.model=e}unsub;subscribeModel(){this.unsub||(this.unsub=this.model.subscribe(e=>{try{this.onUpdate(e.key,e.meta,e.state)}catch{}}))}unsubscribeModel(){try{this.unsub?.()}catch{}this.unsub=void 0}}class mS extends hS{opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;stopped=!1;constructor(e,t){super(e),this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new gk({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.subscribeModel())}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;e&&"function"==typeof e.finalize&&(this.dbg("stop() finalize(full)"),e.finalize())}catch{}this.unsubscribeModel()}}flushNow(){try{this.renderer&&this.renderer.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()");const e=this.renderer;e&&"function"==typeof e.resetRows&&e.resetRows()}catch{}}resetElapsed(){try{const e=this.renderer;e&&"function"==typeof e.resetElapsed&&e.resetElapsed()}catch{}}cancelPending(){this.dbg("cancelPending()");try{const e=this.renderer;e&&"function"==typeof e.cancelPending&&e.cancelPending()}catch{}}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer&&this.renderer.update(`${t.type}:${t.item}`,n,t)}}class gS extends hS{cwd;constructor(e,t){super(e),this.cwd=t}start(){this.subscribeModel()}stop(){this.unsubscribeModel()}onUpdate(e,t,n){const r=t.item,s="archive"===t.type?Uk("diff"===r?"diff":"full"):r,i=ek({state:n,cwd:this.cwd});if("waiting"!==n.kind)if("running"!==n.kind)if("warn"!==n.kind){if("done"===n.kind||"error"===n.kind){const e="done"===n.kind,t=i.label,r=e?"":" (exit 1)",o=i.output||"";return void console.log(`stan: ${t} "${s}" -> ${o}${r}`)}}else console.log(`stan: ${i.label} "${s}" -> ${i.output}`);else console.log(`stan: ${i.label} "${s}"`);else console.log(`stan: ${i.label} "${s}"`)}}const yS=(e,t)=>{e.update(`script:${t}`,{kind:"waiting"},{type:"script",item:t})},bS=(e,t)=>{e.update(`script:${t}`,{kind:"running",startedAt:Date.now()},{type:"script",item:t})},vS=(e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:n})},DS=(e,t)=>{const n=Boolean(t?.useDurations);return{onScriptEnd:(t,r,s,i,o,a,c)=>{const u=XE(s,r);((e,t,n,r,s,i,o)=>{const a="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0,c="error"===o||"number"==typeof i&&0!==i?{kind:"error",durationMs:a,outputPath:n}:"warn"===o?{kind:"warn",durationMs:a,outputPath:n}:{kind:"done",durationMs:a,outputPath:n};e.update(`script:${t}`,c,{type:"script",item:t})})(e,t,u,n?i:void 0,n?o:void 0,n?a:void 0,c)},onArchiveEnd:(t,r,s,i,o)=>{const a=XE(s,r);((e,t,n,r,s)=>{const i="diff"===t?"diff":"full",o="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0;e.update(`archive:${i}`,{kind:"done",durationMs:o,outputPath:n},{type:"archive",item:i})})(e,t,a,n?i:void 0,n?o:void 0)}}};var wS=Object.freeze({__proto__:null,LiveUI:class{opts;renderer=null;control=null;model=new dS;sink;forwards=DS(this.model,{useDurations:!0});stopped=!1;constructor(e){this.opts=e,this.sink=new mS(this.model,{boring:Boolean(e?.boring)})}start(){dk.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){yS(this.model,e)}onScriptStart(e){bS(this.model,e)}onScriptEnd(e,t,n,r,s,i,o){this.forwards.onScriptEnd(e,t,n,r,s,i,o)}onArchiveQueued(e){((e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"waiting"},{type:"archive",item:n})})(this.model,e)}onArchiveStart(e){vS(this.model,e)}onArchiveEnd(e,t,n,r,s){this.forwards.onArchiveEnd(e,t,n,r,s)}onCancelled(e="cancel"){dk.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){dk.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{this.control=null}}else dk.ui.stop(),this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{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 pS({onCancel:e,onRestart:t}),dk.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,dk.ui.stop();try{this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}this.control=null}}},LoggerUI:class{model=new dS;sink;forwards=null;constructor(){const e=process.cwd();let t=null;const n=gS;if("function"==typeof n)try{t=new n(this.model,e)}catch{try{t=n(this.model,e)}catch{t=null}}if(!t)throw new Error("LoggerSink not available");this.sink=t,this.forwards=DS(this.model,{useDurations:!1})}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){yS(this.model,e)}onScriptStart(e){bS(this.model,e)}onScriptEnd(e,t,n,r,s,i,o){this.forwards?.onScriptEnd(e,t,n,void 0,void 0,void 0,o)}onArchiveQueued(){}onArchiveStart(e){vS(this.model,e)}onArchiveEnd(e,t,n){this.forwards?.onArchiveEnd(e,t,n,void 0,void 0)}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}});const _S=async(e,r,s=null,a="concurrent",c,l)=>{const f=c??{};await(async(e,r,s=!1)=>{const a=ac(e,r);if(await ye(e,r),!s){const e=h(a.outputAbs,F);if(t(e))try{await i(e,h(a.diffAbs,I))}catch{}const r=await o(a.outputAbs,{withFileTypes:!0});for(const e of r)n(h(a.outputAbs,e.name),{recursive:!0,force:!0})}return a.rootAbs})(e,r.stanPath,Boolean(f.keep));const p=fw(0,{selection:s,config:r,mode:a,behavior:f}),m=process.stdout,g=Boolean(m.isTTY),y=(f.live??!0)&&g,b=null==s?Object.keys(r.scripts):s,{LiveUICtor:v,LoggerUICtor:D}=(()=>{const e=wS;return{LiveUICtor:"function"==typeof e.LiveUI?e.LiveUI:"function"==typeof e.default?.LiveUI?e.default.LiveUI:void 0,LoggerUICtor:"function"==typeof e.LoggerUI?e.LoggerUI:"function"==typeof e.default?.LoggerUI?e.default.LoggerUI:void 0}})(),w=y&&"function"==typeof v?new v({boring:"1"===process.env.STAN_BORING}):"function"==typeof D?new D:{start(){},onPlan(){},onScriptQueued(){},onScriptStart(){},onScriptEnd(){},onArchiveQueued(){},onArchiveStart(){},onArchiveEnd(){},onCancelled(){},installCancellation(){},stop(){}};let _=!1;for(;;){const{created:n,cancelled:s,restartRequested:i}=await fS({cwd:e,config:r,selection:b,mode:a,behavior:f,liveEnabled:y,planBody:p,printPlan:!_&&!1!==f.plan,ui:w,promptChoice:l});if(_=!0,!i){if(s){const s=d.join(e,r.stanPath,"output"),i=d.join(s,"archive.tar"),o=d.join(s,"archive.diff.tar"),a=async e=>new Promise(t=>setTimeout(t,e)),c=()=>!t(i)&&!t(o),l=async()=>{await Promise.allSettled([u(i,{force:!0}),u(o,{force:!0})])},f=8;for(let e=0;e<f;e+=1){try{await l()}catch{}if(c())break;const e="win32"===process.platform;await a(e?200:40)}try{await new Promise(e=>setTimeout(e,"win32"===process.platform?100:25))}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}try{try{await AD()}catch{}const e=w.flushNow;if("function"==typeof e)try{e()}catch{}w.stop()}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}}};export{SD as renderAvailableScriptsHelp,_S as runSelected};
1
+ import e,{existsSync as t,rmSync as n,readFileSync as r,createWriteStream as s}from"node:fs";import{copyFile as i,readdir as o,readFile as a,writeFile as c,rm as u,stat as l,appendFile as f,mkdir as p}from"node:fs/promises";import d,{resolve as h,dirname as m,join as g,delimiter as y}from"node:path";import{ensureDir as b}from"fs-extra";import v from"node:process";import{fileURLToPath as D}from"node:url";import w from"process";import _ from"buffer";import{createHash as k}from"node:crypto";import{spawn as E}from"node:child_process";import S from"os";import A from"path";import C from"util";import P from"stream";import O from"events";import T from"fs";import x from"node:os";import $ from"node:tty";import N from"child_process";import{createRequire as L}from"node:module";import{emitKeypressEvents as R}from"node:readline";const F="archive.tar",I="archive.prev.tar",M=e=>e.replace(/\\/g,"/"),j=(e,t)=>{const n=M(e).replace(/\/+$/,""),r=M(t);return r===n||r.startsWith(`${n}/`)},B=(e,t)=>{const n=M(e);return j(`${n}/diff`,t)||j(`${n}/patch`,t)},z=j,H=e=>{const t=e.replace(/\\/g,"/");return e=>!(B(t,e)||((e,t)=>{const n=M(e);return M(t)===`${n}/output/${F}`||M(t)===`${n}/output/archive.diff.tar`||M(t)===`${n}/output/archive.warnings.txt`})(t,e))},K=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},U=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)};var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G,W,V,J,Y,Q,X,ee,te,ne,re,se,ie={exports:{}},oe=(G||(G=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)}(ie)),ie.exports),ae=Z(oe),ce={};function ue(){if(V)return W;V=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 W={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 le(){return J||(J=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:s}=ue();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}}(ce)),ce}function fe(){if(ne)return te;ne=1;const e=function(){if(Q)return Y;Q=1;const e=le(),{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}=ue(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Y=(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,T=0,x=0,$=!1,N=!1,L=!1,R=!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,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,L=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(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===o&&O===T&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){L=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),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=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,L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==T){if(!0!==D.noparen&&C===u){if(L=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===L){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,T++}else{if(k.push(O),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===T+1){T+=2;continue}x=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let G=P,W="",V="";T>0&&(W=P.slice(0,T),P=P.slice(T),x-=T),G&&!0===L&&x>0?(G=P.slice(0,x),V=P.slice(x)):!0===L?(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:T,base:G,glob:V,isBrace:$,isBracket:N,isGlob:L,isExtglob:R,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:T,r=k[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(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},Y}(),t=function(){if(ee)return X;ee=1;const e=ue(),t=le(),{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:T,START_ANCHOR:x}=b,$=e=>`(${y}(?:(?!${x}${e.dot?E:D}).)*?)`,N=p.dot?"":S,L=p.dot?P:O;let R=!0===p.bash?$(p):T;p.capture&&(R=`(${R})`),"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=R,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=R;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=$(p)),(r!==R||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?L+(i?P.repeat(i.length):""):P.repeat(r.length):"."===s?D.repeat(r.length):"*"===s?n?n+s+(i?R:""):R: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=R,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:R};!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},X=u}(),n=le(),r=ue(),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,te=s}var pe=Z(function(){if(se)return re;se=1;const e=fe(),t=le();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),re=n}());const de=async e=>{const t=[],n=["."];for(;n.length;){const r=n.pop(),s=h(e,r),i=await o(s,{withFileTypes:!0});for(const e of i){const s="."===r?e.name:g(r,e.name);e.isDirectory()?n.push(s):t.push(s.replace(/\\/g,"/"))}}return t},he=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},me=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>he(e,t):()=>!1;var n;const r=pe(t,{dot:!0});return e=>r(e)},ge=async(e,{cwd:n,stanPath:r,includeOutputDir:s,includes:i=[],excludes:o=[],anchors:c=[]})=>{const u=r.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)})(e,u),f=await(async e=>{const n=h(e,".gitignore");if(!t(n))return null;try{const e=await a(n,"utf8"),t=ae();return t.add(e),t}catch{return null}})(n),p=[e=>he(e,"node_modules"),e=>he(e,".git"),...f?[e=>f.ignores(e)]:[],...o.map(me),...l.map(e=>t=>he(t,e)),e=>B(u,e)];s||p.push(e=>z(`${u}/output`,e));const d=e.filter(e=>!p.some(t=>t(e)));if(i.length>0){const t=i.map(me),n=[e=>B(u,e),...s?[]:[e=>z(`${u}/output`,e)]],r=new Set(d);for(const n of e)t.some(e=>e(n))&&r.add(n);const a=o.map(me),l=new Set(e.filter(e=>r.has(e)&&!n.some(t=>t(e))&&!a.some(t=>t(e))));if(c.length>0){const t=c.map(me);for(const n of e)!(B(u,n)||!s&&z(`${u}/output`,n))&&t.some(e=>e(n))&&l.add(n)}return e.filter(e=>l.has(e))}if(c.length>0){const t=c.map(me),n=new Set(d);for(const r of e)!(B(u,r)||!s&&z(`${u}/output`,r))&&t.some(e=>e(r))&&n.add(r);return e.filter(e=>n.has(e))}return d},ye=async(e,t)=>{const n=(await(async()=>{try{const e=await Promise.resolve().then(function(){return uc}),t=e.makeStanDirs,n=e.default?.makeStanDirs,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("makeStanDirs export not found in ./paths")})())(e,t);return await b(n.rootAbs),await b(n.outputAbs),await b(n.diffAbs),await b(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}},be=async(e,t)=>{const n=await ye(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}},ve="code -g {file}",De=e=>e instanceof URL?D(e):e;function we({cwd:t}={}){const n=function(t,{cwd:n=v.cwd(),type:r="file",stopAt:s}={}){let i=d.resolve(De(n)??"");const{root:o}=d.parse(i);s=d.resolve(i,De(s)??o);const a=d.isAbsolute(t);for(;i;){const n=a?t:d.join(i,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===r&&t?.isFile()||"directory"===r&&t?.isDirectory())return n}catch{}if(i===s||i===o)break;i=d.dirname(i)}}("package.json",{cwd:t});return n&&d.dirname(n)}const _e=["stan.config.yml","stan.config.yaml","stan.config.json"],ke=e=>{for(const n of _e){const r=h(e,n);if(t(r))return r}return null},Ee=e=>{const t=ke(e);if(t)return t;const n=new Set;let r=e;for(;r;){const e=we({cwd:r});if(!e||n.has(e))break;n.add(e);const t=ke(e);if(t)return t;const s=m(e);if(s===e||n.has(s))break;r=s}return null};var Se,Ae={},Ce={},Pe={},Oe={};function Te(){if(Se)return Oe;Se=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 Oe.ALIAS=e,Oe.DOC=t,Oe.MAP=n,Oe.NODE_TYPE=o,Oe.PAIR=r,Oe.SCALAR=s,Oe.SEQ=i,Oe.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Oe.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,Oe.isCollection=c,Oe.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,Oe.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,Oe.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},Oe.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,Oe.isScalar=a,Oe.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,Oe}var xe,$e,Ne={};function Le(){if(xe)return Ne;xe=1;var e=Te();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,Ne.visit=s,Ne.visitAsync=o,Ne}function Re(){if($e)return Pe;$e=1;var e=Te(),t=Le();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:"},Pe.Directives=s,Pe}var Fe,Ie={},Me={},je={};function Be(){if(Fe)return je;Fe=1;var e=Te(),t=Le();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 je.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},je.anchorNames=n,je.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}},je.findNewAnchor=r,je}var ze,He={},Ke={};function Ue(){return ze||(ze=1,Ke.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)}),Ke}var qe,Ze,Ge,We={};function Ve(){if(qe)return We;qe=1;var e=Te();return We.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)},We}function Je(){if(Ze)return He;Ze=1;var e=Ue(),t=Te(),n=Ve();return He.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}},He}function Ye(){if(Ge)return Me;Ge=1;var e=Be(),t=Le(),n=Te(),r=Je(),s=Ve();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 Me.Alias=i,Me}var Qe,Xe,et,tt={},nt={},rt={};function st(){if(Qe)return rt;Qe=1;var e=Te(),t=Je(),n=Ve();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",rt.Scalar=r,rt.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,rt}function it(){if(Xe)return nt;Xe=1;var e=Ye(),t=Te(),n=st();return nt.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},nt}function ot(){if(et)return tt;et=1;var e=it(),t=Te(),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 tt.Collection=i,tt.collectionFromPath=r,tt.isEmptyPath=s,tt}var at,ct={},ut={},lt={},ft={};function pt(){if(at)return ft;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return at=1,ft.indentComment=e,ft.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,ft.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),ft}var dt,ht,mt,gt,yt={},bt={};function vt(){if(ht)return yt;ht=1;var e=st(),t=function(){if(dt)return bt;dt=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 bt.FOLD_BLOCK=e,bt.FOLD_FLOW="flow",bt.FOLD_QUOTED=t,bt.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},bt}();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 yt.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},yt}function Dt(){if(mt)return lt;mt=1;var e=Be(),t=Te(),n=pt(),r=vt();return lt.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}},lt.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},lt}var wt,_t={},kt={};function Et(){if(wt)return kt;wt=1;var e=w;return kt.debug=function(e,...t){"debug"===e&&console.log(...t)},kt.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},kt}var St,At,Ct,Pt={};function Ot(){if(St)return Pt;St=1;var e=Te(),t=st();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 Pt.addMergeToJSMap=s,Pt.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),Pt.merge=r,Pt}function Tt(){if(At)return _t;At=1;var e=Et(),t=Ot(),n=Dt(),r=Te(),s=Ve();return _t.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},_t}function xt(){if(Ct)return ct;Ct=1;var e=it(),t=function(){if(gt)return ut;gt=1;var e=Te(),t=st(),n=Dt(),r=pt();return ut.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},ut}(),n=Tt(),r=Te();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 ct.Pair=s,ct.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)},ct}var $t,Nt,Lt,Rt={},Ft={},It={},Mt={};function jt(){if($t)return Mt;$t=1;var e=Te(),t=Dt(),n=pt();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 Mt.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Mt}function Bt(){if(Nt)return It;Nt=1;var e=jt(),t=Tt(),n=ot(),r=Te(),s=xt(),i=st();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 It.YAMLMap=a,It.findPair=o,It}function zt(){if(Lt)return Ft;Lt=1;var e=Te(),t=Bt();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 Ft.map=n,Ft}var Ht,Kt,Ut={},qt={};function Zt(){if(Ht)return qt;Ht=1;var e=it(),t=jt(),n=ot(),r=Te(),s=st(),i=Ve();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 qt.YAMLSeq=o,qt}function Gt(){if(Kt)return Ut;Kt=1;var e=Te(),t=Zt();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 Ut.seq=n,Ut}var Wt,Vt={};function Jt(){if(Wt)return Vt;Wt=1;var e=vt();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 Vt.string=t,Vt}var Yt,Qt={},Xt={};function en(){if(Yt)return Xt;Yt=1;var e=st();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 Xt.nullTag=t,Xt}var tn,nn={};function rn(){if(tn)return nn;tn=1;var e=st();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 nn.boolTag=t,nn}var sn,on,an={},cn={};function un(){return sn||(sn=1,cn.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}),cn}function ln(){if(on)return an;on=1;var e=st(),t=un();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 an.float=s,an.floatExp=r,an.floatNaN=n,an}var fn,pn={};function dn(){if(fn)return pn;fn=1;var e=un();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 pn.int=i,pn.intHex=o,pn.intOct=s,pn}var hn,mn={};var gn,yn={};var bn,vn={};function Dn(){if(bn)return vn;bn=1;var e=_,t=st(),n=vt();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 vn.binary=r,vn}var wn,_n,kn={},En={};function Sn(){if(wn)return En;wn=1;var e=Te(),t=xt(),n=st(),r=Zt();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 En.createPairs=i,En.pairs=o,En.resolvePairs=s,En}function An(){if(_n)return kn;_n=1;var e=Te(),t=Ve(),n=Bt(),r=Zt(),s=Sn();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 kn.YAMLOMap=i,kn.omap=o,kn}var Cn,Pn={},On={};var Tn,xn={};var $n,Nn={};var Ln,Rn={};function Fn(){if(Ln)return Rn;Ln=1;var e=Te(),t=xt(),n=Bt();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 Rn.YAMLSet=r,Rn.set=s,Rn}var In,Mn,jn,Bn,zn={};function Hn(){if(In)return zn;In=1;var e=un();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 zn.floatTime=s,zn.intTime=r,zn.timestamp=i,zn}function Kn(){if(Mn)return Pn;Mn=1;var e=zt(),t=en(),n=Gt(),r=Jt(),s=Dn(),i=function(){if(Cn)return On;Cn=1;var e=st();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 On.falseTag=r,On.trueTag=n,On}(),o=function(){if(Tn)return xn;Tn=1;var e=st(),t=un();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 xn.float=s,xn.floatExp=r,xn.floatNaN=n,xn}(),a=function(){if($n)return Nn;$n=1;var e=un();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 Nn.int=o,Nn.intBin=s,Nn.intHex=a,Nn.intOct=i,Nn}(),c=Ot(),u=An(),l=Sn(),f=Fn(),p=Hn();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 Pn.schema=d,Pn}function Un(){if(jn)return Qt;jn=1;var e=zt(),t=en(),n=Gt(),r=Jt(),s=rn(),i=ln(),o=dn(),a=function(){if(hn)return mn;hn=1;var e=zt(),t=en(),n=Gt(),r=Jt(),s=rn(),i=ln(),o=dn();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 mn.schema=a,mn}(),c=function(){if(gn)return yn;gn=1;var e=st(),t=zt(),n=Gt();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 yn.schema=a,yn}(),u=Dn(),l=Ot(),f=An(),p=Sn(),d=Kn(),h=Fn(),m=Hn();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 Qt.coreKnownTags=b,Qt.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},[])},Qt}function qn(){if(Bn)return Rt;Bn=1;var e=Te(),t=zt(),n=Gt(),r=Jt(),s=Un();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Rt.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}},Rt}var Zn,Gn,Wn={};function Vn(){if(Gn)return Ie;Gn=1;var e=Ye(),t=ot(),n=Te(),r=xt(),s=Ve(),i=qn(),o=function(){if(Zn)return Wn;Zn=1;var e=Te(),t=Dt(),n=pt();return Wn.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"},Wn}(),a=Be(),c=Ue(),u=it(),l=Re();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ie.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)}},Ie}var Jn,Yn={};function Qn(){if(Jn)return Yn;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 Yn.YAMLError=e,Yn.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Yn.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Yn.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`}},Yn}var Xn,er={},tr={},nr={},rr={},sr={};function ir(){return Xn||(Xn=1,sr.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}}),sr}var or,ar={};function cr(){return or||(or=1,ar.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}}),ar}var ur,lr={};function fr(){if(ur)return lr;ur=1;var e=cr();return lr.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)}},lr}var pr,dr,hr={};function mr(){if(pr)return hr;pr=1;var e=Te();return hr.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))},hr}var gr,yr={};var br,vr,Dr,wr={},_r={};function kr(){return br||(br=1,_r.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}}),_r}function Er(){if(Dr)return nr;Dr=1;var e=Te(),t=st(),n=Bt(),r=Zt(),s=function(){if(dr)return rr;dr=1;var e=xt(),t=Bt(),n=ir(),r=cr(),s=fr(),i=mr();const o="All mapping items must start at the same column";return rr.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},rr}(),i=function(){if(gr)return yr;gr=1;var e=Zt(),t=ir(),n=fr();return yr.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},yr}(),o=function(){if(vr)return wr;vr=1;var e=Te(),t=xt(),n=Bt(),r=Zt(),s=kr(),i=ir(),o=cr(),a=mr();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return wr.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},wr}();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 nr.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},nr}var Sr,Ar={},Cr={};function Pr(){if(Sr)return Cr;Sr=1;var e=st();return Cr.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]}},Cr}var Or,Tr,xr={};function $r(){if(Or)return xr;Or=1;var e=st(),t=kr();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 xr.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]}},xr}var Nr,Lr,Rr,Fr,Ir={};function Mr(){if(Lr)return tr;Lr=1;var e=Ye(),t=Te(),n=Er(),r=function(){if(Tr)return Ar;Tr=1;var e=Te(),t=st(),n=Pr(),r=$r();return Ar.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},Ar}(),s=kr(),i=(Nr||(Nr=1,Ir.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}),Ir);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 tr.composeEmptyNode=c,tr.composeNode=a,tr}function jr(){if(Fr)return Ce;Fr=1;var e=w,t=Re(),n=Vn(),r=Qn(),s=Te(),i=function(){if(Rr)return er;Rr=1;var e=Vn(),t=Mr(),n=kr(),r=ir();return er.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},er}(),o=kr();function a(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 c(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 Ce.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=a(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}=c(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:c(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=a(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(a(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(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=o.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(a(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}}},Ce}var Br,zr={},Hr={};var Kr,Ur={};var qr,Zr,Gr={};function Wr(){if(Zr)return zr;Zr=1;var e=function(){if(Br)return Hr;Br=1;var e=Pr(),t=$r(),n=Qn(),r=vt();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 Hr.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}}},Hr.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},Hr.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")}},Hr}(),t=function(){if(Kr)return Ur;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 Kr=1,Ur.stringify=n=>"type"in n?e(n):t(n),Ur}(),n=function(){if(qr)return Gr;qr=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")},Gr.visit=r,Gr}();return zr.createScalarToken=e.createScalarToken,zr.resolveAsScalar=e.resolveAsScalar,zr.setScalarValue=e.setScalarValue,zr.stringify=t.stringify,zr.visit=n.visit,zr.BOM="\ufeff",zr.DOCUMENT="",zr.FLOW_END="",zr.SCALAR="",zr.isCollection=e=>!!e&&"items"in e,zr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),zr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},zr.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},zr}var Vr,Jr={};function Yr(){if(Vr)return Jr;Vr=1;var e=Wr();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 Qr,Xr={};function es(){return Qr||(Qr=1,Xr.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}}}}),Xr}var ts,ns={};function rs(){if(ts)return ns;ts=1;var e=w,t=Wr(),n=Yr();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 o(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 a(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 c(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 ns.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&&c(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=a(o(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=a(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=a(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=a(o(t));c(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=a(o(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=a(o(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())}}},ns}var ss,is,os={};var as=function(){if(is)return Ae;is=1;var e=jr(),t=Vn(),n=qn(),r=Qn(),s=Ye(),i=Te(),o=xt(),a=st(),c=Bt(),u=Zt(),l=Wr(),f=Yr(),p=es(),d=rs(),h=function(){if(ss)return os;ss=1;var e=jr(),t=Vn(),n=Qn(),r=Et(),s=Te(),i=es(),o=rs();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 os.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))},os.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())},os.parseDocument=c,os.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)},os}(),m=Le();return Ae.Composer=e.Composer,Ae.Document=t.Document,Ae.Schema=n.Schema,Ae.YAMLError=r.YAMLError,Ae.YAMLParseError=r.YAMLParseError,Ae.YAMLWarning=r.YAMLWarning,Ae.Alias=s.Alias,Ae.isAlias=i.isAlias,Ae.isCollection=i.isCollection,Ae.isDocument=i.isDocument,Ae.isMap=i.isMap,Ae.isNode=i.isNode,Ae.isPair=i.isPair,Ae.isScalar=i.isScalar,Ae.isSeq=i.isSeq,Ae.Pair=o.Pair,Ae.Scalar=a.Scalar,Ae.YAMLMap=c.YAMLMap,Ae.YAMLSeq=u.YAMLSeq,Ae.CST=l,Ae.Lexer=f.Lexer,Ae.LineCounter=p.LineCounter,Ae.Parser=d.Parser,Ae.parse=h.parse,Ae.parseAllDocuments=h.parseAllDocuments,Ae.parseDocument=h.parseDocument,Ae.stringify=h.stringify,Ae.visit=m.visit,Ae.visitAsync=m.visitAsync,Ae}();function cs(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}Z(as);class us extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ls extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const fs={};function ps(e){return fs}function ds(e,t){return"bigint"==typeof t?t.toString():t}function hs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ms(e){return null==e}function gs(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const ys=Symbol("evaluating");function bs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ys)return void 0===r&&(r=ys,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function vs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ds(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ws(e){return JSON.stringify(e)}const _s="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ks(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Es=hs(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Ss(e){if(!1===ks(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==ks(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function As(e){return Ss(e)?{...e}:Array.isArray(e)?[...e]:e}const Cs=new Set(["string","number","symbol"]);function Ps(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Os(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Ts(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 xs(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 $s(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ns(e){return"string"==typeof e?e:e?.message}function Ls(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=Ns(e.inst?._zod.def?.error?.(e))??Ns(t?.error?.(e))??Ns(n.customError?.(e))??Ns(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Rs(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Fs(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Is=(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,ds,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ms=cs("$ZodError",Is),js=cs("$ZodError",Is,{Parent:Error}),Bs=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 us;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>Ls(e,i,ps())));throw _s(t,s?.callee),t}return o.value},zs=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=>Ls(e,i,ps())));throw _s(t,s?.callee),t}return o.value},Hs=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 us;return i.issues.length?{success:!1,error:new(e??Ms)(i.issues.map(e=>Ls(e,s,ps())))}:{success:!0,data:i.value}},Ks=Hs(js),Us=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=>Ls(e,s,ps())))}:{success:!0,data:i.value}},qs=Us(js),Zs=/^[cC][^\s-]{8,}$/,Gs=/^[0-9a-z]+$/,Ws=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vs=/^[0-9a-vA-V]{20}$/,Js=/^[A-Za-z0-9]{27}$/,Ys=/^[a-zA-Z0-9_-]{21}$/,Qs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xs=/^([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})$/,ei=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)$/,ti=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ni=/^(?:(?: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])$/,ri=/^(([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}|:))$/,si=/^((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])$/,ii=/^(([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])$/,oi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ai=/^[A-Za-z0-9_-]*$/,ci=/^(?=.{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])?)*\.?$/,ui=/^\+(?:[0-9]){6,14}[0-9]$/,li="(?:(?:\\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])))",fi=new RegExp(`^${li}$`);function pi(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 di=/^[^A-Z]*$/,hi=/^[^a-z]*$/,mi=cs("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gi=cs("$ZodCheckMaxLength",(e,t)=>{var n;mi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(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=Rs(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yi=cs("$ZodCheckMinLength",(e,t)=>{var n;mi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(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=Rs(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bi=cs("$ZodCheckLengthEquals",(e,t)=>{var n;mi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(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=Rs(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})}}),vi=cs("$ZodCheckStringFormat",(e,t)=>{var n,r;mi.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=()=>{})}),Di=cs("$ZodCheckRegex",(e,t)=>{vi.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})}}),wi=cs("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=di),vi.init(e,t)}),_i=cs("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=hi),vi.init(e,t)}),ki=cs("$ZodCheckIncludes",(e,t)=>{mi.init(e,t);const n=Ps(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})}}),Ei=cs("$ZodCheckStartsWith",(e,t)=>{mi.init(e,t);const n=new RegExp(`^${Ps(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})}}),Si=cs("$ZodCheckEndsWith",(e,t)=>{mi.init(e,t);const n=new RegExp(`.*${Ps(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})}}),Ai=cs("$ZodCheckOverwrite",(e,t)=>{mi.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Ci{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 Pi={major:4,minor:1,patch:12},Oi=cs("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pi;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=xs(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 us;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(s||(s=xs(e,t)))});else{if(e.issues.length===t)continue;s||(s=xs(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(xs(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new us;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 us;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=Ks(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return qs(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),Ti=cs("$ZodString",(e,t)=>{var n;Oi.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}}),xi=cs("$ZodStringFormat",(e,t)=>{vi.init(e,t),Ti.init(e,t)}),$i=cs("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xs),xi.init(e,t)}),Ni=cs("$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=ei(e))}else t.pattern??(t.pattern=ei());xi.init(e,t)}),Li=cs("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ti),xi.init(e,t)}),Ri=cs("$ZodURL",(e,t)=>{xi.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:ci.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})}}}),Fi=cs("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),xi.init(e,t)}),Ii=cs("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ys),xi.init(e,t)}),Mi=cs("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zs),xi.init(e,t)}),ji=cs("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gs),xi.init(e,t)}),Bi=cs("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ws),xi.init(e,t)}),zi=cs("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Vs),xi.init(e,t)}),Hi=cs("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Js),xi.init(e,t)}),Ki=cs("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=pi({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(`^${li}T(?:${r})$`)}(t)),xi.init(e,t)}),Ui=cs("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fi),xi.init(e,t)}),qi=cs("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${pi(t)}$`)),xi.init(e,t)}),Zi=cs("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Qs),xi.init(e,t)}),Gi=cs("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ni),xi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Wi=cs("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ri),xi.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})}}}),Vi=cs("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=si),xi.init(e,t)}),Ji=cs("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ii),xi.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 Yi(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Qi=cs("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=oi),xi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Yi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Xi=cs("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ai),xi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!ai.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Yi(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})}}),eo=cs("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ui),xi.init(e,t)}),to=cs("$ZodJWT",(e,t)=>{xi.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})}}),no=cs("$ZodUnknown",(e,t)=>{Oi.init(e,t),e._zod.parse=e=>e}),ro=cs("$ZodNever",(e,t)=>{Oi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function so(e,t,n){e.issues.length&&t.issues.push(...$s(n,e.issues)),t.value[n]=e.value}const io=cs("$ZodArray",(e,t)=>{Oi.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=>so(t,n,e))):so(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function oo(e,t,n,r){e.issues.length&&t.issues.push(...$s(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ao(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 co(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=>oo(e,n,s,t))):oo(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 uo=cs("$ZodObject",(e,t)=>{Oi.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=hs(()=>ao(t));bs(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=ks,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=>oo(n,t,e,a))):oo(r,t,e,a)}return i?co(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),lo=cs("$ZodObjectJIT",(e,t)=>{uo.init(e,t);const n=e._zod.parse,r=hs(()=>ao(t));let s;const i=ks,o=!fs.jitless,a=o&&Es.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 Ci(["shape","payload","ctx"]),n=r.value,s=e=>{const t=ws(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=ws(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?co([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function fo(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=>!xs(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=>Ls(e,r,ps())))}),t)}const po=cs("$ZodUnion",(e,t)=>{Oi.init(e,t),bs(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),bs(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),bs(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),bs(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=>gs(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=>fo(t,s,e,i)):fo(a,s,e,i)}}),ho=cs("$ZodIntersection",(e,t)=>{Oi.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])=>go(e,t,n)):go(e,s,i)}});function mo(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(Ss(e)&&Ss(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=mo(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=mo(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 go(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),xs(e))return e;const r=mo(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 yo=cs("$ZodRecord",(e,t)=>{Oi.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Ss(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(...$s(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...$s(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=>Ls(e,r,ps())),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(...$s(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...$s(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),bo=cs("$ZodEnum",(e,t)=>{Oi.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=>Cs.has(typeof e)).map(e=>"string"==typeof e?Ps(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}}),vo=cs("$ZodTransform",(e,t)=>{Oi.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(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 us;return n.value=s,n}});function Do(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const wo=cs("$ZodOptional",(e,t)=>{Oi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",bs(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),bs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${gs(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=>Do(t,e.value)):Do(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),_o=cs("$ZodNullable",(e,t)=>{Oi.init(e,t),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),bs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${gs(e.source)}|null)$`):void 0}),bs(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)}),ko=cs("$ZodDefault",(e,t)=>{Oi.init(e,t),e._zod.optin="optional",bs(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=>Eo(e,t)):Eo(r,t)}});function Eo(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const So=cs("$ZodPrefault",(e,t)=>{Oi.init(e,t),e._zod.optin="optional",bs(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))}),Ao=cs("$ZodNonOptional",(e,t)=>{Oi.init(e,t),bs(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=>Co(t,e)):Co(s,e)}});function Co(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 Po=cs("$ZodCatch",(e,t)=>{Oi.init(e,t),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),bs(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=>Ls(e,n,ps()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ls(e,n,ps()))},input:e.value}),e.issues=[]),e)}}),Oo=cs("$ZodPipe",(e,t)=>{Oi.init(e,t),bs(e._zod,"values",()=>t.in._zod.values),bs(e._zod,"optin",()=>t.in._zod.optin),bs(e._zod,"optout",()=>t.out._zod.optout),bs(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=>To(e,t.in,n)):To(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>To(e,t.out,n)):To(r,t.out,n)}});function To(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const xo=cs("$ZodReadonly",(e,t)=>{Oi.init(e,t),bs(e._zod,"propValues",()=>t.innerType._zod.propValues),bs(e._zod,"values",()=>t.innerType._zod.values),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(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($o):$o(r)}});function $o(e){return e.value=Object.freeze(e.value),e}const No=cs("$ZodCustom",(e,t)=>{mi.init(e,t),Oi.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=>Lo(t,n,r,e));Lo(s,n,r,e)}});function Lo(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(Fs(e))}}class Ro{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 Fo=new Ro;function Io(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ts(t)})}function Mo(e,t){return new gi({check:"max_length",...Ts(t),maximum:e})}function jo(e,t){return new yi({check:"min_length",...Ts(t),minimum:e})}function Bo(e,t){return new bi({check:"length_equals",...Ts(t),length:e})}function zo(e){return new Ai({check:"overwrite",tx:e})}const Ho=cs("ZodISODateTime",(e,t)=>{Ki.init(e,t),fa.init(e,t)});const Ko=cs("ZodISODate",(e,t)=>{Ui.init(e,t),fa.init(e,t)});const Uo=cs("ZodISOTime",(e,t)=>{qi.init(e,t),fa.init(e,t)});const qo=cs("ZodISODuration",(e,t)=>{Zi.init(e,t),fa.init(e,t)});const Zo=(e,t)=>{Ms.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,ds,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ds,2)}},isEmpty:{get:()=>0===e.issues.length}})};cs("ZodError",Zo);const Go=cs("ZodError",Zo,{Parent:Error}),Wo=Bs(Go),Vo=zs(Go),Jo=Hs(Go),Yo=Us(Go),Qo=(ua=Go,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Bs(ua)(e,t,r)}),Xo=(e=>(t,n,r)=>Bs(e)(t,n,r))(Go),ea=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zs(e)(t,n,s)})(Go),ta=(e=>async(t,n,r)=>zs(e)(t,n,r))(Go),na=(e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hs(e)(t,n,s)})(Go),ra=(e=>(t,n,r)=>Hs(e)(t,n,r))(Go),sa=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Us(e)(t,n,s)})(Go),ia=(e=>async(t,n,r)=>Us(e)(t,n,r))(Go),oa=cs("ZodType",(e,t)=>(Oi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ds(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Os(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Wo(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Jo(e,t,n),e.parseAsync=async(t,n)=>Vo(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Yo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Qo(e,t,n),e.decode=(t,n)=>Xo(e,t,n),e.encodeAsync=async(t,n)=>ea(e,t,n),e.decodeAsync=async(t,n)=>ta(e,t,n),e.safeEncode=(t,n)=>na(e,t,n),e.safeDecode=(t,n)=>ra(e,t,n),e.safeEncodeAsync=async(t,n)=>sa(e,t,n),e.safeDecodeAsync=async(t,n)=>ia(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new tc({type:"custom",check:"custom",fn:t,...Ts(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new mi({check:"custom",...Ts(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Fs(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(Fs(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(zo(t)),e.optional=()=>qa(e),e.nullable=()=>Ga(e),e.nullish=()=>qa(Ga(e)),e.nonoptional=t=>function(e,t){return new Ja({type:"nonoptional",innerType:e,...Ts(t)})}(e,t),e.array=()=>Fa(e),e.or=t=>ja([e,t]),e.and=t=>new Ba({type:"intersection",left:e,right:t}),e.transform=t=>Xa(e,new Ka({type:"transform",transform:t})),e.default=t=>{return n=t,new Wa({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():As(n)}});var n},e.prefault=t=>{return n=t,new Va({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():As(n)}});var n},e.catch=t=>{return new Ya({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Xa(e,t),e.readonly=()=>new ec({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Fo.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Fo.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Fo.get(e);const n=e.clone();return Fo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),aa=cs("_ZodString",(e,t)=>{Ti.init(e,t),oa.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 Di({check:"string_format",format:"regex",...Ts(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new ki({check:"string_format",format:"includes",...Ts(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Ei({check:"string_format",format:"starts_with",...Ts(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Si({check:"string_format",format:"ends_with",...Ts(t),suffix:e})}(...t)),e.min=(...t)=>e.check(jo(...t)),e.max=(...t)=>e.check(Mo(...t)),e.length=(...t)=>e.check(Bo(...t)),e.nonempty=(...t)=>e.check(jo(1,...t)),e.lowercase=t=>e.check(function(e){return new wi({check:"string_format",format:"lowercase",...Ts(e)})}(t)),e.uppercase=t=>e.check(function(e){return new _i({check:"string_format",format:"uppercase",...Ts(e)})}(t)),e.trim=()=>e.check(zo(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return zo(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(zo(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(zo(e=>e.toUpperCase()))}),ca=cs("ZodString",(e,t)=>{Ti.init(e,t),aa.init(e,t),e.email=t=>e.check(function(e,t){return new pa({type:"string",format:"email",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new ma({type:"string",format:"url",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new Ta({type:"string",format:"jwt",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ga({type:"string",format:"emoji",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.guid=t=>e.check(Io(da,t)),e.uuid=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ts(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ts(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ts(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new ya({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.guid=t=>e.check(Io(da,t)),e.cuid=t=>e.check(function(e,t){return new ba({type:"string",format:"cuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new va({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Da({type:"string",format:"ulid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new Ca({type:"string",format:"base64",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new Pa({type:"string",format:"base64url",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new wa({type:"string",format:"xid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new _a({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new ka({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new Ea({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new Sa({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Aa({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Oa({type:"string",format:"e164",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new Ho({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ts(e)})}(t)),e.date=t=>e.check(function(e){return new Ko({type:"string",format:"date",check:"string_format",...Ts(e)})}(t)),e.time=t=>e.check(function(e){return new Uo({type:"string",format:"time",check:"string_format",precision:null,...Ts(e)})}(t)),e.duration=t=>e.check(function(e){return new qo({type:"string",format:"duration",check:"string_format",...Ts(e)})}(t))});var ua;function la(e){return new ca({type:"string",...Ts(e)})}const fa=cs("ZodStringFormat",(e,t)=>{xi.init(e,t),aa.init(e,t)}),pa=cs("ZodEmail",(e,t)=>{Li.init(e,t),fa.init(e,t)}),da=cs("ZodGUID",(e,t)=>{$i.init(e,t),fa.init(e,t)}),ha=cs("ZodUUID",(e,t)=>{Ni.init(e,t),fa.init(e,t)}),ma=cs("ZodURL",(e,t)=>{Ri.init(e,t),fa.init(e,t)}),ga=cs("ZodEmoji",(e,t)=>{Fi.init(e,t),fa.init(e,t)}),ya=cs("ZodNanoID",(e,t)=>{Ii.init(e,t),fa.init(e,t)}),ba=cs("ZodCUID",(e,t)=>{Mi.init(e,t),fa.init(e,t)}),va=cs("ZodCUID2",(e,t)=>{ji.init(e,t),fa.init(e,t)}),Da=cs("ZodULID",(e,t)=>{Bi.init(e,t),fa.init(e,t)}),wa=cs("ZodXID",(e,t)=>{zi.init(e,t),fa.init(e,t)}),_a=cs("ZodKSUID",(e,t)=>{Hi.init(e,t),fa.init(e,t)}),ka=cs("ZodIPv4",(e,t)=>{Gi.init(e,t),fa.init(e,t)}),Ea=cs("ZodIPv6",(e,t)=>{Wi.init(e,t),fa.init(e,t)}),Sa=cs("ZodCIDRv4",(e,t)=>{Vi.init(e,t),fa.init(e,t)}),Aa=cs("ZodCIDRv6",(e,t)=>{Ji.init(e,t),fa.init(e,t)}),Ca=cs("ZodBase64",(e,t)=>{Qi.init(e,t),fa.init(e,t)}),Pa=cs("ZodBase64URL",(e,t)=>{Xi.init(e,t),fa.init(e,t)}),Oa=cs("ZodE164",(e,t)=>{eo.init(e,t),fa.init(e,t)}),Ta=cs("ZodJWT",(e,t)=>{to.init(e,t),fa.init(e,t)}),xa=cs("ZodUnknown",(e,t)=>{no.init(e,t),oa.init(e,t)});function $a(){return new xa({type:"unknown"})}const Na=cs("ZodNever",(e,t)=>{ro.init(e,t),oa.init(e,t)});function La(e){return new Na({type:"never",...Ts(e)})}const Ra=cs("ZodArray",(e,t)=>{io.init(e,t),oa.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(jo(t,n)),e.nonempty=t=>e.check(jo(1,t)),e.max=(t,n)=>e.check(Mo(t,n)),e.length=(t,n)=>e.check(Bo(t,n)),e.unwrap=()=>e.element});function Fa(e,t){return function(e,t,n){return new Ra({type:"array",element:t,...Ts(n)})}(0,e,t)}const Ia=cs("ZodObject",(e,t)=>{lo.init(e,t),oa.init(e,t),bs(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ha({type:"enum",entries:t,...Ts(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:$a()}),e.loose=()=>e.clone({...e._zod.def,catchall:$a()}),e.strict=()=>e.clone({...e._zod.def,catchall:La()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Ss(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=Ds(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return vs(this,"shape",n),n},checks:[]});return Os(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Ss(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 vs(this,"shape",n),n},checks:e._zod.def.checks};return Os(e,n)}(e,t),e.merge=t=>function(e,t){const n=Ds(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return vs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Os(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Os(e,Ds(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 vs(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Ds(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 vs(this,"shape",r),r},checks:[]});return Os(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Ds(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 vs(this,"shape",s),s},checks:[]});return Os(t,r)}(Ua,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Ds(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 vs(this,"shape",s),s},checks:[]});return Os(t,r)}(Ja,e,t[0])}),Ma=cs("ZodUnion",(e,t)=>{po.init(e,t),oa.init(e,t),e.options=t.options});function ja(e,t){return new Ma({type:"union",options:e,...Ts(t)})}const Ba=cs("ZodIntersection",(e,t)=>{ho.init(e,t),oa.init(e,t)}),za=cs("ZodRecord",(e,t)=>{yo.init(e,t),oa.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),Ha=cs("ZodEnum",(e,t)=>{bo.init(e,t),oa.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 Ha({...t,checks:[],...Ts(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 Ha({...t,checks:[],...Ts(r),entries:s})}}),Ka=cs("ZodTransform",(e,t)=>{vo.init(e,t),oa.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Fs(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(Fs(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}}),Ua=cs("ZodOptional",(e,t)=>{wo.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new Ua({type:"optional",innerType:e})}const Za=cs("ZodNullable",(e,t)=>{_o.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Za({type:"nullable",innerType:e})}const Wa=cs("ZodDefault",(e,t)=>{ko.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Va=cs("ZodPrefault",(e,t)=>{So.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ja=cs("ZodNonOptional",(e,t)=>{Ao.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ya=cs("ZodCatch",(e,t)=>{Po.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Qa=cs("ZodPipe",(e,t)=>{Oo.init(e,t),oa.init(e,t),e.in=t.in,e.out=t.out});function Xa(e,t){return new Qa({type:"pipe",in:e,out:t})}const ec=cs("ZodReadonly",(e,t)=>{xo.init(e,t),oa.init(e,t),e.unwrap=()=>e._zod.def.innerType}),tc=cs("ZodCustom",(e,t)=>{No.init(e,t),oa.init(e,t)}),nc=Fa(la()).default([]).optional(),rc=ja([la(),Fa(la())]),sc=(ic=la(),oc=rc,new za({type:"record",keyType:ic,valueType:oc,...Ts(undefined)})).optional();var ic,oc;(function(){const e={type:"object",shape:{stanPath:la().min(1,{message:"stanPath must be a non-empty string"}),includes:nc,excludes:nc,imports:sc}??{},...Ts(void 0)};return new Ia(e)})().strict();const ac=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/^\.\/+/,""),r=`${n}/system`,s=`${n}/output`,i=`${n}/diff`,o=`${n}/dist`,a=`${n}/patch`,c=`${n}/imports`;return{rootRel:n,systemRel:r,outputRel:s,diffRel:i,distRel:o,patchRel:a,importsRel:c,rootAbs:h(e,n),systemAbs:h(e,r),outputAbs:h(e,s),diffAbs:h(e,i),distAbs:h(e,o),patchAbs:h(e,a),importsAbs:h(e,c)}};var cc={makeStanDirs:ac},uc=Object.freeze({__proto__:null,default:cc,makeStanDirs:ac});const lc=async({cwd:e,stanPath:n,baseName:r,includes:s,excludes:i,updateSnapshot:o="createIfMissing",includeOutputDirInDiff:u=!1,anchors:l,onArchiveWarnings:f})=>{const{outDir:p,diffDir:d}=await be(e,n),m=await de(e),y=await ge(m,{cwd:e,stanPath:n,includeOutputDir:!1,includes:s??[],excludes:i??[],anchors:l??[]}),b=await(async(e,t)=>{const n={};for(const r of t){const t=h(e,r),s=await a(t),i=k("sha256").update(s).digest("hex");n[r]=i}return n})(e,y),v=(e=>g(e,".archive.snapshot.json"))(d),D=t(v),w=D?JSON.parse(await a(v,"utf8")):{},_=D?y.filter(e=>!w[e]||w[e]!==b[e]):[...y],E=await(async()=>{try{const e=await import("./classifier-DeYwffC_-C7wwqop3.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:S,warningsBody:A}=await E(e,_),C=S;U(A,f);const P=g(p,`${r}.diff.tar`),O=await import("./index-ucZa1KMb-DZqceYU7.js");if(u)await O.create({file:P,cwd:e,filter:H(n)},K(C,n));else if(0===C.length){const t=(e=>g(e,".stan_no_changes"))(d);await c(t,"no changes","utf8");const r=[`${n.replace(/\\/g,"/")}/diff/.stan_no_changes`];await O.create({file:P,cwd:e},r)}else{const t=Array.from(new Set([...C]));await O.create({file:P,cwd:e},t)}return"replace"===o?await c(v,JSON.stringify(b,null,2),"utf8"):"createIfMissing"!==o||D||await c(v,JSON.stringify(b,null,2),"utf8"),{diffPath:P}};var fc,pc={},dc={},hc={};var mc,gc={};var yc,bc,vc={},Dc={};var wc,_c,kc,Ec,Sc,Ac,Cc={};function Pc(){if(Ec)return kc;Ec=1;var e=_c?wc:(_c=1,wc=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 kc=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 Oc,Tc,xc,$c,Nc,Lc,Rc,Fc,Ic,Mc,jc,Bc,zc,Hc,Kc,Uc,qc,Zc,Gc,Wc={};function Vc(){return Oc||(Oc=1,(e=Wc).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}),Wc;var e}function Jc(){if(xc)return Tc;xc=1;const e=Vc();return Tc=(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 Yc(){if(Rc)return Lc;Rc=1;const e=Nc?$c:(Nc=1,$c=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={},Lc=t}function Qc(){if(Ic)return Fc;Ic=1;const e=C,t=Yc(),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[]},p=(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}):_},d=(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 d(e,t,1,{transform:i});if(n(i))return d(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)?p(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)?d(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return Fc=d}function Xc(){if(Gc)return Zc;Gc=1;const e=Jc(),t=function(){if(jc)return Mc;jc=1;const e=Qc(),t=Vc();return Mc=(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(zc)return Bc;zc=1;const e=Qc(),t=Jc(),n=Vc(),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 Bc=(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))},Bc}(),r=function(){if(qc)return Uc;qc=1;const e=Jc(),{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}=Kc?Hc:(Kc=1,Hc={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 Uc=(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++],T=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(T({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++;T({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();T({type:"text",value:A});continue}if(A===c){P++;const e=k.value&&"$"===k.value.slice(-1)||!0===_.dollar;_=T({type:"brace",open:!0,close:!1,dollar:e,depth:P,commas:0,ranges:0,nodes:[]}),w.push(_),T({type:"open",value:A});continue}if(A===u){if("brace"!==_.type){T({type:"text",value:A});continue}const e="close";_=w.pop(),_.close=!0,T({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(_)}]}T({type:"comma",value:A}),_.commas++}else{if(A===i&&P>0&&0===_.commas){const e=_.nodes;if(0===P||0===e.length){T({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}T({type:"dot",value:A});continue}T({type:"text",value:A})}}else{if("paren"!==_.type){T({type:"text",value:A});continue}_=w.pop(),T({type:"text",value:A}),_=w[w.length-1]}else _=T({type:"paren",nodes:[]}),w.push(_),T({type:"text",value:A})}else T({type:"text",value:"\\"+A});else T({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 T({type:"eos"}),D}}(),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),Zc=s}var eu,tu,nu,ru,su,iu,ou,au,cu,uu,lu,fu,pu,du,hu={};function mu(){if(tu)return eu;tu=1;const e=A,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 eu={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 gu(){return nu||(nu=1,function(e){const t=A,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=mu();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}}(hu)),hu}function yu(){return lu?uu:(lu=1,uu=function(){if(cu)return au;cu=1;const e=A,t=function(){if(su)return ru;su=1;const e=gu(),{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}=mu(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return ru=(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,T=0,x=0,$=!1,N=!1,L=!1,R=!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,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if($=K.isBrace=!0,L=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(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===o&&O===T&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){L=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),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=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,L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==o||O!==T){if(!0!==D.noparen&&C===u){if(L=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===L){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,T++}else{if(k.push(O),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===i&&O===T+1){T+=2;continue}x=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let G=P,W="",V="";T>0&&(W=P.slice(0,T),P=P.slice(T),x-=T),G&&!0===L&&x>0?(G=P.slice(0,x),V=P.slice(x)):!0===L?(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:T,base:G,glob:V,isBrace:$,isBracket:N,isGlob:L,isExtglob:R,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:T,r=k[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(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},ru}(),n=function(){if(ou)return iu;ou=1;const e=mu(),t=gu(),{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:T,STAR:x,START_ANCHOR:$}=v,N=e=>`(${y}(?:(?!${$}${e.dot?S:w}).)*?)`,L=p.dot?"":A,R=p.dot?O:T;let F=!0===p.bash?N(p):x;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?R+(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:T});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+=L,H.output+=L),"*"!==U()&&(I.output+=E,H.output+=E)),Q(n)):(n.output=z,Q(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=L+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},iu=u}(),r=gu(),s=mu(),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,au=i}())}var bu,vu,Du,wu={};function _u(){if(vu)return bu;vu=1;const e=P.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 bu=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},bu}var ku,Eu,Su,Au={};function Cu(){if(Eu)return dc;Eu=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.string=dc.stream=dc.pattern=dc.path=dc.fs=dc.errno=dc.array=void 0;const e=(fc||(fc=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.splitWhen=hc.flatten=void 0,hc.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},hc.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}),hc);dc.array=e;const t=(mc||(mc=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.isEnoentCodeError=void 0,gc.isEnoentCodeError=function(e){return"ENOENT"===e.code}),gc);dc.errno=t;const n=function(){if(yc)return vc;yc=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.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 vc.createDirentFromStats=function(t,n){return new e(t,n)},vc}();dc.fs=n;const r=function(){if(bc)return Dc;bc=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.convertPosixPathToPattern=Dc.convertWindowsPathToPattern=Dc.convertPathToPattern=Dc.escapePosixPath=Dc.escapeWindowsPath=Dc.escape=Dc.removeLeadingDotSegment=Dc.makeAbsolute=Dc.unixify=void 0;const e=A,t="win32"===S.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 Dc.unixify=function(e){return e.replace(/\\/g,"/")},Dc.makeAbsolute=function(t,n){return e.resolve(t,n)},Dc.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},Dc.escape=t?o:a,Dc.escapeWindowsPath=o,Dc.escapePosixPath=a,Dc.convertPathToPattern=t?c:u,Dc.convertWindowsPathToPattern=c,Dc.convertPosixPathToPattern=u,Dc}();dc.path=r;const s=function(){if(du)return Cc;du=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.isAbsolute=Cc.partitionAbsoluteAndRelative=Cc.removeDuplicateSlashes=Cc.matchAny=Cc.convertPatternsToRe=Cc.makeRe=Cc.getPatternParts=Cc.expandBraceExpansion=Cc.expandPatternsWithBraceExpansion=Cc.isAffectDepthOfReadingPattern=Cc.endsWithSlashGlobStar=Cc.hasGlobStar=Cc.getBaseDirectory=Cc.isPatternRelatedToParentDirectory=Cc.getPatternsOutsideCurrentDirectory=Cc.getPatternsInsideCurrentDirectory=Cc.getPositivePatterns=Cc.getNegativePatterns=Cc.isPositivePattern=Cc.isNegativePattern=Cc.convertToNegativePattern=Cc.convertToPositivePattern=Cc.isDynamicPattern=Cc.isStaticPattern=void 0;const e=A,t=function(){if(Ac)return Sc;Ac=1;var e=Pc(),t=A.posix.dirname,n="win32"===S.platform(),r=/\\/g,s=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Sc=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(pu)return fu;pu=1;const e=C,t=Xc(),n=yu(),r=gu(),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,fu=o}(),r=/[*?]|^!/,s=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!l(e,t)}function l(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 f(e){return e.startsWith("!")&&"("!==e[1]}function p(e){return!f(e)}function d(e){return e.startsWith("..")||e.startsWith("./..")}function h(e){return e.endsWith("/**")}function m(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 g(e,t){return n.makeRe(e,t)}function y(t){return e.isAbsolute(t)}return Cc.isStaticPattern=u,Cc.isDynamicPattern=l,Cc.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Cc.convertToNegativePattern=function(e){return"!"+e},Cc.isNegativePattern=f,Cc.isPositivePattern=p,Cc.getNegativePatterns=function(e){return e.filter(f)},Cc.getPositivePatterns=function(e){return e.filter(p)},Cc.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!d(e))},Cc.getPatternsOutsideCurrentDirectory=function(e){return e.filter(d)},Cc.isPatternRelatedToParentDirectory=d,Cc.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Cc.hasGlobStar=function(e){return e.includes("**")},Cc.endsWithSlashGlobStar=h,Cc.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return h(t)||u(n)},Cc.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(m(t)),[])},Cc.expandBraceExpansion=m,Cc.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},Cc.makeRe=g,Cc.convertPatternsToRe=function(e,t){return e.map(e=>g(e,t))},Cc.matchAny=function(e,t){return t.some(t=>t.test(e))},Cc.removeDuplicateSlashes=function(e){return e.replace(c,"/")},Cc.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)y(r)?t.push(r):n.push(r);return[t,n]},Cc.isAbsolute=y,Cc}();dc.pattern=s;const i=function(){if(Du)return wu;Du=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.merge=void 0;const e=_u();function t(e){e.forEach(e=>e.emit("close"))}return wu.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},wu}();dc.stream=i;const o=(ku||(ku=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.isEmpty=Au.isString=void 0,Au.isString=function(e){return"string"==typeof e},Au.isEmpty=function(e){return""===e}),Au);return dc.string=o,dc}var Pu,Ou={},Tu={},xu={},$u={},Nu={},Lu={},Ru={},Fu={},Iu={};var Mu,ju,Bu,zu,Hu,Ku,Uu,qu,Zu={},Gu={},Wu={};function Vu(){if(zu)return Fu;zu=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.statSync=Fu.stat=Fu.Settings=void 0;const e=function(){if(Pu)return Iu;function e(e,t){e(t)}function t(e,t){e(null,t)}return Pu=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.read=void 0,Iu.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)})},Iu}(),t=(Mu||(Mu=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.read=void 0,Zu.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}}),Zu),n=function(){if(Bu)return Gu;Bu=1,Object.defineProperty(Gu,"__esModule",{value:!0});const e=(ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;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)}}(Wu)),Wu);return Gu.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}},Gu}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Fu.Settings=n.default,Fu.stat=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Fu.statSync=function(e,n){const s=r(n);return t.read(e,s)},Fu}var Ju,Yu={};function Qu(){if(Ju)return Yu;Ju=1,Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.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 Yu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,Yu}var Xu,el,tl={},nl={};function rl(){if(el)return tl;el=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.fs=void 0;const e=function(){if(Xu)return nl;Xu=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.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 nl.createDirentFromStats=function(t,n){return new e(t,n)},nl}();return tl.fs=e,tl}var sl,il,ol={};function al(){return sl||(sl=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.joinPathSegments=void 0,ol.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),ol}function cl(){if(il)return Ru;il=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.readdir=Ru.readdirWithFileTypes=Ru.read=void 0;const e=Vu(),t=function(){if(qu)return Uu;qu=1,Uu=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(Ku)return Hu;let e;return Ku=1,Hu="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:q):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return Uu}(),n=Qu(),r=rl(),s=al();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 Ru.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t,r):i(e,t,r)},Ru.readdirWithFileTypes=i,Ru.readdir=o,Ru}var ul,ll,fl,pl,dl={},hl={},ml={};function gl(){if(pl)return Lu;pl=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.Settings=Lu.scandirSync=Lu.scandir=void 0;const e=cl(),t=function(){if(ul)return dl;ul=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.readdir=dl.readdirWithFileTypes=dl.read=void 0;const e=Vu(),t=Qu(),n=rl(),r=al();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 dl.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,n):i(e,n)},dl.readdirWithFileTypes=s,dl.readdir=i,dl}(),n=function(){if(fl)return hl;fl=1,Object.defineProperty(hl,"__esModule",{value:!0});const e=A,t=Vu(),n=(ll||(ll=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;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)}}(ml)),ml);return hl.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}},hl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Lu.Settings=n.default,Lu.scandir=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Lu.scandirSync=function(e,n){const s=r(n);return t.read(e,s)},Lu}var yl,bl,vl,Dl={exports:{}};var wl,_l={};function kl(){return wl||(wl=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.joinPathSegments=_l.replacePathSegmentSeparator=_l.isAppliedFilter=_l.isFatalError=void 0,_l.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},_l.isAppliedFilter=function(e,t){return null===e||e(t)},_l.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},_l.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),_l}var El,Sl,Al,Cl={};function Pl(){if(El)return Cl;El=1,Object.defineProperty(Cl,"__esModule",{value:!0});const e=kl();return Cl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},Cl}function Ol(){if(Sl)return Nu;Sl=1,Object.defineProperty(Nu,"__esModule",{value:!0});const e=O,t=gl(),n=function(){if(vl)return Dl.exports;vl=1;var e=bl?yl:(bl=1,yl=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 Dl.exports=t,Dl.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},Dl.exports}(),r=kl(),s=Pl();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 Nu.default=i,Nu}var Tl,xl,$l,Nl={},Ll={},Rl={};var Fl,Il,Ml={};function jl(){if(Il)return xu;Il=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.Settings=xu.walkStream=xu.walkSync=xu.walk=void 0;const e=function(){if(Al)return $u;Al=1,Object.defineProperty($u,"__esModule",{value:!0});const e=Ol();return $u.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()}},$u}(),t=function(){if(Tl)return Nl;Tl=1,Object.defineProperty(Nl,"__esModule",{value:!0});const e=P,t=Ol();return Nl.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}},Nl}(),n=function(){if($l)return Ll;$l=1,Object.defineProperty(Ll,"__esModule",{value:!0});const e=function(){if(xl)return Rl;xl=1,Object.defineProperty(Rl,"__esModule",{value:!0});const e=gl(),t=kl(),n=Pl();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 Rl.default=r,Rl}();return Ll.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()}},Ll}(),r=function(){if(Fl)return Ml;Fl=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=A,t=gl();return Ml.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}},Ml}();function s(e={}){return e instanceof r.default?e:new r.default(e)}return xu.Settings=r.default,xu.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},xu.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},xu.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},xu}var Bl,zl={};function Hl(){if(Bl)return zl;Bl=1,Object.defineProperty(zl,"__esModule",{value:!0});const e=A,t=Vu(),n=Cu();return zl.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}},zl}var Kl,Ul,ql={};function Zl(){if(Kl)return ql;Kl=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=P,t=Vu(),n=jl(),r=Hl();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 ql.default=s,ql}var Gl,Wl,Vl,Jl={},Yl={},Ql={},Xl={};var ef,tf,nf,rf,sf,of={},af={},cf={};function uf(){if(rf)return Jl;rf=1,Object.defineProperty(Jl,"__esModule",{value:!0});const e=A,t=function(){if(Vl)return Yl;Vl=1,Object.defineProperty(Yl,"__esModule",{value:!0});const e=Cu(),t=function(){if(Wl)return Ql;Wl=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=function(){if(Gl)return Xl;Gl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=Cu();return Xl.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))}},Xl}();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 Ql.default=t,Ql}();return Yl.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)}},Yl}(),n=function(){if(ef)return of;ef=1,Object.defineProperty(of,"__esModule",{value:!0});const e=Cu();return of.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}},of}(),r=function(){if(tf)return af;tf=1,Object.defineProperty(af,"__esModule",{value:!0});const e=Cu();return af.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},af}(),s=function(){if(nf)return cf;nf=1,Object.defineProperty(cf,"__esModule",{value:!0});const e=Cu();return cf.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}},cf}();return Jl.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}}},Jl}var lf,ff,pf,df={},hf={},mf={};var gf,yf,bf,vf,Df,wf={},_f=function(){if(bf)return yf;bf=1;const e=function(){if(Su)return pc;Su=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.convertPatternGroupToTask=pc.convertPatternGroupsToTasks=pc.groupPatternsByBaseDirectory=pc.getNegativePatternsAsPositive=pc.getPositivePatterns=pc.convertPatternsToTasks=pc.generate=void 0;const e=Cu();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 pc.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)},pc.convertPatternsToTasks=n,pc.getPositivePatterns=r,pc.getNegativePatternsAsPositive=s,pc.groupPatternsByBaseDirectory=i,pc.convertPatternGroupsToTasks=o,pc.convertPatternGroupToTask=a,pc}(),t=function(){if(sf)return Ou;sf=1,Object.defineProperty(Ou,"__esModule",{value:!0});const e=function(){if(Ul)return Tu;Ul=1,Object.defineProperty(Tu,"__esModule",{value:!0});const e=jl(),t=Hl(),n=Zl();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 Tu.default=r,Tu}(),t=uf();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 Ou.default=n,Ou}(),n=function(){if(lf)return df;lf=1,Object.defineProperty(df,"__esModule",{value:!0});const e=P,t=Zl(),n=uf();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 df.default=r,df}(),r=function(){if(pf)return hf;pf=1,Object.defineProperty(hf,"__esModule",{value:!0});const e=function(){if(ff)return mf;ff=1,Object.defineProperty(mf,"__esModule",{value:!0});const e=Vu(),t=jl(),n=Hl();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 mf.default=r,mf}(),t=uf();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 hf.default=n,hf}(),s=(gf||(gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=T,n=S,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)}}}(wf)),wf),i=Cu();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={})),yf=o}(),kf=Z(_f),Ef=function(){if(Df)return vf;Df=1;var e=Pc(),t=A.posix.dirname,n="win32"===S.platform(),r="/",s=/\\/g,i=/\\([!*?|[\](){}])/g;function o(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return vf=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")}}(),Sf=Z(Ef);const Af=e=>""!==e&&".."!==e,Cf=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(!Af(e))return null;return t.join("/")},Pf=async e=>{try{return(await l(e)).isFile()}catch{return!1}},Of="0.4.4";function Tf(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 xf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $f extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Nf={};function Lf(e){return Nf}function Rf(e,t){return"bigint"==typeof t?t.toString():t}function Ff(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function If(e){return null==e}function Mf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const jf=Symbol("evaluating");function Bf(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==jf)return void 0===r&&(r=jf,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function zf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Hf(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Kf(e){return JSON.stringify(e)}const Uf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qf(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Zf=Ff(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Gf(e){if(!1===qf(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==qf(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Wf(e){return Gf(e)?{...e}:Array.isArray(e)?[...e]:e}const Vf=new Set(["string","number","symbol"]);function Jf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yf(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Qf(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 Xf={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 ep(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 tp(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function np(e){return"string"==typeof e?e:e?.message}function rp(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=np(e.inst?._zod.def?.error?.(e))??np(t?.error?.(e))??np(n.customError?.(e))??np(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function sp(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ip(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const op=(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,Rf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ap=Tf("$ZodError",op),cp=Tf("$ZodError",op,{Parent:Error});const up=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 xf;if(o.issues.length){const t=new(s?.Err??e)(o.issues.map(e=>rp(e,i,Lf())));throw Uf(t,s?.callee),t}return o.value},lp=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=>rp(e,i,Lf())));throw Uf(t,s?.callee),t}return o.value},fp=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 xf;return i.issues.length?{success:!1,error:new(e??ap)(i.issues.map(e=>rp(e,s,Lf())))}:{success:!0,data:i.value}},pp=fp(cp),dp=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=>rp(e,s,Lf())))}:{success:!0,data:i.value}},hp=dp(cp),mp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return up(e)(t,n,s)},gp=e=>(t,n,r)=>up(e)(t,n,r),yp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return lp(e)(t,n,s)},bp=e=>async(t,n,r)=>lp(e)(t,n,r),vp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fp(e)(t,n,s)},Dp=e=>(t,n,r)=>fp(e)(t,n,r),wp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return dp(e)(t,n,s)},_p=e=>async(t,n,r)=>dp(e)(t,n,r),kp=/^[cC][^\s-]{8,}$/,Ep=/^[0-9a-z]+$/,Sp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ap=/^[0-9a-vA-V]{20}$/,Cp=/^[A-Za-z0-9]{27}$/,Pp=/^[a-zA-Z0-9_-]{21}$/,Op=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tp=/^([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})$/,xp=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)$/,$p=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Np=/^(?:(?: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])$/,Lp=/^(([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}|:))$/,Rp=/^((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])$/,Fp=/^(([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])$/,Ip=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mp=/^[A-Za-z0-9_-]*$/,jp=/^(?=.{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])?)*\.?$/,Bp=/^\+(?:[0-9]){6,14}[0-9]$/,zp="(?:(?:\\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])))",Hp=new RegExp(`^${zp}$`);function Kp(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 Up=/^-?\d+$/,qp=/^-?\d+(?:\.\d+)?/,Zp=/^(?:true|false)$/i,Gp=/^[^A-Z]*$/,Wp=/^[^a-z]*$/,Vp=Tf("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Jp={number:"number",bigint:"bigint",object:"date"},Yp=Tf("$ZodCheckLessThan",(e,t)=>{Vp.init(e,t);const n=Jp[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})}}),Qp=Tf("$ZodCheckGreaterThan",(e,t)=>{Vp.init(e,t);const n=Jp[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})}}),Xp=Tf("$ZodCheckMultipleOf",(e,t)=>{Vp.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})}}),ed=Tf("$ZodCheckNumberFormat",(e,t)=>{Vp.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=Xf[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=Up)}),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})}}),td=Tf("$ZodCheckMaxLength",(e,t)=>{var n;Vp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!If(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=sp(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nd=Tf("$ZodCheckMinLength",(e,t)=>{var n;Vp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!If(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=sp(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rd=Tf("$ZodCheckLengthEquals",(e,t)=>{var n;Vp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!If(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=sp(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})}}),sd=Tf("$ZodCheckStringFormat",(e,t)=>{var n,r;Vp.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=()=>{})}),id=Tf("$ZodCheckRegex",(e,t)=>{sd.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})}}),od=Tf("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Gp),sd.init(e,t)}),ad=Tf("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wp),sd.init(e,t)}),cd=Tf("$ZodCheckIncludes",(e,t)=>{Vp.init(e,t);const n=Jf(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})}}),ud=Tf("$ZodCheckStartsWith",(e,t)=>{Vp.init(e,t);const n=new RegExp(`^${Jf(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})}}),ld=Tf("$ZodCheckEndsWith",(e,t)=>{Vp.init(e,t);const n=new RegExp(`.*${Jf(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})}}),fd=Tf("$ZodCheckOverwrite",(e,t)=>{Vp.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class pd{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 dd={major:4,minor:1,patch:12},hd=Tf("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dd;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=ep(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 xf;if(r||o instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await o;e.issues.length!==t&&(s||(s=ep(e,t)))});else{if(e.issues.length===t)continue;s||(s=ep(e,t))}}return r?r.then(()=>e):e},n=(n,s,i)=>{if(ep(n))return n.aborted=!0,n;const o=t(s,r,i);if(o instanceof Promise){if(!1===i.async)throw new xf;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 xf;return o.then(e=>t(e,r,i))}return t(o,r,i)}}e["~standard"]={validate:t=>{try{const n=pp(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return hp(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),md=Tf("$ZodString",(e,t)=>{var n;hd.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}}),gd=Tf("$ZodStringFormat",(e,t)=>{sd.init(e,t),md.init(e,t)}),yd=Tf("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Tp),gd.init(e,t)}),bd=Tf("$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=xp(e))}else t.pattern??(t.pattern=xp());gd.init(e,t)}),vd=Tf("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$p),gd.init(e,t)}),Dd=Tf("$ZodURL",(e,t)=>{gd.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:jp.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})}}}),wd=Tf("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),gd.init(e,t)}),_d=Tf("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Pp),gd.init(e,t)}),kd=Tf("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=kp),gd.init(e,t)}),Ed=Tf("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ep),gd.init(e,t)}),Sd=Tf("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sp),gd.init(e,t)}),Ad=Tf("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ap),gd.init(e,t)}),Cd=Tf("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Cp),gd.init(e,t)}),Pd=Tf("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=Kp({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(`^${zp}T(?:${r})$`)}(t)),gd.init(e,t)}),Od=Tf("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Hp),gd.init(e,t)}),Td=Tf("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Kp(t)}$`)),gd.init(e,t)}),xd=Tf("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Op),gd.init(e,t)}),$d=Tf("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Np),gd.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Nd=Tf("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Lp),gd.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})}}}),Ld=Tf("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Rp),gd.init(e,t)}),Rd=Tf("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Fp),gd.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 Fd(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Id=Tf("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ip),gd.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Fd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Md=Tf("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Mp),gd.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Mp.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Fd(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})}}),jd=Tf("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Bp),gd.init(e,t)});const Bd=Tf("$ZodJWT",(e,t)=>{gd.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})}}),zd=Tf("$ZodNumber",(e,t)=>{hd.init(e,t),e._zod.pattern=e._zod.bag.pattern??qp,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}}),Hd=Tf("$ZodNumber",(e,t)=>{ed.init(e,t),zd.init(e,t)}),Kd=Tf("$ZodBoolean",(e,t)=>{hd.init(e,t),e._zod.pattern=Zp,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}}),Ud=Tf("$ZodUnknown",(e,t)=>{hd.init(e,t),e._zod.parse=e=>e}),qd=Tf("$ZodNever",(e,t)=>{hd.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Zd(e,t,n){e.issues.length&&t.issues.push(...tp(n,e.issues)),t.value[n]=e.value}const Gd=Tf("$ZodArray",(e,t)=>{hd.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=>Zd(t,n,e))):Zd(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Wd(e,t,n,r){e.issues.length&&t.issues.push(...tp(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Vd(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 Jd(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=>Wd(e,n,s,t))):Wd(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 Yd=Tf("$ZodObject",(e,t)=>{hd.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=Ff(()=>Vd(t));Bf(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=qf,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=>Wd(n,t,e,a))):Wd(r,t,e,a)}return i?Jd(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),Qd=Tf("$ZodObjectJIT",(e,t)=>{Yd.init(e,t);const n=e._zod.parse,r=Ff(()=>Vd(t));let s;const i=qf,o=!Nf.jitless,a=o&&Zf.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 pd(["shape","payload","ctx"]),n=r.value,s=e=>{const t=Kf(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=Kf(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?Jd([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function Xd(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=>!ep(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=>rp(e,r,Lf())))}),t)}const eh=Tf("$ZodUnion",(e,t)=>{hd.init(e,t),Bf(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Bf(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Bf(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Bf(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=>Mf(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=>Xd(t,s,e,i)):Xd(a,s,e,i)}}),th=Tf("$ZodIntersection",(e,t)=>{hd.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])=>rh(e,t,n)):rh(e,s,i)}});function nh(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(Gf(e)&&Gf(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=nh(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=nh(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 rh(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),ep(e))return e;const r=nh(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 sh=Tf("$ZodRecord",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Gf(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(...tp(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...tp(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=>rp(e,r,Lf())),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(...tp(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...tp(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ih=Tf("$ZodEnum",(e,t)=>{hd.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=>Vf.has(typeof e)).map(e=>"string"==typeof e?Jf(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}}),oh=Tf("$ZodTransform",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new $f(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 xf;return n.value=s,n}});function ah(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ch=Tf("$ZodOptional",(e,t)=>{hd.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Bf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Bf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Mf(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=>ah(t,e.value)):ah(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),uh=Tf("$ZodNullable",(e,t)=>{hd.init(e,t),Bf(e._zod,"optin",()=>t.innerType._zod.optin),Bf(e._zod,"optout",()=>t.innerType._zod.optout),Bf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Mf(e.source)}|null)$`):void 0}),Bf(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)}),lh=Tf("$ZodDefault",(e,t)=>{hd.init(e,t),e._zod.optin="optional",Bf(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=>fh(e,t)):fh(r,t)}});function fh(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const ph=Tf("$ZodPrefault",(e,t)=>{hd.init(e,t),e._zod.optin="optional",Bf(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))}),dh=Tf("$ZodNonOptional",(e,t)=>{hd.init(e,t),Bf(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=>hh(t,e)):hh(s,e)}});function hh(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 mh=Tf("$ZodCatch",(e,t)=>{hd.init(e,t),Bf(e._zod,"optin",()=>t.innerType._zod.optin),Bf(e._zod,"optout",()=>t.innerType._zod.optout),Bf(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=>rp(e,n,Lf()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>rp(e,n,Lf()))},input:e.value}),e.issues=[]),e)}}),gh=Tf("$ZodPipe",(e,t)=>{hd.init(e,t),Bf(e._zod,"values",()=>t.in._zod.values),Bf(e._zod,"optin",()=>t.in._zod.optin),Bf(e._zod,"optout",()=>t.out._zod.optout),Bf(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=>yh(e,t.in,n)):yh(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>yh(e,t.out,n)):yh(r,t.out,n)}});function yh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const bh=Tf("$ZodReadonly",(e,t)=>{hd.init(e,t),Bf(e._zod,"propValues",()=>t.innerType._zod.propValues),Bf(e._zod,"values",()=>t.innerType._zod.values),Bf(e._zod,"optin",()=>t.innerType._zod.optin),Bf(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(vh):vh(r)}});function vh(e){return e.value=Object.freeze(e.value),e}const Dh=Tf("$ZodCustom",(e,t)=>{Vp.init(e,t),hd.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=>wh(t,n,r,e));wh(s,n,r,e)}});function wh(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(ip(e))}}class _h{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 kh(){return new _h}const Eh=kh();function Sh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qf(t)})}function Ah(e,t){return new Yp({check:"less_than",...Qf(t),value:e,inclusive:!1})}function Ch(e,t){return new Yp({check:"less_than",...Qf(t),value:e,inclusive:!0})}function Ph(e,t){return new Qp({check:"greater_than",...Qf(t),value:e,inclusive:!1})}function Oh(e,t){return new Qp({check:"greater_than",...Qf(t),value:e,inclusive:!0})}function Th(e,t){return new Xp({check:"multiple_of",...Qf(t),value:e})}function xh(e,t){return new td({check:"max_length",...Qf(t),maximum:e})}function $h(e,t){return new nd({check:"min_length",...Qf(t),minimum:e})}function Nh(e,t){return new rd({check:"length_equals",...Qf(t),length:e})}function Lh(e){return new fd({check:"overwrite",tx:e})}function Rh(e){const t=function(e,t){const n=new Vp({check:"custom",...Qf(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(ip(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(ip(r))}},e(n.value,n)));return t}const Fh=Tf("ZodISODateTime",(e,t)=>{Pd.init(e,t),um.init(e,t)});function Ih(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qf(t)})}(Fh,e)}const Mh=Tf("ZodISODate",(e,t)=>{Od.init(e,t),um.init(e,t)});function jh(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Qf(t)})}(Mh,e)}const Bh=Tf("ZodISOTime",(e,t)=>{Td.init(e,t),um.init(e,t)});function zh(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qf(t)})}(Bh,e)}const Hh=Tf("ZodISODuration",(e,t)=>{xd.init(e,t),um.init(e,t)});function Kh(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qf(t)})}(Hh,e)}const Uh=(e,t)=>{ap.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,Rf,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Rf,2)}},isEmpty:{get:()=>0===e.issues.length}})},qh=Tf("ZodError",Uh),Zh=Tf("ZodError",Uh,{Parent:Error}),Gh=up(Zh),Wh=lp(Zh),Vh=fp(Zh),Jh=dp(Zh),Yh=mp(Zh),Qh=gp(Zh),Xh=yp(Zh),em=bp(Zh),tm=vp(Zh),nm=Dp(Zh),rm=wp(Zh),sm=_p(Zh),im=Tf("ZodType",(e,t)=>(hd.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Hf(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Yf(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Gh(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Vh(e,t,n),e.parseAsync=async(t,n)=>Wh(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jh(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Yh(e,t,n),e.decode=(t,n)=>Qh(e,t,n),e.encodeAsync=async(t,n)=>Xh(e,t,n),e.decodeAsync=async(t,n)=>em(e,t,n),e.safeEncode=(t,n)=>tm(e,t,n),e.safeDecode=(t,n)=>nm(e,t,n),e.safeEncodeAsync=async(t,n)=>rm(e,t,n),e.safeDecodeAsync=async(t,n)=>sm(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,...Qf(n)})}(ig,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){return Rh(e)}(t)),e.overwrite=t=>e.check(Lh(t)),e.optional=()=>Vm(e),e.nullable=()=>Ym(e),e.nullish=()=>Vm(Ym(e)),e.nonoptional=t=>function(e,t){return new eg({type:"nonoptional",innerType:e,...Qf(t)})}(e,t),e.array=()=>jm(e),e.or=t=>Km([e,t]),e.and=t=>new Um({type:"intersection",left:e,right:t}),e.transform=t=>rg(e,function(e){return new Gm({type:"transform",transform:e})}(t)),e.default=t=>{return n=t,new Qm({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Wf(n)}});var n},e.prefault=t=>{return n=t,new Xm({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Wf(n)}});var n},e.catch=t=>{return new tg({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>rg(e,t),e.readonly=()=>new sg({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Eh.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Eh.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Eh.get(e);const n=e.clone();return Eh.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),om=Tf("_ZodString",(e,t)=>{md.init(e,t),im.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 id({check:"string_format",format:"regex",...Qf(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new cd({check:"string_format",format:"includes",...Qf(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new ud({check:"string_format",format:"starts_with",...Qf(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new ld({check:"string_format",format:"ends_with",...Qf(t),suffix:e})}(...t)),e.min=(...t)=>e.check($h(...t)),e.max=(...t)=>e.check(xh(...t)),e.length=(...t)=>e.check(Nh(...t)),e.nonempty=(...t)=>e.check($h(1,...t)),e.lowercase=t=>e.check(function(e){return new od({check:"string_format",format:"lowercase",...Qf(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ad({check:"string_format",format:"uppercase",...Qf(e)})}(t)),e.trim=()=>e.check(Lh(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Lh(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Lh(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Lh(e=>e.toUpperCase()))}),am=Tf("ZodString",(e,t)=>{md.init(e,t),om.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qf(t)})}(lm,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qf(t)})}(dm,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qf(t)})}(Pm,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qf(t)})}(hm,t)),e.guid=t=>e.check(Sh(fm,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qf(t)})}(pm,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qf(t)})}(pm,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qf(t)})}(pm,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qf(t)})}(pm,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qf(t)})}(mm,t)),e.guid=t=>e.check(Sh(fm,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qf(t)})}(gm,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qf(t)})}(ym,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qf(t)})}(bm,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qf(t)})}(Sm,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qf(t)})}(Am,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qf(t)})}(vm,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qf(t)})}(Dm,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qf(t)})}(wm,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qf(t)})}(_m,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qf(t)})}(km,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qf(t)})}(Em,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qf(t)})}(Cm,t)),e.datetime=t=>e.check(Ih(t)),e.date=t=>e.check(jh(t)),e.time=t=>e.check(zh(t)),e.duration=t=>e.check(Kh(t))});function cm(e){return function(e,t){return new e({type:"string",...Qf(t)})}(am,e)}const um=Tf("ZodStringFormat",(e,t)=>{gd.init(e,t),om.init(e,t)}),lm=Tf("ZodEmail",(e,t)=>{vd.init(e,t),um.init(e,t)}),fm=Tf("ZodGUID",(e,t)=>{yd.init(e,t),um.init(e,t)}),pm=Tf("ZodUUID",(e,t)=>{bd.init(e,t),um.init(e,t)}),dm=Tf("ZodURL",(e,t)=>{Dd.init(e,t),um.init(e,t)}),hm=Tf("ZodEmoji",(e,t)=>{wd.init(e,t),um.init(e,t)}),mm=Tf("ZodNanoID",(e,t)=>{_d.init(e,t),um.init(e,t)}),gm=Tf("ZodCUID",(e,t)=>{kd.init(e,t),um.init(e,t)}),ym=Tf("ZodCUID2",(e,t)=>{Ed.init(e,t),um.init(e,t)}),bm=Tf("ZodULID",(e,t)=>{Sd.init(e,t),um.init(e,t)}),vm=Tf("ZodXID",(e,t)=>{Ad.init(e,t),um.init(e,t)}),Dm=Tf("ZodKSUID",(e,t)=>{Cd.init(e,t),um.init(e,t)}),wm=Tf("ZodIPv4",(e,t)=>{$d.init(e,t),um.init(e,t)}),_m=Tf("ZodIPv6",(e,t)=>{Nd.init(e,t),um.init(e,t)}),km=Tf("ZodCIDRv4",(e,t)=>{Ld.init(e,t),um.init(e,t)}),Em=Tf("ZodCIDRv6",(e,t)=>{Rd.init(e,t),um.init(e,t)}),Sm=Tf("ZodBase64",(e,t)=>{Id.init(e,t),um.init(e,t)}),Am=Tf("ZodBase64URL",(e,t)=>{Md.init(e,t),um.init(e,t)}),Cm=Tf("ZodE164",(e,t)=>{jd.init(e,t),um.init(e,t)}),Pm=Tf("ZodJWT",(e,t)=>{Bd.init(e,t),um.init(e,t)}),Om=Tf("ZodNumber",(e,t)=>{zd.init(e,t),im.init(e,t),e.gt=(t,n)=>e.check(Ph(t,n)),e.gte=(t,n)=>e.check(Oh(t,n)),e.min=(t,n)=>e.check(Oh(t,n)),e.lt=(t,n)=>e.check(Ah(t,n)),e.lte=(t,n)=>e.check(Ch(t,n)),e.max=(t,n)=>e.check(Ch(t,n)),e.int=t=>e.check(xm(t)),e.safe=t=>e.check(xm(t)),e.positive=t=>e.check(Ph(0,t)),e.nonnegative=t=>e.check(Oh(0,t)),e.negative=t=>e.check(Ah(0,t)),e.nonpositive=t=>e.check(Ch(0,t)),e.multipleOf=(t,n)=>e.check(Th(t,n)),e.step=(t,n)=>e.check(Th(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 Tm=Tf("ZodNumberFormat",(e,t)=>{Hd.init(e,t),Om.init(e,t)});function xm(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Qf(t)})}(Tm,e)}const $m=Tf("ZodBoolean",(e,t)=>{Kd.init(e,t),im.init(e,t)});function Nm(e){return function(e,t){return new e({type:"boolean",...Qf(t)})}($m,e)}const Lm=Tf("ZodUnknown",(e,t)=>{Ud.init(e,t),im.init(e,t)});function Rm(){return new Lm({type:"unknown"})}const Fm=Tf("ZodNever",(e,t)=>{qd.init(e,t),im.init(e,t)});function Im(e){return function(e,t){return new e({type:"never",...Qf(t)})}(Fm,e)}const Mm=Tf("ZodArray",(e,t)=>{Gd.init(e,t),im.init(e,t),e.element=t.element,e.min=(t,n)=>e.check($h(t,n)),e.nonempty=t=>e.check($h(1,t)),e.max=(t,n)=>e.check(xh(t,n)),e.length=(t,n)=>e.check(Nh(t,n)),e.unwrap=()=>e.element});function jm(e,t){return function(e,t,n){return new e({type:"array",element:t,...Qf(n)})}(Mm,e,t)}const Bm=Tf("ZodObject",(e,t)=>{Qd.init(e,t),im.init(e,t),Bf(e,"shape",()=>t.shape),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Zm({type:"enum",entries:n,...Qf(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:Rm()}),e.loose=()=>e.clone({...e._zod.def,catchall:Rm()}),e.strict=()=>e.clone({...e._zod.def,catchall:Im()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Gf(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=Hf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return zf(this,"shape",n),n},checks:[]});return Yf(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Gf(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 zf(this,"shape",n),n},checks:e._zod.def.checks};return Yf(e,n)}(e,t),e.merge=t=>function(e,t){const n=Hf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return zf(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Yf(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Yf(e,Hf(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 zf(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Hf(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 zf(this,"shape",r),r},checks:[]});return Yf(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Hf(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 zf(this,"shape",s),s},checks:[]});return Yf(t,r)}(Wm,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Hf(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 zf(this,"shape",s),s},checks:[]});return Yf(t,r)}(eg,e,t[0])});function zm(e,t){const n={type:"object",shape:e??{},...Qf(t)};return new Bm(n)}const Hm=Tf("ZodUnion",(e,t)=>{eh.init(e,t),im.init(e,t),e.options=t.options});function Km(e,t){return new Hm({type:"union",options:e,...Qf(t)})}const Um=Tf("ZodIntersection",(e,t)=>{th.init(e,t),im.init(e,t)});const qm=Tf("ZodRecord",(e,t)=>{sh.init(e,t),im.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});const Zm=Tf("ZodEnum",(e,t)=>{ih.init(e,t),im.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 Zm({...t,checks:[],...Qf(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 Zm({...t,checks:[],...Qf(r),entries:s})}});const Gm=Tf("ZodTransform",(e,t)=>{oh.init(e,t),im.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new $f(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(ip(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(ip(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}});const Wm=Tf("ZodOptional",(e,t)=>{ch.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Vm(e){return new Wm({type:"optional",innerType:e})}const Jm=Tf("ZodNullable",(e,t)=>{uh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ym(e){return new Jm({type:"nullable",innerType:e})}const Qm=Tf("ZodDefault",(e,t)=>{lh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Xm=Tf("ZodPrefault",(e,t)=>{ph.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});const eg=Tf("ZodNonOptional",(e,t)=>{dh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});const tg=Tf("ZodCatch",(e,t)=>{mh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const ng=Tf("ZodPipe",(e,t)=>{gh.init(e,t),im.init(e,t),e.in=t.in,e.out=t.out});function rg(e,t){return new ng({type:"pipe",in:e,out:t})}const sg=Tf("ZodReadonly",(e,t)=>{bh.init(e,t),im.init(e,t),e.unwrap=()=>e._zod.def.innerType});const ig=Tf("ZodCustom",(e,t)=>{Dh.init(e,t),im.init(e,t)});function og(e){return function(e,t){return new e({type:"number",coerce:!0,checks:[],...Qf(t)})}(Om,e)}const ag=Km([Nm(),cm(),function(e,t){return new e({type:"number",checks:[],...Qf(t)})}(Om,cg)]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=e.trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();var cg;const ug=zm({script:cm().min(1,{message:"script must be a non-empty string"}),warnPattern:cm().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"}),warnPatternFlags:cm().optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp("",e),!0}catch{return!1}})(e),{message:"warnPatternFlags: invalid regex flags"})}).strict(),lg=function(e,t,n){return new qm({type:"record",keyType:e,valueType:t,...Qf(n)})}(cm(),Km([cm().min(1),ug])).default({}),fg=zm({archive:ag,combine:ag,keep:ag,sequential:ag,live:ag,plan:ag,facets:ag,hangWarn:og().int().positive().optional(),hangKill:og().int().positive().optional(),hangKillGrace:og().int().positive().optional(),scripts:Km([Nm(),jm(cm())]).optional(),prompt:cm().optional()}).strict().optional(),pg=zm({file:cm().optional()}).strict().optional(),dg=zm({stash:ag}).strict().optional(),hg=zm({debug:ag,boring:ag,patch:pg,run:fg,snap:dg}).strict().optional(),mg=zm({scripts:lg,cliDefaults:hg,patchOpenCommand:cm().optional(),maxUndos:og().int().positive().optional(),devMode:ag}).strict(),gg=e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e,t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')};var yg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vg,Dg={},wg={},_g={},kg={};function Eg(){if(vg)return kg;vg=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 kg.ALIAS=e,kg.DOC=t,kg.MAP=n,kg.NODE_TYPE=o,kg.PAIR=r,kg.SCALAR=s,kg.SEQ=i,kg.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,kg.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,kg.isCollection=c,kg.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,kg.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,kg.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case s:case i:return!0}return!1},kg.isPair=e=>!!e&&"object"==typeof e&&e[o]===r,kg.isScalar=a,kg.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,kg}var Sg,Ag,Cg={};function Pg(){if(Sg)return Cg;Sg=1;var e=Eg();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,Cg.visit=s,Cg.visitAsync=o,Cg}function Og(){if(Ag)return _g;Ag=1;var e=Eg(),t=Pg();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:"},_g.Directives=s,_g}var Tg,xg={},$g={},Ng={};function Lg(){if(Tg)return Ng;Tg=1;var e=Eg(),t=Pg();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 Ng.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},Ng.anchorNames=n,Ng.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}},Ng.findNewAnchor=r,Ng}var Rg,Fg={},Ig={};function Mg(){if(Rg)return Ig;return Rg=1,Ig.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)},Ig}var jg,Bg,zg,Hg={};function Kg(){if(jg)return Hg;jg=1;var e=Eg();return Hg.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)},Hg}function Ug(){if(Bg)return Fg;Bg=1;var e=Mg(),t=Eg(),n=Kg();return Fg.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}},Fg}function qg(){if(zg)return $g;zg=1;var e=Lg(),t=Pg(),n=Eg(),r=Ug(),s=Kg();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 $g.Alias=i,$g}var Zg,Gg,Wg,Vg={},Jg={},Yg={};function Qg(){if(Zg)return Yg;Zg=1;var e=Eg(),t=Ug(),n=Kg();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",Yg.Scalar=r,Yg.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,Yg}function Xg(){if(Gg)return Jg;Gg=1;var e=qg(),t=Eg(),n=Qg();return Jg.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},Jg}function ey(){if(Wg)return Vg;Wg=1;var e=Xg(),t=Eg(),n=Ug();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 Vg.Collection=i,Vg.collectionFromPath=r,Vg.isEmptyPath=s,Vg}var ty,ny={},ry={},sy={},iy={};function oy(){if(ty)return iy;ty=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return iy.indentComment=e,iy.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,iy.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),iy}var ay,cy,uy,ly,fy={},py={};function dy(){if(ay)return py;ay=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 py.FOLD_BLOCK=e,py.FOLD_FLOW="flow",py.FOLD_QUOTED=t,py.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},py}function hy(){if(cy)return fy;cy=1;var e=Qg(),t=dy();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 fy.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},fy}function my(){if(uy)return sy;uy=1;var e=Lg(),t=Eg(),n=oy(),r=hy();return sy.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}},sy.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},sy}function gy(){if(ly)return ry;ly=1;var e=Eg(),t=Qg(),n=my(),r=oy();return ry.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},ry}var yy,by={},vy={};function Dy(){if(yy)return vy;yy=1;var e=w;return vy.debug=function(e,...t){"debug"===e&&console.log(...t)},vy.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},vy}var wy,_y,ky,Ey={};function Sy(){if(wy)return Ey;wy=1;var e=Eg(),t=Qg();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 Ey.addMergeToJSMap=s,Ey.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),Ey.merge=r,Ey}function Ay(){if(_y)return by;_y=1;var e=Dy(),t=Sy(),n=my(),r=Eg(),s=Kg();return by.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},by}function Cy(){if(ky)return ny;ky=1;var e=Xg(),t=gy(),n=Ay(),r=Eg();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 ny.Pair=s,ny.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)},ny}var Py,Oy,Ty,xy={},$y={},Ny={},Ly={};function Ry(){if(Py)return Ly;Py=1;var e=Eg(),t=my(),n=oy();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 Ly.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Ly}function Fy(){if(Oy)return Ny;Oy=1;var e=Ry(),t=Ay(),n=ey(),r=Eg(),s=Cy(),i=Qg();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 Ny.YAMLMap=a,Ny.findPair=o,Ny}function Iy(){if(Ty)return $y;Ty=1;var e=Eg(),t=Fy();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 $y.map=n,$y}var My,jy,By={},zy={};function Hy(){if(My)return zy;My=1;var e=Xg(),t=Ry(),n=ey(),r=Eg(),s=Qg(),i=Kg();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 zy.YAMLSeq=o,zy}function Ky(){if(jy)return By;jy=1;var e=Eg(),t=Hy();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 By.seq=n,By}var Uy,qy={};function Zy(){if(Uy)return qy;Uy=1;var e=hy();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 qy.string=t,qy}var Gy,Wy={},Vy={};function Jy(){if(Gy)return Vy;Gy=1;var e=Qg();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 Vy.nullTag=t,Vy}var Yy,Qy={};function Xy(){if(Yy)return Qy;Yy=1;var e=Qg();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 Qy.boolTag=t,Qy}var eb,tb,nb={},rb={};function sb(){if(eb)return rb;return eb=1,rb.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},rb}function ib(){if(tb)return nb;tb=1;var e=Qg(),t=sb();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 nb.float=s,nb.floatExp=r,nb.floatNaN=n,nb}var ob,ab={};function cb(){if(ob)return ab;ob=1;var e=sb();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 ab.int=i,ab.intHex=o,ab.intOct=s,ab}var ub,lb={};function fb(){if(ub)return lb;ub=1;var e=Iy(),t=Jy(),n=Ky(),r=Zy(),s=Xy(),i=ib(),o=cb();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 lb.schema=a,lb}var pb,db={};function hb(){if(pb)return db;pb=1;var e=Qg(),t=Iy(),n=Ky();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 db.schema=a,db}var mb,gb={};function yb(){if(mb)return gb;mb=1;var e=_,t=Qg(),n=hy();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 gb.binary=r,gb}var bb,vb,Db={},wb={};function _b(){if(bb)return wb;bb=1;var e=Eg(),t=Cy(),n=Qg(),r=Hy();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 wb.createPairs=i,wb.pairs=o,wb.resolvePairs=s,wb}function kb(){if(vb)return Db;vb=1;var e=Eg(),t=Kg(),n=Fy(),r=Hy(),s=_b();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 Db.YAMLOMap=i,Db.omap=o,Db}var Eb,Sb={},Ab={};function Cb(){if(Eb)return Ab;Eb=1;var e=Qg();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 Ab.falseTag=r,Ab.trueTag=n,Ab}var Pb,Ob={};function Tb(){if(Pb)return Ob;Pb=1;var e=Qg(),t=sb();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 Ob.float=s,Ob.floatExp=r,Ob.floatNaN=n,Ob}var xb,$b={};function Nb(){if(xb)return $b;xb=1;var e=sb();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 $b.int=o,$b.intBin=s,$b.intHex=a,$b.intOct=i,$b}var Lb,Rb={};function Fb(){if(Lb)return Rb;Lb=1;var e=Eg(),t=Cy(),n=Fy();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 Rb.YAMLSet=r,Rb.set=s,Rb}var Ib,Mb,jb,Bb,zb={};function Hb(){if(Ib)return zb;Ib=1;var e=sb();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 zb.floatTime=s,zb.intTime=r,zb.timestamp=i,zb}function Kb(){if(Mb)return Sb;Mb=1;var e=Iy(),t=Jy(),n=Ky(),r=Zy(),s=yb(),i=Cb(),o=Tb(),a=Nb(),c=Sy(),u=kb(),l=_b(),f=Fb(),p=Hb();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 Sb.schema=d,Sb}function Ub(){if(jb)return Wy;jb=1;var e=Iy(),t=Jy(),n=Ky(),r=Zy(),s=Xy(),i=ib(),o=cb(),a=fb(),c=hb(),u=yb(),l=Sy(),f=kb(),p=_b(),d=Kb(),h=Fb(),m=Hb();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 Wy.coreKnownTags=b,Wy.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},[])},Wy}function qb(){if(Bb)return xy;Bb=1;var e=Eg(),t=Iy(),n=Ky(),r=Zy(),s=Ub();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return xy.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}},xy}var Zb,Gb,Wb={};function Vb(){if(Zb)return Wb;Zb=1;var e=Eg(),t=my(),n=oy();return Wb.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"},Wb}function Jb(){if(Gb)return xg;Gb=1;var e=qg(),t=ey(),n=Eg(),r=Cy(),s=Kg(),i=qb(),o=Vb(),a=Lg(),c=Mg(),u=Xg(),l=Og();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return xg.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)}},xg}var Yb,Qb={};function Xb(){if(Yb)return Qb;Yb=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Qb.YAMLError=e,Qb.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Qb.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Qb.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`}},Qb}var ev,tv={},nv={},rv={},sv={},iv={};function ov(){if(ev)return iv;return ev=1,iv.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}},iv}var av,cv={};function uv(){if(av)return cv;return av=1,cv.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}},cv}var lv,fv={};function pv(){if(lv)return fv;lv=1;var e=uv();return fv.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)}}},fv}var dv,hv,mv={};function gv(){if(dv)return mv;dv=1;var e=Eg();return mv.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))},mv}function yv(){if(hv)return sv;hv=1;var e=Cy(),t=Fy(),n=ov(),r=uv(),s=pv(),i=gv();const o="All mapping items must start at the same column";return sv.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},sv}var bv,vv={};function Dv(){if(bv)return vv;bv=1;var e=Hy(),t=ov(),n=pv();return vv.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},vv}var wv,_v,kv,Ev={},Sv={};function Av(){if(wv)return Sv;return wv=1,Sv.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}},Sv}function Cv(){if(_v)return Ev;_v=1;var e=Eg(),t=Cy(),n=Fy(),r=Hy(),s=Av(),i=ov(),o=uv(),a=gv();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return Ev.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},Ev}function Pv(){if(kv)return rv;kv=1;var e=Eg(),t=Qg(),n=Fy(),r=Hy(),s=yv(),i=Dv(),o=Cv();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 rv.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},rv}var Ov,Tv={},xv={};function $v(){if(Ov)return xv;Ov=1;var e=Qg();return xv.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]}},xv}var Nv,Lv,Rv={};function Fv(){if(Nv)return Rv;Nv=1;var e=Qg(),t=Av();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 Rv.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]}},Rv}function Iv(){if(Lv)return Tv;Lv=1;var e=Eg(),t=Qg(),n=$v(),r=Fv();return Tv.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},Tv}var Mv,jv,Bv,zv,Hv={};function Kv(){if(Mv)return Hv;return Mv=1,Hv.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},Hv}function Uv(){if(jv)return nv;jv=1;var e=qg(),t=Eg(),n=Pv(),r=Iv(),s=Av(),i=Kv();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 nv.composeEmptyNode=c,nv.composeNode=a,nv}function qv(){if(Bv)return tv;Bv=1;var e=Jb(),t=Uv(),n=Av(),r=ov();return tv.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},tv}function Zv(){if(zv)return wg;zv=1;var e=w,t=Og(),n=Jb(),r=Xb(),s=Eg(),i=qv(),o=Av();function a(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 c(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 wg.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const i=a(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}=c(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:c(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=a(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(a(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(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=o.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(a(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}}},wg}var Gv,Wv={},Vv={};function Jv(){if(Gv)return Vv;Gv=1;var e=$v(),t=Fv(),n=Xb(),r=hy();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 Vv.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}}},Vv.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},Vv.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")}},Vv}var Yv,Qv={};function Xv(){if(Yv)return Qv;Yv=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 Qv.stringify=n=>"type"in n?e(n):t(n),Qv}var eD,tD,nD={};function rD(){if(eD)return nD;eD=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")},nD.visit=r,nD}function sD(){if(tD)return Wv;tD=1;var e=Jv(),t=Xv(),n=rD();return Wv.createScalarToken=e.createScalarToken,Wv.resolveAsScalar=e.resolveAsScalar,Wv.setScalarValue=e.setScalarValue,Wv.stringify=t.stringify,Wv.visit=n.visit,Wv.BOM="\ufeff",Wv.DOCUMENT="",Wv.FLOW_END="",Wv.SCALAR="",Wv.isCollection=e=>!!e&&"items"in e,Wv.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),Wv.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},Wv.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},Wv}var iD,oD={};function aD(){if(iD)return oD;iD=1;var e=sD();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 oD.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)}},oD}var cD,uD={};function lD(){if(cD)return uD;cD=1;return uD.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}}}},uD}var fD,pD={};function dD(){if(fD)return pD;fD=1;var e=w,t=sD(),n=aD();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 o(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 a(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 c(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 pD.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&&c(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=a(o(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=a(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=a(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=a(o(t));c(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=a(o(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=a(o(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())}}},pD}var hD,mD,gD={};function yD(){if(hD)return gD;hD=1;var e=Zv(),t=Jb(),n=Xb(),r=Dy(),s=Eg(),i=lD(),o=dD();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 gD.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))},gD.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())},gD.parseDocument=c,gD.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)},gD}var bD=function(){if(mD)return Dg;mD=1;var e=Zv(),t=Jb(),n=qb(),r=Xb(),s=qg(),i=Eg(),o=Cy(),a=Qg(),c=Fy(),u=Hy(),l=sD(),f=aD(),p=lD(),d=dD(),h=yD(),m=Pg();return Dg.Composer=e.Composer,Dg.Document=t.Document,Dg.Schema=n.Schema,Dg.YAMLError=r.YAMLError,Dg.YAMLParseError=r.YAMLParseError,Dg.YAMLWarning=r.YAMLWarning,Dg.Alias=s.Alias,Dg.isAlias=i.isAlias,Dg.isCollection=i.isCollection,Dg.isDocument=i.isDocument,Dg.isMap=i.isMap,Dg.isNode=i.isNode,Dg.isPair=i.isPair,Dg.isScalar=i.isScalar,Dg.isSeq=i.isSeq,Dg.Pair=o.Pair,Dg.Scalar=a.Scalar,Dg.YAMLMap=c.YAMLMap,Dg.YAMLSeq=u.YAMLSeq,Dg.CST=l,Dg.Lexer=f.Lexer,Dg.LineCounter=p.LineCounter,Dg.Parser=d.Parser,Dg.parse=h.parse,Dg.parseAllDocuments=h.parseAllDocuments,Dg.parseDocument=h.parseDocument,Dg.stringify=h.stringify,Dg.visit=m.visit,Dg.visitAsync=m.visitAsync,Dg}(),vD=bg(bD);const DD=(e,t)=>e.endsWith(".json")?JSON.parse(t):vD.parse(t),wD=(e,t)=>{if((()=>{try{return"1"===process.env.STAN_DEBUG}catch{return!1}})())try{console.error(`stan: debug: fallback: ${e}: ${t}`)}catch{}},_D=e=>{try{"function"==typeof gg&&gg(e)}catch{}},kD=(e,t)=>{const n=e&&"object"==typeof e?e:{};let r;try{if(!("function"==typeof mg.parse)){const e=n.scripts,t=e&&"object"==typeof e?e:{};_D(t);const r=n.patchOpenCommand,s="string"==typeof r&&r.length>0?r:ve;return{scripts:t,cliDefaults:n.cliDefaults,patchOpenCommand:s,maxUndos:n.maxUndos,devMode:n.devMode}}r=mg.parse(n)}catch(e){const n=t.replace(/\\/g,"/");throw new Error(`stan-cli: invalid config in ${n}\n${(e=>e instanceof qh?e.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("\n"):String(e))(e)}`)}return _D(r.scripts),{scripts:r.scripts,cliDefaults:r.cliDefaults,patchOpenCommand:"string"==typeof r.patchOpenCommand&&r.patchOpenCommand.length>0?r.patchOpenCommand:ve,maxUndos:r.maxUndos,devMode:r.devMode}},ED=e=>{const t=Ee(e);if(!t)return{scripts:{},patchOpenCommand:ve};const n=r(t,"utf8"),s=DD(t,n),i=s&&"object"==typeof s?s:{};if(i["stan-cli"]&&"object"==typeof i["stan-cli"])return kD(i["stan-cli"],t);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);if(Object.keys(o).length>0){if(!(()=>{try{const e=process.env.STAN_ACCEPT_LEGACY,t=("string"==typeof e?e:"").trim().toLowerCase();return"1"===t||"true"===t}catch{return!1}})()){const e=t.replace(/\\/g,"/");throw new Error([`stan-cli: legacy configuration detected in ${e} (missing top-level "stan-cli").`,'Run "stan init" to migrate your config (a .bak is written next to the file),',"or set STAN_ACCEPT_LEGACY=1 to temporarily accept legacy keys during the transition."].join(" "))}return wD("cli.config:loadSync",`using legacy top-level CLI keys from ${t.replace(/\\/g,"/")}; run "stan init" to migrate`),Object.prototype.hasOwnProperty.call(i,"stan-core")||wD("run.action:engine-legacy",`detected legacy root keys (no "stan-core") in ${t.replace(/\\/g,"/")}`),kD(o,t)}return{scripts:{},patchOpenCommand:ve}},SD=e=>{try{const t=ED(e);let n=Object.keys(t.scripts);if(!n.length)try{const t=(e=>{try{const t=Ee(e??process.cwd());if(!t)return{};const n=r(t,"utf8"),s=DD(t,n);return s&&"object"==typeof s?s:{}}catch{return{}}})(e),s=(e=>{const t=e["stan-cli"];return t&&"object"==typeof t?t:null})(t),i=(s&&"object"==typeof s.scripts?s.scripts:t.scripts)??{};n=Object.keys((e=>{const t={};if(!e||"object"!=typeof e)return t;for(const[n,r]of Object.entries(e))"string"==typeof r&&r.trim().length?t[n]=r:r&&"object"==typeof r&&"string"==typeof r.script&&(t[n]=String(r.script));return t})(i))}catch{}if(!n.length)return"";const s=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 ${s}`,` stan run -q -x ${s}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${s}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},AD=()=>new Promise(e=>setImmediate(e)),CD=(e=0)=>t=>`[${t+e}m`,PD=(e=0)=>t=>`[${38+e};5;${t}m`,OD=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,TD={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(TD.modifier);Object.keys(TD.color),Object.keys(TD.bgColor);const xD=function(){const e=new Map;for(const[t,n]of Object.entries(TD)){for(const[t,r]of Object.entries(n))TD[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=TD[t],e.set(r[0],r[1]);Object.defineProperty(TD,t,{value:n,enumerable:!1})}return Object.defineProperty(TD,"codes",{value:e,enumerable:!1}),TD.color.close="",TD.bgColor.close="",TD.color.ansi=CD(),TD.color.ansi256=PD(),TD.color.ansi16m=OD(),TD.bgColor.ansi=CD(10),TD.bgColor.ansi256=PD(10),TD.bgColor.ansi16m=OD(10),Object.defineProperties(TD,{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=>TD.rgbToAnsi256(...TD.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)=>TD.ansi256ToAnsi(TD.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>TD.ansi256ToAnsi(TD.hexToAnsi256(e)),enumerable:!1}}),TD}();function $D(e,t=(globalThis.Deno?globalThis.Deno.args:v.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),s=t.indexOf("--");return-1!==r&&(-1===s||r<s)}const{env:ND}=v;let LD;function RD(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in ND)return"true"===ND.FORCE_COLOR?1:"false"===ND.FORCE_COLOR?0:0===ND.FORCE_COLOR.length?1:Math.min(Number.parseInt(ND.FORCE_COLOR,10),3)}();void 0!==r&&(LD=r);const s=n?LD:r;if(0===s)return 0;if(n){if($D("color=16m")||$D("color=full")||$D("color=truecolor"))return 3;if($D("color=256"))return 2}if("TF_BUILD"in ND&&"AGENT_NAME"in ND)return 1;if(e&&!t&&void 0===s)return 0;const i=s||0;if("dumb"===ND.TERM)return i;if("win32"===v.platform){const e=x.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in ND)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in ND)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in ND)||"codeship"===ND.CI_NAME?1:i;if("TEAMCITY_VERSION"in ND)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ND.TEAMCITY_VERSION)?1:0;if("truecolor"===ND.COLORTERM)return 3;if("xterm-kitty"===ND.TERM)return 3;if("xterm-ghostty"===ND.TERM)return 3;if("wezterm"===ND.TERM)return 3;if("TERM_PROGRAM"in ND){const e=Number.parseInt((ND.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ND.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ND.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ND.TERM)||"COLORTERM"in ND?1:i}function FD(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(RD(e,{streamIsTTY:e&&e.isTTY,...t}))}$D("no-color")||$D("no-colors")||$D("color=false")||$D("color=never")?LD=0:($D("color")||$D("colors")||$D("color=true")||$D("color=always"))&&(LD=1);const ID={stdout:FD({isTTY:$.isatty(1)}),stderr:FD({isTTY:$.isatty(2)})};function MD(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:jD,stderr:BD}=ID,zD=Symbol("GENERATOR"),HD=Symbol("STYLER"),KD=Symbol("IS_EMPTY"),UD=["ansi","ansi","ansi256","ansi16m"],qD=Object.create(null),ZD=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=jD?jD.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,GD.prototype),t};function GD(e){return ZD(e)}Object.setPrototypeOf(GD.prototype,Function.prototype);for(const[e,t]of Object.entries(xD))qD[e]={get(){const n=QD(this,YD(t.open,t.close,this[HD]),this[KD]);return Object.defineProperty(this,e,{value:n}),n}};qD.visible={get(){const e=QD(this,this[HD],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const WD=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?xD[n].ansi16m(...r):"ansi256"===t?xD[n].ansi256(xD.rgbToAnsi256(...r)):xD[n].ansi(xD.rgbToAnsi(...r)):"hex"===e?WD("rgb",t,n,...xD.hexToRgb(...r)):xD[n][e](...r),VD=["rgb","hex","ansi256"];for(const e of VD){qD[e]={get(){const{level:t}=this;return function(...n){const r=YD(WD(e,UD[t],"color",...n),xD.color.close,this[HD]);return QD(this,r,this[KD])}}};qD["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=YD(WD(e,UD[t],"bgColor",...n),xD.bgColor.close,this[HD]);return QD(this,r,this[KD])}}}}const JD=Object.defineProperties(()=>{},{...qD,level:{enumerable:!0,get(){return this[zD].level},set(e){this[zD].level=e}}}),YD=(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}},QD=(e,t,n)=>{const r=(...e)=>XD(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,JD),r[zD]=e,r[HD]=t,r[KD]=n,r},XD=(e,t)=>{if(e.level<=0||!t)return e[KD]?"":t;let n=e[HD];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=MD(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(GD.prototype,qD);const ew=GD();function tw(){const e=Boolean(process.stdout.isTTY);return"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!e}function nw(e){return tw()?e:ew.green(e)}function rw(e){return tw()?e:ew.cyan(e)}function sw(e){return tw()?e:ew.blue(e)}function iw(e){return tw()?e:ew.red(e)}function ow(e){return tw()?e:ew.black(e)}function aw(e){return tw()?e:ew.gray(e)}function cw(e){return tw()?e:ew.hex("#FFA500")(e)}function uw(e){return tw()?e:ew.bold(e)}function lw(e){return tw()?e:ew.dim(e)}GD({level:BD?BD.level:0});const fw=(e,t)=>{const{selection:n,config:r,mode:s,behavior:i}=t,o=null==n?Object.keys(r.scripts):n,a=d.join(r.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[tw()?"STAN run plan":uw("STAN run plan"),"mode: "+("sequential"===s?"sequential":"concurrent"),`output: ${a}/`,..."string"==typeof i.prompt&&i.prompt.trim().length?[`prompt: ${i.prompt}`]:[],`scripts: ${o.length?o.join(", "):"none"}`,"archive: "+(i.archive?"yes":"no"),"combine: "+(i.combine?"yes":"no"),"keep output dir: "+(i.keep?"yes":"no"),"live: "+(i.live?"yes":"no"),`hang warn: ${"number"==typeof i.hangWarn?i.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof i.hangKill?i.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof i.hangKillGrace?i.hangKillGrace.toString():"n/a"}s`,...Array.isArray(r.overlayPlan)&&r.overlayPlan.length?["facet view:",...r.overlayPlan.map(e=>` ${e}`)]:[]].join("\n ")}`};var pw,dw,hw,mw,gw={},yw={},bw={},vw={},Dw={exports:{}};function ww(){return dw?pw:(dw=1,pw=({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 _w(){if(mw)return hw;mw=1;const e=ww();return hw=t=>"string"==typeof t?t.replace(e(),""):t,hw}var kw,Ew,Sw,Aw,Cw={exports:{}};function Pw(){if(kw)return Cw.exports;kw=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 Cw.exports=e,Cw.exports.default=e,Cw.exports}function Ow(){return Sw?Ew:(Sw=1,Ew=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 Tw(){if(Aw)return Dw.exports;Aw=1;const e=_w(),t=Pw(),n=Ow(),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 Dw.exports=r,Dw.exports.default=r,Dw.exports}var xw,$w,Nw={};var Lw,Rw,Fw,Iw,Mw,jw,Bw,zw,Hw,Kw,Uw,qw={exports:{}};function Zw(){if(Iw)return Fw;Iw=1;const e=Rw?Lw:(Rw=1,Lw={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"]}};Fw=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]},Fw}function Gw(){if(jw)return Mw;jw=1;const e=Zw();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 Mw=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},Mw}function Ww(){if(zw)return Bw;zw=1;const e=Zw(),t=Gw(),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)})}),Bw=n}function Vw(){return Hw||(Hw=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=Ww());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}})}(qw)),qw.exports}function Jw(){if(Uw)return Kw;Uw=1;const e=Pw(),t=function(){if($w)return xw;$w=1;const e="[\ud800-\udbff][\udc00-\udfff]";return xw=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=Vw(),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 Kw=(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},Kw}var Yw,Qw,Xw,e_,t_={};function n_(){if(Yw)return t_;Yw=1,Object.defineProperty(t_,"__esModule",{value:!0}),t_.getBorderCharacters=void 0;return t_.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+'".')},t_}function r_(){if(Qw)return Nw;Qw=1;var e=Nw&&Nw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nw,"__esModule",{value:!0}),Nw.isCellInRange=Nw.areCellEqual=Nw.calculateRangeCoordinate=Nw.flatten=Nw.extractTruncates=Nw.sumArray=Nw.sequence=Nw.distributeUnevenly=Nw.countSpaceSequence=Nw.groupBySizes=Nw.makeBorderConfig=Nw.splitAnsi=Nw.normalizeString=void 0;const t=e(Jw()),n=e(Tw()),r=e(_w()),s=n_();Nw.normalizeString=e=>e.replace(/\r\n/g,"\n");Nw.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};Nw.makeBorderConfig=e=>({...(0,s.getBorderCharacters)("honeywell"),...e});Nw.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};Nw.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};Nw.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));Nw.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);Nw.sumArray=e=>e.reduce((e,t)=>e+t,0);Nw.extractTruncates=e=>e.columns.map(({truncate:e})=>e);Nw.flatten=e=>[].concat(...e);Nw.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}}};Nw.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return Nw.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,Nw}function s_(){if(Xw)return vw;Xw=1;var e=vw&&vw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vw,"__esModule",{value:!0}),vw.alignString=void 0;const t=e(Tw()),n=r_(),r=(e,t)=>e+" ".repeat(t);return vw.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)},vw}function i_(){if(e_)return bw;e_=1,Object.defineProperty(bw,"__esModule",{value:!0}),bw.alignTableData=void 0;const e=s_();return bw.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)})),bw}var o_,a_={},c_={},u_={},l_={};function f_(){if(o_)return l_;o_=1;var e=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0}),l_.wrapString=void 0;const t=e(Jw()),n=e(Tw());return l_.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},l_}var p_,d_,h_,m_,g_={};function y_(){if(p_)return g_;p_=1;var e=g_&&g_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g_,"__esModule",{value:!0}),g_.wrapWord=void 0;const t=e(Jw()),n=e(_w());return g_.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},g_}function b_(){if(d_)return u_;d_=1,Object.defineProperty(u_,"__esModule",{value:!0}),u_.wrapCell=void 0;const e=r_(),t=f_(),n=y_();return u_.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},u_}function v_(){if(h_)return c_;h_=1,Object.defineProperty(c_,"__esModule",{value:!0}),c_.calculateCellHeight=void 0;const e=b_();return c_.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,c_}function D_(){if(m_)return a_;m_=1,Object.defineProperty(a_,"__esModule",{value:!0}),a_.calculateRowHeights=void 0;const e=v_(),t=r_();return a_.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},a_}var w_,__,k_={},E_={};function S_(){if(w_)return E_;w_=1,Object.defineProperty(E_,"__esModule",{value:!0}),E_.drawContent=void 0;return E_.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("")},E_}function A_(){return __||(__=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=S_();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)}}(k_)),k_}var C_,P_={};function O_(){if(C_)return P_;C_=1,Object.defineProperty(P_,"__esModule",{value:!0}),P_.drawRow=void 0;const e=S_();return P_.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"},P_}var T_,x_,$_,N_,L_,R_,F_={},I_={},M_={},j_={};function B_(){if($_)return j_;$_=1,Object.defineProperty(j_,"__esModule",{value:!0});const e=(x_||(x_=1,T_=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}),T_);return e.code='require("ajv/dist/runtime/equal").default',j_.default=e,j_}function z_(){return N_||(N_=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}B_().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}}(M_)),M_}function H_(){if(L_)return I_;L_=1;var e=I_&&I_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I_,"__esModule",{value:!0}),I_.validateConfig=void 0;const t=e(z_());return I_.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.")}},I_}function K_(){if(R_)return F_;R_=1,Object.defineProperty(F_,"__esModule",{value:!0}),F_.makeStreamConfig=void 0;const e=r_(),t=H_(),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 F_.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)}},F_}var U_,q_={};function Z_(){return U_||(U_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=r_(),n=b_(),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)}}(q_)),q_}var G_,W_={};function V_(){return G_||(G_=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)}))}(W_)),W_}var J_,Y_={};function Q_(){if(J_)return Y_;J_=1,Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.stringifyTableData=void 0;const e=r_();return Y_.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),Y_}var X_,ek,tk,nk={},rk={exports:{}};function sk(){return X_||(X_=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 yg&&yg&&yg.Object===Object&&yg,O="object"==typeof self&&self&&self.Object===Object&&self,T=P||O||Function("return this")(),x=t&&!t.nodeType&&t,$=x&&e&&!e.nodeType&&e,N=$&&$.exports===x&&P.process,L=function(){try{return N&&N.binding("util")}catch(e){}}(),R=L&&L.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=T.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=R?(G=R,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}}(rk,rk.exports)),rk.exports}function ik(){return ek||(ek=1,function(e){var t=nk&&nk.__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(sk());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])))}(nk)),nk}function ok(){if(tk)return yw;tk=1,Object.defineProperty(yw,"__esModule",{value:!0}),yw.createStream=void 0;const e=i_(),t=D_(),n=A_(),r=O_(),s=K_(),i=Z_(),o=V_(),a=Q_(),c=ik(),u=r_(),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 yw.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)}}},yw}var ak,ck={},uk={};function lk(){if(ak)return uk;ak=1,Object.defineProperty(uk,"__esModule",{value:!0}),uk.calculateOutputColumnWidths=void 0;return uk.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),uk}var fk,pk={};function dk(){if(fk)return pk;fk=1,Object.defineProperty(pk,"__esModule",{value:!0}),pk.drawTable=void 0;const e=A_(),t=S_(),n=O_(),r=r_();return pk.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})},pk}var hk,mk={};function gk(){if(hk)return mk;hk=1,Object.defineProperty(mk,"__esModule",{value:!0}),mk.injectHeaderConfig=void 0;return mk.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]},mk}var yk,bk={},vk={};function Dk(){return yk||(yk=1,function(e){var t=vk&&vk.__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(Tw()),r=r_();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}}(vk)),vk}var wk,_k={},kk={};function Ek(){if(wk)return kk;wk=1;var e=kk&&kk.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kk,"__esModule",{value:!0}),kk.alignVerticalRangeContent=kk.wrapRangeContent=void 0;const t=e(Tw()),n=s_(),r=Z_(),s=V_(),i=ik(),o=r_(),a=b_();kk.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 kk.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)},kk}var Sk,Ak={};function Ck(){if(Sk)return Ak;Sk=1,Object.defineProperty(Ak,"__esModule",{value:!0}),Ak.calculateSpanningCellWidth=void 0;const e=r_();return Ak.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},Ak}var Pk,Ok,Tk={};function xk(){if(Pk)return Tk;Pk=1,Object.defineProperty(Tk,"__esModule",{value:!0}),Tk.makeRangeConfig=void 0;const e=r_();return Tk.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}},Tk}function $k(){if(Ok)return _k;Ok=1,Object.defineProperty(_k,"__esModule",{value:!0}),_k.createSpanningCellManager=void 0;const e=Ek(),t=Ck(),n=xk(),r=r_(),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 _k.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)))}}},_k}var Nk,Lk,Rk={};function Fk(){if(Nk)return Rk;Nk=1,Object.defineProperty(Rk,"__esModule",{value:!0}),Rk.validateSpanningCellConfig=void 0;const e=r_(),t=(e,t,n)=>e<=n&&n<=t;return Rk.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})})})},Rk}function Ik(){if(Lk)return bk;Lk=1,Object.defineProperty(bk,"__esModule",{value:!0}),bk.makeTableConfig=void 0;const e=Dk(),t=$k(),n=r_(),r=H_(),s=Fk();return bk.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})}},bk}var Mk,jk,Bk={};function zk(){if(Mk)return Bk;Mk=1,Object.defineProperty(Bk,"__esModule",{value:!0}),Bk.validateTableData=void 0;const e=r_();return Bk.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.")}},Bk}function Hk(){if(jk)return ck;jk=1,Object.defineProperty(ck,"__esModule",{value:!0}),ck.table=void 0;const e=i_(),t=lk(),n=D_(),r=dk(),s=gk(),i=Ik(),o=Z_(),a=V_(),c=Q_(),u=ik(),l=r_(),f=zk();return ck.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)},ck}var Kk,Uk,qk={};function Zk(){return Kk||(Kk=1,Object.defineProperty(qk,"__esModule",{value:!0})),qk}function Gk(){return Uk||(Uk=1,function(e){var t=gw&&gw.__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=gw&&gw.__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=ok();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const s=n_();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return s.getBorderCharacters}});const i=Hk();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return i.table}}),n(Zk(),e)}(gw)),gw}var Wk=Gk();const Vk=e=>e.toString().padStart(2,"0"),Jk=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${Vk(n)}:${Vk(r)}`},Yk=e=>{if(tw()){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 cw("⚠︎ warn");case"waiting":return aw("⏸︎ waiting");case"run":return sw("▶︎ run");case"ok":return nw("✔︎ ok");case"error":return iw("✖︎ fail");case"cancelled":return ow("◼︎ cancelled");case"timeout":return iw("⏱︎ timeout");case"quiet":return rw("⏱︎ quiet");case"stalled":return cw("⏱︎ stalled");case"killed":return iw("◼︎ killed");default:return""}},Qk=e=>e.replace(/\\/g,"/"),Xk=(e,t)=>{if(!t)return"";const n=t;return d.isAbsolute(n)?Qk(d.relative(e,n)):Qk(n)},eE=e=>{const{state:t,cwd:n,now:r}=e,s=(e=>{switch(e.kind){case"warn":return"warn";case"waiting":default:return"waiting";case"running":return"run";case"quiet":return"quiet";case"stalled":return"stalled";case"done":return"ok";case"error":return"error";case"timedout":return"timeout";case"cancelled":return"cancelled";case"killed":return"killed"}})(t);let i="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:(r??Date.now)();i=Jk(Math.max(0,(r??Date.now)()-e))}else"number"==typeof t.durationMs&&(i=Jk(Math.max(0,t.durationMs)));const o="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?Xk(n,t.outputPath):"";return{label:Yk(s),time:i,output:o}},tE=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,nE=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","killed"].includes(n.kind)&&(t.fail+=1);return t},rE=e=>{const{rows:t,startedAt:n,boring:r,uiId:s,includeHint:i}=e,o=["Type","Item","Status","Time","Output"].map(e=>uw(e)),a=[];if(a.push(o),0===t.length){const e=Jk(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state,n=eE({state:t,cwd:process.cwd(),now:()=>Date.now()});a.push([e.type,e.item,n.label,n.time,n.output])}const c=(e=>Wk.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,aw(`⏸︎ ${t.waiting.toString()}`),sw(`▶︎ ${t.running.toString()}`),rw(`⏱︎ ${t.quiet.toString()}`),cw(`⏱︎ ${t.stalled.toString()}`),iw(`⏱︎ ${t.timeout.toString()}`),nw(`✔︎ ${t.ok.toString()}`),cw(`⚠︎ ${t.warn.toString()}`),iw(`✖︎ ${t.fail.toString()}`),ow(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(Jk(Date.now()-n),nE(t.map(e=>({state:e.state}))),r),l=i?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${lw("Press")} ${uw("q")} ${lw("to cancel,")} ${uw("r")} ${lw("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},sE="[",iE=`${sE}?25l`,oE=`${sE}?25h`,aE=`${sE}K`,cE=e=>e>0?`${sE}${String(e)}F`:"",uE=`${sE}1E`,lE=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(iE)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=cE(t));for(let e=0;e<n.length;e+=1){const s=n[e]??"";r+=0===t&&0===e&&""===s?"\n":`\r${aE}${s}\n`}const s=t-n.length;for(let e=0;e<s;e+=1)r+=`\r${aE}`,e<s-1&&(r+=uE);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=cE(t));for(let e=0;e<t;e+=1)n+=`\r${aE}\n`;e.write(n),t=0}catch{}},done(){try{e.write(oE)}catch{}}}},fE=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),pE=(e,t,n)=>{if(fE)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},dE={get enabled(){return fE},renderer:{start(e){pE("renderer","start()",e)},update(e){pE("renderer","update()",e)},render(e){pE("renderer","render()",e)},headerOnly(e){pE("renderer","render(header-only)",e)},flush(){pE("renderer","flush()")},clear(){pE("renderer","clear()")},stop(){pE("renderer","stop()")},done(){pE("renderer","stop():done()")}},ui:{start(){pE("UI","start()")},installCancellation(){pE("UI","installCancellation(): control.attach()")},onCancelled(e){pE("UI","onCancelled()",{mode:e})},stop(){pE("UI","stop() -> sink.stop()")}},session:{info(e,t){pE("session",e,t)},exitHook(){pE("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}};let hE=1;const mE=()=>Date.now();class gE{rows=new Map;opts;frameNo=0;timer;startedAt=mE();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=hE++}resetElapsed(){this.startedAt=mE(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),dE.renderer.stop(),dE.renderer.done(),this.writer?.done()}flush(){dE.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){dE.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=lE()),this.writer.start(),this.timer=setInterval(()=>{this.render()},this.opts.refreshMs))}clear(){dE.renderer.clear(),this.writer?.clear()}stop(){dE.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,dE.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),s=n??tE(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}}),dE.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=mE();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=rE({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=rE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,dE.enabled)try{const e=nE(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);dE.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}var yE,bE;var vE=function(){if(bE)return yE;bE=1;var e=N,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 yE=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)})}}}(),DE=bg(vE);class wE{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)&&DE(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=[]}}class _E{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{dE.session.info("restart: detach keys")}catch{}}}let kE=null;function EE(e){return kE===e}const SE=(e,n)=>{const r=n.PATH??n.Path??"",s=(e=>{const n=[];let r=e;for(;;){const e=g(r,"node_modules",".bin");try{t(e)&&n.push(e)}catch{}const s=m(r);if(s===r)break;r=s}return n})(e);return{...n,PATH:[...s,r].filter(Boolean).join(y)}},AE=async(e,t,n,r,i,o,c,u,l)=>{const p=h(t,`${r}.txt`),d=Date.now();c?.onStart?.(r);const m=s(p,{encoding:"utf8"}),g=E(i,{cwd:e,shell:!0,windowsHide:!0,env:SE(e,process.env)}),y="1"===process.env.STAN_DEBUG;let b="";const v="number"==typeof u?.hangWarn&&u.hangWarn>0?u.hangWarn:0,D="number"==typeof u?.hangKill&&u.hangKill>0?u.hangKill:0,w="number"==typeof u?.hangKillGrace&&u.hangKillGrace>0?u.hangKillGrace:10;let _,k,S=Date.now(),A=!1,C=!1;try{"number"==typeof g.pid&&l&&l.track(`script:${r}`,g.pid)}catch{}g.stdout.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stdout.write(e),S=Date.now()}),g.stderr.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stderr.write(e),S=Date.now()}),(v>0||D>0)&&(_=setInterval(()=>{const e=Date.now()-S;if(!A&&v>0&&e>=1e3*v&&(A=!0,c?.onHangWarn?.(r,v)),!C&&D>0&&e>=1e3*D){C=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}c?.onHangTimeout?.(r,D);const e=Math.max(0,1e3*w);k=setTimeout(()=>{try{"number"==typeof g.pid&&DE(g.pid,"SIGKILL")}catch{}c?.onHangKilled?.(r,w)},e)}},1e3));const P=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 O="ok";if("number"==typeof P&&0!==P)O="error";else if(u?.warnPatterns&&u.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let t=!1;if(b.length>0&&e(u.warnPatterns,b))t=!0;else try{const n=await a(p,"utf8");e(u.warnPatterns,n)&&(t=!0)}catch{}t&&(O="warn")}return c?.onEnd?.(r,p,d,Date.now(),P,O),o&&await f(o,r.slice(0,1).toUpperCase(),"utf8"),p},CE=()=>{let e=0;return(()=>{try{const e=process.env.CI,t=("string"==typeof e?e:"").trim().toLowerCase();return""!==t&&"0"!==t&&"false"!==t}catch{return!1}})()&&(e+=25),"win32"!==process.platform&&(e+=10),25+e},PE=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?s.script:"",p=s&&"object"==typeof s&&"warnPattern"in s?((e,t)=>{if("string"!=typeof e||!e.trim())return[];const n=e.trim(),r=[],s=(e,t)=>{try{r.push(new RegExp(e,t))}catch{}};if("string"==typeof t&&t.length>0){s(n,t);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e,t)}else{s(n);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e),s(n,"i")}return r})(s.warnPattern,s.warnPatternFlags):[],d=await AE(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 AD(),!u())break;if(await t(CE()),!u())break;if(await AD(),!u())break}if(await p(e),"function"==typeof u){if(await AD(),!u())break;if(await t(Math.max(5,CE()/2)),!u())break;if(await AD(),!u())break}}else{const e="function"==typeof u?s.filter(()=>u()):s;await Promise.all(e.map(e=>p(e).then(()=>{})))}return f},OE=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=PE(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)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ stalled "${e}" after ${t.toString()}s of inactivity`)}catch{}})(e,t))},onHangTimeout:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ timeout "${e}" after ${t.toString()}s; sending SIGTERM`)}catch{}})(e,t))},onHangKilled:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ◼ killed "${e}" after ${t.toString()}s grace`)}catch{}})(e,t))}},{hangWarn:h,hangKill:m,hangKillGrace:g},f,p).then(e=>{y.push(...e)});return await b.catch(()=>{}),y},TE=[];TE.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&TE.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&TE.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const xE=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,$E=Symbol.for("signal-exit emitter"),NE=globalThis,LE=Object.defineProperty.bind(Object);class RE{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(NE[$E])return NE[$E];LE(NE,$E,{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 FE{}const IE=globalThis.process,{onExit:ME}=(jE=xE(IE)?new class extends FE{#e="win32"===IE.platform?"SIGINT":"SIGHUP";#t=new RE;#n;#r;#s;#i={};#o=!1;constructor(e){super(),this.#n=e,this.#i={};for(const t of TE)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(!xE(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 TE)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,TE.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 xE(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&&xE(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)}}(IE):new class extends FE{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>jE.onExit(e,t),load:()=>jE.load(),unload:()=>jE.unload()});var jE;const BE=(e,t)=>{try{dE.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,ME(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{dE.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{dE.session.info("uninstall exit hook"),n()}catch{}}},zE=(e,t)=>d.join(e,t,"system",".docs.meta.json"),HE=async e=>k("sha256").update(await a(e)).digest("hex"),KE=async(e,t,n)=>{if(n&&"object"==typeof n)try{await(async e=>{const{cwd:t,stanPath:n,map:r,onStage:s}=e;if(!r||"object"!=typeof r)return;const o=ac(t,n),a=d.join(o.rootAbs,"imports");await b(a);const c=Object.keys(r).sort();for(const e of c){const n=r[e]??[];if(!Array.isArray(n)||0===n.length)continue;const o=Cf(e);if(!o)continue;const c=d.join(a,o);await u(c,{recursive:!0,force:!0}).catch(()=>{}),await b(c).catch(()=>{});const l=[];for(const e of n){const n=e.trim();if(!n)continue;const r=Sf(n.replace(/\\/g,"/"));try{const e=await kf(n,{cwd:t,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const n of e){if(!await Pf(n))continue;const e=d.relative(d.isAbsolute(r)?r:d.resolve(t,r),n).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const s=d.join(c,e);await b(d.dirname(s)).catch(()=>{});try{await i(n,s),l.push(s)}catch{}}}catch{}}try{"function"==typeof s&&s(o,l.map(e=>d.relative(t,e).replace(/\\/g,"/")))}catch{}}})({cwd:e,stanPath:t,map:n})}catch{}},UE=async e=>{try{const t=await o(e,{withFileTypes:!0}),n=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(t.map(async t=>{n.has(t.name)||await u(h(e,t.name),{recursive:!0,force:!0})}))}catch{}},qE=async(e,t)=>{const n=d.join(e,t,"patch");try{const e=await o(n,{withFileTypes:!0});await Promise.all(e.map(e=>u(h(n,e.name),{recursive:!0,force:!0})))}catch{}},ZE=e=>"diff"===e?"archive (diff)":"archive";var GE=Object.freeze({__proto__:null,archivePhase:async(e,n)=>{const{cwd:r,config:s,includeOutputs:o}=e,a=Boolean(n?.silent),c=n?.which??"both",l=!1!==n?.stage,f=!1!==n?.cleanup,p=((e,t)=>{const n=d.join(e,t),r=d.join(n,"system");return{base:n,system:r,output:d.join(n,"output"),diff:d.join(n,"diff"),patch:d.join(n,"patch"),systemFile:d.join(r,"stan.system.md")}})(r,s.stanPath),m="function"==typeof n?.shouldContinue?n.shouldContinue:void 0;let g,y;a||"both"!==c&&"full"!==c||console.log(`stan: start "${rw("archive")}"`);try{if(l){if(m&&!m())return{archivePath:g,diffPath:y};await KE(r,s.stanPath,s.imports)}if("both"===c||"full"===c){if(m&&!m())return{archivePath:g,diffPath:y};n?.progress?.start?.("full");const e=Date.now();if(g=await(async(e,n,r={})=>{const{includeOutputDir:s=!1,fileName:o,includes:a=[],excludes:c=[],anchors:u=[]}=r;let l=o??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:f,diffDir:p}=await be(e,n),d=await de(e),m=await ge(d,{cwd:e,stanPath:n,includeOutputDir:s,includes:a,excludes:c,anchors:u}),g=h(f,l),y=h(p,I);if(t(g))try{await i(g,y)}catch{}const b=await(async()=>{try{const e=await import("./classifier-DeYwffC_-C7wwqop3.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:v,warningsBody:D}=await b(e,m),w=v;U(D,r.onArchiveWarnings);const _=await import("./index-ucZa1KMb-DZqceYU7.js");if(s?await _.create({file:g,cwd:e,filter:H(n)},K(w,n)):await _.create({file:g,cwd:e,filter:H(n)},w),!t(y))try{await i(g,y)}catch{}return g})(r,s.stanPath,{includeOutputDir:o,includes:s.includes??[],excludes:s.excludes??[],anchors:s.anchors??[]}),n?.progress?.done?.("full",g,e,Date.now()),m&&!m()){try{await u(g,{force:!0})}catch{}return{archivePath:void 0,diffPath:y}}a||console.log(`stan: ${nw("done")} "${rw("archive")}" -> ${rw(g.replace(/\\/g,"/"))}`)}if(a||"both"!==c&&"diff"!==c||console.log(`stan: start "${rw("archive (diff)")}"`),"both"===c||"diff"===c){if(m&&!m())return{archivePath:g,diffPath:y};n?.progress?.start?.("diff");const e=Date.now();if(y=(await lc({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:s.includes??[],excludes:s.excludes??[],anchors:s.anchors??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:o})).diffPath,n?.progress?.done?.("diff",y,e,Date.now()),m&&!m()){try{await u(y,{force:!0})}catch{}return{archivePath:g,diffPath:void 0}}a||console.log(`stan: ${nw("done")} "${rw("archive (diff)")}" -> ${rw(y.replace(/\\/g,"/"))}`)}}finally{}return f&&(o&&await UE(p.output),await qE(r,s.stanPath)),{archivePath:g,diffPath:y}},archivePrintable:ZE,cleanupOutputsAfterCombine:UE,cleanupPatchDirAfterArchive:qE,stageImports:KE});const WE=async e=>{const{cwd:t,stanPath:n,promptAbs:r}=e;let s,i=!1;try{r&&(s=await HE(r))}catch{s=void 0}try{const e=await(async(e,t)=>{try{const n=await a(zE(e,t),"utf8"),r=JSON.parse(n);if(r&&"object"==typeof r)return r}catch{}return null})(t,n),r=e?.prompt&&"object"==typeof e.prompt?e.prompt.hash:void 0;r&&s?i=r!==s:r&&s||(i=!1)}catch{i=!1}return i},VE=()=>{try{const e=(()=>{const e=(()=>{try{const e=D(import.meta.url);return we({cwd:d.dirname(e)})??null}catch{return null}})();if(!e)return null;const n=d.join(e,"dist","stan.system.md");return t(n)?n:null})();if(e&&t(e))return e}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core");let n=d.dirname(e);for(let e=0;e<10;e+=1){if("stan-core"===d.basename(n)){const e=d.join(n,"dist","stan.system.md");if(t(e))return e;break}const e=d.dirname(n);if(e===n)break;n=e}}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core/dist/stan.system.md");if(e&&t(e))return e}catch{}return null},JE=e=>d.join(e,"system","stan.system.md"),YE=async e=>{const t=await a(e);return Buffer.from(t)},QE=(e,n,r)=>{const s=d.join(e,JE(n)),i=VE();if("local"===r){if(!t(s))throw new Error(`system prompt not found at ${d.join(n,"system","stan.system.md").replace(/\\/g,"/")}`);return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"}}if("core"===r){if(!i||!t(i))throw new Error("packaged system prompt not found in @karmaniverous/stan-core");return{abs:i,display:`@karmaniverous/stan-core@${Of}`,kind:"core"}}if("auto"===r){if(t(s))return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"};if(i&&t(i))return{abs:i,display:`@karmaniverous/stan-core@${Of}`,kind:"core"};try{const e=(()=>{try{const e=D(import.meta.url);let n=d.dirname(e);for(let e=0;e<8;e+=1){const e=d.join(n,"dist"),r=d.join(e,"stan.system.md");if(t(r))return r;const s=d.dirname(n);if(s===n)break;n=s}}catch{}return null})();if(e&&t(e))return{abs:e,display:e.replace(/\\/g,"/"),kind:"path"}}catch{}throw new Error("unable to resolve system prompt (auto: local and core unavailable)")}const o=d.isAbsolute(r)?r:d.join(e,r);if(!t(o))throw new Error(`system prompt not found at ${o.replace(/\\/g,"/")}`);return{abs:o,display:o.replace(/\\/g,"/"),kind:"path"}},XE=async e=>{const{cwd:n,stanPath:r,promptAbs:s,promptDisplay:i}=e;try{const{restore:e}=await(async(e,n,r)=>{const s=d.join(e,JE(n)),i=d.dirname(s),o=t(s);let a=null;if(o)try{a=await YE(s)}catch{a=null}const l=await YE(r.abs),f=o&&null!==a&&a.length===l.length&&a.equals(l);return f||(await p(i,{recursive:!0}),await c(s,l)),{changed:!f,restore:async()=>{if(!f)try{o&&null!==a?await c(s,a):await u(s,{force:!0})}catch{}}}})(n,r,{abs:s,display:i,kind:"path"});return e}catch(e){throw new Error(e instanceof Error?e.message:String(e))}},eS=async e=>{const{cwd:t,stanPath:n,behavior:r,promptAbs:s,promptDisplay:i,baseFull:o,baseDiff:a,archivePhase:c,stageImports:u,preparePrompt:l,prepareIfNeeded:f,shouldContinue:p,progress:d,ephemeral:h,includeOnChange:m,importsMap:g}=e,y=[],b=Boolean(r.combine);if(h&&"function"==typeof u){if("function"==typeof p&&!p())return y;await u(t,n,(e=>{if(!e)return e;const t={};for(const[n,r]of Object.entries(e))Array.isArray(r)&&(t[n]=r);return Object.keys(t).length?t:null})(g))}const v=async()=>{if("function"==typeof p&&!p())return;const e=!1===m?{...a,excludes:[...a.excludes??[],(r=`${n}/system/stan.system.md`,r.replace(/\\+/g,"/"))]}:a;var r;const s=await c({cwd:t,config:e,includeOutputs:b},{silent:!0,which:"diff",progress:d,shouldContinue:p});s.diffPath&&y.push(s.diffPath)},D=async()=>{if("function"==typeof p&&!p())return;const e=await c({cwd:t,config:o,includeOutputs:b},{silent:!0,which:"full",progress:d,shouldContinue:p});e.archivePath&&y.push(e.archivePath)};if(h){if(!s||"function"!=typeof l)return y;if(m){const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:i});try{await v(),await D()}finally{await e().catch(()=>{})}return y}await v();const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:i});try{await D()}finally{await e().catch(()=>{})}return y}const w="function"==typeof f?await f({cwd:t,stanPath:n,promptAbs:s,promptDisplay:i}):null;try{await v(),await D()}finally{await(w?.().catch(()=>{}))}return y};var tS=Object.freeze({__proto__:null,runArchiveStage:async e=>{const{cwd:t,config:n,behavior:r,ui:s,promptAbs:i,promptDisplay:o,promptSource:u}=e,l="function"==typeof e.shouldContinue?e.shouldContinue:()=>!0,f=[];if(!l())return{created:f,cancelled:!0};const p=(()=>{const e=GE,t=e.archivePhase;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.archivePhase;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof GE)return GE;throw new Error("archivePhase not found")})(),h=(()=>{const e=GE,t=e.stageImports;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.stageImports;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof GE)return GE;throw new Error("stageImports not found")})(),m=d.join(t,n.stanPath,"system","stan.system.md"),{full:g,diff:y}=(e=>({full:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports,anchors:e.anchors??[]},diff:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports}}))(n),v=((e,t)=>({start:t=>{e.onArchiveStart(t)},done:(n,r,s,i)=>{e.onArchiveEnd(n,r,t,s,i)}}))(s,t),D=async()=>{try{if(!i||!u)return;const e=await HE(i);await(async(e,t,n)=>{const r=zE(e,t);let s={};try{const e=await a(r,"utf8"),t=JSON.parse(e);t&&"object"==typeof t&&(s=t)}catch{s={}}const i={...s,prompt:{...s.prompt??{},...n}};await b(d.dirname(r)),await c(r,JSON.stringify(i,null,2),"utf8")})(t,n.stanPath,{source:u,hash:e,path:i})}catch{}},w=((e,t)=>{if(!t)return!1;try{return d.resolve(t)!==d.resolve(e)}catch{return!0}})(m,i);if(w){if(!l())return{created:f,cancelled:!0};let e=!0;try{e=await WE({cwd:t,stanPath:n.stanPath,promptAbs:i})}catch{e=!0}try{const s=await eS({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:i,promptDisplay:o,baseFull:g,baseDiff:y,archivePhase:p,stageImports:async(e,t,n)=>{try{await h(e,t,n)}catch{}},preparePrompt:({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>XE({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}),shouldContinue:l,progress:v,ephemeral:!0,includeOnChange:e,importsMap:n.imports});return f.push(...s),await D(),{created:f,cancelled:!1}}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{s.stop()}catch{}return{created:f,cancelled:!0}}}try{if(!l())return{created:f,cancelled:!0};const e=await eS({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:i,promptDisplay:o,baseFull:g,baseDiff:y,archivePhase:p,prepareIfNeeded:async({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>n?XE({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}):null,shouldContinue:l,progress:v,ephemeral:!1});return f.push(...e),await D(),{created:f,cancelled:!1}}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{s.stop()}catch{}return{created:f,cancelled:!0}}}});const nS=async e=>{const t=h(e,"archive.tar"),n=h(e,"archive.diff.tar");await Promise.allSettled([u(t,{force:!0}),u(n,{force:!0})])},rS=async e=>new Promise(t=>setTimeout(t,Math.max(0,e))),sS=()=>"win32"===process.platform,iS=async e=>{const{created:n,ui:r,supervisor:s,detachSignals:i,liveEnabled:o,outAbs:a}=e,c=h(a,"archive.tar"),u=h(a,"archive.diff.tar"),l=()=>!t(c)&&!t(u),f=async()=>{await nS(a).catch(()=>{})};if(await f(),!l()){const e=sS()?10:6;for(let t=0;t<e&&(await rS(sS()?200:40),await f(),!l());t+=1);try{await rS(sS()?120:25)}catch{}}try{r.stop()}catch{}if(o)try{console.log("")}catch{}try{await s.waitAll(3e3)}catch{}(()=>{try{process.stdin.pause?.()}catch{}})();try{await rS(sS()?160:40)}catch{}try{i()}catch{}return{created:n,cancelled:!0,restartRequested:!1}};async function oS(e,t){return e.isCancelled()&&!e.isRestart()?await iS(t):e.isRestart()?(e=>{try{e.detachSignals()}catch{}return{created:e.created,cancelled:!0,restartRequested:!0}})({created:t.created,detachSignals:t.detachSignals}):null}async function aS(e){const{cancelCtl:t,deps:n,cwd:r,config:s,behavior:i,ui:o,promptAbs:a,promptDisplay:c,supervisor:l}=e,f=await async function(e,t){try{await AD()}catch{}const n=await oS(e,t);if(n)return n;try{await rS(sS()?300:30)}catch{}return oS(e,t)}(t,{created:n.created,ui:n.ui,supervisor:l,detachSignals:n.detachSignals,liveEnabled:!0,outAbs:n.outAbs});if(f)return{short:f};const p=(()=>{const e=tS,t=e.runArchiveStage,n=e.default?.runArchiveStage,r="function"==typeof t?t:"function"==typeof n?n:void 0;if(!r)throw new Error("runArchiveStage not found");return r})(),d=await p({cwd:r,config:s,behavior:i,ui:o,promptAbs:a,promptDisplay:c,shouldContinue:()=>!t.isCancelled()});if(d.cancelled)return{short:{created:n.created,cancelled:!0,restartRequested:!0}};if(t.isCancelled()&&!t.isRestart()){await Promise.all(d.created.map(e=>u(e,{force:!0}))).catch(()=>{}),await nS(n.outAbs).catch(()=>{});try{n.detachSignals()}catch{}return{short:{created:n.created,cancelled:!0,restartRequested:!1}}}return{added:d.created}}async function cS(e,t){const n=await oS(e,t);if(n)return n;const r=await async function(e,t){try{await AD()}catch{}return oS(e,t)}(e,t);if(r)return r;const s=await async function(e,t){try{await rS(sS()?25:process.env.CI?20:10),await AD()}catch{}return oS(e,t)}(e,t);return s}function uS(e){const{cwd:t,config:n,selection:r,mode:s,behavior:i,ui:o,planBody:a,printPlan:c,promptChoice:u}=e;let l="",f=null,p=null;try{const e=((e,t,n)=>{const r=(n??"auto").trim(),s=QE(e,t,r);return{display:"auto"===r?`auto → ${s.display}`:s.display,abs:s.abs,kind:s.kind}})(t,n.stanPath,u);l=e.display,f=e.abs,p=e.kind;try{if("1"===process.env.STAN_DEBUG){const t=e.kind||"path",n=(f||"").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: warn: proceeding without resolved system prompt (${t})`),console.log(""),l="auto (unresolved)",f=null,p=null}if(c&&a)try{((e,t)=>{const{selection:n,config:r,mode:s,behavior:i,planBody:o,ui:a,promptDisplay:c}=t;try{const e=fw(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:r,config:n,mode:s,behavior:i,planBody:a,ui:o,promptDisplay:l})}catch{}return{display:l,abs:f,source:p}}function lS(e){const{ui:t,selection:n,config:r,includeArchives:s,cancelCtl:i}=e,o=((e,t,n,r)=>{const s=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of s)try{e.onScriptQueued(t)}catch{}if(r){try{e.onArchiveQueued("full")}catch{}try{e.onArchiveQueued("diff")}catch{}}return s})(t,n,r,s);i.markQueued(o);try{const e=t.flushNow;"function"==typeof e&&e()}catch{}return o}const fS="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,pS=async e=>{const{cwd:t,config:n,selection:r,mode:s,behavior:i,liveEnabled:o,planBody:a,printPlan:u,ui:l,promptChoice:f}=e,p=function(){const e=Symbol("session-epoch");return kE=e,e}(),d=h(t,n.stanPath,"output"),m=h(n.stanPath,"output").replace(/\\/g,"/"),g=await(async(e,t,n)=>{if(!e)return;const r=h(t,"order.txt");return n||await c(r,"","utf8"),r})(fS,d,Boolean(i.keep)),{display:y,abs:b}=uS({cwd:t,config:n,selection:r,mode:s,behavior:i,ui:l,planBody:a,printPlan:u,promptChoice:f});!function(e){e.start();try{const t=e.flushNow;"function"==typeof t&&t()}catch{}}(l);const v=new wE({hangWarn:i.hangWarn,hangKill:i.hangKill,hangKillGrace:i.hangKillGrace}),D=new _E(l,v);try{l.installCancellation(()=>{D.triggerCancel()},o?()=>{D.triggerRestart()}:void 0)}catch{}const w=BE(()=>{D.triggerCancel()},async()=>{dE.session.exitHook();try{l.stop()}catch{}try{v.cancelAll({immediate:!0})}catch{}try{await v.waitAll(3e3)}catch{}try{const e=process.stdin.pause;"function"==typeof e&&e()}catch{}});!function(e){try{const t=e.prepareForNewSession;"function"==typeof t&&t()}catch{}}(l);const _=lS({ui:l,selection:r,config:n,includeArchives:Boolean(i.archive),cancelCtl:D}),k=[];if(_.length>0){const e=await OE({cwd:t,outAbs:d,outRel:m,config:n,toRun:_,mode:s,orderFile:g,ui:l,epoch:p,isActive:EE,shouldContinue:()=>!D.isCancelled(),supervisor:v,liveEnabled:o,hangWarn:i.hangWarn,hangKill:i.hangKill,hangKillGrace:i.hangKillGrace});k.push(...e)}const E={created:k,ui:l,supervisor:v,detachSignals:w,liveEnabled:o,outAbs:d},S=await cS(D,E);if(S)return S;if(i.archive){const{short:e,added:r}=await aS({cancelCtl:D,deps:E,cwd:t,config:n,behavior:i,ui:l,promptAbs:b,promptDisplay:y,supervisor:v});if(e)return e;r?.length&&k.push(...r)}await(async()=>{try{const e="win32"===process.platform?140:process.env.CI?25:15;await new Promise(t=>setTimeout(t,e)),await AD()}catch{}})(),await(async e=>{try{await AD()}catch{}try{const t=e.flushNow;"function"==typeof t&&t()}catch{}})(l),dE.session.info("normal path: detach signals, returning to caller");try{w()}catch{}return{created:k,cancelled:!1,restartRequested:!1}};class dS{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),r=t&&n;if(r)try{R(e);const t=e.setRawMode;"function"==typeof t&&t(!0);const n=e.resume;"function"==typeof n&&n()}catch{}if(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{}},r){const t=e.on;"function"==typeof t&&t("keypress",this.keyHandler)}const s=e.on;"function"==typeof s&&s("data",this.dataHandler)}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off,n=e.removeListener,r="function"==typeof t?t.bind(e):"function"==typeof n?n.bind(e):null;try{r&&"function"==typeof this.keyHandler&&r("keypress",this.keyHandler),r&&"function"==typeof this.dataHandler&&r("data",this.dataHandler)}catch{}try{const t=e.setRawMode;"function"==typeof t&&t(!1);const n=e.pause;"function"==typeof n&&n()}catch{}}}class hS{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=tE(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 nE(Array.from(this.rows.values()).map(e=>({state:e.state})))}}class mS{model;constructor(e){this.model=e}unsub;subscribeModel(){this.unsub||(this.unsub=this.model.subscribe(e=>{try{this.onUpdate(e.key,e.meta,e.state)}catch{}}))}unsubscribeModel(){try{this.unsub?.()}catch{}this.unsub=void 0}}class gS extends mS{opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;stopped=!1;constructor(e,t){super(e),this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new gE({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.subscribeModel())}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;e&&"function"==typeof e.finalize&&(this.dbg("stop() finalize(full)"),e.finalize())}catch{}this.unsubscribeModel()}}flushNow(){try{this.renderer&&this.renderer.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()");const e=this.renderer;e&&"function"==typeof e.resetRows&&e.resetRows()}catch{}}resetElapsed(){try{const e=this.renderer;e&&"function"==typeof e.resetElapsed&&e.resetElapsed()}catch{}}cancelPending(){this.dbg("cancelPending()");try{const e=this.renderer;e&&"function"==typeof e.cancelPending&&e.cancelPending()}catch{}}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer&&this.renderer.update(`${t.type}:${t.item}`,n,t)}}class yS extends mS{cwd;constructor(e,t){super(e),this.cwd=t}start(){this.subscribeModel()}stop(){this.unsubscribeModel()}onUpdate(e,t,n){const r=t.item,s="archive"===t.type?ZE("diff"===r?"diff":"full"):r,i=eE({state:n,cwd:this.cwd});if("waiting"!==n.kind)if("running"!==n.kind)if("warn"!==n.kind){if("done"===n.kind||"error"===n.kind){const e="done"===n.kind,t=i.label,r=e?"":" (exit 1)",o=i.output||"";return void console.log(`stan: ${t} "${s}" -> ${o}${r}`)}}else console.log(`stan: ${i.label} "${s}" -> ${i.output}`);else console.log(`stan: ${i.label} "${s}"`);else console.log(`stan: ${i.label} "${s}"`)}}const bS=(e,t)=>{e.update(`script:${t}`,{kind:"waiting"},{type:"script",item:t})},vS=(e,t)=>{e.update(`script:${t}`,{kind:"running",startedAt:Date.now()},{type:"script",item:t})},DS=(e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:n})},wS=(e,t)=>{const n=Boolean(t?.useDurations);return{onScriptEnd:(t,r,s,i,o,a,c)=>{const u=Xk(s,r);((e,t,n,r,s,i,o)=>{const a="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0,c="error"===o||"number"==typeof i&&0!==i?{kind:"error",durationMs:a,outputPath:n}:"warn"===o?{kind:"warn",durationMs:a,outputPath:n}:{kind:"done",durationMs:a,outputPath:n};e.update(`script:${t}`,c,{type:"script",item:t})})(e,t,u,n?i:void 0,n?o:void 0,n?a:void 0,c)},onArchiveEnd:(t,r,s,i,o)=>{const a=Xk(s,r);((e,t,n,r,s)=>{const i="diff"===t?"diff":"full",o="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0;e.update(`archive:${i}`,{kind:"done",durationMs:o,outputPath:n},{type:"archive",item:i})})(e,t,a,n?i:void 0,n?o:void 0)}}};var _S=Object.freeze({__proto__:null,LiveUI:class{opts;renderer=null;control=null;model=new hS;sink;forwards=wS(this.model,{useDurations:!0});stopped=!1;constructor(e){this.opts=e,this.sink=new gS(this.model,{boring:Boolean(e?.boring)})}start(){dE.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){bS(this.model,e)}onScriptStart(e){vS(this.model,e)}onScriptEnd(e,t,n,r,s,i,o){this.forwards.onScriptEnd(e,t,n,r,s,i,o)}onArchiveQueued(e){((e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"waiting"},{type:"archive",item:n})})(this.model,e)}onArchiveStart(e){DS(this.model,e)}onArchiveEnd(e,t,n,r,s){this.forwards.onArchiveEnd(e,t,n,r,s)}onCancelled(e="cancel"){dE.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){dE.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{this.control=null}}else dE.ui.stop(),this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{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 dS({onCancel:e,onRestart:t}),dE.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,dE.ui.stop();try{this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}this.control=null}}},LoggerUI:class{model=new hS;sink;forwards=null;constructor(){const e=process.cwd();let t=null;const n=yS;if("function"==typeof n)try{t=new n(this.model,e)}catch{try{t=n(this.model,e)}catch{t=null}}if(!t)throw new Error("LoggerSink not available");this.sink=t,this.forwards=wS(this.model,{useDurations:!1})}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){bS(this.model,e)}onScriptStart(e){vS(this.model,e)}onScriptEnd(e,t,n,r,s,i,o){this.forwards?.onScriptEnd(e,t,n,void 0,void 0,void 0,o)}onArchiveQueued(){}onArchiveStart(e){DS(this.model,e)}onArchiveEnd(e,t,n){this.forwards?.onArchiveEnd(e,t,n,void 0,void 0)}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}});const kS=async(e,r,s=null,a="concurrent",c,l)=>{const f=c??{};await(async(e,r,s=!1)=>{const a=ac(e,r);if(await ye(e,r),!s){const e=h(a.outputAbs,F);if(t(e))try{await i(e,h(a.diffAbs,I))}catch{}const r=await o(a.outputAbs,{withFileTypes:!0});for(const e of r)n(h(a.outputAbs,e.name),{recursive:!0,force:!0})}return a.rootAbs})(e,r.stanPath,Boolean(f.keep));const p=fw(0,{selection:s,config:r,mode:a,behavior:f}),m=process.stdout,g=Boolean(m.isTTY),y=(f.live??!0)&&g,b=null==s?Object.keys(r.scripts):s,{LiveUICtor:v,LoggerUICtor:D}=(()=>{const e=_S;return{LiveUICtor:"function"==typeof e.LiveUI?e.LiveUI:"function"==typeof e.default?.LiveUI?e.default.LiveUI:void 0,LoggerUICtor:"function"==typeof e.LoggerUI?e.LoggerUI:"function"==typeof e.default?.LoggerUI?e.default.LoggerUI:void 0}})(),w=y&&"function"==typeof v?new v({boring:"1"===process.env.STAN_BORING}):"function"==typeof D?new D:{start(){},onPlan(){},onScriptQueued(){},onScriptStart(){},onScriptEnd(){},onArchiveQueued(){},onArchiveStart(){},onArchiveEnd(){},onCancelled(){},installCancellation(){},stop(){}};let _=!1;for(;;){const{created:n,cancelled:s,restartRequested:i}=await pS({cwd:e,config:r,selection:b,mode:a,behavior:f,liveEnabled:y,planBody:p,printPlan:!_&&!1!==f.plan,ui:w,promptChoice:l});if(_=!0,!i){if(s){const s=d.join(e,r.stanPath,"output"),i=d.join(s,"archive.tar"),o=d.join(s,"archive.diff.tar"),a=async e=>new Promise(t=>setTimeout(t,e)),c=()=>!t(i)&&!t(o),l=async()=>{await Promise.allSettled([u(i,{force:!0}),u(o,{force:!0})])},f=8;for(let e=0;e<f;e+=1){try{await l()}catch{}if(c())break;const e="win32"===process.platform;await a(e?200:40)}try{await new Promise(e=>setTimeout(e,"win32"===process.platform?100:25))}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}try{try{await AD()}catch{}const e=w.flushNow;if("function"==typeof e)try{e()}catch{}w.stop()}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}}};export{SD as renderAvailableScriptsHelp,kS as runSelected};