valaxy 0.16.3 → 0.16.4
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/client/composables/features/vanilla-lazyload.ts +7 -0
- package/dist/{chunk-O6VYMTHE.cjs → chunk-262FIKDL.cjs} +48 -36
- package/dist/{chunk-R6EC3UMQ.cjs → chunk-GXMNHGBP.cjs} +1 -1
- package/dist/{chunk-YTQABADX.mjs → chunk-WSC7UAH5.mjs} +1 -1
- package/dist/chunk-XWKIRAYV.mjs +147 -0
- package/dist/{config-tjZfKSoC.d.cts → config-OaNeBI1c.d.cts} +10 -1
- package/dist/{config-tjZfKSoC.d.ts → config-OaNeBI1c.d.ts} +10 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +4 -2
- package/dist/node/index.d.ts +4 -2
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/package.json +10 -10
- package/types/config.ts +11 -0
- package/dist/chunk-KMYBWFOB.mjs +0 -135
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
+
import{a as U,b,c as Me,d as c}from"./chunk-WSC7UAH5.mjs";var Ti=b(ft=>{"use strict";c();Object.defineProperty(ft,"__esModule",{value:!0});ft.splitWhen=ft.flatten=void 0;function Vf(e){return e.reduce((t,r)=>[].concat(t,r),[])}ft.flatten=Vf;function Hf(e,t){let r=[[]],n=0;for(let o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r}ft.splitWhen=Hf});var $i=b(Zt=>{"use strict";c();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isEnoentCodeError=void 0;function jf(e){return e.code==="ENOENT"}Zt.isEnoentCodeError=jf});var Fi=b(Jt=>{"use strict";c();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.createDirentFromStats=void 0;var sn=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function qf(e,t){return new sn(e,t)}Jt.createDirentFromStats=qf});var Ni=b(te=>{"use strict";c();Object.defineProperty(te,"__esModule",{value:!0});te.convertPosixPathToPattern=te.convertWindowsPathToPattern=te.convertPathToPattern=te.escapePosixPath=te.escapeWindowsPath=te.escape=te.removeLeadingDotSegment=te.makeAbsolute=te.unixify=void 0;var Bf=U("os"),Uf=U("path"),Ii=Bf.platform()==="win32",Gf=2,Wf=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,zf=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Kf=/^\\\\([.?])/,Yf=/\\(?![!()+@[\]{}])/g;function Xf(e){return e.replace(/\\/g,"/")}te.unixify=Xf;function Qf(e,t){return Uf.resolve(e,t)}te.makeAbsolute=Qf;function Zf(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(Gf)}return e}te.removeLeadingDotSegment=Zf;te.escape=Ii?an:cn;function an(e){return e.replace(zf,"\\$2")}te.escapeWindowsPath=an;function cn(e){return e.replace(Wf,"\\$2")}te.escapePosixPath=cn;te.convertPathToPattern=Ii?Li:Mi;function Li(e){return an(e).replace(Kf,"//$1").replace(Yf,"/")}te.convertWindowsPathToPattern=Li;function Mi(e){return cn(e)}te.convertPosixPathToPattern=Mi});var Vi=b((Hx,Di)=>{"use strict";c();Di.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var qi=b((qx,ji)=>{"use strict";c();var Jf=Vi(),Hi={"{":"}","(":")","[":"]"},ep=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,o=-2,i=-2,s=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(s===-1||s>n||(s=e.indexOf("\\",t),s===-1||s>n)))||o!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(o=e.indexOf("}",t),o>t&&(s=e.indexOf("\\",t),s===-1||s>o))||i!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(i=e.indexOf(")",t),i>t&&(s=e.indexOf("\\",t),s===-1||s>i))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(i=e.indexOf(")",r),i>r&&(s=e.indexOf("\\",r),s===-1||s>i))))return!0;if(e[t]==="\\"){var a=e[t+1];t+=2;var l=Hi[a];if(l){var f=e.indexOf(l,t);f!==-1&&(t=f+1)}if(e[t]==="!")return!0}else t++}return!1},tp=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=Hi[r];if(n){var o=e.indexOf(n,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1};ji.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(Jf(t))return!0;var n=ep;return r&&r.strict===!1&&(n=tp),n(t)}});var Ui=b((Ux,Bi)=>{"use strict";c();var rp=qi(),np=U("path").posix.dirname,op=U("os").platform()==="win32",ln="/",ip=/\\/g,sp=/[\{\[].*[\}\]]$/,ap=/(^|[^\\])([\{\[]|\([^\)]+$)/,cp=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Bi.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&op&&t.indexOf(ln)<0&&(t=t.replace(ip,ln)),sp.test(t)&&(t+=ln),t+="a";do t=np(t);while(rp(t)||ap.test(t));return t.replace(cp,"$1")}});var er=b(xe=>{"use strict";c();xe.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;xe.find=(e,t)=>e.nodes.find(r=>r.type===t);xe.exceedsLimit=(e,t,r=1,n)=>n===!1||!xe.isInteger(e)||!xe.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;xe.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};xe.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);xe.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;xe.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;xe.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);xe.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let i=n[o];Array.isArray(i)?r(i,t):i!==void 0&&t.push(i)}return t};return r(e),t}});var tr=b((Kx,Wi)=>{"use strict";c();var Gi=er();Wi.exports=(e,t={})=>{let r=(n,o={})=>{let i=t.escapeInvalid&&Gi.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(i||s)&&Gi.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let l of n.nodes)a+=r(l);return a};return r(e)}});var Ki=b((Xx,zi)=>{"use strict";c();zi.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var ns=b((Zx,rs)=>{"use strict";c();var Yi=Ki(),Ze=(e,t,r)=>{if(Yi(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Yi(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),i=String(n.shorthand),s=String(n.capture),a=String(n.wrap),l=e+":"+t+"="+o+i+s+a;if(Ze.cache.hasOwnProperty(l))return Ze.cache[l].result;let f=Math.min(e,t),u=Math.max(e,t);if(Math.abs(f-u)===1){let x=e+"|"+t;return n.capture?`(${x})`:n.wrap===!1?x:`(?:${x})`}let p=ts(e)||ts(t),d={min:e,max:t,a:f,b:u},C=[],v=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),f<0){let x=u<0?Math.abs(u):1;v=Xi(x,Math.abs(f),d,n),f=d.a=0}return u>=0&&(C=Xi(f,u,d,n)),d.negatives=v,d.positives=C,d.result=lp(v,C,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&C.length+v.length>1&&(d.result=`(?:${d.result})`),Ze.cache[l]=d,d.result};function lp(e,t,r){let n=un(e,t,"-",!1,r)||[],o=un(t,e,"",!1,r)||[],i=un(e,t,"-?",!0,r)||[];return n.concat(i).concat(o).join("|")}function up(e,t){let r=1,n=1,o=Zi(e,r),i=new Set([t]);for(;e<=o&&o<=t;)i.add(o),r+=1,o=Zi(e,r);for(o=Ji(t+1,n)-1;e<o&&o<=t;)i.add(o),n+=1,o=Ji(t+1,n)-1;return i=[...i],i.sort(dp),i}function fp(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=pp(e,t),o=n.length,i="",s=0;for(let a=0;a<o;a++){let[l,f]=n[a];l===f?i+=l:l!=="0"||f!=="9"?i+=mp(l,f,r):s++}return s&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function Xi(e,t,r,n){let o=up(e,t),i=[],s=e,a;for(let l=0;l<o.length;l++){let f=o[l],u=fp(String(s),String(f),n),p="";if(!r.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+es(a.count),s=f+1;continue}r.isPadded&&(p=gp(f,r,n)),u.string=p+u.pattern+es(u.count),i.push(u),s=f+1,a=u}return i}function un(e,t,r,n,o){let i=[];for(let s of e){let{string:a}=s;!n&&!Qi(t,"string",a)&&i.push(r+a),n&&Qi(t,"string",a)&&i.push(r+a)}return i}function pp(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function dp(e,t){return e>t?1:t>e?-1:0}function Qi(e,t,r){return e.some(n=>n[t]===r)}function Zi(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Ji(e,t){return e-e%Math.pow(10,t)}function es(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function mp(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function ts(e){return/^-?(0+)\d/.test(e)}function gp(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}Ze.cache={};Ze.clearCache=()=>Ze.cache={};rs.exports=Ze});var dn=b((eC,fs)=>{"use strict";c();var hp=U("util"),ss=ns(),os=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),yp=e=>t=>e===!0?Number(t):String(t),fn=e=>typeof e=="number"||typeof e=="string"&&e!=="",kt=e=>Number.isInteger(+e),pn=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},vp=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,_p=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},is=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},xp=(e,t)=>{e.negatives.sort((s,a)=>s<a?-1:s>a?1:0),e.positives.sort((s,a)=>s<a?-1:s>a?1:0);let r=t.capture?"":"?:",n="",o="",i;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(o=`-(${r}${e.negatives.join("|")})`),n&&o?i=`${n}|${o}`:i=n||o,t.wrap?`(${r}${i})`:i},as=(e,t,r,n)=>{if(r)return ss(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let i=String.fromCharCode(t);return`[${o}-${i}]`},cs=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return ss(e,t,r)},ls=(...e)=>new RangeError("Invalid range arguments: "+hp.inspect(...e)),us=(e,t,r)=>{if(r.strictRanges===!0)throw ls([e,t]);return[]},Cp=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},bp=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(n.strictRanges===!0)throw ls([e,t]);return[]}o===0&&(o=0),i===0&&(i=0);let s=o>i,a=String(e),l=String(t),f=String(r);r=Math.max(Math.abs(r),1);let u=pn(a)||pn(l)||pn(f),p=u?Math.max(a.length,l.length,f.length):0,d=u===!1&&vp(e,t,n)===!1,C=n.transform||yp(d);if(n.toRegex&&r===1)return as(is(e,p),is(t,p),!0,n);let v={negatives:[],positives:[]},x=I=>v[I<0?"negatives":"positives"].push(Math.abs(I)),R=[],S=0;for(;s?o>=i:o<=i;)n.toRegex===!0&&r>1?x(o):R.push(_p(C(o,S),p,d)),o=s?o-r:o+r,S++;return n.toRegex===!0?r>1?xp(v,n):cs(R,null,{wrap:!1,...n}):R},Sp=(e,t,r=1,n={})=>{if(!kt(e)&&e.length>1||!kt(t)&&t.length>1)return us(e,t,n);let o=n.transform||(d=>String.fromCharCode(d)),i=`${e}`.charCodeAt(0),s=`${t}`.charCodeAt(0),a=i>s,l=Math.min(i,s),f=Math.max(i,s);if(n.toRegex&&r===1)return as(l,f,!1,n);let u=[],p=0;for(;a?i>=s:i<=s;)u.push(o(i,p)),i=a?i-r:i+r,p++;return n.toRegex===!0?cs(u,null,{wrap:!1,options:n}):u},rr=(e,t,r,n={})=>{if(t==null&&fn(e))return[e];if(!fn(e)||!fn(t))return us(e,t,n);if(typeof r=="function")return rr(e,t,1,{transform:r});if(os(r))return rr(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,kt(r)?kt(e)&&kt(t)?bp(e,t,r,o):Sp(e,t,Math.max(Math.abs(r),1),o):r!=null&&!os(r)?Cp(r,o):rr(e,t,1,r)};fs.exports=rr});var ms=b((rC,ds)=>{"use strict";c();var Rp=dn(),ps=er(),wp=(e,t={})=>{let r=(n,o={})=>{let i=ps.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a=i===!0||s===!0,l=t.escapeInvalid===!0?"\\":"",f="";if(n.isOpen===!0||n.isClose===!0)return l+n.value;if(n.type==="open")return a?l+n.value:"(";if(n.type==="close")return a?l+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let u=ps.reduce(n.nodes),p=Rp(...u,{...t,wrap:!1,toRegex:!0});if(p.length!==0)return u.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let u of n.nodes)f+=r(u,n);return f};return r(e)};ds.exports=wp});var ys=b((oC,hs)=>{"use strict";c();var Ep=dn(),gs=tr(),pt=er(),Je=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?pt.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let i of o)n.push(Je(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?Je(o,i,r):o+i);return pt.flatten(n)},Ap=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,i={})=>{o.queue=[];let s=i,a=i.queue;for(;s.type!=="brace"&&s.type!=="root"&&s.parent;)s=s.parent,a=s.queue;if(o.invalid||o.dollar){a.push(Je(a.pop(),gs(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(Je(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let p=pt.reduce(o.nodes);if(pt.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=Ep(...p,t);d.length===0&&(d=gs(o,t)),a.push(Je(a.pop(),d)),o.nodes=[];return}let l=pt.encloseBrace(o),f=o.queue,u=o;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,f=u.queue;for(let p=0;p<o.nodes.length;p++){let d=o.nodes[p];if(d.type==="comma"&&o.type==="brace"){p===1&&f.push(""),f.push("");continue}if(d.type==="close"){a.push(Je(a.pop(),f,l));continue}if(d.value&&d.type!=="open"){f.push(Je(f.pop(),d.value));continue}d.nodes&&n(d,o)}return f};return pt.flatten(n(e))};hs.exports=Ap});var _s=b((sC,vs)=>{"use strict";c();vs.exports={MAX_LENGTH:1024*64,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:`
|
|
3
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",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:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Rs=b((cC,Ss)=>{"use strict";c();var kp=tr(),{MAX_LENGTH:xs,CHAR_BACKSLASH:mn,CHAR_BACKTICK:Pp,CHAR_COMMA:Op,CHAR_DOT:Tp,CHAR_LEFT_PARENTHESES:$p,CHAR_RIGHT_PARENTHESES:Fp,CHAR_LEFT_CURLY_BRACE:Ip,CHAR_RIGHT_CURLY_BRACE:Lp,CHAR_LEFT_SQUARE_BRACKET:Cs,CHAR_RIGHT_SQUARE_BRACKET:bs,CHAR_DOUBLE_QUOTE:Mp,CHAR_SINGLE_QUOTE:Np,CHAR_NO_BREAK_SPACE:Dp,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Vp}=_s(),Hp=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(xs,r.maxLength):xs;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},i=[o],s=o,a=o,l=0,f=e.length,u=0,p=0,d,C={},v=()=>e[u++],x=R=>{if(R.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&R.type==="text"){a.value+=R.value;return}return s.nodes.push(R),R.parent=s,R.prev=a,a=R,R};for(x({type:"bos"});u<f;)if(s=i[i.length-1],d=v(),!(d===Vp||d===Dp)){if(d===mn){x({type:"text",value:(t.keepEscaping?d:"")+v()});continue}if(d===bs){x({type:"text",value:"\\"+d});continue}if(d===Cs){l++;let R=!0,S;for(;u<f&&(S=v());){if(d+=S,S===Cs){l++;continue}if(S===mn){d+=v();continue}if(S===bs&&(l--,l===0))break}x({type:"text",value:d});continue}if(d===$p){s=x({type:"paren",nodes:[]}),i.push(s),x({type:"text",value:d});continue}if(d===Fp){if(s.type!=="paren"){x({type:"text",value:d});continue}s=i.pop(),x({type:"text",value:d}),s=i[i.length-1];continue}if(d===Mp||d===Np||d===Pp){let R=d,S;for(t.keepQuotes!==!0&&(d="");u<f&&(S=v());){if(S===mn){d+=S+v();continue}if(S===R){t.keepQuotes===!0&&(d+=S);break}d+=S}x({type:"text",value:d});continue}if(d===Ip){p++;let S={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};s=x(S),i.push(s),x({type:"open",value:d});continue}if(d===Lp){if(s.type!=="brace"){x({type:"text",value:d});continue}let R="close";s=i.pop(),s.close=!0,x({type:R,value:d}),p--,s=i[i.length-1];continue}if(d===Op&&p>0){if(s.ranges>0){s.ranges=0;let R=s.nodes.shift();s.nodes=[R,{type:"text",value:kp(s)}]}x({type:"comma",value:d}),s.commas++;continue}if(d===Tp&&p>0&&s.commas===0){let R=s.nodes;if(p===0||R.length===0){x({type:"text",value:d});continue}if(a.type==="dot"){if(s.range=[],a.value+=d,a.type="range",s.nodes.length!==3&&s.nodes.length!==5){s.invalid=!0,s.ranges=0,a.type="text";continue}s.ranges++,s.args=[];continue}if(a.type==="range"){R.pop();let S=R[R.length-1];S.value+=a.value+d,a=S,s.ranges--;continue}x({type:"dot",value:d});continue}x({type:"text",value:d})}do if(s=i.pop(),s.type!=="root"){s.nodes.forEach(I=>{I.nodes||(I.type==="open"&&(I.isOpen=!0),I.type==="close"&&(I.isClose=!0),I.nodes||(I.type="text"),I.invalid=!0)});let R=i[i.length-1],S=R.nodes.indexOf(s);R.nodes.splice(S,1,...s.nodes)}while(i.length>0);return x({type:"eos"}),o};Ss.exports=Hp});var As=b((uC,Es)=>{"use strict";c();var ws=tr(),jp=ms(),qp=ys(),Bp=Rs(),he=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=he.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(he.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};he.parse=(e,t={})=>Bp(e,t);he.stringify=(e,t={})=>ws(typeof e=="string"?he.parse(e,t):e,t);he.compile=(e,t={})=>(typeof e=="string"&&(e=he.parse(e,t)),jp(e,t));he.expand=(e,t={})=>{typeof e=="string"&&(e=he.parse(e,t));let r=qp(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};he.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?he.compile(e,t):he.expand(e,t);Es.exports=he});var Pt=b((pC,$s)=>{"use strict";c();var Up=U("path"),Ae="\\\\/",ks=`[^${Ae}]`,Ne="\\.",Gp="\\+",Wp="\\?",nr="\\/",zp="(?=.)",Ps="[^/]",gn=`(?:${nr}|$)`,Os=`(?:^|${nr})`,hn=`${Ne}{1,2}${gn}`,Kp=`(?!${Ne})`,Yp=`(?!${Os}${hn})`,Xp=`(?!${Ne}{0,1}${gn})`,Qp=`(?!${hn})`,Zp=`[^.${nr}]`,Jp=`${Ps}*?`,Ts={DOT_LITERAL:Ne,PLUS_LITERAL:Gp,QMARK_LITERAL:Wp,SLASH_LITERAL:nr,ONE_CHAR:zp,QMARK:Ps,END_ANCHOR:gn,DOTS_SLASH:hn,NO_DOT:Kp,NO_DOTS:Yp,NO_DOT_SLASH:Xp,NO_DOTS_SLASH:Qp,QMARK_NO_DOT:Zp,STAR:Jp,START_ANCHOR:Os},ed={...Ts,SLASH_LITERAL:`[${Ae}]`,QMARK:ks,STAR:`${ks}*?`,DOTS_SLASH:`${Ne}{1,2}(?:[${Ae}]|$)`,NO_DOT:`(?!${Ne})`,NO_DOTS:`(?!(?:^|[${Ae}])${Ne}{1,2}(?:[${Ae}]|$))`,NO_DOT_SLASH:`(?!${Ne}{0,1}(?:[${Ae}]|$))`,NO_DOTS_SLASH:`(?!${Ne}{1,2}(?:[${Ae}]|$))`,QMARK_NO_DOT:`[^.${Ae}]`,START_ANCHOR:`(?:^|[${Ae}])`,END_ANCHOR:`(?:[${Ae}]|$)`},td={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"};$s.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:td,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:Up.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?ed:Ts}}});var Ot=b(ge=>{"use strict";c();var rd=U("path"),nd=process.platform==="win32",{REGEX_BACKSLASH:od,REGEX_REMOVE_BACKSLASH:id,REGEX_SPECIAL_CHARS:sd,REGEX_SPECIAL_CHARS_GLOBAL:ad}=Pt();ge.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);ge.hasRegexChars=e=>sd.test(e);ge.isRegexChar=e=>e.length===1&&ge.hasRegexChars(e);ge.escapeRegex=e=>e.replace(ad,"\\$1");ge.toPosixSlashes=e=>e.replace(od,"/");ge.removeBackslashes=e=>e.replace(id,t=>t==="\\"?"":t);ge.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};ge.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:nd===!0||rd.sep==="\\";ge.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?ge.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};ge.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};ge.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",i=`${n}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Hs=b((hC,Vs)=>{"use strict";c();var Fs=Ot(),{CHAR_ASTERISK:yn,CHAR_AT:cd,CHAR_BACKWARD_SLASH:Tt,CHAR_COMMA:ld,CHAR_DOT:vn,CHAR_EXCLAMATION_MARK:_n,CHAR_FORWARD_SLASH:Ds,CHAR_LEFT_CURLY_BRACE:xn,CHAR_LEFT_PARENTHESES:Cn,CHAR_LEFT_SQUARE_BRACKET:ud,CHAR_PLUS:fd,CHAR_QUESTION_MARK:Is,CHAR_RIGHT_CURLY_BRACE:pd,CHAR_RIGHT_PARENTHESES:Ls,CHAR_RIGHT_SQUARE_BRACKET:dd}=Pt(),Ms=e=>e===Ds||e===Tt,Ns=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},md=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,i=[],s=[],a=[],l=e,f=-1,u=0,p=0,d=!1,C=!1,v=!1,x=!1,R=!1,S=!1,I=!1,L=!1,G=!1,O=!1,D=0,A,w,T={value:"",depth:0,isGlob:!1},z=()=>f>=n,m=()=>l.charCodeAt(f+1),k=()=>(A=w,l.charCodeAt(++f));for(;f<n;){w=k();let q;if(w===Tt){I=T.backslashes=!0,w=k(),w===xn&&(S=!0);continue}if(S===!0||w===xn){for(D++;z()!==!0&&(w=k());){if(w===Tt){I=T.backslashes=!0,k();continue}if(w===xn){D++;continue}if(S!==!0&&w===vn&&(w=k())===vn){if(d=T.isBrace=!0,v=T.isGlob=!0,O=!0,o===!0)continue;break}if(S!==!0&&w===ld){if(d=T.isBrace=!0,v=T.isGlob=!0,O=!0,o===!0)continue;break}if(w===pd&&(D--,D===0)){S=!1,d=T.isBrace=!0,O=!0;break}}if(o===!0)continue;break}if(w===Ds){if(i.push(f),s.push(T),T={value:"",depth:0,isGlob:!1},O===!0)continue;if(A===vn&&f===u+1){u+=2;continue}p=f+1;continue}if(r.noext!==!0&&(w===fd||w===cd||w===yn||w===Is||w===_n)===!0&&m()===Cn){if(v=T.isGlob=!0,x=T.isExtglob=!0,O=!0,w===_n&&f===u&&(G=!0),o===!0){for(;z()!==!0&&(w=k());){if(w===Tt){I=T.backslashes=!0,w=k();continue}if(w===Ls){v=T.isGlob=!0,O=!0;break}}continue}break}if(w===yn){if(A===yn&&(R=T.isGlobstar=!0),v=T.isGlob=!0,O=!0,o===!0)continue;break}if(w===Is){if(v=T.isGlob=!0,O=!0,o===!0)continue;break}if(w===ud){for(;z()!==!0&&(q=k());){if(q===Tt){I=T.backslashes=!0,k();continue}if(q===dd){C=T.isBracket=!0,v=T.isGlob=!0,O=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&w===_n&&f===u){L=T.negated=!0,u++;continue}if(r.noparen!==!0&&w===Cn){if(v=T.isGlob=!0,o===!0){for(;z()!==!0&&(w=k());){if(w===Cn){I=T.backslashes=!0,w=k();continue}if(w===Ls){O=!0;break}}continue}break}if(v===!0){if(O=!0,o===!0)continue;break}}r.noext===!0&&(x=!1,v=!1);let $=l,V="",y="";u>0&&(V=l.slice(0,u),l=l.slice(u),p-=u),$&&v===!0&&p>0?($=l.slice(0,p),y=l.slice(p)):v===!0?($="",y=l):$=l,$&&$!==""&&$!=="/"&&$!==l&&Ms($.charCodeAt($.length-1))&&($=$.slice(0,-1)),r.unescape===!0&&(y&&(y=Fs.removeBackslashes(y)),$&&I===!0&&($=Fs.removeBackslashes($)));let _={prefix:V,input:e,start:u,base:$,glob:y,isBrace:d,isBracket:C,isGlob:v,isExtglob:x,isGlobstar:R,negated:L,negatedExtglob:G};if(r.tokens===!0&&(_.maxDepth=0,Ms(w)||s.push(T),_.tokens=s),r.parts===!0||r.tokens===!0){let q;for(let F=0;F<i.length;F++){let M=q?q+1:u,W=i[F],j=e.slice(M,W);r.tokens&&(F===0&&u!==0?(s[F].isPrefix=!0,s[F].value=V):s[F].value=j,Ns(s[F]),_.maxDepth+=s[F].depth),(F!==0||j!=="")&&a.push(j),q=W}if(q&&q+1<e.length){let F=e.slice(q+1);a.push(F),r.tokens&&(s[s.length-1].value=F,Ns(s[s.length-1]),_.maxDepth+=s[s.length-1].depth)}_.slashes=i,_.parts=a}return _};Vs.exports=md});var Bs=b((vC,qs)=>{"use strict";c();var or=Pt(),ye=Ot(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:gd,REGEX_NON_SPECIAL_CHARS:hd,REGEX_SPECIAL_CHARS_BACKREF:yd,REPLACEMENTS:js}=or,vd=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>ye.escapeRegex(o)).join("..")}return r},dt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,bn=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=js[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ir,r.maxLength):ir,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:r.prepend||""},s=[i],a=r.capture?"":"?:",l=ye.isWindows(t),f=or.globChars(l),u=or.extglobChars(f),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:C,ONE_CHAR:v,DOTS_SLASH:x,NO_DOT:R,NO_DOT_SLASH:S,NO_DOTS_SLASH:I,QMARK:L,QMARK_NO_DOT:G,STAR:O,START_ANCHOR:D}=f,A=P=>`(${a}(?:(?!${D}${P.dot?x:p}).)*?)`,w=r.dot?"":R,T=r.dot?L:G,z=r.bash===!0?A(r):O;r.capture&&(z=`(${z})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let m={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=ye.removePrefix(e,m),o=e.length;let k=[],$=[],V=[],y=i,_,q=()=>m.index===o-1,F=m.peek=(P=1)=>e[m.index+P],M=m.advance=()=>e[++m.index]||"",W=()=>e.slice(m.index+1),j=(P="",K=0)=>{m.consumed+=P,m.index+=K},ne=P=>{m.output+=P.output!=null?P.output:P.value,j(P.value)},J=()=>{let P=1;for(;F()==="!"&&(F(2)!=="("||F(3)==="?");)M(),m.start++,P++;return P%2===0?!1:(m.negated=!0,m.start++,!0)},Le=P=>{m[P]++,V.push(P)},le=P=>{m[P]--,V.pop()},H=P=>{if(y.type==="globstar"){let K=m.braces>0&&(P.type==="comma"||P.type==="brace"),E=P.extglob===!0||k.length&&(P.type==="pipe"||P.type==="paren");P.type!=="slash"&&P.type!=="paren"&&!K&&!E&&(m.output=m.output.slice(0,-y.output.length),y.type="star",y.value="*",y.output=z,m.output+=y.output)}if(k.length&&P.type!=="paren"&&(k[k.length-1].inner+=P.value),(P.value||P.output)&&ne(P),y&&y.type==="text"&&P.type==="text"){y.value+=P.value,y.output=(y.output||"")+P.value;return}P.prev=y,s.push(P),y=P},me=(P,K)=>{let E={...u[K],conditions:1,inner:""};E.prev=y,E.parens=m.parens,E.output=m.output;let B=(r.capture?"(":"")+E.open;Le("parens"),H({type:P,value:K,output:m.output?"":v}),H({type:"paren",extglob:!0,value:M(),output:B}),k.push(E)},lt=P=>{let K=P.close+(r.capture?")":""),E;if(P.type==="negate"){let B=z;if(P.inner&&P.inner.length>1&&P.inner.includes("/")&&(B=A(r)),(B!==z||q()||/^\)+$/.test(W()))&&(K=P.close=`)$))${B}`),P.inner.includes("*")&&(E=W())&&/^\.[^\\/.]+$/.test(E)){let Q=bn(E,{...t,fastpaths:!1}).output;K=P.close=`)${Q})${B})`}P.prev.type==="bos"&&(m.negatedExtglob=!0)}H({type:"paren",extglob:!0,value:_,output:K}),le("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let P=!1,K=e.replace(yd,(E,B,Q,de,oe,on)=>de==="\\"?(P=!0,E):de==="?"?B?B+de+(oe?L.repeat(oe.length):""):on===0?T+(oe?L.repeat(oe.length):""):L.repeat(Q.length):de==="."?p.repeat(Q.length):de==="*"?B?B+de+(oe?z:""):z:B?E:`\\${E}`);return P===!0&&(r.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,E=>E.length%2===0?"\\\\":E?"\\":"")),K===e&&r.contains===!0?(m.output=e,m):(m.output=ye.wrapOutput(K,m,t),m)}for(;!q();){if(_=M(),_==="\0")continue;if(_==="\\"){let E=F();if(E==="/"&&r.bash!==!0||E==="."||E===";")continue;if(!E){_+="\\",H({type:"text",value:_});continue}let B=/^\\+/.exec(W()),Q=0;if(B&&B[0].length>2&&(Q=B[0].length,m.index+=Q,Q%2!==0&&(_+="\\")),r.unescape===!0?_=M():_+=M(),m.brackets===0){H({type:"text",value:_});continue}}if(m.brackets>0&&(_!=="]"||y.value==="["||y.value==="[^")){if(r.posix!==!1&&_===":"){let E=y.value.slice(1);if(E.includes("[")&&(y.posix=!0,E.includes(":"))){let B=y.value.lastIndexOf("["),Q=y.value.slice(0,B),de=y.value.slice(B+2),oe=gd[de];if(oe){y.value=Q+oe,m.backtrack=!0,M(),!i.output&&s.indexOf(y)===1&&(i.output=v);continue}}}(_==="["&&F()!==":"||_==="-"&&F()==="]")&&(_=`\\${_}`),_==="]"&&(y.value==="["||y.value==="[^")&&(_=`\\${_}`),r.posix===!0&&_==="!"&&y.value==="["&&(_="^"),y.value+=_,ne({value:_});continue}if(m.quotes===1&&_!=='"'){_=ye.escapeRegex(_),y.value+=_,ne({value:_});continue}if(_==='"'){m.quotes=m.quotes===1?0:1,r.keepQuotes===!0&&H({type:"text",value:_});continue}if(_==="("){Le("parens"),H({type:"paren",value:_});continue}if(_===")"){if(m.parens===0&&r.strictBrackets===!0)throw new SyntaxError(dt("opening","("));let E=k[k.length-1];if(E&&m.parens===E.parens+1){lt(k.pop());continue}H({type:"paren",value:_,output:m.parens?")":"\\)"}),le("parens");continue}if(_==="["){if(r.nobracket===!0||!W().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(dt("closing","]"));_=`\\${_}`}else Le("brackets");H({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===!0||y&&y.type==="bracket"&&y.value.length===1){H({type:"text",value:_,output:`\\${_}`});continue}if(m.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(dt("opening","["));H({type:"text",value:_,output:`\\${_}`});continue}le("brackets");let E=y.value.slice(1);if(y.posix!==!0&&E[0]==="^"&&!E.includes("/")&&(_=`/${_}`),y.value+=_,ne({value:_}),r.literalBrackets===!1||ye.hasRegexChars(E))continue;let B=ye.escapeRegex(y.value);if(m.output=m.output.slice(0,-y.value.length),r.literalBrackets===!0){m.output+=B,y.value=B;continue}y.value=`(${a}${B}|${y.value})`,m.output+=y.value;continue}if(_==="{"&&r.nobrace!==!0){Le("braces");let E={type:"brace",value:_,output:"(",outputIndex:m.output.length,tokensIndex:m.tokens.length};$.push(E),H(E);continue}if(_==="}"){let E=$[$.length-1];if(r.nobrace===!0||!E){H({type:"text",value:_,output:_});continue}let B=")";if(E.dots===!0){let Q=s.slice(),de=[];for(let oe=Q.length-1;oe>=0&&(s.pop(),Q[oe].type!=="brace");oe--)Q[oe].type!=="dots"&&de.unshift(Q[oe].value);B=vd(de,r),m.backtrack=!0}if(E.comma!==!0&&E.dots!==!0){let Q=m.output.slice(0,E.outputIndex),de=m.tokens.slice(E.tokensIndex);E.value=E.output="\\{",_=B="\\}",m.output=Q;for(let oe of de)m.output+=oe.output||oe.value}H({type:"brace",value:_,output:B}),le("braces"),$.pop();continue}if(_==="|"){k.length>0&&k[k.length-1].conditions++,H({type:"text",value:_});continue}if(_===","){let E=_,B=$[$.length-1];B&&V[V.length-1]==="braces"&&(B.comma=!0,E="|"),H({type:"comma",value:_,output:E});continue}if(_==="/"){if(y.type==="dot"&&m.index===m.start+1){m.start=m.index+1,m.consumed="",m.output="",s.pop(),y=i;continue}H({type:"slash",value:_,output:C});continue}if(_==="."){if(m.braces>0&&y.type==="dot"){y.value==="."&&(y.output=p);let E=$[$.length-1];y.type="dots",y.output+=_,y.value+=_,E.dots=!0;continue}if(m.braces+m.parens===0&&y.type!=="bos"&&y.type!=="slash"){H({type:"text",value:_,output:p});continue}H({type:"dot",value:_,output:p});continue}if(_==="?"){if(!(y&&y.value==="(")&&r.noextglob!==!0&&F()==="("&&F(2)!=="?"){me("qmark",_);continue}if(y&&y.type==="paren"){let B=F(),Q=_;if(B==="<"&&!ye.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(y.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(W()))&&(Q=`\\${_}`),H({type:"text",value:_,output:Q});continue}if(r.dot!==!0&&(y.type==="slash"||y.type==="bos")){H({type:"qmark",value:_,output:G});continue}H({type:"qmark",value:_,output:L});continue}if(_==="!"){if(r.noextglob!==!0&&F()==="("&&(F(2)!=="?"||!/[!=<:]/.test(F(3)))){me("negate",_);continue}if(r.nonegate!==!0&&m.index===0){J();continue}}if(_==="+"){if(r.noextglob!==!0&&F()==="("&&F(2)!=="?"){me("plus",_);continue}if(y&&y.value==="("||r.regex===!1){H({type:"plus",value:_,output:d});continue}if(y&&(y.type==="bracket"||y.type==="paren"||y.type==="brace")||m.parens>0){H({type:"plus",value:_});continue}H({type:"plus",value:d});continue}if(_==="@"){if(r.noextglob!==!0&&F()==="("&&F(2)!=="?"){H({type:"at",extglob:!0,value:_,output:""});continue}H({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let E=hd.exec(W());E&&(_+=E[0],m.index+=E[0].length),H({type:"text",value:_});continue}if(y&&(y.type==="globstar"||y.star===!0)){y.type="star",y.star=!0,y.value+=_,y.output=z,m.backtrack=!0,m.globstar=!0,j(_);continue}let P=W();if(r.noextglob!==!0&&/^\([^?]/.test(P)){me("star",_);continue}if(y.type==="star"){if(r.noglobstar===!0){j(_);continue}let E=y.prev,B=E.prev,Q=E.type==="slash"||E.type==="bos",de=B&&(B.type==="star"||B.type==="globstar");if(r.bash===!0&&(!Q||P[0]&&P[0]!=="/")){H({type:"star",value:_,output:""});continue}let oe=m.braces>0&&(E.type==="comma"||E.type==="brace"),on=k.length&&(E.type==="pipe"||E.type==="paren");if(!Q&&E.type!=="paren"&&!oe&&!on){H({type:"star",value:_,output:""});continue}for(;P.slice(0,3)==="/**";){let Qt=e[m.index+4];if(Qt&&Qt!=="/")break;P=P.slice(3),j("/**",3)}if(E.type==="bos"&&q()){y.type="globstar",y.value+=_,y.output=A(r),m.output=y.output,m.globstar=!0,j(_);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&!de&&q()){m.output=m.output.slice(0,-(E.output+y.output).length),E.output=`(?:${E.output}`,y.type="globstar",y.output=A(r)+(r.strictSlashes?")":"|$)"),y.value+=_,m.globstar=!0,m.output+=E.output+y.output,j(_);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&P[0]==="/"){let Qt=P[1]!==void 0?"|$":"";m.output=m.output.slice(0,-(E.output+y.output).length),E.output=`(?:${E.output}`,y.type="globstar",y.output=`${A(r)}${C}|${C}${Qt})`,y.value+=_,m.output+=E.output+y.output,m.globstar=!0,j(_+M()),H({type:"slash",value:"/",output:""});continue}if(E.type==="bos"&&P[0]==="/"){y.type="globstar",y.value+=_,y.output=`(?:^|${C}|${A(r)}${C})`,m.output=y.output,m.globstar=!0,j(_+M()),H({type:"slash",value:"/",output:""});continue}m.output=m.output.slice(0,-y.output.length),y.type="globstar",y.output=A(r),y.value+=_,m.output+=y.output,m.globstar=!0,j(_);continue}let K={type:"star",value:_,output:z};if(r.bash===!0){K.output=".*?",(y.type==="bos"||y.type==="slash")&&(K.output=w+K.output),H(K);continue}if(y&&(y.type==="bracket"||y.type==="paren")&&r.regex===!0){K.output=_,H(K);continue}(m.index===m.start||y.type==="slash"||y.type==="dot")&&(y.type==="dot"?(m.output+=S,y.output+=S):r.dot===!0?(m.output+=I,y.output+=I):(m.output+=w,y.output+=w),F()!=="*"&&(m.output+=v,y.output+=v)),H(K)}for(;m.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(dt("closing","]"));m.output=ye.escapeLast(m.output,"["),le("brackets")}for(;m.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(dt("closing",")"));m.output=ye.escapeLast(m.output,"("),le("parens")}for(;m.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(dt("closing","}"));m.output=ye.escapeLast(m.output,"{"),le("braces")}if(r.strictSlashes!==!0&&(y.type==="star"||y.type==="bracket")&&H({type:"maybe_slash",value:"",output:`${C}?`}),m.backtrack===!0){m.output="";for(let P of m.tokens)m.output+=P.output!=null?P.output:P.value,P.suffix&&(m.output+=P.suffix)}return m};bn.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ir,r.maxLength):ir,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=js[e]||e;let i=ye.isWindows(t),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:f,NO_DOT:u,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:C,START_ANCHOR:v}=or.globChars(i),x=r.dot?p:u,R=r.dot?d:u,S=r.capture?"":"?:",I={negated:!1,prefix:""},L=r.bash===!0?".*?":C;r.capture&&(L=`(${L})`);let G=w=>w.noglobstar===!0?L:`(${S}(?:(?!${v}${w.dot?f:s}).)*?)`,O=w=>{switch(w){case"*":return`${x}${l}${L}`;case".*":return`${s}${l}${L}`;case"*.*":return`${x}${L}${s}${l}${L}`;case"*/*":return`${x}${L}${a}${l}${R}${L}`;case"**":return x+G(r);case"**/*":return`(?:${x}${G(r)}${a})?${R}${l}${L}`;case"**/*.*":return`(?:${x}${G(r)}${a})?${R}${L}${s}${l}${L}`;case"**/.*":return`(?:${x}${G(r)}${a})?${s}${l}${L}`;default:{let T=/^(.*?)\.(\w+)$/.exec(w);if(!T)return;let z=O(T[1]);return z?z+s+T[2]:void 0}}},D=ye.removePrefix(e,I),A=O(D);return A&&r.strictSlashes!==!0&&(A+=`${a}?`),A};qs.exports=bn});var Gs=b((xC,Us)=>{"use strict";c();var _d=U("path"),xd=Hs(),Sn=Bs(),Rn=Ot(),Cd=Pt(),bd=e=>e&&typeof e=="object"&&!Array.isArray(e),ee=(e,t,r=!1)=>{if(Array.isArray(e)){let u=e.map(d=>ee(d,t,r));return d=>{for(let C of u){let v=C(d);if(v)return v}return!1}}let n=bd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},i=Rn.isWindows(t),s=n?ee.compileRe(e,t):ee.makeRe(e,t,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(o.ignore){let u={...t,ignore:null,onMatch:null,onResult:null};l=ee(o.ignore,u,r)}let f=(u,p=!1)=>{let{isMatch:d,match:C,output:v}=ee.test(u,s,t,{glob:e,posix:i}),x={glob:e,state:a,regex:s,posix:i,input:u,output:v,match:C,isMatch:d};return typeof o.onResult=="function"&&o.onResult(x),d===!1?(x.isMatch=!1,p?x:!1):l(u)?(typeof o.onIgnore=="function"&&o.onIgnore(x),x.isMatch=!1,p?x:!1):(typeof o.onMatch=="function"&&o.onMatch(x),p?x:!0)};return r&&(f.state=a),f};ee.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=r||{},s=i.format||(o?Rn.toPosixSlashes:null),a=e===n,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===n),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=ee.matchBase(e,t,r,o):a=t.exec(l)),{isMatch:!!a,match:a,output:l}};ee.matchBase=(e,t,r,n=Rn.isWindows(r))=>(t instanceof RegExp?t:ee.makeRe(t,r)).test(_d.basename(e));ee.isMatch=(e,t,r)=>ee(t,r)(e);ee.parse=(e,t)=>Array.isArray(e)?e.map(r=>ee.parse(r,t)):Sn(e,{...t,fastpaths:!1});ee.scan=(e,t)=>xd(e,t);ee.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},i=o.contains?"":"^",s=o.contains?"":"$",a=`${i}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=ee.toRegex(a,t);return n===!0&&(l.state=e),l};ee.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Sn.fastpaths(e,t)),o.output||(o=Sn(e,t)),ee.compileRe(o,t,r,n)};ee.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};ee.constants=Cd;Us.exports=ee});var zs=b((bC,Ws)=>{"use strict";c();Ws.exports=Gs()});var Zs=b((RC,Qs)=>{"use strict";c();var Ys=U("util"),Xs=As(),ke=zs(),wn=Ot(),Ks=e=>e===""||e==="./",Y=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,i=new Set,s=0,a=u=>{i.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<t.length;u++){let p=ke(String(t[u]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&s++;for(let C of e){let v=p(C,!0);(d?!v.isMatch:v.isMatch)&&(d?n.add(v.output):(n.delete(v.output),o.add(v.output)))}}let f=(s===t.length?[...i]:[...o]).filter(u=>!n.has(u));if(r&&f.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(u=>u.replace(/\\/g,"")):t}return f};Y.match=Y;Y.matcher=(e,t)=>ke(e,t);Y.isMatch=(e,t,r)=>ke(t,r)(e);Y.any=Y.isMatch;Y.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=a=>{r.onResult&&r.onResult(a),o.push(a.output)},s=new Set(Y(e,t,{...r,onResult:i}));for(let a of o)s.has(a)||n.add(a);return[...n]};Y.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Ys.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>Y.contains(e,n,r));if(typeof t=="string"){if(Ks(e)||Ks(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return Y.isMatch(e,t,{...r,contains:!0})};Y.matchKeys=(e,t,r)=>{if(!wn.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=Y(Object.keys(e),t,r),o={};for(let i of n)o[i]=e[i];return o};Y.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=ke(String(o),r);if(n.some(s=>i(s)))return!0}return!1};Y.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=ke(String(o),r);if(!n.every(s=>i(s)))return!1}return!0};Y.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Ys.inspect(e)}"`);return[].concat(t).every(n=>ke(n,r)(e))};Y.capture=(e,t,r)=>{let n=wn.isWindows(r),i=ke.makeRe(String(e),{...r,capture:!0}).exec(n?wn.toPosixSlashes(t):t);if(i)return i.slice(1).map(s=>s===void 0?"":s)};Y.makeRe=(...e)=>ke.makeRe(...e);Y.scan=(...e)=>ke.scan(...e);Y.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of Xs(String(n),t))r.push(ke.parse(o,t));return r};Y.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:Xs(e,t)};Y.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return Y.braces(e,{...t,expand:!0})};Qs.exports=Y});var sa=b(N=>{"use strict";c();Object.defineProperty(N,"__esModule",{value:!0});N.removeDuplicateSlashes=N.matchAny=N.convertPatternsToRe=N.makeRe=N.getPatternParts=N.expandBraceExpansion=N.expandPatternsWithBraceExpansion=N.isAffectDepthOfReadingPattern=N.endsWithSlashGlobStar=N.hasGlobStar=N.getBaseDirectory=N.isPatternRelatedToParentDirectory=N.getPatternsOutsideCurrentDirectory=N.getPatternsInsideCurrentDirectory=N.getPositivePatterns=N.getNegativePatterns=N.isPositivePattern=N.isNegativePattern=N.convertToNegativePattern=N.convertToPositivePattern=N.isDynamicPattern=N.isStaticPattern=void 0;var Sd=U("path"),Rd=Ui(),En=Zs(),Js="**",wd="\\",Ed=/[*?]|^!/,Ad=/\[[^[]*]/,kd=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Pd=/[!*+?@]\([^(]*\)/,Od=/,|\.\./,Td=/(?!^)\/{2,}/g;function ea(e,t={}){return!ta(e,t)}N.isStaticPattern=ea;function ta(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(wd)||Ed.test(e)||Ad.test(e)||kd.test(e)||t.extglob!==!1&&Pd.test(e)||t.braceExpansion!==!1&&$d(e))}N.isDynamicPattern=ta;function $d(e){let t=e.indexOf("{");if(t===-1)return!1;let r=e.indexOf("}",t+1);if(r===-1)return!1;let n=e.slice(t,r);return Od.test(n)}function Fd(e){return sr(e)?e.slice(1):e}N.convertToPositivePattern=Fd;function Id(e){return"!"+e}N.convertToNegativePattern=Id;function sr(e){return e.startsWith("!")&&e[1]!=="("}N.isNegativePattern=sr;function ra(e){return!sr(e)}N.isPositivePattern=ra;function Ld(e){return e.filter(sr)}N.getNegativePatterns=Ld;function Md(e){return e.filter(ra)}N.getPositivePatterns=Md;function Nd(e){return e.filter(t=>!An(t))}N.getPatternsInsideCurrentDirectory=Nd;function Dd(e){return e.filter(An)}N.getPatternsOutsideCurrentDirectory=Dd;function An(e){return e.startsWith("..")||e.startsWith("./..")}N.isPatternRelatedToParentDirectory=An;function Vd(e){return Rd(e,{flipBackslashes:!1})}N.getBaseDirectory=Vd;function Hd(e){return e.includes(Js)}N.hasGlobStar=Hd;function na(e){return e.endsWith("/"+Js)}N.endsWithSlashGlobStar=na;function jd(e){let t=Sd.basename(e);return na(e)||ea(t)}N.isAffectDepthOfReadingPattern=jd;function qd(e){return e.reduce((t,r)=>t.concat(oa(r)),[])}N.expandPatternsWithBraceExpansion=qd;function oa(e){let t=En.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}N.expandBraceExpansion=oa;function Bd(e,t){let{parts:r}=En.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return r.length===0&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}N.getPatternParts=Bd;function ia(e,t){return En.makeRe(e,t)}N.makeRe=ia;function Ud(e,t){return e.map(r=>ia(r,t))}N.convertPatternsToRe=Ud;function Gd(e,t){return t.some(r=>r.test(e))}N.matchAny=Gd;function Wd(e){return e.replace(Td,"/")}N.removeDuplicateSlashes=Wd});var ua=b((kC,la)=>{"use strict";c();var zd=U("stream"),aa=zd.PassThrough,Kd=Array.prototype.slice;la.exports=Yd;function Yd(){let e=[],t=Kd.call(arguments),r=!1,n=t[t.length-1];n&&!Array.isArray(n)&&n.pipe==null?t.pop():n={};let o=n.end!==!1,i=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let s=aa(n);function a(){for(let u=0,p=arguments.length;u<p;u++)e.push(ca(arguments[u],n));return l(),this}function l(){if(r)return;r=!0;let u=e.shift();if(!u){process.nextTick(f);return}Array.isArray(u)||(u=[u]);let p=u.length+1;function d(){--p>0||(r=!1,l())}function C(v){function x(){v.removeListener("merge2UnpipeEnd",x),v.removeListener("end",x),i&&v.removeListener("error",R),d()}function R(S){s.emit("error",S)}if(v._readableState.endEmitted)return d();v.on("merge2UnpipeEnd",x),v.on("end",x),i&&v.on("error",R),v.pipe(s,{end:!1}),v.resume()}for(let v=0;v<u.length;v++)C(u[v]);d()}function f(){r=!1,s.emit("queueDrain"),o&&s.end()}return s.setMaxListeners(0),s.add=a,s.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),s}function ca(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=ca(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(aa(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var pa=b(ar=>{"use strict";c();Object.defineProperty(ar,"__esModule",{value:!0});ar.merge=void 0;var Xd=ua();function Qd(e){let t=Xd(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>fa(e)),t.once("end",()=>fa(e)),t}ar.merge=Qd;function fa(e){e.forEach(t=>t.emit("close"))}});var da=b(mt=>{"use strict";c();Object.defineProperty(mt,"__esModule",{value:!0});mt.isEmpty=mt.isString=void 0;function Zd(e){return typeof e=="string"}mt.isString=Zd;function Jd(e){return e===""}mt.isEmpty=Jd});var De=b(ue=>{"use strict";c();Object.defineProperty(ue,"__esModule",{value:!0});ue.string=ue.stream=ue.pattern=ue.path=ue.fs=ue.errno=ue.array=void 0;var em=Ti();ue.array=em;var tm=$i();ue.errno=tm;var rm=Fi();ue.fs=rm;var nm=Ni();ue.path=nm;var om=sa();ue.pattern=om;var im=pa();ue.stream=im;var sm=da();ue.string=sm});var ya=b(fe=>{"use strict";c();Object.defineProperty(fe,"__esModule",{value:!0});fe.convertPatternGroupToTask=fe.convertPatternGroupsToTasks=fe.groupPatternsByBaseDirectory=fe.getNegativePatternsAsPositive=fe.getPositivePatterns=fe.convertPatternsToTasks=fe.generate=void 0;var Re=De();function am(e,t){let r=ma(e,t),n=ma(t.ignore,t),o=ga(r),i=ha(r,n),s=o.filter(u=>Re.pattern.isStaticPattern(u,t)),a=o.filter(u=>Re.pattern.isDynamicPattern(u,t)),l=kn(s,i,!1),f=kn(a,i,!0);return l.concat(f)}fe.generate=am;function ma(e,t){let r=e;return t.braceExpansion&&(r=Re.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>Re.pattern.removeDuplicateSlashes(n))}function kn(e,t,r){let n=[],o=Re.pattern.getPatternsOutsideCurrentDirectory(e),i=Re.pattern.getPatternsInsideCurrentDirectory(e),s=Pn(o),a=Pn(i);return n.push(...On(s,t,r)),"."in a?n.push(Tn(".",i,t,r)):n.push(...On(a,t,r)),n}fe.convertPatternsToTasks=kn;function ga(e){return Re.pattern.getPositivePatterns(e)}fe.getPositivePatterns=ga;function ha(e,t){return Re.pattern.getNegativePatterns(e).concat(t).map(Re.pattern.convertToPositivePattern)}fe.getNegativePatternsAsPositive=ha;function Pn(e){let t={};return e.reduce((r,n)=>{let o=Re.pattern.getBaseDirectory(n);return o in r?r[o].push(n):r[o]=[n],r},t)}fe.groupPatternsByBaseDirectory=Pn;function On(e,t,r){return Object.keys(e).map(n=>Tn(n,e[n],t,r))}fe.convertPatternGroupsToTasks=On;function Tn(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(Re.pattern.convertToNegativePattern))}}fe.convertPatternGroupToTask=Tn});var _a=b(cr=>{"use strict";c();Object.defineProperty(cr,"__esModule",{value:!0});cr.read=void 0;function cm(e,t,r){t.fs.lstat(e,(n,o)=>{if(n!==null){va(r,n);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){$n(r,o);return}t.fs.stat(e,(i,s)=>{if(i!==null){if(t.throwErrorOnBrokenSymbolicLink){va(r,i);return}$n(r,o);return}t.markSymbolicLink&&(s.isSymbolicLink=()=>!0),$n(r,s)})})}cr.read=cm;function va(e,t){e(t)}function $n(e,t){e(null,t)}});var xa=b(lr=>{"use strict";c();Object.defineProperty(lr,"__esModule",{value:!0});lr.read=void 0;function lm(e,t){let r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw n}}lr.read=lm});var Ca=b(je=>{"use strict";c();Object.defineProperty(je,"__esModule",{value:!0});je.createFileSystemAdapter=je.FILE_SYSTEM_ADAPTER=void 0;var ur=U("fs");je.FILE_SYSTEM_ADAPTER={lstat:ur.lstat,stat:ur.stat,lstatSync:ur.lstatSync,statSync:ur.statSync};function um(e){return e===void 0?je.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},je.FILE_SYSTEM_ADAPTER),e)}je.createFileSystemAdapter=um});var ba=b(In=>{"use strict";c();Object.defineProperty(In,"__esModule",{value:!0});var fm=Ca(),Fn=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=fm.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,r){return t??r}};In.default=Fn});var et=b(qe=>{"use strict";c();Object.defineProperty(qe,"__esModule",{value:!0});qe.statSync=qe.stat=qe.Settings=void 0;var Sa=_a(),pm=xa(),Ln=ba();qe.Settings=Ln.default;function dm(e,t,r){if(typeof t=="function"){Sa.read(e,Mn(),t);return}Sa.read(e,Mn(t),r)}qe.stat=dm;function mm(e,t){let r=Mn(t);return pm.read(e,r)}qe.statSync=mm;function Mn(e={}){return e instanceof Ln.default?e:new Ln.default(e)}});var Ea=b((KC,wa)=>{"use strict";c();var Ra;wa.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(Ra||(Ra=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var ka=b((XC,Aa)=>{"use strict";c();Aa.exports=hm;var gm=Ea();function hm(e,t){let r,n,o,i=!0;Array.isArray(e)?(r=[],n=e.length):(o=Object.keys(e),r={},n=o.length);function s(l){function f(){t&&t(l,r),t=null}i?gm(f):f()}function a(l,f,u){r[l]=u,(--n===0||f)&&s(f)}n?o?o.forEach(function(l){e[l](function(f,u){a(l,f,u)})}):e.forEach(function(l,f){l(function(u,p){a(f,u,p)})}):s(null),i=!1}});var Nn=b(pr=>{"use strict";c();Object.defineProperty(pr,"__esModule",{value:!0});pr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var fr=process.versions.node.split(".");if(fr[0]===void 0||fr[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Pa=Number.parseInt(fr[0],10),ym=Number.parseInt(fr[1],10),Oa=10,vm=10,_m=Pa>Oa,xm=Pa===Oa&&ym>=vm;pr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=_m||xm});var Ta=b(dr=>{"use strict";c();Object.defineProperty(dr,"__esModule",{value:!0});dr.createDirentFromStats=void 0;var Dn=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Cm(e,t){return new Dn(e,t)}dr.createDirentFromStats=Cm});var Vn=b(mr=>{"use strict";c();Object.defineProperty(mr,"__esModule",{value:!0});mr.fs=void 0;var bm=Ta();mr.fs=bm});var Hn=b(gr=>{"use strict";c();Object.defineProperty(gr,"__esModule",{value:!0});gr.joinPathSegments=void 0;function Sm(e,t,r){return e.endsWith(r)?e+t:e+r+t}gr.joinPathSegments=Sm});var Na=b(Be=>{"use strict";c();Object.defineProperty(Be,"__esModule",{value:!0});Be.readdir=Be.readdirWithFileTypes=Be.read=void 0;var Rm=et(),$a=ka(),wm=Nn(),Fa=Vn(),Ia=Hn();function Em(e,t,r){if(!t.stats&&wm.IS_SUPPORT_READDIR_WITH_FILE_TYPES){La(e,t,r);return}Ma(e,t,r)}Be.read=Em;function La(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(n!==null){hr(r,n);return}let i=o.map(a=>({dirent:a,name:a.name,path:Ia.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){jn(r,i);return}let s=i.map(a=>Am(a,t));$a(s,(a,l)=>{if(a!==null){hr(r,a);return}jn(r,l)})})}Be.readdirWithFileTypes=La;function Am(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,(n,o)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,e);return}e.dirent=Fa.fs.createDirentFromStats(e.name,o),r(null,e)})}}function Ma(e,t,r){t.fs.readdir(e,(n,o)=>{if(n!==null){hr(r,n);return}let i=o.map(s=>{let a=Ia.joinPathSegments(e,s,t.pathSegmentSeparator);return l=>{Rm.stat(a,t.fsStatSettings,(f,u)=>{if(f!==null){l(f);return}let p={name:s,path:a,dirent:Fa.fs.createDirentFromStats(s,u)};t.stats&&(p.stats=u),l(null,p)})}});$a(i,(s,a)=>{if(s!==null){hr(r,s);return}jn(r,a)})})}Be.readdir=Ma;function hr(e,t){e(t)}function jn(e,t){e(null,t)}});var qa=b(Ue=>{"use strict";c();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.readdir=Ue.readdirWithFileTypes=Ue.read=void 0;var km=et(),Pm=Nn(),Da=Vn(),Va=Hn();function Om(e,t){return!t.stats&&Pm.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Ha(e,t):ja(e,t)}Ue.read=Om;function Ha(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let o={dirent:n,name:n.name,path:Va.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let i=t.fs.statSync(o.path);o.dirent=Da.fs.createDirentFromStats(o.name,i)}catch(i){if(t.throwErrorOnBrokenSymbolicLink)throw i}return o})}Ue.readdirWithFileTypes=Ha;function ja(e,t){return t.fs.readdirSync(e).map(n=>{let o=Va.joinPathSegments(e,n,t.pathSegmentSeparator),i=km.statSync(o,t.fsStatSettings),s={name:n,path:o,dirent:Da.fs.createDirentFromStats(n,i)};return t.stats&&(s.stats=i),s})}Ue.readdir=ja});var Ba=b(Ge=>{"use strict";c();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createFileSystemAdapter=Ge.FILE_SYSTEM_ADAPTER=void 0;var gt=U("fs");Ge.FILE_SYSTEM_ADAPTER={lstat:gt.lstat,stat:gt.stat,lstatSync:gt.lstatSync,statSync:gt.statSync,readdir:gt.readdir,readdirSync:gt.readdirSync};function Tm(e){return e===void 0?Ge.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ge.FILE_SYSTEM_ADAPTER),e)}Ge.createFileSystemAdapter=Tm});var Ua=b(Bn=>{"use strict";c();Object.defineProperty(Bn,"__esModule",{value:!0});var $m=U("path"),Fm=et(),Im=Ba(),qn=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Im.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,$m.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Fm.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Bn.default=qn});var yr=b(We=>{"use strict";c();Object.defineProperty(We,"__esModule",{value:!0});We.Settings=We.scandirSync=We.scandir=void 0;var Ga=Na(),Lm=qa(),Un=Ua();We.Settings=Un.default;function Mm(e,t,r){if(typeof t=="function"){Ga.read(e,Gn(),t);return}Ga.read(e,Gn(t),r)}We.scandir=Mm;function Nm(e,t){let r=Gn(t);return Lm.read(e,r)}We.scandirSync=Nm;function Gn(e={}){return e instanceof Un.default?e:new Un.default(e)}});var za=b((hb,Wa)=>{"use strict";c();function Dm(e){var t=new e,r=t;function n(){var i=t;return i.next?t=i.next:(t=new e,r=t),i.next=null,i}function o(i){r.next=i,r=i}return{get:n,release:o}}Wa.exports=Dm});var Ya=b((vb,Wn)=>{"use strict";c();var Vm=za();function Ka(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=Vm(Hm),o=null,i=null,s=0,a=null,l={push:x,drain:Ce,saturated:Ce,pause:u,paused:!1,concurrency:r,running:f,resume:C,idle:v,length:p,getQueue:d,unshift:R,empty:Ce,kill:I,killAndDrain:L,error:G};return l;function f(){return s}function u(){l.paused=!0}function p(){for(var O=o,D=0;O;)O=O.next,D++;return D}function d(){for(var O=o,D=[];O;)D.push(O.value),O=O.next;return D}function C(){if(l.paused){l.paused=!1;for(var O=0;O<l.concurrency;O++)s++,S()}}function v(){return s===0&&l.length()===0}function x(O,D){var A=n.get();A.context=e,A.release=S,A.value=O,A.callback=D||Ce,A.errorHandler=a,s===l.concurrency||l.paused?i?(i.next=A,i=A):(o=A,i=A,l.saturated()):(s++,t.call(e,A.value,A.worked))}function R(O,D){var A=n.get();A.context=e,A.release=S,A.value=O,A.callback=D||Ce,s===l.concurrency||l.paused?o?(A.next=o,o=A):(o=A,i=A,l.saturated()):(s++,t.call(e,A.value,A.worked))}function S(O){O&&n.release(O);var D=o;D?l.paused?s--:(i===o&&(i=null),o=D.next,D.next=null,t.call(e,D.value,D.worked),i===null&&l.empty()):--s===0&&l.drain()}function I(){o=null,i=null,l.drain=Ce}function L(){o=null,i=null,l.drain(),l.drain=Ce}function G(O){a=O}}function Ce(){}function Hm(){this.value=null,this.callback=Ce,this.next=null,this.release=Ce,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=Ce,e.errorHandler&&i(r,s),o.call(e.context,r,n),e.release(e)}}function jm(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(u,p){t.call(this,u).then(function(d){p(null,d)},p)}var o=Ka(e,n,r),i=o.push,s=o.unshift;return o.push=a,o.unshift=l,o.drained=f,o;function a(u){var p=new Promise(function(d,C){i(u,function(v,x){if(v){C(v);return}d(x)})});return p.catch(Ce),p}function l(u){var p=new Promise(function(d,C){s(u,function(v,x){if(v){C(v);return}d(x)})});return p.catch(Ce),p}function f(){if(o.idle())return new Promise(function(d){d()});var u=o.drain,p=new Promise(function(d){o.drain=function(){u(),d()}});return p}}Wn.exports=Ka;Wn.exports.promise=jm});var vr=b(Pe=>{"use strict";c();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.joinPathSegments=Pe.replacePathSegmentSeparator=Pe.isAppliedFilter=Pe.isFatalError=void 0;function qm(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Pe.isFatalError=qm;function Bm(e,t){return e===null||e(t)}Pe.isAppliedFilter=Bm;function Um(e,t){return e.split(/[/\\]/).join(t)}Pe.replacePathSegmentSeparator=Um;function Gm(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Pe.joinPathSegments=Gm});var Yn=b(Kn=>{"use strict";c();Object.defineProperty(Kn,"__esModule",{value:!0});var Wm=vr(),zn=class{constructor(t,r){this._root=t,this._settings=r,this._root=Wm.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Kn.default=zn});var Zn=b(Qn=>{"use strict";c();Object.defineProperty(Qn,"__esModule",{value:!0});var zm=U("events"),Km=yr(),Ym=Ya(),_r=vr(),Xm=Yn(),Xn=class extends Xm.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=Km.scandir,this._emitter=new zm.EventEmitter,this._queue=Ym(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(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){let n={directory:t,base:r};this._queue.push(n,o=>{o!==null&&this._handleError(o)})}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,(n,o)=>{if(n!==null){r(n,void 0);return}for(let i of o)this._handleEntry(i,t.base);r(null,void 0)})}_handleError(t){this._isDestroyed||!_r.isFatalError(this._settings,t)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError)return;let n=t.path;r!==void 0&&(t.path=_r.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),_r.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&_r.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Qn.default=Xn});var Xa=b(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});var Qm=Zn(),Jn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Qm.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{Zm(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Jm(t,this._storage)}),this._reader.read()}};eo.default=Jn;function Zm(e,t){e(t)}function Jm(e,t){e(null,t)}});var Qa=b(ro=>{"use strict";c();Object.defineProperty(ro,"__esModule",{value:!0});var eg=U("stream"),tg=Zn(),to=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new tg.default(this._root,this._settings),this._stream=new eg.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};ro.default=to});var Za=b(oo=>{"use strict";c();Object.defineProperty(oo,"__esModule",{value:!0});var rg=yr(),xr=vr(),ng=Yn(),no=class extends ng.default{constructor(){super(...arguments),this._scandir=rg.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(let t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,r){try{let n=this._scandir(t,this._settings.fsScandirSettings);for(let o of n)this._handleEntry(o,r)}catch(n){this._handleError(n)}}_handleError(t){if(xr.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=xr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),xr.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&xr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};oo.default=no});var Ja=b(so=>{"use strict";c();Object.defineProperty(so,"__esModule",{value:!0});var og=Za(),io=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new og.default(this._root,this._settings)}read(){return this._reader.read()}};so.default=io});var ec=b(co=>{"use strict";c();Object.defineProperty(co,"__esModule",{value:!0});var ig=U("path"),sg=yr(),ao=class{constructor(t={}){this._options=t,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,ig.sep),this.fsScandirSettings=new sg.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};co.default=ao});var br=b(Oe=>{"use strict";c();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Settings=Oe.walkStream=Oe.walkSync=Oe.walk=void 0;var tc=Xa(),ag=Qa(),cg=Ja(),lo=ec();Oe.Settings=lo.default;function lg(e,t,r){if(typeof t=="function"){new tc.default(e,Cr()).read(t);return}new tc.default(e,Cr(t)).read(r)}Oe.walk=lg;function ug(e,t){let r=Cr(t);return new cg.default(e,r).read()}Oe.walkSync=ug;function fg(e,t){let r=Cr(t);return new ag.default(e,r).read()}Oe.walkStream=fg;function Cr(e={}){return e instanceof lo.default?e:new lo.default(e)}});var Sr=b(fo=>{"use strict";c();Object.defineProperty(fo,"__esModule",{value:!0});var pg=U("path"),dg=et(),rc=De(),uo=class{constructor(t){this._settings=t,this._fsStatSettings=new dg.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return pg.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:rc.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!rc.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};fo.default=uo});var go=b(mo=>{"use strict";c();Object.defineProperty(mo,"__esModule",{value:!0});var mg=U("stream"),gg=et(),hg=br(),yg=Sr(),po=class extends yg.default{constructor(){super(...arguments),this._walkStream=hg.walkStream,this._stat=gg.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),o=new mg.PassThrough({objectMode:!0});o._write=(i,s,a)=>this._getEntry(n[i],t[i],r).then(l=>{l!==null&&r.entryFilter(l)&&o.push(l),i===n.length-1&&o.end(),a()}).catch(a);for(let i=0;i<n.length;i++)o.write(i);return o}_getEntry(t,r,n){return this._getStat(t).then(o=>this._makeEntry(o,r)).catch(o=>{if(n.errorFilter(o))return null;throw o})}_getStat(t){return new Promise((r,n)=>{this._stat(t,this._fsStatSettings,(o,i)=>o===null?r(i):n(o))})}};mo.default=po});var nc=b(yo=>{"use strict";c();Object.defineProperty(yo,"__esModule",{value:!0});var vg=br(),_g=Sr(),xg=go(),ho=class extends _g.default{constructor(){super(...arguments),this._walkAsync=vg.walk,this._readerStream=new xg.default(this._settings)}dynamic(t,r){return new Promise((n,o)=>{this._walkAsync(t,r,(i,s)=>{i===null?n(s):o(i)})})}async static(t,r){let n=[],o=this._readerStream.static(t,r);return new Promise((i,s)=>{o.once("error",s),o.on("data",a=>n.push(a)),o.once("end",()=>i(n))})}};yo.default=ho});var oc=b(_o=>{"use strict";c();Object.defineProperty(_o,"__esModule",{value:!0});var $t=De(),vo=class{constructor(t,r,n){this._patterns=t,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let t of this._patterns){let r=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:t,segments:r,sections:n})}}_getPatternSegments(t){return $t.pattern.getPatternParts(t,this._micromatchOptions).map(n=>$t.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:$t.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return $t.array.splitWhen(t,r=>r.dynamic&&$t.pattern.hasGlobStar(r.pattern))}};_o.default=vo});var ic=b(Co=>{"use strict";c();Object.defineProperty(Co,"__esModule",{value:!0});var Cg=oc(),xo=class extends Cg.default{match(t){let r=t.split("/"),n=r.length,o=this._storage.filter(i=>!i.complete||i.segments.length>n);for(let i of o){let s=i.sections[0];if(!i.complete&&n>s.length||r.every((l,f)=>{let u=i.segments[f];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};Co.default=xo});var sc=b(So=>{"use strict";c();Object.defineProperty(So,"__esModule",{value:!0});var Rr=De(),bg=ic(),bo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r}getFilter(t,r,n){let o=this._getMatcher(r),i=this._getNegativePatternsRe(n);return s=>this._filter(t,s,o,i)}_getMatcher(t){return new bg.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Rr.pattern.isAffectDepthOfReadingPattern);return Rr.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=Rr.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(i,n)?!1:this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(t,r){return this._settings.deep===1/0?!1:this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){let n=r.split("/").length;if(t==="")return n;let o=t.split("/").length;return n-o}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!Rr.pattern.matchAny(t,r)}};So.default=bo});var ac=b(wo=>{"use strict";c();Object.defineProperty(wo,"__esModule",{value:!0});var tt=De(),Ro=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let n=tt.pattern.convertPatternsToRe(t,this._micromatchOptions),o=tt.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return i=>this._filter(i,n,o)}_filter(t,r,n){let o=tt.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(o)||this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)||this._isSkippedByAbsoluteNegativePatterns(o,n))return!1;let i=t.dirent.isDirectory(),s=this._isMatchToPatterns(o,r,i)&&!this._isMatchToPatterns(o,n,i);return this._settings.unique&&s&&this._createIndexRecord(o),s}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,r){if(!this._settings.absolute)return!1;let n=tt.path.makeAbsolute(this._settings.cwd,t);return tt.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){let o=tt.pattern.matchAny(t,r);return!o&&n?tt.pattern.matchAny(t+"/",r):o}};wo.default=Ro});var cc=b(Ao=>{"use strict";c();Object.defineProperty(Ao,"__esModule",{value:!0});var Sg=De(),Eo=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return Sg.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};Ao.default=Eo});var uc=b(Po=>{"use strict";c();Object.defineProperty(Po,"__esModule",{value:!0});var lc=De(),ko=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=lc.path.makeAbsolute(this._settings.cwd,r),r=lc.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};Po.default=ko});var wr=b(To=>{"use strict";c();Object.defineProperty(To,"__esModule",{value:!0});var Rg=U("path"),wg=sc(),Eg=ac(),Ag=cc(),kg=uc(),Oo=class{constructor(t){this._settings=t,this.errorFilter=new Ag.default(this._settings),this.entryFilter=new Eg.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new wg.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new kg.default(this._settings)}_getRootDirectory(t){return Rg.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){let r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.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}}};To.default=Oo});var fc=b(Fo=>{"use strict";c();Object.defineProperty(Fo,"__esModule",{value:!0});var Pg=nc(),Og=wr(),$o=class extends Og.default{constructor(){super(...arguments),this._reader=new Pg.default(this._settings)}async read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(r,t,n)).map(i=>n.transform(i))}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Fo.default=$o});var pc=b(Lo=>{"use strict";c();Object.defineProperty(Lo,"__esModule",{value:!0});var Tg=U("stream"),$g=go(),Fg=wr(),Io=class extends Fg.default{constructor(){super(...arguments),this._reader=new $g.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new Tg.Readable({objectMode:!0,read:()=>{}});return o.once("error",s=>i.emit("error",s)).on("data",s=>i.emit("data",n.transform(s))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Lo.default=Io});var dc=b(No=>{"use strict";c();Object.defineProperty(No,"__esModule",{value:!0});var Ig=et(),Lg=br(),Mg=Sr(),Mo=class extends Mg.default{constructor(){super(...arguments),this._walkSync=Lg.walkSync,this._statSync=Ig.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){let n=[];for(let o of t){let i=this._getFullEntryPath(o),s=this._getEntry(i,o,r);s===null||!r.entryFilter(s)||n.push(s)}return n}_getEntry(t,r,n){try{let o=this._getStat(t);return this._makeEntry(o,r)}catch(o){if(n.errorFilter(o))return null;throw o}}_getStat(t){return this._statSync(t,this._fsStatSettings)}};No.default=Mo});var mc=b(Vo=>{"use strict";c();Object.defineProperty(Vo,"__esModule",{value:!0});var Ng=dc(),Dg=wr(),Do=class extends Dg.default{constructor(){super(...arguments),this._reader=new Ng.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(r,t,n).map(n.transform)}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Vo.default=Do});var gc=b(yt=>{"use strict";c();Object.defineProperty(yt,"__esModule",{value:!0});yt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var ht=U("fs"),Vg=U("os"),Hg=Math.max(Vg.cpus().length,1);yt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:ht.lstat,lstatSync:ht.lstatSync,stat:ht.stat,statSync:ht.statSync,readdir:ht.readdir,readdirSync:ht.readdirSync};var Ho=class{constructor(t={}){this._options=t,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,Hg),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(t,r){return t===void 0?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},yt.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};yt.default=Ho});var Er=b((mS,yc)=>{"use strict";c();var hc=ya(),jg=fc(),qg=pc(),Bg=mc(),jo=gc(),be=De();async function qo(e,t){we(e);let r=Bo(e,jg.default,t),n=await Promise.all(r);return be.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(f,u){we(f);let p=Bo(f,Bg.default,u);return be.array.flatten(p)}e.sync=t;function r(f,u){we(f);let p=Bo(f,qg.default,u);return be.stream.merge(p)}e.stream=r;function n(f,u){we(f);let p=[].concat(f),d=new jo.default(u);return hc.generate(p,d)}e.generateTasks=n;function o(f,u){we(f);let p=new jo.default(u);return be.pattern.isDynamicPattern(f,p)}e.isDynamicPattern=o;function i(f){return we(f),be.path.escape(f)}e.escapePath=i;function s(f){return we(f),be.path.convertPathToPattern(f)}e.convertPathToPattern=s;let a;(function(f){function u(d){return we(d),be.path.escapePosixPath(d)}f.escapePath=u;function p(d){return we(d),be.path.convertPosixPathToPattern(d)}f.convertPathToPattern=p})(a=e.posix||(e.posix={}));let l;(function(f){function u(d){return we(d),be.path.escapeWindowsPath(d)}f.escapePath=u;function p(d){return we(d),be.path.convertWindowsPathToPattern(d)}f.convertPathToPattern=p})(l=e.win32||(e.win32={}))})(qo||(qo={}));function Bo(e,t,r){let n=[].concat(e),o=new jo.default(r),i=hc.generate(n,o),s=new t(o);return i.map(s.read,s)}function we(e){if(![].concat(e).every(n=>be.string.isString(n)&&!be.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}yc.exports=qo});var _c=b((hS,vc)=>{"use strict";c();var vt=1e3,_t=vt*60,xt=_t*60,rt=xt*24,Ug=rt*7,Gg=rt*365.25;vc.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Wg(e);if(r==="number"&&isFinite(e))return t.long?Kg(e):zg(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Wg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Gg;case"weeks":case"week":case"w":return r*Ug;case"days":case"day":case"d":return r*rt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*xt;case"minutes":case"minute":case"mins":case"min":case"m":return r*_t;case"seconds":case"second":case"secs":case"sec":case"s":return r*vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function zg(e){var t=Math.abs(e);return t>=rt?Math.round(e/rt)+"d":t>=xt?Math.round(e/xt)+"h":t>=_t?Math.round(e/_t)+"m":t>=vt?Math.round(e/vt)+"s":e+"ms"}function Kg(e){var t=Math.abs(e);return t>=rt?Ar(e,t,rt,"day"):t>=xt?Ar(e,t,xt,"hour"):t>=_t?Ar(e,t,_t,"minute"):t>=vt?Ar(e,t,vt,"second"):e+" ms"}function Ar(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var Uo=b((vS,xc)=>{"use strict";c();function Yg(e){r.debug=r,r.default=r,r.coerce=l,r.disable=i,r.enable=o,r.enabled=s,r.humanize=_c(),r.destroy=f,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let p=0;for(let d=0;d<u.length;d++)p=(p<<5)-p+u.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(u){let p,d=null,C,v;function x(...R){if(!x.enabled)return;let S=x,I=Number(new Date),L=I-(p||I);S.diff=L,S.prev=p,S.curr=I,p=I,R[0]=r.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");let G=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(D,A)=>{if(D==="%%")return"%";G++;let w=r.formatters[A];if(typeof w=="function"){let T=R[G];D=w.call(S,T),R.splice(G,1),G--}return D}),r.formatArgs.call(S,R),(S.log||r.log).apply(S,R)}return x.namespace=u,x.useColors=r.useColors(),x.color=r.selectColor(u),x.extend=n,x.destroy=r.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(C!==r.namespaces&&(C=r.namespaces,v=r.enabled(u)),v),set:R=>{d=R}}),typeof r.init=="function"&&r.init(x),x}function n(u,p){let d=r(this.namespace+(typeof p>"u"?":":p)+u);return d.log=this.log,d}function o(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p,d=(typeof u=="string"?u:"").split(/[\s,]+/),C=d.length;for(p=0;p<C;p++)d[p]&&(u=d[p].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function i(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let p,d;for(p=0,d=r.skips.length;p<d;p++)if(r.skips[p].test(u))return!1;for(p=0,d=r.names.length;p<d;p++)if(r.names[p].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}xc.exports=Yg});var Cc=b((ve,kr)=>{"use strict";c();ve.formatArgs=Qg;ve.save=Zg;ve.load=Jg;ve.useColors=Xg;ve.storage=eh();ve.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ve.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Xg(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Qg(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+kr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}ve.log=console.debug||console.log||(()=>{});function Zg(e){try{e?ve.storage.setItem("debug",e):ve.storage.removeItem("debug")}catch{}}function Jg(){let e;try{e=ve.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function eh(){try{return localStorage}catch{}}kr.exports=Uo()(ve);var{formatters:th}=kr.exports;th.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Sc=b((CS,bc)=>{"use strict";c();bc.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Ec=b((SS,wc)=>{"use strict";c();var rh=U("os"),Rc=U("tty"),Se=Sc(),{env:ae}=process,Pr;Se("no-color")||Se("no-colors")||Se("color=false")||Se("color=never")?Pr=0:(Se("color")||Se("colors")||Se("color=true")||Se("color=always"))&&(Pr=1);function nh(){if("FORCE_COLOR"in ae)return ae.FORCE_COLOR==="true"?1:ae.FORCE_COLOR==="false"?0:ae.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ae.FORCE_COLOR,10),3)}function oh(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ih(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=nh();n!==void 0&&(Pr=n);let o=r?Pr:n;if(o===0)return 0;if(r){if(Se("color=16m")||Se("color=full")||Se("color=truecolor"))return 3;if(Se("color=256"))return 2}if(e&&!t&&o===void 0)return 0;let i=o||0;if(ae.TERM==="dumb")return i;if(process.platform==="win32"){let s=rh.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ae)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in ae)||ae.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ae)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ae.TEAMCITY_VERSION)?1:0;if(ae.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ae){let s=Number.parseInt((ae.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ae.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ae.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ae.TERM)||"COLORTERM"in ae?1:i}function Go(e,t={}){let r=ih(e,{streamIsTTY:e&&e.isTTY,...t});return oh(r)}wc.exports={supportsColor:Go,stdout:Go({isTTY:Rc.isatty(1)}),stderr:Go({isTTY:Rc.isatty(2)})}});var kc=b((ce,Tr)=>{"use strict";c();var sh=U("tty"),Or=U("util");ce.init=dh;ce.log=uh;ce.formatArgs=ch;ce.save=fh;ce.load=ph;ce.useColors=ah;ce.destroy=Or.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ce.colors=[6,2,3,4,5,1];try{let e=Ec();e&&(e.stderr||e).level>=2&&(ce.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ce.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function ah(){return"colors"in ce.inspectOpts?!!ce.inspectOpts.colors:sh.isatty(process.stderr.fd)}function ch(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
4
|
+
`).join(`
|
|
5
|
+
`+i),e.push(o+"m+"+Tr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=lh()+t+" "+e[0]}function lh(){return ce.inspectOpts.hideDate?"":new Date().toISOString()+" "}function uh(...e){return process.stderr.write(Or.format(...e)+`
|
|
6
|
+
`)}function fh(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function ph(){return process.env.DEBUG}function dh(e){e.inspectOpts={};let t=Object.keys(ce.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ce.inspectOpts[t[r]]}Tr.exports=Uo()(ce);var{formatters:Ac}=Tr.exports;Ac.o=function(e){return this.inspectOpts.colors=this.useColors,Or.inspect(e,this.inspectOpts).split(`
|
|
7
|
+
`).map(t=>t.trim()).join(" ")};Ac.O=function(e){return this.inspectOpts.colors=this.useColors,Or.inspect(e,this.inspectOpts)}});var zo=b((ES,Wo)=>{"use strict";c();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Wo.exports=Cc():Wo.exports=kc()});var Fc=b((kS,$c)=>{"use strict";c();var{hasOwnProperty:Ko}=Object.prototype,Yo=(e,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;let r=t.platform==="win32"?`\r
|
|
8
|
+
`:`
|
|
9
|
+
`,n=t.whitespace?" = ":"=",o=[],i=t.sort?Object.keys(e).sort():Object.keys(e),s=0;t.align&&(s=Ve(i.filter(f=>e[f]===null||Array.isArray(e[f])||typeof e[f]!="object").map(f=>Array.isArray(e[f])?`${f}[]`:f).concat([""]).reduce((f,u)=>Ve(f).length>=Ve(u).length?f:u)).length);let a="",l=t.bracketedArray?"[]":"";for(let f of i){let u=e[f];if(u&&Array.isArray(u))for(let p of u)a+=Ve(`${f}${l}`).padEnd(s," ")+n+Ve(p)+r;else u&&typeof u=="object"?o.push(f):a+=Ve(f).padEnd(s," ")+n+Ve(u)+r}t.section&&a.length&&(a="["+Ve(t.section)+"]"+(t.newline?r+r:r)+a);for(let f of o){let u=Oc(f,".").join("\\."),p=(t.section?t.section+".":"")+u,d=Yo(e[f],{...t,section:p});a.length&&d.length&&(a+=r),a+=d}return a};function Oc(e,t){var r=0,n=0,o=0,i=[];do if(o=e.indexOf(t,r),o!==-1){if(r=o+t.length,o>0&&e[o-1]==="\\")continue;i.push(e.slice(n,o)),n=o+t.length}while(o!==-1);return i.push(e.slice(n)),i}var Pc=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;let r=Object.create(null),n=r,o=null,i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g),a={};for(let f of s){if(!f||f.match(/^\s*[;#]/)||f.match(/^\s*$/))continue;let u=f.match(i);if(!u)continue;if(u[1]!==void 0){if(o=$r(u[1]),o==="__proto__"){n=Object.create(null);continue}n=r[o]=r[o]||Object.create(null);continue}let p=$r(u[2]),d;t.bracketedArray?d=p.length>2&&p.slice(-2)==="[]":(a[p]=(a?.[p]||0)+1,d=a[p]>1);let C=d?p.slice(0,-2):p;if(C==="__proto__")continue;let v=u[3]?$r(u[4]):!0,x=v==="true"||v==="false"||v==="null"?JSON.parse(v):v;d&&(Ko.call(n,C)?Array.isArray(n[C])||(n[C]=[n[C]]):n[C]=[]),Array.isArray(n[C])?n[C].push(x):n[C]=x}let l=[];for(let f of Object.keys(r)){if(!Ko.call(r,f)||typeof r[f]!="object"||Array.isArray(r[f]))continue;let u=Oc(f,".");n=r;let p=u.pop(),d=p.replace(/\\\./g,".");for(let C of u)C!=="__proto__"&&((!Ko.call(n,C)||typeof n[C]!="object")&&(n[C]=Object.create(null)),n=n[C]);n===r&&d===p||(n[d]=r[f],l.push(f))}for(let f of l)delete r[f];return r},Tc=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),Ve=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Tc(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),$r=(e,t)=>{if(e=(e||"").trim(),Tc(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,n="";for(let o=0,i=e.length;o<i;o++){let s=e.charAt(o);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return e};$c.exports={parse:Pc,decode:Pc,stringify:Yo,encode:Yo,safe:Ve,unsafe:$r}});var Zo=b((MS,Dc)=>{"use strict";c();var _h=U("os");Dc.exports=_h.homedir||function(){var t=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||t||null:process.platform==="darwin"?t||(r?"/Users/"+r:null):process.platform==="linux"?t||(process.getuid()===0?"/root":r?"/home/"+r:null):t||null}});var Jo=b((DS,Vc)=>{"use strict";c();Vc.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(r,n){return n};var t=new Error().stack;return Error.prepareStackTrace=e,t[2].getFileName()}});var Hc=b((HS,Lt)=>{"use strict";c();var xh=process.platform==="win32",Ch=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,ei={};function bh(e){return Ch.exec(e).slice(1)}ei.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=bh(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0]===t[1]?t[0]:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};var Sh=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,ti={};function Rh(e){return Sh.exec(e).slice(1)}ti.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Rh(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};xh?Lt.exports=ei.parse:Lt.exports=ti.parse;Lt.exports.posix=ti.parse;Lt.exports.win32=ei.parse});var ri=b((qS,Uc)=>{"use strict";c();var Bc=U("path"),jc=Bc.parse||Hc(),qc=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=jc(t);i.dir!==o[o.length-1];)o.push(i.dir),i=jc(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(l){return Bc.resolve(n,a,l)}))},[])};Uc.exports=function(t,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,t,function(){return qc(t,o)},r);var i=qc(t,o);return r&&r.paths?i.concat(r.paths):i}});var ni=b((US,Gc)=>{"use strict";c();Gc.exports=function(e,t){return t||{}}});var Kc=b((WS,zc)=>{"use strict";c();var wh="Function.prototype.bind called on incompatible ",Eh=Object.prototype.toString,Ah=Math.max,kh="[object Function]",Wc=function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},Ph=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},Oh=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};zc.exports=function(t){var r=this;if(typeof r!="function"||Eh.apply(r)!==kh)throw new TypeError(wh+r);for(var n=Ph(arguments,1),o,i=function(){if(this instanceof o){var u=r.apply(this,Wc(n,arguments));return Object(u)===u?u:this}return r.apply(t,Wc(n,arguments))},s=Ah(0,r.length-n.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Oh(a,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var f=function(){};f.prototype=r.prototype,o.prototype=new f,f.prototype=null}return o}});var Xc=b((KS,Yc)=>{"use strict";c();var Th=Kc();Yc.exports=Function.prototype.bind||Th});var Zc=b((XS,Qc)=>{"use strict";c();var $h=Function.prototype.call,Fh=Object.prototype.hasOwnProperty,Ih=Xc();Qc.exports=Ih.call($h,Fh)});var Jc=b((ZS,Lh)=>{Lh.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Mt=b((JS,rl)=>{"use strict";c();var Mh=Zc();function Nh(e,t){for(var r=e.split("."),n=t.split(" "),o=n.length>1?n[0]:"=",i=(n.length>1?n[1]:n[0]).split("."),s=0;s<3;++s){var a=parseInt(r[s]||0,10),l=parseInt(i[s]||0,10);if(a!==l)return o==="<"?a<l:o===">="?a>=l:!1}return o===">="}function el(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Nh(e,r[n]))return!1;return!0}function Dh(e,t){if(typeof t=="boolean")return t;var r=typeof e>"u"?process.versions&&process.versions.node:e;if(typeof r!="string")throw new TypeError(typeof e>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(t&&typeof t=="object"){for(var n=0;n<t.length;++n)if(el(r,t[n]))return!0;return!1}return el(r,t)}var tl=Jc();rl.exports=function(t,r){return Mh(tl,t)&&Dh(r,tl[t])}});var il=b((tR,ol)=>{"use strict";c();var nt=U("fs"),Vh=Zo(),re=U("path"),Hh=Jo(),jh=ri(),qh=ni(),Bh=Mt(),Uh=process.platform!=="win32"&&nt.realpath&&typeof nt.realpath.native=="function"?nt.realpath.native:nt.realpath,nl=Vh(),Gh=function(){return[re.join(nl,".node_modules"),re.join(nl,".node_libraries")]},Wh=function(t,r){nt.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},zh=function(t,r){nt.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},Kh=function(t,r){Uh(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Nt=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},Yh=function(t,r,n){t(r,function(o,i){if(o)n(o);else try{var s=JSON.parse(i);n(null,s)}catch{n(null)}})},Xh=function(t,r,n){for(var o=jh(r,n,t),i=0;i<o.length;i++)o[i]=re.join(o[i],t);return o};ol.exports=function(t,r,n){var o=n,i=r;if(typeof r=="function"&&(o=i,i={}),typeof t!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){o(s)})}i=qh(t,i);var a=i.isFile||Wh,l=i.isDirectory||zh,f=i.readFile||nt.readFile,u=i.realpath||Kh,p=i.readPackage||Yh;if(i.readFile&&i.readPackage){var d=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(d)})}var C=i.packageIterator,v=i.extensions||[".js"],x=i.includeCoreModules!==!1,R=i.basedir||re.dirname(Hh()),S=i.filename||R;i.paths=i.paths||Gh();var I=re.resolve(R);Nt(u,I,i,function(m,k){m?o(m):G(k)});var L;function G(m){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))L=re.resolve(m,t),(t==="."||t===".."||t.slice(-1)==="/")&&(L+="/"),/\/$/.test(t)&&L===m?w(L,i.package,O):D(L,i.package,O);else{if(x&&Bh(t))return o(null,t);z(t,m,function(k,$,V){if(k)o(k);else{if($)return Nt(u,$,i,function(_,q){_?o(_):o(null,q,V)});var y=new Error("Cannot find module '"+t+"' from '"+S+"'");y.code="MODULE_NOT_FOUND",o(y)}})}}function O(m,k,$){m?o(m):k?o(null,k,$):w(L,function(V,y,_){if(V)o(V);else if(y)Nt(u,y,i,function(F,M){F?o(F):o(null,M,_)});else{var q=new Error("Cannot find module '"+t+"' from '"+S+"'");q.code="MODULE_NOT_FOUND",o(q)}})}function D(m,k,$){var V=k,y=$;typeof V=="function"&&(y=V,V=void 0);var _=[""].concat(v);q(_,m,V);function q(F,M,W){if(F.length===0)return y(null,void 0,W);var j=M+F[0],ne=W;ne?J(null,ne):A(re.dirname(j),J);function J(le,H,me){if(ne=H,le)return y(le);if(me&&ne&&i.pathFilter){var lt=re.relative(me,j),P=lt.slice(0,lt.length-F[0].length),K=i.pathFilter(ne,M,P);if(K)return q([""].concat(v.slice()),re.resolve(me,K),ne)}a(j,Le)}function Le(le,H){if(le)return y(le);if(H)return y(null,j,ne);q(F.slice(1),M,ne)}}}function A(m,k){if(m===""||m==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(m)||/[/\\]node_modules[/\\]*$/.test(m))return k(null);Nt(u,m,i,function($,V){if($)return A(re.dirname(m),k);var y=re.join(V,"package.json");a(y,function(_,q){if(!q)return A(re.dirname(m),k);p(f,y,function(F,M){F&&k(F);var W=M;W&&i.packageFilter&&(W=i.packageFilter(W,y)),k(null,W,m)})})})}function w(m,k,$){var V=$,y=k;typeof y=="function"&&(V=y,y=i.package),Nt(u,m,i,function(_,q){if(_)return V(_);var F=re.join(q,"package.json");a(F,function(M,W){if(M)return V(M);if(!W)return D(re.join(m,"index"),y,V);p(f,F,function(j,ne){if(j)return V(j);var J=ne;if(J&&i.packageFilter&&(J=i.packageFilter(J,F)),J&&J.main){if(typeof J.main!="string"){var Le=new TypeError("package \u201C"+J.name+"\u201D `main` must be a string");return Le.code="INVALID_PACKAGE_MAIN",V(Le)}(J.main==="."||J.main==="./")&&(J.main="index"),D(re.resolve(m,J.main),J,function(le,H,me){if(le)return V(le);if(H)return V(null,H,me);if(!me)return D(re.join(m,"index"),me,V);var lt=re.resolve(m,me.main);w(lt,me,function(P,K,E){if(P)return V(P);if(K)return V(null,K,E);D(re.join(m,"index"),E,V)})});return}D(re.join(m,"/index"),J,V)})})})}function T(m,k){if(k.length===0)return m(null,void 0);var $=k[0];l(re.dirname($),V);function V(q,F){if(q)return m(q);if(!F)return T(m,k.slice(1));D($,i.package,y)}function y(q,F,M){if(q)return m(q);if(F)return m(null,F,M);w($,i.package,_)}function _(q,F,M){if(q)return m(q);if(F)return m(null,F,M);T(m,k.slice(1))}}function z(m,k,$){var V=function(){return Xh(m,k,i)};T($,C?C(m,k,V,i):V())}}});var sl=b((nR,Qh)=>{Qh.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var ul=b((oR,ll)=>{"use strict";c();var Zh=Mt(),al=sl(),cl={};for(Ir in al)Object.prototype.hasOwnProperty.call(al,Ir)&&(cl[Ir]=Zh(Ir));var Ir;ll.exports=cl});var pl=b((sR,fl)=>{"use strict";c();var Jh=Mt();fl.exports=function(t){return Jh(t)}});var gl=b((cR,ml)=>{"use strict";c();var ey=Mt(),ot=U("fs"),pe=U("path"),ty=Zo(),ry=Jo(),ny=ri(),oy=ni(),iy=process.platform!=="win32"&&ot.realpathSync&&typeof ot.realpathSync.native=="function"?ot.realpathSync.native:ot.realpathSync,dl=ty(),sy=function(){return[pe.join(dl,".node_modules"),pe.join(dl,".node_libraries")]},ay=function(t){try{var r=ot.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},cy=function(t){try{var r=ot.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},ly=function(t){try{return iy(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},Dt=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},uy=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch{}},fy=function(t,r,n){for(var o=ny(r,n,t),i=0;i<o.length;i++)o[i]=pe.join(o[i],t);return o};ml.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=oy(t,r),o=n.isFile||ay,i=n.readFileSync||ot.readFileSync,s=n.isDirectory||cy,a=n.realpathSync||ly,l=n.readPackageSync||uy;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,u=n.extensions||[".js"],p=n.includeCoreModules!==!1,d=n.basedir||pe.dirname(ry()),C=n.filename||d;n.paths=n.paths||sy();var v=Dt(a,pe.resolve(d),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var x=pe.resolve(v,t);(t==="."||t===".."||t.slice(-1)==="/")&&(x+="/");var R=L(x)||O(x);if(R)return Dt(a,R,n)}else{if(p&&ey(t))return t;var S=D(t,v);if(S)return Dt(a,S,n)}var I=new Error("Cannot find module '"+t+"' from '"+C+"'");throw I.code="MODULE_NOT_FOUND",I;function L(A){var w=G(pe.dirname(A));if(w&&w.dir&&w.pkg&&n.pathFilter){var T=pe.relative(w.dir,A),z=n.pathFilter(w.pkg,A,T);z&&(A=pe.resolve(w.dir,z))}if(o(A))return A;for(var m=0;m<u.length;m++){var k=A+u[m];if(o(k))return k}}function G(A){if(!(A===""||A==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(A))&&!/[/\\]node_modules[/\\]*$/.test(A)){var w=pe.join(Dt(a,A,n),"package.json");if(!o(w))return G(pe.dirname(A));var T=l(i,w);return T&&n.packageFilter&&(T=n.packageFilter(T,A)),{pkg:T,dir:A}}}function O(A){var w=pe.join(Dt(a,A,n),"/package.json");if(o(w)){try{var T=l(i,w)}catch{}if(T&&n.packageFilter&&(T=n.packageFilter(T,A)),T&&T.main){if(typeof T.main!="string"){var z=new TypeError("package \u201C"+T.name+"\u201D `main` must be a string");throw z.code="INVALID_PACKAGE_MAIN",z}(T.main==="."||T.main==="./")&&(T.main="index");try{var m=L(pe.resolve(A,T.main));if(m)return m;var k=O(pe.resolve(A,T.main));if(k)return k}catch{}}}return L(pe.join(A,"/index"))}function D(A,w){for(var T=function(){return fy(A,w,n)},z=f?f(A,w,T,n):T(),m=0;m<z.length;m++){var k=z[m];if(s(pe.dirname(k))){var $=L(k);if($)return $;var V=O(k);if(V)return V}}}}});var yl=b((uR,hl)=>{"use strict";c();var Lr=il();Lr.core=ul();Lr.isCore=pl();Lr.sync=gl();hl.exports=Lr});var yi=b((KE,hi)=>{"use strict";c();var a_=U("tty"),c_=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||a_.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),X=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Iu(o,t,r,i)+t:e+o+t},Iu=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+Iu(i,t,r,s):o+i},Lu=(e=c_)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?X("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?X("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?X("\x1B[3m","\x1B[23m"):String,underline:e?X("\x1B[4m","\x1B[24m"):String,inverse:e?X("\x1B[7m","\x1B[27m"):String,hidden:e?X("\x1B[8m","\x1B[28m"):String,strikethrough:e?X("\x1B[9m","\x1B[29m"):String,black:e?X("\x1B[30m","\x1B[39m"):String,red:e?X("\x1B[31m","\x1B[39m"):String,green:e?X("\x1B[32m","\x1B[39m"):String,yellow:e?X("\x1B[33m","\x1B[39m"):String,blue:e?X("\x1B[34m","\x1B[39m"):String,magenta:e?X("\x1B[35m","\x1B[39m"):String,cyan:e?X("\x1B[36m","\x1B[39m"):String,white:e?X("\x1B[37m","\x1B[39m"):String,gray:e?X("\x1B[90m","\x1B[39m"):String,bgBlack:e?X("\x1B[40m","\x1B[49m"):String,bgRed:e?X("\x1B[41m","\x1B[49m"):String,bgGreen:e?X("\x1B[42m","\x1B[49m"):String,bgYellow:e?X("\x1B[43m","\x1B[49m"):String,bgBlue:e?X("\x1B[44m","\x1B[49m"):String,bgMagenta:e?X("\x1B[45m","\x1B[49m"):String,bgCyan:e?X("\x1B[46m","\x1B[49m"):String,bgWhite:e?X("\x1B[47m","\x1B[49m"):String});hi.exports=Lu();hi.exports.createColors=Lu});c();import Ax from"node:process";import kx from"yargs";import{hideBin as Px}from"yargs/helpers";var ut="0.16.4";c();var eu=Me(Er(),1);import{dirname as Qy,resolve as Zy}from"node:path";import{readFile as Jy}from"node:fs/promises";import{cyan as ev,dim as Ql,yellow as tv}from"kolorist";import Zl from"fs-extra";import rv from"gray-matter";import nv from"markdown-it";import{Feed as ov}from"feed";import Ht from"consola";c();var Bl=Me(zo(),1),Ul=Me(Er(),1);import{dirname as qy,resolve as Vr}from"node:path";import jl from"node:process";import By from"fs-extra";import{ensureSuffix as ql,uniq as Uy}from"@antfu/utils";import Gl from"defu";import{cyan as Gy,magenta as Wy,yellow as zy}from"kolorist";import Wl from"consola";c();import{join as Rl}from"node:path";import Ry from"is-installed-globally";c();var Lc=Me(Fc(),1);import ie from"node:process";import se from"node:path";import Xo from"node:os";import Fr from"node:fs";var It=ie.platform==="win32",Ic=e=>{try{return Lc.default.parse(Fr.readFileSync(e,"utf8")).prefix}catch{}},mh=()=>Object.keys(ie.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?ie.env[t]:e,void 0),gh=()=>{if(It&&ie.env.APPDATA)return se.join(ie.env.APPDATA,"/npm/etc/npmrc");if(ie.execPath.includes("/Cellar/node")){let e=ie.execPath.slice(0,ie.execPath.indexOf("/Cellar/node"));return se.join(e,"/lib/node_modules/npm/npmrc")}if(ie.execPath.endsWith("/bin/node")){let e=se.dirname(se.dirname(ie.execPath));return se.join(e,"/etc/npmrc")}},hh=()=>{if(It){let{APPDATA:e}=ie.env;return e?se.join(e,"npm"):se.dirname(ie.execPath)}return se.dirname(se.dirname(ie.execPath))},yh=()=>{let e=mh();if(e)return e;let t=Ic(se.join(Xo.homedir(),".npmrc"));if(t)return t;if(ie.env.PREFIX)return ie.env.PREFIX;let r=Ic(gh());return r||hh()},Ft=se.resolve(yh()),Mc=()=>{if(It&&ie.env.LOCALAPPDATA){let e=se.join(ie.env.LOCALAPPDATA,"Yarn");if(Fr.existsSync(e))return e}return!1},vh=()=>{if(ie.env.PREFIX)return ie.env.PREFIX;let e=Mc();if(e)return e;let t=se.join(Xo.homedir(),".config/yarn");if(Fr.existsSync(t))return t;let r=se.join(Xo.homedir(),".yarn-config");return Fr.existsSync(r)?r:Ft},Te={};Te.npm={};Te.npm.prefix=Ft;Te.npm.packages=se.join(Ft,It?"node_modules":"lib/node_modules");Te.npm.binaries=It?Ft:se.join(Ft,"bin");var Nc=se.resolve(vh());Te.yarn={};Te.yarn.prefix=Nc;Te.yarn.packages=se.join(Nc,Mc()?"Data/global/node_modules":"global/node_modules");Te.yarn.binaries=se.join(Te.yarn.packages,".bin");var Qo=Te;var El=Me(yl(),1);import wl from"consola";c();import{spawn as py}from"cross-spawn";function Vt(e,t="updated"){return new Promise((r,n)=>{let o=["log"];t==="updated"&&o.push("-1"),o.push('--pretty="%ci"',e),t==="created"&&o.push("|","tail","-1");let i=py("git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}c();c();var Mr="<!-- more -->",Ct=/^https?:/i,vl=/^pathname:\/\//;function _l(e){return Ct.test(e)}function $e(e){return e.replace(/\\/g,"/")}function oi(e,t){return t.startsWith(e)?t:e+t}function Z(e){return`/@fs${oi("/",$e(e))}`}function xl(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}c();import{existsSync as hy}from"node:fs";import{resolve as yy}from"node:path";import vy from"node:process";import{mergeConfig as _y}from"vite";import{createDefu as xy}from"defu";import{isFunction as Cl}from"@antfu/utils";import{cyan as Cy,dim as by}from"kolorist";import Sy from"consola";c();import dy from"node:process";import{loadConfig as my}from"unconfig";import{normalizePath as gy}from"vite";async function it(e,t={}){let{config:r,sources:n}=await my({sources:{files:e,rewrite:t.rewrite},cwd:t.cwd||dy.cwd()}),o=gy(n[0]||"");return{config:r,configFile:o}}var bt=xy((e,t,r)=>{if(Cl(e[t])&&Cl(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=_y(e[t],r),!0});async function ii(e,t){return it("valaxy.config",{rewrite(r){return typeof r=="function"?r(t||{}):r},cwd:e})}async function bl(e){let t=e.userRoot||vy.cwd(),{config:r,configFile:n}=await ii(t);r&&Sy.success(`Resolve ${Cy("userValaxyConfig")} from ${by(n)}`);let o=e.theme||r?.theme||"yun";return{config:r,configFile:n,theme:o}}async function Sl(e,t){let r={};for(let n of e){if(!hy(yy(n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await it("valaxy.config",{rewrite(s,a){return typeof s=="function"?s(n,t):s},cwd:n.root});o&&(n.configFile=i,r=bt(o,r))}return r}function Al(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}function Fe(e,t=!1,r={preserveSymlinks:!1}){try{return(0,El.sync)(e,r)}catch(n){wl.log(n)}if(Ry){try{return U.resolve(Rl(Qo.yarn.packages,e))}catch{}try{return U.resolve(Rl(Qo.npm.packages,e))}catch{}}if(t)throw new Error(`Failed to resolve package ${e}`);wl.error(`Failed to resolve package ${e}`)}c();import{webcrypto as kl}from"node:crypto";c();function wy(e){return e}var WR=wy;function Ey(e){return e}var zR=Ey;function QR(e){return e}function Ay(e){return e}var ZR=Ay,si={mode:"auto",url:"/",lang:"en",languages:["en","zh-CN"],timezone:"",title:"Valaxy Blog",description:"A blog generated by Valaxy.",subtitle:"Next Generation Static Blog Framework.",author:{avatar:"https://valaxy.site/valaxy-logo.png",email:"i@valaxy.site",link:"https://valaxy.site",name:"VALAXY Developer",status:{emoji:"\u{1F30C}",message:"The moonlight is beautiful."}},favicon:"/favicon.svg",feed:{name:"",favicon:"/favicon.svg"},social:[],lastUpdated:!0,license:{enabled:!0,language:"",type:"by-nc-sa"},sponsor:{enable:!0,description:"\u8FD9\u662F\u5173\u4E8E\u8D5E\u52A9\u7684\u4E00\u4E9B\u63CF\u8FF0",methods:[]},search:{enable:!1,type:"fuse"},fuse:{dataPath:"valaxy-fuse-list.json",options:{keys:[]}},comment:{enable:!1},frontmatter:{time_warning:180*24*60*60*1e3},cdn:{prefix:"https://unpkg.com/"},mediumZoom:{enable:!1,selector:"",options:{}},vanillaLazyload:{enable:!1,options:{}},statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:kl.getRandomValues(new Uint8Array(16)),iv:kl.getRandomValues(new Uint8Array(16))}},Pl={ignoreDeadLinks:!0,siteConfig:si,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}}};function JR(e){return e}c();import{resolve as Ty}from"node:path";import Nl from"node:process";import $l from"fs-extra";import Fl from"defu";import{cyan as Il,dim as Ll,yellow as $y}from"kolorist";import Fy from"ora";c();import ky from"consola";c();import Ol from"node:process";function ai(){return Ol.env.NODE_ENV==="production"}function ci(e="development"){Ol.env.NODE_ENV=e,st.level=ai()?2:3}function St(){return ci("production")}var st=ky.create({level:ai()?2:3});c();import{dirname as Tl,resolve as Py}from"node:path";import Oy from"fs-extra";function Nr(e,t){if(!e)return"";if(xl(e))if(t){let r=Oy.lstatSync(t).isFile();return Py(r?Tl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return Tl(Fe(`${e}/package.json`)||"")}async function Dl(e,t=Nl.cwd()){let r=Fy(`Resolve ${Il("addons")} from ${Ll(t)}`).start(),n={},o=s=>{s&&(n[s.name]=Fl(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await Ml(s,{cwd:t}));continue}typeof s=="object"&&o(Fl(await Ml(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{st.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${$y(s.name)}${s.global?Il(" (global)"):""} ${Ll(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository)}`)}),i}async function Ml(e,t={}){let r=Iy(e,t.cwd||Nl.cwd()),n=Ty(r,"./package.json");if(!$l.existsSync(n)){st.error(`No addon named ${e} found`);return}let o=await $l.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function Iy(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return Nr(r,t)}c();function Vl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return Nr(r,t)}c();import{cyan as Ly,dim as My}from"kolorist";import Ny from"consola";async function Dy(e){return it("site.config",{cwd:e})}async function Dr(e){let{config:t,configFile:r}=await Dy(e);return t&&Ny.success(`Resolve ${Ly("siteConfig")} from ${My(r)}`),{siteConfig:t,siteConfigFile:r}}c();import{cyan as Vy,dim as Hy}from"kolorist";async function jy(e){return it("theme.config",{cwd:e})}async function Hl(e){let{config:t,configFile:r}=await jy(e);return t&&st.info(`Resolve ${Vy("themeConfig")} from ${Hy(r)}`),{themeConfig:t,themeConfigFile:r}}var Ky=(0,Bl.default)("valaxy:options");async function Yy(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=ql("/",o.url||""),o.cdn.prefix=ql("/",o.cdn.prefix||"");let i=Vr(r,"package.json");try{t.themeConfig.pkg=await By.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function li(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await Dl(t.addons||[],e.userRoot),s=await Sl(i,e);t=bt(t,s);let a=Gl(t,Pl);e.config={...a,runtimeConfig:{addons:{}}},e.addons=i,i.forEach(p=>{e.config.runtimeConfig.addons[p.name]=p});let l=i.map(({root:p})=>p),f=i.map(({name:p})=>p);e.addonRoots=l,e.roots=Uy([r,n,...l,o]);let u=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=u.filter(p=>!f.includes(p)),await Yy(e),e}async function _e(e={userRoot:jl.cwd()},t="dev"){let r=qy(Fe("valaxy/package.json",!0)),n=Vr(r,"client"),o=$e(Vr(e.userRoot||jl.cwd()));Wl.start(`Resolve ${Wy("valaxy")} config...`);let[i,s,a,l]=await Promise.all([bl(e),Dr(e.userRoot),Hl(e.userRoot),(0,Ul.default)(["**.md"],{cwd:Vr(o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:u,theme:p}=i,{siteConfig:d,siteConfigFile:C}=s,{themeConfig:v,themeConfigFile:x}=a;f=Gl({siteConfig:d},{themeConfig:v},f);let R=Vl(p,e.userRoot),S={mode:t,pkgRoot:r,clientRoot:n,userRoot:o,themeRoot:R,addonRoots:[],roots:[],theme:p,config:{...f,runtimeConfig:{addons:{}}},configFile:u||"",siteConfigFile:C||"",themeConfigFile:x||"",pages:l.sort(),addons:[]};Ky(S);let I=await ui(S),L=bt(f,I);return S=await li(S,L),S}async function ui(e){let{config:t}=await ii(e.themeRoot,e);return t&&Wl.success(`Resolve ${Gy("valaxy.config.ts")} from ${zy(`theme(${e.theme})`)}`),t}c();import zl from"fs-extra";async function Kl(e){return await Vt(e,"created")||(await zl.stat(e)).ctime}async function Yl(e){return await Vt(e,"created")||(await zl.stat(e)).mtime}c();function ze(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}c();function Xl(e,t){t.forEach(r=>{r.setup?.(e)})}var iv=nv({html:!0,breaks:!0,linkify:!0});async function Jl(e){Ht.info(`${tv("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){Ht.error("You must set `url` (like `https://example.com`) in `site.config.ts` to generate rss.");return}let n=r.url,o=r.url.slice(0,-1),i={name:r.author?.name,email:r.author?.email,link:r.author?.link};Ht.info(`RSS Site Url: ${ev(n)}`);let s=r.license?.type==="zero"?"1.0":"4.0",a={atom:r.feed?.name?`${r.feed?.name}.atom`:"atom.xml",json:`${r.feed?.name||"feed"}.json`,rss:`${r.feed?.name||"feed"}.xml`},l={title:r.title||"Valaxy Blog",description:r.description,id:n||"valaxy",link:n,copyright:`CC ${r.license?.type?.toUpperCase()} ${s} ${new Date().getFullYear()} \xA9 ${r.author?.name}`,feedLinks:{}};Object.keys(a).forEach(x=>{l.feedLinks[x]=`${n}${a[x]}`});let f=await(0,eu.default)(`${e.userRoot}/pages/posts/**/*.md`),u=[];for await(let x of f){let R=await Jy(x,"utf-8"),{data:S,content:I,excerpt:L}=rv(R,{excerpt_separator:Mr});if(S.password)continue;if(S.draft){Ht.warn(`Ignore draft post: ${Ql(x)}`);continue}if(S.hide)continue;let G=x;S.date||(S.date=await Kl(G)),r.lastUpdated&&(S.updated||(S.updated=await Yl(G)));let O=iv.render(L||I.slice(0,100)).replace('src="/',`src="${o}/`);S.image?.startsWith("/")&&(S.image=o+S.image),u.push({title:"",...S,id:(S.id||"").toString(),date:new Date(S.date),published:new Date(S.updated||S.date),content:O,author:[i],link:o+x.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}u.sort((x,R)=>+new Date(R.published||R.date)-+new Date(x.published||x.date));let p=r.author?.avatar||"/favicon.svg";l.author=i,l.image=_l(p)?r.author?.avatar:`${o}${oi("/",p)}`,l.favicon=`${o}${r.feed?.favicon||r.favicon}`;let d=new ov(l);u.forEach(x=>d.addItem(x)),await Zl.ensureDir(Qy(`./dist/${a.atom}`));let C=Zy(e.userRoot,"./dist");["rss","atom","json"].forEach(x=>{let R="",S=`${C}/${a[x]}`;x==="rss"?R=d.rss2():x==="atom"?R=d.atom1():x==="json"&&(R=d.json1()),Zl.writeFileSync(S,R,"utf-8"),Ht.info(`${x}: ${Ql(S)}`)})}var Hr={extendCli(e){e.command("rss [root]","generate rss feed",t=>ze(t).strict().help(),async({root:t})=>{St();let r=await _e({userRoot:t},"build");await Jl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Jl(e.options)})}};c();var tu=Me(Er(),1);import jt from"node:path";import Ke from"fs-extra";import Rt from"consola";import sv from"gray-matter";import{cyan as av,dim as qt}from"kolorist";async function ru(e){Rt.start(`Generate List for Fuse Search by (${av("fuse.js")}) ...`);let t=await(0,tu.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=Ke.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=sv(o,{excerpt_separator:"<!-- more -->"});if(i.draft){Rt.warn(`Ignore draft post: ${qt(n)}`);continue}if(i.hide||i.password)continue;let l=e.config.siteConfig.fuse.options.keys||[],f={title:i.title||"",tags:(typeof i.tags=="string"?[i.tags]:i.tags)||[],categories:i.categories||[],author:e.config.siteConfig.author.name,excerpt:s||a.slice(0,100),link:encodeURI(n.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,""))};l.includes("content")&&(f.content=a||""),r.push(f)}return r}function cv(e){e.command("fuse [root]","generate fuse list for search",t=>ze(t).strict().help(),async({root:t})=>{Rt.info("Please generate it before build."),St();let r=await _e({userRoot:t},"build"),n=await ru(r);await Ke.ensureDir("./dist");let o=jt.resolve(r.userRoot,"public"),i=jt.resolve(o,r.config.siteConfig.fuse.dataPath),s=jt.join("public",r.config.siteConfig.fuse.dataPath);await Ke.ensureFile(i),Ke.writeJSONSync(i,n),Rt.success(`Generate fuse list in ${qt(o)}`);let a=jt.resolve(r.userRoot,"dist"),l=jt.resolve(a,r.config.siteConfig.fuse.dataPath);await Ke.ensureDir(a),Ke.writeJSONSync(l,n),Rt.success(`Generate fuse list in ${qt(a)}`);try{let f=await Ke.readFile(`${r.userRoot}/.gitignore`,"utf-8"),u=s.replace(/\\/g,"/");f.includes(u)||(await Ke.appendFile(`${r.userRoot}/.gitignore`,`
|
|
10
|
+
# valaxy
|
|
11
|
+
${u}
|
|
12
|
+
`),Rt.success(`Add ${qt(u)} to ${qt(".gitignore")}`))}catch{}})}var nu={extendCli(e){cv(e)},setup(e){e.hook("build:before",()=>{ru(e.options)})}};c();c();import{join as dv,resolve as su}from"node:path";import{writeFile as mv}from"node:fs/promises";import{render as gv}from"ejs";import hv from"dayjs";import{ensureSuffix as yv}from"@antfu/utils";import{consola as fi}from"consola";import{green as vv,magenta as _v}from"kolorist";c();import{access as lv}from"node:fs/promises";async function jr(e){try{return await lv(e),!0}catch{return!1}}c();import fv from"node:path";import{readFile as pv}from"node:fs/promises";c();import uv from"node:process";var Bt=uv.cwd(),ou=`---
|
|
13
|
+
layout: <%=layout%>
|
|
14
|
+
title: <%=title%>
|
|
15
|
+
date: <%=date%>
|
|
16
|
+
---
|
|
17
|
+
`;async function iu(e){let{clientRoot:t,themeRoot:r}=await _e({userRoot:Bt}),n=[Bt,r,t];for(let o of n){let i=fv.resolve(o,"scaffolds",`${e}.md`);if(await jr(i))return pv(i,"utf-8")}return!1}async function au(e){let t=su(Bt,"pages"),{path:r,title:n}=e,o=r||dv("posts",n),i=0;for(;;){let s=su(t,o);if(i&&(s=`${s}-${i}`),s=yv(".md",s),!await jr(s)){let a=await xv(e);try{await mv(s,a,"utf-8"),fi.success(`[valaxy new]: successfully generated file ${_v(s)}`)}catch(l){console.log(l),fi.error(`[valaxy new]: failed to write file ${s}`),fi.warn(`You should run ${vv("valaxy new")} in your valaxy project root directory.`)}return s}i++}}async function xv({date:e,title:t,layout:r="post"}){let n=await iu(r);n||(n=ou);let o="YYYY-MM-DD HH:mm:ss";return gv(n,{title:t,layout:r,date:e?hv().format(o):""})}function cu(e){e.command("new <title>","Draft a new post",t=>{t.usage("$0 <title> -p [path] -l [layout]").positional("title",{describe:"The title of the new post",required:!0}).option("path",{alias:"p",type:"string",describe:"the path to generate new post. Customize the path of post to generate"}).option("layout",{alias:"l",type:"string",default:"post"}).option("date",{alias:"d",type:"boolean",default:!0,describe:"Generate post with the current date"}).strict().help()},async({title:t,path:r,date:n,layout:o})=>{await au({title:t,date:n,layout:o,path:r})})}c();import rn from"node:path";import Pi from"consola";import{mergeConfig as If}from"vite";import nn from"fs-extra";import{yellow as vx}from"kolorist";c();import{join as bf,resolve as Sf}from"node:path";import{mergeConfig as Rf,build as rx}from"vite";import{build as nx}from"vite-ssg/node";import ox from"vite-ssg-sitemap";import Qr from"fs-extra";import ix from"consola";c();import{splitVendorChunkPlugin as z1}from"vite";import K1 from"markdown-it";import Y1 from"@vitejs/plugin-vue";import X1 from"vite-plugin-vue-layouts";import Q1 from"unplugin-vue-components/vite";import Z1 from"@intlify/unplugin-vue-i18n/vite";import J1 from"@unhead/addons/vite";c();import b_ from"markdown-it";import Ku from"markdown-it-anchor";import S_ from"markdown-it-attrs";import{full as R_}from"markdown-it-emoji";import w_ from"markdown-it-task-lists";c();var lu=new Set([!0,!1,"alt","title"]);function uu(e,t){return(Array.isArray(e)?e:[]).filter(([r])=>r!==t)}function fu(e,t){e&&e.attrs&&(e.attrs=uu(e.attrs,t))}function Cv(e,t){if(!lu.has(e))throw new TypeError(`figcaption must be one of: ${[...lu]}.`);if(e==="alt")return t.content;let r=t.attrs.find(([n])=>n==="title");return Array.isArray(r)&&r[1]?(fu(t,"title"),r[1]):void 0}function pu(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(r){let n=1;for(let o=1,i=r.tokens.length;o<i-1;++o){let s=r.tokens[o];if(s.type!=="inline"||!s.children||s.children.length!==1&&s.children.length!==3||s.children.length===1&&s.children[0].type!=="image")continue;if(s.children.length===3){let[f,u,p]=s.children;if(f.type!=="link_open"||u.type!=="image"||p.type!=="link_close")continue}if(o!==0&&r.tokens[o-1].type!=="paragraph_open"||o!==i-1&&r.tokens[o+1].type!=="paragraph_close")continue;let a=r.tokens[o-1],l;if(a.type="figure_open",a.tag="figure",r.tokens[o+1].type="figure_close",r.tokens[o+1].tag="figure",t.dataType&&r.tokens[o-1].attrPush(["data-type","image"]),t.link&&s.children.length===1){[l]=s.children;let f=new r.Token("link_open","a",1);f.attrPush(["href",l.attrGet("src")]),s.children.unshift(f),s.children.push(new r.Token("link_close","a",-1))}if(l=s.children.length===1?s.children[0]:s.children[1],t.figcaption){let f=Cv(t.figcaption,l);if(f){let[u]=e.parseInline(f,r.env);s.children.push(new r.Token("figcaption_open","figcaption",1)),s.children.push(...u.children),s.children.push(new r.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=uu(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){let f=t.copyAttrs===!0?"":t.copyAttrs;a.attrs=l.attrs.filter(([u])=>u.match(f)).map(u=>Array.from(u))}if(t.tabindex&&(r.tokens[o-1].attrPush(["tabindex",n]),n++),t.lazy&&(l.attrs.some(([f])=>f==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([f])=>f==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let f=!1;for(let u=0,p=l.attrs.length;u<p&&!f;u++){let d=l.attrs[u];d[0]==="class"&&(d[1]=`${d[1]} ${t.classes}`,f=!0)}f||l.attrs.push(["class",t.classes])}if(t.removeSrc){let f=l.attrs.find(([u])=>u==="src");l.attrs.push(["data-src",f[1]]),fu(l,"src")}}})}c();import bv from"markdown-it/lib/common/html_blocks.mjs";var Sv="[a-zA-Z_:@][a-zA-Z0-9:._-]*",Rv="[^\"'=<>`\\x00-\\x20]+",wv="'[^']*'",Ev='"[^"]*"',Av="(?:"+Rv+"|"+wv+"|"+Ev+")",pi="(?:\\s+"+Sv+"(?:\\s*=\\s*"+Av+")?)",du="<[A-Za-z][A-Za-z0-9\\-]*"+pi+"*\\s*\\/?>",mu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",kv="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Pv="<[?][\\s\\S]*?[?]>",Ov="<![A-Z]+\\s+[^>]*>",Tv="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",$v=new RegExp("^(?:"+du+"|"+mu+"|"+kv+"|"+Pv+"|"+Ov+"|"+Tv+")"),Fv=new RegExp("^(?:"+du+"|"+mu+")"),Iv=new RegExp("^<[A-Za-z][A-Za-z0-9\\-]*"+pi+"*\\s*\\/>"),Lv=new RegExp("^<([A-Za-z][A-Za-z0-9\\-]*)"+pi+"*\\s*>.*<\\/\\1\\s*>"),Mv=bv,Nv=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],Dv=["template","component","transition","transition-group","keep-alive","slot","teleport"],Vv=({blockTags:e,inlineTags:t})=>{let r=[...e,...Mv],n=[...t,...Nv.filter(i=>!Dv.includes(i))];return[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp("^</?(?!("+n.join("|")+")(?![\\w-]))[A-Za-z][A-Za-z0-9\\-]*(?=(\\s|/?>|$))"),/^$/,!0],[new RegExp(Fv.source+"\\s*$"),/^$/,!1]]},Hv=e=>{let t=Vv(e);return(r,n,o,i)=>{let s,a,l,f=r.bMarks[n]+r.tShift[n],u=r.eMarks[n];if(r.sCount[n]-r.blkIndent>=4||!r.md.options.html||r.src.charCodeAt(f)!==60)return!1;for(l=r.src.slice(f,u),s=0;s<t.length&&!t[s][0].test(l);s++);if(s===t.length)return!1;if(i)return t[s][2];if(s===6){let d=l.match(Iv)??l.match(Lv);if(d){r.line=n+1;let C=r.push("html_inline","",0);return C.content=d[0],C.map=[n,r.line],C=r.push("inline","",0),C.content=l.slice(d[0].length),C.map=[n,r.line],C.children=[],!0}}if(a=n+1,!t[s][1].test(l)){for(;a<o&&!(r.sCount[a]<r.blkIndent);a++)if(f=r.bMarks[a]+r.tShift[a],u=r.eMarks[a],l=r.src.slice(f,u),t[s][1].test(l)){l.length!==0&&a++;break}}r.line=a;let p=r.push("html_block","",0);return p.map=[n,a],p.content=r.getLines(n,a,r.blkIndent,!0),!0}},jv=e=>{let t=e|32;return t>=97&&t<=122},qv=(e,t)=>{let{pos:r}=e;if(!e.md.options.html)return!1;let n=e.posMax;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!jv(o))return!1;let i=e.src.slice(r).match($v);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=e.src.slice(r,r+i[0].length)}return e.pos+=i[0].length,!0},gu=(e,{blockTags:t=[],inlineTags:r=[]}={})=>{let n=Hv({blockTags:t,inlineTags:r});e.block.ruler.at("html_block",n,{alt:["paragraph","reference","blockquote"]}),e.inline.ruler.at("html_inline",qv)};c();import Bv from"gray-matter";var hu=(e,{grayMatterOptions:t,renderExcerpt:r=!0}={})=>{let n=e.render.bind(e);e.render=(o,i={})=>{let{data:s,content:a,excerpt:l=""}=Bv(o,t);return i.content=a,i.frontmatter={...i.frontmatter,...s},i.excerpt=r&&l?n(l,{...i}):l,n(a,i)}};c();c();var Uv={"&":"&","<":"<",">":">","'":"'",'"':"""},Gv=/[&<>'"]/g,at=e=>e.replace(Gv,t=>Uv[t]);var Ut=(e,{shouldAllowHtml:t,shouldEscapeText:r})=>{let n=e.children??[],o=["text","emoji","code_inline"];return t&&o.push("html_inline"),n.filter(s=>o.includes(s.type)&&!s.meta?.isPermalinkSymbol).reduce((s,a)=>r&&(a.type==="code_inline"||a.type==="text")?`${s}${at(a.content)}`:`${s}${a.content}`,"").trim()},qr=(e,{level:t,shouldAllowHtml:r,shouldAllowNested:n,shouldEscapeText:o,slugify:i,format:s})=>{let a=[],l=[],f=u=>{for(;l.length!==0&&u.level<=l[0].level;)l.shift();l.length===0?(a.push(u),l.push(u)):(l[0].children.push(u),l.unshift(u))};for(let u=0;u<e.length;u+=1){let p=e[u];if(p?.type!=="heading_open"||p?.level!==0&&!n)continue;let d=Number.parseInt(p.tag.slice(1),10);if(!t.includes(d))continue;let C=e[u+1];if(!C)continue;let v=Ut(C,{shouldAllowHtml:r,shouldEscapeText:o}),x=p.attrGet("id")??i(v);f({level:d,title:s?.(v)??v,slug:x,link:`#${x}`,children:[]})}return a},Wv=/[\u0000-\u001f]/g,zv=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,Kv=/[\u0300-\u036F]/g,ct=e=>e.normalize("NFKD").replace(Kv,"").replace(Wv,"").replace(zv,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase();var yu=(e,{level:t=[2,3],shouldAllowNested:r=!1,slugify:n=ct,format:o}={})=>{let i=e.renderer.render.bind(e.renderer);e.renderer.render=(s,a,l)=>(l.headers=qr(s,{level:t,shouldAllowHtml:!1,shouldAllowNested:r,shouldEscapeText:!1,slugify:n,format:o}),i(s,a,l))};c();var vu="script",_u="style",Gt="template",Yv=/^<script\s+.*?\bsetup\b.*?>$/is,Xv=({customBlocks:e})=>{let t=Array.from(new Set([vu,_u,...e])).join("|");return new RegExp(`^\\s*(?<content>(?<tagOpen><(?<type>${t})\\s?.*?>)(?<contentStripped>.*)(?<tagClose><\\/\\k<type>\\s*>))\\s*$`,"is")},xu=(e,{customBlocks:t=[]}={})=>{let r=Xv({customBlocks:t}),n=e.render.bind(e);e.render=(i,s={})=>{s.sfcBlocks={template:null,script:null,scriptSetup:null,scripts:[],styles:[],customBlocks:[]};let a=n(i,s);return s.sfcBlocks.template={type:Gt,content:`<${Gt}>${a}</${Gt}>`,contentStripped:a,tagOpen:`<${Gt}>`,tagClose:`</${Gt}>`},a};let o=e.renderer.rules.html_block;e.renderer.rules.html_block=(i,s,a,l,f)=>{if(!l.sfcBlocks)return o(i,s,a,l,f);let d=i[s].content.match(r);if(!d)return o(i,s,a,l,f);let C=d.groups;return C.type===vu?(l.sfcBlocks.scripts.push(C),Yv.test(C.tagOpen)?l.sfcBlocks.scriptSetup=C:l.sfcBlocks.script=C):C.type===_u?l.sfcBlocks.styles.push(C):l.sfcBlocks.customBlocks.push(C),""}};c();var Cu=e=>{let t=e.renderer.render.bind(e.renderer);e.renderer.render=(r,n,o)=>{let i=r.findIndex(s=>s.tag==="h1");return o.title=i>-1?Ut(r[i+1],{shouldAllowHtml:!1,shouldEscapeText:!1}):"",t(r,n,o)}};c();var Qv=({listTag:e,listClass:t,itemClass:r,linkTag:n,linkClass:o})=>{let i=at(e),s=t?` class="${at(t)}"`:"",a="li",l=r?` class="${at(r)}"`:"",f=at(n),u=o?` class="${at(o)}"`:"",p=C=>n==="router-link"?` to="${C}"`:` href="${C}"`,d=C=>`<${i}${s}>${C.map(v=>`<${a}${l}><${f}${u}${p(v.link)}>${v.title}</${f}>${v.children.length>0?d(v.children):""}</${a}>`).join("")}</${i}>`;return d},Zv=({pattern:e,containerTag:t,containerClass:r})=>(n,o,i,s)=>{if(n.sCount[o]-n.blkIndent>=4)return!1;let a=n.bMarks[o]+n.tShift[o],l=n.eMarks[o],f=n.src.slice(a,l).split(" ")[0];if(!e.test(f))return!1;if(s)return!0;n.line=o+1;let u=n.push("toc_open",t,1);u.markup="",u.map=[o,n.line],r&&u.attrSet("class",r);let p=n.push("toc_body","",0);p.markup=f,p.map=[o,n.line],p.hidden=!0;let d=n.push("toc_close",t,-1);return d.markup="",p.map=[o,n.line],!0},bu=(e,{pattern:t=/^\[\[toc\]\]$/i,slugify:r=ct,format:n,level:o=[2,3],shouldAllowNested:i=!1,containerTag:s="nav",containerClass:a="table-of-contents",listTag:l="ul",listClass:f="",itemClass:u="",linkTag:p="a",linkClass:d=""}={})=>{e.block.ruler.before("heading","toc",Zv({pattern:t,containerTag:s,containerClass:a}),{alt:["paragraph","reference","blockquote"]});let C=Qv({listTag:l,listClass:f,itemClass:u,linkTag:p,linkClass:d});e.renderer.rules.toc_body=v=>C(qr(v,{level:o,shouldAllowHtml:!0,shouldAllowNested:i,shouldEscapeText:!0,slugify:r,format:n}))};import{cssI18nContainer as E_}from"css-i18n";c();import Su from"katex";function Ru(e,t){let r=e.posMax,n=!0,o=!0,i=t>0?e.src.charCodeAt(t-1):-1,s=t+1<=r?e.src.charCodeAt(t+1):-1;return(i===32||i===9||s>=48&&s<=57)&&(o=!1),(s===32||s===9)&&(n=!1),{can_open:n,can_close:o}}function Jv(e,t){let r,n,o,i;if(e.src[e.pos]!=="$")return!1;if(o=Ru(e,e.pos),!o.can_open)return t||(e.pending+="$"),e.pos+=1,!0;let s=e.pos+1;for(r=s;(r=e.src.indexOf("$",r))!==-1;){for(i=r-1;e.src[i]==="\\";)i-=1;if((r-i)%2===1)break;r+=1}return r===-1?(t||(e.pending+="$"),e.pos=s,!0):r-s===0?(t||(e.pending+="$$"),e.pos=s+1,!0):(o=Ru(e,r),o.can_close?(t||(n=e.push("math_inline","math",0),n.markup="$",n.content=e.src.slice(s,r)),e.pos=r+1,!0):(t||(e.pending+="$"),e.pos=s,!0))}function e_(e,t,r,n){let o,i,s,a,l=!1,f=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(f+2>u||e.src.slice(f,f+2)!=="$$")return!1;if(f+=2,o=e.src.slice(f,u),n)return!0;for(o.trim().slice(-2)==="$$"&&(o=o.trim().slice(0,-2),l=!0),s=t;!l&&(s++,!(s>=r||(f=e.bMarks[s]+e.tShift[s],u=e.eMarks[s],f<u&&e.tShift[s]<e.blkIndent)));)e.src.slice(f,u).trim().slice(-2)==="$$"&&(a=e.src.slice(0,u).lastIndexOf("$$"),i=e.src.slice(f,a),l=!0);e.line=s+1;let p=e.push("math_block","math",0);return p.block=!0,p.content=(o&&o.trim()?`${o}
|
|
18
|
+
`:"")+e.getLines(t+1,s,e.tShift[t],!0)+(i&&i.trim()?i:""),p.map=[t,e.line],p.markup="$$",!0}function di(e,t){t=t||{};let r=function(s){t.displayMode=!1;try{return Su.renderToString(s,t)}catch(a){return t.throwOnError&&console.warn(a),s}},n=function(s,a){return r(s[a].content)},o=function(s){t.displayMode=!0;try{return`<p>${Su.renderToString(s,t)}</p>`}catch(a){return t.throwOnError&&console.warn(a),s}},i=function(s,a){return`${o(s[a].content)}
|
|
19
|
+
`};e.inline.ruler.after("escape","math_inline",Jv),e.block.ruler.after("blockquote","math_block",e_,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i}c();import Br from"markdown-it-container";c();import Eu from"crypto";c();var wu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var t_=128,Ye,Xe,Au=e=>{!Ye||Ye.length<e?(Ye=Buffer.allocUnsafe(e*t_),Eu.randomFillSync(Ye),Xe=0):Xe+e>Ye.length&&(Eu.randomFillSync(Ye),Xe=0),Xe+=e},r_=e=>(Au(e-=0),Ye.subarray(Xe-e,Xe)),n_=(e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let a=r(o),l=o;for(;l--;)if(s+=e[a[l]&n]||"",s.length===i)return s}}},ku=(e,t=21)=>n_(e,t,r_),mi=(e=21)=>{Au(e-=0);let t="";for(let r=Xe-e;r<Xe;r++)t+=wu[Ye[r]&63];return t};c();function Pu(e){return e.trim().replace(/=(\d*)/,"").replace(/:(no-)?line-numbers({| |$|=\d*).*/,"").replace(/(-vue|{| ).*$/,"").replace(/^vue-html$/,"template").replace(/^ansi$/,"")}function gi(e){let{theme:t}=e,r=typeof t=="string"||"name"in t,n="";if(r){n=" va-adaptive-theme";let o=typeof t=="string"?t:t.name;n=o.includes("dark")||o.includes("night")?" dark":" light"}return n}function Ou(e,t=!1){return t?e.replace(/<!--[^]*?-->/g,"").match(/data-title="(.*?)"/)?.[1]||"":e.match(/\[(.*)\]/)?.[1]||Pu(e)||"txt"}function o_(e){let t=e?.siteConfig?.codeHeightLimit;return t===void 0||t<=0?"":`style="max-height: ${t}px;"`}function Tu(e,t){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let[o,i]=n,s=o[i];s.info=s.info.replace(/\[.*\]/,"");let a=Pu(s.info),l=r(...n);return`
|
|
20
|
+
<div ${o_(t)} class="language-${a}${gi(t)}${/ active( |$)/.test(s.info)?" active":""}">
|
|
21
|
+
<button title="Copy Code" class="copy"></button><span class="lang">${a}</span>${l}<button class="collapse"></button>
|
|
22
|
+
</div>`}}function i_(e,{icon:t,color:r,text:n,langs:o}={}){return[Br,e,{render(i,s){let a=i[s],l=a.info.trim().slice(e.length).trim();if(a.nesting===1){if(e==="details")return`<details class="${e} custom-block">${`<summary>${l}</summary>`}
|
|
23
|
+
`;let f="";t&&(f=`<i class="icon ${t}" ${r?`style="color: ${r}"`:""}></i>`);let u=`<span lang="en">${l||n}</span>`;return o&&Object.keys(o).forEach(p=>{u+=`<span lang="${p}">${l||o[p]}</span>`}),`<div class="${e} custom-block"><p class="custom-block-title">${f}${u}</p>
|
|
24
|
+
`}else return e==="details"?`</details>
|
|
25
|
+
`:`</div>
|
|
26
|
+
`}}]}var $u={tip:{text:"TIP",langs:{"zh-CN":"\u63D0\u793A"}},warning:{text:"WARNING",langs:{"zh-CN":"\u6CE8\u610F"}},danger:{text:"DANGER",langs:{"zh-CN":"\u8B66\u544A"}},info:{text:"INFO",langs:{"zh-CN":"\u4FE1\u606F"}},details:{text:"Details",langs:{"zh-CN":"\u8BE6\u60C5"}}};function Fu(e,t={}){Object.keys($u).forEach(n=>{let o={...$u[n],...t[n]||{}};e.use(...i_(n,o))}),e.use(...s_(t)),e.use(Br,"v-pre",{render:(n,o)=>n[o].nesting===1?`<div v-pre>
|
|
27
|
+
`:`</div>
|
|
28
|
+
`}),["zh-CN","en"].forEach(n=>{e.use(Br,n,{render:(o,i)=>o[i].nesting===1?`<div lang="${n}">
|
|
29
|
+
`:`</div>
|
|
30
|
+
`})})}function s_(e){return[Br,"code-group",{render(t,r){if(t[r].nesting===1){let n=mi(5),o="",i='checked="checked"';for(let s=r+1;!(t[s].nesting===-1&&t[s].type==="container_code-group_close");++s){let a=t[s].type==="html_block";if(t[s].type==="fence"&&t[s].tag==="code"||a){let l=Ou(a?t[s].content:t[s].info,a);if(l){let f=mi(7);o+=`<input type="radio" name="group-${n}" id="tab-${f}" ${i}><label for="tab-${f}">${l}</label>`,i&&!a&&(t[s].info+=" active"),i=""}}}return`<div class="vp-code-group${gi({theme:e.theme})}"><div class="tabs">${o}</div><div class="blocks">
|
|
31
|
+
`}return`</div></div>
|
|
32
|
+
`}}]}c();var Hu=Me(yi(),1);import{BUNDLED_LANGUAGES as p_}from"shiki";c();import{getHighlighter as l_}from"shiki";function Wt(e,t={}){return({code:r})=>{let n=t.tagRegExp??/(?:\/\/|\/\*{1,2}) *\[!code ([\w+-]+)(?::(\d+))?] *(?:\*{1,2}\/)?/,o=[];return r=r.split(`
|
|
33
|
+
`).map((i,s)=>{let[a,l,f]=i.match(n)??[];return!a||!Object.keys(e).includes(l)?i:(Array.from({length:Number(f??1)}).forEach((u,p)=>{o.push({line:s+p+1,classes:e[l]})}),i.replace(n,""))}).join(`
|
|
34
|
+
`),{code:r,lineOptions:o}}}function wt(e,t,r){let n=new RegExp(`<${r??"w+"}[^>]*class="([\\w+-:;\\/* ]*)"`);return t=Array.isArray(t)?t:[t],e.replace(n,(o,i)=>o.replace(i,`${i} ${t}`))}function Mu(e={}){let t=e.commonDiffClass??"diff",r=e.removedLinesClasses??["remove"],n=e.removedLinesClasses??["add"],o=e.removeLineTag??"--",i=e.addLineTag??"++",s=e.hasDiffClass??"has-diff";return{name:"diff",handler:Wt({[o]:[t,...r],[i]:[t,...n]},e),postProcess:({code:a})=>a.includes(t)?wt(a,s,"pre"):a}}function Nu(e={}){let t=e.hasFocusClass??"has-focus",r=e.hasFocusedLinesClass??"has-focused-lines",n=e.focusTag??"focus";return{name:"focus",handler:Wt({[n]:[t]},e),postProcess:({code:o})=>o.includes(t)?wt(o,r,"pre"):o}}function Du(e={}){let t=e.hasHighlightClass??"has-highlight",r=e.hasHighlightedLinesClass??"has-highlighted-lines",n=e.highlightTag??"hl";return{name:"highlight",handler:Wt({[n]:[t]},e),postProcess:({code:o})=>o.includes(t)?wt(o,r,"pre"):o}}function u_(e,t,r){return e.reduce((n,o)=>{let{code:i,lineOptions:s}=o.handler?.({code:n.code,lang:r})??n;return{code:i,lineOptions:[...n.lineOptions,...s]}},{code:t,lineOptions:[]})}function f_(e,t,r){return e.reduce((n,o)=>o.postProcess?.({code:n,lang:r})??n,t)}async function Vu(e={}){let t=await l_(e),r=e.processors??[];return{...t,codeToHtml:(n,o)=>{let i=typeof o=="object"?o.lang:o,s=typeof o=="object"?o.lineOptions??[]:[],a=typeof o=="object"?o.theme:void 0,{code:l,lineOptions:f}=u_(r,n,i),u=t.codeToHtml(l,{lang:i,theme:a,lineOptions:[...f,...s]});return f_(r,u,i)}}}var d_=ku("abcdefghijklmnopqrstuvwxyz",10);function m_(e){e=e.replace(/^(?:\[.*?\])?.*?([\d,-]+).*/,"$1").trim();let t=[];return e?(e.split(",").map(r=>r.split("-").map(n=>Number.parseInt(n,10))).forEach(([r,n])=>{r&&n?t.push(...Array.from({length:n-r+1},(o,i)=>r+i)):t.push(r)}),t.map(r=>({line:r,classes:["highlighted"]}))):[]}var g_={name:"error-level",handler:Wt({error:["highlighted","error"],warning:["highlighted","warning"]})};async function ju(e,t=[],r="",n=console){let o=typeof e=="string"||"name"in e,i=v=>typeof v=="string"?v:v.name,s=[Nu(),Du({hasHighlightClass:"highlighted"}),Mu(),g_],a=await Vu({themes:o?[e]:[e.dark,e.light],langs:[...p_,...t],processors:s}),l=/<pre[^>]*(style=".*?")/,f=/^<pre(.*?)>/,u=/-vue$/,p=/=(\d*)/,d=/:(no-)?line-numbers(=\d*)?$/,C=/\{\{.*?\}\}/g;return(v,x,R)=>{let S=u.test(x)?"":"v-pre";x=x.replace(p,"").replace(d,"").replace(u,"").toLowerCase()||r,x&&!a.getLoadedLanguages().includes(x)&&!["ansi","plaintext","txt","text"].includes(x)&&(n.warn(Hu.default.yellow(`
|
|
35
|
+
The language '${x}' is not loaded, falling back to '${r||"txt"}' for syntax highlighting.`)),x=r);let I=m_(R),L=m=>m.replace(f,(k,$)=>`<pre ${S}${$.replace(' tabindex="0"',"")}>`).replace(l,(k,$)=>k.replace($,"")),G=new Map,O=m=>S?m:m.replace(C,k=>{let $=G.get(k);return $||($=d_(),G.set(k,$)),$}),D=m=>(G.forEach((k,$)=>{m=m.replaceAll(k,$)}),m),A=m=>m.replace(/(<span class="line highlighted">)(<\/span>)/g,"$1<wbr>$2");v=O(v).trimEnd();let w=m=>{let k=x==="ansi"?a.ansiToHtml(v,{lineOptions:I,theme:i(m)}):a.codeToHtml(v,{lang:x,lineOptions:I,theme:i(m)});return A(L(D(k)))};if(o)return w(e);let T=wt(w(e.dark),"vp-code-dark","pre"),z=wt(w(e.light),"vp-code-light","pre");return T+z}}c();var vi=/{([\d,-]+)}/;function qu(e){let t=e.renderer.rules.fence;e.renderer.rules.fence=(...r)=>{let[n,o]=r,i=n[o],s=i.attrs&&i.attrs[0],a=null;if(!s){let l=i.info;if(!l||!vi.test(l))return t(...r);let f=l.replace(vi,"").trim();i.info=f,a=vi.exec(l)[1]}return!a&&(a=s[0],!a||!/[\d,-]+/.test(a))?t(...r):(i.info+=` ${a}`,t(...r))}}c();import{URL as h_}from"node:url";var y_=/(^|.*\/)index.md(#?.*)$/i;function Bu(e,t,r){e.renderer.rules.link_open=(i,s,a,l,f)=>{let u=i[s],p=u.attrIndex("href");if(p>=0){let d=u.attrs[p],C=d[1];Ct.test(C)?(Object.entries(t).forEach(([x,R])=>{u.attrSet(x,R)}),d[1]=C.replace(vl,"")):!C.startsWith("#")&&!C.startsWith("mailto:")&&!/\.(?!html|md)\w+($|\?)/i.test(C)&&n(d,l),d[1]=d[1].replace(/\bimport\.meta/g,"import%2Emeta").replace(/\bprocess\.env/g,"process%2Eenv")}return f.renderToken(i,s,a)};function n(i,s){let a=i[1],l=a.match(y_);if(l){let[,f,u]=l;a=f+u}else{let f=a.replace(/[?#].*$/,"");f.endsWith(".md")&&(f=f.replace(/\.md$/,s.cleanUrls==="disabled"?".html":"")),s.cleanUrls==="disabled"&&!f.endsWith(".html")&&!f.endsWith("/")&&(f+=".html");let u=new h_(a,"http://a.com");a=f+u.search+u.hash}!a.startsWith("/")&&!/^\.\//.test(a)&&(a=`./${a}`),o(a.replace(/\.html$/,""),s),a.startsWith("/")&&(a=`${r}${a}`.replace(/\/+/g,"/")),i[1]=decodeURI(a)}function o(i,s){(s.links||(s.links=[])).push(i)}}c();function Uu(e,t=!1){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let o=r(...n),[i,s]=n,a=i[s].info;if(!t&&!/:line-numbers($| |=)/.test(a)||t&&/:no-line-numbers($| )/.test(a))return o;let l=1,f=a.match(/=(\d*)/);f&&f[1]&&(l=Number.parseInt(f[1]));let p=o.slice(o.indexOf("<code>"),o.indexOf("</code>")).split(`
|
|
36
|
+
`),C=`<div class="line-numbers-wrapper" aria-hidden="true">${[...Array(p.length)].map((x,R)=>`<span class="line-number">${R+l}</span><br>`).join("")}</div>`;return o.replace(/<\/div>$/,`${C}</div>`).replace(/"(language-[^"]*?)"/,'"$1 line-numbers-mode"')}}c();import Gu from"node:path";import _i from"fs-extra";var v_=/^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;function __(e){let[t="",r="",n="",o="",i="",s=""]=(v_.exec(e)||[]).slice(1),a=s||t.split("/").pop()||"";return{filepath:t,extension:r,region:n,lines:o,lang:i,title:a}}function x_(e){let t=e.split(`
|
|
37
|
+
`),r=t.reduce((n,o)=>{for(let i=0;i<o.length;i++)if(o[i]!==" "&&o[i]!==" ")return Math.min(i,n);return n},Number.POSITIVE_INFINITY);return r<Number.POSITIVE_INFINITY?t.map(n=>n.slice(r)).join(`
|
|
38
|
+
`):e}function Wu(e,t,r,n=!1){let[o,i,s]=t.exec(e.trim())||[];return o&&i&&s===r&&i.match(n?/^[Ee]nd ?[rR]egion$/:/^[rR]egion$/)}function C_(e,t){let r=[/^\/\/ ?#?((?:end)?region) ([\w*-]+)$/,/^\/\* ?#((?:end)?region) ([\w*-]+) ?\*\/$/,/^#pragma ((?:end)?region) ([\w*-]+)$/,/^<!-- #?((?:end)?region) ([\w*-]+) -->$/,/^#((?:End )Region) ([\w*-]+)$/,/^::#((?:end)region) ([\w*-]+)$/,/^# ?((?:end)?region) ([\w*-]+)$/],n=null,o=-1;for(let[i,s]of e.entries())if(n===null){for(let a of r)if(Wu(s,a,t)){o=i+1,n=a;break}}else if(Wu(s,n,t,!0))return{start:o,end:i,regexp:n};return null}function zu(e,t){let r=(o,i,s,a)=>{let f=o.bMarks[i]+o.tShift[i],u=o.eMarks[i];if(o.sCount[i]-o.blkIndent>=4)return!1;for(let w=0;w<3;++w)if(o.src.charCodeAt(f+w)!==60||f+w>=u)return!1;if(a)return!0;let p=f+3,d=o.skipSpacesBack(u,f),C=o.src.slice(p,d).trim().replace(/^@/,t).trim(),{filepath:v,extension:x,region:R,lines:S,lang:I,title:L}=__(C);o.line=i+1;let G=o.push("fence","code",0);G.info=`${I||x}${S?`{${S}}`:""}${L?`[${L}]`:""}`;let{realPath:O,path:D}=o.env,A=Gu.resolve(Gu.dirname(O??D),v);return G.src=[A,R.slice(1)],G.markup="```",G.map=[i,i+1],!0},n=e.renderer.rules.fence;e.renderer.rules.fence=(...o)=>{let[i,s,,{includes:a}]=o,l=i[s],[f,u]=l.src??[];if(!f)return n(...o);a&&a.push(f);let p=_i.statSync(f).isFile();if(!_i.existsSync(f)||!p)return l.content=p?`Code snippet path not found: ${f}`:"Invalid code snippet option",l.info="",n(...o);let d=_i.readFileSync(f,"utf8");if(u){let C=d.split(/\r?\n/),v=C_(C,u);v&&(d=x_(C.slice(v.start,v.end).filter(x=>!v.regexp.test(x.trim())).join(`
|
|
39
|
+
`)))}return l.content=d,n(...o)},e.block.ruler.before("fence","snippet",r)}c();var Yu={light:"github-light",dark:"github-dark"};async function xi(e,t,r=!1,n="/"){let o=t?.config.markdown||{},i=o.theme??Yu,s=t?.config.siteConfig||{};o.preConfig&&o.preConfig(e),e.use(gu,{...o.component}),e.use(qu).use(Tu,{theme:i,siteConfig:s}).use(zu,t?.userRoot).use(Fu,{...o.blocks,theme:i}).use(E_,{languages:t?.config.siteConfig.languages}).use(Bu,{target:"_blank",rel:"noreferrer",...o.externalLinks},n),e.use(Uu,o.lineNumbers),o.attrs?.disable||e.use(S_,o.attrs),e.use(R_),r||e.use(Ku,{slugify:ct,permalink:Ku.permalink.linkInsideHeader({symbol:"​",renderAttrs:(l,f)=>{let u=f.tokens.findIndex(d=>{let v=d.attrs?.find(x=>x[0]==="id");return v&&l===v[1]});return{"aria-label":`Permalink to "${f.tokens[u+1].content}"`}}}),...o.anchor}),e.use(hu,{...o.frontmatter}).use(yu,{slugify:ct,...o.headers}).use(xu,{...o.sfc}).use(Cu).use(bu,{...o.toc}),e.use(di,o.katex);let a=t?.config.siteConfig.vanillaLazyload||{enable:!1};return e.use(pu,{figcaption:!0,lazy:!0,async:!0,...a.enable?{lazy:!0,async:!0,classes:"lazy"}:{},...o.imageFigures}),e.use(w_),o.config&&o.config(e),e}async function Xu(e){let t=e?.config.markdown||{},r=t.theme??Yu,n=b_({html:!0,linkify:!0,highlight:await ju(r,t.languages,t.defaultHighlightLang),...t.options});return await xi(n,e),n}c();import{resolve as $_}from"node:path";import{existsSync as F_}from"node:fs";import{fileURLToPath as I_}from"node:url";import L_ from"jiti";import Ju from"defu";import{presetAttributify as M_,presetIcons as N_,presetTypography as D_,presetUno as V_,transformerDirectives as H_,transformerVariantGroup as j_}from"unocss";c();import{resolve as A_}from"node:path";import{fileURLToPath as k_}from"node:url";import P_ from"fs-extra";import{isObject as O_}from"@antfu/utils";import T_ from"jiti";function Qu(e,t,r=""){return e={...e},Object.keys(t).forEach(n=>{O_(e[n])?e[n]=Qu(e[n],t[n],r?`${r}.${n}`:n):Array.isArray(e[n])?e[n]=[...e[n],...t[n]]:e[n]=t[n]}),e}async function Zu(e,t,r,n,o=!0){let i=n;for(let s of e){let a=A_(s,"setup",t);if(P_.existsSync(a)){let{default:l}=T_(k_(import.meta.url))(a),f=await l(r);f!==null&&(i=o?Qu(i,f):f)}}return i}async function q_(e){let{config:t}=e,r=["i-ri-clipboard-line","i-ri-archive-line","i-ri-folder-2-line","i-ri-price-tag-3-line","i-ri-cloud-line"].concat(e.config.unocss?.safelist||[]),n="animate-fade-in m-auto text-left".split(" ").concat(["rotate-y-180"]).concat(r),o=t.siteConfig;o.social?.length&&o.social.forEach(s=>n.push(s?.icon||""));let i=o.sponsor?.methods||[];return i.length&&i.forEach(s=>n.push(s?.icon||"")),n}async function B_(e){let{config:t}=e;return{shortcuts:[["flex-center","flex items-center justify-center"],["inline-flex-center","inline-flex items-center justify-center"],["btn","px-4 py-1 rounded inline-block bg-$va-c-primary text-white cursor-pointer transition hover:bg-$va-c-primary-light disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50"],["icon-btn","inline-flex justify-center items-center cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-sky-600"],["va-card","shadow hover:shadow-lg bg-$va-c-bg-light"]],presets:[V_(t.unocssPresets?.uno),M_(t.unocssPresets?.attributify),N_({scale:1.2,...t.unocssPresets?.icons}),D_(t.unocssPresets?.typography)],rules:[["font-serif",{"font-family":"var(--va-font-serif)"}],["font-sans",{"font-family":"var(--va-font-sans)"}],["font-mono",{"font-family":"var(--va-font-mono)"}]],transformers:[H_(),j_()],safelist:await q_(e)}}async function ef(e){let t=await import("unocss/vite").then(d=>d.default),{unocss:r}=e.config,n=await B_(e),{themeRoot:o,clientRoot:i,roots:s}=e,a=["uno.config.ts","unocss.config.ts"],l=[];[o,i].forEach(d=>a.forEach(C=>l.push($_(d,C))));let u={},p=[];return l.forEach(d=>{if(F_(d)){let C=L_(I_(import.meta.url))(d);"default"in C&&(C=C.default),u=Ju(u,C),p.push(d)}}),u=await Zu(s,"unocss.ts",{},u,!0),t({configDeps:p,configFile:!1,...Ju(r||{},u,n)})}c();import{dirname as K_,join as tf,resolve as Ie}from"node:path";import{mergeConfig as Y_,searchForWorkspaceRoot as bi}from"vite";import X_ from"is-installed-globally";import Q_ from"fs-extra";import{uniq as rf}from"@antfu/utils";c();import{join as Ci,resolve as U_}from"node:path";import Ur from"fs-extra";import{uniq as G_}from"@antfu/utils";import{loadConfigFromFile as W_,mergeConfig as z_}from"vite";async function Gr({userRoot:e,themeRoot:t},r){let n={mode:"development",command:r},o={},i=G_([t,e]).map(s=>Ci(s,"vite.config.ts"));for await(let s of i){if(!Ur.existsSync(s))continue;let a=await W_(n,s);a?.config&&(o=z_(o,a.config))}return o}async function Wr({clientRoot:e,themeRoot:t,userRoot:r,config:n}){let o=U_(e,"template.html"),i=await Ur.readFile(o,"utf-8"),s="",a="";n.siteConfig.favicon&&(s+=`<link rel="icon" href="${n.siteConfig.favicon}">`);let l=[r,t];n.siteConfig.mode==="auto"&&(s+=`
|
|
40
|
+
<script>
|
|
41
|
+
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
42
|
+
const colorSchemeSetting = localStorage.getItem('vueuse-color-scheme') || 'auto';
|
|
43
|
+
if (colorSchemeSetting === 'dark' || (prefersDark && colorSchemeSetting !== 'light')) {
|
|
44
|
+
document.documentElement.classList.toggle('dark', true);
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
`),n.siteConfig.lang&&(s+=`
|
|
48
|
+
<script>
|
|
49
|
+
const locale = localStorage.getItem('valaxy-locale') || '${n.siteConfig.lang}';
|
|
50
|
+
document.documentElement.setAttribute('lang', locale);
|
|
51
|
+
</script>
|
|
52
|
+
`);for(let f of l){let u=Ci(f,"index.html");if(!Ur.existsSync(u))continue;let p=await Ur.readFile(u,"utf-8");s+=`
|
|
53
|
+
${(p.match(/<head>([\s\S]*?)<\/head>/im)?.[1]||"").trim()}`,a+=`
|
|
54
|
+
${(p.match(/<body>([\s\S]*?)<\/body>/im)?.[1]||"").trim()}`}return i=i.replace("__ENTRY__",Z(Ci(e,"main.ts"))).replace("<!-- head -->",s).replace("<!-- body -->",a),i}var Z_=["@unhead/schema-org","@unhead/vue","@vueuse/integrations/useFuse","body-scroll-lock","defu","dayjs","dayjs/locale/zh-cn","dayjs/plugin/relativeTime","dayjs/plugin/timezone","dayjs/plugin/utc","katex","nprogress","unocss","vue","vue-router","vue-i18n","fuse.js","medium-zoom","vanilla-lazyload"],nf=["@docsearch/css","@vueuse/core","@vueuse/shared","@unocss/reset","unocss","vue","vue-demi","meting","valaxy","/@valaxyjs/config","/@valaxyjs/context","/@valaxyjs/addons","/@valaxyjs/locales","/@valaxyjs/styles"];function of(e){let t=Object.keys(e.config.themeConfig.pkg.dependencies||{}),r=e.addons.map(n=>Object.keys(n.pkg.dependencies||{})).flat();return{name:"valaxy:site",config(n){let o={root:e.clientRoot,publicDir:tf(e.userRoot,"public"),define:Si(e),resolve:{alias:J_(e),dedupe:["vue"]},optimizeDeps:{entries:[Ie(e.clientRoot,"main.ts")],include:rf([...Z_,...t,...r]).filter(i=>!nf.includes(i)),exclude:nf},server:{fs:{allow:rf([bi(e.clientRoot),bi(e.themeRoot),bi(e.userRoot),K_(Fe("katex/package.json",!0))])}}};return X_&&(o.cacheDir=tf(e.pkgRoot,"node_modules/.vite"),o.resolve.alias.vue=`${Fe("vue/dist/vue.esm-browser.js",!0)}`),Y_(n,o)},configureServer(n){return()=>{n.middlewares.use(async(o,i,s)=>{if(o.url.endsWith(".html")){i.setHeader("Content-Type","text/html"),i.statusCode=200,i.end(await Wr(e));return}if(o.url==="/atom.xml"){i.setHeader("Content-Type","application/xml"),i.statusCode=200,i.end(await Q_.readFile(Ie(e.userRoot,"dist/atom.xml"),"utf-8"));return}s()})}}}}function Si(e){return{}}function J_(e){let t=[{find:"~/",replacement:`${Z(e.userRoot)}/`},{find:"valaxy/client/",replacement:`${Z(e.clientRoot)}/`},{find:"valaxy/package.json",replacement:Z(Ie(e.clientRoot,"../package.json"))},{find:/^valaxy$/,replacement:Z(Ie(e.clientRoot,"index.ts"))},{find:"@valaxyjs/client/",replacement:`${Z(e.clientRoot)}/`},{find:`valaxy-theme-${e.theme}/`,replacement:`${Z(Ie(e.themeRoot))}/`},{find:`valaxy-theme-${e.theme}`,replacement:`${Z(Ie(e.themeRoot))}/client/index.ts`}];return e.config.siteConfig.encrypt.enable&&t.push({find:/^vue$/,replacement:Fe("vue/dist/vue.esm-bundler.js",!0)}),e.addons.forEach(r=>{t.push({find:`${r.name}/client/`,replacement:`${Z(`${Ie(r.root)}`)}/client/`}),t.push({find:`${r.name}/App.vue`,replacement:`${Z(Ie(r.root))}/App.vue`}),t.push({find:r.name,replacement:`${Z(Ie(r.root))}/client/index.ts`})}),t.push({find:/^valaxy-addon-(.*)$/,replacement:Z(Ie(e.clientRoot,"./addons/index.ts"))}),t}c();import{existsSync as e1}from"node:fs";import{join as t1,resolve as r1}from"node:path";import{slash as n1,uniq as o1}from"@antfu/utils";function sf({clientRoot:e,themeRoot:t,userRoot:r}){let n=n1(r1(e,"setup"));return{name:"valaxy:setup",enforce:"pre",async transform(o,i){if(i.startsWith(n)){let s=i.slice(n.length+1).replace(/\?.*$/,""),a=[],l=[];return o1([t,r]).map(u=>t1(u,"setup",s)).forEach((u,p)=>{if(!e1(u))return;a.push(`import __n${p} from '${Z(u)}'`);let d=`__n${p}`;/\binjection_return\b/g.test(o)&&(d=`injection_return = ${d}`),/\binjection_arg\b/g.test(o)?d+="(injection_arg)":d+="()",l.push(`// ${u}`,d)}),o=o.replace("/* __imports__ */",a.join(`
|
|
55
|
+
`)),o=o.replace("/* __injections__ */",l.join(`
|
|
56
|
+
`)),o}return null}}}c();import{objectEntries as i1}from"@antfu/utils";function af(e){let t=i1(Si(e));return[{name:"valaxy:flags",enforce:"pre",transform(r,n){if(n.match(/\.vue($|\?)/)){let o=r;if(t.forEach(([i,s])=>{r=r.replace(new RegExp(i,"g"),s)}),o!==r)return r}}}]}c();import p1 from"vite-plugin-pages";import zr from"fs-extra";import d1 from"gray-matter";import{isDate as lf}from"@antfu/utils";import{convert as m1}from"html-to-text";c();import{existsSync as s1,readFileSync as a1}from"node:fs";function c1(e){let t=(e.match(/[\u4E00-\u9FA5]/g)||[]).length,r=(e.replace(/[\u4E00-\u9FA5]/g,"").match(/[a-zA-Z0-9_\u0392-\u03C9\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF\u0400-\u04FF]+|[\u00E4\u00C4\u00E5\u00C5\u00F6\u00D6]+|\w+/g)||[]).length;return{cn:t,en:r}}function l1({cn:e,en:t},r){let n=e/(r.speed.cn||300)+t/(r.speed.en||100);return n<1?1:Math.ceil(n)}function u1({cn:e,en:t}){let r=e+t;return r<1e3?r:`${Math.round(r/100)/10}k`}function f1(e,t){let r=c1(e);return{countData:r,wordCount:u1(r),readingTime:l1(r,t.readTime)}}function cf({route:e,options:t}){if(s1(e.component)){let r=a1(e.component,"utf-8"),{wordCount:n,readingTime:o}=f1(r,{readTime:Object.assign({speed:{cn:300,en:100}},t.readTime)});e.meta.frontmatter&&(e.meta.frontmatter.wordCount||(e.meta.frontmatter.wordCount=n),e.meta.frontmatter.readingTime||(e.meta.frontmatter.readingTime=o))}}function g1(e="",t="html"){switch(t){case"ai":case"md":return e;case"html":return Kr.render(e);case"text":return m1(Kr.render(e));default:return e}}function uf(e){let{roots:t,config:r}=e;return p1({extensions:["vue","md"],dirs:t.map(n=>`${n}/pages`),...r.pages,async extendRoute(n,o){let i=n.component,s=JSON.parse(JSON.stringify(r.siteConfig.frontmatter))||{};if(n.meta?n.meta.frontmatter||(n.meta.frontmatter=s):n.meta={frontmatter:s},n.path=encodeURI(n.path),n.path==="/"&&(n.meta.layout="home"),t.forEach(a=>{let l=a+n.component;zr.existsSync(l)&&(i=l)}),n.path.startsWith("/posts/")&&(n.meta.layout="post"),i.endsWith(".md")){let a=zr.readFileSync(i,"utf-8"),{data:l,excerpt:f,content:u}=d1(a,{excerpt_separator:Mr}),p=l,d=e.config.siteConfig.lastUpdated;if(delete p.password,p.gallery_password&&(delete p.gallery_password,delete p.photos),p.date||(p.date=zr.statSync(i).mtime),d&&(p.updated||(p.updated=zr.statSync(i).ctime)),lf(p.date)||(p.date=new Date(p.date)),lf(p.updated)||(p.updated=new Date(p.updated)),n.meta=Object.assign(n.meta,{frontmatter:Object.assign(s,p),excerpt:f?g1(f,p.excerpt_type):""}),l.layout&&(n.meta.layout=l.layout),n.meta.frontmatter?.updated||(n.meta.frontmatter.updated=n.meta.frontmatter.date),n.meta.frontmatter.tags){let v=n.meta.frontmatter.tags;typeof v=="string"&&(n.meta.frontmatter.tags=[v])}r.siteConfig.statistics.enable&&cf({options:r.siteConfig.statistics,route:n});let C={route:n,data:l,excerpt:f,content:u,path:i};r.extendMd?.(C)}return r.pages?.extendRoute?.(n,o),n}})}c();import{join as At,relative as V1,resolve as H1}from"node:path";import zt from"fs-extra";import{defu as j1}from"defu";import q1 from"pascalcase";c();var Et=Me(yi(),1),mf=Me(zo(),1);import He from"node:path";import Ai from"fs-extra";import{LRUCache as x1}from"lru-cache";c();import{webcrypto as Ri}from"node:crypto";function h1(e){let t=new TextEncoder;return Ri.subtle.importKey("raw",t.encode(e),"PBKDF2",!1,["deriveBits","deriveKey"])}function y1(e,t){return Ri.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"])}async function Yr(e,t){let{password:r,iv:n,salt:o}=t,i=await h1(r),s=await y1(i,o),a=new TextEncoder,l=await Ri.subtle.encrypt({name:"AES-CBC",iv:n},s,a.encode(e));return String.fromCharCode(...new Uint8Array(l))}c();import wi from"node:path";import v1 from"fs-extra";import{slash as _1}from"@antfu/utils";function Ei(e,t,r,n){let o=/<!--\s*@include:\s*(.*?)\s*-->/g,i=/\{(\d*),(\d*)\}$/;return t.replace(o,(s,a)=>{if(!a.length)return s;let l=a.match(i);l&&(a=a.slice(0,-l[0].length));let f=a[0]==="@";try{let u=f?wi.join(e,a.slice(a[1]==="/"?2:1)):wi.join(wi.dirname(r),a),p=v1.readFileSync(u,"utf-8");if(l){let[,d,C]=l;p=p.split(/\r?\n/).slice(d?Number.parseInt(d,10)-1:void 0,C?Number.parseInt(C,10):void 0).join(`
|
|
57
|
+
`)}return n.push(_1(u)),Ei(e,p,u,n)}catch{return s}})}var C1="\u200B",b1="<wbr>",ff=(0,mf.default)("vitepress:md"),pf=new x1({max:1024}),S1=/<!--\s*@include:\s*(.*?)\s*-->/g;function R1(e={},t){let r=["process.env"];return t&&r.push("import.meta",...Object.keys(e)),new RegExp(`\\b(${r.map(n=>n.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")).join("|")})`,"g")}function gf(e,t,r){return e=e.replace(/<a (.*?)>(.*?)<\/a>/g,"<AppLink $1>$2</AppLink>"),e.replace(t,n=>`${n[0]}${r}${n.slice(1)}`)}function w1(e,t,r){if(typeof t.title=="string"){let n=e.parseInline(t.title,{})[0];if(n)return Ut(n,{shouldAllowHtml:!1,shouldEscapeText:!1})}return r}function E1(e,t){if(!e||!e.length)return;let r=e.find(([n,o={}])=>n==="meta"&&o.name===t&&o.content);return r&&r[1].content}function A1(e){let{description:t,head:r}=e;return t!==void 0?t:r&&E1(r,"description")||""}function k1(e,t,r){if(typeof r!="number"||r<=0)return e;let n=t.config.siteConfig.codeHeightLimit;return e=e.replaceAll(/<div.+class="language-\w+">/g,o=>(n!==void 0&&n>0?o=o.replace(/\d+/,r.toString()):o=`${o.slice(0,5)}style="max-height: ${r}px;"${o.slice(5)}`,o)),e}async function hf(e,t,r,n,o=!1,i=!1,s="with-subfolders"){let a=await Xu(e);r=r.map(f=>$e(f.replace(/\.md$/,"")).replace(/\/index$/,""));let l=R1(n,o);return async(f,u,p)=>{let d=u,C=He.dirname(u),v=$e(He.relative(t,u)),x=JSON.stringify({src:f,file:d}),R=pf.get(x);if(R)return ff(`[cache hit] ${v}`),R;let S=Date.now(),I=[];f=Ei(t,f,d,I),f=f.replace(S1,(M,W)=>{try{let j=He.join(C,W),ne=Ai.readFileSync(j,"utf-8");return I.push($e(j)),ne}catch{return M}});let L={path:u,relativePath:v,cleanUrls:s,realPath:d},G=a.render(f,L),{frontmatter:O={},headers:D=[],links:A=[],sfcBlocks:w,title:T=""}=L,z=[],m=M=>{console.warn(Et.default.yellow(`
|
|
58
|
+
(!) Found dead link ${Et.default.cyan(M)} in file ${Et.default.white(Et.default.dim(u))}
|
|
59
|
+
If it is intended, you can use:
|
|
60
|
+
${Et.default.cyan(`<a href="${M}" target="_blank" rel="noreferrer">${M}</a>`)}`)),z.push(M)};if(A){let M=He.dirname(u);for(let W of A){if(/\.(?!html|md)\w+($|\?)/i.test(W))continue;if(W.replace(Ct,"").startsWith("//localhost:")){m(W);continue}W=W.replace(/[?#].*$/,"").replace(/\.(html|md)$/,"");let j=decodeURIComponent($e(W.startsWith("/")?W.slice(1):He.relative(t,He.resolve(M,W)))).replace(/\/index$/,"");(j.endsWith("/")?r.includes(j.slice(0,-1)):r.includes(j)||Ai.existsSync(He.resolve(M,p,`${j}.html`))||Ai.existsSync(He.resolve(M,p,`${j}/index.html`)))||m(W)}}let k={title:w1(a,O,T),titleTemplate:O.titleTemplate,description:A1(O),frontmatter:O,headers:D,relativePath:v,path:He.join(t,v)};i&&(k.lastUpdated=await Vt(u));let $="ValaxyMain";function V(){return["main-header","main-header-after","main-nav","main-content","main-content-after","main-nav-before","main-nav-after","comment","footer","aside","aside-custom"].map(j=>`<template #${j}><slot name="${j}" /></template>`).join("")}let y=gf(G,l,b1);y=k1(y,e,O.codeHeightLimit);let{config:{siteConfig:{encrypt:_}}}=e;if(_.enable){let M=/<!-- valaxy-encrypt-start:(?<password>\w+) -->(?<content>.*?)<!-- valaxy-encrypt-end -->/gs,W=/((<!-- valaxy-encrypt-start:\w+ -->)|(<!-- valaxy-encrypt-end -->))/g;if(O.password)y=y.replaceAll(W,"");else{let j=[];for(let J of y.matchAll(M))j.push(await Yr(J.groups.content,{password:J.groups.password,iv:_.iv,salt:_.salt}));O.partiallyEncryptedContents=j.length?j:void 0;let ne=0;y=y.replaceAll(M,()=>`<ValaxyDecrypt :encrypted-content="frontmatter.partiallyEncryptedContents[${ne++}]" />`)}if(O.password){let j=await Yr(y,{password:O.password,iv:_.iv,salt:_.salt});y="",O.encryptedContent=j,O.encrypt=!0,delete O.password}if(O.gallery_password){let j=await Yr(JSON.stringify(O.photos),{password:O.gallery_password,iv:_.iv,salt:_.salt});O.encryptedPhotos=j,delete O.gallery_password,delete O.photos}}let q=[...I1(w?.scripts.map(M=>M.content)??[],k,l),`<template><${$} :frontmatter="frontmatter" :data="data">`,`<template #main-content-md>${y}</template>`,V(),"<slot />",`</${$}></template>`,...w?.styles.map(M=>M.content)??[],...w?.customBlocks.map(M=>M.content)??[]].join(`
|
|
61
|
+
`);ff(`[render] ${u} in ${Date.now()-S}ms.`);let F={vueSrc:q,pageData:k,deadLinks:z,includes:I};return pf.set(f,F),F}}var df=/<\/script>/,P1=/<\s*script[^>]*\blang=['"]ts['"][^>]*/,O1=/<\s*script[^>]*\bsetup\b[^>]*/,T1=/<\s*script[^>]*\bclient\b[^>]*/,$1=/((?:^|\n|;)\s*)export(\s*)default/,F1=/((?:^|\n|;)\s*)export(.+)as(\s*)default/;function I1(e,t,r){let n=JSON.stringify(t),o=`
|
|
62
|
+
export const __pageData = JSON.parse(${JSON.stringify(gf(n,r,C1))})`,i=e.findIndex(l=>df.test(l)&&!O1.test(l)&&!T1.test(l)),s=e.findIndex(l=>P1.test(l))>-1,a=`
|
|
63
|
+
import { provide } from 'vue'
|
|
64
|
+
import { useRoute } from 'vue-router'
|
|
65
|
+
const data = ${Al(t)}
|
|
66
|
+
|
|
67
|
+
export default {
|
|
68
|
+
name:'${t.relativePath}',
|
|
69
|
+
data() {
|
|
70
|
+
return { data, frontmatter: data.frontmatter, $frontmatter: data.frontmatter }
|
|
71
|
+
},
|
|
72
|
+
setup() {
|
|
73
|
+
const route = useRoute()
|
|
74
|
+
route.meta.frontmatter = Object.assign(route.meta.frontmatter, data.frontmatter)
|
|
75
|
+
provide('pageData', data)
|
|
76
|
+
}
|
|
77
|
+
}`;if(i>-1){let l=e[i],f=$1.test(l)||F1.test(l);e[i]=l.replace(df,`${o+(f?"":`
|
|
78
|
+
${a}`)}</script>`)}else e.unshift(`<script ${s?'lang="ts"':""}>${o}
|
|
79
|
+
${a}</script>`);return e}c();import{cyan as L1,red as M1,yellow as N1}from"kolorist";import D1 from"consola";function yf(e,t){e.includes("{%")&&e.includes("%}")&&D1.error(`${`${t}
|
|
80
|
+
`} Please ${M1("remove")} ${L1("{% %}")}, because it conflicts with ${N1("markdown-it-attrs")}.`)}function B1(e,t){let r=[];t.config.features?.katex&&(r.push(`import "${Z(Fe("katex/dist/katex.min.css",!0))}"`),r.push(`import "${Z(At(t.clientRoot,"styles/third/katex.scss"))}"`));for(let n of e){let o=[];["index","css-vars"].forEach(s=>{o.push(At(n,"styles",`${s}.css`)),o.push(At(n,"styles",`${s}.scss`))});for(let s of o)zt.existsSync(s)&&r.push(`import "${Z(s)}"`)}return r.join(`
|
|
81
|
+
`)}function U1(e){let t=['import { defu } from "defu"','const messages = { "zh-CN": {}, en: {} }'],r=["zh-CN","en"];return e.forEach((n,o)=>{r.forEach(i=>{let s=`${n}/locales/${i}.yml`;if(zt.existsSync(s)&&zt.readFileSync(s,"utf-8")){let a=i.replace("-","")+o;t.unshift(`import ${a} from "${Z(s)}"`),t.push(`messages['${i}'] = defu(${a}, messages['${i}'])`)}})}),t.push("export default messages"),t.join(`
|
|
82
|
+
`)}function G1(e){let t=e.addons.filter(i=>i.global).filter(i=>zt.existsSync(At(i.root,"./App.vue"))),r=i=>`Addon${q1(i)}App`,n=t.map(i=>`import ${r(i.name)} from "${i.name}/App.vue"`).join(`
|
|
83
|
+
`),o=t.map(i=>`{ component: ${r(i.name)}, props: ${JSON.stringify(i.props)} }`).join(",");return`${n}
|
|
84
|
+
export default [${o}]`}var W1='import { defineComponent } from "vue"; export default defineComponent({ render: () => null });';function vf(e){let t=At(e,"App.vue");return zt.existsSync(t)?[`import AppVue from "${Z(t)}"`,"export default AppVue"].join(`
|
|
85
|
+
`):W1}function _f(e,t={}){let{config:r}=e,n="/@valaxy",o=e.roots,i,s=!1,a;return{name:"valaxy:loader",enforce:"pre",async configResolved(l){a=l,i=await hf(e,e.userRoot,e.pages,a.define,a.command==="build",e.config.siteConfig.lastUpdated)},configureServer(l){l.watcher.add([e.configFile,e.clientRoot,e.themeRoot,e.userRoot])},resolveId(l){return l.startsWith(n)?l:null},load(l){if(l==="/@valaxyjs/config")return`export default ${JSON.stringify(JSON.stringify(r))}`;if(l==="/@valaxyjs/context")return`export default ${JSON.stringify(JSON.stringify({userRoot:e.userRoot}))}`;if(l==="/@valaxyjs/styles")return B1(o,e);if(l==="/@valaxyjs/locales")return U1(o);if(l==="/@valaxyjs/addons")return G1(e);if(l==="/@valaxyjs/UserAppVue")return vf(e.userRoot);if(l==="/@valaxyjs/ThemeAppVue")return vf(e.themeRoot);if(l.startsWith(n))return{code:"",map:{mappings:""}}},async transform(l,f){if(f.endsWith(".md")){yf(l,f),l.replace("{%","{%"),l.replace("%}","%}");let{vueSrc:u,deadLinks:p,includes:d}=await i(l,f,a.publicDir);return p.length&&(s=!0),d.length&&d.forEach(C=>{this.addWatchFile(C)}),u}},renderStart(){if(s&&!r.ignoreDeadLinks)throw new Error("One or more pages contain dead links.")},async handleHotUpdate(l){let{file:f,server:u,read:p}=l,d=v=>{t.onConfigReload?.(v,e.config),Object.assign(e.config,v),r=v;let x=["/@valaxyjs/config","/@valaxyjs/context"];return[...Array.from(x).map(S=>u.moduleGraph.getModuleById(S))].filter(S=>!!S)};if([e.configFile].includes(f)){let{config:v}=await _e({userRoot:e.userRoot});return d(v)}if(f===e.siteConfigFile){let{siteConfig:v}=await Dr(e.userRoot);return r.siteConfig=j1(v,si),d(r)}if(f===e.themeConfigFile){let{config:v}=await _e({userRoot:e.userRoot});return d(v)}if(f===H1(e.themeRoot,"valaxy.config.ts")){let v=ui(e),x=bt(e.config,v),{config:R}=await li(e,x);return d(R)}if(f.endsWith(".md")){let v=await p(),{pageData:x,vueSrc:R}=await i(v,f,At(e.userRoot,"public")),I={path:`/${$e(V1(`${e.userRoot}/pages`,f))}`,pageData:x};u.ws.send({type:"custom",event:"valaxy:pageData",data:I}),l.read=()=>R}}}}var Kr=new K1({html:!0});async function Kt(e,t={}){let{roots:r,config:n}=e;await xi(Kr,e,!0);let o=new Set(["annotation","math","menclose","mfrac","mglyph","mi","mlabeledtr","mn","mo","mover","mpadded","mphantom","mroot","mrow","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics","meting-js"]);return[Y1({include:[/\.vue$/,/\.md$/],template:{compilerOptions:{isCustomElement:i=>o.has(i)},...n.vue?.template},...n.vue}),J1(),of(e),sf(e),_f(e,t),uf(e),X1({layoutsDirs:r.map(i=>`${i}/layouts`)}),Q1({extensions:["vue","md"],include:[/\.vue$/,/\.vue\?vue/,/\.md$/],exclude:[],allowOverrides:!0,dirs:r.map(i=>`${i}/components`).concat(r.map(i=>`${i}/layouts`)).concat(["src/components","components"]),dts:`${e.userRoot}/components.d.ts`,...n.components}),await ef(e),Z1({runtimeOnly:!0,compositionOnly:!0,include:r.map(i=>`${i}/locales/**`)}),z1(),af(e)]}c();import{writeFile as ex}from"node:fs/promises";import{ensureFile as tx}from"fs-extra";function Xr(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function xf(e){let t=[];for(let r of e)if(Array.isArray(r.from))for(let n of r.from)t.push({from:Xr(n),to:Xr(r.to)});else t.push({from:Xr(r.from),to:Xr(r.to)});return t}async function Cf(e,t){await tx(t),await ex(t,`
|
|
86
|
+
<!DOCTYPE html>
|
|
87
|
+
<html lang="en">
|
|
88
|
+
<head>
|
|
89
|
+
<meta charset="UTF-8">
|
|
90
|
+
<meta http-equiv="refresh" content="0; url=${e}">
|
|
91
|
+
<link rel="canonical" href="${e}">
|
|
92
|
+
</head>
|
|
93
|
+
<script>
|
|
94
|
+
window.location.href = '${e}' + window.location.search + window.location.hash
|
|
95
|
+
</script>
|
|
96
|
+
</html>
|
|
97
|
+
`)}async function wf(e,t={}){let r=Rf(t,{plugins:await Kt(e)});await rx(r)}async function Ef(e,t={}){let r={plugins:await Kt(e),ssr:{noExternal:["workbox-window",/vue-i18n/]}};r.ssgOptions={script:"async",formatting:"minify",crittersOptions:{reduceInlineStyles:!1},onFinished(){ox({hostname:e.config.siteConfig.url})}};let n=Rf(r,t);await nx({},n)}async function Af(e){let{userRoot:t}=e,r=Sf(t,"dist/index.html");if(Qr.existsSync(r)){ix.info("post process for ssg...");let n=await Qr.readFile(r,"utf-8"),o="</html>";if(!n.endsWith(o)){let i=n.lastIndexOf(o);await Qr.writeFile(r,n.slice(0,i+o.length),"utf-8")}}await sx(e)}async function sx(e){let t=Sf(e.userRoot,"dist"),n=xf(e.config.siteConfig?.redirects??[]).map(async o=>{let i=bf(t,`${o.from}.html`),s=bf(t,`${o.to}.html`);if(!await Qr.pathExists(s))throw new Error(`the route of '${o.to}' not exists`);await Cf(o.to,i)});await Promise.all(n)}c();c();c();import kf from"node:process";import{createServer as ax,mergeConfig as cx}from"vite";async function Pf(e,t={},r={}){kf.env.EDITOR=kf.env.EDITOR||"code";let n=await Kt(e,r),o=cx(t,{plugins:n});return await ax(o)}c();c();import{createHooks as lx}from"hookable";var ux=["build:before","build:after"];function Zr(e){let t=lx();typeof e.config.hooks=="object"&&Object.keys(e.config.hooks).forEach(n=>{let o=n,i=e.config.hooks[o];typeof i=="function"&&(ux.includes(o)?e.mode==="build"&&t.hook(o,i):t.hook(o,i))});let r={version:ut,hooks:t,hook:t.hook,options:e};return e.addons.forEach(n=>{typeof n.setup=="function"&&n.setup(r)}),r}c();import*as $f from"node:readline";import fx from"node:path";import px from"node:os";import Qe from"node:process";import{blue as Of,bold as ki,cyan as dx,dim as Ee,gray as mx,green as gx,underline as Jr,yellow as hx}from"kolorist";import Tf from"consola";import{mergeConfig as yx}from"vite";var en;function tn(e,t,r){if(console.log(),console.log(` ${ki("\u{1F30C} Valaxy")} ${Of(`v${ut}`)}`),console.log(),console.log(`${Ee(" \u{1FA90} theme ")} > ${e.theme?gx(e.theme):mx("none")}`),console.log(` ${Ee("\u{1F4C1}")} ${Ee(fx.resolve(e.userRoot))}`),t){console.log(),console.log(`${Ee(" Preview ")} > ${dx(`http://localhost:${ki(t)}/`)}`),r&&Object.values(px.networkInterfaces()).forEach(l=>(l||[]).filter(f=>f.family==="IPv4"&&!f.address.includes("127.0.0.1")).forEach(({address:f})=>{console.log(`${Ee(" Network ")} > ${Of(`http://${f}:${ki(t)}/`)}`)})),console.log();let n=`${Jr("r")}${Ee("estart")}`,o=`${Jr("e")}${Ee("dit")}`,i=`${Jr("o")}${Ee("pen")}`,s=`${Jr("q")}${Ee("r")}`,a=`${Ee(" | ")}`;console.log(`${Ee(" shortcuts ")} > ${n}${a}${i}${a}${s}${a}${o}`)}console.log()}async function Yt(e,t){en&&await en.close();let r=yx(await Gr(e,"serve"),t);try{en=await Pf(e,r,{async onConfigReload(n,o,i=!1){i&&(Tf.info("[valaxy]",`${hx("force")} reload the server`),Yt(e,t));let s=!1;n.theme!==o.theme&&(s=!0),s&&Yt(e,t)}}),await en.listen()}catch(n){Tf.error(`failed to start server. error:
|
|
98
|
+
`),console.error(n),Qe.exit(1)}}function Ff(e){Qe.stdin.resume(),Qe.stdin.setEncoding("utf8"),$f.emitKeypressEvents(Qe.stdin),Qe.stdin.isTTY&&Qe.stdin.setRawMode(!0),Qe.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")Qe.exit();else{let[n]=e.filter(o=>o.name===t);if(n)try{n.action()}catch(o){console.error(`Failed to execute shortcut ${n.fullName}`,o)}}})}function Lf(e){e.command("build [root]","build your blog to static content",t=>ze(t).option("ssg",{alias:"s",type:"boolean",default:!1,describe:"static site generate"}).option("output",{alias:"o",type:"string",default:"dist",describe:"output dir"}).option("log",{default:"warn",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({ssg:t,root:r,output:n,log:o})=>{St();let i=await _e({userRoot:r},"build");tn(i);let s=Zr(i);await s.hooks.callHook("options:resolved");let a=[];i.config.modules.rss.enable&&a.push(Hr),Xl(s,a);let l=If(await Gr(i,"build"),i.config.vite||{}),f=If(l,{configFile:rn.resolve(i.clientRoot,"vite.config.ts"),build:{emptyOutDir:!0,outDir:rn.resolve(i.userRoot,n)},logLevel:o});await s.hooks.callHook("config:init");let u=rn.resolve(i.clientRoot,"template.html"),p=rn.resolve(i.clientRoot,"index.html");nn.existsSync(u)&&await nn.copyFile(u,p);let d=await Wr(i);await nn.writeFile(p,d,"utf-8"),await s.hooks.callHook("build:before");try{if(t){Pi.info(`use ${vx("vite-ssg")} to do ssg build...`);try{await Ef(i,f),await Af(i)}catch(C){Pi.error("[vite-ssg] An internal error occurred."),console.log(C)}}else Pi.info("use vite do spa build..."),await wf(i,f)}catch(C){console.log(C)}finally{await nn.copyFile(u,p),await s.hooks.callHook("build:after")}})}c();import Mf from"node:path";import{exec as Cx}from"node:child_process";import bx from"node:process";import Sx from"node:os";import Rx from"fs-extra";import{mergeConfig as wx}from"vite";import Ex from"qrcode";c();import _x from"node:net";async function Oi(e){return await xx(e)?e:await Oi(e+1)}function xx(e){return new Promise(t=>{let r=_x.createServer(n=>{n.write(`Echo server\r
|
|
99
|
+
`),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}function Nf(e){e.command("* [root]","Start a local server for Valaxy",t=>ze(t).option("port",{alias:"p",type:"number",describe:"port"}).option("open",{alias:"o",default:!1,type:"boolean",describe:"open in browser"}).option("remote",{default:!0,type:"boolean",describe:"listen public host and enable remote control"}).option("log",{default:"info",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({root:t,port:r,open:n,remote:o,log:i})=>{ci(),Rx.existsSync(Mf.resolve(t,"pages"))||bx.exit(0);let s=r||await Oi(4859),a=await _e({userRoot:t});Zr(a);let l=wx({configFile:Mf.resolve(a.clientRoot,"vite.config.ts"),server:{watch:{ignored:[`!${a.themeRoot}/**`,`${a.userRoot}/**.md`]},port:s,strictPort:!0,open:n,host:o?"0.0.0.0":"localhost"},logLevel:i},a.config.vite||{});await Yt(a,l),tn(a,s,o),Ff([{name:"r",fullName:"restart",action(){Yt(a,l)}},{name:"o",fullName:"open",async action(){let{default:u}=await import("open");u(`http://localhost:${s}`)}},{name:"q",fullName:"qr",action(){let p=`http://${Object.values(Sx.networkInterfaces()).flat().filter(d=>d?.family==="IPv4"&&!d.address.includes("127.0.0.1"))[0]?.address||"localhost"}:${s}`;Ex.toString(p,{type:"terminal"},(d,C)=>{if(d)throw d;console.log(C)})}},{name:"e",fullName:"edit",action(){Cx(`code "${t}"`)}}])})}var Xt=kx(Px(Ax.argv)).scriptName("valaxy").usage("$0 [args]").version(ut).showHelpOnFail(!1).alias("h","help").alias("v","version");Nf(Xt);Lf(Xt);cu(Xt);var Ox=[Hr,nu];Ox.forEach(e=>{e.extendCli?.(Xt)});function bT(){Xt.help().parse()}export{Vt as a,_l as b,$e as c,oi as d,Z as e,xl as f,bt as g,ii as h,bl as i,Sl as j,Al as k,Fe as l,wy as m,WR as n,Ey as o,zR as p,QR as q,Ay as r,ZR as s,si as t,Pl as u,JR as v,li as w,_e as x,ui as y,Gr as z,Wr as A,wf as B,Ef as C,Af as D,sx as E,Pf as F,Xt as G,bT as H};
|
|
100
|
+
/*! Bundled license information:
|
|
101
|
+
|
|
102
|
+
is-extglob/index.js:
|
|
103
|
+
(*!
|
|
104
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
105
|
+
*
|
|
106
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
107
|
+
* Licensed under the MIT License.
|
|
108
|
+
*)
|
|
109
|
+
|
|
110
|
+
is-glob/index.js:
|
|
111
|
+
(*!
|
|
112
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
113
|
+
*
|
|
114
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
115
|
+
* Released under the MIT License.
|
|
116
|
+
*)
|
|
117
|
+
|
|
118
|
+
is-number/index.js:
|
|
119
|
+
(*!
|
|
120
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
121
|
+
*
|
|
122
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
123
|
+
* Released under the MIT License.
|
|
124
|
+
*)
|
|
125
|
+
|
|
126
|
+
to-regex-range/index.js:
|
|
127
|
+
(*!
|
|
128
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
129
|
+
*
|
|
130
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
131
|
+
* Released under the MIT License.
|
|
132
|
+
*)
|
|
133
|
+
|
|
134
|
+
fill-range/index.js:
|
|
135
|
+
(*!
|
|
136
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
137
|
+
*
|
|
138
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
139
|
+
* Licensed under the MIT License.
|
|
140
|
+
*)
|
|
141
|
+
|
|
142
|
+
queue-microtask/index.js:
|
|
143
|
+
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
144
|
+
|
|
145
|
+
run-parallel/index.js:
|
|
146
|
+
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
147
|
+
*/
|